@salla.sa/twilight-components 2.11.84 → 2.11.86
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/cjs/_commonjsHelpers-f57e29ee.js +256 -0
- package/dist/cjs/{app-globals-e7da6d6d.js → app-globals-bf20263f.js} +2008 -41
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-button_37.cjs.entry.js +8 -4
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +5 -1
- package/dist/components/index.js +2007 -39
- package/dist/components/salla-localization-modal.js +5 -1
- package/dist/components/salla-quick-buy2.js +229 -3
- package/dist/esm/_commonjsHelpers-a7c4abac.js +250 -0
- package/dist/esm/{app-globals-03a8e704.js → app-globals-30874674.js} +2007 -40
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-button_37.entry.js +8 -4
- package/dist/esm/twilight.js +2 -2
- package/dist/esm-es5/_commonjsHelpers-a7c4abac.js +4 -0
- package/dist/esm-es5/app-globals-30874674.js +30 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-button_37.entry.js +2 -2
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/{p-a6a5e6bc.system.entry.js → p-0d221d45.system.entry.js} +9 -9
- package/dist/twilight/p-71b1ddca.js +24 -0
- package/dist/twilight/{p-2845b9fd.system.js → p-7f520307.system.js} +1 -1
- package/dist/twilight/p-854e2c89.system.js +30 -0
- package/dist/twilight/p-99ed8fff.system.js +4 -0
- package/dist/twilight/p-ce54db8d.js +4 -0
- package/dist/twilight/p-df0e0ea8.entry.js +36 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/package.json +6 -6
- package/dist/cjs/_commonjsHelpers-691dd63b.js +0 -28
- package/dist/esm/_commonjsHelpers-1415ffd3.js +0 -24
- package/dist/esm-es5/_commonjsHelpers-1415ffd3.js +0 -4
- package/dist/esm-es5/app-globals-03a8e704.js +0 -24
- package/dist/twilight/p-104838c8.js +0 -24
- package/dist/twilight/p-31871b97.entry.js +0 -36
- package/dist/twilight/p-67b3841e.system.js +0 -24
- package/dist/twilight/p-9beb6b7b.system.js +0 -4
- package/dist/twilight/p-f84bae34.js +0 -4
|
@@ -107,7 +107,11 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
107
107
|
})
|
|
108
108
|
.then(() => this.btn.stop())
|
|
109
109
|
.then(() => this.close())
|
|
110
|
-
.then(() =>
|
|
110
|
+
.then(() => {
|
|
111
|
+
if (url) {
|
|
112
|
+
window.location.href = url.replace(`/${salla.config.get('user.language_code')}/`, `/${this.language}/`);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
111
115
|
}
|
|
112
116
|
render() {
|
|
113
117
|
return (h("salla-modal", { isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { slot: 'loading' }, h("div", { class: "s-localization-modal-skeleton" }, h("salla-skeleton", { width: '25%', height: '15px' }), h("div", { class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { width: '25%', height: '15px' }), h("div", { class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { height: '40px', width: '100%' }))), !!this.hasError ?
|
|
@@ -4,6 +4,232 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { d as defineCustomElement$1 } from './salla-button2.js';
|
|
6
6
|
|
|
7
|
+
const global$1 = (typeof global !== "undefined" ? global :
|
|
8
|
+
typeof self !== "undefined" ? self :
|
|
9
|
+
typeof window !== "undefined" ? window : {});
|
|
10
|
+
|
|
11
|
+
// shim for using process in browser
|
|
12
|
+
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
|
|
13
|
+
|
|
14
|
+
function defaultSetTimout() {
|
|
15
|
+
throw new Error('setTimeout has not been defined');
|
|
16
|
+
}
|
|
17
|
+
function defaultClearTimeout () {
|
|
18
|
+
throw new Error('clearTimeout has not been defined');
|
|
19
|
+
}
|
|
20
|
+
var cachedSetTimeout = defaultSetTimout;
|
|
21
|
+
var cachedClearTimeout = defaultClearTimeout;
|
|
22
|
+
if (typeof global$1.setTimeout === 'function') {
|
|
23
|
+
cachedSetTimeout = setTimeout;
|
|
24
|
+
}
|
|
25
|
+
if (typeof global$1.clearTimeout === 'function') {
|
|
26
|
+
cachedClearTimeout = clearTimeout;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function runTimeout(fun) {
|
|
30
|
+
if (cachedSetTimeout === setTimeout) {
|
|
31
|
+
//normal enviroments in sane situations
|
|
32
|
+
return setTimeout(fun, 0);
|
|
33
|
+
}
|
|
34
|
+
// if setTimeout wasn't available but was latter defined
|
|
35
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
36
|
+
cachedSetTimeout = setTimeout;
|
|
37
|
+
return setTimeout(fun, 0);
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
41
|
+
return cachedSetTimeout(fun, 0);
|
|
42
|
+
} catch(e){
|
|
43
|
+
try {
|
|
44
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
45
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
46
|
+
} catch(e){
|
|
47
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
48
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
function runClearTimeout(marker) {
|
|
55
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
56
|
+
//normal enviroments in sane situations
|
|
57
|
+
return clearTimeout(marker);
|
|
58
|
+
}
|
|
59
|
+
// if clearTimeout wasn't available but was latter defined
|
|
60
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
61
|
+
cachedClearTimeout = clearTimeout;
|
|
62
|
+
return clearTimeout(marker);
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
66
|
+
return cachedClearTimeout(marker);
|
|
67
|
+
} catch (e){
|
|
68
|
+
try {
|
|
69
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
70
|
+
return cachedClearTimeout.call(null, marker);
|
|
71
|
+
} catch (e){
|
|
72
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
73
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
74
|
+
return cachedClearTimeout.call(this, marker);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
var queue = [];
|
|
82
|
+
var draining = false;
|
|
83
|
+
var currentQueue;
|
|
84
|
+
var queueIndex = -1;
|
|
85
|
+
|
|
86
|
+
function cleanUpNextTick() {
|
|
87
|
+
if (!draining || !currentQueue) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
draining = false;
|
|
91
|
+
if (currentQueue.length) {
|
|
92
|
+
queue = currentQueue.concat(queue);
|
|
93
|
+
} else {
|
|
94
|
+
queueIndex = -1;
|
|
95
|
+
}
|
|
96
|
+
if (queue.length) {
|
|
97
|
+
drainQueue();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function drainQueue() {
|
|
102
|
+
if (draining) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
106
|
+
draining = true;
|
|
107
|
+
|
|
108
|
+
var len = queue.length;
|
|
109
|
+
while(len) {
|
|
110
|
+
currentQueue = queue;
|
|
111
|
+
queue = [];
|
|
112
|
+
while (++queueIndex < len) {
|
|
113
|
+
if (currentQueue) {
|
|
114
|
+
currentQueue[queueIndex].run();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
queueIndex = -1;
|
|
118
|
+
len = queue.length;
|
|
119
|
+
}
|
|
120
|
+
currentQueue = null;
|
|
121
|
+
draining = false;
|
|
122
|
+
runClearTimeout(timeout);
|
|
123
|
+
}
|
|
124
|
+
function nextTick(fun) {
|
|
125
|
+
var args = new Array(arguments.length - 1);
|
|
126
|
+
if (arguments.length > 1) {
|
|
127
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
128
|
+
args[i - 1] = arguments[i];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
queue.push(new Item(fun, args));
|
|
132
|
+
if (queue.length === 1 && !draining) {
|
|
133
|
+
runTimeout(drainQueue);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// v8 likes predictible objects
|
|
137
|
+
function Item(fun, array) {
|
|
138
|
+
this.fun = fun;
|
|
139
|
+
this.array = array;
|
|
140
|
+
}
|
|
141
|
+
Item.prototype.run = function () {
|
|
142
|
+
this.fun.apply(null, this.array);
|
|
143
|
+
};
|
|
144
|
+
var title = 'browser';
|
|
145
|
+
var platform = 'browser';
|
|
146
|
+
var browser = true;
|
|
147
|
+
var env = {};
|
|
148
|
+
var argv = [];
|
|
149
|
+
var version = ''; // empty string to avoid regexp issues
|
|
150
|
+
var versions = {};
|
|
151
|
+
var release = {};
|
|
152
|
+
var config = {};
|
|
153
|
+
|
|
154
|
+
function noop() {}
|
|
155
|
+
|
|
156
|
+
var on = noop;
|
|
157
|
+
var addListener = noop;
|
|
158
|
+
var once = noop;
|
|
159
|
+
var off = noop;
|
|
160
|
+
var removeListener = noop;
|
|
161
|
+
var removeAllListeners = noop;
|
|
162
|
+
var emit = noop;
|
|
163
|
+
|
|
164
|
+
function binding(name) {
|
|
165
|
+
throw new Error('process.binding is not supported');
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function cwd () { return '/' }
|
|
169
|
+
function chdir (dir) {
|
|
170
|
+
throw new Error('process.chdir is not supported');
|
|
171
|
+
}function umask() { return 0; }
|
|
172
|
+
|
|
173
|
+
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
|
|
174
|
+
var performance = global$1.performance || {};
|
|
175
|
+
var performanceNow =
|
|
176
|
+
performance.now ||
|
|
177
|
+
performance.mozNow ||
|
|
178
|
+
performance.msNow ||
|
|
179
|
+
performance.oNow ||
|
|
180
|
+
performance.webkitNow ||
|
|
181
|
+
function(){ return (new Date()).getTime() };
|
|
182
|
+
|
|
183
|
+
// generate timestamp or delta
|
|
184
|
+
// see http://nodejs.org/api/process.html#process_process_hrtime
|
|
185
|
+
function hrtime(previousTimestamp){
|
|
186
|
+
var clocktime = performanceNow.call(performance)*1e-3;
|
|
187
|
+
var seconds = Math.floor(clocktime);
|
|
188
|
+
var nanoseconds = Math.floor((clocktime%1)*1e9);
|
|
189
|
+
if (previousTimestamp) {
|
|
190
|
+
seconds = seconds - previousTimestamp[0];
|
|
191
|
+
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
192
|
+
if (nanoseconds<0) {
|
|
193
|
+
seconds--;
|
|
194
|
+
nanoseconds += 1e9;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return [seconds,nanoseconds]
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
var startTime = new Date();
|
|
201
|
+
function uptime() {
|
|
202
|
+
var currentTime = new Date();
|
|
203
|
+
var dif = currentTime - startTime;
|
|
204
|
+
return dif / 1000;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
var browser$1 = {
|
|
208
|
+
nextTick: nextTick,
|
|
209
|
+
title: title,
|
|
210
|
+
browser: browser,
|
|
211
|
+
env: env,
|
|
212
|
+
argv: argv,
|
|
213
|
+
version: version,
|
|
214
|
+
versions: versions,
|
|
215
|
+
on: on,
|
|
216
|
+
addListener: addListener,
|
|
217
|
+
once: once,
|
|
218
|
+
off: off,
|
|
219
|
+
removeListener: removeListener,
|
|
220
|
+
removeAllListeners: removeAllListeners,
|
|
221
|
+
emit: emit,
|
|
222
|
+
binding: binding,
|
|
223
|
+
cwd: cwd,
|
|
224
|
+
chdir: chdir,
|
|
225
|
+
umask: umask,
|
|
226
|
+
hrtime: hrtime,
|
|
227
|
+
platform: platform,
|
|
228
|
+
release: release,
|
|
229
|
+
config: config,
|
|
230
|
+
uptime: uptime
|
|
231
|
+
};
|
|
232
|
+
|
|
7
233
|
const FullWallet = `<!-- Generated by IcoMoon.io -->
|
|
8
234
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
9
235
|
<title>full-wallet</title>
|
|
@@ -1013,7 +1239,7 @@ function getDefaultAdapter() {
|
|
|
1013
1239
|
if (typeof XMLHttpRequest !== 'undefined') {
|
|
1014
1240
|
// For browsers use XHR adapter
|
|
1015
1241
|
adapter = xhr;
|
|
1016
|
-
} else if (typeof
|
|
1242
|
+
} else if (typeof browser$1 !== 'undefined' && Object.prototype.toString.call(browser$1) === '[object process]') {
|
|
1017
1243
|
// For node use HTTP adapter
|
|
1018
1244
|
adapter = xhr;
|
|
1019
1245
|
}
|
|
@@ -2397,7 +2623,7 @@ window.SallaApplePay = {
|
|
|
2397
2623
|
};
|
|
2398
2624
|
|
|
2399
2625
|
//applePay doesn't allow iframes
|
|
2400
|
-
if (window.ApplePaySession &&
|
|
2626
|
+
if (window.ApplePaySession && window.self === window.top && ApplePaySession.canMakePayments()) {
|
|
2401
2627
|
SallaApplePay.init();
|
|
2402
2628
|
} else {
|
|
2403
2629
|
// You can hide the Apple Pay button easy with add data-show-if-apple-pay-supported to element like <div data-show-if-apple-pay-supported>
|
|
@@ -2606,4 +2832,4 @@ function defineCustomElement() {
|
|
|
2606
2832
|
}
|
|
2607
2833
|
defineCustomElement();
|
|
2608
2834
|
|
|
2609
|
-
export { SallaQuickBuy as S, defineCustomElement as d };
|
|
2835
|
+
export { SallaQuickBuy as S, browser$1 as b, defineCustomElement as d, global$1 as g };
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
const global$1 = (typeof global !== "undefined" ? global :
|
|
5
|
+
typeof self !== "undefined" ? self :
|
|
6
|
+
typeof window !== "undefined" ? window : {});
|
|
7
|
+
|
|
8
|
+
// shim for using process in browser
|
|
9
|
+
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js
|
|
10
|
+
|
|
11
|
+
function defaultSetTimout() {
|
|
12
|
+
throw new Error('setTimeout has not been defined');
|
|
13
|
+
}
|
|
14
|
+
function defaultClearTimeout () {
|
|
15
|
+
throw new Error('clearTimeout has not been defined');
|
|
16
|
+
}
|
|
17
|
+
var cachedSetTimeout = defaultSetTimout;
|
|
18
|
+
var cachedClearTimeout = defaultClearTimeout;
|
|
19
|
+
if (typeof global$1.setTimeout === 'function') {
|
|
20
|
+
cachedSetTimeout = setTimeout;
|
|
21
|
+
}
|
|
22
|
+
if (typeof global$1.clearTimeout === 'function') {
|
|
23
|
+
cachedClearTimeout = clearTimeout;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function runTimeout(fun) {
|
|
27
|
+
if (cachedSetTimeout === setTimeout) {
|
|
28
|
+
//normal enviroments in sane situations
|
|
29
|
+
return setTimeout(fun, 0);
|
|
30
|
+
}
|
|
31
|
+
// if setTimeout wasn't available but was latter defined
|
|
32
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
33
|
+
cachedSetTimeout = setTimeout;
|
|
34
|
+
return setTimeout(fun, 0);
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
38
|
+
return cachedSetTimeout(fun, 0);
|
|
39
|
+
} catch(e){
|
|
40
|
+
try {
|
|
41
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
42
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
43
|
+
} catch(e){
|
|
44
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
45
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
function runClearTimeout(marker) {
|
|
52
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
53
|
+
//normal enviroments in sane situations
|
|
54
|
+
return clearTimeout(marker);
|
|
55
|
+
}
|
|
56
|
+
// if clearTimeout wasn't available but was latter defined
|
|
57
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
58
|
+
cachedClearTimeout = clearTimeout;
|
|
59
|
+
return clearTimeout(marker);
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
63
|
+
return cachedClearTimeout(marker);
|
|
64
|
+
} catch (e){
|
|
65
|
+
try {
|
|
66
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
67
|
+
return cachedClearTimeout.call(null, marker);
|
|
68
|
+
} catch (e){
|
|
69
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
70
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
71
|
+
return cachedClearTimeout.call(this, marker);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
var queue = [];
|
|
79
|
+
var draining = false;
|
|
80
|
+
var currentQueue;
|
|
81
|
+
var queueIndex = -1;
|
|
82
|
+
|
|
83
|
+
function cleanUpNextTick() {
|
|
84
|
+
if (!draining || !currentQueue) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
draining = false;
|
|
88
|
+
if (currentQueue.length) {
|
|
89
|
+
queue = currentQueue.concat(queue);
|
|
90
|
+
} else {
|
|
91
|
+
queueIndex = -1;
|
|
92
|
+
}
|
|
93
|
+
if (queue.length) {
|
|
94
|
+
drainQueue();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function drainQueue() {
|
|
99
|
+
if (draining) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
103
|
+
draining = true;
|
|
104
|
+
|
|
105
|
+
var len = queue.length;
|
|
106
|
+
while(len) {
|
|
107
|
+
currentQueue = queue;
|
|
108
|
+
queue = [];
|
|
109
|
+
while (++queueIndex < len) {
|
|
110
|
+
if (currentQueue) {
|
|
111
|
+
currentQueue[queueIndex].run();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
queueIndex = -1;
|
|
115
|
+
len = queue.length;
|
|
116
|
+
}
|
|
117
|
+
currentQueue = null;
|
|
118
|
+
draining = false;
|
|
119
|
+
runClearTimeout(timeout);
|
|
120
|
+
}
|
|
121
|
+
function nextTick(fun) {
|
|
122
|
+
var args = new Array(arguments.length - 1);
|
|
123
|
+
if (arguments.length > 1) {
|
|
124
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
125
|
+
args[i - 1] = arguments[i];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
queue.push(new Item(fun, args));
|
|
129
|
+
if (queue.length === 1 && !draining) {
|
|
130
|
+
runTimeout(drainQueue);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// v8 likes predictible objects
|
|
134
|
+
function Item(fun, array) {
|
|
135
|
+
this.fun = fun;
|
|
136
|
+
this.array = array;
|
|
137
|
+
}
|
|
138
|
+
Item.prototype.run = function () {
|
|
139
|
+
this.fun.apply(null, this.array);
|
|
140
|
+
};
|
|
141
|
+
var title = 'browser';
|
|
142
|
+
var platform = 'browser';
|
|
143
|
+
var browser = true;
|
|
144
|
+
var env = {};
|
|
145
|
+
var argv = [];
|
|
146
|
+
var version = ''; // empty string to avoid regexp issues
|
|
147
|
+
var versions = {};
|
|
148
|
+
var release = {};
|
|
149
|
+
var config = {};
|
|
150
|
+
|
|
151
|
+
function noop() {}
|
|
152
|
+
|
|
153
|
+
var on = noop;
|
|
154
|
+
var addListener = noop;
|
|
155
|
+
var once = noop;
|
|
156
|
+
var off = noop;
|
|
157
|
+
var removeListener = noop;
|
|
158
|
+
var removeAllListeners = noop;
|
|
159
|
+
var emit = noop;
|
|
160
|
+
|
|
161
|
+
function binding(name) {
|
|
162
|
+
throw new Error('process.binding is not supported');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function cwd () { return '/' }
|
|
166
|
+
function chdir (dir) {
|
|
167
|
+
throw new Error('process.chdir is not supported');
|
|
168
|
+
}function umask() { return 0; }
|
|
169
|
+
|
|
170
|
+
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
|
|
171
|
+
var performance = global$1.performance || {};
|
|
172
|
+
var performanceNow =
|
|
173
|
+
performance.now ||
|
|
174
|
+
performance.mozNow ||
|
|
175
|
+
performance.msNow ||
|
|
176
|
+
performance.oNow ||
|
|
177
|
+
performance.webkitNow ||
|
|
178
|
+
function(){ return (new Date()).getTime() };
|
|
179
|
+
|
|
180
|
+
// generate timestamp or delta
|
|
181
|
+
// see http://nodejs.org/api/process.html#process_process_hrtime
|
|
182
|
+
function hrtime(previousTimestamp){
|
|
183
|
+
var clocktime = performanceNow.call(performance)*1e-3;
|
|
184
|
+
var seconds = Math.floor(clocktime);
|
|
185
|
+
var nanoseconds = Math.floor((clocktime%1)*1e9);
|
|
186
|
+
if (previousTimestamp) {
|
|
187
|
+
seconds = seconds - previousTimestamp[0];
|
|
188
|
+
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
189
|
+
if (nanoseconds<0) {
|
|
190
|
+
seconds--;
|
|
191
|
+
nanoseconds += 1e9;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return [seconds,nanoseconds]
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
var startTime = new Date();
|
|
198
|
+
function uptime() {
|
|
199
|
+
var currentTime = new Date();
|
|
200
|
+
var dif = currentTime - startTime;
|
|
201
|
+
return dif / 1000;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
var browser$1 = {
|
|
205
|
+
nextTick: nextTick,
|
|
206
|
+
title: title,
|
|
207
|
+
browser: browser,
|
|
208
|
+
env: env,
|
|
209
|
+
argv: argv,
|
|
210
|
+
version: version,
|
|
211
|
+
versions: versions,
|
|
212
|
+
on: on,
|
|
213
|
+
addListener: addListener,
|
|
214
|
+
once: once,
|
|
215
|
+
off: off,
|
|
216
|
+
removeListener: removeListener,
|
|
217
|
+
removeAllListeners: removeAllListeners,
|
|
218
|
+
emit: emit,
|
|
219
|
+
binding: binding,
|
|
220
|
+
cwd: cwd,
|
|
221
|
+
chdir: chdir,
|
|
222
|
+
umask: umask,
|
|
223
|
+
hrtime: hrtime,
|
|
224
|
+
platform: platform,
|
|
225
|
+
release: release,
|
|
226
|
+
config: config,
|
|
227
|
+
uptime: uptime
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
231
|
+
|
|
232
|
+
function getDefaultExportFromCjs (x) {
|
|
233
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function createCommonjsModule(fn, basedir, module) {
|
|
237
|
+
return module = {
|
|
238
|
+
path: basedir,
|
|
239
|
+
exports: {},
|
|
240
|
+
require: function (path, base) {
|
|
241
|
+
return commonjsRequire();
|
|
242
|
+
}
|
|
243
|
+
}, fn(module, module.exports), module.exports;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function commonjsRequire () {
|
|
247
|
+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export { createCommonjsModule as a, browser$1 as b, commonjsGlobal as c, getDefaultExportFromCjs as d, global$1 as g };
|