webtonative 1.0.66 → 1.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stopMedia=exports.playMedia=exports.pauseMedia=void 0;var _utills=require("../utills"),playMedia=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.url,c=a.imageUrl,d=void 0===c?"https://images.freeimages.com/images/large-previews/3b2/prague-conference-center-1056491.jpg":c;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.playMedia(JSON.stringify({url:b,imageUrl:d}))};exports.playMedia=playMedia;/**
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stopMedia=exports.playMedia=exports.pauseMedia=void 0;var _utills=require("../utills"),playMedia=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.url,c=a.imageUrl,d=void 0===c?"https://images.freeimages.com/images/large-previews/3b2/prague-conference-center-1056491.jpg":c;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("ANDROID_APP"===_utills.platform&&_utills.webToNative.playMedia(JSON.stringify({url:b,imageUrl:d})),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"playMedia",url:b,image:d}))};exports.playMedia=playMedia;/**
2
2
  *
3
3
  *
4
- */var pauseMedia=function(){0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.pausePlaying()};/**
4
+ */var pauseMedia=function(){0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("ANDROID_APP"===_utills.platform&&_utills.webToNative.pausePlaying(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"pauseMedia"}))};/**
5
5
  *
6
6
  *
7
- */exports.pauseMedia=pauseMedia;var stopMedia=function(){0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.stopPlaying()};exports.stopMedia=stopMedia;
7
+ */exports.pauseMedia=pauseMedia;var stopMedia=function(){0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&("ANDROID_APP"===_utills.platform&&_utills.webToNative.stopPlaying(),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"stopMedia"}))};exports.stopMedia=stopMedia;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makePayment=void 0;var _utills=require("../utills"),makePayment=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.apiUrl,d=a.amount,e=a.currency,f=a.isSimulated,g=void 0!==f&&f,h=a.captureMethod,i=void 0===h?"automatic":h;(0,_utills.registerCb)(function(a){var c=a.type;"makeTapToPayStripePayment"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.makeTapToPayStripePayment(JSON.stringify({apiUrl:c,amount:d,currency:e,isSimulated:g,captureMethod:i})),"IOS_APP"===_utills.platform&&_utills.webToNativeIos.postMessage({action:"makeTapToPayStripePayment",apiUrl:c,amount:d,currency:e,isSimulated:g,captureMethod:i})}};exports.makePayment=makePayment;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIosApp=exports.isDeviceGPSEnabled=exports.isAndroidApp=exports.hideSplashScreen=exports.forceUpdateCookies=exports.enablePullToRefresh=exports.downloadFile=exports.downloadBlobFile=exports.deviceInfo=exports["default"]=exports.customFileDownload=exports.closeApp=exports.clearAppCache=exports.appFirstLoad=exports.addToSiri=void 0,Object.defineProperty(exports,"isNativeApp",{enumerable:!0,get:function get(){return _utills.isNativeApp}}),exports.openUrlInBrowser=exports.loadOfferCard=void 0,Object.defineProperty(exports,"platform",{enumerable:!0,get:function get(){return _utills.platform}}),exports.updateAppIcon=exports.statusBar=exports.showPermission=exports.showInAppReview=exports.showDateTimePicker=exports.shareLink=exports.shareFile=exports.printFunction=void 0;var _utills=require("./utills"),isAndroidApp="ANDROID_APP"===_utills.platform;exports.isAndroidApp=isAndroidApp;var isIosApp="IOS_APP"===_utills.platform;/**
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIosApp=exports.isDeviceGPSEnabled=exports.isAndroidApp=exports.hideSplashScreen=exports.getSafeArea=exports.getAddOnStatus=exports.forceUpdateCookies=exports.enablePullToRefresh=exports.downloadFile=exports.downloadBlobFile=exports.disableScreenshot=exports.deviceInfo=exports["default"]=exports.customFileDownload=exports.closeApp=exports.clearAppCache=exports.checkPermission=exports.appFirstLoad=exports.addToSiri=void 0,Object.defineProperty(exports,"isNativeApp",{enumerable:!0,get:function get(){return _utills.isNativeApp}}),exports.openUrlInBrowser=exports.openAppSettingForPermission=exports.nfcSupported=exports.loadOfferCard=void 0,Object.defineProperty(exports,"platform",{enumerable:!0,get:function get(){return _utills.platform}}),exports.updateAppIcon=exports.statusBar=exports.showPermission=exports.showInAppReview=exports.showDateTimePicker=exports.shareLink=exports.shareFile=exports.setOrientation=exports.printFunction=void 0;var _utills=require("./utills"),isAndroidApp="ANDROID_APP"===_utills.platform;exports.isAndroidApp=isAndroidApp;var isIosApp="IOS_APP"===_utills.platform;/**
2
2
  * This function hides splash screen
3
3
  * @example wtn.hideSplashScreen()
4
- */exports.isIosApp=isIosApp;var hideSplashScreen=function(){_utills.isNativeApp&&_utills.webToNative.hideSplashScreen()};exports.hideSplashScreen=hideSplashScreen;var statusBar=function(a){_utills.isNativeApp&&(isAndroidApp?_utills.webToNative.statusBar(JSON.stringify(a)):isIosApp&&_utills.webToNativeIos.postMessage({action:"statusBar",color:a.color,style:a.style}))};exports.statusBar=statusBar;var downloadFile=function(a){_utills.isNativeApp&&(isAndroidApp||isIosApp&&_utills.webToNativeIos.postMessage({action:"downloadFile",downloadUrl:a}))};exports.downloadFile=downloadFile;var downloadBlobFile=function(a){var b=a.fileName,c=a.downloadUrl;["IOS_APP"].includes(_utills.platform)&&isIosApp&&_utills.webToNativeIos.postMessage({action:"downloadBlobFile",fileName:b,url:c})};exports.downloadBlobFile=downloadBlobFile;var customFileDownload=function(a){var b=a.downloadUrl,c=a.fileName,d=a.isBlob,e=a.mimeType,f=a.cookies,g=a.userAgent,h=a.openFileAfterDownload;["ANDROID_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.downloadFile(JSON.stringify({url:b,fileName:c,isBlob:d,mimeType:e,cookies:f,userAgent:g,openFileAfterDownload:h}))};exports.customFileDownload=customFileDownload;var deviceInfo=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){c?a(c):b({err:"Error getting device info"})},{key:"deviceInfo"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.getDeviceInfo():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"deviceInfo"}):b("This function will work in Native App Powered By WebToNative")})};exports.deviceInfo=deviceInfo;var showInAppReview=function(){_utills.isNativeApp&&_utills.webToNative.showInAppReview()};exports.showInAppReview=showInAppReview;var isDeviceGPSEnabled=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"isDeviceGPSEnabled"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.isLocationServiceEnabled())};exports.isDeviceGPSEnabled=isDeviceGPSEnabled;var shareLink=function(a){var b=a.url,c=void 0===b?"":b;if(c)isAndroidApp&&_utills.webToNative.openShareIntent(c),isIosApp&&_utills.webToNativeIos.postMessage({action:"share",url:c});else throw"url is mandatory"};exports.shareLink=shareLink;var openUrlInBrowser=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";if(a)isAndroidApp&&_utills.webToNative.openUrlInBrowser(a);else throw"url is mandatory"};exports.openUrlInBrowser=openUrlInBrowser;var enablePullToRefresh=function(a){isAndroidApp&&_utills.webToNative.enableSwipeRefresh(a)};exports.enablePullToRefresh=enablePullToRefresh;var clearAppCache=function(a){isAndroidApp&&_utills.webToNative.clearWebViewCache(JSON.stringify({reload:a}))};exports.clearAppCache=clearAppCache;var shareFile=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;isAndroidApp&&_utills.webToNative.shareFile(a,b,c)};exports.shareFile=shareFile;var closeApp=function(){isAndroidApp&&_utills.webToNative.closeApp(),isIosApp&&_utills.webToNativeIos.postMessage({action:"closeApp"})};exports.closeApp=closeApp;var showDateTimePicker=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.callback,c=a.showDate,d=a.showTime;(0,_utills.registerCb)(function(a){var c=a.type;"DATE_TIME_PICKER"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.pickDateTime(JSON.stringify({showDate:c,showTime:d}))}};exports.showDateTimePicker=showDateTimePicker;var printFunction=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.type,c=void 0===b?"url":b,d=a.url,e=void 0===d?"":d;isAndroidApp&&_utills.webToNative.print(JSON.stringify({type:c,url:e}))}};exports.printFunction=printFunction;var loadOfferCard=function(a){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&(isAndroidApp&&_utills.webToNative.showOfferCard(JSON.stringify(a)),a.data&&(a.data=JSON.stringify(a.data)),isIosApp&&_utills.webToNativeIos.postMessage(a))};exports.loadOfferCard=loadOfferCard;var addToSiri=function(a){["IOS_APP"].includes(_utills.platform)&&(a.data&&(a.data=JSON.stringify(a.data)),isIosApp&&_utills.webToNativeIos.postMessage(a))};exports.addToSiri=addToSiri;var appFirstLoad=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){c?a(c):b({err:"Error getting request"})},{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.firstCallWhenAppStarted():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"firstCallWhenAppStarted"}):b("This function will work in Native App Powered By WebToNative")})};exports.appFirstLoad=appFirstLoad;var forceUpdateCookies=function(){["ANDROID_APP"].includes(_utills.platform)&&isAndroidApp&&_utills.webToNative.forceUpdateCookies()};exports.forceUpdateCookies=forceUpdateCookies;var showPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.permissionType;(0,_utills.registerCb)(function(a){var c=a.type,d=a.typeValue;("showPermission"===c||"showPermission"===d)&&b&&b(a)}),isAndroidApp&&_utills.webToNative.showPermission(c),isIosApp&&_utills.webToNativeIos.postMessage({action:"showPermission",type:c})}};exports.showPermission=showPermission;var updateAppIcon=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.active,c=void 0!==b&&b,d=a.iconName,e=void 0===d?null:d;isAndroidApp&&_utills.webToNative.updateAppIcon(JSON.stringify({active:c,iconName:e})),isIosApp&&_utills.webToNativeIos.postMessage({action:"updateAppIcon",iconName:e,active:c})}};exports.updateAppIcon=updateAppIcon;var _default={isAndroidApp:isAndroidApp,isIosApp:isIosApp,hideSplashScreen:hideSplashScreen,statusBar:statusBar,deviceInfo:deviceInfo,showInAppReview:showInAppReview,shareLink:shareLink,platform:_utills.platform,isNativeApp:_utills.isNativeApp,isDeviceGPSEnabled:isDeviceGPSEnabled,openUrlInBrowser:openUrlInBrowser,enablePullToRefresh:enablePullToRefresh,shareFile:shareFile,clearAppCache:clearAppCache,closeApp:closeApp,showDateTimePicker:showDateTimePicker,downloadBlobFile:downloadBlobFile,customFileDownload:customFileDownload,printFunction:printFunction,loadOfferCard:loadOfferCard,appFirstLoad:appFirstLoad,addToSiri:addToSiri,showPermission:showPermission,forceUpdateCookies:forceUpdateCookies,updateAppIcon:updateAppIcon};exports["default"]=_default;
4
+ */exports.isIosApp=isIosApp;var hideSplashScreen=function(){_utills.isNativeApp&&_utills.webToNative.hideSplashScreen()};exports.hideSplashScreen=hideSplashScreen;var statusBar=function(a){_utills.isNativeApp&&(isAndroidApp?_utills.webToNative.statusBar(JSON.stringify(a)):isIosApp&&_utills.webToNativeIos.postMessage({action:"statusBar",color:a.color,style:a.style}))};exports.statusBar=statusBar;var downloadFile=function(a){_utills.isNativeApp&&(isAndroidApp||isIosApp&&_utills.webToNativeIos.postMessage({action:"downloadFile",downloadUrl:a}))};exports.downloadFile=downloadFile;var downloadBlobFile=function(a){var b=a.fileName,c=a.downloadUrl;["IOS_APP"].includes(_utills.platform)&&isIosApp&&_utills.webToNativeIos.postMessage({action:"downloadBlobFile",fileName:b,url:c})};exports.downloadBlobFile=downloadBlobFile;var customFileDownload=function(a){var b=a.downloadUrl,c=a.fileName,d=a.isBlob,e=a.mimeType,f=a.cookies,g=a.userAgent,h=a.openFileAfterDownload;["ANDROID_APP"].includes(_utills.platform)&&"ANDROID_APP"===_utills.platform&&_utills.webToNative.downloadFile(JSON.stringify({url:b,fileName:c,isBlob:d,mimeType:e,cookies:f,userAgent:g,openFileAfterDownload:h}))};exports.customFileDownload=customFileDownload;var deviceInfo=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){c?a(c):b({err:"Error getting device info"})},{key:"deviceInfo"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.getDeviceInfo():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"deviceInfo"}):b("This function will work in Native App Powered By WebToNative")})};exports.deviceInfo=deviceInfo;var showInAppReview=function(){_utills.isNativeApp&&_utills.webToNative.showInAppReview()};exports.showInAppReview=showInAppReview;var isDeviceGPSEnabled=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=a.callback;["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&((0,_utills.registerCb)(function(a){var c=a.type;"isDeviceGPSEnabled"===c&&b&&b(a)}),"ANDROID_APP"===_utills.platform&&_utills.webToNative.isLocationServiceEnabled())};exports.isDeviceGPSEnabled=isDeviceGPSEnabled;var shareLink=function(a){var b=a.url,c=void 0===b?"":b;if(c)isAndroidApp&&_utills.webToNative.openShareIntent(c),isIosApp&&_utills.webToNativeIos.postMessage({action:"share",url:c});else throw"url is mandatory"};exports.shareLink=shareLink;var openUrlInBrowser=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";if(a)isAndroidApp&&_utills.webToNative.openUrlInBrowser(a);else throw"url is mandatory"};exports.openUrlInBrowser=openUrlInBrowser;var enablePullToRefresh=function(a){isAndroidApp&&_utills.webToNative.enableSwipeRefresh(a)};exports.enablePullToRefresh=enablePullToRefresh;var clearAppCache=function(a){isAndroidApp&&_utills.webToNative.clearWebViewCache(JSON.stringify({reload:a}))};exports.clearAppCache=clearAppCache;var shareFile=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;isAndroidApp&&_utills.webToNative.shareFile(a,b,c)};exports.shareFile=shareFile;var closeApp=function(){isAndroidApp&&_utills.webToNative.closeApp(),isIosApp&&_utills.webToNativeIos.postMessage({action:"closeApp"})};exports.closeApp=closeApp;var showDateTimePicker=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.callback,c=a.showDate,d=a.showTime;(0,_utills.registerCb)(function(a){var c=a.type;"DATE_TIME_PICKER"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.pickDateTime(JSON.stringify({showDate:c,showTime:d}))}};exports.showDateTimePicker=showDateTimePicker;var printFunction=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.type,c=void 0===b?"url":b,d=a.url,e=void 0===d?"":d;isAndroidApp&&_utills.webToNative.print(JSON.stringify({type:c,url:e}))}};exports.printFunction=printFunction;var nfcSupported=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback;(0,_utills.registerCb)(function(a){var c=a.type;"nfcSupported"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.nfcSupported(),isIosApp&&_utills.webToNativeIos.postMessage({action:"nfcSupported"})}};exports.nfcSupported=nfcSupported;var loadOfferCard=function(a){["ANDROID_APP","IOS_APP"].includes(_utills.platform)&&(isAndroidApp&&_utills.webToNative.showOfferCard(JSON.stringify(a)),a.data&&(a.data=JSON.stringify(a.data)),isIosApp&&_utills.webToNativeIos.postMessage(a))};exports.loadOfferCard=loadOfferCard;var addToSiri=function(a){["IOS_APP"].includes(_utills.platform)&&(a.data&&(a.data=JSON.stringify(a.data)),isIosApp&&_utills.webToNativeIos.postMessage(a))};exports.addToSiri=addToSiri;var appFirstLoad=function(){return new Promise(function(a,b){(0,_utills.registerCb)(function(c){var d=c.type;"firstCallWhenAppStarted"===d&&(c?a(c):b({err:"Error getting request"}))},{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===_utills.platform?_utills.webToNative.firstCallWhenAppStarted():"IOS_APP"===_utills.platform?_utills.webToNativeIos.postMessage({action:"firstCallWhenAppStarted"}):b("This function will work in Native App Powered By WebToNative")})};exports.appFirstLoad=appFirstLoad;var forceUpdateCookies=function(){["ANDROID_APP"].includes(_utills.platform)&&isAndroidApp&&_utills.webToNative.forceUpdateCookies()};exports.forceUpdateCookies=forceUpdateCookies;var openAppSettingForPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.values;(0,_utills.registerCb)(function(a){var c=a.type,d=a.typeValue;"openAppSettingForPermission"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.openAppSettingForPermission(c),isIosApp&&_utills.webToNativeIos.postMessage({action:"openAppSettingForPermission",values:c})}};exports.openAppSettingForPermission=openAppSettingForPermission;var showPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.permission,d=a.openAppSetting,e=void 0!==d&&d,f=a.alertDialogStyle;(0,_utills.registerCb)(function(a){var c=a.type,d=a.typeValue;("showPermission"===c||"showPermission"===d)&&b&&b(a)}),isAndroidApp&&_utills.webToNative.showPermission(JSON.stringify({permission:c,openAppSetting:e,alertDialogStyle:f})),isIosApp&&_utills.webToNativeIos.postMessage({action:"showPermission",permission:c,openAppSetting:e,alertDialogStyle:f})}};exports.showPermission=showPermission;var updateAppIcon=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.active,c=void 0!==b&&b,d=a.iconName,e=void 0===d?null:d;isAndroidApp&&_utills.webToNative.updateAppIcon(JSON.stringify({active:c,iconName:e})),isIosApp&&_utills.webToNativeIos.postMessage({action:"updateAppIcon",iconName:e,active:c})}};exports.updateAppIcon=updateAppIcon;var disableScreenshot=function(a){if(["IOS_APP"].includes(_utills.platform)){var b=a.ssKey;isIosApp&&_utills.webToNativeIos.postMessage({action:"disableScreenshotForPage",ssKey:void 0!==b&&b})}};exports.disableScreenshot=disableScreenshot;var getSafeArea=function(a){if(["IOS_APP"].includes(_utills.platform)){var b=a.callback;(0,_utills.registerCb)(function(a){var c=a.type;"getSafeArea"===c&&b&&b(a)}),isIosApp&&_utills.webToNativeIos.postMessage({action:"getSafeArea"})}};exports.getSafeArea=getSafeArea;var getAddOnStatus=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.addOnName;(0,_utills.registerCb)(function(a){var c=a.type;"getAddOnStatus"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.getAddOnStatus(JSON.stringify({addOnName:c})),isIosApp&&_utills.webToNativeIos.postMessage({action:"getAddOnStatus",addOnName:c})}};exports.getAddOnStatus=getAddOnStatus;var checkPermission=function(a){if(["ANDROID_APP","IOS_APP"].includes(_utills.platform)){var b=a.callback,c=a.permissionName;(0,_utills.registerCb)(function(a){var c=a.type;"checkPermission"===c&&b&&b(a)}),isAndroidApp&&_utills.webToNative.checkPermission(JSON.stringify(c)),isIosApp&&_utills.webToNativeIos.postMessage({action:"checkPermission",permissionName:c})}};exports.checkPermission=checkPermission;var setOrientation=function(a){if(["ANDROID_APP"].includes(_utills.platform)){var b=a.orientation,c=a.forceOrientation;isAndroidApp&&_utills.webToNative.setOrientation(JSON.stringify({orientation:b,forceOrientation:void 0!==c&&c}))}};exports.setOrientation=setOrientation;var _default={isAndroidApp:isAndroidApp,isIosApp:isIosApp,hideSplashScreen:hideSplashScreen,statusBar:statusBar,deviceInfo:deviceInfo,showInAppReview:showInAppReview,shareLink:shareLink,platform:_utills.platform,isNativeApp:_utills.isNativeApp,isDeviceGPSEnabled:isDeviceGPSEnabled,openUrlInBrowser:openUrlInBrowser,enablePullToRefresh:enablePullToRefresh,shareFile:shareFile,clearAppCache:clearAppCache,closeApp:closeApp,showDateTimePicker:showDateTimePicker,downloadBlobFile:downloadBlobFile,customFileDownload:customFileDownload,printFunction:printFunction,loadOfferCard:loadOfferCard,appFirstLoad:appFirstLoad,addToSiri:addToSiri,showPermission:showPermission,forceUpdateCookies:forceUpdateCookies,updateAppIcon:updateAppIcon,disableScreenshot:disableScreenshot,getSafeArea:getSafeArea,getAddOnStatus:getAddOnStatus,setOrientation:setOrientation,checkPermission:checkPermission,openAppSettingForPermission:openAppSettingForPermission};exports["default"]=_default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webtonative",
3
- "version": "1.0.66",
3
+ "version": "1.0.68",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1 +1 @@
1
- !function(){"use strict";var e={d:function(n,t){for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{addToSiri:function(){return ee},appFirstLoad:function(){return ne},clearAppCache:function(){return z},closeApp:function(){return Q},customFileDownload:function(){return V},default:function(){return re},deviceInfo:function(){return H},downloadBlobFile:function(){return J},downloadFile:function(){return L},enablePullToRefresh:function(){return j},forceUpdateCookies:function(){return te},hideSplashScreen:function(){return W},isAndroidApp:function(){return C},isDeviceGPSEnabled:function(){return q},isIosApp:function(){return B},isNativeApp:function(){return m},loadOfferCard:function(){return $},openUrlInBrowser:function(){return K},platform:function(){return h},printFunction:function(){return Y},shareFile:function(){return X},shareLink:function(){return G},showDateTimePicker:function(){return Z},showInAppReview:function(){return x},showPermission:function(){return ie},statusBar:function(){return U},updateAppIcon:function(){return oe}});var t={};e.r(t),e.d(t,{addTrigger:function(){return Pe},addTriggers:function(){return Ae},getPlayerId:function(){return ae},getTriggerValue:function(){return fe},getTriggers:function(){return pe},logoutEmail:function(){return De},logoutSMSNumber:function(){return ge},optInUser:function(){return _e},optOutUser:function(){return Se},removeExternalUserId:function(){return ce},removeTrigger:function(){return le},removeTriggers:function(){return de},setEmail:function(){return Ie},setExternalUserId:function(){return se},setSMSNumber:function(){return Oe},setTags:function(){return ue}});var i={};e.r(i),e.d(i,{BarcodeScan:function(){return ye},Format:function(){return we},Types:function(){return Re}});var o={};e.r(o),e.d(o,{bannerAd:function(){return Te},fullScreenAd:function(){return be},rewardsAd:function(){return ke}});var r={};e.r(r),e.d(r,{logEvent:function(){return Fe},setCustomerUserId:function(){return Ee}});var a={};e.r(a),e.d(a,{send:function(){return Ce},sendPurchase:function(){return Be}});var s={};e.r(s),e.d(s,{hide:function(){return We},show:function(){return Ue}});var c={};e.r(c),e.d(c,{getAll:function(){return Je},getPermissionStatus:function(){return Le}});var u={};e.r(u),e.d(u,{start:function(){return Ve},stop:function(){return He}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return qe},keepScreenOn:function(){return xe}});var A={};e.r(A),e.d(A,{get:function(){return Ge},set:function(){return Ke}});var l={};e.r(l),e.d(l,{prompt:function(){return je}});var d={};e.r(d),e.d(d,{checkStatus:function(){return ze},deleteSecret:function(){return Qe},saveSecret:function(){return Xe},show:function(){return Ze}});var f={};e.r(f),e.d(f,{request:function(){return Ye},status:function(){return $e}});var p={};e.r(p),e.d(p,{logEvent:function(){return rn},logScreen:function(){return an},setCollection:function(){return en},setDefaultEventParameters:function(){return on},setUserId:function(){return nn},setUserProperty:function(){return tn}});var I={};e.r(I),e.d(I,{events:function(){return p}});var O={};e.r(O),e.d(O,{getFCMToken:function(){return un},subscribe:function(){return sn},unsubscribe:function(){return cn}});var D={};e.r(D),e.d(D,{Analytics:function(){return p},Messaging:function(){return O}});var g={};e.r(g),e.d(g,{trigger:function(){return Pn}});var _={};e.r(_),e.d(_,{pauseMedia:function(){return ln},playMedia:function(){return An},stopMedia:function(){return dn}});var S={};e.r(S),e.d(S,{setPrintSize:function(){return fn}});var N={};e.r(N),e.d(N,{checkNotificationPermission:function(){return pn},openAppNotificationPage:function(){return In}});var v={};e.r(v),e.d(v,{pairDevice:function(){return Dn},startBluetoothScan:function(){return On},unpairDevice:function(){return gn}});var w="undefined"!=typeof window,R=w&&window.WebToNativeInterface||{},y=w&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,h=R.getAndroidVersion?"ANDROID_APP":y?"IOS_APP":"WEBSITE",m=w&&"WEBSITE"!==h,T={},b=1,k=null;m&&(R.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,T){var i=T[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete T[t]):(o(n),a||delete T[t])}},window.iOSAdMobCBHook=R.androidAdMobCBHook=function(e){var n=JSON.parse(e);k&&k(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in T){var i=T[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete T[t]):(o(n),a||delete T[t])}});var M=function(e,n){"function"==typeof e&&(n&&n.key?T[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(T[b]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},b+=1))},E=function(e){"function"==typeof e&&(k=e)},F=function(){k&&(k=null)},C="ANDROID_APP"===h,B="IOS_APP"===h,W=function(){m&&R.hideSplashScreen()},U=function(e){m&&(C?R.statusBar(JSON.stringify(e)):B&&y.postMessage({action:"statusBar",color:e.color,style:e.style}))},L=function(e){m&&(C||B&&y.postMessage({action:"downloadFile",downloadUrl:e}))},J=function(e){var n=e.fileName,t=e.downloadUrl;["IOS_APP"].includes(h)&&B&&y.postMessage({action:"downloadBlobFile",fileName:n,url:t})},V=function(e){var n=e.downloadUrl,t=e.fileName,i=e.isBlob,o=e.mimeType,r=e.cookies,a=e.userAgent,s=e.openFileAfterDownload;["ANDROID_APP"].includes(h)&&"ANDROID_APP"===h&&R.downloadFile(JSON.stringify({url:n,fileName:t,isBlob:i,mimeType:o,cookies:r,userAgent:a,openFileAfterDownload:s}))},H=function(){return new Promise((function(e,n){M((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===h?R.getDeviceInfo():"IOS_APP"===h?y.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},x=function(){m&&R.showInAppReview()},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"isDeviceGPSEnabled"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.isLocationServiceEnabled())},G=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";C&&R.openShareIntent(t),B&&y.postMessage({action:"share",url:t})},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)throw"url is mandatory";C&&R.openUrlInBrowser(e)},j=function(e){C&&R.enableSwipeRefresh(e)},z=function(e){C&&R.clearWebViewCache(JSON.stringify({reload:e}))},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;C&&R.shareFile(e,n,t)},Q=function(){C&&R.closeApp(),B&&y.postMessage({action:"closeApp"})},Z=function(e){if(["ANDROID_APP"].includes(h)){var n=e.callback,t=e.showDate,i=e.showTime;M((function(e){"DATE_TIME_PICKER"===e.type&&n&&n(e)})),C&&R.pickDateTime(JSON.stringify({showDate:t,showTime:i}))}},Y=function(e){if(["ANDROID_APP"].includes(h)){var n=e.type,t=void 0===n?"url":n,i=e.url,o=void 0===i?"":i;C&&R.print(JSON.stringify({type:t,url:o}))}},$=function(e){["ANDROID_APP","IOS_APP"].includes(h)&&(C&&R.showOfferCard(JSON.stringify(e)),e.data&&(e.data=JSON.stringify(e.data)),B&&y.postMessage(e))},ee=function(e){["IOS_APP"].includes(h)&&(e.data&&(e.data=JSON.stringify(e.data)),B&&y.postMessage(e))},ne=function(){return new Promise((function(e,n){M((function(t){t?e(t):n({err:"Error getting request"})}),{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===h?R.firstCallWhenAppStarted():"IOS_APP"===h?y.postMessage({action:"firstCallWhenAppStarted"}):n("This function will work in Native App Powered By WebToNative")}))},te=function(){["ANDROID_APP"].includes(h)&&C&&R.forceUpdateCookies()},ie=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.permissionType;M((function(e){var t=e.type,i=e.typeValue;"showPermission"!==t&&"showPermission"!==i||n&&n(e)})),C&&R.showPermission(t),B&&y.postMessage({action:"showPermission",type:t})}},oe=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.active,t=void 0!==n&&n,i=e.iconName,o=void 0===i?null:i;C&&R.updateAppIcon(JSON.stringify({active:t,iconName:o})),B&&y.postMessage({action:"updateAppIcon",iconName:o,active:t})}},re={isAndroidApp:C,isIosApp:B,hideSplashScreen:W,statusBar:U,deviceInfo:H,showInAppReview:x,shareLink:G,platform:h,isNativeApp:m,isDeviceGPSEnabled:q,openUrlInBrowser:K,enablePullToRefresh:j,shareFile:X,clearAppCache:z,closeApp:Q,showDateTimePicker:Z,downloadBlobFile:J,customFileDownload:V,printFunction:Y,loadOfferCard:$,appFirstLoad:ne,addToSiri:ee,showPermission:ie,forceUpdateCookies:te,updateAppIcon:oe},ae=function(){return new Promise((function(e,n){M((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===h?R.getOneSignalId():"IOS_APP"===h?y.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},se=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===h)return m&&R.setExternalUserId(e);"IOS_APP"===h&&y.postMessage({action:"setExternalUserId",userId:e})},ce=function(){if("ANDROID_APP"===h)return m&&R.removeExternalUserId();"IOS_APP"===h&&y.postMessage({action:"removeExternalUserId"})},ue=function(e){var n=e.tags;if(n){if("ANDROID_APP"===h)return m&&R.setUserTags(JSON.stringify(n));"IOS_APP"===h&&y.postMessage({action:"setUserTags",tags:n})}},Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.value;"ANDROID_APP"===h?R.addTrigger(JSON.stringify({key:n,value:t})):"IOS_APP"===h&&y.postMessage({action:"addTrigger",key:n,value:t})},Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.triggers;"ANDROID_APP"===h?R.addTriggers(JSON.stringify({triggers:n})):"IOS_APP"===h&&y.postMessage({action:"addTriggers",triggers:n})},le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;"ANDROID_APP"===h?R.removeTriggerForKey(n):"IOS_APP"===h&&y.postMessage({action:"removeTrigger",key:n})},de=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.keys;"ANDROID_APP"===h?R.removeTriggersForKeys(JSON.stringify({keys:n})):"IOS_APP"===h&&y.postMessage({action:"removeTriggers",keys:n})},fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"getTriggerValue"===e.type&&t&&t(e)})),"ANDROID_APP"===h?R.getTriggerValueForKey(n):"IOS_APP"===h&&y.postMessage({action:"getTriggerValue",key:n}))},pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"getTriggers"===e.type&&n&&n(e)})),"ANDROID_APP"===h?R.getTriggers():"IOS_APP"===h&&y.postMessage({action:"getTriggers"}))},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.setEmail(n)},Oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.setSMSNumber(n)},De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.logoutEmail(n)},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.logoutSMSNumber(n)},_e=function(){"ANDROID_APP"===h?R.optInOneSignalPermissionDialog():"IOS_APP"===h&&y.postMessage({action:"optInOneSignalPermissionDialog"})},Se=function(){"ANDROID_APP"===h?R.optOutOneSignalPermissionDialog():"IOS_APP"===h&&y.postMessage({action:"optOutOneSignalPermissionDialog"})},Ne=void 0,ve=null,we={UNKNOWN:-1,ALL_FORMATS:0,CODE_128:1,CODE_39:2,CODE_93:4,CODABAR:8,DATA_MATRIX:16,EAN_13:32,EAN_8:64,ITF:128,QR_CODE:256,UPC_A:512,UPC_E:1024,PDF417:2048,AZTEC:4096},Re={UNKNOWN:0,CONTACT_INFO:1,EMAIL:2,ISBN:3,PHONE:4,PRODUCT:5,SMS:6,TEXT:7,URL:8,WIFI:9,GEO:10,CALENDAR_EVENT:11,DRIVER_LICENSE:12},ye=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.onBarcodeSearch,t=e.format;M((function(e){var t=e.type,i=e.value;"BARCODE_SCAN"===t&&n&&n(i)})),"ANDROID_APP"===h&&R.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===h&&y.postMessage({action:"barcodeScan",barcodeFormat:String(t||we.ALL_FORMATS)})}},he=void 0,me=null,Te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h))return"IOS_APP"===h&&y.postMessage({action:"showBannerAd",adId:e.adId||""}),"ANDROID_APP"===h&&R.showBannerAd(JSON.stringify(e)),he},be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.fullScreenAdCallback;return E((function(e){var n=e.status;me&&me(e),"adDismissed"===n&&(me=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&F()})),"IOS_APP"===h&&y.postMessage({action:"showFullScreenAd",adId:e.adId||""}),"ANDROID_APP"===h&&R.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(me=n),he}},ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.rewardsAdCallback;return E((function(e){var n=e.status;me&&me(e),"adDismissed"===n&&(me=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&F()})),"IOS_APP"===h&&y.postMessage({action:"showRewardAd",adId:e.adId||""}),"ANDROID_APP"===h&&R.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(me=n),he}},Me={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;M((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.loginWithFacebook(),"IOS_APP"===h&&y.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;M((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.logoutWithFacebook(),"IOS_APP"===h&&y.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;M((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.signInWithGoogle(),"IOS_APP"===h&&y.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;M((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.signOutWithGoogle(),"IOS_APP"===h&&y.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;M((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===h&&y.postMessage({action:"appleSignIn",scope:t})}}}},Ee=function(e){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.setAppsFlyerUserId(e),"IOS_APP"===h&&y.postMessage({action:"setAppsFlyerUserId",userId:e}))},Fe=function(e,n){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.addEventToAppsFlyer(e,JSON.stringify(n)),"IOS_APP"===h&&y.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},Ce=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.event,t=e.valueToSum,i=e.parameters;"ANDROID_APP"===h&&R.addFbEvents(n,i),"IOS_APP"===h&&y.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:i})}},Be=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.amount,t=e.currency,i=e.parameters;"ANDROID_APP"===h&&R.addFbPurchaseEvent(n,t,i),"IOS_APP"===h&&y.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:i})}},We=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.showHideStickyFooter(!1),"IOS_APP"===h&&y.postMessage({action:"showHideStickyFooter",show:!1}))},Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.showHideStickyFooter(!0),"IOS_APP"===h&&y.postMessage({action:"showHideStickyFooter",show:!0,key:n}))},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"contactPermissionStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.getPermissionStatus(),"IOS_APP"===h&&y.postMessage({action:"askUserForContactPermission"}))},Je=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"contactDetails"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.getAll(),"IOS_APP"===h&&y.postMessage({action:"getUserContactDetails"}))},Ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.data,t=e.callback,i=e.backgroundIndicator,o=void 0!==i&&i,r=e.pauseAutomatically,a=void 0===r||r,s=e.distanceFilter,c=void 0===s?0:s,u=e.desiredAccuracy,P=void 0===u?"best":u,A=e.activityType,l=void 0===A?"other":A,d=e.apiUrl,f=e.timeout;M((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===h&&y.postMessage({action:"startLocation",data:n,backgroundIndicator:o,pauseAutomatically:a,distanceFilter:c,desiredAccuracy:P,activityType:l,apiUrl:d,timeout:f}),"ANDROID_APP"===h&&R.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:d,displacement:c}))}},He=function(){["ANDROID_APP","IOS_APP"].includes(h)&&(delete T["LOCATION_UPDATE"],"IOS_APP"===h&&y.postMessage({action:"stopLocation"}),"ANDROID_APP"===h&&R.stopTrackingLocation())},xe=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&y.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===h&&R.keepScreenOn())},qe=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&y.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===h&&R.keepScreenNormal())},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===h&&y.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===h&&R.getText())},Ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&y.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===h&&R.setText(e.data||""))},je=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&y.postMessage({action:"showAppRating"}),"ANDROID_APP"===h&&R.showInAppReview())},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"checkBiometricStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.checkBiometricStatus(),"IOS_APP"===h&&y.postMessage({action:"checkBiometricStatus"}))},Xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.secret;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"saveBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.saveSecret(t),"IOS_APP"===h&&y.postMessage({action:"saveBiometricSecret",secret:t}))},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"deleteBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.deleteSecret(),"IOS_APP"===h&&y.postMessage({action:"deleteBiometricSecret"}))},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.prompt;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"showBiometric"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.callBiometric(t||"Authenticate to continue!"),"IOS_APP"===h&&y.postMessage({action:"showBiometric",prompt:t||""}))},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(h)&&(M((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===h&&y.postMessage({action:"requestTrackingAuthorization"}))},$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(h)&&(M((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===h&&y.postMessage({action:"trackingConsentStatus"}))},en=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.enabled;"IOS_APP"===h&&y.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===h&&R.setFirebaseAnalyticsCollection(n)}},nn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.userId;"IOS_APP"===h&&y.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===h&&R.setFirebaseUserId(n)}},tn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.key,t=e.value;"IOS_APP"===h&&y.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===h&&R.setFirebaseUserProp(n,t)}},on=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.parameters;"IOS_APP"===h&&y.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===h&&R.setFirebaseDefaultParam(n)}},rn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.eventName,t=e.parameters;"IOS_APP"===h&&y.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===h&&R.logFirebaseEvent(n,t)}},an=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.screenName,t=e.screenClass;"IOS_APP"===h&&y.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===h&&R.logFirebaseScreenView(n,t)}},sn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.toTopic;"IOS_APP"===h&&y.postMessage({action:"firebaseSubscribeToTopic",topic:n}),"ANDROID_APP"===h&&R.subscribeToTopic(n)}},cn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.fromTopic;"IOS_APP"===h&&y.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n}),"ANDROID_APP"===h&&R.unsubscribeFromTopic(n)}},un=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback;M((function(e){"getFCMToken"===e.type&&("ANDROID_APP"===h&&(e.token=e.fcm_registration_token),n&&n(e))})),"IOS_APP"===h&&y.postMessage({action:"getFCMToken"}),"ANDROID_APP"===h&&R.getRegistrationToken()}},Pn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(h)&&"IOS_APP"===h&&y.postMessage({action:"haptikEffect",effect:e.effect})},An=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,t=e.imageUrl,i=void 0===t?"https://images.freeimages.com/images/large-previews/3b2/prague-conference-center-1056491.jpg":t;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.playMedia(JSON.stringify({url:n,imageUrl:i}))},ln=function(){["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.pausePlaying()},dn=function(){["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.stopPlaying()},fn=function(e){if(["ANDROID_APP"].includes(h)){var n=e.printSize,t=void 0===n?"ISO_A4":n,i=e.label,o=void 0===i?"":i;"ANDROID_APP"===h&&R.setPrintSize(JSON.stringify({printSize:t,label:o}))}},pn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(M((function(e){"checkNotificationPermission"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.checkNotificationPermission(),"IOS_APP"===h&&y.postMessage({action:"checkNotificationPermission"}))},In=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.openAppNotificationPage(),"IOS_APP"===h&&y.postMessage({action:"openAppNotificationPage"}))},On=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP"].includes(h)&&(M((function(e){"startBluetoothScan"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.startBluetoothScan())},Dn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address,i=e.timeout,o=void 0===i?10:i;["ANDROID_APP"].includes(h)&&(M((function(e){"pairWithDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.pairWithDevice(JSON.stringify({address:t,timeout:o})))},gn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address;["ANDROID_APP"].includes(h)&&(M((function(e){"unpairDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.unpairDevice(JSON.stringify({address:t})))};window.WTN=n,window.WTN.OneSignal=t,window.WTN.VoiceSearch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.onVoiceSearch;return M((function(e){var n=e.type,t=e.results;"VOICE_SEARCH_RESULT"===n&&(ve&&ve(t),ve=null)})),m&&R.openVoiceSearch(),"function"==typeof n&&(ve=n),Ne},window.WTN.Barcode=i,window.WTN.AdMob=o,window.WTN.socialLogin=Me,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.productId,i=e.productType,o=e.isConsumable,r=void 0!==o&&o;M((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===h&&y.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===h&&R.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:i,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(h)){var n=e.callback;M((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.getAllPurchases({action:"purchaseList"})}},window.WTN.getReceiptData=function(e){if(["IOS_APP"].includes(h)){var n=e.callback;M((function(e){"getReceiptData"===e.type&&n&&n(e)})),"IOS_APP"===h&&y.postMessage({action:"getReceiptData"})}},window.WTN.appsflyer=r,window.WTN.bottomNavigation=s,window.WTN.contacts=c,window.WTN.screen=P,window.WTN.backgroundLocation=u,window.WTN.clipboard=A,window.WTN.appReview=l,window.WTN.Biometric=d,window.WTN.ATTConsent=f,window.WTN.facebook={events:a},window.WTN.firebaseAnalytics=I,window.WTN.haptics=g,window.WTN.Firebase=D,window.WTN.MediaPlayer=_,window.WTN.Printing=S,window.WTN.Notification=N,window.WTN.Bluetooth=v,window&&window.WebToNativeInterface&&window.WebToNativeInterface.getAndroidVersion?window.navigator.share=function(e){return new Promise((function(n,t){window.WebToNativeInterface.openShareIntent(e.url),n()}))}:WTN.isIosApp&&(window.navigator.share=function(e){return new Promise((function(n,t){y.postMessage({action:"share",url:e.url}),n()}))})}();
1
+ !function(){"use strict";var e={d:function(n,t){for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{addToSiri:function(){return te},appFirstLoad:function(){return ie},checkPermission:function(){return Ae},clearAppCache:function(){return X},closeApp:function(){return Z},customFileDownload:function(){return H},default:function(){return de},deviceInfo:function(){return x},disableScreenshot:function(){return ce},downloadBlobFile:function(){return V},downloadFile:function(){return J},enablePullToRefresh:function(){return z},forceUpdateCookies:function(){return oe},getAddOnStatus:function(){return Pe},getSafeArea:function(){return ue},hideSplashScreen:function(){return U},isAndroidApp:function(){return W},isDeviceGPSEnabled:function(){return K},isIosApp:function(){return B},isNativeApp:function(){return T},loadOfferCard:function(){return ne},nfcSupported:function(){return ee},openAppSettingForPermission:function(){return re},openUrlInBrowser:function(){return j},platform:function(){return h},printFunction:function(){return $},setOrientation:function(){return le},shareFile:function(){return Q},shareLink:function(){return G},showDateTimePicker:function(){return Y},showInAppReview:function(){return q},showPermission:function(){return ae},statusBar:function(){return L},updateAppIcon:function(){return se}});var t={};e.r(t),e.d(t,{addTrigger:function(){return Ie},addTriggers:function(){return De},getPlayerId:function(){return fe},getTriggerValue:function(){return Ne},getTriggers:function(){return ve},logoutEmail:function(){return Re},logoutSMSNumber:function(){return we},optInUser:function(){return he},optOutUser:function(){return Te},removeExternalUserId:function(){return Oe},removeTrigger:function(){return Se},removeTriggers:function(){return _e},setEmail:function(){return me},setExternalUserId:function(){return pe},setSMSNumber:function(){return ye},setTags:function(){return ge}});var i={};e.r(i),e.d(i,{BarcodeScan:function(){return Ee},Format:function(){return Me},Types:function(){return Fe}});var o={};e.r(o),e.d(o,{bannerAd:function(){return Be},fullScreenAd:function(){return Ue},rewardsAd:function(){return Le}});var r={};e.r(r),e.d(r,{logEvent:function(){return He},setCustomerUserId:function(){return Ve}});var a={};e.r(a),e.d(a,{send:function(){return xe},sendPurchase:function(){return qe}});var s={};e.r(s),e.d(s,{hide:function(){return Ke},show:function(){return Ge}});var c={};e.r(c),e.d(c,{getAll:function(){return ze},getPermissionStatus:function(){return je}});var u={};e.r(u),e.d(u,{start:function(){return Xe},stop:function(){return Qe}});var P={};e.r(P),e.d(P,{keepScreenNormal:function(){return Ye},keepScreenOn:function(){return Ze}});var A={};e.r(A),e.d(A,{get:function(){return $e},set:function(){return en}});var l={};e.r(l),e.d(l,{prompt:function(){return nn}});var d={};e.r(d),e.d(d,{checkStatus:function(){return tn},deleteSecret:function(){return rn},saveSecret:function(){return on},show:function(){return an}});var f={};e.r(f),e.d(f,{request:function(){return sn},status:function(){return cn}});var p={};e.r(p),e.d(p,{logEvent:function(){return dn},logScreen:function(){return fn},setCollection:function(){return un},setDefaultEventParameters:function(){return ln},setUserId:function(){return Pn},setUserProperty:function(){return An}});var O={};e.r(O),e.d(O,{events:function(){return p}});var g={};e.r(g),e.d(g,{getFCMToken:function(){return gn},subscribe:function(){return pn},unsubscribe:function(){return On}});var I={};e.r(I),e.d(I,{Analytics:function(){return p},Messaging:function(){return g}});var D={};e.r(D),e.d(D,{trigger:function(){return In}});var S={};e.r(S),e.d(S,{pauseMedia:function(){return Sn},playMedia:function(){return Dn},stopMedia:function(){return _n}});var _={};e.r(_),e.d(_,{setPrintSize:function(){return Nn}});var N={};e.r(N),e.d(N,{checkNotificationPermission:function(){return vn},openAppNotificationPage:function(){return mn}});var v={};e.r(v),e.d(v,{pairDevice:function(){return Rn},startBluetoothScan:function(){return yn},unpairDevice:function(){return wn}});var m={};e.r(m),e.d(m,{makePayment:function(){return hn}});var y="undefined"!=typeof window,R=y&&window.WebToNativeInterface||{},w=y&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.webToNativeInterface,h=R.getAndroidVersion?"ANDROID_APP":w?"IOS_APP":"WEBSITE",T=y&&"WEBSITE"!==h,b={},k=1,M=null;T&&(R.androidCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in n.type,b){var i=b[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete b[t]):(o(n),a||delete b[t])}},window.iOSAdMobCBHook=R.androidAdMobCBHook=function(e){var n=JSON.parse(e);M&&M(n)},window.iosCBHook=function(e){var n=e;try{n=JSON.parse(e)}catch(e){console.log(e)}for(var t in b){var i=b[t],o=i.cb,r=i.ignoreDelete,a=void 0!==r&&r;n&&n.reqType?t==n.reqType&&(o(n),a||delete b[t]):(o(n),a||delete b[t])}});var F=function(e,n){"function"==typeof e&&(n&&n.key?b[n.key]={cb:e,ignoreDelete:!!n.ignoreDelete}:(b[k]={cb:e,ignoreDelete:!(!n||!n.ignoreDelete)},k+=1))},E=function(e){"function"==typeof e&&(M=e)},C=function(){M&&(M=null)},W="ANDROID_APP"===h,B="IOS_APP"===h,U=function(){T&&R.hideSplashScreen()},L=function(e){T&&(W?R.statusBar(JSON.stringify(e)):B&&w.postMessage({action:"statusBar",color:e.color,style:e.style}))},J=function(e){T&&(W||B&&w.postMessage({action:"downloadFile",downloadUrl:e}))},V=function(e){var n=e.fileName,t=e.downloadUrl;["IOS_APP"].includes(h)&&B&&w.postMessage({action:"downloadBlobFile",fileName:n,url:t})},H=function(e){var n=e.downloadUrl,t=e.fileName,i=e.isBlob,o=e.mimeType,r=e.cookies,a=e.userAgent,s=e.openFileAfterDownload;["ANDROID_APP"].includes(h)&&"ANDROID_APP"===h&&R.downloadFile(JSON.stringify({url:n,fileName:t,isBlob:i,mimeType:o,cookies:r,userAgent:a,openFileAfterDownload:s}))},x=function(){return new Promise((function(e,n){F((function(t){t?e(t):n({err:"Error getting device info"})}),{key:"deviceInfo"}),"ANDROID_APP"===h?R.getDeviceInfo():"IOS_APP"===h?w.postMessage({action:"deviceInfo"}):n("This function will work in Native App Powered By WebToNative")}))},q=function(){T&&R.showInAppReview()},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"isDeviceGPSEnabled"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.isLocationServiceEnabled())},G=function(e){var n=e.url,t=void 0===n?"":n;if(!t)throw"url is mandatory";W&&R.openShareIntent(t),B&&w.postMessage({action:"share",url:t})},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)throw"url is mandatory";W&&R.openUrlInBrowser(e)},z=function(e){W&&R.enableSwipeRefresh(e)},X=function(e){W&&R.clearWebViewCache(JSON.stringify({reload:e}))},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;W&&R.shareFile(e,n,t)},Z=function(){W&&R.closeApp(),B&&w.postMessage({action:"closeApp"})},Y=function(e){if(["ANDROID_APP"].includes(h)){var n=e.callback,t=e.showDate,i=e.showTime;F((function(e){"DATE_TIME_PICKER"===e.type&&n&&n(e)})),W&&R.pickDateTime(JSON.stringify({showDate:t,showTime:i}))}},$=function(e){if(["ANDROID_APP"].includes(h)){var n=e.type,t=void 0===n?"url":n,i=e.url,o=void 0===i?"":i;W&&R.print(JSON.stringify({type:t,url:o}))}},ee=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback;F((function(e){"nfcSupported"===e.type&&n&&n(e)})),W&&R.nfcSupported(),B&&w.postMessage({action:"nfcSupported"})}},ne=function(e){["ANDROID_APP","IOS_APP"].includes(h)&&(W&&R.showOfferCard(JSON.stringify(e)),e.data&&(e.data=JSON.stringify(e.data)),B&&w.postMessage(e))},te=function(e){["IOS_APP"].includes(h)&&(e.data&&(e.data=JSON.stringify(e.data)),B&&w.postMessage(e))},ie=function(){return new Promise((function(e,n){F((function(t){"firstCallWhenAppStarted"===t.type&&(t?e(t):n({err:"Error getting request"}))}),{key:"firstCallWhenAppStarted"}),"ANDROID_APP"===h?R.firstCallWhenAppStarted():"IOS_APP"===h?w.postMessage({action:"firstCallWhenAppStarted"}):n("This function will work in Native App Powered By WebToNative")}))},oe=function(){["ANDROID_APP"].includes(h)&&W&&R.forceUpdateCookies()},re=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.values;F((function(e){var t=e.type;e.typeValue,"openAppSettingForPermission"===t&&n&&n(e)})),W&&R.openAppSettingForPermission(t),B&&w.postMessage({action:"openAppSettingForPermission",values:t})}},ae=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.permission,i=e.openAppSetting,o=void 0!==i&&i,r=e.alertDialogStyle;F((function(e){var t=e.type,i=e.typeValue;"showPermission"!==t&&"showPermission"!==i||n&&n(e)})),W&&R.showPermission(JSON.stringify({permission:t,openAppSetting:o,alertDialogStyle:r})),B&&w.postMessage({action:"showPermission",permission:t,openAppSetting:o,alertDialogStyle:r})}},se=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.active,t=void 0!==n&&n,i=e.iconName,o=void 0===i?null:i;W&&R.updateAppIcon(JSON.stringify({active:t,iconName:o})),B&&w.postMessage({action:"updateAppIcon",iconName:o,active:t})}},ce=function(e){if(["IOS_APP"].includes(h)){var n=e.ssKey,t=void 0!==n&&n;B&&w.postMessage({action:"disableScreenshotForPage",ssKey:t})}},ue=function(e){if(["IOS_APP"].includes(h)){var n=e.callback;F((function(e){"getSafeArea"===e.type&&n&&n(e)})),B&&w.postMessage({action:"getSafeArea"})}},Pe=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.addOnName;F((function(e){"getAddOnStatus"===e.type&&n&&n(e)})),W&&R.getAddOnStatus(JSON.stringify({addOnName:t})),B&&w.postMessage({action:"getAddOnStatus",addOnName:t})}},Ae=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.permissionName;F((function(e){"checkPermission"===e.type&&n&&n(e)})),W&&R.checkPermission(JSON.stringify(t)),B&&w.postMessage({action:"checkPermission",permissionName:t})}},le=function(e){if(["ANDROID_APP"].includes(h)){var n=e.orientation,t=e.forceOrientation,i=void 0!==t&&t;W&&R.setOrientation(JSON.stringify({orientation:n,forceOrientation:i}))}},de={isAndroidApp:W,isIosApp:B,hideSplashScreen:U,statusBar:L,deviceInfo:x,showInAppReview:q,shareLink:G,platform:h,isNativeApp:T,isDeviceGPSEnabled:K,openUrlInBrowser:j,enablePullToRefresh:z,shareFile:Q,clearAppCache:X,closeApp:Z,showDateTimePicker:Y,downloadBlobFile:V,customFileDownload:H,printFunction:$,loadOfferCard:ne,appFirstLoad:ie,addToSiri:te,showPermission:ae,forceUpdateCookies:oe,updateAppIcon:se,disableScreenshot:ce,getSafeArea:ue,getAddOnStatus:Pe,setOrientation:le,checkPermission:Ae,openAppSettingForPermission:re},fe=function(){return new Promise((function(e,n){F((function(t){t.isSuccess?e(t.playerId):n(t)}),{key:"getPlayerId"}),"ANDROID_APP"===h?R.getOneSignalId():"IOS_APP"===h?w.postMessage({action:"getPlayerId"}):n("This function will work in Native App Powered By WebToNative")}))},pe=function(e){if(!e)throw"userId is required";if("ANDROID_APP"===h)return T&&R.setExternalUserId(e);"IOS_APP"===h&&w.postMessage({action:"setExternalUserId",userId:e})},Oe=function(){if("ANDROID_APP"===h)return T&&R.removeExternalUserId();"IOS_APP"===h&&w.postMessage({action:"removeExternalUserId"})},ge=function(e){var n=e.tags;if(n){if("ANDROID_APP"===h)return T&&R.setUserTags(JSON.stringify(n));"IOS_APP"===h&&w.postMessage({action:"setUserTags",tags:n})}},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.value;"ANDROID_APP"===h?R.addTrigger(JSON.stringify({key:n,value:t})):"IOS_APP"===h&&w.postMessage({action:"addTrigger",key:n,value:t})},De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.triggers;"ANDROID_APP"===h?R.addTriggers(JSON.stringify({triggers:n})):"IOS_APP"===h&&w.postMessage({action:"addTriggers",triggers:n})},Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;"ANDROID_APP"===h?R.removeTriggerForKey(n):"IOS_APP"===h&&w.postMessage({action:"removeTrigger",key:n})},_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.keys;"ANDROID_APP"===h?R.removeTriggersForKeys(JSON.stringify({keys:n})):"IOS_APP"===h&&w.postMessage({action:"removeTriggers",keys:n})},Ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key,t=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"getTriggerValue"===e.type&&t&&t(e)})),"ANDROID_APP"===h?R.getTriggerValueForKey(n):"IOS_APP"===h&&w.postMessage({action:"getTriggerValue",key:n}))},ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"getTriggers"===e.type&&n&&n(e)})),"ANDROID_APP"===h?R.getTriggers():"IOS_APP"===h&&w.postMessage({action:"getTriggers"}))},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.setEmail(n)},ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.setSMSNumber(n)},Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.emailId;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.logoutEmail(n)},we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.smsNumber;["ANDROID_APP","IOS_APP"].includes(h)&&"ANDROID_APP"===h&&R.logoutSMSNumber(n)},he=function(){"ANDROID_APP"===h?R.optInOneSignalPermissionDialog():"IOS_APP"===h&&w.postMessage({action:"optInOneSignalPermissionDialog"})},Te=function(){"ANDROID_APP"===h?R.optOutOneSignalPermissionDialog():"IOS_APP"===h&&w.postMessage({action:"optOutOneSignalPermissionDialog"})},be=void 0,ke=null,Me={UNKNOWN:-1,ALL_FORMATS:0,CODE_128:1,CODE_39:2,CODE_93:4,CODABAR:8,DATA_MATRIX:16,EAN_13:32,EAN_8:64,ITF:128,QR_CODE:256,UPC_A:512,UPC_E:1024,PDF417:2048,AZTEC:4096},Fe={UNKNOWN:0,CONTACT_INFO:1,EMAIL:2,ISBN:3,PHONE:4,PRODUCT:5,SMS:6,TEXT:7,URL:8,WIFI:9,GEO:10,CALENDAR_EVENT:11,DRIVER_LICENSE:12},Ee=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.onBarcodeSearch,t=e.format;F((function(e){var t=e.type,i=e.value;"BARCODE_SCAN"===t&&n&&n(i)})),"ANDROID_APP"===h&&R.startScanner(JSON.stringify({formats:t?[t]:[]})),"IOS_APP"===h&&w.postMessage({action:"barcodeScan",barcodeFormat:String(t||Me.ALL_FORMATS)})}},Ce=void 0,We=null,Be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h))return"IOS_APP"===h&&w.postMessage({action:"showBannerAd",adId:e.adId||""}),"ANDROID_APP"===h&&R.showBannerAd(JSON.stringify(e)),Ce},Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.fullScreenAdCallback;return E((function(e){var n=e.status;We&&We(e),"adDismissed"===n&&(We=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&C()})),"IOS_APP"===h&&w.postMessage({action:"showFullScreenAd",adId:e.adId||""}),"ANDROID_APP"===h&&R.showFullScreenAd(JSON.stringify(e)),"function"==typeof n&&(We=n),Ce}},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.rewardsAdCallback;return E((function(e){var n=e.status;We&&We(e),"adDismissed"===n&&(We=null),["adDismissed","adLoadError","adError"].indexOf(n)>-1&&C()})),"IOS_APP"===h&&w.postMessage({action:"showRewardAd",adId:e.adId||""}),"ANDROID_APP"===h&&R.showRewardsAd(JSON.stringify(e)),"function"==typeof n&&(We=n),Ce}},Je={facebook:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"fbLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.loginWithFacebook(),"IOS_APP"===h&&w.postMessage({action:"fbSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"fbLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.logoutWithFacebook(),"IOS_APP"===h&&w.postMessage({action:"fbSignOut",scope:t})}}},google:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"googleLoginToken"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.signInWithGoogle(),"IOS_APP"===h&&w.postMessage({action:"googleSignIn",scope:t})}},logout:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"googleLogOut"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.signOutWithGoogle(),"IOS_APP"===h&&w.postMessage({action:"googleSignOut",scope:t})}}},apple:{login:function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.scope;F((function(e){"appleLoginToken"===e.type&&n&&n(e)})),"IOS_APP"===h&&w.postMessage({action:"appleSignIn",scope:t})}}}},Ve=function(e){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.setAppsFlyerUserId(e),"IOS_APP"===h&&w.postMessage({action:"setAppsFlyerUserId",userId:e}))},He=function(e,n){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.addEventToAppsFlyer(e,JSON.stringify(n)),"IOS_APP"===h&&w.postMessage({action:"addEventToAppsFlyer",eventName:e,eventValues:n}))},xe=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.event,t=e.valueToSum,i=e.parameters;"ANDROID_APP"===h&&R.addFbEvents(n,i),"IOS_APP"===h&&w.postMessage({action:"sendFBEvent",eventName:n,valueToSum:t,parameters:i})}},qe=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.amount,t=e.currency,i=e.parameters;"ANDROID_APP"===h&&R.addFbPurchaseEvent(n,t,i),"IOS_APP"===h&&w.postMessage({action:"sendFBPurchaseEvent",currency:t,amount:n,parameters:i})}},Ke=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.showHideStickyFooter(!1),"IOS_APP"===h&&w.postMessage({action:"showHideStickyFooter",show:!1}))},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.key;["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.showHideStickyFooter(!0),"IOS_APP"===h&&w.postMessage({action:"showHideStickyFooter",show:!0,key:n}))},je=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"contactPermissionStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.getPermissionStatus(),"IOS_APP"===h&&w.postMessage({action:"askUserForContactPermission"}))},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"contactDetails"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.getAll(),"IOS_APP"===h&&w.postMessage({action:"getUserContactDetails"}))},Xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.data,t=e.callback,i=e.backgroundIndicator,o=void 0!==i&&i,r=e.pauseAutomatically,a=void 0===r||r,s=e.distanceFilter,c=void 0===s?0:s,u=e.desiredAccuracy,P=void 0===u?"best":u,A=e.activityType,l=void 0===A?"other":A,d=e.apiUrl,f=e.timeout;F((function(e){"LOCATION_UPDATE"===e.type&&t&&t(e)}),{key:"LOCATION_UPDATE",ignoreDelete:!0}),"IOS_APP"===h&&w.postMessage({action:"startLocation",data:n,backgroundIndicator:o,pauseAutomatically:a,distanceFilter:c,desiredAccuracy:P,activityType:l,apiUrl:d,timeout:f}),"ANDROID_APP"===h&&R.startTrackingLocation(JSON.stringify({action:"startLocation",data:n,interval:f,callback:t,apiUrl:d,displacement:c}))}},Qe=function(){["ANDROID_APP","IOS_APP"].includes(h)&&(delete b["LOCATION_UPDATE"],"IOS_APP"===h&&w.postMessage({action:"stopLocation"}),"ANDROID_APP"===h&&R.stopTrackingLocation())},Ze=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&w.postMessage({action:"keepScreenOn",flag:!0}),"ANDROID_APP"===h&&R.keepScreenOn())},Ye=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&w.postMessage({action:"keepScreenOn",flag:!1}),"ANDROID_APP"===h&&R.keepScreenNormal())},$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"CLIPBOARD_CONTENT"===e.type&&n&&n(e)})),"IOS_APP"===h&&w.postMessage({action:"getClipBoardData"}),"ANDROID_APP"===h&&R.getText())},en=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&w.postMessage({action:"setClipBoardData",text:e.data||""}),"ANDROID_APP"===h&&R.setText(e.data||""))},nn=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("IOS_APP"===h&&w.postMessage({action:"showAppRating"}),"ANDROID_APP"===h&&R.showInAppReview())},tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"checkBiometricStatus"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.checkBiometricStatus(),"IOS_APP"===h&&w.postMessage({action:"checkBiometricStatus"}))},on=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.secret;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"saveBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.saveSecret(t),"IOS_APP"===h&&w.postMessage({action:"saveBiometricSecret",secret:t}))},rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"deleteBiometricSecret"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.deleteSecret(),"IOS_APP"===h&&w.postMessage({action:"deleteBiometricSecret"}))},an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.prompt;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"showBiometric"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.callBiometric(t||"Authenticate to continue!"),"IOS_APP"===h&&w.postMessage({action:"showBiometric",prompt:t||""}))},sn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(h)&&(F((function(e){"requestTrackingConsent"===e.type&&n&&n(e)})),"IOS_APP"===h&&w.postMessage({action:"requestTrackingAuthorization"}))},cn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["IOS_APP"].includes(h)&&(F((function(e){"trackingConsentStatus"===e.type&&n&&n(e)})),"IOS_APP"===h&&w.postMessage({action:"trackingConsentStatus"}))},un=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.enabled;"IOS_APP"===h&&w.postMessage({action:"setFirebaseAnalyticsCollection",enabled:n}),"ANDROID_APP"===h&&R.setFirebaseAnalyticsCollection(n)}},Pn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.userId;"IOS_APP"===h&&w.postMessage({action:"setFirebaseUserId",userId:n}),"ANDROID_APP"===h&&R.setFirebaseUserId(n)}},An=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.key,t=e.value;"IOS_APP"===h&&w.postMessage({action:"setFirebaseUserProp",key:n,value:t}),"ANDROID_APP"===h&&R.setFirebaseUserProp(n,t)}},ln=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.parameters;"IOS_APP"===h&&w.postMessage({action:"setFirebaseDefaultParam",parameters:n}),"ANDROID_APP"===h&&R.setFirebaseDefaultParam(n)}},dn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.eventName,t=e.parameters;"IOS_APP"===h&&w.postMessage({action:"logFirebaseEvent",eventName:n,parameters:t}),"ANDROID_APP"===h&&R.logFirebaseEvent(n,t)}},fn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.screenName,t=e.screenClass;"IOS_APP"===h&&w.postMessage({action:"logFirebaseScreenView",screenName:n,screenClass:t}),"ANDROID_APP"===h&&R.logFirebaseScreenView(n,t)}},pn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.toTopic;"IOS_APP"===h&&w.postMessage({action:"firebaseSubscribeToTopic",topic:n}),"ANDROID_APP"===h&&R.subscribeToTopic(n)}},On=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.fromTopic;"IOS_APP"===h&&w.postMessage({action:"firebaseUnsubscribeFromTopic",topic:n}),"ANDROID_APP"===h&&R.unsubscribeFromTopic(n)}},gn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback;F((function(e){"getFCMToken"===e.type&&("ANDROID_APP"===h&&(e.token=e.fcm_registration_token),n&&n(e))})),"IOS_APP"===h&&w.postMessage({action:"getFCMToken"}),"ANDROID_APP"===h&&R.getRegistrationToken()}},In=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};["ANDROID_APP","IOS_APP"].includes(h)&&"IOS_APP"===h&&w.postMessage({action:"haptikEffect",effect:e.effect})},Dn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,t=e.imageUrl,i=void 0===t?"https://images.freeimages.com/images/large-previews/3b2/prague-conference-center-1056491.jpg":t;["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.playMedia(JSON.stringify({url:n,imageUrl:i})),"IOS_APP"===h&&w.postMessage({action:"playMedia",url:n,image:i}))},Sn=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.pausePlaying(),"IOS_APP"===h&&w.postMessage({action:"pauseMedia"}))},_n=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.stopPlaying(),"IOS_APP"===h&&w.postMessage({action:"stopMedia"}))},Nn=function(e){if(["ANDROID_APP"].includes(h)){var n=e.printSize,t=void 0===n?"ISO_A4":n,i=e.label,o=void 0===i?"":i;"ANDROID_APP"===h&&R.setPrintSize(JSON.stringify({printSize:t,label:o}))}},vn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP","IOS_APP"].includes(h)&&(F((function(e){"checkNotificationPermission"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.checkNotificationPermission(),"IOS_APP"===h&&w.postMessage({action:"checkNotificationPermission"}))},mn=function(){["ANDROID_APP","IOS_APP"].includes(h)&&("ANDROID_APP"===h&&R.openAppNotificationPage(),"IOS_APP"===h&&w.postMessage({action:"openAppNotificationPage"}))},yn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback;["ANDROID_APP"].includes(h)&&(F((function(e){"startBluetoothScan"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.startBluetoothScan())},Rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address,i=e.timeout,o=void 0===i?10:i;["ANDROID_APP"].includes(h)&&(F((function(e){"pairWithDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.pairWithDevice(JSON.stringify({address:t,timeout:o})))},wn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.callback,t=e.address;["ANDROID_APP"].includes(h)&&(F((function(e){"unpairDevice"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.unpairDevice(JSON.stringify({address:t})))},hn=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.apiUrl,i=e.amount,o=e.currency,r=e.isSimulated,a=void 0!==r&&r,s=e.captureMethod,c=void 0===s?"automatic":s;F((function(e){"makeTapToPayStripePayment"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.makeTapToPayStripePayment(JSON.stringify({apiUrl:t,amount:i,currency:o,isSimulated:a,captureMethod:c})),"IOS_APP"===h&&w.postMessage({action:"makeTapToPayStripePayment",apiUrl:t,amount:i,currency:o,isSimulated:a,captureMethod:c})}};window.WTN=n,window.WTN.OneSignal=t,window.WTN.VoiceSearch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.onVoiceSearch;return F((function(e){var n=e.type,t=e.results;"VOICE_SEARCH_RESULT"===n&&(ke&&ke(t),ke=null)})),T&&R.openVoiceSearch(),"function"==typeof n&&(ke=n),be},window.WTN.Barcode=i,window.WTN.AdMob=o,window.WTN.socialLogin=Je,window.WTN.inAppPurchase=function(e){if(["ANDROID_APP","IOS_APP"].includes(h)){var n=e.callback,t=e.productId,i=e.productType,o=e.isConsumable,r=void 0!==o&&o;F((function(e){"inAppPurchase"===e.type&&n&&n(e)})),"IOS_APP"===h&&w.postMessage({action:"inAppPurchase",productId:t}),"ANDROID_APP"===h&&R.inAppPurchase(JSON.stringify({action:"inAppPurchase",productId:t,productType:i,isConsumable:r}))}},window.WTN.getAllPurchases=function(e){if(["ANDROID_APP"].includes(h)){var n=e.callback;F((function(e){"purchaseList"===e.type&&n&&n(e)})),"ANDROID_APP"===h&&R.getAllPurchases({action:"purchaseList"})}},window.WTN.getReceiptData=function(e){if(["IOS_APP"].includes(h)){var n=e.callback;F((function(e){"getReceiptData"===e.type&&n&&n(e)})),"IOS_APP"===h&&w.postMessage({action:"getReceiptData"})}},window.WTN.appsflyer=r,window.WTN.bottomNavigation=s,window.WTN.contacts=c,window.WTN.screen=P,window.WTN.backgroundLocation=u,window.WTN.clipboard=A,window.WTN.appReview=l,window.WTN.Biometric=d,window.WTN.ATTConsent=f,window.WTN.facebook={events:a},window.WTN.firebaseAnalytics=O,window.WTN.haptics=D,window.WTN.Firebase=I,window.WTN.MediaPlayer=S,window.WTN.Printing=_,window.WTN.Notification=N,window.WTN.Bluetooth=v,window.WTN.Stripe=m,window&&window.WebToNativeInterface&&window.WebToNativeInterface.getAndroidVersion?window.navigator.share=function(e){return new Promise((function(n,t){window.WebToNativeInterface.openShareIntent(e.url),n()}))}:WTN.isIosApp&&(window.navigator.share=function(e){return new Promise((function(n,t){w.postMessage({action:"share",url:e.url}),n()}))})}();