@imtbl/sdk 1.4.0-alpha.2 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain_data.js +2 -2
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/widgets.js +872 -1
- package/dist/checkout.js +4 -4
- package/dist/config.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +6 -6
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +3 -3
- package/dist/x.js +2 -2
- package/package.json +1 -1
- package/dist/browser/checkout/BridgeWidget-52ba2210.js +0 -2753
- package/dist/browser/checkout/BridgeWidget-fffec54f.js +0 -1
- package/dist/browser/checkout/OnRampWidget-04677711.js +0 -288
- package/dist/browser/checkout/OnRampWidget-b1c1cc52.js +0 -1
- package/dist/browser/checkout/SaleWidget-8b73504f.js +0 -1610
- package/dist/browser/checkout/SaleWidget-e9cc4cb2.js +0 -2
- package/dist/browser/checkout/SpendingCapHero-43c9cf8c.js +0 -9
- package/dist/browser/checkout/SpendingCapHero-af71a6f5.js +0 -1
- package/dist/browser/checkout/SwapWidget-45ff8dfa.js +0 -1
- package/dist/browser/checkout/SwapWidget-e52876ac.js +0 -1461
- package/dist/browser/checkout/TopUpView-590c2c4c.js +0 -365
- package/dist/browser/checkout/TopUpView-ff09517a.js +0 -1
- package/dist/browser/checkout/WalletWidget-9c4c62e4.js +0 -760
- package/dist/browser/checkout/WalletWidget-ed0bd774.js +0 -1
- package/dist/browser/checkout/auto-track-1bf3a0ee.js +0 -1
- package/dist/browser/checkout/balance-e5a26a9d.js +0 -1
- package/dist/browser/checkout/balance-e5d785aa.js +0 -182
- package/dist/browser/checkout/index-1405c4f4.js +0 -1
- package/dist/browser/checkout/index-3272becd.js +0 -1
- package/dist/browser/checkout/index-4511315b.js +0 -5638
- package/dist/browser/checkout/index-6ee5fac7.js +0 -1
- package/dist/browser/checkout/index-8562ab3b.js +0 -1
- package/dist/browser/checkout/index-942c822d.js +0 -1
- package/dist/browser/checkout/index-9a5fbaa1.js +0 -90
- package/dist/browser/checkout/index-d9cfe478.js +0 -773
- package/dist/browser/checkout/index.umd-956dbfb2.js +0 -1
- package/dist/browser/checkout/is-plan-event-enabled-80f76ce6.js +0 -1
- package/dist/browser/checkout/retry-254e3478.js +0 -58
- package/dist/browser/checkout/retry-81ddd897.js +0 -1
- package/dist/browser/checkout/useTransakEvents-54a554e5.js +0 -150
- package/dist/browser/checkout/useTransakEvents-8580b8ed.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c5 as e}from"./index-9a5fbaa1.js";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(a){if("default"!==a&&!(a in e)){var n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,n.get?n:{enumerable:!0,get:function(){return t[a]}})}}))})),Object.freeze(e)}var a={exports:{}};window;var n=a.exports=function(e){var t={};function a(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(n,i,function(t){return e[t]}.bind(null,i));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=2)}([function(e,t,a){a.r(t);var n="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise((function(a,n){var i=new XMLHttpRequest;for(var r in i.open(t.method||"get",e,!0),t.headers)i.setRequestHeader(r,t.headers[r]);function o(){var e,t=[],a=[],n={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,r,o){t.push(r=r.toLowerCase()),a.push([r,o]),e=n[r],n[r]=e?e+","+o:o})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:o,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return t},entries:function(){return a},get:function(e){return n[e.toLowerCase()]},has:function(e){return e.toLowerCase()in n}}}}i.withCredentials="include"==t.credentials,i.onload=function(){a(o())},i.onerror=n,i.send(t.body)}))};t.default=n},function(e,t,a){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=function(){function e(t,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginName=t}return n(e,[{key:"track",value:function(e,t){window.analytics.track(e,t,{integration:{name:this.pluginName}})}}]),e}();t.default=i},function(e,t,a){Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeAnalytics=t.VimeoAnalytics=void 0;var n=r(a(3)),i=r(a(4));function r(e){return e&&e.__esModule?e:{default:e}}t.VimeoAnalytics=n.default,t.YouTubeAnalytics=i.default},function(e,t,a){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=r(a(0));function r(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(e,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"VimeoAnalytics"));return n.authToken=a,n.player=e,n.metadata={content:{},playback:{videoPlayer:"Vimeo"}},n.mostRecentHeartbeat=0,n.isPaused=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"initialize",value:function(){var e=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var a in t)this.registerHandler(a,t[a]);this.player.getVideoId().then((function(t){e.retrieveMetadata({id:t})})).catch(console.error)}},{key:"registerHandler",value:function(e,t){var a=this;this.player.on(e,(function(e){a.updateMetadata(e),t.call(a,e)}))}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var e=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==e&&t-e>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(e){var t=this;return new Promise((function(a,n){var r=e.id;(0,i.default)("https://api.vimeo.com/videos/"+r,{headers:{Authorization:"Bearer "+t.authToken}}).then((function(e){return e.ok?e.json():n(e)})).then((function(e){t.metadata.content.title=e.name,t.metadata.content.description=e.description,t.metadata.content.publisher=e.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=e.duration})).catch((function(e){return console.error("Request to Vimeo API Failed with: ",e),n(e)}))}))}},{key:"updateMetadata",value:function(e){var t=this;return new Promise((function(a,n){t.player.getVolume().then((function(n){n&&(t.metadata.playback.sound=100*n),t.metadata.playback.position=e.seconds,a()})).catch(n)}))}}]),t}(r(a(1)).default);t.default=o},function(e,t,a){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=r(a(0));function r(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(e,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return n.player=e,n.apiKey=a,n.playerLoaded=!1,n.playbackStarted=!1,n.contentStarted=!1,n.isPaused=!1,n.isBuffering=!1,n.isSeeking=!1,n.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},n.metadata=[{playback:{video_player:"youtube"},content:{}}],n.playlistIndex=0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var t=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=t,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise((function(t,a){var n=e.player.getVideoData(),r=e.player.getPlaylist()||[n.video_id],o=r.join();(0,i.default)("https://www.googleapis.com/youtube/v3/videos?id="+o+"&part=snippet,contentDetails&key="+e.apiKey).then((function(e){if(!e.ok){var t=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw t.response=e,t}return e.json()})).then((function(a){e.metadata=[];for(var n=0,i=0;i<r.length;i++){var o=a.items[i];e.metadata.push({content:{title:o.snippet.title,description:o.snippet.description,keywords:o.snippet.tags,channel:o.snippet.channelTitle,airdate:o.snippet.publishedAt}}),n+=s(o.contentDetails.duration)}for(i=0;i<r.length;i++)e.metadata[i].playback={total_length:n,video_player:"youtube"};t()})).catch((function(t){e.metadata=r.map((function(e){return{playback:{video_player:"youtube"},content:{}}})),a(t)}))}))}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var t=this.player.getPlaylist();t&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===t.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),t=this.player.getPlaylist();(t&&e===t.length-1||-1===e)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,t=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-t)>2e3}}]),t}(r(a(1)).default);function s(e){var t=e.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map((function(e){if(null!=e)return e.replace(/\D/,"")})),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}t.default=o}]),i=t({__proto__:null,default:e(n)},[n]);export{i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function l(l,e){var n,o;return"boolean"==typeof(null==e?void 0:e.enabled)?e.enabled:null===(o=null===(n=null==l?void 0:l.__default)||void 0===n?void 0:n.enabled)||void 0===o||o}export{l as i};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { useBrowserLayoutEffect } from '@biom3/react';
|
|
2
|
-
import { useRef, useEffect } from 'react';
|
|
3
|
-
|
|
4
|
-
// Inspired by https://usehooks-ts.com/react-hook/use-interval
|
|
5
|
-
function useInterval(callback, delay) {
|
|
6
|
-
const savedCallback = useRef(callback);
|
|
7
|
-
const interval = useRef(0);
|
|
8
|
-
// Remember the latest callback if it changes.
|
|
9
|
-
useBrowserLayoutEffect(() => {
|
|
10
|
-
savedCallback.current = callback;
|
|
11
|
-
}, [callback]);
|
|
12
|
-
// Set up the interval.
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
// Don't schedule if no delay is specified.
|
|
15
|
-
// Note: 0 is a valid value for delay.
|
|
16
|
-
if (!delay && delay !== 0) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
interval.current = setInterval(() => savedCallback.current(), delay);
|
|
20
|
-
// eslint-disable-next-line consistent-return
|
|
21
|
-
return () => { clearInterval(interval.current); };
|
|
22
|
-
}, [delay]);
|
|
23
|
-
return () => {
|
|
24
|
-
if (interval.current) {
|
|
25
|
-
clearInterval(interval.current);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// eslint-disable-next-line no-promise-executor-return
|
|
31
|
-
const sleep = (ms = 0) => ms && new Promise((resolve) => setTimeout(resolve, ms));
|
|
32
|
-
const retry = async (fn, { retries, retryIntervalMs, nonRetryable, nonRetryableSilently, }) => {
|
|
33
|
-
let currentRetries = retries;
|
|
34
|
-
try {
|
|
35
|
-
return await fn();
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
if (nonRetryableSilently && nonRetryableSilently(error))
|
|
39
|
-
return undefined;
|
|
40
|
-
if (nonRetryable && nonRetryable(error))
|
|
41
|
-
throw error;
|
|
42
|
-
if (currentRetries !== undefined) {
|
|
43
|
-
if (currentRetries <= 0) {
|
|
44
|
-
throw error;
|
|
45
|
-
}
|
|
46
|
-
currentRetries -= 1;
|
|
47
|
-
}
|
|
48
|
-
await sleep(retryIntervalMs);
|
|
49
|
-
return retry(fn, {
|
|
50
|
-
retries: currentRetries,
|
|
51
|
-
retryIntervalMs,
|
|
52
|
-
nonRetryable,
|
|
53
|
-
nonRetryableSilently,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export { retry as r, useInterval as u };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,bI as e}from"./index-9a5fbaa1.js";function t(t,n){const a=r.useRef(t),s=r.useRef(0);return e((()=>{a.current=t}),[t]),r.useEffect((()=>{if(n||0===n)return s.current=setInterval((()=>a.current()),n),()=>{clearInterval(s.current)}}),[n]),()=>{s.current&&clearInterval(s.current)}}const n=async(r,{retries:e,retryIntervalMs:t,nonRetryable:a,nonRetryableSilently:s})=>{let i=e;try{return await r()}catch(e){if(s&&s(e))return;if(a&&a(e))throw e;if(void 0!==i){if(i<=0)throw e;i-=1}return await((r=0)=>r&&new Promise((e=>setTimeout(e,r))))(t),n(r,{retries:i,retryIntervalMs:t,nonRetryable:a,nonRetryableSilently:s})}};export{n as r,t as u};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
2
|
-
import * as url from 'url';
|
|
3
|
-
import { u as useAnalytics } from './index-4511315b.js';
|
|
4
|
-
|
|
5
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
6
|
-
var TransakEvents;
|
|
7
|
-
(function (TransakEvents) {
|
|
8
|
-
/**
|
|
9
|
-
* transak widget initialised
|
|
10
|
-
*/
|
|
11
|
-
TransakEvents["TRANSAK_WIDGET_INITIALISED"] = "TRANSAK_WIDGET_INITIALISED";
|
|
12
|
-
/**
|
|
13
|
-
* transak widget loaded
|
|
14
|
-
*/
|
|
15
|
-
TransakEvents["TRANSAK_WIDGET_OPEN"] = "TRANSAK_WIDGET_OPEN";
|
|
16
|
-
/**
|
|
17
|
-
* order created and awaiting payment from payment
|
|
18
|
-
*/
|
|
19
|
-
TransakEvents["TRANSAK_ORDER_CREATED"] = "TRANSAK_ORDER_CREATED";
|
|
20
|
-
/**
|
|
21
|
-
* order successfully submitted or completed
|
|
22
|
-
*/
|
|
23
|
-
TransakEvents["TRANSAK_ORDER_SUCCESSFUL"] = "TRANSAK_ORDER_SUCCESSFUL";
|
|
24
|
-
/**
|
|
25
|
-
* order processing failed
|
|
26
|
-
*/
|
|
27
|
-
TransakEvents["TRANSAK_ORDER_FAILED"] = "TRANSAK_ORDER_FAILED";
|
|
28
|
-
})(TransakEvents || (TransakEvents = {}));
|
|
29
|
-
var TransakStatuses;
|
|
30
|
-
(function (TransakStatuses) {
|
|
31
|
-
TransakStatuses["PROCESSING"] = "PROCESSING";
|
|
32
|
-
TransakStatuses["COMPLETED"] = "COMPLETED";
|
|
33
|
-
})(TransakStatuses || (TransakStatuses = {}));
|
|
34
|
-
|
|
35
|
-
const TRANSAK_ORIGIN = ['global.transak.com', 'global-stg.transak.com'];
|
|
36
|
-
const FAILED_TO_LOAD_TIMEOUT_IN_MS = 10000;
|
|
37
|
-
const ANALYTICS_EVENTS = {
|
|
38
|
-
[TransakEvents.TRANSAK_WIDGET_OPEN]: {
|
|
39
|
-
screen: 'InputScreen',
|
|
40
|
-
control: 'TransakWidgetOpen',
|
|
41
|
-
controlType: 'IframeEvent',
|
|
42
|
-
},
|
|
43
|
-
[TransakEvents.TRANSAK_ORDER_CREATED]: {
|
|
44
|
-
screen: 'InputScreen',
|
|
45
|
-
control: 'OrderCreated',
|
|
46
|
-
controlType: 'IframeEvent',
|
|
47
|
-
},
|
|
48
|
-
[`${TransakEvents.TRANSAK_ORDER_SUCCESSFUL}${TransakStatuses.PROCESSING}`]: {
|
|
49
|
-
screen: 'OrderInProgress',
|
|
50
|
-
control: 'PaymentProcessing',
|
|
51
|
-
controlType: 'IframeEvent',
|
|
52
|
-
},
|
|
53
|
-
[`${TransakEvents.TRANSAK_ORDER_SUCCESSFUL}${TransakStatuses.COMPLETED}`]: {
|
|
54
|
-
screen: 'Success',
|
|
55
|
-
control: 'PaymentCompleted',
|
|
56
|
-
controlType: 'IframeEvent',
|
|
57
|
-
},
|
|
58
|
-
[TransakEvents.TRANSAK_ORDER_FAILED]: {
|
|
59
|
-
screen: 'Failure',
|
|
60
|
-
control: 'PaymentFailed',
|
|
61
|
-
controlType: 'IframeEvent',
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
const useTransakEvents = (props) => {
|
|
65
|
-
const { track } = useAnalytics();
|
|
66
|
-
const { userJourney, ref, email, userId, isPassportWallet, failedToLoadTimeoutInMs, onFailedToLoad, } = props;
|
|
67
|
-
const [initialised, setInitialsed] = useState(false);
|
|
68
|
-
const failedToLoadTimeout = failedToLoadTimeoutInMs || FAILED_TO_LOAD_TIMEOUT_IN_MS;
|
|
69
|
-
const timeout = useRef(undefined);
|
|
70
|
-
const onInit = (data) => {
|
|
71
|
-
setInitialsed(true);
|
|
72
|
-
clearTimeout(timeout.current);
|
|
73
|
-
timeout.current = undefined;
|
|
74
|
-
props.onInit?.(data);
|
|
75
|
-
};
|
|
76
|
-
const onLoad = () => {
|
|
77
|
-
if (onFailedToLoad === undefined)
|
|
78
|
-
return;
|
|
79
|
-
if (timeout.current === undefined && !initialised) {
|
|
80
|
-
timeout.current = setTimeout(() => {
|
|
81
|
-
if (!initialised)
|
|
82
|
-
onFailedToLoad();
|
|
83
|
-
}, failedToLoadTimeout);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const handleAnalyticsEvent = useCallback((event) => {
|
|
87
|
-
const type = event.event_id;
|
|
88
|
-
const key = [TransakEvents.TRANSAK_ORDER_SUCCESSFUL].includes(type)
|
|
89
|
-
? `${type}${event.data.status}`
|
|
90
|
-
: type;
|
|
91
|
-
const eventData = ANALYTICS_EVENTS?.[key] || {};
|
|
92
|
-
if (Object.keys(eventData).length >= 0) {
|
|
93
|
-
track({
|
|
94
|
-
...eventData,
|
|
95
|
-
userJourney,
|
|
96
|
-
extras: {
|
|
97
|
-
email,
|
|
98
|
-
userId,
|
|
99
|
-
isPassportWallet,
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}, []);
|
|
104
|
-
const handleEvents = useCallback((event) => {
|
|
105
|
-
switch (event.event_id) {
|
|
106
|
-
case TransakEvents.TRANSAK_WIDGET_INITIALISED:
|
|
107
|
-
onInit(event.data);
|
|
108
|
-
break;
|
|
109
|
-
case TransakEvents.TRANSAK_WIDGET_OPEN:
|
|
110
|
-
props.onOpen?.(event.data);
|
|
111
|
-
break;
|
|
112
|
-
case TransakEvents.TRANSAK_ORDER_CREATED:
|
|
113
|
-
props.onOrderCreated?.(event.data);
|
|
114
|
-
break;
|
|
115
|
-
case TransakEvents.TRANSAK_ORDER_SUCCESSFUL:
|
|
116
|
-
if (event.data.status === TransakStatuses.PROCESSING) {
|
|
117
|
-
props.onOrderProcessing?.(event.data);
|
|
118
|
-
}
|
|
119
|
-
if (event.data.status === TransakStatuses.COMPLETED) {
|
|
120
|
-
props.onOrderCompleted?.(event.data);
|
|
121
|
-
}
|
|
122
|
-
break;
|
|
123
|
-
case TransakEvents.TRANSAK_ORDER_FAILED:
|
|
124
|
-
props.onOrderFailed?.(event.data);
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
}, []);
|
|
128
|
-
const handleMessageEvent = useCallback((event) => {
|
|
129
|
-
const host = url.parse(event.origin)?.host?.toLowerCase();
|
|
130
|
-
const isTransakEvent = event.source === ref?.current?.contentWindow
|
|
131
|
-
&& host && TRANSAK_ORIGIN.includes(host);
|
|
132
|
-
if (!isTransakEvent)
|
|
133
|
-
return;
|
|
134
|
-
handleAnalyticsEvent(event.data);
|
|
135
|
-
handleEvents(event.data);
|
|
136
|
-
console.log('@@@ Transak event', event); // eslint-disable-line no-console
|
|
137
|
-
}, [ref]);
|
|
138
|
-
useEffect(() => {
|
|
139
|
-
window.addEventListener('message', handleMessageEvent);
|
|
140
|
-
return () => {
|
|
141
|
-
clearTimeout(timeout.current);
|
|
142
|
-
window.removeEventListener('message', handleMessageEvent);
|
|
143
|
-
};
|
|
144
|
-
}, []);
|
|
145
|
-
return {
|
|
146
|
-
initialised, onLoad,
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export { TRANSAK_ORIGIN as T, useTransakEvents as u };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b4 as e,b5 as t,b6 as r,b7 as n,b8 as a,a as o,r as s}from"./index-9a5fbaa1.js";
|
|
2
|
-
/*! https://mths.be/punycode v1.4.1 by @mathias */var h=2147483647,c=36,i=1,l=26,u=38,p=700,f=72,m=128,d="-",v=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=c-i,g=Math.floor,y=String.fromCharCode;function O(e){throw new RangeError(E[e])}function T(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function S(e,t,r){var n=0;for(e=r?g(e/p):e>>1,e+=g(e/t);e>A*l>>1;n+=c)e=g(e/A);return g(n+(A+1)*e/(e+u))}function I(e){return function(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var a=function(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}((e=e.replace(R,".")).split("."),t).join(".");return n+a}(e,(function(e){return v.test(e)?"xn--"+function(e){var t,r,n,a,o,s,u,p,v,R,E,A,I,b,C,_=[];for(e=function(e){for(var t,r,n=[],a=0,o=e.length;a<o;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<o?56320==(64512&(r=e.charCodeAt(a++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),a--):n.push(t);return n}(e),A=e.length,t=m,r=0,o=f,s=0;s<A;++s)(E=e[s])<128&&_.push(y(E));for(n=a=_.length,a&&_.push(d);n<A;){for(u=h,s=0;s<A;++s)(E=e[s])>=t&&E<u&&(u=E);for(u-t>g((h-r)/(I=n+1))&&O("overflow"),r+=(u-t)*I,t=u,s=0;s<A;++s)if((E=e[s])<t&&++r>h&&O("overflow"),E==t){for(p=r,v=c;!(p<(R=v<=o?i:v>=o+l?l:v-o));v+=c)C=p-R,b=c-R,_.push(y(T(R+C%b,0))),p=g(C/b);_.push(y(T(p,0))),o=S(r,I,n==a),r=0,++n}++r,++t}return _.join("")}(e):e}))}function b(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var C=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function _(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function D(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var L=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t};function N(e,t,r,n){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var o=/\+/g;e=e.split(t);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var h=e.length;s>0&&h>s&&(h=s);for(var c=0;c<h;++c){var i,l,u,p,f=e[c].replace(o,"%20"),m=f.indexOf(r);m>=0?(i=f.substr(0,m),l=f.substr(m+1)):(i=f,l=""),u=decodeURIComponent(i),p=decodeURIComponent(l),b(a,u)?C(a[u])?a[u].push(p):a[u]=[a[u],p]:a[u]=p}return a}var U={parse:B,resolve:function(e,t){return B(e,!1,!0).resolve(t)},resolveObject:function(e,t){return e?B(e,!1,!0).resolveObject(t):t},fileURLToPath:function(e){if("string"==typeof e)e=(new j).parse(e);else if(!(e instanceof j))throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof e+String(e));if("file:"!==e.protocol)throw new TypeError("The URL must be of scheme file");return function(e){const t=e.pathname;for(let e=0;e<t.length;e++)if("%"===t[e]){const r=32|t.codePointAt(e+2);if("2"===t[e+1]&&102===r)throw new TypeError("must not include encoded / characters")}return decodeURIComponent(t)}(e)},format:function(e){r(e)&&(e=Q({},e));return V(e)},Url:j,URL:e.URL,URLSearchParams:e.URLSearchParams};function j(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var w,x,P=/^([a-z0-9.+-]+:)/i,K=/:[0-9]*$/,k=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,q=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),F=["'"].concat(q),G=["%","/","?",";","#"].concat(F),W=["/","?","#"],$=255,M=/^[+a-z0-9A-Z_-]{0,63}$/,z=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,J={javascript:!0,"javascript:":!0},Z={javascript:!0,"javascript:":!0},H={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function B(e,r,n){if(e&&t(e)&&e instanceof j)return e;var a=new j;return a.parse(e,r,n),a}function Q(e,t,n,a){if(!r(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o<t.indexOf("#")?"?":"#",h=t.split(s);h[0]=h[0].replace(/\\/g,"/");var c=t=h.join(s);if(c=c.trim(),!a&&1===t.split("#").length){var i=k.exec(c);if(i)return e.path=c,e.href=c,e.pathname=i[1],i[2]?(e.search=i[2],e.query=n?N(e.search.substr(1)):e.search.substr(1)):n&&(e.search="",e.query={}),e}var l,u,p,f,m=P.exec(c);if(m){var d=(m=m[0]).toLowerCase();e.protocol=d,c=c.substr(m.length)}if(a||m||c.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===c.substr(0,2);!v||m&&Z[m]||(c=c.substr(2),e.slashes=!0)}if(!Z[m]&&(v||m&&!H[m])){var R,E,A=-1;for(l=0;l<W.length;l++)-1!==(u=c.indexOf(W[l]))&&(-1===A||u<A)&&(A=u);for(-1!==(E=-1===A?c.lastIndexOf("@"):c.lastIndexOf("@",A))&&(R=c.slice(0,E),c=c.slice(E+1),e.auth=decodeURIComponent(R)),A=-1,l=0;l<G.length;l++)-1!==(u=c.indexOf(G[l]))&&(-1===A||u<A)&&(A=u);-1===A&&(A=c.length),e.host=c.slice(0,A),c=c.slice(A),X(e),e.hostname=e.hostname||"";var g="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!g){var y=e.hostname.split(/\./);for(l=0,p=y.length;l<p;l++){var O=y[l];if(O&&!O.match(M)){for(var T="",S=0,b=O.length;S<b;S++)O.charCodeAt(S)>127?T+="x":T+=O[S];if(!T.match(M)){var C=y.slice(0,l),_=y.slice(l+1),D=O.match(z);D&&(C.push(D[1]),_.unshift(D[2])),_.length&&(c="/"+_.join(".")+c),e.hostname=C.join(".");break}}}}e.hostname.length>$?e.hostname="":e.hostname=e.hostname.toLowerCase(),g||(e.hostname=I(e.hostname)),f=e.port?":"+e.port:"";var L=e.hostname||"";e.host=L+f,e.href+=e.host,g&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==c[0]&&(c="/"+c))}if(!J[d])for(l=0,p=F.length;l<p;l++){var U=F[l];if(-1!==c.indexOf(U)){var j=encodeURIComponent(U);j===U&&(j=escape(U)),c=c.split(U).join(j)}}var w=c.indexOf("#");-1!==w&&(e.hash=c.substr(w),c=c.slice(0,w));var x=c.indexOf("?");if(-1!==x?(e.search=c.substr(x),e.query=c.substr(x+1),n&&(e.query=N(e.query)),c=c.slice(0,x)):n&&(e.search="",e.query={}),c&&(e.pathname=c),H[d]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){f=e.pathname||"";var K=e.search||"";e.path=f+K}return e.href=V(e),e}function V(e){var r=e.auth||"";r&&(r=(r=encodeURIComponent(r)).replace(/%3A/i,":"),r+="@");var n,a,o,s,h=e.protocol||"",c=e.pathname||"",i=e.hash||"",l=!1,u="";e.host?l=r+e.host:e.hostname&&(l=r+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(l+=":"+e.port)),e.query&&t(e.query)&&Object.keys(e.query).length&&(n=e.query,a=a||"&",o=o||"=",null===n&&(n=void 0),u="object"==typeof n?D(L(n),(function(e){var t=encodeURIComponent(_(e))+o;return C(n[e])?D(n[e],(function(e){return t+encodeURIComponent(_(e))})).join(a):t+encodeURIComponent(_(n[e]))})).join(a):s?encodeURIComponent(_(s))+o+encodeURIComponent(_(n)):"");var p=e.search||u&&"?"+u||"";return h&&":"!==h.substr(-1)&&(h+=":"),e.slashes||(!h||H[h])&&!1!==l?(l="//"+(l||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):l||(l=""),i&&"#"!==i.charAt(0)&&(i="#"+i),p&&"?"!==p.charAt(0)&&(p="?"+p),h+l+(c=c.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(p=p.replace("#","%23"))+i}function X(e){var t=e.host,r=K.exec(t);r&&(":"!==(r=r[0])&&(e.port=r.substr(1)),t=t.substr(0,t.length-r.length)),t&&(e.hostname=t)}j.prototype.parse=function(e,t,r){return Q(this,e,t,r)},j.prototype.format=function(){return V(this)},j.prototype.resolve=function(e){return this.resolveObject(B(e,!1,!0)).format()},j.prototype.resolveObject=function(e){if(r(e)){var t=new j;t.parse(e,!1,!0),e=t}for(var o,s=new j,h=Object.keys(this),c=0;c<h.length;c++){var i=h[c];s[i]=this[i]}if(s.hash=e.hash,""===e.href)return s.href=s.format(),s;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),u=0;u<l.length;u++){var p=l[u];"protocol"!==p&&(s[p]=e[p])}return H[s.protocol]&&s.hostname&&!s.pathname&&(s.path=s.pathname="/"),s.href=s.format(),s}if(e.protocol&&e.protocol!==s.protocol){if(!H[e.protocol]){for(var f=Object.keys(e),m=0;m<f.length;m++){var d=f[m];s[d]=e[d]}return s.href=s.format(),s}if(s.protocol=e.protocol,e.host||Z[e.protocol])s.pathname=e.pathname;else{for(o=(e.pathname||"").split("/");o.length&&!(e.host=o.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),s.pathname=o.join("/")}if(s.search=e.search,s.query=e.query,s.host=e.host||"",s.auth=e.auth,s.hostname=e.hostname||e.host,s.port=e.port,s.pathname||s.search){var v=s.pathname||"",R=s.search||"";s.path=v+R}return s.slashes=s.slashes||e.slashes,s.href=s.format(),s}var E,A=s.pathname&&"/"===s.pathname.charAt(0),g=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=g||A||s.host&&e.pathname,O=y,T=s.pathname&&s.pathname.split("/")||[],S=s.protocol&&!H[s.protocol];if(o=e.pathname&&e.pathname.split("/")||[],S&&(s.hostname="",s.port=null,s.host&&(""===T[0]?T[0]=s.host:T.unshift(s.host)),s.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===o[0]?o[0]=e.host:o.unshift(e.host)),e.host=null),y=y&&(""===o[0]||""===T[0])),g)s.host=e.host||""===e.host?e.host:s.host,s.hostname=e.hostname||""===e.hostname?e.hostname:s.hostname,s.search=e.search,s.query=e.query,T=o;else if(o.length)T||(T=[]),T.pop(),T=T.concat(o),s.search=e.search,s.query=e.query;else if(!n(e.search))return S&&(s.hostname=s.host=T.shift(),(E=!!(s.host&&s.host.indexOf("@")>0)&&s.host.split("@"))&&(s.auth=E.shift(),s.host=s.hostname=E.shift())),s.search=e.search,s.query=e.query,a(s.pathname)&&a(s.search)||(s.path=(s.pathname?s.pathname:"")+(s.search?s.search:"")),s.href=s.format(),s;if(!T.length)return s.pathname=null,s.search?s.path="/"+s.search:s.path=null,s.href=s.format(),s;for(var I=T.slice(-1)[0],b=(s.host||e.host||T.length>1)&&("."===I||".."===I)||""===I,C=0,_=T.length;_>=0;_--)"."===(I=T[_])?T.splice(_,1):".."===I?(T.splice(_,1),C++):C&&(T.splice(_,1),C--);if(!y&&!O)for(;C--;C)T.unshift("..");!y||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),b&&"/"!==T.join("/").substr(-1)&&T.push("");var D=""===T[0]||T[0]&&"/"===T[0].charAt(0);return S&&(s.hostname=s.host=D?"":T.length?T.shift():"",(E=!!(s.host&&s.host.indexOf("@")>0)&&s.host.split("@"))&&(s.auth=E.shift(),s.host=s.hostname=E.shift())),(y=y||s.host&&T.length)&&!D&&T.unshift(""),T.length?s.pathname=T.join("/"):(s.pathname=null,s.path=null),a(s.pathname)&&a(s.search)||(s.path=(s.pathname?s.pathname:"")+(s.search?s.search:"")),s.auth=e.auth||s.auth,s.slashes=s.slashes||e.slashes,s.href=s.format(),s},j.prototype.parseHost=function(){return X(this)},function(e){e.TRANSAK_WIDGET_INITIALISED="TRANSAK_WIDGET_INITIALISED",e.TRANSAK_WIDGET_OPEN="TRANSAK_WIDGET_OPEN",e.TRANSAK_ORDER_CREATED="TRANSAK_ORDER_CREATED",e.TRANSAK_ORDER_SUCCESSFUL="TRANSAK_ORDER_SUCCESSFUL",e.TRANSAK_ORDER_FAILED="TRANSAK_ORDER_FAILED"}(w||(w={})),function(e){e.PROCESSING="PROCESSING",e.COMPLETED="COMPLETED"}(x||(x={}));const Y=["global.transak.com","global-stg.transak.com"],ee={[w.TRANSAK_WIDGET_OPEN]:{screen:"InputScreen",control:"TransakWidgetOpen",controlType:"IframeEvent"},[w.TRANSAK_ORDER_CREATED]:{screen:"InputScreen",control:"OrderCreated",controlType:"IframeEvent"},[`${w.TRANSAK_ORDER_SUCCESSFUL}${x.PROCESSING}`]:{screen:"OrderInProgress",control:"PaymentProcessing",controlType:"IframeEvent"},[`${w.TRANSAK_ORDER_SUCCESSFUL}${x.COMPLETED}`]:{screen:"Success",control:"PaymentCompleted",controlType:"IframeEvent"},[w.TRANSAK_ORDER_FAILED]:{screen:"Failure",control:"PaymentFailed",controlType:"IframeEvent"}},te=e=>{const{track:t}=o(),{userJourney:r,ref:n,email:a,userId:h,isPassportWallet:c,failedToLoadTimeoutInMs:i,onFailedToLoad:l}=e,[u,p]=s.useState(!1),f=i||1e4,m=s.useRef(void 0),d=s.useCallback((e=>{const n=e.event_id,o=[w.TRANSAK_ORDER_SUCCESSFUL].includes(n)?`${n}${e.data.status}`:n,s=ee?.[o]||{};Object.keys(s).length>=0&&t({...s,userJourney:r,extras:{email:a,userId:h,isPassportWallet:c}})}),[]),v=s.useCallback((t=>{switch(t.event_id){case w.TRANSAK_WIDGET_INITIALISED:r=t.data,p(!0),clearTimeout(m.current),m.current=void 0,e.onInit?.(r);break;case w.TRANSAK_WIDGET_OPEN:e.onOpen?.(t.data);break;case w.TRANSAK_ORDER_CREATED:e.onOrderCreated?.(t.data);break;case w.TRANSAK_ORDER_SUCCESSFUL:t.data.status===x.PROCESSING&&e.onOrderProcessing?.(t.data),t.data.status===x.COMPLETED&&e.onOrderCompleted?.(t.data);break;case w.TRANSAK_ORDER_FAILED:e.onOrderFailed?.(t.data)}var r}),[]),R=s.useCallback((e=>{const t=B(e.origin)?.host?.toLowerCase();e.source===n?.current?.contentWindow&&t&&Y.includes(t)&&(d(e.data),v(e.data),console.log("@@@ Transak event",e))}),[n]);return s.useEffect((()=>(window.addEventListener("message",R),()=>{clearTimeout(m.current),window.removeEventListener("message",R)})),[]),{initialised:u,onLoad:()=>{void 0!==l&&(void 0!==m.current||u||(m.current=setTimeout((()=>{u||l()}),f)))}}};export{Y as T,te as a,U as u};
|