{"version":3,"sources":["src/Services/Topr.Umbraco/Models/index.ts","src/Style/style.web.scss","src/Style/strapi.scss","src/Screens/Home/style.scss","src/Services/Topr.Umbraco/Models/UmbracoPages.ts","assets/file/topr/terms-and-conditions-nl.pdf","assets/file/topr/terms-and-conditions-en.pdf","assets/stock/amst.jpg","assets/stock/amst2.jpg","assets/stock/rotonde.jpg","assets/stock/rott.jpg","assets/svg/china/China-day.svg","assets/svg/china/China-sunset.svg","assets/svg/china/China-night.svg","assets/svg/fuji/Mt.FujiJapan-day.svg","assets/svg/fuji/Mt.FujiJapan-sunset.svg","assets/svg/fuji/Mt.FujiJapan-night.svg","assets/svg/italy/Italy-day.svg","assets/svg/italy/Italy-sunset.svg","assets/svg/italy/Italy-night.svg","assets/svg/lighthouse/SeaLighthouse-day.svg","assets/svg/lighthouse/SeaLighthouse-sunset.svg","assets/svg/lighthouse/SeaLighthouse-night.svg","assets/svg/london/London-day.svg","assets/svg/london/London-sunset.svg","assets/svg/london/London-night.svg","assets/svg/ship/SeaShip-day.svg","assets/svg/ship/SeaShip-sunset.svg","assets/svg/ship/SeaShip-night.svg","assets/svg/street/Street-day.svg","assets/svg/street/Street-sunset.svg","assets/svg/street/Street-night.svg","assets/svg/tropical/Tropical-day.svg","assets/svg/tropical/Tropical-sunset.svg","assets/svg/tropical/Tropical-night.svg","assets/svg/valley/Valley-day.svg","assets/svg/valley/Valley-sunset.svg","assets/svg/valley/Valley-night.svg","assets/rest-bg.jpg","assets/waiter1.jpg","src/Config/Tenants/Topr/Images/topr-callout-bg.png","src/Config/Tenants/Topr/Images/topr-wallet-logo.jpg","src/Config/Tenants/Topr/Images/logoSquare.png","src/Config/Tenants/Topr/Images/logo.png","assets/appstore.png","assets/playstore.png","assets/fonts/OpenSans-Light.ttf","webpack:///D:/a/1/s/ToprConsumer/ReactClient/src/Components/Web/PageLoader/style.css?0947","src/Components/Web/PageLoader/style.css","webpack:///D:/a/1/s/ToprConsumer/ReactClient/src/Components/Form/Slim/slim.min.css?cab8","src/Components/Form/Slim/slim.min.css","src/Models/Client/Enums.ts","src/Config/Service/DebugConfig.web.ts","src/Config/Service/ProductionConfig.web.ts","src/Config/Tenants/Topr/ToprConfig.ts","src/Config/AppConfig.ts","src/Style/index.ts","src/Components/Layout/Container.tsx","src/Components/Layout/Content.tsx","src/Components/Layout/FooterBar.tsx","src/Components/Layout/TextRow.tsx","src/Components/Headers/ImageHeader.tsx","src/Components/Headers/SubmitHeader.tsx","src/Components/Headers/MyHeader.tsx","src/i18n/index.ts","src/i18n/locales/nl.ts","src/i18n/locales/en.ts","src/Images/SvgImages.ts","src/Images/StockImages.ts","src/Helpers/DateHelpers.ts","src/Helpers/UiHelpers.ts","src/Helpers/NavigationHelper.ts","src/Helpers/TextHelpers.ts","src/Helpers/OrderHelpers.ts","src/Mobx/PersistedStore.ts","src/Components/Modal/MyToast.tsx","src/Models/InzziiApi/Enums.ts","src/Mobx/AppUiStore.web.ts","src/Models/Client/ErrorHandling/ErrorCodes.ts","src/Models/Client/ErrorHandling/ToprError.ts","src/Services/Client/LogService.ts","src/Helpers/ServiceHelpers.ts","src/Services/Inzii.Api/ArticleController.ts","src/Services/Inzii.Api/RestaurantController.ts","src/Services/Inzii.Api/UserController.ts","src/Screens/Location/OrderOnline/Store.ts","src/Images/AppImages.ts","src/Components/Headers/OrderHeader.tsx","src/Components/Form/FormFooter.tsx","src/Components/Form/FormHeader.tsx","src/Components/Form/MyInput.tsx","src/Components/Form/FormInfo.tsx","src/Components/Buttons/MyButton.tsx","src/Components/Form/MyAlertIcon.tsx","src/Components/Form/MyFooter.tsx","src/Components/Form/MyFooterTile.tsx","src/Components/Form/MyCheckBox.tsx","src/Components/Modal/MyWebModal.tsx","src/Components/Modal/MyModal.web.tsx","src/Models/Server/AutomaticCharge/AutomaticChargeStatusTypesDTO.ts","src/Components/Form/MySelectList.tsx","src/Components/Form/EuroTextInput.tsx","src/Components/Form/MySlider.tsx","src/Components/Modal/ConfirmModal.tsx","src/Components/Modal/Authenticate/Pincode/CheckPincodeModal.tsx","src/Components/Modal/Authenticate/AuthenticateModal.tsx","src/Components/Modal/AlertModal.tsx","src/Models/Client/AppLinks/AppLink.ts","src/Models/Client/AppLinks/AppLinks.ts","src/Helpers/UrlHelpers.ts","src/Models/Server/User/ClientToken.ts","src/Services/Topr.Core/Axios/AxiosProxy.ts","src/Services/Topr.Core/AuthenticationController.ts","src/Services/Topr.Core/Axios/AxiosAuthClient.ts","src/Services/Topr.Core/Axios/AxiosAuthUser.ts","src/Services/Topr.Core/UserController.ts","src/Services/Topr.Core/CouponController.ts","src/Services/Topr.Core/EventController.ts","src/Services/Topr.Core/SavingcardController.ts","src/Services/Topr.Core/SubscriptionController.ts","src/Services/Topr.Core/WalletController.ts","src/Services/Topr.Umbraco/index.ts","src/Services/Topr.Core/TokenController.ts","src/Helpers/TokenHelpers.ts","src/Screens/Token/Tokens/Store.ts","src/Screens/Dashboard/Dashboard/Store.web.ts","src/Components/Modal/AddAccountModal/Store.ts","src/Components/Modal/AddAccountModal/AddAccountModal.tsx","src/Components/Loader/Dot.tsx","src/Components/Loader/ToprLoader.tsx","src/Components/Loader/ToprScreenLoader.tsx","src/Components/Buttons/ProfileButton.web.tsx","src/Components/Buttons/LinkButton.tsx","src/Components/Buttons/ImageButton.tsx","src/Components/Buttons/FooterBarButton.tsx","src/Components/Buttons/FooterBarIconButton.tsx","src/Components/Loader/MyLoader.tsx","src/Components/Buttons/FullFooterButton.tsx","src/Components/Buttons/SubmitHeaderButton.tsx","src/Components/Labels/TextBadge.tsx","src/Components/Cards/CardFooter.tsx","src/Components/Cards/CouponSummaryCard.tsx","src/Components/Web/CardTitle.web.tsx","src/Components/Cards/ImageCard.web.tsx","src/Components/Cards/ImageTextCard.tsx","src/Components/Cards/ResultCard.tsx","src/Components/Cards/LocationCard.tsx","src/Components/Cards/AlertCard.tsx","src/Components/Cards/TransparentCardHeader.tsx","src/Components/Cards/ValidityCard.tsx","src/Components/Cards/CouponInfoCard.tsx","src/Components/Cards/SavingCardInfoCard.tsx","src/Components/Cards/StampsCard.tsx","src/Components/Cards/SavingCardSummaryCard.tsx","src/Components/Cards/SystemMessageCard.tsx","src/Components/Labels/TextButton.tsx","src/Components/Labels/MyLabelValue.tsx","src/Components/Labels/MyLabelValueHorizontal.tsx","src/Components/Labels/VersionLabel.tsx","src/Components/Cards/MyQrCode.tsx","src/Models/Client/ErrorHandling/MyErrorMessage.ts","src/Models/Client/QrAction/TableQrObject.ts","src/Models/Client/QrAction/TicketQrObject.ts","src/Screens/Token/AddToken/Components/AddTokenUid/Store.ts","src/Components/Scanners/NfcScanner/Store.ts","src/Components/Scanners/NfcScanner/NfcScanner.tsx","src/Components/Form/MyListItem.tsx","src/Components/Elements/BottomListSpacer.tsx","src/Components/Modal/CodePushUpdatingModal.web.tsx","src/Components/Web/WebIncludes.tsx","src/Helpers/WebHelpers.ts","src/Components/Web/PageLoader/PageLoader.web.tsx","src/Components/Web/StockImageLayout.tsx","src/Components/Web/HorizontalScroll.tsx","src/Components/Web/LeftColumnLayout.tsx","src/Components/Web/Container.tsx","src/Components/Web/MyTab.tsx","src/Components/Web/Spinner.tsx","src/Screens/Wallet/Details/Store.ts","src/Services/Topr.Core/TransactionController.ts","src/Services/Topr.Core/ArantekController.ts","src/Screens/Location/OrderOnline/OrderPayment/Store.ts","src/Screens/Wallet/Charge/Store.ts","src/Navigation/LinkingStore.ts","webpack:///D:/a/1/s/ToprConsumer/ReactClient/src/Style/style.web.scss?cb96","src/Screens/Login/Login.web.tsx","src/Screens/Login/Store.web.ts","src/Screens/Login/ForgotPassword/ForgotPassword.tsx","src/Screens/Login/ForgotPassword/Store.ts","src/Screens/Login/ResetPassword/Store.ts","src/Screens/Login/ResetPassword/ResetPassword.tsx","src/Screens/Dashboard/Components/DashboardHeader/Store.ts","src/Screens/Dashboard/Components/DashboardHeader/DashboardHeader.tsx","src/Screens/Dashboard/Components/CallToActions.tsx","src/Screens/Dashboard/Components/DashboardFooter.tsx","src/Screens/Dashboard/Components/Tabs/WalletsTab.tsx","src/Helpers/ArrayHelpers.ts","src/Screens/Dashboard/Components/Tabs/CouponsTab.tsx","src/Screens/Dashboard/Components/Tabs/SavingCardsTab.tsx","src/Screens/Dashboard/Components/UserMenu/Store.ts","src/Screens/Dashboard/Components/UserMenu/UserListItem.tsx","src/Screens/Dashboard/Components/UserMenu/UserMenu.web.tsx","src/Screens/Dashboard/Components/AddMenu.tsx","src/Screens/Dashboard/Components/Tabs/SubscriptionsTab.tsx","src/Screens/Dashboard/Components/Tabs/TicketsTab.tsx","src/Screens/Dashboard/Components/Tabs/DashboardTabs.tsx","src/Screens/Dashboard/Components/UserMenu/ChildUsersModal.tsx","src/Screens/Dashboard/Dashboard/Dashboard.tsx","src/Components/Buttons/ProfileButtonEmail.web.tsx","src/Screens/Dashboard/Components/Web/SideMenuItem.web.tsx","src/Screens/Dashboard/Components/Web/SideMenu.web.tsx","src/Components/Web/Badge.web.tsx","src/Components/Cards/CouponsCardWeb.tsx","src/Screens/Dashboard/Components/Web/ToprRowLoader.web.tsx","src/Screens/Dashboard/Components/Web/CouponsScroll.web.tsx","src/Components/Cards/UserSavingsCardWeb.tsx","src/Screens/Dashboard/Components/Web/SavingCardsScroll.web.tsx","src/Components/Cards/WalletCardWeb.tsx","src/Screens/Dashboard/Components/Web/WalletsScroll.web.tsx","src/Screens/Dashboard/Dashboard/Screens/Main.tsx","src/Screens/Home/Help/Store.ts","src/Components/Web/Strapi/Download.tsx","src/Components/Web/Strapi/ImageText.tsx","src/Components/Web/Strapi/RegisterLogin.tsx","src/Components/Web/Strapi/TextElement.tsx","src/Components/Web/Strapi/ContentElements.tsx","src/Screens/Home/Components/HelpItemView.tsx","src/Screens/Home/Components/HelpItemsView.tsx","src/Screens/Dashboard/Dashboard/Screens/Help.tsx","src/Screens/Dashboard/Dashboard/DashboardWeb.tsx","src/Screens/Dashboard/Dashboard/index.web.tsx","src/Screens/Dashboard/SetPincode/SetPincode.tsx","src/Screens/Dashboard/index.tsx","src/Services/Topr.Core/RegisterController.ts","src/Screens/Register/Store.ts","src/Screens/Register/Components/NameStep.tsx","src/Screens/Register/Components/EmailStep.tsx","src/Screens/Register/Components/PasswordStep.tsx","src/Screens/Register/Components/TermsStep.tsx","src/Screens/Register/Components/TermsPdf.tsx","src/Screens/Register/Components/ConfirmationSentStep.tsx","src/Screens/Register/Register.tsx","src/Screens/Register/RegisterConfirm.tsx","src/Helpers/LocationHelper.ts","src/Services/Topr.Core/LocationController.ts","src/Screens/Location/Locations/Store.ts","src/Screens/Location/Locations/Locations.tsx","src/Services/Topr.Core/CurrencyController.ts","src/Services/Topr.Core/MerchantController.ts","src/Screens/Location/Details/Store.ts","src/Screens/Location/Details/Components/PaymentTab.tsx","src/Screens/Location/Details/Components/LocationTab.tsx","src/Screens/Location/Details/LocationDetails.web.tsx","src/Screens/Location/OrderOnline/Article/Store.ts","src/Screens/Location/OrderOnline/Article/Components/CondimentCheckBox.tsx","src/Screens/Location/OrderOnline/Article/Components/CondimentRadioButton.tsx","src/Screens/Location/OrderOnline/Article/Components/CondimentGroup.tsx","src/Screens/Location/OrderOnline/Article/Article.tsx","src/Screens/Location/OrderOnline/Cart/Components/IconButton.tsx","src/Screens/Location/OrderOnline/Cart/Components/CartRow.tsx","src/Screens/Location/OrderOnline/Cart/Components/TotalRow.tsx","src/Screens/Location/OrderOnline/Cart/Cart.tsx","src/Screens/Location/OrderOnline/OrderPayment/OrderPayment.tsx","src/Screens/Location/OrderOnline/Checkout/Store.ts","src/Screens/Location/OrderOnline/Checkout/Checkout.tsx","src/Screens/Location/OrderOnline/Articles/Components/ArticleCard.tsx","src/Screens/Location/OrderOnline/Articles/Components/CategorySelector.tsx","src/Screens/Location/OrderOnline/Articles/Components/CategorySectionList.tsx","src/Screens/Location/OrderOnline/Articles/Articles.tsx","src/Screens/Location/OrderOnline/index.tsx","src/Screens/Token/AddToken/Store.ts","src/Helpers/NfcHelpers.ts","src/Screens/Token/AddToken/Components/AddTokenActivationCode.tsx","src/Screens/Token/AddToken/Components/AddTokenUid/AddTokenUid.tsx","src/Screens/Token/AddToken/AddToken.tsx","src/Screens/Wallet/Details/Components/TransactionItemsModal.tsx","src/Screens/Wallet/Details/Components/TransactionRow.tsx","src/Components/Form/MyDatePicker.tsx","src/Models/Server/Wallet/ICurrencyChargeMethodSTO.ts","src/Screens/Wallet/Details/Components/ReportModal.web.tsx","src/Screens/Wallet/Details/WalletDetails.web.tsx","src/Screens/Coupon/Details/Store.ts","src/Screens/Coupon/Details/CouponDetails.web.tsx","src/Screens/Coupon/CouponsSummary/Store.ts","src/Screens/Coupon/CouponsSummary/CouponsSummary.web.tsx","src/Screens/Coupon/UserCouponsSummary/Components/UserCouponsSummaryRow.tsx","src/Screens/Coupon/UserCouponsSummary/Store.ts","src/Screens/Coupon/UserCouponsSummary/UserCouponsSummary.web.tsx","src/Screens/SavingCard/Details/Store.ts","src/Screens/SavingCard/Details/SavingCardDetails.web.tsx","src/Screens/SavingCard/SavingCardsSummary/Store.ts","src/Screens/SavingCard/SavingCardsSummary/SavingCardsSummary.web.tsx","src/Screens/SavingCard/UserSavingCardsSummary/Components/UserSavingCardRow.tsx","src/Screens/SavingCard/UserSavingCardsSummary/Store.ts","src/Screens/SavingCard/UserSavingCardsSummary/UserSavingCardsSummary.web.tsx","src/Screens/Wallet/AutomaticCharge/Store.ts","src/Screens/Wallet/Charge/Charge.tsx","src/Helpers/UserHelper.ts","src/Screens/Wallet/SendMoney/Store.ts","src/Screens/Wallet/SendMoney/Components/SearchTab.tsx","src/Screens/Wallet/SendMoney/Components/SendMoneyHeader.tsx","src/Screens/Wallet/SendMoney/Components/WalletTab.tsx","src/Screens/Wallet/SendMoney/Components/SendMoneyTabs.web.tsx","src/Screens/Wallet/SendMoney/SendMoney.tsx","src/Screens/Wallet/Withdraw/Store.ts","src/Screens/Wallet/Withdraw/Withdraw.tsx","src/Services/Topr.Core/AutomaticChargeController.ts","src/Screens/Wallet/AutomaticCharge/AutomaticCharge.tsx","src/Helpers/EnumHelpers.ts","src/Screens/Token/Tokens/Components/OtherUsersModal.tsx","src/Screens/Token/Tokens/Components/TokenIcon.tsx","src/Screens/Token/Tokens/Components/TokenCard.tsx","src/Screens/Token/Tokens/Components/TokenMenu.tsx","src/Screens/Token/Tokens/Components/SetDescriptionModal.tsx","src/Screens/Token/Tokens/Tokens.web.tsx","src/Components/Form/Slim/slim.module.js","src/Screens/QrCode/RequestIdentifier/Store.ts","src/Components/Form/Slim/index.web.tsx","src/Components/Form/MySlim.web.tsx","src/Screens/Account/ChangeProfilePicture/Store.ts","src/Screens/Account/Account/Components/ChangePictureModal.web.tsx","src/Screens/Account/Account/Account.tsx","src/Screens/Account/CancelAccount/Store.ts","src/Screens/Account/CancelAccount/CancelAccount.tsx","src/Screens/Account/ChangeName/Store.ts","src/Screens/Account/ChangeName/ChangeName.tsx","src/Screens/Account/ChangePassword/Store.ts","src/Screens/Account/ChangePassword/ChangePassword.tsx","src/Screens/Account/ChangeEmail/Store.ts","src/Screens/Account/ChangeEmail/ChangeEmail.tsx","src/Screens/Account/ChangeEmail/ChangeEmailConfirmationSent.tsx","src/Screens/Account/ChangeEmail/ConfirmChangeEmail.tsx","src/Screens/Account/ChangeProfilePicture/TakePicture.tsx","src/Screens/Account/ChangeProfilePicture/ChoosePicture.tsx","src/Screens/QrCode/RequestIdentifier/QrCode.tsx","src/Screens/PlacedOrders/Components/PlacedOrderCard.tsx","src/Screens/PlacedOrders/PlacedOrders.tsx","src/Screens/PlacedOrders/Components/OrderRow.tsx","src/Screens/PlacedOrders/PlacedOrderDetails.tsx","src/Components/Web/Redirect.tsx","webpack:///D:/a/1/s/ToprConsumer/ReactClient/src/Style/strapi.scss?538d","src/Screens/Home/Components/TopMenu.tsx","src/Screens/Home/Store.ts","webpack:///D:/a/1/s/ToprConsumer/ReactClient/src/Screens/Home/style.scss?e94c","src/Screens/Home/Home.tsx","src/Screens/Home/Download.tsx","src/Screens/Home/Help/Help.tsx","src/Screens/Home/PrivacyStatement.tsx","src/Screens/Home/Deeplink.tsx","src/Screens/Home/AutomaticLogin/Store.ts","src/Screens/Home/AutomaticLogin/AutomaticLogin.tsx","src/Screens/Subscription/Details/SavingCardDetails.web.tsx","src/Screens/Tickets/Details/TicketDetails.web.tsx","src/Navigation/LinkingConfiguration.ts","src/Navigation/index.web.tsx","src/Style/Theme.ts","App.tsx","webpack:///D:/a/1/s/ToprConsumer/ReactClient/index.js?63a4"],"names":["___CSS_LOADER_EXPORT___","push","module","i","Home","Download","Help","PrivacyStatement","exports","api","content","__esModule","default","options","locals","___CSS_LOADER_API_IMPORT___","AuthenticationMethod","FieldTypes","UserIdentifierTypes","AppLinkTypes","TokenStates","ConsumerSubscriptionItemTypes","PaymentOrderStatusTypes","ChargeSuccessReturn","LogLevel","DebugConfig","ToprAuthUrl","BaseUrl","CmsUrl","ClientId","Secret","ShowLogging","ProductionConfig","ToprConfig","AppName","SystemName","MainColor","MainColorDark","TermsPdf","nl","Asset","fromModule","require","uri","en","TenantID","Version","Ios","Android","BaseDeepLink","AppConfig","Service","Tenant","deviceHeight","Dimensions","get","height","deviceWidth","width","tabViewLayout","sizes","sm","md","lg","tileImageHeight","headerHeight","defaultFontWeight","fontWeight","boldFontWeight","openSansLight","fontFamily","Platform","OS","colors","main","containerBg","darkGrey","darkerGrey","grey","lighterGrey","lightGrey","darkBlue","darkRed","lightRed","green","orange","yellow","fullWidthHeightAbs","position","left","top","right","bottom","styles","alignItemsCenter","alignItems","amountStyle","color","fontSize","textAlign","backgroundImageStyle","opacity","badgeStyle","backgroundColor","paddingHorizontal","paddingVertical","borderRadius","borderWidth","tabButtonStyle","borderBottomColor","borderBottomWidth","cardFooter","flexDirection","cardFooterColumn","padding","justifyContent","centerXY","centerXYContainer","flex","centerRowY","container","undefined","paddingTop","dropShadow","elevation","shadowColor","shadowOpacity","shadowRadius","defaultFlatList","defaultFlatListWhite","dot","dotSmall","marginHorizontal","errorMessage","flatListContentStyle","paddingBottom","flatListContentStyleStock","flatListLoader","flatListHeader","flex1","flexEnd","flexRow","footerBar","borderTopColor","borderTopWidth","formFooter","marginTop","formHeader","marginBottom","formIntro","fullFooterText","highlightText","justifySpaceBetween","labelStyle","inputContainer","imageHeaderBackdrop","imageHeaderTitle","imageHeaderSubTitle","modalBackdrop","modalCard","modalMessage","myLoader","noteText","pickerItemImage","resizeMode","pickerRow","pickerText","marginLeft","pincodeStyle","price","profileColorButton","profilePictureImage","rightContainer","stampsContainer","flexWrap","stampIcon","subTitle","fontStyle","tabBarLabelStyle","textNote","textWhite","textCenter","textRowContainer","title","toprLoader","transactionRow","Container","children","keyboardAware","isGreyBackground","headerPadding","Style","style","View","defaultProps","Content","padder","headerMargin","otherProp","FooterBar","iconButtonLeft","paddingLeft","TextRow","label","value","Subtitle","StyleSheet","create","ImageHeader","imageSource","onBackPress","source","name","type","containerStyle","onPress","SubmitHeader","paddingRight","MyHeader","headerContainer","backButton","titleStyle","i18n","fallbacks","defaultLocale","translations","Account","Header","ChangeName","ChangeEmail","ChangePassword","SetProfilePicture","PictureModal","TakePicture","ChoosePicture","AutomaticCharge","Buttons","Create","EditAmount","EditBank","TurnOff","Form","Action","Title","AuthenticateAction","ConfirmTurnOff","CreateMessage","Message","TurnOffMessage","EditMessage","ChargeCostsMessage","Fields","Amount","Label","WeeksAmount","Initials","Surname","Errors","Required","Email","Phone","Street","City","StreetNumber","Zipcode","SelectedBank","EmptyText","EMandateResults","EMANDATE_SUCCESS","EMANDATE_CANCELLED","EMANDATE_EXPIRED","EMANDATE_FAILURE","EMANDATE_PENDING","EMANDATE_UNKNOWN_STATUS","LoadingFailed","CancelAccount","Confirm","Info","Succes","AddAccountModal","NameField","ServerErrors","AddToken","ActivationCode","TOKEN_NOT_FOUND","TOKEN_ALREADY_ACTIVATED","AddTokenUid","ScanAgain","CardScanned","Uid","Invalid","NotFound","Pin","FingerPrint","ConfirmationSentStep","TextPart1","TextPart2","EmailField","Regex","REQUESTIDENTIFIER_NOT_FOUND","REQUESTIDENTIFIER_EXPIRED","REQUESTIDENTIFIER_REVOKED","USER_EMAIL_NOT_UNIQUE","OldPassword","Password","MinLength","ConfirmPassword","Equality","ChangeProfilePicture","TakePictureHeader","ChoosePictureHeader","Again","Permissions","Camera","Library","Charge","Success","Min","Max","AmountHb","ChargeMethod","NotAvailable","CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED","PROCESS_FAILED","PAYMENT_FAILED","PAYMENT_EXPIRED","PAYMENT_CANCELED","WAITING_FOR_PAYMENT","UNKNOWN","Refunded","ProcessFailed","PaymentFailed","PaymentExpired","PaymentCanceled","IntroText0","IntroText1","MaxBalance0","MaxBalance1","Method","CodePush","UpdateDialog","OptionalUpdateMessage","OptionalInstallButtonLabel","OptionalIgnoreButtonLabel","MandatoryUpdateMessage","MandatoryContinueButtonLabel","UpdateTitle","DownloadingPackage","InstallingUpdate","Common","Accounts","Add","Back","BackToDashboard","Cancel","Close","Card","Cards","Check","Continue","Coupons","Date","Dashboard","DefaultErrorMessage","Delete","Description","Details","DropImage","Edit","End","Off","Ok","On","ToOrder","Order","Orders","Pay","QrCode","Save","SavingCards","Scanner","Stamps","Valid","ValidAlways","ValidFrom","ValidUntill","Location","Menu","No","Received","Redeem","Redeemed","Search","NO_CONNECTION","EXCEPTION","Stamp","Start","Status","Summary","Token","Tokens","Total","Trips","Wallet","Wallets","Yes","CouponsSummary","NotRedeemed","AddLocation","Tabs","Payment","Savings","Subscriptions","Tickets","NoCoupons","NoSavingCards","Enums","AutomaticChargeStatusTypesDTO","Pending","Denied","Blocked","EnabledWithVerification","EnabledWithoutVerification","Initial","GeneralMenu","CouponSummary","SavingCardSummary","ForgotPassword","Locations","NoLocations","RequestAccess","AllowLocationPermission","OkButton","NoButton","SettingsMessageAndroid","SettingsMessageIos","LocationDetails","Address","Route","Login","CreateAccount","USER_PASSWORD_INVALID","USER_LOCKED_SHORT","USER_LOCKED_LONG","USER_BLOCKED","USER_NOT_FOUND","LoginExpired","Loyalty","Active","Expired","NotActive","Completed","OrderOnline","Cart","Checkout","CondimentArticleGroup","NoArticles","MaxErrorMessage","MinErrorMessage","OptionalChoice","PaymentMethods","PayOnDelivery","ToprWallet","PaymentForm","SelectedCurrency","InsufficientBalance","PaymentOrderDescriptionTable","INVALID_DELIVERY_TYPE","INVALID_GATEWAY","RequiredChoice","SearchProduct","CheckoutForm","Remarks","PaymentMethod","Pincode","ConfirmPincode","InvalidMessage","PlacedOrders","NoOrders","Table","PlacedOrderDetails","Receipt","OrderNumber","OrderId","Error","InvalidClientDate","QrCodeScanner","BleFailed","BranchOfficeNotFound","CameraPermission","NoBleNearby","InvalidQrCode","ScanningLocation","Register","NameStep","Field","EmailStep","PasswordStep","TermsStep","LinkText","RegisterConfirm","ConfirmSuccess","GoToLogin","DATA_NO_RESULT","USER_NO_TEMPDATA","ResetPassword","SavingCardsSummary","NotCompleted","SendMoney","SearchAction","ConfirmMessage","MinMax","OtherWallet","LOYALTYWALLET_SENDMONEY_SAME_USER","ChildWallet","SearchWallet","SetDescriptionModal","DescriptionField","Activated","NoTokens","ValidThru","TokenState","TokenMenu","BlockTokenAction","UnblockTokenAction","SwitchUserAction","TokenBlockSuccess","TokenUnblockSuccess","UserCouponsSummary","UserMenu","Switch","AddSubText","Manage","ResetPincode","ResetPincodeConfirm","Logoff","WalletDetails","NoTransactions","NoTransactionItems","ReportModal","FromDate","TillDate","Settings","Withdraw","Transactions","AutomaticChargeCanceledMessage","Iban","Name","locale","Localization","primaryLanguage","substr","currentLocale","nlNl","enGb","GetCurrentDateLocale","China","Day","Sunset","Night","Fuji","Italy","Lighthouse","London","Ship","Tropical","Valley","FormatDate","inputDate","format","FormatDateTime","GetLocalizedImageUrl","guid","noCache","replace","noCacheQsp","GetRandomKey","GetFileUrl","getTime","toString","Math","floor","random","NotImplemented","console","log","GetImageSource","imageUrl","image","GetRandSvgImage","keys","Object","SvgImages","randKey","length","hours","parseInt","dayStage","DayStage","GetI18NAlertMessage","key","code","errors","t","message","I18n","navigationRef","React","createRef","navigate","current","args","goBack","goBackSteps","steps","index","location","ImageFileGuid","MerchantGuid","StreetName","currencyGuid","TestUrls","wallet","Currency","CurrencyGuid","Balance","AppPhotoLocalizedImageGUID","BackgroundColor","CancelAllowed","Code","ConsumerCharge","ConsumerSendMoney","ConsumerWithdraw","ForegroundColor","IsDecimal","MaxBalance","StringFormat","IsBlocked","LoyaltyWalletGUID","Modified","SpendingLimit","accounting","settings","currency","symbol","decimal","thousand","precision","number","FormatCurrency","amount","amountText","toFixed","split","FormatCentsToEuro","amountInt","Intl","NumberFormat","FormatEuro","amountEuro","FormatToEuro","FixGuid","GetTenantPagetitle","pagetitle","GetWalletPagetitle","currencyName","GetLocalText","localizedString","lsv","Values","find","x","Language","toUpperCase","Value","GetFirstLetterUser","user","GetOrderLineAmount","orderRequestLine","linkedOrderLines","forEach","linkedOrderLine","quantity","GetOrderLineAmountFormatted","GetTotalOrderAmount","orderRequestLines","result","orderLine","persistedStore","IsHydrated","IsFirstRun","ParentUserToken","UserToken","ClientToken","DeviceId","UsePincode","PaymentOrderGuid","MainUser","ChildUsers","makeAutoObservable","this","usePincode","childUsers","userToken","clientToken","pincode","paymentOrderGuid","SetInitialState","AsyncTrunk","storage","AsyncStorage","init","then","FirstRunCheck","SetHydrated","OrderLineType","DeliveryType","PaymentGateway","MyToast","toastMessage","toast","useToast","useEffect","show","duration","appUiStore","IsConnected","NetworkStatefinished","AlertMessage","ToastMessage","makeObservable","observable","ShowAuthenticateConfirm","action","CloseAuthenticateConfirm","SetIsConnected","Logout","ShowAlert","CloseAlert","ShowConfirm","CloseConfirm","ShowToast","authenticateAction","isConnected","SetAuthenticationMethodPincode","SetUserToken","SetClientToken","alertMessage","onOk","additionalText","AdditionalText","setTimeout","runInAction","ToprError","defaultConfig","severity","transport","ansiColorConsoleSync","levels","debug","info","warn","error","myLog","logger","createLogger","DoServiceCall","serviceCall","HandleAxiosCatch","reject","ErrorCodes","response","status","data","config","url","HandleInziiCatch","Geti18NMessage","toprError","errorMessages","foundError","customError","I18MessageKey","SetFriendlyMessage","onError","Json2Url","obj","prefix","p","str","hasOwnProperty","k","v","encodeURIComponent","join","branchofficeId","Promise","resolve","axios","headers","catch","pluId","description","accessToken","tableNumber","orderLines","paymentGateway","comment","Authorization","orderDateTime","toISOString","totalAmount","toJS","post","orderId","toprUser","firstPart","EmailAddress","secondPart","indexOf","emailAddress","password","firstName","lastName","phoneNumber","country","statusText","orderOnlineStore","HEADER_MAX_HEIGHT","TABBAR_HEIGHT","ScrollY","Animated","SearchMode","Isloading","Restaurant","Departments","Articles","AllArticles","User","TableNumber","VSamUid","BranchofficeId","DepartmentName","OrderRequestLines","OrderHistory","DepartmentXScroll","VisibleDepartmentName","lastScrollX","map","reduce","acc","currentValue","TotalAmountOrder","filter","findIndex","a","departmentNumber","slice","sort","b","orderDate","deliveryType","vsamUid","departmentName","InziiUserController","GetRestautantData","GetOrderHistory","orderHistory","order","all","RestaurantController","ArticleController","allResults","Array","isArray","search","toLocaleLowerCase","departmentScrollViewRef","newX","toRight","scrollTo","condimentGroups","cg","isMeetConditions","minimumCondiments","parentNumber","min","IsValidArticle","existingOrderLineIndex","existingOrderLine","splice","searchMode","Background","OrderBg","Waiter","Logo","ToprCallOutBg","Square","Short","AppButtons","AppStore","PlayStore","OrderHeader","restaurant","isAbsolute","backgroundImage","logoContainer","subTitleStyle","backgroundUrl","AppImages","size","imageProps","logoUrl","streetAddress","city","borderColor","logoImage","header","overflow","FormFooter","FormHeader","otherProps","h1","h1Style","MyInput","props","inputRef","useRef","control","validation","inputProps","autofocus","multiline","numberOfLines","onTextChange","input","focus","useState","secureTextEntry","secureTextEntryState","setSecureTextEntryState","rules","errorsMessage","defaultValue","render","onChange","onBlur","ref","invalid","isTouched","isDirty","inputContainerStyle","onChangeText","iconColor","TouchableOpacity","renderPasswordToggle","FormInfo","Text","MyButton","isLoading","isBold","disabled","buttonStyle","loading","MyAlertIcon","iconStyle","MyFooter","centerContent","MyFooterTile","isLast","horizontal","marginRight","MyCheckBox","checked","MyWebModal","transparent","visible","myStyle","className","onClick","e","preventDefault","stopPropagation","zIndex","MyModal","closeOnBackPress","onClose","useParentWidth","setWidth","positionStyle","renderModalCard","cardStyle","Divider","Pressable","onLayout","nativeEvent","layout","renderModalContent","MySelectList","onSelect","renderListItem","selectedOption","isItemSelected","noItemSelectedText","modalPosition","isModalVisible","setIsModalVisible","renderSelectedItem","renderSelectItemsModal","option","bottomDivider","renderRows","myName","renderWithValidation","EuroTextInput","textAmount","setTextAmount","onSubmitEditing","getValues","euroText","keyboardType","selectTextOnFocus","autoFocus","placeholder","text","test","cents","intval","trim","parseFloat","euroTextToCents","maxLength","euroInput","euroIconText","MySlider","minimumValue","maximumValue","step","formatValue","onSlideChange","getFormattedValue","onValueChange","minimumTrackTintColor","thumbStyle","observer","CheckPincodeModal","onValidPin","pinMessage","useForm","handleSubmit","onSubmit","formObject","required","validate","checkPincode","OnOk","close","additionalCloseAction","alert","AppLink","deepLink","Parameters","Url","DeepLink","AppLinks","ConfirmChangeEmail","EMandateResult","ConfirmPaymentOrder","GetDeepLinkBaseUrl","Linking","CreateAppLinkUrl","idParam","deeplink","baseUrl","appLink","umbracoApiUrl","UmbracoMedia","AccessToken","ExpiryDateMs","axiosProxy","baseURL","controller","AuthenticateConsumerUser","username","ClientSecret","UserName","SetParentUserToken","AutomaticLogin","tempAdminGuid","RefreshToken","refreshToken","AuthenticateClient","expiresIn","AccessTokenExpires","valueOf","SwitchUser","userGuid","authorization","axiosAuthClient","mutex","Mutex","interceptors","request","use","async","waitForUnlock","sent","isLocked","acquire","release","AuthenticationController","axiosAuthUser","currentUserToken","UserIdentifierType","GUID","UserIdentifier","email","ConfirmChangeEmailUrl","requestIdentifier","base64","PictureData","SetChildUsers","mainUserGuid","childUserGuid","ResetPasswordUrl","RequestIdentifier","userCoupon","UserCouponGUID","couponGuid","skip","take","userCouponSummary","UserCouponGuid","userCouponGuid","userSavingCard","UserSavingCardGuid","userSavingCardGuid","savingCardGuid","queryStringParams","Skip","Take","responseType","file","Blob","fileURL","URL","createObjectURL","window","open","fromDate","tillDate","From","Till","loyaltyTransactionGuid","toprUmbraco","GetPage","pageName","GetHelpPage","GetActiveSystemMessages","activationCode","uid","tokenGuid","GetTokenState","token","store","IsTokensLoading","TokenMenuIsVisible","OtherUserModalIsVisible","SetDescriptionTokenModalIsVisible","IsSubmitting","SelectedToken","LoadingTokenTokenGUID","TokenController","tokens","compareDateDesc","sortTokens","TokenGUID","HideTokenMenu","blockedToken","ClearSelectedToken","unblockedToken","MainUserGuid","ToggleSetDescriptionTokenModalIsVisible","dashboardStore","IsAuthenticationMethodCheckLoading","IsWalletLoading","IsCouponsLoading","IsSavingcardsLoading","IsUserLoading","IsUserMenuVisible","IsAddMenuVisible","UserCoupons","UserSavingCards","UserSubscriptions","IsUserSubscriptionsLoading","UserEvents","IsUserEventsLoading","UserFields","SystemMessages","GroupedCoupons","computed","Initialize","SetIsAuthenticationMethodCheckLoading","GetWallets","GetUserCoupons","GetUserSavingCards","GetUser","ToggleUserMenu","ToggleAddMenu","GetUserSubscriptions","GetUserEvents","groupedCoupons","Coupon","Guid","newCouponGrouping","tokenStore","GetTokens","UmbracoController","messages","WalletController","wallets","CouponController","userCoupons","Created","SavingcardController","userSavingCards","StampCount","SavingCard","SubscriptionController","usersubscriptions","EventController","userEvents","UserController","isVisible","addAccountStore","IsVisible","SwitchToNewUser","ToggleModal","setError","setValue","AddAccount","autoCapitalize","Dot","delayStart","delayFadeOut","bordered","fadeAnim","fadeInAndOut","sequence","timing","toValue","useNativeDriver","delay","loop","start","dotStyle","backgroundStyle","ToprLoader","paddingStyle","dots","renderDots","ToprScreenLoader","isWhite","renderImage","UserPictureFileGuid","src","renderFirstLetter","textTransform","LinkButton","chevron","ImageButton","renderCard","FooterBarButton","icon","MyLoader","FullFooterButton","cartButtonContainer","SubmitHeaderButton","TextBadge","textStyle","CardFooter","Chevron","CouponSummaryCard","couponSummary","imageGuid","Images","FullTitle","CardTitle","imageContainer","ImageCard","ImageTextCard","badgeText","ResultCard","button","LocationCard","distance","isKm","unit","FormatDistance","Distance","AlertCard","getStyle","getIcon","TransparentCardHeader","ValidityCard","validFrom","validTill","renderDate","date","CouponInfoCard","ValidTill","SavingCardInfoCard","StampsCard","stamps","rowSize","renderStamps","SavingCardSummaryCard","savingSummary","ImageGuid","SystemMessageCard","systemMessages","markDownStyle","systemMessage","alignSelf","TextButton","MyLabelValue","MyLabelValueHorizontal","isVertical","VersionLabel","inListItem","version","MyQrCode","qrCodeBorder","MyErrorMessage","Type","Params","userEventTicketId","userId","UserEventTicketId","UserId","i18TitleKey","i18MessageKey","alertType","values","I18TitleKey","AlertType","addTokenUidstore","AlertStatusMessage","alertStatusMessage","tag","id","i18NErrorMessage","readTag","onTagScanned","NfcManager","requestTechnology","NfcTech","Ndef","getTag","ShowAlertMessage","setAlertMessageIOS","cancelTechnologyRequest","startNfc","NfcScanner","Unmount","BottomListSpacer","CodePushUpdatingModal","WebIncludes","rel","href","IsWebAndMobileOrApp","PageTile","PageLoader","loaderCss","setLoaderCss","y","viewBox","enableBackground","fill","d","attributeType","attributeName","from","to","dur","repeatCount","StockImageLayout","backgroundImageUrl","setBackgroundImageUrl","randomSvgImage","GetImageUrl","minHeight","HorizontalScroll","myDiv","onWheel","scrollLeft","deltaY","onScroll","LeftColumnLayout","leftContentCenter","leftContentBottom","noPaddingCss","noPadding","MyTab","tabs","setIndex","indicatorStyle","tab","Item","Spinner","Store","IsLoading","IsTransactionsLoading","IsPdfLoading","IsTransactionItemsLoading","TransactionItems","IsTransactionItemsModalVisible","IsReportModalVisible","HasMore","HasMoreLoading","SearchVisible","SearchText","startsWith","toLowerCase","GetWallet","GetTransactions","reload","transactions","isPdfLoading","walletDetailsStore","chargeMethodGuid","AppReturnUrl","iban","toUserGuid","ToUserGuid","currencyCode","transactionguid","SelectedWallet","HandleErrorCatch","MissingAmountBalance","SetSelectedWallet","HasEnoughBalance","orderPaymentStore","CreateTableOrderAndDoPayment","TotalAmountOrderFormatted","Plu","article","department","getArticleGroupPlu","ModifierWithPrice","Modifier","lineNumber","ArticleGroup","GetArticleGroup","ArticleCode","LineNumber","Quantity","UnitPrice","VAT","transactionItems","orderRequestLineQuest","ConvertToTransactionItem","orderResult","DoArantekPayment","finally","createTableOrderResult","amountCents","startPaymentRequest","Reference","SamUID","CreateTransactionItems","ArantekController","orderNumber","IsChargeMethodsLoading","ChargeMethods","SelectedChargeMethod","HBChargeValues","SelectedHBChargeValue","CheckingPaymentOrder","RetryCount","MaxRetryCount","chargeSuccessReturn","SetPaymentOrderGuid","GetCurrencyChargeMethods","chargeMethods","sortedChargeMethods","SetSelectedChargeMethod","chargeMethod","hbChargeValue","OrderPayment","screen","CheckTopUpCompletion","TransactionController","paymentOrderStatusType","GoBack","Processed","openURL","RedirectUrl","chargeStore","IsProcessing","CheckInitialUrl","SetUrlListener","ProcessUrl","err","event","HandleUrlListener","SetCurrencyGuid","InitCheckPaymentOrder","eMandateStatus","getAlertType","pathname","substring","splittedPath","parameters","urlZonderId","GetAppLinkFromUrl","HandlePaymentOrderStatus","HandleEmandateResult","linkingStore","formData","mainUser","SetMainUser","navigation","route","params","IsDebugMode","marginVertical","InitialState","mode","formState","autoCompleteType","isValid","resetPasswordStore","minLength","confirmPassword","dashboardHeaderStore","ScrollYValue","withBadge","Icon","headerTranslateY","interpolate","inputRange","outputRange","extrapolate","transform","translateY","CallToActions","ctaButton","iconContainer","FooterBarIconButton","ScrollView","contentContainerStyle","bounces","SetScrollY","contentOffset","scrollEventThrottle","refreshControl","RefreshControl","refreshing","progressViewOffset","onRefresh","LastItem","myArray","FlatList","ListEmptyComponent","renderItem","item","lastItem","keyExtractor","userMenuStore","ShowShildUsers","ShowConfig","SwitchBackToParentUserToken","isChildUser","hasChildUsers","ToggleChildMenu","AddMenu","SubscriptionItem","ConsumerSubscriptionItemTypeId","UsedAmount","UserSubscriptionId","userSubscriptionId","UserEventTickets","EventId","userEvent","initialTabs","setTabs","dynamicTabs","coupons","usersavingsCard","userSubscriptions","tickets","renderScene","SceneMap","navigationState","routes","onIndexChange","ResetScrollYAnimated","initialLayout","renderTabBar","activeColor","inactiveColor","scrollEnabled","tabBarPosition","ChildUsersModal","childUsersWithoutActiveUser","childUser","SwitchToChildUser","SwitchBackToParent","appState","AppState","currentState","_handleAppStateChange","nextAppState","match","addEventListener","SideMenuItem","SideMenu","Badge","CouponsCardWeb","groupedCoupon","ToprRowLoader","UserSavingsCardWeb","WalletCardWeb","helpStore","Page","FilteredHelpItems","ToprUmbraco","page","HelpItems","helpDeskItem","hasAnswer","Answer","hasQuestion","Question","reactElements","ImageUrl","dangerouslySetInnerHTML","__html","AppStoreLink","target","alt","PlayStoreLink","renderContent","ImageText","Right","reverse","RegisterLogin","RegisterText","LogonText","TextElement","ContentElements","contentElements","contentElement","HelpItemView","helpItem","HelpItemsView","helpItems","GetHelp","leftIcon","rightIcon","SetSearch","renderClearSearchIcon","Stack","createStackNavigator","Navigator","headerMode","screenOptions","Screen","component","Main","SetPincode","pattern","onEndEditing","equality","confirmPincode","RegisterConfirmUrl","UserGuid","initialForm","acceptTerms","ConfirmationSent","FormData","IsConfirming","ResultMessage","RegisterController","RegisterConfirmConsumer","SetFormData","CheckEmail","appName","RegisterConsumer","withScroll","RegisterStack","cardStyleInterpolator","CardStyleInterpolators","forHorizontalIOS","headerShown","InitializeConfirm","GetCurrentLocation","coords","latitude","longitude","accuracy","altitude","altitudeAccuracy","heading","speed","timestamp","getUTCDate","Latitude","Longitude","Radius","IsLocationsLoading","IsLocationAuthorized","NearbyLocations","LocationController","locations","FilteredLocations","RequestLocationPermission","tenantName","onSearchTextChanged","renderSearch","renderLocations","merchantGuid","paymentMethodType","IsCurrenciesLoading","Currencies","CurrencyController","currencies","MerchantController","locationName","GetConsumerCurrencies","JoinMerchant","LocationTab","myLocation","destination","getDirections","GetDirections","articleStore","OrderRequestLine","CondimentGroups","condimentGroup","maximumCondiments","max","condiment","isSupplement","CondimentCheckBox","onCheckChanged","setChecked","IsValidMaxCondimentGroup","CondimentRadioButton","onRadioPress","IsCondimentRadioSelected","iconType","checkedIcon","uncheckedIcon","CondimentGroup","h4","isRadioButtonGroup","renderValidationInfo","condiments","AddCondimentChecked","RemoveCondimentChecked","ToggleCondimentRadio","Minus","Plus","AddArticle","IconButton","iconProps","CartRow","plus","minus","row","supplimentsText","contentView","quantityText","buttonsContainer","productText","separator","renderSuppliments","TotalRow","totalAmountFormatted","totalText","PlusArticle","MinusArticle","isHighLighted","initialAmount","toprPaymentMethod","gateway","systemName","checkOutStore","SelectedPaymentMethod","Navigation","paymentMethods","InitPaymentMethods","HandleCheckOut","selectedPaymentMethod","remarks","TableOrder","Pickup","Deliver","newOrder","AddPlacedOrder","placedOrder","PendingPayment","PostTableOrderCreated","SetSelectedPaymentMethod","paymentMethod","ArticleCard","PureComponent","memo","departments","sectionListRef","textInputRef","defaultContainer","activeContainer","searchBarContainer","searchButton","scrollViewBar","textInput","scrollSectionList","sectionIndex","scrollToLocation","animated","itemIndex","viewOffset","ToggleSearchMode","isActive","SetDepartmentScroll","TextInput","AnimatedSectionList","createAnimatedComponent","SectionList","FilteredDepartments","useNavigation","sectionListData","articlesbyDepartment","departmentsTitles","stickySectionHeadersEnabled","sections","renderSectionHeader","section","firstElementStyle","h4Style","onViewableItemsChanged","viewableItems","changed","SetVisibleDepartment","viewabilityConfig","itemVisiblePercentThreshold","useFocusEffect","useCallback","navigateMain","BackHandler","removeEventListener","TotalProducts","OrderOnlineStack","Article","HasNfcEnabled","isSupported","supported","isEnabled","isSupportedAndEnabled","SetHasNfcEnabled","enabled","ActivateWithCode","ActivateWithUid","AddTokenActivationCode","TransactionItemsModal","transactionItemRows","maxHeight","rowTotal","splitted","parseItem","totalPrice","FormatCurrencyTransactionItems","renderFooter","TransactionRow","transaction","onPressTransactionItemIcon","activationCodeText","HasTransactionItems","RequestDate","registerLocale","PaymentMethodTypes","MyDatePicker","onDateChange","selectsStart","selectsEnd","startDate","endDate","dateFormat","placeholderText","showMonthDropdown","showYearDropdown","selected","isClearable","today","defaultValues","getFullYear","getMonth","toDateString","watch","isAfter","setOptions","FilteredTransactions","elements","AutomaticChargeAllowed","renderSideMenu","HideTransactionItemsModal","ToggleIsReportModalVisible","GetTransactionPeriodPdfWeb","ToggleSearch","onSearchTextChange","onEndReached","NextPage","onEndReachedThreshold","initialNumToRender","ShowTransactionItemsModal","TransactionId","ListFooterComponent","couponDetailsStore","UserCoupon","GetUserCoupon","couponSummaryStore","CouponSummaries","couponSummaries","UserCouponsSummaryRow","IsActive","now","getIconAndText","RedeemedLocation","userCouponSummaryStore","CouponGuid","UserCouponSummaries","GetUserCouponSummaries","userCouponSummaries","savingCardDetailsStore","UserSavingCard","GetUserSavingCard","savingCardSummaryStore","SavingCardSummaries","savingCardSummaries","savingCardSummary","UserSavingCardRow","userSavingCardsSummaryStore","SavingCardGuid","FormModes","getPaymentMethodTransactionCosts","currencyChargeMethodSTO","TransactionCostsFixed","TransactionCostsPercentage","Topup","maxChargeAmount","IconFile","calculatedTransactionCosts","renderCostMessage","transactionCosts","renderTransactionCosts","IsChildUserActive","sendMoneyStore","IsSearching","SelectedTabIndex","OtherUsers","SelectedOtherUser","FoundUser","GetOtherUsers","Id","ClearFoundUser","SearchUser","ConfirmSubmit","renderMaxSendMessage","autoCorrect","SetDescription","SetSelectedOtherUser","SetSelectedTabIndex","withdrawStore","WithdrawInfo","WithdrawCosts","MaxWithdrawAmount","GetWithdrawInfo","amountWithoutCosts","erorMessage","HasAutomatichChargeWithdrawn","positive","automaticChargeStore","AutomaticCharePaymentMethod","Banks","FormMode","ShowStatus","PreviousAutomaticCharge","selectedBank","initials","surname","phone","street","streetNumber","zipcode","weekAmount","AutomaticChargeCollection","AutomaticChargeController","banks","automaticCharge","AutomaticChargeStepAmount","InitializeAutomaticCharge","formMode","AutomaticChargeStatusId","DefaultValues","Bic","LastName","PhoneNumber","StepAmount","StepLimit","DebtorBankId","ReturnUrl","NewAutomaticCharge","CreateAutomaticCharge","EditSteps","FormData2ICreateAutomaticChargeRequest","issuerUrl","AutomaticChargeStatusEnabled","SaveAutomaticCharge","enumName","enumKey","backGroundColor","unCheckedIcon","getCheckBoxProperties","checkedColor","uncheckedColor","GetStatusCheckBox","AutomaticChargeStepAmountMax","AutomaticChargeStepAmountMin","CurrencyName","renderStepsForm","SetAmount","SetFormMode","AccountNumber","SetSelectedBank","bank","DebtorBankName","renderForm","renderSubmitHeader","OtherUsersModal","onUserSelected","isChildUserSelected","TokenIcon","tokenState","TokenCard","loadingTokenTokenGUID","iconRow","ActivityIndicator","ShowTokenMenu","renderState","Unblock","Block","ToggleOtherUserModalIsVisible","reset","TokenSwitchUser","CustomEvent","bubbles","cancelable","detail","evt","document","createEvent","initCustomEvent","prototype","Event","loadImage","callback","oUrl","img","createElement","onerror","onload","noRevoke","revokeObjectURL","scale","isInstanceOf","_type","crossOrigin","readFile","urlAPI","webkitURL","call","transformCoordinates","getTransformedOptions","newOptions","aspectRatio","crop","naturalWidth","naturalHeight","maxWidth","renderImageToCanvas","canvas","sourceX","sourceY","sourceWidth","sourceHeight","destX","destY","destWidth","destHeight","getContext","drawImage","hasCanvasOption","minWidth","pixelRatio","downsamplingRatio","tmp","useCanvas","scaleUp","scaleDown","contain","cover","method","FileReader","fileReader","originalHasCanvasOption","originalTransformCoordinates","originalGetTransformedOptions","orientation","ctx","styleWidth","styleHeight","translate","rotate","PI","opts","hasblobSlice","webkitSlice","mozSlice","blobSlice","apply","arguments","metaDataParsers","jpeg","parseMetaData","that","maxMetaDataSize","DataView","markerBytes","markerLength","parsers","buffer","dataView","offset","maxOffset","byteLength","headLength","getUint16","disableImageHead","imageHead","Uint8Array","subarray","ExifMap","getExifThumbnail","hexData","getUint8","exifTagTypes","1","getValue","dataOffset","2","String","fromCharCode","ascii","3","littleEndian","4","getUint32","5","9","getInt32","10","getExifValue","tiffOffset","tagSize","c","tagType","parseExifTag","exif","parseExifTags","dirOffset","tagsNumber","dirEndOffset","parseExifData","disableExif","thumbnailData","disableExifThumbnail","Thumbnail","disableExifSub","disableExifGps","snabbt","tickRequests","runningAnimations","completedAnimations","transformProperty","getComputedStyle","documentElement","OLink","arg1","arg2","arg3","aggregateChainer","chainers","len","chainer","preprocessOptions","finish","rollback","snabbtSingleElement","clone","cloneObject","isFunction","complete","hasAllDoneCallback","allDone","hasCompleteCallback","valueFeeder","matrix","easing","property","element","setupAttentionAnimation","stopAnimation","detachChildren","clearOphanedEndStates","currentAnimationState","stateFromOptions","end","animOptions","setupAnimationOptions","animation","createAnimation","updateElement","queue","unshift","queueTick","tick","time","isStopped","completed","restart","pop","manual","movement","createState","createAttentionAnimation","currentAnimation","animatedElement","stop","indexOfElement","arr","el","animations","concat","contains","detachElement","findAnimationState","animationList","state","getCurrentState","findUltimateAncestor","body","node","ancestor","parentNode","useFromPrefix","rotation","rotationPost","skew","scalePost","optionOrDefault","startState","endState","polyFillrAF","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","func","tickAnimations","finishedAnimations","perspective","createEaser","transformOrigin","manualCallback","tweener","startTime","currentTime","stopped","started","manualValue","manualDelayFactor","createValueFeederTweener","createStateTweener","resetFrom","setReverse","updateCurrentTransform","curr","_manualValue","tweenValue","val","tween","forceUpdate","asMatrix","properties","getProperties","updateElementTransform","updateElementProperties","initialVelocity","equilibriumPosition","spring","createSpringEasing","tweenPosition","tweenRotation","tweenRotationPost","tweenScale","tweenSkew","currentMovement","equilibrium","updateMovement","startPosition","velocity","springConstant","deceleration","springDeceleration","mass","springMass","abs","EASING_FUNCS","cos","pow","easerName","easeFunction","lastValue","easer","assignIdentity","copyArray","createMatrix","Float32Array","asCSS","css","clear","z","assignTranslate","assignedMatrixMultiplication","rotateX","radians","rad","sin","rotateY","rotateZ","assignScale","ax","ay","tan","assignSkew","res","m","resultState","tweenWidth","tweenHeight","tweenOpacity","dX","dY","dZ","dAX","dAY","dAZ","dBX","dBY","dBZ","dSX","dSY","dSkewX","dSkewY","dWidth","dHeight","dOpacity","oldStart","currentMatrix","def","cssPerspective","cssMatrix","object","setElementTransform","stackBlur","mul_table","shg_table","BlurStack","r","g","next","top_x","top_y","radius","isNaN","imageData","getElementById","HTMLCanvasElement","context","getImageData","getImageDataFromCanvas","yp","yi","yw","r_sum","g_sum","b_sum","a_sum","r_out_sum","g_out_sum","b_out_sum","a_out_sum","r_in_sum","g_in_sum","b_in_sum","a_in_sum","pr","pg","pb","pa","rbs","pixels","div","widthMinus1","heightMinus1","radiusPlus1","sumFactor","stackStart","stack","stackEnd","stackIn","stackOut","mul_sum","shg_sum","processImageDataRGBA","putImageData","toBlob","defineProperty","quality","binStr","atob","toDataURL","charCodeAt","_createClass","defineProperties","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","_typeof","Symbol","iterator","constructor","_classCallCheck","instance","TypeError","lowMemory","isLowMemoryDevice","navigator","userAgent","MSStream","getDataset","dataset","attr","attrs","attributes","toCamelCase","charAt","getElementAttributes","l","getOffsetByEvent","offsetX","layerX","offsetY","layerY","mergeOptions","base","additives","optionsToMerge","Key","ESC","RETURN","Events","DOWN","MOVE","UP","MimeTypes","jpg","jpe","png","gif","bmp","ImageExtensionsRegex","addEvents","events","scope","removeEvents","getEventOffset","changedTouches","pageX","pageY","rect","angle","x1","y1","x2","y2","rx1","ry1","rx2","ry2","getEventOffsetScroll","pageXOffset","pageYOffset","scrollTop","lowercaseFirstLetter","string","capitalizeFirstLetter","last","array","limit","inArray","needle","send","requestDecorator","progress","success","xhr","XMLHttpRequest","upload","loaded","total","onreadystatechange","readyState","responseText","JSON","parse","_obj","resetTransforms","webkitTransform","bytesToMegaBytes","getCommonMimeTypes","types","mimeType","isJPEGMimeType","getExtensionByMimeType","mimetype","getMimeTypeFromResponseType","getFileName","path","shift","leftPad","getDateString","getDate","getHours","getMinutes","getSeconds","getFileNameByFile","getFileTypeByFile","getFileNameWithoutExtension","blobToFile","blob","File","lastModified","resourceIsBase64Data","resource","loadRemoteURL","fetcher","fetchRequestDecorator","loadRequestDecorator","cb","loadURL","cloneFile","base64ToByteString","dataURI","dataPartCleaned","base64ToBlob","filename","byteString","ab","ArrayBuffer","ia","getMimeTypeFromDataURI","createBlob","BB","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","MSBlobBuilder","bb","append","getBlob","getImageAsCanvas","meta","getAutoCropRect","ratioOut","w","h","transformCanvas","transforms","filters","minSize","isTilted","space","px","py","pw","ph","scalarX","scalarY","scalar","scaleCanvas","sharpen","bounds","targetWidth","round","targetHeight","getPixels","_filter","createImageData","set","mix","weights","katet","sqrt","half","dstData","dstBuff","srcBuff","sy","sx","dstOff","cy","cx","scy","scx","srcOff","wt","sizeDist","dx","dy","cloneCanvasScaled","original","duplicate","canvasHasDimensions","copyCanvas","blurCanvas","covers","scaleRect","divideRect","resetFileInput","form","nextSibling","appendChild","insertBefore","stringify","dupe","cloneData","output","jpegCompression","nodeName","dataUri","matches","flattenData","forcedType","server","field","actions","downloadCanvas","msSaveBlob","link","display","download","click","removeChild","toggleDisplayBySelector","selector","root","querySelector","nodeListToArray","removeElement","wrap","wrapper","polarToCartesian","centerX","centerY","angleInDegrees","angleInRadians","describeArc","startAngle","endAngle","arcSweep","percentageArc","CropArea","resizers","n","ratio","s","ne","se","sw","nw","_element","_interaction","_minWidth","_minHeight","_ratio","_rect","_space","_rectChanged","_init","lines","handler","_btn","btn","_redraw","dispatchEvent","_onStartDrag","_onDrag","_onStopDrag","setAttribute","_this","cssText","ImageEditor","CropAreaEvents","_options","_output","_rotating","_input","_preview","_previewBlurred","_blurredPreview","_cropper","_straightCrop","_previewWrapper","_currentWindowSize","_btnGroup","_maskFrame","_dirty","_wrapperRotation","_wrapperScale","_this2","_container","_wrapper","_stage","_previewMask","prop","innerHTML","_utilsGroup","buttonRotateClassName","buttonRotateTitle","_onClick","_onGridChange","_onGridInput","_onKeyDown","_onResize","keyCode","_confirm","_cancel","classList","_rotate","innerWidth","innerHeight","_redrawCropper","area","_updateWrapperScale","_redrawWrapper","_redrawCropMask","offsetWidth","offsetHeight","wrapperWidth","wrapperHeight","_this3","_updateWrapperRotation","_hideCropper","_showCropper","fromOpacity","_this4","mask","preview","cancelAnimationFrame","_previewSize","_this5","tilted","relativeCrop","devicePixelRatio","imageRatio","sh","offsetLeft","offsetTop","resize","clientWidth","clientHeight","fromRotation","fromPosition","fromScale","dirty","childNodes","_this6","destroy","remove","add","getBoundingClientRect","buttonCancelClassName","buttonConfirmClassName","buttonCancelLabel","buttonConfirmLabel","buttonCancelTitle","buttonConfirmTitle","FileHopper","DragDropEvents","_accept","_allowURLs","_dragPath","dataTransfer","files","areValidDataTransferFiles","items","areValidDataTransferItems","kind","_this7","_onDragOver","_onDragLeave","_onDrop","remote","getData","parsed","isValidDataTransfer","dropEffect","dataValidity","_this8","mimetypes","Popover","_inner","_this9","_this10","firstChild","intSplit","isWrapper","CropType","AUTO","INITIAL","MANUAL","Rect","HopperEvents","ImageEditorEvents","SlimButtons","SlimPopover","SlimCount","SlimLoaderHTML","SlimUploadStatusHTML","stringToSize","removeTimer","timers","timer","Slim","_uid","forceSize","part","_originalElement","_originalElementInner","_originalElementAttributes","_state","_timers","_inputReference","_isRequired","_imageHopper","_imageEditor","_progressEnabled","_data","_resetData","_drip","_hasInitialImage","_initialCrop","_initialRotation","_isBeingDestroyed","_fallback","_manualTransform","dimensions","setRatio","_this11","_isFixedRatio","parts","_cropAuto","_scaleDropArea","_load","blockPush","_doUpload","_doDownload","_doRemove","_doDestroy","_doEdit","_crop","instantEdit","_isInitialising","_getFileInput","_getInitialImage","_updateState","_this12","_addState","_getInputElement","initialData","Image","defaultInputName","removeAttribute","initialImage","initialImageSrc","initialImageName","getAttribute","resultHTML","_isImageOnly","labelLoading","service","hasAttribute","accept","allowURLs","_isButtonAllowed","_updateProgress","_onInit","_this13","done","didInit","saveInitialImage","containsImage","_save","_toggleButton","loader","paths","querySelectorAll","ringWidth","_this14","ring","_stopProgressLoop","_this15","repeat","edit","_throwError","statusNoSupport","_onChange","_onCancel","_onConfirm","_onFileOver","_onFileOut","_onDropFile","_onInvalidFile","_onInvalidFileDrop","didThrowError","_removeState","_removeError","_this16","list","_openFileDialog","willRemove","drip","_getDrip","statusFileType","statusImageTooSmall","statusFileSize","maxFileSize","statusLocalUrlProblem","dragPath","_this17","jump","_this18","clearTimeout","_replaceTimeout","_startProgressLoop","_loadTimeout","load","exit","willFetch","willLoad","_onRemoteURLProblem","_onOverWeightFile","internalCanvasSize","internalCanvasSizeLowMemory","rewind","_onImageTooSmall","didLoad","_loadCanvas","isUploading","dropReplace","intro","_getIntro","isDetached","_canInstantEdit","revealCanvas","_showButtons","_onLocalURLProblem","ready","_this19","applyTransforms","_applyTransforms","transformedImage","willUpload","_startProgress","_stopProgress","willCropInitial","_this20","filterSharpen","forceMinSize","outputImage","_onTransformCanvas","transformedData","didTransform","willTransform","_this21","buttonRotateLabel","_getRatioSpacerElement","didCancel","_hideEditor","_isAutoCrop","_this22","didConfirm","images","_getInOut","outro","_showPreview","cropType","_this23","save","_this24","allowUpload","dataBase64","willSave","_store","didSave","_upload","_storeServerResponse","didUpload","_this25","requestOutput","fileData","statusNode","willRequest","onProgress","onSuccess","statusUploadSuccess","html","statusContentLength","didReceiveServerError","statusUnknownResponse","uploadMethod","serviceFormat","_this26","uploadBase64","copyImageHead","popoverClassName","_this27","hide","_this28","_this29","_appendEditor","showRotateButton","rotateButton","inner","_showEditor","_hideButtons","_hideStatus","_this30","_clearState","out","_getOutro","_hideResult","didRemove","_this31","forceType","_this32","matchesAttributeInList","replaceChild","attribute","setSize","setRotation","setForceSize","defaults","defaultError","capitalized","instances","toFunctionReference","level","passThrough","defaultFalse","defaultTrue","defaultLabel","toLabel","defaultFunction","defaultSize","toInt","fn","buttonOptions","opt","operamini","croppers","getOptionsFromAttributes","valueTransformer","_value","isAttachedTo","slim","countDownTimer","refreshTimer","containerRef","displayWidth","ReactDOM","findDOMNode","setDisplayWidth","setState","Component","MySlim","sizeSlim","fileId","setIsInitialized","initialBase64","MimeType","Data","FileId","changeProfilePictureStore","ChangePictureModal","SavePicture","ImageFile","pictureModalVisible","setPictureModalVisible","topDivider","cancelAccountStore","tokensStore","parentName","CancelChildUser","changeNameStore","trigger","changePasswordStore","ValidatePassword","oldPassword","changeEmailStore","qrCodeStore","TimeOutSeconds","ServerDifference","nowDevice","setServerDifference","ClearTimers","timeOutInSeconds","differenceInSeconds","setInterval","GetCrCode","RequestIdentifierIsValid","StartTimer","onUnload","clearInterval","Identifier","timerContainer","seconds","intervalToDuration","durationSecondsText","minutes","FormatSeconds","PlacedOrderCard","restaurantName","InitializePlacedOrders","SortedOrderHistory","OrderRow","GetOrder","headerRow","Redirect","routeName","TopMenuView","showShadow","setshowShadow","mobileMenuActive","setMobileMenuActive","cssIsActive","HomeMenu","renderMenuItems","menuItems","menuItem","Link","aria-hidden","shadowCss","role","aria-label","TenantLogo","aria-expanded","MenuItems","homeStore","UmbracoPages","TopMenu","GetDownload","GetPrivacyStatement","Deeplink","automaticLoginStore","linkingOptions","prefixes","screens","register","confirmPaymentOrderUrl","emandateResultUrl","confirmEmailChange","confirm","confirmChangeEmail","resetPassword","automaticLogin","walletDetails","sendMoney","couponDetails","savingCardDetails","couponsSummary","login","help","privacy","forgotPassword","dashboard","NavigationContainer","linking","LinkingConfiguration","DashboardIndex","ChangeEmailConfirmationSent","CouponDetails","SavingCardDetails","SubscriptionDetails","UserSavingCardsSummary","TicketDetails","theme","primary","Button","Input","inputStyle","ignoredYellowBox","netInfoUnsubcribe","NetInfo","placement","Theme","registerRootComponent","App"],"mappings":"sFAAA,4H,iCCAA,6BAGIA,EAHJ,MAG8B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,EAAI,y9IAA09I,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oDAAoD,MAAQ,GAAG,SAAW,ypEAAypE,eAAiB,CAAC,unPAAunP,WAAa,MAEx4c,O,iCCPf,6BAGIH,EAHJ,MAG8B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,EAAI,0hCAA2hC,G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AD,CAAeujC,MAAOS,IACpB,kBAAC,GAAD,MACA,kBAAC,GAAD,MACA,kBAAC,GAAD,CAASl9E,aAAcU,IACvB,kBAAC,GAAD,MACA,kBAAC,GAAD,MACA,kBAAC,GAAD,MACA,kBAAC,GAAD,SAfC,QC5BXy8E,YAAsBC,M","file":"static/js/app.0975f2f2.chunk.js","sourcesContent":["export * from './IPageViewModel'\r\nexport * from './IImageTextViewModel'\r\nexport * from './IRegisterLoginViewModel'\r\nexport * from './IContentElement'\r\nexport * from './IMenuItemViewModel'\r\nexport * from './IHomeMenuViewModel'\r\nexport * from './ISystemMessageViewModel'\r\nexport * from './IHelpViewModel'\r\nexport * from './ITextElementModel'\r\n\r\nexport {default as UmbracoPages} from './UmbracoPages'\r\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"html{height:100% !important;overflow-y:auto !important}.bg-img{background-size:cover;background-repeat:no-repeat;background-position:center}.white-bg{background-color:#fff}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.flex1{flex:1}.paper{box-shadow:0px 3px 5px -1px rgba(0,0,0,.2),0px 6px 10px 0px rgba(0,0,0,.14),0px 1px 18px 0px rgba(0,0,0,.12)}.navbar-start{padding-left:0}.profilePictureImage{height:40px;width:40px;border-radius:30px}.border{border:solid 5px red}.block{height:300px;width:100%;margin:20px;background-color:#000}.column{position:relative;padding:0}.webroot,.webroot .columns.left{flex:1;display:flex}.container>.columns{margin:0 !important}.webroot.white{background-color:#fff}.column.left-col{background-color:#fff;box-shadow:0px 3px 3px -2px rgba(0,0,0,.2),0px 3px 4px 0px rgba(0,0,0,.14),0px 1px 8px 0px rgba(0,0,0,.12);display:flex;flex-direction:column}.webroot .navbar-item img{max-height:50px}.logo{height:50px;width:auto;display:none}.menu{flex:1}.menu li{display:flex;flex-direction:row;align-items:center;justify-content:center;cursor:pointer}.menu li [data-testid]{min-width:30px}.menu li span{font-size:20px;line-height:1;font-weight:700}.profile-email{line-height:1}.modal-background{background-color:rgba(0,0,0,.2) !important}.column.left-col{width:120px;flex:none;flex-grow:0;flex-shrink:0;flex-basis:auto}.shadow{box-shadow:0px 3px 3px -2px rgba(0,0,0,.2),0px 3px 4px 0px rgba(0,0,0,.14),0px 1px 8px 0px rgba(0,0,0,.12)}.column.main{flex:1;flex-grow:1;flex-shrink:1;flex-basis:0%;padding-bottom:0;padding-right:0;display:flex;flex-direction:column;background-color:#fff;box-shadow:0px 3px 3px -2px rgba(0,0,0,.2),0px 3px 4px 0px rgba(0,0,0,.14),0px 1px 8px 0px rgba(0,0,0,.12);height:100vh}.sd{flex-grow:0}.contentOverFlow2{flex:1;overflow:auto;background-color:#8a2be2}.contentOverFlow{flex:1;overflow:auto;background-color:#8a2be2}.boxMin{display:flex;min-height:min-content;flex-direction:column}.column.main.no-padding{padding:0 !important}.h-scroll{overflow-x:auto;flex-wrap:nowrap;display:flex}.v-scroll{overflow-y:auto}.v-scroll .my-hero,.v-scroll .section{padding-top:0}.test-block{height:1200px;width:500px;background-color:#6495ed}.card-tile.no-cursor{cursor:default}.card-tile{margin-right:15px;border:#ebeef0 solid 1px;flex-basis:290px;display:flex;flex-shrink:0;flex-direction:column;cursor:pointer}.card-tile .card-img{height:150px;width:100%;background-size:cover;background-repeat:no-repeat}.card-tile .card-subtitle{flex:1;font-size:16px}.card-tile .card-footer{display:flex;padding-top:10px;padding-bottom:10px;flex-grow:1;align-items:center}.card-tile .card-footer>div{display:flex}.card-tile .card-footer2{padding-top:10px;padding-bottom:10px;padding-left:.5rem;padding-right:.5rem}.card-tile .card-footer2>div{float:left}.badge{border-radius:5px;color:#fff;white-space:nowrap}.row-loader{width:100%;height:150px;display:flex;justify-content:center;align-items:center}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{margin-top:10px;background:#fff}::-webkit-scrollbar-thumb{background:#ebeef0}::-webkit-scrollbar-thumb:hover{background:#000}.header{margin-left:-0.75rem;margin-right:-0.75rem;border-bottom:#ebeef0 solid 1px}.profile-text{display:none !important}input:focus{outline:none}input[type=text],input[type=number]{font-size:18px;min-height:40px}.euro-ct{margin-bottom:30px}.euro-ct span.icon-ct{margin-right:10px;display:flex;align-items:center}.euro-ct span{color:#cecece;text-align:center;display:flex;align-items:flex-end}.euro-ct input.euro{width:60px;text-align:right}.euro-ct input.cents{width:40px}.euro-ct input{border:none;border-bottom:#cecece solid 1px}.myContent{width:400px}.responsive-helper{background-color:#000;height:20px}div[data-testid=sliderThumb]{background-color:red;cursor:pointer}.react-datepicker__input-container>input{width:100%}@media screen and (min-width: 769px){.responsive-helper{background-color:#7fffd4}.container{width:100vw !important}.home .container{height:100%;display:block}.column.left-col{width:120px}.column.main{width:calc(75% - 120px);height:100vh}}@media screen and (min-width: 1023px){.responsive-helper{background-color:brown}.navbar{padding-top:20px}.navbar-start{padding-left:40px}.menu li{justify-content:flex-start}.profile-text{display:flex}.column.left-col{width:25%}.column.main{width:75%;height:100vh}.column.main .h-scroll{width:auto}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../../../../src/Style/style.web.scss\"],\"names\":[],\"mappings\":\"AAGA,KACE,sBAAA,CACA,0BAAA,CAGF,QACE,qBAAA,CACA,2BAAA,CACA,0BAAA,CAGF,UACE,qBAAA,CAGF,SACE,4CAAA,CACA,oCAAA,CAGF,mBACE,GACE,8BAAA,CACA,sBAAA,CAEF,KACE,gCAAA,CACA,wBAAA,CAAA,CAIJ,OACE,MAAA,CAGF,OACE,4GAAA,CAIF,c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AAA,CACA,kBAAA,CAEA,4BACE,YAAA,CAIJ,yBACE,gBAAA,CACA,mBAAA,CACA,kBAAA,CACA,mBAAA,CACA,6BACE,UAAA,CAKN,OACE,iBAAA,CACA,UAAA,CACA,kBAAA,CAGF,YACE,UAAA,CACA,YAlSW,CAmSX,YAAA,CACA,sBAAA,CACA,kBAAA,CAGF,oBACE,UAAA,CACA,WAAA,CAGF,0BACE,eAAA,CACA,eAAA,CAGF,0BACE,kBAAA,CAGF,gCACE,eAAA,CAGF,QACE,oBAAA,CACA,qBAAA,CACA,+BAAA,CAGF,cACE,uBAAA,CAGF,YACE,YAAA,CAGF,oCAEE,cAAA,CACA,eAAA,CAGF,SACE,kBAAA,CACA,sBACE,iBAAA,CACA,YAAA,CACA,kBAAA,CAGF,cACE,aAAA,CACA,iBAAA,CACA,YAAA,CACA,oBAAA,CAGF,oBACE,UAAA,CACA,gBAAA,CAGF,qBACE,UAAA,CAGF,eACE,WAAA,CACA,+BAAA,CAIJ,WACE,WAAA,CAGF,mBACE,qBAAA,CACA,WAAA,CAGF,6BACE,oBAAA,CACA,cAAA,CAGF,yCACE,UAAA,CAIF,qCACE,mBACE,wBAAA,CAGF,WACE,sBAAA,CAGF,iBACE,WAAA,CACA,aAAA,CAGF,iBACE,WAAA,CAGF,aACE,uBAAA,CACA,YAAA,CAAA,CAKJ,sCACE,mBACE,sBAAA,CAGF,QACE,gBAAA,CAGF,cACE,iBAAA,CAIA,SACE,0BAAA,CAIJ,cACE,YAAA,CAGF,iBACE,SAAA,CAGF,aACE,SAAA,CACA,YAAA,CAEA,uBACE,UAAA,CAAA\",\"sourcesContent\":[\"$light-grey: #ebeef0;\\r\\n$img-height: 150px;\\r\\n\\r\\nhtml {\\r\\n height: 100% !important;\\r\\n overflow-y: auto !important;\\r\\n}\\r\\n\\r\\n.bg-img {\\r\\n background-size: cover;\\r\\n background-repeat: no-repeat;\\r\\n background-position: center;\\r\\n}\\r\\n\\r\\n.white-bg {\\r\\n background-color: #fff;\\r\\n}\\r\\n\\r\\n.fa-spin {\\r\\n -webkit-animation: fa-spin 2s infinite linear;\\r\\n animation: fa-spin 2s infinite linear;\\r\\n}\\r\\n\\r\\n@keyframes fa-spin {\\r\\n 0% {\\r\\n -webkit-transform: rotate(0deg);\\r\\n transform: rotate(0deg);\\r\\n }\\r\\n 100% {\\r\\n -webkit-transform: rotate(359deg);\\r\\n transform: rotate(359deg);\\r\\n }\\r\\n}\\r\\n\\r\\n.flex1 {\\r\\n flex: 1;\\r\\n}\\r\\n\\r\\n.paper {\\r\\n box-shadow: 0px 3px 5px -1px rgb(0 0 0 / 20%),\\r\\n 0px 6px 10px 0px rgb(0 0 0 / 14%), 0px 1px 18px 0px rgb(0 0 0 / 12%);\\r\\n}\\r\\n\\r\\n.navbar-start {\\r\\n padding-left: 0;\\r\\n}\\r\\n\\r\\n.profilePictureImage {\\r\\n height: 40px;\\r\\n width: 40px;\\r\\n border-radius: 30px;\\r\\n}\\r\\n\\r\\n// .container {\\r\\n// flex-direction: column;\\r\\n// display: flex;\\r\\n// flex: 1;\\r\\n// }\\r\\n\\r\\n.border {\\r\\n border: solid 5px red;\\r\\n}\\r\\n\\r\\n.block {\\r\\n height: 300px;\\r\\n width: 100%;\\r\\n margin: 20px;\\r\\n background-color: black;\\r\\n}\\r\\n\\r\\n.column {\\r\\n position: relative;\\r\\n padding: 0;\\r\\n}\\r\\n\\r\\n.webroot,\\r\\n.webroot .columns.left {\\r\\n flex: 1;\\r\\n display: flex;\\r\\n //margin: 0 !important;\\r\\n}\\r\\n\\r\\n.container > .columns {\\r\\n margin: 0 !important;\\r\\n}\\r\\n\\r\\n.webroot.white {\\r\\n background-color: #fff;\\r\\n}\\r\\n\\r\\n.column.left-col {\\r\\n background-color: #fff;\\r\\n box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%),\\r\\n 0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n}\\r\\n\\r\\n.webroot .navbar-item img {\\r\\n max-height: 50px;\\r\\n}\\r\\n\\r\\n.logo {\\r\\n height: 50px;\\r\\n width: auto;\\r\\n display: none;\\r\\n}\\r\\n\\r\\n.menu {\\r\\n //background-color: aquamarine;\\r\\n flex: 1;\\r\\n\\r\\n li {\\r\\n display: flex;\\r\\n flex-direction: row;\\r\\n align-items: center;\\r\\n justify-content: center;\\r\\n cursor: pointer;\\r\\n\\r\\n [data-testid] {\\r\\n min-width: 30px;\\r\\n }\\r\\n\\r\\n span {\\r\\n font-size: 20px;\\r\\n line-height: 1;\\r\\n font-weight: 700;\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\n.profile-email {\\r\\n line-height: 1;\\r\\n}\\r\\n\\r\\n.modal-background {\\r\\n background-color: rgba(0, 0, 0, 0.2) !important;\\r\\n}\\r\\n\\r\\n.column.left-col {\\r\\n width: 120px;\\r\\n flex: none;\\r\\n flex-grow: 0;\\r\\n flex-shrink: 0;\\r\\n flex-basis: auto;\\r\\n}\\r\\n\\r\\n.shadow {\\r\\n box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%),\\r\\n 0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);\\r\\n}\\r\\n\\r\\n.column.main {\\r\\n flex: 1;\\r\\n flex-grow: 1;\\r\\n flex-shrink: 1;\\r\\n flex-basis: 0%;\\r\\n padding-bottom: 0;\\r\\n padding-right: 0;\\r\\n\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n\\r\\n background-color: #fff;\\r\\n box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%),\\r\\n 0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);\\r\\n\\r\\n height: 100vh;\\r\\n\\r\\n // .h-scroll {\\r\\n // //width: calc(75% - 120px);\\r\\n // }\\r\\n}\\r\\n\\r\\n.css-view-1dbjc4n {\\r\\n //flex-direction: row;\\r\\n}\\r\\n\\r\\n.sd {\\r\\n flex-grow: 0;\\r\\n //flex-shrink: 1;\\r\\n //flex-direction: row;\\r\\n}\\r\\n\\r\\n.contentOverFlow2 {\\r\\n flex: 1;\\r\\n // display: flex;\\r\\n //max-height: 400px;\\r\\n\\r\\n overflow: auto;\\r\\n background-color: blueviolet;\\r\\n}\\r\\n\\r\\n.contentOverFlow {\\r\\n flex: 1;\\r\\n // display: flex;\\r\\n //max-height: 400px;\\r\\n\\r\\n overflow: auto;\\r\\n background-color: blueviolet;\\r\\n}\\r\\n\\r\\n.boxMin {\\r\\n display: flex;\\r\\n min-height: min-content;\\r\\n flex-direction: column;\\r\\n}\\r\\n\\r\\n.column.main.no-padding {\\r\\n padding: 0 !important;\\r\\n}\\r\\n\\r\\n.h-scroll {\\r\\n overflow-x: auto;\\r\\n flex-wrap: nowrap;\\r\\n display: flex;\\r\\n}\\r\\n\\r\\n.v-scroll {\\r\\n overflow-y: auto;\\r\\n}\\r\\n\\r\\n.v-scroll .my-hero,\\r\\n.v-scroll .section {\\r\\n padding-top: 0;\\r\\n}\\r\\n\\r\\n.test-block {\\r\\n height: 1200px;\\r\\n width: 500px;\\r\\n background-color: cornflowerblue;\\r\\n}\\r\\n\\r\\n.card-tile.no-cursor {\\r\\n cursor: default;\\r\\n}\\r\\n\\r\\n.card-tile {\\r\\n margin-right: 15px;\\r\\n border: $light-grey solid 1px;\\r\\n\\r\\n flex-basis: 290px;\\r\\n display: flex;\\r\\n flex-shrink: 0;\\r\\n flex-direction: column;\\r\\n cursor: pointer;\\r\\n\\r\\n .card-img {\\r\\n height: $img-height;\\r\\n width: 100%;\\r\\n background-size: cover;\\r\\n background-repeat: no-repeat;\\r\\n }\\r\\n .card-subtitle {\\r\\n flex: 1;\\r\\n //font-size: 20px;\\r\\n font-size: 16px;\\r\\n }\\r\\n\\r\\n .card-footer {\\r\\n display: flex;\\r\\n padding-top: 10px;\\r\\n padding-bottom: 10px;\\r\\n\\r\\n flex-grow: 1;\\r\\n align-items: center;\\r\\n\\r\\n > div {\\r\\n display: flex;\\r\\n }\\r\\n }\\r\\n\\r\\n .card-footer2 {\\r\\n padding-top: 10px;\\r\\n padding-bottom: 10px;\\r\\n padding-left: 0.5rem;\\r\\n padding-right: 0.5rem;\\r\\n > div {\\r\\n float: left;\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\n.badge {\\r\\n border-radius: 5px;\\r\\n color: #fff;\\r\\n white-space: nowrap;\\r\\n}\\r\\n\\r\\n.row-loader {\\r\\n width: 100%;\\r\\n height: $img-height;\\r\\n display: flex;\\r\\n justify-content: center;\\r\\n align-items: center;\\r\\n}\\r\\n\\r\\n::-webkit-scrollbar {\\r\\n width: 10px;\\r\\n height: 10px;\\r\\n}\\r\\n\\r\\n::-webkit-scrollbar-track {\\r\\n margin-top: 10px;\\r\\n background: #fff;\\r\\n}\\r\\n\\r\\n::-webkit-scrollbar-thumb {\\r\\n background: #ebeef0;\\r\\n}\\r\\n\\r\\n::-webkit-scrollbar-thumb:hover {\\r\\n background: #000;\\r\\n}\\r\\n\\r\\n.header {\\r\\n margin-left: -0.75rem;\\r\\n margin-right: -0.75rem;\\r\\n border-bottom: $light-grey solid 1px;\\r\\n}\\r\\n\\r\\n.profile-text {\\r\\n display: none !important;\\r\\n}\\r\\n\\r\\ninput:focus {\\r\\n outline: none;\\r\\n}\\r\\n\\r\\ninput[type='text'],\\r\\ninput[type='number'] {\\r\\n font-size: 18px;\\r\\n min-height: 40px;\\r\\n}\\r\\n\\r\\n.euro-ct {\\r\\n margin-bottom: 30px;\\r\\n span.icon-ct {\\r\\n margin-right: 10px;\\r\\n display: flex;\\r\\n align-items: center;\\r\\n }\\r\\n\\r\\n span {\\r\\n color: rgb(206, 206, 206);\\r\\n text-align: center;\\r\\n display: flex;\\r\\n align-items: flex-end;\\r\\n }\\r\\n\\r\\n input.euro {\\r\\n width: 60px;\\r\\n text-align: right;\\r\\n }\\r\\n\\r\\n input.cents {\\r\\n width: 40px;\\r\\n }\\r\\n\\r\\n input {\\r\\n border: none;\\r\\n border-bottom: rgb(206, 206, 206) solid 1px;\\r\\n }\\r\\n}\\r\\n\\r\\n.myContent {\\r\\n width: 400px;\\r\\n}\\r\\n\\r\\n.responsive-helper {\\r\\n background-color: #000;\\r\\n height: 20px;\\r\\n}\\r\\n\\r\\ndiv[data-testid='sliderThumb'] {\\r\\n background-color: red;\\r\\n cursor: pointer;\\r\\n}\\r\\n\\r\\n.react-datepicker__input-container > input {\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\n//tablet\\r\\n@media screen and (min-width: 769px) {\\r\\n .responsive-helper {\\r\\n background-color: aquamarine;\\r\\n }\\r\\n\\r\\n .container {\\r\\n width: 100vw !important;\\r\\n }\\r\\n\\r\\n .home .container {\\r\\n height: 100%;\\r\\n display: block;\\r\\n }\\r\\n\\r\\n .column.left-col {\\r\\n width: 120px;\\r\\n }\\r\\n\\r\\n .column.main {\\r\\n width: calc(75% - 120px);\\r\\n height: 100vh;\\r\\n }\\r\\n}\\r\\n\\r\\n//desktop\\r\\n@media screen and (min-width: 1023px) {\\r\\n .responsive-helper {\\r\\n background-color: brown;\\r\\n }\\r\\n\\r\\n .navbar {\\r\\n padding-top: 20px;\\r\\n }\\r\\n\\r\\n .navbar-start {\\r\\n padding-left: 40px;\\r\\n }\\r\\n\\r\\n .menu {\\r\\n li {\\r\\n justify-content: flex-start;\\r\\n }\\r\\n }\\r\\n\\r\\n .profile-text {\\r\\n display: flex;\\r\\n }\\r\\n\\r\\n .column.left-col {\\r\\n width: 25%;\\r\\n }\\r\\n\\r\\n .column.main {\\r\\n width: 75%;\\r\\n height: 100vh;\\r\\n\\r\\n .h-scroll {\\r\\n width: auto;\\r\\n }\\r\\n }\\r\\n}\\r\\n\\r\\n//widescreen\\r\\n@media screen and (min-width: 1216px) {\\r\\n}\\r\\n\\r\\n//full hd\\r\\n@media screen and (min-width: 1408px) {\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".my-hero{padding-top:80px}.my-hero .section{padding-bottom:0}.my-hero a{color:#000}.markdown p,.markdown ul{padding-bottom:10px}.markdown ul{list-style:circle;padding-left:20px}.markdown h5{font-weight:600}.section.register-login{display:flex;flex-direction:column;align-items:center}.section.register-login h1{font-size:56px}.section.register-login h5{font-size:24px;padding-bottom:30px}.section.register-login button.is-primary{margin-bottom:20px}.section.image-text{padding-left:0;padding-right:0}.section.image-text h4{padding-bottom:10px;font-size:18px;letter-spacing:1px;line-height:150%;font-weight:600}.help-item h4{padding-bottom:10px;font-size:18px;letter-spacing:1px;line-height:150%;font-weight:600}.download-block .dl-buttons{margin-top:20px}.download-block .dl-buttons img{max-width:200px}.download-block .dl-buttons img:first-child{margin-right:10px}.download-block .column{display:flex;flex-direction:column;justify-content:center;align-items:center}ol li{padding-bottom:20px;margin-left:20px}h3{font-size:36px;padding-bottom:20px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../../../../src/Style/strapi.scss\"],\"names\":[],\"mappings\":\"AAAA,SACE,gBAAA,CAEA,kBACE,gBAAA,CAGF,WACE,UAAA,CAKF,yBAEE,mBAAA,CAGF,aACE,iBAAA,CACA,iBAAA,CAGF,aACE,eAAA,CAIJ,wBACE,YAAA,CACA,qBAAA,CAEA,kBAAA,CACA,2BACE,cAAA,CAGF,2BACE,cAAA,CACA,mBAAA,CAGF,0CACE,kBAAA,CAIJ,oBACE,cAAA,CACA,eAAA,CAEA,uBACE,mBAAA,CACA,cAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CAMF,cACE,mBAAA,CACA,cAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CAKF,4BACE,eAAA,CAEA,gCACE,eAAA,CAGF,4CACE,iBAAA,CAIJ,wBAGE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CAIF,MACE,mBAAA,CACA,gBAAA,CAIJ,GACE,cAAA,CACA,mBAAA\",\"sourcesContent\":[\".my-hero {\\r\\n padding-top: 80px;\\r\\n\\r\\n .section {\\r\\n padding-bottom: 0;\\r\\n }\\r\\n\\r\\n a {\\r\\n color: #000;\\r\\n }\\r\\n}\\r\\n\\r\\n.markdown {\\r\\n p,\\r\\n ul {\\r\\n padding-bottom: 10px;\\r\\n }\\r\\n\\r\\n ul {\\r\\n list-style: circle;\\r\\n padding-left: 20px;\\r\\n }\\r\\n\\r\\n h5 {\\r\\n font-weight: 600;\\r\\n }\\r\\n}\\r\\n\\r\\n.section.register-login {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n //justify-content: center;\\r\\n align-items: center;\\r\\n h1 {\\r\\n font-size: 56px;\\r\\n }\\r\\n\\r\\n h5 {\\r\\n font-size: 24px;\\r\\n padding-bottom: 30px;\\r\\n }\\r\\n\\r\\n button.is-primary {\\r\\n margin-bottom: 20px;\\r\\n }\\r\\n}\\r\\n\\r\\n.section.image-text {\\r\\n padding-left: 0;\\r\\n padding-right: 0;\\r\\n\\r\\n h4 {\\r\\n padding-bottom: 10px;\\r\\n font-size: 18px;\\r\\n letter-spacing: 1px;\\r\\n line-height: 150%;\\r\\n font-weight: 600;\\r\\n }\\r\\n}\\r\\n\\r\\n.help-item {\\r\\n //padding-top: 0;\\r\\n h4 {\\r\\n padding-bottom: 10px;\\r\\n font-size: 18px;\\r\\n letter-spacing: 1px;\\r\\n line-height: 150%;\\r\\n font-weight: 600;\\r\\n }\\r\\n}\\r\\n\\r\\n.download-block {\\r\\n .dl-buttons {\\r\\n margin-top: 20px;\\r\\n\\r\\n img {\\r\\n max-width: 200px;\\r\\n }\\r\\n\\r\\n img:first-child {\\r\\n margin-right: 10px;\\r\\n }\\r\\n }\\r\\n\\r\\n .column {\\r\\n //text-align: center;\\r\\n\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n justify-content: center;\\r\\n align-items: center;\\r\\n }\\r\\n}\\r\\nol {\\r\\n li {\\r\\n padding-bottom: 20px;\\r\\n margin-left: 20px;\\r\\n }\\r\\n}\\r\\n\\r\\nh3 {\\r\\n font-size: 36px;\\r\\n padding-bottom: 20px;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".border{border-color:#639}.r-overflow-1udh08x,.r-1udh08x{overflow:initial}body{overflow-y:initial}.fixed{position:fixed;z-index:1000;left:0;right:0;transition:box-shadow 400ms}.navbar-item img{max-height:50px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./../../../../src/Screens/Home/style.scss\"],\"names\":[],\"mappings\":\"AAAA,QACE,iBAAA,CAGF,+BAEE,gBAAA,CAGF,KACE,kBAAA,CAGF,OACE,cAAA,CACA,YAAA,CACA,MAAA,CACA,OAAA,CAEA,2BAAA,CAGF,iBACE,eAAA\",\"sourcesContent\":[\".border {\\r\\n border-color: rebeccapurple;\\r\\n}\\r\\n\\r\\n.r-overflow-1udh08x,\\r\\n.r-1udh08x {\\r\\n overflow: initial;\\r\\n}\\r\\n\\r\\nbody {\\r\\n overflow-y: initial;\\r\\n}\\r\\n\\r\\n.fixed {\\r\\n position: fixed;\\r\\n z-index: 1000;\\r\\n left: 0;\\r\\n right: 0;\\r\\n\\r\\n transition: box-shadow 400ms;\\r\\n}\\r\\n\\r\\n.navbar-item img {\\r\\n max-height: 50px;\\r\\n}\\r\\n\\r\\n// .webroot.home {\\r\\n// height: 100%;\\r\\n// background-color: #fff;\\r\\n\\r\\n// .v-scroll {\\r\\n// height: 100%;\\r\\n// }\\r\\n// }\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export default {\r\n Home: 'Home',\r\n Download: 'Download',\r\n Help: 'Help',\r\n PrivacyStatement: 'PrivacyStatement',\r\n}\r\n","module.exports = __webpack_public_path__ + \"static/media/terms-and-conditions-nl.cd3d129e.pdf\";","module.exports = __webpack_public_path__ + \"static/media/terms-and-conditions-en.cd3d129e.pdf\";","module.exports = __webpack_public_path__ + \"static/media/amst.a9ffbe59.jpg\";","module.exports = __webpack_public_path__ + \"static/media/amst2.e5bf3144.jpg\";","module.exports = __webpack_public_path__ + \"static/media/rotonde.b4076c59.jpg\";","module.exports = __webpack_public_path__ + \"static/media/rott.335701a6.jpg\";","module.exports = __webpack_public_path__ + \"static/media/China-day.a48b5000.svg\";","module.exports = __webpack_public_path__ + \"static/media/China-sunset.5dd9845c.svg\";","module.exports = __webpack_public_path__ + \"static/media/China-night.3dadd1b1.svg\";","module.exports = __webpack_public_path__ + \"static/media/Mt.FujiJapan-day.0e6f4906.svg\";","module.exports = __webpack_public_path__ + \"static/media/Mt.FujiJapan-sunset.b459116c.svg\";","module.exports = __webpack_public_path__ + \"static/media/Mt.FujiJapan-night.e556621d.svg\";","module.exports = __webpack_public_path__ + \"static/media/Italy-day.3429f8cc.svg\";","module.exports = __webpack_public_path__ + \"static/media/Italy-sunset.d8bc6789.svg\";","module.exports = __webpack_public_path__ + \"static/media/Italy-night.0e878ed9.svg\";","module.exports = __webpack_public_path__ + \"static/media/SeaLighthouse-day.2dfddaa4.svg\";","module.exports = __webpack_public_path__ + \"static/media/SeaLighthouse-sunset.4e9fe9cc.svg\";","module.exports = __webpack_public_path__ + \"static/media/SeaLighthouse-night.9c2b4eed.svg\";","module.exports = __webpack_public_path__ + \"static/media/London-day.22030667.svg\";","module.exports = __webpack_public_path__ + \"static/media/London-sunset.07489310.svg\";","module.exports = __webpack_public_path__ + \"static/media/London-night.d276493e.svg\";","module.exports = __webpack_public_path__ + \"static/media/SeaShip-day.11b4eecc.svg\";","module.exports = __webpack_public_path__ + \"static/media/SeaShip-sunset.42131768.svg\";","module.exports = __webpack_public_path__ + \"static/media/SeaShip-night.7bc43a83.svg\";","module.exports = __webpack_public_path__ + \"static/media/Street-day.97bb8a89.svg\";","module.exports = __webpack_public_path__ + \"static/media/Street-sunset.d03b51bd.svg\";","module.exports = __webpack_public_path__ + \"static/media/Street-night.a94ba2b4.svg\";","module.exports = __webpack_public_path__ + \"static/media/Tropical-day.70818e35.svg\";","module.exports = __webpack_public_path__ + \"static/media/Tropical-sunset.12710409.svg\";","module.exports = __webpack_public_path__ + \"static/media/Tropical-night.039d5278.svg\";","module.exports = __webpack_public_path__ + \"static/media/Valley-day.0895b45d.svg\";","module.exports = __webpack_public_path__ + \"static/media/Valley-sunset.dbd31c49.svg\";","module.exports = __webpack_public_path__ + \"static/media/Valley-night.ee925e11.svg\";","module.exports = __webpack_public_path__ + \"static/media/rest-bg.3046919e.jpg\";","module.exports = __webpack_public_path__ + \"static/media/waiter1.f15d619b.jpg\";","module.exports = __webpack_public_path__ + \"static/media/topr-callout-bg.0e015942.png\";","module.exports = __webpack_public_path__ + \"static/media/topr-wallet-logo.77d2ed5c.jpg\";","module.exports = __webpack_public_path__ + \"static/media/logoSquare.0d616750.png\";","module.exports = __webpack_public_path__ + \"static/media/logo.bdaff179.png\";","module.exports = __webpack_public_path__ + \"static/media/appstore.62c83f5b.png\";","module.exports = __webpack_public_path__ + \"static/media/playstore.562034f0.png\";","module.exports = __webpack_public_path__ + \"./fonts/OpenSans-Light.ttf\";","var api = require(\"!../../../../node_modules/@expo/webpack-config/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/@expo/webpack-config/node_modules/css-loader/dist/cjs.js!./style.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/@expo/webpack-config/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".pageLoader {\\r\\n position: fixed;\\r\\n z-index: 999;\\r\\n top: 0;\\r\\n left: 0;\\r\\n width: 0;\\r\\n height: 100vh;\\r\\n transition: width 0s 1.4s ease;\\r\\n}\\r\\n.pageLoader .pageLoader__icon {\\r\\n position: absolute;\\r\\n z-index: 1;\\r\\n top: 50%;\\r\\n left: 50%;\\r\\n transform: translateX(-50%) translateY(-50%);\\r\\n\\r\\n opacity: 0;\\r\\n transition: opacity 0.5s ease;\\r\\n}\\r\\n.pageLoader .pageLoader__icon svg {\\r\\n transform-origin: 0 0;\\r\\n}\\r\\n.pageLoader .pageLoader__tile {\\r\\n position: absolute;\\r\\n left: 0;\\r\\n width: 0;\\r\\n height: 20%;\\r\\n transition: width 0.7s ease;\\r\\n}\\r\\n.pageLoader .pageLoader__tile:nth-child(0) {\\r\\n top: calc(-1 * 20%);\\r\\n transition-delay: -0.2s;\\r\\n}\\r\\n.pageLoader .pageLoader__tile:nth-child(1) {\\r\\n top: calc(0 * 20%);\\r\\n transition-delay: 0s;\\r\\n}\\r\\n.pageLoader .pageLoader__tile:nth-child(2) {\\r\\n top: calc(1 * 20%);\\r\\n transition-delay: 0.2s;\\r\\n}\\r\\n.pageLoader .pageLoader__tile:nth-child(3) {\\r\\n top: calc(2 * 20%);\\r\\n transition-delay: 0.4s;\\r\\n}\\r\\n.pageLoader .pageLoader__tile:nth-child(4) {\\r\\n top: calc(3 * 20%);\\r\\n transition-delay: 0.6s;\\r\\n}\\r\\n.pageLoader .pageLoader__tile:nth-child(5) {\\r\\n top: calc(4 * 20%);\\r\\n transition-delay: 0.8s;\\r\\n}\\r\\n.pageLoader--active {\\r\\n width: 100%;\\r\\n transition-delay: 0s;\\r\\n}\\r\\n.pageLoader--active .pageLoader__icon {\\r\\n opacity: 1;\\r\\n transition: opacity 0.5s 1.4s ease;\\r\\n}\\r\\n.pageLoader--active .pageLoader__tile {\\r\\n width: 100%;\\r\\n}\\r\\n.pageLoader--active .pageLoader__tile:nth-child(0) {\\r\\n transition-delay: -0.2s;\\r\\n}\\r\\n.pageLoader--active .pageLoader__tile:nth-child(1) {\\r\\n transition-delay: 0s;\\r\\n}\\r\\n.pageLoader--active .pageLoader__tile:nth-child(2) {\\r\\n transition-delay: 0.2s;\\r\\n}\\r\\n.pageLoader--active .pageLoader__tile:nth-child(3) {\\r\\n transition-delay: 0.4s;\\r\\n}\\r\\n.pageLoader--active .pageLoader__tile:nth-child(4) {\\r\\n transition-delay: 0.6s;\\r\\n}\\r\\n.pageLoader--active .pageLoader__tile:nth-child(5) {\\r\\n transition-delay: 0.8s;\\r\\n}\\r\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var api = require(\"!../../../../node_modules/@expo/webpack-config/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../node_modules/@expo/webpack-config/node_modules/css-loader/dist/cjs.js!./slim.min.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/@expo/webpack-config/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"/*\\r\\n * Slim v5.0.0 - Image Cropping Made Easy\\r\\n * Copyright (c) 2018 Rik Schennink - http://slimimagecropper.com\\r\\n */ \\r\\n.slim-file-hopper{position:absolute;left:0;top:0;right:0;bottom:0}.slim-image-editor{position:relative;height:100%;text-align:left;z-index:1}.slim-image-editor .slim-container{position:relative;height:calc(100% - 8em);width:100%;z-index:2;direction:ltr}.slim-image-editor .slim-editor-btn-group,.slim-image-editor .slim-editor-utils-group{-ms-flex-negative:0;flex-shrink:0}.slim-image-editor .slim-stage{position:absolute;line-height:0}.slim-image-editor .slim-wrapper{position:absolute;z-index:2}.slim-image-editor .slim-crop-preview{position:absolute;left:0;top:0;right:0;bottom:0;line-height:0}.slim-image-editor .slim-stage{z-index:4}.slim-image-editor .slim-crop-preview{z-index:3;border-radius:4px}.slim-image-editor .slim-crop-preview:after,.slim-image-editor .slim-crop-preview canvas,.slim-image-editor .slim-crop-preview img{position:absolute;display:block;border-radius:inherit;left:0;top:0}.slim-image-editor .slim-crop-preview .slim-crop{z-index:3}.slim-image-editor .slim-crop-preview:after{z-index:2;right:0;bottom:0;content:\\\"\\\"}.slim-image-editor .slim-crop-preview .slim-crop-blur{-webkit-filter:contrast(.7);-moz-filter:contrast(.7);filter:contrast(.7);z-index:1}.slim-image-editor .slim-editor-utils-group{text-align:center}.slim-image-editor .slim-editor-utils-group button{width:2.5em;height:2.5em;padding:0;font-size:1em;cursor:pointer;outline:none;box-shadow:inset 0 -1px 2px rgba(0,0,0,.1),inset 0 1px 0 0 hsla(0,0%,100%,.15);background-color:transparent;background-size:50% 50%;background-position:50%;background-repeat:no-repeat}.slim-image-editor .slim-editor-utils-group button:active{background-color:rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.15)}.slim-image-editor .slim-editor-btn-group{text-align:center}.slim-image-editor .slim-editor-btn-group button{position:relative;display:inline-block;vertical-align:top;font-size:1em;margin:0 .75em;padding:.75em 1.5em .875em;cursor:pointer;overflow:hidden;-webkit-transition:color .25s,box-shadow .25s,background-color .25s;transition:color .25s,box-shadow .25s,background-color .25s;box-shadow:inset 0 -1px 2px rgba(0,0,0,.1),inset 0 1px 0 0 hsla(0,0%,100%,.15);background-color:transparent;outline:none}.slim-image-editor .slim-editor-btn-group button:active{padding:.875em 1.5em .75em;background-color:rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.15)}.slim-rotation-disabled .slim-container{height:calc(100% - 4em)}.slim-rotation-disabled .slim-editor-utils-group{display:none}.slim-editor-btn,.slim-editor-utils-btn{color:hsla(0,0%,100%,.75);border:2px solid rgba(0,0,0,.25)}.slim-editor-btn:focus,.slim-editor-btn:hover,.slim-editor-utils-btn:focus,.slim-editor-utils-btn:hover{color:hsla(0,0%,100%,.9)}.slim-editor-utils-btn{border-radius:.6875em}.slim-editor-btn{border-radius:.5em}.slim-image-editor-preview:after{background-color:rgba(244,250,255,.4);box-shadow:inset 0 0 0 1px hsla(0,0%,100%,.07),0 1px 5px rgba(0,0,0,.3)}.slim-btn-rotate{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg width='252' height='287' viewBox='0 0 252 287' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M134.762.626v36.15c65.016 4.594 116.34 58.75 116.34 124.936 0 69.198-56.09 125.288-125.29 125.288C56.616 287 .525 230.91.525 161.71c0-30.036 10.592-57.59 28.215-79.17l31.934 31.934C51.03 127.75 45.27 144.04 45.27 161.71c0 44.485 36.06 80.544 80.544 80.544 44.484 0 80.544-36.058 80.544-80.543 0-41.454-31.327-75.56-71.594-80.017v35.272l-62.646-57.89L134.762.625zm-8.95 196.883c-19.77 0-35.796-16.028-35.796-35.798 0-19.77 16.027-35.796 35.797-35.796 19.77 0 35.797 16.026 35.797 35.796s-16.027 35.797-35.797 35.797z' fill='rgba(255,255,255,.8)' fill-rule='evenodd'/%3E%3C/svg%3E\\\")}.slim-editor-btn-group,.slim-editor-utils-group{padding:1em 0 0}@media (min-width:40em){.slim-btn-group{padding-top:2em}}.slim-crop-area{position:absolute;box-shadow:inset 0 0 0 1px hsla(0,0%,100%,.75),0 0 0 1px hsla(0,0%,100%,.75)}.slim-crop-area .grid{overflow:hidden}.slim-crop-area .grid:after,.slim-crop-area .grid:before{position:absolute;z-index:2;content:\\\"\\\";opacity:0;-webkit-transition:opacity .5s;transition:opacity .5s}.slim-crop-area .grid:before{top:33.333%;bottom:33.333%;left:1px;right:1px;box-shadow:inset 0 -1px 0 0 hsla(0,0%,100%,.35),inset 0 1px 0 0 hsla(0,0%,100%,.35)}.slim-crop-area .grid:after{top:1px;bottom:1px;left:33.333%;right:33.333%;box-shadow:inset -1px 0 0 0 hsla(0,0%,100%,.35),inset 1px 0 0 0 hsla(0,0%,100%,.35)}.slim-crop-area button{position:absolute;background:#fafafa;box-shadow:inset 0 1px 0 0 #fff,0 1px 1px rgba(0,0,0,.15);border:none;padding:0;margin:0;width:16px;height:16px;margin-top:-8px;margin-left:-8px;border-radius:8px;z-index:3}.slim-crop-area [class*=n]{top:0}.slim-crop-area [class*=s]{top:100%}.slim-crop-area [class*=w]{left:0}.slim-crop-area [class*=e]{left:100%}.slim-crop-area .e,.slim-crop-area .w{top:50%;cursor:ew-resize;height:30px;margin-top:-15px}.slim-crop-area .n,.slim-crop-area .s{left:50%;cursor:ns-resize;width:30px;margin-left:-15px}.slim-crop-area .ne,.slim-crop-area .sw{cursor:nesw-resize}.slim-crop-area .nw,.slim-crop-area .se{cursor:nwse-resize}.slim-crop-area .c{top:10px;left:10px;width:calc(100% - 20px);height:calc(100% - 20px);margin:0;border-radius:0;border:none;z-index:2;box-shadow:none;opacity:0;cursor:move}.slim-crop-area button:not(.c):after{content:\\\"\\\";position:absolute;left:-12px;right:-12px;top:-12px;bottom:-12px}.slim-crop-area .slim-crop-mask{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1}.slim-crop-area .slim-crop-mask img{position:absolute;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:translateZ(0);transform:translateZ(0);margin:0!important;width:auto;height:auto;max-width:none;min-width:0}.slim-crop-area[data-dragging=true] .grid:after,.slim-crop-area[data-dragging=true] .grid:before{opacity:1}.slim-popover{-ms-touch-action:none;touch-action:none;position:fixed;left:0;top:0;width:100%;height:100%;padding:1em;font-size:16px;background:rgba(25,27,29,.99);z-index:2147483647;overflow:hidden}.slim-popover[data-state=off]{left:-100%}.slim-popover:after{position:absolute;left:0;top:0;right:0;bottom:0;content:\\\"\\\";background:-webkit-radial-gradient(center ellipse,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,0) 80%);background:radial-gradient(ellipse at center,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,0) 80%)}@media (min-width:40em){.slim-popover{padding:2em}}.slim,.slim-crop-area,.slim-image-editor,.slim-popover{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box}.slim-crop-area button,.slim-image-editor button,.slim-popover button,.slim button{-webkit-highlight:none;-webkit-tap-highlight-color:transparent}.slim *,.slim-crop-area *,.slim-image-editor *,.slim-popover *{box-sizing:inherit}.slim-crop-area img,.slim-image-editor img,.slim-popover img,.slim img{background-color:#eee;background-image:url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABG2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+Gkqr6gAAAYBpQ0NQc1JHQiBJRUM2MTk2Ni0yLjEAACiRdZHPK0RRFMc/M4gYERaKxUvDamhQExtlJqEmTWOUwWbmzS81P17vzaTJVtlOUWLj14K/gK2yVopISdlZExv0nGfUSObc7rmf+73nnO49F+yhtJoxat2Qyeb14KRXmQ8vKPWP2OjCQRtKRDW08UDAT1V7u5Fosat+q1b1uH+tKRY3VLA1CI+pmp4XnhL2r+Q1izeFO9RUJCZ8LOzS5YLC15YeLfOTxckyf1ish4I+sLcKK8lfHP3FakrPCMvLcWbSBfXnPtZLHPHs3KysPTK7MQgyiReFaSbw4WGQUfEe+hliQHZUyXd/58+Qk1xVvEYRnWWSpMjjErUg1eOyJkSPy0hTtPr/t69GYnioXN3hhboH03zphfoN+CyZ5vu+aX4eQM09nGUr+bk9GHkVvVTRnLvQsgYn5xUtugWn69B5p0X0yLdUI9OeSMDzETSHof0SGhfLPfs55/AWQqvyVRewvQN9Et+y9AUyt2fOEwKMEgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAC9JREFUOI1jZGBgkGIgDjwjRhETkYYRDUYNHDVwMBjISIJaonLU4PfyqIGjBpIBAPvwAUFW9TOIAAAAAElFTkSuQmCC\\\")}.slim img{width:100%;height:auto}span.slim{display:block}.slim{position:relative;font-size:inherit;background-color:#eee;-webkit-transition:background-color .25s;transition:background-color .25s;padding-bottom:.025px}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.slim[data-state*=file-over] .slim-btn{pointer-events:none}.slim[data-state*=empty]:hover{background-color:#ddd}.slim[data-state*=empty] .slim-label{visibility:visible;opacity:1}.slim[data-state*=busy] .slim-label{opacity:0}.slim[data-state*=loading] .slim-label{display:none}.slim[data-state*=loading] .slim-label-loading{opacity:1;display:block}.slim[data-state*=preview] .slim-label{visibility:hidden}.slim[data-state*=error]{background-color:#e8a69f!important;color:#702010}.slim>img,.slim>input[type=file]{display:block!important;opacity:0!important;width:0!important;height:0!important;padding:0!important;margin-left:0!important;margin-right:0!important;margin-top:0!important;border:0!important}.slim>img+input[type=file],.slim>input[type=file]+img{margin-bottom:0!important}.slim>input[type=hidden]{position:absolute;width:1px;height:1px;margin:-1px;opacity:0}.slim .slim-label-loading{display:none}.slim .slim-label{visibility:hidden;-webkit-transition:opacity .25s;transition:opacity .25s}.slim .slim-error,.slim .slim-label,.slim .slim-label-loading{max-width:100%}.slim .slim-file-hopper{z-index:3;background:rgba(0,0,0,.0001)}.slim .slim-area,.slim .slim-drip,.slim .slim-ratio,.slim .slim-result,.slim .slim-status{border-radius:inherit}.slim .slim-area{width:100%;color:inherit;overflow:hidden}.slim .slim-area :only-of-type{margin:0}.slim .slim-area .slim-loader{pointer-events:none;position:absolute;right:.875em;top:.875em;width:23px;height:23px;z-index:1}.slim .slim-area .slim-loader svg{display:block;width:100%;height:100%;opacity:0}.slim .slim-area .slim-upload-status{position:absolute;right:1em;top:1em;z-index:1;opacity:0;-webkit-transition:opacity .25s;transition:opacity .25s;white-space:nowrap;line-height:1.65;font-weight:400}.slim .slim-area .slim-upload-status-icon{display:inline-block;opacity:.9}.slim .slim-area .slim-drip,.slim .slim-area .slim-result,.slim .slim-area .slim-status{left:0;top:0;right:0;bottom:0}.slim .slim-area .slim-drip,.slim .slim-area .slim-result{position:absolute}.slim .slim-area .slim-status{padding:3em 1.5em;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;pointer-events:none}.slim .slim-area .slim-drip{z-index:1;overflow:hidden}.slim .slim-area .slim-drip>span{position:absolute;left:0;top:0;opacity:0;margin-left:-25%;margin-top:-25%;width:50%;padding-bottom:50%}.slim .slim-area .slim-drip>span>span{position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,.25);border-radius:50%;opacity:.5;left:0;top:0}.slim .slim-area .slim-result{overflow:hidden;-webkit-perspective:1px}.slim .slim-area .slim-result img{display:block;width:100%;position:absolute;left:0;top:0}.slim .slim-area .slim-result img:not([src]),.slim .slim-area .slim-result img[src=\\\"\\\"]{visibility:hidden}.slim .slim-btn-group{position:absolute;right:0;bottom:0;left:0;z-index:3;overflow:hidden;pointer-events:none}.slim .slim-btn-group button{pointer-events:all;cursor:pointer}.slim[data-ratio*=\\\":\\\"]{min-height:0}.slim[data-ratio*=\\\":\\\"] .slim-status{position:absolute;padding:0 1.5em}.slim[data-ratio=\\\"16:10\\\"]>img,.slim[data-ratio=\\\"16:10\\\"]>input[type=file]{margin-bottom:62.5%}.slim[data-ratio=\\\"10:16\\\"]>img,.slim[data-ratio=\\\"10:16\\\"]>input[type=file]{margin-bottom:160%}.slim[data-ratio=\\\"16:9\\\"]>img,.slim[data-ratio=\\\"16:9\\\"]>input[type=file]{margin-bottom:56.25%}.slim[data-ratio=\\\"9:16\\\"]>img,.slim[data-ratio=\\\"9:16\\\"]>input[type=file]{margin-bottom:177.77778%}.slim[data-ratio=\\\"5:3\\\"]>img,.slim[data-ratio=\\\"5:3\\\"]>input[type=file]{margin-bottom:60%}.slim[data-ratio=\\\"3:5\\\"]>img,.slim[data-ratio=\\\"3:5\\\"]>input[type=file]{margin-bottom:166.66667%}.slim[data-ratio=\\\"5:4\\\"]>img,.slim[data-ratio=\\\"5:4\\\"]>input[type=file]{margin-bottom:80%}.slim[data-ratio=\\\"4:5\\\"]>img,.slim[data-ratio=\\\"4:5\\\"]>input[type=file]{margin-bottom:125%}.slim[data-ratio=\\\"4:3\\\"]>img,.slim[data-ratio=\\\"4:3\\\"]>input[type=file]{margin-bottom:75%}.slim[data-ratio=\\\"3:4\\\"]>img,.slim[data-ratio=\\\"3:4\\\"]>input[type=file]{margin-bottom:133.33333%}.slim[data-ratio=\\\"3:2\\\"]>img,.slim[data-ratio=\\\"3:2\\\"]>input[type=file]{margin-bottom:66.66667%}.slim[data-ratio=\\\"2:3\\\"]>img,.slim[data-ratio=\\\"2:3\\\"]>input[type=file]{margin-bottom:150%}.slim[data-ratio=\\\"1:1\\\"]>img,.slim[data-ratio=\\\"1:1\\\"]>input[type=file]{margin-bottom:100%}.slim-btn-group{padding:1.5em 0;text-align:center}.slim-btn{position:relative;padding:0;margin:0 7.2px;font-size:0;outline:none;width:36px;height:36px;border:none;color:#fff;background-color:rgba(0,0,0,.7);background-repeat:no-repeat;background-size:50% 50%;background-position:50%;border-radius:50%}.slim-btn:before{border-radius:inherit;position:absolute;box-sizing:border-box;left:-3px;right:-3px;bottom:-3px;top:-3px;border:3px solid #fff;content:\\\"\\\";-webkit-transform:scale(.95);transform:scale(.95);opacity:0;-webkit-transition:all .25s;transition:all .25s;z-index:-1;pointer-events:none}.slim-btn:focus:before,.slim-btn:hover:before{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.slim-btn *{pointer-events:none}.slim-btn-remove{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 269 269' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' clip-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='1.414'%3E%3Cpath d='M63.12 250.254s3.998 18.222 24.582 18.222h93.072c20.583 0 24.582-18.222 24.582-18.222l18.374-178.66H44.746l18.373 178.66zM170.034 98.442a8.95 8.95 0 0 1 17.9 0l-8.95 134.238a8.95 8.95 0 0 1-17.9 0l8.95-134.238zm-44.746 0a8.949 8.949 0 1 1 17.898 0V232.68a8.95 8.95 0 1 1-17.9 0V98.442zm-35.798-8.95a8.95 8.95 0 0 1 8.95 8.95l8.95 134.237c0 4.942-4.008 8.948-8.95 8.948a8.95 8.95 0 0 1-8.95-8.95L80.54 98.441a8.95 8.95 0 0 1 8.95-8.95zm128.868-53.68h-39.376V17.898c0-13.578-4.39-17.9-17.898-17.9H107.39C95 0 89.492 6 89.492 17.9v17.91H50.116c-7.914 0-14.32 6.007-14.32 13.43 0 7.424 6.406 13.43 14.32 13.43H218.36c7.914 0 14.32-6.006 14.32-13.43 0-7.423-6.406-13.43-14.32-13.43zm-57.274 0H107.39l.002-17.914h53.695V35.81z' fill='%23fff'/%3E%3C/svg%3E\\\")}.slim-btn-download{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 269 269' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' clip-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='1.414'%3E%3Cpath d='M232.943 223.73H35.533c-12.21 0-22.11 10.017-22.11 22.373 0 12.356 9.9 22.373 22.11 22.373h197.41c12.21 0 22.11-10.017 22.11-22.373 0-12.356-9.9-22.373-22.11-22.373zM117.88 199.136c4.035 4.04 9.216 6.147 14.492 6.508.626.053 1.227.188 1.866.188.633 0 1.228-.135 1.847-.186 5.284-.357 10.473-2.464 14.512-6.51l70.763-70.967c8.86-8.876 8.86-23.268 0-32.143-8.86-8.876-23.225-8.876-32.086 0l-32.662 32.756V22.373C156.612 10.017 146.596 0 134.238 0c-12.356 0-22.372 10.017-22.372 22.373v106.41L79.204 96.027c-8.86-8.876-23.226-8.876-32.086 0-8.86 8.875-8.86 23.267 0 32.142l70.763 70.966z' fill='%23fff'/%3E%3C/svg%3E\\\")}.slim-btn-upload{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg width='243' height='269' viewBox='0 0 243 269' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EDownload%3C/title%3E%3Cpath d='M219.943 223.73H22.533c-12.21 0-22.11 10.017-22.11 22.373 0 12.356 9.9 22.373 22.11 22.373h197.41c12.21 0 22.11-10.017 22.11-22.373 0-12.356-9.9-22.373-22.11-22.373zM104.88 6.696c4.035-4.04 9.216-6.147 14.492-6.508C119.998.135 120.6 0 121.238 0c.633 0 1.228.135 1.847.186 5.284.357 10.473 2.464 14.512 6.51l70.763 70.967c8.86 8.875 8.86 23.267 0 32.142-8.86 8.876-23.225 8.876-32.086 0L143.612 77.05v106.41c0 12.355-10.016 22.372-22.374 22.372-12.356 0-22.372-10.017-22.372-22.373V77.05l-32.662 32.755c-8.86 8.876-23.226 8.876-32.086 0-8.86-8.875-8.86-23.267 0-32.142L104.88 6.696z' fill='%23FFF' fill-rule='evenodd'/%3E%3C/svg%3E\\\")}.slim-btn-edit{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 269 269' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' clip-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='1.414'%3E%3Cpath d='M161.36 56.337c-7.042-7.05-18.46-7.05-25.5 0l-6.373 6.38-89.243 89.338.023.023-2.812 2.82s-8.968 9.032-29.216 74.4c-.143.456-.284.91-.427 1.373-.36 1.172-.726 2.362-1.094 3.568a785.126 785.126 0 0 0-.988 3.25c-.28.922-.556 1.835-.84 2.778-.64 2.14-1.29 4.318-1.954 6.567-1.455 4.937-5.01 16.07-.99 20.1 3.87 3.882 15.12.467 20.043-.993a1275.615 1275.615 0 0 0 9.41-2.83c1.032-.314 2.058-.626 3.063-.935 1.27-.39 2.52-.775 3.75-1.157l1.09-.34c62.193-19.365 73.358-28.453 74.286-29.284l.01-.01.067-.06 2.88-2.886.192.193 89.244-89.336 6.373-6.382c7.04-7.048 7.04-18.476 0-25.525l-50.998-51.05zM103.4 219.782c-.08.053-.185.122-.297.193l-.21.133c-.076.047-.158.098-.245.15l-.243.148c-2.97 1.777-11.682 6.362-32.828 14.017-2.47.894-5.162 1.842-7.98 2.82l-30.06-30.092c.98-2.84 1.928-5.55 2.825-8.04 7.638-21.235 12.22-29.974 13.986-32.94l.12-.2c.063-.1.12-.196.175-.283l.126-.2c.07-.11.14-.217.192-.296l2.2-2.205 54.485 54.542-2.248 2.255zM263.35 56.337l-50.996-51.05c-7.04-7.048-18.456-7.048-25.498 0L174.108 18.05c-7.04 7.048-7.04 18.476 0 25.524l50.996 51.05c7.04 7.048 18.457 7.048 25.498 0l12.75-12.762c7.04-7.05 7.04-18.477 0-25.525z' fill='%23fff'/%3E%3C/svg%3E\\\")}.slim-loader-background{stroke:rgba(0,0,0,.15)}.slim-loader-foreground{stroke:rgba(0,0,0,.65)}.slim[data-state*=preview] .slim-loader-background{stroke:hsla(0,0%,100%,.25)}.slim[data-state*=preview] .slim-loader-foreground{stroke:#fff}.slim-upload-status{padding:0 .5em;border-radius:.3125em;font-size:.75em;box-shadow:0 .125em .25em rgba(0,0,0,.25)}.slim-upload-status[data-state=success]{background-color:#d1ed8f;color:#323e15}.slim-upload-status[data-state=success] .slim-upload-status-icon{width:.5em;height:.75em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border:.1875em solid currentColor;border-left:none;border-top:none;margin-right:.325em;margin-left:.25em;margin-bottom:.0625em}.slim-upload-status[data-state=error]{background:#efd472;color:#574016}.slim-upload-status[data-state=error] .slim-upload-status-icon{margin-left:-.125em;margin-right:.5em;width:.5625em;height:1em;position:relative;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.slim-upload-status[data-state=error] .slim-upload-status-icon:after,.slim-upload-status[data-state=error] .slim-upload-status-icon:before{content:\\\"\\\";position:absolute;box-sizing:content-box;width:0;height:0;border:.09em solid currentColor;background-color:currentColor;-webkit-transform:translate(-50%,-50%) translate(.5em,.5em);transform:translate(-50%,-50%) translate(.5em,.5em)}.slim-upload-status[data-state=error] .slim-upload-status-icon:before{width:.66666666667em}.slim-upload-status[data-state=error] .slim-upload-status-icon:after{height:.66666666667em}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","export enum AuthenticationMethod {\r\n Pincode = 0,\r\n FingerPrint = 1,\r\n}\r\n\r\nexport enum FieldTypes {\r\n FIRSTNAME = 100,\r\n INITIALS = 101,\r\n INFIX = 102,\r\n LASTNAME = 103,\r\n GENDER = 104,\r\n DATEOFBIRTH = 105,\r\n STREETNAME = 106,\r\n STREETNUMBER = 107,\r\n ZIPCODE = 108,\r\n CITY = 109,\r\n COUNTRY = 110,\r\n PHONENUMBER = 111,\r\n CARDNUMBER = 123,\r\n MANAGEMONEYFUNCTIONSDISABLED = 285,\r\n IDPERSONALSTAMM = 291,\r\n AUSWEISNR = 292,\r\n WERK = 293,\r\n UNTERNEHMEN = 294,\r\n ANREDE = 295,\r\n TITLE = 296,\r\n VORNAME = 297,\r\n NACHNAME = 298,\r\n STRAßE = 299,\r\n LAND = 300,\r\n UNTERN_NAME = 301,\r\n GRUPPE = 302,\r\n POSITION = 303,\r\n}\r\n\r\nexport enum UserIdentifierTypes {\r\n MUID,\r\n /// \r\n /// Uid of a mifare/desfire token\r\n /// \r\n UID,\r\n /// \r\n /// Static user guid\r\n /// \r\n GUID,\r\n /// \r\n /// Generated request identifiers. Usually expires after a period of time or after being used.\r\n /// \r\n //RID,\r\n /// \r\n /// QRID\r\n /// \r\n QRID,\r\n /// \r\n /// Blockchain address\r\n /// \r\n //BLOCKCHAIN,\r\n /// \r\n /// Unique Email Address\r\n /// \r\n EMAIL,\r\n /// \r\n /// Mobile Number\r\n /// \r\n MOBILE,\r\n /// \r\n /// Mybility Cardnumber\r\n /// \r\n MYBILITY_CARDNUMBER,\r\n}\r\n\r\nexport const LogLevel = {\r\n Debug: 'debug',\r\n Info: 'info',\r\n Warn: 'warn',\r\n Error: 'error',\r\n}\r\n\r\nexport enum AppLinkTypes {\r\n RegisterConfirm,\r\n ConfirmChangeEmail,\r\n ResetPassword,\r\n ConfirmPaymentOrder, //Charge\r\n EMandateResult,\r\n}\r\n\r\nexport enum TokenStates {\r\n Active,\r\n Blocked,\r\n Expired,\r\n}\r\n\r\n// export enum QrActions{\r\n// OpenOrder\r\n// }\r\n\r\n// Qrcodes die de Topr Consumer leest (zoals voor table orders)\r\nexport type QrCodeTypes = 'Table' | 'Ticket'\r\n\r\nexport enum ConsumerSubscriptionItemTypes {\r\n Day = 1,\r\n Week = 2,\r\n Month = 3,\r\n Year = 4,\r\n Trips = 5,\r\n Unlimited = 6,\r\n}\r\n\r\nexport enum PaymentOrderStatusTypes {\r\n Refunded = -5,\r\n ProcessFailed = -4,\r\n PaymentFailed = -3,\r\n PaymentExpired = -2,\r\n PaymentCanceled = -1,\r\n WaitingForPayment = 0,\r\n PaymentComplete = 1,\r\n Processed = 2,\r\n}\r\n\r\nexport enum ChargeSuccessReturn {\r\n WalletDetails,\r\n OrderPayment,\r\n}\r\n","import {IServiceConfig} from '../../Models/Client'\r\nimport {LogLevel} from '../../Models/Client/Enums'\r\n\r\nconst DebugConfig: IServiceConfig = {\r\n //ToprAuthUrl: 'https://localhost:5001/', //ngrok niet nodig, web\r\n ToprAuthUrl: 'http://localhost:57130/',\r\n BaseUrl: 'https://f5a8-90-145-223-18.ngrok-free.app/',\r\n //BaseUrl: 'https://core.topr.services/',\r\n //BaseUrl: 'https://localhost:44340/',\r\n //CmsUrl: 'http://localhost:51526',\r\n //CmsUrl: 'https://6af6-90-145-223-18.ngrok-free.app',\r\n CmsUrl: 'https://cms.toprwallet.nl',\r\n ClientId: '797e1a1a-70bf-4ca9-9320-5e30ae98704c', //toprclientid:6 toprConsumerapp\r\n Secret: '',\r\n ShowLogging: false,\r\n LogLevel: LogLevel.Info,\r\n}\r\n\r\nexport default DebugConfig\r\n","import {IServiceConfig} from '../../Models/Client'\r\nimport {LogLevel} from '../../Models/Client/Enums'\r\n\r\nconst ProductionConfig: IServiceConfig = {\r\n ToprAuthUrl: 'https://auth.topr.services/',\r\n BaseUrl: 'https://core.topr.services/',\r\n CmsUrl: 'https://cms.toprwallet.nl',\r\n ClientId: '797e1a1a-70bf-4ca9-9320-5e30ae98704c', //toprclientid:6 toprConsumerapp\r\n Secret: '',\r\n ShowLogging: false,\r\n LogLevel: LogLevel.Error,\r\n}\r\n\r\nexport default ProductionConfig\r\n","import {ITenantConfig} from '../../../Models/Client/Config/ITenantConfig'\r\nimport {Asset} from 'expo-asset'\r\n\r\nconst ToprConfig: ITenantConfig = {\r\n AppName: 'Topr Wallet',\r\n SystemName: 'topr',\r\n MainColor: '#C0D001', //'#97af25',\r\n MainColorDark: '#97af25',\r\n //MainColor: '#97af25', //'#C1D101', //topr groen\r\n TermsPdf: {\r\n nl: Asset.fromModule(\r\n require('../../../../assets/file/topr/terms-and-conditions-nl.pdf'),\r\n ).uri,\r\n en: Asset.fromModule(\r\n require('../../../../assets/file/topr/terms-and-conditions-en.pdf'),\r\n ).uri,\r\n },\r\n TenantID: 9,\r\n Version: {Ios: '2.0.36', Android: '2.0.36'},\r\n BaseDeepLink: 'https://www.toprwallet.nl/',\r\n}\r\n\r\nexport default ToprConfig\r\n","import DebugConfig from './Service/DebugConfig'\r\nimport ProductionConfig from './Service/ProductionConfig'\r\nimport TestConfig from './Service/TestConfig'\r\nimport ToprConfig from './Tenants/Topr/ToprConfig'\r\n\r\nexport default class AppConfig {\r\n //Constants\r\n\r\n static Tenant = ToprConfig\r\n //static Service = DebugConfig\r\n static Service = ProductionConfig\r\n //static Service = TestConfig\r\n\r\n public static get IsDebugMode() {\r\n return AppConfig.Service === DebugConfig // || AppConfig.Service === TestConfig\r\n }\r\n}\r\n","import {\r\n Dimensions,\r\n ImageStyle,\r\n Platform,\r\n TextStyle,\r\n ViewStyle,\r\n} from 'react-native'\r\nimport AppConfig from '../Config/AppConfig'\r\n\r\nexport const deviceHeight = Dimensions.get('window').height\r\nexport const deviceWidth = Dimensions.get('window').width\r\n//export {default as theme} from './Theme'\r\n\r\nexport const tabViewLayout = {width: deviceWidth}\r\nexport const sizes = {\r\n padding: {\r\n sm: 5,\r\n md: 15,\r\n lg: 40,\r\n },\r\n image: {\r\n tileImageHeight: 150,\r\n headerHeight: 250,\r\n },\r\n icon: {\r\n md: 20,\r\n lg: 40,\r\n xl: 70,\r\n xxl: 140,\r\n },\r\n}\r\n\r\nexport const defaultFontWeight: TextStyle = {\r\n fontWeight: '300',\r\n}\r\n\r\nexport const boldFontWeight: TextStyle = {\r\n fontWeight: '600',\r\n}\r\n\r\nexport const openSansLight: TextStyle = {\r\n fontFamily: Platform.OS === 'ios' ? 'Open Sans' : 'OpenSans-Light',\r\n fontWeight: Platform.OS === 'ios' ? '300' : 'normal',\r\n}\r\n\r\nexport const colors = {\r\n main: AppConfig.Tenant.MainColor,\r\n containerBg: '#EEEEEC',\r\n darkGrey: '#555', //'#7B7B7B',\r\n darkerGrey: '#393939',\r\n grey: '#808080' /* Item.Label */,\r\n lighterGrey: '#F8F5F2',\r\n lightGrey: '#999', //'#cecece' /* password icon */,\r\n darkBlue: '#122C45' /* topr blue */,\r\n darkRed: '#B90504',\r\n lightRed: '#feecf0',\r\n green: '#cedb00',\r\n orange: '#f28b00',\r\n yellow: '#F4E2A0',\r\n}\r\n\r\nexport const fullWidthHeightAbs: ViewStyle = {\r\n position: 'absolute',\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 0,\r\n}\r\n\r\nconst alertIcon: TextStyle = {\r\n fontSize: 50,\r\n marginBottom: sizes.padding.md,\r\n}\r\n\r\ninterface IStyles {\r\n alignItemsCenter: ViewStyle\r\n\r\n amountStyle: TextStyle\r\n backgroundImageStyle: ViewStyle\r\n badgeStyle: ViewStyle\r\n\r\n cardFooter: ImageStyle\r\n cardFooterColumn: ViewStyle\r\n centerXY: ViewStyle\r\n centerXYContainer: ViewStyle\r\n centerRowY: ViewStyle\r\n container: ViewStyle\r\n containerBg: ViewStyle\r\n content: ViewStyle\r\n defaultFlatList: ViewStyle\r\n defaultFlatListWhite: ViewStyle\r\n dot: ViewStyle\r\n dotSmall: ViewStyle\r\n dropShadow: ViewStyle\r\n errorMessage: TextStyle\r\n flatListContentStyle: ViewStyle\r\n flatListContentStyleStock: ViewStyle\r\n flatListLoader: ViewStyle\r\n flatListHeader: ViewStyle\r\n flex1: ViewStyle\r\n flexEnd: ViewStyle\r\n flexRow: ViewStyle\r\n footerBar: ViewStyle\r\n formFooter: ViewStyle\r\n formHeader: TextStyle\r\n formIntro: TextStyle\r\n fullFooterText: TextStyle\r\n fullWidthHeightAbs: ViewStyle\r\n highlightText: TextStyle\r\n justifySpaceBetween: ViewStyle\r\n labelStyle: TextStyle\r\n inputContainer: ViewStyle\r\n imageHeaderBackdrop: ViewStyle\r\n imageHeaderTitle: TextStyle\r\n imageHeaderSubTitle: TextStyle\r\n modalBackdrop: ViewStyle\r\n modalCard: ViewStyle\r\n modalMessage: TextStyle\r\n myLoader: ViewStyle\r\n noteText: TextStyle\r\n pickerItemImage: ImageStyle\r\n pickerRow: ViewStyle\r\n pickerText: TextStyle\r\n pincodeStyle: TextStyle\r\n price: TextStyle\r\n profileColorButton: ViewStyle\r\n profilePictureImage: ImageStyle\r\n rightContainer: ViewStyle\r\n stampIcon: TextStyle\r\n stampsContainer: ViewStyle\r\n subTitle: TextStyle\r\n tabButtonStyle: ViewStyle\r\n tabBarLabelStyle: TextStyle\r\n textWhite: TextStyle\r\n textNote: TextStyle\r\n textCenter: TextStyle\r\n textRowContainer: ViewStyle\r\n title: TextStyle\r\n toprLoader: ViewStyle\r\n transactionRow: ViewStyle\r\n}\r\n\r\nconst styles: IStyles = {\r\n alignItemsCenter: {\r\n alignItems: 'center',\r\n },\r\n\r\n amountStyle: {\r\n color: colors.main,\r\n fontSize: 20,\r\n fontWeight: 'bold',\r\n textAlign: 'center',\r\n },\r\n backgroundImageStyle: {...fullWidthHeightAbs, opacity: 0.2},\r\n badgeStyle: {\r\n backgroundColor: colors.main,\r\n paddingHorizontal: 5,\r\n paddingVertical: 5,\r\n borderRadius: 5,\r\n height: 'auto',\r\n borderWidth: 0,\r\n },\r\n tabButtonStyle: {\r\n backgroundColor: '#fff',\r\n borderBottomColor: colors.lightGrey,\r\n borderBottomWidth: 1,\r\n },\r\n cardFooter: {\r\n flexDirection: 'row',\r\n paddingHorizontal: sizes.padding.md,\r\n //paddingBottom: sizes.padding.md,\r\n alignItems: 'center',\r\n },\r\n cardFooterColumn: {\r\n //flexDirection: 'column',\r\n padding: sizes.padding.md,\r\n justifyContent: 'center',\r\n alignItems: 'flex-start',\r\n },\r\n centerXY: {\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n centerXYContainer: {flex: 1, alignItems: 'center', justifyContent: 'center'},\r\n centerRowY: {\r\n alignItems: 'center',\r\n },\r\n container: {\r\n flex: 1,\r\n backgroundColor: '#fff',\r\n },\r\n containerBg: {\r\n backgroundColor: colors.containerBg,\r\n },\r\n content: {\r\n flex: Platform.OS === 'web' ? 1 : undefined,\r\n paddingHorizontal: sizes.padding.md,\r\n paddingTop: sizes.padding.md,\r\n backgroundColor: '#fff',\r\n },\r\n dropShadow: {\r\n elevation: 5, // Android\r\n shadowColor: '#030002', // Android, iOS & Web\r\n shadowOpacity: 0.25, // iOS & Web\r\n shadowRadius: 5, // iOS & web\r\n },\r\n defaultFlatList: {\r\n flex: 1,\r\n backgroundColor: colors.containerBg,\r\n //padding: sizes.padding.sm,\r\n },\r\n defaultFlatListWhite: {\r\n flex: 1,\r\n backgroundColor: '#fff',\r\n },\r\n dot: {\r\n backgroundColor: '#fff',\r\n width: 20,\r\n height: 20,\r\n borderRadius: 10,\r\n },\r\n dotSmall: {\r\n backgroundColor: '#fff',\r\n width: 15,\r\n height: 15,\r\n borderRadius: 10,\r\n marginHorizontal: 10,\r\n },\r\n errorMessage: {\r\n fontSize: 12,\r\n color: 'red',\r\n },\r\n\r\n flatListContentStyle: {\r\n paddingBottom: 120,\r\n },\r\n flatListContentStyleStock: {\r\n paddingBottom: 20,\r\n height: Platform.OS === 'web' ? 10 : 'auto', //token, locations,couponsummary,savingcardsummary\r\n },\r\n flatListLoader: {\r\n alignItems: 'center',\r\n paddingVertical: sizes.padding.md,\r\n },\r\n flatListHeader: {\r\n backgroundColor: colors.main,\r\n paddingHorizontal: sizes.padding.md,\r\n paddingVertical: sizes.padding.md,\r\n borderBottomColor: colors.lightGrey,\r\n borderBottomWidth: 1,\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n },\r\n flex1: {\r\n flex: 1,\r\n },\r\n\r\n flexEnd: {alignItems: 'flex-end', flex: 1},\r\n flexRow: {\r\n flexDirection: 'row',\r\n },\r\n footerBar: {\r\n borderTopColor: '#000',\r\n borderTopWidth: 1,\r\n backgroundColor: '#fff',\r\n flexDirection: 'row',\r\n paddingVertical: sizes.padding.sm,\r\n },\r\n\r\n formFooter: {\r\n marginTop: sizes.padding.lg,\r\n },\r\n formHeader: {\r\n color: colors.main,\r\n fontWeight: '300',\r\n marginTop: sizes.padding.md,\r\n marginBottom: sizes.padding.lg,\r\n ...openSansLight,\r\n },\r\n formIntro: {\r\n marginBottom: sizes.padding.md,\r\n fontSize: 20,\r\n color: colors.darkerGrey,\r\n ...openSansLight,\r\n },\r\n fullFooterText: {\r\n textAlign: 'center',\r\n color: '#fff',\r\n fontSize: 16,\r\n fontWeight: 'bold',\r\n },\r\n fullWidthHeightAbs: {\r\n ...fullWidthHeightAbs,\r\n },\r\n highlightText: {\r\n fontSize: 16,\r\n color: colors.main,\r\n ...openSansLight,\r\n },\r\n justifySpaceBetween: {\r\n justifyContent: 'space-between',\r\n },\r\n labelStyle: {\r\n color: colors.darkGrey,\r\n fontWeight: '300',\r\n marginBottom: sizes.padding.sm,\r\n },\r\n inputContainer: {\r\n borderBottomColor: colors.lightGrey,\r\n paddingHorizontal: 0,\r\n },\r\n imageHeaderBackdrop: {\r\n ...fullWidthHeightAbs,\r\n backgroundColor: 'rgba(0,0,0,0.4)',\r\n //backgroundColor:'red',\r\n },\r\n imageHeaderTitle: {\r\n //marginVertical: 20,\r\n color: '#fff',\r\n fontSize: 32,\r\n paddingHorizontal: sizes.padding.md,\r\n marginBottom: sizes.padding.sm,\r\n textAlign: 'center',\r\n //backgroundColor: 'red',\r\n ...openSansLight,\r\n },\r\n imageHeaderSubTitle: {\r\n color: '#fff',\r\n fontSize: 24,\r\n ...openSansLight,\r\n },\r\n modalBackdrop: {\r\n ...fullWidthHeightAbs,\r\n backgroundColor: 'rgba(0,0,0,0.2)',\r\n },\r\n modalCard: {\r\n //select width wrong, automatic charge\r\n //width: Platform.OS === 'web' ? 640 : deviceWidth - 2 * sizes.padding.md,\r\n width: Platform.OS === 'web' ? 640 : deviceWidth - 2 * sizes.padding.md,\r\n //maxWidth: deviceWidth - 2 * sizes.padding.md,\r\n //minWidth: '80%',\r\n marginBottom: sizes.padding.md,\r\n padding: sizes.padding.md,\r\n },\r\n modalMessage: {\r\n textAlign: 'center',\r\n //marginBottom: sizes.padding.md,\r\n },\r\n\r\n myLoader: {\r\n alignItems: 'center',\r\n justifyContent: 'space-around',\r\n flexDirection: 'row',\r\n },\r\n noteText: {\r\n color: '#aaa',\r\n fontSize: 12,\r\n },\r\n pickerItemImage: {\r\n resizeMode: 'contain',\r\n height: 40,\r\n width: 40,\r\n },\r\n pickerRow: {flexDirection: 'row', alignItems: 'center'},\r\n pickerText: {marginLeft: sizes.padding.md},\r\n pincodeStyle: {\r\n fontSize: 50,\r\n height: 100,\r\n },\r\n price: {\r\n fontWeight: 'bold',\r\n fontSize: 20,\r\n color: colors.main,\r\n },\r\n profileColorButton: {\r\n backgroundColor: colors.main,\r\n height: 40,\r\n width: 40,\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n borderRadius: 30,\r\n },\r\n profilePictureImage: {\r\n backgroundColor: colors.main,\r\n height: 40,\r\n width: 40,\r\n borderRadius: 30,\r\n },\r\n rightContainer: {\r\n position: 'absolute',\r\n top: sizes.padding.md,\r\n right: sizes.padding.md,\r\n bottom: sizes.padding.md,\r\n },\r\n stampsContainer: {\r\n flexDirection: 'row',\r\n justifyContent: 'center',\r\n flexWrap: 'wrap',\r\n },\r\n stampIcon: {\r\n fontSize: 40,\r\n //marginBottom: sizes.padding.md,\r\n },\r\n subTitle: {\r\n fontStyle: 'italic',\r\n },\r\n tabBarLabelStyle: defaultFontWeight,\r\n textNote: {\r\n color: colors.lightGrey,\r\n },\r\n textWhite: {\r\n color: '#fff',\r\n },\r\n textCenter: {textAlign: 'center'},\r\n textRowContainer: {\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n },\r\n title: {\r\n fontSize: 17,\r\n },\r\n\r\n toprLoader: {\r\n alignItems: 'center',\r\n justifyContent: 'space-around',\r\n flexDirection: 'row',\r\n paddingHorizontal: 20,\r\n paddingBottom: 8,\r\n },\r\n transactionRow: {\r\n flexDirection: 'row',\r\n paddingBottom: sizes.padding.md,\r\n paddingHorizontal: sizes.padding.md,\r\n marginTop: sizes.padding.md,\r\n\r\n borderBottomColor: colors.lightGrey,\r\n borderBottomWidth: 1,\r\n },\r\n}\r\n\r\nexport default styles\r\n","import React from 'react'\r\nimport {View, KeyboardAvoidingView, ViewStyle, Platform} from 'react-native'\r\nimport {ScrollView} from 'react-native-gesture-handler'\r\nimport {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n keyboardAware?: boolean\r\n isGreyBackground?: boolean\r\n headerPadding?: boolean\r\n //onScroll?: (y: number) => void\r\n}\r\n\r\nconst Container: React.FC = ({\r\n children,\r\n keyboardAware,\r\n isGreyBackground,\r\n headerPadding,\r\n //onScroll,\r\n}) => {\r\n const {container, containerBg} = Style\r\n\r\n const styles: ViewStyle[] = [container]\r\n\r\n if (headerPadding) {\r\n styles.push({\r\n paddingTop: 60,\r\n })\r\n }\r\n\r\n if (isGreyBackground) {\r\n styles.push(containerBg)\r\n }\r\n\r\n if (Platform.OS !== 'web' && keyboardAware) {\r\n return (\r\n {\r\n // if (onScroll) {\r\n // onScroll(event.nativeEvent.contentOffset.y)\r\n // }\r\n // }}\r\n // scrollEventThrottle={onScroll ? 5 : 0}\r\n //bounces={onScroll ? false : true}\r\n >\r\n {children}\r\n \r\n )\r\n }\r\n\r\n return {children}\r\n}\r\n\r\nexport default Container\r\n\r\nContainer.defaultProps = {\r\n keyboardAware: true,\r\n isGreyBackground: false,\r\n headerPadding: false,\r\n}\r\n","import React from 'react'\r\nimport {ScrollView, View, ViewProps, ViewStyle} from 'react-native'\r\nimport Style, {deviceHeight} from '../../Style'\r\ninterface IProps extends ViewProps {\r\n padder?: boolean\r\n headerMargin?: boolean\r\n style?: ViewStyle\r\n}\r\n\r\nconst Content: React.FC = ({\r\n children,\r\n padder,\r\n style,\r\n headerMargin,\r\n ...otherProp\r\n}) => {\r\n const {content, containerBg} = Style\r\n\r\n const styles: ViewStyle[] = [content]\r\n\r\n if (!padder) {\r\n styles.push({paddingHorizontal: 0, paddingTop: 0})\r\n }\r\n\r\n if (headerMargin) {\r\n styles.push({marginTop: 60})\r\n }\r\n\r\n if (style !== undefined) {\r\n styles.push(style)\r\n }\r\n\r\n //styles.push({backgroundColor: 'green'})\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n //return {children}\r\n}\r\n\r\nexport default Content\r\n\r\nContent.defaultProps = {\r\n padder: true,\r\n headerMargin: false,\r\n}\r\n","import React, {Children} from 'react'\r\nimport {View} from 'react-native'\r\nimport {ListItem} from 'react-native-elements'\r\nimport Style, {sizes} from '../../Style'\r\nimport ToprConfig from '../../Config/Tenants/Topr/ToprConfig'\r\ninterface IProps {\r\n iconButtonLeft?: boolean\r\n}\r\n\r\nconst FooterBar: React.FC = ({children, iconButtonLeft}) => {\r\n const {dropShadow} = Style\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default FooterBar\r\nFooterBar.defaultProps = {\r\n iconButtonLeft: true,\r\n}\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {ListItem, Text} from 'react-native-elements'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n label: string\r\n value: string\r\n}\r\n\r\nconst TextRow: React.FC = ({label, value}) => {\r\n const {textRowContainer} = Style\r\n return (\r\n \r\n {label}\r\n {value}\r\n \r\n )\r\n}\r\n\r\nexport default TextRow\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React from 'react'\r\nimport {Image, ImageURISource, View} from 'react-native'\r\nimport {Icon, Text} from 'react-native-elements'\r\nimport Style, {sizes, colors} from '../../Style'\r\ninterface IProps {\r\n //imageUrl: string\r\n imageSource: ImageURISource\r\n onBackPress: () => void\r\n}\r\n\r\nconst ImageHeader: React.FC = ({\r\n imageSource,\r\n onBackPress,\r\n children,\r\n}) => {\r\n const {imageHeaderBackdrop} = Style\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ImageHeader\r\n","import React from 'react'\r\nimport {View} from 'react-native'\r\nimport {Icon, Text} from 'react-native-elements'\r\ninterface IProps {\r\n onBackPress?: () => void\r\n title?: string\r\n}\r\n\r\nconst SubmitHeader: React.FC = ({onBackPress, children, title}) => {\r\n const renderBackButton = () => {\r\n if (onBackPress === undefined) {\r\n return null\r\n }\r\n return (\r\n \r\n )\r\n }\r\n\r\n const renderTitle = () => {\r\n if (title === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {title}\r\n \r\n )\r\n }\r\n return (\r\n \r\n {renderBackButton()}\r\n {renderTitle()}\r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default SubmitHeader\r\n","import {StackHeaderProps, StackNavigationProp} from '@react-navigation/stack'\r\nimport React from 'react'\r\nimport {View, StyleSheet, TouchableOpacity} from 'react-native'\r\nimport {Icon, Text} from 'react-native-elements'\r\nimport i18n from '../../i18n'\r\nimport {MainScreensList} from '../../Navigation'\r\nimport Style, {colors, sizes} from '../../Style'\r\n//interface IProps extends StackHeaderProps {}\r\n\r\ninterface IProps {\r\n onBackPress: () => void\r\n title: string\r\n}\r\n\r\nconst MyHeader: React.FC = ({onBackPress, title}) => {\r\n const {headerContainer, backButton, titleStyle} = styles\r\n\r\n // const {options} = scene.descriptor\r\n // const title =\r\n // options.headerTitle !== undefined\r\n // ? options.headerTitle\r\n // : options.title !== undefined\r\n // ? options.title\r\n // : scene.route.name\r\n\r\n // console.log('MyHeader', mode)\r\n\r\n return (\r\n \r\n {title}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default MyHeader\r\n\r\nconst styles = StyleSheet.create({\r\n headerContainer: {\r\n flexDirection: 'row',\r\n backgroundColor: '#fff',\r\n paddingHorizontal: 10,\r\n paddingVertical: sizes.padding.md,\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n\r\n //borderBottomColor: '#f0f0f0',\r\n borderBottomColor: colors.lightGrey,\r\n borderBottomWidth: 1,\r\n },\r\n backButton: {\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n position: 'absolute',\r\n left: 0,\r\n },\r\n titleStyle: {\r\n fontSize: 17,\r\n fontWeight: '600',\r\n },\r\n})\r\n","import nl from './locales/nl'\r\nimport en from './locales/en'\r\nimport * as Localization from 'expo-localization'\r\nimport 'intl' //intl polyfill\r\nimport 'intl/locale-data/jsonp/en'\r\nimport 'intl/locale-data/jsonp/de'\r\nimport 'intl/locale-data/jsonp/nl'\r\nimport 'intl/locale-data/jsonp/fr'\r\n\r\nimport deDE from 'date-fns/locale/de'\r\nimport enGb from 'date-fns/locale/en-GB'\r\nimport nlNl from 'date-fns/locale/nl'\r\n\r\nimport i18n from 'i18n-js'\r\ni18n.fallbacks = true\r\ni18n.defaultLocale = 'en' //should be en when en lang is added\r\n\r\ni18n.translations = {\r\n nl,\r\n en,\r\n}\r\n\r\ni18n.locale = Localization.locale\r\nexport const primaryLanguage: string = i18n.locale.substr(0, 2)\r\n\r\nconst GetCurrentDateLocale = () => {\r\n switch (primaryLanguage) {\r\n case 'nl':\r\n return nlNl\r\n // case 'de':\r\n // return deDE\r\n case 'en':\r\n default:\r\n return enGb\r\n }\r\n}\r\n\r\nexport const currentLocale = GetCurrentDateLocale()\r\n\r\nexport default i18n\r\n","export default {\r\n Account: {\r\n Header: 'Wallet',\r\n ChangeName: 'Naam wijzigen',\r\n ChangeEmail: 'E-mailadres wijzigen',\r\n ChangePassword: 'Wachtwoord wijzigen',\r\n SetProfilePicture: 'Profielfoto instellen',\r\n PictureModal: {TakePicture: 'Foto nemen', ChoosePicture: 'Foto kiezen'},\r\n },\r\n AutomaticCharge: {\r\n Buttons: {\r\n Create: 'Automatisch opwaarderen aanzetten',\r\n EditAmount: 'Bedrag aanpassen',\r\n EditBank: 'Bank gegevens aanpassen',\r\n TurnOff: 'Uitzetten',\r\n },\r\n Form: {\r\n Action: 'Aanzetten',\r\n Title: 'Automatisch opwaarderen voor {{currencyName}}',\r\n AuthenticateAction: 'Om automatisch opwaarderen aan te zetten.',\r\n ConfirmTurnOff:\r\n 'Weet je zeker dat je automatisch opwaarderen wilt uitzetten voor {{currencyName}}?',\r\n CreateMessage: {\r\n Title: 'Automatisch opwaarderen aanzetten',\r\n Message:\r\n 'Het kan enkele minuten duren voordat deze instelling is verwerkt.',\r\n },\r\n TurnOffMessage: {\r\n Title: 'Automatisch opwaarderen',\r\n Message: 'Het automatisch opwaarderen is uitgezet.',\r\n },\r\n EditMessage: {\r\n Title: 'Automatisch opwaarderen',\r\n Message: 'De wijzigingen zijn opgeslagen.',\r\n },\r\n ChargeCostsMessage: 'De kosten voor een automatische opwaardering zijn',\r\n Fields: {\r\n Amount: {\r\n Label: 'Opwaardeer bedrag',\r\n },\r\n WeeksAmount: {\r\n Label: 'Maximum aantal opwaarderingen per week',\r\n },\r\n Initials: {\r\n Label: 'Initialen',\r\n },\r\n Surname: {\r\n Label: 'Achternaam',\r\n Errors: {\r\n Required: 'Voer je achternaam in.',\r\n },\r\n },\r\n Email: {\r\n Label: 'E-mailadres',\r\n Errors: {\r\n Required: 'Voer je e-mailadres in.',\r\n },\r\n },\r\n Phone: {\r\n Label: 'Telefoonnummer',\r\n Errors: {\r\n Required: 'Voer je telefoonnummer in.',\r\n },\r\n },\r\n Street: {\r\n Label: 'Straatnaam',\r\n Errors: {\r\n Required: 'Voer je straatnaam in.',\r\n },\r\n },\r\n City: {\r\n Label: 'Plaatsnaam',\r\n Errors: {\r\n Required: 'Voer je plaatsnaam in.',\r\n },\r\n },\r\n StreetNumber: {\r\n Label: 'Huisnummer',\r\n Errors: {\r\n Required: 'Voer je huisnummer in.',\r\n },\r\n },\r\n Zipcode: {\r\n Label: 'Postcode',\r\n Errors: {\r\n Required: 'Voer je postcode in.',\r\n },\r\n },\r\n SelectedBank: {\r\n Label: 'Bank',\r\n EmptyText: '',\r\n Errors: {\r\n Required: 'Selecteer een bank.',\r\n },\r\n },\r\n },\r\n EMandateResults: {\r\n Title: 'Automatisch opwaarderen',\r\n EMANDATE_SUCCESS: 'Het Automatisch opwaarderen instellen is gelukt.',\r\n EMANDATE_CANCELLED:\r\n 'Het Automatisch opwaarderen instellen is geannuleerd.',\r\n EMANDATE_EXPIRED:\r\n 'Het Automatisch opwaarderen instellen aanvraag is verlopen (EMANDATE_EXPIRED).',\r\n EMANDATE_FAILURE:\r\n 'Het Automatisch opwaarderen instellen is mislukt (EMANDATE_FAILURE).',\r\n EMANDATE_PENDING:\r\n \"Het Automatisch opwaarderen instellen heeft de status 'In afwachting'.\",\r\n EMANDATE_UNKNOWN_STATUS:\r\n 'Er is een onbekende fout opgetreden tijdens het instellen van Automatisch Opwaarderen (EMANDATE_UNKNOWN_STATUS)',\r\n },\r\n },\r\n LoadingFailed: 'Ophalen portemonnee mislukt',\r\n },\r\n CancelAccount: {\r\n Confirm: 'Weet je zeker dat je dit account ({{name}}) wilt opheffen?',\r\n Header: 'Account opheffen',\r\n Info: 'Hier kun het account {{name}} opheffen. Het eventuele saldo wordt overgezet naar het hoofdaccount {{parentName}}.\\n\\nKaarten worden geblokkeerd en vervolgens gekoppeld aan de hoofdaccount {{parentName}}. Je kunt de kaarten weer gebruiken door ze te deblokkeren.',\r\n Succes: 'Account {{name}} is opgeheven',\r\n },\r\n AddAccountModal: {\r\n Form: {\r\n Action: 'Toevoegen',\r\n NameField: {\r\n Label: 'Naam',\r\n Errors: {\r\n Required: 'Voer een naam in.',\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Account toevoegen mislukt',\r\n },\r\n },\r\n },\r\n AddToken: {\r\n Form: {\r\n Fields: {\r\n ActivationCode: {\r\n Label: 'Activatiecode',\r\n Errors: {\r\n Required: 'Voer je activatiecode in.',\r\n },\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Kaart activeren mislukt',\r\n TOKEN_NOT_FOUND: 'Er is geen kaart gevonden met deze activatiecode.',\r\n TOKEN_ALREADY_ACTIVATED: 'Deze kaart is al geactiveerd.',\r\n },\r\n Succes:\r\n 'De kaart met code {{activationCode}} is gekoppeld aan je account.',\r\n },\r\n Header: 'Kaart toevoegen',\r\n Info: 'Voer je activatiecode in',\r\n },\r\n AddTokenUid: {\r\n ScanAgain: 'Scan opnieuw',\r\n CardScanned: 'Kaart is gelezen.',\r\n Form: {\r\n Uid: {\r\n Label: 'Scan je kaart met de NFC lezer.',\r\n Errors: {\r\n Invalid: 'Dit is geen geldige kaart.',\r\n NotFound: 'Kaart niet gevonden',\r\n },\r\n },\r\n\r\n ServerErrors: {\r\n Title: 'Kaart activeren mislukt',\r\n TOKEN_NOT_FOUND: 'Er is geen kaart gevonden.',\r\n TOKEN_ALREADY_ACTIVATED: 'Deze kaart is al geactiveerd.',\r\n },\r\n Succes: 'De kaart is gekoppeld aan je account.',\r\n },\r\n Header: 'Kaart toevoegen',\r\n },\r\n AuthenticateAction: {\r\n Title: 'Authenticeren',\r\n Pin: 'Voer je pincode in om {{message}}',\r\n FingerPrint: 'Scan je vingerafdruk om {{message}}',\r\n },\r\n ChangeName: {\r\n Header: 'Naam wijzigen',\r\n Form: {\r\n Action: 'Naam wijzigen',\r\n NameField: {\r\n Label: 'Naam',\r\n Errors: {\r\n Required: 'Voer een naam in.',\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Naam wijzigen mislukt',\r\n },\r\n Succes: 'Naam is gewijzigd.',\r\n },\r\n },\r\n ChangeEmail: {\r\n ConfirmationSentStep: {\r\n Header: 'Bevestigingsmail verstuurd',\r\n TextPart1:\r\n 'Er is een e-mail verzonden met een confirmatielink naar het nieuwe e-mailadres ',\r\n TextPart2:\r\n '\\n\\nKlik op de confirmatielink in de e-mail om de verandering naar het nieuwe e-mailadres te voltooien.\\n\\nAls u geen bevestigingsmail ontvangt, controleer dan uw spam-map.',\r\n },\r\n Form: {\r\n Action: 'E-mailadres wijzigen',\r\n EmailField: {\r\n Label: 'E-mailadres',\r\n Errors: {\r\n Required: 'Voer een e-mailadres in.',\r\n Regex: 'Voer een geldig e-mailadres in.',\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'E-mailadres wijzigen mislukt',\r\n REQUESTIDENTIFIER_NOT_FOUND:\r\n 'De aanvraag voor het wijzigen van je e-mailadres is niet gevonden.',\r\n REQUESTIDENTIFIER_EXPIRED:\r\n 'De aanvraag voor het wijzigen van je e-mailadres is verlopen.',\r\n REQUESTIDENTIFIER_REVOKED:\r\n 'De aanvraag voor het wijzigen van je e-mailadres is ingetrokken.',\r\n USER_EMAIL_NOT_UNIQUE: 'Er bestaat al een account met dit e-mailadres.',\r\n },\r\n Succes: 'E-mailadres is gewijzigd.',\r\n },\r\n Header: 'E-mailadres wijzigen',\r\n },\r\n ChangePassword: {\r\n Header: 'Wachtwoord wijzigen',\r\n Form: {\r\n Action: 'Wachtwoord wijzigen',\r\n Fields: {\r\n OldPassword: {\r\n Label: 'Oude wachtwoord',\r\n Errors: {\r\n Required: 'Voer je oude wachtwoord in.',\r\n Invalid: 'Het oude wachtwoord is onjuist.',\r\n },\r\n },\r\n Password: {\r\n Label: 'Wachtwoord',\r\n Errors: {\r\n Required: 'Voer je nieuwe wachtwoord in.',\r\n MinLength: 'Het wachtwoord moet minimaal 6 karakters lang zijn.',\r\n },\r\n },\r\n ConfirmPassword: {\r\n Label: 'Controle wachtwoord',\r\n Errors: {\r\n Required: 'Voer je controle wachtwoord in.',\r\n Equality:\r\n 'Het controle wachtwoord is niet hetzelfde als het wachtwoord.',\r\n },\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Wachtwoord wijzigen mislukt',\r\n },\r\n Succes: 'Wachtwoord is gewijzigd.',\r\n },\r\n },\r\n ChangeProfilePicture: {\r\n TakePictureHeader: 'Foto nemen',\r\n ChoosePictureHeader: 'Foto kiezen',\r\n Form: {\r\n Again: 'Opnieuw',\r\n Action: 'Opslaan',\r\n },\r\n Permissions: {\r\n Camera:\r\n 'De app heeft toegang tot de camera nodig om een foto te kunnen nemen.',\r\n Library:\r\n \"De app heeft toegang tot de foto's nodig om een foto te kunnen selecteren.\",\r\n },\r\n },\r\n Charge: {\r\n Form: {\r\n Action: 'Opwaarderen',\r\n AuthenticateAction: '{{amount}} op te waarderen.',\r\n Success: {\r\n Title: 'Opwaardering gelukt',\r\n Message: 'Bijwerken portemonnee.',\r\n },\r\n ChargeCostsMessage: 'De kosten voor het opwaarderen bedragen ',\r\n Fields: {\r\n Amount: {\r\n Label: 'Bedrag',\r\n Errors: {\r\n Required: 'Voer het bedrag in.',\r\n //MinMax: 'Voer een bedrag in tussen {{min}} en {{max}}',\r\n Min: 'Voer een bedrag van minimaal {{min}}',\r\n Max: 'Voer een bedrag van maximaal {{max}}',\r\n },\r\n },\r\n AmountHb: {\r\n Label: 'Aantal munten',\r\n Errors: {\r\n Required: 'Selecteer het aantal munten.',\r\n },\r\n },\r\n ChargeMethod: {\r\n Label: 'Methode',\r\n Errors: {\r\n NotAvailable: 'Er zijn geen opwaardeermethodes beschikbaar.',\r\n },\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Opwaarderen mislukt',\r\n CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED:\r\n 'Deze betaalmethode wordt niet ondersteund.',\r\n //ideal errors\r\n PROCESS_FAILED: 'Proces mislukt.',\r\n PAYMENT_FAILED: 'Betaling mislukt.',\r\n PAYMENT_EXPIRED: 'Betaling verlopen.',\r\n PAYMENT_CANCELED: 'Betaling geannuleerd.',\r\n WAITING_FOR_PAYMENT: 'Afwachten op betaling.',\r\n UNKNOWN: 'Er is een onbekende fout opgetreden.',\r\n //PaymentOrderStatusTypes\r\n Refunded: 'Betaling teruggestort.',\r\n ProcessFailed: 'Process mislukt.',\r\n PaymentFailed: 'Betaling mislukt.',\r\n PaymentExpired: 'Betaling verlopen.',\r\n PaymentCanceled: 'Betaling geannuleerd.',\r\n },\r\n },\r\n Header: 'Opwaarderen',\r\n IntroText0: 'Kies een opwaardeermethode en voer het bedrag in waarmee je ',\r\n IntroText1: ' wilt opwaarderen.',\r\n MaxBalance0: 'Je kunt nog maximaal ',\r\n MaxBalance1: ' opwaarderen.',\r\n Method: 'Methode',\r\n },\r\n CodePush: {\r\n UpdateDialog: {\r\n Title: 'Update',\r\n OptionalUpdateMessage:\r\n 'Er is een update beschikbaar. Wil je deze installeren?',\r\n OptionalInstallButtonLabel: 'Installeren',\r\n OptionalIgnoreButtonLabel: 'Negeren',\r\n MandatoryUpdateMessage:\r\n 'Er is een belangrijke update beschikbaar, deze zal nu geïnstalleerd worden',\r\n MandatoryContinueButtonLabel: 'Verder',\r\n },\r\n UpdateTitle: 'Topr Wallet wordt bijgewerkt.',\r\n DownloadingPackage: 'De update wordt gedownload {{procent}}%.',\r\n InstallingUpdate: 'De update wordt geinstalleerd.',\r\n },\r\n Common: {\r\n Account: 'Wallet',\r\n Accounts: 'Wallets',\r\n Add: 'Toevoegen',\r\n Back: 'Terug',\r\n BackToDashboard: 'Terug naar Dashboard',\r\n Cancel: 'Annuleren',\r\n Close: 'Sluiten',\r\n Card: 'Kaart',\r\n Cards: 'Kaarten',\r\n Check: 'Controleren',\r\n Continue: 'Verder',\r\n Confirm: 'Bevestigen',\r\n Coupons: 'Vouchers',\r\n Date: 'Datum',\r\n Dashboard: 'Dashboard',\r\n DefaultErrorMessage: 'Helaas er is iets misgegaan. [{{code}}]',\r\n Delete: 'Verwijderen',\r\n Description: 'Omschrijving',\r\n Details: 'Details',\r\n DropImage: 'Klik hier om een foto te uploaden.',\r\n Edit: 'Wijzigen',\r\n End: 'Eind',\r\n Help: 'Help',\r\n Off: 'Uit',\r\n Ok: 'Ok',\r\n On: 'Aan',\r\n ToOrder: 'Bestellen',\r\n Order: 'Bestelling',\r\n Orders: 'Bestellingen',\r\n Pay: 'Betalen',\r\n QrCode: 'QR-code',\r\n Save: 'Opslaan',\r\n SavingCards: 'Spaarkaarten',\r\n Scanner: 'Scanner',\r\n Stamps: 'Stempels',\r\n Valid: 'Geldig',\r\n ValidAlways: 'Deze coupon is altijd geldig.',\r\n ValidFrom: 'Vanaf:',\r\n ValidUntill: 'Tot en met:',\r\n Location: 'Locatie',\r\n Menu: 'Menu',\r\n No: 'Nee',\r\n Received: 'Ontvangen',\r\n Redeem: 'Inleveren',\r\n Redeemed: 'Ingeleverd',\r\n Search: 'Zoeken',\r\n ServerErrors: {\r\n Title: 'Fout',\r\n NO_CONNECTION: 'Er is geen verbinding met het internet.',\r\n EXCEPTION: 'Helaas er is iets misgegaan.\\n [{{code}}]',\r\n },\r\n Stamp: 'Stempelen',\r\n Start: 'Start',\r\n Status: 'Status',\r\n Summary: 'Overzicht',\r\n Token: 'Kaart',\r\n Tokens: 'Kaarten',\r\n Total: 'Totaal',\r\n Trips: 'Ritten',\r\n Wallet: 'Betaalmiddel',\r\n Wallets: 'Betaalmiddelen',\r\n Yes: 'Ja',\r\n },\r\n CouponsSummary: {\r\n Header: 'Coupons overzicht',\r\n NotRedeemed: 'Niet ingeleverd',\r\n Redeemed: 'Ingeleverd',\r\n },\r\n Dashboard: {\r\n AddToken: 'Kaart toevoegen',\r\n AddLocation: 'Locatie toevoegen',\r\n Tabs: {\r\n Payment: 'BETALEN',\r\n Coupons: 'COUPONS',\r\n Savings: 'SPAREN',\r\n Subscriptions: 'Abbonnementen',\r\n Tickets: 'Tickets',\r\n },\r\n NoCoupons: 'Je hebt nog geen coupons.',\r\n NoSavingCards: 'Je hebt nog geen spaarkaarten.',\r\n },\r\n Enums: {\r\n AutomaticChargeStatusTypesDTO: {\r\n Off: 'Uitgeschakeld',\r\n Pending: 'Aanvraag wachtend op verificatie',\r\n Denied: 'Aanvraag afgewezen',\r\n Blocked: 'Geblokkeerd',\r\n EnabledWithVerification: 'Actief',\r\n EnabledWithoutVerification: 'Actief',\r\n Initial: 'Niet ingesteld',\r\n },\r\n },\r\n GeneralMenu: {\r\n CouponSummary: 'Coupon overzicht',\r\n SavingCardSummary: 'spaarkaarten overzicht',\r\n },\r\n ForgotPassword: {\r\n Header: 'Wachtwoord resetten',\r\n Info: 'Voer je e-mailadres in en we sturen je een link om je wachtwoord te resetten.',\r\n Form: {\r\n Action: 'E-mail versturen',\r\n EmailField: {\r\n Label: 'E-mailadres',\r\n Errors: {\r\n Required: 'Voer je e-mailadres in.',\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Wachtwoord resetten mislukt',\r\n },\r\n Succes: {\r\n Message:\r\n 'Er is een e-mail verstuurd naar {{email}} met daarin een link om je wachtwoord opnieuw in te stellen.',\r\n Title: 'E-mail verstuurd',\r\n },\r\n },\r\n },\r\n Locations: {\r\n Header: 'Locaties',\r\n NoLocations: 'Er zijn nog geen {{tenantName}} Bij je in de buurt.',\r\n RequestAccess: {\r\n AllowLocationPermission: 'Locatie toegang toestaan',\r\n Title: 'Locatie toegang',\r\n Message:\r\n 'Topr Wallet heeft toegang tot je locatie nodig om te bepalen welke locaties er bij jou in de buurt zijn waar je Topr Wallet kunt gebruiken.',\r\n OkButton: 'Toestaan',\r\n NoButton: 'Weigeren',\r\n SettingsMessageAndroid:\r\n 'Druk op de knop \"Locatie toegang toestaan\" > Machtigingen > Locatie.',\r\n SettingsMessageIos:\r\n 'Druk op de knop \"Locatie toegang toestaan\" > Privacy > Locatievoorzieningen > Topr Wallet > \\'Bij gebruik app\\'.',\r\n },\r\n },\r\n LocationDetails: {\r\n Tabs: {\r\n Payment: 'BETALEN',\r\n Location: 'Locatie',\r\n },\r\n AddLocation: {\r\n Action: 'Locatie toevoegen',\r\n Confirm: 'Weet je zeker dat je deze locatie wilt toevoegen?',\r\n Success: 'Locatie {{locationName}} toegevoegd aan je portemonnee.',\r\n },\r\n Address: 'Adres',\r\n City: 'Plaats',\r\n Route: 'Route',\r\n Street: 'Straat',\r\n },\r\n Login: {\r\n CreateAccount: 'Account aanmaken',\r\n ForgotPassword: 'Wachtwoord vergeten?',\r\n Form: {\r\n Action: 'Inloggen',\r\n Fields: {\r\n Email: {\r\n Label: 'E-mailadres',\r\n Errors: {\r\n Required: 'Voer je e-mailadres in.',\r\n },\r\n },\r\n Password: {\r\n Label: 'Wachtwoord',\r\n Errors: {\r\n Required: 'Voer je wachtwoord in.',\r\n },\r\n },\r\n },\r\n Header: 'Inloggen',\r\n ServerErrors: {\r\n Title: 'Inloggen mislukt',\r\n USER_PASSWORD_INVALID: 'Ongeldige email/wachtwoord combinatie.',\r\n USER_LOCKED_SHORT:\r\n 'Je account is tijdelijk geblokkeerd. Probeer het opnieuw na 15 minuten.',\r\n USER_LOCKED_LONG:\r\n 'Je account is tijdelijk geblokkeerd. Probeer het opnieuw na 1 uur.',\r\n USER_BLOCKED:\r\n 'Je account is geblokeert. Neem contact op met de helpdesk om je account te de-blokkeren.',\r\n USER_NOT_FOUND:\r\n 'Er geen account gevonden voor deze email/wachtwoord combinatie.',\r\n },\r\n },\r\n Header: 'Inloggen',\r\n LoginExpired: 'Je login is verlopen, log opnieuw in.',\r\n },\r\n Loyalty: {\r\n Status: {\r\n Active: 'Actief',\r\n Expired: 'Verlopen',\r\n NotActive: 'Niet actief',\r\n Redeemed: 'Ingeleverd',\r\n Completed: 'Compleet',\r\n },\r\n },\r\n OrderOnline: {\r\n Add: 'Toevoegen',\r\n Cart: 'Winkelmandje',\r\n Pay: 'Betalen',\r\n Checkout: 'Afrekenen',\r\n CondimentArticleGroup: 'Extra',\r\n NoArticles: 'Er zijn nog geen producten.',\r\n Max: 'Max: {{max}}',\r\n Min: 'Min: {{min}} ',\r\n MaxErrorMessage: 'Je kunt niet meer dan {{max}} {{type}} selecteren.',\r\n MinErrorMessage: 'Selecteer minimaal {{min}} {{type}} .',\r\n OptionalChoice: 'Optionele keuze - ',\r\n PaymentMethods: {\r\n PayOnDelivery: 'Betalen bij bezorging',\r\n ToprWallet: 'Betaal met je Topr Wallet',\r\n },\r\n PaymentForm: {\r\n AuthenticateAction: '{{amount}} te betalen.',\r\n Fields: {\r\n SelectedCurrency: {\r\n Label: 'Betaalmiddel',\r\n Errors: {\r\n NotAvailable: 'Er zijn geen betaalmiddelen beschikbaar.',\r\n },\r\n },\r\n },\r\n InsufficientBalance: 'Je hebt onvoldoende saldo.',\r\n PaymentOrderDescriptionTable: 'Bestelling tafel {{tableNumber}}',\r\n ServerErrors: {\r\n Title: 'Bestellen mislukt',\r\n UNKNOWN: 'Er is een onbekende fout opgetreden.',\r\n INVALID_DELIVERY_TYPE: 'Onbekende aflevermethode ({{deliveryType}})',\r\n INVALID_GATEWAY: 'Ongeldige betaalwijze ({{gateway}})',\r\n },\r\n Success: {\r\n Title: 'bestelling geplaatst',\r\n Message:\r\n 'De betaling is succesvol afgerond en je bestelling met bestelnummer ({{orderNumber}}) is geplaatst.',\r\n },\r\n },\r\n RequiredChoice: 'Verplichte keuze',\r\n SearchProduct: 'Zoek naar een product',\r\n CheckoutForm: {\r\n Success: {\r\n Title: 'Bestelling geplaatst',\r\n Message:\r\n 'Je bestelling met bestelnummer ({{orderNumber}}) is geplaatst.',\r\n },\r\n Fields: {\r\n Remarks: {\r\n Label: 'Opmerkingen (optioneel)',\r\n },\r\n PaymentMethod: {\r\n Label: 'Betaalwijze',\r\n Errors: {\r\n NotAvailable: 'Er zijn geen betaalwijzen beschikbaar.',\r\n },\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Bestellen mislukt',\r\n UNKNOWN: 'Er is een onbekende fout opgetreden.',\r\n INVALID_DELIVERY_TYPE: 'Onbekende aflevermethode ({{deliveryType}})',\r\n INVALID_GATEWAY: 'Ongeldige betaalwijze ({{fateway}})',\r\n },\r\n },\r\n },\r\n Pincode: {\r\n Form: {\r\n Action: 'Pincode instellen',\r\n Fields: {\r\n Pincode: {\r\n Label: 'Pincode',\r\n Errors: {\r\n Required: 'Voer een pincode in.',\r\n MinLength: 'De pincode moet 4 nummers langs zijn.',\r\n Regex:\r\n 'De pincode moet 4 nummers langs zijn en mag alleen uit nummers bestaan.',\r\n },\r\n },\r\n ConfirmPincode: {\r\n Label: 'Bevestig pincode',\r\n Errors: {\r\n Required: 'Bevestig je pincode.',\r\n MinLength: 'De pincode moet 4 nummers langs zijn.',\r\n Regex:\r\n 'De pincode moet 4 nummers langs zijn en mag alleen uit nummers bestaan.',\r\n Equality: 'De bevestig pincode moet gelijk zijn aan de pincode.',\r\n },\r\n },\r\n },\r\n Header: 'Pincode instellen',\r\n },\r\n InvalidMessage: 'De pincode is onjuist',\r\n },\r\n PlacedOrders: {\r\n Header: 'Bestellingen',\r\n NoOrders: 'Je hebt nog geen bestellingen.',\r\n\r\n Table: 'Tafel',\r\n },\r\n PlacedOrderDetails: {\r\n Receipt: 'Kassabon',\r\n Date: 'Datum:',\r\n OrderNumber: 'Ordernummer:',\r\n OrderId: 'Order Id:',\r\n },\r\n QrCode: {\r\n Error: {\r\n Title: 'QR-code fout',\r\n InvalidClientDate:\r\n 'Ongeldige QR-code, controlleer de datum/tijd op je telefoon.',\r\n },\r\n },\r\n QrCodeScanner: {\r\n BleFailed:\r\n '(BLE_FAILED)\\nWe konden niet bepalen of je in de buurt bent, probeer het over 10 seconden nog eens.',\r\n BranchOfficeNotFound:\r\n 'Geen locatie gevonden voor deze QR-code ({{vsamGuid}})',\r\n CameraPermission:\r\n 'De app heeft toegang tot de camera nodig om een QR-code te kunnen scannen.',\r\n NoBleNearby: 'Helaas je bent niet in debuurt van een Locatie.',\r\n InvalidQrCode: 'Ongeldige QR-code',\r\n ScanAgain: 'Opnieuw scannen',\r\n ScanningLocation: 'Locatie controle...',\r\n },\r\n Register: {\r\n Header: 'Account aanmaken',\r\n Form: {\r\n Action: 'Account aanmaken',\r\n ServerErrors: {\r\n Title: 'Account aanmaken mislukt',\r\n USER_EMAIL_NOT_UNIQUE: 'Er bestaat al een account met dit e-mailadres.',\r\n },\r\n },\r\n NameStep: {\r\n Header: 'Hallo! Wat is je naam?',\r\n Info: 'Vul je volledige naam in.',\r\n Field: {\r\n Label: 'Naam',\r\n Errors: {\r\n Required: 'Voer je naam in.',\r\n },\r\n },\r\n },\r\n EmailStep: {\r\n Header: 'Leuk je te ontmoeten {{name}}!',\r\n Info: 'Wat is je e-mailadres?',\r\n Field: {\r\n Label: 'E-mailadres',\r\n Errors: {\r\n Required: 'Voer je e-mailadres in.',\r\n Regex: 'Voer een geldig e-mailadres in.',\r\n },\r\n },\r\n },\r\n PasswordStep: {\r\n Header: 'Kies een wachtwoord',\r\n Info: 'Het wachtwoord moet minimaal 6 karakters lang zijn.',\r\n Field: {\r\n Label: 'Wachtwoord',\r\n Errors: {\r\n Required: 'Voer je wachtwoord in.',\r\n MinLength: 'Het wachtwoord moet minimaal 6 karakters lang zijn.',\r\n },\r\n },\r\n },\r\n TermsStep: {\r\n Header: 'Je bent bijna klaar!',\r\n Field: {\r\n Label: 'Ik ga akkoord met de ',\r\n LinkText: 'Algemene Voorwaarden van {{appName}}',\r\n Errors: {\r\n Required: 'Accepteer de Algemene Voorwaarden.',\r\n },\r\n },\r\n },\r\n ConfirmationSentStep: {\r\n Header: 'Bevestigingsmail verstuurd',\r\n TextPart1: 'Er is een e-mail verzonden met een confirmatielink naar ',\r\n TextPart2:\r\n '\\n\\nKlik op de confirmatielink in de e-mail om de registratie te voltooien.\\n\\nAls u geen bevestigingsmail ontvangt, controleer dan uw spam-map.',\r\n },\r\n },\r\n RegisterConfirm: {\r\n ConfirmSuccess: 'Je account is bevestigd, je kunt nu inloggen.',\r\n Header: 'Account bevestigen.',\r\n GoToLogin: 'Terug naar inloggen',\r\n ServerErrors: {\r\n Title: 'Bevestigen account mislukt',\r\n DATA_NO_RESULT: 'Registratie niet gevonden.',\r\n USER_NO_TEMPDATA: 'Registratie niet gevonden.',\r\n USER_EMAIL_NOT_UNIQUE: 'Er bestaat al een account met dit e-mailadres.',\r\n },\r\n },\r\n ResetPassword: {\r\n Header: 'Wachtwoord resetten',\r\n Info: 'Voer je e-mailadres in en we sturen je een link om je wachtwoord te resetten.',\r\n Form: {\r\n Action: 'Wijzigen',\r\n Fields: {\r\n Password: {\r\n Label: 'Wachtwoord',\r\n Errors: {\r\n Required: 'Voer je nieuwe wachtwoord in.',\r\n MinLength: 'Het wachtwoord moet minimaal 6 karakters lang zijn.',\r\n },\r\n },\r\n ConfirmPassword: {\r\n Label: 'Controle wachtwoord',\r\n Errors: {\r\n Required: 'Voer je controle wachtwoord in.',\r\n Equality:\r\n 'Het controle wachtwoord is niet hetzelfde als het wachtwoord.',\r\n },\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Wachtwoord resetten mislukt',\r\n REQUESTIDENTIFIER_NOT_FOUND:\r\n 'De aanvraag voor het wijzigen van je wachtwoord is niet gevonden.',\r\n REQUESTIDENTIFIER_EXPIRED:\r\n 'De aanvraag voor het wijzigen van je wachtwoord is verlopen.',\r\n REQUESTIDENTIFIER_REVOKED:\r\n 'De aanvraag voor het wijzigen van je wachtwoord is ingetrokken.',\r\n },\r\n Succes:\r\n 'Je wachtwoord is gewijzigd, je kunt nu inloggen met je nieuwe wachtwoord.',\r\n },\r\n },\r\n SavingCardsSummary: {\r\n Header: 'Spaarkaarten overzicht',\r\n NotCompleted: 'Niet compleet',\r\n Completed: 'Compleet',\r\n },\r\n SendMoney: {\r\n Form: {\r\n Action: 'Geld sturen',\r\n SearchAction: 'Zoeken',\r\n AuthenticateAction: '{{amount}} naar {{name}} te sturen.',\r\n ConfirmMessage:\r\n 'Je wilt {{amount}} sturen naar {{name}}. Wil je doorgaan?',\r\n Success: {\r\n Title: 'Geld sturen gelukt',\r\n Message: 'Er is {{amount}} gestuurd naar {{name}}.',\r\n },\r\n Fields: {\r\n Amount: {\r\n Label: 'Bedrag',\r\n Errors: {\r\n Required: 'Voer het bedrag in.',\r\n MinMax: 'Voer een bedrag in tussen {{min}} en {{max}}',\r\n // Min: 'Voer een bedrag van minimaal {{min}}',\r\n // Max: 'Voer een bedrag van maximaal {{max}}',\r\n },\r\n },\r\n Description: {\r\n Label: 'Omschrijving (optioneel) ',\r\n },\r\n OtherWallet: {\r\n Label: 'Account',\r\n Error: 'Selecteer een account.',\r\n },\r\n Search: {\r\n Label: 'Zoeken (e-mailadres, activatiecode)',\r\n Errors: {\r\n Required: 'Voer een e-mailadres of activatiecode in.',\r\n },\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Geld sturen mislukt',\r\n CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED:\r\n 'Deze betaalmethode wordt niet ondersteund.',\r\n USER_NOT_FOUND: 'Geen account gevonden.',\r\n LOYALTYWALLET_SENDMONEY_SAME_USER:\r\n 'Je kunt geen geld naar jezelf sturen.',\r\n },\r\n },\r\n Header: 'Geld sturen',\r\n MaxBalance0: 'Je kunt maximaal ',\r\n MaxBalance1: ' sturen naar een ander account.',\r\n Tabs: {\r\n ChildWallet: 'Account',\r\n SearchWallet: 'Zoeken',\r\n },\r\n },\r\n SetDescriptionModal: {\r\n Form: {\r\n Action: 'Wijzigen',\r\n DescriptionField: {\r\n Label: 'Omschrijving',\r\n Errors: {\r\n Required: 'Voer een omschrijving in.',\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Wijzigen omshcrijving mislukt.',\r\n },\r\n },\r\n Title: 'Omschrijving wijzigen',\r\n },\r\n Tokens: {\r\n Header: 'Kaarten',\r\n Activated: 'Geactiveerd',\r\n NoTokens: 'Je hebt nog geen kaarten.',\r\n ValidThru: 'Geldig tot',\r\n TokenState: {\r\n Active: 'Actief',\r\n Blocked: 'Geblokkeerd',\r\n Expired: 'Verlopen',\r\n },\r\n TokenMenu: {\r\n BlockTokenAction: {\r\n Title: 'Blokkeer kaart',\r\n Confirm:\r\n 'Weet je zeker dat je deze kaart ({{activationCode}}) wilt blokkeren?',\r\n Succes: 'Kaart ({{activationCode}}) is geblokkeerd',\r\n },\r\n UnblockTokenAction: {\r\n Title: 'Deblokkeer kaart',\r\n Confirm:\r\n 'Weet je zeker dat je deze kaart ({{activationCode}}) wilt deblokkeren?',\r\n Succes: 'Kaart ({{activationCode}}) is gedeblokkeerd',\r\n },\r\n SwitchUserAction: {\r\n Title: 'Eigenaar veranderen',\r\n Confirm:\r\n 'Weet je zeker dat je deze kaart ({{activationCode}}) wilt toewijzen aan {{name}}?',\r\n Succes: 'Kaart ({{activationCode}}) is toegewezen aan {{name}}',\r\n },\r\n },\r\n\r\n TokenBlockSuccess: 'Kaart is geblokkeerd',\r\n TokenUnblockSuccess: 'Kaart is gedeblokkeerd',\r\n },\r\n UserCouponsSummary: {\r\n NotRedeemed: 'Niet ingeleverd',\r\n Redeemed: 'Ingeleverd',\r\n },\r\n UserMenu: {\r\n Account: {\r\n Switch: 'Wallet wisselen',\r\n Add: 'Wallet toevoegen',\r\n AddSubText: 'Bijvoorbeeld voor uw kind.',\r\n Manage: 'Wallet beheren',\r\n Delete: 'Wallet verwijderen',\r\n },\r\n ResetPincode: 'Reset pincode',\r\n ResetPincodeConfirm: 'Weet je zeker dat je de pincode wilt resetten?',\r\n Logoff: 'Afmelden',\r\n },\r\n WalletDetails: {\r\n AutomaticCharge: 'Automatisch Opwaarderen',\r\n Charge: 'Opwaarderen',\r\n NoTransactions: 'Je hebt nog geen transacties.',\r\n NoTransactionItems: 'Er is geen extra transactie data.',\r\n ReportModal: {\r\n Header: 'Exporteer de transacties in een periode.',\r\n Fields: {\r\n FromDate: {\r\n Label: 'Begindatum',\r\n Errors: {\r\n Required: 'Selecteer de begindatum',\r\n },\r\n },\r\n TillDate: {\r\n Label: 'Tot en met',\r\n Errors: {\r\n Required: 'Selecteer de tot en met datum',\r\n Equality: 'De tot en met datum moet groter zijn dan de begindatum',\r\n },\r\n },\r\n },\r\n },\r\n SendMoney: 'Geld sturen',\r\n Settings: 'Instellingen',\r\n Withdraw: 'Terugboeken',\r\n Transactions: 'Transacties',\r\n },\r\n Withdraw: {\r\n Form: {\r\n Action: 'Terugboeken',\r\n AuthenticateAction: '{{amountWithoutCosts}} terug te boeken.',\r\n ConfirmMessage:\r\n 'Je wilt {{amount}} terugboeken. ' +\r\n 'De kosten voor het terugboeken bedragen {{transactionCosts}}.\\n\\n' +\r\n 'Er zal {{amountWithoutCosts}} teruggeboekt worden.\\n\\n' +\r\n 'Wil je doorgaan?',\r\n Success: {\r\n Title: 'Terugboeken gelukt',\r\n Message: 'Er zal {{amountWithoutCosts}} teruggestort worden.',\r\n },\r\n ChargeCostsMessage: 'De kosten voor het terugboeken bedragen ',\r\n AutomaticChargeCanceledMessage:\r\n 'Je hebt nog openstaande storneringen voor {{currencyName}}, daarom kun je op dit moment geen geld terugboeken.',\r\n Fields: {\r\n Amount: {\r\n Label: 'Bedrag',\r\n Errors: {\r\n Required: 'Voer het bedrag in.',\r\n MinMax: 'Voer een bedrag in tussen {{min}} en {{max}}',\r\n },\r\n },\r\n Iban: {\r\n Label: 'Rekeningnummer (IBAN)',\r\n Errors: {\r\n Required: 'Voer je rekeningnummer in.',\r\n },\r\n },\r\n Name: {\r\n Label: 'Naam rekeninghouder ',\r\n Errors: {\r\n Required: 'Voer je IBAN in.',\r\n },\r\n },\r\n },\r\n ServerErrors: {\r\n Title: 'Terugboeken mislukt',\r\n CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED:\r\n 'Deze betaalmethode wordt niet ondersteund.',\r\n },\r\n },\r\n Header: 'Terugboeken',\r\n MaxBalance0: 'Je kunt maximaal ',\r\n MaxBalance1: ' terugboeken.',\r\n },\r\n}\r\n","export default {\r\n Account: {\r\n Header: 'Wallet',\r\n ChangeName: 'Change name',\r\n ChangeEmail: 'Change email',\r\n ChangePassword: 'Change password',\r\n SetProfilePicture: 'Set profile picture',\r\n PictureModal: {TakePicture: 'Foto nemen', ChoosePicture: 'Foto kiezen'},\r\n },\r\n AutomaticCharge: {\r\n Buttons: {\r\n Create: 'Enable automatic top up',\r\n EditAmount: 'Change amount',\r\n EditBank: 'Change bank info',\r\n TurnOff: 'Turn off',\r\n },\r\n Form: {\r\n Action: 'Enable Automatic top up',\r\n Title: 'Automatic top up for {{currencyName}}',\r\n AuthenticateAction: 'To enable automatic top up.',\r\n ConfirmTurnOff:\r\n 'Are you sure you want to turn off automatic top up for {{currencyName}}?',\r\n CreateMessage: {\r\n Title: 'Enabling automatic top up',\r\n Message:\r\n 'It can take a couple of minutes before this setting is enabled.',\r\n },\r\n TurnOffMessage: {\r\n Title: 'Automatic top up',\r\n Message: 'Automatic top up has been turned off.',\r\n },\r\n EditMessage: {\r\n Title: 'Automatic top up',\r\n Message: 'The changes are saved.',\r\n },\r\n ChargeCostsMessage: 'The cost to automatic top up are',\r\n Fields: {\r\n Amount: {\r\n Label: 'Topup amount',\r\n },\r\n WeeksAmount: {\r\n Label: 'Topup steps each week',\r\n },\r\n Initials: {\r\n Label: 'Initials',\r\n },\r\n Surname: {\r\n Label: 'Surname',\r\n Errors: {\r\n Required: 'Enter your surname.',\r\n },\r\n },\r\n Email: {\r\n Label: 'Email address',\r\n Errors: {\r\n Required: 'Enter your email address.',\r\n },\r\n },\r\n Phone: {\r\n Label: 'PhoneNumber',\r\n Errors: {\r\n Required: 'Enter your phonenumber.',\r\n },\r\n },\r\n City: {\r\n Label: 'City',\r\n Errors: {\r\n Required: 'Enter your city.',\r\n },\r\n },\r\n Street: {\r\n Label: 'Street name',\r\n Errors: {\r\n Required: 'Enter your street name.',\r\n },\r\n },\r\n StreetNumber: {\r\n Label: 'Street number',\r\n Errors: {\r\n Required: 'Enter your street number.',\r\n },\r\n },\r\n Zipcode: {\r\n Label: 'Zipcode',\r\n Errors: {\r\n Required: 'Enter your zipcode.',\r\n },\r\n },\r\n SelectedBank: {\r\n Label: 'Bank',\r\n EmptyText: '(null)\r\n\r\n const {inputContainer, labelStyle} = Style\r\n const {\r\n name,\r\n label,\r\n control,\r\n validation,\r\n inputProps,\r\n autofocus,\r\n multiline,\r\n numberOfLines,\r\n onTextChange,\r\n } = props\r\n useEffect(() => {\r\n if (autofocus) {\r\n inputRef.current.input.focus()\r\n }\r\n }, [null])\r\n\r\n const [secureTextEntryState, setSecureTextEntryState] = useState(\r\n inputProps?.secureTextEntry !== undefined\r\n ? inputProps?.secureTextEntry\r\n : false,\r\n )\r\n\r\n const rules = validation !== undefined ? validation.rules : {}\r\n //const errors = validation !== undefined ? validation.errors : {}\r\n const errorsMessage =\r\n validation !== undefined && validation.errors[name] !== undefined\r\n ? validation.errors[name].message\r\n : undefined\r\n\r\n const defaultValue =\r\n validation !== undefined && validation.defaultValue !== undefined\r\n ? validation.defaultValue\r\n : ''\r\n\r\n const renderPasswordToggle = () => {\r\n const {rightContainer, centerXY} = Style\r\n if (inputProps?.secureTextEntry !== undefined) {\r\n const iconColor = !secureTextEntryState ? colors.main : colors.lightGrey\r\n return (\r\n \r\n {\r\n setSecureTextEntryState(!secureTextEntryState)\r\n }}>\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return null\r\n }\r\n\r\n return (\r\n {\r\n return (\r\n \r\n {\r\n onChange(value)\r\n\r\n if (onTextChange) {\r\n onTextChange(value)\r\n }\r\n }}\r\n {...inputProps}\r\n secureTextEntry={secureTextEntryState}\r\n multiline={multiline}\r\n numberOfLines={numberOfLines}\r\n />\r\n {renderPasswordToggle()}\r\n \r\n )\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport default MyInput\r\n","import React from 'react'\r\nimport {TextStyle, Text, View} from 'react-native'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n style?: TextStyle\r\n}\r\n\r\nconst FormInfo: React.FC = ({children, style}) => {\r\n return {children}\r\n}\r\n\r\nexport default FormInfo\r\n","import React from 'react'\r\nimport {Button, ButtonProps} from 'react-native-elements'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport {defaultFontWeight, boldFontWeight} from '../../Style'\r\nexport interface IMyButtonProps extends ButtonProps {\r\n isLoading?: boolean\r\n isBold?: boolean\r\n}\r\n\r\nconst MyButton: React.FC = ({\r\n isLoading,\r\n isBold,\r\n ...otherProps\r\n}) => {\r\n const disabled = isLoading || otherProps.disabled\r\n\r\n const fontWeight = isBold ? boldFontWeight : defaultFontWeight\r\n if (otherProps.type === 'outline') {\r\n otherProps.buttonStyle = [\r\n otherProps.buttonStyle,\r\n {\r\n borderColor: AppConfig.Tenant.MainColorDark,\r\n },\r\n ]\r\n\r\n otherProps.titleStyle = {\r\n ...fontWeight,\r\n color: AppConfig.Tenant.MainColorDark,\r\n }\r\n }\r\n\r\n if (otherProps.type === 'solid') {\r\n otherProps.titleStyle = [\r\n otherProps.titleStyle,\r\n {\r\n ...fontWeight,\r\n },\r\n ]\r\n }\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default MyButton\r\n\r\nMyButton.defaultProps = {\r\n isBold: true,\r\n type: 'solid',\r\n}\r\n","import React from 'react'\r\nimport {TextStyle} from 'react-native'\r\nimport {Icon} from 'react-native-elements'\r\nimport {AlertType} from '../../Models/Client/ErrorHandling/AlertType'\r\nimport {colors, sizes} from '../../Style'\r\ninterface IProps {\r\n type?: AlertType\r\n}\r\n\r\nconst MyAlertIcon: React.FC = ({type}) => {\r\n const iconStyle: TextStyle = {\r\n fontSize: 50,\r\n marginBottom: sizes.padding.md,\r\n }\r\n\r\n const myType = type || 'error'\r\n\r\n switch (myType) {\r\n case 'warning':\r\n return (\r\n \r\n )\r\n case 'error':\r\n return (\r\n \r\n )\r\n case 'success':\r\n default:\r\n return (\r\n \r\n )\r\n break\r\n }\r\n}\r\n\r\nexport default MyAlertIcon\r\n","import React from 'react'\r\nimport {View} from 'react-native'\r\nimport {colors, sizes} from '../../Style'\r\n\r\ninterface IProps {\r\n isGreyBackground?: boolean\r\n centerContent?: boolean\r\n paddingBottom?: boolean\r\n}\r\n\r\nconst MyFooter: React.FC = ({\r\n children,\r\n isGreyBackground,\r\n centerContent,\r\n paddingBottom,\r\n}) => {\r\n const backgroundColor = isGreyBackground ? colors.containerBg : '#fff'\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default MyFooter\r\n\r\nMyFooter.defaultProps = {\r\n isGreyBackground: false,\r\n centerContent: false,\r\n paddingBottom: true,\r\n}\r\n","import React from 'react'\r\nimport {View, ViewStyle} from 'react-native'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n isLast?: boolean\r\n horizontal?: boolean\r\n}\r\n\r\nconst MyFooterTile: React.FC = ({children, isLast, horizontal}) => {\r\n const style: ViewStyle[] = [Style.flex1]\r\n if (!isLast) {\r\n style.push({marginRight: 10})\r\n }\r\n\r\n if (horizontal) {\r\n style.push({flexDirection: 'row', alignItems: 'center'})\r\n }\r\n\r\n return {children}\r\n}\r\n\r\nexport default MyFooterTile\r\n\r\nMyFooterTile.defaultProps = {\r\n isLast: false,\r\n horizontal: false,\r\n}\r\n","import {ErrorMessage} from '@hookform/error-message'\r\n\r\nimport React, {PropsWithChildren} from 'react'\r\nimport {Controller} from 'react-hook-form'\r\nimport {Text, View} from 'react-native'\r\nimport {CheckBox} from 'react-native-elements'\r\nimport Style, {sizes} from '../../Style'\r\ninterface IProps {\r\n name: keyof T\r\n control: any\r\n validation?: {\r\n errors: any\r\n rules: any\r\n defaultValue?: string | boolean\r\n }\r\n formObject: T\r\n}\r\n\r\nconst MyCheckBox = (\r\n props: PropsWithChildren>,\r\n) => {\r\n const {name, control, validation, children} = props\r\n const rules = validation !== undefined ? validation.rules : {}\r\n const errors = validation !== undefined ? validation.errors : {}\r\n const defaultValue =\r\n validation !== undefined && validation.defaultValue !== undefined\r\n ? validation.defaultValue\r\n : false\r\n\r\n const {errorMessage} = Style\r\n\r\n return (\r\n <>\r\n {\r\n return (\r\n \r\n onChange(!value)}\r\n checked={value}\r\n />\r\n \r\n {children}\r\n (\r\n {message}\r\n )}\r\n />\r\n \r\n \r\n )\r\n }}\r\n name={name.toString()}\r\n rules={rules}\r\n defaultValue={defaultValue}\r\n />\r\n {/* {message}}\r\n /> */}\r\n \r\n )\r\n}\r\n\r\nexport default MyCheckBox\r\n","import React, {CSSProperties} from 'react'\r\ninterface IProps {\r\n transparent?: boolean\r\n visible?: boolean\r\n}\r\n\r\nconst MyWebModal: React.FC = ({children, transparent, visible}) => {\r\n let style = {...myStyle}\r\n style.backgroundColor = transparent ? 'transparent' : '#ffffff'\r\n\r\n if (!visible) {\r\n return null\r\n }\r\n\r\n return (\r\n {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n }}>\r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default MyWebModal\r\n\r\nMyWebModal.defaultProps = {\r\n transparent: false,\r\n visible: true,\r\n}\r\n\r\n//backdrop\r\nconst myStyle: CSSProperties = {\r\n position: 'absolute',\r\n top: 0,\r\n right: 0,\r\n bottom: 0,\r\n left: 0,\r\n zIndex: 9999,\r\n}\r\n","import React, {useState} from 'react'\r\nimport {\r\n Modal as ModalRN,\r\n Platform,\r\n Pressable,\r\n View,\r\n ViewStyle,\r\n ScrollView,\r\n StyleProp,\r\n} from 'react-native'\r\nimport {Card, Text} from 'react-native-elements'\r\n\r\nimport Style, {deviceHeight, sizes} from '../../Style'\r\nimport MyWebModal from './MyWebModal'\r\n\r\nexport interface IMyModalProps {\r\n visible: boolean\r\n onClose: () => void\r\n closeOnBackPress?: boolean\r\n position?: 'top' | 'center' | 'bottom'\r\n title?: string\r\n useParentWidth?: boolean\r\n}\r\n\r\nconst MyModal: React.FC = ({\r\n visible,\r\n closeOnBackPress,\r\n onClose,\r\n children,\r\n position,\r\n title,\r\n useParentWidth,\r\n}) => {\r\n const {modalBackdrop, modalCard, flex1} = Style\r\n\r\n const [width, setWidth] = useState(0)\r\n\r\n if (!visible) {\r\n return null\r\n }\r\n\r\n const renderTitle = () => {\r\n if (title === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n {title}\r\n \r\n \r\n )\r\n }\r\n\r\n const renderModalContent = () => {\r\n let positionStyle: ViewStyle = {justifyContent: 'flex-end'}\r\n switch (position) {\r\n case 'top':\r\n positionStyle = {justifyContent: 'flex-start'}\r\n break\r\n case 'center':\r\n positionStyle = {justifyContent: 'center'}\r\n break\r\n\r\n case 'bottom':\r\n default:\r\n positionStyle = {\r\n justifyContent: 'flex-end',\r\n }\r\n break\r\n }\r\n\r\n positionStyle.alignItems = 'center'\r\n\r\n const renderModalCard = () => {\r\n //when used in Myselect , use parent (form ) width\r\n const cardStyle: StyleProp = useParentWidth\r\n ? [modalCard, {width}]\r\n : modalCard\r\n\r\n return (\r\n {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n }}>\r\n \r\n {renderTitle()}\r\n {children}\r\n \r\n \r\n )\r\n }\r\n\r\n if (closeOnBackPress) {\r\n return (\r\n {\r\n onClose()\r\n }}\r\n style={[modalBackdrop, flex1, positionStyle]}\r\n onLayout={(e) => {\r\n setWidth(e.nativeEvent.layout.width - 2 * sizes.padding.md)\r\n }}>\r\n {renderModalCard()}\r\n \r\n )\r\n }\r\n\r\n return (\r\n {\r\n setWidth(e.nativeEvent.layout.width - 2 * sizes.padding.md)\r\n }}>\r\n {renderModalCard()}\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {renderModalContent()}\r\n \r\n )\r\n}\r\n\r\nexport default MyModal\r\n\r\nMyModal.defaultProps = {\r\n closeOnBackPress: false,\r\n position: 'bottom',\r\n useParentWidth: false,\r\n}\r\n","export enum AutomaticChargeStatusTypesDTO {\r\n Off = 1,\r\n Pending = 2,\r\n Denied = 3,\r\n Blocked = 4,\r\n EnabledWithVerification = 5,\r\n EnabledWithoutVerification = 6,\r\n Initial = 7,\r\n}\r\n","import React, {PropsWithChildren, ReactNode, useState} from 'react'\r\nimport {TouchableOpacity, View} from 'react-native'\r\nimport Style, {colors, sizes} from '../../Style'\r\n\r\nimport {ErrorMessage} from '@hookform/error-message'\r\nimport {Controller} from 'react-hook-form'\r\nimport {Icon, ListItem, Text} from 'react-native-elements'\r\nimport MyModal from '../Modal/MyModal'\r\nimport {MyListItem} from '..'\r\n\r\ninterface IProps {\r\n name?: keyof T\r\n control?: any\r\n validation?: {\r\n errors: any\r\n rules: any\r\n defaultValue?: string\r\n }\r\n formObject?: T\r\n\r\n label: string\r\n noItemSelectedText?: string\r\n onSelect: (option: any) => void\r\n selectedOption?: any\r\n options: any[]\r\n isItemSelected: (a: any, b: any) => boolean\r\n renderListItem: (rowData: any, isHighLighted: boolean) => ReactNode\r\n modalPosition?: 'top' | 'center' | 'bottom'\r\n}\r\n\r\nconst MySelectList = (\r\n props: PropsWithChildren>,\r\n) => {\r\n const {\r\n control,\r\n children,\r\n label,\r\n options,\r\n onSelect,\r\n renderListItem,\r\n selectedOption,\r\n isItemSelected,\r\n noItemSelectedText,\r\n validation,\r\n name,\r\n modalPosition,\r\n ...otherProps\r\n } = props\r\n\r\n const [isModalVisible, setIsModalVisible] = useState(false)\r\n\r\n const {labelStyle, errorMessage} = Style\r\n\r\n const renderRows = (onChange?: (...event: any[]) => void) => {\r\n if (options.length === 0) {\r\n return null\r\n }\r\n\r\n return options.map((option, key) => {\r\n return (\r\n {\r\n onSelect(option)\r\n setIsModalVisible(false)\r\n if (onChange) {\r\n onChange(option)\r\n }\r\n }}\r\n bottomDivider>\r\n {renderListItem(option, isItemSelected(selectedOption, option))}\r\n \r\n )\r\n })\r\n }\r\n\r\n const renderNoSelectedItem = () => {\r\n if (noItemSelectedText === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n {\r\n setIsModalVisible(true)\r\n }}>\r\n \r\n {noItemSelectedText}\r\n \r\n )\r\n }\r\n\r\n const renderSelectedItem = () => {\r\n if (selectedOption === undefined) {\r\n return renderNoSelectedItem()\r\n }\r\n\r\n return (\r\n {\r\n setIsModalVisible(true)\r\n }}>\r\n \r\n {renderListItem(selectedOption, false)}\r\n \r\n )\r\n }\r\n\r\n const renderSelectItemsModal = (onChange?: any) => {\r\n return (\r\n setIsModalVisible(false)}\r\n closeOnBackPress\r\n visible={isModalVisible}\r\n position={modalPosition}\r\n useParentWidth\r\n {...otherProps}>\r\n {renderRows(onChange)}\r\n \r\n )\r\n }\r\n\r\n const renderWithValidation = () => {\r\n const rules = validation !== undefined ? validation.rules : {}\r\n const errors = validation !== undefined ? validation.errors : {}\r\n\r\n const myName = name === undefined ? '' : name.toString()\r\n\r\n return (\r\n {\r\n return (\r\n <>\r\n \r\n {label}\r\n {renderSelectedItem()}\r\n (\r\n \r\n {message}\r\n \r\n )}\r\n />\r\n \r\n {renderSelectItemsModal(onChange)}\r\n {/* setIsModalVisible(false)}\r\n renderRows={() => {\r\n return renderRows(onChange)\r\n }}\r\n isVisible={isModalVisible}\r\n {...otherProps}\r\n /> */}\r\n \r\n )\r\n }}\r\n />\r\n )\r\n }\r\n\r\n if (control !== undefined) {\r\n return renderWithValidation()\r\n }\r\n\r\n //no validation\r\n return (\r\n <>\r\n \r\n {label}\r\n {renderSelectedItem()}\r\n \r\n {renderSelectItemsModal()}\r\n \r\n )\r\n}\r\n\r\nexport default MySelectList\r\n","import {ErrorMessage} from '@hookform/error-message'\r\nimport React, {PropsWithChildren, useEffect, useState} from 'react'\r\nimport {Controller} from 'react-hook-form'\r\nimport {Platform, StyleSheet, View} from 'react-native'\r\nimport {Input, Text} from 'react-native-elements'\r\nimport Style, {colors, sizes} from '../../Style'\r\n\r\ninterface IProps {\r\n label: string\r\n name: keyof T\r\n control: any\r\n validation?: {\r\n errors: any\r\n rules: any\r\n defaultValue?: string\r\n }\r\n formObject: T\r\n\r\n onSubmitEditing: () => void\r\n}\r\n\r\nconst EuroTextInput = (\r\n props: PropsWithChildren>,\r\n) => {\r\n const [textAmount, setTextAmount] = useState('')\r\n\r\n const euroTextToCents = (text: string) => {\r\n text = text.trim()\r\n\r\n let intval = 0\r\n\r\n if (text !== undefined && text != '') {\r\n intval = parseFloat(text.replace(',', '.'))\r\n }\r\n\r\n const cents = intval * 100\r\n //https://stackoverflow.com/questions/34077449/fastest-way-to-cast-a-float-to-an-int-in-javascript\r\n return ~~cents //remove float\r\n }\r\n const {\r\n name,\r\n label,\r\n control,\r\n validation,\r\n\r\n onSubmitEditing,\r\n } = props\r\n\r\n useEffect(() => {\r\n // euroRef.current?.focus()\r\n\r\n const {getValues} = control\r\n const defaultValue = getValues(name)\r\n\r\n if (defaultValue !== undefined && defaultValue !== '') {\r\n const euroText = (defaultValue / 100).toString().replace('.', ',')\r\n setTextAmount(euroText)\r\n }\r\n }, [null])\r\n\r\n const rules = validation !== undefined ? validation.rules : {}\r\n\r\n const errorsMessage =\r\n validation !== undefined && validation.errors[name] !== undefined\r\n ? validation.errors[name].message\r\n : undefined\r\n const defaultValue =\r\n validation !== undefined && validation.defaultValue !== undefined\r\n ? validation.defaultValue\r\n : ''\r\n\r\n const {labelStyle, inputContainer} = Style\r\n\r\n return (\r\n <>\r\n {\r\n return (\r\n <>\r\n \r\n {\r\n if (/^([0-9]{1,})*([\\,\\.]{0,1})(\\d{1,2})?$/.test(text)) {\r\n //text = text.replace('.', ',')\r\n setTextAmount(text)\r\n const cents = euroTextToCents(text)\r\n onChange(cents)\r\n }\r\n }}\r\n onSubmitEditing={() => {\r\n onSubmitEditing()\r\n }}\r\n maxLength={6}\r\n style={styles.euroInput}\r\n inputContainerStyle={inputContainer}\r\n containerStyle={{paddingHorizontal: 0}}\r\n labelStyle={labelStyle}\r\n label={label}\r\n errorMessage={errorsMessage}\r\n />\r\n €\r\n \r\n \r\n )\r\n }}\r\n name={name.toString()}\r\n rules={rules}\r\n defaultValue={defaultValue}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default EuroTextInput\r\n\r\nconst styles = StyleSheet.create({\r\n euroIconText: {\r\n position: 'absolute',\r\n fontSize: 18,\r\n top: Platform.OS === 'android' ? 38 : 34,\r\n },\r\n euroInput: {\r\n paddingLeft: 20,\r\n },\r\n})\r\n","import {max} from 'date-fns'\r\nimport React, {PropsWithChildren} from 'react'\r\nimport {Controller} from 'react-hook-form'\r\nimport {Text, View} from 'react-native'\r\nimport {Slider} from 'react-native-elements'\r\nimport Style, {colors, sizes} from '../../Style'\r\n\r\ninterface IProps {\r\n name: keyof T\r\n control: any\r\n label: string\r\n defaultValue?: number\r\n formObject: T\r\n maximumValue?: number\r\n minimumValue?: number\r\n step?: number\r\n\r\n formatValue?: (value: number) => string\r\n onSlideChange?: (value: number) => void\r\n}\r\n\r\nconst MySlider = (\r\n props: PropsWithChildren>,\r\n) => {\r\n const {\r\n name,\r\n control,\r\n label,\r\n defaultValue,\r\n minimumValue,\r\n maximumValue,\r\n step,\r\n formatValue,\r\n onSlideChange,\r\n } = props\r\n const {labelStyle, flexRow, justifySpaceBetween} = Style\r\n\r\n return (\r\n <>\r\n {\r\n const getFormattedValue = (value: number): string => {\r\n if (formatValue === undefined) {\r\n return value.toString()\r\n }\r\n\r\n return formatValue(value)\r\n }\r\n\r\n return (\r\n \r\n \r\n {label}\r\n {getFormattedValue(value)}\r\n \r\n \r\n {\r\n onChange(value)\r\n\r\n if (onSlideChange) {\r\n onSlideChange(value)\r\n }\r\n }}\r\n minimumTrackTintColor={colors.main}\r\n thumbStyle={{\r\n height: 30,\r\n width: 30,\r\n backgroundColor: colors.main,\r\n }}\r\n maximumValue={maximumValue}\r\n minimumValue={minimumValue}\r\n step={step}\r\n />\r\n \r\n \r\n )\r\n }}\r\n name={name.toString()}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default MySlider\r\n","import React from 'react'\r\nimport {Keyboard, View} from 'react-native'\r\nimport Style, {sizes} from '../../Style'\r\nimport MyModal from './MyModal'\r\nimport {appUiStore} from '../../Mobx/AppUiStore'\r\nimport MyButton from '../Buttons/MyButton'\r\nimport i18n from '../../i18n'\r\nimport {Card, Text} from 'react-native-elements'\r\nimport {observer} from 'mobx-react'\r\nimport I18n from 'i18n-js'\r\n//import {MyFooter, MyFooterTile} from '..'\r\nimport {goBack} from '../../Helpers/NavigationHelper'\r\nimport MyFooter from '../Form/MyFooter'\r\nimport MyFooterTile from '../Form/MyFooterTile'\r\nimport Content from '../Layout/Content'\r\ninterface IProps {}\r\n\r\nconst ConfirmModal: React.FC = ({children}) => {\r\n const {ConfirmMessage} = appUiStore\r\n\r\n const visible = ConfirmMessage !== undefined\r\n const {modalMessage} = Style\r\n if (ConfirmMessage === undefined) {\r\n return null\r\n }\r\n return (\r\n {\r\n appUiStore.CloseConfirm()\r\n }}>\r\n \r\n {ConfirmMessage.Message}\r\n \r\n {ConfirmMessage.AdditionalText && (\r\n \r\n {ConfirmMessage.AdditionalText}\r\n \r\n )}\r\n {/* {ConfirmMessage.Message} */}\r\n \r\n \r\n {\r\n appUiStore.CloseConfirm()\r\n }}\r\n style={{marginRight: sizes.padding.sm}}\r\n title={i18n.t('Common.Cancel')}\r\n />\r\n \r\n \r\n {\r\n ConfirmMessage.onOk()\r\n appUiStore.CloseConfirm()\r\n }}\r\n title={i18n.t('Common.Ok')}\r\n />\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(ConfirmModal)\r\n","import React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {Text} from 'react-native'\r\nimport {Card} from 'react-native-elements'\r\nimport i18n from '../../../../i18n'\r\nimport {persistedStore} from '../../../../Mobx'\r\nimport Style, {sizes} from '../../../../Style'\r\nimport MyButton from '../../../Buttons/MyButton'\r\nimport MyFooter from '../../../Form/MyFooter'\r\nimport MyFooterTile from '../../../Form/MyFooterTile'\r\nimport MyInput from '../../../Form/MyInput'\r\nimport MyModal from '../../MyModal'\r\n\r\ninterface IProps {\r\n onClose: () => void\r\n onValidPin: () => void\r\n pinMessage: string\r\n}\r\n\r\ntype FormData = {\r\n pincode: string\r\n confirmPincode: string\r\n}\r\n\r\nconst CheckPincodeModal: React.FC = ({\r\n onClose,\r\n onValidPin,\r\n pinMessage,\r\n}) => {\r\n useEffect(() => {\r\n if (!persistedStore.UsePincode) {\r\n //adminused automaticLogin, do not use Pincode modal\r\n onValidPin()\r\n }\r\n }, [null])\r\n\r\n if (!persistedStore.UsePincode) {\r\n return null\r\n }\r\n\r\n const {control, handleSubmit, errors} = useForm()\r\n\r\n const onSubmit = (data: FormData) => {\r\n onValidPin()\r\n onClose()\r\n }\r\n\r\n const {pincodeStyle} = Style\r\n return (\r\n \r\n {i18n.t('AuthenticateAction.Title')}\r\n {/* */}\r\n \r\n {pinMessage}\r\n \r\n handleSubmit((data) => onSubmit(data))(),\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t('Pincode.Form.Fields.Pincode.Errors.Required'),\r\n validate: {\r\n checkPincode: (pincode: string) => {\r\n return (\r\n persistedStore.Pincode === pincode ||\r\n i18n.t('Pincode.InvalidMessage')\r\n )\r\n },\r\n },\r\n },\r\n }}\r\n />\r\n {/* */}\r\n \r\n \r\n {\r\n onClose()\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default CheckPincodeModal\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\n//import {ShowToast} from '../../../Helpers/UiHelpers'\r\nimport I18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport CheckPincodeModal from './Pincode/CheckPincodeModal'\r\ninterface IProps {}\r\n\r\nconst AuthenticateModal: React.FC = ({children}) => {\r\n const {AuthenticateAction} = appUiStore\r\n\r\n if (AuthenticateAction === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n appUiStore.CloseAuthenticateConfirm()}\r\n onValidPin={() => AuthenticateAction.OnOk()}\r\n pinMessage={I18n.t('AuthenticateAction.Pin', {\r\n message: AuthenticateAction.Message,\r\n })}\r\n />\r\n )\r\n}\r\n\r\nexport default observer(AuthenticateModal)\r\n","import React from 'react'\r\nimport {View} from 'react-native'\r\nimport {Card, Text} from 'react-native-elements'\r\nimport I18n from '../../i18n'\r\nimport Style from '../../Style'\r\nimport MyButton from '../Buttons/MyButton'\r\nimport MyFooter from '../Form/MyFooter'\r\nimport MyFooterTile from '../Form/MyFooterTile'\r\nimport MyModal from './MyModal'\r\n// import Style from '../../Styles/Style'\r\n// import ToprButton from '../Topr/ToprButton'\r\n// import ToprModal from './ToprModal'\r\nimport {observer} from 'mobx-react'\r\nimport {appUiStore} from '../../Mobx/AppUiStore'\r\nimport MyAlertIcon from '../Form/MyAlertIcon'\r\n\r\ninterface IProps {\r\n //alert?: IAlertMessage\r\n //closeClicked: () => void\r\n}\r\n\r\nconst AlertModal: React.FC = () => {\r\n const {AlertMessage} = appUiStore\r\n\r\n if (AlertMessage === undefined) {\r\n return null\r\n }\r\n\r\n const {alignItemsCenter, textCenter} = Style\r\n\r\n const close = () => {\r\n appUiStore.CloseAlert()\r\n if (AlertMessage.additionalCloseAction) {\r\n AlertMessage.additionalCloseAction()\r\n }\r\n }\r\n\r\n return (\r\n \r\n {AlertMessage.title}\r\n \r\n \r\n {AlertMessage.message}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(AlertModal)\r\n","import {AppLinkTypes} from '../Enums'\r\nexport class AppLink {\r\n public Url: string\r\n public Parameters: string[] = []\r\n public DeepLink: AppLinkTypes\r\n\r\n constructor(url: string, deepLink: AppLinkTypes) {\r\n this.Url = url\r\n this.DeepLink = deepLink\r\n }\r\n}\r\n","import {AppLinkTypes} from '../Enums'\r\nimport {AppLink} from './AppLink'\r\n\r\n//AppReturnUrl: `https://www.toprwallet.nl/${AppLinks.ConfirmPaymentOrder.Controller}/${AppLinks.ConfirmPaymentOrder.Action}`,\r\n\r\n//applinks hebben minimaal controller/action/:optionalpar1/:optionalpar2\r\nconst AppLinks = [\r\n new AppLink('register/confirm', AppLinkTypes.RegisterConfirm),\r\n new AppLink('email/confirmChange', AppLinkTypes.ConfirmChangeEmail),\r\n new AppLink('user/resetPassword', AppLinkTypes.ResetPassword),\r\n\r\n //applinks met een id parameter {0}\r\n new AppLink('wallet/details/{0}/emandateResult', AppLinkTypes.EMandateResult),\r\n new AppLink(\r\n 'wallet/details/{0}/confirmPaymentOrder',\r\n AppLinkTypes.ConfirmPaymentOrder,\r\n ),\r\n]\r\n\r\n//wallet/details/:currencyGuid/:action/:status\r\n//wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/emandateResult/status\r\n//wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/confirmPaymentOrder/status\r\n\r\n//wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/confirmPaymentOrder/PAYMENT_CANCELED\r\n\r\nexport default AppLinks\r\n\r\n// export const getAppLink = (url: string) => {\r\n// return AppLinks.find(\r\n// (appLink) => appLink.Url.toLowerCase() === url.toLowerCase(),\r\n// )\r\n// }\r\n\r\nexport const getAppLinkByType = (deeplink: AppLinkTypes) => {\r\n return AppLinks.find((appLink) => appLink.DeepLink === deeplink)\r\n}\r\n","import AppConfig from '../Config/AppConfig'\r\n\r\nimport * as Linking from 'expo-linking'\r\nimport {AppLinkTypes} from '../Models/Client/Enums'\r\nimport {AppLink} from '../Models/Client/AppLinks/AppLink'\r\nimport {myLog} from '../Services/Client/LogService'\r\nimport Url from 'url-parse'\r\nimport {Platform} from 'react-native'\r\nimport AppLinks, {\r\n //getAppLink,\r\n getAppLinkByType,\r\n} from '../Models/Client/AppLinks/AppLinks'\r\nimport {primaryLanguage} from '../i18n'\r\n\r\nexport const GetDeepLinkBaseUrl = () => {\r\n const baseUrl =\r\n Platform.OS === 'web' //|| __DEV__\r\n ? Linking.makeUrl('/')\r\n : AppConfig.Tenant.BaseDeepLink\r\n\r\n return baseUrl\r\n}\r\n\r\n//wallet/details/:currencyGuid/:action/:status\r\n//wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/emandateResult/status\r\n//wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/confirmPaymentOrder/status\r\n\r\n//wallet/details/{0}/confirmPaymentOrder\r\n///wallet/details/1234/confirmPaymentOrder/\r\n\r\nexport const CreateAppLinkUrl = (type: AppLinkTypes, idParam?: string) => {\r\n const baseUrl = GetDeepLinkBaseUrl()\r\n\r\n const appLink = getAppLinkByType(type)\r\n if (appLink === undefined) {\r\n throw new Error('Invalid deeplink')\r\n }\r\n\r\n let url = appLink.Url\r\n\r\n if (idParam !== undefined) {\r\n url = url.replace('{0}', `${encodeURIComponent(idParam)}`)\r\n }\r\n return `${baseUrl}${url}/`\r\n}\r\n\r\nexport const GetAppLinkFromUrl = (url: string): AppLink | undefined => {\r\n const parsedUrl = Url(url, true)\r\n\r\n //.substring(1) remove first /\r\n const pathname: string = parsedUrl.pathname.substring(1)\r\n const splittedPath: string[] = pathname.split('/')\r\n if (splittedPath.length < 2) {\r\n return undefined\r\n }\r\n\r\n const controller: string = splittedPath[0]\r\n const action: string = splittedPath[1]\r\n const parameters = splittedPath.slice(2)\r\n\r\n //console.log('url to check', pathname, splittedPath, parameters)\r\n let appLink = AppLinks.find((appLink) =>\r\n pathname.toLocaleLowerCase().startsWith(appLink.Url.toLowerCase()),\r\n )\r\n\r\n //pathname\r\n // wallet/details/a63e57dc-42ba-4635-9a3f-059087 fe9a68/confirmPaymentOrder/PAYMENT_CANCELED\r\n\r\n //splitted path\r\n //[\"wallet\", \"details\", \"a63e57dc-42ba-4635-9a3f-059087fe9a68\", \"confirmPaymentOrder\", \"PAYMENT_CANCELED\"]\r\n\r\n //parameters\r\n //[\"a63e57dc-42ba-4635-9a3f-059087fe9a68\", \"confirmPaymentOrder\", \"PAYMENT_CANCELED\"]\r\n\r\n if (appLink === undefined) {\r\n if (parameters.length < 2) {\r\n return undefined\r\n }\r\n\r\n //try to skip the id param: dus skip param[0] a63e57dc-42ba-4635-9a3f-059087fe9a68\r\n //wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/emandateResult/status\r\n //wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/confirmPaymentOrder/status\r\n\r\n //wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/confirmPaymentOrder/PAYMENT_CANCELED\r\n if (parameters.length > 1) {\r\n const urlZonderId = `${controller}/${action}/${parameters[1]}`\r\n\r\n //vergelijk urlZonderId tegen applink zonder {0}\r\n //applink: wallet/details/{0}/emandateResult --> wallet/details/emandateResult\r\n //urlZonderId: wallet/details/emandateResult\r\n\r\n //vind de juiste applink (emandate of confirmPaymentOrder -->deze hebben hetzelde startsWith --> wallet/details)\r\n appLink = AppLinks.find((appLink) =>\r\n appLink.Url.replace('{0}/', '')\r\n .toLocaleLowerCase()\r\n .startsWith(urlZonderId.toLowerCase()),\r\n )\r\n\r\n //console.log('try skip id', urlZonderId, AppLinks)\r\n }\r\n }\r\n\r\n if (appLink !== undefined && parameters.length > 0) {\r\n appLink.Parameters = parameters\r\n }\r\n\r\n return appLink\r\n}\r\n\r\nexport const umbracoApiUrl = (url: string) => {\r\n let result = `${AppConfig.Service.CmsUrl}/umbraco/Api${url}`\r\n\r\n return result\r\n}\r\n\r\nexport const UmbracoMedia = (url: string) => {\r\n return `${AppConfig.Service.CmsUrl}${url}`\r\n}\r\n\r\n//from /file/file/{tenant.SystemName}\r\nexport const GetTenantPdfWeb = () => {\r\n return `/file/${AppConfig.Tenant.SystemName}/terms-and-conditions-${primaryLanguage}.pdf`\r\n}\r\n","export default class ClientToken {\r\n public AccessToken: string\r\n\r\n public ExpiryDateMs: number\r\n\r\n constructor(AccessToken: string, ExpiryDateMs: number) {\r\n this.AccessToken = AccessToken\r\n this.ExpiryDateMs = ExpiryDateMs\r\n }\r\n}\r\n","import {Mutex} from 'async-mutex'\r\nimport axios from 'axios'\r\nimport {Platform} from 'react-native'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport i18n, {primaryLanguage} from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport AuthenticationController from '../AuthenticationController'\r\n\r\nconst baseUrl = () => {\r\n if (Platform.OS === 'web') {\r\n return AppConfig.Service.ToprAuthUrl\r\n }\r\n return AppConfig.Service.BaseUrl\r\n}\r\n\r\n//pass proxy calls through AppConfig.Service.ToprAuthUrl for web, native go directly\r\nexport const axiosProxy = axios.create({\r\n baseURL: baseUrl(),\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'accept-language': primaryLanguage,\r\n },\r\n})\r\n","import axios, {AxiosError, AxiosResponse} from 'axios'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport {GetExpirationDateInMs} from '../../Helpers/DateHelpers'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\n\r\nimport {primaryLanguage} from '../../i18n'\r\nimport {persistedStore} from '../../Mobx'\r\nimport {\r\n ClientToken,\r\n IAuthenticateClientResponse,\r\n IAuthenticateUserResponse,\r\n} from '../../Models/Server'\r\nimport {axiosProxy} from './Axios/AxiosProxy'\r\n\r\nconst controller = {\r\n AuthenticateConsumerUser: (username: string, password: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n ClientSecret: AppConfig.Service.Secret,\r\n UserName: username,\r\n Password: password,\r\n }\r\n\r\n axiosProxy\r\n .post(\r\n `api/v1/authenticate/${AppConfig.Service.ClientId}/consumer/`,\r\n data,\r\n )\r\n\r\n .then((response: AxiosResponse) => {\r\n persistedStore.SetParentUserToken(response.data)\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n console.log(\r\n 'axios error',\r\n error.response?.status,\r\n error.response?.data,\r\n )\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n AutomaticLogin: (tempAdminGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n ClientSecret: AppConfig.Service.Secret,\r\n }\r\n\r\n axiosProxy\r\n .post(\r\n `api/v1/authenticate/${AppConfig.Service.ClientId}/helpdesk/${tempAdminGuid}`,\r\n data,\r\n )\r\n\r\n .then((response: AxiosResponse) => {\r\n persistedStore.SetParentUserToken(response.data)\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n console.log(\r\n 'axios error',\r\n error.response?.status,\r\n error.response?.data,\r\n )\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n RefreshToken: (refreshToken: string) => {\r\n const data = {\r\n ClientSecret: AppConfig.Service.Secret,\r\n RefreshToken: refreshToken,\r\n }\r\n return new Promise((resolve, reject) => {\r\n axiosProxy\r\n .post(\r\n `api/v1/authenticate/${AppConfig.Service.ClientId}/refresh/`,\r\n data,\r\n )\r\n .then((response: AxiosResponse) => {\r\n persistedStore.SetUserToken(response.data)\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n AuthenticateClient: () => {\r\n return new Promise((resolve, reject) => {\r\n const url = `api/v1/authenticate/${AppConfig.Service.ClientId}`\r\n axiosProxy\r\n .post(url, `\"${AppConfig.Service.Secret}\"`)\r\n .then((response: AxiosResponse) => {\r\n const clientToken: ClientToken = new ClientToken(\r\n response.data.AccessToken,\r\n GetExpirationDateInMs(response.data.AccessTokenExpires),\r\n )\r\n\r\n persistedStore.SetClientToken(clientToken)\r\n resolve(clientToken)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n //api/v1/authenticate/switch/{userGuid}\r\n SwitchUser: (userGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n //aways user parentUser Token to switch\r\n axios\r\n .post(\r\n `${AppConfig.Service.BaseUrl}api/v1/authenticate/switch/${userGuid}`,\r\n null,\r\n {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'accept-language': primaryLanguage,\r\n authorization: `Bearer ${persistedStore.ParentUserToken?.AccessToken}`,\r\n },\r\n },\r\n )\r\n .then((response: AxiosResponse) => {\r\n persistedStore.SetUserToken(response.data)\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n\r\nexport default controller\r\n","import {Mutex} from 'async-mutex'\r\nimport axios from 'axios'\r\nimport {Platform} from 'react-native'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport i18n, {primaryLanguage} from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport AuthenticationController from '../AuthenticationController'\r\n\r\n//used when calls require an authenticated client (ClientToken) authentication calls like authenticateUser and refreshToken\r\nexport const axiosAuthClient = axios.create({\r\n baseURL: AppConfig.Service.BaseUrl,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'accept-language': primaryLanguage,\r\n },\r\n})\r\n\r\nconst mutex = new Mutex()\r\naxiosAuthClient.interceptors.request.use(\r\n async (config) => {\r\n if (!appUiStore.IsConnected) {\r\n appUiStore.ShowToast({\r\n message: i18n.t('Common.ServerErrors.NO_CONNECTION'),\r\n })\r\n Promise.reject(new Error('No connection'))\r\n }\r\n\r\n await mutex.waitForUnlock()\r\n const {ClientToken} = persistedStore\r\n if (ClientToken && ClientToken.AccessToken) {\r\n config.headers = {\r\n ...config.headers,\r\n authorization: `Bearer ${ClientToken.AccessToken}`,\r\n }\r\n }\r\n\r\n return config\r\n },\r\n (error) => Promise.reject(error),\r\n)\r\n\r\naxiosAuthClient.interceptors.response.use(\r\n (response) => response,\r\n async (error) => {\r\n const config = error?.config\r\n\r\n if (error?.response?.status === 401 && !config?.sent) {\r\n config.sent = true\r\n\r\n if (!mutex.isLocked()) {\r\n const release = await mutex.acquire()\r\n\r\n try {\r\n console.log('try AuthenticateClient')\r\n const response = await AuthenticationController.AuthenticateClient()\r\n console.log('*** AuthenticatedClient *** :)')\r\n\r\n if (response.AccessToken) {\r\n //updated with new acces token\r\n config.headers = {\r\n ...config.headers,\r\n authorization: `Bearer ${response.AccessToken}`,\r\n }\r\n }\r\n\r\n return axios(config)\r\n } finally {\r\n release()\r\n }\r\n } else {\r\n // wait until the mutex is available without locking it\r\n //console.log('wait for refresh 2 ')\r\n await mutex.waitForUnlock()\r\n\r\n //updated accestoken\r\n config.headers = {\r\n ...config.headers,\r\n authorization: `Bearer ${persistedStore.ClientToken?.AccessToken}`,\r\n }\r\n return axios(config)\r\n }\r\n }\r\n\r\n return Promise.reject(error)\r\n },\r\n)\r\n","import {Mutex} from 'async-mutex'\r\nimport axios from 'axios'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport i18n, {primaryLanguage} from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport AuthenticationController from '../AuthenticationController'\r\n\r\n//used when calls require an authenticated user (UserToken)\r\nexport const axiosAuthUser = axios.create({\r\n baseURL: AppConfig.Service.BaseUrl,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'accept-language': primaryLanguage,\r\n },\r\n})\r\n\r\nexport const mutex = new Mutex()\r\naxiosAuthUser.interceptors.request.use(\r\n async (config) => {\r\n if (!appUiStore.IsConnected) {\r\n appUiStore.ShowToast({\r\n message: i18n.t('Common.ServerErrors.NO_CONNECTION'),\r\n })\r\n Promise.reject(new Error('No connection'))\r\n }\r\n\r\n await mutex.waitForUnlock()\r\n const {UserToken} = persistedStore\r\n\r\n if (UserToken && UserToken.AccessToken) {\r\n config.headers = {\r\n ...config.headers,\r\n authorization: `Bearer ${UserToken.AccessToken}`,\r\n }\r\n }\r\n\r\n return config\r\n },\r\n (error) => Promise.reject(error),\r\n)\r\n\r\naxiosAuthUser.interceptors.response.use(\r\n (response) => response,\r\n async (error) => {\r\n const config = error?.config\r\n\r\n if (error?.response?.status === 401 && !config?.sent) {\r\n config.sent = true\r\n\r\n if (!mutex.isLocked()) {\r\n const release = await mutex.acquire()\r\n\r\n try {\r\n const {UserToken: currentUserToken} = persistedStore\r\n if (currentUserToken === undefined) {\r\n return Promise.reject(new Error('UserToken not set'))\r\n }\r\n\r\n const response = await AuthenticationController.RefreshToken(\r\n currentUserToken.RefreshToken,\r\n )\r\n\r\n console.log('*** token refreshed v2*** :)')\r\n\r\n if (response.AccessToken) {\r\n //updated with new acces token\r\n config.headers = {\r\n ...config.headers,\r\n authorization: `Bearer ${response.AccessToken}`,\r\n }\r\n }\r\n\r\n return axios(config)\r\n } finally {\r\n release()\r\n }\r\n } else {\r\n // wait until the mutex is available without locking it\r\n //console.log('wait for refresh 2 ')\r\n await mutex.waitForUnlock()\r\n //updated accestoken\r\n config.headers = {\r\n ...config.headers,\r\n authorization: `Bearer ${persistedStore.UserToken?.AccessToken}`,\r\n }\r\n return axios(config)\r\n }\r\n }\r\n\r\n return Promise.reject(error)\r\n },\r\n)\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {CreateAppLinkUrl} from '../../Helpers/UrlHelpers'\r\nimport {persistedStore} from '../../Mobx'\r\nimport {\r\n AppLinkTypes,\r\n FieldTypes,\r\n UserIdentifierTypes,\r\n} from '../../Models/Client/Enums'\r\nimport {\r\n INameIdSTO,\r\n IRequestIdentifier,\r\n IUserFieldSTO,\r\n IUserSTO,\r\n} from '../../Models/Server'\r\nimport {axiosAuthClient} from './Axios/AxiosAuthClient'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n GetConsumerUser: () => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/user/consumer`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n })\r\n },\r\n GetUserFields: (fields: FieldTypes[]) => {\r\n return new Promise((resolve, reject) => {\r\n const fieldsQs = fields\r\n .map((n, index) => `Fields=${FieldTypes[n].toString()}`)\r\n .join('&')\r\n\r\n let url = `api/v1/userfields?${fieldsQs}`\r\n\r\n axiosAuthUser\r\n .get(url)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n SetUserFields: (userFields: IUserFieldSTO[]) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n Fields: userFields,\r\n }\r\n\r\n axiosAuthUser\r\n .post('api/v1/userfields', data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n SetName: (name: string, userGuid?: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n UserIdentifierType: UserIdentifierTypes.GUID,\r\n UserIdentifier: userGuid,\r\n Name: name,\r\n }\r\n\r\n axiosAuthUser\r\n .post('api/v1/user/name', data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n StartChangeEmail: (email: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n Email: email,\r\n ConfirmChangeEmailUrl: CreateAppLinkUrl(\r\n AppLinkTypes.ConfirmChangeEmail,\r\n ),\r\n }\r\n\r\n axiosAuthUser\r\n .post('api/v1/user/email', data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n ConfirmChangeEmail: (requestIdentifier: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/user/email/confirm/${requestIdentifier}`, null)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n ValidatePassword: (password: string, userGuid?: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n UserIdentifierType: UserIdentifierTypes.GUID,\r\n UserIdentifier: userGuid,\r\n Name: password,\r\n }\r\n axiosAuthUser\r\n .post(`api/v1/user/validate/password/${password}`, data)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n SetPassword: (password: string, userGuid?: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n UserIdentifierType: UserIdentifierTypes.GUID,\r\n UserIdentifier: userGuid,\r\n Password: password,\r\n }\r\n\r\n axiosAuthUser\r\n .post(`api/v1/user/password`, data)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n SaveUserPicture: (base64: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n PictureData: base64,\r\n }\r\n\r\n axiosAuthUser\r\n .post(`api/v1/userpicture`, data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetChildUsers: () => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get('api/v1/user/children/consumer')\r\n .then((response: AxiosResponse) => {\r\n persistedStore.SetChildUsers(response.data)\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n AddChildUser: (name: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {Name: name}\r\n axiosAuthUser\r\n .post(`api/v1/user/child`, data)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n CancelChildUser: (mainUserGuid: string, childUserGuid: String) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/user/child/cancel/${mainUserGuid}/${childUserGuid}`, null)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n Search: (search: string) => {\r\n return new Promise>((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/user/search/${search}`, null)\r\n .then((response: AxiosResponse>) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n CreateRequestIdentifier: () => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post('api/v1/user/requestidentifier', null)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n ForgotPassword: (email: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n Email: email,\r\n ResetPasswordUrl: CreateAppLinkUrl(AppLinkTypes.ResetPassword),\r\n }\r\n const url = 'api/v1/user/forgotpassword'\r\n axiosAuthClient\r\n .post(url, data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n ResetPassword: (requestIdentifier: string, password: string) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n RequestIdentifier: requestIdentifier,\r\n Password: password,\r\n }\r\n const url = 'api/v1/user/resetpassword'\r\n\r\n axiosAuthClient\r\n .post(`${AppConfig.Service.BaseUrl}${url}`, data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {FixGuid} from '../../Helpers/TextHelpers'\r\nimport {\r\n ICouponSummarySTO,\r\n IUserCouponSTO,\r\n IUserCouponSummarySTO,\r\n} from '../../Models/Server'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n RedeemableUserCoupons: () => {\r\n return new Promise(async (resolve, reject) => {\r\n axiosAuthUser\r\n .get('api/v1/usercoupons/redeemable')\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n response.data.forEach((userCoupon) => {\r\n userCoupon.UserCouponGUID = FixGuid(userCoupon.UserCouponGUID)\r\n })\r\n }\r\n\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetCouponSummaries: () => {\r\n return new Promise(async (resolve, reject) => {\r\n axiosAuthUser\r\n .get('api/v1/coupons/summary')\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetUserCouponSummaries: (couponGuid: string, skip: number, take: number) => {\r\n return new Promise(async (resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v2/usercoupons/summary/${couponGuid}/${skip}/${take}`)\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n response.data.forEach((userCouponSummary) => {\r\n userCouponSummary.UserCouponGuid = FixGuid(\r\n userCouponSummary.UserCouponGuid,\r\n )\r\n })\r\n }\r\n\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetUserCoupon: (userCouponGuid: string) => {\r\n return new Promise(async (resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/usercoupon/${userCouponGuid}`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {IUserEventSto} from '../../Models/Server'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n GetUserEvents: () => {\r\n return new Promise((resolve, reject) => {\r\n const url = 'api/v1/user/tickets'\r\n axiosAuthUser\r\n .get(url)\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n }\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {FixGuid} from '../../Helpers/TextHelpers'\r\nimport {ISavingCardSummarySTO, IUserSavingCardSTO} from '../../Models/Server'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n ActiveUserSavingCards: () => {\r\n return new Promise((resolve, reject) => {\r\n const url = 'api/v1/usersavingcards/active/consumer'\r\n axiosAuthUser\r\n .get(url)\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n response.data.forEach((userSavingCard) => {\r\n userSavingCard.UserSavingCardGuid = FixGuid(\r\n userSavingCard.UserSavingCardGuid,\r\n )\r\n })\r\n }\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetUserSavingCard: (userSavingCardGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/usersavingcard/${userSavingCardGuid}`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetUserSavingCards: (savingCardGuid: string, skip: number, take: number) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/usersavingcards/${savingCardGuid}/${skip}/${take}`)\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n response.data.forEach((userSavingCard) => {\r\n userSavingCard.UserSavingCardGuid = FixGuid(\r\n userSavingCard.UserSavingCardGuid,\r\n )\r\n })\r\n }\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetSavingCardSummaries: () => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/savingcards/summary`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {IUserSubscriptionSto} from '../../Models/Server/ConsumerSubscription/IUserSubscriptionSto'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n GetUserSubscriptions: () => {\r\n return new Promise((resolve, reject) => {\r\n const url = 'api/v1/user/subscriptions'\r\n axiosAuthUser\r\n .get(url)\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n }\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetUserSubscription: (userSubscriptionId: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/user/subscription/${userSubscriptionId}`)\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n }\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport {HandleAxiosCatch, Json2Url} from '../../Helpers/ServiceHelpers'\r\nimport {FixGuid} from '../../Helpers/TextHelpers'\r\n\r\nimport {\r\n ICurrencyChargeMethodSTO,\r\n ITransactionSTO,\r\n IWalletSTO,\r\n IWithdrawInfoSTO,\r\n} from '../../Models/Server'\r\nimport {ILoyaltyTransactionItemSTO} from '../../Models/Server/Wallet/ILoyaltyTransactionItemSTO'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n GetWallets: () => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v2/wallets/consumer/${AppConfig.Tenant.TenantID}`)\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n response.data.forEach((wallet) => {\r\n wallet.Currency.CurrencyGuid = FixGuid(\r\n wallet.Currency.CurrencyGuid,\r\n )\r\n })\r\n }\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetWalletsInzzii: (vsamUid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/wallets/consumer/inzzii?SamUid=${vsamUid}`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n //\r\n GetWallet: (currencyGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/wallet/${currencyGuid}`)\r\n .then((response: AxiosResponse) => {\r\n if (response.data) {\r\n response.data.Currency.CurrencyGuid = FixGuid(\r\n response.data.Currency.CurrencyGuid,\r\n )\r\n }\r\n\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetWithdrawInfo: (currencyGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/wallet/${currencyGuid}/withdrawinfo`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n\r\n GetTransactions: (\r\n currencyGuid: string | undefined,\r\n skip: number,\r\n take: number,\r\n ) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n Skip: skip,\r\n Take: take,\r\n }\r\n const queryStringParams = Json2Url(data)\r\n\r\n const url = `api/v1/wallet/${currencyGuid}/transactions/descending?${queryStringParams}`\r\n axiosAuthUser\r\n .get(url)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetTransactionsPdfWeb: (currencyGuid: string | undefined) => {\r\n return new Promise((resolve, reject) => {\r\n const url = `api/v1/wallet/${currencyGuid}/transactions/descending/pdf`\r\n axiosAuthUser\r\n .get(url, {\r\n responseType: 'blob',\r\n })\r\n .then((response: AxiosResponse) => {\r\n var file = new Blob([response.data], {type: 'application/pdf'})\r\n var fileURL = URL.createObjectURL(file)\r\n window.open(fileURL)\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetTransactionsPeriodPdfWeb: (\r\n currencyGuid: string | undefined,\r\n fromDate: Date,\r\n tillDate: Date,\r\n ) => {\r\n return new Promise((resolve, reject) => {\r\n const url = `api/v1/wallet/${currencyGuid}/transactions/period/pdf`\r\n axiosAuthUser\r\n .post(\r\n url,\r\n {\r\n From: fromDate,\r\n Till: tillDate,\r\n },\r\n {\r\n responseType: 'blob',\r\n },\r\n )\r\n .then((response: AxiosResponse) => {\r\n var file = new Blob([response.data], {type: 'application/pdf'})\r\n var fileURL = URL.createObjectURL(file)\r\n window.open(fileURL)\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n\r\n GetTransactionItems: (loyaltyTransactionGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/transaction/${loyaltyTransactionGuid}/items`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetChargeMethods: (currencyGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/wallet/${currencyGuid}/topup/methods`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import axios, {AxiosError, AxiosResponse} from 'axios'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport {umbracoApiUrl} from '../../Helpers/UrlHelpers'\r\nimport {IPageViewModel, ISystemMessageViewModel, IHelpViewModel} from './Models'\r\n\r\nconst toprUmbraco = {\r\n GetPage: (pageName: string) => {\r\n return new Promise((resolve, reject) => {\r\n axios\r\n .get(\r\n umbracoApiUrl(\r\n `/page/getpage?tenant=${AppConfig.Tenant.SystemName}&name=${pageName}`,\r\n ),\r\n )\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n console.log(\r\n 'umbraco error',\r\n error.response?.status,\r\n error.response?.statusText,\r\n )\r\n reject(error.response?.statusText)\r\n })\r\n })\r\n },\r\n GetHelpPage: () => {\r\n return new Promise((resolve, reject) => {\r\n axios\r\n .get(\r\n umbracoApiUrl(\r\n `/page/gethelppage?tenant=${AppConfig.Tenant.SystemName}`,\r\n ),\r\n )\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n console.log(\r\n 'umbraco error',\r\n error.response?.status,\r\n error.response?.statusText,\r\n )\r\n reject(error.response?.statusText)\r\n })\r\n })\r\n },\r\n GetActiveSystemMessages: () => {\r\n return new Promise((resolve, reject) => {\r\n const url = `/SystemMessage/GetActiveSystemMessages?tenant=${AppConfig.Tenant.SystemName}`\r\n\r\n axios\r\n .get(umbracoApiUrl(url))\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n console.log(\r\n 'umbraco error',\r\n error.response?.status,\r\n error.response?.statusText,\r\n )\r\n reject(error.response?.statusText)\r\n })\r\n })\r\n },\r\n}\r\n\r\nexport default toprUmbraco\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {ITokenSTO} from '../../Models/Server'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\nimport {FixGuid} from '../../Helpers/TextHelpers'\r\n\r\nexport default {\r\n GetTokens: () => {\r\n return new Promise((resolve, reject) => {\r\n const url = `api/v1/tokens/consumer`\r\n axiosAuthUser\r\n .get(url)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n\r\n ActivateWithCode: (activationCode: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/token/activate/code/${activationCode}`, null)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n ActivateUid: (uid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/token/activate/uid/${uid}`, null)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n SetDescription: (tokenGuid: string, description: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/token/description/${tokenGuid}`, description)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n Block: (tokenGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/token/${tokenGuid}/block`, null)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n Unblock: (tokenGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/token/${tokenGuid}/unblock`, null)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n SwitchTokenUser: (tokenGuid: string, userGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/token/switch/${tokenGuid}/${userGuid}`, null)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {TokenStates} from '../Models/Client/Enums'\r\nimport {ITokenSTO} from '../Models/Server/Token/ITokenSTO'\r\n\r\nexport const GetTokenState = (token: ITokenSTO): TokenStates => {\r\n if (token.IsBlocked) {\r\n return TokenStates.Blocked\r\n }\r\n\r\n if (new Date(token.ValidThru) < new Date()) {\r\n return TokenStates.Expired\r\n }\r\n\r\n return TokenStates.Active\r\n}\r\n\r\nconst compareDateDesc = (a: string | Date | null, b: string | Date | null) => {\r\n if (a === null || b === null) {\r\n return -1\r\n }\r\n\r\n if (a < b) {\r\n return 1\r\n }\r\n if (a > b) {\r\n return -1\r\n }\r\n return 0\r\n}\r\n\r\nexport const sortTokens = (tokens: ITokenSTO[]) => {\r\n const sortedTokens = tokens.slice().sort((a, b) => {\r\n const stateA = GetTokenState(a)\r\n const stateB = GetTokenState(b)\r\n\r\n //first sort by state then by activated\r\n return stateA - stateB || compareDateDesc(a.Activated, b.Activated)\r\n // return a.city.localeCompare(b.city) || b.price - a.price;\r\n })\r\n return sortedTokens\r\n}\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {ITokenSTO, IUserSTO} from '../../../Models/Server'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport I18n from '../../../i18n'\r\nimport TokenController from '../../../Services/Topr.Core/TokenController'\r\nimport {ToprError} from '../../../Models/Client'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport i18n from '../../../i18n'\r\nimport {sortTokens} from '../../../Helpers/TokenHelpers'\r\n\r\nclass Store {\r\n public IsTokensLoading = true\r\n public TokenMenuIsVisible = false\r\n public OtherUserModalIsVisible = false\r\n public SetDescriptionTokenModalIsVisible = false\r\n public IsSubmitting = false\r\n public Tokens: ITokenSTO[] = []\r\n\r\n public SelectedToken?: ITokenSTO = undefined\r\n public LoadingTokenTokenGUID = ''\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public GetTokens() {\r\n this.IsTokensLoading = true\r\n TokenController.GetTokens()\r\n .then((tokens) => {\r\n runInAction(() => {\r\n this.Tokens = sortTokens(tokens)\r\n this.IsTokensLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsTokensLoading = false\r\n })\r\n })\r\n }\r\n\r\n public Block() {\r\n if (this.SelectedToken) {\r\n this.LoadingTokenTokenGUID = this.SelectedToken.TokenGUID\r\n const activationCode = this.SelectedToken.ActivationCode\r\n this.HideTokenMenu()\r\n\r\n TokenController.Block(this.LoadingTokenTokenGUID)\r\n .then(() => {\r\n runInAction(() => {\r\n appUiStore.ShowToast({\r\n message: i18n.t('Tokens.TokenMenu.BlockTokenAction.Succes', {\r\n activationCode,\r\n }),\r\n })\r\n const blockedToken = this.Tokens.find(\r\n (x) => x.TokenGUID === this.LoadingTokenTokenGUID,\r\n )\r\n if (blockedToken) {\r\n blockedToken.IsBlocked = true\r\n }\r\n this.ClearSelectedToken()\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => {\r\n this.ClearSelectedToken()\r\n })\r\n\r\n SetFriendlyMessage(toprError, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n })\r\n }\r\n }\r\n\r\n public Unblock() {\r\n if (this.SelectedToken) {\r\n this.LoadingTokenTokenGUID = this.SelectedToken.TokenGUID\r\n const activationCode = this.SelectedToken.ActivationCode\r\n this.HideTokenMenu()\r\n\r\n TokenController.Unblock(this.LoadingTokenTokenGUID)\r\n .then(() => {\r\n runInAction(() => {\r\n appUiStore.ShowToast({\r\n message: i18n.t('Tokens.TokenMenu.UnblockTokenAction.Succes', {\r\n activationCode,\r\n }),\r\n })\r\n const unblockedToken = this.Tokens.find(\r\n (x) => x.TokenGUID === this.LoadingTokenTokenGUID,\r\n )\r\n if (unblockedToken) {\r\n unblockedToken.IsBlocked = false\r\n }\r\n this.ClearSelectedToken()\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => {\r\n this.ClearSelectedToken()\r\n })\r\n\r\n SetFriendlyMessage(toprError, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n })\r\n }\r\n }\r\n\r\n public TokenSwitchUser(user: IUserSTO) {\r\n if (this.SelectedToken) {\r\n this.LoadingTokenTokenGUID = this.SelectedToken.TokenGUID\r\n const activationCode = this.SelectedToken.ActivationCode\r\n this.HideTokenMenu()\r\n\r\n TokenController.SwitchTokenUser(\r\n this.LoadingTokenTokenGUID,\r\n user.MainUserGuid,\r\n )\r\n .then(() => {\r\n appUiStore.ShowToast({\r\n message: i18n.t('Tokens.TokenMenu.SwitchUserAction.Succes', {\r\n activationCode,\r\n name: user.Name,\r\n }),\r\n })\r\n\r\n runInAction(() => {\r\n this.SelectedToken = undefined\r\n const index = this.Tokens.findIndex(\r\n (x) => x.TokenGUID === this.LoadingTokenTokenGUID,\r\n )\r\n if (index > -1) {\r\n this.Tokens.splice(index, 1)\r\n }\r\n this.ClearSelectedToken()\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => {\r\n this.ClearSelectedToken()\r\n })\r\n\r\n SetFriendlyMessage(toprError, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n })\r\n }\r\n }\r\n\r\n public ShowTokenMenu(token: ITokenSTO) {\r\n this.SelectedToken = token\r\n this.TokenMenuIsVisible = true\r\n }\r\n\r\n public HideTokenMenu() {\r\n this.TokenMenuIsVisible = false\r\n }\r\n\r\n private ClearSelectedToken() {\r\n this.SelectedToken = undefined\r\n this.LoadingTokenTokenGUID = ''\r\n }\r\n\r\n public ToggleOtherUserModalIsVisible() {\r\n if (!this.OtherUserModalIsVisible) {\r\n this.TokenMenuIsVisible = false\r\n }\r\n this.OtherUserModalIsVisible = !this.OtherUserModalIsVisible\r\n }\r\n\r\n public ToggleSetDescriptionTokenModalIsVisible() {\r\n if (!this.SetDescriptionTokenModalIsVisible) {\r\n this.TokenMenuIsVisible = false\r\n }\r\n this.SetDescriptionTokenModalIsVisible =\r\n !this.SetDescriptionTokenModalIsVisible\r\n }\r\n\r\n public SetDescription(description: string) {\r\n if (this.SelectedToken) {\r\n TokenController.SetDescription(this.SelectedToken.TokenGUID, description)\r\n .then(() => {\r\n runInAction(() => {\r\n this.HideTokenMenu()\r\n const token = this.Tokens.find(\r\n (x) => x.TokenGUID === this.SelectedToken?.TokenGUID,\r\n )\r\n if (token) {\r\n token.Description = description\r\n }\r\n this.ClearSelectedToken()\r\n this.ToggleSetDescriptionTokenModalIsVisible()\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => {\r\n this.ClearSelectedToken()\r\n })\r\n SetFriendlyMessage(toprError, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n this.ToggleSetDescriptionTokenModalIsVisible()\r\n })\r\n }\r\n }\r\n}\r\nexport const store = new Store()\r\n","import {action, computed, makeObservable, observable, runInAction} from 'mobx'\r\nimport {TableQrObject} from '../../../Models/Client'\r\nimport {\r\n IGroupedCoupon,\r\n IUserCouponSTO,\r\n IUserEventSto,\r\n IUserFieldSTO,\r\n IUserSavingCardSTO,\r\n IUserSTO,\r\n IWalletSTO,\r\n} from '../../../Models/Server'\r\nimport {IUserSubscriptionSto} from '../../../Models/Server/ConsumerSubscription/IUserSubscriptionSto'\r\nimport CouponController from '../../../Services/Topr.Core/CouponController'\r\nimport EventController from '../../../Services/Topr.Core/EventController'\r\nimport SavingcardController from '../../../Services/Topr.Core/SavingcardController'\r\nimport SubscriptionController from '../../../Services/Topr.Core/SubscriptionController'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport WalletController from '../../../Services/Topr.Core/WalletController'\r\nimport UmbracoController from '../../../Services/Topr.Umbraco'\r\nimport {ISystemMessageViewModel} from '../../../Services/Topr.Umbraco/Models'\r\nimport {store as tokenStore} from '../../Token/Tokens/Store'\r\n\r\nexport default class Store {\r\n public IsAuthenticationMethodCheckLoading = true\r\n public IsWalletLoading = true\r\n public IsCouponsLoading = true\r\n public IsSavingcardsLoading = true\r\n public IsUserLoading = true\r\n public IsUserMenuVisible = false\r\n public IsAddMenuVisible = false\r\n\r\n public Wallets: IWalletSTO[] = []\r\n public UserCoupons: IUserCouponSTO[] = []\r\n public UserSavingCards: IUserSavingCardSTO[] = []\r\n public UserSubscriptions: IUserSubscriptionSto[] = []\r\n public IsUserSubscriptionsLoading = false\r\n\r\n public UserEvents: IUserEventSto[] = []\r\n public IsUserEventsLoading = false\r\n\r\n public User?: IUserSTO = undefined\r\n public UserFields: IUserFieldSTO[] = []\r\n public SystemMessages: ISystemMessageViewModel[] = []\r\n\r\n public get GroupedCoupons(): IGroupedCoupon[] {\r\n return this.UserCoupons.reduce(\r\n (groupedCoupons: IGroupedCoupon[], userCoupon: IUserCouponSTO) => {\r\n const index = groupedCoupons.findIndex(\r\n (x) => x.Coupon.Guid === userCoupon.Coupon.Guid,\r\n )\r\n if (index === -1) {\r\n const newCouponGrouping: IGroupedCoupon = {\r\n Coupon: userCoupon.Coupon,\r\n UserCoupons: [userCoupon],\r\n }\r\n groupedCoupons.push(newCouponGrouping)\r\n } else {\r\n groupedCoupons[index].UserCoupons.push(userCoupon)\r\n }\r\n\r\n return groupedCoupons\r\n },\r\n [],\r\n )\r\n }\r\n\r\n constructor() {\r\n //makeAutoObservable(this)\r\n makeObservable(this, {\r\n IsAuthenticationMethodCheckLoading: observable,\r\n IsWalletLoading: observable,\r\n IsCouponsLoading: observable,\r\n IsSavingcardsLoading: observable,\r\n IsUserLoading: observable,\r\n IsUserMenuVisible: observable,\r\n IsAddMenuVisible: observable,\r\n Wallets: observable,\r\n UserCoupons: observable,\r\n UserSavingCards: observable,\r\n User: observable,\r\n UserFields: observable,\r\n UserSubscriptions: observable,\r\n IsUserSubscriptionsLoading: observable,\r\n UserEvents: observable,\r\n IsUserEventsLoading: observable,\r\n GroupedCoupons: computed,\r\n Initialize: action,\r\n SetIsAuthenticationMethodCheckLoading: action,\r\n GetWallets: action,\r\n GetUserCoupons: action,\r\n GetUserSavingCards: action,\r\n GetUser: action,\r\n ToggleUserMenu: action,\r\n ToggleAddMenu: action,\r\n GetUserSubscriptions: action,\r\n GetUserEvents: action,\r\n })\r\n }\r\n\r\n public Initialize() {\r\n this.GetUser()\r\n this.GetWallets()\r\n this.GetUserCoupons()\r\n this.GetUserSavingCards()\r\n this.GetUserSubscriptions()\r\n this.GetUserEvents()\r\n tokenStore.GetTokens()\r\n\r\n //example table qr json\r\n // const test = new TableQrObject('2', 'VSAM7A76231E41')\r\n // console.log(JSON.stringify(test))\r\n }\r\n\r\n public SetIsAuthenticationMethodCheckLoading(value: boolean) {\r\n this.IsAuthenticationMethodCheckLoading = value\r\n }\r\n\r\n private GetActiveSystemMessages() {\r\n this.SystemMessages = []\r\n UmbracoController.GetActiveSystemMessages()\r\n .then((messages) => {\r\n this.SystemMessages = messages\r\n })\r\n .catch(() => {})\r\n }\r\n\r\n public GetWallets() {\r\n this.Wallets = []\r\n this.IsWalletLoading = true\r\n this.GetActiveSystemMessages()\r\n\r\n WalletController.GetWallets()\r\n .then((wallets) => {\r\n runInAction(() => {\r\n this.Wallets = wallets.slice().sort((a, b) => {\r\n if (a.Modified === null || a.Modified === undefined) {\r\n return 1\r\n }\r\n\r\n if (b.Modified === null || b.Modified === undefined) {\r\n return -1\r\n }\r\n\r\n if (a.Modified > b.Modified) {\r\n return -1\r\n } else if (a.Modified < b.Modified) {\r\n return 1\r\n }\r\n\r\n return 0\r\n })\r\n\r\n this.IsWalletLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsWalletLoading = false\r\n })\r\n })\r\n }\r\n\r\n public GetUserCoupons() {\r\n this.UserCoupons = []\r\n this.IsCouponsLoading = true\r\n\r\n CouponController.RedeemableUserCoupons()\r\n .then((userCoupons) => {\r\n runInAction(() => {\r\n this.UserCoupons = userCoupons.slice().sort((a, b) => {\r\n if (a.Created < b.Created) {\r\n return 1\r\n }\r\n if (a.Created > b.Created) {\r\n return -1\r\n }\r\n return 0\r\n })\r\n this.UserCoupons = userCoupons\r\n this.IsCouponsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsCouponsLoading = false\r\n })\r\n })\r\n }\r\n\r\n public GetUserSavingCards() {\r\n this.IsSavingcardsLoading = true\r\n this.UserSavingCards = []\r\n SavingcardController.ActiveUserSavingCards()\r\n .then((userSavingCards) => {\r\n runInAction(() => {\r\n //workaround :only display active cards. Must be changed on server\r\n this.UserSavingCards = userSavingCards.filter(\r\n (x) => x.StampCount < x.SavingCard.StampCount,\r\n )\r\n this.IsSavingcardsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsSavingcardsLoading = false\r\n })\r\n })\r\n }\r\n\r\n public GetUserSubscriptions() {\r\n this.UserSubscriptions = []\r\n\r\n this.IsSavingcardsLoading = true\r\n SubscriptionController.GetUserSubscriptions()\r\n .then((usersubscriptions) => {\r\n runInAction(() => {\r\n //workaround :only display active cards. Must be changed on server\r\n this.UserSubscriptions = usersubscriptions\r\n this.IsUserSubscriptionsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsUserSubscriptionsLoading = false\r\n })\r\n })\r\n }\r\n\r\n public GetUserEvents() {\r\n this.IsUserEventsLoading = true\r\n this.UserEvents = []\r\n EventController.GetUserEvents()\r\n .then((userEvents) => {\r\n runInAction(() => {\r\n this.UserEvents = userEvents\r\n this.IsUserEventsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsUserEventsLoading = false\r\n })\r\n })\r\n }\r\n\r\n public GetUser() {\r\n this.IsUserLoading = true\r\n this.User = undefined\r\n UserController.GetConsumerUser()\r\n .then((user) => {\r\n runInAction(() => {\r\n this.User = user\r\n this.IsUserLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsUserLoading = false\r\n })\r\n })\r\n }\r\n\r\n public ToggleUserMenu(isVisible: boolean) {\r\n this.IsUserMenuVisible = isVisible\r\n }\r\n\r\n public ToggleAddMenu(isVisible: boolean) {\r\n this.IsAddMenuVisible = isVisible\r\n }\r\n}\r\n\r\nexport const dashboardStore = new Store()\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport I18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {ToprError} from '../../../Models/Client'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport AuthenticationController from '../../../Services/Topr.Core/AuthenticationController'\r\nimport {dashboardStore} from '../../../Screens/Dashboard/Dashboard/Store'\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n public IsVisible = false\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public ToggleModal() {\r\n this.IsVisible = !this.IsVisible\r\n }\r\n\r\n public AddAccount(name: string) {\r\n this.IsSubmitting = true\r\n\r\n UserController.AddChildUser(name)\r\n .then((userGuid) => {\r\n runInAction(() => {\r\n this.SwitchToNewUser(userGuid)\r\n this.ToggleModal()\r\n this.IsSubmitting = false\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => {\r\n SetFriendlyMessage(toprError, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n\r\n this.ToggleModal()\r\n this.IsSubmitting = false\r\n })\r\n })\r\n }\r\n\r\n private SwitchToNewUser(userGuid: string) {\r\n AuthenticationController.SwitchUser(userGuid)\r\n .then(() => {\r\n //UserController.GetChildUsers()\r\n dashboardStore.Initialize()\r\n //navigate('dashboard')\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => {\r\n SetFriendlyMessage(toprError, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n })\r\n })\r\n }\r\n}\r\nexport const addAccountStore = new Store()\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Card} from 'react-native-elements'\r\nimport MyModal from './../MyModal'\r\nimport i18n from '../../../i18n'\r\nimport Style, {sizes} from '../../../Style'\r\nimport MyFooter from '../../Form/MyFooter'\r\nimport MyFooterTile from '../../Form/MyFooterTile'\r\nimport MyButton from '../../Buttons/MyButton'\r\nimport FormHeader from '../../Form/FormHeader'\r\nimport MyInput from '../../Form/MyInput'\r\nimport {useForm} from 'react-hook-form'\r\nimport Content from '../../Layout/Content'\r\nimport {addAccountStore} from './Store'\r\nimport {observer} from 'mobx-react'\r\n\r\ninterface IProps {}\r\n\r\nexport type MyFormData = {\r\n name: string\r\n}\r\n\r\nconst AddAccountModal: React.FC = () => {\r\n const {control, handleSubmit, errors, setError, setValue} =\r\n useForm()\r\n\r\n const {IsSubmitting, IsVisible} = addAccountStore\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n addAccountStore.AddAccount(data.name)\r\n }\r\n\r\n return (\r\n addAccountStore.ToggleModal()}\r\n visible={IsVisible}\r\n closeOnBackPress\r\n position=\"center\">\r\n {i18n.t('UserMenu.Account.Add')}\r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t(\r\n 'AddAccountModal.Form.NameField.Errors.Required',\r\n ),\r\n },\r\n }}\r\n label={i18n.t('AddAccountModal.Form.NameField.Label')}\r\n />\r\n \r\n \r\n \r\n {\r\n addAccountStore.ToggleModal()\r\n }}\r\n style={{marginRight: sizes.padding.sm}}\r\n title={i18n.t('Common.Cancel')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(AddAccountModal)\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React, {useRef} from 'react'\r\nimport {View, Animated, Text} from 'react-native'\r\nimport Style, {colors} from '../../Style'\r\n\r\ninterface IProps {\r\n duration: number\r\n delayStart?: number\r\n delayFadeOut?: number\r\n size?: 'normal' | 'small'\r\n bordered?: boolean\r\n}\r\n\r\nconst Dot: React.FC = ({\r\n delayStart,\r\n duration,\r\n delayFadeOut,\r\n size,\r\n bordered,\r\n}) => {\r\n const fadeAnim = useRef(new Animated.Value(0)).current\r\n\r\n let fadeInAndOut = Animated.sequence([\r\n Animated.timing(fadeAnim, {\r\n toValue: 1,\r\n duration,\r\n useNativeDriver: true,\r\n }),\r\n Animated.timing(fadeAnim, {\r\n toValue: 0,\r\n delay: delayFadeOut,\r\n duration,\r\n useNativeDriver: true,\r\n }),\r\n ])\r\n\r\n React.useEffect(() => {\r\n setTimeout(() => {\r\n Animated.loop(fadeInAndOut).start()\r\n }, delayStart)\r\n }, [fadeAnim])\r\n\r\n const {dot, dotSmall} = Style\r\n const dotStyle = size === 'normal' ? dot : dotSmall\r\n const backgroundStyle = bordered ? {backgroundColor: colors.main} : {}\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\nexport default Dot\r\n\r\nDot.defaultProps = {\r\n delayStart: 0,\r\n duration: 750,\r\n size: 'normal',\r\n bordered: false,\r\n}\r\n","import React from 'react'\r\nimport {Image, View, ViewStyle, Text} from 'react-native'\r\n\r\nimport Style from '../../Style'\r\nimport AppImages from '../../Images/AppImages'\r\nimport Dot from './Dot'\r\n\r\ninterface IProps {\r\n isLoading: boolean\r\n size?: 'normal' | 'small'\r\n}\r\nconst ToprLoader: React.FC = ({isLoading, size}) => {\r\n if (!isLoading) {\r\n return null\r\n }\r\n\r\n // const height = 72\r\n // const width = 125\r\n const height = size === 'normal' ? 72 : 48\r\n const width = size === 'normal' ? 125 : 83\r\n const {fullWidthHeightAbs, toprLoader} = Style\r\n\r\n const paddingStyle: ViewStyle =\r\n size === 'normal' ? {paddingHorizontal: 20} : {paddingHorizontal: 5}\r\n\r\n const renderDots = () => {\r\n const dots: React.ReactNode[] = []\r\n const count = 3\r\n const duration = 400\r\n\r\n for (let index = 0; index < count; index++) {\r\n //start when prev dot is finished fadein\r\n const delayStart = index * duration\r\n dots.push(\r\n ,\r\n )\r\n }\r\n\r\n return dots\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {renderDots()}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default ToprLoader\r\n\r\nToprLoader.defaultProps = {\r\n isLoading: false,\r\n size: 'normal',\r\n}\r\n","import React from 'react'\r\nimport {View} from 'react-native'\r\nimport Style from '../../Style'\r\nimport ToprLoader from './ToprLoader'\r\n\r\ninterface IProps {\r\n isLoading: boolean\r\n isWhite?: boolean\r\n}\r\n\r\nconst ToprScreenLoader: React.FC = ({isLoading, isWhite, children}) => {\r\n if (!isLoading) {\r\n return <>{children}\r\n }\r\n\r\n const {fullWidthHeightAbs, centerXY, containerBg, flex1} = Style\r\n const container = isWhite ? flex1 : containerBg\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ToprScreenLoader\r\n\r\nToprScreenLoader.defaultProps = {\r\n isLoading: false,\r\n isWhite: false,\r\n}\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {\r\n Image,\r\n Text,\r\n TouchableOpacity,\r\n TouchableWithoutFeedbackProps,\r\n View,\r\n} from 'react-native'\r\nimport {GetFileUrl} from '../../Helpers/UiHelpers'\r\nimport {IUserSTO} from '../../Models/Server'\r\nimport {dashboardStore} from '../../Screens/Dashboard/Dashboard/Store'\r\nimport Style from '../../Style'\r\nimport {GetFirstLetterUser} from '../../Helpers/TextHelpers'\r\ninterface IProps extends TouchableWithoutFeedbackProps {\r\n user: IUserSTO | undefined\r\n}\r\n\r\nconst ProfileButton: React.FC = ({user, ...otherProps}) => {\r\n const {profileColorButton, profilePictureImage} = Style\r\n\r\n const renderProfile = () => {\r\n if (user === undefined) {\r\n return null\r\n }\r\n\r\n if (user.UserPictureFileGuid) {\r\n return renderImage()\r\n } else {\r\n return renderFirstLetter()\r\n }\r\n }\r\n\r\n const renderImage = () => {\r\n if (user !== undefined && user.UserPictureFileGuid === null) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n const renderFirstLetter = () => {\r\n const letter =\r\n user?.Name === undefined || user?.Name === null || user?.Name === ''\r\n ? 'P'\r\n : user?.Name[0]\r\n return (\r\n \r\n \r\n {GetFirstLetterUser(user)}\r\n \r\n \r\n )\r\n }\r\n\r\n return {renderProfile()}\r\n}\r\n\r\nexport default observer(ProfileButton)\r\n","import React from 'react'\r\nimport {TouchableOpacity, Text, TouchableOpacityProps, View} from 'react-native'\r\nimport {Icon} from 'react-native-elements'\r\nimport Style, {colors} from '../../Style'\r\ninterface IProps extends TouchableOpacityProps {\r\n text: string\r\n chevron?: boolean\r\n}\r\n\r\nconst LinkButton: React.FC = ({\r\n onPress,\r\n text,\r\n chevron,\r\n ...otherProps\r\n}) => {\r\n const renderChevron = () => {\r\n if (!chevron) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {renderChevron()}\r\n \r\n \r\n {text}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default LinkButton\r\n\r\nLinkButton.defaultProps = {\r\n chevron: true,\r\n}\r\n","import React from 'react'\r\nimport {TouchableOpacity, View, Image} from 'react-native'\r\nimport {Badge, Card, Icon, Text} from 'react-native-elements'\r\n\r\nimport {FormatCurrency, FormatDistance} from '../../Helpers/TextHelpers'\r\nimport {GetFileUrl, GetLocalizedImageUrl} from '../../Helpers/UiHelpers'\r\nimport {IGroupedCoupon, ILocationSTO, IWalletSTO} from '../../Models/Server'\r\nimport Style, {sizes} from '../../Style'\r\nimport {colors} from '../../Style/index'\r\n\r\ninterface IProps {\r\n imageUrl: string\r\n onPress?: () => void\r\n}\r\nconst ImageButton: React.FC = ({imageUrl, onPress, children}) => {\r\n const {cardFooter, flexRow, flex1} = Style\r\n\r\n const renderCard = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n {onPress && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n )\r\n }\r\n\r\n if (onPress) {\r\n return {renderCard()}\r\n }\r\n\r\n return renderCard()\r\n}\r\n\r\nexport default ImageButton\r\n","import React from 'react'\r\nimport {TouchableOpacity, View} from 'react-native'\r\nimport {Icon, Text} from 'react-native-elements'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n icon: {name: string; type: string}\r\n text: string\r\n onPress: () => void\r\n}\r\n\r\nconst FooterBarButton: React.FC = ({icon, text, onPress}) => {\r\n return (\r\n \r\n \r\n {text}\r\n \r\n )\r\n}\r\n\r\nexport default FooterBarButton\r\n","import React from 'react'\r\nimport {StyleSheet, TouchableOpacity} from 'react-native'\r\nimport {Icon, Text} from 'react-native-elements'\r\nimport ToprConfig from '../../Config/Tenants/Topr/ToprConfig'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n icon: {name: string; type: string}\r\n onPress: () => void\r\n text?: string\r\n}\r\n\r\nconst FooterBarButton: React.FC = ({onPress, icon, text}) => {\r\n const {dropShadow} = Style\r\n return (\r\n \r\n \r\n {text && (\r\n \r\n {text}\r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport default FooterBarButton\r\n","import React from 'react'\r\nimport {Image, View} from 'react-native'\r\nimport Style from '../../Style'\r\nimport Dot from './Dot'\r\n\r\ninterface IProps {\r\n isLoading: boolean\r\n bordered?: boolean\r\n}\r\nconst MyLoader: React.FC = ({isLoading, bordered}) => {\r\n if (!isLoading) {\r\n return null\r\n }\r\n\r\n const {myLoader} = Style\r\n\r\n const renderDots = () => {\r\n const dots: React.ReactNode[] = []\r\n const count = 3\r\n const duration = 400\r\n\r\n for (let index = 0; index < count; index++) {\r\n //start when prev dot is finished fadein\r\n const delayStart = index * duration\r\n dots.push(\r\n ,\r\n )\r\n }\r\n\r\n return dots\r\n }\r\n\r\n return {renderDots()}\r\n}\r\n\r\nexport default MyLoader\r\n\r\nMyLoader.defaultProps = {\r\n isLoading: false,\r\n bordered: false,\r\n}\r\n","import React from 'react'\r\nimport {\r\n View,\r\n StyleSheet,\r\n TouchableOpacity,\r\n TouchableOpacityProps,\r\n} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\n\r\nimport Style, {colors} from '../../Style'\r\nimport MyLoader from '../Loader/MyLoader'\r\ninterface IProps extends TouchableOpacityProps {\r\n title?: string\r\n isLoading?: boolean\r\n}\r\n\r\nconst FullFooterButton: React.FC = ({\r\n children,\r\n title,\r\n isLoading,\r\n disabled,\r\n ...otherProps\r\n}) => {\r\n const renderContent = () => {\r\n if (isLoading) {\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n if (title) {\r\n return {title}\r\n }\r\n\r\n return children\r\n }\r\n return (\r\n \r\n {renderContent()}\r\n \r\n )\r\n}\r\n\r\nexport default FullFooterButton\r\n\r\nconst style = StyleSheet.create({\r\n cartButtonContainer: {\r\n height: 50,\r\n backgroundColor: colors.main,\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n },\r\n})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport MyButton from './MyButton'\r\nimport Style from '../../Style'\r\nimport {IMyButtonProps} from './MyButton'\r\ninterface IProps extends IMyButtonProps {}\r\n\r\nconst SubmitHeaderButton: React.FC = ({...props}) => {\r\n const {flexEnd} = Style\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\nexport default SubmitHeaderButton\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Badge, Text} from 'react-native-elements'\r\nimport Style, {sizes} from '../../Style'\r\ninterface IProps {\r\n title: string\r\n value: string | number\r\n}\r\n\r\nconst TextBadge: React.FC = ({title, value}) => {\r\n const {badgeStyle, flexRow} = Style\r\n return (\r\n \r\n {title}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default TextBadge\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Icon, ListItem, Text} from 'react-native-elements'\r\nimport Style, {colors} from '../../Style'\r\ninterface IProps {\r\n title: string\r\n}\r\n\r\nconst CardFooter: React.FC = ({title}) => {\r\n const {title: titleStyle} = Style\r\n return (\r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default CardFooter\r\n","import React from 'react'\r\nimport {\r\n TouchableOpacity,\r\n View,\r\n Image,\r\n ImageStyle,\r\n StyleSheet,\r\n} from 'react-native'\r\nimport {Badge, Card, Icon, Text} from 'react-native-elements'\r\n\r\nimport {FormatCurrency} from '../../Helpers/TextHelpers'\r\nimport {GetLocalizedImageUrl} from '../../Helpers/UiHelpers'\r\nimport i18n from '../../i18n'\r\nimport {\r\n ICouponSummarySTO,\r\n IGroupedCoupon,\r\n IWalletSTO,\r\n} from '../../Models/Server'\r\nimport Style, {fullWidthHeightAbs, sizes} from '../../Style'\r\nimport {colors} from '../../Style/index'\r\nimport TextBadge from '../Labels/TextBadge'\r\nimport CardFooter from './CardFooter'\r\n\r\ninterface IProps {\r\n couponSummary: ICouponSummarySTO\r\n onPress: () => void\r\n}\r\nconst CouponSummaryCard: React.FC = ({couponSummary, onPress}) => {\r\n const imageGuid = couponSummary.Coupon.Images[0].Guid\r\n const {backgroundImageStyle} = Style\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default CouponSummaryCard\r\n\r\nconst styles = StyleSheet.create({\r\n backgroundImage: {...fullWidthHeightAbs, opacity: 0.2},\r\n imageContainer: {\r\n height: sizes.image.tileImageHeight,\r\n justifyContent: 'center',\r\n },\r\n})\r\n","import React from 'react'\r\ninterface IProps {}\r\n\r\nconst CardTitle: React.FC = ({children}) => {\r\n return
{children}
\r\n}\r\n\r\nexport default CardTitle\r\n","import React from 'react'\r\nimport CardTitle from '../Web/CardTitle.web'\r\ninterface IProps {\r\n imageUrl: string\r\n text: string\r\n}\r\n\r\nconst ImageCard: React.FC = ({imageUrl, text}) => {\r\n return (\r\n
\r\n
\r\n
\r\n {text}\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default ImageCard\r\n","import React from 'react'\r\nimport {Image, TouchableOpacity} from 'react-native'\r\nimport {Badge, Card, ListItem, Text} from 'react-native-elements'\r\n\r\nimport Style, {sizes} from '../../Style'\r\n\r\ninterface IProps {\r\n title: string\r\n badgeText?: string\r\n imageUrl: string\r\n onPress: () => void\r\n isLast?: boolean\r\n}\r\nconst ImageTextCard: React.FC = ({\r\n title,\r\n badgeText,\r\n imageUrl,\r\n onPress,\r\n isLast,\r\n}) => {\r\n const {badgeStyle} = Style\r\n\r\n const renderBadge = () => {\r\n if (badgeText === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n {renderBadge()}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ImageTextCard\r\n\r\nImageTextCard.defaultProps = {\r\n isLast: false,\r\n}\r\n","import React from 'react'\r\nimport {View} from 'react-native'\r\nimport {Card} from 'react-native-elements'\r\nimport Style, {sizes} from '../../Style'\r\nimport MyButton from '../Buttons/MyButton'\r\n\r\ninterface IProps {\r\n title: string\r\n button?: {\r\n text: string\r\n action: () => void\r\n }\r\n}\r\n\r\nconst ResultCard: React.FC = ({children, title, button}) => {\r\n const renderButton = () => {\r\n if (button === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {title}\r\n \r\n {children}\r\n {renderButton()}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default ResultCard\r\n","import React from 'react'\r\nimport {TouchableOpacity, View, Image} from 'react-native'\r\nimport {Badge, Card, Icon, Text} from 'react-native-elements'\r\n\r\nimport {FormatCurrency, FormatDistance} from '../../Helpers/TextHelpers'\r\nimport {GetFileUrl, GetLocalizedImageUrl} from '../../Helpers/UiHelpers'\r\nimport {IGroupedCoupon, ILocationSTO, IWalletSTO} from '../../Models/Server'\r\nimport Style, {sizes} from '../../Style'\r\nimport {colors} from '../../Style/index'\r\n\r\ninterface IProps {\r\n location: ILocationSTO\r\n onPress: () => void\r\n}\r\nconst LocationCard: React.FC = ({location, onPress}) => {\r\n const {cardFooter, flexRow, flex1, cardFooterColumn} = Style\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {location.Name}\r\n \r\n {FormatDistance(location.Distance)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default LocationCard\r\n","import React, {ReactNode} from 'react'\r\nimport {TextStyle, View, ViewStyle} from 'react-native'\r\nimport Style, {colors, sizes} from '../../Style'\r\nimport {Card, Text, Icon} from 'react-native-elements'\r\nimport {IAlertStatusMessage} from '../../Models/Client'\r\n\r\ninterface IProps {\r\n alertMessage?: IAlertStatusMessage\r\n}\r\n\r\nconst AlertCard: React.FC = ({alertMessage}) => {\r\n if (alertMessage === undefined) {\r\n return null\r\n }\r\n\r\n const {type, message} = alertMessage\r\n\r\n const getStyle = (): {\r\n container: ViewStyle\r\n textStyle: TextStyle\r\n iconStyle: TextStyle\r\n } => {\r\n switch (type) {\r\n case 'error':\r\n return {\r\n container: {\r\n backgroundColor: '#f8d7da',\r\n borderColor: '#f5c6cb',\r\n marginBottom: sizes.padding.md,\r\n },\r\n iconStyle: {color: '#721c24', width: 40},\r\n textStyle: {color: '#721c24'},\r\n }\r\n case 'warning':\r\n return {\r\n container: {\r\n backgroundColor: '#fff3cd',\r\n borderColor: '#ffeeba',\r\n marginBottom: sizes.padding.md,\r\n },\r\n iconStyle: {color: '#856404', width: 40},\r\n textStyle: {color: '#856404'},\r\n }\r\n\r\n default:\r\n return {\r\n container: {\r\n backgroundColor: '#d4edda',\r\n borderColor: '#c3e6cb',\r\n marginBottom: sizes.padding.md,\r\n },\r\n iconStyle: {color: '#155724', width: 40},\r\n textStyle: {color: '#155724'},\r\n }\r\n }\r\n }\r\n const style = getStyle()\r\n const {flexRow, centerRowY} = Style\r\n\r\n const getIcon = (): ReactNode => {\r\n switch (type) {\r\n case 'error':\r\n return (\r\n \r\n )\r\n case 'warning':\r\n return (\r\n \r\n )\r\n\r\n default:\r\n return (\r\n \r\n )\r\n }\r\n }\r\n\r\n return (\r\n \r\n {/* {title} */}\r\n \r\n {getIcon()}\r\n {message}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default AlertCard\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport Style, {colors, sizes} from '../../Style'\r\ninterface IProps {}\r\n\r\nconst TransparentCardHeader: React.FC = ({children}) => {\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default TransparentCardHeader\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Card, ListItem} from 'react-native-elements'\r\nimport {FormatDate, FormatDateTime} from '../../Helpers/DateHelpers'\r\nimport i18n from '../../i18n'\r\nimport Style from '../../Style'\r\nimport TextRow from '../Layout/TextRow'\r\nimport TransparentCardHeader from './TransparentCardHeader'\r\ninterface IProps {\r\n validFrom: Date | string | null | undefined\r\n validTill: Date | string | null | undefined\r\n}\r\n\r\nconst ValidityCard: React.FC = ({validFrom, validTill}) => {\r\n const renderDate = (\r\n label: string,\r\n date: Date | string | null | undefined,\r\n ) => {\r\n if (date === null || date === undefined) {\r\n return null\r\n }\r\n\r\n return \r\n }\r\n\r\n const renderValidity = () => {\r\n if (\r\n (validFrom === null || validFrom === undefined) &&\r\n (validTill === null || validTill === undefined)\r\n ) {\r\n return (\r\n {i18n.t('Common.ValidAlways')}\r\n )\r\n }\r\n\r\n return (\r\n \r\n {renderDate(i18n.t('Common.ValidFrom'), validFrom)}\r\n {renderDate(i18n.t('Common.ValidUntill'), validTill)}\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n {i18n.t('Common.Valid')}\r\n {renderValidity()}\r\n \r\n )\r\n}\r\n\r\nexport default ValidityCard\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Card, Icon, ListItem, Text} from 'react-native-elements'\r\nimport {FormatDateTime} from '../../Helpers/DateHelpers'\r\nimport i18n from '../../i18n'\r\nimport {IUserCouponSTO} from '../../Models/Server'\r\nimport Style, {sizes, colors} from '../../Style'\r\nimport TextRow from '../Layout/TextRow'\r\nimport TransparentCardHeader from './TransparentCardHeader'\r\nimport ValidityCard from './ValidityCard'\r\ninterface IProps {\r\n userCoupon?: IUserCouponSTO\r\n}\r\n\r\nconst CouponInfoCard: React.FC = ({userCoupon}) => {\r\n if (userCoupon === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n {i18n.t('Common.Description')}\r\n \r\n \r\n {userCoupon.Coupon.Description}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default CouponInfoCard\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Card, Icon, ListItem, Text} from 'react-native-elements'\r\nimport {FormatDateTime} from '../../Helpers/DateHelpers'\r\nimport i18n from '../../i18n'\r\nimport {IUserCouponSTO, IUserSavingCardSTO} from '../../Models/Server'\r\nimport Style, {sizes, colors} from '../../Style'\r\nimport TextRow from '../Layout/TextRow'\r\nimport TransparentCardHeader from './TransparentCardHeader'\r\nimport ValidityCard from './ValidityCard'\r\ninterface IProps {\r\n userSavingCard?: IUserSavingCardSTO\r\n}\r\n\r\nconst SavingCardInfoCard: React.FC = ({userSavingCard}) => {\r\n if (userSavingCard === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n {i18n.t('Common.Description')}\r\n \r\n \r\n {userSavingCard.SavingCard.Description}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default SavingCardInfoCard\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React, {ReactNode} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Card, Icon, Text} from 'react-native-elements'\r\nimport i18n from '../../i18n'\r\nimport {IUserSavingCardSTO} from '../../Models/Server'\r\nimport Style, {colors, sizes} from '../../Style'\r\nimport TransparentCardHeader from './TransparentCardHeader'\r\ninterface IProps {\r\n userSavingCard?: IUserSavingCardSTO\r\n}\r\n\r\nconst StampsCard: React.FC = ({userSavingCard}) => {\r\n if (userSavingCard === undefined) {\r\n return null\r\n }\r\n\r\n const {stampsContainer, stampIcon} = Style\r\n\r\n const renderStamps = () => {\r\n const stamps: ReactNode[] = []\r\n\r\n const rowSize = 5\r\n for (let index = 0; index < userSavingCard.SavingCard.StampCount; index++) {\r\n const color =\r\n userSavingCard.StampCount > index ? colors.main : colors.lightGrey\r\n stampIcon.color = color\r\n\r\n stampIcon.marginLeft = index % rowSize == 0 ? 0 : sizes.padding.md\r\n stampIcon.marginTop = index > rowSize - 1 ? sizes.padding.md : 0\r\n const iconStyle = {...stampIcon}\r\n\r\n stamps.push(\r\n ,\r\n )\r\n }\r\n\r\n return stamps\r\n }\r\n return (\r\n <>\r\n {i18n.t('Common.Stamps')}\r\n \r\n {renderStamps()}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default StampsCard\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React from 'react'\r\nimport {\r\n TouchableOpacity,\r\n View,\r\n Image,\r\n ImageStyle,\r\n StyleSheet,\r\n} from 'react-native'\r\nimport {Badge, Card, Icon, Text} from 'react-native-elements'\r\n\r\nimport {FormatCurrency} from '../../Helpers/TextHelpers'\r\nimport {GetFileUrl, GetLocalizedImageUrl} from '../../Helpers/UiHelpers'\r\nimport i18n from '../../i18n'\r\nimport {\r\n ISavingCardSummarySTO,\r\n IGroupedCoupon,\r\n IWalletSTO,\r\n} from '../../Models/Server'\r\nimport Style, {fullWidthHeightAbs, sizes} from '../../Style'\r\nimport {colors} from '../../Style/index'\r\nimport TextBadge from '../Labels/TextBadge'\r\nimport CardFooter from './CardFooter'\r\n\r\ninterface IProps {\r\n savingSummary: ISavingCardSummarySTO\r\n onPress: () => void\r\n}\r\nconst SavingCardSummaryCard: React.FC = ({savingSummary, onPress}) => {\r\n const imageGuid = savingSummary.SavingCard.ImageGuid\r\n const {backgroundImageStyle} = Style\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default SavingCardSummaryCard\r\n","import React from 'react'\r\nimport {Platform, View, ViewStyle} from 'react-native'\r\nimport {Card, Icon, ListItem, Text} from 'react-native-elements'\r\nimport {ISystemMessageViewModel} from '../../Services/Topr.Umbraco/Models'\r\nimport Style, {sizes} from '../../Style'\r\nimport MyButton from '../Buttons/MyButton'\r\nimport ReactMarkdown from 'react-markdown'\r\nimport Markdown from 'react-native-markdown-display'\r\n\r\ninterface IProps {\r\n systemMessages: ISystemMessageViewModel[]\r\n}\r\n\r\nconst SystemMessageCard: React.FC = ({systemMessages}) => {\r\n if (systemMessages.length === 0) {\r\n return null\r\n }\r\n const markDownStyle: ViewStyle = {paddingBottom: sizes.padding.md}\r\n const marginLeft = Platform.OS === 'web' ? 0 : 15\r\n return (\r\n \r\n {/* titel */}\r\n {systemMessages.map((systemMessage, i) => (\r\n \r\n \r\n \r\n \r\n \r\n {systemMessage.Text}\r\n \r\n \r\n ))}\r\n \r\n )\r\n}\r\n\r\nexport default SystemMessageCard\r\n","import React from 'react'\r\nimport {Text, TouchableOpacity, View} from 'react-native'\r\nimport Style, {colors} from '../../Style'\r\ninterface IProps {\r\n onPress: () => void\r\n}\r\n\r\nconst TextButton: React.FC = ({children, onPress}) => {\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default TextButton\r\n","import React from 'react'\r\nimport {View} from 'react-native'\r\nimport {Icon, IconProps, Input} from 'react-native-elements'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n label: string\r\n //icon: IconProps\r\n value: string\r\n}\r\n\r\nconst MyLabelValue: React.FC = ({label, value}) => {\r\n const {flexRow, inputContainer, labelStyle} = Style\r\n return (\r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default MyLabelValue\r\n","import React from 'react'\r\nimport {View, StyleSheet, Text, StyleProp, ViewStyle} from 'react-native'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n label: string\r\n value: string\r\n style?: ViewStyle\r\n isVertical?: boolean\r\n}\r\n\r\nconst MyLabelValueHorizontal: React.FC = ({\r\n label,\r\n value,\r\n style,\r\n isVertical,\r\n}) => {\r\n const {labelStyle, flexRow, justifySpaceBetween} = Style\r\n //const myStyle ={...style}\r\n\r\n const myStyle = [style]\r\n\r\n if (!isVertical) {\r\n myStyle.push(flexRow, justifySpaceBetween)\r\n }\r\n return (\r\n \r\n {label}\r\n {value}\r\n \r\n )\r\n}\r\n\r\nexport default MyLabelValueHorizontal\r\n\r\nMyLabelValueHorizontal.defaultProps = {\r\n isVertical: false,\r\n}\r\n","import React from 'react'\r\nimport {Platform, StyleSheet, TextStyle, View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport {sizes} from '../../Style'\r\ninterface IProps {\r\n inListItem?: boolean\r\n}\r\n\r\nconst VersionLabel: React.FC = ({inListItem}) => {\r\n const version =\r\n Platform.OS === 'android'\r\n ? AppConfig.Tenant.Version.Android\r\n : AppConfig.Tenant.Version.Ios\r\n\r\n const textStyle: TextStyle = inListItem\r\n ? {}\r\n : {\r\n marginHorizontal: sizes.padding.md,\r\n marginBottom: sizes.padding.md,\r\n textAlign: 'right',\r\n }\r\n return (\r\n \r\n {version}\r\n \r\n )\r\n}\r\n\r\nexport default VersionLabel\r\n\r\nVersionLabel.defaultProps = {\r\n inListItem: false,\r\n}\r\n","import React from 'react'\r\nimport {View, StyleSheet, Platform} from 'react-native'\r\nimport Style, {sizes, deviceWidth} from '../../Style'\r\nimport QRCodeSvg from 'react-native-qrcode-svg'\r\nimport QRCodeWeb from 'react-qr-code'\r\n\r\ninterface IProps {\r\n value: string\r\n}\r\n\r\nconst MyQrCode: React.FC = ({value}) => {\r\n const renderWebOrNative = () => {\r\n if (Platform.OS === 'web') {\r\n return \r\n }\r\n\r\n return \r\n }\r\n\r\n const size = deviceWidth - 100\r\n return {renderWebOrNative()}\r\n}\r\n\r\nexport default MyQrCode\r\n\r\nconst style = StyleSheet.create({\r\n qrCodeBorder: {\r\n borderColor: '#000',\r\n borderWidth: 1,\r\n padding: sizes.padding.md,\r\n backgroundColor: '#fff',\r\n },\r\n})\r\n","import {AlertType} from './AlertType'\r\n\r\nexport class MyErrorMessage {\r\n public Code: string\r\n public I18TitleKey: string\r\n public I18MessageKey: string\r\n public AlertType?: AlertType\r\n public Values?: any\r\n\r\n constructor(\r\n code: string,\r\n i18TitleKey: string,\r\n i18MessageKey: string,\r\n alertType?: AlertType,\r\n values?: any,\r\n ) {\r\n this.Code = code\r\n this.I18TitleKey = i18TitleKey\r\n this.I18MessageKey = i18MessageKey\r\n this.Values = values\r\n this.AlertType = alertType\r\n }\r\n}\r\n","import {QrCodeTypes} from '../Enums'\r\nimport {IQrObject} from './IQrObject'\r\nexport class TableQrObject implements IQrObject {\r\n public Type: QrCodeTypes = 'Table'\r\n public Params: {\r\n TableNumber: string\r\n VSamUid: string\r\n }\r\n\r\n constructor(tableNumber: string, vsamUid: string) {\r\n this.Params = {\r\n TableNumber: tableNumber,\r\n VSamUid: vsamUid,\r\n }\r\n }\r\n}\r\n","import {QrCodeTypes} from '../Enums'\r\nimport {IQrObject} from './IQrObject'\r\nexport class TicketQrObject implements IQrObject {\r\n public Type: QrCodeTypes = 'Ticket'\r\n public Params: {\r\n UserEventTicketId: number\r\n UserId: number\r\n }\r\n\r\n constructor(userEventTicketId: number, userId: number) {\r\n this.Params = {\r\n UserEventTicketId: userEventTicketId,\r\n UserId: userId,\r\n }\r\n }\r\n}\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {\r\n DoServiceCall,\r\n Geti18NMessage,\r\n SetFriendlyMessage,\r\n} from '../../../../../Helpers/ServiceHelpers'\r\nimport {IWalletSTO} from '../../../../../Models/Server'\r\nimport {myLog} from '../../../../../Services/Client/LogService'\r\nimport I18n from '../../../../../i18n'\r\nimport {\r\n IAlertStatusMessage,\r\n MyErrorMessage,\r\n ToprError,\r\n} from '../../../../../Models/Client'\r\nimport TokenController from '../../../../../Services/Topr.Core/TokenController'\r\nimport i18n from '../../../../../i18n'\r\nimport {appUiStore} from '../../../../../Mobx/AppUiStore'\r\nimport {store as tokenStore} from '../../../Tokens/Store'\r\nimport {goBack} from '../../../../../Helpers/NavigationHelper'\r\nimport {MyTagEvent} from 'react-native-nfc-manager'\r\nimport {dashboardStore} from '../../../../Dashboard/Dashboard/Store'\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n public AlertStatusMessage?: IAlertStatusMessage = undefined\r\n\r\n public ShowAlertMessage(alertStatusMessage?: IAlertStatusMessage) {\r\n this.AlertStatusMessage = alertStatusMessage\r\n }\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n this.IsSubmitting = false\r\n this.AlertStatusMessage = undefined\r\n }\r\n\r\n public ActivateWithUid(tag: MyTagEvent | null) {\r\n if (tag !== null && tag.id !== undefined) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n\r\n TokenController.ActivateUid(tag.id as string)\r\n .then(() => {\r\n appUiStore.ShowToast({message: i18n.t('AddTokenUid.Form.Succes')})\r\n tokenStore.GetTokens()\r\n dashboardStore.GetWallets()\r\n goBack()\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n //this.AlertStatusMessage = undefined\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n const i18NErrorMessage = Geti18NMessage(toprError, [\r\n new MyErrorMessage(\r\n 'TOKEN_NOT_FOUND',\r\n 'AddTokenUid.Form.ServerErrors.Title',\r\n 'AddTokenUid.Form.ServerErrors.TOKEN_NOT_FOUND',\r\n 'warning',\r\n ),\r\n new MyErrorMessage(\r\n 'TOKEN_ALREADY_ACTIVATED',\r\n 'AddTokenUid.Form.ServerErrors.Title',\r\n 'AddTokenUid.Form.ServerErrors.TOKEN_ALREADY_ACTIVATED',\r\n 'warning',\r\n ),\r\n ])\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n this.AlertStatusMessage = {\r\n type: 'error',\r\n message: i18NErrorMessage,\r\n }\r\n })\r\n })\r\n })\r\n }\r\n }\r\n}\r\nexport const addTokenUidstore = new Store()\r\n","import {makeAutoObservable} from 'mobx'\r\nimport {Platform} from 'react-native'\r\nimport NfcManager, {MyTagEvent, NfcTech} from 'react-native-nfc-manager'\r\nimport {onTagScannedEvent} from '../../../Helpers/NfcHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {addTokenUidstore} from '../../../Screens/Token/AddToken/Components/AddTokenUid/Store'\r\n\r\nexport default class Store {\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n // Pre-step, call this before any NFC operations\r\n private async startNfc() {\r\n await NfcManager.start()\r\n }\r\n private readTag = async (onTagScanned: onTagScannedEvent) => {\r\n let tag: MyTagEvent | null = null\r\n\r\n try {\r\n await NfcManager.requestTechnology([NfcTech.Ndef])\r\n\r\n tag = (await NfcManager.getTag()) as MyTagEvent\r\n\r\n if (tag === null) {\r\n //show alert\r\n\r\n addTokenUidstore.ShowAlertMessage({\r\n type: 'error',\r\n message: i18n.t('AddTokenUid.Form.Uid.Errors.NotFound'),\r\n })\r\n return\r\n }\r\n\r\n // if (tag !== null) {\r\n // tag.ndefStatus = await NfcManager.ndefHandler.getNdefStatus()\r\n // }\r\n\r\n if (Platform.OS === 'ios') {\r\n await NfcManager.setAlertMessageIOS(i18n.t('AddTokenUid.CardScanned'))\r\n }\r\n\r\n onTagScanned(tag)\r\n } catch (ex) {\r\n // for tag reading, we don't actually need to show any error\r\n console.log(ex)\r\n } finally {\r\n console.log('NfcManager.cancelTechnologyRequest()')\r\n NfcManager.cancelTechnologyRequest()\r\n }\r\n\r\n return tag\r\n }\r\n public async Initialize(onTagScanned: onTagScannedEvent) {\r\n await this.startNfc()\r\n\r\n this.readTag(onTagScanned)\r\n }\r\n\r\n public Unmount() {\r\n NfcManager.cancelTechnologyRequest()\r\n }\r\n}\r\nexport const store = new Store()\r\n","import React, {useEffect} from 'react'\r\nimport {onTagScannedEvent} from '../../../Helpers/NfcHelpers'\r\nimport {IAlertStatusMessage} from '../../../Models/Client'\r\nimport AlertCard from '../../Cards/AlertCard'\r\nimport FormInfo from '../../Form/FormInfo'\r\nimport {store} from './Store'\r\nimport NfcManager from 'react-native-nfc-manager'\r\ninterface IProps {\r\n label: string\r\n onTagScanned: onTagScannedEvent\r\n alertStatusMessage?: IAlertStatusMessage\r\n}\r\n\r\nconst NfcScanner: React.FC = ({\r\n label,\r\n onTagScanned,\r\n alertStatusMessage,\r\n}) => {\r\n useEffect(() => {\r\n store.Initialize(onTagScanned)\r\n\r\n return () => {\r\n store.Unmount()\r\n }\r\n }, [null])\r\n\r\n return (\r\n <>\r\n {label}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default NfcScanner\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport Style, {colors, sizes} from '../../Style'\r\ninterface IProps {}\r\n\r\nconst MyListItem: React.FC = ({children}) => {\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default MyListItem\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React from 'react'\r\nimport {View} from 'react-native'\r\n\r\nconst BottomListSpacer: React.FC = ({children}) => {\r\n return \r\n}\r\n\r\nexport default BottomListSpacer\r\n","import React from 'react'\r\ninterface IProps {}\r\n\r\n//dont include for web, so empty modal\r\nconst CodePushUpdatingModal: React.FC = ({children}) => {\r\n return <>\r\n}\r\n\r\nexport default CodePushUpdatingModal\r\n","import React from 'react'\r\nimport {Platform} from 'react-native'\r\nimport AppConfig from '../../Config/AppConfig'\r\n\r\ninterface IProps {}\r\n\r\nconst WebIncludes: React.FC = ({children}) => {\r\n const fontStyles = () => {\r\n if (Platform.OS !== 'web') {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return <>{fontStyles()}\r\n}\r\n\r\nexport default WebIncludes\r\n","import {Platform} from 'react-native'\r\nimport {deviceWidth} from '../Style'\r\n\r\n/*\r\nshow app interface:\r\n - When android or ios\r\n - When Web and the width is mobile (<768)\r\n*/\r\nexport const IsWebAndMobileOrApp = () => {\r\n return Platform.OS !== 'web' || (Platform.OS === 'web' && deviceWidth < 769)\r\n}\r\n","import React, {useEffect, useState} from 'react'\r\nimport {colors} from '../../../Style'\r\n\r\nimport './style.css'\r\ninterface IProps {\r\n isLoading?: boolean\r\n}\r\n\r\nconst PageTile = () => (\r\n \r\n)\r\n\r\nconst PageLoader: React.FC = ({children, isLoading}) => {\r\n const [loaderCss, setLoaderCss] = useState('pageLoader--active')\r\n useEffect(() => {\r\n if (!isLoading) {\r\n setLoaderCss('')\r\n }\r\n }, [isLoading])\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n )\r\n}\r\n\r\nexport default PageLoader\r\n\r\nPageLoader.defaultProps = {\r\n isLoading: false,\r\n}\r\n","import React, {useEffect, useState} from 'react'\r\nimport {Platform, ScrollView} from 'react-native'\r\nimport {GetImageUrl, GetRandSvgImage} from '../../Helpers/UiHelpers'\r\nimport {IsWebAndMobileOrApp} from '../../Helpers/WebHelpers'\r\nimport SvgImages from '../../Images/SvgImages'\r\nimport {deviceHeight} from '../../Style'\r\nimport PageLoader from './PageLoader/PageLoader'\r\ninterface IProps {\r\n imageUrl?: string\r\n padder?: boolean\r\n isLoading?: boolean\r\n}\r\n\r\nconst StockImageLayout: React.FC = ({\r\n children,\r\n imageUrl,\r\n padder,\r\n isLoading,\r\n}) => {\r\n const [backgroundImageUrl, setBackgroundImageUrl] = useState('')\r\n useEffect(() => {\r\n //console.log('render stockLayout')\r\n const randomSvgImage = GetRandSvgImage()\r\n setBackgroundImageUrl(GetImageUrl(imageUrl, randomSvgImage))\r\n }, [null, isLoading])\r\n //only use for web\r\n if (IsWebAndMobileOrApp()) {\r\n //if (Platform.OS !== 'web') {\r\n return <>{children}\r\n }\r\n\r\n const testImage = SvgImages.Valley\r\n\r\n // return (\r\n // <>\r\n // \r\n // \r\n // \r\n // \r\n //
\r\n // \r\n // \r\n\r\n //
\r\n // \r\n // \r\n // \r\n // )\r\n\r\n return (\r\n <>\r\n \r\n {!isLoading && (\r\n
\r\n
\r\n \r\n {children}\r\n {/*
\r\n
\r\n
\r\n
\r\n
\r\n \r\n */}\r\n \r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nStockImageLayout.defaultProps = {\r\n padder: true,\r\n isLoading: false,\r\n}\r\n\r\nexport default StockImageLayout\r\n","import React, {useRef} from 'react'\r\n\r\ninterface IProps {}\r\n\r\nconst HorizontalScroll: React.FC = ({children}) => {\r\n const myDiv = useRef(null)\r\n\r\n return (\r\n {\r\n //console.log('wheel', e.deltaY)\r\n if (myDiv && myDiv.current) {\r\n myDiv.current.scrollTo({left: myDiv.current.scrollLeft + e.deltaY})\r\n }\r\n }}\r\n onScroll={(e) => {\r\n // console.log('scroll', myDiv?.current?.scrollLeft)\r\n e.stopPropagation()\r\n }}\r\n className=\"h-scroll pb-4\">\r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport default HorizontalScroll\r\n","import React, {ReactNode} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport AppImages from '../../Images/AppImages'\r\nimport PageLoader from './PageLoader/PageLoader'\r\n\r\ninterface IProps {\r\n title?: string\r\n leftContentCenter: ReactNode\r\n leftContentBottom?: ReactNode\r\n noPadding?: boolean\r\n}\r\n\r\nconst LeftColumnLayout: React.FC = ({\r\n title,\r\n children,\r\n leftContentCenter,\r\n leftContentBottom,\r\n noPadding,\r\n}) => {\r\n const renderLeftBottom = () => {\r\n if (leftContentBottom === undefined) {\r\n return null\r\n }\r\n\r\n return
{leftContentBottom}
\r\n }\r\n\r\n const renderTitle = () => {\r\n if (title === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n
\r\n

{title}

\r\n
\r\n )\r\n }\r\n\r\n const noPaddingCss = noPadding ? 'no-padding' : ''\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
{leftContentCenter}
\r\n {renderLeftBottom()}\r\n
\r\n
\r\n {renderTitle()}\r\n {/*
{children}
*/}\r\n {children}\r\n
\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default LeftColumnLayout\r\n\r\nLeftColumnLayout.defaultProps = {\r\n noPadding: false,\r\n}\r\n","import React from 'react'\r\n\r\ninterface IProps {\r\n isWhite?: boolean\r\n}\r\n\r\nconst Container: React.FC = ({children, isWhite}) => {\r\n return (\r\n
\r\n
{children}
\r\n
\r\n )\r\n}\r\n\r\nexport default Container\r\n\r\nContainer.defaultProps = {\r\n isWhite: false,\r\n}\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Tab} from 'react-native-elements'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n tabs: string[]\r\n onChange: (index: number) => void\r\n}\r\n\r\nconst MyTab: React.FC = ({tabs, onChange}) => {\r\n const [index, setIndex] = React.useState(0)\r\n\r\n const renderTabs = () => {\r\n return tabs.map((tab, key) => {\r\n return (\r\n \r\n )\r\n })\r\n }\r\n\r\n const {tabButtonStyle} = Style\r\n\r\n return (\r\n {\r\n setIndex(value)\r\n onChange(value)\r\n }}\r\n indicatorStyle={{backgroundColor: AppConfig.Tenant.MainColor}}>\r\n {renderTabs()}\r\n \r\n )\r\n}\r\n\r\nexport default MyTab\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Icon} from 'react-native-elements'\r\nimport Style from '../../Style'\r\ninterface IProps {\r\n isLoading: boolean\r\n}\r\n\r\nconst Spinner: React.FC = ({children, isLoading}) => {\r\n if (isLoading) {\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return <>{children}\r\n}\r\n\r\nexport default Spinner\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {ITransactionSTO, IWalletSTO} from '../../../Models/Server'\r\nimport {ILoyaltyTransactionItemSTO} from '../../../Models/Server/Wallet/ILoyaltyTransactionItemSTO'\r\nimport WalletController from '../../../Services/Topr.Core/WalletController'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public IsTransactionsLoading = true\r\n public Transactions: ITransactionSTO[] = []\r\n\r\n public get FilteredTransactions(): ITransactionSTO[] {\r\n if (this.SearchText === '') {\r\n return this.Transactions\r\n }\r\n\r\n return this.Transactions.filter((t) => {\r\n if (t.ActivationCode !== null) {\r\n if (t.ActivationCode.startsWith(this.SearchText.trim())) {\r\n return t.ActivationCode.startsWith(this.SearchText.trim())\r\n }\r\n }\r\n\r\n //search description\r\n if (t.Description !== null) {\r\n return t.Description.toLowerCase()\r\n .trim()\r\n .startsWith(this.SearchText.toLocaleLowerCase().trim())\r\n }\r\n\r\n return false\r\n })\r\n }\r\n\r\n public IsPdfLoading = false\r\n public IsTransactionItemsLoading = false\r\n public TransactionItems: ILoyaltyTransactionItemSTO[] = []\r\n public IsTransactionItemsModalVisible = false\r\n public IsReportModalVisible = false\r\n\r\n public HasMore = true\r\n public HasMoreLoading = false\r\n\r\n public SearchVisible = false\r\n public SearchText = ''\r\n\r\n public Wallet?: IWalletSTO = undefined\r\n public CurrencyGuid?: string = undefined\r\n private Skip = 0\r\n public Take = 50\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize(currencyGuid: string) {\r\n this.Skip = 0\r\n this.CurrencyGuid = currencyGuid\r\n this.IsTransactionsLoading = true\r\n this.IsTransactionItemsLoading = false\r\n this.IsTransactionItemsModalVisible = false\r\n this.TransactionItems = []\r\n this.IsPdfLoading = false\r\n this.GetWallet(currencyGuid)\r\n this.GetTransactions(true)\r\n }\r\n\r\n public ToggleSearch() {\r\n this.SearchVisible = !this.SearchVisible\r\n }\r\n\r\n public onSearchTextChange(text: string) {\r\n this.SearchText = text\r\n }\r\n\r\n public NextPage() {\r\n if (!this.HasMoreLoading && this.HasMore) {\r\n this.Skip += this.Take\r\n this.GetTransactions(false)\r\n }\r\n }\r\n\r\n public GetWallet(currencyGuid: string) {\r\n this.IsLoading = true\r\n\r\n WalletController.GetWallet(currencyGuid)\r\n .then((wallet) => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n this.Wallet = wallet\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n }\r\n\r\n public GetTransactions(reload: boolean) {\r\n this.HasMoreLoading = true\r\n\r\n if (reload) {\r\n this.Skip = 0\r\n }\r\n\r\n WalletController.GetTransactions(this.CurrencyGuid, this.Skip, this.Take)\r\n .then((transactions) => {\r\n runInAction(() => {\r\n if (reload) {\r\n this.Transactions = transactions\r\n } else {\r\n this.Transactions.push(...transactions)\r\n }\r\n this.IsTransactionsLoading = false\r\n this.HasMoreLoading = false\r\n this.HasMore = transactions.length === this.Take\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsTransactionsLoading = false\r\n this.HasMoreLoading = false\r\n })\r\n })\r\n }\r\n\r\n public SetisPdfLoading(isPdfLoading: boolean) {\r\n this.IsPdfLoading = isPdfLoading\r\n }\r\n\r\n public ToggleIsReportModalVisible(isVisible: boolean) {\r\n this.IsReportModalVisible = isVisible\r\n }\r\n\r\n public GetTransactionPdfWeb() {\r\n //used in web\r\n this.IsPdfLoading = true\r\n WalletController.GetTransactionsPdfWeb(this.CurrencyGuid)\r\n .then(() => {\r\n runInAction(() => {\r\n this.IsPdfLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsPdfLoading = false\r\n })\r\n })\r\n }\r\n\r\n public GetTransactionPeriodPdfWeb(fromDate: Date, tillDate: Date) {\r\n //used in web\r\n this.IsPdfLoading = true\r\n WalletController.GetTransactionsPeriodPdfWeb(\r\n this.CurrencyGuid,\r\n fromDate,\r\n tillDate,\r\n )\r\n .then(() => {\r\n runInAction(() => {\r\n this.IsPdfLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsPdfLoading = false\r\n })\r\n })\r\n }\r\n\r\n public ShowTransactionItemsModal(loyaltyTransactionGuid: string) {\r\n this.IsTransactionItemsLoading = true\r\n this.IsTransactionItemsModalVisible = true\r\n this.TransactionItems = []\r\n\r\n WalletController.GetTransactionItems(loyaltyTransactionGuid)\r\n .then((result) => {\r\n runInAction(() => {\r\n this.TransactionItems = result\r\n this.IsTransactionItemsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsTransactionItemsLoading = false\r\n this.IsTransactionItemsModalVisible = false\r\n })\r\n })\r\n }\r\n\r\n public HideTransactionItemsModal() {\r\n runInAction(() => {\r\n this.IsTransactionItemsModalVisible = false\r\n })\r\n }\r\n}\r\n\r\nexport const walletDetailsStore = new Store()\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {CreateAppLinkUrl} from '../../Helpers/UrlHelpers'\r\nimport {AppLinkTypes, PaymentOrderStatusTypes} from '../../Models/Client/Enums'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n TopUpStart: (\r\n chargeMethodGuid: string,\r\n amount: number,\r\n currencyGuid: string,\r\n ) => {\r\n type Response = {\r\n RedirectUrl: string\r\n PaymentOrderGuid: string\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n Amount: amount,\r\n AppReturnUrl: CreateAppLinkUrl(\r\n AppLinkTypes.ConfirmPaymentOrder,\r\n currencyGuid,\r\n ),\r\n }\r\n\r\n //console.log(currencyGuid, data.AppReturnUrl, chargeMethodGuid)\r\n\r\n axiosAuthUser\r\n .post(`api/v2/wallet/topup/${chargeMethodGuid}/start`, data)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n PaymentOrderStatus: (paymentOrderGuid?: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/paymentorder/status/${paymentOrderGuid}`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n Withdraw: (\r\n currencyGuid: string,\r\n amount: number,\r\n iban: string,\r\n name: string,\r\n email: string,\r\n ) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n Name: name,\r\n Iban: iban,\r\n Amount: amount,\r\n Email: email,\r\n }\r\n axiosAuthUser\r\n .post(`api/v1/wallet/${currencyGuid}/withdraw`, data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n SendMoney: (\r\n currencyGuid: string | undefined,\r\n amount: number,\r\n toUserGuid: string | undefined,\r\n description: String,\r\n ) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n ToUserGuid: toUserGuid,\r\n CurrencyGuid: currencyGuid,\r\n Amount: amount,\r\n Description: description,\r\n }\r\n axiosAuthUser\r\n .post(`api/v1/wallet/sendmoney`, data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {\r\n IConfirmPaymentRequest,\r\n IStartBasicUserPaymentRequest,\r\n} from '../../Models/Server'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n GetBrancheOfficeId: (vsamGuid: string) => {\r\n return new Promise(async (resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/arantek/branch?SamUid=${vsamGuid}`)\r\n .then((response: AxiosResponse<{BranchId: string}>) => {\r\n resolve(response.data.BranchId)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n StartPayment: (\r\n currencyCode: string,\r\n request: IStartBasicUserPaymentRequest,\r\n ) => {\r\n return new Promise(async (resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/arantek/payment/${currencyCode}/start`, request)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n\r\n ConfirmPayment: (\r\n transactionguid: string,\r\n request: IConfirmPaymentRequest,\r\n ) => {\r\n return new Promise(async (resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/arantek/payment/${transactionguid}/confirm`, request)\r\n .then((response: AxiosResponse) => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {makeAutoObservable, runInAction, toJS} from 'mobx'\r\nimport {DoServiceCall, Geti18NMessage} from '../../../../Helpers/ServiceHelpers'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport i18n from '../../../../i18n'\r\nimport {\r\n IMyOrderRequestLine,\r\n IOrderResult,\r\n OrderLineType,\r\n} from '../../../../Models/InzziiApi'\r\nimport WalletController from '../../../../Services/Topr.Core/WalletController'\r\nimport {\r\n IStartBasicUserPaymentRequest,\r\n IWalletSTO,\r\n} from '../../../../Models/Server'\r\nimport {ToprError} from '../../../../Models/Client'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {goBack, navigate} from '../../../../Helpers/NavigationHelper'\r\nimport {orderOnlineStore} from '../Store'\r\nimport {ITransactionItemSTOV2} from '../../../../Models/Server/Payment/ITransactionItemSTOV2'\r\nimport ArantekController from '../../../../Services/Topr.Core/ArantekController'\r\nimport RestaurantController from '../../../../Services/Inzii.Api/RestaurantController'\r\nimport {persistedStore} from '../../../../Mobx'\r\nimport {FormatToEuro} from '../../../../Helpers/TextHelpers'\r\nimport {dashboardStore} from '../../../Dashboard/Dashboard/Store'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public IsSubmitting = false\r\n public Wallets: IWalletSTO[] = []\r\n public SelectedWallet?: IWalletSTO = undefined\r\n\r\n public get MissingAmountBalance() {\r\n if (this.SelectedWallet) {\r\n return (\r\n (this.SelectedWallet.Balance -\r\n orderOnlineStore.TotalAmountOrder * 100) *\r\n -1\r\n )\r\n }\r\n return 0\r\n }\r\n\r\n public get HasEnoughBalance(): boolean {\r\n return this.MissingAmountBalance <= 0\r\n }\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n this.IsLoading = true\r\n this.IsSubmitting = false\r\n\r\n WalletController.GetWalletsInzzii(orderOnlineStore.VSamUid)\r\n .then((wallets) => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n this.Wallets = wallets\r\n\r\n if (wallets.length > 0) {\r\n this.SetSelectedWallet(wallets[0])\r\n\r\n //if enough balance, do payment straight away\r\n if (this.HasEnoughBalance) {\r\n appUiStore.ShowAuthenticateConfirm({\r\n OnOk: () => {\r\n orderPaymentStore.CreateTableOrderAndDoPayment()\r\n },\r\n Message: i18n.t('OrderOnline.PaymentForm.AuthenticateAction', {\r\n amount: orderOnlineStore.TotalAmountOrderFormatted,\r\n }),\r\n })\r\n }\r\n }\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n const errorMessage = Geti18NMessage(toprError)\r\n appUiStore.ShowToast({message: errorMessage, type: 'danger'})\r\n goBack()\r\n })\r\n }\r\n\r\n public SetSelectedWallet(wallet: IWalletSTO) {\r\n this.SelectedWallet = wallet\r\n }\r\n\r\n private GetArticleGroup(orderRequestLine: IMyOrderRequestLine) {\r\n const {AllArticles, Departments} = orderOnlineStore\r\n\r\n const getArticleGroupPlu = () => {\r\n let result = 'NoArticleGroup'\r\n const article = AllArticles.find(\r\n (x) => x.number === orderRequestLine.random,\r\n )\r\n if (article) {\r\n const department = Departments.find(\r\n (x) => x.number === article.departmentNumber,\r\n )\r\n if (department) {\r\n result = department.name\r\n }\r\n }\r\n\r\n return result\r\n }\r\n\r\n switch (orderRequestLine.type) {\r\n case OrderLineType.Plu:\r\n //orderOnlineStore.Departments.fin\r\n return getArticleGroupPlu()\r\n case OrderLineType.ModifierWithPrice:\r\n case OrderLineType.Modifier:\r\n return i18n.t('OrderOnline.CondimentArticleGroup')\r\n\r\n default:\r\n return 'NoArticleGroup'\r\n }\r\n }\r\n\r\n private ConvertToTransactionItem(\r\n lineNumber: number,\r\n orderRequestLine: IMyOrderRequestLine,\r\n ): ITransactionItemSTOV2 {\r\n const result: ITransactionItemSTOV2 = {\r\n ArticleGroup: this.GetArticleGroup(orderRequestLine),\r\n ArticleCode: orderRequestLine.random,\r\n Description: orderRequestLine.name,\r\n LineNumber: lineNumber,\r\n Quantity: orderRequestLine.quantity,\r\n UnitPrice: orderRequestLine.price * 100,\r\n VAT: 0,\r\n }\r\n\r\n return result\r\n }\r\n\r\n //Create from OrderRequestLines\r\n private CreateTransactionItems() {\r\n const {OrderRequestLines} = orderOnlineStore\r\n const transactionItems: ITransactionItemSTOV2[] = []\r\n\r\n let lineNumber = 1\r\n OrderRequestLines.forEach((orderRequestLineQuest) => {\r\n transactionItems.push(\r\n this.ConvertToTransactionItem(lineNumber, orderRequestLineQuest),\r\n )\r\n lineNumber++\r\n\r\n //add condiments, check price, burger select\r\n if (\r\n orderRequestLineQuest.linkedOrderLines &&\r\n orderRequestLineQuest.linkedOrderLines.length > 0\r\n ) {\r\n orderRequestLineQuest.linkedOrderLines.forEach((linkedOrderLine) => {\r\n //only lines with a price\r\n if (linkedOrderLine.type === OrderLineType.ModifierWithPrice) {\r\n transactionItems.push(\r\n this.ConvertToTransactionItem(lineNumber, linkedOrderLine),\r\n )\r\n lineNumber++\r\n }\r\n })\r\n }\r\n })\r\n\r\n return transactionItems\r\n }\r\n\r\n public CreateTableOrderAndDoPayment() {\r\n runInAction(() => (this.IsSubmitting = true))\r\n RestaurantController.TableOrder(\r\n orderOnlineStore.User?.accessToken,\r\n orderOnlineStore.BranchofficeId,\r\n orderOnlineStore.TableNumber,\r\n orderOnlineStore.OrderRequestLines,\r\n 1, //gateway pending payment\r\n '',\r\n )\r\n .then((orderResult) => {\r\n this.DoArantekPayment(orderResult)\r\n })\r\n .catch(this.HandleErrorCatch)\r\n .finally(() => {\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n }\r\n\r\n private HandleErrorCatch = (toprError: ToprError) => {\r\n // other errors\r\n if (toprError.Code !== 'LOYALTYWALLET_INSUFFICIENT_BALANCE') {\r\n const errorMessage = Geti18NMessage(toprError)\r\n appUiStore.ShowAlert({\r\n message: errorMessage,\r\n type: 'error',\r\n title: i18n.t('OrderOnline.PaymentForm.ServerErrors.Title'),\r\n })\r\n }\r\n }\r\n\r\n public DoArantekPayment(createTableOrderResult: IOrderResult) {\r\n if (this.SelectedWallet) {\r\n const {TotalAmountOrder, TableNumber, VSamUid} = orderOnlineStore\r\n // const amountCents =\r\n // this.SelectedWallet.Currency.Code === 'HBC'\r\n // ? TotalAmountOrder * 300\r\n // : TotalAmountOrder * 100\r\n\r\n const amountCents = TotalAmountOrder * 100\r\n\r\n const description = i18n\r\n .t('OrderOnline.PaymentForm.PaymentOrderDescriptionTable', {\r\n tableNumber: TableNumber,\r\n })\r\n .toString()\r\n\r\n const startPaymentRequest: IStartBasicUserPaymentRequest = {\r\n Amount: amountCents,\r\n Description: description,\r\n Reference: createTableOrderResult.orderId,\r\n SamUID: VSamUid,\r\n TransactionItems: this.CreateTransactionItems(),\r\n }\r\n\r\n runInAction(() => (this.IsSubmitting = true))\r\n\r\n //1 start\r\n ArantekController.StartPayment(\r\n this.SelectedWallet.Currency.Code,\r\n startPaymentRequest,\r\n )\r\n .then((loyaltyTransactionGuid: string) => {\r\n //2 confirm right away\r\n ArantekController.ConfirmPayment(loyaltyTransactionGuid, {\r\n Amount: amountCents,\r\n SamUID: VSamUid,\r\n })\r\n .then(() => {\r\n const accessToken =\r\n orderOnlineStore.User !== undefined\r\n ? orderOnlineStore.User.accessToken\r\n : ''\r\n\r\n //3 set payment complete @ Innzzii\r\n RestaurantController.CompletePayment(\r\n accessToken,\r\n createTableOrderResult.orderId,\r\n )\r\n .then(() => {\r\n if (orderOnlineStore.Restaurant) {\r\n runInAction(() => (this.IsSubmitting = false))\r\n\r\n dashboardStore.GetWallets()\r\n\r\n appUiStore.ShowAlert({\r\n message: i18n.t(\r\n 'OrderOnline.PaymentForm.Success.Message',\r\n {\r\n orderNumber: createTableOrderResult.orderNumber,\r\n },\r\n ),\r\n type: 'success',\r\n title: i18n.t('OrderOnline.PaymentForm.Success.Title'),\r\n additionalCloseAction: () => {\r\n navigate('dashboard')\r\n navigate('placedOrders')\r\n },\r\n })\r\n }\r\n })\r\n .catch(this.HandleErrorCatch)\r\n })\r\n .catch(this.HandleErrorCatch)\r\n })\r\n .catch(this.HandleErrorCatch)\r\n }\r\n }\r\n}\r\n\r\nexport const orderPaymentStore = new Store()\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {ICurrencyChargeMethodSTO, IWalletSTO} from '../../../Models/Server'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport I18n from '../../../i18n'\r\nimport WalletController from '../../../Services/Topr.Core/WalletController'\r\nimport {Linking} from 'react-native'\r\nimport {CreateAppLinkUrl, GetAppLinkFromUrl} from '../../../Helpers/UrlHelpers'\r\nimport {AppLinks} from '../../../Models/Client/AppLinks'\r\nimport {AlertType} from '../../../Models/Client/ErrorHandling/AlertType'\r\nimport {goBack, navigate} from '../../../Helpers/NavigationHelper'\r\nimport {walletDetailsStore} from '../Details/Store'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {IAlertMessage, MyErrorMessage, ToprError} from '../../../Models/Client'\r\nimport TransactionController from '../../../Services/Topr.Core/TransactionController'\r\nimport {GetRandStockImage} from '../../../Helpers/UiHelpers'\r\nimport {orderOnlineStore} from '../../Location/OrderOnline/Store'\r\nimport {\r\n AppLinkTypes,\r\n ChargeSuccessReturn,\r\n PaymentOrderStatusTypes,\r\n} from '../../../Models/Client/Enums'\r\nimport i18n from '../../../i18n'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport {orderPaymentStore} from '../../Location/OrderOnline/OrderPayment/Store'\r\nimport {persistedStore} from '../../../Mobx'\r\n\r\nexport type ChargeFormData = {\r\n name: string\r\n amount: number // cents\r\n}\r\n\r\nexport type HbChargeValue = {\r\n Amount: number\r\n Text: string\r\n}\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n public IsChargeMethodsLoading = true\r\n public ChargeMethods: ICurrencyChargeMethodSTO[] = []\r\n public SelectedChargeMethod?: ICurrencyChargeMethodSTO = undefined\r\n\r\n public HBChargeValues: HbChargeValue[] = [\r\n {\r\n Amount: 10,\r\n Text: '10 Munten (€ 30,-)',\r\n },\r\n {\r\n Amount: 20,\r\n Text: '20 Munten (€ 60,-)',\r\n },\r\n {\r\n Amount: 30,\r\n Text: '30 Munten (€ 90,-)',\r\n },\r\n ]\r\n public SelectedHBChargeValue?: HbChargeValue = undefined\r\n\r\n private CurrencyGuid = ''\r\n private ChargeSuccessReturn: ChargeSuccessReturn =\r\n ChargeSuccessReturn.WalletDetails\r\n\r\n public CheckingPaymentOrder = false\r\n private RetryCount = 0\r\n private MaxRetryCount = 20\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize(\r\n currencyGuid: string,\r\n chargeSuccessReturn: ChargeSuccessReturn,\r\n ) {\r\n this.ChargeMethods = []\r\n this.SelectedChargeMethod = undefined\r\n this.CurrencyGuid = currencyGuid\r\n this.ChargeSuccessReturn = chargeSuccessReturn\r\n persistedStore.SetPaymentOrderGuid(undefined)\r\n this.GetCurrencyChargeMethods(currencyGuid)\r\n this.SelectedHBChargeValue = this.HBChargeValues[0]\r\n\r\n //console.log('Charge Initialize', this.CurrencyGuid)\r\n }\r\n\r\n private GetCurrencyChargeMethods(currencyGuid: string) {\r\n DoServiceCall(() => {\r\n this.IsChargeMethodsLoading = true\r\n WalletController.GetChargeMethods(currencyGuid)\r\n .then((chargeMethods) => {\r\n //\r\n runInAction(() => {\r\n const sortedChargeMethods = chargeMethods.slice().sort((a, b) => {\r\n if (a.Name < b.Name) {\r\n return 1\r\n }\r\n if (a.Name > b.Name) {\r\n return -1\r\n }\r\n return 0\r\n })\r\n if (sortedChargeMethods.length >= 1) {\r\n this.SetSelectedChargeMethod(sortedChargeMethods[0])\r\n }\r\n\r\n //test\r\n // sortedChargeMethods.push({\r\n // Name: 'sd',\r\n // Guid: '123',\r\n // IconFile: '',\r\n // TransactionCostsFixed: 0,\r\n // TransactionCostsPercentage: 2.5,\r\n // })\r\n\r\n // console.log(sortedChargeMethods)\r\n this.ChargeMethods = sortedChargeMethods\r\n this.IsChargeMethodsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => (this.IsChargeMethodsLoading = false))\r\n })\r\n })\r\n }\r\n\r\n public SetSelectedChargeMethod(chargeMethod: ICurrencyChargeMethodSTO) {\r\n this.SelectedChargeMethod = chargeMethod\r\n }\r\n\r\n public SetSelectedHBChargeValue(hbChargeValue: HbChargeValue) {\r\n this.SelectedHBChargeValue = hbChargeValue\r\n }\r\n\r\n public GoBack() {\r\n //return to order\r\n\r\n console.log('goback', ChargeSuccessReturn[this.ChargeSuccessReturn])\r\n //update dashboard\r\n dashboardStore.Initialize()\r\n if (this.ChargeSuccessReturn === ChargeSuccessReturn.OrderPayment) {\r\n orderPaymentStore.Initialize()\r\n navigate('orderOnline', {screen: 'orderPayment'} as any)\r\n } else {\r\n walletDetailsStore.Initialize(this.CurrencyGuid)\r\n navigate('walletDetails', {currencyGuid: this.CurrencyGuid})\r\n }\r\n }\r\n\r\n public SetCurrencyGuid(currencyGuid: string) {\r\n this.CurrencyGuid = currencyGuid\r\n }\r\n\r\n public InitCheckPaymentOrder() {\r\n this.RetryCount = 0\r\n this.CheckTopUpCompletion()\r\n }\r\n\r\n //after ideal (or other payment is complete), our timer has to do the actual topup to the wallet\r\n //check the status of this via the paymentorderGuid\r\n public CheckTopUpCompletion() {\r\n this.CheckingPaymentOrder = true\r\n\r\n if (this.RetryCount < this.MaxRetryCount) {\r\n TransactionController.PaymentOrderStatus(persistedStore.PaymentOrderGuid)\r\n .then((paymentOrderStatusType) => {\r\n runInAction(() => this.RetryCount++)\r\n\r\n const enumNumber = PaymentOrderStatusTypes[\r\n paymentOrderStatusType\r\n ] as any\r\n\r\n //check invalid PaymentOrderStatusTypes < 0\r\n if (enumNumber < 0) {\r\n appUiStore.ShowAlert({\r\n type: 'warning',\r\n message: i18n.t(\r\n `Charge.Form.ServerErrors.${paymentOrderStatusType}`,\r\n ),\r\n title: i18n.t(`Charge.Form.ServerErrors.Title`),\r\n additionalCloseAction: () => {\r\n runInAction(() => (this.CheckingPaymentOrder = false))\r\n this.GoBack()\r\n },\r\n })\r\n } else {\r\n if (\r\n paymentOrderStatusType ===\r\n PaymentOrderStatusTypes[PaymentOrderStatusTypes.Processed]\r\n ) {\r\n appUiStore.ShowAlert({\r\n type: 'success',\r\n message: i18n.t(`Charge.Form.Success.Message`),\r\n title: i18n.t(`Charge.Form.Success.Title`),\r\n })\r\n\r\n this.GoBack()\r\n runInAction(() => (this.CheckingPaymentOrder = false))\r\n } else {\r\n setTimeout(() => {\r\n this.CheckTopUpCompletion()\r\n }, 1000)\r\n }\r\n }\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => (this.CheckingPaymentOrder = false))\r\n SetFriendlyMessage(toprError, (message) => {\r\n appUiStore.ShowAlert({\r\n type: 'warning',\r\n message,\r\n title: i18n.t(`Charge.Form.ServerErrors.Title`),\r\n additionalCloseAction: () => {\r\n runInAction(() => (this.CheckingPaymentOrder = false))\r\n this.GoBack()\r\n },\r\n })\r\n })\r\n })\r\n } else {\r\n appUiStore.ShowAlert({\r\n type: 'warning',\r\n message: 'Verwerking duurt te lang, neem contact op met de helpdesk ',\r\n title: i18n.t(`Charge.Form.ServerErrors.Title`),\r\n additionalCloseAction: () => this.GoBack(),\r\n })\r\n }\r\n }\r\n\r\n public Topup(\r\n chargeMethodGuid: string,\r\n amount: number,\r\n onError: (errorMessage: string) => void,\r\n ) {\r\n //wallet/details/a63e57dc-42ba-4635-9a3f-059087fe9a68/confirmPaymentOrder/status\r\n\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n\r\n TransactionController.TopUpStart(\r\n chargeMethodGuid,\r\n amount,\r\n this.CurrencyGuid,\r\n )\r\n .then((response) => {\r\n persistedStore.SetPaymentOrderGuid(response.PaymentOrderGuid)\r\n Linking.openURL(response.RedirectUrl)\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n console.log('toprError', toprError)\r\n SetFriendlyMessage(toprError, onError, [\r\n new MyErrorMessage(\r\n 'CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED',\r\n 'Charge.Form.ServerErrors.Title',\r\n 'Charge.Form.ServerErrors.CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED',\r\n //null,\r\n //'warning'\r\n ),\r\n ])\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n }\r\n}\r\nexport const chargeStore = new Store()\r\n","import * as Linking from 'expo-linking'\r\nimport {makeAutoObservable, runInAction} from 'mobx'\r\nimport {Platform} from 'react-native'\r\nimport {navigate} from '../Helpers/NavigationHelper'\r\nimport {GetAppLinkFromUrl} from '../Helpers/UrlHelpers'\r\nimport {appUiStore} from '../Mobx/AppUiStore'\r\nimport {AppLinkTypes} from '../Models/Client/Enums'\r\nimport {AlertType} from '../Models/Client/ErrorHandling/AlertType'\r\nimport {chargeStore} from '../Screens/Wallet/Charge/Store'\r\nimport {myLog} from '../Services/Client/LogService'\r\nimport i18n from '../i18n'\r\n\r\nexport default class Store {\r\n private Url = ''\r\n public IsProcessing = true\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n if (Platform.OS !== 'web') {\r\n this.IsProcessing = true\r\n this.CheckInitialUrl()\r\n return this.SetUrlListener()\r\n }\r\n\r\n return () => {}\r\n }\r\n\r\n private CheckInitialUrl() {\r\n //when app was closed and is opened from other app\r\n Linking.getInitialURL()\r\n .then((url) => {\r\n if (url && this.Url !== url) {\r\n //myLog.info('Initial DeepLink Url', url)\r\n this.ProcessUrl(url)\r\n runInAction(() => {\r\n this.Url = url // save url to check for new Initial links\r\n })\r\n }\r\n })\r\n .catch((err) => myLog.error('processUrl: An error occurred', err))\r\n }\r\n\r\n private SetUrlListener() {\r\n //when app was in background and is opened from other app\r\n Linking.addEventListener('url', (event) => this.HandleUrlListener(event))\r\n\r\n return () => {\r\n Linking.removeEventListener('url', (event) =>\r\n this.HandleUrlListener(event),\r\n )\r\n }\r\n }\r\n\r\n private HandleUrlListener(event: {url: string}) {\r\n console.log('LinkingStore HandleUrlListener:' + event.url)\r\n this.ProcessUrl(event.url)\r\n }\r\n\r\n public HandlePaymentOrderStatus(status: string, currencyGuid: string) {\r\n let title = i18n.t(`Charge.Form.Success.Title`)\r\n let type: AlertType = 'success'\r\n let message = i18n.t(`Charge.Form.Success.Message`)\r\n\r\n chargeStore.SetCurrencyGuid(currencyGuid)\r\n\r\n if (status === 'PAYMENT_COMPLETE') {\r\n chargeStore.InitCheckPaymentOrder()\r\n } else {\r\n title = i18n.t(`Charge.Form.ServerErrors.Title`)\r\n message = i18n.t(`Charge.Form.ServerErrors.${status}`)\r\n type = 'warning'\r\n\r\n appUiStore.ShowAlert({\r\n type,\r\n message,\r\n title,\r\n })\r\n }\r\n\r\n //success\r\n //check payment OrderId\r\n }\r\n\r\n private HandleEmandateResult(eMandateStatus: string) {\r\n const getAlertType = (): AlertType => {\r\n switch (eMandateStatus) {\r\n case 'EMANDATE_SUCCESS':\r\n return 'success'\r\n case 'EMANDATE_PENDING':\r\n case 'EMANDATE_CANCELLED':\r\n case 'EMANDATE_EXPIRED':\r\n return 'warning'\r\n\r\n default:\r\n return 'error'\r\n }\r\n }\r\n\r\n appUiStore.ShowAlert({\r\n type: getAlertType(),\r\n message: i18n.t(`AutomaticCharge.Form.EMandateResults.${eMandateStatus}`),\r\n title: i18n.t('AutomaticCharge.Form.EMandateResults.Title'),\r\n })\r\n }\r\n\r\n public ProcessUrl(url: string) {\r\n this.IsProcessing = true\r\n const appLink = GetAppLinkFromUrl(url)\r\n\r\n //console.log('ProcessUrl', url)\r\n if (appLink !== undefined) {\r\n switch (appLink.DeepLink) {\r\n case AppLinkTypes.RegisterConfirm:\r\n const userGuid: string = appLink.Parameters[0]\r\n navigate('confirm', {userGuid})\r\n\r\n break\r\n case AppLinkTypes.ConfirmChangeEmail:\r\n const requestIdentifier: string = appLink.Parameters[0]\r\n navigate('confirmChangeEmail', {requestIdentifier})\r\n break\r\n case AppLinkTypes.ResetPassword:\r\n const resetPasswordRequestIdentifier: string = appLink.Parameters[0]\r\n navigate('resetPassword', {\r\n requestIdentifier: resetPasswordRequestIdentifier,\r\n })\r\n break\r\n case AppLinkTypes.ConfirmPaymentOrder: //confirm charge\r\n const currencyGuid: string = appLink.Parameters[0]\r\n //const action: string = appLink.Parameters[1] //confirmPaymentOrder\r\n const status: string = appLink.Parameters[2]\r\n this.HandlePaymentOrderStatus(status, currencyGuid)\r\n break\r\n case AppLinkTypes.EMandateResult: //confirm charge\r\n const eMandateStatus: string = appLink.Parameters[2]\r\n this.HandleEmandateResult(eMandateStatus)\r\n break\r\n default:\r\n myLog.warn('Unknown AppLink', url)\r\n break\r\n }\r\n }\r\n\r\n this.IsProcessing = false\r\n }\r\n}\r\nexport const linkingStore = new Store()\r\n","import api from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./style.web.scss\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import {StackScreenProps} from '@react-navigation/stack'\r\nimport 'bulma/sass/grid/columns.sass'\r\nimport 'bulma/sass/helpers/visibility.sass'\r\nimport 'bulma/sass/utilities/_all.sass'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {\r\n Container,\r\n Content,\r\n FormFooter,\r\n FormHeader,\r\n LinkButton,\r\n MyButton,\r\n SubmitHeader,\r\n VersionLabel,\r\n} from '../../Components'\r\nimport MyInput from '../../Components/Form/MyInput'\r\nimport {StockImageLayout} from '../../Components/Web'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport i18n from '../../i18n'\r\nimport {MainScreensListWeb} from '../../Navigation/index.web'\r\nimport {linkingStore} from '../../Navigation/LinkingStore'\r\nimport {sizes} from '../../Style/index'\r\nimport '../../Style/style.web.scss'\r\nimport Store, {MyFormData} from './Store.web'\r\n\r\nconst store = new Store()\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Login: React.FC = ({\r\n navigation: {navigate, goBack},\r\n route: {params},\r\n}) => {\r\n const {control, handleSubmit, errors, setError, setValue} =\r\n useForm()\r\n\r\n useEffect(() => {\r\n if (AppConfig.IsDebugMode) {\r\n //setValue('email', 'r.de.ruijter@mybility.nl')\r\n setValue('email', 'superdopey@live.nl')\r\n //setValue('email', 'jordi@sctelstar.nl') //veel kind portemonnee's\r\n setValue('password', '')\r\n\r\n // const appLink = GetAppLink('http://localhost:19006/register/confirm/hmmm')\r\n // console.log('applink', appLink)\r\n }\r\n\r\n return linkingStore.Initialize()\r\n }, [store])\r\n\r\n const {IsSubmitting} = store\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n store.AuthenticateConsumerUser(data, (errorMessage: string) => {\r\n console.log(errorMessage)\r\n setError('password', {\r\n type: 'manual',\r\n message: errorMessage,\r\n })\r\n })\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {i18n.t('Login.Header')}\r\n \r\n handleSubmit((data) => onSubmit(data))(),\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t(\r\n 'Login.Form.Fields.Password.Errors.Required',\r\n ),\r\n },\r\n }}\r\n />\r\n \r\n \r\n navigate('forgotPassword')}\r\n style={{marginVertical: sizes.padding.md}}\r\n />\r\n navigate('register')}\r\n />\r\n \r\n \r\n \r\n navigate('home')} />\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(Login)\r\n","import {makeObservable, observable, action, runInAction} from 'mobx'\r\nimport {navigate} from '../../Helpers/NavigationHelper'\r\nimport {SetFriendlyMessage} from '../../Helpers/ServiceHelpers'\r\nimport {GetRandStockImage} from '../../Helpers/UiHelpers'\r\nimport {persistedStore} from '../../Mobx'\r\nimport {MyErrorMessage, ToprError} from '../../Models/Client'\r\nimport AuthenticationController from '../../Services/Topr.Core/AuthenticationController'\r\nimport UserController from '../../Services/Topr.Core/UserController'\r\n\r\nexport type MyFormData = {\r\n email: string\r\n password: string\r\n}\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n\r\n constructor() {\r\n makeObservable(this, {\r\n IsSubmitting: observable,\r\n AuthenticateConsumerUser: action,\r\n })\r\n }\r\n\r\n public AuthenticateConsumerUser(\r\n formData: MyFormData,\r\n onError: (errorMessage: string) => void,\r\n ) {\r\n //DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n AuthenticationController.AuthenticateConsumerUser(\r\n formData.email,\r\n formData.password,\r\n )\r\n .then(() => {\r\n UserController.GetChildUsers()\r\n\r\n UserController.GetConsumerUser().then((mainUser) => {\r\n persistedStore.SetMainUser(mainUser)\r\n })\r\n\r\n //reset form\r\n navigate('dashboard')\r\n })\r\n .catch((toprError: ToprError) => {\r\n console.log('toprError', toprError)\r\n SetFriendlyMessage(toprError, onError, [\r\n new MyErrorMessage(\r\n 'USER_PASSWORD_INVALID',\r\n 'Login.Form.ServerErrors.Title',\r\n 'Login.Form.ServerErrors.USER_PASSWORD_INVALID',\r\n 'warning',\r\n ),\r\n new MyErrorMessage(\r\n 'USER_LOCKED_SHORT',\r\n 'Login.Form.ServerErrors.Title',\r\n 'Login.Form.ServerErrors.USER_LOCKED_SHORT',\r\n 'warning',\r\n ),\r\n new MyErrorMessage(\r\n 'USER_LOCKED_LONG',\r\n 'Login.Form.ServerErrors.Title',\r\n 'Login.Form.ServerErrors.USER_LOCKED_LONG',\r\n 'warning',\r\n ),\r\n new MyErrorMessage(\r\n 'USER_NOT_FOUND',\r\n 'Login.Form.ServerErrors.Title',\r\n 'Login.Form.ServerErrors.USER_NOT_FOUND',\r\n 'warning',\r\n ),\r\n ])\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n .finally(() => {\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n }\r\n}\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {\r\n Container,\r\n Content,\r\n FormInfo,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport MyInput from '../../../Components/Form/MyInput'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport i18n from '../../../i18n'\r\nimport Store, {MyFormData} from './Store'\r\n\r\nconst store = new Store()\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Login: React.FC = ({navigation: {navigate}, route: {params}}) => {\r\n const {control, handleSubmit, errors, setError, setValue, formState} =\r\n useForm({mode: 'onChange'})\r\n\r\n useEffect(() => {\r\n store.Initialize()\r\n\r\n if (AppConfig.IsDebugMode) {\r\n //setValue('email', 'r.de.ruijter@mybility.nl')\r\n setValue('email', 'superdopey@live.nl')\r\n }\r\n\r\n //return linkingStore.Initialize()\r\n }, [store])\r\n\r\n const {IsSubmitting} = store\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n store.ForgotPassword(data.email)\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {i18n.t('ForgotPassword.Info')}\r\n \r\n \r\n navigate('login')}>\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(Login)\r\n","import {makeAutoObservable} from 'mobx'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {DoServiceCall} from '../../../Helpers/ServiceHelpers'\r\nimport {GetI18NAlertMessage} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {ToprError} from '../../../Models/Client'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\n\r\nexport type MyFormData = {\r\n email: string\r\n}\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n this.InitialState()\r\n }\r\n\r\n public InitialState() {\r\n this.IsSubmitting = false\r\n }\r\n\r\n public ForgotPassword(email: string) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n UserController.ForgotPassword(email)\r\n .then(() => {\r\n //reset form\r\n this.InitialState()\r\n appUiStore.ShowAlert({\r\n title: i18n.t('ForgotPassword.Form.Succes.Title'),\r\n message: i18n.t('ForgotPassword.Form.Succes.Message', {email}),\r\n type: 'success',\r\n })\r\n goBack()\r\n //navigate('dashboard')\r\n })\r\n .catch((toprError: ToprError) => {\r\n //SetFriendlyMessage(toprError, onError, [])\r\n const alert = GetI18NAlertMessage(\r\n 'RegisterConfirm.ServerErrors',\r\n toprError.Code,\r\n )\r\n\r\n appUiStore.ShowAlert(alert)\r\n this.InitialState()\r\n })\r\n })\r\n }\r\n}\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {GetI18NAlertMessage} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport ToprError from '../../../Models/Client/ErrorHandling/ToprError'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n private RequestIdentifier: string = ''\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n Initialize(requestIdentifier: string) {\r\n this.IsSubmitting = false\r\n this.RequestIdentifier = requestIdentifier\r\n }\r\n\r\n ResetPassword(password: string) {\r\n this.IsSubmitting = true\r\n UserController.ResetPassword(this.RequestIdentifier, password)\r\n .then(() => {\r\n runInAction(() => (this.IsSubmitting = false))\r\n appUiStore.ShowToast({message: i18n.t('ResetPassword.Form.Succes')})\r\n goBack()\r\n })\r\n .catch((toprError: ToprError) => {\r\n const alert = GetI18NAlertMessage(\r\n 'ResetPassword.Form.ServerErrors',\r\n toprError.Code,\r\n )\r\n\r\n appUiStore.ShowAlert(alert)\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n }\r\n}\r\nexport const resetPasswordStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {\r\n Container,\r\n Content,\r\n MyInput,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport i18n from '../../../i18n'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {resetPasswordStore} from './Store'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n{\r\n}\r\n\r\nexport type MyFormData = {\r\n password: string\r\n confirmPassword: string\r\n}\r\n\r\nconst ResetPassword: React.FC = ({navigation: {goBack}, route}) => {\r\n useEffect(() => {\r\n const {requestIdentifier} = route.params\r\n myLog.info(`ResetPassword ${requestIdentifier}`)\r\n\r\n //get deeplink\r\n\r\n if (AppConfig.IsDebugMode) {\r\n setValue('password', 'sdopey01')\r\n setValue('confirmPassword', 'sdopey01')\r\n }\r\n\r\n resetPasswordStore.Initialize(requestIdentifier)\r\n }, [resetPasswordStore])\r\n\r\n const {control, handleSubmit, errors, setValue, getValues, formState} =\r\n useForm({mode: 'onChange'})\r\n\r\n const {IsSubmitting} = resetPasswordStore\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n resetPasswordStore.ResetPassword(data.password)\r\n }\r\n return (\r\n <>\r\n \r\n \r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t(\r\n 'ResetPassword.Form.Fields.ConfirmPassword.Errors.Required',\r\n ),\r\n validate: {\r\n checkPincode: (confirmPassword: string) => {\r\n const values = getValues()\r\n return (\r\n values.password === confirmPassword ||\r\n i18n.t(\r\n 'ResetPassword.Form.Fields.ConfirmPassword.Errors.Equality',\r\n )\r\n )\r\n },\r\n },\r\n },\r\n }}\r\n label={i18n.t('ResetPassword.Form.Fields.ConfirmPassword.Label')}\r\n />\r\n \r\n \r\n navigate('login')}>\r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(ResetPassword)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {Animated} from 'react-native'\r\n\r\nexport default class Store {\r\n //public ScrollY = 0\r\n\r\n public HEADER_MAX_HEIGHT = 55\r\n\r\n public ScrollY = new Animated.Value(0)\r\n public ScrollYValue = 0\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public SetScrollY(y: number) {\r\n this.ScrollY.setValue(y)\r\n this.ScrollYValue = y\r\n Animated.event([this.ScrollY], {\r\n useNativeDriver: true,\r\n })\r\n }\r\n\r\n public ResetScrollYAnimated() {\r\n if (this.ScrollYValue > 0) {\r\n Animated.timing(this.ScrollY, {\r\n toValue: 0,\r\n duration: 500,\r\n useNativeDriver: true,\r\n }).start()\r\n this.ScrollYValue = 0\r\n }\r\n }\r\n}\r\nexport const dashboardHeaderStore = new Store()\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {Animated, StyleSheet, View} from 'react-native'\r\nimport {Icon, Image, withBadge} from 'react-native-elements'\r\nimport {ProfileButton} from '../../../../Components'\r\nimport Style from '../../../../Style'\r\nimport AppImages from '../../../../Images/AppImages'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport {dashboardHeaderStore} from './Store'\r\n\r\ninterface IProps {}\r\n\r\nconst DashboardHeader: React.FC = ({children}) => {\r\n const {flexRow} = Style\r\n const BadgedIcon = withBadge(1, {right: 0})(Icon)\r\n const {User} = dashboardStore\r\n\r\n const {headerContainer} = style\r\n\r\n const {ScrollY, HEADER_MAX_HEIGHT} = dashboardHeaderStore\r\n\r\n const headerTranslateY = ScrollY.interpolate({\r\n inputRange: [0, HEADER_MAX_HEIGHT],\r\n outputRange: [0, -HEADER_MAX_HEIGHT],\r\n extrapolate: 'clamp',\r\n })\r\n\r\n return (\r\n \r\n \r\n \r\n {/* \r\n console.log('notifications')}\r\n />\r\n */}\r\n {\r\n dashboardStore.ToggleUserMenu(true)\r\n }}\r\n />\r\n {/* generalMenustore.ToggleIsVisible()}\r\n /> */}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(DashboardHeader)\r\n\r\nconst style = StyleSheet.create({\r\n headerContainer: {\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n backgroundColor: '#fff',\r\n padding: 10,\r\n borderBottomColor: '#f0f0f0',\r\n borderBottomWidth: 1,\r\n\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n height: dashboardHeaderStore.HEADER_MAX_HEIGHT,\r\n },\r\n})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Icon} from 'react-native-elements'\r\nimport {MyButton} from '../../../Components'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\nimport I18n from '../../../i18n'\r\nimport Style, {sizes} from '../../../Style'\r\ninterface IProps {\r\n wallets: number\r\n tokens: number\r\n}\r\n\r\nconst CallToActions: React.FC = ({wallets, tokens}) => {\r\n if (wallets > 0 && tokens > 0) {\r\n return null\r\n }\r\n\r\n const renderAddWalletCta = () => {\r\n if (wallets > 0) {\r\n return null\r\n }\r\n return (\r\n navigate('locations')}\r\n icon={\r\n \r\n \r\n \r\n }\r\n />\r\n )\r\n }\r\n const renderAddTokenCta = () => {\r\n if (tokens > 0) {\r\n return null\r\n }\r\n\r\n return (\r\n navigate('addToken')}\r\n title={I18n.t('Dashboard.AddToken')}\r\n buttonStyle={styles.ctaButton}\r\n icon={\r\n \r\n \r\n \r\n }\r\n />\r\n )\r\n }\r\n\r\n return (\r\n \r\n {renderAddWalletCta()}\r\n {renderAddTokenCta()}\r\n \r\n )\r\n}\r\n\r\nexport default CallToActions\r\n\r\nconst styles = StyleSheet.create({\r\n ctaButton: {\r\n marginTop: sizes.padding.md,\r\n paddingVertical: sizes.padding.md,\r\n },\r\n\r\n iconContainer: {\r\n backgroundColor: '#00000040',\r\n height: 40,\r\n width: 40,\r\n borderRadius: 25,\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n marginRight: 10,\r\n },\r\n})\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {View, TouchableOpacity} from 'react-native'\r\nimport {\r\n FooterBar,\r\n FooterBarButton,\r\n FooterBarIconButton,\r\n} from '../../../Components'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {DeliveryType} from '../../../Models/InzziiApi/Enums'\r\nimport {orderOnlineStore} from '../../Location/OrderOnline/Store'\r\nimport {dashboardStore} from '../Dashboard/Store'\r\nimport ToprConfig from '../../../Config/Tenants/Topr/ToprConfig'\r\nimport {sizes} from '../../../Style'\r\nimport {Text, Icon} from 'react-native-elements'\r\ninterface IProps {}\r\n\r\nconst DashboardFooter: React.FC = ({children}) => {\r\n return (\r\n \r\n navigate('qrCode')}\r\n />\r\n {\r\n dashboardStore.ToggleAddMenu(true)\r\n }}\r\n />\r\n {\r\n navigate('scanner' as any)\r\n }}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default observer(DashboardFooter)\r\n","//import CallToActions from './CallToActions'\r\n//import {store as tokenStore} from '../../Token/Tokens/Store'\r\nimport {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {RefreshControl, ScrollView, View} from 'react-native'\r\nimport {\r\n BottomListSpacer,\r\n ImageTextCard,\r\n SystemMessageCard,\r\n ToprScreenLoader,\r\n} from '../../../../Components'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport {FormatCurrency} from '../../../../Helpers/TextHelpers'\r\nimport {GetLocalizedImageUrl} from '../../../../Helpers/UiHelpers'\r\nimport Style from '../../../../Style'\r\nimport {store as tokenStore} from '../../../Token/Tokens/Store'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport CallToActions from '../CallToActions'\r\nimport DashboardFooter from '../DashboardFooter'\r\nimport {dashboardHeaderStore} from '../DashboardHeader/Store'\r\ninterface IProps {}\r\n\r\nconst WalletsTab: React.FC = ({children}) => {\r\n const {Wallets, IsWalletLoading, SystemMessages} = dashboardStore\r\n const {Tokens} = tokenStore\r\n const {HEADER_MAX_HEIGHT} = dashboardHeaderStore\r\n\r\n const {defaultFlatList, flatListContentStyle} = Style\r\n\r\n const renderWalletCards = () => {\r\n return Wallets.map((wallet, key) => (\r\n {\r\n navigate('walletDetails', {\r\n currencyGuid: wallet.Currency.CurrencyGuid,\r\n })\r\n }}\r\n badgeText={FormatCurrency(wallet.Balance, wallet.Currency)}\r\n />\r\n ))\r\n }\r\n\r\n return (\r\n \r\n {\r\n dashboardHeaderStore.SetScrollY(event.nativeEvent.contentOffset.y)\r\n }}\r\n scrollEventThrottle={5}\r\n refreshControl={\r\n {\r\n dashboardStore.GetWallets()\r\n dashboardStore.GetUser()\r\n }}\r\n />\r\n }>\r\n \r\n \r\n {renderWalletCards()}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(WalletsTab)\r\n","export const LastItem = (myArray: T[]) => {\r\n if (myArray === undefined || myArray === null || myArray.length === 0) {\r\n return undefined\r\n }\r\n\r\n return myArray[myArray.length - 1]\r\n}\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {FlatList, Image, RefreshControl, Text, View} from 'react-native'\r\nimport {\r\n FooterBar,\r\n FooterBarButton,\r\n FooterBarIconButton,\r\n ImageCard,\r\n ImageTextCard,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n ToprScreenLoader,\r\n} from '../../../../Components'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport {GetLocalizedImageUrl, GetRandomKey} from '../../../../Helpers/UiHelpers'\r\nimport i18n from '../../../../i18n'\r\nimport I18n from '../../../../i18n'\r\nimport Style, {colors} from '../../../../Style'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport {dashboardHeaderStore} from '../DashboardHeader/Store'\r\nimport {LastItem} from '../../../../Helpers/ArrayHelpers'\r\ninterface IProps {}\r\n\r\nconst CouponsTab: React.FC = ({children}) => {\r\n const {GroupedCoupons, IsCouponsLoading} = dashboardStore\r\n const {defaultFlatList, flatListContentStyle} = Style\r\n return (\r\n \r\n {\r\n dashboardHeaderStore.SetScrollY(event.nativeEvent.contentOffset.y)\r\n }}\r\n ListEmptyComponent={\r\n \r\n }\r\n style={[\r\n defaultFlatList,\r\n {\r\n paddingTop: dashboardHeaderStore.HEADER_MAX_HEIGHT * 2,\r\n },\r\n ]}\r\n refreshControl={\r\n {\r\n dashboardStore.GetUserCoupons()\r\n }}\r\n />\r\n }\r\n contentContainerStyle={[flatListContentStyle]}\r\n data={GroupedCoupons}\r\n renderItem={({item}) => {\r\n const lastItem = LastItem(GroupedCoupons)\r\n return (\r\n {\r\n navigate('couponDetails', {\r\n userCouponGuid: item.UserCoupons[0].UserCouponGUID,\r\n })\r\n }}\r\n badgeText={`${item.UserCoupons.length}x`}\r\n />\r\n )\r\n }}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n navigate('qrCode')}\r\n text={i18n.t('Common.Redeem')}\r\n />\r\n\r\n {\r\n navigate('couponsSummary')\r\n }}\r\n />\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(CouponsTab)\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {FlatList, RefreshControl, View} from 'react-native'\r\nimport {\r\n FooterBar,\r\n FooterBarButton,\r\n FooterBarIconButton,\r\n ImageCard,\r\n ImageTextCard,\r\n ToprScreenLoader,\r\n} from '../../../../Components'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport {GetFileUrl, GetRandomKey} from '../../../../Helpers/UiHelpers'\r\nimport I18n from '../../../../i18n'\r\nimport Style from '../../../../Style'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport {dashboardHeaderStore} from '../DashboardHeader/Store'\r\nimport {LastItem} from '../../../../Helpers/ArrayHelpers'\r\ninterface IProps {}\r\n\r\nconst SavingCardsTab: React.FC = ({children}) => {\r\n const {IsSavingcardsLoading, UserSavingCards} = dashboardStore\r\n const {defaultFlatList, flatListContentStyle} = Style\r\n return (\r\n \r\n \r\n }\r\n bounces={false}\r\n onScroll={(event) => {\r\n dashboardHeaderStore.SetScrollY(event.nativeEvent.contentOffset.y)\r\n }}\r\n style={[\r\n defaultFlatList,\r\n {paddingTop: dashboardHeaderStore.HEADER_MAX_HEIGHT * 2},\r\n ]}\r\n refreshControl={\r\n {\r\n dashboardStore.GetUserSavingCards()\r\n }}\r\n />\r\n }\r\n contentContainerStyle={[flatListContentStyle]}\r\n data={UserSavingCards}\r\n renderItem={({item}) => {\r\n const lastItem = LastItem(UserSavingCards)\r\n return (\r\n {\r\n navigate('savingCardDetails', {\r\n userSavingCardGuid: item.UserSavingCardGuid,\r\n })\r\n }}\r\n badgeText={`${item.StampCount}/${item.SavingCard.StampCount}`}\r\n />\r\n )\r\n }}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n navigate('qrCode')}\r\n />\r\n {\r\n navigate('savingCardsSummary')\r\n }}\r\n />\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(SavingCardsTab)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {persistedStore} from '../../../../Mobx'\r\nimport AuthenticationController from '../../../../Services/Topr.Core/AuthenticationController'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\n\r\nexport default class Store {\r\n public ShowShildUsers = false\r\n\r\n public ShowConfig = false\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public ToggleChildMenu() {\r\n this.ShowShildUsers = !this.ShowShildUsers\r\n }\r\n\r\n public ToggleConfigModal() {\r\n if (persistedStore.MainUser?.EmailAddress === 'superdopey@live.nl') {\r\n this.ShowConfig = !this.ShowConfig\r\n }\r\n }\r\n\r\n public SwitchToChildUser(userGuid: string) {\r\n dashboardStore.ToggleUserMenu(false)\r\n AuthenticationController.SwitchUser(userGuid)\r\n .then(() => {\r\n runInAction(() => {\r\n this.ShowShildUsers = false\r\n })\r\n dashboardStore.Initialize()\r\n //navigate('dashboard')\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.ShowShildUsers = false\r\n })\r\n })\r\n }\r\n\r\n public SwitchBackToParent() {\r\n //return to the parent Token\r\n persistedStore.SwitchBackToParentUserToken()\r\n dashboardStore.Initialize()\r\n dashboardStore.ToggleUserMenu(false)\r\n //navigate('dashboard')\r\n }\r\n}\r\nexport const userMenuStore = new Store()\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {Icon, ListItem} from 'react-native-elements'\r\nimport {addAccountStore} from '../../../../Components/Modal/AddAccountModal/Store'\r\nimport {persistedStore} from '../../../../Mobx'\r\nimport i18n from '../../../../i18n'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport {userMenuStore} from './Store'\r\ninterface IProps {}\r\n\r\nconst UserListItem: React.FC = ({children}) => {\r\n const {User} = dashboardStore\r\n const {ChildUsers, MainUser} = persistedStore\r\n\r\n const isChildUser = MainUser?.MainUserGuid !== User?.MainUserGuid\r\n\r\n if (User === undefined) {\r\n return null\r\n }\r\n\r\n const hasChildUsers = ChildUsers && ChildUsers.length > 0\r\n\r\n const renderAddAccount = () => {\r\n if (isChildUser) {\r\n return null\r\n }\r\n\r\n return (\r\n {\r\n dashboardStore.ToggleUserMenu(false)\r\n addAccountStore.ToggleModal()\r\n }}>\r\n \r\n \r\n {i18n.t('UserMenu.Account.Add')}\r\n \r\n {i18n.t('UserMenu.Account.AddSubText')}\r\n \r\n \r\n \r\n )\r\n }\r\n const renderChildMenuItems = () => {\r\n if (!hasChildUsers) {\r\n return null\r\n }\r\n\r\n return (\r\n {\r\n dashboardStore.ToggleUserMenu(false)\r\n userMenuStore.ToggleChildMenu()\r\n }}>\r\n \r\n \r\n {i18n.t('UserMenu.Account.Switch')}\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n {renderChildMenuItems()}\r\n {renderAddAccount()}\r\n \r\n )\r\n}\r\n\r\nexport default observer(UserListItem)\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {Divider, Icon, ListItem} from 'react-native-elements'\r\nimport {MyModal, ProfileButton, VersionLabel} from '../../../../Components'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../../i18n'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {sizes} from '../../../../Style/index'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport UserListItem from './UserListItem'\r\n\r\ninterface IProps {\r\n isVisible: boolean\r\n onClose: () => void\r\n}\r\n\r\nconst UserMenu: React.FC = ({onClose, isVisible}) => {\r\n const {User} = dashboardStore\r\n\r\n if (User === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {\r\n navigate('account')\r\n onClose()\r\n }}>\r\n \r\n \r\n {User.Name}\r\n {User.EmailAddress && (\r\n {User.EmailAddress}\r\n )}\r\n \r\n {i18n.t('UserMenu.Account.Manage')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {/* {\r\n navigate('tokens')\r\n onClose()\r\n }}>\r\n \r\n \r\n {i18n.t('Common.Cards')}\r\n \r\n \r\n {\r\n navigate('placedOrders')\r\n onClose()\r\n }}>\r\n \r\n \r\n {i18n.t('PlacedOrders.Header')}\r\n \r\n */}\r\n\r\n {\r\n appUiStore.ShowConfirm(\r\n i18n.t('UserMenu.ResetPincodeConfirm'),\r\n () => {\r\n appUiStore.ResetPincode()\r\n onClose()\r\n },\r\n )\r\n }}>\r\n \r\n \r\n {i18n.t('UserMenu.ResetPincode')}\r\n \r\n \r\n {\r\n appUiStore.Logout()\r\n onClose()\r\n }}>\r\n \r\n \r\n {i18n.t('UserMenu.Logoff')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(UserMenu)\r\n","import React from 'react'\r\nimport {StyleSheet, View} from 'react-native'\r\nimport {Card, Icon} from 'react-native-elements'\r\nimport {MyButton, MyModal} from '../../../Components'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../i18n'\r\nimport {sizes} from '../../../Style/index'\r\n\r\ninterface IProps {\r\n isVisible: boolean\r\n onClose: () => void\r\n}\r\n\r\nconst AddMenu: React.FC = ({onClose, isVisible}) => {\r\n return (\r\n \r\n \r\n {/* Toevoegen */}\r\n {i18n.t('Common.Add')}\r\n {\r\n navigate('locations')\r\n onClose()\r\n }}\r\n icon={\r\n \r\n \r\n \r\n }\r\n />\r\n {\r\n navigate('addToken')\r\n onClose()\r\n }}\r\n icon={\r\n \r\n \r\n \r\n }\r\n />\r\n \r\n \r\n )\r\n}\r\n\r\nexport default AddMenu\r\n\r\nconst styles = StyleSheet.create({\r\n ctaButton: {\r\n paddingVertical: sizes.padding.md,\r\n marginBottom: sizes.padding.md,\r\n },\r\n\r\n iconContainer: {\r\n backgroundColor: '#00000040',\r\n height: 40,\r\n width: 40,\r\n borderRadius: 25,\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n marginRight: 10,\r\n },\r\n})\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {FlatList, RefreshControl} from 'react-native'\r\nimport {\r\n FooterBar,\r\n FooterBarButton,\r\n FooterBarIconButton,\r\n ImageCard,\r\n ImageTextCard,\r\n ToprScreenLoader,\r\n} from '../../../../Components'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport {GetLocalText} from '../../../../Helpers/TextHelpers'\r\nimport {GetFileUrl, GetRandomKey} from '../../../../Helpers/UiHelpers'\r\nimport i18n from '../../../../i18n'\r\nimport I18n from '../../../../i18n'\r\nimport {ConsumerSubscriptionItemTypes} from '../../../../Models/Client/Enums'\r\nimport Style from '../../../../Style'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport {dashboardHeaderStore} from '../DashboardHeader/Store'\r\nimport {LastItem} from '../../../../Helpers/ArrayHelpers'\r\n\r\nconst SubscriptionsTab: React.FC = () => {\r\n const {IsUserSubscriptionsLoading, UserSubscriptions} = dashboardStore\r\n const {defaultFlatList, flatListContentStyle} = Style\r\n return (\r\n \r\n \r\n }\r\n bounces={false}\r\n onScroll={(event) => {\r\n dashboardHeaderStore.SetScrollY(event.nativeEvent.contentOffset.y)\r\n }}\r\n style={[\r\n defaultFlatList,\r\n {paddingTop: dashboardHeaderStore.HEADER_MAX_HEIGHT * 2},\r\n ]}\r\n refreshControl={\r\n {\r\n dashboardStore.GetUserSubscriptions()\r\n }}\r\n />\r\n }\r\n contentContainerStyle={[flatListContentStyle]}\r\n data={UserSubscriptions}\r\n renderItem={({item}) => {\r\n const badgeText =\r\n item.SubscriptionItem.ConsumerSubscriptionItemTypeId !==\r\n ConsumerSubscriptionItemTypes.Trips\r\n ? undefined\r\n : `${item.UsedAmount}/${item.Amount}`\r\n const lastItem = LastItem(UserSubscriptions)\r\n return (\r\n {\r\n navigate('subscriptionDetails', {\r\n userSubscriptionId: item.UserSubscriptionId.toString(),\r\n })\r\n }}\r\n badgeText={badgeText}\r\n />\r\n )\r\n }}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n navigate('qrCode')}\r\n text={i18n.t('Common.Check')}\r\n />\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(SubscriptionsTab)\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {FlatList, RefreshControl} from 'react-native'\r\nimport {ImageTextCard, ToprScreenLoader} from '../../../../Components'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport {GetLocalText} from '../../../../Helpers/TextHelpers'\r\nimport {GetFileUrl, GetRandomKey} from '../../../../Helpers/UiHelpers'\r\nimport Style from '../../../../Style'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport {dashboardHeaderStore} from '../DashboardHeader/Store'\r\nimport {LastItem} from '../../../../Helpers/ArrayHelpers'\r\n\r\nconst TicketsTab: React.FC = () => {\r\n const {IsUserEventsLoading, UserEvents} = dashboardStore\r\n const {defaultFlatList, flatListContentStyle} = Style\r\n return (\r\n \r\n {\r\n dashboardHeaderStore.SetScrollY(event.nativeEvent.contentOffset.y)\r\n }}\r\n style={[\r\n defaultFlatList,\r\n {paddingTop: dashboardHeaderStore.HEADER_MAX_HEIGHT * 2},\r\n ]}\r\n refreshControl={\r\n {\r\n dashboardStore.GetUserEvents()\r\n }}\r\n />\r\n }\r\n contentContainerStyle={[flatListContentStyle]}\r\n data={UserEvents}\r\n renderItem={({item}) => {\r\n const badgeText = item.UserEventTickets.length.toString()\r\n const lastItem = LastItem(UserEvents)\r\n return (\r\n {\r\n navigate('ticketDetails', {\r\n userEvent: item,\r\n })\r\n }}\r\n badgeText={badgeText}\r\n />\r\n )\r\n }}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default observer(TicketsTab)\r\n","import {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {Animated} from 'react-native'\r\nimport {SceneMap, TabBar, TabView} from 'react-native-tab-view'\r\nimport i18n from '../../../../i18n'\r\nimport Style, {tabViewLayout} from '../../../../Style'\r\nimport {colors} from '../../../../Style/index'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport {dashboardHeaderStore} from '../DashboardHeader/Store'\r\nimport CouponsTab from './CouponsTab'\r\nimport SavingCardsTab from './SavingCardsTab'\r\nimport SubscriptionsTab from './SubscriptionsTab'\r\nimport TicketsTab from './TicketsTab'\r\nimport WalletsTab from './WalletsTab'\r\ninterface IProps {}\r\n\r\nconst TABBAR_MAX_HEIGHT = 110 // max header height\r\nconst TABBAR_MIN_HEIGHT = 55 // min header height\r\nconst TABBAR_SCROLL_DISTANCE = TABBAR_MAX_HEIGHT - TABBAR_MIN_HEIGHT\r\n\r\nconst DashboardTabs: React.FC = ({children}) => {\r\n const [index, setIndex] = React.useState(0)\r\n\r\n const {UserSubscriptions, UserSavingCards, UserEvents} = dashboardStore\r\n\r\n const setIndexAndResetScroll = (value: number) => {\r\n setIndex(value)\r\n dashboardHeaderStore.ResetScrollYAnimated()\r\n }\r\n\r\n const initialTabs = [\r\n {key: 'wallets', title: i18n.t('Dashboard.Tabs.Payment')},\r\n {key: 'coupons', title: i18n.t('Dashboard.Tabs.Coupons')},\r\n ]\r\n const [tabs, setTabs] = React.useState(initialTabs)\r\n useEffect(() => {\r\n const dynamicTabs = []\r\n if (UserSubscriptions.length > 0) {\r\n dynamicTabs.push({\r\n key: 'userSubscriptions',\r\n title: i18n.t('Dashboard.Tabs.Subscriptions'),\r\n })\r\n }\r\n if (UserSavingCards.length > 0) {\r\n dynamicTabs.push({\r\n key: 'usersavingsCard',\r\n title: i18n.t('Dashboard.Tabs.Savings'),\r\n })\r\n }\r\n if (UserEvents.length > 0) {\r\n dynamicTabs.push({\r\n key: 'tickets',\r\n title: i18n.t('Dashboard.Tabs.Tickets'),\r\n })\r\n }\r\n\r\n setTabs([...initialTabs, ...dynamicTabs])\r\n }, [UserSubscriptions, UserSavingCards, UserEvents])\r\n\r\n const {ScrollY} = dashboardHeaderStore\r\n const {tabBarLabelStyle} = Style\r\n const headerTranslateY = ScrollY.interpolate({\r\n inputRange: [0, TABBAR_MIN_HEIGHT],\r\n outputRange: [0, -TABBAR_MIN_HEIGHT],\r\n extrapolate: 'clamp',\r\n })\r\n\r\n let map = {\r\n wallets: () => ,\r\n coupons: () => ,\r\n usersavingsCard: () =>\r\n UserSavingCards.length > 0 ? : <>,\r\n userSubscriptions: () =>\r\n UserSubscriptions.length > 0 ? : <>,\r\n tickets: () => (UserEvents.length > 0 ? : <>),\r\n }\r\n\r\n const renderScene = SceneMap(map)\r\n\r\n const renderTabBar = (props: any) => (\r\n \r\n \r\n \r\n )\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default observer(DashboardTabs)\r\n","import React from 'react'\r\nimport {ListItem} from 'react-native-elements'\r\nimport {MyModal, ProfileButton} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport {persistedStore} from '../../../../Mobx'\r\nimport {dashboardStore} from '../../Dashboard/Store'\r\nimport {userMenuStore} from './Store'\r\ninterface IProps {\r\n onClose: () => void\r\n isVisible: boolean\r\n}\r\n\r\nconst ChildUsersModal: React.FC = ({onClose, isVisible}) => {\r\n const {ChildUsers, MainUser} = persistedStore\r\n const {User} = dashboardStore\r\n const isChildUser = MainUser?.MainUserGuid !== User?.MainUserGuid\r\n\r\n const childUsersWithoutActiveUser = ChildUsers.filter(\r\n (x) => x.MainUserGuid !== User?.MainUserGuid,\r\n )\r\n\r\n const renderParentMenuItem = () => {\r\n if (!isChildUser || MainUser === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n // {\r\n // store.SwitchBackToParent()\r\n // }}\r\n // />\r\n {\r\n userMenuStore.SwitchBackToParent()\r\n onClose()\r\n }}>\r\n \r\n \r\n {MainUser.Name}\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {i18n.t('Common.Accounts')}\r\n \r\n \r\n {childUsersWithoutActiveUser.map((childUser, key) => {\r\n return (\r\n {\r\n userMenuStore.SwitchToChildUser(childUser.MainUserGuid as string)\r\n onClose()\r\n }}>\r\n \r\n \r\n {childUser.Name}\r\n \r\n \r\n )\r\n })}\r\n {renderParentMenuItem()}\r\n \r\n )\r\n}\r\n\r\nexport default ChildUsersModal\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport * as React from 'react'\r\nimport {useEffect, useRef} from 'react'\r\nimport {AppState, AppStateStatus} from 'react-native'\r\nimport {AddAccountModal} from '../../../Components'\r\n\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {linkingStore} from '../../../Navigation/LinkingStore'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {AddMenu, DashboardHeader, DashboardTabs, UserMenu} from '../Components'\r\nimport ChildUsersModal from '../Components/UserMenu/ChildUsersModal'\r\nimport {userMenuStore} from '../Components/UserMenu/Store'\r\nimport {dashboardStore} from './Store'\r\nimport {useNavigation} from '@react-navigation/native'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\n\r\n//interface IProps extends StackScreenProps {}\r\n\r\ntype IProps = StackNavigationProp\r\n\r\n//const Dashboard: React.FC = ({navigation: {navigate}}) => {\r\nconst Dashboard: React.FC = () => {\r\n //!!! carefull, for invalid hook call on release ?!? !!!\r\n\r\n // const navigation = useNavigation()\r\n // const {navigate} = navigation\r\n //!!! carefull, for invalid hook call on release ?!? !!!\r\n\r\n const appState = useRef(AppState.currentState)\r\n const _handleAppStateChange = (nextAppState: AppStateStatus) => {\r\n if (\r\n appState.current.match(/inactive|background/) &&\r\n nextAppState === 'active'\r\n ) {\r\n dashboardStore.Initialize()\r\n //refresh when app returns to foreground\r\n // dashboardStore.SetIsAuthenticationMethodCheckLoading(true)\r\n // appUiStore\r\n // .CheckAuthenticationMethodState()\r\n // .then(() => dashboardStore.GetAllData())\r\n // .catch(() => {\r\n // navigate('Pincode')\r\n // })\r\n }\r\n\r\n appState.current = nextAppState\r\n }\r\n useEffect(() => {\r\n myLog.warn('Dashboard')\r\n\r\n // navigate('automaticCharge', {\r\n // currencyGuid: 'e4a6eb11-9b75-4d7f-9bc1-b1e1e469bf19',\r\n // })\r\n\r\n AppState.addEventListener('change', _handleAppStateChange)\r\n dashboardStore.Initialize()\r\n return linkingStore.Initialize()\r\n }, [dashboardStore])\r\n\r\n const {IsUserMenuVisible, IsAddMenuVisible} = dashboardStore\r\n\r\n return (\r\n <>\r\n \r\n dashboardStore.ToggleAddMenu(false)}\r\n />\r\n dashboardStore.ToggleUserMenu(false)}\r\n />\r\n userMenuStore.ToggleChildMenu()}\r\n />\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(Dashboard)\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {\r\n //Image,\r\n Text,\r\n TouchableOpacity,\r\n TouchableWithoutFeedbackProps,\r\n View,\r\n Image,\r\n} from 'react-native'\r\n\r\nimport {Icon} from 'react-native-elements'\r\nimport {GetFileUrl} from '../../Helpers/UiHelpers'\r\nimport {IUserSTO} from '../../Models/Server'\r\nimport Style, {colors} from '../../Style'\r\nimport {GetFirstLetterUser} from '../../Helpers/TextHelpers'\r\ninterface IProps extends TouchableWithoutFeedbackProps {\r\n user: IUserSTO | undefined\r\n}\r\n\r\nconst ProfileButtonEmail: React.FC = ({user, ...otherProps}) => {\r\n const {profileColorButton, profilePictureImage} = Style\r\n const renderProfile = () => {\r\n if (user === undefined) {\r\n return null\r\n }\r\n\r\n if (user.UserPictureFileGuid) {\r\n return renderImage()\r\n } else {\r\n return renderFirstLetter()\r\n }\r\n }\r\n\r\n const renderImage = () => {\r\n if (user !== undefined && user.UserPictureFileGuid === null) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n const renderFirstLetter = () => {\r\n return (\r\n \r\n \r\n {GetFirstLetterUser(user)}\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n
\r\n {renderProfile()}\r\n
\r\n {user?.Name}\r\n {user?.EmailAddress !== null && (\r\n
{user?.EmailAddress}
\r\n )}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default observer(ProfileButtonEmail)\r\n","import React from 'react'\r\nimport {Icon} from 'react-native-elements'\r\ninterface IProps {\r\n name: string\r\n type?: string\r\n onClick?: () => void\r\n}\r\n\r\nconst SideMenuItem: React.FC = ({name, type, children, onClick}) => {\r\n return (\r\n
  • \r\n \r\n {children}\r\n
  • \r\n )\r\n}\r\n\r\nexport default SideMenuItem\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Icon} from 'react-native-elements'\r\nimport {MyButton} from '../../../../Components'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../../i18n'\r\nimport {sizes, boldFontWeight} from '../../../../Style'\r\nimport {dashboardStore} from '../../Dashboard/Store.web'\r\nimport SideMenuItem from './SideMenuItem.web'\r\n\r\ninterface IProps {}\r\n\r\nconst SideMenu: React.FC = ({children}) => {\r\n return (\r\n <>\r\n
      \r\n navigate('main')}>\r\n {i18n.t('Common.Dashboard')}\r\n \r\n navigate('couponsSummary')}>\r\n {i18n.t('Common.Coupons')}\r\n \r\n navigate('savingCardsSummary')}>\r\n {i18n.t('Common.SavingCards')}\r\n \r\n navigate('tokens')}>\r\n {i18n.t('Common.Cards')}\r\n \r\n navigate('help')}>\r\n {i18n.t('Common.Help')}\r\n \r\n {/* navigate('placedOrders')}>\r\n {i18n.t('Common.Orders')}\r\n */}\r\n
    \r\n
    \r\n {\r\n dashboardStore.ToggleAddMenu(true)\r\n }}\r\n />\r\n
    \r\n
    \r\n }\r\n buttonStyle={{borderRadius: 20}}\r\n containerStyle={{marginTop: sizes.padding.lg}}\r\n onPress={() => {\r\n dashboardStore.ToggleAddMenu(true)\r\n }}\r\n />\r\n
    \r\n \r\n )\r\n}\r\n\r\nexport default SideMenu\r\n","import React from 'react'\r\ninterface IProps {}\r\n\r\nconst Badge: React.FC = ({children}) => {\r\n return
    {children}
    \r\n}\r\n\r\nexport default Badge\r\n","import React from 'react'\r\nimport {Icon} from 'react-native-elements'\r\nimport {GetLocalizedImageUrl} from '../../Helpers/UiHelpers'\r\nimport {IGroupedCoupon} from '../../Models/Server'\r\nimport Badge from '../Web/Badge.web'\r\nimport CardTitle from '../Web/CardTitle.web'\r\n\r\ninterface IProps {\r\n groupedCoupon: IGroupedCoupon\r\n onPress: () => void\r\n}\r\nconst CouponsCardWeb: React.FC = ({groupedCoupon, onPress}) => {\r\n const imageGuid = groupedCoupon.Coupon.Images[0].Guid\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n {`${groupedCoupon.UserCoupons.length}x`}\r\n {groupedCoupon.Coupon.FullTitle}\r\n \r\n
    \r\n \r\n )\r\n}\r\n\r\nexport default CouponsCardWeb\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {ToprLoader} from '../../../../Components'\r\n\r\ninterface IProps {}\r\n\r\nconst ToprRowLoader: React.FC = ({children}) => {\r\n return (\r\n
    \r\n \r\n
    \r\n )\r\n}\r\n\r\nexport default ToprRowLoader\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {ImageCard} from '../../../../Components'\r\nimport CouponsCardWeb from '../../../../Components/Cards/CouponsCardWeb'\r\nimport {HorizontalScroll} from '../../../../Components/Web'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../../i18n'\r\nimport {dashboardStore} from '../../Dashboard/Store.web'\r\n\r\nimport ToprRowLoader from './ToprRowLoader.web'\r\n\r\ninterface IProps {}\r\n\r\nconst CouponsScroll: React.FC = ({children}) => {\r\n const {GroupedCoupons, IsCouponsLoading} = dashboardStore\r\n\r\n const renderNoCoupons = () => {\r\n if (GroupedCoupons.length > 0) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n const renderCards = () => {\r\n return GroupedCoupons.map((groupedCoupon, key) => (\r\n {\r\n navigate('couponDetails', {\r\n userCouponGuid: groupedCoupon.UserCoupons[0].UserCouponGUID,\r\n })\r\n }}\r\n groupedCoupon={groupedCoupon}\r\n />\r\n ))\r\n }\r\n\r\n if (IsCouponsLoading) {\r\n return \r\n }\r\n\r\n return (\r\n <>\r\n

    {i18n.t('Common.Coupons')}

    \r\n \r\n {renderCards()}\r\n {renderNoCoupons()}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(CouponsScroll)\r\n","import React from 'react'\r\nimport {Icon} from 'react-native-elements'\r\nimport {GetFileUrl} from '../../Helpers/UiHelpers'\r\nimport {IUserSavingCardSTO} from '../../Models/Server'\r\nimport Badge from '../Web/Badge.web'\r\nimport CardTitle from '../Web/CardTitle.web'\r\n\r\ninterface IProps {\r\n userSavingCard: IUserSavingCardSTO\r\n onPress: () => void\r\n}\r\nconst UserSavingsCardWeb: React.FC = ({userSavingCard, onPress}) => {\r\n return (\r\n
    \r\n
    \r\n
    \r\n {`${userSavingCard.StampCount}/${userSavingCard.SavingCard.StampCount}`}\r\n {userSavingCard.SavingCard.Title}\r\n \r\n
    \r\n \r\n )\r\n}\r\n\r\nexport default UserSavingsCardWeb\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {ImageCard} from '../../../../Components'\r\nimport UserSavingsCardWeb from '../../../../Components/Cards/UserSavingsCardWeb'\r\nimport {HorizontalScroll} from '../../../../Components/Web'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../../i18n'\r\nimport {dashboardStore} from '../../Dashboard/Store.web'\r\nimport ToprRowLoader from './ToprRowLoader.web'\r\n\r\ninterface IProps {}\r\n\r\nconst SavingCardsScroll: React.FC = ({children}) => {\r\n const {UserSavingCards, IsSavingcardsLoading} = dashboardStore\r\n\r\n const renderNoSavingCards = () => {\r\n if (UserSavingCards.length > 0) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n const renderCards = () => {\r\n return UserSavingCards.map((userSavingCard, key) => (\r\n {\r\n navigate('savingCardDetails', {\r\n userSavingCardGuid: userSavingCard.UserSavingCardGuid,\r\n })\r\n }}\r\n userSavingCard={userSavingCard}\r\n />\r\n ))\r\n }\r\n\r\n if (IsSavingcardsLoading) {\r\n return \r\n }\r\n\r\n return (\r\n <>\r\n

    {i18n.t('Common.SavingCards')}

    \r\n \r\n {renderCards()}\r\n {renderNoSavingCards()}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(SavingCardsScroll)\r\n","import React from 'react'\r\nimport {TouchableOpacity, View, Image, ActivityIndicator} from 'react-native'\r\nimport {Card, Icon, ListItem, Text} from 'react-native-elements'\r\nimport AppConfig from '../../Config/AppConfig'\r\n\r\nimport {FormatCurrency} from '../../Helpers/TextHelpers'\r\nimport {GetLocalizedImageUrl} from '../../Helpers/UiHelpers'\r\nimport {IWalletSTO} from '../../Models/Server'\r\nimport Style, {sizes} from '../../Style'\r\n\r\nimport {colors} from '../../Style/index'\r\nimport Badge from '../Web/Badge.web'\r\nimport CardTitle from '../Web/CardTitle.web'\r\n\r\ninterface IProps {\r\n wallet: IWalletSTO\r\n onPress: () => void\r\n}\r\nconst WalletCardWeb: React.FC = ({wallet, onPress}) => {\r\n return (\r\n
    \r\n
    \r\n
    \r\n {FormatCurrency(wallet.Balance, wallet.Currency)}\r\n {wallet.Currency.Name}\r\n \r\n
    \r\n \r\n )\r\n}\r\n\r\nexport default WalletCardWeb\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport WalletCardWeb from '../../../../Components/Cards/WalletCardWeb'\r\nimport {HorizontalScroll} from '../../../../Components/Web'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../../i18n'\r\nimport {dashboardStore} from '../../Dashboard/Store.web'\r\nimport ToprRowLoader from './ToprRowLoader.web'\r\n\r\ninterface IProps {}\r\n\r\nconst WalletsScroll: React.FC = ({children}) => {\r\n const {Wallets, IsWalletLoading} = dashboardStore\r\n\r\n const renderWalletCards = () => {\r\n return Wallets.map((wallet, key) => (\r\n {\r\n navigate('walletDetails', {\r\n currencyGuid: wallet.Currency.CurrencyGuid,\r\n })\r\n }}\r\n wallet={wallet}\r\n />\r\n ))\r\n }\r\n\r\n if (IsWalletLoading) {\r\n return \r\n }\r\n\r\n return (\r\n <>\r\n

    {i18n.t('Common.Pay')}

    \r\n {renderWalletCards()}\r\n \r\n )\r\n}\r\n\r\nexport default observer(WalletsScroll)\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {SystemMessageCard} from '../../../../Components'\r\nimport {} from '../../Components'\r\nimport CouponsScroll from '../../Components/Web/CouponsScroll.web'\r\nimport SavingCardsScroll from '../../Components/Web/SavingCardsScroll.web'\r\nimport WalletsScroll from '../../Components/Web/WalletsScroll.web'\r\nimport {dashboardStore} from '../Store.web'\r\n\r\ninterface IProps {}\r\n\r\nconst Main: React.FC = ({children}) => {\r\n const {SystemMessages} = dashboardStore\r\n\r\n return (\r\n <>\r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n )\r\n}\r\n\r\nexport default observer(Main)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport ToprUmbraco from '../../../Services/Topr.Umbraco'\r\nimport {IHelpItemViewModel} from '../../../Services/Topr.Umbraco/Models/IHelpItemViewModel'\r\nimport {IHelpViewModel} from '../../../Services/Topr.Umbraco/Models/IHelpViewModel'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public Page?: IHelpViewModel = undefined\r\n public Search: string = ''\r\n public FilteredHelpItems: IHelpItemViewModel[] = []\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public GetHelp() {\r\n this.IsLoading = true\r\n\r\n ToprUmbraco.GetHelpPage()\r\n .then(async (page: IHelpViewModel) => {\r\n this.Page = page\r\n this.FilteredHelpItems = this.Page.HelpItems\r\n })\r\n .catch((error: string) => {\r\n //console.log(`GetHelpPage failed`, error)\r\n })\r\n .finally(() => {\r\n runInAction(() => (this.IsLoading = false))\r\n })\r\n }\r\n\r\n public SetSearch(search: string) {\r\n this.Search = search\r\n if (this.Page !== undefined) {\r\n if (search.trim() === '') {\r\n this.FilteredHelpItems = this.Page.HelpItems\r\n\r\n return\r\n }\r\n\r\n this.FilteredHelpItems = this.Page.HelpItems.filter((helpDeskItem) => {\r\n const hasAnswer =\r\n helpDeskItem.Answer.toLowerCase().indexOf(search.toLowerCase()) > -1\r\n const hasQuestion =\r\n helpDeskItem.Question.toLowerCase().indexOf(search.toLowerCase()) > -1\r\n\r\n return hasAnswer || hasQuestion\r\n })\r\n }\r\n }\r\n}\r\nexport const helpStore = new Store()\r\n","import React from 'react'\r\nimport { UmbracoMedia } from '../../../Helpers/UrlHelpers'\r\nimport AppImages from '../../../Images/AppImages'\r\nimport { IDownloadContentViewModel } from '../../../Services/Topr.Umbraco/Models/IDownloadContentViewModel'\r\ninterface IProps {\r\n data: IDownloadContentViewModel\r\n}\r\n\r\nconst Download: React.FC = ({data}) => {\r\n const renderContent = () => {\r\n const reactElements: React.ReactNode[] = []\r\n\r\n reactElements.push(\r\n
    \r\n \r\n
    ,\r\n )\r\n reactElements.push(\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    ,\r\n )\r\n\r\n return reactElements\r\n }\r\n return (\r\n
    \r\n
    {renderContent()}
    \r\n
    \r\n )\r\n}\r\n\r\nexport default Download\r\n","import React from 'react'\r\nimport ReactMarkdown from 'react-markdown'\r\nimport { UmbracoMedia } from '../../../Helpers/UrlHelpers'\r\nimport { IImageTextViewModel } from '../../../Services/Topr.Umbraco/Models'\r\ninterface IProps {\r\n data: IImageTextViewModel\r\n}\r\n\r\nconst ImageText: React.FC = ({data}) => {\r\n const renderContent = () => {\r\n const reactElements: React.ReactNode[] = []\r\n\r\n reactElements.push(\r\n
    \r\n \r\n
    ,\r\n )\r\n reactElements.push(\r\n
    \r\n )\r\n\r\n if (data.Right) {\r\n reactElements.reverse()\r\n }\r\n\r\n return reactElements\r\n }\r\n return (\r\n
    \r\n
    {renderContent()}
    \r\n
    \r\n )\r\n}\r\n\r\nexport default ImageText\r\n","import React from 'react'\r\nimport { navigate } from '../../../Helpers/NavigationHelper'\r\nimport { IRegisterLoginViewModel } from '../../../Services/Topr.Umbraco/Models'\r\ninterface IProps {\r\n data: IRegisterLoginViewModel\r\n}\r\n\r\nconst RegisterLogin: React.FC = ({data}) => {\r\n return (\r\n
    \r\n

    {data.Title}

    \r\n
    {data.Subtitle}
    \r\n navigate('register')}>\r\n {data.RegisterText}\r\n \r\n\r\n \r\n
    \r\n )\r\n}\r\n\r\nexport default RegisterLogin\r\n","import React from 'react'\r\nimport {ITextElementModel} from '../../../Services/Topr.Umbraco/Models'\r\ninterface IProps {\r\n data: ITextElementModel\r\n}\r\n\r\nconst TextElement: React.FC = ({data}) => {\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport default TextElement\r\n","import {toJS} from 'mobx'\r\nimport React from 'react'\r\n// import {\r\n// IBaseContent,\r\n// IImageText,\r\n// IRegisterLogin,\r\n\r\n// } from '../../../Models/Strapi/Models'\r\n//import {IDownload} from '../../../Models/Strapi/MyModels'\r\nimport {\r\n IContentElement,\r\n IImageTextViewModel,\r\n IRegisterLoginViewModel,\r\n ITextElementModel,\r\n} from '../../../Services/Topr.Umbraco/Models'\r\nimport {IDownloadContentViewModel} from '../../../Services/Topr.Umbraco/Models/IDownloadContentViewModel'\r\nimport Download from './Download'\r\nimport ImageText from './ImageText'\r\n\r\nimport RegisterLogin from './RegisterLogin'\r\nimport TextElement from './TextElement'\r\n\r\ninterface IProps {\r\n contentElements?: IContentElement[]\r\n}\r\n\r\nconst ContentElements: React.FC = ({contentElements}) => {\r\n if (contentElements === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n
    \r\n {contentElements.map((contentElement, key) => {\r\n switch (contentElement.Type) {\r\n case 'registerLogin':\r\n return (\r\n \r\n )\r\n\r\n case 'imageText':\r\n return (\r\n \r\n )\r\n case 'downloadContent':\r\n return (\r\n \r\n )\r\n case 'textElement':\r\n return (\r\n \r\n )\r\n\r\n default:\r\n return (\r\n
    \r\n UnknownContent - {contentElement.Type}\r\n
    \r\n )\r\n }\r\n })}\r\n
    \r\n )\r\n}\r\n\r\nexport default ContentElements\r\n","import React, {useState} from 'react'\r\nimport ReactMarkdown from 'react-markdown'\r\nimport {HelpItem} from '../../../Models/Strapi/Models'\r\nimport { IHelpItemViewModel } from '../../../Services/Topr.Umbraco/Models/IHelpItemViewModel'\r\ninterface IProps {\r\n helpItem: IHelpItemViewModel\r\n}\r\n\r\nconst HelpItemView: React.FC = ({helpItem}) => {\r\n \r\n return (\r\n
    \r\n

    {helpItem.Question}

    \r\n
    \r\n \r\n
    \r\n )\r\n}\r\n\r\nexport default HelpItemView\r\n","import React from 'react'\r\nimport {HelpItem} from '../../../Models/Strapi/Models'\r\nimport { IHelpItemViewModel } from '../../../Services/Topr.Umbraco/Models/IHelpItemViewModel'\r\nimport HelpItemView from './HelpItemView'\r\ninterface IProps {\r\n helpItems: IHelpItemViewModel[]\r\n}\r\n\r\nconst HelpItemsView: React.FC = ({helpItems}) => {\r\n //const [showShadow, setshowShadow] = useState(false)\r\n\r\n if (helpItems === undefined || helpItems.length === 0) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n {helpItems.map((helpItem, key) => (\r\n \r\n ))}\r\n \r\n )\r\n}\r\n\r\nexport default HelpItemsView\r\n","import React, {useEffect} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {helpStore} from '../../../Home/Help/Store'\r\nimport {ContentElements} from '../../../../Components/Web/Strapi'\r\nimport {ToprScreenLoader} from '../../../../Components'\r\nimport {Icon, Input} from 'react-native-elements'\r\nimport i18n from '../../../../i18n'\r\nimport HelpItemsView from '../../../Home/Components/HelpItemsView'\r\nimport {observer} from 'mobx-react'\r\n\r\ninterface IProps {}\r\n\r\nconst Help: React.FC = ({children}) => {\r\n useEffect(() => {\r\n helpStore.GetHelp()\r\n }, [helpStore])\r\n\r\n const {IsLoading, Page, FilteredHelpItems, Search} = helpStore\r\n\r\n if (IsLoading) {\r\n // return null\r\n return \r\n }\r\n\r\n const renderClearSearchIcon = () => {\r\n if (Search === '') {\r\n return undefined\r\n }\r\n return (\r\n {\r\n helpStore.SetSearch('')\r\n }}\r\n />\r\n )\r\n }\r\n return (\r\n <>\r\n
    \r\n \r\n
    \r\n
    \r\n helpStore.SetSearch(value)}\r\n />\r\n
    \r\n
    \r\n\r\n \r\n
    \r\n \r\n )\r\n}\r\n\r\nexport default observer(Help)\r\n","import 'bulma/css/bulma.min.css'\r\nimport {observer} from 'mobx-react'\r\nimport * as React from 'react'\r\nimport {useEffect, useRef} from 'react'\r\nimport {AppState, AppStateStatus, View} from 'react-native'\r\nimport {AddAccountModal, SystemMessageCard} from '../../../Components'\r\nimport ProfileButtonEmail from '../../../Components/Buttons/ProfileButtonEmail'\r\nimport {LeftColumnLayout} from '../../../Components/Web'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../i18n'\r\nimport {linkingStore} from '../../../Navigation/LinkingStore'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport '../../../Style/style.web.scss'\r\nimport {AddMenu} from '../Components'\r\nimport ChildUsersModal from '../Components/UserMenu/ChildUsersModal'\r\nimport {userMenuStore} from '../Components/UserMenu/Store'\r\nimport UserMenu from '../Components/UserMenu/UserMenu'\r\nimport CouponsScroll from '../Components/Web/CouponsScroll.web'\r\nimport SavingCardsScroll from '../Components/Web/SavingCardsScroll.web'\r\nimport SideMenu from '../Components/Web/SideMenu.web'\r\nimport WalletsScroll from '../Components/Web/WalletsScroll.web'\r\nimport {dashboardStore} from './Store'\r\n\r\n//interface IProps extends StackScreenProps {}\r\nimport {createStackNavigator} from '@react-navigation/stack'\r\nimport Main from './Screens/Main'\r\nimport Help from './Screens/Help'\r\nimport {GetTenantPagetitle} from '../../../Helpers/TextHelpers'\r\n\r\nexport type DashboardScreensList = {\r\n main: undefined\r\n help: undefined\r\n}\r\n\r\nconst Stack = createStackNavigator()\r\nconst DashboardWeb: React.FC = () => {\r\n const appState = useRef(AppState.currentState)\r\n\r\n const _handleAppStateChange = (nextAppState: AppStateStatus) => {\r\n if (\r\n appState.current.match(/inactive|background/) &&\r\n nextAppState === 'active'\r\n ) {\r\n dashboardStore.Initialize()\r\n }\r\n\r\n appState.current = nextAppState\r\n }\r\n useEffect(() => {\r\n myLog.warn('Dashboard web')\r\n\r\n AppState.addEventListener('change', _handleAppStateChange)\r\n dashboardStore.Initialize()\r\n return linkingStore.Initialize()\r\n }, [dashboardStore])\r\n\r\n const {User, IsUserMenuVisible, IsAddMenuVisible, SystemMessages} =\r\n dashboardStore\r\n\r\n return (\r\n <>\r\n }\r\n leftContentBottom={\r\n <>\r\n {\r\n dashboardStore.ToggleUserMenu(true)\r\n }}\r\n />\r\n \r\n }>\r\n \r\n \r\n \r\n \r\n \r\n\r\n dashboardStore.ToggleUserMenu(false)}\r\n />\r\n dashboardStore.ToggleAddMenu(false)}\r\n />\r\n \r\n userMenuStore.ToggleChildMenu()}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default observer(DashboardWeb)\r\n","import React from 'react'\r\nimport {IsWebAndMobileOrApp} from '../../../Helpers/WebHelpers'\r\nimport Dashboard from './Dashboard'\r\nimport DashboardWeb from './DashboardWeb'\r\n\r\ninterface IProps {}\r\n\r\nconst index: React.FC = () => {\r\n if (IsWebAndMobileOrApp()) {\r\n return \r\n }\r\n return \r\n}\r\n\r\nexport default index\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {View} from 'react-native'\r\nimport {\r\n Container,\r\n Content,\r\n FormHeader,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport i18n from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\n\r\ninterface IProps {}\r\n\r\ntype FormData = {\r\n pincode: string\r\n confirmPincode: string\r\n}\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst SetPincode: React.FC = ({navigation: {navigate}}) => {\r\n useEffect(() => {\r\n myLog.info('Pincode')\r\n }, [null])\r\n\r\n const {control, handleSubmit, errors, getValues, formState} =\r\n useForm({mode: 'onChange'})\r\n\r\n const onSubmit = (data: FormData) => {\r\n persistedStore.SetAuthenticationMethodPincode(data.pincode)\r\n }\r\n\r\n const {pincodeStyle} = Style\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n handleSubmit((data) => onSubmit(data))(),\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t(\r\n 'Pincode.Form.Fields.ConfirmPincode.Errors.Required',\r\n ),\r\n minLength: {\r\n value: 4,\r\n message: i18n.t(\r\n 'Pincode.Form.Fields.ConfirmPincode.Errors.MinLength',\r\n ),\r\n },\r\n pattern: {\r\n value: /[0-9]{4}/,\r\n message: i18n.t(\r\n 'Pincode.Form.Fields.ConfirmPincode.Errors.Regex',\r\n ),\r\n },\r\n validate: {\r\n equality: (confirmPincode: string) => {\r\n const formData = getValues()\r\n\r\n return (\r\n confirmPincode === formData.pincode ||\r\n i18n.t(\r\n 'Pincode.Form.Fields.ConfirmPincode.Errors.Equality',\r\n )\r\n )\r\n },\r\n },\r\n },\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default SetPincode\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\n\r\nimport React, {useEffect} from 'react'\r\n\r\nimport {persistedStore} from '../../Mobx/PersistedStore'\r\nimport {MainScreensList} from '../../Navigation'\r\nimport {myLog} from '../../Services/Client/LogService'\r\nimport Dashboard from './Dashboard/index'\r\nimport SetPincode from './SetPincode/SetPincode'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst DashboardIndex: React.FC = ({navigation}) => {\r\n useEffect(() => {\r\n myLog.info('Dashboard Index')\r\n }, [null])\r\n\r\n const {Pincode} = persistedStore\r\n\r\n if (Pincode === undefined) {\r\n return \r\n }\r\n\r\n return \r\n}\r\n\r\nexport default observer(DashboardIndex)\r\n","import axios, {AxiosError} from 'axios'\r\nimport AppConfig from '../../Config/AppConfig'\r\nimport {HandleAxiosCatch, Json2Url} from '../../Helpers/ServiceHelpers'\r\nimport {primaryLanguage} from '../../i18n'\r\nimport {persistedStore} from '../../Mobx'\r\nimport {ToprError} from '../../Models/Client'\r\nimport AuthenticationController from './AuthenticationController'\r\nimport * as Linking from 'expo-linking'\r\nimport {AppLinkTypes} from '../../Models/Client/Enums'\r\nimport {CreateAppLinkUrl} from '../../Helpers/UrlHelpers'\r\nimport {axiosAuthClient} from './Axios/AxiosAuthClient'\r\n\r\nexport default {\r\n RegisterConsumer: (\r\n name: string,\r\n email: string,\r\n password: string,\r\n confirmPassword: string,\r\n ) => {\r\n const data = {\r\n Name: name,\r\n Email: email,\r\n Password: password,\r\n ConfirmPassword: confirmPassword,\r\n RegisterConfirmUrl: CreateAppLinkUrl(AppLinkTypes.RegisterConfirm),\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n axiosAuthClient\r\n .post(`api/v2/register/consumer`, data)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n RegisterConfirmConsumer: (userGuid: string) => {\r\n const data = {\r\n UserGuid: userGuid,\r\n }\r\n const queryStringParams = Json2Url(data)\r\n\r\n return new Promise((resolve, reject) => {\r\n axiosAuthClient\r\n .post(`api/v1/register/consumer/confirm?${queryStringParams}`, null)\r\n .then(() => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n EmailExists: (email: string) => {\r\n const data = {\r\n Email: email,\r\n }\r\n const queryStringParams = Json2Url(data)\r\n\r\n return new Promise((resolve, reject) => {\r\n const url = `api/v1/register/emailexists?${queryStringParams}`\r\n axiosAuthClient\r\n .get(url)\r\n .then(() => {\r\n reject(new ToprError('USER_EMAIL_NOT_UNIQUE'))\r\n })\r\n .catch((error: AxiosError) => {\r\n const status =\r\n error.response !== undefined ? error.response.status : 400\r\n\r\n switch (status) {\r\n case 404:\r\n //not found, so it is valid email to register or change into\r\n resolve()\r\n break\r\n default:\r\n HandleAxiosCatch(error, reject)\r\n break\r\n }\r\n })\r\n })\r\n },\r\n}\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {DoServiceCall, SetFriendlyMessage} from '../../Helpers/ServiceHelpers'\r\nimport {GetI18NAlertMessage, GetRandStockImage} from '../../Helpers/UiHelpers'\r\nimport i18n from '../../i18n'\r\nimport {appUiStore} from '../../Mobx/AppUiStore'\r\nimport {IAlertMessage, MyErrorMessage} from '../../Models/Client'\r\nimport ToprError from '../../Models/Client/ErrorHandling/ToprError'\r\nimport {myLog} from '../../Services/Client/LogService'\r\nimport RegisterController from '../../Services/Topr.Core/RegisterController'\r\n\r\nexport type RegisterFormData = {\r\n name: string\r\n email: string\r\n password: string\r\n acceptTerms: boolean\r\n}\r\n\r\nconst initialForm: RegisterFormData = {\r\n name: '',\r\n email: '',\r\n password: '',\r\n acceptTerms: false,\r\n}\r\n\r\nclass Store {\r\n public IsSubmitting = false\r\n public ConfirmationSent = false\r\n public Email?: string = undefined\r\n public FormData: RegisterFormData = initialForm\r\n public IsConfirming = false\r\n\r\n public ResultMessage?: IAlertMessage = undefined\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n this.InitialState()\r\n }\r\n\r\n public InitialState() {\r\n this.IsSubmitting = false\r\n this.Email = undefined\r\n this.ConfirmationSent = false\r\n this.FormData = initialForm\r\n this.IsConfirming = true\r\n }\r\n\r\n public SetFormData(\r\n key: FormKey,\r\n value: RegisterFormData[FormKey],\r\n ) {\r\n this.FormData[key] = value\r\n }\r\n\r\n public CheckEmail(\r\n navigate: () => void,\r\n onError: (errorMessage: string) => void,\r\n ) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n\r\n RegisterController.EmailExists(this.FormData.email!)\r\n .then(() => {\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n navigate()\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, onError, [\r\n new MyErrorMessage(\r\n 'USER_EMAIL_NOT_UNIQUE',\r\n 'Register.Form.ServerErrors.Title',\r\n 'Register.Form.ServerErrors.USER_EMAIL_NOT_UNIQUE',\r\n 'warning',\r\n {\r\n email: this.FormData.email!,\r\n },\r\n ),\r\n ])\r\n\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n }\r\n\r\n public RegisterConsumer(onError: (errorMessage: string) => void) {\r\n //myLog.info(this.FormData)\r\n\r\n DoServiceCall(() => {\r\n myLog.info('register', this.FormData)\r\n this.IsSubmitting = true\r\n\r\n //test\r\n // setTimeout(() => {\r\n // runInAction(() => {\r\n // console.log('dummy submit')\r\n // this.IsSubmitting = false\r\n // this.ConfirmationSent = true\r\n // })\r\n // }, 100)\r\n\r\n RegisterController.RegisterConsumer(\r\n this.FormData.name,\r\n this.FormData.email,\r\n this.FormData.password,\r\n this.FormData.password,\r\n )\r\n .then(() => {\r\n //this.InitialState()\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n this.ConfirmationSent = true\r\n //navigateConfirmationSent()\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, onError, [\r\n new MyErrorMessage(\r\n 'USER_EMAIL_NOT_UNIQUE',\r\n 'Register.Form.ServerErrors.Title',\r\n 'Register.Form.ServerErrors.USER_EMAIL_NOT_UNIQUE',\r\n 'warning',\r\n {\r\n email: this.FormData.email!,\r\n },\r\n ),\r\n ])\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n }\r\n\r\n //confirm\r\n\r\n public InitializeConfirm(userGuid: string) {\r\n this.InitialState()\r\n\r\n this.RegisterConfirmConsumer(userGuid)\r\n\r\n // setTimeout(() => {\r\n // runInAction(() => {\r\n // this.IsConfirming = false\r\n // this.IsConfirmSucces = true\r\n // })\r\n // }, 1000)\r\n }\r\n\r\n public RegisterConfirmConsumer(userGuid: string) {\r\n DoServiceCall(() => {\r\n //2) valid email, do the actual register now\r\n RegisterController.RegisterConfirmConsumer(userGuid)\r\n .then(() => {\r\n runInAction(() => {\r\n this.IsConfirming = false\r\n this.ResultMessage = {\r\n title: i18n.t('RegisterConfirm.Header'),\r\n message: i18n.t('RegisterConfirm.ConfirmSuccess'),\r\n }\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => {\r\n this.IsConfirming = false\r\n this.ResultMessage = GetI18NAlertMessage(\r\n 'RegisterConfirm.ServerErrors',\r\n toprError.Code,\r\n )\r\n })\r\n })\r\n })\r\n }\r\n}\r\n\r\nexport const store = new Store()\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport React, {useEffect} from 'react'\r\nimport {Keyboard, Text} from 'react-native'\r\nimport {useForm} from 'react-hook-form'\r\nimport {\r\n Container,\r\n Content,\r\n FormHeader,\r\n FormInfo,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport i18n from '../../../i18n'\r\nimport {store} from '../Store'\r\n\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {RegisterSteps} from '../Register'\r\nimport {RegisterFormData} from '../Store'\r\nimport {sizes} from '../../../Style'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\n\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst NameStep: React.FC = ({navigation: {navigate}}) => {\r\n const {control, handleSubmit, errors, setValue, formState} =\r\n useForm({\r\n mode: 'onChange',\r\n })\r\n\r\n useEffect(() => {\r\n myLog.info('NameStep')\r\n store.Initialize()\r\n\r\n //navigate('termsPdf')\r\n\r\n if (AppConfig.IsDebugMode) {\r\n setValue('name', 'Rdr test')\r\n }\r\n }, [store])\r\n\r\n const onSubmit = (data: RegisterFormData) => {\r\n store.SetFormData('name', data.name)\r\n navigate('email')\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {i18n.t('Register.NameStep.Header')}\r\n {i18n.t('Register.NameStep.Info')}\r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t('Register.NameStep.Field.Errors.Required'),\r\n },\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default NameStep\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {Keyboard} from 'react-native'\r\nimport {\r\n Container,\r\n Content,\r\n FormHeader,\r\n FormInfo,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {RegisterSteps} from '../Register'\r\nimport {RegisterFormData, store} from '../Store'\r\n\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst EmailStep: React.FC = ({navigation: {navigate}}) => {\r\n const {FormData, IsSubmitting} = store\r\n\r\n const {control, handleSubmit, errors, setValue, setError, formState} =\r\n useForm({mode: 'onChange'})\r\n\r\n useEffect(() => {\r\n myLog.info('EmailStep')\r\n if (AppConfig.IsDebugMode) {\r\n setValue('email', 'r.de.ruijter@mybility.nl')\r\n //setValue('email', 'superdopey@live.nl')\r\n }\r\n }, [store])\r\n\r\n const onSubmit = (data: RegisterFormData) => {\r\n store.SetFormData('email', data.email)\r\n store.CheckEmail(\r\n () => navigate('password'),\r\n (errorMessage) => {\r\n setError('email', {\r\n type: 'manual',\r\n message: errorMessage,\r\n })\r\n },\r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {i18n.t('Register.EmailStep.Header', {name: FormData.name})}\r\n \r\n {i18n.t('Register.EmailStep.Info')}\r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t('Register.EmailStep.Field.Errors.Required'),\r\n pattern: {\r\n value: /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/,\r\n message: i18n.t('Register.EmailStep.Field.Errors.Regex'),\r\n },\r\n },\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(EmailStep)\r\n//simple email regex\r\n//https://stackoverflow.com/questions/742451/what-is-the-simplest-regular-expression-to-validate-emails-to-not-accept-them-bl\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\n\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {\r\n FormHeader,\r\n FormInfo,\r\n MyButton,\r\n Content,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n Container,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\n\r\nimport {store} from '../Store'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {RegisterSteps} from '../Register'\r\nimport {RegisterFormData} from '../Store'\r\nimport {Keyboard} from 'react-native'\r\nimport i18n from '../../../i18n'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst PasswordStep: React.FC = ({navigation: {navigate}}) => {\r\n const {control, handleSubmit, errors, setValue, formState} =\r\n useForm({\r\n mode: 'onChange',\r\n })\r\n\r\n useEffect(() => {\r\n myLog.info('PasswordStep')\r\n if (AppConfig.IsDebugMode) {\r\n setValue('password', 'sdopey01')\r\n }\r\n }, [store])\r\n\r\n const onSubmit = (data: RegisterFormData) => {\r\n store.SetFormData('password', data.password)\r\n navigate('terms')\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {i18n.t('Register.PasswordStep.Header')}\r\n {i18n.t('Register.PasswordStep.Info')}\r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t(\r\n 'Register.PasswordStep.Field.Errors.Required',\r\n ),\r\n minLength: {\r\n value: 6,\r\n message: i18n.t(\r\n 'Register.PasswordStep.Field.Errors.MinLength',\r\n ),\r\n },\r\n },\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default PasswordStep\r\n//simple email regex\r\n//https://stackoverflow.com/questions/742451/what-is-the-simplest-regular-expression-to-validate-emails-to-not-accept-them-bl\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {Text, Keyboard, Platform, PlatformWebStatic} from 'react-native'\r\nimport {\r\n FormHeader,\r\n TextButton,\r\n MyButton,\r\n MyCheckBox,\r\n Content,\r\n MyFooter,\r\n MyFooterTile,\r\n Container,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\n\r\nimport {store} from '../Store'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {RegisterSteps} from '../Register'\r\nimport {RegisterFormData} from '../Store'\r\nimport * as Linking from 'expo-linking'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport i18n from '../../../i18n'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetTenantPdfWeb} from '../../../Helpers/UrlHelpers'\r\n\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst TermsStep: React.FC = ({navigation: {navigate}}) => {\r\n const {IsSubmitting} = store\r\n\r\n const {control, handleSubmit, errors, setError, formState} =\r\n useForm({\r\n mode: 'onChange',\r\n })\r\n\r\n useEffect(() => {\r\n myLog.info('TermsStep')\r\n }, [store])\r\n\r\n const onSubmit = (data: RegisterFormData) => {\r\n store.SetFormData('acceptTerms', data.acceptTerms)\r\n store.RegisterConsumer((errorMessage) => {\r\n setError('acceptTerms', {\r\n type: 'manual',\r\n message: errorMessage,\r\n })\r\n })\r\n }\r\n\r\n const renderPdfLink = () => {\r\n if (Platform.OS === 'web') {\r\n return (\r\n \r\n {i18n.t('Register.TermsStep.Field.LinkText', {\r\n appName: AppConfig.Tenant.AppName,\r\n })}\r\n \r\n )\r\n }\r\n\r\n return (\r\n {\r\n navigate('termsPdf')\r\n }}>\r\n {i18n.t('Register.TermsStep.Field.LinkText', {\r\n appName: AppConfig.Tenant.AppName,\r\n })}\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {i18n.t('Register.TermsStep.Header')}\r\n \r\n \r\n {i18n.t('Register.TermsStep.Field.Label')}\r\n {renderPdfLink()}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(TermsStep)\r\n// //simple email regex\r\n// //https://stackoverflow.com/questions/742451/what-is-the-simplest-regular-expression-to-validate-emails-to-not-accept-them-bl\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport React from 'react'\r\nimport {Asset} from 'expo-asset'\r\nimport {View} from 'react-native'\r\nimport PDFReader from 'rn-pdf-reader-js'\r\nimport {SubmitHeader} from '../../../Components'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport i18n, {primaryLanguage} from '../../../i18n'\r\nimport {RegisterSteps} from '../Register'\r\n\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst TermsPdf: React.FC = ({navigation: {goBack}}) => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default TermsPdf\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\n\r\nimport React, {useEffect} from 'react'\r\nimport {Text} from 'react-native'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {Container, Content, ResultCard} from '../../../Components'\r\nimport I18n from '../../../i18n'\r\nimport {store} from '../Store'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style, {colors, sizes} from '../../../Style'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\n\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst ConfirmationSentStep: React.FC = ({\r\n navigation: {navigate},\r\n navigation,\r\n}) => {\r\n const {FormData} = store\r\n\r\n useEffect(() => {\r\n myLog.info('ConfirmationSent')\r\n }, [null])\r\n\r\n return (\r\n \r\n \r\n \r\n navigate('login'),\r\n }}>\r\n \r\n {I18n.t('Register.ConfirmationSentStep.TextPart1')}\r\n {FormData.email}.\r\n {I18n.t('Register.ConfirmationSentStep.TextPart2')}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(ConfirmationSentStep)\r\n//simple email regex\r\n//https://stackoverflow.com/questions/742451/what-is-the-simplest-regular-expression-to-validate-emails-to-not-accept-them-bl\r\n","import {\r\n CardStyleInterpolators,\r\n createStackNavigator,\r\n StackScreenProps,\r\n} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {GetTenantPagetitle} from '../../Helpers/TextHelpers'\r\nimport i18n from '../../i18n'\r\nimport {MainScreensList} from '../../Navigation'\r\nimport {myLog} from '../../Services/Client/LogService'\r\nimport {\r\n ConfirmationSentStep,\r\n EmailStep,\r\n NameStep,\r\n PasswordStep,\r\n TermsPdf,\r\n TermsStep,\r\n} from './Components'\r\nimport {store} from './Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nexport type RegisterSteps = {\r\n name: undefined\r\n email: undefined\r\n password: undefined\r\n terms: undefined\r\n termsPdf: undefined\r\n confirmationSentStep: undefined\r\n}\r\n\r\nconst RegisterStack = createStackNavigator()\r\n\r\nconst Register: React.FC = ({navigation: {goBack}}) => {\r\n useEffect(() => {\r\n myLog.info('Register')\r\n store.Initialize()\r\n }, [store])\r\n const {ConfirmationSent} = store\r\n\r\n return (\r\n \r\n {ConfirmationSent ? (\r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport default observer(Register)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n MyHeader,\r\n ResultCard,\r\n ToprScreenLoader,\r\n} from '../../Components'\r\nimport {StockImageLayout} from '../../Components/Web'\r\nimport i18n from '../../i18n'\r\nimport {appUiStore} from '../../Mobx/AppUiStore'\r\nimport {MainScreensList} from '../../Navigation'\r\nimport {myLog} from '../../Services/Client/LogService'\r\nimport {store} from './Store'\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst RegisterConfirm: React.FC = ({\r\n navigation: {navigate, goBack},\r\n navigation,\r\n route,\r\n}) => {\r\n useEffect(() => {\r\n //navigate('Pincode')\r\n const {userGuid} = route.params\r\n myLog.info(`confirm ${userGuid}`)\r\n\r\n store.InitializeConfirm(userGuid)\r\n }, [store])\r\n\r\n const {IsConfirming, ResultMessage} = store\r\n const renderResult = () => {\r\n if (ResultMessage === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n navigate('login'),\r\n }}>\r\n {ResultMessage.message}\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n {renderResult()}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(RegisterConfirm)\r\n","//import Geolocation, {GeoCoordinates} from 'react-native-geolocation-service'\r\nimport getDirections from 'react-native-google-maps-directions'\r\n\r\nimport * as Location from 'expo-location'\r\nimport {LocationObject} from 'expo-location'\r\nimport {ILocationSTO} from '../Models/Server'\r\n\r\nexport const GetDirections = (location: ILocationSTO) => {\r\n GetCurrentLocation().then((myLocation) => {\r\n const data = {\r\n source: {\r\n latitude: myLocation.coords.latitude,\r\n longitude: myLocation.coords.longitude,\r\n // latitude: 51.826688,\r\n // longitude: 4.4302336,\r\n },\r\n destination: {\r\n latitude: location.Latitude,\r\n longitude: location.Longitude,\r\n },\r\n params: [\r\n {\r\n key: 'travelmode',\r\n value: 'driving', // may be \"walking\", \"bicycling\" or \"transit\" as well\r\n },\r\n ],\r\n }\r\n\r\n getDirections(data)\r\n })\r\n}\r\n\r\nexport const GetCurrentLocation = () => {\r\n return new Promise((resolve, reject) => {\r\n Location.getCurrentPositionAsync({})\r\n .then((location: LocationObject) => {\r\n resolve(location)\r\n })\r\n .catch(() => {\r\n // no coords, still resolve but with location of Mybility\r\n\r\n resolve({\r\n coords: {\r\n latitude: 51.826688,\r\n longitude: 4.4302336,\r\n accuracy: 1,\r\n altitude: 1,\r\n altitudeAccuracy: 1,\r\n heading: 1,\r\n speed: 1,\r\n },\r\n timestamp: new Date().getUTCDate(),\r\n })\r\n })\r\n })\r\n}\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch, Json2Url} from '../../Helpers/ServiceHelpers'\r\nimport {ILocationSTO} from '../../Models/Server'\r\nimport {axiosAuthClient} from './Axios/AxiosAuthClient'\r\n\r\nexport default {\r\n NearbyLocationsV2: (\r\n Latitude: number,\r\n Longitude: number,\r\n Radius: number,\r\n Take: number,\r\n ) => {\r\n return new Promise((resolve, reject) => {\r\n const data = {\r\n Latitude,\r\n Longitude,\r\n Radius,\r\n Take,\r\n }\r\n const queryStringParams = Json2Url(data)\r\n\r\n const url = `api/v1/locations/nearby?${queryStringParams}`\r\n\r\n axiosAuthClient\r\n .get(url)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import * as Location from 'expo-location'\r\nimport {makeAutoObservable, runInAction} from 'mobx'\r\nimport {GetCurrentLocation} from '../../../Helpers/LocationHelper'\r\nimport {DoServiceCall} from '../../../Helpers/ServiceHelpers'\r\nimport {ILocationSTO} from '../../../Models/Server'\r\nimport LocationController from '../../../Services/Topr.Core/LocationController'\r\n\r\nexport default class Store {\r\n //public LocationPermissionStatus: string = 'denied'\r\n\r\n public IsLocationsLoading = true\r\n public Locations: ILocationSTO[] = []\r\n public Search = ''\r\n\r\n public Status = ''\r\n public get IsLocationAuthorized(): boolean {\r\n return this.Status === 'granted'\r\n }\r\n\r\n public get FilteredLocations(): ILocationSTO[] {\r\n if (this.Search !== '') {\r\n return this.Locations.filter(\r\n (x) =>\r\n x.Name.toLowerCase().indexOf(this.Search.toLocaleLowerCase()) > -1 ||\r\n x.City.toLowerCase().indexOf(this.Search.toLocaleLowerCase()) > -1,\r\n )\r\n }\r\n\r\n return this.Locations\r\n }\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public async Initialize() {\r\n this.IsLocationsLoading = true\r\n this.Search = ''\r\n\r\n let {status} = await Location.getPermissionsAsync()\r\n\r\n runInAction(() => (this.Status = status))\r\n\r\n if (this.IsLocationAuthorized) {\r\n this.NearbyLocations()\r\n }\r\n }\r\n\r\n public async RequestLocationPermission() {\r\n let {status} = await Location.requestPermissionsAsync()\r\n runInAction(() => {\r\n this.Status = status\r\n })\r\n if (status === 'granted') {\r\n this.NearbyLocations()\r\n }\r\n }\r\n\r\n public onSearchTextChanged(text: string) {\r\n this.Search = text\r\n }\r\n\r\n public NearbyLocations() {\r\n DoServiceCall(() => {\r\n this.Locations = []\r\n this.IsLocationsLoading = true\r\n\r\n //web?\r\n\r\n GetCurrentLocation().then((location) => {\r\n LocationController.NearbyLocationsV2(\r\n location.coords.latitude,\r\n location.coords.longitude,\r\n 15000000,\r\n 100,\r\n )\r\n .then((locations) => {\r\n runInAction(() => {\r\n this.Locations = locations\r\n this.IsLocationsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLocationsLoading = false\r\n })\r\n })\r\n })\r\n })\r\n }\r\n}\r\n\r\nexport const store = new Store()\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {FlatList, View} from 'react-native'\r\nimport {Icon, Input, Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n LocationCard,\r\n ResultCard,\r\n SubmitHeader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport {GetRandomKey} from '../../../Helpers/UiHelpers'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\nimport {default as I18n, default as i18n} from '../../../i18n'\r\nimport {store} from './Store'\r\nimport {persistedStore} from '../../../Mobx'\r\n\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst Locations: React.FC = ({navigation: {navigate}}) => {\r\n useEffect(() => {\r\n myLog.info('Locations')\r\n store.Initialize()\r\n // AppState.addEventListener('change', _handleAppStateChange)\r\n }, [null])\r\n\r\n const {FilteredLocations, IsLocationsLoading, IsLocationAuthorized, Search} =\r\n store\r\n const {defaultFlatList, flatListContentStyleStock} = Style\r\n const {UserToken} = persistedStore\r\n\r\n const renderLocationAccessDenied = () => {\r\n //dont show when location is authorized\r\n if (IsLocationAuthorized) {\r\n return null\r\n }\r\n\r\n // const renderSettingsMessage = () => {\r\n // const text =\r\n // Platform.OS === 'android'\r\n // ? I18n.t('Locations.RequestAccess.SettingsMessageAndroid')\r\n // : I18n.t('Locations.RequestAccess.SettingsMessageIos')\r\n\r\n // return {text}\r\n // }\r\n return (\r\n \r\n {\r\n store.RequestLocationPermission()\r\n //Linking.openSettings(),\r\n },\r\n }}>\r\n \r\n {I18n.t('Locations.RequestAccess.Message', {\r\n tenantName: AppConfig.Tenant.AppName,\r\n })}\r\n \r\n {/* {renderSettingsMessage()} */}\r\n \r\n \r\n )\r\n }\r\n\r\n const renderLocations = () => {\r\n if (!IsLocationAuthorized) {\r\n return null\r\n }\r\n\r\n const renderSearch = () => {\r\n const icon = Search === '' ? 'search1' : 'close'\r\n\r\n return (\r\n \r\n }\r\n rightIcon={\r\n Search !== '' && (\r\n {\r\n if (Search !== '') {\r\n store.onSearchTextChanged('')\r\n }\r\n }}\r\n />\r\n )\r\n }\r\n onChangeText={(text) => {\r\n store.onSearchTextChanged(text)\r\n }}\r\n value={Search}\r\n />\r\n )\r\n }\r\n\r\n return (\r\n <>\r\n {renderSearch()}\r\n store.NearbyLocations()}\r\n data={FilteredLocations}\r\n renderItem={({item}) => (\r\n {\r\n navigate('locationDetails', {location: item})\r\n }}\r\n />\r\n )}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {renderLocationAccessDenied()}\r\n {renderLocations()}\r\n \r\n {\r\n if (UserToken === undefined) {\r\n navigate('login')\r\n } else {\r\n navigate('dashboard')\r\n }\r\n }}\r\n title={i18n.t('Locations.Header')}\r\n />\r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(Locations)\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {ICurrencyChargeMethodSTO, ICurrencySTO} from '../../Models/Server'\r\nimport {PaymentMethodTypes} from '../../Models/Server/Wallet/ICurrencyChargeMethodSTO'\r\nimport {axiosAuthClient} from './Axios/AxiosAuthClient'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n GetConsumerCurrencies: (merchantGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n const url = `api/v1/merchant/${merchantGuid}/currencies/consumer`\r\n axiosAuthClient\r\n .get(url)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetPaymentMethod: (\r\n currencyGuid: string,\r\n paymentMethodType: PaymentMethodTypes,\r\n ) => {\r\n return new Promise((resolve, reject) => {\r\n const url = `api/v1/currency/${currencyGuid}/paymentmethod/${paymentMethodType}`\r\n axiosAuthUser\r\n .get(\r\n `api/v1/currency/${currencyGuid}/paymentmethod/${paymentMethodType}`,\r\n )\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {ICurrencySTO} from '../../Models/Server'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n Join: (merchantGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/merchant/${merchantGuid}/join`, null)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {DoServiceCall} from '../../../Helpers/ServiceHelpers'\r\nimport {ICurrencySTO, ILocationSTO, IWalletSTO} from '../../../Models/Server'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport I18n from '../../../i18n'\r\nimport {ToprError} from '../../../Models/Client'\r\nimport CurrencyController from '../../../Services/Topr.Core/CurrencyController'\r\nimport MerchantController from '../../../Services/Topr.Core/MerchantController'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\n\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\n\r\nclass Store {\r\n public IsCurrenciesLoading = true\r\n public IsSubmitting = false\r\n public Currencies: ICurrencySTO[] = []\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public GetConsumerCurrencies(merchantGuid: string) {\r\n DoServiceCall(() => {\r\n this.IsCurrenciesLoading = true\r\n CurrencyController.GetConsumerCurrencies(merchantGuid)\r\n .then((currencies) => {\r\n runInAction(() => {\r\n this.Currencies = currencies\r\n this.IsCurrenciesLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsCurrenciesLoading = false\r\n })\r\n })\r\n })\r\n }\r\n\r\n public JoinMerchant(location: ILocationSTO) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n\r\n // setTimeout(() => {\r\n // runInAction(() => {\r\n // this.IsSubmitting = false\r\n // dashboardStore.GetWallets()\r\n // navigate('Dashboard')\r\n // ShowToast(\r\n // I18n.t('LocationDetails.AddLocation.Success', {\r\n // locationName: location.Name,\r\n // }),\r\n // )\r\n // })\r\n // }, 1000)\r\n\r\n MerchantController.Join(location.MerchantGuid)\r\n .then(() => {\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n dashboardStore.GetWallets()\r\n navigate('dashboard')\r\n appUiStore.ShowToast({\r\n message: I18n.t('LocationDetails.AddLocation.Success', {\r\n locationName: location.Name,\r\n }),\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n }\r\n}\r\nexport const store = new Store()\r\n","import {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {FlatList, Platform, Text, View} from 'react-native'\r\nimport {Overlay} from 'react-native-elements'\r\nimport {\r\n FormInfo,\r\n ImageButton,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyModal,\r\n ToprScreenLoader,\r\n} from '../../../../Components'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\nimport {\r\n GetFileUrl,\r\n GetLocalizedImageUrl,\r\n GetRandomKey,\r\n} from '../../../../Helpers/UiHelpers'\r\nimport I18n from '../../../../i18n'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {ILocationSTO} from '../../../../Models/Server'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport Style, {deviceWidth, sizes} from '../../../../Style'\r\nimport {store} from '../Store'\r\nimport i18n from '../../../../i18n/index'\r\nimport {persistedStore} from '../../../../Mobx'\r\n\r\ninterface IProps {\r\n location: ILocationSTO\r\n}\r\nconst PaymentTab: React.FC = ({location}) => {\r\n useEffect(() => {\r\n store.GetConsumerCurrencies(location.MerchantGuid)\r\n }, [null])\r\n\r\n const {defaultFlatList, defaultFlatListWhite} = Style\r\n const {IsCurrenciesLoading, Currencies, IsSubmitting} = store\r\n\r\n const renderFooter = () => {\r\n if (Currencies.length === 0 || persistedStore.UserToken === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n \r\n {\r\n appUiStore.ShowConfirm(\r\n i18n.t('LocationDetails.AddLocation.Confirm'),\r\n () => store.JoinMerchant(location),\r\n )\r\n }}\r\n />\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n store.GetConsumerCurrencies(location.MerchantGuid)}\r\n data={Currencies}\r\n renderItem={({item}) => (\r\n \r\n {item.Name}\r\n \r\n )}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n {renderFooter()}\r\n
    \r\n \r\n )\r\n}\r\n\r\nexport default observer(PaymentTab)\r\n","import React from 'react'\r\nimport {View} from 'react-native'\r\nimport {\r\n FormHeader,\r\n MyButton,\r\n Content,\r\n MyFooter,\r\n MyFooterTile,\r\n} from '../../../../Components'\r\nimport {GetDirections} from '../../../../Helpers/LocationHelper'\r\nimport I18n from '../../../../i18n'\r\nimport {ILocationSTO} from '../../../../Models/Server'\r\nimport Style, {sizes} from '../../../../Style'\r\nimport {Text} from 'react-native-elements'\r\n\r\ninterface IProps {\r\n location: ILocationSTO\r\n}\r\n\r\nconst LocationTab: React.FC = ({location}) => {\r\n const {textNote} = Style\r\n return (\r\n <>\r\n \r\n {I18n.t('LocationDetails.Address')}\r\n \r\n {I18n.t('LocationDetails.Street')}\r\n \r\n {location.StreetName} {location.StreetNumber}\r\n \r\n \r\n \r\n {I18n.t('LocationDetails.City')}\r\n {location.City}\r\n \r\n \r\n \r\n \r\n {\r\n GetDirections(location)\r\n }}\r\n />\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default LocationTab\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport React from 'react'\r\nimport {View, Text} from 'react-native'\r\nimport {SceneMap, TabBar, TabView} from 'react-native-tab-view'\r\nimport {\r\n Container,\r\n Content,\r\n ImageHeader,\r\n SubmitHeader,\r\n} from '../../../Components'\r\nimport {GetFileUrl} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport Style, {colors, tabViewLayout} from '../../../Style'\r\nimport PaymentTab from './Components/PaymentTab'\r\nimport LocationTab from './Components/LocationTab'\r\nimport {MyTab, StockImageLayout} from '../../../Components/Web'\r\nimport {Tab} from 'react-native-elements'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {store} from './Store'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport {observer} from 'mobx-react'\r\nimport SendMoneyHeader from '../../Wallet/SendMoney/Components/SendMoneyHeader'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst LocationDetails: React.FC = ({navigation: {goBack}, route}) => {\r\n const location = route.params.location\r\n\r\n const [index, setIndex] = React.useState(0)\r\n\r\n console.log(location)\r\n\r\n const renderTabViews = () => {\r\n if (index === 1) {\r\n return \r\n }\r\n\r\n return \r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {\r\n setIndex(index)\r\n }}\r\n />\r\n {renderTabViews()}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(LocationDetails)\r\n","import {makeAutoObservable, runInAction, toJS} from 'mobx'\r\nimport {DoServiceCall, Geti18NMessage} from '../../../../Helpers/ServiceHelpers'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport i18n from '../../../../i18n'\r\nimport {\r\n IArticle,\r\n ICondiment,\r\n ICondimentGroup,\r\n IOrderRequestLine,\r\n OrderLineType,\r\n} from '../../../../Models/InzziiApi'\r\nimport ArticleController from '../../../../Services/Inzii.Api/ArticleController'\r\nimport {orderOnlineStore} from '../Store'\r\nimport {ToprError} from '../../../../Models/Client'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {goBack} from '../../../../Helpers/NavigationHelper'\r\nimport {IMyOrderRequestLine} from '../../../../Models/InzziiApi'\r\n\r\nexport default class Store {\r\n public Isloading = true\r\n //public Amount = 1\r\n public OrderRequestLine?: IMyOrderRequestLine = undefined\r\n\r\n public CondimentGroups: ICondimentGroup[] = []\r\n\r\n //private Article?: IArticle = undefined\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize(article: IArticle) {\r\n this.Isloading = true\r\n //this.Article = article\r\n\r\n this.OrderRequestLine = {\r\n type: OrderLineType.Plu,\r\n quantity: 1,\r\n random: article.number,\r\n price: article.price,\r\n name: article.name,\r\n }\r\n\r\n ArticleController.GetCondimentGroups(\r\n orderOnlineStore.BranchofficeId,\r\n article.pluId,\r\n )\r\n .then((condimentGroups) => {\r\n runInAction(() => {\r\n this.Isloading = false\r\n this.CondimentGroups = condimentGroups\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n const errorMessage = Geti18NMessage(toprError)\r\n appUiStore.ShowToast({message: errorMessage})\r\n goBack()\r\n })\r\n }\r\n\r\n public Minus() {\r\n if (this.OrderRequestLine && this.OrderRequestLine.quantity > 1) {\r\n this.OrderRequestLine.quantity--\r\n }\r\n }\r\n\r\n public Plus() {\r\n if (this.OrderRequestLine) {\r\n this.OrderRequestLine.quantity++\r\n }\r\n }\r\n\r\n public IsValidMaxCondimentGroup(condimentGroup: ICondimentGroup) {\r\n if (this.OrderRequestLine === undefined) {\r\n return false\r\n }\r\n\r\n if (!condimentGroup.isMeetConditions) {\r\n //novalidate\r\n return true\r\n }\r\n\r\n //linkedOrderLine.parentNumber --> parent condimentGroup, zo dat je kan check of een max of min is bereikt voor deze condimentGroup\r\n if (this.OrderRequestLine.linkedOrderLines) {\r\n if (\r\n this.OrderRequestLine.linkedOrderLines.filter(\r\n (x) => x.parentNumber === condimentGroup.number,\r\n ).length < condimentGroup.maximumCondiments\r\n ) {\r\n return true\r\n } else {\r\n appUiStore.ShowToast({\r\n message: i18n.t('OrderOnline.MaxErrorMessage', {\r\n max: condimentGroup.maximumCondiments,\r\n type: condimentGroup.name,\r\n }),\r\n })\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n }\r\n\r\n public IsCondimentRadioSelected(condiment: ICondiment) {\r\n if (this.OrderRequestLine && this.OrderRequestLine.linkedOrderLines) {\r\n const foundOrderLine = this.OrderRequestLine.linkedOrderLines.find(\r\n (x) => x.random === condiment.number,\r\n )\r\n\r\n return foundOrderLine !== undefined\r\n }\r\n\r\n return false\r\n }\r\n\r\n public ToggleCondimentRadio(\r\n condiment: ICondiment,\r\n condimentGroup: ICondimentGroup,\r\n ) {\r\n if (this.OrderRequestLine) {\r\n const type: OrderLineType = condiment.isSupplement\r\n ? OrderLineType.ModifierWithPrice\r\n : OrderLineType.Modifier\r\n const linkedOrderLine: IMyOrderRequestLine = {\r\n type,\r\n quantity: 1,\r\n random: condiment.number,\r\n price: condiment.price,\r\n name: condiment.name,\r\n parentNumber: condimentGroup.number,\r\n }\r\n\r\n if (this.OrderRequestLine.linkedOrderLines === undefined) {\r\n this.OrderRequestLine.linkedOrderLines = []\r\n }\r\n\r\n const index = this.OrderRequestLine.linkedOrderLines.findIndex(\r\n (x) => x.parentNumber == condimentGroup.number,\r\n )\r\n\r\n if (index > -1) {\r\n this.OrderRequestLine.linkedOrderLines.splice(index, 1, linkedOrderLine)\r\n } else {\r\n //first select, add\r\n this.OrderRequestLine.linkedOrderLines.push(linkedOrderLine)\r\n }\r\n }\r\n }\r\n\r\n //checkbox check\r\n public AddCondimentChecked(\r\n condiment: ICondiment,\r\n condimentGroup: ICondimentGroup,\r\n ) {\r\n if (this.OrderRequestLine) {\r\n const type: OrderLineType = condiment.isSupplement\r\n ? OrderLineType.ModifierWithPrice\r\n : OrderLineType.Modifier\r\n const linkedOrderLine: IMyOrderRequestLine = {\r\n type,\r\n quantity: 1,\r\n random: condiment.number,\r\n price: condiment.price,\r\n name: condiment.name,\r\n parentNumber: condimentGroup.number,\r\n }\r\n\r\n //console.log('addcondiment', linkedOrderLine)\r\n\r\n if (this.OrderRequestLine.linkedOrderLines === undefined) {\r\n this.OrderRequestLine.linkedOrderLines = []\r\n }\r\n\r\n this.OrderRequestLine.linkedOrderLines.push(linkedOrderLine)\r\n }\r\n }\r\n\r\n public RemoveCondimentChecked(condiment: ICondiment) {\r\n if (\r\n this.OrderRequestLine &&\r\n this.OrderRequestLine.linkedOrderLines !== undefined\r\n ) {\r\n const index = this.OrderRequestLine.linkedOrderLines.findIndex(\r\n (x) => x.random === condiment.number,\r\n )\r\n if (index > -1) {\r\n this.OrderRequestLine.linkedOrderLines.splice(index, 1)\r\n //console.log('remove ', this.OrderRequestLine.linkedOrderLines.length)\r\n }\r\n }\r\n }\r\n}\r\nexport const articleStore = new Store()\r\n","import React, {useState} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {CheckBox} from 'react-native-elements'\r\nimport {FormatToEuro} from '../../../../../Helpers/TextHelpers'\r\nimport {ICondiment, ICondimentGroup} from '../../../../../Models/InzziiApi'\r\nimport Style from '../../../../../Style'\r\nimport {articleStore} from '../Store'\r\ninterface IProps {\r\n condiment: ICondiment\r\n condimentGroup: ICondimentGroup\r\n onCheckChanged: (checked: boolean) => void\r\n}\r\n\r\nconst CondimentCheckBox: React.FC = ({\r\n onCheckChanged,\r\n condiment,\r\n condimentGroup,\r\n}) => {\r\n const [checked, setChecked] = useState(false)\r\n const title = `${condiment.name} (${FormatToEuro(condiment.price)})`\r\n return (\r\n {\r\n if (checked === false) {\r\n //can check ? (max not reached yet)\r\n if (articleStore.IsValidMaxCondimentGroup(condimentGroup)) {\r\n setChecked(!checked)\r\n onCheckChanged(!checked)\r\n }\r\n } else {\r\n setChecked(!checked)\r\n onCheckChanged(!checked)\r\n }\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport default CondimentCheckBox\r\n","import React, {useState} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {CheckBox} from 'react-native-elements'\r\nimport {FormatToEuro} from '../../../../../Helpers/TextHelpers'\r\nimport {ICondiment, ICondimentGroup} from '../../../../../Models/InzziiApi'\r\nimport Style from '../../../../../Style'\r\nimport {articleStore} from '../Store'\r\ninterface IProps {\r\n condiment: ICondiment\r\n\r\n onRadioPress: () => void\r\n}\r\n\r\nconst CondimentRadioButton: React.FC = ({condiment, onRadioPress}) => {\r\n //const {container} = styles\r\n const checked = articleStore.IsCondimentRadioSelected(condiment)\r\n const title = `${condiment.name} (${FormatToEuro(condiment.price)})`\r\n return (\r\n {\r\n onRadioPress()\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport default CondimentRadioButton\r\n\r\nconst styles = StyleSheet.create({\r\n // container: {\r\n // flexDirection: 'row',\r\n // },\r\n})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {CheckBox, Text} from 'react-native-elements'\r\nimport i18n from '../../../../../i18n'\r\nimport {ICondimentGroup} from '../../../../../Models/InzziiApi'\r\nimport Style from '../../../../../Style'\r\nimport {articleStore} from '../Store'\r\nimport CondimentCheckBox from './CondimentCheckBox'\r\nimport CondimentRadioButton from './CondimentRadioButton'\r\ninterface IProps {\r\n condimentGroup: ICondimentGroup\r\n}\r\n\r\nconst CondimentGroup: React.FC = ({condimentGroup}) => {\r\n const renderValidationInfo = () => {\r\n if (!condimentGroup.isMeetConditions) {\r\n return null\r\n }\r\n\r\n if (condimentGroup.isRadioButtonGroup) {\r\n return {i18n.t('OrderOnline.RequiredChoice')}\r\n }\r\n\r\n let info = ''\r\n if (condimentGroup.minimumCondiments === 0) {\r\n info += i18n.t('OrderOnline.OptionalChoice')\r\n }\r\n\r\n if (condimentGroup.minimumCondiments > 0) {\r\n info += i18n.t('OrderOnline.Min', {min: condimentGroup.minimumCondiments})\r\n }\r\n\r\n if (condimentGroup.maximumCondiments) {\r\n info += i18n.t('OrderOnline.Max', {max: condimentGroup.maximumCondiments})\r\n }\r\n\r\n return {info}\r\n }\r\n\r\n const renderCheckBoxes = () => {\r\n if (condimentGroup.isRadioButtonGroup) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {condimentGroup.condiments.map((condiment, key) => (\r\n {\r\n if (checked) {\r\n articleStore.AddCondimentChecked(condiment, condimentGroup)\r\n } else {\r\n articleStore.RemoveCondimentChecked(condiment)\r\n }\r\n }}\r\n />\r\n ))}\r\n \r\n )\r\n }\r\n\r\n const renderRadioButtons = () => {\r\n if (!condimentGroup.isRadioButtonGroup) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {condimentGroup.condiments.map((condiment, key) => (\r\n {\r\n articleStore.ToggleCondimentRadio(condiment, condimentGroup)\r\n }}\r\n />\r\n ))}\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n {condimentGroup.name}\r\n {renderValidationInfo()}\r\n {renderCheckBoxes()}\r\n {renderRadioButtons()}\r\n \r\n )\r\n}\r\n\r\nexport default CondimentGroup\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React, {useEffect} from 'react'\r\nimport {observer} from 'mobx-react'\r\nimport {Button, Icon, Text} from 'react-native-elements'\r\nimport {StackScreenProps} from '@react-navigation/stack'\r\nimport {\r\n FormHeader,\r\n Content,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n Container,\r\n ImageHeader,\r\n MyHeader,\r\n ToprScreenLoader,\r\n} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport Style, {sizes, colors} from '../../../../Style'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport {OrderOnlineList} from '..'\r\nimport {articleStore} from './Store'\r\nimport CondimentGroup from './Components/CondimentGroup'\r\nimport {StyleSheet, View} from 'react-native'\r\nimport {FormatToEuro} from '../../../../Helpers/TextHelpers'\r\nimport {orderOnlineStore} from '../Store'\r\nimport {GetOrderLineAmountFormatted} from '../../../../Helpers/OrderHelpers'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Article: React.FC = ({navigation: {goBack, navigate}, route}) => {\r\n const article = route.params.article\r\n useEffect(() => {\r\n myLog.warn('Article')\r\n articleStore.Initialize(article)\r\n }, [null])\r\n\r\n const {imageHeaderTitle, amountStyle, flex1} = Style\r\n const {CondimentGroups, OrderRequestLine, Isloading} = articleStore\r\n\r\n if (OrderRequestLine === undefined) {\r\n return null\r\n }\r\n\r\n const renderHeader = () => {\r\n if (article.imageUrl) {\r\n return (\r\n goBack()}>\r\n {article.name}\r\n \r\n )\r\n }\r\n return \r\n }\r\n\r\n const renderSuplements = () => {\r\n return CondimentGroups.map((x, key) => (\r\n \r\n ))\r\n }\r\n\r\n const renderFooter = () => {\r\n return (\r\n \r\n \r\n \r\n articleStore.Minus()}\r\n size={20}\r\n />\r\n \r\n {OrderRequestLine.quantity}\r\n \r\n articleStore.Plus()}\r\n size={20}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n orderOnlineStore.AddArticle(OrderRequestLine, CondimentGroups)\r\n }}\r\n />\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n {renderHeader()}\r\n {renderSuplements()}\r\n \r\n {renderFooter()}\r\n \r\n \r\n )\r\n}\r\nexport default observer(Article)\r\n","import React from 'react'\r\nimport {View, StyleSheet, TouchableOpacityProps} from 'react-native'\r\nimport {Icon, IconProps} from 'react-native-elements'\r\nimport {TouchableOpacity} from 'react-native-gesture-handler'\r\n\r\nimport {colors, sizes} from '../../../../../Style'\r\n\r\ninterface IProps extends TouchableOpacityProps {\r\n iconProps: IconProps\r\n}\r\n\r\nconst IconButton: React.FC = ({iconProps, style, ...otherProps}) => {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default IconButton\r\n\r\nconst styles = StyleSheet.create({\r\n button: {\r\n paddingHorizontal: sizes.padding.sm,\r\n paddingVertical: 1,\r\n borderWidth: 1,\r\n borderColor: colors.lightGrey,\r\n },\r\n})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Icon, Text} from 'react-native-elements'\r\nimport {GetOrderLineAmountFormatted} from '../../../../../Helpers/OrderHelpers'\r\nimport {IMyOrderRequestLine} from '../../../../../Models/InzziiApi'\r\nimport Style, {colors, sizes} from '../../../../../Style'\r\nimport IconButton from './IconButton'\r\ninterface IProps {\r\n orderRequestLine: IMyOrderRequestLine\r\n plus: () => void\r\n minus: () => void\r\n}\r\n\r\nconst CartRow: React.FC = ({orderRequestLine, plus, minus}) => {\r\n const {\r\n container,\r\n row,\r\n supplimentsText,\r\n contentView,\r\n quantityText,\r\n buttonsContainer,\r\n amountText,\r\n productText,\r\n separator,\r\n } = styles\r\n\r\n const renderSuppliments = () => {\r\n if (\r\n orderRequestLine.linkedOrderLines &&\r\n orderRequestLine.linkedOrderLines.length > 0\r\n ) {\r\n const text = orderRequestLine.linkedOrderLines\r\n .map((x) => x.name)\r\n .join(', ')\r\n return {text}\r\n }\r\n\r\n return null\r\n }\r\n return (\r\n \r\n \r\n {orderRequestLine.quantity}\r\n \r\n {orderRequestLine.name}\r\n {renderSuppliments()}\r\n \r\n \r\n {GetOrderLineAmountFormatted(orderRequestLine)}\r\n \r\n \r\n \r\n minus()}\r\n />\r\n plus()}\r\n />\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default CartRow\r\n\r\nconst styles = StyleSheet.create({\r\n buttonsContainer: {\r\n flexDirection: 'row',\r\n justifyContent: 'flex-end',\r\n marginVertical: sizes.padding.sm,\r\n marginBottom: sizes.padding.md,\r\n },\r\n separator: {\r\n borderBottomColor: colors.lightGrey,\r\n borderBottomWidth: 1,\r\n //marginHorizontal: sizes.padding.md,\r\n },\r\n container: {\r\n paddingTop: sizes.padding.md,\r\n },\r\n row: {\r\n flexDirection: 'row',\r\n },\r\n contentView: {\r\n flex: 8,\r\n },\r\n productText: {\r\n fontWeight: 'bold',\r\n },\r\n quantityText: {\r\n flex: 1,\r\n\r\n fontWeight: 'bold',\r\n },\r\n amountText: {\r\n width: 70,\r\n textAlign: 'right',\r\n },\r\n supplimentsText: {\r\n color: colors.grey,\r\n fontSize: 12,\r\n },\r\n})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Icon, Text} from 'react-native-elements'\r\nimport {GetOrderLineAmountFormatted} from '../../../../../Helpers/OrderHelpers'\r\nimport i18n from '../../../../../i18n'\r\nimport {IMyOrderRequestLine} from '../../../../../Models/InzziiApi'\r\nimport Style, {colors, sizes} from '../../../../../Style'\r\nimport IconButton from './IconButton'\r\ninterface IProps {\r\n totalAmountFormatted: string\r\n}\r\n\r\nconst TotalRow: React.FC = ({totalAmountFormatted}) => {\r\n const {container, totalText, amountText} = styles\r\n\r\n return (\r\n \r\n {i18n.t('Common.Total')}\r\n {totalAmountFormatted}\r\n \r\n )\r\n}\r\n\r\nexport default TotalRow\r\n\r\nconst styles = StyleSheet.create({\r\n container: {\r\n paddingTop: sizes.padding.md,\r\n flexDirection: 'row',\r\n justifyContent: 'space-between',\r\n marginVertical: sizes.padding.sm,\r\n marginBottom: sizes.padding.md,\r\n },\r\n totalText: {\r\n fontWeight: 'bold',\r\n },\r\n amountText: {\r\n width: 70,\r\n textAlign: 'right',\r\n fontWeight: 'bold',\r\n },\r\n})\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {OrderOnlineList} from '..'\r\nimport {\r\n Container,\r\n Content,\r\n FullFooterButton,\r\n MyHeader,\r\n} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport {orderOnlineStore} from '../Store'\r\nimport CartRow from './Components/CartRow'\r\nimport TotalRow from './Components/TotalRow'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Cart: React.FC = ({navigation, route}) => {\r\n useEffect(() => {\r\n myLog.warn('Cart')\r\n }, [null])\r\n\r\n const {OrderRequestLines, TotalAmountOrderFormatted} = orderOnlineStore\r\n\r\n return (\r\n <>\r\n \r\n navigation.navigate('articles')}\r\n />\r\n \r\n {OrderRequestLines.map((orderRequestLine, key) => (\r\n orderOnlineStore.PlusArticle(orderRequestLine)}\r\n minus={() => orderOnlineStore.MinusArticle(orderRequestLine)}\r\n orderRequestLine={orderRequestLine}\r\n />\r\n ))}\r\n \r\n \r\n \r\n navigation.navigate('orderPayment')}\r\n title={`${i18n.t('OrderOnline.Pay')} (${TotalAmountOrderFormatted})`}\r\n />\r\n \r\n )\r\n}\r\nexport default observer(Cart)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {Image, View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {OrderOnlineList} from '..'\r\nimport {\r\n Container,\r\n Content,\r\n FullFooterButton,\r\n MyButton,\r\n MyHeader,\r\n MySelectList,\r\n ToprScreenLoader,\r\n} from '../../../../Components'\r\nimport {\r\n FormatCentsToEuro,\r\n FormatCurrency,\r\n} from '../../../../Helpers/TextHelpers'\r\nimport {GetLocalizedImageUrl} from '../../../../Helpers/UiHelpers'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {IWalletSTO} from '../../../../Models/Server'\r\nimport {MainScreensList} from '../../../../Navigation'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport Style, {colors, sizes} from '../../../../Style'\r\nimport i18n from '../../../../i18n'\r\nimport {orderOnlineStore} from '../Store'\r\nimport {orderPaymentStore} from './Store'\r\nimport {ChargeSuccessReturn} from '../../../../Models/Client/Enums'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst OrderPayment: React.FC = ({\r\n navigation: {goBack, navigate},\r\n route,\r\n}) => {\r\n useEffect(() => {\r\n myLog.warn('OrderPayment', route.params)\r\n orderPaymentStore.Initialize()\r\n\r\n //orderPaymentStore.Test()\r\n }, [null])\r\n const {pickerRow, pickerItemImage, pickerText} = Style\r\n\r\n const {\r\n IsLoading,\r\n Wallets,\r\n SelectedWallet,\r\n IsSubmitting,\r\n MissingAmountBalance,\r\n HasEnoughBalance,\r\n } = orderPaymentStore\r\n const {TotalAmountOrderFormatted} = orderOnlineStore\r\n\r\n const renderBalanceMessage = () => {\r\n if (HasEnoughBalance || SelectedWallet === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {i18n.t('OrderOnline.PaymentForm.InsufficientBalance')}\r\n \r\n {\r\n navigate('charge', {\r\n wallet: SelectedWallet,\r\n chargeSuccessReturn: ChargeSuccessReturn.OrderPayment,\r\n initialAmount: MissingAmountBalance,\r\n })\r\n }}\r\n />\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n \r\n navigate('cart')}\r\n />\r\n \r\n \r\n orderPaymentStore.SetSelectedWallet(option)\r\n }\r\n isItemSelected={(a: IWalletSTO, b: IWalletSTO) => {\r\n return a.LoyaltyWalletGUID === b.LoyaltyWalletGUID\r\n }}\r\n renderListItem={(wallet: IWalletSTO, isHighLighted: boolean) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {wallet.Currency.Name} (\r\n {FormatCurrency(wallet.Balance, wallet.Currency)})\r\n \r\n \r\n )\r\n }}\r\n />\r\n {renderBalanceMessage()}\r\n \r\n \r\n {\r\n appUiStore.ShowAuthenticateConfirm({\r\n OnOk: () => {\r\n orderPaymentStore.CreateTableOrderAndDoPayment()\r\n },\r\n Message: i18n.t('OrderOnline.PaymentForm.AuthenticateAction', {\r\n amount: TotalAmountOrderFormatted,\r\n }),\r\n })\r\n }}\r\n title={`${i18n.t('OrderOnline.Pay')} (${TotalAmountOrderFormatted})`}\r\n />\r\n \r\n )\r\n}\r\nexport default observer(OrderPayment)\r\n","import {makeAutoObservable, runInAction, toJS} from 'mobx'\r\nimport {DoServiceCall, Geti18NMessage} from '../../../../Helpers/ServiceHelpers'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport i18n from '../../../../i18n'\r\nimport RestaurantController from '../../../../Services/Inzii.Api/RestaurantController'\r\nimport {orderOnlineStore} from '../Store'\r\n//import {DeliveryType, PaymentGateway} from '../../../../Models/InzziiApi/Enums'\r\nimport {\r\n IIPaymentMethod,\r\n IOrderResult,\r\n PaymentGateway,\r\n} from '../../../../Models/InzziiApi'\r\nimport {ToprError} from '../../../../Models/Client'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {goBack, navigate} from '../../../../Helpers/NavigationHelper'\r\nimport {DeliveryType} from '../../../../Models/InzziiApi/Enums'\r\nimport {NotImplemented} from '../../../../Helpers/UiHelpers'\r\nimport {StackNavigationProp} from '@react-navigation/stack'\r\nimport {OrderOnlineList} from '..'\r\nimport {persistedStore} from '../../../../Mobx'\r\nimport {placeholder} from 'i18n-js'\r\n\r\n// const paymentMethods: IIPaymentMethod[] = [\r\n// {\r\n// gateway: 0,\r\n// description: i18n.t(`OrderOnline.PaymentMethods.PayOnDelivery`),\r\n// image: 'https://www.inzzii.com/Images/cash.png',\r\n// systemName: 'PayOnDelivery',\r\n// },\r\n// {\r\n// gateway: 1, //pending table order, set paymentcomplete later when payment is confirmed\r\n// description: i18n.t(`OrderOnline.PaymentMethods.ToprWallet`),\r\n// image:\r\n// 'https://www.toprwallet.nl/Content/tenants/topr/images/logo-topr-sq.jpg',\r\n// systemName: 'ToprWallet',\r\n// },\r\n// ]\r\n\r\nconst toprPaymentMethod: IIPaymentMethod = {\r\n gateway: 1, //pending table order, set paymentcomplete later when payment is confirmed\r\n description: i18n.t(`OrderOnline.PaymentMethods.ToprWallet`),\r\n image:\r\n 'https://www.toprwallet.nl/Content/tenants/topr/images/logo-topr-sq.jpg',\r\n systemName: 'ToprWallet',\r\n}\r\n\r\nexport default class Store {\r\n public IsLoading = false\r\n public IsSubmitting = false\r\n\r\n //public PaymentMethods: IIPaymentMethod[] = paymentMethods\r\n //public SelectedPaymentMethod?: IIPaymentMethod = paymentMethods[0]\r\n\r\n public PaymentMethods: IIPaymentMethod[] = []\r\n public SelectedPaymentMethod?: IIPaymentMethod = undefined\r\n private Navigation?: StackNavigationProp = undefined\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n private InitPaymentMethods(paymentMethods: IIPaymentMethod[]) {\r\n //i18n.t(`OrderOnline.PaymentMethods.PayOnDelivery`)\r\n //localize\r\n paymentMethods.forEach((x) => {\r\n if (x.gateway === 0) {\r\n x.description = i18n.t(`OrderOnline.PaymentMethods.PayOnDelivery`)\r\n x.systemName = 'PayOnDelivery'\r\n }\r\n })\r\n\r\n paymentMethods.push(toprPaymentMethod)\r\n\r\n return paymentMethods\r\n }\r\n\r\n public Initialize(navigation: StackNavigationProp) {\r\n this.IsLoading = true\r\n this.IsSubmitting = false\r\n this.Navigation = navigation\r\n RestaurantController.GetPaymentMethods(\r\n orderOnlineStore.BranchofficeId,\r\n DeliveryType.Table,\r\n )\r\n .then((paymentMethods) => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n this.PaymentMethods = this.InitPaymentMethods(paymentMethods)\r\n\r\n if (paymentMethods.length > 0) {\r\n this.SelectedPaymentMethod = paymentMethods[0]\r\n }\r\n\r\n //if only 1 PaymentMethod, go straight to the next step\r\n if (this.PaymentMethods.length === 1) {\r\n this.HandleCheckOut('')\r\n }\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n const errorMessage = Geti18NMessage(toprError)\r\n appUiStore.ShowToast({message: errorMessage, type: 'warning'})\r\n goBack()\r\n })\r\n }\r\n\r\n SetSelectedPaymentMethod(selectedPaymentMethod: IIPaymentMethod) {\r\n this.SelectedPaymentMethod = selectedPaymentMethod\r\n }\r\n\r\n public HandleCheckOut(remarks: string) {\r\n if (this.SelectedPaymentMethod && orderOnlineStore.User) {\r\n this.IsSubmitting = true\r\n switch (orderOnlineStore.DeliveryType) {\r\n case DeliveryType.Table:\r\n this.TableOrder(remarks)\r\n break\r\n case DeliveryType.Pickup:\r\n NotImplemented()\r\n break\r\n case DeliveryType.Deliver:\r\n NotImplemented()\r\n break\r\n default:\r\n appUiStore.ShowAlert({\r\n message: i18n.t(\r\n 'OrderOnline.CheckoutForm.ServerErrors.INVALID_DELIVERY_TYPE',\r\n {deliveryType: orderOnlineStore.DeliveryType},\r\n ),\r\n type: 'error',\r\n title: i18n.t('OrderOnline.CheckoutForm.ServerErrors.Title'),\r\n })\r\n break\r\n }\r\n }\r\n }\r\n\r\n private PostTableOrderCreated(gateway: number, orderResult: IOrderResult) {\r\n //console.log('gateway', gateway, orderResult)\r\n\r\n switch (gateway) {\r\n case PaymentGateway.PayOnDelivery:\r\n if (orderOnlineStore.Restaurant) {\r\n const newOrder = persistedStore.AddPlacedOrder(\r\n orderResult.orderId,\r\n orderResult.orderNumber.toString(),\r\n orderOnlineStore.Restaurant,\r\n orderOnlineStore.OrderRequestLines,\r\n orderResult.totalAmount,\r\n orderOnlineStore.TableNumber,\r\n )\r\n\r\n //Payment by table, show message\r\n appUiStore.ShowAlert({\r\n message: i18n.t('OrderOnline.CheckoutForm.Success.Message', {\r\n orderNumber: orderResult.orderNumber,\r\n }),\r\n type: 'success',\r\n title: i18n.t('OrderOnline.CheckoutForm.Success.Title'),\r\n additionalCloseAction: () => {\r\n navigate('dashboard')\r\n navigate('placedOrderDetails', {placedOrder: newOrder})\r\n },\r\n })\r\n }\r\n break\r\n case PaymentGateway.PendingPayment:\r\n this.Navigation?.navigate('orderPayment', {orderResult})\r\n break\r\n default:\r\n appUiStore.ShowAlert({\r\n message: i18n.t(\r\n 'OrderOnline.CheckoutForm.ServerErrors.INVALID_GATEWAY',\r\n {gateway},\r\n ),\r\n type: 'error',\r\n title: i18n.t('OrderOnline.CheckoutForm.ServerErrors.Title'),\r\n })\r\n\r\n navigate('dashboard')\r\n\r\n this.IsSubmitting = false\r\n break\r\n }\r\n }\r\n\r\n private TableOrder(remarks: string) {\r\n if (this.SelectedPaymentMethod && orderOnlineStore.User) {\r\n this.IsSubmitting = true\r\n RestaurantController.TableOrder(\r\n orderOnlineStore.User.accessToken,\r\n orderOnlineStore.BranchofficeId,\r\n orderOnlineStore.TableNumber,\r\n orderOnlineStore.OrderRequestLines,\r\n this.SelectedPaymentMethod.gateway,\r\n remarks,\r\n )\r\n .then((orderResult) => {\r\n if (this.SelectedPaymentMethod) {\r\n this.PostTableOrderCreated(\r\n this.SelectedPaymentMethod.gateway,\r\n orderResult,\r\n )\r\n }\r\n })\r\n .catch((toprError: ToprError) => {\r\n const errorMessage = Geti18NMessage(toprError)\r\n\r\n //GetI18NAlertMessage\r\n appUiStore.ShowAlert({\r\n message: errorMessage,\r\n type: 'error',\r\n title: i18n.t('OrderOnline.CheckoutForm.ServerErrors.Title'),\r\n })\r\n\r\n navigate('dashboard')\r\n })\r\n .finally(() => {\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n }\r\n }\r\n}\r\nexport const checkOutStore = new Store()\r\n","import React, {useEffect} from 'react'\r\nimport {observer} from 'mobx-react'\r\nimport {StackScreenProps} from '@react-navigation/stack'\r\nimport {MainScreensList} from '../../../../Navigation'\r\nimport {\r\n FormHeader,\r\n Content,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n Container,\r\n MyHeader,\r\n FullFooterButton,\r\n MySelectList,\r\n ToprScreenLoader,\r\n} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport Style, {colors, sizes} from '../../../../Style'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport {OrderOnlineList} from '..'\r\nimport {checkOutStore} from './Store'\r\nimport {IIPaymentMethod} from '../../../../Models/InzziiApi'\r\nimport {View, Image} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {useForm} from 'react-hook-form'\r\nimport {orderOnlineStore} from '../Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\ntype MyFormData = {\r\n remarks: string\r\n}\r\n\r\nconst CheckOut: React.FC = ({navigation}) => {\r\n const {TotalAmountOrderFormatted} = orderOnlineStore\r\n useEffect(() => {\r\n myLog.warn('OrderCheckout')\r\n checkOutStore.Initialize(navigation)\r\n }, [null])\r\n\r\n const {pickerRow, pickerItemImage, pickerText} = Style\r\n\r\n const {IsLoading, PaymentMethods, SelectedPaymentMethod, IsSubmitting} =\r\n checkOutStore\r\n\r\n const {control, handleSubmit, errors, setError} = useForm()\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n if (SelectedPaymentMethod) {\r\n checkOutStore.HandleCheckOut(data.remarks)\r\n // appUiStore.ShowAuthenticateConfirm({\r\n // OnOk: () => {\r\n // store.Topup(\r\n // SelectedChargeMethod.Guid,\r\n // data.amount,\r\n // (errorMessage: string) => {\r\n // setError('amount', {\r\n // type: 'manual',\r\n // message: errorMessage,\r\n // })\r\n // },\r\n // )\r\n // },\r\n // Message: I18n.t('Charge.Form.AuthenticateAction', {\r\n // amount: FormatCentsToEuro(data.amount),\r\n // }),\r\n // })\r\n }\r\n }\r\n return (\r\n \r\n \r\n navigation.goBack()}\r\n />\r\n \r\n \r\n checkOutStore.SetSelectedPaymentMethod(option)\r\n }\r\n isItemSelected={(a: IIPaymentMethod, b: IIPaymentMethod) => {\r\n return a.gateway === b.gateway\r\n }}\r\n renderListItem={(\r\n paymentMethod: IIPaymentMethod,\r\n isHighLighted: boolean,\r\n ) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {paymentMethod.description}\r\n \r\n \r\n )\r\n }}\r\n />\r\n \r\n \r\n Door op 'Bevestigen' te klikken, ga je akkoord met ons\r\n Privacyverklaring\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(CheckOut)\r\n","import React from 'react'\r\nimport {\r\n Image,\r\n LayoutChangeEvent,\r\n StyleSheet,\r\n TouchableOpacity,\r\n View,\r\n} from 'react-native'\r\nimport {Card, ListItem, Text} from 'react-native-elements'\r\nimport {FormatToEuro} from '../../../../../Helpers/TextHelpers'\r\nimport {IArticle} from '../../../../../Models/InzziiApi'\r\nimport Style, {colors, sizes} from '../../../../../Style'\r\n\r\ninterface IProps {\r\n article: IArticle\r\n onPress: () => void\r\n}\r\n\r\nexport class ArticleCard extends React.PureComponent {\r\n constructor(props: IProps) {\r\n super(props)\r\n }\r\n\r\n renderImage() {\r\n const {article} = this.props\r\n\r\n if (article.imageUrl) {\r\n return (\r\n <>\r\n \r\n \r\n )\r\n }\r\n\r\n return null\r\n }\r\n\r\n render() {\r\n const {article, onPress} = this.props\r\n\r\n const {title, price} = Style\r\n\r\n return (\r\n \r\n \r\n {this.renderImage()}\r\n \r\n \r\n {article.name}\r\n {article.description !== '' && (\r\n \r\n {article.description}\r\n \r\n )}\r\n {article.price}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n}\r\n\r\nexport default React.memo(ArticleCard)\r\n","import {observer} from 'mobx-react'\r\nimport React, {useState, useRef, useEffect} from 'react'\r\n\r\nimport {\r\n Animated,\r\n ScrollView,\r\n SectionList,\r\n StyleSheet,\r\n TextInput,\r\n View,\r\n ViewStyle,\r\n} from 'react-native'\r\nimport {Icon, Input, Text} from 'react-native-elements'\r\nimport {TouchableOpacity} from 'react-native-gesture-handler'\r\nimport i18n from '../../../../../i18n'\r\nimport {colors, sizes} from '../../../../../Style'\r\nimport {orderOnlineStore} from '../../Store'\r\n\r\ninterface IProps {\r\n departments: string[]\r\n sectionListRef: React.RefObject\r\n departmentScrollViewRef: React.RefObject\r\n}\r\n\r\nconst CategorySelector: React.FC = ({\r\n departments,\r\n sectionListRef,\r\n departmentScrollViewRef,\r\n}) => {\r\n const {\r\n ScrollY,\r\n HEADER_MAX_HEIGHT,\r\n TABBAR_HEIGHT,\r\n VisibleDepartmentName,\r\n Search,\r\n SearchMode,\r\n } = orderOnlineStore\r\n\r\n const textInputRef = useRef(null)\r\n\r\n useEffect(() => {\r\n //console.log('effect', textInputRef.current === null)\r\n }, [textInputRef])\r\n\r\n // const [searchMode, toggleSearchMode] = useState(false)\r\n\r\n const headerTranslateY = SearchMode\r\n ? 0\r\n : ScrollY.interpolate({\r\n inputRange: [0, HEADER_MAX_HEIGHT],\r\n outputRange: [0, -HEADER_MAX_HEIGHT],\r\n extrapolate: 'clamp',\r\n })\r\n const {\r\n container,\r\n defaultContainer,\r\n activeContainer,\r\n searchBarContainer,\r\n searchButton,\r\n scrollViewBar,\r\n textInput,\r\n } = styles\r\n\r\n const scrollSectionList = (sectionIndex: number) => {\r\n if (sectionListRef.current) {\r\n sectionListRef.current.scrollToLocation({\r\n animated: false,\r\n sectionIndex,\r\n itemIndex: 0,\r\n viewOffset: 55,\r\n })\r\n }\r\n }\r\n\r\n const renderButtons = () => {\r\n return departments.map((departmentName, key) => {\r\n let isActive = departmentName === VisibleDepartmentName\r\n\r\n const containerStyle: ViewStyle[] = [defaultContainer]\r\n if (isActive) {\r\n containerStyle.push(activeContainer)\r\n }\r\n\r\n return (\r\n {\r\n orderOnlineStore.SetDepartmentScroll(\r\n departmentName,\r\n event.nativeEvent.layout.x,\r\n )\r\n }}>\r\n {\r\n scrollSectionList(key)\r\n }}>\r\n \r\n {departmentName}\r\n \r\n \r\n \r\n )\r\n })\r\n }\r\n\r\n const renderScrollViewBar = () => {\r\n if (SearchMode) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {\r\n scrollSectionList(0)\r\n orderOnlineStore.ToggleSearchMode(true)\r\n\r\n //rist render textinput, after 100 ms set focus, otherwise textInputRef.current === null\r\n setTimeout(() => {\r\n textInputRef.current?.focus()\r\n }, 100)\r\n }}\r\n />\r\n \r\n {renderButtons()}\r\n \r\n \r\n )\r\n }\r\n\r\n const renderSearchBar = () => {\r\n if (!SearchMode) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {\r\n orderOnlineStore.ToggleSearchMode(false)\r\n orderOnlineStore.SetSearch('')\r\n //clear search\r\n }}\r\n />\r\n orderOnlineStore.SetSearch(e)}\r\n value={Search}\r\n style={textInput}\r\n />\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {renderScrollViewBar()}\r\n {renderSearchBar()}\r\n \r\n )\r\n}\r\n\r\nexport default observer(CategorySelector)\r\n\r\nconst styles = StyleSheet.create({\r\n defaultContainer: {\r\n marginRight: sizes.padding.sm,\r\n paddingVertical: sizes.padding.sm,\r\n paddingHorizontal: sizes.padding.md,\r\n marginVertical: sizes.padding.sm,\r\n },\r\n activeContainer: {\r\n backgroundColor: colors.main,\r\n borderRadius: 10,\r\n },\r\n searchBarContainer: {\r\n height: 55,\r\n alignItems: 'center',\r\n flexDirection: 'row',\r\n paddingRight: 7,\r\n backgroundColor: '#fff',\r\n },\r\n scrollViewBar: {\r\n backgroundColor: colors.lighterGrey,\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n paddingVertical: 7,\r\n paddingRight: 7,\r\n },\r\n container: {\r\n position: 'absolute',\r\n left: 0,\r\n right: 0,\r\n },\r\n searchButton: {\r\n paddingHorizontal: sizes.padding.md,\r\n },\r\n textInput: {\r\n fontSize: 20,\r\n //color: colors.grey,\r\n },\r\n})\r\n","import {useNavigation} from '@react-navigation/native'\r\nimport {EventEmitter} from 'expo-location'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useRef, useState} from 'react'\r\nimport {\r\n Animated,\r\n ScrollView,\r\n SectionList,\r\n StyleSheet,\r\n View,\r\n ViewStyle,\r\n} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {OrderNavigationProp} from '../..'\r\nimport {OrderHeader} from '../../../../../Components'\r\nimport {goBack, navigate} from '../../../../../Helpers/NavigationHelper'\r\nimport {GetRandomKey} from '../../../../../Helpers/UiHelpers'\r\nimport i18n from '../../../../../i18n'\r\nimport Style, {sizes} from '../../../../../Style'\r\nimport {orderOnlineStore} from '../../Store'\r\nimport ArticleCard from './ArticleCard'\r\nimport CategorySelector from './CategorySelector'\r\n\r\ninterface IProps {}\r\n\r\nconst AnimatedSectionList = Animated.createAnimatedComponent(SectionList)\r\n\r\nconst CategorySectionList: React.FC = ({children}) => {\r\n const {defaultFlatListWhite, flatListContentStyle} = Style\r\n const {FilteredDepartments, Articles, ScrollY, SearchMode, Restaurant} =\r\n orderOnlineStore\r\n\r\n const sectionListRef = useRef(null)\r\n const departmentScrollViewRef = useRef(null)\r\n\r\n const navigation = useNavigation()\r\n\r\n const sectionListData = FilteredDepartments.map((department) => {\r\n const articlesbyDepartment = Articles.filter(\r\n (x) => x.departmentNumber === department.number,\r\n )\r\n\r\n return {\r\n title: department.name,\r\n data: articlesbyDepartment,\r\n }\r\n })\r\n\r\n //const\r\n\r\n const departmentsTitles = sectionListData.map((x) => x.title)\r\n\r\n return (\r\n <>\r\n {\r\n const {\r\n section: {title},\r\n } = event\r\n\r\n const index = departmentsTitles.findIndex((x) => x === title)\r\n const firstElementStyle: ViewStyle =\r\n index === 0 && !SearchMode\r\n ? {\r\n paddingTop: orderOnlineStore.TABBAR_HEIGHT,\r\n }\r\n : {paddingTop: sizes.padding.sm}\r\n\r\n const header = () => {\r\n if (index > 0 || SearchMode) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n {\r\n navigate('dashboard')\r\n }}\r\n isAbsolute={false}\r\n />\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n {header()}\r\n \r\n {title}\r\n \r\n \r\n )\r\n }}\r\n onViewableItemsChanged={({viewableItems, changed}) => {\r\n if (viewableItems && viewableItems.length > 0) {\r\n orderOnlineStore.SetVisibleDepartment(\r\n viewableItems[0].section.title,\r\n departmentScrollViewRef,\r\n )\r\n }\r\n }}\r\n viewabilityConfig={{\r\n itemVisiblePercentThreshold: 50, //means if 50% of the item is visible\r\n }}\r\n renderItem={({item}) => {\r\n return (\r\n <>\r\n {\r\n navigation.navigate('article', {article: item})\r\n }}\r\n />\r\n \r\n )\r\n }}\r\n ListEmptyComponent={{i18n.t('OrderOnline.NoArticles')}}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}>\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(CategorySectionList)\r\n\r\nconst styles = StyleSheet.create({})\r\n","import {useFocusEffect} from '@react-navigation/native'\r\nimport {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {BackHandler, StyleSheet, View} from 'react-native'\r\nimport {Badge, Icon, Text} from 'react-native-elements'\r\nimport {OrderOnlineList} from '..'\r\nimport {FullFooterButton, ToprScreenLoader} from '../../../../Components'\r\nimport {navigate as navigateMain} from '../../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../../i18n'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport Style, {sizes} from '../../../../Style'\r\nimport {orderOnlineStore} from '../Store'\r\nimport CategorySectionList from './Components/CategorySectionList'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Articles: React.FC = ({navigation: {navigate, goBack}}) => {\r\n useEffect(() => {\r\n myLog.warn('Articles')\r\n }, [null])\r\n\r\n useFocusEffect(\r\n React.useCallback(() => {\r\n const onBackPress = () => {\r\n navigateMain('dashboard')\r\n return true\r\n }\r\n\r\n BackHandler.addEventListener('hardwareBackPress', onBackPress)\r\n\r\n return () =>\r\n BackHandler.removeEventListener('hardwareBackPress', onBackPress)\r\n }, [null]),\r\n )\r\n\r\n const {\r\n Isloading,\r\n OrderRequestLines,\r\n TotalAmountOrderFormatted,\r\n TotalProducts,\r\n } = orderOnlineStore\r\n\r\n const {iconContainer, badgeStyle} = style\r\n\r\n const renderCartFooter = () => {\r\n if (OrderRequestLines.length === 0) {\r\n return null\r\n }\r\n return (\r\n navigate('cart')}>\r\n \r\n \r\n \r\n \r\n \r\n {i18n.t('OrderOnline.Checkout')} ({TotalAmountOrderFormatted})\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n {renderCartFooter()}\r\n \r\n \r\n )\r\n}\r\nexport default observer(Articles)\r\n\r\nconst style = StyleSheet.create({\r\n iconContainer: {\r\n position: 'absolute',\r\n left: 0,\r\n top: 0,\r\n bottom: 0,\r\n justifyContent: 'center',\r\n },\r\n badgeStyle: {position: 'absolute', bottom: 4, right: -4},\r\n})\r\n","import React, {useEffect} from 'react'\r\nimport {observer} from 'mobx-react'\r\nimport {\r\n CardStyleInterpolators,\r\n createStackNavigator,\r\n StackNavigationProp,\r\n StackScreenProps,\r\n} from '@react-navigation/stack'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {\r\n FormHeader,\r\n Content,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n Container,\r\n} from '../../../Components'\r\nimport i18n from '../../../i18n'\r\nimport {sizes} from '../../../Style'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\n\r\nimport Article from './Article/Article'\r\nimport Cart from './Cart/Cart'\r\nimport OrderPayment from './OrderPayment/OrderPayment'\r\nimport Checkout from './Checkout/Checkout'\r\nimport Articles from './Articles/Articles'\r\nimport {orderOnlineStore} from './Store'\r\nimport {CompositeNavigationProp, useNavigation} from '@react-navigation/native'\r\nimport {IArticle, IOrderResult} from '../../../Models/InzziiApi'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nexport type OrderOnlineList = {\r\n articles: undefined\r\n article: {article: IArticle}\r\n cart: undefined\r\n checkout: undefined\r\n orderPayment: undefined //{orderResult: IOrderResult}\r\n}\r\n\r\nconst OrderOnlineStack = createStackNavigator()\r\n//const sd = StackNavigationProp\r\n\r\nexport type OrderNavigationProp = CompositeNavigationProp<\r\n StackNavigationProp,\r\n StackNavigationProp\r\n>\r\n\r\nconst index: React.FC = ({navigation: {navigate}, route}) => {\r\n const navigation = useNavigation()\r\n\r\n useEffect(() => {\r\n if (route.params === undefined) {\r\n //only initialize when not redirected from payment complete after charge\r\n orderOnlineStore.Initialize()\r\n } else {\r\n //after charge complete\r\n //redirect to order payment\r\n }\r\n\r\n //orderOnlineStore.TestOrderRequestLines()\r\n //navigation.navigate('checkout')\r\n\r\n // navigation.navigate('orderPayment', {\r\n // orderResult: {\r\n // orderId: '123-456',\r\n // orderNumber: 345,\r\n // totalAmount: 3.01,\r\n // },\r\n // })\r\n\r\n //init\r\n }, [null])\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(index)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {IWalletSTO} from '../../../Models/Server'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport I18n from '../../../i18n'\r\nimport TokenController from '../../../Services/Topr.Core/TokenController'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {MyErrorMessage, ToprError} from '../../../Models/Client'\r\nimport i18n from '../../../i18n/index'\r\nimport {store as tokenStore} from '../Tokens/Store'\r\nimport {IsNfcSupportedAndEnabled} from '../../../Helpers/NfcHelpers'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store.web'\r\nexport type AddTokenFormData = {\r\n activationCode: string\r\n description: string\r\n}\r\n\r\nexport default class Store {\r\n public Wallets: IWalletSTO[] = []\r\n public IsSubmitting = false\r\n public IsLoading = true\r\n public HasNfcEnabled = false\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public InitialState() {\r\n this.IsLoading = true\r\n this.HasNfcEnabled = false\r\n this.IsSubmitting = false\r\n }\r\n\r\n public Initialize() {\r\n IsNfcSupportedAndEnabled()\r\n .then((isSupportedAndEnabled) => {\r\n //console.log(' store', isSupportedAndEnabled)\r\n runInAction(() => {\r\n this.IsLoading = false\r\n this.SetHasNfcEnabled(isSupportedAndEnabled)\r\n })\r\n })\r\n .catch((error) => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n this.SetHasNfcEnabled(false)\r\n })\r\n })\r\n }\r\n\r\n public ActivateWithCode(\r\n activationCode: string,\r\n onError: (errorMessage: string) => void,\r\n ) {\r\n //DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n TokenController.ActivateWithCode(activationCode)\r\n .then(() => {\r\n appUiStore.ShowToast({\r\n message: i18n.t('AddToken.Form.Succes', {activationCode}),\r\n })\r\n tokenStore.GetTokens()\r\n dashboardStore.GetWallets()\r\n goBack()\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n SetFriendlyMessage(toprError, onError, [\r\n new MyErrorMessage(\r\n 'TOKEN_NOT_FOUND',\r\n 'AddToken.Form.ServerErrors.Title',\r\n 'AddToken.Form.ServerErrors.TOKEN_NOT_FOUND',\r\n 'warning',\r\n ),\r\n new MyErrorMessage(\r\n 'TOKEN_ALREADY_ACTIVATED',\r\n 'AddToken.Form.ServerErrors.Title',\r\n 'AddToken.Form.ServerErrors.TOKEN_ALREADY_ACTIVATED',\r\n 'warning',\r\n ),\r\n ])\r\n })\r\n // })\r\n }\r\n\r\n public SetHasNfcEnabled(enabled: boolean) {\r\n this.HasNfcEnabled = enabled\r\n }\r\n\r\n public SetIsloading(isLoading: boolean) {\r\n this.IsLoading = isLoading\r\n }\r\n}\r\n\r\nexport const store = new Store()\r\n","import {Platform} from 'react-native'\r\nimport NfcManager, {MyTagEvent} from 'react-native-nfc-manager'\r\n\r\nexport type onTagScannedEvent = (tag: MyTagEvent | null) => void\r\n\r\nexport const IsNfcSupportedAndEnabled = () => {\r\n return new Promise((resolve, reject) => {\r\n if (Platform.OS === 'web') {\r\n resolve(false)\r\n }\r\n\r\n NfcManager.isSupported()\r\n .then((supported: boolean) => {\r\n if (supported && Platform.OS === 'android') {\r\n NfcManager.isEnabled()\r\n .then((isEnabled: boolean) => {\r\n resolve(isEnabled)\r\n })\r\n .catch((error) => {\r\n reject(error)\r\n })\r\n } else {\r\n resolve(supported)\r\n }\r\n })\r\n .catch((error) => reject(error))\r\n })\r\n}\r\n","import React, {useEffect} from 'react'\r\nimport {observer} from 'mobx-react'\r\nimport {StackScreenProps} from '@react-navigation/stack'\r\nimport {MainScreensList} from '../../../../Navigation'\r\nimport {\r\n FormHeader,\r\n Content,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n Container,\r\n FormInfo,\r\n MyHeader,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport {sizes} from '../../../../Style'\r\nimport {myLog} from '../../../../Services/Client/LogService'\r\nimport {useForm} from 'react-hook-form'\r\nimport {AddTokenFormData, store} from '../Store'\r\nimport AppConfig from '../../../../Config/AppConfig'\r\nimport {goBack} from '../../../../Helpers/NavigationHelper'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {StockImageLayout} from '../../../../Components/Web'\r\n\r\ninterface IProps {}\r\n\r\nconst AddTokenActivationcode: React.FC = () => {\r\n const {control, handleSubmit, errors, setValue, setError, formState} =\r\n useForm({mode: 'onChange'})\r\n\r\n useEffect(() => {\r\n myLog.info('AddToken')\r\n //store.Initialize()\r\n\r\n if (AppConfig.IsDebugMode) {\r\n setValue('activationCode', '35488233')\r\n }\r\n }, [store])\r\n\r\n const onSubmit = (data: AddTokenFormData) => {\r\n //store.SetFormData('name', data.name)\r\n store.ActivateWithCode(data.activationCode, (message: string) => {\r\n setError('activationCode', {\r\n type: 'manual',\r\n message,\r\n })\r\n })\r\n }\r\n const {IsSubmitting} = store\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {i18n.t('AddToken.Info')}\r\n handleSubmit((data) => onSubmit(data))(),\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t(\r\n 'AddToken.Form.Fields.ActivationCode.Errors.Required',\r\n ),\r\n },\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(AddTokenActivationcode)\r\n","import {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {\r\n Container,\r\n Content,\r\n NfcScanner,\r\n SubmitHeader,\r\n ToprScreenLoader,\r\n} from '../../../../../Components'\r\nimport {goBack} from '../../../../../Helpers/NavigationHelper'\r\nimport {myLog} from '../../../../../Services/Client/LogService'\r\nimport i18n from '../../../../../i18n'\r\nimport {addTokenUidstore} from './Store'\r\n\r\ninterface IProps {}\r\n\r\nconst AddTokenUid: React.FC = () => {\r\n useEffect(() => {\r\n myLog.warn('AddTokenUid')\r\n addTokenUidstore.Initialize()\r\n }, [null])\r\n\r\n const {IsSubmitting, AlertStatusMessage} = addTokenUidstore\r\n\r\n return (\r\n \r\n \r\n \r\n {\r\n addTokenUidstore.ActivateWithUid(tag)\r\n }}\r\n alertStatusMessage={AlertStatusMessage}\r\n />\r\n \r\n \r\n {/* */}\r\n \r\n \r\n )\r\n}\r\nexport default observer(AddTokenUid)\r\n","import React from 'react'\r\nimport {observer} from 'mobx-react'\r\nimport {Platform, View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport AddTokenActivationCode from './Components/AddTokenActivationCode'\r\nimport {useEffect} from 'react'\r\n\r\nimport {IsNfcSupportedAndEnabled} from '../../../Helpers/NfcHelpers'\r\nimport {store} from './Store'\r\nimport AddTokenUid from './Components/AddTokenUid/AddTokenUid'\r\nimport {MyHeader} from '../../../Components'\r\nimport i18n from '../../../i18n'\r\nimport {StackNavigationProp} from '@react-navigation/stack'\r\nimport {MainScreensList} from '../../../Navigation'\r\n\r\ninterface IProps {\r\n navigation: StackNavigationProp\r\n}\r\n\r\nconst AddToken: React.FC = ({navigation: {goBack}}) => {\r\n useEffect(() => {\r\n //https://github.com/whitedogg13/react-native-nfc-manager/blob/HEAD/example/AppV2Mifare.js\r\n //NfcManager.start()\r\n store.Initialize()\r\n\r\n return () => store.InitialState()\r\n }, [null])\r\n\r\n const {IsLoading, HasNfcEnabled} = store\r\n\r\n if (IsLoading) {\r\n return null\r\n }\r\n\r\n const renderAddTokenScreens = () => {\r\n if (!HasNfcEnabled) {\r\n return \r\n } else {\r\n return \r\n }\r\n }\r\n\r\n return (\r\n <>\r\n {/* */}\r\n {renderAddTokenScreens()}\r\n \r\n )\r\n}\r\n\r\nexport default observer(AddToken)\r\n","import React from 'react'\r\nimport {ScrollView, View} from 'react-native'\r\nimport {ListItem} from 'react-native-elements'\r\nimport {MyButton, MyModal, ToprLoader} from '../../../../Components'\r\nimport {\r\n FormatCurrency,\r\n FormatCurrencyTransactionItems,\r\n} from '../../../../Helpers/TextHelpers'\r\nimport i18n from '../../../../i18n'\r\nimport {ICurrencySTO} from '../../../../Models/Server'\r\nimport {ILoyaltyTransactionItemSTO} from '../../../../Models/Server/Wallet/ILoyaltyTransactionItemSTO'\r\nimport Style, {deviceHeight, sizes, boldFontWeight} from '../../../../Style'\r\n\r\nexport interface IProps {\r\n transactionItemRows: ILoyaltyTransactionItemSTO[]\r\n onClose: () => void\r\n isLoading: boolean\r\n isVisible: boolean\r\n currency?: ICurrencySTO\r\n}\r\n\r\nconst TransactionItemsModal: React.FC = ({\r\n onClose,\r\n transactionItemRows,\r\n isLoading,\r\n isVisible,\r\n currency,\r\n}) => {\r\n if (!isVisible) {\r\n return null\r\n }\r\n\r\n const renderContent = () => {\r\n const {centerXY, container} = Style\r\n if (isLoading) {\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n if (transactionItemRows.length === 0) {\r\n return (\r\n \r\n \r\n \r\n {i18n.t('WalletDetails.NoTransactionItems')}\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const parseItem = (item: ILoyaltyTransactionItemSTO) => {\r\n if (item.Article !== null && item.Article !== undefined) {\r\n //when article is set get the name from description\r\n return item.Description\r\n }\r\n\r\n //when no article is set parse\r\n if (\r\n item.Description !== undefined &&\r\n item.Description !== null &&\r\n item.Description.indexOf(';') > -1\r\n ) {\r\n const splitted = item.Description.split(';')\r\n if (splitted.length === 3) {\r\n return splitted[2]\r\n }\r\n return item.Description\r\n }\r\n\r\n return item.Description\r\n }\r\n\r\n const renderFooter = () => {\r\n const totalPrice = transactionItemRows\r\n .map((x) => x.Quantity * x.UnitPrice)\r\n .reduce((a, b) => a + b)\r\n\r\n return (\r\n \r\n \r\n \r\n {i18n.t('Common.Total')}\r\n \r\n \r\n \r\n {FormatCurrencyTransactionItems(totalPrice, currency)}\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {transactionItemRows.map((item, key) => {\r\n const rowTotal = item.UnitPrice * item.Quantity\r\n\r\n return (\r\n \r\n \r\n \r\n {item.Quantity}x {parseItem(item)}\r\n \r\n \r\n \r\n {FormatCurrency(rowTotal, currency)}\r\n \r\n \r\n )\r\n })}\r\n \r\n {renderFooter()}\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {renderContent()}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default TransactionItemsModal\r\n","import {Text} from 'react-native-elements'\r\nimport React from 'react'\r\nimport {View, TouchableOpacity} from 'react-native'\r\nimport {FormatDateTime} from '../../../../Helpers/DateHelpers'\r\nimport {FormatCurrency} from '../../../../Helpers/TextHelpers'\r\nimport {ITransactionSTO} from '../../../../Models/Server'\r\nimport Style, {colors, sizes} from '../../../../Style'\r\nimport {Icon} from 'react-native-elements'\r\n//import {TouchableOpacity} from 'react-native-gesture-handler'\r\ninterface IProps {\r\n transaction: ITransactionSTO\r\n onPressTransactionItemIcon: () => void\r\n}\r\n\r\nconst TransactionRow: React.FC = ({\r\n transaction,\r\n onPressTransactionItemIcon: onPress,\r\n}) => {\r\n const {transactionRow, noteText, flexRow} = Style\r\n let activationCodeText =\r\n transaction.ActivationCode !== null\r\n ? `${transaction.ActivationCode} - `\r\n : ''\r\n\r\n const renderTransactionItemsIcon = () => {\r\n if (!transaction.HasTransactionItems) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {transaction.Description}\r\n {renderTransactionItemsIcon()}\r\n \r\n \r\n {activationCodeText}\r\n {FormatDateTime(transaction.RequestDate as string)}\r\n \r\n \r\n \r\n {FormatCurrency(transaction.Amount, transaction.Currency)}\r\n \r\n \r\n )\r\n // return (\r\n // \r\n // \r\n // {transaction.Description}\r\n // \r\n // {activationCodeText}\r\n // {FormatDateTime(transaction.RequestDate as string)}\r\n // \r\n // \r\n // {FormatCurrency(transaction.Amount, transaction.Currency)}\r\n // \r\n // )\r\n}\r\n\r\nexport default TransactionRow\r\n","import {ErrorMessage} from '@hookform/error-message'\r\nimport React, {PropsWithChildren, useState} from 'react'\r\nimport {Controller} from 'react-hook-form'\r\nimport {View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport Style, {sizes} from '../../Style'\r\n\r\nimport nl from 'date-fns/locale/nl'\r\nimport DatePicker, {\r\n ReactDatePickerProps,\r\n registerLocale,\r\n} from 'react-datepicker'\r\nimport 'react-datepicker/dist/react-datepicker.css'\r\nregisterLocale('nl', nl)\r\n\r\ninterface IProps\r\n extends Pick<\r\n ReactDatePickerProps,\r\n 'selectsStart' | 'selectsEnd' | 'startDate' | 'endDate'\r\n > {\r\n name: keyof T\r\n label: string\r\n control: any\r\n validation?: {\r\n errors: any\r\n rules: any\r\n defaultValue?: string\r\n }\r\n formObject: T\r\n onDateChange?: (text: Date | null) => void\r\n}\r\n\r\nconst MyDatePicker = (\r\n props: PropsWithChildren>,\r\n) => {\r\n const {inputContainer, labelStyle, errorMessage} = Style\r\n const {\r\n name,\r\n label,\r\n control,\r\n validation,\r\n onDateChange,\r\n selectsStart,\r\n selectsEnd,\r\n startDate,\r\n endDate,\r\n } = props\r\n\r\n const rules = validation !== undefined ? validation.rules : {}\r\n const errors = validation !== undefined ? validation.errors : {}\r\n\r\n const defaultValue =\r\n validation !== undefined && validation.defaultValue !== undefined\r\n ? validation.defaultValue\r\n : ''\r\n\r\n return (\r\n {\r\n //console.log(name, value, startDate, endDate)\r\n\r\n //const myStartDate = sele\r\n\r\n return (\r\n \r\n {label}\r\n {\r\n onChange(date)\r\n if (onDateChange) {\r\n onDateChange(date)\r\n }\r\n }}\r\n />\r\n (\r\n {message}\r\n )}\r\n />\r\n \r\n )\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport default MyDatePicker\r\n","export interface ICurrencyChargeMethodSTO {\r\n /**Id */\r\n Guid: string\r\n Name: string\r\n\r\n IconFile: string\r\n\r\n TransactionCostsFixed: number\r\n TransactionCostsPercentage: number\r\n}\r\n\r\nexport enum PaymentMethodTypes {\r\n AutomaticChargeCollection = 17,\r\n}\r\n\r\nexport const getPaymentMethodTransactionCosts = (\r\n currencyChargeMethodSTO: ICurrencyChargeMethodSTO,\r\n amount?: number,\r\n) => {\r\n let transactionCosts = 0\r\n\r\n if (\r\n currencyChargeMethodSTO &&\r\n currencyChargeMethodSTO.TransactionCostsFixed > 0\r\n ) {\r\n return currencyChargeMethodSTO.TransactionCostsFixed * 100\r\n }\r\n\r\n if (\r\n amount !== undefined &&\r\n amount > 0 &&\r\n currencyChargeMethodSTO &&\r\n currencyChargeMethodSTO.TransactionCostsPercentage > 0\r\n ) {\r\n const percentage = currencyChargeMethodSTO.TransactionCostsPercentage / 100\r\n\r\n return percentage * amount * 100 //back to cents\r\n }\r\n\r\n return transactionCosts\r\n}\r\n","import {isAfter} from 'date-fns'\r\nimport React from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {StyleSheet} from 'react-native'\r\nimport {Card} from 'react-native-elements'\r\nimport {MyButton, MyFooter, MyFooterTile, MyModal} from '../../../../Components'\r\nimport MyDatePicker from '../../../../Components/Form/MyDatePicker'\r\nimport {sizes} from '../../../../Style'\r\nimport i18n from '../../../../i18n'\r\n\r\nexport interface IProps {\r\n onClose: () => void\r\n onOk: (fromDate: Date, tillDate: Date) => void\r\n isVisible: boolean\r\n}\r\n\r\ninterface IFormValues {\r\n fromDate: Date | null\r\n tillDate: Date\r\n}\r\n\r\nconst ReportModal: React.FC = ({onClose, isVisible, onOk}) => {\r\n const today = new Date()\r\n\r\n const {control, handleSubmit, errors, getValues, setValue, watch} =\r\n useForm({\r\n defaultValues: {\r\n //fromDate: null,\r\n //tillDate: new Date(new Date().toDateString()), //date with no time\r\n fromDate: new Date(today.getFullYear(), today.getMonth(), 1), //1 1 oct\r\n tillDate: new Date(today.toDateString()), //date with no time\r\n },\r\n })\r\n\r\n const renderContent = () => {\r\n const fromDate = watch('fromDate')\r\n const tillDate = watch('tillDate')\r\n\r\n return (\r\n <>\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {\r\n const values = getValues()\r\n return (\r\n isAfter(tillDate, values.fromDate as Date) ||\r\n i18n.t(\r\n 'WalletDetails.ReportModal.Fields.TillDate.Errors.Equality',\r\n )\r\n )\r\n },\r\n },\r\n },\r\n }}\r\n />\r\n
    \r\n
    \r\n \r\n )\r\n }\r\n\r\n const onSubmit = (data: IFormValues) => {\r\n onOk(data.fromDate as Date, data.tillDate)\r\n onClose()\r\n }\r\n\r\n return (\r\n \r\n \r\n {i18n.t('WalletDetails.ReportModal.Header')}\r\n \r\n {renderContent()}\r\n\r\n \r\n \r\n {\r\n onClose()\r\n }}\r\n style={{marginRight: sizes.padding.sm}}\r\n title={i18n.t('Common.Cancel')}\r\n />\r\n \r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n }}\r\n title={i18n.t('Common.Ok')}\r\n />\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ReportModal\r\n\r\nconst styles = StyleSheet.create({})\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {Observer, observer} from 'mobx-react'\r\nimport React, {ReactNode, useEffect, useRef} from 'react'\r\nimport {FlatList, View} from 'react-native'\r\nimport {Badge, Icon, Text, Input} from 'react-native-elements'\r\nimport {ImageHeader, ToprLoader, ToprScreenLoader} from '../../../Components'\r\nimport {LeftColumnLayout, Spinner} from '../../../Components/Web'\r\nimport {FormatCurrency, GetTenantPagetitle} from '../../../Helpers/TextHelpers'\r\nimport {GetLocalizedImageUrl, GetRandomKey} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style, {sizes} from '../../../Style'\r\nimport SideMenuItem from '../../Dashboard/Components/Web/SideMenuItem.web'\r\nimport TransactionItemsModal from './Components/TransactionItemsModal'\r\nimport TransactionRow from './Components/TransactionRow'\r\nimport {walletDetailsStore} from './Store'\r\nimport {linkingStore} from '../../../Navigation/LinkingStore'\r\nimport {MainScreensListWeb} from '../../../Navigation/index.web'\r\nimport ReportModal from './Components/ReportModal'\r\nimport {TextInput} from 'react-native-gesture-handler'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst WalletDetailsWeb: React.FC = ({\r\n navigation: {goBack, navigate, setOptions},\r\n route,\r\n}) => {\r\n const currencyGuid = route.params.currencyGuid\r\n useEffect(() => {\r\n myLog.info(`WalletDetails`, currencyGuid)\r\n walletDetailsStore.Initialize(currencyGuid)\r\n\r\n linkingStore.ProcessUrl(window.location.href)\r\n //TestUrls.WalletDetails()\r\n }, [null])\r\n\r\n const {\r\n IsTransactionsLoading,\r\n Transactions,\r\n Wallet,\r\n IsLoading,\r\n IsPdfLoading,\r\n IsTransactionItemsLoading,\r\n IsTransactionItemsModalVisible,\r\n TransactionItems,\r\n SearchVisible,\r\n SearchText,\r\n FilteredTransactions,\r\n } = walletDetailsStore\r\n\r\n useEffect(() => {\r\n if (Wallet) {\r\n setOptions({title: GetTenantPagetitle(Wallet.Currency.Name)})\r\n }\r\n }, [Wallet])\r\n\r\n const {\r\n flatListLoader,\r\n imageHeaderTitle,\r\n flatListHeader,\r\n defaultFlatListWhite,\r\n flatListContentStyle,\r\n transactionRow,\r\n badgeStyle,\r\n flex1,\r\n flexRow,\r\n } = Style\r\n\r\n const renderSearch = () => {\r\n if (!SearchVisible) {\r\n return null\r\n }\r\n\r\n return (\r\n }\r\n rightIcon={\r\n walletDetailsStore.onSearchTextChange('')}\r\n />\r\n }\r\n onChangeText={(value) => {\r\n walletDetailsStore.onSearchTextChange(value)\r\n }}\r\n autoFocus={SearchVisible}\r\n />\r\n )\r\n }\r\n\r\n const renderTransactions = () => {\r\n return (\r\n <>\r\n \r\n {i18n.t('WalletDetails.Transactions')}\r\n \r\n {\r\n walletDetailsStore.ToggleSearch()\r\n }}\r\n style={{marginRight: sizes.padding.md}}\r\n />\r\n \r\n {\r\n walletDetailsStore.ToggleIsReportModalVisible(true)\r\n }}\r\n // onPress={() => walletDetailsStore.GetTransactionPdfWeb()}\r\n />\r\n \r\n \r\n \r\n {renderSearch()}\r\n \r\n \r\n \r\n {i18n.t('WalletDetails.NoTransactions')}\r\n \r\n }\r\n style={[defaultFlatListWhite]}\r\n refreshing={IsTransactionsLoading}\r\n onEndReached={() => walletDetailsStore.NextPage()}\r\n onEndReachedThreshold={0.5}\r\n initialNumToRender={walletDetailsStore.Take}\r\n onRefresh={() => walletDetailsStore.GetTransactions(true)}\r\n data={FilteredTransactions}\r\n renderItem={({item}) => (\r\n {\r\n walletDetailsStore.ShowTransactionItemsModal(\r\n item.TransactionId,\r\n )\r\n }}\r\n />\r\n )}\r\n ListFooterComponent={() => {\r\n return {() => renderFooter()}\r\n }}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const renderFooter = () => {\r\n if (\r\n walletDetailsStore.IsTransactionsLoading ||\r\n !walletDetailsStore.HasMoreLoading ||\r\n walletDetailsStore.IsLoading\r\n ) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const renderSideMenu = () => {\r\n const elements: ReactNode[] = []\r\n\r\n if (Wallet === undefined) {\r\n return null\r\n }\r\n\r\n if (Wallet.Currency.ConsumerCharge) {\r\n elements.push(\r\n navigate('charge', {wallet: Wallet})}>\r\n {i18n.t('WalletDetails.Charge')}\r\n ,\r\n )\r\n }\r\n\r\n if (Wallet.Currency.ConsumerWithdraw) {\r\n elements.push(\r\n navigate('withdraw', {wallet: Wallet})}>\r\n {i18n.t('WalletDetails.Withdraw')}\r\n ,\r\n )\r\n }\r\n\r\n if (Wallet.Currency.ConsumerSendMoney) {\r\n elements.push(\r\n \r\n navigate('sendMoney', {currencyGuid: Wallet.Currency.CurrencyGuid})\r\n }>\r\n {i18n.t('WalletDetails.SendMoney')}\r\n ,\r\n )\r\n }\r\n\r\n if (Wallet.Currency.AutomaticChargeAllowed) {\r\n elements.push(\r\n \r\n navigate('automaticCharge', {\r\n currencyGuid: Wallet.Currency.CurrencyGuid,\r\n })\r\n }>\r\n {i18n.t('WalletDetails.AutomaticCharge')}\r\n ,\r\n )\r\n }\r\n\r\n return
      {elements}
    \r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n navigate('dashboard')}>\r\n {Wallet?.Currency.Name}\r\n \r\n \r\n walletDetailsStore.HideTransactionItemsModal()}\r\n transactionItemRows={TransactionItems}\r\n />\r\n walletDetailsStore.ToggleIsReportModalVisible(false)}\r\n onOk={(fromDate, tillDate) => {\r\n walletDetailsStore.GetTransactionPeriodPdfWeb(fromDate, tillDate)\r\n }}\r\n isVisible={walletDetailsStore.IsReportModalVisible}\r\n />\r\n {renderTransactions()}\r\n \r\n \r\n\r\n {/* {renderFooterButtons()} */}\r\n \r\n )\r\n}\r\nexport default observer(WalletDetailsWeb)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {IUserCouponSTO} from '../../../Models/Server'\r\nimport CouponController from '../../../Services/Topr.Core/CouponController'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n\r\n public UserCoupon?: IUserCouponSTO = undefined\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public GetUserCoupon(userCouponGuid: string) {\r\n this.IsLoading = true\r\n\r\n CouponController.GetUserCoupon(userCouponGuid)\r\n .then((userCoupon) => {\r\n runInAction(() => {\r\n this.UserCoupon = userCoupon\r\n this.IsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n }\r\n}\r\nexport const couponDetailsStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {\r\n Container,\r\n Content,\r\n CouponInfoCard,\r\n SubmitHeader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetLocalizedImageUrl} from '../../../Helpers/UiHelpers'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {couponDetailsStore} from './Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst CouponDetails: React.FC = ({navigation: {goBack}, route}) => {\r\n const userCouponGuid = route.params.userCouponGuid\r\n useEffect(() => {\r\n myLog.info(`CouponDetails`)\r\n couponDetailsStore.GetUserCoupon(userCouponGuid)\r\n }, [null])\r\n\r\n const {IsLoading, UserCoupon} = couponDetailsStore\r\n const imageGuid = UserCoupon?.Coupon.Images[0].Guid\r\n\r\n return (\r\n // \r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n // \r\n )\r\n}\r\nexport default observer(CouponDetails)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {DoServiceCall} from '../../../Helpers/ServiceHelpers'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport i18n from '../../../i18n'\r\nimport CouponController from '../../../Services/Topr.Core/CouponController'\r\nimport {ICouponSummarySTO} from '../../../Models/Server'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public CouponSummaries: ICouponSummarySTO[] = []\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n this.IsLoading = true\r\n CouponController.GetCouponSummaries()\r\n .then((couponSummaries) => {\r\n runInAction(() => {\r\n this.CouponSummaries = couponSummaries\r\n this.IsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n }\r\n}\r\nexport const couponSummaryStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport I18n from 'i18n-js'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {FlatList, View, Text} from 'react-native'\r\nimport {\r\n Container,\r\n Content,\r\n CouponSummaryCard,\r\n ImageCard,\r\n SubmitHeader,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport MyHeader from '../../../Components/Headers/MyHeader'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetRandomKey} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\nimport {couponSummaryStore} from './Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst CouponsSummary: React.FC = ({\r\n navigation: {navigate, goBack},\r\n route,\r\n}) => {\r\n const {IsLoading, CouponSummaries} = couponSummaryStore\r\n\r\n useEffect(() => {\r\n myLog.warn('CouponsSummary')\r\n couponSummaryStore.Initialize()\r\n }, [null])\r\n\r\n const {defaultFlatListWhite, flatListContentStyleStock} = Style\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n contentContainerStyle={flatListContentStyleStock}\r\n refreshing={IsLoading}\r\n onRefresh={() => couponSummaryStore.Initialize()}\r\n data={CouponSummaries}\r\n renderItem={({item}) => (\r\n {\r\n navigate('userCouponsSummary', {couponSummary: item})\r\n }}\r\n />\r\n )}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n \r\n {i18n.t('CouponsSummary.Header')}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(CouponsSummary)\r\n","import {Icon, ListItem, Text} from 'react-native-elements'\r\nimport React from 'react'\r\nimport {View} from 'react-native'\r\nimport {FormatDateTime} from '../../../../Helpers/DateHelpers'\r\nimport {FormatCurrency} from '../../../../Helpers/TextHelpers'\r\nimport {ITransactionSTO, IUserCouponSummarySTO} from '../../../../Models/Server'\r\nimport Style, {colors, sizes} from '../../../../Style'\r\nimport i18n from '../../../../i18n'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\ninterface IProps {\r\n userCouponSummary: IUserCouponSummarySTO\r\n}\r\n\r\nconst UserCouponsSummaryRow: React.FC = ({userCouponSummary}) => {\r\n const {noteText} = Style\r\n\r\n const getIconAndText = () => {\r\n if (userCouponSummary.Redeemed !== null) {\r\n return (\r\n <>\r\n \r\n {i18n.t('Loyalty.Status.Redeemed')}\r\n \r\n )\r\n }\r\n\r\n if (userCouponSummary.IsActive) {\r\n const now = new Date(new Date().toISOString())\r\n const validFrom = userCouponSummary.ValidFrom\r\n ? new Date(userCouponSummary.ValidFrom)\r\n : null\r\n const validTill = userCouponSummary.ValidTill\r\n ? new Date(userCouponSummary.ValidTill)\r\n : null\r\n if (validFrom === null || (validFrom && validFrom < now)) {\r\n if (validTill === null || (validTill && validTill > now)) {\r\n return (\r\n <>\r\n \r\n {i18n.t('Loyalty.Status.Active')}\r\n \r\n )\r\n }\r\n\r\n if (validTill && validTill < now) {\r\n return (\r\n <>\r\n \r\n {i18n.t('Loyalty.Status.Expired')}\r\n \r\n )\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {i18n.t('Loyalty.Status.NotActive')}\r\n \r\n )\r\n }\r\n\r\n const renderRedeemedRow = () => {\r\n if (userCouponSummary.Redeemed === null) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n \r\n {i18n.t('Common.Redeemed')}\r\n \r\n {FormatDateTime(userCouponSummary.Redeemed as string)}\r\n \r\n \r\n \r\n {i18n.t('Common.Location')}\r\n {userCouponSummary.RedeemedLocation}\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n navigate('couponDetails', {\r\n userCouponGuid: userCouponSummary.UserCouponGuid,\r\n })\r\n }>\r\n \r\n \r\n \r\n {i18n.t('Common.Received')}\r\n \r\n {FormatDateTime(userCouponSummary.Created as string)}\r\n \r\n \r\n \r\n {i18n.t('Common.Status')}\r\n {getIconAndText()}\r\n \r\n \r\n {renderRedeemedRow()}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default UserCouponsSummaryRow\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {IUserCouponSummarySTO} from '../../../Models/Server'\r\nimport CouponController from '../../../Services/Topr.Core/CouponController'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public CouponGuid = ''\r\n public UserCouponSummaries: IUserCouponSummarySTO[] = []\r\n private Skip = 0\r\n public Take = 20\r\n public HasMore = true\r\n public HasMoreLoading = false\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize(couponGuid: string) {\r\n this.IsLoading = true\r\n this.CouponGuid = couponGuid\r\n this.GetUserCouponSummaries(true)\r\n }\r\n\r\n private GetUserCouponSummaries(reload: boolean) {\r\n this.HasMoreLoading = true\r\n\r\n if (reload) {\r\n this.Skip = 0\r\n }\r\n\r\n CouponController.GetUserCouponSummaries(\r\n this.CouponGuid,\r\n this.Skip,\r\n this.Take,\r\n )\r\n .then((userCouponSummaries) => {\r\n runInAction(() => {\r\n if (reload) {\r\n this.UserCouponSummaries = userCouponSummaries\r\n } else {\r\n this.UserCouponSummaries.push(...userCouponSummaries)\r\n }\r\n this.IsLoading = false\r\n this.HasMoreLoading = false\r\n this.HasMore = userCouponSummaries.length === this.Take\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n }\r\n\r\n public NextPage() {\r\n if (!this.HasMoreLoading && this.HasMore) {\r\n this.Skip += this.Take\r\n console.log('nextPage', this.Skip)\r\n this.GetUserCouponSummaries(false)\r\n }\r\n }\r\n}\r\nexport const userCouponSummaryStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport I18n from 'i18n-js'\r\nimport {Observer, observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {FlatList, View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n ImageCard,\r\n ImageHeader,\r\n SubmitHeader,\r\n ToprLoader,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetLocalizedImageUrl, GetRandomKey} from '../../../Helpers/UiHelpers'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\nimport UserCouponsSummaryRow from './Components/UserCouponsSummaryRow'\r\nimport {userCouponSummaryStore} from './Store'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst UserCouponsSummary: React.FC = ({\r\n navigation: {goBack},\r\n route,\r\n}) => {\r\n const {IsLoading, UserCouponSummaries, HasMoreLoading} =\r\n userCouponSummaryStore\r\n const couponSummary = route.params.couponSummary\r\n useEffect(() => {\r\n myLog.warn('CouponsSummary')\r\n userCouponSummaryStore.Initialize(couponSummary.Coupon.Guid)\r\n }, [null])\r\n\r\n const {\r\n defaultFlatListWhite,\r\n flatListContentStyleStock,\r\n flatListLoader,\r\n imageHeaderTitle,\r\n } = Style\r\n\r\n const renderFooter = () => {\r\n if (\r\n !userCouponSummaryStore.HasMoreLoading ||\r\n userCouponSummaryStore.IsLoading\r\n ) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n contentContainerStyle={flatListContentStyleStock}\r\n refreshing={HasMoreLoading}\r\n onEndReached={() => userCouponSummaryStore.NextPage()}\r\n onEndReachedThreshold={0.5}\r\n initialNumToRender={userCouponSummaryStore.Take}\r\n data={UserCouponSummaries}\r\n ListFooterComponent={() => {\r\n return {() => renderFooter()}\r\n }}\r\n onRefresh={() =>\r\n userCouponSummaryStore.Initialize(couponSummary.Coupon.Guid)\r\n }\r\n renderItem={({item}) => (\r\n \r\n )}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n \r\n {couponSummary.Coupon.FullTitle}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(UserCouponsSummary)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {DoServiceCall} from '../../../Helpers/ServiceHelpers'\r\nimport {IUserCouponSTO, IUserSavingCardSTO} from '../../../Models/Server'\r\nimport SavingcardController from '../../../Services/Topr.Core/SavingcardController'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n\r\n public UserSavingCard?: IUserSavingCardSTO = undefined\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public GetUserSavingCard(userSavingCardGuid: string) {\r\n this.IsLoading = true\r\n SavingcardController.GetUserSavingCard(userSavingCardGuid)\r\n .then((userSavingCard) => {\r\n runInAction(() => {\r\n this.UserSavingCard = userSavingCard\r\n this.IsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n }\r\n}\r\nexport const savingCardDetailsStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {View} from 'react-native'\r\nimport {Badge, Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n CouponInfoCard,\r\n ImageHeader,\r\n SavingCardInfoCard,\r\n StampsCard,\r\n SubmitHeader,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetFileUrl, GetLocalizedImageUrl} from '../../../Helpers/UiHelpers'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\nimport {savingCardDetailsStore} from './Store'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst SavingCardDetails: React.FC = ({navigation: {goBack}, route}) => {\r\n const userSavingCardGuid = route.params.userSavingCardGuid\r\n useEffect(() => {\r\n myLog.info(`SavingCardDetails`)\r\n savingCardDetailsStore.GetUserSavingCard(userSavingCardGuid)\r\n }, [null])\r\n\r\n const {IsLoading, UserSavingCard} = savingCardDetailsStore\r\n const {imageHeaderTitle, badgeStyle} = Style\r\n const imageUrl = GetFileUrl(UserSavingCard?.SavingCard.ImageGuid)\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {`${UserSavingCard?.SavingCard.Title} ${UserSavingCard?.StampCount}/${UserSavingCard?.SavingCard.StampCount}`}\r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(SavingCardDetails)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {ISavingCardSummarySTO} from '../../../Models/Server'\r\nimport SavingcardController from '../../../Services/Topr.Core/SavingcardController'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public SavingCardSummaries: ISavingCardSummarySTO[] = []\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n this.IsLoading = true\r\n\r\n SavingcardController.GetSavingCardSummaries()\r\n .then((savingCardSummaries) => {\r\n runInAction(() => {\r\n this.SavingCardSummaries = savingCardSummaries\r\n this.IsLoading = false\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n }\r\n}\r\nexport const savingCardSummaryStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport I18n from 'i18n-js'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {FlatList} from 'react-native'\r\nimport {\r\n Container,\r\n Content,\r\n ImageCard,\r\n SavingCardSummaryCard,\r\n SubmitHeader,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport MyHeader from '../../../Components/Headers/MyHeader'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetRandomKey} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\nimport {savingCardSummaryStore} from './Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst SavingCardsSummary: React.FC = ({\r\n navigation: {navigate, goBack},\r\n}) => {\r\n const {IsLoading, SavingCardSummaries} = savingCardSummaryStore\r\n\r\n useEffect(() => {\r\n myLog.warn('SavingCardsSummary')\r\n savingCardSummaryStore.Initialize()\r\n }, [null])\r\n\r\n const {defaultFlatListWhite, flatListContentStyleStock} = Style\r\n return (\r\n <>\r\n {/* */}\r\n\r\n \r\n \r\n \r\n \r\n }\r\n contentContainerStyle={[flatListContentStyleStock]}\r\n refreshing={IsLoading}\r\n onRefresh={() => savingCardSummaryStore.Initialize()}\r\n data={SavingCardSummaries}\r\n renderItem={({item}) => (\r\n {\r\n navigate('userSavingCardsSummary', {\r\n savingCardSummary: item,\r\n })\r\n }}\r\n />\r\n )}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n \r\n {i18n.t('SavingCardsSummary.Header')}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(SavingCardsSummary)\r\n","import {Badge, Icon, ListItem, Text} from 'react-native-elements'\r\nimport React from 'react'\r\nimport {View} from 'react-native'\r\nimport {FormatDate, FormatDateTime} from '../../../../Helpers/DateHelpers'\r\nimport {FormatCurrency} from '../../../../Helpers/TextHelpers'\r\nimport {\r\n ITransactionSTO,\r\n IUserCouponSummarySTO,\r\n IUserSavingCardSTO,\r\n} from '../../../../Models/Server'\r\nimport Style, {colors, sizes} from '../../../../Style'\r\nimport i18n from '../../../../i18n'\r\nimport {navigate} from '../../../../Helpers/NavigationHelper'\r\ninterface IProps {\r\n userSavingCard: IUserSavingCardSTO\r\n}\r\n\r\nconst UserSavingCardRow: React.FC = ({userSavingCard}) => {\r\n const {noteText, badgeStyle} = Style\r\n\r\n const getIconAndText = () => {\r\n //is complete?\r\n if (userSavingCard.Processed !== null) {\r\n return (\r\n <>\r\n \r\n {i18n.t('Loyalty.Status.Completed')}\r\n \r\n )\r\n }\r\n\r\n const now = new Date(new Date().toISOString())\r\n const validFrom = userSavingCard.SavingCard.ValidFrom\r\n ? new Date(userSavingCard.SavingCard.ValidFrom)\r\n : null\r\n const validTill = userSavingCard.SavingCard.ValidTill\r\n ? new Date(userSavingCard.SavingCard.ValidTill)\r\n : null\r\n if (validFrom === null || (validFrom && validFrom < now)) {\r\n if (validTill === null || (validTill && validTill > now)) {\r\n return (\r\n <>\r\n \r\n {i18n.t('Loyalty.Status.Active')}\r\n \r\n )\r\n }\r\n\r\n if (validTill && validTill < now) {\r\n return (\r\n <>\r\n \r\n {i18n.t('Loyalty.Status.Expired')}\r\n \r\n )\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {i18n.t('Loyalty.Status.NotActive')}\r\n \r\n )\r\n }\r\n\r\n /*\r\n const renderRedeemedRow = () => {\r\n if (userCouponSummary.Redeemed === null) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n \r\n {i18n.t('Common.Redeemed')}\r\n \r\n {FormatDateTime(userCouponSummary.Redeemed as string)}\r\n \r\n \r\n \r\n {i18n.t('Common.Location')}\r\n {userCouponSummary.RedeemedLocation}\r\n \r\n \r\n )\r\n }\r\n*/\r\n return (\r\n \r\n navigate('savingCardDetails', {\r\n userSavingCardGuid: userSavingCard.UserSavingCardGuid,\r\n })\r\n }>\r\n \r\n \r\n \r\n {i18n.t('Common.Received')}\r\n \r\n {FormatDate(userSavingCard.Created as string)}\r\n \r\n \r\n \r\n {i18n.t('Common.Status')}\r\n {getIconAndText()}\r\n \r\n \r\n \r\n {i18n.t('Common.Stamps')}\r\n \r\n \r\n \r\n\r\n \r\n \r\n )\r\n}\r\n\r\nexport default UserSavingCardRow\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {IUserCouponSummarySTO, IUserSavingCardSTO} from '../../../Models/Server'\r\nimport CouponController from '../../../Services/Topr.Core/CouponController'\r\nimport SavingcardController from '../../../Services/Topr.Core/SavingcardController'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public SavingCardGuid = ''\r\n public UserSavingCards: IUserSavingCardSTO[] = []\r\n private Skip = 0\r\n public Take = 20\r\n public HasMore = true\r\n public HasMoreLoading = false\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize(savingCardGuid: string) {\r\n this.IsLoading = true\r\n this.SavingCardGuid = savingCardGuid\r\n this.GetUserSavingCards(true)\r\n }\r\n\r\n private GetUserSavingCards(reload: boolean) {\r\n this.HasMoreLoading = true\r\n\r\n if (reload) {\r\n this.Skip = 0\r\n }\r\n\r\n SavingcardController.GetUserSavingCards(\r\n this.SavingCardGuid,\r\n this.Skip,\r\n this.Take,\r\n )\r\n .then((userSavingCards) => {\r\n runInAction(() => {\r\n if (reload) {\r\n this.UserSavingCards = userSavingCards\r\n } else {\r\n this.UserSavingCards.push(...userSavingCards)\r\n }\r\n this.IsLoading = false\r\n this.HasMoreLoading = false\r\n this.HasMore = userSavingCards.length === this.Take\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n }\r\n\r\n public NextPage() {\r\n if (!this.HasMoreLoading && this.HasMore) {\r\n this.Skip += this.Take\r\n console.log('nextPage', this.Skip)\r\n this.GetUserSavingCards(false)\r\n }\r\n }\r\n}\r\nexport const userSavingCardsSummaryStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport I18n from 'i18n-js'\r\nimport {Observer, observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {FlatList, View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n ImageCard,\r\n ImageHeader,\r\n SubmitHeader,\r\n ToprLoader,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetFileUrl, GetRandomKey} from '../../../Helpers/UiHelpers'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\nimport UserSavingCardRow from './Components/UserSavingCardRow'\r\nimport {userSavingCardsSummaryStore} from './Store'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst UserSavingCardsSummary: React.FC = ({\r\n navigation: {goBack},\r\n route,\r\n}) => {\r\n const {IsLoading, UserSavingCards, HasMoreLoading} =\r\n userSavingCardsSummaryStore\r\n const savingCardSummary = route.params.savingCardSummary\r\n useEffect(() => {\r\n myLog.warn('CouponsSummary')\r\n userSavingCardsSummaryStore.Initialize(\r\n savingCardSummary.SavingCard.SavingCardGuid,\r\n )\r\n }, [null])\r\n\r\n const {defaultFlatListWhite, flatListContentStyleStock, flatListLoader} =\r\n Style\r\n\r\n const renderFooter = () => {\r\n if (!HasMoreLoading || IsLoading) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n }\r\n contentContainerStyle={[flatListContentStyleStock]}\r\n refreshing={HasMoreLoading}\r\n onEndReached={() => userSavingCardsSummaryStore.NextPage()}\r\n onEndReachedThreshold={0.5}\r\n initialNumToRender={userSavingCardsSummaryStore.Take}\r\n data={UserSavingCards}\r\n ListFooterComponent={() => {\r\n return {() => renderFooter()}\r\n }}\r\n onRefresh={() =>\r\n userSavingCardsSummaryStore.Initialize(\r\n savingCardSummary.SavingCard.SavingCardGuid,\r\n )\r\n }\r\n renderItem={({item}) => (\r\n \r\n )}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n \r\n {savingCardSummary.SavingCard.Title}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(UserSavingCardsSummary)\r\n","import {makeAutoObservable, runInAction, toJS} from 'mobx'\r\nimport {Linking, Platform} from 'react-native'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {CreateAppLinkUrl} from '../../../Helpers/UrlHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store.web'\r\nimport {IAlertMessage, ToprError} from '../../../Models/Client'\r\nimport {AppLinkTypes} from '../../../Models/Client/Enums'\r\nimport {\r\n AutomaticChargeStatusTypesDTO,\r\n IAutomaticChargeSTO,\r\n ICreateAutomaticChargeRequest,\r\n ICurrencyChargeMethodSTO,\r\n IDebtorBank,\r\n IEditAutomaticChargeStepsRequest,\r\n IWalletSTO,\r\n} from '../../../Models/Server'\r\nimport {PaymentMethodTypes} from '../../../Models/Server/Wallet/ICurrencyChargeMethodSTO'\r\nimport AutomaticChargeController from '../../../Services/Topr.Core/AutomaticChargeController'\r\nimport CurrencyController from '../../../Services/Topr.Core/CurrencyController'\r\nimport WalletController from '../../../Services/Topr.Core/WalletController'\r\n\r\nexport type ChargeFormData = {\r\n selectedBank: string //also a separate prop\r\n initials: string\r\n surname: string\r\n email: string\r\n phone: string\r\n street: string\r\n streetNumber: string\r\n zipcode: string\r\n city: string\r\n amount: number // in euro, not cents also a separate prop\r\n weekAmount: number\r\n}\r\n\r\nexport enum FormModes {\r\n ShowStatus, //(AutomaticChargeStatusTypesDTO.Off)\r\n NewAutomaticCharge,\r\n EditSteps, //when enabled\r\n}\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public Wallet?: IWalletSTO = undefined\r\n public IsSubmitting = false\r\n private CurrencyGuid = ''\r\n public AutomaticCharePaymentMethod?: ICurrencyChargeMethodSTO = undefined\r\n\r\n public Banks: IDebtorBank[] = []\r\n public SelectedBank?: IDebtorBank = undefined\r\n public Amount = 0\r\n\r\n public get DefaultValues(): ChargeFormData {\r\n if (AppConfig.IsDebugMode) {\r\n return {\r\n selectedBank: '',\r\n initials: 'E.R.',\r\n surname: 'de Ruijter',\r\n email: 'superdopey@live.nl',\r\n phone: '0612345678',\r\n street: 'Reigerstraat',\r\n streetNumber: '56',\r\n zipcode: '3265CD',\r\n city: 'Piershil',\r\n amount: 10,\r\n weekAmount: 1,\r\n }\r\n }\r\n\r\n // live\r\n return {\r\n selectedBank: '',\r\n initials: '',\r\n surname: '',\r\n email:\r\n dashboardStore.User !== undefined\r\n ? dashboardStore.User.EmailAddress\r\n : '',\r\n phone: '',\r\n street: '',\r\n streetNumber: '',\r\n zipcode: '',\r\n city: '',\r\n amount: 10,\r\n weekAmount: 1,\r\n }\r\n }\r\n\r\n public Status: AutomaticChargeStatusTypesDTO =\r\n AutomaticChargeStatusTypesDTO.Off\r\n\r\n public get AutomaticChargeStatusEnabled() {\r\n return (\r\n this.Status === AutomaticChargeStatusTypesDTO.EnabledWithVerification ||\r\n this.Status === AutomaticChargeStatusTypesDTO.EnabledWithoutVerification\r\n )\r\n }\r\n\r\n public FormMode: FormModes = FormModes.ShowStatus\r\n public PreviousAutomaticCharge?: IAutomaticChargeSTO = undefined\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize(currencyGuid: string) {\r\n this.CurrencyGuid = currencyGuid\r\n this.IsLoading = true\r\n this.Wallet = undefined\r\n this.AutomaticCharePaymentMethod = undefined\r\n\r\n this.SelectedBank = undefined\r\n this.PreviousAutomaticCharge = undefined\r\n\r\n this.FormMode = FormModes.ShowStatus\r\n\r\n DoServiceCall(() => {\r\n Promise.all([\r\n WalletController.GetWallet(currencyGuid),\r\n CurrencyController.GetPaymentMethod(\r\n currencyGuid,\r\n PaymentMethodTypes.AutomaticChargeCollection,\r\n ),\r\n AutomaticChargeController.GetBanks(currencyGuid),\r\n AutomaticChargeController.Latest(currencyGuid),\r\n ])\r\n .then(([wallet, paymentMethod, banks, automaticCharge]) => {\r\n runInAction(() => {\r\n this.Wallet = wallet\r\n\r\n this.AutomaticCharePaymentMethod = paymentMethod\r\n this.Amount = wallet.Currency.AutomaticChargeStepAmount\r\n this.Banks = banks\r\n\r\n this.InitializeAutomaticCharge(automaticCharge)\r\n })\r\n })\r\n .catch((error: ToprError) => {\r\n runInAction(() => {\r\n appUiStore.ShowToast({\r\n message: i18n.t('AutomaticCharge.LoadingFailed'),\r\n type: 'warning',\r\n })\r\n goBack()\r\n })\r\n })\r\n .finally(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n })\r\n }\r\n\r\n public SetFormMode(formMode: FormModes) {\r\n this.FormMode = formMode\r\n }\r\n private InitializeAutomaticCharge(\r\n automaticCharge: IAutomaticChargeSTO | null,\r\n ) {\r\n runInAction(() => {\r\n //console.log('InitializeAutomaticCharge', automaticCharge, '-')\r\n if (\r\n automaticCharge === null ||\r\n automaticCharge === undefined ||\r\n automaticCharge.toString() === ''\r\n ) {\r\n //no ac set yet\r\n this.Status = AutomaticChargeStatusTypesDTO.Off\r\n return\r\n }\r\n\r\n this.PreviousAutomaticCharge = automaticCharge\r\n\r\n //is set\r\n this.Status = automaticCharge.AutomaticChargeStatusId\r\n\r\n this.DefaultValues.initials = automaticCharge.Initials\r\n this.DefaultValues.selectedBank = automaticCharge.Bic\r\n\r\n this.DefaultValues.surname = automaticCharge.LastName\r\n this.DefaultValues.email = automaticCharge.EmailAddress\r\n this.DefaultValues.phone = automaticCharge.PhoneNumber\r\n this.DefaultValues.street = automaticCharge.StreetName\r\n this.DefaultValues.streetNumber = automaticCharge.StreetNumber\r\n this.DefaultValues.zipcode = automaticCharge.Zipcode\r\n this.DefaultValues.city = automaticCharge.City\r\n this.DefaultValues.amount = automaticCharge.StepAmount / 100\r\n this.DefaultValues.weekAmount = automaticCharge.StepLimit\r\n this.SelectedBank = this.Banks.find(\r\n (x) => x.DebtorBankId === automaticCharge.Bic,\r\n )\r\n })\r\n }\r\n\r\n public SetAmount(amount: number) {\r\n this.Amount = amount\r\n }\r\n\r\n public SetSelectedBank(selectedBank: IDebtorBank) {\r\n this.SelectedBank = selectedBank\r\n }\r\n\r\n private FormData2ICreateAutomaticChargeRequest(\r\n data: ChargeFormData,\r\n ): ICreateAutomaticChargeRequest {\r\n return {\r\n Initials: data.initials,\r\n DebtorBankId:\r\n this.SelectedBank !== undefined ? this.SelectedBank.DebtorBankId : '',\r\n City: data.city,\r\n CurrencyGuid: this.CurrencyGuid,\r\n EmailAddress: data.email,\r\n LastName: data.surname,\r\n PhoneNumber: data.phone,\r\n StepAmount: data.amount,\r\n StepLimit: data.weekAmount,\r\n StreetName: data.street,\r\n StreetNumber: data.streetNumber,\r\n Zipcode: data.zipcode,\r\n ReturnUrl: CreateAppLinkUrl(\r\n AppLinkTypes.EMandateResult,\r\n this.CurrencyGuid,\r\n ),\r\n }\r\n }\r\n\r\n public SaveAutomaticCharge(\r\n data: ChargeFormData,\r\n onError: (errorMessage: string) => void,\r\n ) {\r\n switch (this.FormMode) {\r\n case FormModes.NewAutomaticCharge:\r\n //case FormModes.EditAutomaticChargeFull:\r\n this.CreateAutomaticCharge(data, onError)\r\n break\r\n case FormModes.EditSteps:\r\n this.EditSteps(data, onError)\r\n break\r\n }\r\n\r\n //todo: turn off\r\n\r\n // if (this.PreviousAutomaticCharge === undefined) {\r\n // if (this.IsEnabled) {\r\n // //console.log('create new ac')\r\n // this.CreateAutomaticCharge(data, onError)\r\n // }\r\n // } else {\r\n // //PreviousAutomaticCharge edit or turn off\r\n\r\n // if (this.IsEnabled) {\r\n // //edit\r\n // //console.log('edit ac')\r\n // this.EditAutomaticCharge(data, onError)\r\n // } else {\r\n // //console.log('turnoff ac')\r\n // this.TurnOff(onError)\r\n // }\r\n // }\r\n }\r\n\r\n public TurnOff(onError: (errorMessage: string) => void) {\r\n this.IsSubmitting = true\r\n AutomaticChargeController.TurnOff(this.CurrencyGuid)\r\n .then(() => {\r\n appUiStore.ShowAlert({\r\n type: 'warning',\r\n message: i18n.t('AutomaticCharge.Form.TurnOffMessage.Message'),\r\n title: i18n.t('AutomaticCharge.Form.TurnOffMessage.Title'),\r\n })\r\n goBack()\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, onError)\r\n })\r\n .finally(() =>\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n }),\r\n )\r\n }\r\n\r\n private CreateAutomaticCharge(\r\n data: ChargeFormData,\r\n onError: (errorMessage: string) => void,\r\n ) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n\r\n console.log('CreateAutomaticCharge - 0')\r\n\r\n AutomaticChargeController.Insert(\r\n this.FormData2ICreateAutomaticChargeRequest(data),\r\n )\r\n .then((issuerUrl) => {\r\n //console.log('insert succes', issuerUrl, Platform.OS)\r\n console.log('CreateAutomaticCharge - 1', issuerUrl, Platform.OS)\r\n if (Platform.OS === 'web') {\r\n window.location.href = issuerUrl\r\n } else {\r\n Linking.openURL(issuerUrl)\r\n goBack()\r\n }\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, onError)\r\n })\r\n .finally(() =>\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n }),\r\n )\r\n })\r\n }\r\n\r\n private EditSteps(\r\n data: ChargeFormData,\r\n onError: (errorMessage: string) => void,\r\n ) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n\r\n const request: IEditAutomaticChargeStepsRequest = {\r\n StepAmount: data.amount,\r\n StepLimit: data.weekAmount,\r\n }\r\n\r\n AutomaticChargeController.EditSteps(this.CurrencyGuid, request)\r\n .then(() => {\r\n goBack()\r\n\r\n appUiStore.ShowAlert({\r\n type: 'warning',\r\n message: i18n.t('AutomaticCharge.Form.EditMessage.Message'),\r\n title: i18n.t('AutomaticCharge.Form.EditMessage.Title'),\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, onError)\r\n })\r\n .finally(() =>\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n }),\r\n )\r\n })\r\n }\r\n}\r\nexport const automaticChargeStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {Image, View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n EuroTextInput,\r\n FormInfo,\r\n MySelectList,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {\r\n FormatCentsToEuro,\r\n GetWalletPagetitle,\r\n} from '../../../Helpers/TextHelpers'\r\nimport {GetFileUrl} from '../../../Helpers/UiHelpers'\r\nimport I18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {\r\n AppLinkTypes,\r\n PaymentOrderStatusTypes,\r\n} from '../../../Models/Client/Enums'\r\nimport {ICurrencyChargeMethodSTO} from '../../../Models/Server'\r\nimport {getPaymentMethodTransactionCosts} from '../../../Models/Server/Wallet/ICurrencyChargeMethodSTO'\r\n\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style, {colors} from '../../../Style'\r\nimport {ChargeFormData, HbChargeValue, chargeStore} from './Store'\r\nimport {CreateAppLinkUrl} from '../../../Helpers/UrlHelpers'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Charge: React.FC = ({\r\n navigation: {goBack, setOptions},\r\n route,\r\n}) => {\r\n const wallet = route.params.wallet\r\n const initialAmount = route.params.initialAmount\r\n const {noteText, flexRow, pickerItemImage} = Style\r\n useEffect(() => {\r\n console.log('Charge', wallet.Currency.CurrencyGuid)\r\n\r\n chargeStore.Initialize(\r\n wallet.Currency.CurrencyGuid,\r\n route.params.chargeSuccessReturn,\r\n )\r\n }, [wallet])\r\n\r\n useEffect(() => {\r\n if (wallet) {\r\n setOptions({\r\n title: GetWalletPagetitle(\r\n I18n.t('Charge.Form.Action'),\r\n wallet.Currency.Name,\r\n ),\r\n })\r\n }\r\n }, [wallet])\r\n\r\n const {control, handleSubmit, errors, setError} = useForm({\r\n mode: 'onChange',\r\n defaultValues: {\r\n amount: initialAmount,\r\n },\r\n })\r\n const {\r\n IsSubmitting,\r\n SelectedChargeMethod,\r\n ChargeMethods,\r\n IsChargeMethodsLoading,\r\n HBChargeValues,\r\n SelectedHBChargeValue,\r\n } = chargeStore\r\n\r\n const onSubmit = (data: ChargeFormData) => {\r\n // const amount =\r\n // wallet.Currency.Code === 'HBC'\r\n // ? SelectedHBChargeValue?.Text\r\n // : FormatCentsToEuro(data.amount)\r\n const amount = FormatCentsToEuro(data.amount)\r\n if (SelectedChargeMethod) {\r\n appUiStore.ShowAuthenticateConfirm({\r\n OnOk: () => {\r\n chargeStore.Topup(\r\n SelectedChargeMethod.Guid,\r\n // wallet.Currency.Code === 'HBC'\r\n // ? SelectedHBChargeValue?.Amount * 300\r\n // : data.amount,\r\n data.amount,\r\n (errorMessage: string) => {\r\n appUiStore.ShowAlert({\r\n title: 'Error',\r\n message: errorMessage,\r\n })\r\n\r\n // setError('amount', {\r\n // type: 'manual',\r\n // message: errorMessage,\r\n // })\r\n },\r\n )\r\n },\r\n Message: I18n.t('Charge.Form.AuthenticateAction', {\r\n amount,\r\n }),\r\n })\r\n }\r\n }\r\n\r\n const maxChargeAmount =\r\n wallet.Currency.MaxBalance !== null\r\n ? wallet.Currency.MaxBalance - wallet.Balance\r\n : null\r\n\r\n const renderMaxBalanceMessage = () => {\r\n if (maxChargeAmount) {\r\n return (\r\n \r\n {I18n.t('Charge.MaxBalance0')}\r\n \r\n {FormatCentsToEuro(maxChargeAmount)}\r\n \r\n {I18n.t('Charge.MaxBalance1')}\r\n \r\n )\r\n }\r\n\r\n return null\r\n }\r\n\r\n const renderSubmit = () => {\r\n if (IsChargeMethodsLoading || SelectedChargeMethod === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n )\r\n }\r\n\r\n const renderTransactionCosts = () => {\r\n const {SelectedChargeMethod} = chargeStore\r\n if (SelectedChargeMethod === undefined) {\r\n return null\r\n }\r\n\r\n const calculatedTransactionCosts =\r\n getPaymentMethodTransactionCosts(SelectedChargeMethod)\r\n\r\n if (calculatedTransactionCosts === 0) {\r\n return null\r\n }\r\n\r\n const renderCostMessage = (transactionCosts: number) => {\r\n return (\r\n \r\n {I18n.t('Charge.Form.ChargeCostsMessage')}\r\n \r\n {FormatCentsToEuro(transactionCosts)}\r\n \r\n \r\n )\r\n }\r\n\r\n if (SelectedChargeMethod.TransactionCostsFixed > 0) {\r\n return renderCostMessage(calculatedTransactionCosts)\r\n }\r\n\r\n if (SelectedChargeMethod.TransactionCostsPercentage > 0) {\r\n if (calculatedTransactionCosts > 0) {\r\n return renderCostMessage(calculatedTransactionCosts)\r\n }\r\n }\r\n }\r\n\r\n const max =\r\n maxChargeAmount === null\r\n ? undefined\r\n : {\r\n value: maxChargeAmount,\r\n message: I18n.t('Charge.Form.Fields.Amount.Errors.Max', {\r\n max: FormatCentsToEuro(maxChargeAmount),\r\n }),\r\n }\r\n\r\n const renderAmountInput = () => {\r\n //other\r\n\r\n // if (wallet.Currency.Code === 'HBC') {\r\n // return (\r\n // <>\r\n // \r\n // chargeStore.SetSelectedHBChargeValue(option)\r\n // }\r\n // isItemSelected={(a: HbChargeValue, b: HbChargeValue) => {\r\n // return a?.Amount === b?.Amount\r\n // }}\r\n // renderListItem={(item: HbChargeValue, isHighLighted: boolean) => {\r\n // return (\r\n // \r\n // \r\n // \r\n // {item.Text}\r\n // \r\n // \r\n // \r\n // )\r\n // }}\r\n // />\r\n // \r\n // )\r\n // }\r\n\r\n return (\r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: I18n.t('Charge.Form.Fields.Amount.Errors.Required'),\r\n min: {\r\n value: 100,\r\n message: I18n.t('Charge.Form.Fields.Amount.Errors.Min', {\r\n min: FormatCentsToEuro(100),\r\n }),\r\n },\r\n max,\r\n },\r\n }}\r\n />\r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {renderMaxBalanceMessage()}\r\n \r\n chargeStore.SetSelectedChargeMethod(option)\r\n }\r\n isItemSelected={(\r\n a: ICurrencyChargeMethodSTO,\r\n b: ICurrencyChargeMethodSTO,\r\n ) => {\r\n return a.Guid === b.Guid\r\n }}\r\n renderListItem={(\r\n chargeMethod: ICurrencyChargeMethodSTO,\r\n isHighLighted: boolean,\r\n ) => {\r\n return (\r\n \r\n \r\n \r\n \r\n {chargeMethod.Name}\r\n \r\n \r\n \r\n )\r\n }}\r\n />\r\n {renderAmountInput()}\r\n {renderTransactionCosts()}\r\n \r\n \r\n {wallet.Currency.Name}\r\n {renderSubmit()}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(Charge)\r\n","import {persistedStore} from '../Mobx'\r\nimport {dashboardStore} from '../Screens/Dashboard/Dashboard/Store'\r\n\r\nexport const IsChildUserActive = () => {\r\n const {User} = dashboardStore\r\n const {MainUser} = persistedStore\r\n const isChildUserSelected = MainUser?.MainUserGuid !== User?.MainUserGuid\r\n return isChildUserSelected\r\n}\r\n","import {makeAutoObservable, runInAction, toJS} from 'mobx'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {FormatCurrency} from '../../../Helpers/TextHelpers'\r\nimport {IsChildUserActive} from '../../../Helpers/UserHelper'\r\nimport i18n from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {MyErrorMessage, ToprError} from '../../../Models/Client'\r\nimport {INameIdSTO, IUserSTO, IWalletSTO} from '../../../Models/Server'\r\nimport TransactionController from '../../../Services/Topr.Core/TransactionController'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport WalletController from '../../../Services/Topr.Core/WalletController'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport {walletDetailsStore} from '../Details/Store'\r\n\r\nexport type WalletFormData = {\r\n amount: number // cents\r\n description: string\r\n search: string\r\n}\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public IsSubmitting = false\r\n public IsSearching = false\r\n public SelectedTabIndex = 0\r\n public Description = ''\r\n\r\n //child users tab\r\n public OtherUsers: IUserSTO[] = []\r\n public SelectedOtherUser?: IUserSTO = undefined\r\n public Wallet?: IWalletSTO = undefined\r\n\r\n public CurrencyGuid?: string = undefined\r\n\r\n public FoundUser?: INameIdSTO = undefined\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize(currencyGuid: string) {\r\n this.IsLoading = true\r\n this.SelectedOtherUser = undefined\r\n this.FoundUser = undefined\r\n this.SelectedTabIndex = 0\r\n this.Description = ''\r\n this.CurrencyGuid = currencyGuid\r\n this.Wallet = undefined\r\n this.GetWallet(currencyGuid)\r\n\r\n this.OtherUsers = []\r\n this.GetOtherUsers()\r\n }\r\n\r\n public GetWallet(currencyGuid: string) {\r\n this.IsLoading = true\r\n\r\n WalletController.GetWallet(currencyGuid)\r\n .then((wallet) => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n this.Wallet = wallet\r\n })\r\n })\r\n .catch(() => {\r\n runInAction(() => {\r\n this.IsLoading = false\r\n })\r\n })\r\n }\r\n\r\n public SetSelectedTabIndex(index: number) {\r\n this.SelectedTabIndex = index\r\n }\r\n\r\n public SetDescription(description: string) {\r\n this.Description = description\r\n }\r\n\r\n private GetOtherUsers() {\r\n const {ChildUsers, MainUser} = persistedStore\r\n\r\n console.log(\r\n //ChildUsers.map((x) => x.Name),\r\n IsChildUserActive(),\r\n )\r\n\r\n if (ChildUsers.length > 0) {\r\n if (IsChildUserActive()) {\r\n const {User} = dashboardStore //active (child)user\r\n this.OtherUsers.push(MainUser as IUserSTO) //add parent\r\n this.OtherUsers.push(\r\n ...ChildUsers.filter((x) => x.MainUserGuid !== User?.MainUserGuid),\r\n )\r\n } else {\r\n this.OtherUsers.push(...ChildUsers)\r\n }\r\n\r\n this.SelectedOtherUser = this.OtherUsers[0]\r\n }\r\n }\r\n\r\n public ConfirmSubmit(amount: number) {\r\n const id =\r\n this.FoundUser != undefined\r\n ? this.FoundUser.Id\r\n : this.SelectedOtherUser?.MainUserGuid\r\n const name =\r\n this.FoundUser != undefined\r\n ? this.FoundUser.Name\r\n : this.SelectedOtherUser?.Name\r\n\r\n appUiStore.ShowAuthenticateConfirm({\r\n OnOk: () => sendMoneyStore.SendMoney(id!, amount, this.Description),\r\n Message: i18n.t('SendMoney.Form.AuthenticateAction', {\r\n amount: FormatCurrency(amount, this.Wallet?.Currency),\r\n name,\r\n }),\r\n })\r\n }\r\n\r\n public SendMoney(toUserGuid: string, amount: number, description: String) {\r\n this.IsSubmitting = true\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n TransactionController.SendMoney(\r\n this.Wallet?.Currency.CurrencyGuid,\r\n amount,\r\n toUserGuid,\r\n description,\r\n )\r\n .then((response) => {\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n if (this.Wallet) {\r\n const name =\r\n this.FoundUser === undefined\r\n ? this.SelectedOtherUser?.Name\r\n : this.FoundUser.Name\r\n walletDetailsStore.Initialize(this.Wallet.Currency.CurrencyGuid)\r\n dashboardStore.GetWallets()\r\n\r\n appUiStore.ShowAlert({\r\n type: 'success',\r\n message: i18n.t('SendMoney.Form.Success.Message', {\r\n amount: FormatCurrency(amount, this.Wallet?.Currency),\r\n name,\r\n }),\r\n title: i18n.t('SendMoney.Form.Success.Title'),\r\n additionalCloseAction: () => goBack(),\r\n })\r\n }\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(\r\n toprError,\r\n (errorMessage: string) => {\r\n //\r\n appUiStore.ShowAlert({\r\n type: 'error',\r\n message: errorMessage,\r\n title: i18n.t('SendMoney.Form.ServerErrors.Title'),\r\n })\r\n },\r\n [\r\n new MyErrorMessage(\r\n 'CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED',\r\n 'SendMoney.Form.ServerErrors.Title',\r\n 'SendMoney.Form.ServerErrors.CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED',\r\n ),\r\n new MyErrorMessage(\r\n 'LOYALTYWALLET_SENDMONEY_SAME_USER',\r\n 'SendMoney.Form.ServerErrors.Title',\r\n 'SendMoney.Form.ServerErrors.LOYALTYWALLET_SENDMONEY_SAME_USER',\r\n ),\r\n ],\r\n )\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n }\r\n\r\n public SearchUser(search: string, onError: (errorMessage: string) => void) {\r\n this.IsSubmitting = true\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n UserController.Search(search)\r\n .then((user) => {\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n this.FoundUser = user\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, onError, [\r\n new MyErrorMessage(\r\n 'USER_NOT_FOUND',\r\n 'SendMoney.Form.ServerErrors.Title',\r\n 'SendMoney.Form.ServerErrors.USER_NOT_FOUND',\r\n //null,\r\n //'warning'\r\n ),\r\n ])\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n }\r\n\r\n public SetSelectedOtherUser(user: IUserSTO) {\r\n this.SelectedOtherUser = user\r\n }\r\n\r\n public ClearFoundUser() {\r\n this.FoundUser = undefined\r\n }\r\n}\r\n\r\nexport const sendMoneyStore = new Store()\r\n","import {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {Text} from 'react-native-elements'\r\nimport {\r\n Content,\r\n EuroTextInput,\r\n FormInfo,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n MyLabelValue,\r\n} from '../../../../Components'\r\nimport AppConfig from '../../../../Config/AppConfig'\r\nimport {FormatCentsToEuro} from '../../../../Helpers/TextHelpers'\r\nimport I18n from '../../../../i18n'\r\nimport i18n from '../../../../i18n/index'\r\nimport {IWalletSTO} from '../../../../Models/Server'\r\nimport Style from '../../../../Style'\r\nimport {sendMoneyStore, WalletFormData} from '../Store'\r\n\r\ninterface IProps {\r\n wallet: IWalletSTO\r\n}\r\n\r\nconst SearchTab: React.FC = ({wallet}) => {\r\n const {highlightText} = Style\r\n\r\n const {control, handleSubmit, errors, setError, setValue, formState} =\r\n useForm()\r\n\r\n useEffect(() => {\r\n //\r\n if (AppConfig.IsDebugMode) {\r\n setValue('search', 'superdopey@live.nl')\r\n }\r\n\r\n return () => {\r\n sendMoneyStore.ClearFoundUser()\r\n }\r\n }, [null])\r\n\r\n const {FoundUser, IsSubmitting} = sendMoneyStore\r\n const onSubmit = (data: WalletFormData) => {\r\n //after confirm show the authenticate modal\r\n\r\n if (FoundUser === undefined) {\r\n sendMoneyStore.SearchUser(data.search, (errorMessage) => {\r\n setError('search', {\r\n type: 'manual',\r\n message: errorMessage,\r\n })\r\n })\r\n } else {\r\n sendMoneyStore.ConfirmSubmit(data.amount)\r\n }\r\n }\r\n\r\n const renderMaxSendMessage = () => {\r\n return (\r\n \r\n {I18n.t('SendMoney.MaxBalance0')}\r\n {FormatCentsToEuro(wallet.Balance)}\r\n {I18n.t('SendMoney.MaxBalance1')}\r\n \r\n )\r\n }\r\n\r\n const renderSearchForm = () => {\r\n if (FoundUser !== undefined) {\r\n return null\r\n }\r\n return (\r\n <>\r\n {renderMaxSendMessage()}\r\n handleSubmit((data) => onSubmit(data))(),\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const renderSendMoneyForm = () => {\r\n if (FoundUser === undefined) {\r\n return null\r\n }\r\n return (\r\n <>\r\n {renderMaxSendMessage()}\r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: I18n.t('SendMoney.Form.Fields.Amount.Errors.Required'),\r\n min: {\r\n value: 1,\r\n message: I18n.t('SendMoney.Form.Fields.Amount.Errors.MinMax', {\r\n min: FormatCentsToEuro(1),\r\n max: FormatCentsToEuro(wallet.Balance),\r\n }),\r\n },\r\n max: {\r\n value: wallet.Balance,\r\n message: I18n.t('SendMoney.Form.Fields.Amount.Errors.MinMax', {\r\n min: FormatCentsToEuro(100),\r\n max: FormatCentsToEuro(wallet.Balance),\r\n }),\r\n },\r\n },\r\n }}\r\n />\r\n sendMoneyStore.SetDescription(text)}\r\n inputProps={{\r\n autoCapitalize: 'none',\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n {renderSearchForm()}\r\n {renderSendMoneyForm()}\r\n \r\n )\r\n}\r\n\r\nexport default observer(SearchTab)\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {Text} from 'react-native'\r\nimport {SubmitHeader, SubmitHeaderButton} from '../../../../Components'\r\nimport {goBack} from '../../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../../i18n'\r\nimport {sendMoneyStore} from '../Store'\r\n\r\ninterface IProps {\r\n currencyName: string\r\n}\r\n\r\nconst SendMoneyHeader: React.FC = ({currencyName}) => {\r\n const {SelectedTabIndex, IsSubmitting, FoundUser} = sendMoneyStore\r\n\r\n const backAction = () => {\r\n if (SelectedTabIndex === 1 && FoundUser !== undefined) {\r\n sendMoneyStore.ClearFoundUser()\r\n return\r\n }\r\n\r\n goBack()\r\n return\r\n }\r\n\r\n // const renderSubmitButton = () => {\r\n // //TODO:fix\r\n // if (SelectedTabIndex === 0 || FoundUser !== undefined) {\r\n // return (\r\n // sendMoneyStore.ConfirmSubmit(-1)}\r\n // title={i18n.t('SendMoney.Form.Action')}\r\n // />\r\n // )\r\n // }\r\n\r\n // return null\r\n // }\r\n\r\n return (\r\n \r\n {currencyName}\r\n {/* {renderSubmitButton()} */}\r\n \r\n )\r\n}\r\n\r\nexport default observer(SendMoneyHeader)\r\n","import I18n from 'i18n-js'\r\nimport {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {Text, View} from 'react-native'\r\nimport {\r\n Content,\r\n EuroTextInput,\r\n FormInfo,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n MySelectList,\r\n} from '../../../../Components'\r\n\r\nimport {FormatCentsToEuro} from '../../../../Helpers/TextHelpers'\r\nimport i18n from '../../../../i18n'\r\nimport {IUserSTO, IWalletSTO} from '../../../../Models/Server'\r\nimport Style, {colors} from '../../../../Style'\r\nimport {sendMoneyStore, WalletFormData} from '../Store'\r\n\r\ninterface IProps {\r\n wallet: IWalletSTO\r\n}\r\n\r\nconst WalletTab: React.FC = ({wallet}) => {\r\n const {flexRow, highlightText} = Style\r\n\r\n const {control, handleSubmit, errors, setError} = useForm()\r\n const {OtherUsers, SelectedOtherUser, IsSubmitting} = sendMoneyStore\r\n const onSubmit = (data: WalletFormData) => {\r\n //after confirm show the authenticate modal\r\n if (SelectedOtherUser === undefined) {\r\n setError('amount', {\r\n type: 'manual',\r\n message: i18n.t('SendMoney.Form.Fields.OtherWallet.Error'),\r\n })\r\n\r\n return\r\n }\r\n sendMoneyStore.ConfirmSubmit(data.amount)\r\n }\r\n\r\n const renderMaxSendMessage = () => {\r\n return (\r\n \r\n {i18n.t('SendMoney.MaxBalance0')}\r\n {FormatCentsToEuro(wallet.Balance)}\r\n {i18n.t('SendMoney.MaxBalance1')}\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {renderMaxSendMessage()}\r\n \r\n sendMoneyStore.SetSelectedOtherUser(option)\r\n }\r\n isItemSelected={(a: IUserSTO, b: IUserSTO) => {\r\n return a.MainUserGuid === b.MainUserGuid\r\n }}\r\n renderListItem={(user: IUserSTO, isHighLighted: boolean) => {\r\n return (\r\n \r\n \r\n {user.Name}\r\n \r\n \r\n )\r\n }}>\r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t('SendMoney.Form.Fields.Amount.Errors.Required'),\r\n min: {\r\n value: 1,\r\n message: i18n.t('SendMoney.Form.Fields.Amount.Errors.MinMax', {\r\n min: FormatCentsToEuro(1),\r\n max: FormatCentsToEuro(wallet.Balance),\r\n }),\r\n },\r\n max: {\r\n value: wallet.Balance,\r\n message: i18n.t('SendMoney.Form.Fields.Amount.Errors.MinMax', {\r\n min: FormatCentsToEuro(100),\r\n max: FormatCentsToEuro(wallet.Balance),\r\n }),\r\n },\r\n },\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(WalletTab)\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {Container, Content} from '../../../../Components'\r\nimport {MyTab, StockImageLayout} from '../../../../Components/Web'\r\nimport i18n from '../../../../i18n'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {IWalletSTO} from '../../../../Models/Server'\r\nimport {sendMoneyStore} from '../Store'\r\nimport SearchTab from './SearchTab'\r\nimport SendMoneyHeader from './SendMoneyHeader'\r\nimport WalletTab from './WalletTab'\r\n\r\ninterface IProps {\r\n wallet: IWalletSTO\r\n}\r\n\r\nconst SendMoneyTabs: React.FC = ({wallet}) => {\r\n //const [index, setIndex] = React.useState(0)\r\n const {SelectedTabIndex} = sendMoneyStore\r\n\r\n const renderTabViews = () => {\r\n if (SelectedTabIndex === 1) {\r\n return \r\n }\r\n\r\n return \r\n }\r\n\r\n return (\r\n <>\r\n \r\n {\r\n sendMoneyStore.SetSelectedTabIndex(index)\r\n }}\r\n />\r\n {renderTabViews()}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(SendMoneyTabs)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {Text} from 'react-native'\r\nimport {Container, Content} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetWalletPagetitle} from '../../../Helpers/TextHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx/PersistedStore'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport SearchTab from './Components/SearchTab'\r\nimport SendMoneyHeader from './Components/SendMoneyHeader'\r\nimport SendMoneyTabs from './Components/SendMoneyTabs'\r\nimport {sendMoneyStore} from './Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst SendMoney: React.FC = ({navigation: {setOptions}, route}) => {\r\n const currencyGuid = route.params.currencyGuid\r\n useEffect(() => {\r\n myLog.warn('SendMoney')\r\n sendMoneyStore.Initialize(currencyGuid)\r\n }, [null])\r\n\r\n const {ChildUsers} = persistedStore\r\n const {Wallet} = sendMoneyStore\r\n\r\n useEffect(() => {\r\n if (Wallet) {\r\n setOptions({\r\n title: GetWalletPagetitle(\r\n i18n.t('SendMoney.Form.Action'),\r\n Wallet.Currency.Name,\r\n ),\r\n })\r\n }\r\n }, [Wallet])\r\n\r\n const renderTabsOrOnlySearch = () => {\r\n if (Wallet === undefined) {\r\n return null\r\n }\r\n\r\n if (ChildUsers.length === 0) {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return \r\n }\r\n\r\n return (\r\n <>\r\n {renderTabsOrOnlySearch()}\r\n \r\n )\r\n}\r\nexport default observer(SendMoney)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {FormatCentsToEuro} from '../../../Helpers/TextHelpers'\r\nimport I18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {MyErrorMessage, ToprError} from '../../../Models/Client'\r\nimport {IWithdrawInfoSTO} from '../../../Models/Server'\r\nimport TransactionController from '../../../Services/Topr.Core/TransactionController'\r\nimport WalletController from '../../../Services/Topr.Core/WalletController'\r\n\r\nimport {walletDetailsStore} from '../Details/Store'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport {GetRandStockImage} from '../../../Helpers/UiHelpers'\r\n\r\nexport type WithdrawFormData = {\r\n iban: string\r\n amount: number // cents\r\n name: string\r\n email: string\r\n}\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n public IsLoading = true\r\n public WithdrawInfo?: IWithdrawInfoSTO = undefined\r\n public WithdrawCosts = 50\r\n private CurrencyGuid?: string = undefined\r\n\r\n public get MaxWithdrawAmount(): number {\r\n return this.WithdrawInfo !== undefined\r\n ? this.WithdrawInfo.MaxWithdrawAmount\r\n : 0\r\n }\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize(currencyGuid: string) {\r\n this.CurrencyGuid = currencyGuid\r\n\r\n this.GetWithdrawInfo(currencyGuid)\r\n }\r\n\r\n public GetWithdrawInfo(currencyGuid: string) {\r\n DoServiceCall(() => {\r\n this.IsLoading = true\r\n WalletController.GetWithdrawInfo(currencyGuid)\r\n .then((info) =>\r\n runInAction(() => {\r\n this.WithdrawInfo = info\r\n this.IsLoading = false\r\n }),\r\n )\r\n .catch(() => runInAction(() => (this.IsLoading = false)))\r\n })\r\n }\r\n public Withdraw(currencyGuid: string, formData: WithdrawFormData) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n TransactionController.Withdraw(\r\n currencyGuid,\r\n formData.amount,\r\n formData.iban.trim(),\r\n formData.name,\r\n formData.email,\r\n )\r\n .then(() =>\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n const amountWithoutCosts = FormatCentsToEuro(\r\n formData.amount - this.WithdrawCosts,\r\n )\r\n appUiStore.ShowAlert({\r\n message: I18n.t('Withdraw.Form.Success.Message', {\r\n amountWithoutCosts,\r\n }),\r\n title: I18n.t('Withdraw.Form.Success.Title'),\r\n type: 'success',\r\n additionalCloseAction: () => {\r\n if (this.CurrencyGuid) {\r\n walletDetailsStore.Initialize(this.CurrencyGuid)\r\n }\r\n dashboardStore.GetWallets()\r\n goBack()\r\n },\r\n })\r\n }),\r\n )\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(\r\n toprError,\r\n (erorMessage) => {\r\n appUiStore.ShowAlert({\r\n message: erorMessage,\r\n title: I18n.t('Charge.Form.ServerErrors.Title'),\r\n type: 'error',\r\n })\r\n },\r\n [\r\n new MyErrorMessage(\r\n 'CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED',\r\n 'Charge.Form.ServerErrors.Title',\r\n 'Charge.Form.ServerErrors.CURRENCY_PAYMENT_METHOD_NOT_SUPPORTED',\r\n //null,\r\n //'warning'\r\n ),\r\n ],\r\n )\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n }\r\n}\r\nexport const withdrawStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n EuroTextInput,\r\n FormInfo,\r\n MyInput,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport {\r\n FormatCentsToEuro,\r\n GetWalletPagetitle,\r\n} from '../../../Helpers/TextHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style, {colors} from '../../../Style'\r\nimport {WithdrawFormData, withdrawStore} from './Store'\r\n\r\nconst iban = require('iban')\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Withdraw: React.FC = ({\r\n navigation: {goBack, setOptions},\r\n route,\r\n}) => {\r\n const wallet = route.params.wallet\r\n const {noteText, highlightText} = Style\r\n useEffect(() => {\r\n myLog.warn('Withdraw')\r\n withdrawStore.Initialize(wallet.Currency.CurrencyGuid)\r\n\r\n if (\r\n persistedStore.MainUser !== undefined &&\r\n persistedStore.MainUser.EmailAddress\r\n ) {\r\n setTimeout(() => {\r\n setValue('email', persistedStore.MainUser?.EmailAddress)\r\n }, 300)\r\n }\r\n\r\n if (AppConfig.IsDebugMode) {\r\n //setValue('email', 'r.de.ruijter@mybility.nl')\r\n // setTimeout(() => {\r\n // // setValue('name', 'Ralph de Ruijter')\r\n // // setValue('iban', 'NL76INGB0003346 704')\r\n // }, 300)\r\n }\r\n }, [null])\r\n\r\n useEffect(() => {\r\n if (wallet) {\r\n setOptions({\r\n title: GetWalletPagetitle(\r\n i18n.t('Withdraw.Form.Action'),\r\n wallet.Currency.Name,\r\n ),\r\n })\r\n }\r\n }, [wallet])\r\n\r\n const {control, handleSubmit, errors, setValue, formState} =\r\n useForm({\r\n mode: 'onChange',\r\n })\r\n\r\n //console.log('disabled', !formState.isValid)\r\n const {\r\n IsSubmitting,\r\n IsLoading,\r\n WithdrawInfo,\r\n MaxWithdrawAmount,\r\n WithdrawCosts,\r\n } = withdrawStore\r\n const onSubmit = (data: WithdrawFormData) => {\r\n const amountWithoutCosts = FormatCentsToEuro(data.amount - WithdrawCosts)\r\n\r\n appUiStore.ShowConfirm(\r\n i18n.t('Withdraw.Form.ConfirmMessage', {\r\n amountWithoutCosts,\r\n amount: FormatCentsToEuro(data.amount),\r\n transactionCosts: FormatCentsToEuro(WithdrawCosts),\r\n }),\r\n () => {\r\n //after confirm show the authenticate modal\r\n appUiStore.ShowAuthenticateConfirm({\r\n OnOk: () =>\r\n withdrawStore.Withdraw(wallet.Currency.CurrencyGuid, data),\r\n Message: i18n.t('Withdraw.Form.AuthenticateAction', {\r\n amountWithoutCosts,\r\n }),\r\n })\r\n },\r\n )\r\n }\r\n\r\n const renderMaxWithdrawMessage = () => {\r\n return (\r\n \r\n {i18n.t('Withdraw.MaxBalance0')}\r\n \r\n {FormatCentsToEuro(MaxWithdrawAmount)}\r\n \r\n {i18n.t('Withdraw.MaxBalance1')}\r\n \r\n )\r\n }\r\n\r\n const renderSubmit = () => {\r\n return (\r\n \r\n )\r\n }\r\n const renderTransactionCosts = () => {\r\n return (\r\n \r\n {i18n.t('Withdraw.Form.ChargeCostsMessage')}\r\n \r\n {FormatCentsToEuro(WithdrawCosts)}\r\n \r\n .\r\n \r\n )\r\n }\r\n\r\n const renderForm = () => {\r\n if (\r\n WithdrawInfo === undefined ||\r\n WithdrawInfo.HasAutomatichChargeWithdrawn\r\n ) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n {renderMaxWithdrawMessage()}\r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t('Withdraw.Form.Fields.Amount.Errors.Required'),\r\n min: {\r\n value: 100,\r\n message: i18n.t('Withdraw.Form.Fields.Amount.Errors.MinMax', {\r\n min: FormatCentsToEuro(100),\r\n max: FormatCentsToEuro(MaxWithdrawAmount),\r\n }),\r\n },\r\n max: {\r\n value: MaxWithdrawAmount,\r\n message: i18n.t('Withdraw.Form.Fields.Amount.Errors.MinMax', {\r\n min: FormatCentsToEuro(100),\r\n max: FormatCentsToEuro(MaxWithdrawAmount),\r\n }),\r\n },\r\n },\r\n }}\r\n />\r\n {renderTransactionCosts()}\r\n {\r\n //remove all spaces\r\n const valueNoSpace = value.replace(/ /g, '')\r\n //check if space where removed\r\n if (valueNoSpace.length < value.length) {\r\n return 'voer een geldige iban in'\r\n }\r\n\r\n return iban.isValid(value) || 'voer een geldige iban in'\r\n },\r\n },\r\n },\r\n }}\r\n />\r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t('Register.EmailStep.Field.Errors.Required'),\r\n pattern: {\r\n value: /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/,\r\n message: i18n.t('Register.EmailStep.Field.Errors.Regex'),\r\n },\r\n },\r\n }}\r\n />\r\n \r\n )\r\n }\r\n\r\n const renderAutomaticChargeCanceledMessage = () => {\r\n if (\r\n WithdrawInfo === undefined ||\r\n !WithdrawInfo.HasAutomatichChargeWithdrawn\r\n ) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {i18n.t('Withdraw.Form.AutomaticChargeCanceledMessage', {\r\n currencyName: wallet.Currency.Name,\r\n })}\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {renderForm()}\r\n {renderAutomaticChargeCanceledMessage()}\r\n \r\n \r\n {wallet.Currency.Name}\r\n {renderSubmit()}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(Withdraw)\r\n","import {AxiosError, AxiosResponse} from 'axios'\r\nimport {HandleAxiosCatch} from '../../Helpers/ServiceHelpers'\r\nimport {ErrorCodes} from '../../Models/Client'\r\nimport {\r\n IAutomaticChargeSTO,\r\n ICreateAutomaticChargeRequest,\r\n IDebtorBank,\r\n IEditAutomaticChargeStepsRequest,\r\n} from '../../Models/Server'\r\nimport {axiosAuthUser} from './Axios/AxiosAuthUser'\r\n\r\nexport default {\r\n Latest: (currencyGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/automaticcharge/${currencyGuid}/latest`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n if (\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.Code &&\r\n error.response.data.Code === ErrorCodes.ENTITY_NOT_FOUND_EXCEPTION\r\n ) {\r\n resolve(null)\r\n return\r\n }\r\n\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n Insert: (request: ICreateAutomaticChargeRequest) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/automaticcharge/${request.CurrencyGuid}/insert`, request)\r\n .then((response: AxiosResponse<{RedirectUrl: string}>) => {\r\n console.log(response.data)\r\n resolve(response.data.RedirectUrl)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n Edit: (request: ICreateAutomaticChargeRequest) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/automaticcharge/${request.CurrencyGuid}/edit`, request)\r\n .then((response: AxiosResponse<{RedirectUrl: string}>) => {\r\n resolve(response.data.RedirectUrl)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n EditSteps: (\r\n currencyGuid: string,\r\n request: IEditAutomaticChargeStepsRequest,\r\n ) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/automaticcharge/${currencyGuid}/edit/steps`, request)\r\n .then((response: AxiosResponse) => {\r\n resolve()\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n TurnOff: (currencyGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .post(`api/v1/automaticcharge/${currencyGuid}/turnoff`, null)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n GetBanks: (currencyGuid: string) => {\r\n return new Promise((resolve, reject) => {\r\n axiosAuthUser\r\n .get(`api/v1/automaticcharge/${currencyGuid}/banks`)\r\n .then((response: AxiosResponse) => {\r\n resolve(response.data)\r\n })\r\n .catch((error: AxiosError) => {\r\n HandleAxiosCatch(error, reject)\r\n })\r\n })\r\n },\r\n}\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {useForm} from 'react-hook-form'\r\nimport {View} from 'react-native'\r\nimport {CheckBox, Divider, Text} from 'react-native-elements'\r\nimport {ScrollView} from 'react-native-gesture-handler'\r\nimport {\r\n Container,\r\n Content,\r\n MyButton,\r\n MyInput,\r\n MyLabelValueHorizontal,\r\n MySelectList,\r\n MySlider,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetEnumTranslation} from '../../../Helpers/EnumHelpers'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\nimport {\r\n FormatCentsToEuro,\r\n FormatEuro,\r\n GetWalletPagetitle,\r\n} from '../../../Helpers/TextHelpers'\r\nimport {default as i18n, default as I18n} from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {\r\n AutomaticChargeStatusTypesDTO,\r\n IDebtorBank,\r\n} from '../../../Models/Server'\r\nimport {getPaymentMethodTransactionCosts} from '../../../Models/Server/Wallet/ICurrencyChargeMethodSTO'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style, {colors, sizes} from '../../../Style'\r\nimport {automaticChargeStore, ChargeFormData, FormModes} from './Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst AutomaticCharge: React.FC = ({\r\n navigation: {setOptions},\r\n route,\r\n}) => {\r\n const currencyGuid = route.params.currencyGuid\r\n const {noteText} = Style\r\n\r\n useEffect(() => {\r\n myLog.info('Charge', currencyGuid)\r\n automaticChargeStore.Initialize(currencyGuid)\r\n }, [currencyGuid])\r\n\r\n const {\r\n IsLoading,\r\n Wallet,\r\n IsSubmitting,\r\n Banks,\r\n SelectedBank,\r\n Status,\r\n DefaultValues,\r\n PreviousAutomaticCharge,\r\n AutomaticChargeStatusEnabled,\r\n FormMode,\r\n } = automaticChargeStore\r\n\r\n useEffect(() => {\r\n if (Wallet) {\r\n setOptions({\r\n title: GetWalletPagetitle(\r\n i18n.t('WalletDetails.AutomaticCharge'),\r\n Wallet.Currency.Name,\r\n ),\r\n })\r\n }\r\n }, [Wallet])\r\n\r\n const {control, handleSubmit, errors, formState, setError} =\r\n useForm({\r\n mode: 'onChange',\r\n defaultValues: DefaultValues,\r\n })\r\n\r\n const onSubmit = (data: ChargeFormData) => {\r\n automaticChargeStore.SaveAutomaticCharge(data, (errorMessage: string) => {\r\n setError('amount', {\r\n type: 'manual',\r\n message: errorMessage,\r\n })\r\n })\r\n }\r\n\r\n if (IsLoading) {\r\n return \r\n }\r\n\r\n if (Wallet === undefined) {\r\n return null\r\n }\r\n\r\n const renderSubmitHeader = () => {\r\n if (FormMode === FormModes.ShowStatus) {\r\n return null\r\n }\r\n\r\n const renderSubmit = () => {\r\n return (\r\n \r\n )\r\n }\r\n\r\n return (\r\n {\r\n if (FormMode === FormModes.ShowStatus) {\r\n navigate('walletDetails', {\r\n currencyGuid: Wallet.Currency.CurrencyGuid,\r\n })\r\n } else {\r\n automaticChargeStore.SetFormMode(FormModes.ShowStatus)\r\n }\r\n }}>\r\n {renderSubmit()}\r\n \r\n )\r\n }\r\n\r\n const renderTransactionCosts = () => {\r\n const {AutomaticCharePaymentMethod, Amount} = automaticChargeStore\r\n if (AutomaticCharePaymentMethod === undefined) {\r\n return null\r\n }\r\n\r\n const calculatedTransactionCosts = getPaymentMethodTransactionCosts(\r\n AutomaticCharePaymentMethod,\r\n Amount,\r\n )\r\n\r\n if (calculatedTransactionCosts === 0) {\r\n return 0\r\n }\r\n\r\n const renderCostMessage = (transactionCosts: number) => {\r\n return (\r\n \r\n {I18n.t('AutomaticCharge.Form.ChargeCostsMessage')}\r\n \r\n {FormatCentsToEuro(transactionCosts)}\r\n \r\n \r\n )\r\n }\r\n\r\n if (AutomaticCharePaymentMethod.TransactionCostsFixed > 0) {\r\n return renderCostMessage(calculatedTransactionCosts)\r\n }\r\n\r\n if (AutomaticCharePaymentMethod.TransactionCostsPercentage > 0) {\r\n if (calculatedTransactionCosts > 0) {\r\n return renderCostMessage(calculatedTransactionCosts)\r\n }\r\n }\r\n }\r\n\r\n const renderForm = () => {\r\n const {\r\n AutomaticChargeStepAmount,\r\n AutomaticChargeStepAmountMax,\r\n AutomaticChargeStepAmountMin,\r\n Name: CurrencyName,\r\n } = Wallet.Currency\r\n\r\n const renderBankform = () => {\r\n return (\r\n <>\r\n {\r\n automaticChargeStore.SetSelectedBank(option)\r\n }}\r\n isItemSelected={(a: IDebtorBank, b: IDebtorBank) => {\r\n return a?.DebtorBankId === b?.DebtorBankId\r\n }}\r\n renderListItem={(bank: IDebtorBank, isHighLighted: boolean) => {\r\n return (\r\n \r\n {bank.DebtorBankName}\r\n \r\n )\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const renderStepsForm = () => {\r\n return (\r\n <>\r\n {\r\n automaticChargeStore.SetAmount(amount)\r\n }}\r\n label={I18n.t('AutomaticCharge.Form.Fields.Amount.Label')}\r\n />\r\n \r\n {renderTransactionCosts()}\r\n \r\n )\r\n }\r\n\r\n const renderStatusInfo = () => {\r\n if (\r\n PreviousAutomaticCharge === null ||\r\n PreviousAutomaticCharge === undefined\r\n ) {\r\n return (\r\n {\r\n automaticChargeStore.SetFormMode(FormModes.NewAutomaticCharge)\r\n }}\r\n />\r\n )\r\n } else if (AutomaticChargeStatusEnabled) {\r\n return (\r\n <>\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n {\r\n automaticChargeStore.SetFormMode(FormModes.EditSteps)\r\n }}\r\n buttonStyle={{marginBottom: sizes.padding.md}}\r\n />\r\n {\r\n automaticChargeStore.SetFormMode(FormModes.NewAutomaticCharge)\r\n }}\r\n buttonStyle={{marginBottom: sizes.padding.md}}\r\n />\r\n {\r\n appUiStore.ShowConfirm(\r\n I18n.t('AutomaticCharge.Form.ConfirmTurnOff', {\r\n currencyName: CurrencyName,\r\n }),\r\n () => {\r\n automaticChargeStore.TurnOff((errorMessage: string) => {\r\n setError('amount', {\r\n type: 'manual',\r\n message: errorMessage,\r\n })\r\n })\r\n },\r\n )\r\n }}\r\n />\r\n \r\n )\r\n }\r\n }\r\n\r\n switch (FormMode) {\r\n case FormModes.ShowStatus:\r\n default:\r\n return renderStatusInfo()\r\n case FormModes.NewAutomaticCharge:\r\n //case FormModes.EditAutomaticChargeFull:\r\n return (\r\n <>\r\n {renderStepsForm()}\r\n {renderBankform()}\r\n \r\n )\r\n case FormModes.EditSteps:\r\n return renderStepsForm()\r\n }\r\n }\r\n\r\n const GetStatusCheckBox = () => {\r\n const statusText = GetEnumTranslation(\r\n 'AutomaticChargeStatusTypesDTO',\r\n AutomaticChargeStatusTypesDTO[Status],\r\n )\r\n\r\n const isEnabled =\r\n Status === AutomaticChargeStatusTypesDTO.EnabledWithVerification ||\r\n Status === AutomaticChargeStatusTypesDTO.EnabledWithoutVerification\r\n\r\n const getCheckBoxProperties = (): {\r\n color: string\r\n backGroundColor: string\r\n checkedIcon: string\r\n unCheckedIcon: string\r\n } => {\r\n const props = {\r\n backGroundColor: 'white',\r\n color: 'black',\r\n checkedIcon: 'check-square-o',\r\n unCheckedIcon: 'square-o',\r\n }\r\n switch (Status) {\r\n case AutomaticChargeStatusTypesDTO.EnabledWithVerification:\r\n case AutomaticChargeStatusTypesDTO.EnabledWithoutVerification: {\r\n props.backGroundColor = colors.green\r\n return props\r\n }\r\n case AutomaticChargeStatusTypesDTO.Pending: {\r\n props.backGroundColor = colors.yellow\r\n props.unCheckedIcon = 'hourglass-half'\r\n\r\n return props\r\n }\r\n case AutomaticChargeStatusTypesDTO.Blocked: {\r\n props.backGroundColor = colors.darkRed\r\n props.color = 'white'\r\n props.unCheckedIcon = 'ban'\r\n return props\r\n }\r\n\r\n case AutomaticChargeStatusTypesDTO.Off:\r\n case AutomaticChargeStatusTypesDTO.Denied:\r\n case AutomaticChargeStatusTypesDTO.Initial:\r\n default: {\r\n props.backGroundColor = 'white'\r\n return props\r\n }\r\n }\r\n }\r\n\r\n const props = getCheckBoxProperties()\r\n\r\n return (\r\n <>\r\n \r\n {i18n.t('AutomaticCharge.Form.Title', {\r\n currencyName: Wallet.Currency.Name,\r\n })}\r\n \r\n \r\n \r\n )\r\n\r\n //const backgroundColor =\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {GetStatusCheckBox()}\r\n \r\n {renderForm()}\r\n \r\n \r\n \r\n navigate('walletDetails', {\r\n currencyGuid: Wallet.Currency.CurrencyGuid,\r\n })\r\n }>\r\n {renderSubmitHeader()}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(AutomaticCharge)\r\n","import i18n from '../i18n'\r\n\r\nexport const GetEnumTranslation = (enumName: string, enumKey: string) => {\r\n return i18n.t(`Enums.${enumName}.${enumKey}`)\r\n}\r\n","import React from 'react'\r\nimport {ListItem} from 'react-native-elements'\r\nimport {MyModal, ProfileButton} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport {persistedStore} from '../../../../Mobx'\r\nimport {IUserSTO} from '../../../../Models/Server'\r\nimport {dashboardStore} from '../../../Dashboard/Dashboard/Store'\r\n//import {store} from './Store'\r\ninterface IProps {\r\n onClose: () => void\r\n isVisible: boolean\r\n onUserSelected: (user: IUserSTO) => void\r\n}\r\n\r\nconst OtherUsersModal: React.FC = ({\r\n onClose,\r\n isVisible,\r\n onUserSelected,\r\n}) => {\r\n const {ChildUsers, MainUser} = persistedStore\r\n const {User} = dashboardStore\r\n\r\n const isChildUserSelected = MainUser?.MainUserGuid !== User?.MainUserGuid\r\n\r\n const childUsersWithoutActiveUser = ChildUsers.filter(\r\n (x) => x.MainUserGuid !== User?.MainUserGuid,\r\n )\r\n\r\n const renderParentMenuItem = () => {\r\n if (!isChildUserSelected || MainUser === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n {\r\n //store.SwitchBackToParent()\r\n onUserSelected(MainUser)\r\n onClose()\r\n }}>\r\n \r\n \r\n {MainUser.Name}\r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {i18n.t('Tokens.TokenMenu.SwitchUserAction.Title')}\r\n \r\n \r\n \r\n {childUsersWithoutActiveUser.map((childUser, key) => {\r\n return (\r\n {\r\n onUserSelected(childUser)\r\n onClose()\r\n }}>\r\n \r\n \r\n {childUser.Name}\r\n \r\n \r\n )\r\n })}\r\n {renderParentMenuItem()}\r\n \r\n )\r\n}\r\n\r\nexport default OtherUsersModal\r\n","import React from 'react'\r\nimport {Icon} from 'react-native-elements'\r\nimport {TokenStates} from '../../../../Models/Client/Enums'\r\nimport {colors, sizes} from '../../../../Style'\r\ninterface IProps {\r\n tokenState: TokenStates\r\n}\r\n\r\nconst TokenIcon: React.FC = ({tokenState}) => {\r\n switch (tokenState) {\r\n case TokenStates.Blocked:\r\n return (\r\n \r\n )\r\n case TokenStates.Expired:\r\n return (\r\n \r\n )\r\n case TokenStates.Active:\r\n default:\r\n return (\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default TokenIcon\r\n","import React from 'react'\r\nimport {StyleSheet, View, ActivityIndicator} from 'react-native'\r\nimport {Button, Card, Icon, ListItem, Text} from 'react-native-elements'\r\nimport {FormatDate} from '../../../../Helpers/DateHelpers'\r\nimport {GetTokenState} from '../../../../Helpers/TokenHelpers'\r\nimport i18n from '../../../../i18n'\r\nimport {TokenStates} from '../../../../Models/Client/Enums'\r\nimport {ITokenSTO} from '../../../../Models/Server'\r\nimport Style, {colors, sizes} from '../../../../Style'\r\nimport {store} from '../Store'\r\nimport TokenIcon from './TokenIcon'\r\n\r\ninterface IProps {\r\n token: ITokenSTO\r\n loadingTokenTokenGUID: string\r\n}\r\n\r\nconst TokenCard: React.FC = ({token, loadingTokenTokenGUID}) => {\r\n const {flexRow, flex1} = Style\r\n const {titleStyle, iconRow} = styles\r\n\r\n const renderState = () => {\r\n const tokenState = GetTokenState(token)\r\n\r\n switch (tokenState) {\r\n case TokenStates.Blocked:\r\n return (\r\n \r\n \r\n \r\n {i18n.t('Tokens.TokenState.Blocked')}\r\n \r\n \r\n )\r\n case TokenStates.Expired:\r\n return (\r\n \r\n \r\n \r\n {i18n.t('Tokens.TokenState.Expired')}\r\n \r\n \r\n )\r\n case TokenStates.Active:\r\n default:\r\n return (\r\n \r\n \r\n \r\n {i18n.t('Tokens.TokenState.Active')}\r\n \r\n \r\n )\r\n }\r\n }\r\n\r\n const renderButton = () => {\r\n if (loadingTokenTokenGUID === token.TokenGUID) {\r\n return \r\n }\r\n return (\r\n }\r\n onPress={() => store.ShowTokenMenu(token)}\r\n />\r\n )\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {token.Description} ({token.ActivationCode})\r\n \r\n \r\n {renderButton()}\r\n \r\n\r\n \r\n\r\n \r\n {renderState()}\r\n \r\n {i18n.t('Tokens.ValidThru')}\r\n \r\n {FormatDate(token.ValidThru as string)}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default TokenCard\r\n\r\nconst styles = StyleSheet.create({\r\n titleStyle: {\r\n fontSize: 10,\r\n paddingVertical: 0,\r\n },\r\n iconRow: {\r\n flexDirection: 'row',\r\n },\r\n})\r\n","import {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {Icon, ListItem} from 'react-native-elements'\r\nimport {MyModal} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport {appUiStore} from '../../../../Mobx/AppUiStore'\r\nimport {TokenStates} from '../../../../Models/Client/Enums'\r\nimport {ITokenSTO} from '../../../../Models/Server'\r\nimport {store} from '../Store'\r\nimport TokenIcon from './TokenIcon'\r\n\r\ninterface IProps {\r\n token?: ITokenSTO\r\n isVisible: boolean\r\n onClose: () => void\r\n}\r\n\r\nconst TokenMenu: React.FC = ({onClose, isVisible, token}) => {\r\n if (token === undefined) {\r\n return null\r\n }\r\n\r\n const renderBlockButtons = () => {\r\n if (token.IsBlocked) {\r\n return (\r\n {\r\n onClose()\r\n appUiStore.ShowConfirm(\r\n i18n.t('Tokens.TokenMenu.UnblockTokenAction.Confirm', {\r\n activationCode: token.ActivationCode,\r\n }),\r\n () => {\r\n store.Unblock()\r\n },\r\n )\r\n }}>\r\n \r\n \r\n \r\n {i18n.t('Tokens.TokenMenu.UnblockTokenAction.Title')}\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n {\r\n onClose()\r\n appUiStore.ShowConfirm(\r\n i18n.t('Tokens.TokenMenu.BlockTokenAction.Confirm', {\r\n activationCode: token.ActivationCode,\r\n }),\r\n () => {\r\n store.Block()\r\n },\r\n )\r\n }}>\r\n \r\n\r\n \r\n \r\n {i18n.t('Tokens.TokenMenu.BlockTokenAction.Title')}\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {token.Description} ({token.ActivationCode})\r\n \r\n \r\n \r\n {\r\n store.ToggleSetDescriptionTokenModalIsVisible()\r\n }}>\r\n \r\n \r\n \r\n {i18n.t('SetDescriptionModal.Title')}\r\n \r\n \r\n \r\n {renderBlockButtons()}\r\n store.ToggleOtherUserModalIsVisible()}>\r\n \r\n \r\n \r\n {i18n.t('Tokens.TokenMenu.SwitchUserAction.Title')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(TokenMenu)\r\n","import React, {useEffect} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Card} from 'react-native-elements'\r\n\r\nimport {useForm} from 'react-hook-form'\r\n\r\nimport {store} from '../Store'\r\nimport {observer} from 'mobx-react'\r\nimport {\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n MyModal,\r\n} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport {sizes} from '../../../../Style'\r\n\r\ninterface IProps {}\r\n\r\nexport type MyFormData = {\r\n description: string\r\n}\r\n\r\nconst SetDescriptionModal: React.FC = () => {\r\n const {SetDescriptionTokenModalIsVisible, SelectedToken} = store\r\n\r\n useEffect(() => {\r\n reset({description: SelectedToken?.Description})\r\n }, [SelectedToken])\r\n const {control, handleSubmit, errors, reset} = useForm()\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n store.SetDescription(data.description)\r\n }\r\n\r\n return (\r\n store.ToggleSetDescriptionTokenModalIsVisible()}\r\n visible={SetDescriptionTokenModalIsVisible}\r\n position=\"center\">\r\n {i18n.t('SetDescriptionModal.Title')}\r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n maxLength: 100,\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t(\r\n 'SetDescriptionModal.Form.DescriptionField.Errors.Required',\r\n ),\r\n },\r\n }}\r\n label={i18n.t('SetDescriptionModal.Form.DescriptionField.Label')}\r\n />\r\n \r\n \r\n \r\n {\r\n store.ToggleSetDescriptionTokenModalIsVisible()\r\n }}\r\n style={{marginRight: sizes.padding.sm}}\r\n title={i18n.t('Common.Cancel')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(SetDescriptionModal)\r\n\r\nconst styles = StyleSheet.create({})\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {FlatList, View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetRandomKey} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\nimport OtherUsersModal from './Components/OtherUsersModal'\r\nimport TokenCard from './Components/TokenCard'\r\nimport TokenMenu from './Components/TokenMenu'\r\nimport {store} from './Store'\r\nimport SetDescriptionModal from './Components/SetDescriptionModal'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Tokens: React.FC = ({navigation: {navigate, goBack}, route}) => {\r\n useEffect(() => {\r\n myLog.warn('Tokens')\r\n }, [null])\r\n\r\n const {\r\n Tokens,\r\n IsTokensLoading,\r\n LoadingTokenTokenGUID,\r\n SelectedToken,\r\n TokenMenuIsVisible,\r\n SetDescriptionTokenModalIsVisible,\r\n } = store\r\n const {flatListContentStyleStock, transactionRow, defaultFlatListWhite} =\r\n Style\r\n return (\r\n \r\n \r\n \r\n \r\n {i18n.t('Tokens.NoTokens')}\r\n \r\n }\r\n style={defaultFlatListWhite}\r\n refreshing={IsTokensLoading}\r\n onRefresh={() => store.GetTokens()}\r\n data={Tokens}\r\n renderItem={({item}) => (\r\n \r\n )}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n \r\n {\r\n navigate('addToken')\r\n }}\r\n />\r\n \r\n \r\n\r\n store.HideTokenMenu()}\r\n isVisible={TokenMenuIsVisible}\r\n token={SelectedToken!}\r\n />\r\n\r\n store.ToggleOtherUserModalIsVisible()}\r\n onUserSelected={(user) => {\r\n appUiStore.ShowConfirm(\r\n i18n.t('Tokens.TokenMenu.SwitchUserAction.Confirm', {\r\n activationCode: SelectedToken?.ActivationCode,\r\n name: user.Name,\r\n }),\r\n () => {\r\n store.TokenSwitchUser(user)\r\n },\r\n )\r\n }}\r\n />\r\n\r\n \r\n \r\n )\r\n}\r\nexport default observer(Tokens)\r\n","/*\r\n * Slim v5.0.0 - Image Cropping Made Easy\r\n * Copyright (c) 2018 Rik Schennink - http://slimimagecropper.com\r\n */\r\n/* eslint-disable */\r\nexport default typeof window !== 'undefined' ? (function() {\r\n\r\n// custom event polyfill for IE10\r\n(function() {\r\n\tif ( typeof window.CustomEvent === 'function' ) return false;\r\n\r\n\tfunction CustomEvent ( event, params ) {\r\n\t\tparams = params || { bubbles: false, cancelable: false, detail: undefined };\r\n\t\tvar evt = document.createEvent( 'CustomEvent' );\r\n\t\tevt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );\r\n\t\treturn evt;\r\n\t}\r\n\r\n\tCustomEvent.prototype = window.Event.prototype;\r\n\r\n\twindow.CustomEvent = CustomEvent;\r\n})();\r\n/*\r\n* JavaScript Load Image\r\n* https://github.com/blueimp/JavaScript-Load-Image\r\n*\r\n* Copyright 2011, Sebastian Tschan\r\n* https://blueimp.net\r\n*\r\n* Licensed under the MIT license:\r\n* http://www.opensource.org/licenses/MIT\r\n*/\r\n\r\n/*global define, module, window, document, URL, webkitURL, FileReader */\r\n\r\n// Loads an image for a given File object.\r\n// Invokes the callback with an img or optional canvas\r\n// element (if supported by the browser) as parameter:\r\nvar loadImage = function (file, callback, options) {\r\n var img = document.createElement('img')\r\n var url\r\n var oUrl\r\n img.onerror = callback\r\n img.onload = function () {\r\n if (oUrl && !(options && options.noRevoke)) {\r\n loadImage.revokeObjectURL(oUrl)\r\n }\r\n if (callback) {\r\n callback(loadImage.scale(img, options))\r\n }\r\n }\r\n if (loadImage.isInstanceOf('Blob', file) ||\r\n // Files are also Blob instances, but some browsers\r\n // (Firefox 3.6) support the File API but not Blobs:\r\n loadImage.isInstanceOf('File', file)) {\r\n url = oUrl = loadImage.createObjectURL(file)\r\n // Store the file type for resize processing:\r\n img._type = file.type\r\n } else if (typeof file === 'string') {\r\n url = file\r\n if (options && options.crossOrigin) {\r\n img.crossOrigin = options.crossOrigin\r\n }\r\n } else {\r\n return false\r\n }\r\n if (url) {\r\n img.src = url\r\n return img\r\n }\r\n return loadImage.readFile(file, function (e) {\r\n var target = e.target\r\n if (target && target.result) {\r\n img.src = target.result\r\n } else {\r\n if (callback) {\r\n callback(e)\r\n }\r\n }\r\n })\r\n}\r\n// The check for URL.revokeObjectURL fixes an issue with Opera 12,\r\n// which provides URL.createObjectURL but doesn't properly implement it:\r\nvar urlAPI = (window.createObjectURL && window) ||\r\n (window.URL && URL.revokeObjectURL && URL) ||\r\n (window.webkitURL && webkitURL)\r\n\r\nloadImage.isInstanceOf = function (type, obj) {\r\n // Cross-frame instanceof check\r\n return Object.prototype.toString.call(obj) === '[object ' + type + ']'\r\n}\r\n\r\n// Transform image coordinates, allows to override e.g.\r\n// the canvas orientation based on the orientation option,\r\n// gets canvas, options passed as arguments:\r\nloadImage.transformCoordinates = function () {\r\n return\r\n}\r\n\r\n// Returns transformed options, allows to override e.g.\r\n// maxWidth, maxHeight and crop options based on the aspectRatio.\r\n// gets img, options passed as arguments:\r\nloadImage.getTransformedOptions = function (img, options) {\r\n var aspectRatio = options.aspectRatio\r\n var newOptions\r\n var i\r\n var width\r\n var height\r\n if (!aspectRatio) {\r\n return options\r\n }\r\n newOptions = {}\r\n for (i in options) {\r\n if (options.hasOwnProperty(i)) {\r\n newOptions[i] = options[i]\r\n }\r\n }\r\n newOptions.crop = true\r\n width = img.naturalWidth || img.width\r\n height = img.naturalHeight || img.height\r\n if (width / height > aspectRatio) {\r\n newOptions.maxWidth = height * aspectRatio\r\n newOptions.maxHeight = height\r\n } else {\r\n newOptions.maxWidth = width\r\n newOptions.maxHeight = width / aspectRatio\r\n }\r\n return newOptions\r\n}\r\n\r\n// Canvas render method, allows to implement a different rendering algorithm:\r\nloadImage.renderImageToCanvas = function (\r\n canvas,\r\n img,\r\n sourceX,\r\n sourceY,\r\n sourceWidth,\r\n sourceHeight,\r\n destX,\r\n destY,\r\n destWidth,\r\n destHeight\r\n) {\r\n canvas.getContext('2d').drawImage(\r\n img,\r\n sourceX,\r\n sourceY,\r\n sourceWidth,\r\n sourceHeight,\r\n destX,\r\n destY,\r\n destWidth,\r\n destHeight\r\n )\r\n return canvas\r\n}\r\n\r\n// This method is used to determine if the target image\r\n// should be a canvas element:\r\nloadImage.hasCanvasOption = function (options) {\r\n return options.canvas || options.crop || !!options.aspectRatio\r\n}\r\n\r\n// Scales and/or crops the given image (img or canvas HTML element)\r\n// using the given options.\r\n// Returns a canvas object if the browser supports canvas\r\n// and the hasCanvasOption method returns true or a canvas\r\n// object is passed as image, else the scaled image:\r\nloadImage.scale = function (img, options) {\r\n options = options || {}\r\n var canvas = document.createElement('canvas')\r\n var useCanvas = img.getContext ||\r\n (loadImage.hasCanvasOption(options) && canvas.getContext)\r\n var width = img.naturalWidth || img.width\r\n var height = img.naturalHeight || img.height\r\n var destWidth = width\r\n var destHeight = height\r\n var maxWidth\r\n var maxHeight\r\n var minWidth\r\n var minHeight\r\n var sourceWidth\r\n var sourceHeight\r\n var sourceX\r\n var sourceY\r\n var pixelRatio\r\n var downsamplingRatio\r\n var tmp\r\n function scaleUp () {\r\n var scale = Math.max(\r\n (minWidth || destWidth) / destWidth,\r\n (minHeight || destHeight) / destHeight\r\n )\r\n if (scale > 1) {\r\n destWidth *= scale\r\n destHeight *= scale\r\n }\r\n }\r\n function scaleDown () {\r\n var scale = Math.min(\r\n (maxWidth || destWidth) / destWidth,\r\n (maxHeight || destHeight) / destHeight\r\n )\r\n if (scale < 1) {\r\n destWidth *= scale\r\n destHeight *= scale\r\n }\r\n }\r\n if (useCanvas) {\r\n options = loadImage.getTransformedOptions(img, options)\r\n sourceX = options.left || 0\r\n sourceY = options.top || 0\r\n if (options.sourceWidth) {\r\n sourceWidth = options.sourceWidth\r\n if (options.right !== undefined && options.left === undefined) {\r\n sourceX = width - sourceWidth - options.right\r\n }\r\n } else {\r\n sourceWidth = width - sourceX - (options.right || 0)\r\n }\r\n if (options.sourceHeight) {\r\n sourceHeight = options.sourceHeight\r\n if (options.bottom !== undefined && options.top === undefined) {\r\n sourceY = height - sourceHeight - options.bottom\r\n }\r\n } else {\r\n sourceHeight = height - sourceY - (options.bottom || 0)\r\n }\r\n destWidth = sourceWidth\r\n destHeight = sourceHeight\r\n }\r\n maxWidth = options.maxWidth\r\n maxHeight = options.maxHeight\r\n minWidth = options.minWidth\r\n minHeight = options.minHeight\r\n if (useCanvas && maxWidth && maxHeight && options.crop) {\r\n destWidth = maxWidth\r\n destHeight = maxHeight\r\n tmp = sourceWidth / sourceHeight - maxWidth / maxHeight\r\n if (tmp < 0) {\r\n sourceHeight = maxHeight * sourceWidth / maxWidth\r\n if (options.top === undefined && options.bottom === undefined) {\r\n sourceY = (height - sourceHeight) / 2\r\n }\r\n } else if (tmp > 0) {\r\n sourceWidth = maxWidth * sourceHeight / maxHeight\r\n if (options.left === undefined && options.right === undefined) {\r\n sourceX = (width - sourceWidth) / 2\r\n }\r\n }\r\n } else {\r\n if (options.contain || options.cover) {\r\n minWidth = maxWidth = maxWidth || minWidth\r\n minHeight = maxHeight = maxHeight || minHeight\r\n }\r\n if (options.cover) {\r\n scaleDown()\r\n scaleUp()\r\n } else {\r\n scaleUp()\r\n scaleDown()\r\n }\r\n }\r\n if (useCanvas) {\r\n pixelRatio = options.pixelRatio\r\n if (pixelRatio > 1) {\r\n canvas.style.width = destWidth + 'px'\r\n canvas.style.height = destHeight + 'px'\r\n destWidth *= pixelRatio\r\n destHeight *= pixelRatio\r\n canvas.getContext('2d').scale(pixelRatio, pixelRatio)\r\n }\r\n downsamplingRatio = options.downsamplingRatio\r\n if (downsamplingRatio > 0 && downsamplingRatio < 1 &&\r\n destWidth < sourceWidth && destHeight < sourceHeight) {\r\n while (sourceWidth * downsamplingRatio > destWidth) {\r\n canvas.width = sourceWidth * downsamplingRatio\r\n canvas.height = sourceHeight * downsamplingRatio\r\n loadImage.renderImageToCanvas(\r\n canvas,\r\n img,\r\n sourceX,\r\n sourceY,\r\n sourceWidth,\r\n sourceHeight,\r\n 0,\r\n 0,\r\n canvas.width,\r\n canvas.height\r\n )\r\n sourceWidth = canvas.width\r\n sourceHeight = canvas.height\r\n img = document.createElement('canvas')\r\n img.width = sourceWidth\r\n img.height = sourceHeight\r\n loadImage.renderImageToCanvas(\r\n img,\r\n canvas,\r\n 0,\r\n 0,\r\n sourceWidth,\r\n sourceHeight,\r\n 0,\r\n 0,\r\n sourceWidth,\r\n sourceHeight\r\n )\r\n }\r\n }\r\n canvas.width = destWidth\r\n canvas.height = destHeight\r\n loadImage.transformCoordinates(\r\n canvas,\r\n options\r\n )\r\n return loadImage.renderImageToCanvas(\r\n canvas,\r\n img,\r\n sourceX,\r\n sourceY,\r\n sourceWidth,\r\n sourceHeight,\r\n 0,\r\n 0,\r\n destWidth,\r\n destHeight\r\n )\r\n }\r\n img.width = destWidth\r\n img.height = destHeight\r\n return img\r\n}\r\n\r\nloadImage.createObjectURL = function (file) {\r\n return urlAPI ? urlAPI.createObjectURL(file) : false\r\n}\r\n\r\nloadImage.revokeObjectURL = function (url) {\r\n return urlAPI ? urlAPI.revokeObjectURL(url) : false\r\n}\r\n\r\n// Loads a given File object via FileReader interface,\r\n// invokes the callback with the event object (load or error).\r\n// The result can be read via event.target.result:\r\nloadImage.readFile = function (file, callback, method) {\r\n if (window.FileReader) {\r\n var fileReader = new FileReader()\r\n fileReader.onload = fileReader.onerror = callback\r\n method = method || 'readAsDataURL'\r\n if (fileReader[method]) {\r\n fileReader[method](file)\r\n return fileReader\r\n }\r\n }\r\n return false\r\n}\r\n\r\nvar originalHasCanvasOption = loadImage.hasCanvasOption\r\nvar originalTransformCoordinates = loadImage.transformCoordinates\r\nvar originalGetTransformedOptions = loadImage.getTransformedOptions\r\n\r\n// This method is used to determine if the target image\r\n// should be a canvas element:\r\nloadImage.hasCanvasOption = function (options) {\r\n return !!options.orientation ||\r\n originalHasCanvasOption.call(loadImage, options)\r\n}\r\n\r\n// Transform image orientation based on\r\n// the given EXIF orientation option:\r\nloadImage.transformCoordinates = function (canvas, options) {\r\n originalTransformCoordinates.call(loadImage, canvas, options)\r\n var ctx = canvas.getContext('2d')\r\n var width = canvas.width\r\n var height = canvas.height\r\n var styleWidth = canvas.style.width\r\n var styleHeight = canvas.style.height\r\n var orientation = options.orientation\r\n if (!orientation || orientation > 8) {\r\n return\r\n }\r\n if (orientation > 4) {\r\n canvas.width = height\r\n canvas.height = width\r\n canvas.style.width = styleHeight\r\n canvas.style.height = styleWidth\r\n }\r\n switch (orientation) {\r\n case 2:\r\n // horizontal flip\r\n ctx.translate(width, 0)\r\n ctx.scale(-1, 1)\r\n break\r\n case 3:\r\n // 180° rotate left\r\n ctx.translate(width, height)\r\n ctx.rotate(Math.PI)\r\n break\r\n case 4:\r\n // vertical flip\r\n ctx.translate(0, height)\r\n ctx.scale(1, -1)\r\n break\r\n case 5:\r\n // vertical flip + 90 rotate right\r\n ctx.rotate(0.5 * Math.PI)\r\n ctx.scale(1, -1)\r\n break\r\n case 6:\r\n // 90° rotate right\r\n ctx.rotate(0.5 * Math.PI)\r\n ctx.translate(0, -height)\r\n break\r\n case 7:\r\n // horizontal flip + 90 rotate right\r\n ctx.rotate(0.5 * Math.PI)\r\n ctx.translate(width, -height)\r\n ctx.scale(-1, 1)\r\n break\r\n case 8:\r\n // 90° rotate left\r\n ctx.rotate(-0.5 * Math.PI)\r\n ctx.translate(-width, 0)\r\n break\r\n }\r\n}\r\n\r\n// Transforms coordinate and dimension options\r\n// based on the given orientation option:\r\nloadImage.getTransformedOptions = function (img, opts) {\r\n var options = originalGetTransformedOptions.call(loadImage, img, opts)\r\n var orientation = options.orientation\r\n var newOptions\r\n var i\r\n if (!orientation || orientation > 8 || orientation === 1) {\r\n return options\r\n }\r\n newOptions = {}\r\n for (i in options) {\r\n if (options.hasOwnProperty(i)) {\r\n newOptions[i] = options[i]\r\n }\r\n }\r\n switch (options.orientation) {\r\n case 2:\r\n // horizontal flip\r\n newOptions.left = options.right\r\n newOptions.right = options.left\r\n break\r\n case 3:\r\n // 180° rotate left\r\n newOptions.left = options.right\r\n newOptions.top = options.bottom\r\n newOptions.right = options.left\r\n newOptions.bottom = options.top\r\n break\r\n case 4:\r\n // vertical flip\r\n newOptions.top = options.bottom\r\n newOptions.bottom = options.top\r\n break\r\n case 5:\r\n // vertical flip + 90 rotate right\r\n newOptions.left = options.top\r\n newOptions.top = options.left\r\n newOptions.right = options.bottom\r\n newOptions.bottom = options.right\r\n break\r\n case 6:\r\n // 90° rotate right\r\n newOptions.left = options.top\r\n newOptions.top = options.right\r\n newOptions.right = options.bottom\r\n newOptions.bottom = options.left\r\n break\r\n case 7:\r\n // horizontal flip + 90 rotate right\r\n newOptions.left = options.bottom\r\n newOptions.top = options.right\r\n newOptions.right = options.top\r\n newOptions.bottom = options.left\r\n break\r\n case 8:\r\n // 90° rotate left\r\n newOptions.left = options.bottom\r\n newOptions.top = options.left\r\n newOptions.right = options.top\r\n newOptions.bottom = options.right\r\n break\r\n }\r\n if (options.orientation > 4) {\r\n newOptions.maxWidth = options.maxHeight\r\n newOptions.maxHeight = options.maxWidth\r\n newOptions.minWidth = options.minHeight\r\n newOptions.minHeight = options.minWidth\r\n newOptions.sourceWidth = options.sourceHeight\r\n newOptions.sourceHeight = options.sourceWidth\r\n }\r\n return newOptions\r\n}\r\n\r\nvar hasblobSlice = window.Blob && (Blob.prototype.slice ||\r\n Blob.prototype.webkitSlice || Blob.prototype.mozSlice)\r\n\r\nloadImage.blobSlice = hasblobSlice && function () {\r\n var slice = this.slice || this.webkitSlice || this.mozSlice\r\n return slice.apply(this, arguments)\r\n }\r\n\r\nloadImage.metaDataParsers = {\r\n jpeg: {\r\n 0xffe1: [] // APP1 marker\r\n }\r\n}\r\n\r\n// Parses image meta data and calls the callback with an object argument\r\n// with the following properties:\r\n// * imageHead: The complete image head as ArrayBuffer (Uint8Array for IE10)\r\n// The options arguments accepts an object and supports the following properties:\r\n// * maxMetaDataSize: Defines the maximum number of bytes to parse.\r\n// * disableImageHead: Disables creating the imageHead property.\r\nloadImage.parseMetaData = function (file, callback, options) {\r\n options = options || {}\r\n var that = this\r\n // 256 KiB should contain all EXIF/ICC/IPTC segments:\r\n var maxMetaDataSize = options.maxMetaDataSize || 262144\r\n var data = {}\r\n var noMetaData = !(window.DataView && file && file.size >= 12 &&\r\n file.type === 'image/jpeg' && loadImage.blobSlice)\r\n if (noMetaData || !loadImage.readFile(\r\n loadImage.blobSlice.call(file, 0, maxMetaDataSize),\r\n function (e) {\r\n if (e.target.error) {\r\n // FileReader error\r\n //console.log(e.target.error)\r\n callback(data)\r\n return\r\n }\r\n // Note on endianness:\r\n // Since the marker and length bytes in JPEG files are always\r\n // stored in big endian order, we can leave the endian parameter\r\n // of the DataView methods undefined, defaulting to big endian.\r\n var buffer = e.target.result\r\n var dataView = new DataView(buffer)\r\n var offset = 2\r\n var maxOffset = dataView.byteLength - 4\r\n var headLength = offset\r\n var markerBytes\r\n var markerLength\r\n var parsers\r\n var i\r\n // Check for the JPEG marker (0xffd8):\r\n if (dataView.getUint16(0) === 0xffd8) {\r\n while (offset < maxOffset) {\r\n markerBytes = dataView.getUint16(offset)\r\n // Search for APPn (0xffeN) and COM (0xfffe) markers,\r\n // which contain application-specific meta-data like\r\n // Exif, ICC and IPTC data and text comments:\r\n if ((markerBytes >= 0xffe0 && markerBytes <= 0xffef) ||\r\n markerBytes === 0xfffe) {\r\n // The marker bytes (2) are always followed by\r\n // the length bytes (2), indicating the length of the\r\n // marker segment, which includes the length bytes,\r\n // but not the marker bytes, so we add 2:\r\n markerLength = dataView.getUint16(offset + 2) + 2\r\n if (offset + markerLength > dataView.byteLength) {\r\n //console.log('Invalid meta data: Invalid segment size.')\r\n break\r\n }\r\n parsers = loadImage.metaDataParsers.jpeg[markerBytes]\r\n if (parsers) {\r\n for (i = 0; i < parsers.length; i += 1) {\r\n parsers[i].call(\r\n that,\r\n dataView,\r\n offset,\r\n markerLength,\r\n data,\r\n options\r\n )\r\n }\r\n }\r\n offset += markerLength\r\n headLength = offset\r\n } else {\r\n // Not an APPn or COM marker, probably safe to\r\n // assume that this is the end of the meta data\r\n break\r\n }\r\n }\r\n // Meta length must be longer than JPEG marker (2)\r\n // plus APPn marker (2), followed by length bytes (2):\r\n if (!options.disableImageHead && headLength > 6) {\r\n if (buffer.slice) {\r\n data.imageHead = buffer.slice(0, headLength)\r\n } else {\r\n // Workaround for IE10, which does not yet\r\n // support ArrayBuffer.slice:\r\n data.imageHead = new Uint8Array(buffer)\r\n .subarray(0, headLength)\r\n }\r\n }\r\n } else {\r\n //console.log('Invalid JPEG file: Missing JPEG marker.')\r\n }\r\n callback(data)\r\n },\r\n 'readAsArrayBuffer'\r\n )) {\r\n callback(data)\r\n }\r\n}\r\n\r\nloadImage.ExifMap = function () {\r\n return this\r\n}\r\n\r\nloadImage.ExifMap.prototype.map = {\r\n 'Orientation': 0x0112\r\n}\r\n\r\nloadImage.ExifMap.prototype.get = function (id) {\r\n return this[id] || this[this.map[id]]\r\n}\r\n\r\nloadImage.getExifThumbnail = function (dataView, offset, length) {\r\n var hexData,\r\n i,\r\n b\r\n if (!length || offset + length > dataView.byteLength) {\r\n //console.log('Invalid Exif data: Invalid thumbnail data.')\r\n return\r\n }\r\n hexData = []\r\n for (i = 0; i < length; i += 1) {\r\n b = dataView.getUint8(offset + i)\r\n hexData.push((b < 16 ? '0' : '') + b.toString(16))\r\n }\r\n return 'data:image/jpeg,%' + hexData.join('%')\r\n}\r\n\r\nloadImage.exifTagTypes = {\r\n // byte, 8-bit unsigned int:\r\n 1: {\r\n getValue: function (dataView, dataOffset) {\r\n return dataView.getUint8(dataOffset)\r\n },\r\n size: 1\r\n },\r\n // ascii, 8-bit byte:\r\n 2: {\r\n getValue: function (dataView, dataOffset) {\r\n return String.fromCharCode(dataView.getUint8(dataOffset))\r\n },\r\n size: 1,\r\n ascii: true\r\n },\r\n // short, 16 bit int:\r\n 3: {\r\n getValue: function (dataView, dataOffset, littleEndian) {\r\n return dataView.getUint16(dataOffset, littleEndian)\r\n },\r\n size: 2\r\n },\r\n // long, 32 bit int:\r\n 4: {\r\n getValue: function (dataView, dataOffset, littleEndian) {\r\n return dataView.getUint32(dataOffset, littleEndian)\r\n },\r\n size: 4\r\n },\r\n // rational = two long values, first is numerator, second is denominator:\r\n 5: {\r\n getValue: function (dataView, dataOffset, littleEndian) {\r\n return dataView.getUint32(dataOffset, littleEndian) /\r\n dataView.getUint32(dataOffset + 4, littleEndian)\r\n },\r\n size: 8\r\n },\r\n // slong, 32 bit signed int:\r\n 9: {\r\n getValue: function (dataView, dataOffset, littleEndian) {\r\n return dataView.getInt32(dataOffset, littleEndian)\r\n },\r\n size: 4\r\n },\r\n // srational, two slongs, first is numerator, second is denominator:\r\n 10: {\r\n getValue: function (dataView, dataOffset, littleEndian) {\r\n return dataView.getInt32(dataOffset, littleEndian) /\r\n dataView.getInt32(dataOffset + 4, littleEndian)\r\n },\r\n size: 8\r\n }\r\n}\r\n// undefined, 8-bit byte, value depending on field:\r\nloadImage.exifTagTypes[7] = loadImage.exifTagTypes[1]\r\n\r\nloadImage.getExifValue = function (dataView, tiffOffset, offset, type, length, littleEndian) {\r\n var tagType = loadImage.exifTagTypes[type]\r\n var tagSize\r\n var dataOffset\r\n var values\r\n var i\r\n var str\r\n var c\r\n if (!tagType) {\r\n //console.log('Invalid Exif data: Invalid tag type.')\r\n return\r\n }\r\n tagSize = tagType.size * length\r\n // Determine if the value is contained in the dataOffset bytes,\r\n // or if the value at the dataOffset is a pointer to the actual data:\r\n dataOffset = tagSize > 4\r\n ? tiffOffset + dataView.getUint32(offset + 8, littleEndian)\r\n : (offset + 8)\r\n if (dataOffset + tagSize > dataView.byteLength) {\r\n //console.log('Invalid Exif data: Invalid data offset.')\r\n return\r\n }\r\n if (length === 1) {\r\n return tagType.getValue(dataView, dataOffset, littleEndian)\r\n }\r\n values = []\r\n for (i = 0; i < length; i += 1) {\r\n values[i] = tagType.getValue(dataView, dataOffset + i * tagType.size, littleEndian)\r\n }\r\n if (tagType.ascii) {\r\n str = ''\r\n // Concatenate the chars:\r\n for (i = 0; i < values.length; i += 1) {\r\n c = values[i]\r\n // Ignore the terminating NULL byte(s):\r\n if (c === '\\u0000') {\r\n break\r\n }\r\n str += c\r\n }\r\n return str\r\n }\r\n return values\r\n}\r\n\r\nloadImage.parseExifTag = function (dataView, tiffOffset, offset, littleEndian, data) {\r\n var tag = dataView.getUint16(offset, littleEndian)\r\n data.exif[tag] = loadImage.getExifValue(\r\n dataView,\r\n tiffOffset,\r\n offset,\r\n dataView.getUint16(offset + 2, littleEndian), // tag type\r\n dataView.getUint32(offset + 4, littleEndian), // tag length\r\n littleEndian\r\n )\r\n}\r\n\r\nloadImage.parseExifTags = function (dataView, tiffOffset, dirOffset, littleEndian, data) {\r\n var tagsNumber,\r\n dirEndOffset,\r\n i\r\n if (dirOffset + 6 > dataView.byteLength) {\r\n //console.log('Invalid Exif data: Invalid directory offset.')\r\n return\r\n }\r\n tagsNumber = dataView.getUint16(dirOffset, littleEndian)\r\n dirEndOffset = dirOffset + 2 + 12 * tagsNumber\r\n if (dirEndOffset + 4 > dataView.byteLength) {\r\n //console.log('Invalid Exif data: Invalid directory size.')\r\n return\r\n }\r\n for (i = 0; i < tagsNumber; i += 1) {\r\n this.parseExifTag(\r\n dataView,\r\n tiffOffset,\r\n dirOffset + 2 + 12 * i, // tag offset\r\n littleEndian,\r\n data\r\n )\r\n }\r\n // Return the offset to the next directory:\r\n return dataView.getUint32(dirEndOffset, littleEndian)\r\n}\r\n\r\nloadImage.parseExifData = function (dataView, offset, length, data, options) {\r\n if (options.disableExif) {\r\n return\r\n }\r\n var tiffOffset = offset + 10\r\n var littleEndian\r\n var dirOffset\r\n var thumbnailData\r\n // Check for the ASCII code for \"Exif\" (0x45786966):\r\n if (dataView.getUint32(offset + 4) !== 0x45786966) {\r\n // No Exif data, might be XMP data instead\r\n return\r\n }\r\n if (tiffOffset + 8 > dataView.byteLength) {\r\n //console.log('Invalid Exif data: Invalid segment size.')\r\n return\r\n }\r\n // Check for the two null bytes:\r\n if (dataView.getUint16(offset + 8) !== 0x0000) {\r\n //console.log('Invalid Exif data: Missing byte alignment offset.')\r\n return\r\n }\r\n // Check the byte alignment:\r\n switch (dataView.getUint16(tiffOffset)) {\r\n case 0x4949:\r\n littleEndian = true\r\n break\r\n case 0x4D4D:\r\n littleEndian = false\r\n break\r\n default:\r\n //console.log('Invalid Exif data: Invalid byte alignment marker.')\r\n return\r\n }\r\n // Check for the TIFF tag marker (0x002A):\r\n if (dataView.getUint16(tiffOffset + 2, littleEndian) !== 0x002A) {\r\n //console.log('Invalid Exif data: Missing TIFF marker.')\r\n return\r\n }\r\n // Retrieve the directory offset bytes, usually 0x00000008 or 8 decimal:\r\n dirOffset = dataView.getUint32(tiffOffset + 4, littleEndian)\r\n // Create the exif object to store the tags:\r\n data.exif = new loadImage.ExifMap()\r\n // Parse the tags of the main image directory and retrieve the\r\n // offset to the next directory, usually the thumbnail directory:\r\n dirOffset = loadImage.parseExifTags(\r\n dataView,\r\n tiffOffset,\r\n tiffOffset + dirOffset,\r\n littleEndian,\r\n data\r\n )\r\n if (dirOffset && !options.disableExifThumbnail) {\r\n thumbnailData = {exif: {}}\r\n dirOffset = loadImage.parseExifTags(\r\n dataView,\r\n tiffOffset,\r\n tiffOffset + dirOffset,\r\n littleEndian,\r\n thumbnailData\r\n )\r\n // Check for JPEG Thumbnail offset:\r\n if (thumbnailData.exif[0x0201]) {\r\n data.exif.Thumbnail = loadImage.getExifThumbnail(\r\n dataView,\r\n tiffOffset + thumbnailData.exif[0x0201],\r\n thumbnailData.exif[0x0202] // Thumbnail data length\r\n )\r\n }\r\n }\r\n // Check for Exif Sub IFD Pointer:\r\n if (data.exif[0x8769] && !options.disableExifSub) {\r\n loadImage.parseExifTags(\r\n dataView,\r\n tiffOffset,\r\n tiffOffset + data.exif[0x8769], // directory offset\r\n littleEndian,\r\n data\r\n )\r\n }\r\n // Check for GPS Info IFD Pointer:\r\n if (data.exif[0x8825] && !options.disableExifGps) {\r\n loadImage.parseExifTags(\r\n dataView,\r\n tiffOffset,\r\n tiffOffset + data.exif[0x8825], // directory offset\r\n littleEndian,\r\n data\r\n )\r\n }\r\n}\r\n\r\n// Registers the Exif parser for the APP1 JPEG meta data segment:\r\nloadImage.metaDataParsers.jpeg[0xffe1].push(loadImage.parseExifData)\r\nvar snabbt = (function() {\r\n\r\nvar tickRequests = [];\r\nvar runningAnimations = [];\r\nvar completedAnimations = [];\r\nvar transformProperty = 'transform';\r\n\r\n// Find which vendor prefix to use\r\nvar styles = window.getComputedStyle(document.documentElement, '');\r\nvar vendorPrefix = (Array.prototype.slice\r\n .call(styles)\r\n .join('') \r\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])\r\n)[1];\r\nif(vendorPrefix === 'webkit')\r\ntransformProperty = 'webkitTransform';\r\n\r\n/* Entry point, only function to be called by user */\r\nvar snabbt = function(arg1, arg2, arg3) {\r\n\r\nvar elements = arg1;\r\n\r\n// If argument is an Array or a NodeList or other list type that can be iterable.\r\n// Loop through and start one animation for each element.\r\nif(elements.length !== undefined) {\r\n var aggregateChainer = {\r\n chainers: [],\r\n then: function(opts) {\r\n return this.snabbt(opts);\r\n },\r\n snabbt: function(opts) {\r\n var len = this.chainers.length;\r\n this.chainers.forEach(function(chainer, index) {\r\n chainer.snabbt(preprocessOptions(opts, index, len));\r\n });\r\n return aggregateChainer;\r\n },\r\n setValue: function(value) {\r\n this.chainers.forEach(function(chainer) {\r\n chainer.setValue(value);\r\n });\r\n return aggregateChainer;\r\n },\r\n finish: function() {\r\n this.chainers.forEach(function(chainer) {\r\n chainer.finish();\r\n });\r\n return aggregateChainer;\r\n },\r\n rollback: function() {\r\n this.chainers.forEach(function(chainer) {\r\n chainer.rollback();\r\n });\r\n return aggregateChainer;\r\n }\r\n };\r\n\r\n for(var i=0, len=elements.length;i 1 && !animation.isStopped()) {\r\n // Loop current animation\r\n options.loop -= 1;\r\n animation.restart();\r\n queueTick(tick);\r\n } else {\r\n if(options.complete) {\r\n options.complete.call(element);\r\n }\r\n\r\n // Start next animation in queue\r\n if(queue.length) {\r\n options = queue.pop();\r\n\r\n start = stateFromOptions(options, end, true);\r\n end = stateFromOptions(options, cloneObject(end));\r\n options = setupAnimationOptions(start, end, options);\r\n\r\n animation = createAnimation(options);\r\n runningAnimations.push([element, animation]);\r\n\r\n animation.tick(time);\r\n queueTick(tick);\r\n }\r\n }\r\n}\r\n\r\nqueueTick(tick);\r\n// Manual animations are not chainable, instead an animation controller object is returned\r\n// with setValue, finish and rollback methods\r\nif(options.manual)\r\n return animation;\r\nreturn chainer;\r\n};\r\n\r\nvar setupAttentionAnimation = function(element, options) {\r\nvar movement = stateFromOptions(options, createState({}));\r\noptions.movement = movement;\r\nvar animation = createAttentionAnimation(options);\r\n\r\nrunningAnimations.push([element, animation]);\r\nfunction tick(time) {\r\n animation.tick(time);\r\n animation.updateElement(element);\r\n if(!animation.completed()) {\r\n queueTick(tick);\r\n } else {\r\n if(options.callback) {\r\n options.callback(element);\r\n }\r\n if(options.loop && options.loop > 1) {\r\n options.loop--;\r\n animation.restart();\r\n queueTick(tick);\r\n }\r\n }\r\n}\r\nqueueTick(tick);\r\n};\r\n\r\nvar stopAnimation = function(element) {\r\nfor(var i= 0,len=runningAnimations.length;i= 0) {\r\n runningAnimations.splice(index,1);\r\n }\r\n\r\n index = indexOfElement(completedAnimations, element);\r\n if (index >= 0) {\r\n completedAnimations.splice(index,1);\r\n }\r\n\r\n};\r\n\r\nvar findAnimationState = function(animationList, element) {\r\nfor(var i=0,len=animationList.length;i delay) {\r\n started = true;\r\n currentTime = time - delay;\r\n\r\n var curr = Math.min(Math.max(0.0, currentTime - startTime), duration);\r\n easing.tick(curr / duration);\r\n this.updateCurrentTransform();\r\n if(this.completed() && manualCallback) {\r\n manualCallback();\r\n }\r\n }\r\n },\r\n\r\n getCurrentState: function() {\r\n return currentState;\r\n },\r\n\r\n setValue: function(_manualValue) {\r\n started = true;\r\n manualValue = Math.min(Math.max(_manualValue, 0.0001), 1 + manualDelayFactor);\r\n },\r\n\r\n updateCurrentTransform: function() {\r\n var tweenValue = easing.getValue();\r\n if(manual) {\r\n var val = Math.max(0.00001, manualValue - manualDelayFactor);\r\n easing.tick(val);\r\n tweenValue = easing.getValue();\r\n }\r\n tweener.tween(tweenValue);\r\n },\r\n\r\n completed: function() {\r\n if(stopped)\r\n return true;\r\n if(startTime === 0) {\r\n return false;\r\n }\r\n return easing.completed();\r\n },\r\n\r\n updateElement: function(element, forceUpdate) {\r\n if(!started && !forceUpdate)\r\n return;\r\n var matrix = tweener.asMatrix();\r\n var properties = tweener.getProperties();\r\n updateElementTransform(element, matrix, perspective);\r\n updateElementProperties(element, properties);\r\n }\r\n};\r\n};\r\n\r\n// ------------------------------\r\n// End Time animation\r\n// ------------------------------\r\n\r\n// ------------------------\r\n// -- AttentionAnimation --\r\n// ------------------------\r\n\r\nvar createAttentionAnimation = function(options) {\r\nvar movement = options.movement;\r\noptions.initialVelocity = 0.1;\r\noptions.equilibriumPosition = 0;\r\nvar spring = createSpringEasing(options);\r\nvar stopped = false;\r\nvar tweenPosition = movement.position;\r\nvar tweenRotation = movement.rotation;\r\nvar tweenRotationPost = movement.rotationPost;\r\nvar tweenScale = movement.scale;\r\nvar tweenSkew = movement.skew;\r\n\r\nvar currentMovement = createState({\r\n position: tweenPosition ? [0, 0, 0] : undefined,\r\n rotation: tweenRotation ? [0, 0, 0] : undefined,\r\n rotationPost: tweenRotationPost ? [0, 0, 0] : undefined,\r\n scale: tweenScale ? [0, 0] : undefined,\r\n skew: tweenSkew ? [0, 0] : undefined,\r\n});\r\n\r\n// Public API\r\nreturn {\r\n stop: function() {\r\n stopped = true;\r\n },\r\n\r\n isStopped: function(time) {\r\n return stopped;\r\n },\r\n\r\n tick: function(time) {\r\n if(stopped)\r\n return;\r\n if(spring.equilibrium)\r\n return;\r\n spring.tick();\r\n\r\n this.updateMovement();\r\n },\r\n\r\n updateMovement:function() {\r\n var value = spring.getValue();\r\n if(tweenPosition) {\r\n currentMovement.position[0] = movement.position[0] * value;\r\n currentMovement.position[1] = movement.position[1] * value;\r\n currentMovement.position[2] = movement.position[2] * value;\r\n }\r\n if(tweenRotation) {\r\n currentMovement.rotation[0] = movement.rotation[0] * value;\r\n currentMovement.rotation[1] = movement.rotation[1] * value;\r\n currentMovement.rotation[2] = movement.rotation[2] * value;\r\n }\r\n if(tweenRotationPost) {\r\n currentMovement.rotationPost[0] = movement.rotationPost[0] * value;\r\n currentMovement.rotationPost[1] = movement.rotationPost[1] * value;\r\n currentMovement.rotationPost[2] = movement.rotationPost[2] * value;\r\n }\r\n if(tweenScale) {\r\n currentMovement.scale[0] = 1 + movement.scale[0] * value;\r\n currentMovement.scale[1] = 1 + movement.scale[1] * value;\r\n }\r\n\r\n if(tweenSkew) {\r\n currentMovement.skew[0] = movement.skew[0] * value;\r\n currentMovement.skew[1] = movement.skew[1] * value;\r\n }\r\n },\r\n\r\n updateElement: function(element) {\r\n updateElementTransform(element, currentMovement.asMatrix());\r\n updateElementProperties(element, currentMovement.getProperties());\r\n },\r\n\r\n getCurrentState: function() {\r\n return currentMovement;\r\n },\r\n\r\n completed: function() {\r\n return spring.equilibrium || stopped;\r\n },\r\n\r\n restart: function() {\r\n // Restart spring\r\n spring = createSpringEasing(options);\r\n }\r\n};\r\n};\r\n\r\n\r\n/**********\r\n* Easings *\r\n***********/\r\n\r\nvar linearEasing = function(value) {\r\nreturn value;\r\n};\r\n\r\nvar ease = function(value) {\r\nreturn (Math.cos(value*Math.PI + Math.PI) + 1)/2;\r\n};\r\n\r\nvar easeIn = function(value) {\r\nreturn value*value;\r\n};\r\n\r\nvar easeOut = function(value) {\r\nreturn -Math.pow(value - 1, 2) + 1;\r\n};\r\n\r\nvar createSpringEasing = function(options) {\r\nvar position = optionOrDefault(options.startPosition, 0);\r\nvar equilibriumPosition = optionOrDefault(options.equilibriumPosition, 1);\r\nvar velocity = optionOrDefault(options.initialVelocity, 0);\r\nvar springConstant = optionOrDefault(options.springConstant, 0.8);\r\nvar deceleration = optionOrDefault(options.springDeceleration, 0.9);\r\nvar mass = optionOrDefault(options.springMass, 10);\r\n\r\nvar equilibrium = false;\r\n\r\n// Public API\r\nreturn {\r\n\r\n tick: function(value) {\r\n if(value === 0.0)\r\n return;\r\n if(equilibrium)\r\n return;\r\n var springForce = -(position - equilibriumPosition) * springConstant;\r\n // f = m * a\r\n // a = f / m\r\n var a = springForce / mass;\r\n // s = v * t\r\n // t = 1 ( for now )\r\n velocity += a;\r\n position += velocity;\r\n\r\n // Deceleration\r\n velocity *= deceleration;\r\n\r\n if(Math.abs(position - equilibriumPosition) < 0.001 && Math.abs(velocity) < 0.001) {\r\n equilibrium = true;\r\n }\r\n },\r\n\r\n resetFrom: function(value) {\r\n position = value;\r\n velocity = 0;\r\n },\r\n\r\n\r\n getValue: function() {\r\n if(equilibrium)\r\n return equilibriumPosition;\r\n return position;\r\n },\r\n\r\n completed: function() {\r\n return equilibrium;\r\n }\r\n};\r\n};\r\n\r\nvar EASING_FUNCS = {\r\n'linear': linearEasing,\r\n'ease': ease,\r\n'easeIn': easeIn,\r\n'easeOut': easeOut,\r\n};\r\n\r\n\r\nvar createEaser = function(easerName, options) {\r\nif(easerName == 'spring') {\r\n return createSpringEasing(options);\r\n}\r\nvar easeFunction = easerName;\r\nif(!isFunction(easerName)) {\r\n easeFunction = EASING_FUNCS[easerName];\r\n}\r\n\r\nvar easer = easeFunction;\r\nvar value = 0;\r\nvar lastValue;\r\n\r\n// Public API\r\nreturn {\r\n tick: function(v) {\r\n value = easer(v);\r\n lastValue = v;\r\n },\r\n\r\n resetFrom: function(value) {\r\n lastValue = 0;\r\n },\r\n\r\n getValue: function() {\r\n return value;\r\n },\r\n\r\n completed: function() {\r\n if(lastValue >= 1) {\r\n return lastValue;\r\n }\r\n return false;\r\n }\r\n};\r\n};\r\n\r\n/***\r\n* Matrix related\r\n*/\r\n\r\nvar assignTranslate = function(matrix, x, y, z) {\r\nmatrix[0] = 1;\r\nmatrix[1] = 0;\r\nmatrix[2] = 0;\r\nmatrix[3] = 0;\r\nmatrix[4] = 0;\r\nmatrix[5] = 1;\r\nmatrix[6] = 0;\r\nmatrix[7] = 0;\r\nmatrix[8] = 0;\r\nmatrix[9] = 0;\r\nmatrix[10] = 1;\r\nmatrix[11] = 0;\r\nmatrix[12] = x;\r\nmatrix[13] = y;\r\nmatrix[14] = z;\r\nmatrix[15] = 1;\r\n};\r\n\r\nvar assignRotateX = function(matrix, rad) {\r\nmatrix[0] = 1;\r\nmatrix[1] = 0;\r\nmatrix[2] = 0;\r\nmatrix[3] = 0;\r\nmatrix[4] = 0;\r\nmatrix[5] = Math.cos(rad);\r\nmatrix[6] = -Math.sin(rad);\r\nmatrix[7] = 0;\r\nmatrix[8] = 0;\r\nmatrix[9] = Math.sin(rad);\r\nmatrix[10] = Math.cos(rad);\r\nmatrix[11] = 0;\r\nmatrix[12] = 0;\r\nmatrix[13] = 0;\r\nmatrix[14] = 0;\r\nmatrix[15] = 1;\r\n};\r\n\r\n\r\nvar assignRotateY = function(matrix, rad) {\r\nmatrix[0] = Math.cos(rad);\r\nmatrix[1] = 0;\r\nmatrix[2] = Math.sin(rad);\r\nmatrix[3] = 0;\r\nmatrix[4] = 0;\r\nmatrix[5] = 1;\r\nmatrix[6] = 0;\r\nmatrix[7] = 0;\r\nmatrix[8] = -Math.sin(rad);\r\nmatrix[9] = 0;\r\nmatrix[10] = Math.cos(rad);\r\nmatrix[11] = 0;\r\nmatrix[12] = 0;\r\nmatrix[13] = 0;\r\nmatrix[14] = 0;\r\nmatrix[15] = 1;\r\n};\r\n\r\nvar assignRotateZ = function(matrix, rad) {\r\nmatrix[0] = Math.cos(rad);\r\nmatrix[1] = -Math.sin(rad);\r\nmatrix[2] = 0;\r\nmatrix[3] = 0;\r\nmatrix[4] = Math.sin(rad);\r\nmatrix[5] = Math.cos(rad);\r\nmatrix[6] = 0;\r\nmatrix[7] = 0;\r\nmatrix[8] = 0;\r\nmatrix[9] = 0;\r\nmatrix[10] = 1;\r\nmatrix[11] = 0;\r\nmatrix[12] = 0;\r\nmatrix[13] = 0;\r\nmatrix[14] = 0;\r\nmatrix[15] = 1;\r\n};\r\n\r\nvar assignSkew = function(matrix, ax, ay) {\r\nmatrix[0] = 1;\r\nmatrix[1] = Math.tan(ax);\r\nmatrix[2] = 0;\r\nmatrix[3] = 0;\r\nmatrix[4] = Math.tan(ay);\r\nmatrix[5] = 1;\r\nmatrix[6] = 0;\r\nmatrix[7] = 0;\r\nmatrix[8] = 0;\r\nmatrix[9] = 0;\r\nmatrix[10] = 1;\r\nmatrix[11] = 0;\r\nmatrix[12] = 0;\r\nmatrix[13] = 0;\r\nmatrix[14] = 0;\r\nmatrix[15] = 1;\r\n};\r\n\r\n\r\nvar assignScale = function(matrix, x, y) {\r\nmatrix[0] = x;\r\nmatrix[1] = 0;\r\nmatrix[2] = 0;\r\nmatrix[3] = 0;\r\nmatrix[4] = 0;\r\nmatrix[5] = y;\r\nmatrix[6] = 0;\r\nmatrix[7] = 0;\r\nmatrix[8] = 0;\r\nmatrix[9] = 0;\r\nmatrix[10] = 1;\r\nmatrix[11] = 0;\r\nmatrix[12] = 0;\r\nmatrix[13] = 0;\r\nmatrix[14] = 0;\r\nmatrix[15] = 1;\r\n};\r\n\r\nvar assignIdentity = function(matrix) {\r\nmatrix[0] = 1;\r\nmatrix[1] = 0;\r\nmatrix[2] = 0;\r\nmatrix[3] = 0;\r\nmatrix[4] = 0;\r\nmatrix[5] = 1;\r\nmatrix[6] = 0;\r\nmatrix[7] = 0;\r\nmatrix[8] = 0;\r\nmatrix[9] = 0;\r\nmatrix[10] = 1;\r\nmatrix[11] = 0;\r\nmatrix[12] = 0;\r\nmatrix[13] = 0;\r\nmatrix[14] = 0;\r\nmatrix[15] = 1;\r\n};\r\n\r\nvar copyArray = function(a, b) {\r\nb[0] = a[0];\r\nb[1] = a[1];\r\nb[2] = a[2];\r\nb[3] = a[3];\r\nb[4] = a[4];\r\nb[5] = a[5];\r\nb[6] = a[6];\r\nb[7] = a[7];\r\nb[8] = a[8];\r\nb[9] = a[9];\r\nb[10] = a[10];\r\nb[11] = a[11];\r\nb[12] = a[12];\r\nb[13] = a[13];\r\nb[14] = a[14];\r\nb[15] = a[15];\r\n};\r\n\r\nvar createMatrix = function() {\r\nvar data = new Float32Array(16);\r\nvar a = new Float32Array(16);\r\nvar b = new Float32Array(16);\r\nassignIdentity(data);\r\n\r\nreturn {\r\n data: data,\r\n\r\n asCSS: function() {\r\n var css = 'matrix3d(';\r\n for(var i=0;i<15;++i) {\r\n if(Math.abs(data[i]) < 0.0001)\r\n css += '0,';\r\n else\r\n css += data[i].toFixed(10) + ',';\r\n }\r\n if(Math.abs(data[15]) < 0.0001)\r\n css += '0)';\r\n else\r\n css += data[15].toFixed(10) + ')';\r\n return css;\r\n },\r\n\r\n clear: function() {\r\n assignIdentity(data);\r\n },\r\n\r\n translate: function(x, y, z) {\r\n copyArray(data, a);\r\n assignTranslate(b, x, y, z);\r\n assignedMatrixMultiplication(a, b, data);\r\n return this;\r\n },\r\n\r\n rotateX: function(radians) {\r\n copyArray(data, a);\r\n assignRotateX(b, radians);\r\n assignedMatrixMultiplication(a, b, data);\r\n return this;\r\n },\r\n\r\n rotateY: function(radians) {\r\n copyArray(data, a);\r\n assignRotateY(b, radians);\r\n assignedMatrixMultiplication(a, b, data);\r\n return this;\r\n },\r\n\r\n rotateZ: function(radians) {\r\n copyArray(data, a);\r\n assignRotateZ(b, radians);\r\n assignedMatrixMultiplication(a, b, data);\r\n return this;\r\n },\r\n\r\n scale: function(x, y) {\r\n copyArray(data, a);\r\n assignScale(b, x, y);\r\n assignedMatrixMultiplication(a, b, data);\r\n return this;\r\n },\r\n\r\n skew: function(ax, ay) {\r\n copyArray(data, a);\r\n assignSkew(b, ax, ay);\r\n assignedMatrixMultiplication(a, b, data);\r\n return this;\r\n }\r\n};\r\n};\r\n\r\nvar assignedMatrixMultiplication = function(a, b, res) {\r\n// Unrolled loop\r\nres[0] = a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12];\r\nres[1] = a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13];\r\nres[2] = a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14];\r\nres[3] = a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15];\r\n\r\nres[4] = a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12];\r\nres[5] = a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13];\r\nres[6] = a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14];\r\nres[7] = a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15];\r\n\r\nres[8] = a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12];\r\nres[9] = a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13];\r\nres[10] = a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14];\r\nres[11] = a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15];\r\n\r\nres[12] = a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12];\r\nres[13] = a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13];\r\nres[14] = a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14];\r\nres[15] = a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15];\r\n\r\nreturn res;\r\n};\r\n\r\nvar createState = function(config) {\r\n// Caching of matrix and properties so we don't have to create new ones everytime they are needed\r\nvar matrix = createMatrix();\r\nvar properties = {\r\n opacity: undefined,\r\n width: undefined,\r\n height: undefined\r\n};\r\n\r\n// Public API\r\nreturn {\r\n position: config.position,\r\n rotation: config.rotation,\r\n rotationPost: config.rotationPost,\r\n skew: config.skew,\r\n scale: config.scale,\r\n scalePost: config.scalePost,\r\n opacity: config.opacity,\r\n width: config.width,\r\n height: config.height,\r\n\r\n\r\n clone: function() {\r\n return createState({\r\n position: this.position ? this.position.slice(0) : undefined,\r\n rotation: this.rotation ? this.rotation.slice(0) : undefined,\r\n rotationPost: this.rotationPost ? this.rotationPost.slice(0) : undefined,\r\n skew: this.skew ? this.skew.slice(0) : undefined,\r\n scale: this.scale ? this.scale.slice(0) : undefined,\r\n scalePost: this.scalePost ? this.scalePost.slice(0) : undefined,\r\n height: this.height,\r\n width: this.width,\r\n opacity: this.opacity\r\n });\r\n },\r\n\r\n asMatrix: function() {\r\n var m = matrix;\r\n m.clear();\r\n\r\n if(this.transformOrigin)\r\n m.translate(-this.transformOrigin[0], -this.transformOrigin[1], -this.transformOrigin[2]);\r\n\r\n if(this.scale) {\r\n m.scale(this.scale[0], this.scale[1]);\r\n }\r\n\r\n if(this.skew) {\r\n m.skew(this.skew[0], this.skew[1]);\r\n }\r\n\r\n if(this.rotation) {\r\n m.rotateX(this.rotation[0]);\r\n m.rotateY(this.rotation[1]);\r\n m.rotateZ(this.rotation[2]);\r\n }\r\n\r\n if(this.position) {\r\n m.translate(this.position[0], this.position[1], this.position[2]);\r\n }\r\n\r\n if(this.rotationPost) {\r\n m.rotateX(this.rotationPost[0]);\r\n m.rotateY(this.rotationPost[1]);\r\n m.rotateZ(this.rotationPost[2]);\r\n }\r\n\r\n if(this.scalePost) {\r\n m.scale(this.scalePost[0], this.scalePost[1]);\r\n }\r\n\r\n if(this.transformOrigin)\r\n m.translate(this.transformOrigin[0], this.transformOrigin[1], this.transformOrigin[2]);\r\n return m;\r\n },\r\n\r\n getProperties: function() {\r\n properties.opacity = this.opacity;\r\n properties.width = this.width + 'px';\r\n properties.height = this.height + 'px';\r\n return properties;\r\n }\r\n};\r\n};\r\n// ------------------\r\n// -- StateTweener -- \r\n// -------------------\r\n\r\nvar createStateTweener = function(startState, endState, resultState) {\r\nvar start = startState;\r\nvar end = endState;\r\nvar result = resultState;\r\n\r\nvar tweenPosition = end.position !== undefined;\r\nvar tweenRotation = end.rotation !== undefined;\r\nvar tweenRotationPost = end.rotationPost !== undefined;\r\nvar tweenScale = end.scale !== undefined;\r\nvar tweenSkew = end.skew !== undefined;\r\nvar tweenWidth = end.width !== undefined;\r\nvar tweenHeight = end.height !== undefined;\r\nvar tweenOpacity = end.opacity !== undefined;\r\n\r\n// Public API\r\nreturn {\r\n\r\n tween: function(tweenValue) {\r\n\r\n if(tweenPosition) {\r\n var dX = (end.position[0] - start.position[0]);\r\n var dY = (end.position[1] - start.position[1]);\r\n var dZ = (end.position[2] - start.position[2]);\r\n result.position[0] = start.position[0] + tweenValue*dX;\r\n result.position[1] = start.position[1] + tweenValue*dY;\r\n result.position[2] = start.position[2] + tweenValue*dZ;\r\n }\r\n\r\n if(tweenRotation) {\r\n var dAX = (end.rotation[0] - start.rotation[0]);\r\n var dAY = (end.rotation[1] - start.rotation[1]);\r\n var dAZ = (end.rotation[2] - start.rotation[2]);\r\n result.rotation[0] = start.rotation[0] + tweenValue*dAX;\r\n result.rotation[1] = start.rotation[1] + tweenValue*dAY;\r\n result.rotation[2] = start.rotation[2] + tweenValue*dAZ;\r\n }\r\n\r\n if(tweenRotationPost) {\r\n var dBX = (end.rotationPost[0] - start.rotationPost[0]);\r\n var dBY = (end.rotationPost[1] - start.rotationPost[1]);\r\n var dBZ = (end.rotationPost[2] - start.rotationPost[2]);\r\n result.rotationPost[0] = start.rotationPost[0] + tweenValue*dBX;\r\n result.rotationPost[1] = start.rotationPost[1] + tweenValue*dBY;\r\n result.rotationPost[2] = start.rotationPost[2] + tweenValue*dBZ;\r\n }\r\n\r\n if(tweenSkew) {\r\n var dSX = (end.scale[0] - start.scale[0]);\r\n var dSY = (end.scale[1] - start.scale[1]);\r\n\r\n result.scale[0] = start.scale[0] + tweenValue*dSX;\r\n result.scale[1] = start.scale[1] + tweenValue*dSY;\r\n }\r\n\r\n if(tweenScale) {\r\n var dSkewX = (end.skew[0] - start.skew[0]);\r\n var dSkewY = (end.skew[1] - start.skew[1]);\r\n\r\n result.skew[0] = start.skew[0] + tweenValue*dSkewX;\r\n result.skew[1] = start.skew[1] + tweenValue*dSkewY;\r\n }\r\n\r\n if(tweenWidth) {\r\n var dWidth = (end.width - start.width);\r\n result.width = start.width + tweenValue*dWidth;\r\n }\r\n\r\n\r\n if(tweenHeight) {\r\n var dHeight = (end.height - start.height);\r\n result.height = start.height + tweenValue*dHeight;\r\n }\r\n\r\n if(tweenOpacity) {\r\n var dOpacity = (end.opacity - start.opacity);\r\n result.opacity = start.opacity + tweenValue*dOpacity;\r\n }\r\n\r\n },\r\n\r\n asMatrix: function() {\r\n return result.asMatrix();\r\n },\r\n\r\n getProperties: function() {\r\n return result.getProperties();\r\n },\r\n\r\n setReverse: function() {\r\n var oldStart = start;\r\n start = end;\r\n end = oldStart;\r\n }\r\n};\r\n};\r\n\r\n// ------------------------\r\n// -- ValueFeederTweener -- \r\n// ------------------------\r\n\r\nvar createValueFeederTweener = function(valueFeeder, startState, endState, resultState) {\r\nvar currentMatrix = valueFeeder(0, createMatrix());\r\nvar start = startState;\r\nvar end = endState;\r\nvar result = resultState;\r\nvar reverse = false;\r\n\r\n\r\n// Public API\r\nreturn {\r\n\r\n tween: function(tweenValue) {\r\n if(reverse)\r\n tweenValue = 1 - tweenValue;\r\n currentMatrix.clear();\r\n currentMatrix = valueFeeder(tweenValue, currentMatrix);\r\n\r\n var dWidth = (end.width - start.width);\r\n var dHeight = (end.height - start.height);\r\n var dOpacity = (end.opacity - start.opacity);\r\n\r\n if(end.width !== undefined)\r\n result.width = start.width + tweenValue*dWidth;\r\n if(end.height !== undefined)\r\n result.height = start.height + tweenValue*dHeight;\r\n if(end.opacity !== undefined)\r\n result.opacity = start.opacity + tweenValue*dOpacity;\r\n },\r\n\r\n asMatrix: function() {\r\n return currentMatrix;\r\n },\r\n\r\n getProperties: function() {\r\n return result.getProperties();\r\n },\r\n\r\n setReverse: function() {\r\n reverse = true;\r\n }\r\n\r\n};\r\n};\r\n\r\nvar optionOrDefault = function(option, def) {\r\nif(typeof option == 'undefined') {\r\n return def;\r\n}\r\nreturn option;\r\n};\r\n\r\nvar updateElementTransform = function(element, matrix, perspective) {\r\nvar cssPerspective = '';\r\nif(perspective) {\r\n cssPerspective = 'perspective(' + perspective + 'px) ';\r\n}\r\nvar cssMatrix = matrix.asCSS();\r\nelement.style[transformProperty] = cssPerspective + cssMatrix;\r\n};\r\n\r\nvar updateElementProperties = function(element, properties) {\r\nfor(var key in properties) {\r\n element.style[key] = properties[key];\r\n}\r\n};\r\n\r\nvar isFunction = function(object) {\r\nreturn (typeof object === \"function\");\r\n};\r\n\r\nvar cloneObject = function(object) {\r\nif(!object)\r\n return object;\r\nvar clone = {};\r\nfor(var key in object) {\r\n clone[key] = object[key];\r\n}\r\nreturn clone;\r\n};\r\n\r\nsnabbt.createMatrix = createMatrix;\r\nsnabbt.setElementTransform = updateElementTransform;\r\nreturn snabbt;\r\n}());\r\nvar stackBlur = (function(){\r\n\r\nvar mul_table = [\r\n 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,\r\n 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,\r\n 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,\r\n 437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,\r\n 497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,\r\n 320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,\r\n 446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,\r\n 329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,\r\n 505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,\r\n 399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,\r\n 324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,\r\n 268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,\r\n 451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,\r\n 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,\r\n 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,\r\n 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];\r\n\r\n\r\nvar shg_table = [\r\n 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17,\r\n 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,\r\n 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,\r\n 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,\r\n 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,\r\n 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,\r\n 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,\r\n 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,\r\n 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,\r\n 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,\r\n 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,\r\n 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\r\n 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\r\n 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\r\n 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\r\n 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ];\r\n\r\nfunction getImageDataFromCanvas(canvas, top_x, top_y, width, height)\r\n{\r\n if (typeof(canvas) == 'string')\r\n canvas = document.getElementById(canvas);\r\n else if (!canvas instanceof HTMLCanvasElement)\r\n return;\r\n\r\n var context = canvas.getContext('2d');\r\n var imageData;\r\n\r\n try {\r\n try {\r\n imageData = context.getImageData(top_x, top_y, width, height);\r\n } catch(e) {\r\n throw new Error(\"unable to access local image data: \" + e);\r\n return;\r\n }\r\n } catch(e) {\r\n throw new Error(\"unable to access image data: \" + e);\r\n }\r\n\r\n return imageData;\r\n}\r\n\r\nfunction processCanvasRGBA(canvas, top_x, top_y, width, height, radius)\r\n{\r\n if (isNaN(radius) || radius < 1) return;\r\n radius |= 0;\r\n\r\n var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);\r\n\r\n imageData = processImageDataRGBA(imageData, top_x, top_y, width, height, radius);\r\n\r\n canvas.getContext('2d').putImageData(imageData, top_x, top_y);\r\n}\r\n\r\nfunction processImageDataRGBA(imageData, top_x, top_y, width, height, radius)\r\n{\r\n var pixels = imageData.data;\r\n\r\n var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum,\r\n r_out_sum, g_out_sum, b_out_sum, a_out_sum,\r\n r_in_sum, g_in_sum, b_in_sum, a_in_sum,\r\n pr, pg, pb, pa, rbs;\r\n\r\n var div = radius + radius + 1;\r\n var w4 = width << 2;\r\n var widthMinus1 = width - 1;\r\n var heightMinus1 = height - 1;\r\n var radiusPlus1 = radius + 1;\r\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\r\n\r\n var stackStart = new BlurStack();\r\n var stack = stackStart;\r\n for (i = 1; i < div; i++)\r\n {\r\n stack = stack.next = new BlurStack();\r\n if (i == radiusPlus1) var stackEnd = stack;\r\n }\r\n stack.next = stackStart;\r\n var stackIn = null;\r\n var stackOut = null;\r\n\r\n yw = yi = 0;\r\n\r\n var mul_sum = mul_table[radius];\r\n var shg_sum = shg_table[radius];\r\n\r\n for (y = 0; y < height; y++)\r\n {\r\n r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;\r\n\r\n r_out_sum = radiusPlus1 * (pr = pixels[yi]);\r\n g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);\r\n b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);\r\n a_out_sum = radiusPlus1 * (pa = pixels[yi+3]);\r\n\r\n r_sum += sumFactor * pr;\r\n g_sum += sumFactor * pg;\r\n b_sum += sumFactor * pb;\r\n a_sum += sumFactor * pa;\r\n\r\n stack = stackStart;\r\n\r\n for (i = 0; i < radiusPlus1; i++)\r\n {\r\n stack.r = pr;\r\n stack.g = pg;\r\n stack.b = pb;\r\n stack.a = pa;\r\n stack = stack.next;\r\n }\r\n\r\n for (i = 1; i < radiusPlus1; i++)\r\n {\r\n p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);\r\n r_sum += (stack.r = (pr = pixels[p])) * (rbs = radiusPlus1 - i);\r\n g_sum += (stack.g = (pg = pixels[p+1])) * rbs;\r\n b_sum += (stack.b = (pb = pixels[p+2])) * rbs;\r\n a_sum += (stack.a = (pa = pixels[p+3])) * rbs;\r\n\r\n r_in_sum += pr;\r\n g_in_sum += pg;\r\n b_in_sum += pb;\r\n a_in_sum += pa;\r\n\r\n stack = stack.next;\r\n }\r\n\r\n\r\n stackIn = stackStart;\r\n stackOut = stackEnd;\r\n for (x = 0; x < width; x++)\r\n {\r\n pixels[yi+3] = pa = (a_sum * mul_sum) >> shg_sum;\r\n if (pa != 0)\r\n {\r\n pa = 255 / pa;\r\n pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;\r\n pixels[yi+1] = ((g_sum * mul_sum) >> shg_sum) * pa;\r\n pixels[yi+2] = ((b_sum * mul_sum) >> shg_sum) * pa;\r\n } else {\r\n pixels[yi] = pixels[yi+1] = pixels[yi+2] = 0;\r\n }\r\n\r\n r_sum -= r_out_sum;\r\n g_sum -= g_out_sum;\r\n b_sum -= b_out_sum;\r\n a_sum -= a_out_sum;\r\n\r\n r_out_sum -= stackIn.r;\r\n g_out_sum -= stackIn.g;\r\n b_out_sum -= stackIn.b;\r\n a_out_sum -= stackIn.a;\r\n\r\n p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;\r\n\r\n r_in_sum += (stackIn.r = pixels[p]);\r\n g_in_sum += (stackIn.g = pixels[p+1]);\r\n b_in_sum += (stackIn.b = pixels[p+2]);\r\n a_in_sum += (stackIn.a = pixels[p+3]);\r\n\r\n r_sum += r_in_sum;\r\n g_sum += g_in_sum;\r\n b_sum += b_in_sum;\r\n a_sum += a_in_sum;\r\n\r\n stackIn = stackIn.next;\r\n\r\n r_out_sum += (pr = stackOut.r);\r\n g_out_sum += (pg = stackOut.g);\r\n b_out_sum += (pb = stackOut.b);\r\n a_out_sum += (pa = stackOut.a);\r\n\r\n r_in_sum -= pr;\r\n g_in_sum -= pg;\r\n b_in_sum -= pb;\r\n a_in_sum -= pa;\r\n\r\n stackOut = stackOut.next;\r\n\r\n yi += 4;\r\n }\r\n yw += width;\r\n }\r\n\r\n\r\n for (x = 0; x < width; x++)\r\n {\r\n g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;\r\n\r\n yi = x << 2;\r\n r_out_sum = radiusPlus1 * (pr = pixels[yi]);\r\n g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);\r\n b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);\r\n a_out_sum = radiusPlus1 * (pa = pixels[yi+3]);\r\n\r\n r_sum += sumFactor * pr;\r\n g_sum += sumFactor * pg;\r\n b_sum += sumFactor * pb;\r\n a_sum += sumFactor * pa;\r\n\r\n stack = stackStart;\r\n\r\n for (i = 0; i < radiusPlus1; i++)\r\n {\r\n stack.r = pr;\r\n stack.g = pg;\r\n stack.b = pb;\r\n stack.a = pa;\r\n stack = stack.next;\r\n }\r\n\r\n yp = width;\r\n\r\n for (i = 1; i <= radius; i++)\r\n {\r\n yi = (yp + x) << 2;\r\n\r\n r_sum += (stack.r = (pr = pixels[yi])) * (rbs = radiusPlus1 - i);\r\n g_sum += (stack.g = (pg = pixels[yi+1])) * rbs;\r\n b_sum += (stack.b = (pb = pixels[yi+2])) * rbs;\r\n a_sum += (stack.a = (pa = pixels[yi+3])) * rbs;\r\n\r\n r_in_sum += pr;\r\n g_in_sum += pg;\r\n b_in_sum += pb;\r\n a_in_sum += pa;\r\n\r\n stack = stack.next;\r\n\r\n if(i < heightMinus1)\r\n {\r\n yp += width;\r\n }\r\n }\r\n\r\n yi = x;\r\n stackIn = stackStart;\r\n stackOut = stackEnd;\r\n for (y = 0; y < height; y++)\r\n {\r\n p = yi << 2;\r\n pixels[p+3] = pa = (a_sum * mul_sum) >> shg_sum;\r\n if (pa > 0)\r\n {\r\n pa = 255 / pa;\r\n pixels[p] = ((r_sum * mul_sum) >> shg_sum) * pa;\r\n pixels[p+1] = ((g_sum * mul_sum) >> shg_sum) * pa;\r\n pixels[p+2] = ((b_sum * mul_sum) >> shg_sum) * pa;\r\n } else {\r\n pixels[p] = pixels[p+1] = pixels[p+2] = 0;\r\n }\r\n\r\n r_sum -= r_out_sum;\r\n g_sum -= g_out_sum;\r\n b_sum -= b_out_sum;\r\n a_sum -= a_out_sum;\r\n\r\n r_out_sum -= stackIn.r;\r\n g_out_sum -= stackIn.g;\r\n b_out_sum -= stackIn.b;\r\n a_out_sum -= stackIn.a;\r\n\r\n p = (x + (((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width)) << 2;\r\n\r\n r_sum += (r_in_sum += (stackIn.r = pixels[p]));\r\n g_sum += (g_in_sum += (stackIn.g = pixels[p+1]));\r\n b_sum += (b_in_sum += (stackIn.b = pixels[p+2]));\r\n a_sum += (a_in_sum += (stackIn.a = pixels[p+3]));\r\n\r\n stackIn = stackIn.next;\r\n\r\n r_out_sum += (pr = stackOut.r);\r\n g_out_sum += (pg = stackOut.g);\r\n b_out_sum += (pb = stackOut.b);\r\n a_out_sum += (pa = stackOut.a);\r\n\r\n r_in_sum -= pr;\r\n g_in_sum -= pg;\r\n b_in_sum -= pb;\r\n a_in_sum -= pa;\r\n\r\n stackOut = stackOut.next;\r\n\r\n yi += width;\r\n }\r\n }\r\n return imageData;\r\n}\r\n\r\nfunction BlurStack()\r\n{\r\n this.r = 0;\r\n this.g = 0;\r\n this.b = 0;\r\n this.a = 0;\r\n this.next = null;\r\n}\r\n\r\nreturn processCanvasRGBA;\r\n\r\n}());\r\n// canvas to blob polyfill\r\n// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob#Polyfill\r\nif (!HTMLCanvasElement.prototype.toBlob) {\r\n\tObject.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {\r\n\t\tvalue: function (callback, type, quality) {\r\n\r\n\t\t\tvar binStr = atob( this.toDataURL(type, quality).split(',')[1] ),\r\n\t\t\t\tlen = binStr.length,\r\n\t\t\t\tarr = new Uint8Array(len);\r\n\r\n\t\t\tfor (var i=0; i 1 && arguments[1] !== undefined ? arguments[1] : 'POST';\r\n var data = arguments[2];\r\n var requestDecorator = arguments[3];\r\n var progress = arguments[4];\r\n var success = arguments[5];\r\n var err = arguments[6];\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n // if progress callback defined handle progress events\r\n if (progress) {\r\n xhr.upload.addEventListener('progress', function (e) {\r\n progress(e.loaded, e.total);\r\n });\r\n }\r\n\r\n // open the request\r\n xhr.open(method, url, true);\r\n\r\n // if request decorator defined pass XMLHttpRequest instance to decorator\r\n if (requestDecorator) {\r\n requestDecorator(xhr, data);\r\n }\r\n\r\n // handle state changes\r\n xhr.onreadystatechange = function () {\r\n if (xhr.readyState === 4 && xhr.status >= 200 && xhr.status < 300) {\r\n var text = xhr.responseText;\r\n\r\n // if no data returned from server assume success\r\n if (!text.length) {\r\n success();\r\n return;\r\n }\r\n\r\n // catch possible PHP content length problem\r\n if (text.indexOf('Content-Length') !== -1) {\r\n err('file-too-big');\r\n return;\r\n }\r\n\r\n // if data returned it should be in suggested JSON format\r\n var obj = void 0;\r\n try {\r\n obj = JSON.parse(xhr.responseText);\r\n } catch (e) {}\r\n\r\n // if is failure response\r\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj.status === 'failure') {\r\n err(obj.message);\r\n return;\r\n }\r\n\r\n success(obj || text);\r\n } else if (xhr.readyState === 4) {\r\n var _obj = void 0;\r\n try {\r\n _obj = JSON.parse(xhr.responseText);\r\n } catch (e) {}\r\n\r\n // if is clean failure response\r\n if ((typeof _obj === 'undefined' ? 'undefined' : _typeof(_obj)) === 'object' && _obj.status === 'failure') {\r\n err(_obj.message);\r\n return;\r\n }\r\n\r\n err('fail');\r\n }\r\n };\r\n\r\n // do request\r\n xhr.send(data);\r\n};\r\n\r\nvar resetTransforms = function resetTransforms(element) {\r\n if (!element) {\r\n return;\r\n }\r\n element.style.webkitTransform = '';\r\n element.style.transform = '';\r\n};\r\n\r\nvar bytesToMegaBytes = function bytesToMegaBytes(b) {\r\n return b / 1000000;\r\n};\r\n\r\nvar megaBytesToBytes = function megaBytesToBytes(mb) {\r\n return mb * 1000000;\r\n};\r\n\r\nvar getCommonMimeTypes = function getCommonMimeTypes() {\r\n var types = [];\r\n var type = void 0;\r\n var mimeType = void 0;\r\n for (type in MimeTypes) {\r\n if (!MimeTypes.hasOwnProperty(type)) {\r\n continue;\r\n }\r\n mimeType = MimeTypes[type];\r\n if (types.indexOf(mimeType) == -1) {\r\n types.push(mimeType);\r\n }\r\n }\r\n return types;\r\n};\r\n\r\nvar isJPEGMimeType = function isJPEGMimeType(type) {\r\n return type === 'image/jpeg';\r\n};\r\n\r\nvar getExtensionByMimeType = function getExtensionByMimeType(mimetype) {\r\n var type = void 0;\r\n for (type in MimeTypes) {\r\n if (!MimeTypes.hasOwnProperty(type)) {\r\n continue;\r\n }\r\n if (MimeTypes[type] === mimetype) {\r\n return type;\r\n }\r\n }\r\n return mimetype;\r\n};\r\n\r\nvar getMimeTypeFromResponseType = function getMimeTypeFromResponseType(responseType) {\r\n var type = void 0;\r\n for (type in MimeTypes) {\r\n if (!MimeTypes.hasOwnProperty(type)) {\r\n continue;\r\n }\r\n if (responseType.indexOf(MimeTypes[type]) !== -1) {\r\n return MimeTypes[type];\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nvar getFileName = function getFileName(path) {\r\n return path.split('/').pop().split('?').shift();\r\n};\r\n\r\nvar leftPad = function leftPad(value) {\r\n var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\r\n return (padding + value).slice(-padding.length);\r\n};\r\n\r\nvar getDateString = function getDateString(date) {\r\n return date.getFullYear() + '-' + leftPad(date.getMonth() + 1, '00') + '-' + leftPad(date.getDate(), '00') + '_' + leftPad(date.getHours(), '00') + '-' + leftPad(date.getMinutes(), '00') + '-' + leftPad(date.getSeconds(), '00');\r\n};\r\n\r\nvar getFileNameByFile = function getFileNameByFile(file) {\r\n if (typeof file.name === 'undefined') {\r\n return getDateString(new Date()) + '.' + getExtensionByMimeType(getFileTypeByFile(file));\r\n }\r\n return file.name;\r\n};\r\n\r\nvar getFileTypeByFile = function getFileTypeByFile(file) {\r\n return file.type || 'image/jpeg';\r\n};\r\n\r\nvar getFileNameWithoutExtension = function getFileNameWithoutExtension(path) {\r\n if (typeof path !== 'string') {\r\n return getDateString(new Date());\r\n }\r\n var name = getFileName(path);\r\n return name.split('.').shift();\r\n};\r\n\r\nvar blobToFile = function blobToFile(blob, name) {\r\n try {\r\n return new File([blob], name, { type: blob.type, lastModified: Date.now() });\r\n } catch (e) {\r\n blob.lastModified = new Date();\r\n blob.name = name;\r\n return blob;\r\n }\r\n};\r\n\r\nvar resourceIsFetchURL = function resourceIsFetchURL(resource) {\r\n return (/^fetch\\//.test(resource)\r\n );\r\n};\r\n\r\nvar resourceIsBase64Data = function resourceIsBase64Data(resource) {\r\n return (/^data:image/.test(resource)\r\n );\r\n};\r\n\r\nvar loadRemoteURL = function loadRemoteURL(fetcher, fetchRequestDecorator, loadRequestDecorator, url, err, cb) {\r\n fetcher = '' + fetcher + (fetcher.indexOf('?') !== -1 ? '&' : '?') + 'url=' + url;\r\n\r\n var xhr = new XMLHttpRequest();\r\n xhr.open('GET', fetcher, true);\r\n fetchRequestDecorator(xhr);\r\n xhr.responseType = 'json';\r\n xhr.onload = function () {\r\n if (this.response.status === 'failure') {\r\n err(this.response.message);\r\n return;\r\n }\r\n\r\n loadURL(this.response.body, loadRequestDecorator, cb);\r\n };\r\n\r\n xhr.send();\r\n};\r\n\r\nvar loadURL = function loadURL(url, requestDecorator, cb, err) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.open('GET', url, true);\r\n requestDecorator(xhr);\r\n xhr.responseType = 'blob';\r\n xhr.onload = function (e) {\r\n\r\n if (xhr.status >= 200 && xhr.status < 300) {\r\n\r\n var name = getFileName(url);\r\n var type = getMimeTypeFromResponseType(this.response.type);\r\n\r\n if (!ImageExtensionsRegex.test(name)) {\r\n name += '.' + getExtensionByMimeType(type);\r\n }\r\n\r\n // get as file\r\n var file = blobToFile(this.response, name);\r\n\r\n // need to set correct type\r\n cb(cloneFile(file, type));\r\n } else {\r\n err(xhr.status + ': ' + xhr.statusText);\r\n }\r\n };\r\n xhr.onerror = function () {\r\n err();\r\n };\r\n\r\n xhr.send();\r\n};\r\n\r\nvar base64ToByteString = function base64ToByteString(dataURI) {\r\n // get data part of string (remove data:image/jpeg...,)\r\n var dataPart = dataURI.split(',')[1];\r\n\r\n // remove any whitespace as that causes InvalidCharacterError in IE\r\n var dataPartCleaned = dataPart.replace(/\\s/g, '');\r\n\r\n // to bytestring\r\n return atob(dataPartCleaned);\r\n};\r\n\r\nvar base64ToArrayBuffer = function base64ToArrayBuffer(dataURI) {\r\n var byteString = base64ToByteString(dataURI);\r\n var ab = new ArrayBuffer(byteString.length);\r\n var ia = new Uint8Array(ab);\r\n\r\n for (var i = 0; i < byteString.length; i++) {\r\n ia[i] = byteString.charCodeAt(i);\r\n }\r\n return ab;\r\n};\r\n\r\nvar base64ToBlob = function base64ToBlob(dataURI, filename) {\r\n var byteString = base64ToByteString(dataURI);\r\n var ab = new ArrayBuffer(byteString.length);\r\n var ia = new Uint8Array(ab);\r\n\r\n for (var i = 0; i < byteString.length; i++) {\r\n ia[i] = byteString.charCodeAt(i);\r\n }\r\n\r\n var mimeType = getMimeTypeFromDataURI(dataURI);\r\n\r\n if (typeof filename === 'undefined') {\r\n filename = getDateString(new Date()) + '.' + getExtensionByMimeType(mimeType);\r\n }\r\n\r\n return blobToFile(createBlob(ab, mimeType), filename);\r\n};\r\n\r\nvar createBlob = function createBlob(data, mimeType) {\r\n var BB = window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\r\n\r\n if (BB) {\r\n var bb = new BB();\r\n bb.append(data);\r\n return bb.getBlob(mimeType);\r\n }\r\n\r\n return new Blob([data], {\r\n type: mimeType\r\n });\r\n};\r\n\r\nvar arrayBufferConcat = function arrayBufferConcat(buffers) {\r\n var length = 0;\r\n var buffer = null;\r\n\r\n for (var i in buffers) {\r\n if (!_arguments.hasOwnProperty(i)) {\r\n continue;\r\n }\r\n buffer = buffers[i];\r\n length += buffer.byteLength;\r\n }\r\n\r\n var joined = new Uint8Array(length);\r\n var offset = 0;\r\n\r\n for (var _i in buffers) {\r\n if (!_arguments.hasOwnProperty(_i)) {\r\n continue;\r\n }\r\n buffer = buffers[_i];\r\n joined.set(new Uint8Array(buffer), offset);\r\n offset += buffer.byteLength;\r\n }\r\n\r\n return joined.buffer;\r\n};\r\n\r\nvar getImageAsCanvas = function getImageAsCanvas(src, size, callback) {\r\n // only cross origin when it's not base64 data, to prevent errors in Safari\r\n // http://stackoverflow.com/questions/31643096/why-does-safari-throw-cors-error-when-setting-base64-data-on-a-crossorigin-an\r\n var crossOrigin = typeof src === 'string' ? src.indexOf('data:image') !== 0 : true;\r\n\r\n loadImage.parseMetaData(src, function (meta) {\r\n var options = {\r\n canvas: true,\r\n crossOrigin: crossOrigin\r\n };\r\n\r\n if (size) {\r\n options.maxWidth = size.width;\r\n options.maxHeight = size.height;\r\n }\r\n\r\n if (meta.exif) {\r\n options.orientation = meta.exif.get('Orientation');\r\n }\r\n\r\n loadImage(src, function (res) {\r\n if (res.type === 'error') {\r\n callback();\r\n return;\r\n }\r\n\r\n callback(res, meta);\r\n }, options);\r\n });\r\n};\r\n\r\nvar getAutoCropRect = function getAutoCropRect(width, height, ratioOut) {\r\n var x,\r\n y,\r\n w,\r\n h,\r\n ratioIn = height / width;\r\n\r\n // if input is portrait and required is landscape\r\n // width is portrait width, height is width times outputRatio\r\n if (ratioIn < ratioOut) {\r\n h = height;\r\n w = h / ratioOut;\r\n x = (width - w) * 0.5;\r\n y = 0;\r\n } else {\r\n // if input is landscape and required is portrait\r\n // height is landscape height, width is height divided by outputRatio\r\n w = width;\r\n h = w * ratioOut;\r\n x = 0;\r\n y = (height - h) * 0.5;\r\n }\r\n\r\n return {\r\n x: x,\r\n y: y,\r\n height: h,\r\n width: w\r\n };\r\n};\r\n\r\nvar transformCanvas = function transformCanvas(canvas) {\r\n var transforms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n var cb = arguments[2];\r\n\r\n var result = create('canvas');\r\n\r\n var rotation = transforms.rotation,\r\n crop = transforms.crop,\r\n size = transforms.size,\r\n filters = transforms.filters,\r\n minSize = transforms.minSize;\r\n\r\n // do crop transforms\r\n\r\n if (crop) {\r\n // do crop\r\n var isTilted = rotation % 180 !== 0;\r\n var space = {\r\n width: isTilted ? canvas.height : canvas.width,\r\n height: isTilted ? canvas.width : canvas.height\r\n };\r\n\r\n // limit crop to size of canvas else safari might return transparent image\r\n if (crop.x < 0) {\r\n crop.x = 0;\r\n }\r\n\r\n if (crop.y < 0) {\r\n crop.y = 0;\r\n }\r\n\r\n if (crop.width > space.width) {\r\n crop.width = space.width;\r\n }\r\n\r\n if (crop.height > space.height) {\r\n crop.height = space.height;\r\n }\r\n\r\n if (crop.y + crop.height > space.height) {\r\n crop.y = Math.max(0, space.height - crop.height);\r\n }\r\n\r\n if (crop.x + crop.width > space.width) {\r\n crop.x = Math.max(0, space.width - crop.width);\r\n }\r\n\r\n // crop offsets in percentages\r\n var px = crop.x / space.width;\r\n var py = crop.y / space.height;\r\n var pw = crop.width / space.width;\r\n var ph = crop.height / space.height;\r\n\r\n // resize canvas to the final crop result size\r\n result.width = crop.width;\r\n result.height = crop.height;\r\n\r\n // draw the crop\r\n var ctx = result.getContext('2d');\r\n\r\n if (rotation === 90) {\r\n ctx.translate(result.width * 0.5, result.height * 0.5);\r\n ctx.rotate(-90 * Math.PI / 180);\r\n ctx.drawImage(canvas,\r\n\r\n // source rectangle (crop area)\r\n (1 - py) * canvas.width - canvas.width * ph, crop.x, crop.height, crop.width,\r\n\r\n // target area (cover)\r\n -result.height * 0.5, -result.width * 0.5, result.height, result.width);\r\n } else if (rotation === 180) {\r\n ctx.translate(result.width * 0.5, result.height * 0.5);\r\n ctx.rotate(-180 * Math.PI / 180);\r\n ctx.drawImage(canvas,\r\n\r\n // source rectangle (crop area)\r\n (1 - (px + pw)) * space.width, (1 - (py + ph)) * space.height, pw * space.width, ph * space.height,\r\n\r\n // target area (cover)\r\n -result.width * 0.5, -result.height * 0.5, result.width, result.height);\r\n } else if (rotation === 270) {\r\n ctx.translate(result.width * 0.5, result.height * 0.5);\r\n ctx.rotate(-270 * Math.PI / 180);\r\n ctx.drawImage(canvas,\r\n\r\n // source rectangle (crop area)\r\n crop.y, (1 - px) * canvas.height - canvas.height * pw, crop.height, crop.width,\r\n\r\n // target area (cover)\r\n -result.height * 0.5, -result.width * 0.5, result.height, result.width);\r\n } else {\r\n ctx.drawImage(canvas,\r\n\r\n // source rectangle (crop area)\r\n crop.x, crop.y, crop.width, crop.height,\r\n\r\n // target area (cover)\r\n 0, 0, result.width, result.height);\r\n }\r\n }\r\n\r\n // do size transforms\r\n if (size) {\r\n var scalarX = size.width / result.width;\r\n var scalarY = size.height / result.height;\r\n var scalar = Math.min(scalarX, scalarY);\r\n\r\n scaleCanvas(result, scalar, size, minSize);\r\n\r\n // sharpen result\r\n if (filters.sharpen > 0) {\r\n filter(result, sharpen(filters.sharpen));\r\n }\r\n }\r\n\r\n cb(result);\r\n};\r\n\r\nfunction scaleCanvas(canvas, scalar, bounds, min) {\r\n\r\n // if not scaling down, bail out\r\n if (scalar >= 1) {\r\n return;\r\n }\r\n\r\n var w = canvas.width;\r\n var h = canvas.height;\r\n\r\n // calculate min target width and height\r\n var targetWidth = Math.max(min.width, Math.min(bounds.width, Math.round(canvas.width * scalar)));\r\n var targetHeight = Math.max(min.height, Math.min(bounds.height, Math.round(canvas.height * scalar)));\r\n\r\n var tmp = canvas;\r\n var ctx = null;\r\n\r\n while (w > targetWidth && h > targetHeight) {\r\n\r\n var c = document.createElement('canvas');\r\n w = Math.round(tmp.width * .5);\r\n h = Math.round(tmp.height * .5);\r\n\r\n if (w < targetWidth) {\r\n w = targetWidth;\r\n }\r\n\r\n if (h < targetHeight) {\r\n h = targetHeight;\r\n }\r\n\r\n c.width = w;\r\n c.height = h;\r\n\r\n ctx = c.getContext('2d');\r\n ctx.drawImage(tmp, 0, 0, w, h);\r\n\r\n tmp = c;\r\n c = null;\r\n }\r\n\r\n canvas.width = targetWidth;\r\n canvas.height = targetHeight;\r\n\r\n ctx = canvas.getContext('2d');\r\n ctx.drawImage(tmp, 0, 0, targetWidth, targetHeight);\r\n}\r\n\r\nvar getPixels = function getPixels(canvas) {\r\n var ctx = canvas.getContext('2d');\r\n return ctx.getImageData(0, 0, canvas.width, canvas.height);\r\n};\r\n\r\nvar filter = function filter(canvas, _filter) {\r\n var ctx = canvas.getContext('2d');\r\n ctx.putImageData(_filter(getPixels(canvas), canvas.width, canvas.height), 0, 0);\r\n};\r\n\r\nvar createImageData = function createImageData(w, h, pixels) {\r\n var c = document.createElement('canvas');\r\n c.width = w;\r\n c.height = h;\r\n var ctx = c.getContext('2d');\r\n var data = ctx.createImageData(c.width, c.height);\r\n if (pixels) {\r\n data.set(pixels.data);\r\n }\r\n return data;\r\n};\r\n\r\nvar sharpen = function sharpen(mix) {\r\n return function (pixels, w, h) {\r\n var weights = [0, -1, 0, -1, 5, -1, 0, -1, 0],\r\n katet = Math.round(Math.sqrt(weights.length)),\r\n half = katet * 0.5 | 0,\r\n dstData = createImageData(w, h),\r\n dstBuff = dstData.data,\r\n srcBuff = pixels.data,\r\n y = h,\r\n x = void 0;\r\n\r\n while (y--) {\r\n x = w;\r\n\r\n while (x--) {\r\n var sy = y,\r\n sx = x,\r\n dstOff = (y * w + x) * 4,\r\n r = 0,\r\n g = 0,\r\n b = 0,\r\n a = 0;\r\n\r\n for (var cy = 0; cy < katet; cy++) {\r\n for (var cx = 0; cx < katet; cx++) {\r\n var scy = sy + cy - half;\r\n var scx = sx + cx - half;\r\n\r\n if (scy >= 0 && scy < h && scx >= 0 && scx < w) {\r\n var srcOff = (scy * w + scx) * 4;\r\n var wt = weights[cy * katet + cx];\r\n\r\n r += srcBuff[srcOff] * wt;\r\n g += srcBuff[srcOff + 1] * wt;\r\n b += srcBuff[srcOff + 2] * wt;\r\n a += srcBuff[srcOff + 3] * wt;\r\n }\r\n }\r\n }\r\n\r\n dstBuff[dstOff] = r * mix + srcBuff[dstOff] * (1 - mix);\r\n dstBuff[dstOff + 1] = g * mix + srcBuff[dstOff + 1] * (1 - mix);\r\n dstBuff[dstOff + 2] = b * mix + srcBuff[dstOff + 2] * (1 - mix);\r\n dstBuff[dstOff + 3] = srcBuff[dstOff + 3];\r\n }\r\n }\r\n\r\n return dstData;\r\n };\r\n};\r\n\r\nvar sizeDist = function sizeDist(rect, canvas) {\r\n var dx = Math.abs(rect.width - canvas.width);\r\n var dy = Math.abs(rect.height - canvas.height);\r\n\r\n return Math.max(dx, dy);\r\n};\r\n\r\nvar cloneCanvas = function cloneCanvas(original) {\r\n if (!original) {\r\n return null;\r\n }\r\n var duplicate = document.createElement('canvas');\r\n var ctx = duplicate.getContext('2d');\r\n duplicate.width = original.width;\r\n duplicate.height = original.height;\r\n ctx.drawImage(original, 0, 0);\r\n return duplicate;\r\n};\r\n\r\nvar cloneCanvasScaled = function cloneCanvasScaled(original, scalar) {\r\n if (!original) {\r\n return null;\r\n }\r\n\r\n var duplicate = document.createElement('canvas');\r\n var ctx = duplicate.getContext('2d');\r\n duplicate.width = original.width;\r\n duplicate.height = original.height;\r\n ctx.drawImage(original, 0, 0);\r\n if (scalar > 0 && scalar !== 1) {\r\n scaleCanvas(duplicate, scalar, {\r\n width: Math.round(original.width * scalar),\r\n height: Math.round(original.height * scalar)\r\n }, {\r\n width: 0,\r\n height: 0\r\n });\r\n }\r\n\r\n return duplicate;\r\n};\r\n\r\nvar canvasHasDimensions = function canvasHasDimensions(canvas) {\r\n return canvas.width && canvas.height;\r\n};\r\n\r\nvar copyCanvas = function copyCanvas(original, destination) {\r\n var ctx = destination.getContext('2d');\r\n if (canvasHasDimensions(destination)) {\r\n ctx.drawImage(original, 0, 0, destination.width, destination.height);\r\n } else {\r\n destination.width = original.width;\r\n destination.height = original.height;\r\n ctx.drawImage(original, 0, 0);\r\n }\r\n};\r\n\r\nvar clearCanvas = function clearCanvas(canvas) {\r\n var ctx = canvas.getContext('2d');\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n};\r\n\r\nvar blurCanvas = function blurCanvas(canvas) {\r\n stackBlur(canvas, 0, 0, canvas.width, canvas.height, 3);\r\n};\r\n\r\nvar covers = function covers(image, rect) {\r\n return parseInt(image.width, 10) >= rect.width && parseInt(image.height, 10) >= rect.height;\r\n};\r\n\r\nvar scaleRect = function scaleRect(rect, w, h) {\r\n return {\r\n x: rect.x * w,\r\n y: rect.y * h,\r\n width: rect.width * w,\r\n height: rect.height * h\r\n };\r\n};\r\n\r\nvar divideRect = function divideRect(rect, w, h) {\r\n return {\r\n x: rect.x / w,\r\n y: rect.y / h,\r\n width: rect.width / w,\r\n height: rect.height / h\r\n };\r\n};\r\n\r\nvar resetFileInput = function resetFileInput(input) {\r\n // no value, no need to reset\r\n if (!input || input.value === '') {\r\n return;\r\n }\r\n\r\n try {\r\n // for modern browsers\r\n input.value = '';\r\n } catch (err) {}\r\n\r\n // for IE10\r\n if (input.value) {\r\n // quickly append input to temp form and reset form\r\n var form = document.createElement('form');\r\n var parentNode = input.parentNode;\r\n var ref = input.nextSibling;\r\n form.appendChild(input);\r\n form.reset();\r\n\r\n // re-inject input where it originally was\r\n if (ref) {\r\n parentNode.insertBefore(input, ref);\r\n } else {\r\n parentNode.appendChild(input);\r\n }\r\n }\r\n};\r\n\r\nvar clone = function clone(obj) {\r\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null) {\r\n return JSON.parse(JSON.stringify(obj));\r\n }\r\n return obj;\r\n};\r\n\r\nvar cloneFile = function cloneFile(file) {\r\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\r\n\r\n if (!file) {\r\n return null;\r\n }\r\n var dupe = file.slice(0, file.size, type || file.type);\r\n dupe.name = file.name;\r\n dupe.lastModified = new Date(file.lastModified);\r\n return dupe;\r\n};\r\n\r\nvar cloneData = function cloneData(obj) {\r\n var dupe = clone(obj);\r\n dupe.input.file = cloneFile(obj.input.file);\r\n dupe.output.image = obj.output.image; ////cloneCanvas(obj.output.image);\r\n return dupe;\r\n};\r\n\r\n/**\r\n * @param image\r\n * @param type\r\n * @param jpegCompression - value between 0 and 100 or undefined/null to use default compression\r\n * @returns {*}\r\n */\r\nvar toDataURL = function toDataURL(image, type, jpegCompression) {\r\n if (!image || !type) {\r\n return null;\r\n }\r\n var canvas = image;\r\n if (image.nodeName === 'IMG') {\r\n canvas = document.createElement('canvas');\r\n canvas.width = image.width;\r\n canvas.height = image.height;\r\n canvas.getContext('2d').drawImage(image, 0, 0);\r\n }\r\n return canvas.toDataURL(type, isJPEGMimeType(type) && typeof jpegCompression === 'number' ? jpegCompression / 100 : undefined);\r\n};\r\n\r\nvar getMimeTypeFromDataURI = function getMimeTypeFromDataURI(dataUri) {\r\n if (!dataUri) {\r\n return null;\r\n }\r\n var matches = dataUri.substr(0, 16).match(/^.+;/);\r\n if (matches.length) {\r\n return matches[0].substring(5, matches[0].length - 1);\r\n }\r\n return null;\r\n};\r\n\r\nvar flattenData = function flattenData(obj) {\r\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\r\n var jpegCompression = arguments[2];\r\n var forcedType = arguments[3];\r\n var async = arguments[4];\r\n\r\n var data = {\r\n server: clone(obj.server),\r\n meta: clone(obj.meta),\r\n input: {\r\n name: obj.input.name,\r\n type: obj.input.type,\r\n size: obj.input.size,\r\n width: obj.input.width,\r\n height: obj.input.height,\r\n field: obj.input.field\r\n }\r\n };\r\n\r\n if (inArray('input', props) && !async) {\r\n data.input.image = toDataURL(obj.input.image, obj.input.type);\r\n }\r\n\r\n if (inArray('output', props)) {\r\n data.output = {\r\n name: forcedType ? getFileNameWithoutExtension(obj.input.name) + '.' + forcedType : obj.input.name,\r\n type: MimeTypes[forcedType] || obj.input.type,\r\n width: obj.output.width,\r\n height: obj.output.height\r\n };\r\n\r\n data.output.image = toDataURL(obj.output.image, data.output.type, jpegCompression);\r\n data.output.type = getMimeTypeFromDataURI(data.output.image);\r\n\r\n // browser problem:\r\n // if output is of type png and input was of type jpeg we need to fix extension of filename\r\n // so instead of testing the above situation we just always fix extension when handling PNGs\r\n if (data.output.type === 'image/png') {\r\n data.output.name = getFileNameWithoutExtension(data.input.name) + '.png';\r\n }\r\n }\r\n\r\n if (inArray('actions', props)) {\r\n data.actions = clone(obj.actions);\r\n }\r\n\r\n return data;\r\n};\r\n\r\nvar downloadCanvas = function downloadCanvas(data, jpegCompression, forcedType) {\r\n var canvas = data.output.image;\r\n var filename = forcedType ? getFileNameWithoutExtension(data.input.name) + '.' + forcedType : data.input.name;\r\n var type = MimeTypes[forcedType] || data.input.type;\r\n\r\n // browser problem:\r\n // if output is of type png and input was of type jpeg we need to fix extension of filename\r\n // so instead of testing the above situation we just always fix extension when handling PNGs\r\n if (type === 'image/png') {\r\n filename = getFileNameWithoutExtension(data.input.name) + '.png';\r\n }\r\n\r\n canvas.toBlob(function (blob) {\r\n if ('msSaveBlob' in window.navigator) {\r\n window.navigator.msSaveBlob(blob, filename);\r\n return;\r\n }\r\n\r\n var url = (window.URL || window.webkitURL).createObjectURL(blob);\r\n\r\n // setup hidden link\r\n var link = create('a');\r\n link.style.display = 'none';\r\n link.download = filename;\r\n link.href = url;\r\n\r\n // attach to DOM otherwise this does not work in Firefox\r\n document.body.appendChild(link);\r\n\r\n // fire click\r\n link.click();\r\n\r\n // delay on remove otherwise does not work in Firefox\r\n setTimeout(function () {\r\n document.body.removeChild(link);\r\n (window.URL || window.webkitURL).revokeObjectURL(url);\r\n }, 0);\r\n }, type, typeof jpegCompression === 'number' ? jpegCompression / 100 : undefined);\r\n};\r\n\r\nvar toggleDisplayBySelector = function toggleDisplayBySelector(selector, enabled, root) {\r\n var node = root.querySelector(selector);\r\n if (!node) {\r\n return;\r\n }\r\n node.style.display = enabled ? '' : 'none';\r\n};\r\n\r\nvar nodeListToArray = function nodeListToArray(nl) {\r\n return Array.prototype.slice.call(nl);\r\n};\r\n\r\nvar removeElement = function removeElement(el) {\r\n el.parentNode.removeChild(el);\r\n};\r\n\r\nvar wrap = function wrap(element) {\r\n var wrapper = create('div');\r\n if (element.parentNode) {\r\n if (element.nextSibling) {\r\n element.parentNode.insertBefore(wrapper, element.nextSibling);\r\n } else {\r\n element.parentNode.appendChild(wrapper);\r\n }\r\n }\r\n wrapper.appendChild(element);\r\n return wrapper;\r\n};\r\n\r\nvar polarToCartesian = function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\r\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\r\n\r\n return {\r\n x: centerX + radius * Math.cos(angleInRadians),\r\n y: centerY + radius * Math.sin(angleInRadians)\r\n };\r\n};\r\n\r\nvar describeArc = function describeArc(x, y, radius, startAngle, endAngle) {\r\n var start = polarToCartesian(x, y, radius, endAngle);\r\n var end = polarToCartesian(x, y, radius, startAngle);\r\n\r\n var arcSweep = endAngle - startAngle <= 180 ? '0' : '1';\r\n\r\n var d = ['M', start.x, start.y, 'A', radius, radius, 0, arcSweep, 0, end.x, end.y].join(' ');\r\n\r\n return d;\r\n};\r\n\r\nvar percentageArc = function percentageArc(x, y, radius, p) {\r\n return describeArc(x, y, radius, 0, p * 360);\r\n};\r\n\r\nvar CropArea = function () {\r\n var resizers = {\r\n n: function n(rect, offset, space, ratio) {\r\n var t, r, b, l, w, h, p, d;\r\n\r\n // bottom is fixed\r\n b = rect.y + rect.height;\r\n\r\n // intended top\r\n t = limit(offset.y, 0, b);\r\n\r\n // if is too small vertically\r\n if (b - t < space.min.height) {\r\n t = b - space.min.height;\r\n }\r\n\r\n // if should scale by ratio, pick width by ratio of new height\r\n w = ratio ? (b - t) / ratio : rect.width;\r\n\r\n // check if has fallen below min width or height\r\n if (w < space.min.width) {\r\n w = space.min.width;\r\n t = b - w * ratio;\r\n }\r\n\r\n // add half to left and half to right edge\r\n p = (w - rect.width) * 0.5;\r\n l = rect.x - p;\r\n r = rect.x + rect.width + p;\r\n\r\n // check if any of the edges has moved out of the available space, if so,\r\n // set max size of rectangle from original position\r\n if (l < 0 || Math.round(r) > Math.round(space.width)) {\r\n // smallest distance to edge of space\r\n d = Math.min(rect.x, space.width - (rect.x + rect.width));\r\n\r\n // new left and right offsets\r\n l = rect.x - d;\r\n r = rect.x + rect.width + d;\r\n\r\n // resulting width\r\n w = r - l;\r\n\r\n // resulting height based on ratio\r\n h = w * ratio;\r\n\r\n // new top position\r\n t = b - h;\r\n }\r\n\r\n return {\r\n x: l,\r\n y: t,\r\n width: r - l,\r\n height: b - t\r\n };\r\n },\r\n s: function s(rect, offset, space, ratio) {\r\n var t, r, b, l, w, h, p, d;\r\n\r\n // top is fixed\r\n t = rect.y;\r\n\r\n // intended bottom\r\n b = limit(offset.y, t, space.height);\r\n\r\n // if is too small vertically\r\n if (b - t < space.min.height) {\r\n b = t + space.min.height;\r\n }\r\n\r\n // if should scale by ratio, pick width by ratio of new height\r\n w = ratio ? (b - t) / ratio : rect.width;\r\n\r\n // check if has fallen below min width or height\r\n if (w < space.min.width) {\r\n w = space.min.width;\r\n b = t + w * ratio;\r\n }\r\n\r\n // add half to left and half to right edge\r\n p = (w - rect.width) * 0.5;\r\n l = rect.x - p;\r\n r = rect.x + rect.width + p;\r\n\r\n // check if any of the edges has moved out of the available space, if so,\r\n // set max size of rectangle from original position\r\n if (l < 0 || Math.round(r) > Math.round(space.width)) {\r\n // smallest distance to edge of space\r\n d = Math.min(rect.x, space.width - (rect.x + rect.width));\r\n\r\n // new left and right offsets\r\n l = rect.x - d;\r\n r = rect.x + rect.width + d;\r\n\r\n // resulting width\r\n w = r - l;\r\n\r\n // resulting height based on ratio\r\n h = w * ratio;\r\n\r\n // new bottom position\r\n b = t + h;\r\n }\r\n\r\n return {\r\n x: l,\r\n y: t,\r\n width: r - l,\r\n height: b - t\r\n };\r\n },\r\n e: function e(rect, offset, space, ratio) {\r\n var t, r, b, l, w, h, p, d;\r\n\r\n // left is fixed\r\n l = rect.x;\r\n\r\n // intended right edge\r\n r = limit(offset.x, l, space.width);\r\n\r\n // if is too small vertically\r\n if (r - l < space.min.width) {\r\n r = l + space.min.width;\r\n }\r\n\r\n // if should scale by ratio, pick height by ratio of new width\r\n h = ratio ? (r - l) * ratio : rect.height;\r\n\r\n // check if has fallen below min width or height\r\n if (h < space.min.height) {\r\n h = space.min.height;\r\n r = l + h / ratio;\r\n }\r\n\r\n // add half to top and bottom\r\n p = (h - rect.height) * 0.5;\r\n t = rect.y - p;\r\n b = rect.y + rect.height + p;\r\n\r\n // check if any of the edges has moved out of the available space, if so,\r\n // set max size of rectangle from original position\r\n if (t < 0 || Math.round(b) > Math.round(space.height)) {\r\n // smallest distance to edge of space\r\n d = Math.min(rect.y, space.height - (rect.y + rect.height));\r\n\r\n // new top and bottom offsets\r\n t = rect.y - d;\r\n b = rect.y + rect.height + d;\r\n\r\n // resulting height\r\n h = b - t;\r\n\r\n // resulting width based on ratio\r\n w = h / ratio;\r\n\r\n // new right position\r\n r = l + w;\r\n }\r\n\r\n return {\r\n x: l,\r\n y: t,\r\n width: r - l,\r\n height: b - t\r\n };\r\n },\r\n w: function w(rect, offset, space, ratio) {\r\n var t, r, b, l, w, h, p, d;\r\n\r\n // right is fixed\r\n r = rect.x + rect.width;\r\n\r\n // intended left edge\r\n l = limit(offset.x, 0, r);\r\n\r\n // if is too small vertically\r\n if (r - l < space.min.width) {\r\n l = r - space.min.width;\r\n }\r\n\r\n // if should scale by ratio, pick height by ratio of new width\r\n h = ratio ? (r - l) * ratio : rect.height;\r\n\r\n // check if has fallen below min width or height\r\n if (h < space.min.height) {\r\n h = space.min.height;\r\n l = r - h / ratio;\r\n }\r\n\r\n // add half to top and bottom\r\n p = (h - rect.height) * 0.5;\r\n t = rect.y - p;\r\n b = rect.y + rect.height + p;\r\n\r\n // check if any of the edges has moved out of the available space, if so,\r\n // set max size of rectangle from original position\r\n if (t < 0 || Math.round(b) > Math.round(space.height)) {\r\n // smallest distance to edge of space\r\n d = Math.min(rect.y, space.height - (rect.y + rect.height));\r\n\r\n // new top and bottom offsets\r\n t = rect.y - d;\r\n b = rect.y + rect.height + d;\r\n\r\n // resulting height\r\n h = b - t;\r\n\r\n // resulting width based on ratio\r\n w = h / ratio;\r\n\r\n // new right position\r\n l = r - w;\r\n }\r\n\r\n return {\r\n x: l,\r\n y: t,\r\n width: r - l,\r\n height: b - t\r\n };\r\n },\r\n ne: function ne(rect, offset, space, ratio) {\r\n var t, r, b, l, w, h, d;\r\n\r\n // left and bottom are fixed\r\n l = rect.x;\r\n b = rect.y + rect.height;\r\n\r\n // intended right edge\r\n r = limit(offset.x, l, space.width);\r\n\r\n // if is too small vertically\r\n if (r - l < space.min.width) {\r\n r = l + space.min.width;\r\n }\r\n\r\n // if should scale by ratio, pick height by ratio of new width\r\n h = ratio ? (r - l) * ratio : limit(b - offset.y, space.min.height, b);\r\n\r\n // check if has fallen below min width or height\r\n if (h < space.min.height) {\r\n h = space.min.height;\r\n r = l + h / ratio;\r\n }\r\n\r\n // add height difference with original height to top\r\n t = rect.y - (h - rect.height);\r\n\r\n // check if any of the edges has moved out of the available space, if so,\r\n // set max size of rectangle from original position\r\n if (t < 0 || Math.round(b) > Math.round(space.height)) {\r\n // smallest distance to edge of space\r\n d = Math.min(rect.y, space.height - (rect.y + rect.height));\r\n\r\n // new top and bottom offsets\r\n t = rect.y - d;\r\n\r\n // resulting height\r\n h = b - t;\r\n\r\n // resulting width based on ratio\r\n w = h / ratio;\r\n\r\n // new right position\r\n r = l + w;\r\n }\r\n\r\n return {\r\n x: l,\r\n y: t,\r\n width: r - l,\r\n height: b - t\r\n };\r\n },\r\n se: function se(rect, offset, space, ratio) {\r\n var t, r, b, l, w, h, d;\r\n\r\n // left and top are fixed\r\n l = rect.x;\r\n t = rect.y;\r\n\r\n // intended right edge\r\n r = limit(offset.x, l, space.width);\r\n\r\n // if is too small vertically\r\n if (r - l < space.min.width) {\r\n r = l + space.min.width;\r\n }\r\n\r\n // if should scale by ratio, pick height by ratio of new width\r\n h = ratio ? (r - l) * ratio : limit(offset.y - rect.y, space.min.height, space.height - t);\r\n\r\n // check if has fallen below min width or height\r\n if (h < space.min.height) {\r\n h = space.min.height;\r\n r = l + h / ratio;\r\n }\r\n\r\n // add height difference with original height to bottom\r\n b = rect.y + rect.height + (h - rect.height);\r\n\r\n // check if any of the edges has moved out of the available space, if so,\r\n // set max size of rectangle from original position\r\n if (t < 0 || Math.round(b) > Math.round(space.height)) {\r\n // smallest distance to edge of space\r\n d = Math.min(rect.y, space.height - (rect.y + rect.height));\r\n\r\n // new bottom offset\r\n b = rect.y + rect.height + d;\r\n\r\n // resulting height\r\n h = b - t;\r\n\r\n // resulting width based on ratio\r\n w = h / ratio;\r\n\r\n // new right position\r\n r = l + w;\r\n }\r\n\r\n return {\r\n x: l,\r\n y: t,\r\n width: r - l,\r\n height: b - t\r\n };\r\n },\r\n sw: function sw(rect, offset, space, ratio) {\r\n var t, r, b, l, w, h, d;\r\n\r\n // right and top are fixed\r\n r = rect.x + rect.width;\r\n t = rect.y;\r\n\r\n // intended left edge\r\n l = limit(offset.x, 0, r);\r\n\r\n // if is too small vertically\r\n if (r - l < space.min.width) {\r\n l = r - space.min.width;\r\n }\r\n\r\n // if should scale by ratio, pick height by ratio of new width\r\n h = ratio ? (r - l) * ratio : limit(offset.y - rect.y, space.min.height, space.height - t);\r\n\r\n // check if has fallen below min width or height\r\n if (h < space.min.height) {\r\n h = space.min.height;\r\n l = r - h / ratio;\r\n }\r\n\r\n // add height difference with original height to bottom\r\n b = rect.y + rect.height + (h - rect.height);\r\n\r\n // check if any of the edges has moved out of the available space, if so,\r\n // set max size of rectangle from original position\r\n if (t < 0 || Math.round(b) > Math.round(space.height)) {\r\n // smallest distance to edge of space\r\n d = Math.min(rect.y, space.height - (rect.y + rect.height));\r\n\r\n // new bottom offset\r\n b = rect.y + rect.height + d;\r\n\r\n // resulting height\r\n h = b - t;\r\n\r\n // resulting width based on ratio\r\n w = h / ratio;\r\n\r\n // new left position\r\n l = r - w;\r\n }\r\n\r\n return {\r\n x: l,\r\n y: t,\r\n width: r - l,\r\n height: b - t\r\n };\r\n },\r\n nw: function nw(rect, offset, space, ratio) {\r\n var t, r, b, l, w, h, d;\r\n\r\n // right and bottom are fixed\r\n r = rect.x + rect.width;\r\n b = rect.y + rect.height;\r\n\r\n // intended left edge\r\n l = limit(offset.x, 0, r);\r\n\r\n // if is too small vertically\r\n if (r - l < space.min.width) {\r\n l = r - space.min.width;\r\n }\r\n\r\n // if should scale by ratio, pick height by ratio of new width\r\n h = ratio ? (r - l) * ratio : limit(b - offset.y, space.min.height, b);\r\n\r\n // check if has fallen below min width or height\r\n if (h < space.min.height) {\r\n h = space.min.height;\r\n l = r - h / ratio;\r\n }\r\n\r\n // add height difference with original height to bottom\r\n t = rect.y - (h - rect.height);\r\n\r\n // check if any of the edges has moved out of the available space, if so,\r\n // set max size of rectangle from original position\r\n if (t < 0 || Math.round(b) > Math.round(space.height)) {\r\n // smallest distance to edge of space\r\n d = Math.min(rect.y, space.height - (rect.y + rect.height));\r\n\r\n // new bottom offset\r\n t = rect.y - d;\r\n\r\n // resulting height\r\n h = b - t;\r\n\r\n // resulting width based on ratio\r\n w = h / ratio;\r\n\r\n // new left position\r\n l = r - w;\r\n }\r\n\r\n return {\r\n x: l,\r\n y: t,\r\n width: r - l,\r\n height: b - t\r\n };\r\n }\r\n };\r\n\r\n /**\r\n * CropArea\r\n */\r\n return function () {\r\n function CropArea() {\r\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.createElement('div');\r\n\r\n _classCallCheck(this, CropArea);\r\n\r\n this._element = element;\r\n\r\n this._interaction = null;\r\n\r\n this._minWidth = 1;\r\n this._minHeight = 1;\r\n\r\n this._ratio = null;\r\n\r\n this._rect = {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n };\r\n\r\n this._space = {\r\n width: 0,\r\n height: 0\r\n };\r\n\r\n this._rectChanged = false;\r\n\r\n this._init();\r\n }\r\n\r\n _createClass(CropArea, [{\r\n key: '_init',\r\n value: function _init() {\r\n this._element.className = 'slim-crop-area';\r\n\r\n // lines\r\n var lines = create('div', 'grid');\r\n this._element.appendChild(lines);\r\n\r\n // corner & edge resize buttons\r\n for (var handler in resizers) {\r\n if (!resizers.hasOwnProperty(handler)) {\r\n continue;\r\n }\r\n var _btn = create('button', handler);\r\n this._element.appendChild(_btn);\r\n }\r\n var btn = create('button', 'c');\r\n this._element.appendChild(btn);\r\n\r\n addEvents(document, Events.DOWN, this);\r\n }\r\n }, {\r\n key: 'reset',\r\n value: function reset() {\r\n this._interaction = null;\r\n\r\n this._rect = {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n };\r\n\r\n this._rectChanged = true;\r\n\r\n this._redraw();\r\n\r\n this._element.dispatchEvent(new CustomEvent('change'));\r\n }\r\n }, {\r\n key: 'rescale',\r\n value: function rescale(scale) {\r\n // no rescale\r\n if (scale === 1) {\r\n return;\r\n }\r\n\r\n this._interaction = null;\r\n\r\n this._rectChanged = true;\r\n\r\n this._rect.x *= scale;\r\n this._rect.y *= scale;\r\n this._rect.width *= scale;\r\n this._rect.height *= scale;\r\n\r\n this._redraw();\r\n\r\n this._element.dispatchEvent(new CustomEvent('change'));\r\n }\r\n }, {\r\n key: 'limit',\r\n value: function limit(width, height) {\r\n this._space.width = width;\r\n this._space.height = height;\r\n }\r\n }, {\r\n key: 'offset',\r\n value: function offset(x, y) {\r\n this._space.x = x;\r\n this._space.y = y;\r\n }\r\n }, {\r\n key: 'resize',\r\n value: function resize(x, y, width, height) {\r\n this._interaction = null;\r\n\r\n this._rect = {\r\n x: limit(x, 0, this._space.width - this._minWidth),\r\n y: limit(y, 0, this._space.height - this._minHeight),\r\n width: limit(width, this._minWidth, this._space.width),\r\n height: limit(height, this._minHeight, this._space.height)\r\n };\r\n\r\n this._rectChanged = true;\r\n\r\n this._redraw();\r\n\r\n this._element.dispatchEvent(new CustomEvent('change'));\r\n }\r\n }, {\r\n key: 'handleEvent',\r\n value: function handleEvent(e) {\r\n switch (e.type) {\r\n case 'touchstart':\r\n case 'pointerdown':\r\n case 'mousedown':\r\n {\r\n this._onStartDrag(e);\r\n }\r\n break;\r\n case 'touchmove':\r\n case 'pointermove':\r\n case 'mousemove':\r\n {\r\n this._onDrag(e);\r\n }\r\n break;\r\n case 'touchend':\r\n case 'touchcancel':\r\n case 'pointerup':\r\n case 'mouseup':\r\n {\r\n this._onStopDrag(e);\r\n }\r\n }\r\n }\r\n }, {\r\n key: '_onStartDrag',\r\n value: function _onStartDrag(e) {\r\n // is not my event?\r\n if (!this._element.contains(e.target)) {\r\n return;\r\n }\r\n\r\n e.preventDefault();\r\n\r\n // listen to drag related events\r\n addEvents(document, Events.MOVE, this);\r\n addEvents(document, Events.UP, this);\r\n\r\n this._interaction = {\r\n type: e.target.className,\r\n offset: getEventOffsetScroll(e)\r\n };\r\n\r\n this._interaction.offset.x -= this._rect.x;\r\n this._interaction.offset.y -= this._rect.y;\r\n\r\n // now dragging\r\n this._element.setAttribute('data-dragging', 'true');\r\n\r\n // start the redraw update loop\r\n this._redraw();\r\n }\r\n }, {\r\n key: '_onDrag',\r\n value: function _onDrag(e) {\r\n e.preventDefault();\r\n\r\n // get local offset for this event\r\n var offset = getEventOffsetScroll(e);\r\n var type = this._interaction.type;\r\n\r\n // drag\r\n if (type === 'c') {\r\n this._rect.x = limit(offset.x - this._interaction.offset.x, 0, this._space.width - this._rect.width);\r\n this._rect.y = limit(offset.y - this._interaction.offset.y, 0, this._space.height - this._rect.height);\r\n } else if (resizers[type]) {\r\n // resize\r\n this._rect = resizers[type](this._rect, {\r\n x: offset.x - this._space.x,\r\n y: offset.y - this._space.y\r\n }, {\r\n x: 0,\r\n y: 0,\r\n width: this._space.width,\r\n height: this._space.height,\r\n min: {\r\n width: this._minWidth,\r\n height: this._minHeight\r\n }\r\n }, this._ratio);\r\n }\r\n\r\n this._rectChanged = true;\r\n\r\n // dispatch\r\n this._element.dispatchEvent(new CustomEvent('input'));\r\n }\r\n }, {\r\n key: '_onStopDrag',\r\n value: function _onStopDrag(e) {\r\n e.preventDefault();\r\n\r\n // stop listening to drag related events\r\n removeEvents(document, Events.MOVE, this);\r\n removeEvents(document, Events.UP, this);\r\n\r\n // no longer interacting, so no need to redraw\r\n this._interaction = null;\r\n\r\n // now dragging\r\n this._element.setAttribute('data-dragging', 'false');\r\n\r\n // fire change event\r\n this._element.dispatchEvent(new CustomEvent('change'));\r\n }\r\n }, {\r\n key: '_redraw',\r\n value: function _redraw() {\r\n var _this = this;\r\n\r\n if (this._rectChanged) {\r\n var transform = 'translate(' + this._rect.x + 'px,' + this._rect.y + 'px);';\r\n this._element.style.cssText = '\\n\\t\\t\\t\\t\\t-webkit-transform: ' + transform + ';\\n\\t\\t\\t\\t\\ttransform: ' + transform + ';\\n\\t\\t\\t\\t\\twidth:' + this._rect.width + 'px;\\n\\t\\t\\t\\t\\theight:' + this._rect.height + 'px;\\n\\t\\t\\t\\t';\r\n\r\n this._rectChanged = false;\r\n }\r\n\r\n // if no longer interacting with crop area stop here\r\n if (!this._interaction) {\r\n return;\r\n }\r\n\r\n // redraw\r\n requestAnimationFrame(function () {\r\n return _this._redraw();\r\n });\r\n }\r\n }, {\r\n key: 'destroy',\r\n value: function destroy() {\r\n this._interaction = false;\r\n this._rectChanged = false;\r\n\r\n removeEvents(document, Events.DOWN, this);\r\n removeEvents(document, Events.MOVE, this);\r\n removeEvents(document, Events.UP, this);\r\n\r\n removeElement(this._element);\r\n }\r\n }, {\r\n key: 'element',\r\n get: function get() {\r\n return this._element;\r\n }\r\n }, {\r\n key: 'space',\r\n get: function get() {\r\n return this._space;\r\n }\r\n }, {\r\n key: 'area',\r\n get: function get() {\r\n var x = this._rect.x / this._space.width;\r\n var y = this._rect.y / this._space.height;\r\n var width = this._rect.width / this._space.width;\r\n var height = this._rect.height / this._space.height;\r\n\r\n return {\r\n x: x,\r\n y: y,\r\n width: width,\r\n height: height\r\n };\r\n }\r\n }, {\r\n key: 'dirty',\r\n get: function get() {\r\n return this._rect.x !== 0 || this._rect.y !== 0 || this._rect.width !== 0 || this._rect.height !== 0;\r\n }\r\n }, {\r\n key: 'minWidth',\r\n set: function set(value) {\r\n this._minWidth = Math.max(value, 1);\r\n }\r\n }, {\r\n key: 'minHeight',\r\n set: function set(value) {\r\n this._minHeight = Math.max(value, 1);\r\n }\r\n }, {\r\n key: 'ratio',\r\n set: function set(value) {\r\n this._ratio = value;\r\n }\r\n }]);\r\n\r\n return CropArea;\r\n }();\r\n}();\r\n\r\nvar ImageEditor = function () {\r\n /**\r\n * ImageEditor\r\n * @param element\r\n * @param options\r\n * @constructor\r\n */\r\n\r\n var CropAreaEvents = ['input', 'change'];\r\n\r\n var ImageEditor = function () {\r\n function ImageEditor() {\r\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.createElement('div');\r\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n\r\n _classCallCheck(this, ImageEditor);\r\n\r\n this._element = element;\r\n this._options = mergeOptions(ImageEditor.options(), options);\r\n\r\n this._ratio = null;\r\n this._output = null;\r\n this._rotating = false;\r\n\r\n this._input = null;\r\n\r\n this._preview = null;\r\n this._previewBlurred = null;\r\n\r\n this._blurredPreview = false;\r\n\r\n this._cropper = null;\r\n this._straightCrop = null;\r\n this._previewWrapper = null;\r\n this._currentWindowSize = {};\r\n\r\n this._btnGroup = null;\r\n this._maskFrame = null;\r\n\r\n this._dirty = false;\r\n\r\n this._wrapperRotation = 0;\r\n this._wrapperScale = 1.0;\r\n\r\n this._init();\r\n }\r\n\r\n _createClass(ImageEditor, [{\r\n key: '_init',\r\n value: function _init() {\r\n var _this2 = this;\r\n\r\n this._element.className = 'slim-image-editor';\r\n\r\n // container\r\n this._container = create('div', 'slim-container');\r\n\r\n // wrapper\r\n this._wrapper = create('div', 'slim-wrapper');\r\n\r\n // photo crop mark container\r\n this._stage = create('div', 'slim-stage');\r\n this._container.appendChild(this._stage);\r\n\r\n // create crop marks\r\n this._cropper = new CropArea();\r\n CropAreaEvents.forEach(function (e) {\r\n _this2._cropper.element.addEventListener(e, _this2);\r\n });\r\n this._stage.appendChild(this._cropper.element);\r\n\r\n // canvas ghost\r\n this._previewWrapper = create('div', 'slim-image-editor-preview slim-crop-preview');\r\n this._previewBlurred = create('canvas', 'slim-crop-blur');\r\n this._previewWrapper.appendChild(this._previewBlurred);\r\n this._wrapper.appendChild(this._previewWrapper);\r\n\r\n this._previewMask = create('div', 'slim-crop-mask');\r\n this._preview = create('img');\r\n this._previewMask.appendChild(this._preview);\r\n this._cropper.element.appendChild(this._previewMask);\r\n\r\n // buttons\r\n this._btnGroup = create('div', 'slim-editor-btn-group');\r\n ImageEditor.Buttons.forEach(function (c) {\r\n var prop = capitalizeFirstLetter(c);\r\n var label = _this2._options['button' + prop + 'Label'];\r\n var title = _this2._options['button' + prop + 'Title'];\r\n var className = _this2._options['button' + prop + 'ClassName'];\r\n var btn = create('button', 'slim-editor-btn slim-btn-' + c + (className ? ' ' + className : ''));\r\n btn.innerHTML = label;\r\n btn.title = title || label;\r\n btn.type = 'button';\r\n btn.setAttribute('data-action', c);\r\n btn.addEventListener('click', _this2);\r\n _this2._btnGroup.appendChild(btn);\r\n });\r\n\r\n // utils\r\n this._utilsGroup = create('div', 'slim-editor-utils-group');\r\n\r\n // create rotation button\r\n var btn = create('button', 'slim-editor-utils-btn slim-btn-rotate' + (this._options.buttonRotateClassName ? ' ' + this._options.buttonRotateClassName : ''));\r\n btn.setAttribute('data-action', 'rotate');\r\n btn.addEventListener('click', this);\r\n btn.title = this._options.buttonRotateTitle;\r\n this._utilsGroup.appendChild(btn);\r\n\r\n this._container.appendChild(this._wrapper);\r\n\r\n this._element.appendChild(this._container);\r\n this._element.appendChild(this._utilsGroup);\r\n this._element.appendChild(this._btnGroup);\r\n }\r\n }, {\r\n key: 'dirty',\r\n value: function dirty() {\r\n this._dirty = true;\r\n }\r\n }, {\r\n key: 'handleEvent',\r\n value: function handleEvent(e) {\r\n switch (e.type) {\r\n case 'click':\r\n this._onClick(e);\r\n break;\r\n case 'change':\r\n this._onGridChange(e);\r\n break;\r\n case 'input':\r\n this._onGridInput(e);\r\n break;\r\n case 'keydown':\r\n this._onKeyDown(e);\r\n break;\r\n case 'resize':\r\n this._onResize(e);\r\n break;\r\n }\r\n }\r\n }, {\r\n key: '_onKeyDown',\r\n value: function _onKeyDown(e) {\r\n switch (e.keyCode) {\r\n case Key.RETURN:\r\n {\r\n this._confirm();\r\n break;\r\n }\r\n case Key.ESC:\r\n {\r\n this._cancel();\r\n break;\r\n }\r\n }\r\n }\r\n }, {\r\n key: '_onClick',\r\n value: function _onClick(e) {\r\n if (e.target.classList.contains('slim-btn-cancel')) {\r\n this._cancel();\r\n }\r\n\r\n if (e.target.classList.contains('slim-btn-confirm')) {\r\n this._confirm();\r\n }\r\n\r\n if (e.target.classList.contains('slim-btn-rotate')) {\r\n this._rotate();\r\n }\r\n }\r\n }, {\r\n key: '_onResize',\r\n value: function _onResize() {\r\n // remember window size\r\n this._currentWindowSize = {\r\n width: window.innerWidth,\r\n height: window.innerHeight\r\n };\r\n\r\n // redraw the image editor based on new dimensions\r\n this._redraw();\r\n\r\n this._redrawCropper(this._cropper.area);\r\n\r\n this._updateWrapperScale();\r\n\r\n // apply rotation and scale\r\n this._redrawWrapper();\r\n }\r\n }, {\r\n key: '_redrawWrapper',\r\n value: function _redrawWrapper() {\r\n var matrix = snabbt.createMatrix();\r\n matrix.scale(this._wrapperScale, this._wrapperScale);\r\n matrix.rotateZ(this._wrapperRotation * (Math.PI / 180));\r\n snabbt.setElementTransform(this._previewWrapper, matrix);\r\n }\r\n }, {\r\n key: '_onGridInput',\r\n value: function _onGridInput() {\r\n this._redrawCropMask();\r\n }\r\n }, {\r\n key: '_onGridChange',\r\n value: function _onGridChange() {\r\n this._redrawCropMask();\r\n }\r\n }, {\r\n key: '_updateWrapperRotation',\r\n value: function _updateWrapperRotation() {\r\n if (this._options.minSize.width > this._input.height || this._options.minSize.height > this._input.width) {\r\n this._wrapperRotation += 180;\r\n } else {\r\n this._wrapperRotation += 90;\r\n }\r\n }\r\n }, {\r\n key: '_updateWrapperScale',\r\n value: function _updateWrapperScale() {\r\n // test if is tilted\r\n var isTilted = this._wrapperRotation % 180 !== 0;\r\n\r\n // if tilted determine correct scale factor\r\n if (isTilted) {\r\n // maximum size\r\n var maxWidth = this._container.offsetWidth;\r\n var maxHeight = this._container.offsetHeight;\r\n\r\n // get wrapper size\r\n var wrapperWidth = this._wrapper.offsetHeight;\r\n var wrapperHeight = this._wrapper.offsetWidth;\r\n\r\n var scalar = maxWidth / wrapperWidth;\r\n if (scalar * wrapperHeight > maxHeight) {\r\n scalar = maxHeight / wrapperHeight;\r\n }\r\n\r\n this._wrapperScale = scalar;\r\n } else {\r\n this._wrapperScale = 1.0;\r\n }\r\n }\r\n\r\n /**\r\n * Action handlers\r\n */\r\n\r\n }, {\r\n key: '_cancel',\r\n value: function _cancel() {\r\n if (this._rotating) {\r\n return;\r\n }\r\n\r\n this._element.dispatchEvent(new CustomEvent('cancel'));\r\n }\r\n }, {\r\n key: '_confirm',\r\n value: function _confirm() {\r\n if (this._rotating) {\r\n return;\r\n }\r\n\r\n var isTilted = this._wrapperRotation % 180 !== 0;\r\n var area = this._cropper.area;\r\n\r\n var result = scaleRect(area, isTilted ? this._input.height : this._input.width, isTilted ? this._input.width : this._input.height);\r\n\r\n this._element.dispatchEvent(new CustomEvent('confirm', {\r\n detail: {\r\n rotation: this._wrapperRotation % 360,\r\n crop: result\r\n }\r\n }));\r\n }\r\n }, {\r\n key: '_rotate',\r\n value: function _rotate() {\r\n var _this3 = this;\r\n\r\n if (this._rotating) {\r\n return;\r\n }\r\n\r\n this._rotating = true;\r\n\r\n // rotate!\r\n this._updateWrapperRotation();\r\n\r\n // only pass current rect if is 1:1 or free\r\n var rect = this.ratio === 1 || this._ratio === null ? this._cropper.area : null;\r\n if (rect) {\r\n rotate(rect, 90);\r\n }\r\n\r\n // wrapper might also need to be scaled\r\n this._updateWrapperScale();\r\n\r\n // hide the cropper\r\n this._hideCropper();\r\n\r\n // rotation effect\r\n snabbt(this._previewWrapper, {\r\n rotation: [0, 0, this._wrapperRotation * (Math.PI / 180)],\r\n scale: [this._wrapperScale, this._wrapperScale],\r\n easing: 'spring',\r\n springConstant: 0.8,\r\n springDeceleration: 0.65,\r\n complete: function complete() {\r\n // redraws auto cropper\r\n _this3._redrawCropper(rect);\r\n\r\n // shows the cropper\r\n _this3._showCropper();\r\n\r\n // done rotating\r\n _this3._rotating = false;\r\n }\r\n });\r\n }\r\n }, {\r\n key: '_showCropper',\r\n value: function _showCropper() {\r\n snabbt(this._stage, {\r\n easing: 'ease',\r\n duration: 250,\r\n fromOpacity: 0,\r\n opacity: 1.0\r\n });\r\n }\r\n }, {\r\n key: '_hideCropper',\r\n value: function _hideCropper() {\r\n snabbt(this._stage, {\r\n duration: 0,\r\n fromOpacity: 0,\r\n opacity: 0\r\n });\r\n }\r\n }, {\r\n key: '_redrawCropMask',\r\n value: function _redrawCropMask() {\r\n var _this4 = this;\r\n\r\n // get rotation\r\n var rotation = this._wrapperRotation % 360;\r\n\r\n // get scale\r\n var scale = this._wrapperScale;\r\n\r\n // get image size\r\n var canvas = {\r\n width: this._wrapper.offsetWidth,\r\n height: this._wrapper.offsetHeight\r\n };\r\n\r\n // get default mask cropper area\r\n var mask = this._cropper.area;\r\n var preview = {\r\n x: 0,\r\n y: 0\r\n };\r\n\r\n if (rotation === 0) {\r\n preview.x = -mask.x;\r\n preview.y = -mask.y;\r\n } else if (rotation === 90) {\r\n preview.x = -(1 - mask.y);\r\n preview.y = -mask.x;\r\n } else if (rotation === 180) {\r\n preview.x = -(1 - mask.x);\r\n preview.y = -(1 - mask.y);\r\n } else if (rotation === 270) {\r\n preview.x = -mask.y;\r\n preview.y = -(1 - mask.x);\r\n }\r\n\r\n // scale rect to fit canvas\r\n preview.x *= canvas.width;\r\n preview.y *= canvas.height;\r\n\r\n // update on next frame (so it's in sync with crop area redraw)\r\n cancelAnimationFrame(this._maskFrame);\r\n this._maskFrame = requestAnimationFrame(function () {\r\n var transform = 'scale(' + scale + ') rotate(' + -rotation + 'deg) translate(' + preview.x + 'px, ' + preview.y + 'px);';\r\n _this4._preview.style.cssText = '\\n\\t\\t\\t\\t\\twidth: ' + _this4._previewSize.width + 'px;\\n\\t\\t\\t\\t\\theight: ' + _this4._previewSize.height + 'px;\\n\\t\\t\\t\\t\\t-webkit-transform: ' + transform + ';\\n\\t\\t\\t\\t\\ttransform: ' + transform + ';\\n\\t\\t\\t\\t';\r\n });\r\n }\r\n }, {\r\n key: 'open',\r\n value: function open(image, ratio, crop, rotation, complete) {\r\n var _this5 = this;\r\n\r\n // test if is same image\r\n if (this._input && !this._dirty && this._ratio === ratio) {\r\n complete();\r\n return;\r\n }\r\n\r\n // remember current window size\r\n this._currentWindowSize = {\r\n width: window.innerWidth,\r\n height: window.innerHeight\r\n };\r\n\r\n // reset dirty value\r\n this._dirty = false;\r\n\r\n // reset rotation\r\n this._wrapperRotation = rotation || 0;\r\n\r\n // we'll always have to blur the preview of a newly opened image\r\n this._blurredPreview = false;\r\n\r\n // set ratio\r\n this._ratio = ratio;\r\n\r\n // reset preview size\r\n this._previewSize = null;\r\n\r\n // hide editor\r\n this._element.style.opacity = '0';\r\n\r\n // set as new input image\r\n this._input = image;\r\n\r\n // calculate crop\r\n var tilted = rotation % 180 !== 0;\r\n var relativeCrop = divideRect(crop, tilted ? image.height : image.width, tilted ? image.width : image.height);\r\n\r\n // preview has now loaded\r\n this._preview.onload = function () {\r\n // reset onload listener\r\n _this5._preview.onload = null;\r\n\r\n // setup cropper\r\n _this5._cropper.ratio = _this5.ratio;\r\n\r\n // redraw view (for first time)\r\n _this5._redraw();\r\n\r\n // redraw cropper\r\n _this5._redrawCropper(relativeCrop);\r\n\r\n // done\r\n complete();\r\n\r\n // fade in\r\n _this5._element.style.opacity = '';\r\n };\r\n\r\n // load lower resolution preview image\r\n this._preview.src = '';\r\n this._preview.src = cloneCanvasScaled(this._input, Math.min(this._container.offsetWidth / this._input.width, this._container.offsetHeight / this._input.height) * this._options.devicePixelRatio).toDataURL();\r\n }\r\n }, {\r\n key: '_redrawCropper',\r\n value: function _redrawCropper(rect) {\r\n var isTilted = this._wrapperRotation % 180 !== 0;\r\n\r\n // image ratio\r\n var imageRatio = isTilted ? this._input.height / this._input.width : this._input.width / this._input.height;\r\n\r\n // get dimensions of image wrapper\r\n var width = this._wrapper.offsetWidth;\r\n var height = this._wrapper.offsetHeight;\r\n\r\n // get space\r\n var maxWidth = this._container.offsetWidth;\r\n var maxHeight = this._container.offsetHeight;\r\n\r\n // rescale wrapper\r\n this._updateWrapperScale();\r\n\r\n // position cropper container to fit wrapper\r\n var sw = this._wrapperScale * (isTilted ? height : width);\r\n var sh = this._wrapperScale * (isTilted ? width : height);\r\n var sx = isTilted ? (maxWidth - sw) * 0.5 : this._wrapper.offsetLeft;\r\n var sy = isTilted ? (maxHeight - sh) * 0.5 : this._wrapper.offsetTop;\r\n\r\n this._stage.style.cssText = '\\n\\t\\t\\t\\tleft:' + sx + 'px;\\n\\t\\t\\t\\ttop:' + sy + 'px;\\n\\t\\t\\t\\twidth:' + sw + 'px;\\n\\t\\t\\t\\theight:' + sh + 'px;\\n\\t\\t\\t';\r\n\r\n // set new size limit for crops\r\n // use image ratio so we have exact amount of pixels\r\n this._cropper.limit(sw, sw / imageRatio);\r\n this._cropper.offset(sx + this._element.offsetLeft, sy + this._element.offsetTop);\r\n\r\n // set min and max height of cropper\r\n this._cropper.minWidth = this._wrapperScale * this._options.minSize.width * this.scalar;\r\n this._cropper.minHeight = this._wrapperScale * this._options.minSize.height * this.scalar;\r\n\r\n // set crop rect\r\n var crop = null;\r\n if (rect) {\r\n crop = {\r\n x: rect.x * sw,\r\n y: rect.y * sh,\r\n width: rect.width * sw,\r\n height: rect.height * sh\r\n };\r\n } else {\r\n crop = getAutoCropRect(sw, sh, this._ratio || sh / sw);\r\n }\r\n\r\n this._cropper.resize(crop.x, crop.y, crop.width, crop.height);\r\n }\r\n }, {\r\n key: '_redraw',\r\n value: function _redraw() {\r\n // image ratio\r\n var ratio = this._input.height / this._input.width;\r\n\r\n // determine rounded size\r\n var maxWidth = this._container.clientWidth;\r\n var maxHeight = this._container.clientHeight;\r\n\r\n var width = maxWidth;\r\n var height = width * ratio;\r\n\r\n if (height > maxHeight) {\r\n height = maxHeight;\r\n width = height / ratio;\r\n }\r\n\r\n width = Math.round(width);\r\n height = Math.round(height);\r\n\r\n // rescale and recenter wrapper\r\n var x = (maxWidth - width) / 2;\r\n var y = (maxHeight - height) / 2;\r\n\r\n this._wrapper.style.cssText = '\\n\\t\\t\\t\\tleft:' + x + 'px;\\n\\t\\t\\t\\ttop:' + y + 'px;\\n\\t\\t\\t\\twidth:' + width + 'px;\\n\\t\\t\\t\\theight:' + height + 'px;\\n\\t\\t\\t';\r\n\r\n // set image size based on container dimensions\r\n this._previewBlurred.style.cssText = '\\n\\t\\t\\t\\twidth:' + width + 'px;\\n\\t\\t\\t\\theight:' + height + 'px;\\n\\t\\t\\t';\r\n\r\n this._preview.style.cssText = '\\n\\t\\t\\t\\twidth:' + width + 'px;\\n\\t\\t\\t\\theight:' + height + 'px;\\n\\t\\t\\t';\r\n\r\n this._previewSize = {\r\n width: width,\r\n height: height\r\n };\r\n\r\n // scale and blur the blurry preview\r\n if (!this._blurredPreview) {\r\n this._previewBlurred.width = 300;\r\n this._previewBlurred.height = this._previewBlurred.width * ratio;\r\n\r\n copyCanvas(this._input, this._previewBlurred);\r\n\r\n blurCanvas(this._previewBlurred, 3);\r\n\r\n this._blurredPreview = true;\r\n }\r\n }\r\n }, {\r\n key: 'show',\r\n value: function show() {\r\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\r\n\r\n // test if window size has changed since previous showing\r\n if (this._currentWindowSize.width !== window.innerWidth || this._currentWindowSize.height !== window.innerHeight) {\r\n // if so, reposition elements\r\n this._redraw();\r\n\r\n // redraw cropper position\r\n this._redrawCropper(this._cropper.area);\r\n }\r\n\r\n // listen to keydown so we can close or confirm with RETURN / ESC\r\n document.addEventListener('keydown', this);\r\n\r\n // when window is scaled we want to resize the editor\r\n window.addEventListener('resize', this);\r\n\r\n // fade in preview\r\n var rotation = this._wrapperRotation * (Math.PI / 180);\r\n snabbt(this._previewWrapper, {\r\n fromRotation: [0, 0, rotation],\r\n rotation: [0, 0, rotation],\r\n fromPosition: [0, 0, 0],\r\n position: [0, 0, 0],\r\n fromOpacity: 0,\r\n opacity: 1,\r\n fromScale: [this._wrapperScale - 0.02, this._wrapperScale - 0.02],\r\n scale: [this._wrapperScale, this._wrapperScale],\r\n easing: 'spring',\r\n springConstant: 0.3,\r\n springDeceleration: 0.85,\r\n delay: 450,\r\n complete: function complete() {\r\n // don't reset transforms because we need rotation to stick\r\n }\r\n });\r\n\r\n if (this._cropper.dirty) {\r\n // now show cropper\r\n snabbt(this._stage, {\r\n fromPosition: [0, 0, 0],\r\n position: [0, 0, 0],\r\n fromOpacity: 0,\r\n opacity: 1,\r\n duration: 250,\r\n delay: 850,\r\n complete: function complete() {\r\n resetTransforms(this);\r\n callback();\r\n }\r\n });\r\n } else {\r\n // now show cropper\r\n snabbt(this._stage, {\r\n fromPosition: [0, 0, 0],\r\n position: [0, 0, 0],\r\n fromOpacity: 0,\r\n opacity: 1,\r\n duration: 250,\r\n delay: 1000,\r\n complete: function complete() {\r\n resetTransforms(this);\r\n }\r\n });\r\n }\r\n\r\n // now show buttons\r\n snabbt(this._btnGroup.childNodes, {\r\n fromScale: [0.9, 0.9],\r\n scale: [1, 1],\r\n fromOpacity: 0,\r\n opacity: 1,\r\n delay: function delay(i) {\r\n return 1000 + i * 100;\r\n },\r\n easing: 'spring',\r\n springConstant: 0.3,\r\n springDeceleration: 0.85,\r\n complete: function complete() {\r\n resetTransforms(this);\r\n }\r\n });\r\n\r\n snabbt(this._utilsGroup.childNodes, {\r\n fromScale: [0.9, 0.9],\r\n scale: [1, 1],\r\n fromOpacity: 0,\r\n opacity: 1,\r\n easing: 'spring',\r\n springConstant: 0.3,\r\n springDeceleration: 0.85,\r\n delay: 1250,\r\n complete: function complete() {\r\n resetTransforms(this);\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'hide',\r\n value: function hide() {\r\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\r\n\r\n // no more need to listen to keydown\r\n document.removeEventListener('keydown', this);\r\n\r\n // no more need to resize editor when window is scaled\r\n window.removeEventListener('resize', this);\r\n\r\n // fade out buttons\r\n snabbt(this._utilsGroup.childNodes, {\r\n fromOpacity: 1,\r\n opacity: 0,\r\n duration: 250\r\n });\r\n\r\n snabbt(this._btnGroup.childNodes, {\r\n fromOpacity: 1,\r\n opacity: 0,\r\n delay: 200,\r\n duration: 350\r\n });\r\n\r\n snabbt([this._stage, this._previewWrapper], {\r\n fromPosition: [0, 0, 0],\r\n position: [0, -250, 0],\r\n fromOpacity: 1,\r\n opacity: 0,\r\n easing: 'spring',\r\n springConstant: 0.3,\r\n springDeceleration: 0.75,\r\n delay: 250,\r\n allDone: function allDone() {\r\n callback();\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'destroy',\r\n value: function destroy() {\r\n var _this6 = this;\r\n\r\n nodeListToArray(this._btnGroup.children).forEach(function (btn) {\r\n btn.removeEventListener('click', _this6);\r\n });\r\n\r\n CropAreaEvents.forEach(function (e) {\r\n _this6._cropper.element.removeEventListener(e, _this6);\r\n });\r\n\r\n this._cropper.destroy();\r\n\r\n // if still attached to DOM, detach\r\n if (this._element.parentNode) {\r\n removeElement(this._element);\r\n }\r\n }\r\n }, {\r\n key: 'showRotateButton',\r\n set: function set(enabled) {\r\n if (enabled) {\r\n this._element.classList.remove('slim-rotation-disabled');\r\n } else {\r\n this._element.classList.add('slim-rotation-disabled');\r\n }\r\n }\r\n }, {\r\n key: 'element',\r\n get: function get() {\r\n return this._element;\r\n }\r\n }, {\r\n key: 'ratio',\r\n get: function get() {\r\n if (this._ratio === 'input') {\r\n return this._input.height / this._input.width;\r\n }\r\n return this._ratio;\r\n }\r\n }, {\r\n key: 'offset',\r\n get: function get() {\r\n return this._element.getBoundingClientRect();\r\n }\r\n }, {\r\n key: 'original',\r\n get: function get() {\r\n return this._input;\r\n }\r\n }, {\r\n key: 'scalar',\r\n get: function get() {\r\n return this._previewSize.width / this._input.width;\r\n }\r\n }], [{\r\n key: 'options',\r\n value: function options() {\r\n return {\r\n buttonCancelClassName: null,\r\n buttonConfirmClassName: null,\r\n buttonCancelLabel: 'Cancel',\r\n buttonConfirmLabel: 'Confirm',\r\n buttonCancelTitle: null,\r\n buttonConfirmTitle: null,\r\n\r\n buttonRotateTitle: 'Rotate',\r\n buttonRotateClassName: null,\r\n\r\n devicePixelRatio: null,\r\n\r\n minSize: {\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n }\r\n }]);\r\n\r\n return ImageEditor;\r\n }();\r\n\r\n ImageEditor.Buttons = ['cancel', 'confirm'];\r\n\r\n return ImageEditor;\r\n}(CropArea);\r\n\r\nvar FileHopper = function () {\r\n /**\r\n * FileHopper\r\n * @param element\r\n * @param options\r\n * @constructor\r\n */\r\n var DragDropEvents = ['dragenter', 'dragover', 'dragleave', 'drop'];\r\n\r\n return function () {\r\n function FileHopper() {\r\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.createElement('div');\r\n\r\n _classCallCheck(this, FileHopper);\r\n\r\n this._element = element;\r\n this._accept = [];\r\n this._allowURLs = false;\r\n\r\n this._dragPath = null;\r\n\r\n this._init();\r\n }\r\n\r\n // public properties\r\n\r\n\r\n _createClass(FileHopper, [{\r\n key: 'isValidDataTransfer',\r\n value: function isValidDataTransfer(dataTransfer) {\r\n if (dataTransfer.files && dataTransfer.files.length) {\r\n return this.areValidDataTransferFiles(dataTransfer.files);\r\n }\r\n\r\n if (dataTransfer.items && dataTransfer.items.length) {\r\n return this.areValidDataTransferItems(dataTransfer.items);\r\n }\r\n\r\n return null;\r\n }\r\n }, {\r\n key: 'areValidDataTransferFiles',\r\n value: function areValidDataTransferFiles(files) {\r\n if (this._accept.length && files) {\r\n return this._accept.indexOf(files[0].type) !== -1;\r\n }\r\n return true;\r\n }\r\n }, {\r\n key: 'areValidDataTransferItems',\r\n value: function areValidDataTransferItems(items) {\r\n if (this._accept.length && items) {\r\n // is possibly dropping url\r\n if (this._allowURLs && items[0].kind === 'string') {\r\n return null;\r\n }\r\n\r\n // is http website so firefox will not return file type\r\n if (items[0].type && items[0].type.indexOf('application') === 0) {\r\n return null;\r\n }\r\n\r\n return this._accept.indexOf(items[0].type) !== -1;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // public methods\r\n\r\n }, {\r\n key: 'reset',\r\n value: function reset() {\r\n this._element.files = null;\r\n }\r\n\r\n // private\r\n\r\n }, {\r\n key: '_init',\r\n value: function _init() {\r\n var _this7 = this;\r\n\r\n this._element.className = 'slim-file-hopper';\r\n\r\n DragDropEvents.forEach(function (e) {\r\n _this7._element.addEventListener(e, _this7);\r\n });\r\n }\r\n\r\n // the input has changed\r\n\r\n }, {\r\n key: 'handleEvent',\r\n value: function handleEvent(e) {\r\n switch (e.type) {\r\n case 'dragenter':\r\n case 'dragover':\r\n this._onDragOver(e);\r\n break;\r\n case 'dragleave':\r\n this._onDragLeave(e);\r\n break;\r\n case 'drop':\r\n this._onDrop(e);\r\n break;\r\n }\r\n }\r\n }, {\r\n key: '_onDrop',\r\n value: function _onDrop(e) {\r\n // prevents browser from opening image\r\n e.preventDefault();\r\n\r\n // test if a url was dropped\r\n var remote = null;\r\n\r\n if (this._allowURLs) {\r\n var url = void 0;\r\n var meta = void 0;\r\n try {\r\n url = e.dataTransfer.getData('url');\r\n meta = e.dataTransfer.getData('text/html');\r\n } catch (e) {\r\n // nope nope nope (ie11 trouble)\r\n }\r\n\r\n if (meta && meta.length) {\r\n var parsed = meta.match(/src\\s*=\\s*\"(.+?)\"/);\r\n if (parsed) {\r\n remote = parsed[1];\r\n }\r\n } else if (url && url.length) {\r\n remote = url;\r\n }\r\n }\r\n\r\n if (remote) {\r\n this._element.files = [{ remote: remote }];\r\n } else {\r\n // nope, must have been a file\r\n // test type in older browsers\r\n var filesValidity = this.isValidDataTransfer(e.dataTransfer);\r\n if (!filesValidity) {\r\n // invalid files, stop here\r\n this._element.dispatchEvent(new CustomEvent('file-invalid-drop'));\r\n\r\n // no longer hovering\r\n this._dragPath = null;\r\n return;\r\n }\r\n\r\n // store dropped files on element files property, so can be accessed by same function as file input handler\r\n this._element.files = e.dataTransfer.files;\r\n }\r\n\r\n // file has been dropped\r\n this._element.dispatchEvent(new CustomEvent('file-drop', {\r\n detail: getOffsetByEvent(e)\r\n }));\r\n\r\n // file list has changed, let's notify others\r\n this._element.dispatchEvent(new CustomEvent('change'));\r\n\r\n // no longer hovering\r\n this._dragPath = null;\r\n }\r\n }, {\r\n key: '_onDragOver',\r\n value: function _onDragOver(e) {\r\n // prevents browser from opening image\r\n e.preventDefault();\r\n\r\n // set drop effect\r\n e.dataTransfer.dropEffect = 'copy';\r\n\r\n // determin if is valid data\r\n var dataValidity = this.isValidDataTransfer(e.dataTransfer);\r\n // if validity is null is undetermined\r\n if (dataValidity !== null && !dataValidity) {\r\n // indicate drop mode to user\r\n e.dataTransfer.dropEffect = 'none';\r\n\r\n // invalid files, stop here\r\n this._element.dispatchEvent(new CustomEvent('file-invalid'));\r\n return;\r\n }\r\n\r\n // now hovering file over the area\r\n if (!this._dragPath) {\r\n this._dragPath = [];\r\n }\r\n\r\n // push location\r\n this._dragPath.push(getOffsetByEvent(e));\r\n\r\n // file is hovering over element\r\n this._element.dispatchEvent(new CustomEvent('file-over', {\r\n detail: {\r\n x: last(this._dragPath).x,\r\n y: last(this._dragPath).y\r\n }\r\n }));\r\n }\r\n }, {\r\n key: '_onDragLeave',\r\n value: function _onDragLeave(e) {\r\n // user has dragged file out of element area\r\n this._element.dispatchEvent(new CustomEvent('file-out', {\r\n detail: getOffsetByEvent(e)\r\n }));\r\n\r\n // now longer hovering file\r\n this._dragPath = null;\r\n }\r\n }, {\r\n key: 'destroy',\r\n value: function destroy() {\r\n var _this8 = this;\r\n\r\n DragDropEvents.forEach(function (e) {\r\n _this8._element.removeEventListener(e, _this8);\r\n });\r\n\r\n removeElement(this._element);\r\n\r\n this._element = null;\r\n this._dragPath = null;\r\n this._accept = null;\r\n }\r\n }, {\r\n key: 'element',\r\n get: function get() {\r\n return this._element;\r\n }\r\n }, {\r\n key: 'dragPath',\r\n get: function get() {\r\n return this._dragPath;\r\n }\r\n }, {\r\n key: 'enabled',\r\n get: function get() {\r\n return this._element.style.display === '';\r\n },\r\n set: function set(value) {\r\n this._element.style.display = value ? '' : 'none';\r\n }\r\n }, {\r\n key: 'allowURLs',\r\n set: function set(value) {\r\n this._allowURLs = value;\r\n }\r\n }, {\r\n key: 'accept',\r\n set: function set(mimetypes) {\r\n this._accept = mimetypes;\r\n },\r\n get: function get() {\r\n return this._accept;\r\n }\r\n }]);\r\n\r\n return FileHopper;\r\n }();\r\n}();\r\n\r\nvar Popover = function () {\r\n /**\r\n * Popover\r\n */\r\n return function () {\r\n function Popover() {\r\n _classCallCheck(this, Popover);\r\n\r\n this._element = null;\r\n this._inner = null;\r\n\r\n this._init();\r\n }\r\n\r\n _createClass(Popover, [{\r\n key: '_init',\r\n value: function _init() {\r\n this._element = create('div', 'slim-popover');\r\n this._element.setAttribute('data-state', 'off');\r\n document.body.appendChild(this._element);\r\n\r\n // prevent body scrolling on iOS 11.3\r\n this._element.addEventListener('touchmove', function (e) {\r\n e.preventDefault();\r\n }, true);\r\n }\r\n }, {\r\n key: 'show',\r\n value: function show() {\r\n var _this9 = this;\r\n\r\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\r\n\r\n // turn on\r\n this._element.setAttribute('data-state', 'on');\r\n\r\n // show and animate in\r\n snabbt(this._element, {\r\n fromOpacity: 0,\r\n opacity: 1,\r\n duration: 350,\r\n complete: function complete() {\r\n // clean up transforms\r\n resetTransforms(_this9._element);\r\n\r\n // ready!\r\n callback();\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'hide',\r\n value: function hide() {\r\n var _this10 = this;\r\n\r\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\r\n\r\n // animate out and hide\r\n snabbt(this._element, {\r\n fromOpacity: 1,\r\n opacity: 0,\r\n duration: 500,\r\n complete: function complete() {\r\n // clean up transforms\r\n resetTransforms(_this10._element);\r\n\r\n // hide the editor\r\n _this10._element.setAttribute('data-state', 'off');\r\n\r\n // ready!\r\n callback();\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'destroy',\r\n value: function destroy() {\r\n if (!this._element.parentNode) {\r\n return;\r\n }\r\n this._element.parentNode.removeChild(this._element);\r\n this._element = null;\r\n this._inner = null;\r\n }\r\n }, {\r\n key: 'inner',\r\n set: function set(element) {\r\n this._inner = element;\r\n if (this._element.firstChild) {\r\n this._element.removeChild(this._element.firstChild);\r\n }\r\n this._element.appendChild(this._inner);\r\n }\r\n }, {\r\n key: 'className',\r\n set: function set(value) {\r\n this._element.className = 'slim-popover' + (value === null ? '' : ' ' + value);\r\n }\r\n }]);\r\n\r\n return Popover;\r\n }();\r\n}();\r\n\r\nvar intSplit = function intSplit(v, c) {\r\n return v.split(c).map(function (v) {\r\n return parseInt(v, 10);\r\n });\r\n};\r\n\r\nvar isWrapper = function isWrapper(element) {\r\n return element.nodeName === 'DIV' || element.nodeName === 'SPAN';\r\n};\r\n\r\nvar CropType = {\r\n AUTO: 'auto',\r\n INITIAL: 'initial',\r\n MANUAL: 'manual'\r\n};\r\n\r\nvar Rect = ['x', 'y', 'width', 'height'];\r\n\r\nvar HopperEvents = ['file-invalid-drop', 'file-invalid', 'file-drop', 'file-over', 'file-out', 'click'];\r\n\r\nvar ImageEditorEvents = ['cancel', 'confirm'];\r\n\r\nvar SlimButtons = ['remove', 'edit', 'download', 'upload'];\r\n\r\nvar SlimPopover = null;\r\nvar SlimCount = 0;\r\n\r\nvar SlimLoaderHTML = '\\n
    \\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\n
    \\n';\r\n\r\nvar SlimUploadStatusHTML = '\\n
    \\n';\r\n\r\nvar stringToSize = function stringToSize(str) {\r\n var size = str.split(',');\r\n return {\r\n width: parseInt(size[0], 10),\r\n height: parseInt(size[1], 10)\r\n };\r\n};\r\n\r\nvar removeTimer = function removeTimer(timers, timer) {\r\n var i = timers.indexOf(timer);\r\n timers.splice(i, 1);\r\n};\r\n\r\nvar Slim = function () {\r\n function Slim(element) {\r\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n\r\n _classCallCheck(this, Slim);\r\n\r\n // create popover element if not already created\r\n if (!SlimPopover) {\r\n SlimPopover = new Popover();\r\n }\r\n\r\n // we create a new counter, we use this counter to determine if we need to clean up the popover\r\n this._uid = SlimCount++;\r\n\r\n // the options to use\r\n this._options = mergeOptions(Slim.options(), options);\r\n\r\n // test options correctness\r\n if (this._options.forceSize) {\r\n if (typeof this._options.forceSize === 'string') {\r\n this._options.forceSize = stringToSize(this._options.forceSize);\r\n }\r\n this._options.ratio = this._options.forceSize.width + ':' + this._options.forceSize.height;\r\n this._options.size = clone(this._options.forceSize);\r\n }\r\n\r\n // test for size set as string\r\n if (typeof this._options.size === 'string') {\r\n this._options.size = stringToSize(this._options.size);\r\n }\r\n\r\n // test for size set as string\r\n if (typeof this._options.minSize === 'string') {\r\n this._options.minSize = stringToSize(this._options.minSize);\r\n }\r\n\r\n // fix post formatting if is supplied as string\r\n if (typeof this._options.post === 'string') {\r\n this._options.post = this._options.post.split(',').map(function (part) {\r\n return part.trim();\r\n });\r\n }\r\n\r\n // reference to original element so we can restore original situation\r\n this._originalElement = element;\r\n this._originalElementInner = element.innerHTML;\r\n this._originalElementAttributes = getElementAttributes(element);\r\n\r\n // should be file input, image or slim wrapper, if not wrapper, wrap\r\n if (!isWrapper(element)) {\r\n this._element = wrap(element);\r\n this._element.className = element.className;\r\n element.className = '';\r\n\r\n // ratio is used for CSS so let's set default attribute\r\n this._element.setAttribute('data-ratio', this._options.ratio);\r\n } else {\r\n this._element = element;\r\n }\r\n this._element.classList.add('slim');\r\n this._element.setAttribute('data-state', 'init');\r\n\r\n // editor state\r\n this._state = [];\r\n\r\n // internal timer array for async processes\r\n this._timers = [];\r\n\r\n // the source element (can either be an input or an img)\r\n this._input = null;\r\n\r\n // the source element unique name if is input type file\r\n this._inputReference = null;\r\n\r\n // the output element (hidden input that contains the resulting json object)\r\n this._output = null;\r\n\r\n // current image ratio\r\n this._ratio = null;\r\n\r\n // was required field\r\n this._isRequired = false;\r\n\r\n // components\r\n this._imageHopper = null;\r\n this._imageEditor = null;\r\n\r\n // progress path\r\n this._progressEnabled = true;\r\n\r\n // resulting data\r\n this._data = {};\r\n this._resetData();\r\n\r\n // the circle below the mouse hover point\r\n this._drip = null;\r\n\r\n // had initial image\r\n this._hasInitialImage = false;\r\n\r\n // initial crop\r\n this._initialCrop = this._options.crop;\r\n\r\n // initial rotation\r\n this._initialRotation = this._options.rotation && this._options.rotation % 90 === 0 ? this._options.rotation : null;\r\n\r\n // set to true when destroy method is called, used to halt any timeouts or async processes\r\n this._isBeingDestroyed = false;\r\n\r\n // stop here if not supported\r\n if (!Slim.supported) {\r\n this._fallback();\r\n } else {\r\n // let's go!\r\n this._init();\r\n }\r\n }\r\n\r\n _createClass(Slim, [{\r\n key: 'setRotation',\r\n value: function setRotation(rotation, callback) {\r\n if (typeof rotation !== 'number' && rotation % 90 !== 0) {\r\n return;\r\n }\r\n\r\n this._data.actions.rotation = rotation;\r\n var isTilted = this._data.actions.rotation % 180 !== 0;\r\n\r\n if (this._data.input.image) {\r\n var w = isTilted ? this._data.input.image.height : this._data.input.image.width;\r\n var h = isTilted ? this._data.input.image.width : this._data.input.image.height;\r\n this._data.actions.crop = getAutoCropRect(w, h, this._ratio);\r\n this._data.actions.crop.type = CropType.AUTO;\r\n }\r\n\r\n if (this._data.input.image && callback) {\r\n this._manualTransform(callback);\r\n }\r\n }\r\n }, {\r\n key: 'setSize',\r\n value: function setSize(dimensions, callback) {\r\n if (typeof dimensions === 'string') {\r\n dimensions = stringToSize(dimensions);\r\n }\r\n\r\n if (!dimensions || !dimensions.width || !dimensions.height) {\r\n return;\r\n }\r\n\r\n this._options.size = clone(dimensions);\r\n this._data.actions.size = clone(dimensions);\r\n\r\n // if a crop area is set do re-crop to conform to size\r\n if (this._data.input.image && callback) {\r\n this._manualTransform(callback);\r\n }\r\n }\r\n }, {\r\n key: 'setForceSize',\r\n value: function setForceSize(dimensions, callback) {\r\n if (typeof dimensions === 'string') {\r\n dimensions = stringToSize(dimensions);\r\n }\r\n\r\n if (!dimensions || !dimensions.width || !dimensions.height) {\r\n return;\r\n }\r\n\r\n this._options.size = clone(dimensions);\r\n this._options.forceSize = clone(dimensions);\r\n this._data.actions.size = clone(dimensions);\r\n\r\n this.setRatio(this._options.forceSize.width + ':' + this._options.forceSize.height, callback);\r\n }\r\n }, {\r\n key: 'setRatio',\r\n value: function setRatio(ratio, callback) {\r\n var _this11 = this;\r\n\r\n if (!ratio || typeof ratio !== 'string') {\r\n return;\r\n }\r\n\r\n this._options.ratio = ratio;\r\n\r\n if (this._isFixedRatio()) {\r\n\r\n var parts = intSplit(this._options.ratio, ':');\r\n this._ratio = parts[1] / parts[0];\r\n\r\n if (this._data.input.image && callback) {\r\n this._cropAuto(function (data) {\r\n _this11._scaleDropArea(_this11._ratio);\r\n if (callback) {\r\n callback(data);\r\n }\r\n });\r\n } else {\r\n if (this._data.input.image) {\r\n this._data.actions.crop = getAutoCropRect(this._data.input.image.width, this._data.input.image.height, this._ratio);\r\n this._data.actions.crop.type = CropType.AUTO;\r\n }\r\n\r\n this._scaleDropArea(this._ratio);\r\n\r\n if (callback) {\r\n callback(null);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // methods\r\n // Test if this Slim object has been bound to the given element\r\n\r\n }, {\r\n key: 'isAttachedTo',\r\n value: function isAttachedTo(element) {\r\n return this._element === element || this._originalElement === element;\r\n }\r\n }, {\r\n key: 'isDetached',\r\n value: function isDetached() {\r\n return this._element.parentNode === null;\r\n }\r\n }, {\r\n key: 'load',\r\n value: function load(src) {\r\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n var callback = arguments[2];\r\n\r\n if (typeof options === 'function') {\r\n callback = options;\r\n } else {\r\n // store in options\r\n this._options.crop = options.crop;\r\n\r\n // set rotation\r\n this._options.rotation = options.rotation;\r\n\r\n // initial rotation\r\n this._initialRotation = options.rotation && options.rotation % 90 === 0 ? options.rotation : null;\r\n\r\n // set initial crop\r\n this._initialCrop = this._options.crop;\r\n }\r\n\r\n this._load(src, callback, { blockPush: options.blockPush });\r\n }\r\n }, {\r\n key: 'upload',\r\n value: function upload(callback) {\r\n this._doUpload(callback);\r\n }\r\n }, {\r\n key: 'download',\r\n value: function download() {\r\n this._doDownload();\r\n }\r\n }, {\r\n key: 'remove',\r\n value: function remove() {\r\n return this._doRemove();\r\n }\r\n }, {\r\n key: 'destroy',\r\n value: function destroy() {\r\n this._doDestroy();\r\n }\r\n }, {\r\n key: 'edit',\r\n value: function edit() {\r\n this._doEdit();\r\n }\r\n }, {\r\n key: 'crop',\r\n value: function crop(rect, callback) {\r\n this._crop(rect.x, rect.y, rect.width, rect.height, callback);\r\n }\r\n }, {\r\n key: 'containsImage',\r\n value: function containsImage() {\r\n return this._data.input.name !== null;\r\n }\r\n\r\n /**\r\n * State Related\r\n */\r\n\r\n }, {\r\n key: '_canInstantEdit',\r\n value: function _canInstantEdit() {\r\n return this._options.instantEdit && !this._isInitialising;\r\n }\r\n }, {\r\n key: '_getFileInput',\r\n value: function _getFileInput() {\r\n return this._element.querySelector('input[type=file]');\r\n }\r\n }, {\r\n key: '_getInitialImage',\r\n value: function _getInitialImage() {\r\n return this._element.querySelector('img');\r\n }\r\n }, {\r\n key: '_getInputElement',\r\n value: function _getInputElement() {\r\n return this._getFileInput() || this._getInitialImage();\r\n }\r\n }, {\r\n key: '_getRatioSpacerElement',\r\n value: function _getRatioSpacerElement() {\r\n return this._element.children[0];\r\n }\r\n }, {\r\n key: '_isImageOnly',\r\n value: function _isImageOnly() {\r\n return this._input.nodeName !== 'INPUT';\r\n }\r\n }, {\r\n key: '_isFixedRatio',\r\n value: function _isFixedRatio() {\r\n return this._options.ratio.indexOf(':') !== -1;\r\n }\r\n }, {\r\n key: '_isAutoCrop',\r\n value: function _isAutoCrop() {\r\n return this._data.actions.crop.type === CropType.AUTO;\r\n }\r\n }, {\r\n key: '_toggleButton',\r\n value: function _toggleButton(action, state) {\r\n toggleDisplayBySelector('.slim-btn[data-action=\"' + action + '\"]', state, this._element);\r\n }\r\n }, {\r\n key: '_clearState',\r\n value: function _clearState() {\r\n this._state = [];\r\n this._updateState();\r\n }\r\n }, {\r\n key: '_removeState',\r\n value: function _removeState(state) {\r\n this._state = this._state.filter(function (item) {\r\n return item !== state;\r\n });\r\n this._updateState();\r\n }\r\n }, {\r\n key: '_addState',\r\n value: function _addState(state) {\r\n if (inArray(state, this._state)) {\r\n return;\r\n }\r\n this._state.push(state);\r\n this._updateState();\r\n }\r\n }, {\r\n key: '_updateState',\r\n value: function _updateState() {\r\n if (!this._element) {\r\n return;\r\n }\r\n this._element.setAttribute('data-state', this._state.join(','));\r\n }\r\n }, {\r\n key: '_resetData',\r\n value: function _resetData() {\r\n // resets data object\r\n this._data = {\r\n server: null,\r\n meta: clone(this._options.meta),\r\n input: {\r\n field: this._inputReference,\r\n name: null,\r\n type: null,\r\n width: 0,\r\n height: 0,\r\n file: null\r\n },\r\n output: {\r\n image: null,\r\n width: 0,\r\n height: 0\r\n },\r\n actions: {\r\n rotation: null,\r\n crop: null,\r\n size: null\r\n }\r\n };\r\n\r\n // resets hidden input clone (has not yet been created when reset call in constructor, hence the check)\r\n if (this._output) {\r\n this._output.value = '';\r\n }\r\n\r\n // should reset file input\r\n resetFileInput(this._getFileInput());\r\n }\r\n\r\n /**\r\n * Initialisation\r\n */\r\n\r\n }, {\r\n key: '_init',\r\n value: function _init() {\r\n var _this12 = this;\r\n\r\n // busy initialising\r\n this._isInitialising = true;\r\n\r\n // cropper root is not file input\r\n this._addState('empty');\r\n\r\n // define input reference field name\r\n if (inArray('input', this._options.post)) {\r\n this._inputReference = 'slim_input_' + this._uid;\r\n }\r\n\r\n // get input element\r\n this._input = this._getInputElement();\r\n\r\n // if no input supplied we'll automatically create one\r\n if (!this._input) {\r\n this._input = create('input');\r\n this._input.type = 'file';\r\n this._element.appendChild(this._input);\r\n }\r\n\r\n // get required state of input element\r\n this._isRequired = this._input.required === true;\r\n\r\n // set or create output field\r\n this._output = this._element.querySelector('input[type=hidden]');\r\n\r\n // if no output element defined we'll create one automagically\r\n if (!this._output) {\r\n this._output = create('input');\r\n this._output.type = 'hidden';\r\n this._output.name = this._input.name || this._options.defaultInputName;\r\n this._element.appendChild(this._output);\r\n } else {\r\n var initialData = null;\r\n try {\r\n initialData = JSON.parse(this._output.value);\r\n } catch (e) {}\r\n if (initialData) {\r\n var img = new Image();\r\n img.src = initialData.output.image;\r\n img.setAttribute('data-filename', initialData.output.name);\r\n this._element.insertBefore(img, this._element.firstChild);\r\n }\r\n }\r\n\r\n // prevent the original file input field from posting (value will be duplicated to output field)\r\n this._input.removeAttribute('name');\r\n\r\n // create drop area\r\n var area = create('div', 'slim-area');\r\n\r\n // test if contains initial image\r\n var initialImage = this._getInitialImage();\r\n var initialImageSrc = (initialImage || {}).src;\r\n var initialImageName = initialImage ? initialImage.getAttribute('data-filename') : null;\r\n\r\n if (initialImageSrc) {\r\n this._hasInitialImage = true;\r\n } else {\r\n this._initialCrop = null;\r\n this._initialRotation = null;\r\n }\r\n\r\n var resultHTML = '\\n\\t\\t
    \\n\\t\\t\\t\\n\\t\\t
    ';\r\n\r\n // add drop overlay\r\n if (this._isImageOnly()) {\r\n area.innerHTML = '\\n\\t\\t\\t\\t' + SlimLoaderHTML + '\\n\\t\\t\\t\\t' + SlimUploadStatusHTML + '\\n\\t\\t\\t\\t' + resultHTML + '\\n\\t\\t\\t\\t
    ' + (this._options.labelLoading || '') + '
    \\n\\t\\t\\t';\r\n } else {\r\n // if should post input data\r\n if (inArray('input', this._options.post)) {\r\n this._data.input.field = this._inputReference;\r\n\r\n // if is sync post\r\n // and should post input data\r\n if (!this._options.service) {\r\n this._input.name = this._inputReference;\r\n }\r\n }\r\n\r\n // set common image mime type to the accept attribute\r\n var mimetypes = void 0;\r\n if (!this._input.hasAttribute('accept') || this._input.getAttribute('accept') === 'image/*') {\r\n mimetypes = getCommonMimeTypes();\r\n this._input.setAttribute('accept', mimetypes.join(','));\r\n } else {\r\n mimetypes = this._input.accept.split(',').map(function (mimetype) {\r\n return mimetype.trim();\r\n }).filter(function (mimetype) {\r\n return mimetype.length > 0;\r\n });\r\n }\r\n\r\n // setup hopper\r\n this._imageHopper = new FileHopper();\r\n this._imageHopper.accept = mimetypes;\r\n this._imageHopper.allowURLs = typeof this._options.fetcher === 'string';\r\n this._element.appendChild(this._imageHopper.element);\r\n HopperEvents.forEach(function (e) {\r\n _this12._imageHopper.element.addEventListener(e, _this12);\r\n });\r\n\r\n // render area\r\n area.innerHTML = '\\n\\t\\t\\t\\t' + SlimLoaderHTML + '\\n\\t\\t\\t\\t' + SlimUploadStatusHTML + '\\n\\t\\t\\t\\t
    \\n\\t\\t\\t\\t
    ' + (this._options.label || '') + '
    ' + (this._options.labelLoading || '') + '
    \\n\\t\\t\\t\\t' + resultHTML + '\\n\\t\\t\\t';\r\n\r\n // start listening for events so we can load image on file input change\r\n this._input.addEventListener('change', this);\r\n }\r\n\r\n // add area node\r\n this._element.appendChild(area);\r\n\r\n // add button group\r\n this._btnGroup = create('div', 'slim-btn-group');\r\n this._btnGroup.style.display = 'none';\r\n this._element.appendChild(this._btnGroup);\r\n SlimButtons.filter(function (c) {\r\n return _this12._isButtonAllowed(c);\r\n }).forEach(function (c) {\r\n var prop = capitalizeFirstLetter(c);\r\n var label = _this12._options['button' + prop + 'Label'];\r\n var title = _this12._options['button' + prop + 'Title'] || label;\r\n var className = _this12._options['button' + prop + 'ClassName'];\r\n var btn = create('button', 'slim-btn slim-btn-' + c + (className ? ' ' + className : ''));\r\n btn.innerHTML = label;\r\n btn.title = title;\r\n btn.type = 'button';\r\n btn.addEventListener('click', _this12);\r\n btn.setAttribute('data-action', c);\r\n _this12._btnGroup.appendChild(btn);\r\n });\r\n\r\n // add ratio padding\r\n if (this._isFixedRatio()) {\r\n var parts = intSplit(this._options.ratio, ':');\r\n this._ratio = parts[1] / parts[0];\r\n this._scaleDropArea(this._ratio);\r\n }\r\n\r\n // setup loader\r\n this._updateProgress(0.5);\r\n\r\n // preload source\r\n if (initialImageSrc) {\r\n this._load(initialImageSrc, function () {\r\n _this12._onInit();\r\n }, { name: initialImageName });\r\n } else {\r\n this._onInit();\r\n }\r\n }\r\n }, {\r\n key: '_onInit',\r\n value: function _onInit() {\r\n var _this13 = this;\r\n\r\n // we're done initialising\r\n this._isInitialising = false;\r\n\r\n // done initialising now, else is only called after image load\r\n var done = function done() {\r\n // we call this async so the constructor of Slim has returned before the onInit is called, allowing clean immidiate destroy\r\n var timer = setTimeout(function () {\r\n removeTimer(_this13._timers, timer);\r\n _this13._options.didInit.apply(_this13, [_this13.data, _this13]);\r\n }, 0);\r\n _this13._timers.push(timer);\r\n };\r\n\r\n // save initial image\r\n if (this._options.saveInitialImage && this.containsImage()) {\r\n if (!this._options.service) {\r\n this._save(function () {\r\n done();\r\n }, false);\r\n }\r\n } else {\r\n // by default upload button is disabled for existing images\r\n if (this._options.service && this.containsImage()) {\r\n this._toggleButton('upload', false);\r\n }\r\n\r\n done();\r\n }\r\n }\r\n }, {\r\n key: '_updateProgress',\r\n value: function _updateProgress(progress) {\r\n progress = Math.min(0.99999, progress);\r\n\r\n if (!this._element) {\r\n return;\r\n }\r\n\r\n if (!this._progressEnabled) {\r\n return;\r\n }\r\n\r\n var loader = this._element.querySelector('.slim-loader');\r\n if (!loader) {\r\n return;\r\n }\r\n\r\n var size = loader.offsetWidth;\r\n var paths = loader.querySelectorAll('path');\r\n var ringWidth = parseInt(paths[0].getAttribute('stroke-width'), 10);\r\n\r\n paths[0].setAttribute('d', percentageArc(size * 0.5, size * 0.5, size * 0.5 - ringWidth, 0.9999));\r\n\r\n paths[1].setAttribute('d', percentageArc(size * 0.5, size * 0.5, size * 0.5 - ringWidth, progress));\r\n }\r\n }, {\r\n key: '_startProgress',\r\n value: function _startProgress(cb) {\r\n var _this14 = this;\r\n\r\n if (!this._element) {\r\n return;\r\n }\r\n\r\n this._progressEnabled = false;\r\n\r\n var loader = this._element.querySelector('.slim-loader');\r\n if (!loader) {\r\n return;\r\n }\r\n var ring = loader.children[0];\r\n\r\n this._stopProgressLoop(function () {\r\n loader.removeAttribute('style');\r\n ring.removeAttribute('style');\r\n\r\n _this14._progressEnabled = true;\r\n\r\n _this14._updateProgress(0);\r\n\r\n _this14._progressEnabled = false;\r\n\r\n snabbt(ring, {\r\n fromOpacity: 0,\r\n opacity: 1,\r\n duration: 250,\r\n complete: function complete() {\r\n _this14._progressEnabled = true;\r\n if (cb) {\r\n cb();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n }, {\r\n key: '_stopProgress',\r\n value: function _stopProgress() {\r\n var _this15 = this;\r\n\r\n if (!this._element) {\r\n return;\r\n }\r\n\r\n var loader = this._element.querySelector('.slim-loader');\r\n if (!loader) {\r\n return;\r\n }\r\n var ring = loader.children[0];\r\n\r\n this._updateProgress(1);\r\n\r\n snabbt(ring, {\r\n fromOpacity: 1,\r\n opacity: 0,\r\n duration: 250,\r\n complete: function complete() {\r\n loader.removeAttribute('style');\r\n ring.removeAttribute('style');\r\n\r\n _this15._updateProgress(0.5);\r\n\r\n _this15._progressEnabled = false;\r\n }\r\n });\r\n }\r\n }, {\r\n key: '_startProgressLoop',\r\n value: function _startProgressLoop() {\r\n if (!this._element) {\r\n return;\r\n }\r\n\r\n // start loading animation\r\n var loader = this._element.querySelector('.slim-loader');\r\n if (!loader) {\r\n return;\r\n }\r\n\r\n var ring = loader.children[0];\r\n loader.removeAttribute('style');\r\n ring.removeAttribute('style');\r\n\r\n // set infinite load state\r\n this._updateProgress(0.5);\r\n\r\n // repeat!\r\n var repeat = 1000;\r\n\r\n snabbt(loader, 'stop');\r\n\r\n snabbt(loader, {\r\n rotation: [0, 0, -(Math.PI * 2) * repeat],\r\n easing: 'linear',\r\n duration: repeat * 1000\r\n });\r\n\r\n snabbt(ring, {\r\n fromOpacity: 0,\r\n opacity: 1,\r\n duration: 250\r\n });\r\n }\r\n }, {\r\n key: '_stopProgressLoop',\r\n value: function _stopProgressLoop(callback) {\r\n if (!this._element) {\r\n return;\r\n }\r\n\r\n var loader = this._element.querySelector('.slim-loader');\r\n if (!loader) {\r\n return;\r\n }\r\n\r\n var ring = loader.children[0];\r\n\r\n snabbt(ring, {\r\n fromOpacity: parseFloat(ring.style.opacity),\r\n opacity: 0,\r\n duration: 250,\r\n complete: function complete() {\r\n snabbt(loader, 'stop');\r\n\r\n loader.removeAttribute('style');\r\n ring.removeAttribute('style');\r\n\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n });\r\n }\r\n }, {\r\n key: '_isButtonAllowed',\r\n value: function _isButtonAllowed(button) {\r\n if (button === 'edit') {\r\n return this._options.edit;\r\n }\r\n\r\n if (button === 'download') {\r\n return this._options.download;\r\n }\r\n\r\n if (button === 'upload') {\r\n // if no service defined upload button makes no sense\r\n if (!this._options.service) {\r\n return false;\r\n }\r\n\r\n // if push mode is set, no need for upload button\r\n if (this._options.push) {\r\n return false;\r\n }\r\n\r\n // set upload button\r\n return true;\r\n }\r\n\r\n if (button === 'remove') {\r\n return !this._isImageOnly();\r\n }\r\n\r\n return true;\r\n }\r\n }, {\r\n key: '_fallback',\r\n value: function _fallback() {\r\n // create status area\r\n var area = create('div', 'slim-area');\r\n area.innerHTML = '\\n\\t\\t\\t
    ' + (this._options.label || '') + '
    \\n\\t\\t';\r\n this._element.appendChild(area);\r\n\r\n this._throwError(this._options.statusNoSupport);\r\n }\r\n\r\n /**\r\n * Event routing\r\n */\r\n\r\n }, {\r\n key: 'handleEvent',\r\n value: function handleEvent(e) {\r\n switch (e.type) {\r\n case 'click':\r\n this._onClick(e);\r\n break;\r\n case 'change':\r\n this._onChange(e);\r\n break;\r\n case 'cancel':\r\n this._onCancel(e);\r\n break;\r\n case 'confirm':\r\n this._onConfirm(e);\r\n break;\r\n case 'file-over':\r\n this._onFileOver(e);\r\n break;\r\n case 'file-out':\r\n this._onFileOut(e);\r\n break;\r\n case 'file-drop':\r\n this._onDropFile(e);\r\n break;\r\n case 'file-invalid':\r\n this._onInvalidFile(e);\r\n break;\r\n case 'file-invalid-drop':\r\n this._onInvalidFileDrop(e);\r\n break;\r\n }\r\n }\r\n }, {\r\n key: '_getIntro',\r\n value: function _getIntro() {\r\n return this._element.querySelector('.slim-result .in');\r\n }\r\n }, {\r\n key: '_getOutro',\r\n value: function _getOutro() {\r\n return this._element.querySelector('.slim-result .out');\r\n }\r\n }, {\r\n key: '_getInOut',\r\n value: function _getInOut() {\r\n return this._element.querySelectorAll('.slim-result img');\r\n }\r\n }, {\r\n key: '_getDrip',\r\n value: function _getDrip() {\r\n if (!this._drip) {\r\n this._drip = this._element.querySelector('.slim-drip > span');\r\n }\r\n return this._drip;\r\n }\r\n\r\n // errors\r\n\r\n }, {\r\n key: '_throwError',\r\n value: function _throwError(error) {\r\n this._addState('error');\r\n\r\n this._element.querySelector('.slim-label').style.display = 'none';\r\n\r\n var node = this._element.querySelector('.slim-error');\r\n if (!node) {\r\n node = create('div', 'slim-error');\r\n this._element.querySelector('.slim-status').appendChild(node);\r\n }\r\n\r\n node.innerHTML = error;\r\n\r\n this._options.didThrowError.apply(this, [error]);\r\n }\r\n }, {\r\n key: '_removeError',\r\n value: function _removeError() {\r\n this._removeState('error');\r\n this._element.querySelector('.slim-label').style.display = '';\r\n\r\n var error = this._element.querySelector('.slim-error');\r\n if (error) {\r\n error.parentNode.removeChild(error);\r\n }\r\n }\r\n }, {\r\n key: '_openFileDialog',\r\n value: function _openFileDialog() {\r\n this._removeError();\r\n this._input.click();\r\n }\r\n\r\n // drop area clicked\r\n\r\n }, {\r\n key: '_onClick',\r\n value: function _onClick(e) {\r\n var _this16 = this;\r\n\r\n var list = e.target.classList;\r\n var target = e.target;\r\n\r\n // no preview, so possible to drop file\r\n if (list.contains('slim-file-hopper')) {\r\n e.preventDefault();\r\n this._openFileDialog();\r\n return;\r\n }\r\n\r\n // decide what button was clicked\r\n switch (target.getAttribute('data-action')) {\r\n case 'remove':\r\n this._options.willRemove.apply(this, [this.data, function () {\r\n _this16._doRemove();\r\n }]);\r\n break;\r\n case 'edit':\r\n this._doEdit();\r\n break;\r\n case 'download':\r\n this._doDownload();\r\n break;\r\n case 'upload':\r\n this._doUpload();\r\n break;\r\n }\r\n }\r\n }, {\r\n key: '_onInvalidFileDrop',\r\n value: function _onInvalidFileDrop() {\r\n this._onInvalidFile();\r\n\r\n this._removeState('file-over');\r\n\r\n // animate out drip\r\n var drip = this._getDrip();\r\n snabbt(drip.firstChild, {\r\n fromScale: [0.5, 0.5],\r\n scale: [0, 0],\r\n fromOpacity: 0.5,\r\n opacity: 0,\r\n duration: 150,\r\n complete: function complete() {\r\n // clean up transforms\r\n resetTransforms(drip.firstChild);\r\n }\r\n });\r\n }\r\n }, {\r\n key: '_onInvalidFile',\r\n value: function _onInvalidFile() {\r\n var types = this._imageHopper.accept.map(getExtensionByMimeType);\r\n var error = this._options.statusFileType.replace('$0', types.join(', '));\r\n this._throwError(error);\r\n }\r\n }, {\r\n key: '_onImageTooSmall',\r\n value: function _onImageTooSmall() {\r\n var error = this._options.statusImageTooSmall.replace('$0', this._options.minSize.width + ' \\xD7 ' + this._options.minSize.height);\r\n this._throwError(error);\r\n }\r\n }, {\r\n key: '_onOverWeightFile',\r\n value: function _onOverWeightFile() {\r\n var error = this._options.statusFileSize.replace('$0', this._options.maxFileSize);\r\n this._throwError(error);\r\n }\r\n }, {\r\n key: '_onLocalURLProblem',\r\n value: function _onLocalURLProblem(error) {\r\n this._throwError(this._options.statusLocalUrlProblem || error);\r\n }\r\n }, {\r\n key: '_onRemoteURLProblem',\r\n value: function _onRemoteURLProblem(error) {\r\n this._throwError(error);\r\n }\r\n }, {\r\n key: '_onFileOver',\r\n value: function _onFileOver(e) {\r\n this._addState('file-over');\r\n this._removeError();\r\n\r\n // animations\r\n var drip = this._getDrip();\r\n\r\n // move around drip\r\n var matrix = snabbt.createMatrix();\r\n matrix.translate(e.detail.x, e.detail.y, 0);\r\n snabbt.setElementTransform(drip, matrix);\r\n\r\n // on first entry fade in blob\r\n if (this._imageHopper.dragPath.length == 1) {\r\n // show\r\n drip.style.opacity = 1;\r\n\r\n // animate in\r\n snabbt(drip.firstChild, {\r\n fromOpacity: 0,\r\n opacity: 0.5,\r\n fromScale: [0, 0],\r\n scale: [0.5, 0.5],\r\n duration: 150\r\n });\r\n }\r\n }\r\n }, {\r\n key: '_onFileOut',\r\n value: function _onFileOut(e) {\r\n this._removeState('file-over');\r\n this._removeState('file-invalid');\r\n this._removeError();\r\n\r\n // move to last position\r\n var drip = this._getDrip();\r\n var matrix = snabbt.createMatrix();\r\n matrix.translate(e.detail.x, e.detail.y, 0);\r\n snabbt.setElementTransform(drip, matrix);\r\n\r\n // animate out\r\n snabbt(drip.firstChild, {\r\n fromScale: [0.5, 0.5],\r\n scale: [0, 0],\r\n fromOpacity: 0.5,\r\n opacity: 0,\r\n duration: 150,\r\n complete: function complete() {\r\n // clean up transforms\r\n resetTransforms(drip.firstChild);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * When a file was literally dropped on the drop area\r\n * @param e\r\n * @private\r\n */\r\n\r\n }, {\r\n key: '_onDropFile',\r\n value: function _onDropFile(e) {\r\n var _this17 = this;\r\n\r\n this._removeState('file-over');\r\n\r\n // get drip node reference and set to last position\r\n var drip = this._getDrip();\r\n var matrix = snabbt.createMatrix();\r\n matrix.translate(e.detail.x, e.detail.y, 0);\r\n snabbt.setElementTransform(drip, matrix);\r\n\r\n // get element minimum 10 entries distant from the last entry so we can calculate velocity of movement\r\n var l = this._imageHopper.dragPath.length;\r\n var jump = this._imageHopper.dragPath[l - Math.min(10, l)];\r\n\r\n // velocity\r\n var dx = e.detail.x - jump.x;\r\n var dy = e.detail.y - jump.y;\r\n\r\n snabbt(drip, {\r\n fromPosition: [e.detail.x, e.detail.y, 0],\r\n position: [e.detail.x + dx, e.detail.y + dy, 0],\r\n duration: 200\r\n });\r\n\r\n // animate out drip\r\n snabbt(drip.firstChild, {\r\n fromScale: [0.5, 0.5],\r\n scale: [2, 2],\r\n fromOpacity: 1,\r\n opacity: 0,\r\n duration: 200,\r\n\r\n complete: function complete() {\r\n // clean up transforms\r\n resetTransforms(drip.firstChild);\r\n\r\n // load dropped resource\r\n _this17._load(e.target.files[0]);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * When a file has been selected after a click on the drop area\r\n * @param e\r\n * @private\r\n */\r\n\r\n }, {\r\n key: '_onChange',\r\n value: function _onChange(e) {\r\n if (e.target.files.length) {\r\n this._load(e.target.files[0]);\r\n }\r\n }\r\n\r\n /**\r\n * Loads a resource (blocking operation)\r\n * @param resource\r\n * @param callback(err)\r\n * @param options\r\n * @private\r\n */\r\n\r\n }, {\r\n key: '_load',\r\n value: function _load(resource, callback) {\r\n var _this18 = this;\r\n\r\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\r\n\r\n // stop here\r\n if (this._isBeingDestroyed) {\r\n return;\r\n }\r\n\r\n // if currently contains image, remove it\r\n if (this.containsImage()) {\r\n clearTimeout(this._replaceTimeout);\r\n\r\n this._doRemove(function () {\r\n _this18._replaceTimeout = setTimeout(function () {\r\n _this18._load(resource, callback, options);\r\n }, 100);\r\n });\r\n\r\n return;\r\n }\r\n\r\n // no longer empty\r\n this._removeState('empty');\r\n this._addState('busy');\r\n\r\n // start loading indicator\r\n this._startProgressLoop();\r\n\r\n // can't drop any other image while loading\r\n if (this._imageHopper) {\r\n this._imageHopper.enabled = false;\r\n }\r\n\r\n clearTimeout(this._loadTimeout);\r\n var load = function load() {\r\n clearTimeout(_this18._loadTimeout);\r\n _this18._loadTimeout = setTimeout(function () {\r\n if (_this18._isBeingDestroyed) {\r\n return;\r\n }\r\n\r\n _this18._addState('loading');\r\n\r\n snabbt(_this18._element.querySelector('.slim-label-loading'), {\r\n fromOpacity: 0,\r\n opacity: 1,\r\n duration: 250\r\n });\r\n }, 500);\r\n };\r\n\r\n // early exit\r\n var exit = function exit() {\r\n if (_this18._imageHopper) {\r\n _this18._imageHopper.enabled = true;\r\n }\r\n _this18._removeState('loading');\r\n _this18._removeState('busy');\r\n _this18._addState('empty');\r\n _this18._stopProgressLoop();\r\n };\r\n\r\n // turn string based resources (url / base64) into file objects\r\n if (typeof resource === 'string') {\r\n if (resourceIsBase64Data(resource)) {\r\n // resource is base64 data, turn into file\r\n this._load(base64ToBlob(resource), callback, options);\r\n } else {\r\n\r\n // will take a while, show loading indicator\r\n load();\r\n\r\n // resource is url, load with XHR\r\n loadURL(resource, this._options.willLoad, function (file) {\r\n\r\n // continue with file object\r\n _this18._load(file, callback, options);\r\n }, function (error) {\r\n\r\n setTimeout(function () {\r\n\r\n exit();\r\n\r\n _this18._onLocalURLProblem('

    ' + error + '

    ');\r\n\r\n if (callback) {\r\n callback.apply(_this18, ['local-url-problem']);\r\n }\r\n }, 500);\r\n });\r\n }\r\n\r\n // don't continue, wait for load\r\n return;\r\n } else if (typeof resource.remote !== 'undefined') {\r\n // is dropped link\r\n // test if happens to be base64 data\r\n if (resourceIsBase64Data(resource.remote)) {\r\n this._load(base64ToBlob(resource.remote), callback, options);\r\n return;\r\n }\r\n\r\n if (this._options.fetcher) {\r\n loadRemoteURL(this._options.fetcher, this._options.willFetch, this._options.willLoad, resource.remote, function (error) {\r\n exit();\r\n\r\n _this18._onRemoteURLProblem('

    ' + error + '

    ');\r\n\r\n if (callback) {\r\n callback.apply(_this18, ['remote-url-problem']);\r\n }\r\n }, function (file) {\r\n // continue with file object\r\n _this18._load(file, callback, options);\r\n });\r\n }\r\n\r\n // don't continue wait for server fetch\r\n return;\r\n }\r\n\r\n // let's continue with file resource\r\n var file = resource;\r\n\r\n // re-test if is valid file type\r\n // in case of loading base64 data or url\r\n if (this._imageHopper && this._imageHopper.accept.indexOf(file.type) === -1) {\r\n exit();\r\n\r\n this._onInvalidFile();\r\n if (callback) {\r\n callback.apply(this, ['file-invalid']);\r\n }\r\n return;\r\n }\r\n\r\n // test if too big\r\n if (file.size && this._options.maxFileSize && bytesToMegaBytes(file.size) > this._options.maxFileSize) {\r\n exit();\r\n\r\n this._onOverWeightFile();\r\n if (callback) {\r\n callback.apply(this, ['file-too-big']);\r\n }\r\n return;\r\n }\r\n\r\n // if has loaded image editor set to dirty\r\n if (this._imageEditor) {\r\n this._imageEditor.dirty();\r\n }\r\n\r\n // continue\r\n this._data.input.name = options && options.name ? options.name : getFileNameByFile(file);\r\n this._data.input.type = getFileTypeByFile(file);\r\n this._data.input.size = file.size;\r\n this._data.input.file = file;\r\n\r\n // internal canvas size\r\n var internalCanvasSize = this._options.internalCanvasSize;\r\n if (isLowMemoryDevice()) {\r\n internalCanvasSize = this._options.internalCanvasSizeLowMemory;\r\n }\r\n\r\n // fetch resource\r\n getImageAsCanvas(file, internalCanvasSize, function (image, meta) {\r\n\r\n var rewind = function rewind() {\r\n\r\n // rewind state\r\n if (_this18._imageHopper) {\r\n _this18._imageHopper.enabled = true;\r\n }\r\n\r\n _this18._removeState('loading');\r\n _this18._removeState('busy');\r\n _this18._addState('empty');\r\n _this18._stopProgressLoop();\r\n _this18._resetData();\r\n };\r\n\r\n // if no image, something went wrong\r\n if (!image) {\r\n rewind();\r\n\r\n if (callback) {\r\n callback.apply(_this18, ['file-not-found']);\r\n }\r\n\r\n return;\r\n }\r\n\r\n // test if image is too small\r\n if (!covers(image, _this18._options.minSize)) {\r\n rewind();\r\n\r\n _this18._onImageTooSmall();\r\n\r\n if (callback) {\r\n callback.apply(_this18, ['image-too-small']);\r\n }\r\n\r\n return;\r\n }\r\n\r\n var status = _this18._options.didLoad.apply(_this18, [file, image, meta, _this18]);\r\n if (status !== true) {\r\n rewind();\r\n\r\n if (status !== false) {\r\n _this18._throwError(status);\r\n }\r\n\r\n if (callback) {\r\n callback.apply(_this18, [status]);\r\n }\r\n\r\n return;\r\n }\r\n\r\n // done loading file\r\n _this18._removeState('loading');\r\n\r\n var revealCanvas = function revealCanvas(done) {\r\n // done, enable hopper\r\n if (_this18._imageHopper && _this18._options.dropReplace) {\r\n _this18._imageHopper.enabled = true;\r\n }\r\n\r\n // do intro stuff\r\n var intro = _this18._getIntro();\r\n\r\n // setup base animation\r\n var animation = {\r\n fromScale: [1.25, 1.25],\r\n scale: [1, 1],\r\n fromOpacity: 0,\r\n opacity: 1,\r\n complete: function complete() {\r\n resetTransforms(intro);\r\n\r\n intro.style.opacity = 1;\r\n\r\n done();\r\n }\r\n };\r\n\r\n // if not attached to DOM, don't animate\r\n if (_this18.isDetached()) {\r\n animation.duration = 1;\r\n } else {\r\n animation.easing = 'spring';\r\n animation.springConstant = 0.3;\r\n animation.springDeceleration = 0.7;\r\n }\r\n\r\n // if is instant edit mode don't zoom out but zoom in\r\n if (_this18._canInstantEdit()) {\r\n animation.delay = 500;\r\n animation.duration = 1;\r\n\r\n // instant edit mode just fire up the editor immidiately\r\n _this18._doEdit();\r\n }\r\n\r\n // reveal loaded image\r\n snabbt(intro, animation);\r\n };\r\n\r\n // load the image\r\n _this18._loadCanvas(image,\r\n\r\n // done loading the canvas\r\n function (isUploading) {\r\n _this18._addState('preview');\r\n\r\n revealCanvas(function () {\r\n // don't show buttons when instant editing\r\n // the buttons will be triggered by the closing of the popup\r\n if (!_this18._canInstantEdit() && !isUploading) {\r\n _this18._showButtons();\r\n }\r\n\r\n if (!isUploading) {\r\n _this18._stopProgressLoop();\r\n _this18._removeState('busy');\r\n }\r\n\r\n if (callback) {\r\n callback.apply(_this18, [null, _this18.data]);\r\n }\r\n });\r\n },\r\n\r\n // done uploading\r\n function () {\r\n // don't show buttons when instant editing\r\n if (!_this18._canInstantEdit()) {\r\n _this18._showButtons();\r\n }\r\n\r\n _this18._removeState('busy');\r\n },\r\n\r\n // options for canvas load\r\n {\r\n blockPush: options.blockPush\r\n });\r\n });\r\n }\r\n }, {\r\n key: '_loadCanvas',\r\n value: function _loadCanvas(image, ready, complete, options) {\r\n var _this19 = this;\r\n\r\n // set default options object if not supplied\r\n if (!options) {\r\n options = {};\r\n }\r\n\r\n // halt here if cropper is currently being destroyed\r\n if (this._isBeingDestroyed) {\r\n return;\r\n }\r\n\r\n // store raw data\r\n if (isLowMemoryDevice()) {\r\n this._data.input.image = new Image();\r\n this._data.input.image.src = image.toDataURL();\r\n } else {\r\n this._data.input.image = image;\r\n }\r\n this._data.input.width = image.width;\r\n this._data.input.height = image.height;\r\n\r\n if (this._initialRotation) {\r\n this._data.actions.rotation = this._initialRotation;\r\n this._initialRotation = null;\r\n }\r\n\r\n var isTilted = this._data.actions.rotation % 180 !== 0;\r\n\r\n // scales the drop area\r\n // if is 'input' or 'free' parameter\r\n if (!this._isFixedRatio()) {\r\n if (this._initialCrop) {\r\n this._ratio = this._initialCrop.height / this._initialCrop.width;\r\n } else {\r\n this._ratio = isTilted ? image.width / image.height : image.height / image.width;\r\n }\r\n this._scaleDropArea(this._ratio);\r\n }\r\n\r\n var applyTransforms = function applyTransforms() {\r\n\r\n // if max size set\r\n if (_this19._options.size) {\r\n _this19._data.actions.size = {\r\n width: _this19._options.size.width,\r\n height: _this19._options.size.height\r\n };\r\n }\r\n\r\n // do initial auto transform\r\n _this19._applyTransforms(image, function (transformedImage) {\r\n var intro = _this19._getIntro();\r\n var scalar = intro.offsetWidth / transformedImage.width;\r\n\r\n // store data, if has preview image this prevents initial load from pushing\r\n var willUpload = false;\r\n\r\n // can only do auto upload when service is defined and push is enabled...\r\n if (_this19._options.service && _this19._options.push && !options.blockPush) {\r\n // ...and is not transformation of initial image\r\n // + is not instant edit mode\r\n if (!_this19._hasInitialImage && !_this19._canInstantEdit()) {\r\n willUpload = true;\r\n _this19._stopProgressLoop(function () {\r\n _this19._startProgress(function () {\r\n _this19._updateProgress(0.1);\r\n });\r\n });\r\n }\r\n }\r\n\r\n // no service set, and instant edit\r\n if (!_this19._canInstantEdit()) {\r\n // store data (possibly)\r\n _this19._save(function () {\r\n if (_this19._isBeingDestroyed) {\r\n return;\r\n }\r\n if (willUpload) {\r\n _this19._stopProgress();\r\n complete();\r\n }\r\n }, willUpload);\r\n }\r\n\r\n // scale ratio\r\n var ratio = _this19._options.devicePixelRatio === 'auto' ? window.devicePixelRatio : _this19._options.devicePixelRatio;\r\n\r\n // show intro animation\r\n intro.src = '';\r\n intro.src = cloneCanvasScaled(transformedImage, scalar * ratio).toDataURL();\r\n intro.onload = function () {\r\n intro.onload = null;\r\n\r\n // bail out if we've been cleaned up\r\n if (_this19._isBeingDestroyed) {\r\n return;\r\n }\r\n\r\n if (ready) {\r\n ready(willUpload);\r\n }\r\n };\r\n });\r\n };\r\n\r\n if (this._initialCrop) {\r\n\r\n // use initial supplied crop rectangle\r\n this._data.actions.crop = clone(this._initialCrop);\r\n this._data.actions.crop.type = CropType.INITIAL;\r\n\r\n // clear initial crop, it's no longer useful\r\n this._initialCrop = null;\r\n\r\n // go!\r\n applyTransforms();\r\n } else {\r\n\r\n this._options.willCropInitial.apply(this, [this.data, function (rect) {\r\n\r\n if (rect) {\r\n\r\n // apply custom crop rectangle\r\n _this19._data.actions.crop = rect;\r\n _this19._data.actions.crop.type = CropType.INITIAL;\r\n } else {\r\n\r\n // get automagical crop rectangle\r\n _this19._data.actions.crop = getAutoCropRect(isTilted ? image.height : image.width, isTilted ? image.width : image.height, _this19._ratio);\r\n _this19._data.actions.crop.type = CropType.AUTO;\r\n }\r\n\r\n applyTransforms();\r\n }, this]);\r\n }\r\n }\r\n }, {\r\n key: '_applyTransforms',\r\n value: function _applyTransforms(image, ready) {\r\n var _this20 = this;\r\n\r\n var actions = clone(this._data.actions);\r\n actions.filters = {\r\n sharpen: this._options.filterSharpen / 100\r\n };\r\n\r\n // if should force minimum size on output image\r\n if (this._options.forceMinSize) {\r\n actions.minSize = this._options.minSize;\r\n } else {\r\n actions.minSize = {\r\n width: 0,\r\n height: 0\r\n };\r\n }\r\n\r\n transformCanvas(image, actions, function (transformedImage) {\r\n var outputImage = transformedImage;\r\n\r\n // if should force/correct output size?\r\n // - is forced size set?\r\n // - is a discrepancy found between requested output size and transformed size\r\n if (_this20._options.forceSize || _this20._options.size && sizeDist(_this20._options.size, transformedImage) == 1) {\r\n outputImage = create('canvas');\r\n outputImage.width = _this20._options.size.width;\r\n outputImage.height = _this20._options.size.height;\r\n var ctx = outputImage.getContext('2d');\r\n ctx.drawImage(transformedImage, 0, 0, _this20._options.size.width, _this20._options.size.height);\r\n }\r\n\r\n // make sure min size is respected when size is equal to min size\r\n if (_this20._options.forceMinSize && _this20._options.size && _this20._options.minSize.width === _this20._options.size.width && _this20._options.minSize.height === _this20._options.size.height && (outputImage.width < _this20._options.minSize.width || outputImage.height < _this20._options.minSize.height)) {\r\n var w = Math.max(outputImage.width, _this20._options.minSize.width);\r\n var h = Math.max(outputImage.height, _this20._options.minSize.height);\r\n outputImage = create('canvas');\r\n outputImage.width = w;\r\n outputImage.height = h;\r\n var _ctx = outputImage.getContext('2d');\r\n _ctx.drawImage(transformedImage, 0, 0, w, h);\r\n }\r\n\r\n // prevent smaller square output image, this is a quick fix for square images, should be done a lot neater\r\n if (_this20._options.forceMinSize && _this20._ratio === 1 && (outputImage.width < _this20._options.minSize.width || outputImage.height < _this20._options.minSize.height)) {\r\n outputImage = create('canvas');\r\n outputImage.width = _this20._options.minSize.width;\r\n outputImage.height = _this20._options.minSize.height;\r\n var _ctx2 = outputImage.getContext('2d');\r\n _ctx2.drawImage(transformedImage, 0, 0, outputImage.width, outputImage.height);\r\n }\r\n\r\n // store output\r\n _this20._data.output.width = outputImage.width;\r\n _this20._data.output.height = outputImage.height;\r\n _this20._data.output.image = outputImage;\r\n\r\n _this20._onTransformCanvas(function (transformedData) {\r\n _this20._data = transformedData;\r\n _this20._options.didTransform.apply(_this20, [_this20.data, _this20]);\r\n ready(_this20._data.output.image);\r\n });\r\n });\r\n }\r\n }, {\r\n key: '_onTransformCanvas',\r\n value: function _onTransformCanvas(ready) {\r\n this._options.willTransform.apply(this, [this.data, ready, this]);\r\n }\r\n\r\n /**\r\n * Creates the editor nodes\r\n * @private\r\n */\r\n\r\n }, {\r\n key: '_appendEditor',\r\n value: function _appendEditor() {\r\n var _this21 = this;\r\n\r\n // we already have an editor\r\n if (this._imageEditor) {\r\n return;\r\n }\r\n\r\n // add editor\r\n this._imageEditor = new ImageEditor(create('div'), {\r\n minSize: this._options.minSize,\r\n devicePixelRatio: this._options.devicePixelRatio,\r\n\r\n buttonConfirmClassName: this._options.buttonConfirmClassName,\r\n buttonCancelClassName: this._options.buttonCancelClassName,\r\n buttonRotateClassName: this._options.buttonRotateClassName,\r\n\r\n buttonConfirmLabel: this._options.buttonConfirmLabel,\r\n buttonCancelLabel: this._options.buttonCancelLabel,\r\n buttonRotateLabel: this._options.buttonRotateLabel,\r\n\r\n buttonConfirmTitle: this._options.buttonConfirmTitle,\r\n buttonCancelTitle: this._options.buttonCancelTitle,\r\n buttonRotateTitle: this._options.buttonRotateTitle\r\n });\r\n\r\n // listen to events\r\n ImageEditorEvents.forEach(function (e) {\r\n _this21._imageEditor.element.addEventListener(e, _this21);\r\n });\r\n }\r\n }, {\r\n key: '_scaleDropArea',\r\n value: function _scaleDropArea(ratio) {\r\n var node = this._getRatioSpacerElement();\r\n if (!node || !this._element) {\r\n return;\r\n }\r\n node.style.marginBottom = ratio * 100 + '%';\r\n this._element.setAttribute('data-ratio', '1:' + ratio);\r\n }\r\n\r\n /**\r\n * Data Layer\r\n * @private\r\n */\r\n // image editor closed\r\n\r\n }, {\r\n key: '_onCancel',\r\n value: function _onCancel(e) {\r\n this._removeState('editor');\r\n\r\n this._options.didCancel.apply(this, [this]);\r\n\r\n this._showButtons();\r\n\r\n this._hideEditor();\r\n\r\n if (this._options.instantEdit && !this._hasInitialImage && this._isAutoCrop()) {\r\n this._doRemove();\r\n }\r\n }\r\n\r\n // user confirmed changes\r\n\r\n }, {\r\n key: '_onConfirm',\r\n value: function _onConfirm(e) {\r\n var _this22 = this;\r\n\r\n // if\r\n // - service set\r\n // - and we are pushing\r\n // - and we don't instant edit\r\n // we will upload\r\n var willUpload = this._options.service && this._options.push;\r\n if (willUpload) {\r\n this._startProgress(function () {\r\n _this22._updateProgress(0.1);\r\n });\r\n } else {\r\n this._startProgressLoop();\r\n }\r\n\r\n this._removeState('editor');\r\n\r\n this._addState('busy');\r\n\r\n // clear data\r\n this._output.value = '';\r\n\r\n // apply new action object to this._data\r\n this._data.actions.rotation = e.detail.rotation;\r\n this._data.actions.crop = e.detail.crop;\r\n this._data.actions.crop.type = CropType.MANUAL;\r\n\r\n // do transforms\r\n this._applyTransforms(this._data.input.image, function (transformedImage) {\r\n\r\n // user confirmed the crop (and changes have been applied to data)\r\n _this22._options.didConfirm.apply(_this22, [_this22.data, _this22]);\r\n\r\n // set new image result\r\n var images = _this22._getInOut();\r\n var intro = images[0].className === 'out' ? images[0] : images[1];\r\n var outro = intro === images[0] ? images[1] : images[0];\r\n\r\n intro.className = 'in';\r\n intro.style.opacity = '0';\r\n intro.style.zIndex = '2';\r\n outro.className = 'out';\r\n outro.style.zIndex = '1';\r\n\r\n // scale ratio\r\n var ratio = _this22._options.devicePixelRatio === 'auto' ? window.devicePixelRatio : _this22._options.devicePixelRatio;\r\n\r\n // new image get's\r\n intro.src = '';\r\n intro.src = cloneCanvasScaled(transformedImage, intro.offsetWidth / transformedImage.width * ratio).toDataURL();\r\n intro.onload = function () {\r\n intro.onload = null;\r\n\r\n // scale the dropzone\r\n if (_this22._options.ratio === 'free') {\r\n _this22._ratio = intro.naturalHeight / intro.naturalWidth;\r\n _this22._scaleDropArea(_this22._ratio);\r\n }\r\n\r\n // close the editor\r\n _this22._hideEditor();\r\n\r\n // wait a tiny bit so animations sync up nicely\r\n var timer = setTimeout(function () {\r\n\r\n removeTimer(_this22._timers, timer);\r\n\r\n // show the preview\r\n _this22._showPreview(intro, function () {\r\n // save the data\r\n _this22._save(function (err, data, res) {\r\n // done!\r\n _this22._toggleButton('upload', true);\r\n\r\n if (willUpload) {\r\n _this22._stopProgress();\r\n } else {\r\n _this22._stopProgressLoop();\r\n }\r\n\r\n _this22._removeState('busy');\r\n\r\n _this22._showButtons();\r\n }, willUpload);\r\n });\r\n }, 250);\r\n\r\n _this22._timers.push(timer);\r\n };\r\n });\r\n }\r\n }, {\r\n key: '_cropAuto',\r\n value: function _cropAuto() {\r\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (data) {};\r\n\r\n var isTilted = this._data.actions.rotation % 180 !== 0;\r\n\r\n var rect = getAutoCropRect(isTilted ? this._data.input.image.height : this._data.input.image.width, isTilted ? this._data.input.image.width : this._data.input.image.height, this._ratio);\r\n\r\n this._crop(rect.x, rect.y, rect.width, rect.height, callback, CropType.AUTO);\r\n }\r\n }, {\r\n key: '_crop',\r\n value: function _crop(x, y, width, height) {\r\n var callback = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (data) {};\r\n var cropType = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : CropType.MANUAL;\r\n\r\n\r\n // clear data\r\n this._output.value = '';\r\n\r\n // apply new action object to this._data\r\n this._data.actions.crop = {\r\n x: x,\r\n y: y,\r\n width: width,\r\n height: height\r\n };\r\n this._data.actions.crop.type = cropType;\r\n\r\n this._manualTransform(callback);\r\n }\r\n }, {\r\n key: '_manualTransform',\r\n value: function _manualTransform(callback) {\r\n var _this23 = this;\r\n\r\n this._startProgressLoop();\r\n this._addState('busy');\r\n\r\n // do transforms\r\n this._applyTransforms(this._data.input.image, function (transformedImage) {\r\n // set new image result\r\n var images = _this23._getInOut();\r\n var intro = images[0].className === 'out' ? images[0] : images[1];\r\n var outro = intro === images[0] ? images[1] : images[0];\r\n\r\n intro.className = 'in';\r\n intro.style.opacity = '1';\r\n intro.style.zIndex = '2';\r\n outro.className = 'out';\r\n outro.style.zIndex = '0';\r\n\r\n // scale ratio\r\n var pixelRatio = _this23._options.devicePixelRatio === 'auto' ? window.devicePixelRatio : _this23._options.devicePixelRatio;\r\n\r\n // new image\r\n intro.src = '';\r\n intro.src = cloneCanvasScaled(transformedImage, intro.offsetWidth / transformedImage.width * pixelRatio).toDataURL();\r\n intro.onload = function () {\r\n intro.onload = null;\r\n\r\n // scale the dropzone\r\n if (_this23._options.ratio === 'free') {\r\n _this23._ratio = intro.naturalHeight / intro.naturalWidth;\r\n _this23._scaleDropArea(_this23._ratio);\r\n }\r\n\r\n // determine if will also upload\r\n var willUpload = _this23._options.service && _this23._options.push;\r\n\r\n var save = function save() {\r\n // save the data\r\n _this23._save(function (err, data, res) {\r\n // stop loader\r\n if (!willUpload) {\r\n _this23._stopProgressLoop();\r\n }\r\n\r\n _this23._removeState('busy');\r\n\r\n callback.apply(_this23, [_this23.data]);\r\n }, willUpload);\r\n };\r\n\r\n if (willUpload) {\r\n _this23._startProgress(save);\r\n } else {\r\n save();\r\n }\r\n };\r\n });\r\n }\r\n }, {\r\n key: '_save',\r\n value: function _save() {\r\n var _this24 = this;\r\n\r\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\r\n var allowUpload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\r\n\r\n if (this._isBeingDestroyed) {\r\n return;\r\n }\r\n\r\n // flatten data also turns output canvas into data uri\r\n // removes input file object and image object\r\n var data = this.dataBase64;\r\n\r\n // decide if we need to\r\n // - A. Store the data in an output field\r\n // - B. Upload the data and store the response in output field\r\n\r\n // - we are not doing async uploading (in which case output is used for response)\r\n // - we are not initialising a replaceable image\r\n if (!this._options.service && !(this._isInitialising && !this._isImageOnly())) {\r\n this._options.willSave.apply(this, [data, function (data) {\r\n _this24._store(data);\r\n\r\n _this24._options.didSave.apply(_this24, [data, _this24]);\r\n }, this]);\r\n }\r\n\r\n if (this._isBeingDestroyed) {\r\n return;\r\n }\r\n\r\n // is remote service defined upload async\r\n if (this._options.service && allowUpload) {\r\n // allow user to modify the data\r\n this._options.willSave.apply(this, [data, function (data) {\r\n _this24._addState('upload');\r\n\r\n if (_this24._imageHopper && _this24._options.dropReplace) {\r\n _this24._imageHopper.enabled = false;\r\n }\r\n\r\n // do the actual uploading\r\n _this24._upload(data, function (err, res) {\r\n if (_this24._imageHopper && _this24._options.dropReplace) {\r\n _this24._imageHopper.enabled = true;\r\n }\r\n\r\n // store response\r\n if (!err) {\r\n _this24._storeServerResponse(res);\r\n }\r\n\r\n // we did upload data\r\n _this24._options.didUpload.apply(_this24, [err, data, res, _this24]);\r\n\r\n _this24._removeState('upload');\r\n\r\n // done!\r\n callback(err, data, res);\r\n });\r\n }, this]);\r\n }\r\n\r\n // if no service, we're done here\r\n if (!this._options.service || !allowUpload) {\r\n callback();\r\n }\r\n }\r\n\r\n // stores active file information in hidden output field\r\n\r\n }, {\r\n key: '_storeServerResponse',\r\n value: function _storeServerResponse(data) {\r\n // remove required flag\r\n if (this._isRequired) {\r\n this._input.required = false;\r\n }\r\n\r\n // store data returned from server\r\n this._data.server = data;\r\n\r\n // sync with output value\r\n this._output.value = (typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object' ? JSON.stringify(this._data.server) : data;\r\n }\r\n\r\n // stores data in output field\r\n\r\n }, {\r\n key: '_store',\r\n value: function _store(data) {\r\n if (this._isRequired) {\r\n this._input.required = false;\r\n }\r\n\r\n this._output.value = JSON.stringify(data);\r\n }\r\n\r\n // uploads given data to server\r\n\r\n }, {\r\n key: '_upload',\r\n value: function _upload(data, callback) {\r\n var // function(error) {} \t\t\t// error message (string),\r\n _this25 = this;\r\n\r\n this.requestOutput(function (fileData, formData) {\r\n var statusNode = _this25._element.querySelector('.slim-upload-status');\r\n\r\n var requestDecorator = _this25._options.willRequest;\r\n\r\n // callback methods\r\n var onProgress = function onProgress(loaded, total) {\r\n _this25._updateProgress(Math.max(0.1, loaded / total));\r\n };\r\n\r\n var onSuccess = function onSuccess(obj) {\r\n var timer = setTimeout(function () {\r\n\r\n removeTimer(_this25._timers, timer);\r\n\r\n // it's possible that Slim has been destroyed in the mean time.\r\n if (_this25._isBeingDestroyed) {\r\n return;\r\n }\r\n\r\n statusNode.innerHTML = _this25._options.statusUploadSuccess;\r\n statusNode.setAttribute('data-state', 'success');\r\n statusNode.style.opacity = 1;\r\n\r\n // hide status update after 2 seconds\r\n var timer = setTimeout(function () {\r\n removeTimer(_this25._timers, timer);\r\n statusNode.style.opacity = 0;\r\n }, 2000);\r\n\r\n _this25._timers.push(timer);\r\n }, 250);\r\n\r\n _this25._timers.push(timer);\r\n\r\n callback(null, obj);\r\n };\r\n\r\n var onError = function onError(status) {\r\n var html = '';\r\n if (status === 'file-too-big') {\r\n html = _this25._options.statusContentLength;\r\n } else {\r\n html = _this25._options.didReceiveServerError.apply(_this25, [status, _this25._options.statusUnknownResponse, _this25]);\r\n }\r\n\r\n // when an error occurs the status update is not automatically hidden\r\n var timer = setTimeout(function () {\r\n\r\n removeTimer(_this25._timers, timer);\r\n\r\n statusNode.innerHTML = html;\r\n statusNode.setAttribute('data-state', 'error');\r\n statusNode.style.opacity = 1;\r\n }, 250);\r\n\r\n _this25._timers.push(timer);\r\n\r\n callback(status);\r\n };\r\n\r\n // use default send method or custom implementation\r\n if (typeof _this25._options.service === 'string') {\r\n send(_this25._options.service, _this25._options.uploadMethod, formData, requestDecorator, onProgress, onSuccess, onError);\r\n } else if (typeof _this25._options.service === 'function') {\r\n _this25._options.service.apply(_this25, [_this25._options.serviceFormat === 'file' ? fileData : formData, onProgress, // function(loaded, total) {} // loaded bytes (number), total bytes (number)\r\n onSuccess, // function(response) {} \t\t// response (object or string)\r\n onError, _this25]);\r\n }\r\n }, data);\r\n }\r\n }, {\r\n key: 'requestOutput',\r\n value: function requestOutput(cb, data) {\r\n var _this26 = this;\r\n\r\n if (!this._data.input.file) {\r\n cb(null, null);\r\n return;\r\n }\r\n\r\n if (!data) {\r\n data = this.dataBase64;\r\n }\r\n\r\n // copy the meta data of the original file to the output\r\n loadImage.parseMetaData(this._data.input.file,\r\n\r\n // receives image data from input file\r\n function (imageData) {\r\n var fileData = [];\r\n var formData = new FormData();\r\n\r\n // if input should be posted along, append data\r\n // to FormData object as file\r\n if (inArray('input', _this26._options.post)) {\r\n // add to data array\r\n fileData.push(_this26._data.input.file);\r\n\r\n // add to formdata\r\n formData.append(_this26._inputReference, _this26._data.input.file, _this26._data.input.file.name);\r\n }\r\n\r\n // if image data is defined, turn it into a file object (we can send files if we're uploading)\r\n if (inArray('output', _this26._options.post) && _this26._data.output.image !== null && _this26._options.uploadBase64 === false) {\r\n var output = base64ToBlob(data.output.image, data.output.name);\r\n\r\n // if image head available, inject in output\r\n if (imageData.imageHead && _this26._options.copyImageHead) {\r\n try {\r\n output = new Blob([imageData.imageHead, loadImage.blobSlice.call(output, 20)], {\r\n type: getMimeTypeFromDataURI(data.output.image)\r\n });\r\n\r\n output = blobToFile(output, data.output.name);\r\n } catch (e) {}\r\n }\r\n\r\n // add to data array\r\n fileData.push(output);\r\n\r\n // add to formdata\r\n var field = 'slim_output_' + _this26._uid;\r\n data.output.image = null; // clear base64 data\r\n data.output.field = field;\r\n formData.append(field, output, data.output.name);\r\n }\r\n\r\n // output dataset\r\n formData.append(_this26._output.name, JSON.stringify(data));\r\n\r\n // done\r\n cb(fileData, formData);\r\n }, {\r\n maxMetaDataSize: 262144,\r\n disableImageHead: false\r\n });\r\n }\r\n }, {\r\n key: '_showEditor',\r\n value: function _showEditor() {\r\n SlimPopover.className = this._options.popoverClassName;\r\n\r\n SlimPopover.show();\r\n\r\n this._imageEditor.show();\r\n }\r\n }, {\r\n key: '_hideEditor',\r\n value: function _hideEditor() {\r\n var _this27 = this;\r\n\r\n this._imageEditor.hide();\r\n\r\n var timer = setTimeout(function () {\r\n removeTimer(_this27._timers, timer);\r\n SlimPopover.hide();\r\n }, 250);\r\n\r\n this._timers.push(timer);\r\n }\r\n\r\n /**\r\n * Animations\r\n */\r\n\r\n }, {\r\n key: '_showPreview',\r\n value: function _showPreview(intro, callback) {\r\n snabbt(intro, {\r\n fromPosition: [0, 50, 0],\r\n position: [0, 0, 0],\r\n\r\n fromScale: [1.5, 1.5],\r\n scale: [1, 1],\r\n\r\n fromOpacity: 0,\r\n opacity: 1,\r\n\r\n easing: 'spring',\r\n springConstant: 0.3,\r\n springDeceleration: 0.7,\r\n\r\n complete: function complete() {\r\n resetTransforms(intro);\r\n\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n });\r\n }\r\n }, {\r\n key: '_hideResult',\r\n value: function _hideResult(callback) {\r\n var intro = this._getIntro();\r\n if (!intro) {\r\n return;\r\n }\r\n\r\n snabbt(intro, {\r\n fromScale: [1, 1],\r\n scale: [0.5, 0.5],\r\n\r\n fromOpacity: 1,\r\n opacity: 0,\r\n\r\n easing: 'spring',\r\n springConstant: 0.3,\r\n springDeceleration: 0.75,\r\n\r\n complete: function complete() {\r\n resetTransforms(intro);\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n });\r\n }\r\n }, {\r\n key: '_showButtons',\r\n value: function _showButtons(callback) {\r\n if (!this._btnGroup) {\r\n return;\r\n }\r\n\r\n this._btnGroup.style.display = '';\r\n\r\n // setup animation\r\n var animation = {\r\n fromScale: [0.5, 0.5],\r\n scale: [1, 1],\r\n fromPosition: [0, 10, 0],\r\n position: [0, 0, 0],\r\n fromOpacity: 0,\r\n opacity: 1,\r\n complete: function complete() {\r\n resetTransforms(this);\r\n },\r\n allDone: function allDone() {\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n };\r\n\r\n // don't animate when detached\r\n if (this.isDetached()) {\r\n animation.duration = 1;\r\n } else {\r\n animation.delay = function (i) {\r\n return 250 + i * 50;\r\n };\r\n animation.easing = 'spring';\r\n animation.springConstant = 0.3;\r\n animation.springDeceleration = 0.85;\r\n }\r\n\r\n snabbt(this._btnGroup.childNodes, animation);\r\n }\r\n }, {\r\n key: '_hideButtons',\r\n value: function _hideButtons(callback) {\r\n var _this28 = this;\r\n\r\n if (!this._btnGroup) {\r\n return;\r\n }\r\n\r\n var animation = {\r\n fromScale: [1, 1],\r\n scale: [0.85, 0.85],\r\n fromOpacity: 1,\r\n opacity: 0,\r\n allDone: function allDone() {\r\n _this28._btnGroup.style.display = 'none';\r\n if (callback) {\r\n callback();\r\n }\r\n }\r\n };\r\n\r\n // don't animate when detached\r\n if (this.isDetached()) {\r\n animation.duration = 1;\r\n } else {\r\n animation.easing = 'spring';\r\n animation.springConstant = 0.3;\r\n animation.springDeceleration = 0.75;\r\n }\r\n\r\n // go hide the buttons\r\n snabbt(this._btnGroup.childNodes, animation);\r\n }\r\n }, {\r\n key: '_hideStatus',\r\n value: function _hideStatus() {\r\n var statusNode = this._element.querySelector('.slim-upload-status');\r\n statusNode.style.opacity = 0;\r\n }\r\n }, {\r\n key: '_doEdit',\r\n value: function _doEdit() {\r\n var _this29 = this;\r\n\r\n // if no input data available, can't edit anything\r\n if (!this._data.input.image) {\r\n return;\r\n }\r\n\r\n // now in editor mode\r\n this._addState('editor');\r\n\r\n // create editor (if not already created)\r\n if (!this._imageEditor) {\r\n this._appendEditor();\r\n }\r\n\r\n // hide or show rotate button\r\n this._imageEditor.showRotateButton = this._options.rotateButton;\r\n\r\n // append to popover\r\n SlimPopover.inner = this._imageEditor.element;\r\n\r\n // read the data\r\n this._imageEditor.open(\r\n // send copy of canvas to the editor\r\n //cloneCanvas(this._data.input.image),\r\n this._data.input.image,\r\n\r\n // determine ratio\r\n this._options.ratio === 'free' ? null : this._ratio,\r\n\r\n // the initial crop to show\r\n this._data.actions.crop,\r\n\r\n // the initial rotation of the image\r\n this._data.actions.rotation,\r\n\r\n // handle editor load\r\n function () {\r\n _this29._showEditor();\r\n\r\n _this29._hideButtons();\r\n\r\n _this29._hideStatus();\r\n });\r\n }\r\n }, {\r\n key: '_doRemove',\r\n value: function _doRemove(done) {\r\n var _this30 = this;\r\n\r\n // cannot remove when is only one image\r\n if (this._isImageOnly()) {\r\n return;\r\n }\r\n\r\n this._clearState();\r\n this._addState('empty');\r\n\r\n this._hasInitialImage = false;\r\n if (this._imageHopper) {\r\n this._imageHopper.enabled = true;\r\n }\r\n\r\n if (this._isRequired) {\r\n this._input.required = true;\r\n }\r\n\r\n var out = this._getOutro();\r\n if (out) {\r\n out.style.opacity = '0';\r\n }\r\n\r\n // get public available clone of data\r\n var data = this.data;\r\n\r\n // now reset all data\r\n this._resetData();\r\n\r\n var timer = setTimeout(function () {\r\n removeTimer(_this30._timers, timer);\r\n if (_this30._isBeingDestroyed) {\r\n return;\r\n }\r\n\r\n _this30._hideButtons(function () {\r\n _this30._toggleButton('upload', true);\r\n });\r\n\r\n _this30._hideStatus();\r\n\r\n _this30._hideResult();\r\n\r\n _this30._options.didRemove.apply(_this30, [data, _this30]);\r\n\r\n if (done) {\r\n done();\r\n }\r\n }, this.isDetached() ? 0 : 250);\r\n\r\n this._timers.push(timer);\r\n\r\n return data;\r\n }\r\n }, {\r\n key: '_doUpload',\r\n value: function _doUpload(callback) {\r\n var _this31 = this;\r\n\r\n // if no input data available, can't upload anything\r\n if (!this._data.input.image) {\r\n return;\r\n }\r\n\r\n this._addState('upload');\r\n this._startProgress();\r\n\r\n this._hideButtons(function () {\r\n // block upload button\r\n _this31._toggleButton('upload', false);\r\n\r\n _this31._save(function (err, data, res) {\r\n _this31._removeState('upload');\r\n _this31._stopProgress();\r\n\r\n if (callback) {\r\n callback.apply(_this31, [err, data, res]);\r\n }\r\n\r\n if (err) {\r\n _this31._toggleButton('upload', true);\r\n }\r\n\r\n _this31._showButtons();\r\n });\r\n });\r\n }\r\n }, {\r\n key: '_doDownload',\r\n value: function _doDownload() {\r\n var image = this._data.output.image;\r\n if (!image) {\r\n return;\r\n }\r\n\r\n downloadCanvas(this._data, this._options.jpegCompression, this._options.forceType);\r\n }\r\n }, {\r\n key: '_doDestroy',\r\n value: function _doDestroy() {\r\n var _this32 = this;\r\n\r\n // set destroy flag to halt any running functionality\r\n this._isBeingDestroyed = true;\r\n\r\n // clear timers\r\n this._timers.forEach(function (timer) {\r\n clearTimeout(timer);\r\n });\r\n this._timers = [];\r\n\r\n // clean up snabbt animations\r\n snabbt(this._element, 'detach');\r\n\r\n // this removes the image hopper if it's attached\r\n if (this._imageHopper) {\r\n HopperEvents.forEach(function (e) {\r\n _this32._imageHopper.element.removeEventListener(e, _this32);\r\n });\r\n this._imageHopper.destroy();\r\n this._imageHopper = null;\r\n }\r\n\r\n // this block removes the image editor\r\n if (this._imageEditor) {\r\n ImageEditorEvents.forEach(function (e) {\r\n _this32._imageEditor.element.removeEventListener(e, _this32);\r\n });\r\n this._imageEditor.destroy();\r\n this._imageEditor = null;\r\n }\r\n\r\n // remove button event listeners\r\n nodeListToArray(this._btnGroup.children).forEach(function (btn) {\r\n btn.removeEventListener('click', _this32);\r\n });\r\n\r\n // stop listening to input\r\n this._input.removeEventListener('change', this);\r\n\r\n // detect if was wrapped, if so, remove wrapping (needs to have parent node)\r\n if (this._element !== this._originalElement && this._element.parentNode) {\r\n this._element.parentNode.replaceChild(this._originalElement, this._element);\r\n }\r\n\r\n // restore HTML of original element\r\n this._originalElement.innerHTML = this._originalElementInner;\r\n\r\n // get current attributes and remove all, then add original attributes\r\n function matchesAttributeInList(a, attributes) {\r\n return attributes.filter(function (attr) {\r\n return a.name === attr.name && a.value === attr.value;\r\n }).length !== 0;\r\n }\r\n\r\n var attributes = getElementAttributes(this._originalElement);\r\n attributes.forEach(function (attribute) {\r\n // if attribute is contained in original element attribute list and is the same, don't remove\r\n if (matchesAttributeInList(attribute, _this32._originalElementAttributes)) {\r\n return;\r\n }\r\n\r\n // else remove\r\n _this32._originalElement.removeAttribute(attribute.name);\r\n });\r\n\r\n this._originalElementAttributes.forEach(function (attribute) {\r\n // attribute was never removed\r\n if (matchesAttributeInList(attribute, attributes)) {\r\n return;\r\n }\r\n\r\n // add attribute\r\n _this32._originalElement.setAttribute(attribute.name, attribute.value);\r\n });\r\n\r\n // now destroyed this counter so the total Slim count can be lowered\r\n SlimCount = Math.max(0, SlimCount - 1);\r\n\r\n // if slim count has reached 0 it's time to clean up the popover\r\n if (SlimPopover && SlimCount === 0) {\r\n SlimPopover.destroy();\r\n SlimPopover = null;\r\n }\r\n\r\n this._originalElement = null;\r\n this._element = null;\r\n this._input = null;\r\n this._output = null;\r\n this._btnGroup = null;\r\n this._options = null;\r\n }\r\n }, {\r\n key: 'dataBase64',\r\n\r\n\r\n /**\r\n * Public API\r\n */\r\n // properties\r\n get: function get() {\r\n return flattenData(this._data, this._options.post, this._options.jpegCompression, this._options.forceType, this._options.service !== null);\r\n }\r\n }, {\r\n key: 'data',\r\n get: function get() {\r\n return cloneData(this._data);\r\n }\r\n }, {\r\n key: 'element',\r\n get: function get() {\r\n return this._element;\r\n }\r\n }, {\r\n key: 'service',\r\n set: function set(service) {\r\n this._options.service = service;\r\n }\r\n }, {\r\n key: 'size',\r\n set: function set(dimensions) {\r\n this.setSize(dimensions, null);\r\n }\r\n }, {\r\n key: 'rotation',\r\n set: function set(rotation) {\r\n this.setRotation(rotation, null);\r\n }\r\n }, {\r\n key: 'forceSize',\r\n set: function set(dimensions) {\r\n this.setForceSize(dimensions, null);\r\n }\r\n }, {\r\n key: 'ratio',\r\n set: function set(ratio) {\r\n this.setRatio(ratio, null);\r\n }\r\n }], [{\r\n key: 'options',\r\n value: function options() {\r\n var defaults = {\r\n // edit button is enabled by default\r\n edit: true,\r\n\r\n // immidiately summons editor on load\r\n instantEdit: false,\r\n\r\n // set to true to upload data as base64 string\r\n uploadBase64: false,\r\n\r\n // metadata values\r\n meta: {},\r\n\r\n // ratio of crop by default is the same as input image ratio\r\n ratio: 'free',\r\n\r\n // use fix value for device pixel ratio\r\n devicePixelRatio: 1, // set to 'auto' to use device ratio\r\n\r\n // dimensions to resize the resulting image to\r\n size: null,\r\n\r\n // set initial rotation\r\n rotation: null,\r\n\r\n // initial crop settings for example: {x:0, y:0, width:100, height:100}\r\n crop: null,\r\n\r\n // post these values\r\n post: ['output', 'actions'],\r\n\r\n // call this service to submit cropped data\r\n service: null,\r\n serviceFormat: null,\r\n\r\n // sharpen filter value, really low values might improve image output\r\n filterSharpen: 0,\r\n\r\n // when service is set, and this is set to true, Soon will auto upload all crops (also auto crops)\r\n push: false,\r\n\r\n // default fallback name for field\r\n defaultInputName: 'slim[]',\r\n\r\n // minimum size of cropped area object with width and height property\r\n minSize: {\r\n width: 0,\r\n height: 0\r\n },\r\n\r\n // maximum file size in MB to upload\r\n maxFileSize: null,\r\n\r\n // compression of JPEG (between 0 and 100)\r\n jpegCompression: null,\r\n\r\n // upload method of request\r\n uploadMethod: 'POST',\r\n\r\n // render download link\r\n download: false,\r\n\r\n // save initially loaded image\r\n saveInitialImage: false,\r\n\r\n // the type to force (jpe|jpg|jpeg or png)\r\n forceType: false,\r\n\r\n // the forced output size of the image\r\n forceSize: null,\r\n\r\n forceMinSize: true,\r\n\r\n // disable drop to replace\r\n dropReplace: true,\r\n\r\n // remote URL service\r\n fetcher: null,\r\n\r\n // set the internal canvas size\r\n internalCanvasSize: {\r\n width: 4096,\r\n height: 4096\r\n },\r\n\r\n // use these settings on low memory enviroment\r\n internalCanvasSizeLowMemory: {\r\n width: 4096,\r\n height: 4096\r\n },\r\n\r\n // copies the input image meta data to the output image\r\n copyImageHead: false,\r\n\r\n // enable or disable rotation\r\n rotateButton: true,\r\n\r\n // popover classname\r\n popoverClassName: null,\r\n\r\n // label HTML to show inside drop area\r\n label: '

    Drop your image here

    ',\r\n labelLoading: '

    Loading image...

    ',\r\n\r\n // error messages\r\n statusFileType: '

    Invalid file type, expects: $0.

    ',\r\n statusFileSize: '

    File is too big, maximum file size: $0 MB.

    ',\r\n statusNoSupport: '

    Your browser does not support image cropping.

    ',\r\n statusImageTooSmall: '

    Image is too small, minimum size is: $0 pixels.

    ',\r\n statusContentLength: ' The file is probably too big',\r\n statusUnknownResponse: ' An unknown error occurred',\r\n statusUploadSuccess: ' Saved',\r\n statusLocalUrlProblem: null,\r\n\r\n // callback methods\r\n didInit: function didInit(data) {},\r\n didLoad: function didLoad(file, image, meta) {\r\n return true;\r\n },\r\n didSave: function didSave(data) {},\r\n didUpload: function didUpload(err, data, res) {},\r\n didReceiveServerError: function didReceiveServerError(err, defaultError) {\r\n return defaultError;\r\n },\r\n didRemove: function didRemove(data) {},\r\n didTransform: function didTransform(data) {},\r\n didConfirm: function didConfirm(data) {},\r\n didCancel: function didCancel() {},\r\n didThrowError: function didThrowError() {},\r\n\r\n willCropInitial: function willCropInitial(file, cb) {\r\n cb(null);\r\n },\r\n willTransform: function willTransform(data, cb) {\r\n cb(data);\r\n },\r\n willSave: function willSave(data, cb) {\r\n cb(data);\r\n },\r\n willRemove: function willRemove(data, cb) {\r\n cb();\r\n },\r\n willRequest: function willRequest(xhr, data) {},\r\n willFetch: function willFetch(xhr) {},\r\n willLoad: function willLoad(xhr) {}\r\n };\r\n\r\n // add default button labels\r\n SlimButtons.concat(ImageEditor.Buttons).concat('rotate').forEach(function (btn) {\r\n var capitalized = capitalizeFirstLetter(btn);\r\n defaults['button' + capitalized + 'ClassName'] = null;\r\n defaults['button' + capitalized + 'Label'] = capitalized;\r\n defaults['button' + capitalized + 'Title'] = capitalized;\r\n });\r\n\r\n return defaults;\r\n }\r\n }]);\r\n\r\n return Slim;\r\n}();\r\n\r\n/**\r\n * Slim Static Methods\r\n */\r\n\r\n\r\n(function () {\r\n var instances = [];\r\n\r\n var indexOfElement = function indexOfElement(element) {\r\n var i = 0;\r\n var l = instances.length;\r\n for (; i < l; i++) {\r\n if (instances[i].isAttachedTo(element)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n };\r\n\r\n function toLabel(v) {\r\n // if value set, use as label\r\n if (v) {\r\n return '

    ' + v + '

    ';\r\n }\r\n\r\n // else use default text\r\n return null;\r\n }\r\n\r\n function toFunctionReference(name) {\r\n var ref = window;\r\n var levels = name.split('.');\r\n levels.forEach(function (level, index) {\r\n if (!ref[levels[index]]) {\r\n return;\r\n }\r\n ref = ref[levels[index]];\r\n });\r\n return ref !== window ? ref : null;\r\n }\r\n\r\n var passThrough = function passThrough(v) {\r\n return v;\r\n };\r\n var defaultFalse = function defaultFalse(v) {\r\n return v === 'true';\r\n };\r\n var defaultTrue = function defaultTrue(v) {\r\n return v ? v === 'true' : true;\r\n };\r\n var defaultLabel = function defaultLabel(v) {\r\n return toLabel(v);\r\n };\r\n var defaultFunction = function defaultFunction(v) {\r\n return v ? toFunctionReference(v) : null;\r\n };\r\n var defaultSize = function defaultSize(v) {\r\n if (!v) {\r\n return null;\r\n }\r\n var parts = intSplit(v, ',');\r\n return {\r\n width: parts[0],\r\n height: parts[1]\r\n };\r\n };\r\n\r\n var toFloat = function toFloat(v) {\r\n if (!v) {\r\n return null;\r\n }\r\n return parseFloat(v);\r\n };\r\n\r\n var toInt = function toInt(v) {\r\n if (!v) {\r\n return null;\r\n }\r\n return parseInt(v, 10);\r\n };\r\n\r\n var toRect = function toRect(v) {\r\n if (!v) {\r\n return null;\r\n }\r\n var obj = {};\r\n v.split(',').map(function (p) {\r\n return parseInt(p, 10);\r\n }).forEach(function (v, i) {\r\n obj[Rect[i]] = v;\r\n });\r\n return obj;\r\n };\r\n\r\n var defaults = {\r\n // is user allowed to download the cropped image?\r\n download: defaultFalse,\r\n\r\n // is user allowed to edit the cropped image?\r\n edit: defaultTrue,\r\n\r\n // open editor immidiately on file drop\r\n instantEdit: defaultFalse,\r\n\r\n // minimum crop size in pixels of original image\r\n minSize: defaultSize,\r\n\r\n // the final bounding box of the output image\r\n size: defaultSize,\r\n\r\n // the forced output size of the image\r\n forceSize: defaultSize,\r\n\r\n forceMinSize: defaultTrue,\r\n\r\n // the internal data canvas size\r\n internalCanvasSize: defaultSize,\r\n internalCanvasSizeLowMemory: defaultSize,\r\n\r\n // url to post to\r\n service: function service(v) {\r\n if (typeof v === 'undefined') {\r\n return null;\r\n }\r\n var fn = toFunctionReference(v);\r\n if (fn) {\r\n return fn;\r\n }\r\n return v;\r\n },\r\n\r\n // format of service data\r\n serviceFormat: function serviceFormat(v) {\r\n return typeof v === 'undefined' ? null : v;\r\n },\r\n\r\n // url to fetch service\r\n fetcher: function fetcher(v) {\r\n return typeof v === 'undefined' ? null : v;\r\n },\r\n\r\n // set auto push mode\r\n push: defaultFalse,\r\n\r\n // initial rotation\r\n rotation: function rotation(v) {\r\n return typeof v === 'undefined' ? null : parseInt(v, 10);\r\n },\r\n\r\n // set crop rect\r\n crop: toRect,\r\n\r\n // what to post\r\n post: function post(v) {\r\n if (!v) {\r\n return null;\r\n }\r\n return v.split(',').map(function (item) {\r\n return item.trim();\r\n });\r\n },\r\n\r\n // default input name\r\n defaultInputName: passThrough,\r\n\r\n // the ratio of the crop\r\n ratio: function ratio(v) {\r\n if (!v) {\r\n return null;\r\n }\r\n return v;\r\n },\r\n\r\n // maximum file size\r\n maxFileSize: toFloat,\r\n\r\n // sharpen filter\r\n filterSharpen: toInt,\r\n\r\n // jpeg compression\r\n jpegCompression: toInt,\r\n\r\n // base64 data uploading\r\n uploadBase64: defaultFalse,\r\n\r\n // sets file type to force output to\r\n forceType: passThrough,\r\n\r\n // drop to replace\r\n dropReplace: defaultTrue,\r\n\r\n // bool determining if initial image should be saved\r\n saveInitialImage: defaultFalse,\r\n\r\n // copies input image head to output image\r\n copyImageHead: defaultFalse,\r\n\r\n // rotate button\r\n rotateButton: defaultTrue,\r\n\r\n // default labels\r\n label: defaultLabel,\r\n labelLoading: defaultLabel,\r\n\r\n // class name to put on popover element\r\n popoverClassName: passThrough,\r\n\r\n // the ratio for pixels\r\n devicePixelRatio: passThrough,\r\n\r\n // upload request method\r\n uploadMethod: passThrough\r\n };\r\n\r\n // labels\r\n ['FileSize', 'FileType', 'NoSupport', 'ImageTooSmall'].forEach(function (status) {\r\n defaults['status' + status] = defaultLabel;\r\n });\r\n\r\n // status\r\n ['ContentLength', 'UnknownResponse', 'UploadSuccess', 'localUrlProblem'].forEach(function (status) {\r\n defaults['status' + status] = passThrough;\r\n });\r\n\r\n // the did callbacks\r\n ['Init', 'Load', 'Save', 'Upload', 'Remove', 'Transform', 'ReceiveServerError', 'Confirm', 'Cancel', 'ThrowError'].forEach(function (cb) {\r\n defaults['did' + cb] = defaultFunction;\r\n });\r\n\r\n // the will callbacks\r\n ['CropInitial', 'Transform', 'Save', 'Remove', 'Request', 'Load', 'Fetch'].forEach(function (cb) {\r\n defaults['will' + cb] = defaultFunction;\r\n });\r\n\r\n // button defaults\r\n var buttonOptions = ['ClassName', 'Label', 'Title'];\r\n SlimButtons.concat(ImageEditor.Buttons).concat('rotate').forEach(function (btn) {\r\n var capitalized = capitalizeFirstLetter(btn);\r\n buttonOptions.forEach(function (opt) {\r\n defaults['button' + capitalized + opt] = passThrough;\r\n });\r\n });\r\n\r\n Slim.supported = function () {\r\n return !( // is opera mini\r\n Object.prototype.toString.call(window.operamini) === '[object OperaMini]' ||\r\n // no event listener support\r\n typeof window.addEventListener === 'undefined' ||\r\n // no file reader support\r\n typeof window.FileReader === 'undefined' ||\r\n // no blob slicing (can't dupe files)\r\n !('slice' in Blob.prototype) ||\r\n // no .createObjectURL support, used by download method but also convenient to exclude Android 4.3 and lower\r\n // Android 4.3 and lower don't support XHR2 responseType blob\r\n typeof window.URL === 'undefined' || typeof window.URL.createObjectURL === 'undefined');\r\n }();\r\n\r\n Slim.parse = function (context) {\r\n var elements;\r\n var element;\r\n var i;\r\n var croppers = [];\r\n\r\n // find all crop elements and bind Crop behavior\r\n elements = context.querySelectorAll('.slim:not([data-state])');\r\n i = elements.length;\r\n\r\n while (i--) {\r\n element = elements[i];\r\n croppers.push(Slim.create(element, Slim.getOptionsFromAttributes(element)));\r\n }\r\n\r\n return croppers;\r\n };\r\n\r\n Slim.getOptionsFromAttributes = function (element) {\r\n var dataset = getDataset(element);\r\n\r\n var options = {\r\n meta: {}\r\n };\r\n\r\n for (var prop in dataset) {\r\n var valueTransformer = defaults[prop];\r\n var _value = dataset[prop];\r\n\r\n if (valueTransformer) {\r\n _value = valueTransformer(_value);\r\n _value = _value === null ? clone(Slim.options()[prop]) : _value;\r\n options[prop] = _value;\r\n } else if (prop.indexOf('meta') === 0) {\r\n options['meta'][lowercaseFirstLetter(prop.substr(4))] = _value;\r\n }\r\n }\r\n\r\n return options;\r\n };\r\n\r\n Slim.find = function (element) {\r\n var result = instances.filter(function (instance) {\r\n return instance.isAttachedTo(element);\r\n });\r\n return result ? result[0] : null;\r\n };\r\n\r\n Slim.create = function (element, options) {\r\n // if already in array, can't create another slim\r\n if (Slim.find(element)) {\r\n return;\r\n }\r\n\r\n // if no options supplied, try to get the options from the element\r\n if (!options) {\r\n options = Slim.getOptionsFromAttributes(element);\r\n }\r\n\r\n // instance\r\n var slim = new Slim(element, options);\r\n\r\n // add new slim\r\n instances.push(slim);\r\n\r\n // return the slim instance\r\n return slim;\r\n };\r\n\r\n Slim.destroy = function (element) {\r\n var index = indexOfElement(element);\r\n\r\n if (index < 0) {\r\n return false;\r\n }\r\n\r\n instances[index].destroy();\r\n instances.splice(index, 1);\r\n\r\n return true;\r\n };\r\n})();\r\n return Slim;\r\n}()) : null;","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {DoServiceCall, Geti18NMessage} from '../../../Helpers/ServiceHelpers'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport i18n from '../../../i18n'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport {ToprError} from '../../../Models/Client'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {IRequestIdentifier} from '../../../Models/Server'\r\nimport {differenceInSeconds, intervalToDuration} from 'date-fns'\r\nimport {FormatSeconds} from '../../../Helpers/DateHelpers'\r\nimport {BackHandler} from 'react-native'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\n\r\nlet countDownTimer: NodeJS.Timeout\r\nlet refreshTimer: NodeJS.Timeout\r\n\r\nconst TimeOutServer = 600\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n public RequestIdentifier?: IRequestIdentifier = undefined\r\n public TimeOutSeconds = 0\r\n private ServerDifference = 0\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n private RequestIdentifierIsValid(requestIdentifier?: IRequestIdentifier) {\r\n if (requestIdentifier === undefined) {\r\n return false\r\n }\r\n\r\n const nowDevice = new Date()\r\n const validFrom = new Date(requestIdentifier.ValidFrom)\r\n const validTill = new Date(requestIdentifier.ValidTill)\r\n\r\n if (nowDevice < validFrom || nowDevice > validTill) {\r\n console.log('requestIdentifier invalid, refresh')\r\n return false\r\n }\r\n\r\n console.log('requestIdentifier VALID')\r\n\r\n return true\r\n }\r\n\r\n private StartTimer(\r\n requestIdentifier: IRequestIdentifier,\r\n setServerDifference: boolean,\r\n ) {\r\n this.ClearTimers()\r\n const timeOutInSeconds = differenceInSeconds(\r\n new Date(requestIdentifier.ValidTill),\r\n new Date(),\r\n )\r\n\r\n if (setServerDifference) {\r\n this.ServerDifference = TimeOutServer - timeOutInSeconds\r\n }\r\n\r\n // this.TimeOutSeconds = timeOutInSeconds + this.ServerDifference\r\n\r\n this.TimeOutSeconds = timeOutInSeconds\r\n\r\n console.log(\r\n 'timeOutInSeconds',\r\n timeOutInSeconds,\r\n this.TimeOutSeconds,\r\n new Date(requestIdentifier.ValidTill),\r\n )\r\n\r\n timeOutInSeconds\r\n //count down\r\n countDownTimer = setInterval(() => {\r\n runInAction(() => this.TimeOutSeconds--)\r\n }, 1000)\r\n\r\n // console.log(\r\n // 'timeout',\r\n // timeOutInSeconds,\r\n // FormatSeconds(timeOutInSeconds),\r\n // this.ServerDifference,\r\n // this.TimeOutSeconds,\r\n // )\r\n\r\n //refresh when finished\r\n refreshTimer = setTimeout(() => {\r\n this.ClearTimers()\r\n this.GetCrCode()\r\n }, timeOutInSeconds * 1000)\r\n }\r\n\r\n public Initialize() {\r\n this.IsLoading = true\r\n\r\n const onBackPress = () => {\r\n //refresh dashboard\r\n dashboardStore.Initialize()\r\n return false\r\n }\r\n\r\n BackHandler.addEventListener('hardwareBackPress', onBackPress)\r\n\r\n if (!this.RequestIdentifierIsValid(this.RequestIdentifier)) {\r\n this.GetCrCode()\r\n return () => this.onUnload()\r\n }\r\n this.IsLoading = false\r\n if (this.RequestIdentifier !== undefined) {\r\n this.StartTimer(this.RequestIdentifier, true)\r\n }\r\n\r\n return () => this.onUnload()\r\n }\r\n\r\n private ClearTimers() {\r\n clearInterval(countDownTimer)\r\n clearTimeout(refreshTimer)\r\n }\r\n\r\n private onUnload() {\r\n this.ClearTimers()\r\n BackHandler.removeEventListener('hardwareBackPress', null)\r\n }\r\n\r\n public GetCrCode() {\r\n this.IsLoading = true\r\n DoServiceCall(() => {\r\n UserController.CreateRequestIdentifier()\r\n .then((requestIdentifier) => {\r\n runInAction(() => {\r\n if (!this.RequestIdentifierIsValid(requestIdentifier)) {\r\n appUiStore.ShowAlert({\r\n title: i18n.t('Common.Error'),\r\n message: i18n.t('QrCode.InvalidClientDate'),\r\n })\r\n goBack()\r\n } else {\r\n this.IsLoading = false\r\n this.RequestIdentifier = requestIdentifier\r\n this.StartTimer(requestIdentifier, true)\r\n }\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n const errorMessage = Geti18NMessage(toprError)\r\n appUiStore.ShowToast({message: errorMessage})\r\n goBack()\r\n })\r\n })\r\n }\r\n}\r\nexport const qrCodeStore = new Store()\r\n","/*\r\n * Slim v5.0.0 - Image Cropping Made Easy\r\n * Copyright (c) 2018 Rik Schennink - http://slimimagecropper.com\r\n */\r\n// Necessary React Modules\r\nimport React from 'react'\r\nimport ReactDOM from 'react-dom'\r\n\r\n// Slim (place slim CSS and module js file in same folder as this file)\r\nimport Slim from './slim.module.js'\r\nimport './slim.min.css'\r\n\r\nexport interface ISlimProps {\r\n name: string\r\n initialImage?: any\r\n ratio?: string\r\n label?: string\r\n\r\n size?: {width: number; height: number}\r\n didConfirm?: (data: any) => void\r\n didTransform?: (data: any) => void\r\n //didLoad?: (file, image, meta) => void\r\n didRemove?: (data: any) => void\r\n}\r\n\r\ninterface IState {\r\n displayWidth: string | number\r\n}\r\n// React Component\r\nexport default class extends React.Component {\r\n private instance: any\r\n private containerRef: HTMLDivElement | null = null\r\n\r\n /**\r\n *\r\n */\r\n constructor(props: ISlimProps) {\r\n super(props)\r\n\r\n this.state = {displayWidth: 'auto'}\r\n }\r\n\r\n public componentDidMount() {\r\n const root = ReactDOM.findDOMNode(this)\r\n if (this.props.initialImage && root) {\r\n const img = document.createElement('img')\r\n img.setAttribute('alt', '')\r\n img.src = this.props.initialImage\r\n root.appendChild(img)\r\n }\r\n this.instance = Slim ? Slim.create(root, this.props) : null\r\n\r\n this.setDisplayWidth()\r\n }\r\n\r\n public render() {\r\n const {displayWidth} = this.state\r\n const {name} = this.props\r\n return (\r\n (this.containerRef = ref)}\r\n style={{width: displayWidth}}>\r\n {this.props.children}\r\n \r\n
    \r\n )\r\n }\r\n\r\n private setDisplayWidth() {\r\n const {\r\n size: {width},\r\n } = this.props\r\n const displayWidth =\r\n this.containerRef !== null && this.containerRef.offsetWidth >= width\r\n ? width\r\n : 'auto'\r\n this.setState({displayWidth})\r\n }\r\n}\r\n","import React, {PropsWithChildren, useEffect, useState} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport Slim, {ISlimProps} from './Slim/index.web'\r\nimport Style from '../../Style'\r\nimport {Controller} from 'react-hook-form'\r\nimport {IFileDTO} from '../../Models/Server'\r\nimport i18n from '../../i18n'\r\n\r\n//UseFormMethods\r\ninterface IProps {\r\n //name: string\r\n name: keyof T\r\n formObject: T\r\n control: any\r\n validation?: {\r\n errors: any\r\n rules: any\r\n defaultValue?: string\r\n }\r\n //slim\r\n\r\n label: string\r\n //infoText?: string\r\n initialImage?: IFileDTO\r\n sizeSlim?: {width: number; height: number}\r\n //onImageChange: (file?: IFileDTO) => void\r\n}\r\n\r\nconst MySlim = ({\r\n name,\r\n formObject,\r\n validation,\r\n label,\r\n control,\r\n initialImage,\r\n sizeSlim,\r\n}: //onImageChange,\r\nPropsWithChildren>) => {\r\n //const MySlim: React.FC = ({children}) => {\r\n const ratio =\r\n sizeSlim !== undefined ? `${sizeSlim.width}:${sizeSlim.height}` : undefined\r\n\r\n const [fileId, setFiledId] = useState(-1)\r\n const [isInitialized, setIsInitialized] = useState(false)\r\n const [initialBase64, setInitialBase64] = useState('')\r\n\r\n useEffect(() => {\r\n // if (value !== null && value !== undefined) {\r\n // const file = value as FileDTO\r\n // setFiledId(file.FileId)\r\n // setInitialBase64(`data:image/jpeg;base64,${file.Data}`)\r\n\r\n // }\r\n setIsInitialized(true)\r\n }, [null])\r\n\r\n const rules = validation !== undefined ? validation.rules : {}\r\n //const errors = validation !== undefined ? validation.errors : {}\r\n const errorsMessage =\r\n validation !== undefined && validation.errors[name] !== undefined\r\n ? validation.errors[name].message\r\n : undefined\r\n\r\n const defaultValue =\r\n validation !== undefined && validation.defaultValue !== undefined\r\n ? validation.defaultValue\r\n : ''\r\n return (\r\n <>\r\n (\r\n <>\r\n {\r\n const base64: string = data.output.image.toDataURL()\r\n\r\n const file: IFileDTO = {\r\n Name: data.input.name,\r\n MimeType: data.input.type,\r\n Data: base64.split(',')[1],\r\n FileId: fileId,\r\n }\r\n\r\n // if (initialImage) {\r\n // file.FileId = initialImage.FileId\r\n // file.FileGuid = initialImage.FileGuid\r\n // }\r\n onChange(file)\r\n }}\r\n didRemove={() => {\r\n onChange(undefined)\r\n }}\r\n />\r\n {/* {\r\n onChange(value)\r\n\r\n if (onTextChange) {\r\n onTextChange(value)\r\n }\r\n }}\r\n {...inputProps}\r\n secureTextEntry={secureTextEntryState}\r\n multiline={multiline}\r\n numberOfLines={numberOfLines}\r\n />\r\n {renderPasswordToggle()} */}\r\n \r\n )}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default MySlim\r\n\r\nconst styles = StyleSheet.create({})\r\n","// import * as ImagePicker from 'expo-image-picker'\r\n// import {ImagePickerOptions} from 'expo-image-picker'\r\nimport {makeAutoObservable, runInAction} from 'mobx'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {SetFriendlyMessage} from '../../../Helpers/ServiceHelpers'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {ToprError} from '../../../Models/Client'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\n\r\n// export const imagePickerOptions: ImagePickerOptions = {\r\n// mediaTypes: ImagePicker.MediaTypeOptions.All,\r\n// allowsEditing: true,\r\n// aspect: [1, 1],\r\n// quality: 0.4,\r\n// base64: true,\r\n// }\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public SavePicture(data: string) {\r\n this.IsSubmitting = true\r\n UserController.SaveUserPicture(data)\r\n .then(() => {\r\n dashboardStore.GetUser()\r\n goBack()\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n .catch((error: ToprError) => {\r\n SetFriendlyMessage(error, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n }\r\n}\r\nexport const changeProfilePictureStore = new Store()\r\n","import React from 'react'\r\nimport {Text} from 'react-native'\r\nimport {useForm} from 'react-hook-form'\r\nimport {Card} from 'react-native-elements'\r\nimport {MyButton, MyFooter, MyFooterTile, MyModal} from '../../../../Components'\r\nimport i18n from '../../../../i18n'\r\nimport {IFileDTO} from '../../../../Models/Server'\r\nimport {sizes} from '../../../../Style/index'\r\nimport MySlim from '../../../../Components/Form/MySlim.web'\r\nimport {changeProfilePictureStore} from '../../ChangeProfilePicture/Store'\r\n\r\ninterface IProps {\r\n visible: boolean\r\n onClose: () => void\r\n}\r\n\r\ninterface IFormValues {\r\n ImageFile?: IFileDTO\r\n}\r\n\r\nconst ChangePictureModal: React.FC = ({visible, onClose}) => {\r\n const {control, handleSubmit, errors, setError, setValue} =\r\n useForm()\r\n\r\n const onSubmit = (data: IFormValues) => {\r\n //console.log('submit', data.ImageFile?.Data)\r\n changeProfilePictureStore.SavePicture(data.ImageFile?.Data!)\r\n }\r\n\r\n const {IsSubmitting} = changeProfilePictureStore\r\n\r\n const renderWebForm = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {\r\n onClose()\r\n }}\r\n style={{marginRight: sizes.padding.sm}}\r\n title={i18n.t('Common.Cancel')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {renderWebForm()}\r\n \r\n )\r\n}\r\n\r\nexport default ChangePictureModal\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect, useState} from 'react'\r\nimport {Icon, ListItem} from 'react-native-elements'\r\nimport {Container, MyHeader, ProfileButton} from '../../../Components'\r\nimport i18n from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport ChangePictureModal from './Components/ChangePictureModal'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Account: React.FC = ({navigation: {navigate, goBack}}) => {\r\n useEffect(() => {\r\n myLog.warn('Account')\r\n }, [null])\r\n\r\n const [pictureModalVisible, setPictureModalVisible] = useState(false)\r\n\r\n const {User} = dashboardStore\r\n const {MainUser} = persistedStore\r\n\r\n const isChildUser = MainUser?.MainUserGuid !== User?.MainUserGuid\r\n\r\n if (User === undefined) {\r\n return null\r\n }\r\n\r\n const renderCancelUser = () => {\r\n if (!isChildUser) {\r\n return null\r\n }\r\n\r\n return (\r\n {\r\n navigate('cancelAccount')\r\n }}>\r\n \r\n \r\n {i18n.t('CancelAccount.Header')}\r\n \r\n \r\n )\r\n }\r\n\r\n const renderParentUserItems = () => {\r\n if (isChildUser) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n navigate('changeEmail')}>\r\n \r\n \r\n {i18n.t('Account.ChangeEmail')}\r\n \r\n \r\n navigate('changePassword')}>\r\n \r\n \r\n {i18n.t('Account.ChangePassword')}\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {User.Name}\r\n {User.EmailAddress && (\r\n {User.EmailAddress}\r\n )}\r\n \r\n \r\n navigate('changeName')}>\r\n \r\n \r\n {i18n.t('Account.ChangeName')}\r\n \r\n \r\n {renderParentUserItems()}\r\n {/* setPictureModalVisible(true)}>\r\n \r\n \r\n \r\n {i18n.t('Account.SetProfilePicture')}\r\n \r\n \r\n */}\r\n\r\n {renderCancelUser()}\r\n setPictureModalVisible(false)}\r\n visible={pictureModalVisible}\r\n />\r\n \r\n \r\n )\r\n}\r\nexport default observer(Account)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {IWalletSTO} from '../../../Models/Server'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport I18n from '../../../i18n'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\nimport i18n from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport ToprError from '../../../Models/Client/ErrorHandling/ToprError'\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public CancelChildUser(\r\n mainUserGuid: string,\r\n childUserGuid: string,\r\n name: string,\r\n ) {\r\n DoServiceCall(() => {\r\n runInAction(() => (this.IsSubmitting = true))\r\n UserController.CancelChildUser(mainUserGuid, childUserGuid)\r\n .then(() => {\r\n //switch back to parent user\r\n\r\n appUiStore.ShowToast({\r\n message: i18n.t('CancelAccount.Succes', {name}),\r\n })\r\n persistedStore.SwitchBackToParentUserToken()\r\n dashboardStore.Initialize()\r\n UserController.GetChildUsers()\r\n navigate('dashboard')\r\n\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, (errorMessage) => {\r\n appUiStore.ShowToast({message: errorMessage})\r\n })\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n })\r\n }\r\n}\r\nexport const cancelAccountStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {ScrollView} from 'react-native'\r\nimport {Card, ListItem, Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyHeader,\r\n} from '../../../Components'\r\nimport {FormatCurrency} from '../../../Helpers/TextHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style, {colors} from '../../../Style'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport {store as tokensStore} from '../../Token/Tokens/Store'\r\nimport {cancelAccountStore} from './Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst CancelAccount: React.FC = ({navigation: {goBack}, route}) => {\r\n useEffect(() => {\r\n myLog.warn('CancelAccount')\r\n }, [null])\r\n\r\n const {Wallets, User} = dashboardStore\r\n const {Tokens} = tokensStore\r\n const {MainUser} = persistedStore\r\n const {defaultFlatList, flatListContentStyle} = Style\r\n\r\n const renderWallets = () => {\r\n if (Wallets.length === 0) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {i18n.t('Common.Wallets')}\r\n {Wallets.map((wallet, key) => (\r\n \r\n \r\n {wallet.Currency.Name}\r\n \r\n \r\n {FormatCurrency(wallet.Balance, wallet.Currency)}\r\n \r\n \r\n ))}\r\n \r\n )\r\n }\r\n\r\n const renderTokens = () => {\r\n if (Tokens.length === 0) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {i18n.t('Common.Tokens')}\r\n {Tokens.map((token, key) => (\r\n \r\n \r\n {token.ActivationCode}\r\n \r\n \r\n ))}\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {i18n.t('CancelAccount.Info', {\r\n name: User?.Name,\r\n parentName: MainUser?.Name,\r\n })}\r\n \r\n \r\n {renderWallets()}\r\n {renderTokens()}\r\n \r\n \r\n \r\n {\r\n appUiStore.ShowConfirm(\r\n i18n.t('CancelAccount.Confirm', {name: User?.Name}),\r\n () => {\r\n if (MainUser !== undefined && User !== undefined) {\r\n cancelAccountStore.CancelChildUser(\r\n MainUser.MainUserGuid,\r\n User.MainUserGuid,\r\n User.Name,\r\n )\r\n }\r\n },\r\n )\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(CancelAccount)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport i18n from '../../../i18n'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport ToprError from '../../../Models/Client/ErrorHandling/ToprError'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public ChangeName(name: string) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n\r\n UserController.SetName(name, dashboardStore.User?.MainUserGuid)\r\n .then(() => {\r\n runInAction(() => (this.IsSubmitting = false))\r\n appUiStore.ShowToast({message: i18n.t('ChangeName.Form.Succes')})\r\n dashboardStore.GetUser()\r\n goBack()\r\n })\r\n .catch((error: ToprError) => {\r\n SetFriendlyMessage(error, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n })\r\n }\r\n}\r\nexport const changeNameStore = new Store()\r\n","import React, {useEffect} from 'react'\r\nimport {observer} from 'mobx-react'\r\nimport {StackScreenProps} from '@react-navigation/stack'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {\r\n FormHeader,\r\n Content,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n Container,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport i18n from '../../../i18n'\r\nimport {sizes} from '../../../Style'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {changeNameStore} from './Store'\r\nimport {useForm} from 'react-hook-form'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nexport type MyFormData = {\r\n name: string\r\n}\r\n\r\nconst ChangeName: React.FC = ({navigation: {goBack}, route}) => {\r\n const {\r\n control,\r\n handleSubmit,\r\n errors,\r\n formState,\r\n setValue,\r\n trigger,\r\n } = useForm({mode: 'onChange'})\r\n\r\n useEffect(() => {\r\n myLog.warn('ChangeName')\r\n\r\n setValue('name', dashboardStore.User?.Name)\r\n trigger('name')\r\n }, [null])\r\n\r\n const {IsSubmitting} = changeNameStore\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n changeNameStore.ChangeName(data.name)\r\n }\r\n return (\r\n <>\r\n \r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t('ChangeName.Form.NameField.Errors.Required'),\r\n },\r\n }}\r\n label={i18n.t('ChangeName.Form.NameField.Label')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(ChangeName)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport i18n from '../../../i18n'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport ToprError from '../../../Models/Client/ErrorHandling/ToprError'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {goBack} from '../../../Helpers/NavigationHelper'\r\nimport {MyFormData} from './ChangePassword'\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n ChangePassword(password: string) {\r\n this.IsSubmitting = true\r\n UserController.SetPassword(password, dashboardStore.User?.MainUserGuid)\r\n .then(() => {\r\n runInAction(() => (this.IsSubmitting = false))\r\n appUiStore.ShowToast({message: i18n.t('ChangePassword.Form.Succes')})\r\n goBack()\r\n })\r\n .catch((error: ToprError) => {\r\n SetFriendlyMessage(error, (message) => {\r\n appUiStore.ShowToast({message})\r\n })\r\n runInAction(() => (this.IsSubmitting = false))\r\n })\r\n }\r\n\r\n ValidatePassword(password: string) {\r\n return UserController.ValidatePassword(\r\n password,\r\n dashboardStore.User?.MainUserGuid,\r\n )\r\n }\r\n}\r\nexport const changePasswordStore = new Store()\r\n","import React, {useEffect} from 'react'\r\nimport {observer} from 'mobx-react'\r\nimport {StackScreenProps} from '@react-navigation/stack'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {\r\n FormHeader,\r\n Content,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n Container,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport i18n from '../../../i18n'\r\nimport {sizes} from '../../../Style'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {changePasswordStore} from './Store'\r\nimport {useForm} from 'react-hook-form'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport AppConfig from '../../../Config/AppConfig'\r\nimport ToprError from '../../../Models/Client/ErrorHandling/ToprError'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nexport type MyFormData = {\r\n oldPassword: string\r\n password: string\r\n confirmPassword: string\r\n}\r\n\r\nconst ChangePassword: React.FC = ({navigation: {goBack}, route}) => {\r\n const {\r\n control,\r\n handleSubmit,\r\n errors,\r\n setValue,\r\n getValues,\r\n setError,\r\n formState,\r\n } = useForm({mode: 'onChange'})\r\n\r\n useEffect(() => {\r\n myLog.warn('ChangePassword')\r\n\r\n if (AppConfig.IsDebugMode) {\r\n setValue('oldPassword', 'sdopey01')\r\n setValue('password', 'sdopey01')\r\n setValue('confirmPassword', 'sdopey01')\r\n }\r\n }, [null])\r\n\r\n const {IsSubmitting} = changePasswordStore\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n changePasswordStore\r\n .ValidatePassword(data.oldPassword)\r\n .then((isValid) => {\r\n if (!isValid) {\r\n setError('oldPassword', {\r\n type: 'manual',\r\n message: i18n.t(\r\n 'ChangePassword.Form.Fields.OldPassword.Errors.Invalid',\r\n ),\r\n })\r\n\r\n return\r\n }\r\n //old pasword valid, save the new password\r\n changePasswordStore.ChangePassword(data.password)\r\n })\r\n .catch((error: ToprError) => {\r\n setError('oldPassword', {\r\n type: 'manual',\r\n message: error.Message,\r\n })\r\n })\r\n }\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t(\r\n 'ChangePassword.Form.Fields.ConfirmPassword.Errors.Required',\r\n ),\r\n validate: {\r\n checkPincode: (confirmPassword: string) => {\r\n const values = getValues()\r\n return (\r\n values.password === confirmPassword ||\r\n i18n.t(\r\n 'ChangePassword.Form.Fields.ConfirmPassword.Errors.Equality',\r\n )\r\n )\r\n },\r\n },\r\n },\r\n }}\r\n label={i18n.t('ChangePassword.Form.Fields.ConfirmPassword.Label')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(ChangePassword)\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {navigate} from '../../../Helpers/NavigationHelper'\r\nimport {\r\n DoServiceCall,\r\n SetFriendlyMessage,\r\n} from '../../../Helpers/ServiceHelpers'\r\nimport {GetI18NAlertMessage} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {appUiStore} from '../../../Mobx/AppUiStore'\r\nimport {IAlertMessage, MyErrorMessage, ToprError} from '../../../Models/Client'\r\nimport RegisterController from '../../../Services/Topr.Core/RegisterController'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport {persistedStore} from '../../../Mobx'\r\n\r\nexport default class Store {\r\n public IsSubmitting = false\r\n public IsConfirming = false\r\n\r\n public ResultMessage?: IAlertMessage = undefined\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n this.IsSubmitting = false\r\n this.IsSubmitting = false\r\n this.ResultMessage = undefined\r\n }\r\n\r\n public ChangeEmail(email: string, onError: (errorMessage: string) => void) {\r\n DoServiceCall(() => {\r\n this.IsSubmitting = true\r\n\r\n RegisterController.EmailExists(email)\r\n .then(() => {\r\n //start change email\r\n\r\n UserController.StartChangeEmail(email)\r\n .then(() => {\r\n navigate('changeEmailConfirmationSent', {email})\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, onError, [\r\n new MyErrorMessage(\r\n 'USER_EMAIL_NOT_UNIQUE',\r\n 'ChangeEmail.Form.ServerErrors.Title',\r\n 'ChangeEmail.Form.ServerErrors.USER_EMAIL_NOT_UNIQUE',\r\n 'warning',\r\n {\r\n email,\r\n },\r\n ),\r\n ])\r\n\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n SetFriendlyMessage(toprError, onError, [\r\n new MyErrorMessage(\r\n 'USER_EMAIL_NOT_UNIQUE',\r\n 'ChangeEmail.Form.ServerErrors.Title',\r\n 'ChangeEmail.Form.ServerErrors.USER_EMAIL_NOT_UNIQUE',\r\n 'warning',\r\n {\r\n email,\r\n },\r\n ),\r\n ])\r\n\r\n runInAction(() => {\r\n this.IsSubmitting = false\r\n })\r\n })\r\n })\r\n }\r\n\r\n public ConfirmChangeEmail(requestIdentifier: string) {\r\n DoServiceCall(() => {\r\n this.IsConfirming = true\r\n\r\n const {UserToken} = persistedStore\r\n\r\n UserController.ConfirmChangeEmail(requestIdentifier)\r\n .then(() => {\r\n //\r\n appUiStore.ShowToast({message: i18n.t('ChangeEmail.Form.Succes')})\r\n\r\n if (UserToken === undefined) {\r\n navigate('login')\r\n } else {\r\n dashboardStore.GetUser()\r\n navigate('dashboard')\r\n }\r\n\r\n runInAction(() => {\r\n this.IsConfirming = false\r\n })\r\n })\r\n .catch((toprError: ToprError) => {\r\n console.log('ConfirmChangeEmail error')\r\n runInAction(() => {\r\n this.IsConfirming = false\r\n this.ResultMessage = GetI18NAlertMessage(\r\n 'ChangeEmail.Form.ServerErrors',\r\n toprError.Code,\r\n )\r\n })\r\n })\r\n })\r\n }\r\n}\r\nexport const changeEmailStore = new Store()\r\n","import React, {useEffect} from 'react'\r\nimport {observer} from 'mobx-react'\r\nimport {StackScreenProps} from '@react-navigation/stack'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {\r\n FormHeader,\r\n Content,\r\n MyButton,\r\n MyFooter,\r\n MyFooterTile,\r\n MyInput,\r\n Container,\r\n SubmitHeader,\r\n SubmitHeaderButton,\r\n} from '../../../Components'\r\nimport i18n from '../../../i18n'\r\nimport {sizes} from '../../../Style'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {changeEmailStore} from './Store'\r\nimport {useForm} from 'react-hook-form'\r\nimport AppConfig from '../../../Config/AppConfig'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nexport type MyFormData = {\r\n email: string\r\n}\r\n\r\nconst ChangeEmail: React.FC = ({navigation: {goBack}, route}) => {\r\n const {\r\n control,\r\n handleSubmit,\r\n errors,\r\n setError,\r\n setValue,\r\n formState,\r\n } = useForm({mode: 'onChange'})\r\n useEffect(() => {\r\n myLog.warn('ChangeEmail')\r\n\r\n if (AppConfig.IsDebugMode) {\r\n //\r\n //setValue('email', 'r.de.ruijter@mybility.nl')\r\n setValue('email', 'superdopey@live.nl')\r\n }\r\n changeEmailStore.Initialize()\r\n }, [null])\r\n\r\n const {IsSubmitting} = changeEmailStore\r\n\r\n const onSubmit = (data: MyFormData) => {\r\n changeEmailStore.ChangeEmail(data.email, (errorMessage) => {\r\n setError('email', {\r\n type: 'manual',\r\n message: errorMessage,\r\n })\r\n })\r\n }\r\n return (\r\n <>\r\n \r\n \r\n {\r\n handleSubmit((data) => onSubmit(data))()\r\n },\r\n }}\r\n validation={{\r\n errors,\r\n rules: {\r\n required: i18n.t('ChangeEmail.Form.EmailField.Errors.Required'),\r\n pattern: {\r\n value: /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/,\r\n message: i18n.t('ChangeEmail.Form.EmailField.Errors.Regex'),\r\n },\r\n },\r\n }}\r\n label={i18n.t('ChangeEmail.Form.EmailField.Label')}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\nexport default observer(ChangeEmail)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {Text, View} from 'react-native'\r\nimport {ResultCard} from '../../../Components'\r\nimport I18n from '../../../i18n'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {colors, sizes} from '../../../Style'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst ChangeEmailConfirmationSent: React.FC = ({\r\n navigation: {navigate},\r\n route,\r\n}) => {\r\n useEffect(() => {\r\n myLog.info('ChangeEmailConfirmationSent')\r\n }, [null])\r\n\r\n return (\r\n navigate('dashboard'),\r\n }}>\r\n \r\n {I18n.t('ChangeEmail.ConfirmationSentStep.TextPart1')}\r\n {route.params.email}.\r\n {I18n.t('ChangeEmail.ConfirmationSentStep.TextPart2')}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(ChangeEmailConfirmationSent)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport React, {useEffect} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport Style from '../../../Style'\r\nimport {changeEmailStore} from './Store'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport {ResultCard, ToprScreenLoader} from '../../../Components'\r\nimport i18n from '../../../i18n'\r\nimport {observer} from 'mobx-react'\r\ninterface IProps\r\n extends StackScreenProps {}\r\n{\r\n}\r\n\r\nconst ConfirmChangeEmail: React.FC = ({\r\n navigation: {navigate},\r\n route,\r\n}) => {\r\n useEffect(() => {\r\n //navigate('Pincode')\r\n const {requestIdentifier} = route.params\r\n myLog.info(`ConfirmChangeEmail ${requestIdentifier}`)\r\n\r\n changeEmailStore.ConfirmChangeEmail(requestIdentifier)\r\n }, [changeEmailStore])\r\n\r\n const {IsConfirming, ResultMessage} = changeEmailStore\r\n const renderResult = () => {\r\n if (ResultMessage === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n navigate('dashboard'),\r\n }}>\r\n {ResultMessage.message}\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {renderResult()}\r\n \r\n )\r\n}\r\n\r\nexport default observer(ConfirmChangeEmail)\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\n\r\ninterface IProps {}\r\n\r\nconst TakePicture: React.FC = ({children}) => {\r\n return {children}\r\n}\r\n\r\nexport default TakePicture\r\n\r\nconst styles = StyleSheet.create({})\r\n\r\n// import React, {useState, useEffect} from 'react'\r\n// import {Button, Image, View, Platform} from 'react-native'\r\n// import * as ImagePicker from 'expo-image-picker'\r\n// import Constants from 'expo-constants'\r\n// import {\r\n// Container,\r\n// Content,\r\n// MyButton,\r\n// MyFooter,\r\n// MyFooterTile,\r\n// SubmitHeader,\r\n// SubmitHeaderButton,\r\n// } from '../../../Components'\r\n// import {goBack} from '../../../Helpers/NavigationHelper'\r\n// import i18n from '../../../i18n'\r\n// import Style, {deviceWidth, sizes} from '../../../Style'\r\n// import {changeProfilePictureStore, imagePickerOptions} from './Store'\r\n// import {observer} from 'mobx-react'\r\n// import {ImageInfo} from 'expo-image-picker/build/ImagePicker.types'\r\n// import {appUiStore} from '../../../Mobx/AppUiStore'\r\n\r\n// interface IProps {}\r\n\r\n// const TakePicture: React.FC = ({}) => {\r\n// const [imageInfo, setImage] = useState(undefined)\r\n// const {IsSubmitting} = changeProfilePictureStore\r\n// const {centerXYContainer} = Style\r\n// useEffect(() => {\r\n// ;(async () => {\r\n// if (Platform.OS !== 'web') {\r\n// const {status} = await ImagePicker.requestCameraPermissionsAsync()\r\n// if (status !== 'granted') {\r\n// appUiStore.ShowToast({\r\n// message: i18n.t('ChangeProfilePicture.Permissions.Camera'),\r\n// })\r\n\r\n// return\r\n// }\r\n\r\n// pickImage()\r\n// }\r\n// })()\r\n// }, [])\r\n\r\n// const pickImage = async () => {\r\n// let result = await ImagePicker.launchCameraAsync(imagePickerOptions)\r\n\r\n// if (!result.cancelled) {\r\n// setImage(result as ImageInfo)\r\n// }\r\n// }\r\n\r\n// if (imageInfo === undefined) {\r\n// return null\r\n// }\r\n\r\n// return (\r\n// <>\r\n// \r\n// \r\n// {imageInfo !== undefined && (\r\n// \r\n// )}\r\n// \r\n// \r\n// \r\n// \r\n// {\r\n// if (imageInfo) {\r\n// changeProfilePictureStore.SavePicture(imageInfo.base64!)\r\n// }\r\n// }}\r\n// />\r\n// \r\n// \r\n// )\r\n// }\r\n\r\n// //export default ImagePickerExample\r\n// export default observer(TakePicture)\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\n\r\ninterface IProps {}\r\n\r\nconst ChoosePicture: React.FC = ({children}) => {\r\n return {children}\r\n}\r\n\r\nexport default ChoosePicture\r\n\r\nconst styles = StyleSheet.create({})\r\n\r\n// import React, {useState, useEffect} from 'react'\r\n// import {Button, Image, View, Platform} from 'react-native'\r\n// import * as ImagePicker from 'expo-image-picker'\r\n// import Constants from 'expo-constants'\r\n// import {\r\n// Container,\r\n// Content,\r\n// MyButton,\r\n// MyFooter,\r\n// MyFooterTile,\r\n// SubmitHeader,\r\n// SubmitHeaderButton,\r\n// } from '../../../Components'\r\n// import {goBack} from '../../../Helpers/NavigationHelper'\r\n// import i18n from '../../../i18n'\r\n// import Style, {deviceWidth, sizes} from '../../../Style'\r\n// import {changeProfilePictureStore, imagePickerOptions} from './Store'\r\n// import {observer} from 'mobx-react'\r\n// import {ImageInfo} from 'expo-image-picker/build/ImagePicker.types'\r\n// import {appUiStore} from '../../../Mobx/AppUiStore'\r\n\r\n// interface IProps {}\r\n\r\n// const ChoosePicture: React.FC = ({}) => {\r\n// const [imageInfo, setImage] = useState(undefined)\r\n// const {IsSubmitting} = changeProfilePictureStore\r\n\r\n// const {centerXYContainer} = Style\r\n// useEffect(() => {\r\n// ;(async () => {\r\n// if (Platform.OS !== 'web') {\r\n// const {status} = await ImagePicker.requestMediaLibraryPermissionsAsync()\r\n// if (status !== 'granted') {\r\n// appUiStore.ShowToast({\r\n// message: i18n.t('ChangeProfilePicture.Permissions.Library'),\r\n// })\r\n\r\n// return\r\n// }\r\n\r\n// pickImage()\r\n// }\r\n// })()\r\n// }, [])\r\n\r\n// const pickImage = async () => {\r\n// let result = await ImagePicker.launchImageLibraryAsync(imagePickerOptions)\r\n\r\n// if (!result.cancelled) {\r\n// setImage(result as ImageInfo)\r\n// }\r\n// }\r\n\r\n// if (imageInfo === undefined) {\r\n// return null\r\n// }\r\n\r\n// return (\r\n// <>\r\n// \r\n// \r\n// {imageInfo !== undefined && (\r\n// \r\n// )}\r\n// \r\n// \r\n// \r\n// \r\n// {\r\n// if (imageInfo) {\r\n// changeProfilePictureStore.SavePicture(imageInfo.base64!)\r\n// }\r\n// }}\r\n// />\r\n// \r\n// \r\n// )\r\n// }\r\n\r\n// //export default ImagePickerExample\r\n// export default observer(ChoosePicture)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {StyleSheet, View} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n MyButton,\r\n MyQrCode,\r\n SubmitHeader,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {FormatSeconds} from '../../../Helpers/DateHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style, {colors, deviceWidth, sizes} from '../../../Style'\r\nimport {dashboardStore} from '../../Dashboard/Dashboard/Store'\r\nimport {qrCodeStore} from './Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst QrCode: React.FC = ({navigation: {goBack}, route}) => {\r\n useEffect(() => {\r\n myLog.warn('QrCode')\r\n return qrCodeStore.Initialize()\r\n }, [null])\r\n\r\n const {IsLoading, RequestIdentifier, TimeOutSeconds} = qrCodeStore\r\n const {centerXYContainer} = Style\r\n const size = deviceWidth - 100\r\n return (\r\n <>\r\n \r\n \r\n \r\n {RequestIdentifier !== undefined && (\r\n \r\n )}\r\n\r\n \r\n {FormatSeconds(TimeOutSeconds)}\r\n qrCodeStore.GetCrCode()}\r\n buttonStyle={style.button}\r\n type=\"outline\"\r\n />\r\n \r\n \r\n \r\n {\r\n dashboardStore.Initialize()\r\n goBack()\r\n }}\r\n />\r\n \r\n \r\n )\r\n}\r\nexport default observer(QrCode)\r\n\r\nconst style = StyleSheet.create({\r\n timerContainer: {\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n marginTop: sizes.padding.md,\r\n },\r\n button: {\r\n marginLeft: sizes.padding.md,\r\n },\r\n})\r\n","import {placeholder} from 'i18n-js'\r\nimport {observer} from 'mobx-react'\r\nimport React, {Component} from 'react'\r\nimport {\r\n Animated,\r\n StyleSheet,\r\n Text,\r\n View,\r\n I18nManager,\r\n Pressable,\r\n TouchableOpacity,\r\n Image,\r\n} from 'react-native'\r\nimport {Badge, Card, ListItem} from 'react-native-elements'\r\n\r\nimport {RectButton} from 'react-native-gesture-handler'\r\nimport Swipeable from 'react-native-gesture-handler/Swipeable'\r\n\r\nimport Icon from 'react-native-vector-icons/MaterialIcons'\r\nimport RestaurantImage from '../../../Components/Cards/RestaurantImage'\r\nimport {\r\n FormatDateTime,\r\n FormatInzziiDateString,\r\n} from '../../../Helpers/DateHelpers'\r\nimport {FormatToEuro} from '../../../Helpers/TextHelpers'\r\nimport {GetImageSource} from '../../../Helpers/UiHelpers'\r\nimport i18n from '../../../i18n'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {IMyPlacedOrder} from '../../../Models/Client'\r\nimport Style, {sizes} from '../../../Style'\r\nimport AppImages from '../../../Images/AppImages'\r\nimport {IOrderHistory} from '../../../Models/InzziiApi'\r\n\r\nconst AnimatedIcon = Animated.createAnimatedComponent(Icon)\r\n\r\ninterface IProps {\r\n orderHistory: IOrderHistory\r\n onPress: () => void\r\n}\r\n\r\nclass PlacedOrderCard extends Component {\r\n render() {\r\n const {orderHistory, onPress} = this.props\r\n\r\n const {noteText, badgeStyle} = Style\r\n let title = orderHistory.restaurantName\r\n if (orderHistory.orderNumber) {\r\n title += `, #${orderHistory.orderNumber}`\r\n }\r\n\r\n return (\r\n \r\n \r\n {/* */}\r\n {/* {title} */}\r\n\r\n \r\n \r\n {title}\r\n \r\n {FormatInzziiDateString(orderHistory.orderDate)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n}\r\n\r\nexport default observer(PlacedOrderCard)\r\n\r\nconst styles = StyleSheet.create({\r\n container: {\r\n flex: 1,\r\n alignItems: 'center',\r\n flexDirection: 'row',\r\n },\r\n})\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport I18n from 'i18n-js'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {FlatList, StyleSheet, Text} from 'react-native'\r\nimport {\r\n Container,\r\n Content,\r\n ImageCard,\r\n SubmitHeader,\r\n ToprScreenLoader,\r\n} from '../../Components'\r\nimport {StockImageLayout} from '../../Components/Web'\r\nimport {GetRandomKey} from '../../Helpers/UiHelpers'\r\nimport i18n from '../../i18n'\r\nimport AppImages from '../../Images/AppImages'\r\nimport {persistedStore} from '../../Mobx'\r\nimport {MainScreensList} from '../../Navigation'\r\nimport {myLog} from '../../Services/Client/LogService'\r\nimport Style from '../../Style'\r\nimport {orderOnlineStore} from '../Location/OrderOnline/Store'\r\nimport PlacedOrderCard from './Components/PlacedOrderCard'\r\nimport {dashboardStore} from '../Dashboard/Dashboard/Store'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst PlacedOrders: React.FC = ({navigation: {goBack, navigate}}) => {\r\n useEffect(() => {\r\n myLog.warn('PlacedOrders')\r\n orderOnlineStore.InitializePlacedOrders()\r\n }, [null])\r\n const {SortedOrderHistory, Isloading} = orderOnlineStore\r\n const {\r\n defaultFlatListWhite,\r\n flatListContentStyle,\r\n flatListContentStyleStock,\r\n } = Style\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n }\r\n contentContainerStyle={[flatListContentStyleStock]}\r\n data={SortedOrderHistory}\r\n //data={[SortedOrderHistory[0]]}\r\n renderItem={({item}) => (\r\n {\r\n navigate('placedOrderDetails', {orderHistory: item})\r\n }}\r\n orderHistory={item}\r\n />\r\n )}\r\n keyExtractor={() => {\r\n return GetRandomKey()\r\n }}\r\n />\r\n \r\n\r\n {\r\n //dashboardStore.GetWallets()\r\n goBack()\r\n }}>\r\n {i18n.t('PlacedOrders.Header')}\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(PlacedOrders)\r\n\r\nconst styles = StyleSheet.create({})\r\n","import React from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {Icon, Text} from 'react-native-elements'\r\nimport {GetOrderLineAmountFormatted} from '../../../Helpers/OrderHelpers'\r\nimport {IOrderRequestLine} from '../../../Models/InzziiApi'\r\nimport Style, {colors, sizes} from '../../../Style'\r\n\r\ninterface IProps {\r\n orderRequestLine: IOrderRequestLine\r\n}\r\n\r\nconst OrderRow: React.FC = ({orderRequestLine}) => {\r\n const {\r\n container,\r\n row,\r\n supplimentsText,\r\n contentView,\r\n quantityText,\r\n\r\n amountText,\r\n productText,\r\n separator,\r\n } = styles\r\n\r\n const renderSuppliments = () => {\r\n if (\r\n orderRequestLine.linkedOrderLines &&\r\n orderRequestLine.linkedOrderLines.length > 0\r\n ) {\r\n const text = orderRequestLine.linkedOrderLines\r\n .map((x) => x.name)\r\n .join(', ')\r\n return {text}\r\n }\r\n\r\n return null\r\n }\r\n return (\r\n \r\n \r\n {orderRequestLine.quantity}\r\n \r\n {orderRequestLine.name}\r\n {renderSuppliments()}\r\n \r\n \r\n {GetOrderLineAmountFormatted(orderRequestLine)}\r\n \r\n \r\n\r\n \r\n \r\n )\r\n}\r\n\r\nexport default OrderRow\r\n\r\nconst styles = StyleSheet.create({\r\n separator: {\r\n borderBottomColor: colors.lightGrey,\r\n borderBottomWidth: 1,\r\n marginTop: sizes.padding.md,\r\n },\r\n container: {\r\n paddingTop: sizes.padding.md,\r\n },\r\n row: {\r\n flexDirection: 'row',\r\n },\r\n contentView: {\r\n flex: 8,\r\n },\r\n productText: {\r\n fontWeight: 'bold',\r\n },\r\n quantityText: {\r\n flex: 1,\r\n\r\n fontWeight: 'bold',\r\n },\r\n amountText: {\r\n width: 70,\r\n textAlign: 'right',\r\n },\r\n supplimentsText: {\r\n color: colors.grey,\r\n fontSize: 12,\r\n },\r\n})\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {placeholder} from 'i18n-js'\r\nimport {observer, Observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {View, StyleSheet, FlatList} from 'react-native'\r\nimport {Text} from 'react-native-elements'\r\nimport {ScrollView} from 'react-native-gesture-handler'\r\nimport {\r\n Container,\r\n Content,\r\n MyHeader,\r\n OrderHeader,\r\n ToprScreenLoader,\r\n} from '../../Components'\r\nimport {FormatDateTime, FormatInzziiDateString} from '../../Helpers/DateHelpers'\r\nimport {FormatToEuro} from '../../Helpers/TextHelpers'\r\nimport {GetRandomKey} from '../../Helpers/UiHelpers'\r\nimport i18n from '../../i18n'\r\nimport {MainScreensList} from '../../Navigation'\r\nimport {myLog} from '../../Services/Client/LogService'\r\nimport Style, {sizes} from '../../Style'\r\nimport TotalRow from '../Location/OrderOnline/Cart/Components/TotalRow'\r\nimport {orderOnlineStore} from '../Location/OrderOnline/Store'\r\nimport TransactionRow from '../Wallet/Details/Components/TransactionRow'\r\nimport {walletDetailsStore} from '../Wallet/Details/Store'\r\nimport OrderRow from './Components/OrderRow'\r\ninterface IProps {}\r\n\r\n//placedOrderDetails\r\ninterface IProps\r\n extends StackScreenProps {}\r\nconst PlacedOrderDetails: React.FC = ({\r\n navigation: {goBack},\r\n route,\r\n}) => {\r\n const orderHistory = route.params.orderHistory\r\n useEffect(() => {\r\n myLog.warn('PlacedOrderDetails')\r\n orderOnlineStore.GetOrder(orderHistory.orderId)\r\n }, [orderHistory])\r\n const {\r\n flatListHeader,\r\n\r\n flex1,\r\n textWhite,\r\n } = Style\r\n const {Order, Isloading} = orderOnlineStore\r\n const renderOrderRows = () => {\r\n if (Order === undefined) {\r\n return null\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {i18n.t('PlacedOrderDetails.Receipt')}\r\n \r\n\r\n \r\n \r\n {i18n.t('PlacedOrderDetails.OrderNumber')}\r\n \r\n {Order.orderNumber}\r\n \r\n {Order.tableNumber && (\r\n \r\n \r\n {i18n.t('PlacedOrders.Table')}:\r\n \r\n {Order.tableNumber}\r\n \r\n )}\r\n\r\n \r\n \r\n {i18n.t('PlacedOrderDetails.Date')}\r\n \r\n {/* this date does have the right isoString ?!? */}\r\n {FormatDateTime(Order.orderDateTime)}\r\n \r\n \r\n \r\n \r\n \r\n {Order.orderLines.map((orderRequestLine, key) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n return (\r\n \r\n \r\n {\r\n goBack()\r\n }}\r\n title={`${i18n.t('PlacedOrderDetails.OrderNumber')} ${\r\n orderHistory.orderNumber\r\n }`}\r\n />\r\n \r\n {renderOrderRows()}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(PlacedOrderDetails)\r\n\r\nconst styles = StyleSheet.create({\r\n headerRow: {\r\n alignItems: 'center',\r\n //justifyContent: 'flex-end',\r\n flexDirection: 'row',\r\n },\r\n title: {\r\n paddingRight: sizes.padding.sm,\r\n },\r\n})\r\n","import {StackNavigationProp} from '@react-navigation/stack'\r\nimport React, {useEffect} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\n//import {navigate} from '../../Helpers/NavigationHelper'\r\nimport {MainScreensListWeb} from '../../Navigation/index.web'\r\nimport Style from '../../Style'\r\n\r\n//type argsType = undefined extends MainScreensListWeb[ keyof MainScreensListWeb]\r\ninterface IProps {\r\n //routeName: RouteName extends keyof MainScreensListWeb\r\n navigation: StackNavigationProp\r\n routeName: keyof MainScreensListWeb\r\n args?: any\r\n}\r\n\r\nconst Redirect: React.FC = ({\r\n args,\r\n routeName,\r\n navigation: {navigate},\r\n}) => {\r\n useEffect(() => {\r\n navigate(routeName, args)\r\n })\r\n\r\n return redirect ?\r\n}\r\n\r\nexport default Redirect\r\n\r\nconst styles = StyleSheet.create({})\r\n","import api from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./strapi.scss\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import React, {useEffect, useState} from 'react'\r\nimport { UmbracoMedia } from '../../../Helpers/UrlHelpers'\r\n\r\nimport { IMenuItemViewModel, IPageViewModel } from '../../../Services/Topr.Umbraco/Models'\r\n\r\ninterface IProps {\r\n page: IPageViewModel\r\n //mobileMenuActive: boolean\r\n}\r\n\r\nconst TopMenuView: React.FC = ({page}) => {\r\n const [showShadow, setshowShadow] = useState(false)\r\n const [mobileMenuActive, setMobileMenuActive] = useState(false)\r\n const onScroll = () => {\r\n const scrollTop =\r\n document.body.scrollTop || document.documentElement.scrollTop\r\n const offSet = 30\r\n\r\n setshowShadow(scrollTop > offSet)\r\n }\r\n useEffect(() => {\r\n window.addEventListener('scroll', onScroll)\r\n\r\n return () => window.removeEventListener('scroll', onScroll)\r\n })\r\n\r\n //const {Page, MobileMenuActive} = homeStore\r\n const cssIsActive = mobileMenuActive ? 'is-active' : ''\r\n if (page === undefined || page.HomeMenu === undefined) {\r\n return null\r\n }\r\n\r\n const renderMenuItems = (menuItems: IMenuItemViewModel[]) => {\r\n if (menuItems === undefined || menuItems.length === 0) {\r\n return null\r\n }\r\n\r\n return menuItems.map((menuItem, key) => {\r\n if (menuItem.Type === 'Button') {\r\n return (\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n {menuItem.Name}\r\n \r\n )\r\n })\r\n }\r\n\r\n const shadowCss = showShadow ? 'shadow' : ''\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n )\r\n}\r\n\r\nexport default TopMenuView\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\n//import Pages from '../../Models/Strapi/Pages'\r\nimport ToprUmbraco from '../../Services/Topr.Umbraco'\r\nimport {IPageViewModel, UmbracoPages} from '../../Services/Topr.Umbraco/Models'\r\n\r\nexport default class Store {\r\n public IsLoading = true\r\n //public Page?: Page = undefined\r\n public Page?: IPageViewModel = undefined\r\n\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public Initialize() {\r\n this.IsLoading = true\r\n\r\n ToprUmbraco.GetPage(UmbracoPages.Home)\r\n .then((page) => {\r\n console.log('home', page)\r\n runInAction(() => {\r\n this.Page = page\r\n })\r\n })\r\n .catch((error: string) => {\r\n console.log(error)\r\n })\r\n .finally(() => {\r\n setTimeout(() => {\r\n runInAction(() => (this.IsLoading = false))\r\n }, 200) //weird component not mounted\r\n })\r\n }\r\n\r\n public GetDownload() {\r\n this.IsLoading = true\r\n\r\n ToprUmbraco.GetPage(UmbracoPages.Download)\r\n .then((page) => {\r\n runInAction(() => (this.Page = page))\r\n })\r\n .catch((error: string) => {\r\n console.log(error)\r\n })\r\n .finally(() => {\r\n setTimeout(() => {\r\n runInAction(() => (this.IsLoading = false))\r\n }, 200)\r\n })\r\n }\r\n\r\n public GetPrivacyStatement() {\r\n this.IsLoading = true\r\n\r\n ToprUmbraco.GetPage(UmbracoPages.PrivacyStatement)\r\n .then((page) => {\r\n console.log('privacy', page)\r\n runInAction(() => (this.Page = page))\r\n })\r\n .catch((error: string) => {\r\n console.log(error)\r\n })\r\n .finally(() => {\r\n setTimeout(() => {\r\n runInAction(() => (this.IsLoading = false))\r\n }, 200)\r\n })\r\n }\r\n}\r\nexport const homeStore = new Store()\r\n","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./style.scss\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import {StackScreenProps} from '@react-navigation/stack'\r\nimport 'bulma/css/bulma.min.css'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {ToprScreenLoader} from '../../Components'\r\nimport {Container} from '../../Components/Web'\r\nimport Redirect from '../../Components/Web/Redirect'\r\nimport {ContentElements} from '../../Components/Web/Strapi'\r\nimport {MainScreensListWeb} from '../../Navigation/index.web'\r\nimport '../../Style/strapi.scss'\r\nimport '../../Style/style.web.scss'\r\nimport TopMenuView from './Components/TopMenu'\r\nimport {homeStore} from './Store'\r\nimport './style.scss'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Home: React.FC = ({children, navigation}) => {\r\n useEffect(() => {\r\n homeStore.Initialize()\r\n }, [homeStore])\r\n\r\n const {IsLoading, Page} = homeStore\r\n\r\n if (IsLoading) {\r\n //return loader\r\n return \r\n }\r\n\r\n //if umbraco fails go to login\r\n if (Page === undefined) {\r\n return \r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(Home)\r\n","import { StackScreenProps } from '@react-navigation/stack'\r\nimport 'bulma/css/bulma.min.css'\r\nimport { observer } from 'mobx-react'\r\nimport React, { useEffect } from 'react'\r\nimport { ToprScreenLoader } from '../../Components'\r\nimport { Container } from '../../Components/Web'\r\nimport Redirect from '../../Components/Web/Redirect'\r\nimport { ContentElements } from '../../Components/Web/Strapi'\r\nimport { MainScreensListWeb } from '../../Navigation/index.web'\r\nimport '../../Style/strapi.scss'\r\nimport '../../Style/style.web.scss'\r\nimport TopMenuView from './Components/TopMenu'\r\nimport { homeStore } from './Store'\r\nimport './style.scss'\r\n\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Home: React.FC = ({children, navigation}) => {\r\n useEffect(() => {\r\n homeStore.GetDownload()\r\n }, [homeStore])\r\n\r\n const {IsLoading, Page} = homeStore\r\n\r\n if (IsLoading) {\r\n //return loader\r\n return \r\n }\r\n\r\n //if strapi fails go to login\r\n if (Page === undefined) {\r\n return \r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(Home)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport 'bulma/css/bulma.min.css'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {Icon, Input} from 'react-native-elements'\r\nimport {ToprScreenLoader} from '../../../Components'\r\nimport {Container} from '../../../Components/Web'\r\nimport Redirect from '../../../Components/Web/Redirect'\r\nimport {ContentElements} from '../../../Components/Web/Strapi'\r\nimport {MainScreensListWeb} from '../../../Navigation/index.web'\r\nimport '../../../Style/strapi.scss'\r\nimport '../../../Style/style.web.scss'\r\nimport HelpItemsView from '../Components/HelpItemsView'\r\nimport TopMenuView from '../Components/TopMenu'\r\nimport {helpStore} from './Store'\r\nimport '../style.scss'\r\nimport i18n from '../../../i18n'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst Help: React.FC = ({children, navigation}) => {\r\n useEffect(() => {\r\n helpStore.GetHelp()\r\n }, [helpStore])\r\n\r\n const {IsLoading, Page, FilteredHelpItems, Search} = helpStore\r\n\r\n if (IsLoading) {\r\n //return loader\r\n return \r\n }\r\n\r\n //if strapi fails go to login\r\n if (Page === undefined) {\r\n return \r\n }\r\n\r\n const renderClearSearchIcon = () => {\r\n if (Search === '') {\r\n return undefined\r\n }\r\n return (\r\n {\r\n helpStore.SetSearch('')\r\n }}\r\n />\r\n )\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n helpStore.SetSearch(value)}\r\n />\r\n
    \r\n
    \r\n\r\n \r\n
    \r\n \r\n )\r\n}\r\n\r\nexport default observer(Help)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport 'bulma/css/bulma.min.css'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {ToprScreenLoader} from '../../Components'\r\nimport {Container} from '../../Components/Web'\r\nimport Redirect from '../../Components/Web/Redirect'\r\nimport {ContentElements} from '../../Components/Web/Strapi'\r\nimport {MainScreensListWeb} from '../../Navigation/index.web'\r\nimport '../../Style/strapi.scss'\r\nimport '../../Style/style.web.scss'\r\nimport TopMenuView from './Components/TopMenu'\r\nimport {homeStore} from './Store'\r\nimport './style.scss'\r\n\r\ninterface IProps extends StackScreenProps {}\r\n\r\nconst PrivacyStatement: React.FC = ({children, navigation}) => {\r\n useEffect(() => {\r\n homeStore.GetPrivacyStatement()\r\n }, [homeStore])\r\n\r\n const {IsLoading, Page} = homeStore\r\n\r\n if (IsLoading) {\r\n //return loader\r\n return \r\n }\r\n\r\n //if strapi fails go to login\r\n if (Page === undefined) {\r\n return \r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(PrivacyStatement)\r\n","import React from 'react'\r\nimport {View, StyleSheet, Text} from 'react-native'\r\nimport Style from '../../Style'\r\ninterface IProps {}\r\n\r\nconst Deeplink: React.FC = ({children}) => {\r\n return (\r\n \r\n \r\n Deeplink, you are being redirected to the app\r\n \r\n \r\n )\r\n}\r\n\r\nexport default Deeplink\r\n\r\nconst styles = StyleSheet.create({})\r\n","import {makeAutoObservable, runInAction} from 'mobx'\r\nimport {persistedStore} from '../../../Mobx'\r\nimport {ToprError} from '../../../Models/Client'\r\nimport AuthenticationController from '../../../Services/Topr.Core/AuthenticationController'\r\nimport UserController from '../../../Services/Topr.Core/UserController'\r\n\r\nexport default class Store {\r\n constructor() {\r\n makeAutoObservable(this)\r\n }\r\n\r\n public AutomaticLogin(\r\n tempAdminGuid: string,\r\n navigate: (screen: string) => void,\r\n ) {\r\n AuthenticationController.AutomaticLogin(tempAdminGuid)\r\n .then(() => {\r\n UserController.GetChildUsers()\r\n UserController.GetConsumerUser().then((mainUser) => {\r\n persistedStore.SetMainUser(mainUser, false)\r\n })\r\n\r\n //reset form\r\n navigate('dashboard')\r\n })\r\n .catch((toprError: ToprError) => {\r\n //alert(toprError.Code)\r\n })\r\n }\r\n}\r\nexport const automaticLoginStore = new Store()\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport React, {useEffect} from 'react'\r\nimport {View, StyleSheet} from 'react-native'\r\nimport {MainScreensListWeb} from '../../../Navigation/index.web'\r\nimport {automaticLoginStore} from './Store'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst AutomaticLogin: React.FC = ({navigation: {navigate}, route}) => {\r\n const {tempAdminGuid} = route.params\r\n useEffect(() => {\r\n automaticLoginStore.AutomaticLogin(tempAdminGuid, navigate)\r\n }, [null])\r\n\r\n return <>\r\n}\r\n\r\nexport default AutomaticLogin\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {View} from 'react-native'\r\nimport {Badge, Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n CouponInfoCard,\r\n ImageHeader,\r\n SavingCardInfoCard,\r\n StampsCard,\r\n SubmitHeader,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetFileUrl, GetLocalizedImageUrl} from '../../../Helpers/UiHelpers'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\nimport {savingCardDetailsStore} from './Store'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst SubscriptionDetails: React.FC = ({\r\n navigation: {goBack},\r\n route,\r\n}) => {\r\n return <>todo web\r\n // const userSavingCardGuid = route.params.userSavingCardGuid\r\n // useEffect(() => {\r\n // myLog.info(`SavingCardDetails`)\r\n // savingCardDetailsStore.GetUserSavingCard(userSavingCardGuid)\r\n // }, [null])\r\n\r\n // const {IsLoading, UserSavingCard} = savingCardDetailsStore\r\n // const {imageHeaderTitle, badgeStyle} = Style\r\n // const imageUrl = GetFileUrl(UserSavingCard?.SavingCard.ImageGuid)\r\n // return (\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {`${UserSavingCard?.SavingCard.Title} ${UserSavingCard?.StampCount}/${UserSavingCard?.SavingCard.StampCount}`}\r\n // \r\n // \r\n // \r\n // )\r\n}\r\nexport default observer(SubscriptionDetails)\r\n","import {StackScreenProps} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {View} from 'react-native'\r\nimport {Badge, Text} from 'react-native-elements'\r\nimport {\r\n Container,\r\n Content,\r\n CouponInfoCard,\r\n ImageHeader,\r\n SavingCardInfoCard,\r\n StampsCard,\r\n SubmitHeader,\r\n ToprScreenLoader,\r\n} from '../../../Components'\r\nimport {StockImageLayout} from '../../../Components/Web'\r\nimport {GetFileUrl, GetLocalizedImageUrl} from '../../../Helpers/UiHelpers'\r\nimport {MainScreensList} from '../../../Navigation'\r\nimport {myLog} from '../../../Services/Client/LogService'\r\nimport Style from '../../../Style'\r\n\r\ninterface IProps\r\n extends StackScreenProps {}\r\n\r\nconst TicketsDetails: React.FC = ({navigation: {goBack}, route}) => {\r\n return <>todo web\r\n // const userSavingCardGuid = route.params.userSavingCardGuid\r\n // useEffect(() => {\r\n // myLog.info(`SavingCardDetails`)\r\n // savingCardDetailsStore.GetUserSavingCard(userSavingCardGuid)\r\n // }, [null])\r\n\r\n // const {IsLoading, UserSavingCard} = savingCardDetailsStore\r\n // const {imageHeaderTitle, badgeStyle} = Style\r\n // const imageUrl = GetFileUrl(UserSavingCard?.SavingCard.ImageGuid)\r\n // return (\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {`${UserSavingCard?.SavingCard.Title} ${UserSavingCard?.StampCount}/${UserSavingCard?.SavingCard.StampCount}`}\r\n // \r\n // \r\n // \r\n // )\r\n}\r\nexport default observer(TicketsDetails)\r\n","import {LinkingOptions, NavigatorScreenParams} from '@react-navigation/native'\r\n//import {StackScreenProps, StackScreenProps} from '@react-navigation/stack'\r\nimport {GetDeepLinkBaseUrl} from '../Helpers/UrlHelpers'\r\nimport {DashboardScreensList} from '../Screens/Dashboard/Dashboard/DashboardWeb'\r\n\r\n//also used to map web url path and parameters to MainScreensList in\r\n// Navigation/index.ts\r\n\r\n//deeplinks (used in app) always follow this pattern: controller/action/parameters\r\n//eg:\r\n// register/confirm/:userGuid\r\n// email/confirmChange/:requestIdentifier\r\n// wallet/confirmPaymentOrder/:currencyGuid/:status\r\n\r\ntype RootStackParamList = {\r\n RoundUps: undefined\r\n Account: undefined\r\n dashboard: {\r\n path: 'dashboard'\r\n screens: NavigatorScreenParams\r\n }\r\n}\r\n\r\nconst linkingOptions: LinkingOptions = {\r\n enabled: true,\r\n prefixes: [GetDeepLinkBaseUrl()],\r\n\r\n config: {\r\n screens: {\r\n register: {\r\n path: 'register',\r\n },\r\n //ToprConsumerExpo deeplinks\r\n confirmPaymentOrderUrl: {\r\n path: 'deeplink/:currencyGuid/confirm-payment-order/:status',\r\n },\r\n emandateResultUrl: {\r\n path: 'deeplink/:currencyGuid/emandate-result/:status',\r\n },\r\n confirmEmailChange: {\r\n path: 'deeplink/change-email-confirm/:requestIdentifier',\r\n },\r\n // end ToprConsumerExpo deeplinks\r\n\r\n confirm: {\r\n path: 'register/confirm/:userGuid',\r\n },\r\n confirmChangeEmail: {\r\n path: 'email/confirmChange/:requestIdentifier',\r\n },\r\n resetPassword: {\r\n path: 'user/resetPassword/:requestIdentifier',\r\n },\r\n\r\n //web\r\n automaticLogin: {\r\n //linked by from manager.mybility.nl //'Login as user'\r\n path: 'User/AutomaticLogin/:tempAdminGuid',\r\n },\r\n walletDetails: {\r\n path: 'wallet/details/:currencyGuid/',\r\n },\r\n sendMoney: {\r\n path: 'wallet/send/:currencyGuid',\r\n },\r\n automaticCharge: {\r\n path: 'wallet/automaticcharge/:currencyGuid',\r\n },\r\n couponDetails: {\r\n path: 'coupon/details/:userCouponGuid',\r\n },\r\n savingCardDetails: {\r\n path: 'savingcard/details/:userSavingCardGuid',\r\n },\r\n couponsSummary: {\r\n path: 'couponsSummary',\r\n },\r\n login: {\r\n path: 'login',\r\n },\r\n locations: {\r\n path: 'locations',\r\n },\r\n download: {\r\n path: 'download',\r\n },\r\n help: {\r\n path: 'help',\r\n },\r\n privacy: {\r\n path: 'privacy',\r\n },\r\n // tokens: {\r\n // path: 'tokens',\r\n // },\r\n forgotPassword: {\r\n path: 'forgotPassword',\r\n },\r\n dashboard: {\r\n path: 'dashboard',\r\n screens: {\r\n help: {path: 'help'},\r\n main: {path: 'main'},\r\n },\r\n },\r\n //NotFound: '*',\r\n },\r\n },\r\n}\r\n\r\nexport default linkingOptions\r\n","import {NavigationContainer} from '@react-navigation/native'\r\nimport {createStackNavigator} from '@react-navigation/stack'\r\nimport {observer} from 'mobx-react'\r\nimport React from 'react'\r\nimport {MySafeAreaView} from '../Components'\r\nimport {navigationRef} from '../Helpers/NavigationHelper'\r\nimport {GetTenantPagetitle} from '../Helpers/TextHelpers'\r\nimport i18n from '../i18n'\r\nimport {persistedStore} from '../Mobx'\r\nimport {IMyPlacedOrder} from '../Models/Client'\r\nimport {DeliveryType} from '../Models/InzziiApi/Enums'\r\nimport {\r\n ICouponSummarySTO,\r\n ILocationSTO,\r\n ISavingCardSummarySTO,\r\n IUserEventSto,\r\n IWalletSTO,\r\n} from '../Models/Server'\r\nimport {\r\n Account,\r\n AddToken,\r\n CancelAccount,\r\n ChangeEmail,\r\n ChangeEmailConfirmationSent,\r\n ChangeName,\r\n ChangePassword,\r\n Charge,\r\n ChoosePicture,\r\n ConfirmChangeEmail,\r\n CouponDetails,\r\n CouponsSummary,\r\n DashboardIndex,\r\n ForgotPassword,\r\n LocationDetails,\r\n Locations,\r\n Login,\r\n OrderOnline,\r\n QrCode,\r\n Register,\r\n RegisterConfirm,\r\n ResetPassword,\r\n SavingCardDetails,\r\n SavingCardsSummary,\r\n SendMoney,\r\n TakePicture,\r\n Tokens,\r\n UserCouponsSummary,\r\n UserSavingCardsSummary,\r\n WalletDetails,\r\n Withdraw,\r\n PlacedOrderDetails,\r\n PlacedOrders,\r\n Home,\r\n Download,\r\n Help,\r\n Deeplink,\r\n AutomaticCharge,\r\n AutomaticLogin,\r\n SubscriptionDetails,\r\n TicketDetails,\r\n PrivacyStatement,\r\n} from '../Screens/index.web'\r\nimport Test from '../Screens/Test/Test'\r\n\r\nimport LinkingConfiguration from './LinkingConfiguration'\r\n\r\nexport type MainScreensListWeb = {\r\n home: undefined\r\n automaticLogin: {tempAdminGuid: string}\r\n download: undefined\r\n //deeplinks toprconsumerexpo51\r\n confirmPaymentOrderUrl: undefined\r\n emandateResultUrl: undefined\r\n confirmEmailChange: undefined\r\n /// end deeplinks\r\n help: undefined\r\n login: undefined\r\n privacy: undefined\r\n register: undefined\r\n confirm: {userGuid: string}\r\n dashboard: undefined\r\n locations: undefined\r\n locationDetails: {location: ILocationSTO}\r\n addToken: undefined\r\n walletDetails: {currencyGuid: string}\r\n charge: {wallet: IWalletSTO}\r\n sendMoney: {currencyGuid: string}\r\n withdraw: {wallet: IWalletSTO}\r\n automaticCharge: {currencyGuid: string}\r\n tokens: undefined\r\n account: undefined\r\n cancelAccount: undefined\r\n changeName: undefined\r\n changePassword: undefined\r\n changeEmail: undefined\r\n changeEmailConfirmationSent: {email: string}\r\n confirmChangeEmail: {requestIdentifier: string}\r\n takePicture: undefined\r\n choosePicture: undefined\r\n qrCode: undefined\r\n forgotPassword: undefined\r\n resetPassword: {requestIdentifier: string}\r\n couponDetails: {userCouponGuid: string}\r\n savingCardDetails: {userSavingCardGuid: string}\r\n ticketDetails: {userEvent: IUserEventSto}\r\n\r\n test: undefined\r\n couponsSummary: undefined\r\n userCouponsSummary: {couponSummary: ICouponSummarySTO}\r\n savingCardsSummary: undefined\r\n userSavingCardsSummary: {savingCardSummary: ISavingCardSummarySTO}\r\n orderOnline: undefined\r\n //scanner: undefined\r\n placedOrders: undefined\r\n placedOrderDetails: {placedOrder: IMyPlacedOrder}\r\n confirmPaymentOrder: {status: string; currencyGuid: string}\r\n subscriptionDetails: {userSubscriptionId: string}\r\n}\r\n\r\nconst Stack = createStackNavigator()\r\n\r\ninterface IProps {}\r\n\r\nconst Navigation: React.FC = ({children}) => {\r\n const {UserToken} = persistedStore\r\n return (\r\n \r\n \r\n {UserToken === undefined ? (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(Navigation)\r\n","import {Theme} from 'react-native-elements'\r\nimport AppConfig from '../Config/AppConfig'\r\nimport {defaultFontWeight} from './index'\r\n\r\nconst theme: Theme = {\r\n colors: {\r\n primary: AppConfig.Tenant.MainColor,\r\n },\r\n Button: {\r\n titleStyle: {...defaultFontWeight},\r\n },\r\n Text: {\r\n style: defaultFontWeight,\r\n },\r\n Badge: {\r\n textStyle: defaultFontWeight,\r\n },\r\n Input: {\r\n inputStyle: defaultFontWeight,\r\n },\r\n}\r\n\r\nexport default theme\r\n","import NetInfo from '@react-native-community/netinfo'\r\nimport {observer} from 'mobx-react'\r\nimport React, {useEffect} from 'react'\r\nimport {ThemeProvider} from 'react-native-elements'\r\nimport {ToastProvider} from 'react-native-fast-toast'\r\nimport {SafeAreaProvider} from 'react-native-safe-area-context'\r\nimport {\r\n AlertModal,\r\n AuthenticateModal,\r\n ConfirmModal,\r\n MyToast,\r\n} from './src/Components'\r\nimport CodePushUpdatingModal from './src/Components/Modal/CodePushUpdatingModal'\r\nimport {WebIncludes} from './src/Components/Web'\r\nimport {persistedStore} from './src/Mobx'\r\nimport {appUiStore} from './src/Mobx/AppUiStore'\r\nimport Navigation from './src/Navigation'\r\nimport Test from './src/Screens/Test/Test'\r\n\r\nimport Theme from './src/Style/Theme'\r\n\r\nconsole.ignoredYellowBox = ['Setting a timer']\r\n\r\nconst App = () => {\r\n useEffect(() => {\r\n const netInfoUnsubcribe = NetInfo.addEventListener((state) => {\r\n appUiStore.SetIsConnected(state.isConnected)\r\n return () => {\r\n netInfoUnsubcribe()\r\n }\r\n })\r\n }, [null])\r\n\r\n const {NetworkStatefinished, ToastMessage} = appUiStore\r\n if (!NetworkStatefinished || !persistedStore.IsHydrated) {\r\n return null\r\n }\r\n\r\n //return \r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default observer(App)\r\n","import {registerRootComponent} from 'expo'\r\n\r\nimport App from './App'\r\n\r\n// registerRootComponent calls AppRegistry.registerComponent('main', () => App);\r\n// It also ensures that whether you load the app in the Expo client or in a native build,\r\n// the environment is set up appropriately\r\nregisterRootComponent(App)\r\n"],"sourceRoot":""}