Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.1
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
quiz1 /
node_modules /
core-js /
modules /
[ HOME SHELL ]
Name
Size
Permission
Action
README.md
164
B
-rw-rw-rw-
es.aggregate-error.cause.js
976
B
-rw-rw-rw-
es.aggregate-error.constructor...
2.32
KB
-rw-rw-rw-
es.aggregate-error.js
149
B
-rw-rw-rw-
es.array-buffer.constructor.js
588
B
-rw-rw-rw-
es.array-buffer.detached.js
596
B
-rw-rw-rw-
es.array-buffer.is-view.js
411
B
-rw-rw-rw-
es.array-buffer.slice.js
1.59
KB
-rw-rw-rw-
es.array-buffer.transfer-to-fi...
479
B
-rw-rw-rw-
es.array-buffer.transfer.js
426
B
-rw-rw-rw-
es.array.at.js
733
B
-rw-rw-rw-
es.array.concat.js
2.25
KB
-rw-rw-rw-
es.array.copy-within.js
442
B
-rw-rw-rw-
es.array.every.js
538
B
-rw-rw-rw-
es.array.fill.js
399
B
-rw-rw-rw-
es.array.filter.js
622
B
-rw-rw-rw-
es.array.find-index.js
840
B
-rw-rw-rw-
es.array.find-last-index.js
567
B
-rw-rw-rw-
es.array.find-last.js
527
B
-rw-rw-rw-
es.array.find.js
771
B
-rw-rw-rw-
es.array.flat-map.js
837
B
-rw-rw-rw-
es.array.flat.js
865
B
-rw-rw-rw-
es.array.for-each.js
360
B
-rw-rw-rw-
es.array.from.js
518
B
-rw-rw-rw-
es.array.includes.js
794
B
-rw-rw-rw-
es.array.index-of.js
973
B
-rw-rw-rw-
es.array.is-array.js
235
B
-rw-rw-rw-
es.array.iterator.js
2.55
KB
-rw-rw-rw-
es.array.join.js
739
B
-rw-rw-rw-
es.array.last-index-of.js
413
B
-rw-rw-rw-
es.array.map.js
598
B
-rw-rw-rw-
es.array.of.js
893
B
-rw-rw-rw-
es.array.push.js
1.44
KB
-rw-rw-rw-
es.array.reduce-right.js
901
B
-rw-rw-rw-
es.array.reduce.js
880
B
-rw-rw-rw-
es.array.reverse.js
672
B
-rw-rw-rw-
es.array.slice.js
2.06
KB
-rw-rw-rw-
es.array.some.js
530
B
-rw-rw-rw-
es.array.sort.js
3.22
KB
-rw-rw-rw-
es.array.species.js
171
B
-rw-rw-rw-
es.array.splice.js
2.73
KB
-rw-rw-rw-
es.array.to-reversed.js
547
B
-rw-rw-rw-
es.array.to-sorted.js
958
B
-rw-rw-rw-
es.array.to-spliced.js
1.64
KB
-rw-rw-rw-
es.array.unscopables.flat-map....
292
B
-rw-rw-rw-
es.array.unscopables.flat.js
289
B
-rw-rw-rw-
es.array.unshift.js
1.54
KB
-rw-rw-rw-
es.array.with.js
428
B
-rw-rw-rw-
es.data-view.constructor.js
390
B
-rw-rw-rw-
es.data-view.js
143
B
-rw-rw-rw-
es.date.get-year.js
631
B
-rw-rw-rw-
es.date.now.js
399
B
-rw-rw-rw-
es.date.set-year.js
686
B
-rw-rw-rw-
es.date.to-gmt-string.js
236
B
-rw-rw-rw-
es.date.to-iso-string.js
390
B
-rw-rw-rw-
es.date.to-json.js
774
B
-rw-rw-rw-
es.date.to-primitive.js
561
B
-rw-rw-rw-
es.date.to-string.js
772
B
-rw-rw-rw-
es.error.cause.js
2.56
KB
-rw-rw-rw-
es.error.to-string.js
385
B
-rw-rw-rw-
es.escape.js
1.13
KB
-rw-rw-rw-
es.function.bind.js
391
B
-rw-rw-rw-
es.function.has-instance.js
905
B
-rw-rw-rw-
es.function.name.js
914
B
-rw-rw-rw-
es.global-this.js
272
B
-rw-rw-rw-
es.iterator.constructor.js
2.47
KB
-rw-rw-rw-
es.iterator.drop.js
1.21
KB
-rw-rw-rw-
es.iterator.every.js
738
B
-rw-rw-rw-
es.iterator.filter.js
1.24
KB
-rw-rw-rw-
es.iterator.find.js
736
B
-rw-rw-rw-
es.iterator.flat-map.js
1.51
KB
-rw-rw-rw-
es.iterator.for-each.js
664
B
-rw-rw-rw-
es.iterator.from.js
1013
B
-rw-rw-rw-
es.iterator.map.js
325
B
-rw-rw-rw-
es.iterator.reduce.js
1.06
KB
-rw-rw-rw-
es.iterator.some.js
732
B
-rw-rw-rw-
es.iterator.take.js
1.19
KB
-rw-rw-rw-
es.iterator.to-array.js
562
B
-rw-rw-rw-
es.json.stringify.js
2.98
KB
-rw-rw-rw-
es.json.to-string-tag.js
263
B
-rw-rw-rw-
es.map.constructor.js
350
B
-rw-rw-rw-
es.map.group-by.js
1.21
KB
-rw-rw-rw-
es.map.js
137
B
-rw-rw-rw-
es.math.acosh.js
771
B
-rw-rw-rw-
es.math.asinh.js
538
B
-rw-rw-rw-
es.math.atanh.js
481
B
-rw-rw-rw-
es.math.cbrt.js
334
B
-rw-rw-rw-
es.math.clz32.js
338
B
-rw-rw-rw-
es.math.cosh.js
510
B
-rw-rw-rw-
es.math.expm1.js
321
B
-rw-rw-rw-
es.math.fround.js
228
B
-rw-rw-rw-
es.math.hypot.js
1009
B
-rw-rw-rw-
es.math.imul.js
716
B
-rw-rw-rw-
es.math.log10.js
224
B
-rw-rw-rw-
es.math.log1p.js
222
B
-rw-rw-rw-
es.math.log2.js
256
B
-rw-rw-rw-
es.math.sign.js
218
B
-rw-rw-rw-
es.math.sinh.js
669
B
-rw-rw-rw-
es.math.tanh.js
404
B
-rw-rw-rw-
es.math.to-string-tag.js
198
B
-rw-rw-rw-
es.math.trunc.js
224
B
-rw-rw-rw-
es.number.constructor.js
4.52
KB
-rw-rw-rw-
es.number.epsilon.js
243
B
-rw-rw-rw-
es.number.is-finite.js
261
B
-rw-rw-rw-
es.number.is-integer.js
272
B
-rw-rw-rw-
es.number.is-nan.js
296
B
-rw-rw-rw-
es.number.is-safe-integer.js
397
B
-rw-rw-rw-
es.number.max-safe-integer.js
270
B
-rw-rw-rw-
es.number.min-safe-integer.js
271
B
-rw-rw-rw-
es.number.parse-float.js
381
B
-rw-rw-rw-
es.number.parse-int.js
363
B
-rw-rw-rw-
es.number.to-exponential.js
2.93
KB
-rw-rw-rw-
es.number.to-fixed.js
3.63
KB
-rw-rw-rw-
es.number.to-precision.js
815
B
-rw-rw-rw-
es.object.assign.js
354
B
-rw-rw-rw-
es.object.create.js
346
B
-rw-rw-rw-
es.object.define-getter.js
737
B
-rw-rw-rw-
es.object.define-properties.js
496
B
-rw-rw-rw-
es.object.define-property.js
478
B
-rw-rw-rw-
es.object.define-setter.js
737
B
-rw-rw-rw-
es.object.entries.js
296
B
-rw-rw-rw-
es.object.freeze.js
673
B
-rw-rw-rw-
es.object.from-entries.js
477
B
-rw-rw-rw-
es.object.get-own-property-des...
738
B
-rw-rw-rw-
es.object.get-own-property-des...
1.01
KB
-rw-rw-rw-
es.object.get-own-property-nam...
577
B
-rw-rw-rw-
es.object.get-own-property-sym...
904
B
-rw-rw-rw-
es.object.get-prototype-of.js
673
B
-rw-rw-rw-
es.object.group-by.js
1.43
KB
-rw-rw-rw-
es.object.has-own.js
241
B
-rw-rw-rw-
es.object.is-extensible.js
386
B
-rw-rw-rw-
es.object.is-frozen.js
800
B
-rw-rw-rw-
es.object.is-sealed.js
800
B
-rw-rw-rw-
es.object.is.js
215
B
-rw-rw-rw-
es.object.keys.js
476
B
-rw-rw-rw-
es.object.lookup-getter.js
911
B
-rw-rw-rw-
es.object.lookup-setter.js
911
B
-rw-rw-rw-
es.object.prevent-extensions.j...
783
B
-rw-rw-rw-
es.object.proto.js
1.22
KB
-rw-rw-rw-
es.object.seal.js
653
B
-rw-rw-rw-
es.object.set-prototype-of.js
288
B
-rw-rw-rw-
es.object.to-string.js
411
B
-rw-rw-rw-
es.object.values.js
289
B
-rw-rw-rw-
es.parse-float.js
278
B
-rw-rw-rw-
es.parse-int.js
268
B
-rw-rw-rw-
es.promise.all-settled.js
1.64
KB
-rw-rw-rw-
es.promise.all.js
1.39
KB
-rw-rw-rw-
es.promise.any.js
1.82
KB
-rw-rw-rw-
es.promise.catch.js
1.14
KB
-rw-rw-rw-
es.promise.constructor.js
9.66
KB
-rw-rw-rw-
es.promise.finally.js
1.87
KB
-rw-rw-rw-
es.promise.js
346
B
-rw-rw-rw-
es.promise.race.js
1.02
KB
-rw-rw-rw-
es.promise.reject.js
583
B
-rw-rw-rw-
es.promise.resolve.js
838
B
-rw-rw-rw-
es.promise.try.js
1.28
KB
-rw-rw-rw-
es.promise.with-resolvers.js
522
B
-rw-rw-rw-
es.reflect.apply.js
775
B
-rw-rw-rw-
es.reflect.construct.js
2.25
KB
-rw-rw-rw-
es.reflect.define-property.js
1.09
KB
-rw-rw-rw-
es.reflect.delete-property.js
566
B
-rw-rw-rw-
es.reflect.get-own-property-de...
595
B
-rw-rw-rw-
es.reflect.get-prototype-of.js
535
B
-rw-rw-rw-
es.reflect.get.js
1.07
KB
-rw-rw-rw-
es.reflect.has.js
247
B
-rw-rw-rw-
es.reflect.is-extensible.js
408
B
-rw-rw-rw-
es.reflect.own-keys.js
241
B
-rw-rw-rw-
es.reflect.prevent-extensions....
673
B
-rw-rw-rw-
es.reflect.set-prototype-of.js
647
B
-rw-rw-rw-
es.reflect.set.js
2.27
KB
-rw-rw-rw-
es.reflect.to-string-tag.js
354
B
-rw-rw-rw-
es.regexp.constructor.js
6.69
KB
-rw-rw-rw-
es.regexp.dot-all.js
1006
B
-rw-rw-rw-
es.regexp.exec.js
274
B
-rw-rw-rw-
es.regexp.flags.js
1.56
KB
-rw-rw-rw-
es.regexp.sticky.js
1003
B
-rw-rw-rw-
es.regexp.test.js
1.05
KB
-rw-rw-rw-
es.regexp.to-string.js
1.06
KB
-rw-rw-rw-
es.set.constructor.js
350
B
-rw-rw-rw-
es.set.difference.v2.js
411
B
-rw-rw-rw-
es.set.intersection.v2.js
680
B
-rw-rw-rw-
es.set.is-disjoint-from.v2.js
441
B
-rw-rw-rw-
es.set.is-subset-of.v2.js
413
B
-rw-rw-rw-
es.set.is-superset-of.v2.js
427
B
-rw-rw-rw-
es.set.js
137
B
-rw-rw-rw-
es.set.symmetric-difference.v2...
475
B
-rw-rw-rw-
es.set.union.v2.js
376
B
-rw-rw-rw-
es.string.anchor.js
445
B
-rw-rw-rw-
es.string.at-alternative.js
974
B
-rw-rw-rw-
es.string.big.js
422
B
-rw-rw-rw-
es.string.blink.js
434
B
-rw-rw-rw-
es.string.bold.js
425
B
-rw-rw-rw-
es.string.code-point-at.js
339
B
-rw-rw-rw-
es.string.ends-with.js
1.55
KB
-rw-rw-rw-
es.string.fixed.js
431
B
-rw-rw-rw-
es.string.fontcolor.js
466
B
-rw-rw-rw-
es.string.fontsize.js
458
B
-rw-rw-rw-
es.string.from-code-point.js
1.21
KB
-rw-rw-rw-
es.string.includes.js
857
B
-rw-rw-rw-
es.string.is-well-formed.js
880
B
-rw-rw-rw-
es.string.italics.js
440
B
-rw-rw-rw-
es.string.iterator.js
1.16
KB
-rw-rw-rw-
es.string.link.js
433
B
-rw-rw-rw-
es.string.match-all.js
4.3
KB
-rw-rw-rw-
es.string.match.js
1.81
KB
-rw-rw-rw-
es.string.pad-end.js
482
B
-rw-rw-rw-
es.string.pad-start.js
496
B
-rw-rw-rw-
es.string.raw.js
1012
B
-rw-rw-rw-
es.string.repeat.js
259
B
-rw-rw-rw-
es.string.replace-all.js
2.75
KB
-rw-rw-rw-
es.string.replace.js
5.53
KB
-rw-rw-rw-
es.string.search.js
1.6
KB
-rw-rw-rw-
es.string.small.js
434
B
-rw-rw-rw-
es.string.split.js
4.54
KB
-rw-rw-rw-
es.string.starts-with.js
1.49
KB
-rw-rw-rw-
es.string.strike.js
440
B
-rw-rw-rw-
es.string.sub.js
422
B
-rw-rw-rw-
es.string.substr.js
1.22
KB
-rw-rw-rw-
es.string.sup.js
422
B
-rw-rw-rw-
es.string.to-well-formed.js
1.61
KB
-rw-rw-rw-
es.string.trim-end.js
479
B
-rw-rw-rw-
es.string.trim-left.js
407
B
-rw-rw-rw-
es.string.trim-right.js
399
B
-rw-rw-rw-
es.string.trim-start.js
496
B
-rw-rw-rw-
es.string.trim.js
407
B
-rw-rw-rw-
es.symbol.async-iterator.js
230
B
-rw-rw-rw-
es.symbol.constructor.js
10.77
KB
-rw-rw-rw-
es.symbol.description.js
2.63
KB
-rw-rw-rw-
es.symbol.for.js
919
B
-rw-rw-rw-
es.symbol.has-instance.js
224
B
-rw-rw-rw-
es.symbol.is-concat-spreadable...
245
B
-rw-rw-rw-
es.symbol.iterator.js
215
B
-rw-rw-rw-
es.symbol.js
322
B
-rw-rw-rw-
es.symbol.key-for.js
758
B
-rw-rw-rw-
es.symbol.match-all.js
215
B
-rw-rw-rw-
es.symbol.match.js
206
B
-rw-rw-rw-
es.symbol.replace.js
212
B
-rw-rw-rw-
es.symbol.search.js
209
B
-rw-rw-rw-
es.symbol.species.js
212
B
-rw-rw-rw-
es.symbol.split.js
206
B
-rw-rw-rw-
es.symbol.to-primitive.js
441
B
-rw-rw-rw-
es.symbol.to-string-tag.js
501
B
-rw-rw-rw-
es.symbol.unscopables.js
224
B
-rw-rw-rw-
es.typed-array.at.js
738
B
-rw-rw-rw-
es.typed-array.copy-within.js
713
B
-rw-rw-rw-
es.typed-array.every.js
554
B
-rw-rw-rw-
es.typed-array.fill.js
1.24
KB
-rw-rw-rw-
es.typed-array.filter.js
694
B
-rw-rw-rw-
es.typed-array.find-index.js
580
B
-rw-rw-rw-
es.typed-array.find-last-index...
618
B
-rw-rw-rw-
es.typed-array.find-last.js
583
B
-rw-rw-rw-
es.typed-array.find.js
545
B
-rw-rw-rw-
es.typed-array.float32-array.j...
353
B
-rw-rw-rw-
es.typed-array.float64-array.j...
353
B
-rw-rw-rw-
es.typed-array.for-each.js
561
B
-rw-rw-rw-
es.typed-array.from.js
486
B
-rw-rw-rw-
es.typed-array.includes.js
582
B
-rw-rw-rw-
es.typed-array.index-of.js
575
B
-rw-rw-rw-
es.typed-array.int16-array.js
347
B
-rw-rw-rw-
es.typed-array.int32-array.js
347
B
-rw-rw-rw-
es.typed-array.int8-array.js
344
B
-rw-rw-rw-
es.typed-array.iterator.js
1.97
KB
-rw-rw-rw-
es.typed-array.join.js
521
B
-rw-rw-rw-
es.typed-array.last-index-of.j...
686
B
-rw-rw-rw-
es.typed-array.map.js
689
B
-rw-rw-rw-
es.typed-array.of.js
742
B
-rw-rw-rw-
es.typed-array.reduce-right.js
623
B
-rw-rw-rw-
es.typed-array.reduce.js
592
B
-rw-rw-rw-
es.typed-array.reverse.js
658
B
-rw-rw-rw-
es.typed-array.set.js
1.95
KB
-rw-rw-rw-
es.typed-array.slice.js
948
B
-rw-rw-rw-
es.typed-array.some.js
547
B
-rw-rw-rw-
es.typed-array.sort.js
2.43
KB
-rw-rw-rw-
es.typed-array.subarray.js
904
B
-rw-rw-rw-
es.typed-array.to-locale-strin...
1.15
KB
-rw-rw-rw-
es.typed-array.to-reversed.js
610
B
-rw-rw-rw-
es.typed-array.to-sorted.js
929
B
-rw-rw-rw-
es.typed-array.to-string.js
832
B
-rw-rw-rw-
es.typed-array.uint16-array.js
350
B
-rw-rw-rw-
es.typed-array.uint32-array.js
350
B
-rw-rw-rw-
es.typed-array.uint8-array.js
347
B
-rw-rw-rw-
es.typed-array.uint8-clamped-a...
367
B
-rw-rw-rw-
es.typed-array.with.js
1.36
KB
-rw-rw-rw-
es.unescape.js
1.22
KB
-rw-rw-rw-
es.weak-map.constructor.js
4.12
KB
-rw-rw-rw-
es.weak-map.js
142
B
-rw-rw-rw-
es.weak-set.constructor.js
364
B
-rw-rw-rw-
es.weak-set.js
142
B
-rw-rw-rw-
esnext.aggregate-error.js
89
B
-rw-rw-rw-
esnext.array-buffer.detached.j...
95
B
-rw-rw-rw-
esnext.array-buffer.transfer-t...
111
B
-rw-rw-rw-
esnext.array-buffer.transfer.j...
95
B
-rw-rw-rw-
esnext.array.at.js
82
B
-rw-rw-rw-
esnext.array.filter-out.js
566
B
-rw-rw-rw-
esnext.array.filter-reject.js
545
B
-rw-rw-rw-
esnext.array.find-last-index.j...
95
B
-rw-rw-rw-
esnext.array.find-last.js
89
B
-rw-rw-rw-
esnext.array.from-async.js
631
B
-rw-rw-rw-
esnext.array.group-by-to-map.j...
662
B
-rw-rw-rw-
esnext.array.group-by.js
704
B
-rw-rw-rw-
esnext.array.group-to-map.js
439
B
-rw-rw-rw-
esnext.array.group.js
498
B
-rw-rw-rw-
esnext.array.is-template-objec...
963
B
-rw-rw-rw-
esnext.array.last-index.js
743
B
-rw-rw-rw-
esnext.array.last-item.js
913
B
-rw-rw-rw-
esnext.array.to-reversed.js
91
B
-rw-rw-rw-
esnext.array.to-sorted.js
89
B
-rw-rw-rw-
esnext.array.to-spliced.js
90
B
-rw-rw-rw-
esnext.array.unique-by.js
372
B
-rw-rw-rw-
esnext.array.with.js
84
B
-rw-rw-rw-
esnext.async-disposable-stack....
4.59
KB
-rw-rw-rw-
esnext.async-iterator.as-index...
373
B
-rw-rw-rw-
esnext.async-iterator.async-di...
1012
B
-rw-rw-rw-
esnext.async-iterator.construc...
1.42
KB
-rw-rw-rw-
esnext.async-iterator.drop.js
1.74
KB
-rw-rw-rw-
esnext.async-iterator.every.js
364
B
-rw-rw-rw-
esnext.async-iterator.filter.j...
2.33
KB
-rw-rw-rw-
esnext.async-iterator.find.js
358
B
-rw-rw-rw-
esnext.async-iterator.flat-map...
3.13
KB
-rw-rw-rw-
esnext.async-iterator.for-each...
362
B
-rw-rw-rw-
esnext.async-iterator.from.js
892
B
-rw-rw-rw-
esnext.async-iterator.indexed....
342
B
-rw-rw-rw-
esnext.async-iterator.map.js
346
B
-rw-rw-rw-
esnext.async-iterator.reduce.j...
2.31
KB
-rw-rw-rw-
esnext.async-iterator.some.js
358
B
-rw-rw-rw-
esnext.async-iterator.take.js
1.72
KB
-rw-rw-rw-
esnext.async-iterator.to-array...
371
B
-rw-rw-rw-
esnext.bigint.range.js
521
B
-rw-rw-rw-
esnext.composite-key.js
685
B
-rw-rw-rw-
esnext.composite-symbol.js
601
B
-rw-rw-rw-
esnext.data-view.get-float16.j...
662
B
-rw-rw-rw-
esnext.data-view.get-uint8-cla...
506
B
-rw-rw-rw-
esnext.data-view.set-float16.j...
881
B
-rw-rw-rw-
esnext.data-view.set-uint8-cla...
755
B
-rw-rw-rw-
esnext.disposable-stack.constr...
3.92
KB
-rw-rw-rw-
esnext.function.demethodize.js
308
B
-rw-rw-rw-
esnext.function.is-callable.js
1.3
KB
-rw-rw-rw-
esnext.function.is-constructor...
334
B
-rw-rw-rw-
esnext.function.metadata.js
450
B
-rw-rw-rw-
esnext.function.un-this.js
352
B
-rw-rw-rw-
esnext.global-this.js
85
B
-rw-rw-rw-
esnext.iterator.as-indexed-pai...
357
B
-rw-rw-rw-
esnext.iterator.concat.js
1.62
KB
-rw-rw-rw-
esnext.iterator.constructor.js
94
B
-rw-rw-rw-
esnext.iterator.dispose.js
680
B
-rw-rw-rw-
esnext.iterator.drop.js
87
B
-rw-rw-rw-
esnext.iterator.every.js
88
B
-rw-rw-rw-
esnext.iterator.filter.js
89
B
-rw-rw-rw-
esnext.iterator.find.js
87
B
-rw-rw-rw-
esnext.iterator.flat-map.js
91
B
-rw-rw-rw-
esnext.iterator.for-each.js
91
B
-rw-rw-rw-
esnext.iterator.from.js
87
B
-rw-rw-rw-
esnext.iterator.indexed.js
326
B
-rw-rw-rw-
esnext.iterator.map.js
86
B
-rw-rw-rw-
esnext.iterator.range.js
671
B
-rw-rw-rw-
esnext.iterator.reduce.js
89
B
-rw-rw-rw-
esnext.iterator.some.js
87
B
-rw-rw-rw-
esnext.iterator.take.js
87
B
-rw-rw-rw-
esnext.iterator.to-array.js
91
B
-rw-rw-rw-
esnext.iterator.to-async.js
691
B
-rw-rw-rw-
esnext.json.is-raw-json.js
413
B
-rw-rw-rw-
esnext.json.parse.js
8.26
KB
-rw-rw-rw-
esnext.json.raw-json.js
3.22
KB
-rw-rw-rw-
esnext.map.delete-all.js
633
B
-rw-rw-rw-
esnext.map.emplace.js
757
B
-rw-rw-rw-
esnext.map.every.js
663
B
-rw-rw-rw-
esnext.map.filter.js
807
B
-rw-rw-rw-
esnext.map.find-key.js
704
B
-rw-rw-rw-
esnext.map.find.js
701
B
-rw-rw-rw-
esnext.map.from.js
381
B
-rw-rw-rw-
esnext.map.get-or-insert-compu...
771
B
-rw-rw-rw-
esnext.map.get-or-insert.js
529
B
-rw-rw-rw-
esnext.map.group-by.js
86
B
-rw-rw-rw-
esnext.map.includes.js
549
B
-rw-rw-rw-
esnext.map.key-by.js
764
B
-rw-rw-rw-
esnext.map.key-of.js
510
B
-rw-rw-rw-
esnext.map.map-keys.js
801
B
-rw-rw-rw-
esnext.map.map-values.js
805
B
-rw-rw-rw-
esnext.map.merge.js
745
B
-rw-rw-rw-
esnext.map.of.js
369
B
-rw-rw-rw-
esnext.map.reduce.js
928
B
-rw-rw-rw-
esnext.map.some.js
657
B
-rw-rw-rw-
esnext.map.update-or-insert.js
372
B
-rw-rw-rw-
esnext.map.update.js
922
B
-rw-rw-rw-
esnext.map.upsert.js
340
B
-rw-rw-rw-
esnext.math.clamp.js
314
B
-rw-rw-rw-
esnext.math.deg-per-rad.js
253
B
-rw-rw-rw-
esnext.math.degrees.js
301
B
-rw-rw-rw-
esnext.math.f16round.js
243
B
-rw-rw-rw-
esnext.math.fscale.js
416
B
-rw-rw-rw-
esnext.math.iaddh.js
434
B
-rw-rw-rw-
esnext.math.imulh.js
539
B
-rw-rw-rw-
esnext.math.isubh.js
433
B
-rw-rw-rw-
esnext.math.rad-per-deg.js
253
B
-rw-rw-rw-
esnext.math.radians.js
301
B
-rw-rw-rw-
esnext.math.scale.js
251
B
-rw-rw-rw-
esnext.math.seeded-prng.js
1.57
KB
-rw-rw-rw-
esnext.math.signbit.js
358
B
-rw-rw-rw-
esnext.math.sum-precise.js
4.59
KB
-rw-rw-rw-
esnext.math.umulh.js
543
B
-rw-rw-rw-
esnext.number.from-string.js
1.7
KB
-rw-rw-rw-
esnext.number.range.js
416
B
-rw-rw-rw-
esnext.object.group-by.js
89
B
-rw-rw-rw-
esnext.object.has-own.js
88
B
-rw-rw-rw-
esnext.object.iterate-entries....
399
B
-rw-rw-rw-
esnext.object.iterate-keys.js
387
B
-rw-rw-rw-
esnext.object.iterate-values.j...
395
B
-rw-rw-rw-
esnext.observable.constructor....
6.2
KB
-rw-rw-rw-
esnext.observable.from.js
1.32
KB
-rw-rw-rw-
esnext.observable.js
243
B
-rw-rw-rw-
esnext.observable.of.js
764
B
-rw-rw-rw-
esnext.promise.all-settled.js
96
B
-rw-rw-rw-
esnext.promise.any.js
85
B
-rw-rw-rw-
esnext.promise.try.js
88
B
-rw-rw-rw-
esnext.promise.with-resolvers....
96
B
-rw-rw-rw-
esnext.reflect.define-metadata...
717
B
-rw-rw-rw-
esnext.reflect.delete-metadata...
977
B
-rw-rw-rw-
esnext.reflect.get-metadata-ke...
1.22
KB
-rw-rw-rw-
esnext.reflect.get-metadata.js
1.08
KB
-rw-rw-rw-
esnext.reflect.get-own-metadat...
677
B
-rw-rw-rw-
esnext.reflect.get-own-metadat...
688
B
-rw-rw-rw-
esnext.reflect.has-metadata.js
1006
B
-rw-rw-rw-
esnext.reflect.has-own-metadat...
688
B
-rw-rw-rw-
esnext.reflect.metadata.js
619
B
-rw-rw-rw-
esnext.regexp.escape.js
2.3
KB
-rw-rw-rw-
esnext.set.add-all.js
487
B
-rw-rw-rw-
esnext.set.delete-all.js
633
B
-rw-rw-rw-
esnext.set.difference.js
519
B
-rw-rw-rw-
esnext.set.difference.v2.js
91
B
-rw-rw-rw-
esnext.set.every.js
660
B
-rw-rw-rw-
esnext.set.filter.js
799
B
-rw-rw-rw-
esnext.set.find.js
698
B
-rw-rw-rw-
esnext.set.from.js
382
B
-rw-rw-rw-
esnext.set.intersection.js
531
B
-rw-rw-rw-
esnext.set.intersection.v2.js
93
B
-rw-rw-rw-
esnext.set.is-disjoint-from.js
545
B
-rw-rw-rw-
esnext.set.is-disjoint-from.v2...
97
B
-rw-rw-rw-
esnext.set.is-subset-of.js
521
B
-rw-rw-rw-
esnext.set.is-subset-of.v2.js
93
B
-rw-rw-rw-
esnext.set.is-superset-of.js
533
B
-rw-rw-rw-
esnext.set.is-superset-of.v2.j...
95
B
-rw-rw-rw-
esnext.set.join.js
743
B
-rw-rw-rw-
esnext.set.map.js
779
B
-rw-rw-rw-
esnext.set.of.js
370
B
-rw-rw-rw-
esnext.set.reduce.js
925
B
-rw-rw-rw-
esnext.set.some.js
654
B
-rw-rw-rw-
esnext.set.symmetric-differenc...
574
B
-rw-rw-rw-
esnext.set.symmetric-differenc...
101
B
-rw-rw-rw-
esnext.set.union.js
489
B
-rw-rw-rw-
esnext.set.union.v2.js
86
B
-rw-rw-rw-
esnext.string.at-alternative.j...
95
B
-rw-rw-rw-
esnext.string.at.js
786
B
-rw-rw-rw-
esnext.string.code-points.js
1.56
KB
-rw-rw-rw-
esnext.string.cooked.js
256
B
-rw-rw-rw-
esnext.string.dedent.js
5.02
KB
-rw-rw-rw-
esnext.string.is-well-formed.j...
95
B
-rw-rw-rw-
esnext.string.match-all.js
90
B
-rw-rw-rw-
esnext.string.replace-all.js
92
B
-rw-rw-rw-
esnext.string.to-well-formed.j...
95
B
-rw-rw-rw-
esnext.suppressed-error.constr...
2.93
KB
-rw-rw-rw-
esnext.symbol.async-dispose.js
955
B
-rw-rw-rw-
esnext.symbol.custom-matcher.j...
230
B
-rw-rw-rw-
esnext.symbol.dispose.js
929
B
-rw-rw-rw-
esnext.symbol.is-registered-sy...
324
B
-rw-rw-rw-
esnext.symbol.is-registered.js
360
B
-rw-rw-rw-
esnext.symbol.is-well-known-sy...
451
B
-rw-rw-rw-
esnext.symbol.is-well-known.js
486
B
-rw-rw-rw-
esnext.symbol.matcher.js
218
B
-rw-rw-rw-
esnext.symbol.metadata-key.js
261
B
-rw-rw-rw-
esnext.symbol.metadata.js
214
B
-rw-rw-rw-
esnext.symbol.observable.js
218
B
-rw-rw-rw-
esnext.symbol.pattern-match.js
261
B
-rw-rw-rw-
esnext.symbol.replace-all.js
163
B
-rw-rw-rw-
esnext.typed-array.at.js
88
B
-rw-rw-rw-
esnext.typed-array.filter-out....
750
B
-rw-rw-rw-
esnext.typed-array.filter-reje...
726
B
-rw-rw-rw-
esnext.typed-array.find-last-i...
101
B
-rw-rw-rw-
esnext.typed-array.find-last.j...
95
B
-rw-rw-rw-
esnext.typed-array.from-async....
1.17
KB
-rw-rw-rw-
esnext.typed-array.group-by.js
707
B
-rw-rw-rw-
esnext.typed-array.to-reversed...
97
B
-rw-rw-rw-
esnext.typed-array.to-sorted.j...
95
B
-rw-rw-rw-
esnext.typed-array.to-spliced....
2.59
KB
-rw-rw-rw-
esnext.typed-array.unique-by.j...
848
B
-rw-rw-rw-
esnext.typed-array.with.js
90
B
-rw-rw-rw-
esnext.uint8-array.from-base64...
694
B
-rw-rw-rw-
esnext.uint8-array.from-hex.js
457
B
-rw-rw-rw-
esnext.uint8-array.set-from-ba...
696
B
-rw-rw-rw-
esnext.uint8-array.set-from-he...
726
B
-rw-rw-rw-
esnext.uint8-array.to-base64.j...
1.75
KB
-rw-rw-rw-
esnext.uint8-array.to-hex.js
809
B
-rw-rw-rw-
esnext.weak-map.delete-all.js
659
B
-rw-rw-rw-
esnext.weak-map.emplace.js
799
B
-rw-rw-rw-
esnext.weak-map.from.js
414
B
-rw-rw-rw-
esnext.weak-map.get-or-insert-...
760
B
-rw-rw-rw-
esnext.weak-map.get-or-insert....
571
B
-rw-rw-rw-
esnext.weak-map.of.js
402
B
-rw-rw-rw-
esnext.weak-map.upsert.js
346
B
-rw-rw-rw-
esnext.weak-set.add-all.js
513
B
-rw-rw-rw-
esnext.weak-set.delete-all.js
659
B
-rw-rw-rw-
esnext.weak-set.from.js
415
B
-rw-rw-rw-
esnext.weak-set.of.js
403
B
-rw-rw-rw-
web.atob.js
2.26
KB
-rw-rw-rw-
web.btoa.js
1.86
KB
-rw-rw-rw-
web.clear-immediate.js
392
B
-rw-rw-rw-
web.dom-collections.for-each.j...
918
B
-rw-rw-rw-
web.dom-collections.iterator.j...
1.69
KB
-rw-rw-rw-
web.dom-exception.constructor....
5.95
KB
-rw-rw-rw-
web.dom-exception.stack.js
3.18
KB
-rw-rw-rw-
web.dom-exception.to-string-ta...
281
B
-rw-rw-rw-
web.immediate.js
184
B
-rw-rw-rw-
web.queue-microtask.js
1.07
KB
-rw-rw-rw-
web.self.js
1.49
KB
-rw-rw-rw-
web.set-immediate.js
564
B
-rw-rw-rw-
web.set-interval.js
485
B
-rw-rw-rw-
web.set-timeout.js
477
B
-rw-rw-rw-
web.structured-clone.js
18.9
KB
-rw-rw-rw-
web.timers.js
179
B
-rw-rw-rw-
web.url-search-params.construc...
16.75
KB
-rw-rw-rw-
web.url-search-params.delete.j...
1.79
KB
-rw-rw-rw-
web.url-search-params.has.js
1.2
KB
-rw-rw-rw-
web.url-search-params.js
152
B
-rw-rw-rw-
web.url-search-params.size.js
713
B
-rw-rw-rw-
web.url.can-parse.js
1.19
KB
-rw-rw-rw-
web.url.constructor.js
35.05
KB
-rw-rw-rw-
web.url.js
138
B
-rw-rw-rw-
web.url.parse.js
801
B
-rw-rw-rw-
web.url.to-json.js
324
B
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : web.structured-clone.js
'use strict'; var IS_PURE = require('../internals/is-pure'); var $ = require('../internals/export'); var globalThis = require('../internals/global-this'); var getBuiltIn = require('../internals/get-built-in'); var uncurryThis = require('../internals/function-uncurry-this'); var fails = require('../internals/fails'); var uid = require('../internals/uid'); var isCallable = require('../internals/is-callable'); var isConstructor = require('../internals/is-constructor'); var isNullOrUndefined = require('../internals/is-null-or-undefined'); var isObject = require('../internals/is-object'); var isSymbol = require('../internals/is-symbol'); var iterate = require('../internals/iterate'); var anObject = require('../internals/an-object'); var classof = require('../internals/classof'); var hasOwn = require('../internals/has-own-property'); var createProperty = require('../internals/create-property'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var lengthOfArrayLike = require('../internals/length-of-array-like'); var validateArgumentsLength = require('../internals/validate-arguments-length'); var getRegExpFlags = require('../internals/regexp-get-flags'); var MapHelpers = require('../internals/map-helpers'); var SetHelpers = require('../internals/set-helpers'); var setIterate = require('../internals/set-iterate'); var detachTransferable = require('../internals/detach-transferable'); var ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable'); var PROPER_STRUCTURED_CLONE_TRANSFER = require('../internals/structured-clone-proper-transfer'); var Object = globalThis.Object; var Array = globalThis.Array; var Date = globalThis.Date; var Error = globalThis.Error; var TypeError = globalThis.TypeError; var PerformanceMark = globalThis.PerformanceMark; var DOMException = getBuiltIn('DOMException'); var Map = MapHelpers.Map; var mapHas = MapHelpers.has; var mapGet = MapHelpers.get; var mapSet = MapHelpers.set; var Set = SetHelpers.Set; var setAdd = SetHelpers.add; var setHas = SetHelpers.has; var objectKeys = getBuiltIn('Object', 'keys'); var push = uncurryThis([].push); var thisBooleanValue = uncurryThis(true.valueOf); var thisNumberValue = uncurryThis(1.0.valueOf); var thisStringValue = uncurryThis(''.valueOf); var thisTimeValue = uncurryThis(Date.prototype.getTime); var PERFORMANCE_MARK = uid('structuredClone'); var DATA_CLONE_ERROR = 'DataCloneError'; var TRANSFERRING = 'Transferring'; var checkBasicSemantic = function (structuredCloneImplementation) { return !fails(function () { var set1 = new globalThis.Set([7]); var set2 = structuredCloneImplementation(set1); var number = structuredCloneImplementation(Object(7)); return set2 === set1 || !set2.has(7) || !isObject(number) || +number !== 7; }) && structuredCloneImplementation; }; var checkErrorsCloning = function (structuredCloneImplementation, $Error) { return !fails(function () { var error = new $Error(); var test = structuredCloneImplementation({ a: error, b: error }); return !(test && test.a === test.b && test.a instanceof $Error && test.a.stack === error.stack); }); }; // https://github.com/whatwg/html/pull/5749 var checkNewErrorsCloningSemantic = function (structuredCloneImplementation) { return !fails(function () { var test = structuredCloneImplementation(new globalThis.AggregateError([1], PERFORMANCE_MARK, { cause: 3 })); return test.name !== 'AggregateError' || test.errors[0] !== 1 || test.message !== PERFORMANCE_MARK || test.cause !== 3; }); }; // FF94+, Safari 15.4+, Chrome 98+, NodeJS 17.0+, Deno 1.13+ // FF<103 and Safari implementations can't clone errors // https://bugzilla.mozilla.org/show_bug.cgi?id=1556604 // FF103 can clone errors, but `.stack` of clone is an empty string // https://bugzilla.mozilla.org/show_bug.cgi?id=1778762 // FF104+ fixed it on usual errors, but not on DOMExceptions // https://bugzilla.mozilla.org/show_bug.cgi?id=1777321 // Chrome <102 returns `null` if cloned object contains multiple references to one error // https://bugs.chromium.org/p/v8/issues/detail?id=12542 // NodeJS implementation can't clone DOMExceptions // https://github.com/nodejs/node/issues/41038 // only FF103+ supports new (html/5749) error cloning semantic var nativeStructuredClone = globalThis.structuredClone; var FORCED_REPLACEMENT = IS_PURE || !checkErrorsCloning(nativeStructuredClone, Error) || !checkErrorsCloning(nativeStructuredClone, DOMException) || !checkNewErrorsCloningSemantic(nativeStructuredClone); // Chrome 82+, Safari 14.1+, Deno 1.11+ // Chrome 78-81 implementation swaps `.name` and `.message` of cloned `DOMException` // Chrome returns `null` if cloned object contains multiple references to one error // Safari 14.1 implementation doesn't clone some `RegExp` flags, so requires a workaround // Safari implementation can't clone errors // Deno 1.2-1.10 implementations too naive // NodeJS 16.0+ does not have `PerformanceMark` constructor // NodeJS <17.2 structured cloning implementation from `performance.mark` is too naive // and can't clone, for example, `RegExp` or some boxed primitives // https://github.com/nodejs/node/issues/40840 // no one of those implementations supports new (html/5749) error cloning semantic var structuredCloneFromMark = !nativeStructuredClone && checkBasicSemantic(function (value) { return new PerformanceMark(PERFORMANCE_MARK, { detail: value }).detail; }); var nativeRestrictedStructuredClone = checkBasicSemantic(nativeStructuredClone) || structuredCloneFromMark; var throwUncloneable = function (type) { throw new DOMException('Uncloneable type: ' + type, DATA_CLONE_ERROR); }; var throwUnpolyfillable = function (type, action) { throw new DOMException((action || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR); }; var tryNativeRestrictedStructuredClone = function (value, type) { if (!nativeRestrictedStructuredClone) throwUnpolyfillable(type); return nativeRestrictedStructuredClone(value); }; var createDataTransfer = function () { var dataTransfer; try { dataTransfer = new globalThis.DataTransfer(); } catch (error) { try { dataTransfer = new globalThis.ClipboardEvent('').clipboardData; } catch (error2) { /* empty */ } } return dataTransfer && dataTransfer.items && dataTransfer.files ? dataTransfer : null; }; var cloneBuffer = function (value, map, $type) { if (mapHas(map, value)) return mapGet(map, value); var type = $type || classof(value); var clone, length, options, source, target, i; if (type === 'SharedArrayBuffer') { if (nativeRestrictedStructuredClone) clone = nativeRestrictedStructuredClone(value); // SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original else clone = value; } else { var DataView = globalThis.DataView; // `ArrayBuffer#slice` is not available in IE10 // `ArrayBuffer#slice` and `DataView` are not available in old FF if (!DataView && !isCallable(value.slice)) throwUnpolyfillable('ArrayBuffer'); // detached buffers throws in `DataView` and `.slice` try { if (isCallable(value.slice) && !value.resizable) { clone = value.slice(0); } else { length = value.byteLength; options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined; // eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe clone = new ArrayBuffer(length, options); source = new DataView(value); target = new DataView(clone); for (i = 0; i < length; i++) { target.setUint8(i, source.getUint8(i)); } } } catch (error) { throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR); } } mapSet(map, value, clone); return clone; }; var cloneView = function (value, type, offset, length, map) { var C = globalThis[type]; // in some old engines like Safari 9, typeof C is 'object' // on Uint8ClampedArray or some other constructors if (!isObject(C)) throwUnpolyfillable(type); return new C(cloneBuffer(value.buffer, map), offset, length); }; var structuredCloneInternal = function (value, map) { if (isSymbol(value)) throwUncloneable('Symbol'); if (!isObject(value)) return value; // effectively preserves circular references if (map) { if (mapHas(map, value)) return mapGet(map, value); } else map = new Map(); var type = classof(value); var C, name, cloned, dataTransfer, i, length, keys, key; switch (type) { case 'Array': cloned = Array(lengthOfArrayLike(value)); break; case 'Object': cloned = {}; break; case 'Map': cloned = new Map(); break; case 'Set': cloned = new Set(); break; case 'RegExp': // in this block because of a Safari 14.1 bug // old FF does not clone regexes passed to the constructor, so get the source and flags directly cloned = new RegExp(value.source, getRegExpFlags(value)); break; case 'Error': name = value.name; switch (name) { case 'AggregateError': cloned = new (getBuiltIn(name))([]); break; case 'EvalError': case 'RangeError': case 'ReferenceError': case 'SuppressedError': case 'SyntaxError': case 'TypeError': case 'URIError': cloned = new (getBuiltIn(name))(); break; case 'CompileError': case 'LinkError': case 'RuntimeError': cloned = new (getBuiltIn('WebAssembly', name))(); break; default: cloned = new Error(); } break; case 'DOMException': cloned = new DOMException(value.message, value.name); break; case 'ArrayBuffer': case 'SharedArrayBuffer': cloned = cloneBuffer(value, map, type); break; case 'DataView': case 'Int8Array': case 'Uint8Array': case 'Uint8ClampedArray': case 'Int16Array': case 'Uint16Array': case 'Int32Array': case 'Uint32Array': case 'Float16Array': case 'Float32Array': case 'Float64Array': case 'BigInt64Array': case 'BigUint64Array': length = type === 'DataView' ? value.byteLength : value.length; cloned = cloneView(value, type, value.byteOffset, length, map); break; case 'DOMQuad': try { cloned = new DOMQuad( structuredCloneInternal(value.p1, map), structuredCloneInternal(value.p2, map), structuredCloneInternal(value.p3, map), structuredCloneInternal(value.p4, map) ); } catch (error) { cloned = tryNativeRestrictedStructuredClone(value, type); } break; case 'File': if (nativeRestrictedStructuredClone) try { cloned = nativeRestrictedStructuredClone(value); // NodeJS 20.0.0 bug, https://github.com/nodejs/node/issues/47612 if (classof(cloned) !== type) cloned = undefined; } catch (error) { /* empty */ } if (!cloned) try { cloned = new File([value], value.name, value); } catch (error) { /* empty */ } if (!cloned) throwUnpolyfillable(type); break; case 'FileList': dataTransfer = createDataTransfer(); if (dataTransfer) { for (i = 0, length = lengthOfArrayLike(value); i < length; i++) { dataTransfer.items.add(structuredCloneInternal(value[i], map)); } cloned = dataTransfer.files; } else cloned = tryNativeRestrictedStructuredClone(value, type); break; case 'ImageData': // Safari 9 ImageData is a constructor, but typeof ImageData is 'object' try { cloned = new ImageData( structuredCloneInternal(value.data, map), value.width, value.height, { colorSpace: value.colorSpace } ); } catch (error) { cloned = tryNativeRestrictedStructuredClone(value, type); } break; default: if (nativeRestrictedStructuredClone) { cloned = nativeRestrictedStructuredClone(value); } else switch (type) { case 'BigInt': // can be a 3rd party polyfill cloned = Object(value.valueOf()); break; case 'Boolean': cloned = Object(thisBooleanValue(value)); break; case 'Number': cloned = Object(thisNumberValue(value)); break; case 'String': cloned = Object(thisStringValue(value)); break; case 'Date': cloned = new Date(thisTimeValue(value)); break; case 'Blob': try { cloned = value.slice(0, value.size, value.type); } catch (error) { throwUnpolyfillable(type); } break; case 'DOMPoint': case 'DOMPointReadOnly': C = globalThis[type]; try { cloned = C.fromPoint ? C.fromPoint(value) : new C(value.x, value.y, value.z, value.w); } catch (error) { throwUnpolyfillable(type); } break; case 'DOMRect': case 'DOMRectReadOnly': C = globalThis[type]; try { cloned = C.fromRect ? C.fromRect(value) : new C(value.x, value.y, value.width, value.height); } catch (error) { throwUnpolyfillable(type); } break; case 'DOMMatrix': case 'DOMMatrixReadOnly': C = globalThis[type]; try { cloned = C.fromMatrix ? C.fromMatrix(value) : new C(value); } catch (error) { throwUnpolyfillable(type); } break; case 'AudioData': case 'VideoFrame': if (!isCallable(value.clone)) throwUnpolyfillable(type); try { cloned = value.clone(); } catch (error) { throwUncloneable(type); } break; case 'CropTarget': case 'CryptoKey': case 'FileSystemDirectoryHandle': case 'FileSystemFileHandle': case 'FileSystemHandle': case 'GPUCompilationInfo': case 'GPUCompilationMessage': case 'ImageBitmap': case 'RTCCertificate': case 'WebAssembly.Module': throwUnpolyfillable(type); // break omitted default: throwUncloneable(type); } } mapSet(map, value, cloned); switch (type) { case 'Array': case 'Object': keys = objectKeys(value); for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) { key = keys[i]; createProperty(cloned, key, structuredCloneInternal(value[key], map)); } break; case 'Map': value.forEach(function (v, k) { mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map)); }); break; case 'Set': value.forEach(function (v) { setAdd(cloned, structuredCloneInternal(v, map)); }); break; case 'Error': createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map)); if (hasOwn(value, 'cause')) { createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map)); } if (name === 'AggregateError') { cloned.errors = structuredCloneInternal(value.errors, map); } else if (name === 'SuppressedError') { cloned.error = structuredCloneInternal(value.error, map); cloned.suppressed = structuredCloneInternal(value.suppressed, map); } // break omitted case 'DOMException': if (ERROR_STACK_INSTALLABLE) { createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map)); } } return cloned; }; var tryToTransfer = function (rawTransfer, map) { if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence'); var transfer = []; iterate(rawTransfer, function (value) { push(transfer, anObject(value)); }); var i = 0; var length = lengthOfArrayLike(transfer); var buffers = new Set(); var value, type, C, transferred, canvas, context; while (i < length) { value = transfer[i++]; type = classof(value); if (type === 'ArrayBuffer' ? setHas(buffers, value) : mapHas(map, value)) { throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR); } if (type === 'ArrayBuffer') { setAdd(buffers, value); continue; } if (PROPER_STRUCTURED_CLONE_TRANSFER) { transferred = nativeStructuredClone(value, { transfer: [value] }); } else switch (type) { case 'ImageBitmap': C = globalThis.OffscreenCanvas; if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING); try { canvas = new C(value.width, value.height); context = canvas.getContext('bitmaprenderer'); context.transferFromImageBitmap(value); transferred = canvas.transferToImageBitmap(); } catch (error) { /* empty */ } break; case 'AudioData': case 'VideoFrame': if (!isCallable(value.clone) || !isCallable(value.close)) throwUnpolyfillable(type, TRANSFERRING); try { transferred = value.clone(); value.close(); } catch (error) { /* empty */ } break; case 'MediaSourceHandle': case 'MessagePort': case 'MIDIAccess': case 'OffscreenCanvas': case 'ReadableStream': case 'RTCDataChannel': case 'TransformStream': case 'WebTransportReceiveStream': case 'WebTransportSendStream': case 'WritableStream': throwUnpolyfillable(type, TRANSFERRING); } if (transferred === undefined) throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR); mapSet(map, value, transferred); } return buffers; }; var detachBuffers = function (buffers) { setIterate(buffers, function (buffer) { if (PROPER_STRUCTURED_CLONE_TRANSFER) { nativeRestrictedStructuredClone(buffer, { transfer: [buffer] }); } else if (isCallable(buffer.transfer)) { buffer.transfer(); } else if (detachTransferable) { detachTransferable(buffer); } else { throwUnpolyfillable('ArrayBuffer', TRANSFERRING); } }); }; // `structuredClone` method // https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone $({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, forced: FORCED_REPLACEMENT }, { structuredClone: function structuredClone(value /* , { transfer } */) { var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined; var transfer = options ? options.transfer : undefined; var map, buffers; if (transfer !== undefined) { map = new Map(); buffers = tryToTransfer(transfer, map); } var clone = structuredCloneInternal(value, map); // since of an issue with cloning views of transferred buffers, we a forced to detach them later // https://github.com/zloirock/core-js/issues/1265 if (buffers) detachBuffers(buffers); return clone; } });
Close