condenser 1.4 → 1.5.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.
- checksums.yaml +4 -4
- data/lib/condenser/asset.rb +55 -8
- data/lib/condenser/build_cache.rb +2 -0
- data/lib/condenser/cache/file_store.rb +1 -0
- data/lib/condenser/cache/memory_store.rb +1 -0
- data/lib/condenser/cache/null_store.rb +1 -0
- data/lib/condenser/cache_store.rb +1 -0
- data/lib/condenser/context.rb +1 -0
- data/lib/condenser/encoding_utils.rb +2 -0
- data/lib/condenser/environment.rb +2 -0
- data/lib/condenser/errors.rb +2 -0
- data/lib/condenser/export.rb +11 -6
- data/lib/condenser/helpers/parse_helpers.rb +19 -4
- data/lib/condenser/manifest.rb +6 -4
- data/lib/condenser/minifiers/sass_minifier.rb +2 -0
- data/lib/condenser/minifiers/terser_minifier.rb +2 -0
- data/lib/condenser/minifiers/uglify_minifier.rb +2 -0
- data/lib/condenser/pipeline.rb +2 -0
- data/lib/condenser/processors/babel_processor.rb +11 -2
- data/lib/condenser/processors/css_media_combiner_processor.rb +7 -5
- data/lib/condenser/processors/js_analyzer.rb +109 -37
- data/lib/condenser/processors/node_processor.rb +2 -0
- data/lib/condenser/processors/purgecss_processor.rb +2 -0
- data/lib/condenser/processors/rollup_processor.rb +289 -136
- data/lib/condenser/resolve.rb +15 -7
- data/lib/condenser/server.rb +22 -20
- data/lib/condenser/templating_engine/ejs.rb +2 -0
- data/lib/condenser/templating_engine/erb.rb +2 -0
- data/lib/condenser/transformers/dart_sass_transformer.rb +5 -3
- data/lib/condenser/transformers/jst_transformer.rb +2 -0
- data/lib/condenser/transformers/sass/functions.rb +2 -0
- data/lib/condenser/transformers/sass/importer.rb +2 -0
- data/lib/condenser/transformers/sass.rb +2 -0
- data/lib/condenser/transformers/sass_transformer.rb +2 -0
- data/lib/condenser/transformers/svg_transformer/base.rb +2 -0
- data/lib/condenser/transformers/svg_transformer/tag.rb +2 -0
- data/lib/condenser/transformers/svg_transformer/template.rb +3 -1
- data/lib/condenser/transformers/svg_transformer/template_error.rb +2 -0
- data/lib/condenser/transformers/svg_transformer/value.rb +2 -0
- data/lib/condenser/transformers/svg_transformer/var_generator.rb +2 -0
- data/lib/condenser/transformers/svg_transformer.rb +2 -0
- data/lib/condenser/utils.rb +2 -0
- data/lib/condenser/version.rb +3 -1
- data/lib/condenser/writers/brotli_writer.rb +2 -0
- data/lib/condenser/writers/file_writer.rb +2 -0
- data/lib/condenser/writers/zlib_writer.rb +2 -0
- data/lib/condenser.rb +2 -0
- data/lib/rake/condensertask.rb +2 -0
- data/test/cache_test.rb +14 -14
- data/test/manifest_test.rb +17 -2
- data/test/postprocessors/css_media_combiner_test.rb +9 -12
- data/test/preprocessor/babel_test.rb +843 -327
- data/test/preprocessor/js_analyzer_test.rb +174 -5
- data/test/processors/rollup/dynamic_import_test.rb +358 -0
- data/test/processors/rollup_test.rb +37 -56
- data/test/resolve_test.rb +4 -9
- data/test/server_test.rb +6 -5
- data/test/transformers/dart_scss_test.rb +2 -2
- data/test/transformers/scss_test.rb +2 -2
- metadata +6 -11
- data/lib/condenser/minifiers/package-lock.json +0 -25
@@ -92,137 +92,230 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
92
92
|
JS
|
93
93
|
|
94
94
|
assert_exported_file 'c.js', 'application/javascript', <<~JS
|
95
|
-
|
96
|
-
'use strict';
|
95
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
97
96
|
|
98
|
-
|
97
|
+
function getDefaultExportFromCjs (x) {
|
98
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
99
|
+
}
|
99
100
|
|
100
|
-
|
101
|
-
|
102
|
-
|
101
|
+
var es_object_assign = {};
|
102
|
+
|
103
|
+
var globalThis_1;
|
104
|
+
var hasRequiredGlobalThis;
|
103
105
|
|
106
|
+
function requireGlobalThis () {
|
107
|
+
if (hasRequiredGlobalThis) return globalThis_1;
|
108
|
+
hasRequiredGlobalThis = 1;
|
104
109
|
var check = function (it) {
|
105
110
|
return it && it.Math === Math && it;
|
106
111
|
};
|
107
112
|
|
108
113
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
109
|
-
|
114
|
+
globalThis_1 =
|
110
115
|
// eslint-disable-next-line es/no-global-this -- safe
|
111
116
|
check(typeof globalThis == 'object' && globalThis) ||
|
112
117
|
check(typeof window == 'object' && window) ||
|
113
118
|
// eslint-disable-next-line no-restricted-globals -- safe
|
114
119
|
check(typeof self == 'object' && self) ||
|
115
120
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
116
|
-
check(typeof
|
121
|
+
check(typeof globalThis_1 == 'object' && globalThis_1) ||
|
117
122
|
// eslint-disable-next-line no-new-func -- fallback
|
118
123
|
(function () { return this; })() || Function('return this')();
|
124
|
+
return globalThis_1;
|
125
|
+
}
|
119
126
|
|
120
|
-
|
127
|
+
var fails;
|
128
|
+
var hasRequiredFails;
|
129
|
+
|
130
|
+
function requireFails () {
|
131
|
+
if (hasRequiredFails) return fails;
|
132
|
+
hasRequiredFails = 1;
|
133
|
+
fails = function (exec) {
|
121
134
|
try {
|
122
135
|
return !!exec();
|
123
136
|
} catch (error) {
|
124
137
|
return true;
|
125
138
|
}
|
126
139
|
};
|
140
|
+
return fails;
|
141
|
+
}
|
142
|
+
|
143
|
+
var functionBindNative;
|
144
|
+
var hasRequiredFunctionBindNative;
|
127
145
|
|
128
|
-
|
146
|
+
function requireFunctionBindNative () {
|
147
|
+
if (hasRequiredFunctionBindNative) return functionBindNative;
|
148
|
+
hasRequiredFunctionBindNative = 1;
|
149
|
+
var fails = requireFails();
|
129
150
|
|
130
|
-
|
151
|
+
functionBindNative = !fails(function () {
|
131
152
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
132
153
|
var test = (function () { /* empty */ }).bind();
|
133
154
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
134
155
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
135
156
|
});
|
157
|
+
return functionBindNative;
|
158
|
+
}
|
159
|
+
|
160
|
+
var functionApply;
|
161
|
+
var hasRequiredFunctionApply;
|
136
162
|
|
137
|
-
|
163
|
+
function requireFunctionApply () {
|
164
|
+
if (hasRequiredFunctionApply) return functionApply;
|
165
|
+
hasRequiredFunctionApply = 1;
|
166
|
+
var NATIVE_BIND = requireFunctionBindNative();
|
138
167
|
|
139
|
-
var FunctionPrototype
|
140
|
-
var apply
|
141
|
-
var call
|
168
|
+
var FunctionPrototype = Function.prototype;
|
169
|
+
var apply = FunctionPrototype.apply;
|
170
|
+
var call = FunctionPrototype.call;
|
142
171
|
|
143
|
-
// eslint-disable-next-line es/no-reflect -- safe
|
144
|
-
|
145
|
-
return call
|
172
|
+
// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe
|
173
|
+
functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
|
174
|
+
return call.apply(apply, arguments);
|
146
175
|
});
|
176
|
+
return functionApply;
|
177
|
+
}
|
178
|
+
|
179
|
+
var functionUncurryThis;
|
180
|
+
var hasRequiredFunctionUncurryThis;
|
147
181
|
|
148
|
-
|
182
|
+
function requireFunctionUncurryThis () {
|
183
|
+
if (hasRequiredFunctionUncurryThis) return functionUncurryThis;
|
184
|
+
hasRequiredFunctionUncurryThis = 1;
|
185
|
+
var NATIVE_BIND = requireFunctionBindNative();
|
149
186
|
|
150
187
|
var FunctionPrototype = Function.prototype;
|
151
|
-
var call
|
152
|
-
|
188
|
+
var call = FunctionPrototype.call;
|
189
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
190
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
|
153
191
|
|
154
|
-
|
192
|
+
functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
155
193
|
return function () {
|
156
|
-
return call
|
194
|
+
return call.apply(fn, arguments);
|
157
195
|
};
|
158
196
|
};
|
197
|
+
return functionUncurryThis;
|
198
|
+
}
|
199
|
+
|
200
|
+
var classofRaw;
|
201
|
+
var hasRequiredClassofRaw;
|
159
202
|
|
160
|
-
|
203
|
+
function requireClassofRaw () {
|
204
|
+
if (hasRequiredClassofRaw) return classofRaw;
|
205
|
+
hasRequiredClassofRaw = 1;
|
206
|
+
var uncurryThis = requireFunctionUncurryThis();
|
161
207
|
|
162
|
-
var toString
|
163
|
-
var stringSlice = uncurryThis
|
208
|
+
var toString = uncurryThis({}.toString);
|
209
|
+
var stringSlice = uncurryThis(''.slice);
|
164
210
|
|
165
|
-
|
166
|
-
return stringSlice(toString
|
211
|
+
classofRaw = function (it) {
|
212
|
+
return stringSlice(toString(it), 8, -1);
|
167
213
|
};
|
214
|
+
return classofRaw;
|
215
|
+
}
|
216
|
+
|
217
|
+
var functionUncurryThisClause;
|
218
|
+
var hasRequiredFunctionUncurryThisClause;
|
168
219
|
|
169
|
-
|
170
|
-
|
220
|
+
function requireFunctionUncurryThisClause () {
|
221
|
+
if (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause;
|
222
|
+
hasRequiredFunctionUncurryThisClause = 1;
|
223
|
+
var classofRaw = requireClassofRaw();
|
224
|
+
var uncurryThis = requireFunctionUncurryThis();
|
171
225
|
|
172
|
-
|
226
|
+
functionUncurryThisClause = function (fn) {
|
173
227
|
// Nashorn bug:
|
174
228
|
// https://github.com/zloirock/core-js/issues/1128
|
175
229
|
// https://github.com/zloirock/core-js/issues/1130
|
176
|
-
if (classofRaw(fn) === 'Function') return uncurryThis
|
230
|
+
if (classofRaw(fn) === 'Function') return uncurryThis(fn);
|
177
231
|
};
|
232
|
+
return functionUncurryThisClause;
|
233
|
+
}
|
178
234
|
|
235
|
+
var isCallable;
|
236
|
+
var hasRequiredIsCallable;
|
237
|
+
|
238
|
+
function requireIsCallable () {
|
239
|
+
if (hasRequiredIsCallable) return isCallable;
|
240
|
+
hasRequiredIsCallable = 1;
|
179
241
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
180
242
|
var documentAll = typeof document == 'object' && document.all;
|
181
243
|
|
182
244
|
// `IsCallable` abstract operation
|
183
245
|
// https://tc39.es/ecma262/#sec-iscallable
|
184
246
|
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
185
|
-
|
247
|
+
isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
186
248
|
return typeof argument == 'function' || argument === documentAll;
|
187
249
|
} : function (argument) {
|
188
250
|
return typeof argument == 'function';
|
189
251
|
};
|
252
|
+
return isCallable;
|
253
|
+
}
|
190
254
|
|
191
|
-
|
255
|
+
var objectGetOwnPropertyDescriptor = {};
|
192
256
|
|
193
|
-
|
257
|
+
var descriptors;
|
258
|
+
var hasRequiredDescriptors;
|
259
|
+
|
260
|
+
function requireDescriptors () {
|
261
|
+
if (hasRequiredDescriptors) return descriptors;
|
262
|
+
hasRequiredDescriptors = 1;
|
263
|
+
var fails = requireFails();
|
194
264
|
|
195
265
|
// Detect IE8's incomplete defineProperty implementation
|
196
|
-
|
266
|
+
descriptors = !fails(function () {
|
197
267
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
198
268
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
199
269
|
});
|
270
|
+
return descriptors;
|
271
|
+
}
|
200
272
|
|
201
|
-
|
273
|
+
var functionCall;
|
274
|
+
var hasRequiredFunctionCall;
|
202
275
|
|
203
|
-
|
276
|
+
function requireFunctionCall () {
|
277
|
+
if (hasRequiredFunctionCall) return functionCall;
|
278
|
+
hasRequiredFunctionCall = 1;
|
279
|
+
var NATIVE_BIND = requireFunctionBindNative();
|
204
280
|
|
205
|
-
var
|
206
|
-
|
281
|
+
var call = Function.prototype.call;
|
282
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
283
|
+
functionCall = NATIVE_BIND ? call.bind(call) : function () {
|
284
|
+
return call.apply(call, arguments);
|
207
285
|
};
|
286
|
+
return functionCall;
|
287
|
+
}
|
208
288
|
|
209
|
-
|
289
|
+
var objectPropertyIsEnumerable = {};
|
210
290
|
|
291
|
+
var hasRequiredObjectPropertyIsEnumerable;
|
292
|
+
|
293
|
+
function requireObjectPropertyIsEnumerable () {
|
294
|
+
if (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable;
|
295
|
+
hasRequiredObjectPropertyIsEnumerable = 1;
|
211
296
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
212
297
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
213
|
-
var getOwnPropertyDescriptor
|
298
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
214
299
|
|
215
300
|
// Nashorn ~ JDK8 bug
|
216
|
-
var NASHORN_BUG = getOwnPropertyDescriptor
|
301
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
217
302
|
|
218
303
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
219
304
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
220
305
|
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
221
|
-
var descriptor = getOwnPropertyDescriptor
|
306
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
222
307
|
return !!descriptor && descriptor.enumerable;
|
223
308
|
} : $propertyIsEnumerable;
|
309
|
+
return objectPropertyIsEnumerable;
|
310
|
+
}
|
224
311
|
|
225
|
-
|
312
|
+
var createPropertyDescriptor;
|
313
|
+
var hasRequiredCreatePropertyDescriptor;
|
314
|
+
|
315
|
+
function requireCreatePropertyDescriptor () {
|
316
|
+
if (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor;
|
317
|
+
hasRequiredCreatePropertyDescriptor = 1;
|
318
|
+
createPropertyDescriptor = function (bitmap, value) {
|
226
319
|
return {
|
227
320
|
enumerable: !(bitmap & 1),
|
228
321
|
configurable: !(bitmap & 2),
|
@@ -230,80 +323,165 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
230
323
|
value: value
|
231
324
|
};
|
232
325
|
};
|
326
|
+
return createPropertyDescriptor;
|
327
|
+
}
|
233
328
|
|
234
|
-
|
235
|
-
|
236
|
-
var classof = classofRaw$1;
|
329
|
+
var indexedObject;
|
330
|
+
var hasRequiredIndexedObject;
|
237
331
|
|
238
|
-
|
239
|
-
|
332
|
+
function requireIndexedObject () {
|
333
|
+
if (hasRequiredIndexedObject) return indexedObject;
|
334
|
+
hasRequiredIndexedObject = 1;
|
335
|
+
var uncurryThis = requireFunctionUncurryThis();
|
336
|
+
var fails = requireFails();
|
337
|
+
var classof = requireClassofRaw();
|
338
|
+
|
339
|
+
var $Object = Object;
|
340
|
+
var split = uncurryThis(''.split);
|
240
341
|
|
241
342
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
242
|
-
|
343
|
+
indexedObject = fails(function () {
|
243
344
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
244
345
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
245
|
-
return !$Object
|
346
|
+
return !$Object('z').propertyIsEnumerable(0);
|
246
347
|
}) ? function (it) {
|
247
|
-
return classof(it) === 'String' ? split(it, '') : $Object
|
248
|
-
} : $Object
|
348
|
+
return classof(it) === 'String' ? split(it, '') : $Object(it);
|
349
|
+
} : $Object;
|
350
|
+
return indexedObject;
|
351
|
+
}
|
249
352
|
|
353
|
+
var isNullOrUndefined;
|
354
|
+
var hasRequiredIsNullOrUndefined;
|
355
|
+
|
356
|
+
function requireIsNullOrUndefined () {
|
357
|
+
if (hasRequiredIsNullOrUndefined) return isNullOrUndefined;
|
358
|
+
hasRequiredIsNullOrUndefined = 1;
|
250
359
|
// we can't use just `it == null` since of `document.all` special case
|
251
360
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
252
|
-
|
361
|
+
isNullOrUndefined = function (it) {
|
253
362
|
return it === null || it === undefined;
|
254
363
|
};
|
364
|
+
return isNullOrUndefined;
|
365
|
+
}
|
255
366
|
|
256
|
-
|
367
|
+
var requireObjectCoercible;
|
368
|
+
var hasRequiredRequireObjectCoercible;
|
257
369
|
|
258
|
-
|
370
|
+
function requireRequireObjectCoercible () {
|
371
|
+
if (hasRequiredRequireObjectCoercible) return requireObjectCoercible;
|
372
|
+
hasRequiredRequireObjectCoercible = 1;
|
373
|
+
var isNullOrUndefined = requireIsNullOrUndefined();
|
374
|
+
|
375
|
+
var $TypeError = TypeError;
|
259
376
|
|
260
377
|
// `RequireObjectCoercible` abstract operation
|
261
378
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
262
|
-
|
263
|
-
if (isNullOrUndefined
|
379
|
+
requireObjectCoercible = function (it) {
|
380
|
+
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
|
264
381
|
return it;
|
265
382
|
};
|
383
|
+
return requireObjectCoercible;
|
384
|
+
}
|
266
385
|
|
386
|
+
var toIndexedObject;
|
387
|
+
var hasRequiredToIndexedObject;
|
388
|
+
|
389
|
+
function requireToIndexedObject () {
|
390
|
+
if (hasRequiredToIndexedObject) return toIndexedObject;
|
391
|
+
hasRequiredToIndexedObject = 1;
|
267
392
|
// toObject with fallback for non-array-like ES3 strings
|
268
|
-
var IndexedObject
|
269
|
-
var requireObjectCoercible
|
393
|
+
var IndexedObject = requireIndexedObject();
|
394
|
+
var requireObjectCoercible = requireRequireObjectCoercible();
|
270
395
|
|
271
|
-
|
272
|
-
return IndexedObject
|
396
|
+
toIndexedObject = function (it) {
|
397
|
+
return IndexedObject(requireObjectCoercible(it));
|
273
398
|
};
|
399
|
+
return toIndexedObject;
|
400
|
+
}
|
401
|
+
|
402
|
+
var isObject;
|
403
|
+
var hasRequiredIsObject;
|
274
404
|
|
275
|
-
|
405
|
+
function requireIsObject () {
|
406
|
+
if (hasRequiredIsObject) return isObject;
|
407
|
+
hasRequiredIsObject = 1;
|
408
|
+
var isCallable = requireIsCallable();
|
276
409
|
|
277
|
-
|
278
|
-
return typeof it == 'object' ? it !== null : isCallable
|
410
|
+
isObject = function (it) {
|
411
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
279
412
|
};
|
413
|
+
return isObject;
|
414
|
+
}
|
280
415
|
|
281
|
-
|
416
|
+
var path;
|
417
|
+
var hasRequiredPath;
|
282
418
|
|
283
|
-
|
284
|
-
|
285
|
-
|
419
|
+
function requirePath () {
|
420
|
+
if (hasRequiredPath) return path;
|
421
|
+
hasRequiredPath = 1;
|
422
|
+
path = {};
|
423
|
+
return path;
|
424
|
+
}
|
425
|
+
|
426
|
+
var getBuiltIn;
|
427
|
+
var hasRequiredGetBuiltIn;
|
428
|
+
|
429
|
+
function requireGetBuiltIn () {
|
430
|
+
if (hasRequiredGetBuiltIn) return getBuiltIn;
|
431
|
+
hasRequiredGetBuiltIn = 1;
|
432
|
+
var path = requirePath();
|
433
|
+
var globalThis = requireGlobalThis();
|
434
|
+
var isCallable = requireIsCallable();
|
286
435
|
|
287
436
|
var aFunction = function (variable) {
|
288
|
-
return isCallable
|
437
|
+
return isCallable(variable) ? variable : undefined;
|
289
438
|
};
|
290
439
|
|
291
|
-
|
292
|
-
return arguments.length < 2 ? aFunction(path
|
293
|
-
: path
|
440
|
+
getBuiltIn = function (namespace, method) {
|
441
|
+
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(globalThis[namespace])
|
442
|
+
: path[namespace] && path[namespace][method] || globalThis[namespace] && globalThis[namespace][method];
|
294
443
|
};
|
444
|
+
return getBuiltIn;
|
445
|
+
}
|
446
|
+
|
447
|
+
var objectIsPrototypeOf;
|
448
|
+
var hasRequiredObjectIsPrototypeOf;
|
449
|
+
|
450
|
+
function requireObjectIsPrototypeOf () {
|
451
|
+
if (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf;
|
452
|
+
hasRequiredObjectIsPrototypeOf = 1;
|
453
|
+
var uncurryThis = requireFunctionUncurryThis();
|
295
454
|
|
296
|
-
|
455
|
+
objectIsPrototypeOf = uncurryThis({}.isPrototypeOf);
|
456
|
+
return objectIsPrototypeOf;
|
457
|
+
}
|
458
|
+
|
459
|
+
var environmentUserAgent;
|
460
|
+
var hasRequiredEnvironmentUserAgent;
|
461
|
+
|
462
|
+
function requireEnvironmentUserAgent () {
|
463
|
+
if (hasRequiredEnvironmentUserAgent) return environmentUserAgent;
|
464
|
+
hasRequiredEnvironmentUserAgent = 1;
|
465
|
+
var globalThis = requireGlobalThis();
|
297
466
|
|
298
|
-
var
|
467
|
+
var navigator = globalThis.navigator;
|
468
|
+
var userAgent = navigator && navigator.userAgent;
|
469
|
+
|
470
|
+
environmentUserAgent = userAgent ? String(userAgent) : '';
|
471
|
+
return environmentUserAgent;
|
472
|
+
}
|
299
473
|
|
300
|
-
|
474
|
+
var environmentV8Version;
|
475
|
+
var hasRequiredEnvironmentV8Version;
|
301
476
|
|
302
|
-
|
303
|
-
|
477
|
+
function requireEnvironmentV8Version () {
|
478
|
+
if (hasRequiredEnvironmentV8Version) return environmentV8Version;
|
479
|
+
hasRequiredEnvironmentV8Version = 1;
|
480
|
+
var globalThis = requireGlobalThis();
|
481
|
+
var userAgent = requireEnvironmentUserAgent();
|
304
482
|
|
305
|
-
var process =
|
306
|
-
var Deno =
|
483
|
+
var process = globalThis.process;
|
484
|
+
var Deno = globalThis.Deno;
|
307
485
|
var versions = process && process.versions || Deno && Deno.version;
|
308
486
|
var v8 = versions && versions.v8;
|
309
487
|
var match, version;
|
@@ -325,333 +503,531 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
325
503
|
}
|
326
504
|
}
|
327
505
|
|
328
|
-
|
506
|
+
environmentV8Version = version;
|
507
|
+
return environmentV8Version;
|
508
|
+
}
|
509
|
+
|
510
|
+
var symbolConstructorDetection;
|
511
|
+
var hasRequiredSymbolConstructorDetection;
|
329
512
|
|
513
|
+
function requireSymbolConstructorDetection () {
|
514
|
+
if (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection;
|
515
|
+
hasRequiredSymbolConstructorDetection = 1;
|
330
516
|
/* eslint-disable es/no-symbol -- required for testing */
|
331
|
-
var V8_VERSION =
|
332
|
-
var fails
|
333
|
-
var
|
517
|
+
var V8_VERSION = requireEnvironmentV8Version();
|
518
|
+
var fails = requireFails();
|
519
|
+
var globalThis = requireGlobalThis();
|
334
520
|
|
335
|
-
var $String
|
521
|
+
var $String = globalThis.String;
|
336
522
|
|
337
523
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
338
|
-
|
524
|
+
symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
|
339
525
|
var symbol = Symbol('symbol detection');
|
340
526
|
// Chrome 38 Symbol has incorrect toString conversion
|
341
527
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
342
528
|
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
343
529
|
// of course, fail.
|
344
|
-
return !$String
|
530
|
+
return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
345
531
|
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
346
532
|
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
347
533
|
});
|
534
|
+
return symbolConstructorDetection;
|
535
|
+
}
|
348
536
|
|
537
|
+
var useSymbolAsUid;
|
538
|
+
var hasRequiredUseSymbolAsUid;
|
539
|
+
|
540
|
+
function requireUseSymbolAsUid () {
|
541
|
+
if (hasRequiredUseSymbolAsUid) return useSymbolAsUid;
|
542
|
+
hasRequiredUseSymbolAsUid = 1;
|
349
543
|
/* eslint-disable es/no-symbol -- required for testing */
|
350
|
-
var NATIVE_SYMBOL
|
544
|
+
var NATIVE_SYMBOL = requireSymbolConstructorDetection();
|
545
|
+
|
546
|
+
useSymbolAsUid = NATIVE_SYMBOL &&
|
547
|
+
!Symbol.sham &&
|
548
|
+
typeof Symbol.iterator == 'symbol';
|
549
|
+
return useSymbolAsUid;
|
550
|
+
}
|
351
551
|
|
352
|
-
|
353
|
-
|
354
|
-
&& typeof Symbol.iterator == 'symbol';
|
552
|
+
var isSymbol;
|
553
|
+
var hasRequiredIsSymbol;
|
355
554
|
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
var
|
555
|
+
function requireIsSymbol () {
|
556
|
+
if (hasRequiredIsSymbol) return isSymbol;
|
557
|
+
hasRequiredIsSymbol = 1;
|
558
|
+
var getBuiltIn = requireGetBuiltIn();
|
559
|
+
var isCallable = requireIsCallable();
|
560
|
+
var isPrototypeOf = requireObjectIsPrototypeOf();
|
561
|
+
var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
|
360
562
|
|
361
|
-
var $Object
|
563
|
+
var $Object = Object;
|
362
564
|
|
363
|
-
|
565
|
+
isSymbol = USE_SYMBOL_AS_UID ? function (it) {
|
364
566
|
return typeof it == 'symbol';
|
365
567
|
} : function (it) {
|
366
568
|
var $Symbol = getBuiltIn('Symbol');
|
367
|
-
return isCallable
|
569
|
+
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
|
368
570
|
};
|
571
|
+
return isSymbol;
|
572
|
+
}
|
369
573
|
|
370
|
-
|
574
|
+
var tryToString;
|
575
|
+
var hasRequiredTryToString;
|
576
|
+
|
577
|
+
function requireTryToString () {
|
578
|
+
if (hasRequiredTryToString) return tryToString;
|
579
|
+
hasRequiredTryToString = 1;
|
580
|
+
var $String = String;
|
371
581
|
|
372
|
-
|
582
|
+
tryToString = function (argument) {
|
373
583
|
try {
|
374
|
-
return $String
|
584
|
+
return $String(argument);
|
375
585
|
} catch (error) {
|
376
586
|
return 'Object';
|
377
587
|
}
|
378
588
|
};
|
589
|
+
return tryToString;
|
590
|
+
}
|
591
|
+
|
592
|
+
var aCallable;
|
593
|
+
var hasRequiredACallable;
|
379
594
|
|
380
|
-
|
381
|
-
|
595
|
+
function requireACallable () {
|
596
|
+
if (hasRequiredACallable) return aCallable;
|
597
|
+
hasRequiredACallable = 1;
|
598
|
+
var isCallable = requireIsCallable();
|
599
|
+
var tryToString = requireTryToString();
|
382
600
|
|
383
|
-
var $TypeError
|
601
|
+
var $TypeError = TypeError;
|
384
602
|
|
385
603
|
// `Assert: IsCallable(argument) is true`
|
386
|
-
|
387
|
-
if (isCallable
|
388
|
-
throw new $TypeError
|
604
|
+
aCallable = function (argument) {
|
605
|
+
if (isCallable(argument)) return argument;
|
606
|
+
throw new $TypeError(tryToString(argument) + ' is not a function');
|
389
607
|
};
|
608
|
+
return aCallable;
|
609
|
+
}
|
610
|
+
|
611
|
+
var getMethod;
|
612
|
+
var hasRequiredGetMethod;
|
390
613
|
|
391
|
-
|
392
|
-
|
614
|
+
function requireGetMethod () {
|
615
|
+
if (hasRequiredGetMethod) return getMethod;
|
616
|
+
hasRequiredGetMethod = 1;
|
617
|
+
var aCallable = requireACallable();
|
618
|
+
var isNullOrUndefined = requireIsNullOrUndefined();
|
393
619
|
|
394
620
|
// `GetMethod` abstract operation
|
395
621
|
// https://tc39.es/ecma262/#sec-getmethod
|
396
|
-
|
622
|
+
getMethod = function (V, P) {
|
397
623
|
var func = V[P];
|
398
|
-
return isNullOrUndefined(func) ? undefined : aCallable
|
624
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
399
625
|
};
|
626
|
+
return getMethod;
|
627
|
+
}
|
628
|
+
|
629
|
+
var ordinaryToPrimitive;
|
630
|
+
var hasRequiredOrdinaryToPrimitive;
|
400
631
|
|
401
|
-
|
402
|
-
|
403
|
-
|
632
|
+
function requireOrdinaryToPrimitive () {
|
633
|
+
if (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive;
|
634
|
+
hasRequiredOrdinaryToPrimitive = 1;
|
635
|
+
var call = requireFunctionCall();
|
636
|
+
var isCallable = requireIsCallable();
|
637
|
+
var isObject = requireIsObject();
|
404
638
|
|
405
|
-
var $TypeError
|
639
|
+
var $TypeError = TypeError;
|
406
640
|
|
407
641
|
// `OrdinaryToPrimitive` abstract operation
|
408
642
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
409
|
-
|
643
|
+
ordinaryToPrimitive = function (input, pref) {
|
410
644
|
var fn, val;
|
411
|
-
if (pref === 'string' && isCallable
|
412
|
-
if (isCallable
|
413
|
-
if (pref !== 'string' && isCallable
|
414
|
-
throw new $TypeError
|
645
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
646
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
|
647
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
648
|
+
throw new $TypeError("Can't convert object to primitive value");
|
415
649
|
};
|
650
|
+
return ordinaryToPrimitive;
|
651
|
+
}
|
416
652
|
|
417
|
-
|
653
|
+
var sharedStore = {exports: {}};
|
418
654
|
|
419
|
-
|
655
|
+
var isPure;
|
656
|
+
var hasRequiredIsPure;
|
657
|
+
|
658
|
+
function requireIsPure () {
|
659
|
+
if (hasRequiredIsPure) return isPure;
|
660
|
+
hasRequiredIsPure = 1;
|
661
|
+
isPure = true;
|
662
|
+
return isPure;
|
663
|
+
}
|
664
|
+
|
665
|
+
var defineGlobalProperty;
|
666
|
+
var hasRequiredDefineGlobalProperty;
|
667
|
+
|
668
|
+
function requireDefineGlobalProperty () {
|
669
|
+
if (hasRequiredDefineGlobalProperty) return defineGlobalProperty;
|
670
|
+
hasRequiredDefineGlobalProperty = 1;
|
671
|
+
var globalThis = requireGlobalThis();
|
420
672
|
|
421
673
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
422
|
-
var defineProperty
|
674
|
+
var defineProperty = Object.defineProperty;
|
423
675
|
|
424
|
-
|
676
|
+
defineGlobalProperty = function (key, value) {
|
425
677
|
try {
|
426
|
-
defineProperty
|
678
|
+
defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
|
427
679
|
} catch (error) {
|
428
|
-
|
680
|
+
globalThis[key] = value;
|
429
681
|
} return value;
|
430
682
|
};
|
683
|
+
return defineGlobalProperty;
|
684
|
+
}
|
431
685
|
|
432
|
-
|
433
|
-
|
686
|
+
var hasRequiredSharedStore;
|
687
|
+
|
688
|
+
function requireSharedStore () {
|
689
|
+
if (hasRequiredSharedStore) return sharedStore.exports;
|
690
|
+
hasRequiredSharedStore = 1;
|
691
|
+
var IS_PURE = requireIsPure();
|
692
|
+
var globalThis = requireGlobalThis();
|
693
|
+
var defineGlobalProperty = requireDefineGlobalProperty();
|
434
694
|
|
435
695
|
var SHARED = '__core-js_shared__';
|
436
|
-
var store
|
696
|
+
var store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
|
437
697
|
|
438
|
-
(store
|
439
|
-
version: '3.
|
440
|
-
mode: 'pure' ,
|
441
|
-
copyright: '© 2014-
|
442
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
698
|
+
(store.versions || (store.versions = [])).push({
|
699
|
+
version: '3.44.0',
|
700
|
+
mode: IS_PURE ? 'pure' : 'global',
|
701
|
+
copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)',
|
702
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE',
|
443
703
|
source: 'https://github.com/zloirock/core-js'
|
444
704
|
});
|
705
|
+
return sharedStore.exports;
|
706
|
+
}
|
445
707
|
|
446
|
-
|
708
|
+
var shared;
|
709
|
+
var hasRequiredShared;
|
447
710
|
|
448
|
-
|
711
|
+
function requireShared () {
|
712
|
+
if (hasRequiredShared) return shared;
|
713
|
+
hasRequiredShared = 1;
|
714
|
+
var store = requireSharedStore();
|
449
715
|
|
450
|
-
|
716
|
+
shared = function (key, value) {
|
451
717
|
return store[key] || (store[key] = value || {});
|
452
718
|
};
|
719
|
+
return shared;
|
720
|
+
}
|
721
|
+
|
722
|
+
var toObject;
|
723
|
+
var hasRequiredToObject;
|
453
724
|
|
454
|
-
|
725
|
+
function requireToObject () {
|
726
|
+
if (hasRequiredToObject) return toObject;
|
727
|
+
hasRequiredToObject = 1;
|
728
|
+
var requireObjectCoercible = requireRequireObjectCoercible();
|
455
729
|
|
456
730
|
var $Object = Object;
|
457
731
|
|
458
732
|
// `ToObject` abstract operation
|
459
733
|
// https://tc39.es/ecma262/#sec-toobject
|
460
|
-
|
734
|
+
toObject = function (argument) {
|
461
735
|
return $Object(requireObjectCoercible(argument));
|
462
736
|
};
|
737
|
+
return toObject;
|
738
|
+
}
|
739
|
+
|
740
|
+
var hasOwnProperty_1;
|
741
|
+
var hasRequiredHasOwnProperty;
|
463
742
|
|
464
|
-
|
465
|
-
|
743
|
+
function requireHasOwnProperty () {
|
744
|
+
if (hasRequiredHasOwnProperty) return hasOwnProperty_1;
|
745
|
+
hasRequiredHasOwnProperty = 1;
|
746
|
+
var uncurryThis = requireFunctionUncurryThis();
|
747
|
+
var toObject = requireToObject();
|
466
748
|
|
467
|
-
var hasOwnProperty = uncurryThis
|
749
|
+
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
|
468
750
|
|
469
751
|
// `HasOwnProperty` abstract operation
|
470
752
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
471
753
|
// eslint-disable-next-line es/no-object-hasown -- safe
|
472
|
-
|
473
|
-
return hasOwnProperty(toObject
|
754
|
+
hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
755
|
+
return hasOwnProperty(toObject(it), key);
|
474
756
|
};
|
757
|
+
return hasOwnProperty_1;
|
758
|
+
}
|
475
759
|
|
476
|
-
|
760
|
+
var uid;
|
761
|
+
var hasRequiredUid;
|
762
|
+
|
763
|
+
function requireUid () {
|
764
|
+
if (hasRequiredUid) return uid;
|
765
|
+
hasRequiredUid = 1;
|
766
|
+
var uncurryThis = requireFunctionUncurryThis();
|
477
767
|
|
478
768
|
var id = 0;
|
479
769
|
var postfix = Math.random();
|
480
|
-
var toString = uncurryThis
|
770
|
+
var toString = uncurryThis(1.1.toString);
|
481
771
|
|
482
|
-
|
772
|
+
uid = function (key) {
|
483
773
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
484
774
|
};
|
775
|
+
return uid;
|
776
|
+
}
|
485
777
|
|
486
|
-
|
487
|
-
|
488
|
-
var hasOwn$3 = hasOwnProperty_1;
|
489
|
-
var uid = uid$1;
|
490
|
-
var NATIVE_SYMBOL = symbolConstructorDetection;
|
491
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
778
|
+
var wellKnownSymbol;
|
779
|
+
var hasRequiredWellKnownSymbol;
|
492
780
|
|
493
|
-
|
781
|
+
function requireWellKnownSymbol () {
|
782
|
+
if (hasRequiredWellKnownSymbol) return wellKnownSymbol;
|
783
|
+
hasRequiredWellKnownSymbol = 1;
|
784
|
+
var globalThis = requireGlobalThis();
|
785
|
+
var shared = requireShared();
|
786
|
+
var hasOwn = requireHasOwnProperty();
|
787
|
+
var uid = requireUid();
|
788
|
+
var NATIVE_SYMBOL = requireSymbolConstructorDetection();
|
789
|
+
var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
|
790
|
+
|
791
|
+
var Symbol = globalThis.Symbol;
|
494
792
|
var WellKnownSymbolsStore = shared('wks');
|
495
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol
|
793
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
|
496
794
|
|
497
|
-
|
498
|
-
if (!hasOwn
|
499
|
-
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn
|
500
|
-
? Symbol
|
795
|
+
wellKnownSymbol = function (name) {
|
796
|
+
if (!hasOwn(WellKnownSymbolsStore, name)) {
|
797
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
|
798
|
+
? Symbol[name]
|
501
799
|
: createWellKnownSymbol('Symbol.' + name);
|
502
800
|
} return WellKnownSymbolsStore[name];
|
503
801
|
};
|
802
|
+
return wellKnownSymbol;
|
803
|
+
}
|
804
|
+
|
805
|
+
var toPrimitive;
|
806
|
+
var hasRequiredToPrimitive;
|
504
807
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
var
|
509
|
-
var
|
510
|
-
var
|
808
|
+
function requireToPrimitive () {
|
809
|
+
if (hasRequiredToPrimitive) return toPrimitive;
|
810
|
+
hasRequiredToPrimitive = 1;
|
811
|
+
var call = requireFunctionCall();
|
812
|
+
var isObject = requireIsObject();
|
813
|
+
var isSymbol = requireIsSymbol();
|
814
|
+
var getMethod = requireGetMethod();
|
815
|
+
var ordinaryToPrimitive = requireOrdinaryToPrimitive();
|
816
|
+
var wellKnownSymbol = requireWellKnownSymbol();
|
511
817
|
|
512
|
-
var $TypeError
|
818
|
+
var $TypeError = TypeError;
|
513
819
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
514
820
|
|
515
821
|
// `ToPrimitive` abstract operation
|
516
822
|
// https://tc39.es/ecma262/#sec-toprimitive
|
517
|
-
|
518
|
-
if (!isObject
|
823
|
+
toPrimitive = function (input, pref) {
|
824
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
519
825
|
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
520
826
|
var result;
|
521
827
|
if (exoticToPrim) {
|
522
828
|
if (pref === undefined) pref = 'default';
|
523
|
-
result = call
|
524
|
-
if (!isObject
|
525
|
-
throw new $TypeError
|
829
|
+
result = call(exoticToPrim, input, pref);
|
830
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
831
|
+
throw new $TypeError("Can't convert object to primitive value");
|
526
832
|
}
|
527
833
|
if (pref === undefined) pref = 'number';
|
528
834
|
return ordinaryToPrimitive(input, pref);
|
529
835
|
};
|
836
|
+
return toPrimitive;
|
837
|
+
}
|
530
838
|
|
531
|
-
|
532
|
-
|
839
|
+
var toPropertyKey;
|
840
|
+
var hasRequiredToPropertyKey;
|
841
|
+
|
842
|
+
function requireToPropertyKey () {
|
843
|
+
if (hasRequiredToPropertyKey) return toPropertyKey;
|
844
|
+
hasRequiredToPropertyKey = 1;
|
845
|
+
var toPrimitive = requireToPrimitive();
|
846
|
+
var isSymbol = requireIsSymbol();
|
533
847
|
|
534
848
|
// `ToPropertyKey` abstract operation
|
535
849
|
// https://tc39.es/ecma262/#sec-topropertykey
|
536
|
-
|
850
|
+
toPropertyKey = function (argument) {
|
537
851
|
var key = toPrimitive(argument, 'string');
|
538
852
|
return isSymbol(key) ? key : key + '';
|
539
853
|
};
|
854
|
+
return toPropertyKey;
|
855
|
+
}
|
856
|
+
|
857
|
+
var documentCreateElement;
|
858
|
+
var hasRequiredDocumentCreateElement;
|
540
859
|
|
541
|
-
|
542
|
-
|
860
|
+
function requireDocumentCreateElement () {
|
861
|
+
if (hasRequiredDocumentCreateElement) return documentCreateElement;
|
862
|
+
hasRequiredDocumentCreateElement = 1;
|
863
|
+
var globalThis = requireGlobalThis();
|
864
|
+
var isObject = requireIsObject();
|
543
865
|
|
544
|
-
var document
|
866
|
+
var document = globalThis.document;
|
545
867
|
// typeof document.createElement is 'object' in old IE
|
546
|
-
var EXISTS = isObject
|
868
|
+
var EXISTS = isObject(document) && isObject(document.createElement);
|
547
869
|
|
548
|
-
|
549
|
-
return EXISTS ? document
|
870
|
+
documentCreateElement = function (it) {
|
871
|
+
return EXISTS ? document.createElement(it) : {};
|
550
872
|
};
|
873
|
+
return documentCreateElement;
|
874
|
+
}
|
875
|
+
|
876
|
+
var ie8DomDefine;
|
877
|
+
var hasRequiredIe8DomDefine;
|
551
878
|
|
552
|
-
|
553
|
-
|
554
|
-
|
879
|
+
function requireIe8DomDefine () {
|
880
|
+
if (hasRequiredIe8DomDefine) return ie8DomDefine;
|
881
|
+
hasRequiredIe8DomDefine = 1;
|
882
|
+
var DESCRIPTORS = requireDescriptors();
|
883
|
+
var fails = requireFails();
|
884
|
+
var createElement = requireDocumentCreateElement();
|
555
885
|
|
556
886
|
// Thanks to IE8 for its funny defineProperty
|
557
|
-
|
887
|
+
ie8DomDefine = !DESCRIPTORS && !fails(function () {
|
558
888
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
559
889
|
return Object.defineProperty(createElement('div'), 'a', {
|
560
890
|
get: function () { return 7; }
|
561
891
|
}).a !== 7;
|
562
892
|
});
|
893
|
+
return ie8DomDefine;
|
894
|
+
}
|
895
|
+
|
896
|
+
var hasRequiredObjectGetOwnPropertyDescriptor;
|
563
897
|
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
var
|
568
|
-
var
|
569
|
-
var
|
570
|
-
var
|
571
|
-
var
|
898
|
+
function requireObjectGetOwnPropertyDescriptor () {
|
899
|
+
if (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor;
|
900
|
+
hasRequiredObjectGetOwnPropertyDescriptor = 1;
|
901
|
+
var DESCRIPTORS = requireDescriptors();
|
902
|
+
var call = requireFunctionCall();
|
903
|
+
var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
|
904
|
+
var createPropertyDescriptor = requireCreatePropertyDescriptor();
|
905
|
+
var toIndexedObject = requireToIndexedObject();
|
906
|
+
var toPropertyKey = requireToPropertyKey();
|
907
|
+
var hasOwn = requireHasOwnProperty();
|
908
|
+
var IE8_DOM_DEFINE = requireIe8DomDefine();
|
572
909
|
|
573
910
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
574
|
-
var $getOwnPropertyDescriptor
|
911
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
575
912
|
|
576
913
|
// `Object.getOwnPropertyDescriptor` method
|
577
914
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
578
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS
|
579
|
-
O = toIndexedObject
|
580
|
-
P = toPropertyKey
|
581
|
-
if (IE8_DOM_DEFINE
|
582
|
-
return $getOwnPropertyDescriptor
|
915
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
916
|
+
O = toIndexedObject(O);
|
917
|
+
P = toPropertyKey(P);
|
918
|
+
if (IE8_DOM_DEFINE) try {
|
919
|
+
return $getOwnPropertyDescriptor(O, P);
|
583
920
|
} catch (error) { /* empty */ }
|
584
|
-
if (hasOwn
|
921
|
+
if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
585
922
|
};
|
923
|
+
return objectGetOwnPropertyDescriptor;
|
924
|
+
}
|
925
|
+
|
926
|
+
var isForced_1;
|
927
|
+
var hasRequiredIsForced;
|
586
928
|
|
587
|
-
|
588
|
-
|
929
|
+
function requireIsForced () {
|
930
|
+
if (hasRequiredIsForced) return isForced_1;
|
931
|
+
hasRequiredIsForced = 1;
|
932
|
+
var fails = requireFails();
|
933
|
+
var isCallable = requireIsCallable();
|
589
934
|
|
590
935
|
var replacement = /#|\\.prototype\\./;
|
591
936
|
|
592
|
-
var isForced
|
937
|
+
var isForced = function (feature, detection) {
|
593
938
|
var value = data[normalize(feature)];
|
594
939
|
return value === POLYFILL ? true
|
595
940
|
: value === NATIVE ? false
|
596
|
-
: isCallable
|
941
|
+
: isCallable(detection) ? fails(detection)
|
597
942
|
: !!detection;
|
598
943
|
};
|
599
944
|
|
600
|
-
var normalize = isForced
|
945
|
+
var normalize = isForced.normalize = function (string) {
|
601
946
|
return String(string).replace(replacement, '.').toLowerCase();
|
602
947
|
};
|
603
948
|
|
604
|
-
var data = isForced
|
605
|
-
var NATIVE = isForced
|
606
|
-
var POLYFILL = isForced
|
949
|
+
var data = isForced.data = {};
|
950
|
+
var NATIVE = isForced.NATIVE = 'N';
|
951
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
607
952
|
|
608
|
-
|
953
|
+
isForced_1 = isForced;
|
954
|
+
return isForced_1;
|
955
|
+
}
|
609
956
|
|
610
|
-
|
611
|
-
|
612
|
-
var NATIVE_BIND = functionBindNative;
|
957
|
+
var functionBindContext;
|
958
|
+
var hasRequiredFunctionBindContext;
|
613
959
|
|
614
|
-
|
960
|
+
function requireFunctionBindContext () {
|
961
|
+
if (hasRequiredFunctionBindContext) return functionBindContext;
|
962
|
+
hasRequiredFunctionBindContext = 1;
|
963
|
+
var uncurryThis = requireFunctionUncurryThisClause();
|
964
|
+
var aCallable = requireACallable();
|
965
|
+
var NATIVE_BIND = requireFunctionBindNative();
|
966
|
+
|
967
|
+
var bind = uncurryThis(uncurryThis.bind);
|
615
968
|
|
616
969
|
// optional / simple context binding
|
617
|
-
|
970
|
+
functionBindContext = function (fn, that) {
|
618
971
|
aCallable(fn);
|
619
|
-
return that === undefined ? fn : NATIVE_BIND ? bind
|
972
|
+
return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
|
620
973
|
return fn.apply(that, arguments);
|
621
974
|
};
|
622
975
|
};
|
976
|
+
return functionBindContext;
|
977
|
+
}
|
623
978
|
|
624
|
-
|
979
|
+
var objectDefineProperty = {};
|
625
980
|
|
626
|
-
|
627
|
-
|
981
|
+
var v8PrototypeDefineBug;
|
982
|
+
var hasRequiredV8PrototypeDefineBug;
|
983
|
+
|
984
|
+
function requireV8PrototypeDefineBug () {
|
985
|
+
if (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug;
|
986
|
+
hasRequiredV8PrototypeDefineBug = 1;
|
987
|
+
var DESCRIPTORS = requireDescriptors();
|
988
|
+
var fails = requireFails();
|
628
989
|
|
629
990
|
// V8 ~ Chrome 36-
|
630
991
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
631
|
-
|
992
|
+
v8PrototypeDefineBug = DESCRIPTORS && fails(function () {
|
632
993
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
633
994
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
634
995
|
value: 42,
|
635
996
|
writable: false
|
636
997
|
}).prototype !== 42;
|
637
998
|
});
|
999
|
+
return v8PrototypeDefineBug;
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
var anObject;
|
1003
|
+
var hasRequiredAnObject;
|
638
1004
|
|
639
|
-
|
1005
|
+
function requireAnObject () {
|
1006
|
+
if (hasRequiredAnObject) return anObject;
|
1007
|
+
hasRequiredAnObject = 1;
|
1008
|
+
var isObject = requireIsObject();
|
640
1009
|
|
641
1010
|
var $String = String;
|
642
|
-
var $TypeError
|
1011
|
+
var $TypeError = TypeError;
|
643
1012
|
|
644
1013
|
// `Assert: Type(argument) is Object`
|
645
|
-
|
1014
|
+
anObject = function (argument) {
|
646
1015
|
if (isObject(argument)) return argument;
|
647
|
-
throw new $TypeError
|
1016
|
+
throw new $TypeError($String(argument) + ' is not an object');
|
648
1017
|
};
|
1018
|
+
return anObject;
|
1019
|
+
}
|
649
1020
|
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
1021
|
+
var hasRequiredObjectDefineProperty;
|
1022
|
+
|
1023
|
+
function requireObjectDefineProperty () {
|
1024
|
+
if (hasRequiredObjectDefineProperty) return objectDefineProperty;
|
1025
|
+
hasRequiredObjectDefineProperty = 1;
|
1026
|
+
var DESCRIPTORS = requireDescriptors();
|
1027
|
+
var IE8_DOM_DEFINE = requireIe8DomDefine();
|
1028
|
+
var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
|
1029
|
+
var anObject = requireAnObject();
|
1030
|
+
var toPropertyKey = requireToPropertyKey();
|
655
1031
|
|
656
1032
|
var $TypeError = TypeError;
|
657
1033
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
@@ -664,7 +1040,7 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
664
1040
|
|
665
1041
|
// `Object.defineProperty` method
|
666
1042
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
667
|
-
objectDefineProperty.f = DESCRIPTORS
|
1043
|
+
objectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
668
1044
|
anObject(O);
|
669
1045
|
P = toPropertyKey(P);
|
670
1046
|
anObject(Attributes);
|
@@ -690,30 +1066,46 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
690
1066
|
if ('value' in Attributes) O[P] = Attributes.value;
|
691
1067
|
return O;
|
692
1068
|
};
|
1069
|
+
return objectDefineProperty;
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
var createNonEnumerableProperty;
|
1073
|
+
var hasRequiredCreateNonEnumerableProperty;
|
693
1074
|
|
694
|
-
|
695
|
-
|
696
|
-
|
1075
|
+
function requireCreateNonEnumerableProperty () {
|
1076
|
+
if (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty;
|
1077
|
+
hasRequiredCreateNonEnumerableProperty = 1;
|
1078
|
+
var DESCRIPTORS = requireDescriptors();
|
1079
|
+
var definePropertyModule = requireObjectDefineProperty();
|
1080
|
+
var createPropertyDescriptor = requireCreatePropertyDescriptor();
|
697
1081
|
|
698
|
-
|
1082
|
+
createNonEnumerableProperty = DESCRIPTORS ? function (object, key, value) {
|
699
1083
|
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
700
1084
|
} : function (object, key, value) {
|
701
1085
|
object[key] = value;
|
702
1086
|
return object;
|
703
1087
|
};
|
1088
|
+
return createNonEnumerableProperty;
|
1089
|
+
}
|
704
1090
|
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
var
|
712
|
-
var
|
713
|
-
var
|
714
|
-
var
|
1091
|
+
var _export;
|
1092
|
+
var hasRequired_export;
|
1093
|
+
|
1094
|
+
function require_export () {
|
1095
|
+
if (hasRequired_export) return _export;
|
1096
|
+
hasRequired_export = 1;
|
1097
|
+
var globalThis = requireGlobalThis();
|
1098
|
+
var apply = requireFunctionApply();
|
1099
|
+
var uncurryThis = requireFunctionUncurryThisClause();
|
1100
|
+
var isCallable = requireIsCallable();
|
1101
|
+
var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
|
1102
|
+
var isForced = requireIsForced();
|
1103
|
+
var path = requirePath();
|
1104
|
+
var bind = requireFunctionBindContext();
|
1105
|
+
var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
|
1106
|
+
var hasOwn = requireHasOwnProperty();
|
715
1107
|
// add debugging info
|
716
|
-
|
1108
|
+
requireSharedStore();
|
717
1109
|
|
718
1110
|
var wrapConstructor = function (NativeConstructor) {
|
719
1111
|
var Wrapper = function (a, b, c) {
|
@@ -744,15 +1136,15 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
744
1136
|
options.dontCallGetSet - prevent calling a getter on target
|
745
1137
|
options.name - the .name of the function if it does not match the key
|
746
1138
|
*/
|
747
|
-
|
1139
|
+
_export = function (options, source) {
|
748
1140
|
var TARGET = options.target;
|
749
1141
|
var GLOBAL = options.global;
|
750
1142
|
var STATIC = options.stat;
|
751
1143
|
var PROTO = options.proto;
|
752
1144
|
|
753
|
-
var nativeSource = GLOBAL ?
|
1145
|
+
var nativeSource = GLOBAL ? globalThis : STATIC ? globalThis[TARGET] : globalThis[TARGET] && globalThis[TARGET].prototype;
|
754
1146
|
|
755
|
-
var target = GLOBAL ? path
|
1147
|
+
var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
|
756
1148
|
var targetPrototype = target.prototype;
|
757
1149
|
|
758
1150
|
var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
|
@@ -761,7 +1153,7 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
761
1153
|
for (key in source) {
|
762
1154
|
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
763
1155
|
// contains in native
|
764
|
-
USE_NATIVE = !FORCED && nativeSource && hasOwn
|
1156
|
+
USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);
|
765
1157
|
|
766
1158
|
targetProperty = target[key];
|
767
1159
|
|
@@ -776,11 +1168,11 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
776
1168
|
if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue;
|
777
1169
|
|
778
1170
|
// bind methods to global for calling from export context
|
779
|
-
if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty,
|
1171
|
+
if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, globalThis);
|
780
1172
|
// wrap global constructors for prevent changes in this version
|
781
1173
|
else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
|
782
1174
|
// make static versions for prototype methods
|
783
|
-
else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis
|
1175
|
+
else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);
|
784
1176
|
// default case
|
785
1177
|
else resultProperty = sourceProperty;
|
786
1178
|
|
@@ -793,11 +1185,11 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
793
1185
|
|
794
1186
|
if (PROTO) {
|
795
1187
|
VIRTUAL_PROTOTYPE = TARGET + 'Prototype';
|
796
|
-
if (!hasOwn
|
797
|
-
createNonEnumerableProperty(path
|
1188
|
+
if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {
|
1189
|
+
createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
|
798
1190
|
}
|
799
1191
|
// export virtual prototype methods
|
800
|
-
createNonEnumerableProperty(path
|
1192
|
+
createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
|
801
1193
|
// export real prototype methods
|
802
1194
|
if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {
|
803
1195
|
createNonEnumerableProperty(targetPrototype, key, sourceProperty);
|
@@ -805,68 +1197,116 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
805
1197
|
}
|
806
1198
|
}
|
807
1199
|
};
|
1200
|
+
return _export;
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
var mathTrunc;
|
1204
|
+
var hasRequiredMathTrunc;
|
808
1205
|
|
1206
|
+
function requireMathTrunc () {
|
1207
|
+
if (hasRequiredMathTrunc) return mathTrunc;
|
1208
|
+
hasRequiredMathTrunc = 1;
|
809
1209
|
var ceil = Math.ceil;
|
810
1210
|
var floor = Math.floor;
|
811
1211
|
|
812
1212
|
// `Math.trunc` method
|
813
1213
|
// https://tc39.es/ecma262/#sec-math.trunc
|
814
1214
|
// eslint-disable-next-line es/no-math-trunc -- safe
|
815
|
-
|
1215
|
+
mathTrunc = Math.trunc || function trunc(x) {
|
816
1216
|
var n = +x;
|
817
1217
|
return (n > 0 ? floor : ceil)(n);
|
818
1218
|
};
|
1219
|
+
return mathTrunc;
|
1220
|
+
}
|
819
1221
|
|
820
|
-
|
1222
|
+
var toIntegerOrInfinity;
|
1223
|
+
var hasRequiredToIntegerOrInfinity;
|
1224
|
+
|
1225
|
+
function requireToIntegerOrInfinity () {
|
1226
|
+
if (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity;
|
1227
|
+
hasRequiredToIntegerOrInfinity = 1;
|
1228
|
+
var trunc = requireMathTrunc();
|
821
1229
|
|
822
1230
|
// `ToIntegerOrInfinity` abstract operation
|
823
1231
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
824
|
-
|
1232
|
+
toIntegerOrInfinity = function (argument) {
|
825
1233
|
var number = +argument;
|
826
1234
|
// eslint-disable-next-line no-self-compare -- NaN check
|
827
1235
|
return number !== number || number === 0 ? 0 : trunc(number);
|
828
1236
|
};
|
1237
|
+
return toIntegerOrInfinity;
|
1238
|
+
}
|
829
1239
|
|
830
|
-
|
1240
|
+
var toAbsoluteIndex;
|
1241
|
+
var hasRequiredToAbsoluteIndex;
|
1242
|
+
|
1243
|
+
function requireToAbsoluteIndex () {
|
1244
|
+
if (hasRequiredToAbsoluteIndex) return toAbsoluteIndex;
|
1245
|
+
hasRequiredToAbsoluteIndex = 1;
|
1246
|
+
var toIntegerOrInfinity = requireToIntegerOrInfinity();
|
831
1247
|
|
832
1248
|
var max = Math.max;
|
833
|
-
var min
|
1249
|
+
var min = Math.min;
|
834
1250
|
|
835
1251
|
// Helper for a popular repeating case of the spec:
|
836
1252
|
// Let integer be ? ToInteger(index).
|
837
1253
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
838
|
-
|
839
|
-
var integer = toIntegerOrInfinity
|
840
|
-
return integer < 0 ? max(integer + length, 0) : min
|
1254
|
+
toAbsoluteIndex = function (index, length) {
|
1255
|
+
var integer = toIntegerOrInfinity(index);
|
1256
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
841
1257
|
};
|
1258
|
+
return toAbsoluteIndex;
|
1259
|
+
}
|
842
1260
|
|
843
|
-
|
1261
|
+
var toLength;
|
1262
|
+
var hasRequiredToLength;
|
1263
|
+
|
1264
|
+
function requireToLength () {
|
1265
|
+
if (hasRequiredToLength) return toLength;
|
1266
|
+
hasRequiredToLength = 1;
|
1267
|
+
var toIntegerOrInfinity = requireToIntegerOrInfinity();
|
844
1268
|
|
845
1269
|
var min = Math.min;
|
846
1270
|
|
847
1271
|
// `ToLength` abstract operation
|
848
1272
|
// https://tc39.es/ecma262/#sec-tolength
|
849
|
-
|
1273
|
+
toLength = function (argument) {
|
850
1274
|
var len = toIntegerOrInfinity(argument);
|
851
1275
|
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
852
1276
|
};
|
1277
|
+
return toLength;
|
1278
|
+
}
|
853
1279
|
|
854
|
-
|
1280
|
+
var lengthOfArrayLike;
|
1281
|
+
var hasRequiredLengthOfArrayLike;
|
1282
|
+
|
1283
|
+
function requireLengthOfArrayLike () {
|
1284
|
+
if (hasRequiredLengthOfArrayLike) return lengthOfArrayLike;
|
1285
|
+
hasRequiredLengthOfArrayLike = 1;
|
1286
|
+
var toLength = requireToLength();
|
855
1287
|
|
856
1288
|
// `LengthOfArrayLike` abstract operation
|
857
1289
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
858
|
-
|
1290
|
+
lengthOfArrayLike = function (obj) {
|
859
1291
|
return toLength(obj.length);
|
860
1292
|
};
|
1293
|
+
return lengthOfArrayLike;
|
1294
|
+
}
|
1295
|
+
|
1296
|
+
var arrayIncludes;
|
1297
|
+
var hasRequiredArrayIncludes;
|
861
1298
|
|
862
|
-
|
863
|
-
|
864
|
-
|
1299
|
+
function requireArrayIncludes () {
|
1300
|
+
if (hasRequiredArrayIncludes) return arrayIncludes;
|
1301
|
+
hasRequiredArrayIncludes = 1;
|
1302
|
+
var toIndexedObject = requireToIndexedObject();
|
1303
|
+
var toAbsoluteIndex = requireToAbsoluteIndex();
|
1304
|
+
var lengthOfArrayLike = requireLengthOfArrayLike();
|
865
1305
|
|
866
1306
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
867
1307
|
var createMethod = function (IS_INCLUDES) {
|
868
1308
|
return function ($this, el, fromIndex) {
|
869
|
-
var O = toIndexedObject
|
1309
|
+
var O = toIndexedObject($this);
|
870
1310
|
var length = lengthOfArrayLike(O);
|
871
1311
|
if (length === 0) return !IS_INCLUDES && -1;
|
872
1312
|
var index = toAbsoluteIndex(fromIndex, length);
|
@@ -884,7 +1324,7 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
884
1324
|
};
|
885
1325
|
};
|
886
1326
|
|
887
|
-
|
1327
|
+
arrayIncludes = {
|
888
1328
|
// `Array.prototype.includes` method
|
889
1329
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
890
1330
|
includes: createMethod(true),
|
@@ -892,18 +1332,34 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
892
1332
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
893
1333
|
indexOf: createMethod(false)
|
894
1334
|
};
|
1335
|
+
return arrayIncludes;
|
1336
|
+
}
|
1337
|
+
|
1338
|
+
var hiddenKeys;
|
1339
|
+
var hasRequiredHiddenKeys;
|
895
1340
|
|
896
|
-
|
1341
|
+
function requireHiddenKeys () {
|
1342
|
+
if (hasRequiredHiddenKeys) return hiddenKeys;
|
1343
|
+
hasRequiredHiddenKeys = 1;
|
1344
|
+
hiddenKeys = {};
|
1345
|
+
return hiddenKeys;
|
1346
|
+
}
|
1347
|
+
|
1348
|
+
var objectKeysInternal;
|
1349
|
+
var hasRequiredObjectKeysInternal;
|
897
1350
|
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
var
|
902
|
-
var
|
1351
|
+
function requireObjectKeysInternal () {
|
1352
|
+
if (hasRequiredObjectKeysInternal) return objectKeysInternal;
|
1353
|
+
hasRequiredObjectKeysInternal = 1;
|
1354
|
+
var uncurryThis = requireFunctionUncurryThis();
|
1355
|
+
var hasOwn = requireHasOwnProperty();
|
1356
|
+
var toIndexedObject = requireToIndexedObject();
|
1357
|
+
var indexOf = requireArrayIncludes().indexOf;
|
1358
|
+
var hiddenKeys = requireHiddenKeys();
|
903
1359
|
|
904
|
-
var push = uncurryThis
|
1360
|
+
var push = uncurryThis([].push);
|
905
1361
|
|
906
|
-
|
1362
|
+
objectKeysInternal = function (object, names) {
|
907
1363
|
var O = toIndexedObject(object);
|
908
1364
|
var i = 0;
|
909
1365
|
var result = [];
|
@@ -915,9 +1371,17 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
915
1371
|
}
|
916
1372
|
return result;
|
917
1373
|
};
|
1374
|
+
return objectKeysInternal;
|
1375
|
+
}
|
918
1376
|
|
1377
|
+
var enumBugKeys;
|
1378
|
+
var hasRequiredEnumBugKeys;
|
1379
|
+
|
1380
|
+
function requireEnumBugKeys () {
|
1381
|
+
if (hasRequiredEnumBugKeys) return enumBugKeys;
|
1382
|
+
hasRequiredEnumBugKeys = 1;
|
919
1383
|
// IE8- don't enum bug keys
|
920
|
-
|
1384
|
+
enumBugKeys = [
|
921
1385
|
'constructor',
|
922
1386
|
'hasOwnProperty',
|
923
1387
|
'isPrototypeOf',
|
@@ -926,31 +1390,54 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
926
1390
|
'toString',
|
927
1391
|
'valueOf'
|
928
1392
|
];
|
1393
|
+
return enumBugKeys;
|
1394
|
+
}
|
929
1395
|
|
930
|
-
|
931
|
-
|
1396
|
+
var objectKeys;
|
1397
|
+
var hasRequiredObjectKeys;
|
1398
|
+
|
1399
|
+
function requireObjectKeys () {
|
1400
|
+
if (hasRequiredObjectKeys) return objectKeys;
|
1401
|
+
hasRequiredObjectKeys = 1;
|
1402
|
+
var internalObjectKeys = requireObjectKeysInternal();
|
1403
|
+
var enumBugKeys = requireEnumBugKeys();
|
932
1404
|
|
933
1405
|
// `Object.keys` method
|
934
1406
|
// https://tc39.es/ecma262/#sec-object.keys
|
935
1407
|
// eslint-disable-next-line es/no-object-keys -- safe
|
936
|
-
|
1408
|
+
objectKeys = Object.keys || function keys(O) {
|
937
1409
|
return internalObjectKeys(O, enumBugKeys);
|
938
1410
|
};
|
1411
|
+
return objectKeys;
|
1412
|
+
}
|
1413
|
+
|
1414
|
+
var objectGetOwnPropertySymbols = {};
|
939
1415
|
|
940
|
-
|
1416
|
+
var hasRequiredObjectGetOwnPropertySymbols;
|
941
1417
|
|
1418
|
+
function requireObjectGetOwnPropertySymbols () {
|
1419
|
+
if (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols;
|
1420
|
+
hasRequiredObjectGetOwnPropertySymbols = 1;
|
942
1421
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
943
1422
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
1423
|
+
return objectGetOwnPropertySymbols;
|
1424
|
+
}
|
944
1425
|
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
var
|
952
|
-
var
|
953
|
-
var
|
1426
|
+
var objectAssign;
|
1427
|
+
var hasRequiredObjectAssign;
|
1428
|
+
|
1429
|
+
function requireObjectAssign () {
|
1430
|
+
if (hasRequiredObjectAssign) return objectAssign;
|
1431
|
+
hasRequiredObjectAssign = 1;
|
1432
|
+
var DESCRIPTORS = requireDescriptors();
|
1433
|
+
var uncurryThis = requireFunctionUncurryThis();
|
1434
|
+
var call = requireFunctionCall();
|
1435
|
+
var fails = requireFails();
|
1436
|
+
var objectKeys = requireObjectKeys();
|
1437
|
+
var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
|
1438
|
+
var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
|
1439
|
+
var toObject = requireToObject();
|
1440
|
+
var IndexedObject = requireIndexedObject();
|
954
1441
|
|
955
1442
|
// eslint-disable-next-line es/no-object-assign -- safe
|
956
1443
|
var $assign = Object.assign;
|
@@ -960,7 +1447,7 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
960
1447
|
|
961
1448
|
// `Object.assign` method
|
962
1449
|
// https://tc39.es/ecma262/#sec-object.assign
|
963
|
-
|
1450
|
+
objectAssign = !$assign || fails(function () {
|
964
1451
|
// should have correct order of operations (Edge bug)
|
965
1452
|
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
966
1453
|
enumerable: true,
|
@@ -978,6 +1465,7 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
978
1465
|
var symbol = Symbol('assign detection');
|
979
1466
|
var alphabet = 'abcdefghijklmnopqrst';
|
980
1467
|
A[symbol] = 7;
|
1468
|
+
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
981
1469
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
982
1470
|
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
983
1471
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
@@ -998,45 +1486,78 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
998
1486
|
}
|
999
1487
|
} return T;
|
1000
1488
|
} : $assign;
|
1489
|
+
return objectAssign;
|
1490
|
+
}
|
1001
1491
|
|
1002
|
-
|
1003
|
-
|
1492
|
+
var hasRequiredEs_object_assign;
|
1493
|
+
|
1494
|
+
function requireEs_object_assign () {
|
1495
|
+
if (hasRequiredEs_object_assign) return es_object_assign;
|
1496
|
+
hasRequiredEs_object_assign = 1;
|
1497
|
+
var $ = require_export();
|
1498
|
+
var assign = requireObjectAssign();
|
1004
1499
|
|
1005
1500
|
// `Object.assign` method
|
1006
1501
|
// https://tc39.es/ecma262/#sec-object.assign
|
1007
1502
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
1008
|
-
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign
|
1009
|
-
assign: assign
|
1503
|
+
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
1504
|
+
assign: assign
|
1010
1505
|
});
|
1506
|
+
return es_object_assign;
|
1507
|
+
}
|
1011
1508
|
|
1012
|
-
|
1509
|
+
var assign$2;
|
1510
|
+
var hasRequiredAssign$2;
|
1013
1511
|
|
1014
|
-
|
1512
|
+
function requireAssign$2 () {
|
1513
|
+
if (hasRequiredAssign$2) return assign$2;
|
1514
|
+
hasRequiredAssign$2 = 1;
|
1515
|
+
requireEs_object_assign();
|
1516
|
+
var path = requirePath();
|
1015
1517
|
|
1016
|
-
|
1518
|
+
assign$2 = path.Object.assign;
|
1519
|
+
return assign$2;
|
1520
|
+
}
|
1017
1521
|
|
1018
|
-
|
1522
|
+
var assign$1;
|
1523
|
+
var hasRequiredAssign$1;
|
1019
1524
|
|
1020
|
-
|
1525
|
+
function requireAssign$1 () {
|
1526
|
+
if (hasRequiredAssign$1) return assign$1;
|
1527
|
+
hasRequiredAssign$1 = 1;
|
1528
|
+
var parent = requireAssign$2();
|
1021
1529
|
|
1022
|
-
|
1530
|
+
assign$1 = parent;
|
1531
|
+
return assign$1;
|
1532
|
+
}
|
1023
1533
|
|
1024
|
-
|
1025
|
-
|
1026
|
-
a: 1
|
1027
|
-
}));
|
1028
|
-
}
|
1534
|
+
var assign;
|
1535
|
+
var hasRequiredAssign;
|
1029
1536
|
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1537
|
+
function requireAssign () {
|
1538
|
+
if (hasRequiredAssign) return assign;
|
1539
|
+
hasRequiredAssign = 1;
|
1540
|
+
assign = requireAssign$1();
|
1541
|
+
return assign;
|
1542
|
+
}
|
1035
1543
|
|
1036
|
-
|
1037
|
-
|
1544
|
+
var assignExports = requireAssign();
|
1545
|
+
const _Object$assign = /*@__PURE__*/getDefaultExportFromCjs(assignExports);
|
1038
1546
|
|
1039
|
-
|
1547
|
+
function a () {
|
1548
|
+
console.log(_Object$assign({}, {
|
1549
|
+
a: 1
|
1550
|
+
}));
|
1551
|
+
}
|
1552
|
+
|
1553
|
+
function b () {
|
1554
|
+
console.log(_Object$assign({}, {
|
1555
|
+
b: 1
|
1556
|
+
}));
|
1557
|
+
}
|
1558
|
+
|
1559
|
+
a();
|
1560
|
+
b();
|
1040
1561
|
JS
|
1041
1562
|
end
|
1042
1563
|
|
@@ -1053,17 +1574,12 @@ class CondenserBabelTest < ActiveSupport::TestCase
|
|
1053
1574
|
JS
|
1054
1575
|
|
1055
1576
|
assert_exported_file 'name.js', 'application/javascript', <<~JS
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
var d = {};
|
1064
|
-
console.log(x(d === null || d === void 0 ? void 0 : d.z));
|
1065
|
-
|
1066
|
-
})();
|
1577
|
+
function x(y) {
|
1578
|
+
return y === null || y === void 0 ? void 0 : y.z;
|
1579
|
+
}
|
1580
|
+
|
1581
|
+
var d = {};
|
1582
|
+
console.log(x(d === null || d === void 0 ? void 0 : d.z));
|
1067
1583
|
JS
|
1068
1584
|
|
1069
1585
|
end
|