median-js-bridge 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "npm" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
package/dist/index.d.ts CHANGED
@@ -1438,6 +1438,7 @@ declare class Median {
1438
1438
  };
1439
1439
  permissions: {
1440
1440
  requestPhoneCallMgmt: (params: import("./types").CallbackParams) => Promise<any> | undefined;
1441
+ status: (permissions?: ("Notifications" | "Camera" | "Contacts" | "Microphone" | "LocationWhenInUse" | "LocationAlways" | "AppTrackingTransparency" | "PhotoLibrary")[] | undefined) => Promise<Record<string, "denied" | "granted" | "undetermined">>;
1441
1442
  };
1442
1443
  plaid: {
1443
1444
  linkBank: (params: import("./types").CallbackParams<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,OAAO,EAAO,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,cAAM,MAAM;;IA+CV,GAAG;;;;;;;;;;;;;;;;;;;;;;;MAAO;IACV,OAAO;;;;;;;;;;;;;MAAW;IAClB,SAAS;;;;;;;;;MAAqB;IAC9B,MAAM;;;;MAAkB;IACxB,YAAY;;;;;;;;;;;;;;;;MAAwB;IACpC,UAAU,gGAAsB;IAChC,gBAAgB;;;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AGZ,MAAM;MAuH2D;IAClG,WAAW;gDA3H8B,IAAI;qCAGZ,MAAM;MAwHwB;IAC/D,YAAY;sEA5H6B,IAAI;qCAGZ,MAAM;MAyHmD;IAC1F,YAAY;+CA7H6B,IAAI;qCAGZ,MAAM;MA0HmC;IAC1E,mBAAmB;+CA9HsB,IAAI;qCAGZ,MAAM;MA2HkD;IACzF,UAAU;0DA/H+B,IAAI;qCAGZ,MAAM;MA4HuC;IAE9E,YAAY;;;qBAC2B,MAAM;kBAlIJ,IAAI;yCAGZ,MAAM;;MAgIrC;CACH;;AAED,wBAA4B"}
@@ -1 +1 @@
1
- var Median=function(){"use strict";function e(e="_median_temp_"){return e+Math.random().toString(36).slice(2)}function n(n,t){if("string"==typeof n)return n;const i=e();return window[i]=function(...e){n(...e),t||delete window[i]},i}function t(e,t,i){let a=e;t&&(a={},t.callback&&"function"==typeof t.callback&&(t.callback=n(t.callback,i)),t.callbackFunction&&"function"==typeof t.callbackFunction&&(t.callbackFunction=n(t.callbackFunction,i)),t.statuscallback&&"function"==typeof t.statuscallback&&(t.statuscallback=n(t.statuscallback,i)),a.medianCommand=e,a.data=t),window?.JSBridge?.postMessage&&window.JSBridge.postMessage("string"==typeof a?a:JSON.stringify(a)),window?.webkit?.messageHandlers?.JSBridge?.postMessage&&window.webkit.messageHandlers.JSBridge.postMessage(a)}function i(n,i,a){if(i?.callback||i?.callbackFunction||i?.statuscallback)return t(n,i,a);{const a=e();return i||(i={}),i.callback=a,new Promise((function(e,o){window[a]=function(n){n&&"object"==typeof n&&"error"in n&&"string"==typeof n.error?o(n):e(n),delete window[a]},t(n,i)}))}}function a(e,n){window[e]=function(...e){Object.keys(n).forEach((t=>{const i=n[t];"function"==typeof i&&i(...e)}))}}function o(e,n){return t(n?"median://events/subscribe":"median://events/unsubscribe",{eventName:e})}const r={initialize:function(e){t("median://adjust/initialize",e)},trackEvent:function(e){t("median://adjust/trackEvent",{token:e.token,revenue:e.revenue,currency:e.currency})},attributionInfo:function(){return i("median://adjust/attributionInfo")},updateSkanConversionValue:function(e){return i("median://adjust/updateSkanConversionValue",e)}},s={showInterstitialIfReady:function(){t("median://admob/showInterstitialIfReady")},showInterstitialOnNextPageLoadIfReady:function(){t("median://admob/showInterstitialOnNextPageLoadIfReady")},banner:{enable:function(){t("median://admob/banner/enable")},disable:function(){t("median://admob/banner/disable")}},request:{tracking:function(e){return i("median://admob/request/tracking",e)}}},c={prompt:function(e){if(e)return i("median://appReview/prompt",e);t("median://appReview/prompt")}},u={logEvent:function(e,n){t("median://appsflyer/logEvent",{eventName:e,eventValues:n})},setCustomerUserId:function(e){t("median://appsflyer/setCustomerUserId",{userId:e})}},d={status:function(e){return i("median://auth/status",e)},save:function(e){return"string"!=typeof e.secret&&(e.secret=JSON.stringify(e.secret)),i("median://auth/save",e)},get:function(e){return i("median://auth/get",e)},delete:function(e){return i("median://auth/delete",e)}},l={login:function(e){return i("median://auth0/login",e)},logout:function(e){return i("median://auth0/logout",e)},status:function(e){return i("median://auth0/status",e)},profile:function(e){return i("median://auth0/profile",e)},getCredentials:function(e){return i("median://auth0/getCredentials",e)},renew:function(e){return i("median://auth0/renew",{refreshToken:e})}},m={set:function(e){t("median://autorefresh/set",e)}},f={start:function(e){t("median://backgroundLocation/start",e,!0)},stop:function(){t("median://backgroundLocation/stop")}},g={playTrack:function(e){return"number"==typeof e&&(e={time:e}),i("median://backgroundMedia/playTrack",{...e})},streamPlaylist:function(e){return i("median://backgroundMedia/streamPlaylist",{...e})},pause:function(){t("median://backgroundMedia/pause")},stop:function(){t("median://backgroundMedia/stop")},play:function(){t("median://backgroundMedia/play")},resume:function(){t("median://backgroundMedia/resume")},getPlayerStatus:function(e){return i("median://backgroundMedia/getPlayerStatus",e)}},p={scan:function(e){return i("median://barcode/scan",e)},setPrompt:function(e){return t("median://barcode/setPrompt",{prompt:e})}},b={scan:function(e){t("median://beacon/scan",e)}},h={getFirstParams:function(e){return i("median://branch/getFirstParams",e)},getLatestParams:function(e){return i("median://branch/getLatestParams",e)},isInitialized:function(e){return i("median://branch/isInitialized",e)}},v={changeUser:function(e){return i("median://braze/changeUser",e,!0)},notificationEnabled:function(e){return i("median://braze/notificationEnabled",e,!0)},promptNotification:function(e){return i("median://braze/promptNotification",e,!0)},logCustomEvent:function(e,n){t("median://braze/logCustomEvent",{eventName:e,data:n})}},y={download:function(e){t("gonative://calendar/download",e)}},k={scanCard:function(e){return i("median://card.io/scanCard",e)}},w={getAll:function(e){return i("median://contacts/getAll",e)},getPermissionStatus:function(e){return i("median://contacts/getPermissionStatus",e)},pickContact:function(e){return i("median://contacts/pickContact",e)}},S={setContact:function(e){return i("median://cordial/setContact",e)},unsetContact:function(e){return i("median://cordial/unsetContact",e)},permissionStatus:function(e){return i("median://cordial/permissionStatus",e,!0)},requestPermission:function(e){return i("median://cordial/requestPermission",e,!0)}},C={scanPage:function(e){if(e?.callback)return i("median://documentScanner/scanPage",e);t("median://documentScanner/scanPage",e)},init:function(e){t("median://documentScanner/scanPage",e)}},I={init:function(e){return i("median://downloads/init",e)},downloadFile:function(e){t("median://downloads/downloadFile",e)},showUI:function(){t("median://downloads/showUI")}},P={scan:function(e){return i("median://esmiley/scan",{timeout:e})},connect:function(e){return i("median://esmiley/connect",{deviceId:e})},disconnect:function(){t("median://esmiley/disconnect")},send:function(e){return i("median://esmiley/send",{object:e})}},L={events:{send:function(e){t("median://facebook/events/send",e)},sendPurchase:function(e){t("median://facebook/events/sendPurchase",e)}}},A={event:{collection:function(e){t("median://firebaseAnalytics/event/collection?enabled="+e)},setUser:function(e){t("median://firebaseAnalytics/event/setUser",e)},setUserProperty:function(e){t("median://firebaseAnalytics/event/setUserProperty",e)},defaultEventParameters:function(e){t("median://firebaseAnalytics/event/defaultEventParameters",e)},logEvent:function(e){t("median://firebaseAnalytics/event/logEvent",e)},logScreen:function(e){t("median://firebaseAnalytics/event/logScreen",e)},viewItem:function(e){t("median://firebaseAnalytics/event/viewItem",e)},addToWishlist:function(e){t("median://firebaseAnalytics/event/addToWishlist",e)},addToCart:function(e){t("median://firebaseAnalytics/event/addToCart",e)},removeFromCart:function(e){t("median://firebaseAnalytics/event/removeFromCart",e)}}},U={enable:function(e){t("gonative://firebaseCrashlytics/enable",{enable:e})},webErrorLogsEnabled:function(e){t("gonative://firebaseCrashlytics/enableWebErrorLogs",{enable:e})},toastErrorLogsEnabled:function(e){t("gonative://firebaseCrashlytics/enableToastErrorLogs",{enable:e})},setUserId:function(e){t("gonative://firebaseCrashlytics/setUserId",{userId:e})},unsetUserId:function(){t("gonative://firebaseCrashlytics/unsetUserId")}},_={trigger:function(e){t("median://haptics/trigger",e)}},T={purchase:function(e){const n=e.productID;return e.productID=null,i("median://purchase/"+n,e)},purchases:function(e){return i("median://iap/purchases",e)},manageSubscription:function(e){t("median://iap/manageSubscription",e)},manageAllSubscriptions:function(){t("median://iap/manageAllSubscriptions")},restorePurchases:function(){t("median://iap/restorePurchases")},info:function(){return i("median://iap/info")},refresh:function(){t("median://iap/refresh")}},E={registerPush:function(e){return i("median://intercom/registerPush",e)},updateUser:function(e){t("median://intercom/updateUser",e)},logEvent:function(e){t("median://intercom/logEvent",e)},logout:function(){t("median://intercom/logout")},presentCarousel:function(e){t("median://intercom/presentCarousel",e)},permissionStatus:function(e){return i("median://intercom/permissionStatus",e,!0)},requestPermission:function(e){return i("median://intercom/registerPush",e,!0)}},N={initialize:function(e){return i("gonative://iterable/initialize",e)},setEmail:function(e){return i("gonative://iterable/setEmail",e)},setUserId:function(e){return i("gonative://iterable/setUserId",e)},registerPush:function(e){return i("gonative://iterable/registerPush",e)},requestPermission:function(e){return i("gonative://iterable/requestPermission",e)},permissionStatus:function(e){return i("gonative://iterable/permissionStatus",e)}},M={play:function(e){t("median://kaltura/play",e)}},x={set:function(e){return i("gonative://keychainSwift/set",e)},get:function(e){return i("gonative://keychainSwift/get",e)},delete:function(e){return i("gonative://keychainSwift/delete",e)},deleteAll:function(e){return i("gonative://keychainSwift/deleteAll",e)}},F={nonpersistent:{set:function(e){t("median://localpreferences/nonpersistent/set",e)},get:function(e){return i("median://localpreferences/nonpersistent/get",e)},delete:function(e){t("median://localpreferences/nonpersistent/delete",e)},deleteAll:function(e){t("median://localpreferences/nonpersistent/deleteAll",e)}},persistent:{set:function(e){t("median://localpreferences/persistent/set",e)},get:function(e){return i("median://localpreferences/persistent/get",e)},delete:function(e){t("median://localpreferences/persistent/delete",e)},deleteAll:function(e){t("median://localpreferences/persistent/deleteAll",e)}},filesystem:{save:function(e){t("median://localpreferences/filesystem/save",e)},read:function(e){return i("median://localpreferences/filesystem/read",e)},delete:function(e){t("median://localpreferences/filesystem/delete",e)}},keychain:{set:function(e){return i("median://localpreferences/keychain/set",e)},get:function(e){return i("median://localpreferences/keychain/get",e)},delete:function(e){return i("median://localpreferences/keychain/delete",e)},deleteAll:function(e){return i("median://localpreferences/keychain/deleteAll",e)}}},q={launch:function(e){return i("median://modal/launch",e)}},j={notificationEnabled:function(e){return i("median://moengage/notificationEnabled",e,!0)},promptNotification:function(e){return i("median://moengage/promptNotification",e,!0)},setUniqueID:function(e){return i("median://moengage/setUniqueID",{uniqueId:e},!0)},resetUser:function(){return i("median://moengage/resetUser")},setAlias:function(e){return i("median://moengage/setAlias",{alias:e},!0)},trackEvent:function(e,n){return i("median://moengage/trackEvent",{eventName:e,eventData:n},!0)},launchInbox:function(){return i("median://moengage/launchInbox")}},O={login:function(e){return i("median://moxo/login",e,!0)},registerNotifications:function(e){return i("median://moxo/registerNotifications",e,!0)},requestPermission:function(e){return i("median://moxo/registerNotifications",e,!0)},permissionStatus:function(e){return i("median://moxo/permissionStatus",e,!0)},isLinked:function(e){return i("median://moxo/isLinked",e,!0)},unlink:function(e){return i("median://moxo/unlink",e,!0)},localUnlink:function(e){return i("median://moxo/localUnlink",e,!0)},showDashboard:function(){t("median://moxo/showDashboard")},openLiveChatWithCompletion:function(){t("median://moxo/openLiveChatWithCompletion")},openLiveChatWithChannelId:function(e){t("median://moxo/openLiveChatWithChannelId",e)},openChat:function(e){t("median://moxo/openChat",e)},getUnreadMessageCount:function(e){return i("median://moxo/getUnreadMessageCount",e)}},B={areNotificationsEnabled:function(e){return i("median://msdynamics/areNotificationsEnabled",e,!0)},promptNotificationPermission:function(e){return i("median://msdynamics/promptNotificationPermission",e,!0)},registrationInfo:function(e){return i("median://msdynamics/registrationInfo",e,!0)},registerDevice:function(e){return i("median://msdynamics/registerDevice",e,!0)}},W={status:function(e){return i("gonative://nfc/status",e)},readTag:function(e){return i("gonative://nfc/readTag",e)}},z={run:{onesignalInfo:function(){t("median://onesignal/info",{callback:"median_onesignal_info"})}},onesignalInfo:function(e){return i("median://onesignal/info",e,!0)},info:function(e){return i("median://onesignal/info",e,!0)},register:function(){t("median://onesignal/register")},userPrivacyConsent:{grant:function(){t("median://onesignal/userPrivacyConsent/grant")},revoke:function(){t("median://onesignal/userPrivacyConsent/revoke")}},tags:{getTags:function(e){return i("median://onesignal/tags/get",e)},setTags:function(e){t("median://onesignal/tags/set",e)},deleteTags:function(e){t("median://onesignal/tags/delete",e)}},showTagsUI:function(){t("median://onesignal/showTagsUI")},promptLocation:function(){t("median://onesignal/promptLocation")},iam:{addTrigger:function(e){t("median://onesignal/iam/addTrigger",e)},addTriggers:function(e){t("median://onesignal/iam/addTriggers",e)},removeTriggerForKey:function(e){t("median://onesignal/iam/removeTriggerForKey",{key:e})},getTriggerValueForKey:function(e){t("median://onesignal/iam/getTriggerValueForKey",{key:e})},pauseInAppMessages:function(){t("median://onesignal/iam/pauseInAppMessages?pause=true")},resumeInAppMessages:function(){t("median://onesignal/iam/pauseInAppMessages?pause=false")},setInAppMessageClickHandler:function(e){t("median://onesignal/iam/setInAppMessageClickHandler",{handler:n(e,!0)})}},externalUserId:{set:function(e){return i("median://onesignal/externalUserId/set",e)},remove:function(e){return i("median://onesignal/externalUserId/remove",e)}},enableForegroundNotifications:function(e){t("median://onesignal/enableForegroundNotifications",{enabled:e})},badge:{set:function(e){t("median://onesignal/badge/set",{count:e})}},login:function(e,n={}){return i("median://onesignal/login",{externalId:e,...n})},logout:function(e){return i("median://onesignal/logout",e)}},R={video:{join:function(e){return i("median://opentok/video/join",e)}}},D={requestPhoneCallMgmt:function(e){if(e?.callback)return i("median://permissions/requestPhoneCallMgmt",e);t("median://permissions/requestPhoneCallMgmt",e)}},H={linkBank:function(e){return i("median://plaid/linkBank",e)},verifyIdentity:function(e){return i("median://plaid/verifyIdentity",e)}},J={configure:function(e){return i("gonative://revenueCat/configure",e)},getOfferings:function(e){return i("gonative://revenueCat/getOfferings",e)},purchase:function(e){return i("gonative://revenueCat/purchase",e)},restorePurchases:function(e){return i("gonative://revenueCat/restorePurchases",e)}},V={facebook:{login:function(e){if(e?.callback)return i("median://socialLogin/facebook/login",e);t("median://socialLogin/facebook/login",e)},logout:function(e){if(e?.callback)return i("median://socialLogin/facebook/logout",e);t("median://socialLogin/facebook/logout",e)}},google:{login:function(e){if(e?.callback)return i("median://socialLogin/google/login",e);t("median://socialLogin/google/login",e)},logout:function(e){if(e?.callback)return i("median://socialLogin/google/logout",e);t("median://socialLogin/google/logout",e)}},apple:{login:function(e){if(e?.callback)return i("median://socialLogin/apple/login",e);t("median://socialLogin/apple/login",e)}}};function K(e,n){function t(e){return new Promise(((n,t)=>{const i=new FileReader;i.onload=()=>n(i.result),i.onerror=()=>t(i.error),i.readAsDataURL(e)}))}const i=[t(e)];return n&&"object"==typeof n&&n.attachment instanceof Blob&&i.push(t(n.attachment)),Promise.all(i)}const G={snapchat:{isInstalled:function(e){return i("median://socialShare/snapchat/isInstalled",e)},share:function(e,n){K(e,n).then((([e,i])=>{let a={dataUrl:e};n&&"object"==typeof n&&(a={...n,dataUrl:e,attachment:i}),t("median://socialShare/snapchat/share",a)}))}},instagram:{isInstalled:function(e){return i("median://socialShare/instagram/isInstalled",e)},shareToFeed:function(e){K(e).then((([e])=>{t("median://socialShare/instagram/shareToFeed",{dataUrl:e})}))},shareToStory:function(e,n){K(e,n).then((([e,i])=>{let a={dataUrl:e};n&&"object"==typeof n&&(a={...n,dataUrl:e,attachment:i}),t("median://socialShare/instagram/shareToStory",a)}))}}},Q={video:{join:function(e){return i("median://twilio/video/join",e)}}},X={shareScreen:function(e){t("median://webScreenshot/shareScreen",e)},shareElement:function(e,n){window.html2canvas&&window.html2canvas(e,{useCORS:!0,scale:1.25}).then((e=>{t("median://webScreenshot/shareElement",{dataUrl:e.toDataURL(),...n})}))},captureScreen:async function(){const e=await i("median://webScreenshot/captureScreen"),n=atob(e.data),t=n.length,a=new Uint8Array(t);for(let e=0;e<t;e++)a[e]=n.charCodeAt(e);return new Blob([a],{type:"image/png"})},captureElement:async function(e){if(!window.html2canvas)return;const n=await window.html2canvas(e,{useCORS:!0,scale:1.25});return new Promise(((e,t)=>{n.toBlob((n=>{n?e(n):t(new Error("Failed to convert to blob."))}))}))}},Y={video:{join:function(e){return i("median://zoom/join",e)}}},Z={geoLocation:{promptLocationServices:function(){t("median://geoLocation/promptLocationServices")}},screen:{fullscreen:function(){t("median://screen/fullscreen")},normal:function(){t("median://screen/normal")},keepScreenOn:function(){t("median://screen/keepScreenOn")},keepScreenNormal:function(){t("median://screen/keepScreenNormal")}},audio:{requestFocus:function(e){t("median://audio/requestFocus",{enabled:e})}}},$={set:function(e){t("median://clipboard/set",e)},get:function(e){return i("median://clipboard/get",e)}},ee={set:function(e){t("median://config/set",e)}},ne={get:function(e){return i("median://connectivity/get",e)},subscribe:function(e){return i("median://connectivity/subscribe",e,!0)},unsubscribe:function(){t("median://connectivity/unsubscribe")}},te=function(e){return i("median://run/median_device_info",e,!0)},ie={set:function(e){t("median://internalExternal/set",e)}},ae={info:function(e){return i("median://keyboard/info",e)},listen:function(e){t("median://keyboard/listen",{callback:e})},showAccessoryView:function(e){t("median://keyboard/showAccessoryView",{visible:e})}},oe={custom:function(e){return i("median://nativebridge/custom",e)},multi:function(e){t("median://nativebridge/multi",e)}},re={set:function(e){t("median://navigationLevels/set",{persist:e.persist,data:e})},setCurrent:function(e){t("median://navigationLevels/set",e)},revert:function(){t("median://navigationLevels/set?persist=true")}},se={set:function(e,n){t("median://navigationMaxWindows/set",{data:e,autoClose:n,persist:!0})},setCurrent:function(e,n){t("median://navigationMaxWindows/set",{data:e,autoClose:n})}},ce={set:function(e){t("median://navigationTitles/set",{persist:e.persist,data:e})},setCurrent:function(e){t("median://navigationTitles/setCurrent",e)},revert:function(){t("median://navigationTitles/set?persist=true")}},ue={appSettings:function(){t("median://open/app-settings")}},de={send:function(e){t("median://registration/send",{customData:e})}},le={deviceInfo:function(){t("median://run/median_device_info")}},me={setBrightness:function(e){t("median://screen/setBrightness",["number","string"].includes(typeof e)?{brightness:e}:e)},setMode:function(e){t("median://screen/setMode",e)},keepScreenOn:function(e){t("median://screen/keepScreenOn",e)},keepScreenNormal:function(){t("median://screen/keepScreenNormal")}},fe={sharePage:function(e){t("median://share/sharePage",e)},downloadFile:function(e){t("median://share/downloadFile",e)},downloadImage:function(e){t("median://share/downloadImage",e)}},ge={setItems:function(e){t("median://sidebar/setItems",e)},getItems:function(e){return i("median://sidebar/getItems",e)}},pe={set:function(e){t("median://statusbar/set",e)},matchBodyBackgroundColor:function(e){t("median://statusbar/matchBodyBackgroundColor",e)}},be={selectTab:function(e){t("median://tabs/select/"+e)},deselect:function(){t("median://tabs/deselect")},setTabs:function(e){t("median://tabs/setTabs",{tabs:e})}},he={clearCache:function(){t("median://webview/clearCache")},clearCookies:function(){t("median://webview/clearCookies")},reload:function(){t("median://webview/reload")}},ve={open:function(e,n="blank"){t("median://window/open",{url:e,mode:n})},close:function(){t("median://window/close")}},ye={window:{open:function(e,n="blank"){t("median://window/open",{url:e,mode:n})},setWindowOpenHideNavbar:function(e){t("median://window/setWindowOpenHideNavbar",{windowOpenHideNavbar:e})}},geoLocation:{requestLocation:function(){t("median://geolocationShim/requestLocation")},startWatchingLocation:function(){t("median://geolocationShim/startWatchingLocation")},stopWatchingLocation:function(){t("median://geolocationShim/stopWatchingLocation")}},attconsent:{request:function(e){return i("median://ios/attconsent/request",e)},status:function(e){return i("median://ios/attconsent/status",e)}},backgroundAudio:{start:function(){t("median://backgroundAudio/start")},end:function(){t("median://backgroundAudio/end")}},contextualNavToolbar:{set:function(e){t("median://ios/contextualNavToolbar/set",e)}}};return new class{#e={};#n=(n,t)=>{const i=e(n);if("function"!=typeof t)return i;this.#e[n]=this.#e[n]||{};const r=this.#e[n];return r[i]=t,a(n,r),o(n,!0),i};#t=(e,n)=>{if(!e||!n)return;this.#e[e]=this.#e[e]||{};const t=this.#e[e];delete t[n],a(e,t),0===Object.keys(t).length&&o(e,!1)};#i=e=>({addListener:n=>this.#n(e,n),removeListener:n=>this.#t(e,n)});ios=ye;android=Z;clipboard=$;config=ee;connectivity=ne;deviceInfo=te;internalExternal=ie;keyboard=ae;nativebridge=oe;navigationLevels=re;navigationMaxWindows=se;navigationTitles=ce;open=ue;registration=de;run=le;screen=me;share=fe;sidebar=ge;statusbar=pe;tabNavigation=be;webview=he;window=ve;adjust=r;admob=s;appreview=c;appsflyer=u;auth=d;auth0=l;autorefresh=m;backgroundLocation=f;backgroundMedia=g;barcode=p;beacon=b;braze=v;branch=h;calendar=y;card_io=k;contacts=w;cordial=S;documentScanner=C;downloads=I;esmiley=P;facebook=L;firebaseAnalytics=A;firebaseCrashlytics=U;haptics=_;iap=T;intercom=E;iterable=N;kaltura=M;keychainSwift=x;localpreferences=F;modal=q;moengage=j;moxo=O;msdynamics=B;nfc=W;onesignal=z;opentok=R;permissions=D;plaid=H;purchase=T.purchase;revenueCat=J;socialLogin=V;socialShare=G;storage={app:F.nonpersistent,cloud:F.persistent,filesystem:F.filesystem};twilio=Q;webScreenshot=X;zoom=Y;isNativeApp=()=>!!window?.webkit?.messageHandlers?.JSBridge||!!window?.JSBridge;getPlatform=async()=>{if(!this.isNativeApp())return"web";const e=await te();return e?.platform};onReady=e=>{if("function"==typeof e){let n=e,t=0;const i=setInterval((()=>{if(this.isNativeApp()&&n)return n(),void(n=null);t+=1,(t>=20||!n)&&clearInterval(i)}),500)}};appsFlyerConversionData=this.#i("_median_appsflyer_cd_success");appResumed=this.#i("_median_app_resumed");branchInitialized=this.#i("_median_branch_initialized");deviceShake=this.#i("_median_device_shake");iapInfoReady=this.#i("_median_info_ready");iapPurchases=this.#i("_median_iap_purchases");oneSignalPushOpened=this.#i("_median_onesignal_push_opened");shareToApp=this.#i("_median_share_to_app");jsNavigation={url:this.#i("_median_url_changed")}}}();
1
+ var Median=function(){"use strict";function e(e="_median_temp_"){return e+Math.random().toString(36).slice(2)}function n(n,t){if("string"==typeof n)return n;const i=e();return window[i]=function(...e){n(...e),t||delete window[i]},i}function t(e,t,i){let a=e;t&&(a={},t.callback&&"function"==typeof t.callback&&(t.callback=n(t.callback,i)),t.callbackFunction&&"function"==typeof t.callbackFunction&&(t.callbackFunction=n(t.callbackFunction,i)),t.statuscallback&&"function"==typeof t.statuscallback&&(t.statuscallback=n(t.statuscallback,i)),a.medianCommand=e,a.data=t),window?.JSBridge?.postMessage&&window.JSBridge.postMessage("string"==typeof a?a:JSON.stringify(a)),window?.webkit?.messageHandlers?.JSBridge?.postMessage&&window.webkit.messageHandlers.JSBridge.postMessage(a)}function i(n,i,a){if(i?.callback||i?.callbackFunction||i?.statuscallback)return t(n,i,a);{const a=e();return i||(i={}),i.callback=a,new Promise((function(e,o){window[a]=function(n){n&&"object"==typeof n&&"error"in n&&"string"==typeof n.error?o(n):e(n),delete window[a]},t(n,i)}))}}function a(e,n){window[e]=function(...e){Object.keys(n).forEach((t=>{const i=n[t];"function"==typeof i&&i(...e)}))}}function o(e,n){return t(n?"median://events/subscribe":"median://events/unsubscribe",{eventName:e})}const r={initialize:function(e){t("median://adjust/initialize",e)},trackEvent:function(e){t("median://adjust/trackEvent",{token:e.token,revenue:e.revenue,currency:e.currency})},attributionInfo:function(){return i("median://adjust/attributionInfo")},updateSkanConversionValue:function(e){return i("median://adjust/updateSkanConversionValue",e)}},s={showInterstitialIfReady:function(){t("median://admob/showInterstitialIfReady")},showInterstitialOnNextPageLoadIfReady:function(){t("median://admob/showInterstitialOnNextPageLoadIfReady")},banner:{enable:function(){t("median://admob/banner/enable")},disable:function(){t("median://admob/banner/disable")}},request:{tracking:function(e){return i("median://admob/request/tracking",e)}}},c={prompt:function(e){if(e)return i("median://appReview/prompt",e);t("median://appReview/prompt")}},u={logEvent:function(e,n){t("median://appsflyer/logEvent",{eventName:e,eventValues:n})},setCustomerUserId:function(e){t("median://appsflyer/setCustomerUserId",{userId:e})}},d={status:function(e){return i("median://auth/status",e)},save:function(e){return"string"!=typeof e.secret&&(e.secret=JSON.stringify(e.secret)),i("median://auth/save",e)},get:function(e){return i("median://auth/get",e)},delete:function(e){return i("median://auth/delete",e)}},l={login:function(e){return i("median://auth0/login",e)},logout:function(e){return i("median://auth0/logout",e)},status:function(e){return i("median://auth0/status",e)},profile:function(e){return i("median://auth0/profile",e)},getCredentials:function(e){return i("median://auth0/getCredentials",e)},renew:function(e){return i("median://auth0/renew",{refreshToken:e})}},m={set:function(e){t("median://autorefresh/set",e)}},f={start:function(e){t("median://backgroundLocation/start",e,!0)},stop:function(){t("median://backgroundLocation/stop")}},g={playTrack:function(e){return"number"==typeof e&&(e={time:e}),i("median://backgroundMedia/playTrack",{...e})},streamPlaylist:function(e){return i("median://backgroundMedia/streamPlaylist",{...e})},pause:function(){t("median://backgroundMedia/pause")},stop:function(){t("median://backgroundMedia/stop")},play:function(){t("median://backgroundMedia/play")},resume:function(){t("median://backgroundMedia/resume")},getPlayerStatus:function(e){return i("median://backgroundMedia/getPlayerStatus",e)}},p={scan:function(e){return i("median://barcode/scan",e)},setPrompt:function(e){return t("median://barcode/setPrompt",{prompt:e})}},b={scan:function(e){t("median://beacon/scan",e)}},h={getFirstParams:function(e){return i("median://branch/getFirstParams",e)},getLatestParams:function(e){return i("median://branch/getLatestParams",e)},isInitialized:function(e){return i("median://branch/isInitialized",e)}},v={changeUser:function(e){return i("median://braze/changeUser",e,!0)},notificationEnabled:function(e){return i("median://braze/notificationEnabled",e,!0)},promptNotification:function(e){return i("median://braze/promptNotification",e,!0)},logCustomEvent:function(e,n){t("median://braze/logCustomEvent",{eventName:e,data:n})}},y={download:function(e){t("gonative://calendar/download",e)}},k={scanCard:function(e){return i("median://card.io/scanCard",e)}},w={getAll:function(e){return i("median://contacts/getAll",e)},getPermissionStatus:function(e){return i("median://contacts/getPermissionStatus",e)},pickContact:function(e){return i("median://contacts/pickContact",e)}},S={setContact:function(e){return i("median://cordial/setContact",e)},unsetContact:function(e){return i("median://cordial/unsetContact",e)},permissionStatus:function(e){return i("median://cordial/permissionStatus",e,!0)},requestPermission:function(e){return i("median://cordial/requestPermission",e,!0)}},C={scanPage:function(e){if(e?.callback)return i("median://documentScanner/scanPage",e);t("median://documentScanner/scanPage",e)},init:function(e){t("median://documentScanner/scanPage",e)}},I={init:function(e){return i("median://downloads/init",e)},downloadFile:function(e){t("median://downloads/downloadFile",e)},showUI:function(){t("median://downloads/showUI")}},P={scan:function(e){return i("median://esmiley/scan",{timeout:e})},connect:function(e){return i("median://esmiley/connect",{deviceId:e})},disconnect:function(){t("median://esmiley/disconnect")},send:function(e){return i("median://esmiley/send",{object:e})}},L={events:{send:function(e){t("median://facebook/events/send",e)},sendPurchase:function(e){t("median://facebook/events/sendPurchase",e)}}},A={event:{collection:function(e){t("median://firebaseAnalytics/event/collection?enabled="+e)},setUser:function(e){t("median://firebaseAnalytics/event/setUser",e)},setUserProperty:function(e){t("median://firebaseAnalytics/event/setUserProperty",e)},defaultEventParameters:function(e){t("median://firebaseAnalytics/event/defaultEventParameters",e)},logEvent:function(e){t("median://firebaseAnalytics/event/logEvent",e)},logScreen:function(e){t("median://firebaseAnalytics/event/logScreen",e)},viewItem:function(e){t("median://firebaseAnalytics/event/viewItem",e)},addToWishlist:function(e){t("median://firebaseAnalytics/event/addToWishlist",e)},addToCart:function(e){t("median://firebaseAnalytics/event/addToCart",e)},removeFromCart:function(e){t("median://firebaseAnalytics/event/removeFromCart",e)}}},U={enable:function(e){t("gonative://firebaseCrashlytics/enable",{enable:e})},webErrorLogsEnabled:function(e){t("gonative://firebaseCrashlytics/enableWebErrorLogs",{enable:e})},toastErrorLogsEnabled:function(e){t("gonative://firebaseCrashlytics/enableToastErrorLogs",{enable:e})},setUserId:function(e){t("gonative://firebaseCrashlytics/setUserId",{userId:e})},unsetUserId:function(){t("gonative://firebaseCrashlytics/unsetUserId")}},_={trigger:function(e){t("median://haptics/trigger",e)}},T={purchase:function(e){const n=e.productID;return e.productID=null,i("median://purchase/"+n,e)},purchases:function(e){return i("median://iap/purchases",e)},manageSubscription:function(e){t("median://iap/manageSubscription",e)},manageAllSubscriptions:function(){t("median://iap/manageAllSubscriptions")},restorePurchases:function(){t("median://iap/restorePurchases")},info:function(){return i("median://iap/info")},refresh:function(){t("median://iap/refresh")}},E={registerPush:function(e){return i("median://intercom/registerPush",e)},updateUser:function(e){t("median://intercom/updateUser",e)},logEvent:function(e){t("median://intercom/logEvent",e)},logout:function(){t("median://intercom/logout")},presentCarousel:function(e){t("median://intercom/presentCarousel",e)},permissionStatus:function(e){return i("median://intercom/permissionStatus",e,!0)},requestPermission:function(e){return i("median://intercom/registerPush",e,!0)}},N={initialize:function(e){return i("gonative://iterable/initialize",e)},setEmail:function(e){return i("gonative://iterable/setEmail",e)},setUserId:function(e){return i("gonative://iterable/setUserId",e)},registerPush:function(e){return i("gonative://iterable/registerPush",e)},requestPermission:function(e){return i("gonative://iterable/requestPermission",e)},permissionStatus:function(e){return i("gonative://iterable/permissionStatus",e)}},M={play:function(e){t("median://kaltura/play",e)}},x={set:function(e){return i("gonative://keychainSwift/set",e)},get:function(e){return i("gonative://keychainSwift/get",e)},delete:function(e){return i("gonative://keychainSwift/delete",e)},deleteAll:function(e){return i("gonative://keychainSwift/deleteAll",e)}},F={nonpersistent:{set:function(e){t("median://localpreferences/nonpersistent/set",e)},get:function(e){return i("median://localpreferences/nonpersistent/get",e)},delete:function(e){t("median://localpreferences/nonpersistent/delete",e)},deleteAll:function(e){t("median://localpreferences/nonpersistent/deleteAll",e)}},persistent:{set:function(e){t("median://localpreferences/persistent/set",e)},get:function(e){return i("median://localpreferences/persistent/get",e)},delete:function(e){t("median://localpreferences/persistent/delete",e)},deleteAll:function(e){t("median://localpreferences/persistent/deleteAll",e)}},filesystem:{save:function(e){t("median://localpreferences/filesystem/save",e)},read:function(e){return i("median://localpreferences/filesystem/read",e)},delete:function(e){t("median://localpreferences/filesystem/delete",e)}},keychain:{set:function(e){return i("median://localpreferences/keychain/set",e)},get:function(e){return i("median://localpreferences/keychain/get",e)},delete:function(e){return i("median://localpreferences/keychain/delete",e)},deleteAll:function(e){return i("median://localpreferences/keychain/deleteAll",e)}}},q={launch:function(e){return i("median://modal/launch",e)}},j={notificationEnabled:function(e){return i("median://moengage/notificationEnabled",e,!0)},promptNotification:function(e){return i("median://moengage/promptNotification",e,!0)},setUniqueID:function(e){return i("median://moengage/setUniqueID",{uniqueId:e},!0)},resetUser:function(){return i("median://moengage/resetUser")},setAlias:function(e){return i("median://moengage/setAlias",{alias:e},!0)},trackEvent:function(e,n){return i("median://moengage/trackEvent",{eventName:e,eventData:n},!0)},launchInbox:function(){return i("median://moengage/launchInbox")}},O={login:function(e){return i("median://moxo/login",e,!0)},registerNotifications:function(e){return i("median://moxo/registerNotifications",e,!0)},requestPermission:function(e){return i("median://moxo/registerNotifications",e,!0)},permissionStatus:function(e){return i("median://moxo/permissionStatus",e,!0)},isLinked:function(e){return i("median://moxo/isLinked",e,!0)},unlink:function(e){return i("median://moxo/unlink",e,!0)},localUnlink:function(e){return i("median://moxo/localUnlink",e,!0)},showDashboard:function(){t("median://moxo/showDashboard")},openLiveChatWithCompletion:function(){t("median://moxo/openLiveChatWithCompletion")},openLiveChatWithChannelId:function(e){t("median://moxo/openLiveChatWithChannelId",e)},openChat:function(e){t("median://moxo/openChat",e)},getUnreadMessageCount:function(e){return i("median://moxo/getUnreadMessageCount",e)}},B={areNotificationsEnabled:function(e){return i("median://msdynamics/areNotificationsEnabled",e,!0)},promptNotificationPermission:function(e){return i("median://msdynamics/promptNotificationPermission",e,!0)},registrationInfo:function(e){return i("median://msdynamics/registrationInfo",e,!0)},registerDevice:function(e){return i("median://msdynamics/registerDevice",e,!0)}},W={status:function(e){return i("gonative://nfc/status",e)},readTag:function(e){return i("gonative://nfc/readTag",e)}},z={run:{onesignalInfo:function(){t("median://onesignal/info",{callback:"median_onesignal_info"})}},onesignalInfo:function(e){return i("median://onesignal/info",e,!0)},info:function(e){return i("median://onesignal/info",e,!0)},register:function(){t("median://onesignal/register")},userPrivacyConsent:{grant:function(){t("median://onesignal/userPrivacyConsent/grant")},revoke:function(){t("median://onesignal/userPrivacyConsent/revoke")}},tags:{getTags:function(e){return i("median://onesignal/tags/get",e)},setTags:function(e){t("median://onesignal/tags/set",e)},deleteTags:function(e){t("median://onesignal/tags/delete",e)}},showTagsUI:function(){t("median://onesignal/showTagsUI")},promptLocation:function(){t("median://onesignal/promptLocation")},iam:{addTrigger:function(e){t("median://onesignal/iam/addTrigger",e)},addTriggers:function(e){t("median://onesignal/iam/addTriggers",e)},removeTriggerForKey:function(e){t("median://onesignal/iam/removeTriggerForKey",{key:e})},getTriggerValueForKey:function(e){t("median://onesignal/iam/getTriggerValueForKey",{key:e})},pauseInAppMessages:function(){t("median://onesignal/iam/pauseInAppMessages?pause=true")},resumeInAppMessages:function(){t("median://onesignal/iam/pauseInAppMessages?pause=false")},setInAppMessageClickHandler:function(e){t("median://onesignal/iam/setInAppMessageClickHandler",{handler:n(e,!0)})}},externalUserId:{set:function(e){return i("median://onesignal/externalUserId/set",e)},remove:function(e){return i("median://onesignal/externalUserId/remove",e)}},enableForegroundNotifications:function(e){t("median://onesignal/enableForegroundNotifications",{enabled:e})},badge:{set:function(e){t("median://onesignal/badge/set",{count:e})}},login:function(e,n={}){return i("median://onesignal/login",{externalId:e,...n})},logout:function(e){return i("median://onesignal/logout",e)}},R={video:{join:function(e){return i("median://opentok/video/join",e)}}},D={requestPhoneCallMgmt:function(e){if(e?.callback)return i("median://permissions/requestPhoneCallMgmt",e);t("median://permissions/requestPhoneCallMgmt",e)},status:function(e){return i("median://permissions/status",{permissions:e})}},H={linkBank:function(e){return i("median://plaid/linkBank",e)},verifyIdentity:function(e){return i("median://plaid/verifyIdentity",e)}},J={configure:function(e){return i("gonative://revenueCat/configure",e)},getOfferings:function(e){return i("gonative://revenueCat/getOfferings",e)},purchase:function(e){return i("gonative://revenueCat/purchase",e)},restorePurchases:function(e){return i("gonative://revenueCat/restorePurchases",e)}},V={facebook:{login:function(e){if(e?.callback)return i("median://socialLogin/facebook/login",e);t("median://socialLogin/facebook/login",e)},logout:function(e){if(e?.callback)return i("median://socialLogin/facebook/logout",e);t("median://socialLogin/facebook/logout",e)}},google:{login:function(e){if(e?.callback)return i("median://socialLogin/google/login",e);t("median://socialLogin/google/login",e)},logout:function(e){if(e?.callback)return i("median://socialLogin/google/logout",e);t("median://socialLogin/google/logout",e)}},apple:{login:function(e){if(e?.callback)return i("median://socialLogin/apple/login",e);t("median://socialLogin/apple/login",e)}}};function K(e,n){function t(e){return new Promise(((n,t)=>{const i=new FileReader;i.onload=()=>n(i.result),i.onerror=()=>t(i.error),i.readAsDataURL(e)}))}const i=[t(e)];return n&&"object"==typeof n&&n.attachment instanceof Blob&&i.push(t(n.attachment)),Promise.all(i)}const G={snapchat:{isInstalled:function(e){return i("median://socialShare/snapchat/isInstalled",e)},share:function(e,n){K(e,n).then((([e,i])=>{let a={dataUrl:e};n&&"object"==typeof n&&(a={...n,dataUrl:e,attachment:i}),t("median://socialShare/snapchat/share",a)}))}},instagram:{isInstalled:function(e){return i("median://socialShare/instagram/isInstalled",e)},shareToFeed:function(e){K(e).then((([e])=>{t("median://socialShare/instagram/shareToFeed",{dataUrl:e})}))},shareToStory:function(e,n){K(e,n).then((([e,i])=>{let a={dataUrl:e};n&&"object"==typeof n&&(a={...n,dataUrl:e,attachment:i}),t("median://socialShare/instagram/shareToStory",a)}))}}},Q={video:{join:function(e){return i("median://twilio/video/join",e)}}},X={shareScreen:function(e){t("median://webScreenshot/shareScreen",e)},shareElement:function(e,n){window.html2canvas&&window.html2canvas(e,{useCORS:!0,scale:1.25}).then((e=>{t("median://webScreenshot/shareElement",{dataUrl:e.toDataURL(),...n})}))},captureScreen:async function(){const e=await i("median://webScreenshot/captureScreen"),n=atob(e.data),t=n.length,a=new Uint8Array(t);for(let e=0;e<t;e++)a[e]=n.charCodeAt(e);return new Blob([a],{type:"image/png"})},captureElement:async function(e){if(!window.html2canvas)return;const n=await window.html2canvas(e,{useCORS:!0,scale:1.25});return new Promise(((e,t)=>{n.toBlob((n=>{n?e(n):t(new Error("Failed to convert to blob."))}))}))}},Y={video:{join:function(e){return i("median://zoom/join",e)}}},Z={geoLocation:{promptLocationServices:function(){t("median://geoLocation/promptLocationServices")}},screen:{fullscreen:function(){t("median://screen/fullscreen")},normal:function(){t("median://screen/normal")},keepScreenOn:function(){t("median://screen/keepScreenOn")},keepScreenNormal:function(){t("median://screen/keepScreenNormal")}},audio:{requestFocus:function(e){t("median://audio/requestFocus",{enabled:e})}}},$={set:function(e){t("median://clipboard/set",e)},get:function(e){return i("median://clipboard/get",e)}},ee={set:function(e){t("median://config/set",e)}},ne={get:function(e){return i("median://connectivity/get",e)},subscribe:function(e){return i("median://connectivity/subscribe",e,!0)},unsubscribe:function(){t("median://connectivity/unsubscribe")}},te=function(e){return i("median://run/median_device_info",e,!0)},ie={set:function(e){t("median://internalExternal/set",e)}},ae={info:function(e){return i("median://keyboard/info",e)},listen:function(e){t("median://keyboard/listen",{callback:e})},showAccessoryView:function(e){t("median://keyboard/showAccessoryView",{visible:e})}},oe={custom:function(e){return i("median://nativebridge/custom",e)},multi:function(e){t("median://nativebridge/multi",e)}},re={set:function(e){t("median://navigationLevels/set",{persist:e.persist,data:e})},setCurrent:function(e){t("median://navigationLevels/set",e)},revert:function(){t("median://navigationLevels/set?persist=true")}},se={set:function(e,n){t("median://navigationMaxWindows/set",{data:e,autoClose:n,persist:!0})},setCurrent:function(e,n){t("median://navigationMaxWindows/set",{data:e,autoClose:n})}},ce={set:function(e){t("median://navigationTitles/set",{persist:e.persist,data:e})},setCurrent:function(e){t("median://navigationTitles/setCurrent",e)},revert:function(){t("median://navigationTitles/set?persist=true")}},ue={appSettings:function(){t("median://open/app-settings")}},de={send:function(e){t("median://registration/send",{customData:e})}},le={deviceInfo:function(){t("median://run/median_device_info")}},me={setBrightness:function(e){t("median://screen/setBrightness",["number","string"].includes(typeof e)?{brightness:e}:e)},setMode:function(e){t("median://screen/setMode",e)},keepScreenOn:function(e){t("median://screen/keepScreenOn",e)},keepScreenNormal:function(){t("median://screen/keepScreenNormal")}},fe={sharePage:function(e){t("median://share/sharePage",e)},downloadFile:function(e){t("median://share/downloadFile",e)},downloadImage:function(e){t("median://share/downloadImage",e)}},ge={setItems:function(e){t("median://sidebar/setItems",e)},getItems:function(e){return i("median://sidebar/getItems",e)}},pe={set:function(e){t("median://statusbar/set",e)},matchBodyBackgroundColor:function(e){t("median://statusbar/matchBodyBackgroundColor",e)}},be={selectTab:function(e){t("median://tabs/select/"+e)},deselect:function(){t("median://tabs/deselect")},setTabs:function(e){t("median://tabs/setTabs",{tabs:e})}},he={clearCache:function(){t("median://webview/clearCache")},clearCookies:function(){t("median://webview/clearCookies")},reload:function(){t("median://webview/reload")}},ve={open:function(e,n="blank"){t("median://window/open",{url:e,mode:n})},close:function(){t("median://window/close")}},ye={window:{open:function(e,n="blank"){t("median://window/open",{url:e,mode:n})},setWindowOpenHideNavbar:function(e){t("median://window/setWindowOpenHideNavbar",{windowOpenHideNavbar:e})}},geoLocation:{requestLocation:function(){t("median://geolocationShim/requestLocation")},startWatchingLocation:function(){t("median://geolocationShim/startWatchingLocation")},stopWatchingLocation:function(){t("median://geolocationShim/stopWatchingLocation")}},attconsent:{request:function(e){return i("median://ios/attconsent/request",e)},status:function(e){return i("median://ios/attconsent/status",e)}},backgroundAudio:{start:function(){t("median://backgroundAudio/start")},end:function(){t("median://backgroundAudio/end")}},contextualNavToolbar:{set:function(e){t("median://ios/contextualNavToolbar/set",e)}}};return new class{#e={};#n=(n,t)=>{const i=e(n);if("function"!=typeof t)return i;this.#e[n]=this.#e[n]||{};const r=this.#e[n];return r[i]=t,a(n,r),o(n,!0),i};#t=(e,n)=>{if(!e||!n)return;this.#e[e]=this.#e[e]||{};const t=this.#e[e];delete t[n],a(e,t),0===Object.keys(t).length&&o(e,!1)};#i=e=>({addListener:n=>this.#n(e,n),removeListener:n=>this.#t(e,n)});ios=ye;android=Z;clipboard=$;config=ee;connectivity=ne;deviceInfo=te;internalExternal=ie;keyboard=ae;nativebridge=oe;navigationLevels=re;navigationMaxWindows=se;navigationTitles=ce;open=ue;registration=de;run=le;screen=me;share=fe;sidebar=ge;statusbar=pe;tabNavigation=be;webview=he;window=ve;adjust=r;admob=s;appreview=c;appsflyer=u;auth=d;auth0=l;autorefresh=m;backgroundLocation=f;backgroundMedia=g;barcode=p;beacon=b;braze=v;branch=h;calendar=y;card_io=k;contacts=w;cordial=S;documentScanner=C;downloads=I;esmiley=P;facebook=L;firebaseAnalytics=A;firebaseCrashlytics=U;haptics=_;iap=T;intercom=E;iterable=N;kaltura=M;keychainSwift=x;localpreferences=F;modal=q;moengage=j;moxo=O;msdynamics=B;nfc=W;onesignal=z;opentok=R;permissions=D;plaid=H;purchase=T.purchase;revenueCat=J;socialLogin=V;socialShare=G;storage={app:F.nonpersistent,cloud:F.persistent,filesystem:F.filesystem};twilio=Q;webScreenshot=X;zoom=Y;isNativeApp=()=>!!window?.webkit?.messageHandlers?.JSBridge||!!window?.JSBridge;getPlatform=async()=>{if(!this.isNativeApp())return"web";const e=await te();return e?.platform};onReady=e=>{if("function"==typeof e){let n=e,t=0;const i=setInterval((()=>{if(this.isNativeApp()&&n)return n(),void(n=null);t+=1,(t>=20||!n)&&clearInterval(i)}),500)}};appsFlyerConversionData=this.#i("_median_appsflyer_cd_success");appResumed=this.#i("_median_app_resumed");branchInitialized=this.#i("_median_branch_initialized");deviceShake=this.#i("_median_device_shake");iapInfoReady=this.#i("_median_info_ready");iapPurchases=this.#i("_median_iap_purchases");oneSignalPushOpened=this.#i("_median_onesignal_push_opened");shareToApp=this.#i("_median_share_to_app");jsNavigation={url:this.#i("_median_url_changed")}}}();
@@ -1,6 +1,9 @@
1
1
  import { CallbackParams } from '../types';
2
+ type PermissionType = 'Notifications' | 'Camera' | 'Contacts' | 'Microphone' | 'LocationWhenInUse' | 'LocationAlways' | 'AppTrackingTransparency' | 'PhotoLibrary';
3
+ type PermissionStatus = 'undetermined' | 'granted' | 'denied';
2
4
  declare const permissions: {
3
5
  requestPhoneCallMgmt: (params: CallbackParams) => Promise<any> | undefined;
6
+ status: (permissions?: PermissionType[]) => Promise<Record<string, PermissionStatus>>;
4
7
  };
5
8
  export default permissions;
6
9
  //# sourceMappingURL=permissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/plugins/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,QAAA,MAAM,WAAW;mCACyB,cAAc;CAMvD,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/plugins/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,KAAK,cAAc,GACf,eAAe,GACf,QAAQ,GACR,UAAU,GACV,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,yBAAyB,GACzB,cAAc,CAAC;AAEnB,KAAK,gBAAgB,GAAG,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE9D,QAAA,MAAM,WAAW;mCACyB,cAAc;2BAMtB,cAAc,EAAE;CAGjD,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -6,5 +6,8 @@ const permissions = {
6
6
  }
7
7
  addCommand('median://permissions/requestPhoneCallMgmt', params);
8
8
  },
9
+ status: function (permissions) {
10
+ return addCommandCallback('median://permissions/status', { permissions });
11
+ },
9
12
  };
10
13
  export default permissions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "median-js-bridge",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "Median bridge and utilities for JS web frameworks",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,18 @@
1
1
  import { CallbackParams } from '../types';
2
2
  import { addCommand, addCommandCallback } from '../utils';
3
3
 
4
+ type PermissionType =
5
+ | 'Notifications'
6
+ | 'Camera'
7
+ | 'Contacts'
8
+ | 'Microphone'
9
+ | 'LocationWhenInUse'
10
+ | 'LocationAlways'
11
+ | 'AppTrackingTransparency'
12
+ | 'PhotoLibrary';
13
+
14
+ type PermissionStatus = 'undetermined' | 'granted' | 'denied';
15
+
4
16
  const permissions = {
5
17
  requestPhoneCallMgmt: function (params: CallbackParams) {
6
18
  if (params?.callback) {
@@ -8,6 +20,9 @@ const permissions = {
8
20
  }
9
21
  addCommand('median://permissions/requestPhoneCallMgmt', params);
10
22
  },
23
+ status: function (permissions?: PermissionType[]) {
24
+ return addCommandCallback<Record<string, PermissionStatus>>('median://permissions/status', { permissions });
25
+ },
11
26
  };
12
27
 
13
28
  export default permissions;