2021-02-10 07:13:13 +00:00
( function webpackUniversalModuleDefinition ( root , factory ) {
if ( typeof exports === 'object' && typeof module === 'object' )
module . exports = factory ( ) ;
else if ( typeof define === 'function' && define . amd )
define ( [ ] , factory ) ;
else {
var a = factory ( ) ;
for ( var i in a ) ( typeof exports === 'object' ? exports : root ) [ i ] = a [ i ] ;
}
2021-03-20 20:39:14 +00:00
} ) ( self , function ( ) {
return /******/ ( function ( ) { // webpackBootstrap
/******/ var _ _webpack _modules _ _ = ( {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 3099 :
/***/ ( function ( module ) {
module . exports = function ( it ) {
if ( typeof it != 'function' ) {
throw TypeError ( String ( it ) + ' is not a function' ) ;
} return it ;
} ;
/***/ } ) ,
/***/ 6077 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var isObject = _ _webpack _require _ _ ( 111 ) ;
module . exports = function ( it ) {
if ( ! isObject ( it ) && it !== null ) {
throw TypeError ( "Can't set " + String ( it ) + ' as a prototype' ) ;
} return it ;
} ;
/***/ } ) ,
/***/ 1223 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var create = _ _webpack _require _ _ ( 30 ) ;
var definePropertyModule = _ _webpack _require _ _ ( 3070 ) ;
var UNSCOPABLES = wellKnownSymbol ( 'unscopables' ) ;
var ArrayPrototype = Array . prototype ;
// Array.prototype[@@unscopables]
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if ( ArrayPrototype [ UNSCOPABLES ] == undefined ) {
definePropertyModule . f ( ArrayPrototype , UNSCOPABLES , {
configurable : true ,
value : create ( null )
} ) ;
}
// add a key to Array.prototype[@@unscopables]
module . exports = function ( key ) {
ArrayPrototype [ UNSCOPABLES ] [ key ] = true ;
} ;
/***/ } ) ,
/***/ 1530 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var charAt = _ _webpack _require _ _ ( 8710 ) . charAt ;
// `AdvanceStringIndex` abstract operation
// https://tc39.es/ecma262/#sec-advancestringindex
module . exports = function ( S , index , unicode ) {
return index + ( unicode ? charAt ( S , index ) . length : 1 ) ;
} ;
/***/ } ) ,
/***/ 5787 :
/***/ ( function ( module ) {
module . exports = function ( it , Constructor , name ) {
if ( ! ( it instanceof Constructor ) ) {
throw TypeError ( 'Incorrect ' + ( name ? name + ' ' : '' ) + 'invocation' ) ;
} return it ;
} ;
/***/ } ) ,
/***/ 9670 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var isObject = _ _webpack _require _ _ ( 111 ) ;
module . exports = function ( it ) {
if ( ! isObject ( it ) ) {
throw TypeError ( String ( it ) + ' is not an object' ) ;
} return it ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 4019 :
/***/ ( function ( module ) {
module . exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined' ;
/***/ } ) ,
/***/ 260 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var NATIVE _ARRAY _BUFFER = _ _webpack _require _ _ ( 4019 ) ;
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var global = _ _webpack _require _ _ ( 7854 ) ;
var isObject = _ _webpack _require _ _ ( 111 ) ;
var has = _ _webpack _require _ _ ( 6656 ) ;
var classof = _ _webpack _require _ _ ( 648 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var redefine = _ _webpack _require _ _ ( 1320 ) ;
var defineProperty = _ _webpack _require _ _ ( 3070 ) . f ;
var getPrototypeOf = _ _webpack _require _ _ ( 9518 ) ;
var setPrototypeOf = _ _webpack _require _ _ ( 7674 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var uid = _ _webpack _require _ _ ( 9711 ) ;
2021-02-10 07:13:13 +00:00
var Int8Array = global . Int8Array ;
var Int8ArrayPrototype = Int8Array && Int8Array . prototype ;
var Uint8ClampedArray = global . Uint8ClampedArray ;
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray . prototype ;
var TypedArray = Int8Array && getPrototypeOf ( Int8Array ) ;
var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf ( Int8ArrayPrototype ) ;
var ObjectPrototype = Object . prototype ;
var isPrototypeOf = ObjectPrototype . isPrototypeOf ;
var TO _STRING _TAG = wellKnownSymbol ( 'toStringTag' ) ;
var TYPED _ARRAY _TAG = uid ( 'TYPED_ARRAY_TAG' ) ;
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
var NATIVE _ARRAY _BUFFER _VIEWS = NATIVE _ARRAY _BUFFER && ! ! setPrototypeOf && classof ( global . opera ) !== 'Opera' ;
var TYPED _ARRAY _TAG _REQIRED = false ;
var NAME ;
var TypedArrayConstructorsList = {
Int8Array : 1 ,
Uint8Array : 1 ,
Uint8ClampedArray : 1 ,
Int16Array : 2 ,
Uint16Array : 2 ,
Int32Array : 4 ,
Uint32Array : 4 ,
Float32Array : 4 ,
Float64Array : 8
} ;
var BigIntArrayConstructorsList = {
BigInt64Array : 8 ,
BigUint64Array : 8
} ;
var isView = function isView ( it ) {
if ( ! isObject ( it ) ) return false ;
var klass = classof ( it ) ;
return klass === 'DataView'
|| has ( TypedArrayConstructorsList , klass )
|| has ( BigIntArrayConstructorsList , klass ) ;
} ;
var isTypedArray = function ( it ) {
if ( ! isObject ( it ) ) return false ;
var klass = classof ( it ) ;
return has ( TypedArrayConstructorsList , klass )
|| has ( BigIntArrayConstructorsList , klass ) ;
} ;
var aTypedArray = function ( it ) {
if ( isTypedArray ( it ) ) return it ;
throw TypeError ( 'Target is not a typed array' ) ;
} ;
var aTypedArrayConstructor = function ( C ) {
if ( setPrototypeOf ) {
if ( isPrototypeOf . call ( TypedArray , C ) ) return C ;
} else for ( var ARRAY in TypedArrayConstructorsList ) if ( has ( TypedArrayConstructorsList , NAME ) ) {
var TypedArrayConstructor = global [ ARRAY ] ;
if ( TypedArrayConstructor && ( C === TypedArrayConstructor || isPrototypeOf . call ( TypedArrayConstructor , C ) ) ) {
return C ;
}
} throw TypeError ( 'Target is not a typed array constructor' ) ;
} ;
var exportTypedArrayMethod = function ( KEY , property , forced ) {
if ( ! DESCRIPTORS ) return ;
if ( forced ) for ( var ARRAY in TypedArrayConstructorsList ) {
var TypedArrayConstructor = global [ ARRAY ] ;
if ( TypedArrayConstructor && has ( TypedArrayConstructor . prototype , KEY ) ) {
delete TypedArrayConstructor . prototype [ KEY ] ;
}
}
if ( ! TypedArrayPrototype [ KEY ] || forced ) {
redefine ( TypedArrayPrototype , KEY , forced ? property
: NATIVE _ARRAY _BUFFER _VIEWS && Int8ArrayPrototype [ KEY ] || property ) ;
}
} ;
var exportTypedArrayStaticMethod = function ( KEY , property , forced ) {
var ARRAY , TypedArrayConstructor ;
if ( ! DESCRIPTORS ) return ;
if ( setPrototypeOf ) {
if ( forced ) for ( ARRAY in TypedArrayConstructorsList ) {
TypedArrayConstructor = global [ ARRAY ] ;
if ( TypedArrayConstructor && has ( TypedArrayConstructor , KEY ) ) {
delete TypedArrayConstructor [ KEY ] ;
}
}
if ( ! TypedArray [ KEY ] || forced ) {
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
try {
return redefine ( TypedArray , KEY , forced ? property : NATIVE _ARRAY _BUFFER _VIEWS && Int8Array [ KEY ] || property ) ;
} catch ( error ) { /* empty */ }
} else return ;
}
for ( ARRAY in TypedArrayConstructorsList ) {
TypedArrayConstructor = global [ ARRAY ] ;
if ( TypedArrayConstructor && ( ! TypedArrayConstructor [ KEY ] || forced ) ) {
redefine ( TypedArrayConstructor , KEY , property ) ;
}
}
} ;
for ( NAME in TypedArrayConstructorsList ) {
if ( ! global [ NAME ] ) NATIVE _ARRAY _BUFFER _VIEWS = false ;
}
// WebKit bug - typed arrays constructors prototype is Object.prototype
if ( ! NATIVE _ARRAY _BUFFER _VIEWS || typeof TypedArray != 'function' || TypedArray === Function . prototype ) {
2021-03-20 20:39:14 +00:00
// eslint-disable-next-line no-shadow -- safe
2021-02-10 07:13:13 +00:00
TypedArray = function TypedArray ( ) {
throw TypeError ( 'Incorrect invocation' ) ;
} ;
if ( NATIVE _ARRAY _BUFFER _VIEWS ) for ( NAME in TypedArrayConstructorsList ) {
if ( global [ NAME ] ) setPrototypeOf ( global [ NAME ] , TypedArray ) ;
}
}
if ( ! NATIVE _ARRAY _BUFFER _VIEWS || ! TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype ) {
TypedArrayPrototype = TypedArray . prototype ;
if ( NATIVE _ARRAY _BUFFER _VIEWS ) for ( NAME in TypedArrayConstructorsList ) {
if ( global [ NAME ] ) setPrototypeOf ( global [ NAME ] . prototype , TypedArrayPrototype ) ;
}
}
// WebKit bug - one more object in Uint8ClampedArray prototype chain
if ( NATIVE _ARRAY _BUFFER _VIEWS && getPrototypeOf ( Uint8ClampedArrayPrototype ) !== TypedArrayPrototype ) {
setPrototypeOf ( Uint8ClampedArrayPrototype , TypedArrayPrototype ) ;
}
if ( DESCRIPTORS && ! has ( TypedArrayPrototype , TO _STRING _TAG ) ) {
TYPED _ARRAY _TAG _REQIRED = true ;
defineProperty ( TypedArrayPrototype , TO _STRING _TAG , { get : function ( ) {
return isObject ( this ) ? this [ TYPED _ARRAY _TAG ] : undefined ;
} } ) ;
for ( NAME in TypedArrayConstructorsList ) if ( global [ NAME ] ) {
createNonEnumerableProperty ( global [ NAME ] , TYPED _ARRAY _TAG , NAME ) ;
}
}
module . exports = {
NATIVE _ARRAY _BUFFER _VIEWS : NATIVE _ARRAY _BUFFER _VIEWS ,
TYPED _ARRAY _TAG : TYPED _ARRAY _TAG _REQIRED && TYPED _ARRAY _TAG ,
aTypedArray : aTypedArray ,
aTypedArrayConstructor : aTypedArrayConstructor ,
exportTypedArrayMethod : exportTypedArrayMethod ,
exportTypedArrayStaticMethod : exportTypedArrayStaticMethod ,
isView : isView ,
isTypedArray : isTypedArray ,
TypedArray : TypedArray ,
TypedArrayPrototype : TypedArrayPrototype
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3331 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var NATIVE _ARRAY _BUFFER = _ _webpack _require _ _ ( 4019 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var redefineAll = _ _webpack _require _ _ ( 2248 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var anInstance = _ _webpack _require _ _ ( 5787 ) ;
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var toIndex = _ _webpack _require _ _ ( 7067 ) ;
var IEEE754 = _ _webpack _require _ _ ( 1179 ) ;
var getPrototypeOf = _ _webpack _require _ _ ( 9518 ) ;
var setPrototypeOf = _ _webpack _require _ _ ( 7674 ) ;
var getOwnPropertyNames = _ _webpack _require _ _ ( 8006 ) . f ;
var defineProperty = _ _webpack _require _ _ ( 3070 ) . f ;
var arrayFill = _ _webpack _require _ _ ( 1285 ) ;
var setToStringTag = _ _webpack _require _ _ ( 8003 ) ;
var InternalStateModule = _ _webpack _require _ _ ( 9909 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getInternalState = InternalStateModule . get ;
var setInternalState = InternalStateModule . set ;
var ARRAY _BUFFER = 'ArrayBuffer' ;
var DATA _VIEW = 'DataView' ;
var PROTOTYPE = 'prototype' ;
var WRONG _LENGTH = 'Wrong length' ;
var WRONG _INDEX = 'Wrong index' ;
var NativeArrayBuffer = global [ ARRAY _BUFFER ] ;
var $ArrayBuffer = NativeArrayBuffer ;
var $DataView = global [ DATA _VIEW ] ;
var $DataViewPrototype = $DataView && $DataView [ PROTOTYPE ] ;
var ObjectPrototype = Object . prototype ;
var RangeError = global . RangeError ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var packIEEE754 = IEEE754 . pack ;
var unpackIEEE754 = IEEE754 . unpack ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var packInt8 = function ( number ) {
return [ number & 0xFF ] ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var packInt16 = function ( number ) {
return [ number & 0xFF , number >> 8 & 0xFF ] ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var packInt32 = function ( number ) {
return [ number & 0xFF , number >> 8 & 0xFF , number >> 16 & 0xFF , number >> 24 & 0xFF ] ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var unpackInt32 = function ( buffer ) {
return buffer [ 3 ] << 24 | buffer [ 2 ] << 16 | buffer [ 1 ] << 8 | buffer [ 0 ] ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var packFloat32 = function ( number ) {
return packIEEE754 ( number , 23 , 4 ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var packFloat64 = function ( number ) {
return packIEEE754 ( number , 52 , 8 ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var addGetter = function ( Constructor , key ) {
defineProperty ( Constructor [ PROTOTYPE ] , key , { get : function ( ) { return getInternalState ( this ) [ key ] ; } } ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var get = function ( view , count , index , isLittleEndian ) {
var intIndex = toIndex ( index ) ;
var store = getInternalState ( view ) ;
if ( intIndex + count > store . byteLength ) throw RangeError ( WRONG _INDEX ) ;
var bytes = getInternalState ( store . buffer ) . bytes ;
var start = intIndex + store . byteOffset ;
var pack = bytes . slice ( start , start + count ) ;
return isLittleEndian ? pack : pack . reverse ( ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var set = function ( view , count , index , conversion , value , isLittleEndian ) {
var intIndex = toIndex ( index ) ;
var store = getInternalState ( view ) ;
if ( intIndex + count > store . byteLength ) throw RangeError ( WRONG _INDEX ) ;
var bytes = getInternalState ( store . buffer ) . bytes ;
var start = intIndex + store . byteOffset ;
var pack = conversion ( + value ) ;
for ( var i = 0 ; i < count ; i ++ ) bytes [ start + i ] = pack [ isLittleEndian ? i : count - i - 1 ] ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
if ( ! NATIVE _ARRAY _BUFFER ) {
$ArrayBuffer = function ArrayBuffer ( length ) {
anInstance ( this , $ArrayBuffer , ARRAY _BUFFER ) ;
var byteLength = toIndex ( length ) ;
setInternalState ( this , {
bytes : arrayFill . call ( new Array ( byteLength ) , 0 ) ,
byteLength : byteLength
} ) ;
if ( ! DESCRIPTORS ) this . byteLength = byteLength ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
$DataView = function DataView ( buffer , byteOffset , byteLength ) {
anInstance ( this , $DataView , DATA _VIEW ) ;
anInstance ( buffer , $ArrayBuffer , DATA _VIEW ) ;
var bufferLength = getInternalState ( buffer ) . byteLength ;
var offset = toInteger ( byteOffset ) ;
if ( offset < 0 || offset > bufferLength ) throw RangeError ( 'Wrong offset' ) ;
byteLength = byteLength === undefined ? bufferLength - offset : toLength ( byteLength ) ;
if ( offset + byteLength > bufferLength ) throw RangeError ( WRONG _LENGTH ) ;
setInternalState ( this , {
buffer : buffer ,
byteLength : byteLength ,
byteOffset : offset
} ) ;
if ( ! DESCRIPTORS ) {
this . buffer = buffer ;
this . byteLength = byteLength ;
this . byteOffset = offset ;
}
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( DESCRIPTORS ) {
addGetter ( $ArrayBuffer , 'byteLength' ) ;
addGetter ( $DataView , 'buffer' ) ;
addGetter ( $DataView , 'byteLength' ) ;
addGetter ( $DataView , 'byteOffset' ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
redefineAll ( $DataView [ PROTOTYPE ] , {
getInt8 : function getInt8 ( byteOffset ) {
return get ( this , 1 , byteOffset ) [ 0 ] << 24 >> 24 ;
} ,
getUint8 : function getUint8 ( byteOffset ) {
return get ( this , 1 , byteOffset ) [ 0 ] ;
} ,
getInt16 : function getInt16 ( byteOffset /* , littleEndian */ ) {
var bytes = get ( this , 2 , byteOffset , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
return ( bytes [ 1 ] << 8 | bytes [ 0 ] ) << 16 >> 16 ;
} ,
getUint16 : function getUint16 ( byteOffset /* , littleEndian */ ) {
var bytes = get ( this , 2 , byteOffset , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
return bytes [ 1 ] << 8 | bytes [ 0 ] ;
} ,
getInt32 : function getInt32 ( byteOffset /* , littleEndian */ ) {
return unpackInt32 ( get ( this , 4 , byteOffset , arguments . length > 1 ? arguments [ 1 ] : undefined ) ) ;
} ,
getUint32 : function getUint32 ( byteOffset /* , littleEndian */ ) {
return unpackInt32 ( get ( this , 4 , byteOffset , arguments . length > 1 ? arguments [ 1 ] : undefined ) ) >>> 0 ;
} ,
getFloat32 : function getFloat32 ( byteOffset /* , littleEndian */ ) {
return unpackIEEE754 ( get ( this , 4 , byteOffset , arguments . length > 1 ? arguments [ 1 ] : undefined ) , 23 ) ;
} ,
getFloat64 : function getFloat64 ( byteOffset /* , littleEndian */ ) {
return unpackIEEE754 ( get ( this , 8 , byteOffset , arguments . length > 1 ? arguments [ 1 ] : undefined ) , 52 ) ;
} ,
setInt8 : function setInt8 ( byteOffset , value ) {
set ( this , 1 , byteOffset , packInt8 , value ) ;
} ,
setUint8 : function setUint8 ( byteOffset , value ) {
set ( this , 1 , byteOffset , packInt8 , value ) ;
} ,
setInt16 : function setInt16 ( byteOffset , value /* , littleEndian */ ) {
set ( this , 2 , byteOffset , packInt16 , value , arguments . length > 2 ? arguments [ 2 ] : undefined ) ;
} ,
setUint16 : function setUint16 ( byteOffset , value /* , littleEndian */ ) {
set ( this , 2 , byteOffset , packInt16 , value , arguments . length > 2 ? arguments [ 2 ] : undefined ) ;
} ,
setInt32 : function setInt32 ( byteOffset , value /* , littleEndian */ ) {
set ( this , 4 , byteOffset , packInt32 , value , arguments . length > 2 ? arguments [ 2 ] : undefined ) ;
} ,
setUint32 : function setUint32 ( byteOffset , value /* , littleEndian */ ) {
set ( this , 4 , byteOffset , packInt32 , value , arguments . length > 2 ? arguments [ 2 ] : undefined ) ;
} ,
setFloat32 : function setFloat32 ( byteOffset , value /* , littleEndian */ ) {
set ( this , 4 , byteOffset , packFloat32 , value , arguments . length > 2 ? arguments [ 2 ] : undefined ) ;
} ,
setFloat64 : function setFloat64 ( byteOffset , value /* , littleEndian */ ) {
set ( this , 8 , byteOffset , packFloat64 , value , arguments . length > 2 ? arguments [ 2 ] : undefined ) ;
}
} ) ;
} else {
/* eslint-disable no-new -- required for testing */
if ( ! fails ( function ( ) {
NativeArrayBuffer ( 1 ) ;
} ) || ! fails ( function ( ) {
new NativeArrayBuffer ( - 1 ) ;
} ) || fails ( function ( ) {
new NativeArrayBuffer ( ) ;
new NativeArrayBuffer ( 1.5 ) ;
new NativeArrayBuffer ( NaN ) ;
return NativeArrayBuffer . name != ARRAY _BUFFER ;
} ) ) {
/* eslint-enable no-new -- required for testing */
$ArrayBuffer = function ArrayBuffer ( length ) {
anInstance ( this , $ArrayBuffer ) ;
return new NativeArrayBuffer ( toIndex ( length ) ) ;
} ;
var ArrayBufferPrototype = $ArrayBuffer [ PROTOTYPE ] = NativeArrayBuffer [ PROTOTYPE ] ;
for ( var keys = getOwnPropertyNames ( NativeArrayBuffer ) , j = 0 , key ; keys . length > j ; ) {
if ( ! ( ( key = keys [ j ++ ] ) in $ArrayBuffer ) ) {
createNonEnumerableProperty ( $ArrayBuffer , key , NativeArrayBuffer [ key ] ) ;
}
}
ArrayBufferPrototype . constructor = $ArrayBuffer ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// WebKit bug - the same parent prototype for typed arrays and data view
if ( setPrototypeOf && getPrototypeOf ( $DataViewPrototype ) !== ObjectPrototype ) {
setPrototypeOf ( $DataViewPrototype , ObjectPrototype ) ;
}
// iOS Safari 7.x bug
var testView = new $DataView ( new $ArrayBuffer ( 2 ) ) ;
var nativeSetInt8 = $DataViewPrototype . setInt8 ;
testView . setInt8 ( 0 , 2147483648 ) ;
testView . setInt8 ( 1 , 2147483649 ) ;
if ( testView . getInt8 ( 0 ) || ! testView . getInt8 ( 1 ) ) redefineAll ( $DataViewPrototype , {
setInt8 : function setInt8 ( byteOffset , value ) {
nativeSetInt8 . call ( this , byteOffset , value << 24 >> 24 ) ;
} ,
setUint8 : function setUint8 ( byteOffset , value ) {
nativeSetInt8 . call ( this , byteOffset , value << 24 >> 24 ) ;
}
} , { unsafe : true } ) ;
}
setToStringTag ( $ArrayBuffer , ARRAY _BUFFER ) ;
setToStringTag ( $DataView , DATA _VIEW ) ;
module . exports = {
ArrayBuffer : $ArrayBuffer ,
DataView : $DataView
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1048 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var toAbsoluteIndex = _ _webpack _require _ _ ( 1400 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var min = Math . min ;
// `Array.prototype.copyWithin` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.copywithin
module . exports = [ ] . copyWithin || function copyWithin ( target /* = 0 */ , start /* = 0, end = @length */ ) {
var O = toObject ( this ) ;
var len = toLength ( O . length ) ;
var to = toAbsoluteIndex ( target , len ) ;
var from = toAbsoluteIndex ( start , len ) ;
var end = arguments . length > 2 ? arguments [ 2 ] : undefined ;
var count = min ( ( end === undefined ? len : toAbsoluteIndex ( end , len ) ) - from , len - to ) ;
var inc = 1 ;
if ( from < to && to < from + count ) {
inc = - 1 ;
from += count - 1 ;
to += count - 1 ;
}
while ( count -- > 0 ) {
if ( from in O ) O [ to ] = O [ from ] ;
else delete O [ to ] ;
to += inc ;
from += inc ;
} return O ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1285 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var toAbsoluteIndex = _ _webpack _require _ _ ( 1400 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
// `Array.prototype.fill` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.fill
module . exports = function fill ( value /* , start = 0, end = @length */ ) {
var O = toObject ( this ) ;
var length = toLength ( O . length ) ;
var argumentsLength = arguments . length ;
var index = toAbsoluteIndex ( argumentsLength > 1 ? arguments [ 1 ] : undefined , length ) ;
var end = argumentsLength > 2 ? arguments [ 2 ] : undefined ;
var endPos = end === undefined ? length : toAbsoluteIndex ( end , length ) ;
while ( endPos > index ) O [ index ++ ] = value ;
return O ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8533 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var $forEach = _ _webpack _require _ _ ( 2092 ) . forEach ;
var arrayMethodIsStrict = _ _webpack _require _ _ ( 9341 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var STRICT _METHOD = arrayMethodIsStrict ( 'forEach' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.forEach` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.foreach
module . exports = ! STRICT _METHOD ? function forEach ( callbackfn /* , thisArg */ ) {
return $forEach ( this , callbackfn , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} : [ ] . forEach ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8457 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var bind = _ _webpack _require _ _ ( 9974 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var callWithSafeIterationClosing = _ _webpack _require _ _ ( 3411 ) ;
var isArrayIteratorMethod = _ _webpack _require _ _ ( 7659 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var createProperty = _ _webpack _require _ _ ( 6135 ) ;
var getIteratorMethod = _ _webpack _require _ _ ( 1246 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.from` method implementation
// https://tc39.es/ecma262/#sec-array.from
module . exports = function from ( arrayLike /* , mapfn = undefined, thisArg = undefined */ ) {
var O = toObject ( arrayLike ) ;
var C = typeof this == 'function' ? this : Array ;
var argumentsLength = arguments . length ;
var mapfn = argumentsLength > 1 ? arguments [ 1 ] : undefined ;
var mapping = mapfn !== undefined ;
var iteratorMethod = getIteratorMethod ( O ) ;
var index = 0 ;
var length , result , step , iterator , next , value ;
if ( mapping ) mapfn = bind ( mapfn , argumentsLength > 2 ? arguments [ 2 ] : undefined , 2 ) ;
// if the target is not iterable or it's an array with the default iterator - use a simple case
if ( iteratorMethod != undefined && ! ( C == Array && isArrayIteratorMethod ( iteratorMethod ) ) ) {
iterator = iteratorMethod . call ( O ) ;
next = iterator . next ;
result = new C ( ) ;
for ( ; ! ( step = next . call ( iterator ) ) . done ; index ++ ) {
value = mapping ? callWithSafeIterationClosing ( iterator , mapfn , [ step . value , index ] , true ) : step . value ;
createProperty ( result , index , value ) ;
}
} else {
length = toLength ( O . length ) ;
result = new C ( length ) ;
for ( ; length > index ; index ++ ) {
value = mapping ? mapfn ( O [ index ] , index ) : O [ index ] ;
createProperty ( result , index , value ) ;
}
}
result . length = index ;
return result ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1318 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toIndexedObject = _ _webpack _require _ _ ( 5656 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var toAbsoluteIndex = _ _webpack _require _ _ ( 1400 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function ( IS _INCLUDES ) {
return function ( $this , el , fromIndex ) {
var O = toIndexedObject ( $this ) ;
var length = toLength ( O . length ) ;
var index = toAbsoluteIndex ( fromIndex , length ) ;
var value ;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare -- NaN check
if ( IS _INCLUDES && el != el ) while ( length > index ) {
value = O [ index ++ ] ;
// eslint-disable-next-line no-self-compare -- NaN check
if ( value != value ) return true ;
// Array#indexOf ignores holes, Array#includes - not
} else for ( ; length > index ; index ++ ) {
if ( ( IS _INCLUDES || index in O ) && O [ index ] === el ) return IS _INCLUDES || index || 0 ;
} return ! IS _INCLUDES && - 1 ;
} ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
module . exports = {
// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
includes : createMethod ( true ) ,
// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf : createMethod ( false )
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 2092 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var bind = _ _webpack _require _ _ ( 9974 ) ;
var IndexedObject = _ _webpack _require _ _ ( 8361 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var arraySpeciesCreate = _ _webpack _require _ _ ( 5417 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var push = [ ] . push ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
var createMethod = function ( TYPE ) {
var IS _MAP = TYPE == 1 ;
var IS _FILTER = TYPE == 2 ;
var IS _SOME = TYPE == 3 ;
var IS _EVERY = TYPE == 4 ;
var IS _FIND _INDEX = TYPE == 6 ;
var IS _FILTER _OUT = TYPE == 7 ;
var NO _HOLES = TYPE == 5 || IS _FIND _INDEX ;
return function ( $this , callbackfn , that , specificCreate ) {
var O = toObject ( $this ) ;
var self = IndexedObject ( O ) ;
var boundFunction = bind ( callbackfn , that , 3 ) ;
var length = toLength ( self . length ) ;
var index = 0 ;
var create = specificCreate || arraySpeciesCreate ;
var target = IS _MAP ? create ( $this , length ) : IS _FILTER || IS _FILTER _OUT ? create ( $this , 0 ) : undefined ;
var value , result ;
for ( ; length > index ; index ++ ) if ( NO _HOLES || index in self ) {
value = self [ index ] ;
result = boundFunction ( value , index , O ) ;
if ( TYPE ) {
if ( IS _MAP ) target [ index ] = result ; // map
else if ( result ) switch ( TYPE ) {
case 3 : return true ; // some
case 5 : return value ; // find
case 6 : return index ; // findIndex
case 2 : push . call ( target , value ) ; // filter
} else switch ( TYPE ) {
case 4 : return false ; // every
case 7 : push . call ( target , value ) ; // filterOut
}
}
}
return IS _FIND _INDEX ? - 1 : IS _SOME || IS _EVERY ? IS _EVERY : target ;
} ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
module . exports = {
// `Array.prototype.forEach` method
// https://tc39.es/ecma262/#sec-array.prototype.foreach
forEach : createMethod ( 0 ) ,
// `Array.prototype.map` method
// https://tc39.es/ecma262/#sec-array.prototype.map
map : createMethod ( 1 ) ,
// `Array.prototype.filter` method
// https://tc39.es/ecma262/#sec-array.prototype.filter
filter : createMethod ( 2 ) ,
// `Array.prototype.some` method
// https://tc39.es/ecma262/#sec-array.prototype.some
some : createMethod ( 3 ) ,
// `Array.prototype.every` method
// https://tc39.es/ecma262/#sec-array.prototype.every
every : createMethod ( 4 ) ,
// `Array.prototype.find` method
// https://tc39.es/ecma262/#sec-array.prototype.find
find : createMethod ( 5 ) ,
// `Array.prototype.findIndex` method
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
findIndex : createMethod ( 6 ) ,
// `Array.prototype.filterOut` method
// https://github.com/tc39/proposal-array-filtering
filterOut : createMethod ( 7 )
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 6583 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toIndexedObject = _ _webpack _require _ _ ( 5656 ) ;
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var arrayMethodIsStrict = _ _webpack _require _ _ ( 9341 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var min = Math . min ;
var nativeLastIndexOf = [ ] . lastIndexOf ;
var NEGATIVE _ZERO = ! ! nativeLastIndexOf && 1 / [ 1 ] . lastIndexOf ( 1 , - 0 ) < 0 ;
var STRICT _METHOD = arrayMethodIsStrict ( 'lastIndexOf' ) ;
var FORCED = NEGATIVE _ZERO || ! STRICT _METHOD ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.lastIndexOf` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
module . exports = FORCED ? function lastIndexOf ( searchElement /* , fromIndex = @[*-1] */ ) {
// convert -0 to +0
if ( NEGATIVE _ZERO ) return nativeLastIndexOf . apply ( this , arguments ) || 0 ;
var O = toIndexedObject ( this ) ;
var length = toLength ( O . length ) ;
var index = length - 1 ;
if ( arguments . length > 1 ) index = min ( index , toInteger ( arguments [ 1 ] ) ) ;
if ( index < 0 ) index = length + index ;
for ( ; index >= 0 ; index -- ) if ( index in O && O [ index ] === searchElement ) return index || 0 ;
return - 1 ;
} : nativeLastIndexOf ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1194 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var V8 _VERSION = _ _webpack _require _ _ ( 7392 ) ;
2021-02-10 07:13:13 +00:00
var SPECIES = wellKnownSymbol ( 'species' ) ;
module . exports = function ( METHOD _NAME ) {
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/677
return V8 _VERSION >= 51 || ! fails ( function ( ) {
var array = [ ] ;
var constructor = array . constructor = { } ;
constructor [ SPECIES ] = function ( ) {
return { foo : 1 } ;
} ;
return array [ METHOD _NAME ] ( Boolean ) . foo !== 1 ;
} ) ;
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9341 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
module . exports = function ( METHOD _NAME , argument ) {
var method = [ ] [ METHOD _NAME ] ;
return ! ! method && fails ( function ( ) {
// eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
method . call ( null , argument || function ( ) { throw 1 ; } , 1 ) ;
} ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3671 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aFunction = _ _webpack _require _ _ ( 3099 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var IndexedObject = _ _webpack _require _ _ ( 8361 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.{ reduce, reduceRight }` methods implementation
var createMethod = function ( IS _RIGHT ) {
return function ( that , callbackfn , argumentsLength , memo ) {
aFunction ( callbackfn ) ;
var O = toObject ( that ) ;
var self = IndexedObject ( O ) ;
var length = toLength ( O . length ) ;
var index = IS _RIGHT ? length - 1 : 0 ;
var i = IS _RIGHT ? - 1 : 1 ;
if ( argumentsLength < 2 ) while ( true ) {
if ( index in self ) {
memo = self [ index ] ;
index += i ;
break ;
}
index += i ;
if ( IS _RIGHT ? index < 0 : length <= index ) {
throw TypeError ( 'Reduce of empty array with no initial value' ) ;
}
}
for ( ; IS _RIGHT ? index >= 0 : length > index ; index += i ) if ( index in self ) {
memo = callbackfn ( memo , self [ index ] , index , O ) ;
}
return memo ;
} ;
} ;
module . exports = {
// `Array.prototype.reduce` method
// https://tc39.es/ecma262/#sec-array.prototype.reduce
left : createMethod ( false ) ,
// `Array.prototype.reduceRight` method
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
right : createMethod ( true )
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 5417 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var isObject = _ _webpack _require _ _ ( 111 ) ;
var isArray = _ _webpack _require _ _ ( 3157 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var SPECIES = wellKnownSymbol ( 'species' ) ;
// `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module . exports = function ( originalArray , length ) {
var C ;
if ( isArray ( originalArray ) ) {
C = originalArray . constructor ;
// cross-realm fallback
if ( typeof C == 'function' && ( C === Array || isArray ( C . prototype ) ) ) C = undefined ;
else if ( isObject ( C ) ) {
C = C [ SPECIES ] ;
if ( C === null ) C = undefined ;
}
} return new ( C === undefined ? Array : C ) ( length === 0 ? 0 : length ) ;
} ;
/***/ } ) ,
/***/ 3411 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var iteratorClose = _ _webpack _require _ _ ( 9212 ) ;
// call something on iterator step with safe closing on error
module . exports = function ( iterator , fn , value , ENTRIES ) {
try {
return ENTRIES ? fn ( anObject ( value ) [ 0 ] , value [ 1 ] ) : fn ( value ) ;
// 7.4.6 IteratorClose(iterator, completion)
} catch ( error ) {
iteratorClose ( iterator ) ;
throw error ;
2021-02-10 07:13:13 +00:00
}
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7072 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
var SAFE _CLOSING = false ;
try {
var called = 0 ;
var iteratorWithReturn = {
next : function ( ) {
return { done : ! ! called ++ } ;
} ,
'return' : function ( ) {
SAFE _CLOSING = true ;
}
} ;
iteratorWithReturn [ ITERATOR ] = function ( ) {
return this ;
} ;
// eslint-disable-next-line no-throw-literal -- required for testing
Array . from ( iteratorWithReturn , function ( ) { throw 2 ; } ) ;
} catch ( error ) { /* empty */ }
module . exports = function ( exec , SKIP _CLOSING ) {
if ( ! SKIP _CLOSING && ! SAFE _CLOSING ) return false ;
var ITERATION _SUPPORT = false ;
2021-02-10 07:13:13 +00:00
try {
2021-03-20 20:39:14 +00:00
var object = { } ;
object [ ITERATOR ] = function ( ) {
return {
next : function ( ) {
return { done : ITERATION _SUPPORT = true } ;
}
} ;
} ;
exec ( object ) ;
2021-02-10 07:13:13 +00:00
} catch ( error ) { /* empty */ }
2021-03-20 20:39:14 +00:00
return ITERATION _SUPPORT ;
} ;
/***/ } ) ,
/***/ 4326 :
/***/ ( function ( module ) {
var toString = { } . toString ;
module . exports = function ( it ) {
return toString . call ( it ) . slice ( 8 , - 1 ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 648 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var TO _STRING _TAG _SUPPORT = _ _webpack _require _ _ ( 1694 ) ;
var classofRaw = _ _webpack _require _ _ ( 4326 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
2021-02-10 07:13:13 +00:00
var TO _STRING _TAG = wellKnownSymbol ( 'toStringTag' ) ;
// ES3 wrong here
var CORRECT _ARGUMENTS = classofRaw ( function ( ) { return arguments ; } ( ) ) == 'Arguments' ;
// fallback for IE11 Script Access Denied error
var tryGet = function ( it , key ) {
try {
return it [ key ] ;
} catch ( error ) { /* empty */ }
} ;
// getting tag from ES6+ `Object.prototype.toString`
module . exports = TO _STRING _TAG _SUPPORT ? classofRaw : function ( it ) {
var O , tag , result ;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof ( tag = tryGet ( O = Object ( it ) , TO _STRING _TAG ) ) == 'string' ? tag
// builtinTag case
: CORRECT _ARGUMENTS ? classofRaw ( O )
// ES3 arguments fallback
: ( result = classofRaw ( O ) ) == 'Object' && typeof O . callee == 'function' ? 'Arguments' : result ;
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9920 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var has = _ _webpack _require _ _ ( 6656 ) ;
var ownKeys = _ _webpack _require _ _ ( 3887 ) ;
var getOwnPropertyDescriptorModule = _ _webpack _require _ _ ( 1236 ) ;
var definePropertyModule = _ _webpack _require _ _ ( 3070 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( target , source ) {
var keys = ownKeys ( source ) ;
var defineProperty = definePropertyModule . f ;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule . f ;
for ( var i = 0 ; i < keys . length ; i ++ ) {
var key = keys [ i ] ;
if ( ! has ( target , key ) ) defineProperty ( target , key , getOwnPropertyDescriptor ( source , key ) ) ;
}
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8544 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
module . exports = ! fails ( function ( ) {
function F ( ) { /* empty */ }
F . prototype . constructor = null ;
return Object . getPrototypeOf ( new F ( ) ) !== F . prototype ;
} ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 4994 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var IteratorPrototype = _ _webpack _require _ _ ( 3383 ) . IteratorPrototype ;
var create = _ _webpack _require _ _ ( 30 ) ;
var createPropertyDescriptor = _ _webpack _require _ _ ( 9114 ) ;
var setToStringTag = _ _webpack _require _ _ ( 8003 ) ;
var Iterators = _ _webpack _require _ _ ( 7497 ) ;
var returnThis = function ( ) { return this ; } ;
module . exports = function ( IteratorConstructor , NAME , next ) {
var TO _STRING _TAG = NAME + ' Iterator' ;
IteratorConstructor . prototype = create ( IteratorPrototype , { next : createPropertyDescriptor ( 1 , next ) } ) ;
setToStringTag ( IteratorConstructor , TO _STRING _TAG , false , true ) ;
Iterators [ TO _STRING _TAG ] = returnThis ;
return IteratorConstructor ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8880 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var definePropertyModule = _ _webpack _require _ _ ( 3070 ) ;
var createPropertyDescriptor = _ _webpack _require _ _ ( 9114 ) ;
module . exports = DESCRIPTORS ? function ( object , key , value ) {
return definePropertyModule . f ( object , key , createPropertyDescriptor ( 1 , value ) ) ;
} : function ( object , key , value ) {
object [ key ] = value ;
return object ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
/***/ } ) ,
/***/ 9114 :
/***/ ( function ( module ) {
module . exports = function ( bitmap , value ) {
return {
enumerable : ! ( bitmap & 1 ) ,
configurable : ! ( bitmap & 2 ) ,
writable : ! ( bitmap & 4 ) ,
value : value
} ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 6135 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var toPrimitive = _ _webpack _require _ _ ( 7593 ) ;
var definePropertyModule = _ _webpack _require _ _ ( 3070 ) ;
var createPropertyDescriptor = _ _webpack _require _ _ ( 9114 ) ;
2021-02-10 07:13:13 +00:00
module . exports = function ( object , key , value ) {
var propertyKey = toPrimitive ( key ) ;
if ( propertyKey in object ) definePropertyModule . f ( object , propertyKey , createPropertyDescriptor ( 0 , value ) ) ;
else object [ propertyKey ] = value ;
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 654 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var createIteratorConstructor = _ _webpack _require _ _ ( 4994 ) ;
var getPrototypeOf = _ _webpack _require _ _ ( 9518 ) ;
var setPrototypeOf = _ _webpack _require _ _ ( 7674 ) ;
var setToStringTag = _ _webpack _require _ _ ( 8003 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var redefine = _ _webpack _require _ _ ( 1320 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var IS _PURE = _ _webpack _require _ _ ( 1913 ) ;
var Iterators = _ _webpack _require _ _ ( 7497 ) ;
var IteratorsCore = _ _webpack _require _ _ ( 3383 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var IteratorPrototype = IteratorsCore . IteratorPrototype ;
var BUGGY _SAFARI _ITERATORS = IteratorsCore . BUGGY _SAFARI _ITERATORS ;
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
var KEYS = 'keys' ;
var VALUES = 'values' ;
var ENTRIES = 'entries' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var returnThis = function ( ) { return this ; } ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( Iterable , NAME , IteratorConstructor , next , DEFAULT , IS _SET , FORCED ) {
createIteratorConstructor ( IteratorConstructor , NAME , next ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getIterationMethod = function ( KIND ) {
if ( KIND === DEFAULT && defaultIterator ) return defaultIterator ;
if ( ! BUGGY _SAFARI _ITERATORS && KIND in IterablePrototype ) return IterablePrototype [ KIND ] ;
switch ( KIND ) {
case KEYS : return function keys ( ) { return new IteratorConstructor ( this , KIND ) ; } ;
case VALUES : return function values ( ) { return new IteratorConstructor ( this , KIND ) ; } ;
case ENTRIES : return function entries ( ) { return new IteratorConstructor ( this , KIND ) ; } ;
} return function ( ) { return new IteratorConstructor ( this ) ; } ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var TO _STRING _TAG = NAME + ' Iterator' ;
var INCORRECT _VALUES _NAME = false ;
var IterablePrototype = Iterable . prototype ;
var nativeIterator = IterablePrototype [ ITERATOR ]
|| IterablePrototype [ '@@iterator' ]
|| DEFAULT && IterablePrototype [ DEFAULT ] ;
var defaultIterator = ! BUGGY _SAFARI _ITERATORS && nativeIterator || getIterationMethod ( DEFAULT ) ;
var anyNativeIterator = NAME == 'Array' ? IterablePrototype . entries || nativeIterator : nativeIterator ;
var CurrentIteratorPrototype , methods , KEY ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// fix native
if ( anyNativeIterator ) {
CurrentIteratorPrototype = getPrototypeOf ( anyNativeIterator . call ( new Iterable ( ) ) ) ;
if ( IteratorPrototype !== Object . prototype && CurrentIteratorPrototype . next ) {
if ( ! IS _PURE && getPrototypeOf ( CurrentIteratorPrototype ) !== IteratorPrototype ) {
if ( setPrototypeOf ) {
setPrototypeOf ( CurrentIteratorPrototype , IteratorPrototype ) ;
} else if ( typeof CurrentIteratorPrototype [ ITERATOR ] != 'function' ) {
createNonEnumerableProperty ( CurrentIteratorPrototype , ITERATOR , returnThis ) ;
}
}
// Set @@toStringTag to native iterators
setToStringTag ( CurrentIteratorPrototype , TO _STRING _TAG , true , true ) ;
if ( IS _PURE ) Iterators [ TO _STRING _TAG ] = returnThis ;
}
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// fix Array#{values, @@iterator}.name in V8 / FF
if ( DEFAULT == VALUES && nativeIterator && nativeIterator . name !== VALUES ) {
INCORRECT _VALUES _NAME = true ;
defaultIterator = function values ( ) { return nativeIterator . call ( this ) ; } ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// define iterator
if ( ( ! IS _PURE || FORCED ) && IterablePrototype [ ITERATOR ] !== defaultIterator ) {
createNonEnumerableProperty ( IterablePrototype , ITERATOR , defaultIterator ) ;
}
Iterators [ NAME ] = defaultIterator ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// export additional methods
if ( DEFAULT ) {
methods = {
values : getIterationMethod ( VALUES ) ,
keys : IS _SET ? defaultIterator : getIterationMethod ( KEYS ) ,
entries : getIterationMethod ( ENTRIES )
} ;
if ( FORCED ) for ( KEY in methods ) {
if ( BUGGY _SAFARI _ITERATORS || INCORRECT _VALUES _NAME || ! ( KEY in IterablePrototype ) ) {
redefine ( IterablePrototype , KEY , methods [ KEY ] ) ;
}
} else $ ( { target : NAME , proto : true , forced : BUGGY _SAFARI _ITERATORS || INCORRECT _VALUES _NAME } , methods ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
return methods ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 9781 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Detect IE8's incomplete defineProperty implementation
module . exports = ! fails ( function ( ) {
return Object . defineProperty ( { } , 1 , { get : function ( ) { return 7 ; } } ) [ 1 ] != 7 ;
} ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 317 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var global = _ _webpack _require _ _ ( 7854 ) ;
var isObject = _ _webpack _require _ _ ( 111 ) ;
var document = global . document ;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject ( document ) && isObject ( document . createElement ) ;
module . exports = function ( it ) {
return EXISTS ? document . createElement ( it ) : { } ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8324 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module . exports = {
CSSRuleList : 0 ,
CSSStyleDeclaration : 0 ,
CSSValueList : 0 ,
ClientRectList : 0 ,
DOMRectList : 0 ,
DOMStringList : 0 ,
DOMTokenList : 1 ,
DataTransferItemList : 0 ,
FileList : 0 ,
HTMLAllCollection : 0 ,
HTMLCollection : 0 ,
HTMLFormElement : 0 ,
HTMLSelectElement : 0 ,
MediaList : 0 ,
MimeTypeArray : 0 ,
NamedNodeMap : 0 ,
NodeList : 1 ,
PaintRequestList : 0 ,
Plugin : 0 ,
PluginArray : 0 ,
SVGLengthList : 0 ,
SVGNumberList : 0 ,
SVGPathSegList : 0 ,
SVGPointList : 0 ,
SVGStringList : 0 ,
SVGTransformList : 0 ,
SourceBufferList : 0 ,
StyleSheetList : 0 ,
TextTrackCueList : 0 ,
TextTrackList : 0 ,
TouchList : 0
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 8113 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getBuiltIn = _ _webpack _require _ _ ( 5005 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = getBuiltIn ( 'navigator' , 'userAgent' ) || '' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 7392 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
var userAgent = _ _webpack _require _ _ ( 8113 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var process = global . process ;
var versions = process && process . versions ;
var v8 = versions && versions . v8 ;
var match , version ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( v8 ) {
match = v8 . split ( '.' ) ;
version = match [ 0 ] + match [ 1 ] ;
} else if ( userAgent ) {
match = userAgent . match ( /Edge\/(\d+)/ ) ;
if ( ! match || match [ 1 ] >= 74 ) {
match = userAgent . match ( /Chrome\/(\d+)/ ) ;
if ( match ) version = match [ 1 ] ;
}
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
module . exports = version && + version ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 748 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// IE8- don't enum bug keys
module . exports = [
'constructor' ,
'hasOwnProperty' ,
'isPrototypeOf' ,
'propertyIsEnumerable' ,
'toLocaleString' ,
'toString' ,
'valueOf'
] ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 2109 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
var getOwnPropertyDescriptor = _ _webpack _require _ _ ( 1236 ) . f ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var redefine = _ _webpack _require _ _ ( 1320 ) ;
var setGlobal = _ _webpack _require _ _ ( 3505 ) ;
var copyConstructorProperties = _ _webpack _require _ _ ( 9920 ) ;
var isForced = _ _webpack _require _ _ ( 4705 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/ *
options . target - name of the target object
options . global - target is the global object
options . stat - export as static methods of target
options . proto - export as prototype methods of target
options . real - real prototype method for the ` pure ` version
options . forced - export even if the native feature is available
options . bind - bind methods to the target , required for the ` pure ` version
options . wrap - wrap constructors to preventing global pollution , required for the ` pure ` version
options . unsafe - use the simple assignment of property instead of delete + defineProperty
options . sham - add a flag to not completely full polyfills
options . enumerable - export as enumerable property
options . noTargetGet - prevent calling a getter on target
* /
module . exports = function ( options , source ) {
var TARGET = options . target ;
var GLOBAL = options . global ;
var STATIC = options . stat ;
var FORCED , target , key , targetProperty , sourceProperty , descriptor ;
if ( GLOBAL ) {
target = global ;
} else if ( STATIC ) {
target = global [ TARGET ] || setGlobal ( TARGET , { } ) ;
} else {
target = ( global [ TARGET ] || { } ) . prototype ;
}
if ( target ) for ( key in source ) {
sourceProperty = source [ key ] ;
if ( options . noTargetGet ) {
descriptor = getOwnPropertyDescriptor ( target , key ) ;
targetProperty = descriptor && descriptor . value ;
} else targetProperty = target [ key ] ;
FORCED = isForced ( GLOBAL ? key : TARGET + ( STATIC ? '.' : '#' ) + key , options . forced ) ;
// contained in target
if ( ! FORCED && targetProperty !== undefined ) {
if ( typeof sourceProperty === typeof targetProperty ) continue ;
copyConstructorProperties ( sourceProperty , targetProperty ) ;
}
// add a flag to not completely full polyfills
if ( options . sham || ( targetProperty && targetProperty . sham ) ) {
createNonEnumerableProperty ( sourceProperty , 'sham' , true ) ;
}
// extend global
redefine ( target , key , sourceProperty , options ) ;
}
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7293 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( exec ) {
2021-02-10 07:13:13 +00:00
try {
2021-03-20 20:39:14 +00:00
return ! ! exec ( ) ;
2021-02-10 07:13:13 +00:00
} catch ( error ) {
2021-03-20 20:39:14 +00:00
return true ;
}
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7007 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// TODO: Remove from `core-js@4` since it's moved to entry points
_ _webpack _require _ _ ( 4916 ) ;
var redefine = _ _webpack _require _ _ ( 1320 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var regexpExec = _ _webpack _require _ _ ( 2261 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var SPECIES = wellKnownSymbol ( 'species' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var REPLACE _SUPPORTS _NAMED _GROUPS = ! fails ( function ( ) {
// #replace needs built-in support for named groups.
// #match works fine because it just return the exec results, even if it has
// a "grops" property.
var re = /./ ;
re . exec = function ( ) {
var result = [ ] ;
result . groups = { a : '7' } ;
return result ;
} ;
return '' . replace ( re , '$<a>' ) !== '7' ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE _KEEPS _$0 = ( function ( ) {
return 'a' . replace ( /./ , '$0' ) === '$0' ;
} ) ( ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var REPLACE = wellKnownSymbol ( 'replace' ) ;
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP _REPLACE _SUBSTITUTES _UNDEFINED _CAPTURE = ( function ( ) {
if ( /./ [ REPLACE ] ) {
return /./ [ REPLACE ] ( 'a' , '$0' ) === '' ;
}
return false ;
} ) ( ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
var SPLIT _WORKS _WITH _OVERWRITTEN _EXEC = ! fails ( function ( ) {
// eslint-disable-next-line regexp/no-empty-group -- required for testing
var re = /(?:)/ ;
var originalExec = re . exec ;
re . exec = function ( ) { return originalExec . apply ( this , arguments ) ; } ;
var result = 'ab' . split ( re ) ;
return result . length !== 2 || result [ 0 ] !== 'a' || result [ 1 ] !== 'b' ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( KEY , length , exec , sham ) {
var SYMBOL = wellKnownSymbol ( KEY ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var DELEGATES _TO _SYMBOL = ! fails ( function ( ) {
// String methods call symbol-named RegEp methods
var O = { } ;
O [ SYMBOL ] = function ( ) { return 7 ; } ;
return '' [ KEY ] ( O ) != 7 ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var DELEGATES _TO _EXEC = DELEGATES _TO _SYMBOL && ! fails ( function ( ) {
// Symbol-named RegExp methods call .exec
var execCalled = false ;
var re = /a/ ;
if ( KEY === 'split' ) {
// We can't use real regex here since it causes deoptimization
// and serious performance degradation in V8
// https://github.com/zloirock/core-js/issues/306
re = { } ;
// RegExp[@@split] doesn't call the regex's exec method, but first creates
// a new one. We need to return the patched regex when creating the new one.
re . constructor = { } ;
re . constructor [ SPECIES ] = function ( ) { return re ; } ;
re . flags = '' ;
re [ SYMBOL ] = /./ [ SYMBOL ] ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
re . exec = function ( ) { execCalled = true ; return null ; } ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
re [ SYMBOL ] ( '' ) ;
return ! execCalled ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if (
! DELEGATES _TO _SYMBOL ||
! DELEGATES _TO _EXEC ||
( KEY === 'replace' && ! (
REPLACE _SUPPORTS _NAMED _GROUPS &&
REPLACE _KEEPS _$0 &&
! REGEXP _REPLACE _SUBSTITUTES _UNDEFINED _CAPTURE
) ) ||
( KEY === 'split' && ! SPLIT _WORKS _WITH _OVERWRITTEN _EXEC )
) {
var nativeRegExpMethod = /./ [ SYMBOL ] ;
var methods = exec ( SYMBOL , '' [ KEY ] , function ( nativeMethod , regexp , str , arg2 , forceStringMethod ) {
if ( regexp . exec === regexpExec ) {
if ( DELEGATES _TO _SYMBOL && ! forceStringMethod ) {
// The native String method already delegates to @@method (this
// polyfilled function), leasing to infinite recursion.
// We avoid it by directly calling the native @@method method.
return { done : true , value : nativeRegExpMethod . call ( regexp , str , arg2 ) } ;
}
return { done : true , value : nativeMethod . call ( str , regexp , arg2 ) } ;
}
return { done : false } ;
} , {
REPLACE _KEEPS _$0 : REPLACE _KEEPS _$0 ,
REGEXP _REPLACE _SUBSTITUTES _UNDEFINED _CAPTURE : REGEXP _REPLACE _SUBSTITUTES _UNDEFINED _CAPTURE
} ) ;
var stringMethod = methods [ 0 ] ;
var regexMethod = methods [ 1 ] ;
redefine ( String . prototype , KEY , stringMethod ) ;
redefine ( RegExp . prototype , SYMBOL , length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function ( string , arg ) { return regexMethod . call ( string , this , arg ) ; }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function ( string ) { return regexMethod . call ( string , this ) ; }
) ;
}
if ( sham ) createNonEnumerableProperty ( RegExp . prototype [ SYMBOL ] , 'sham' , true ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9974 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aFunction = _ _webpack _require _ _ ( 3099 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// optional / simple context binding
module . exports = function ( fn , that , length ) {
aFunction ( fn ) ;
if ( that === undefined ) return fn ;
switch ( length ) {
case 0 : return function ( ) {
return fn . call ( that ) ;
} ;
case 1 : return function ( a ) {
return fn . call ( that , a ) ;
} ;
case 2 : return function ( a , b ) {
return fn . call ( that , a , b ) ;
} ;
case 3 : return function ( a , b , c ) {
return fn . call ( that , a , b , c ) ;
} ;
}
return function ( /* ...args */ ) {
return fn . apply ( that , arguments ) ;
} ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 5005 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var path = _ _webpack _require _ _ ( 857 ) ;
var global = _ _webpack _require _ _ ( 7854 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aFunction = function ( variable ) {
return typeof variable == 'function' ? variable : undefined ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( namespace , method ) {
return arguments . length < 2 ? aFunction ( path [ namespace ] ) || aFunction ( global [ namespace ] )
: path [ namespace ] && path [ namespace ] [ method ] || global [ namespace ] && global [ namespace ] [ method ] ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1246 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var classof = _ _webpack _require _ _ ( 648 ) ;
var Iterators = _ _webpack _require _ _ ( 7497 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
module . exports = function ( it ) {
if ( it != undefined ) return it [ ITERATOR ]
|| it [ '@@iterator' ]
|| Iterators [ classof ( it ) ] ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8554 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var getIteratorMethod = _ _webpack _require _ _ ( 1246 ) ;
2021-02-10 07:13:13 +00:00
module . exports = function ( it ) {
2021-03-20 20:39:14 +00:00
var iteratorMethod = getIteratorMethod ( it ) ;
if ( typeof iteratorMethod != 'function' ) {
throw TypeError ( String ( it ) + ' is not iterable' ) ;
} return anObject ( iteratorMethod . call ( it ) ) ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 647 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toObject = _ _webpack _require _ _ ( 7908 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var floor = Math . floor ;
var replace = '' . replace ;
var SUBSTITUTION _SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g ;
var SUBSTITUTION _SYMBOLS _NO _NAMED = /\$([$&'`]|\d\d?)/g ;
// https://tc39.es/ecma262/#sec-getsubstitution
module . exports = function ( matched , str , position , captures , namedCaptures , replacement ) {
var tailPos = position + matched . length ;
var m = captures . length ;
var symbols = SUBSTITUTION _SYMBOLS _NO _NAMED ;
if ( namedCaptures !== undefined ) {
namedCaptures = toObject ( namedCaptures ) ;
symbols = SUBSTITUTION _SYMBOLS ;
}
return replace . call ( replacement , symbols , function ( match , ch ) {
var capture ;
switch ( ch . charAt ( 0 ) ) {
case '$' : return '$' ;
case '&' : return matched ;
case '`' : return str . slice ( 0 , position ) ;
case "'" : return str . slice ( tailPos ) ;
case '<' :
capture = namedCaptures [ ch . slice ( 1 , - 1 ) ] ;
break ;
default : // \d\d?
var n = + ch ;
if ( n === 0 ) return match ;
if ( n > m ) {
var f = floor ( n / 10 ) ;
if ( f === 0 ) return match ;
if ( f <= m ) return captures [ f - 1 ] === undefined ? ch . charAt ( 1 ) : captures [ f - 1 ] + ch . charAt ( 1 ) ;
return match ;
}
capture = captures [ n - 1 ] ;
}
return capture === undefined ? '' : capture ;
2021-02-10 07:13:13 +00:00
} ) ;
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7854 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var check = function ( it ) {
return it && it . Math == Math && it ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module . exports =
/* global globalThis -- safe */
check ( typeof globalThis == 'object' && globalThis ) ||
check ( typeof window == 'object' && window ) ||
check ( typeof self == 'object' && self ) ||
check ( typeof _ _webpack _require _ _ . g == 'object' && _ _webpack _require _ _ . g ) ||
// eslint-disable-next-line no-new-func -- fallback
( function ( ) { return this ; } ) ( ) || Function ( 'return this' ) ( ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 6656 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var hasOwnProperty = { } . hasOwnProperty ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( it , key ) {
return hasOwnProperty . call ( it , key ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 3501 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = { } ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 490 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getBuiltIn = _ _webpack _require _ _ ( 5005 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = getBuiltIn ( 'document' , 'documentElement' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
/***/ 4664 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var createElement = _ _webpack _require _ _ ( 317 ) ;
// Thank's IE8 for his funny defineProperty
module . exports = ! DESCRIPTORS && ! fails ( function ( ) {
return Object . defineProperty ( createElement ( 'div' ) , 'a' , {
get : function ( ) { return 7 ; }
} ) . a != 7 ;
} ) ;
/***/ } ) ,
/***/ 1179 :
/***/ ( function ( module ) {
// IEEE754 conversions based on https://github.com/feross/ieee754
var abs = Math . abs ;
var pow = Math . pow ;
var floor = Math . floor ;
var log = Math . log ;
var LN2 = Math . LN2 ;
var pack = function ( number , mantissaLength , bytes ) {
var buffer = new Array ( bytes ) ;
var exponentLength = bytes * 8 - mantissaLength - 1 ;
var eMax = ( 1 << exponentLength ) - 1 ;
var eBias = eMax >> 1 ;
var rt = mantissaLength === 23 ? pow ( 2 , - 24 ) - pow ( 2 , - 77 ) : 0 ;
var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0 ;
var index = 0 ;
var exponent , mantissa , c ;
number = abs ( number ) ;
// eslint-disable-next-line no-self-compare -- NaN check
if ( number != number || number === Infinity ) {
// eslint-disable-next-line no-self-compare -- NaN check
mantissa = number != number ? 1 : 0 ;
exponent = eMax ;
} else {
exponent = floor ( log ( number ) / LN2 ) ;
if ( number * ( c = pow ( 2 , - exponent ) ) < 1 ) {
exponent -- ;
c *= 2 ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
if ( exponent + eBias >= 1 ) {
number += rt / c ;
} else {
number += rt * pow ( 2 , 1 - eBias ) ;
}
if ( number * c >= 2 ) {
exponent ++ ;
c /= 2 ;
}
if ( exponent + eBias >= eMax ) {
mantissa = 0 ;
exponent = eMax ;
} else if ( exponent + eBias >= 1 ) {
mantissa = ( number * c - 1 ) * pow ( 2 , mantissaLength ) ;
exponent = exponent + eBias ;
} else {
mantissa = number * pow ( 2 , eBias - 1 ) * pow ( 2 , mantissaLength ) ;
exponent = 0 ;
}
}
for ( ; mantissaLength >= 8 ; buffer [ index ++ ] = mantissa & 255 , mantissa /= 256 , mantissaLength -= 8 ) ;
exponent = exponent << mantissaLength | mantissa ;
exponentLength += mantissaLength ;
for ( ; exponentLength > 0 ; buffer [ index ++ ] = exponent & 255 , exponent /= 256 , exponentLength -= 8 ) ;
buffer [ -- index ] |= sign * 128 ;
return buffer ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var unpack = function ( buffer , mantissaLength ) {
var bytes = buffer . length ;
var exponentLength = bytes * 8 - mantissaLength - 1 ;
var eMax = ( 1 << exponentLength ) - 1 ;
var eBias = eMax >> 1 ;
var nBits = exponentLength - 7 ;
var index = bytes - 1 ;
var sign = buffer [ index -- ] ;
var exponent = sign & 127 ;
var mantissa ;
sign >>= 7 ;
for ( ; nBits > 0 ; exponent = exponent * 256 + buffer [ index ] , index -- , nBits -= 8 ) ;
mantissa = exponent & ( 1 << - nBits ) - 1 ;
exponent >>= - nBits ;
nBits += mantissaLength ;
for ( ; nBits > 0 ; mantissa = mantissa * 256 + buffer [ index ] , index -- , nBits -= 8 ) ;
if ( exponent === 0 ) {
exponent = 1 - eBias ;
} else if ( exponent === eMax ) {
return mantissa ? NaN : sign ? - Infinity : Infinity ;
} else {
mantissa = mantissa + pow ( 2 , mantissaLength ) ;
exponent = exponent - eBias ;
} return ( sign ? - 1 : 1 ) * mantissa * pow ( 2 , exponent - mantissaLength ) ;
} ;
2021-02-10 07:13:13 +00:00
module . exports = {
2021-03-20 20:39:14 +00:00
pack : pack ,
unpack : unpack
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8361 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
var classof = _ _webpack _require _ _ ( 4326 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var split = '' . split ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module . exports = fails ( function ( ) {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins -- safe
return ! Object ( 'z' ) . propertyIsEnumerable ( 0 ) ;
} ) ? function ( it ) {
return classof ( it ) == 'String' ? split . call ( it , '' ) : Object ( it ) ;
} : Object ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9587 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var isObject = _ _webpack _require _ _ ( 111 ) ;
var setPrototypeOf = _ _webpack _require _ _ ( 7674 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// makes subclassing work correct for wrapped built-ins
module . exports = function ( $this , dummy , Wrapper ) {
var NewTarget , NewTargetPrototype ;
if (
// it can work only with native `setPrototypeOf`
setPrototypeOf &&
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
typeof ( NewTarget = dummy . constructor ) == 'function' &&
NewTarget !== Wrapper &&
isObject ( NewTargetPrototype = NewTarget . prototype ) &&
NewTargetPrototype !== Wrapper . prototype
) setPrototypeOf ( $this , NewTargetPrototype ) ;
return $this ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 2788 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var store = _ _webpack _require _ _ ( 5465 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var functionToString = Function . toString ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if ( typeof store . inspectSource != 'function' ) {
store . inspectSource = function ( it ) {
return functionToString . call ( it ) ;
} ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = store . inspectSource ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 9909 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var NATIVE _WEAK _MAP = _ _webpack _require _ _ ( 8536 ) ;
var global = _ _webpack _require _ _ ( 7854 ) ;
var isObject = _ _webpack _require _ _ ( 111 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var objectHas = _ _webpack _require _ _ ( 6656 ) ;
var shared = _ _webpack _require _ _ ( 5465 ) ;
var sharedKey = _ _webpack _require _ _ ( 6200 ) ;
var hiddenKeys = _ _webpack _require _ _ ( 3501 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var WeakMap = global . WeakMap ;
var set , get , has ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var enforce = function ( it ) {
return has ( it ) ? get ( it ) : set ( it , { } ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getterFor = function ( TYPE ) {
return function ( it ) {
var state ;
if ( ! isObject ( it ) || ( state = get ( it ) ) . type !== TYPE ) {
throw TypeError ( 'Incompatible receiver, ' + TYPE + ' required' ) ;
} return state ;
} ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( NATIVE _WEAK _MAP ) {
var store = shared . state || ( shared . state = new WeakMap ( ) ) ;
var wmget = store . get ;
var wmhas = store . has ;
var wmset = store . set ;
set = function ( it , metadata ) {
metadata . facade = it ;
wmset . call ( store , it , metadata ) ;
return metadata ;
} ;
get = function ( it ) {
return wmget . call ( store , it ) || { } ;
} ;
has = function ( it ) {
return wmhas . call ( store , it ) ;
} ;
} else {
var STATE = sharedKey ( 'state' ) ;
hiddenKeys [ STATE ] = true ;
set = function ( it , metadata ) {
metadata . facade = it ;
createNonEnumerableProperty ( it , STATE , metadata ) ;
return metadata ;
} ;
get = function ( it ) {
return objectHas ( it , STATE ) ? it [ STATE ] : { } ;
} ;
has = function ( it ) {
return objectHas ( it , STATE ) ;
} ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = {
set : set ,
get : get ,
has : has ,
enforce : enforce ,
getterFor : getterFor
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 7659 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var Iterators = _ _webpack _require _ _ ( 7497 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
var ArrayPrototype = Array . prototype ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// check on default Array iterator
module . exports = function ( it ) {
return it !== undefined && ( Iterators . Array === it || ArrayPrototype [ ITERATOR ] === it ) ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3157 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var classof = _ _webpack _require _ _ ( 4326 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `IsArray` abstract operation
// https://tc39.es/ecma262/#sec-isarray
module . exports = Array . isArray || function isArray ( arg ) {
return classof ( arg ) == 'Array' ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 4705 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var replacement = /#|\.prototype\./ ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var isForced = function ( feature , detection ) {
var value = data [ normalize ( feature ) ] ;
return value == POLYFILL ? true
: value == NATIVE ? false
: typeof detection == 'function' ? fails ( detection )
: ! ! detection ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var normalize = isForced . normalize = function ( string ) {
return String ( string ) . replace ( replacement , '.' ) . toLowerCase ( ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var data = isForced . data = { } ;
var NATIVE = isForced . NATIVE = 'N' ;
var POLYFILL = isForced . POLYFILL = 'P' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = isForced ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 111 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( it ) {
return typeof it === 'object' ? it !== null : typeof it === 'function' ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1913 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = false ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7850 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var isObject = _ _webpack _require _ _ ( 111 ) ;
var classof = _ _webpack _require _ _ ( 4326 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var MATCH = wellKnownSymbol ( 'match' ) ;
// `IsRegExp` abstract operation
// https://tc39.es/ecma262/#sec-isregexp
module . exports = function ( it ) {
var isRegExp ;
return isObject ( it ) && ( ( isRegExp = it [ MATCH ] ) !== undefined ? ! ! isRegExp : classof ( it ) == 'RegExp' ) ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9212 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var anObject = _ _webpack _require _ _ ( 9670 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( iterator ) {
var returnMethod = iterator [ 'return' ] ;
if ( returnMethod !== undefined ) {
return anObject ( returnMethod . call ( iterator ) ) . value ;
}
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3383 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
var getPrototypeOf = _ _webpack _require _ _ ( 9518 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var has = _ _webpack _require _ _ ( 6656 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var IS _PURE = _ _webpack _require _ _ ( 1913 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
var BUGGY _SAFARI _ITERATORS = false ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var returnThis = function ( ) { return this ; } ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%IteratorPrototype%` object
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype , PrototypeOfArrayIteratorPrototype , arrayIterator ;
if ( [ ] . keys ) {
arrayIterator = [ ] . keys ( ) ;
// Safari 8 has buggy iterators w/o `next`
if ( ! ( 'next' in arrayIterator ) ) BUGGY _SAFARI _ITERATORS = true ;
else {
PrototypeOfArrayIteratorPrototype = getPrototypeOf ( getPrototypeOf ( arrayIterator ) ) ;
if ( PrototypeOfArrayIteratorPrototype !== Object . prototype ) IteratorPrototype = PrototypeOfArrayIteratorPrototype ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
}
var NEW _ITERATOR _PROTOTYPE = IteratorPrototype == undefined || fails ( function ( ) {
var test = { } ;
// FF44- legacy iterators case
return IteratorPrototype [ ITERATOR ] . call ( test ) !== test ;
} ) ;
if ( NEW _ITERATOR _PROTOTYPE ) IteratorPrototype = { } ;
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if ( ( ! IS _PURE || NEW _ITERATOR _PROTOTYPE ) && ! has ( IteratorPrototype , ITERATOR ) ) {
createNonEnumerableProperty ( IteratorPrototype , ITERATOR , returnThis ) ;
}
module . exports = {
IteratorPrototype : IteratorPrototype ,
BUGGY _SAFARI _ITERATORS : BUGGY _SAFARI _ITERATORS
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7497 :
/***/ ( function ( module ) {
module . exports = { } ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 133 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var fails = _ _webpack _require _ _ ( 7293 ) ;
2021-02-10 07:13:13 +00:00
module . exports = ! ! Object . getOwnPropertySymbols && ! fails ( function ( ) {
// Chrome 38 Symbol has incorrect toString conversion
2021-03-20 20:39:14 +00:00
/* global Symbol -- required for testing */
2021-02-10 07:13:13 +00:00
return ! String ( Symbol ( ) ) ;
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 590 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var IS _PURE = _ _webpack _require _ _ ( 1913 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = ! fails ( function ( ) {
var url = new URL ( 'b?a=1&b=2&c=3' , 'http://a' ) ;
var searchParams = url . searchParams ;
var result = '' ;
url . pathname = 'c%20d' ;
searchParams . forEach ( function ( value , key ) {
searchParams [ 'delete' ] ( 'b' ) ;
result += key + value ;
} ) ;
return ( IS _PURE && ! url . toJSON )
|| ! searchParams . sort
|| url . href !== 'http://a/c%20d?a=1&c=3'
|| searchParams . get ( 'c' ) !== '3'
|| String ( new URLSearchParams ( '?a=1' ) ) !== 'a=1'
|| ! searchParams [ ITERATOR ]
// throws in Edge
|| new URL ( 'https://a@b' ) . username !== 'a'
|| new URLSearchParams ( new URLSearchParams ( 'a=b' ) ) . get ( 'a' ) !== 'b'
// not punycoded in Edge
|| new URL ( 'http://тест' ) . host !== 'xn--e1aybc'
// not escaped in Chrome 62-
|| new URL ( 'http://a#б ' ) . hash !== '#%D0%B1'
// fails in Chrome 66-
|| result !== 'a1c3'
// throws in Safari
|| new URL ( 'http://x' , undefined ) . host !== 'x' ;
} ) ;
/***/ } ) ,
/***/ 8536 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var global = _ _webpack _require _ _ ( 7854 ) ;
var inspectSource = _ _webpack _require _ _ ( 2788 ) ;
var WeakMap = global . WeakMap ;
module . exports = typeof WeakMap === 'function' && /native code/ . test ( inspectSource ( WeakMap ) ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1574 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var objectKeys = _ _webpack _require _ _ ( 1956 ) ;
var getOwnPropertySymbolsModule = _ _webpack _require _ _ ( 5181 ) ;
var propertyIsEnumerableModule = _ _webpack _require _ _ ( 5296 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var IndexedObject = _ _webpack _require _ _ ( 8361 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var nativeAssign = Object . assign ;
var defineProperty = Object . defineProperty ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.assign` method
// https://tc39.es/ecma262/#sec-object.assign
module . exports = ! nativeAssign || fails ( function ( ) {
// should have correct order of operations (Edge bug)
if ( DESCRIPTORS && nativeAssign ( { b : 1 } , nativeAssign ( defineProperty ( { } , 'a' , {
enumerable : true ,
get : function ( ) {
defineProperty ( this , 'b' , {
value : 3 ,
enumerable : false
} ) ;
}
} ) , { b : 2 } ) ) . b !== 1 ) return true ;
// should work with symbols and should have deterministic property order (V8 bug)
var A = { } ;
var B = { } ;
/* global Symbol -- required for testing */
var symbol = Symbol ( ) ;
var alphabet = 'abcdefghijklmnopqrst' ;
A [ symbol ] = 7 ;
alphabet . split ( '' ) . forEach ( function ( chr ) { B [ chr ] = chr ; } ) ;
return nativeAssign ( { } , A ) [ symbol ] != 7 || objectKeys ( nativeAssign ( { } , B ) ) . join ( '' ) != alphabet ;
} ) ? function assign ( target , source ) { // eslint-disable-line no-unused-vars -- required for `.length`
var T = toObject ( target ) ;
var argumentsLength = arguments . length ;
var index = 1 ;
var getOwnPropertySymbols = getOwnPropertySymbolsModule . f ;
var propertyIsEnumerable = propertyIsEnumerableModule . f ;
while ( argumentsLength > index ) {
var S = IndexedObject ( arguments [ index ++ ] ) ;
var keys = getOwnPropertySymbols ? objectKeys ( S ) . concat ( getOwnPropertySymbols ( S ) ) : objectKeys ( S ) ;
var length = keys . length ;
var j = 0 ;
var key ;
while ( length > j ) {
key = keys [ j ++ ] ;
if ( ! DESCRIPTORS || propertyIsEnumerable . call ( S , key ) ) T [ key ] = S [ key ] ;
}
} return T ;
} : nativeAssign ;
/***/ } ) ,
/***/ 30 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var defineProperties = _ _webpack _require _ _ ( 6048 ) ;
var enumBugKeys = _ _webpack _require _ _ ( 748 ) ;
var hiddenKeys = _ _webpack _require _ _ ( 3501 ) ;
var html = _ _webpack _require _ _ ( 490 ) ;
var documentCreateElement = _ _webpack _require _ _ ( 317 ) ;
var sharedKey = _ _webpack _require _ _ ( 6200 ) ;
var GT = '>' ;
var LT = '<' ;
var PROTOTYPE = 'prototype' ;
var SCRIPT = 'script' ;
var IE _PROTO = sharedKey ( 'IE_PROTO' ) ;
var EmptyConstructor = function ( ) { /* empty */ } ;
var scriptTag = function ( content ) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT ;
} ;
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function ( activeXDocument ) {
activeXDocument . write ( scriptTag ( '' ) ) ;
activeXDocument . close ( ) ;
var temp = activeXDocument . parentWindow . Object ;
activeXDocument = null ; // avoid memory leak
return temp ;
} ;
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function ( ) {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement ( 'iframe' ) ;
var JS = 'java' + SCRIPT + ':' ;
var iframeDocument ;
iframe . style . display = 'none' ;
html . appendChild ( iframe ) ;
// https://github.com/zloirock/core-js/issues/475
iframe . src = String ( JS ) ;
iframeDocument = iframe . contentWindow . document ;
iframeDocument . open ( ) ;
iframeDocument . write ( scriptTag ( 'document.F=Object' ) ) ;
iframeDocument . close ( ) ;
return iframeDocument . F ;
} ;
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument ;
var NullProtoObject = function ( ) {
try {
/* global ActiveXObject -- old IE */
activeXDocument = document . domain && new ActiveXObject ( 'htmlfile' ) ;
} catch ( error ) { /* ignore */ }
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX ( activeXDocument ) : NullProtoObjectViaIFrame ( ) ;
var length = enumBugKeys . length ;
while ( length -- ) delete NullProtoObject [ PROTOTYPE ] [ enumBugKeys [ length ] ] ;
return NullProtoObject ( ) ;
} ;
hiddenKeys [ IE _PROTO ] = true ;
// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
module . exports = Object . create || function create ( O , Properties ) {
var result ;
if ( O !== null ) {
EmptyConstructor [ PROTOTYPE ] = anObject ( O ) ;
result = new EmptyConstructor ( ) ;
EmptyConstructor [ PROTOTYPE ] = null ;
// add "__proto__" for Object.getPrototypeOf polyfill
result [ IE _PROTO ] = O ;
} else result = NullProtoObject ( ) ;
return Properties === undefined ? result : defineProperties ( result , Properties ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 6048 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var definePropertyModule = _ _webpack _require _ _ ( 3070 ) ;
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var objectKeys = _ _webpack _require _ _ ( 1956 ) ;
2021-02-10 07:13:13 +00:00
// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
module . exports = DESCRIPTORS ? Object . defineProperties : function defineProperties ( O , Properties ) {
anObject ( O ) ;
var keys = objectKeys ( Properties ) ;
var length = keys . length ;
var index = 0 ;
var key ;
while ( length > index ) definePropertyModule . f ( O , key = keys [ index ++ ] , Properties [ key ] ) ;
return O ;
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3070 :
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var IE8 _DOM _DEFINE = _ _webpack _require _ _ ( 4664 ) ;
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var toPrimitive = _ _webpack _require _ _ ( 7593 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var nativeDefineProperty = Object . defineProperty ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports . f = DESCRIPTORS ? nativeDefineProperty : function defineProperty ( O , P , Attributes ) {
anObject ( O ) ;
P = toPrimitive ( P , true ) ;
anObject ( Attributes ) ;
if ( IE8 _DOM _DEFINE ) try {
return nativeDefineProperty ( O , P , Attributes ) ;
} catch ( error ) { /* empty */ }
if ( 'get' in Attributes || 'set' in Attributes ) throw TypeError ( 'Accessors not supported' ) ;
if ( 'value' in Attributes ) O [ P ] = Attributes . value ;
return O ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 1236 :
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var propertyIsEnumerableModule = _ _webpack _require _ _ ( 5296 ) ;
var createPropertyDescriptor = _ _webpack _require _ _ ( 9114 ) ;
var toIndexedObject = _ _webpack _require _ _ ( 5656 ) ;
var toPrimitive = _ _webpack _require _ _ ( 7593 ) ;
var has = _ _webpack _require _ _ ( 6656 ) ;
var IE8 _DOM _DEFINE = _ _webpack _require _ _ ( 4664 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var nativeGetOwnPropertyDescriptor = Object . getOwnPropertyDescriptor ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports . f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor ( O , P ) {
O = toIndexedObject ( O ) ;
P = toPrimitive ( P , true ) ;
if ( IE8 _DOM _DEFINE ) try {
return nativeGetOwnPropertyDescriptor ( O , P ) ;
} catch ( error ) { /* empty */ }
if ( has ( O , P ) ) return createPropertyDescriptor ( ! propertyIsEnumerableModule . f . call ( O , P ) , O [ P ] ) ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8006 :
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var internalObjectKeys = _ _webpack _require _ _ ( 6324 ) ;
var enumBugKeys = _ _webpack _require _ _ ( 748 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var hiddenKeys = enumBugKeys . concat ( 'length' , 'prototype' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
exports . f = Object . getOwnPropertyNames || function getOwnPropertyNames ( O ) {
return internalObjectKeys ( O , hiddenKeys ) ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 5181 :
/***/ ( function ( _ _unused _webpack _module , exports ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
exports . f = Object . getOwnPropertySymbols ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 9518 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var has = _ _webpack _require _ _ ( 6656 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var sharedKey = _ _webpack _require _ _ ( 6200 ) ;
var CORRECT _PROTOTYPE _GETTER = _ _webpack _require _ _ ( 8544 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var IE _PROTO = sharedKey ( 'IE_PROTO' ) ;
var ObjectPrototype = Object . prototype ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
module . exports = CORRECT _PROTOTYPE _GETTER ? Object . getPrototypeOf : function ( O ) {
O = toObject ( O ) ;
if ( has ( O , IE _PROTO ) ) return O [ IE _PROTO ] ;
if ( typeof O . constructor == 'function' && O instanceof O . constructor ) {
return O . constructor . prototype ;
} return O instanceof Object ? ObjectPrototype : null ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 6324 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var has = _ _webpack _require _ _ ( 6656 ) ;
var toIndexedObject = _ _webpack _require _ _ ( 5656 ) ;
var indexOf = _ _webpack _require _ _ ( 1318 ) . indexOf ;
var hiddenKeys = _ _webpack _require _ _ ( 3501 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( object , names ) {
var O = toIndexedObject ( object ) ;
var i = 0 ;
var result = [ ] ;
var key ;
for ( key in O ) ! has ( hiddenKeys , key ) && has ( O , key ) && result . push ( key ) ;
// Don't enum bug & hidden keys
while ( names . length > i ) if ( has ( O , key = names [ i ++ ] ) ) {
~ indexOf ( result , key ) || result . push ( key ) ;
}
return result ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 1956 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var internalObjectKeys = _ _webpack _require _ _ ( 6324 ) ;
var enumBugKeys = _ _webpack _require _ _ ( 748 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
module . exports = Object . keys || function keys ( O ) {
return internalObjectKeys ( O , enumBugKeys ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 5296 :
/***/ ( function ( _ _unused _webpack _module , exports ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var nativePropertyIsEnumerable = { } . propertyIsEnumerable ;
var getOwnPropertyDescriptor = Object . getOwnPropertyDescriptor ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Nashorn ~ JDK8 bug
var NASHORN _BUG = getOwnPropertyDescriptor && ! nativePropertyIsEnumerable . call ( { 1 : 2 } , 1 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports . f = NASHORN _BUG ? function propertyIsEnumerable ( V ) {
var descriptor = getOwnPropertyDescriptor ( this , V ) ;
return ! ! descriptor && descriptor . enumerable ;
} : nativePropertyIsEnumerable ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7674 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/* eslint-disable no-proto -- safe */
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var aPossiblePrototype = _ _webpack _require _ _ ( 6077 ) ;
// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
module . exports = Object . setPrototypeOf || ( '__proto__' in { } ? function ( ) {
var CORRECT _SETTER = false ;
var test = { } ;
var setter ;
try {
setter = Object . getOwnPropertyDescriptor ( Object . prototype , '__proto__' ) . set ;
setter . call ( test , [ ] ) ;
CORRECT _SETTER = test instanceof Array ;
} catch ( error ) { /* empty */ }
return function setPrototypeOf ( O , proto ) {
anObject ( O ) ;
aPossiblePrototype ( proto ) ;
if ( CORRECT _SETTER ) setter . call ( O , proto ) ;
else O . _ _proto _ _ = proto ;
return O ;
} ;
} ( ) : undefined ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 288 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var TO _STRING _TAG _SUPPORT = _ _webpack _require _ _ ( 1694 ) ;
var classof = _ _webpack _require _ _ ( 648 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.prototype.toString` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.tostring
module . exports = TO _STRING _TAG _SUPPORT ? { } . toString : function toString ( ) {
return '[object ' + classof ( this ) + ']' ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3887 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getBuiltIn = _ _webpack _require _ _ ( 5005 ) ;
var getOwnPropertyNamesModule = _ _webpack _require _ _ ( 8006 ) ;
var getOwnPropertySymbolsModule = _ _webpack _require _ _ ( 5181 ) ;
var anObject = _ _webpack _require _ _ ( 9670 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// all object keys, includes non-enumerable and symbols
module . exports = getBuiltIn ( 'Reflect' , 'ownKeys' ) || function ownKeys ( it ) {
var keys = getOwnPropertyNamesModule . f ( anObject ( it ) ) ;
var getOwnPropertySymbols = getOwnPropertySymbolsModule . f ;
return getOwnPropertySymbols ? keys . concat ( getOwnPropertySymbols ( it ) ) : keys ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 857 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = global ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 2248 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var redefine = _ _webpack _require _ _ ( 1320 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( target , src , options ) {
for ( var key in src ) redefine ( target , key , src [ key ] , options ) ;
return target ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1320 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var has = _ _webpack _require _ _ ( 6656 ) ;
var setGlobal = _ _webpack _require _ _ ( 3505 ) ;
var inspectSource = _ _webpack _require _ _ ( 2788 ) ;
var InternalStateModule = _ _webpack _require _ _ ( 9909 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getInternalState = InternalStateModule . get ;
var enforceInternalState = InternalStateModule . enforce ;
var TEMPLATE = String ( String ) . split ( 'String' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
( module . exports = function ( O , key , value , options ) {
var unsafe = options ? ! ! options . unsafe : false ;
var simple = options ? ! ! options . enumerable : false ;
var noTargetGet = options ? ! ! options . noTargetGet : false ;
var state ;
if ( typeof value == 'function' ) {
if ( typeof key == 'string' && ! has ( value , 'name' ) ) {
createNonEnumerableProperty ( value , 'name' , key ) ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
state = enforceInternalState ( value ) ;
if ( ! state . source ) {
state . source = TEMPLATE . join ( typeof key == 'string' ? key : '' ) ;
}
}
if ( O === global ) {
if ( simple ) O [ key ] = value ;
else setGlobal ( key , value ) ;
return ;
} else if ( ! unsafe ) {
delete O [ key ] ;
} else if ( ! noTargetGet && O [ key ] ) {
simple = true ;
}
if ( simple ) O [ key ] = value ;
else createNonEnumerableProperty ( O , key , value ) ;
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
} ) ( Function . prototype , 'toString' , function toString ( ) {
return typeof this == 'function' && getInternalState ( this ) . source || inspectSource ( this ) ;
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7651 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var classof = _ _webpack _require _ _ ( 4326 ) ;
var regexpExec = _ _webpack _require _ _ ( 2261 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `RegExpExec` abstract operation
// https://tc39.es/ecma262/#sec-regexpexec
module . exports = function ( R , S ) {
var exec = R . exec ;
if ( typeof exec === 'function' ) {
var result = exec . call ( R , S ) ;
if ( typeof result !== 'object' ) {
throw TypeError ( 'RegExp exec method returned something other than an Object or null' ) ;
}
return result ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
if ( classof ( R ) !== 'RegExp' ) {
throw TypeError ( 'RegExp#exec called on incompatible receiver' ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
return regexpExec . call ( R , S ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 2261 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var regexpFlags = _ _webpack _require _ _ ( 7066 ) ;
var stickyHelpers = _ _webpack _require _ _ ( 2999 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var nativeExec = RegExp . prototype . exec ;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String . prototype . replace ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var patchedExec = nativeExec ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var UPDATES _LAST _INDEX _WRONG = ( function ( ) {
var re1 = /a/ ;
var re2 = /b*/g ;
nativeExec . call ( re1 , 'a' ) ;
nativeExec . call ( re2 , 'a' ) ;
return re1 . lastIndex !== 0 || re2 . lastIndex !== 0 ;
} ) ( ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var UNSUPPORTED _Y = stickyHelpers . UNSUPPORTED _Y || stickyHelpers . BROKEN _CARET ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// nonparticipating capturing group, copied from es5-shim's String#split patch.
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
var NPCG _INCLUDED = /()??/ . exec ( '' ) [ 1 ] !== undefined ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var PATCH = UPDATES _LAST _INDEX _WRONG || NPCG _INCLUDED || UNSUPPORTED _Y ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( PATCH ) {
patchedExec = function exec ( str ) {
var re = this ;
var lastIndex , reCopy , match , i ;
var sticky = UNSUPPORTED _Y && re . sticky ;
var flags = regexpFlags . call ( re ) ;
var source = re . source ;
var charsAdded = 0 ;
var strCopy = str ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( sticky ) {
flags = flags . replace ( 'y' , '' ) ;
if ( flags . indexOf ( 'g' ) === - 1 ) {
flags += 'g' ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
strCopy = String ( str ) . slice ( re . lastIndex ) ;
// Support anchored sticky behavior.
if ( re . lastIndex > 0 && ( ! re . multiline || re . multiline && str [ re . lastIndex - 1 ] !== '\n' ) ) {
source = '(?: ' + source + ')' ;
strCopy = ' ' + strCopy ;
charsAdded ++ ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
// ^(? + rx + ) is needed, in combination with some str slicing, to
// simulate the 'y' flag.
reCopy = new RegExp ( '^(?:' + source + ')' , flags ) ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
if ( NPCG _INCLUDED ) {
reCopy = new RegExp ( '^' + source + '$(?!\\s)' , flags ) ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
if ( UPDATES _LAST _INDEX _WRONG ) lastIndex = re . lastIndex ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
match = nativeExec . call ( sticky ? reCopy : re , strCopy ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( sticky ) {
if ( match ) {
match . input = match . input . slice ( charsAdded ) ;
match [ 0 ] = match [ 0 ] . slice ( charsAdded ) ;
match . index = re . lastIndex ;
re . lastIndex += match [ 0 ] . length ;
} else re . lastIndex = 0 ;
} else if ( UPDATES _LAST _INDEX _WRONG && match ) {
re . lastIndex = re . global ? match . index + match [ 0 ] . length : lastIndex ;
}
if ( NPCG _INCLUDED && match && match . length > 1 ) {
// Fix browsers whose `exec` methods don't consistently return `undefined`
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
nativeReplace . call ( match [ 0 ] , reCopy , function ( ) {
for ( i = 1 ; i < arguments . length - 2 ; i ++ ) {
if ( arguments [ i ] === undefined ) match [ i ] = undefined ;
}
} ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
return match ;
} ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = patchedExec ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7066 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var anObject = _ _webpack _require _ _ ( 9670 ) ;
// `RegExp.prototype.flags` getter implementation
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
module . exports = function ( ) {
var that = anObject ( this ) ;
2021-02-10 07:13:13 +00:00
var result = '' ;
2021-03-20 20:39:14 +00:00
if ( that . global ) result += 'g' ;
if ( that . ignoreCase ) result += 'i' ;
if ( that . multiline ) result += 'm' ;
if ( that . dotAll ) result += 's' ;
if ( that . unicode ) result += 'u' ;
if ( that . sticky ) result += 'y' ;
return result ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 2999 :
/***/ ( function ( _ _unused _webpack _module , exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
// so we use an intermediate function.
function RE ( s , f ) {
return RegExp ( s , f ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
exports . UNSUPPORTED _Y = fails ( function ( ) {
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
var re = RE ( 'a' , 'y' ) ;
re . lastIndex = 2 ;
return re . exec ( 'abcd' ) != null ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
exports . BROKEN _CARET = fails ( function ( ) {
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
var re = RE ( '^r' , 'gy' ) ;
re . lastIndex = 2 ;
return re . exec ( 'str' ) != null ;
2021-02-10 07:13:13 +00:00
} ) ;
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 4488 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module . exports = function ( it ) {
if ( it == undefined ) throw TypeError ( "Can't call method on " + it ) ;
return it ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3505 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( key , value ) {
try {
createNonEnumerableProperty ( global , key , value ) ;
} catch ( error ) {
global [ key ] = value ;
} return value ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 6340 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getBuiltIn = _ _webpack _require _ _ ( 5005 ) ;
var definePropertyModule = _ _webpack _require _ _ ( 3070 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var SPECIES = wellKnownSymbol ( 'species' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( CONSTRUCTOR _NAME ) {
var Constructor = getBuiltIn ( CONSTRUCTOR _NAME ) ;
var defineProperty = definePropertyModule . f ;
if ( DESCRIPTORS && Constructor && ! Constructor [ SPECIES ] ) {
defineProperty ( Constructor , SPECIES , {
configurable : true ,
get : function ( ) { return this ; }
} ) ;
}
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8003 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var defineProperty = _ _webpack _require _ _ ( 3070 ) . f ;
var has = _ _webpack _require _ _ ( 6656 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var TO _STRING _TAG = wellKnownSymbol ( 'toStringTag' ) ;
module . exports = function ( it , TAG , STATIC ) {
if ( it && ! has ( it = STATIC ? it : it . prototype , TO _STRING _TAG ) ) {
defineProperty ( it , TO _STRING _TAG , { configurable : true , value : TAG } ) ;
2021-02-10 07:13:13 +00:00
}
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 6200 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var shared = _ _webpack _require _ _ ( 2309 ) ;
var uid = _ _webpack _require _ _ ( 9711 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var keys = shared ( 'keys' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( key ) {
return keys [ key ] || ( keys [ key ] = uid ( key ) ) ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 5465 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
var setGlobal = _ _webpack _require _ _ ( 3505 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var SHARED = '__core-js_shared__' ;
var store = global [ SHARED ] || setGlobal ( SHARED , { } ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = store ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 2309 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var IS _PURE = _ _webpack _require _ _ ( 1913 ) ;
var store = _ _webpack _require _ _ ( 5465 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
( module . exports = function ( key , value ) {
return store [ key ] || ( store [ key ] = value !== undefined ? value : { } ) ;
} ) ( 'versions' , [ ] ) . push ( {
version : '3.9.0' ,
mode : IS _PURE ? 'pure' : 'global' ,
copyright : '© 2021 Denis Pushkarev (zloirock.ru)'
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 6707 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var aFunction = _ _webpack _require _ _ ( 3099 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var SPECIES = wellKnownSymbol ( 'species' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `SpeciesConstructor` abstract operation
// https://tc39.es/ecma262/#sec-speciesconstructor
module . exports = function ( O , defaultConstructor ) {
var C = anObject ( O ) . constructor ;
var S ;
return C === undefined || ( S = anObject ( C ) [ SPECIES ] ) == undefined ? defaultConstructor : aFunction ( S ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8710 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
var requireObjectCoercible = _ _webpack _require _ _ ( 4488 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function ( CONVERT _TO _STRING ) {
return function ( $this , pos ) {
var S = String ( requireObjectCoercible ( $this ) ) ;
var position = toInteger ( pos ) ;
var size = S . length ;
var first , second ;
if ( position < 0 || position >= size ) return CONVERT _TO _STRING ? '' : undefined ;
first = S . charCodeAt ( position ) ;
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|| ( second = S . charCodeAt ( position + 1 ) ) < 0xDC00 || second > 0xDFFF
? CONVERT _TO _STRING ? S . charAt ( position ) : first
: CONVERT _TO _STRING ? S . slice ( position , position + 2 ) : ( first - 0xD800 << 10 ) + ( second - 0xDC00 ) + 0x10000 ;
} ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = {
// `String.prototype.codePointAt` method
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
codeAt : createMethod ( false ) ,
// `String.prototype.at` method
// https://github.com/mathiasbynens/String.prototype.at
charAt : createMethod ( true )
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3197 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
var maxInt = 2147483647 ; // aka. 0x7FFFFFFF or 2^31-1
var base = 36 ;
var tMin = 1 ;
var tMax = 26 ;
var skew = 38 ;
var damp = 700 ;
var initialBias = 72 ;
var initialN = 128 ; // 0x80
var delimiter = '-' ; // '\x2D'
var regexNonASCII = /[^\0-\u007E]/ ; // non-ASCII chars
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g ; // RFC 3490 separators
var OVERFLOW _ERROR = 'Overflow: input needs wider integers to process' ;
var baseMinusTMin = base - tMin ;
var floor = Math . floor ;
var stringFromCharCode = String . fromCharCode ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/ * *
* Creates an array containing the numeric code points of each Unicode
* character in the string . While JavaScript uses UCS - 2 internally ,
* this function will convert a pair of surrogate halves ( each of which
* UCS - 2 exposes as separate characters ) into a single code point ,
* matching UTF - 16.
* /
var ucs2decode = function ( string ) {
var output = [ ] ;
var counter = 0 ;
var length = string . length ;
while ( counter < length ) {
var value = string . charCodeAt ( counter ++ ) ;
if ( value >= 0xD800 && value <= 0xDBFF && counter < length ) {
// It's a high surrogate, and there is a next character.
var extra = string . charCodeAt ( counter ++ ) ;
if ( ( extra & 0xFC00 ) == 0xDC00 ) { // Low surrogate.
output . push ( ( ( value & 0x3FF ) << 10 ) + ( extra & 0x3FF ) + 0x10000 ) ;
} else {
// It's an unmatched surrogate; only append this code unit, in case the
// next code unit is the high surrogate of a surrogate pair.
output . push ( value ) ;
counter -- ;
}
} else {
output . push ( value ) ;
}
}
return output ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/ * *
* Converts a digit / integer into a basic code point .
* /
var digitToBasic = function ( digit ) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * ( digit < 26 ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
/ * *
* Bias adaptation function as per section 3.4 of RFC 3492.
* https : //tools.ietf.org/html/rfc3492#section-3.4
* /
var adapt = function ( delta , numPoints , firstTime ) {
var k = 0 ;
delta = firstTime ? floor ( delta / damp ) : delta >> 1 ;
delta += floor ( delta / numPoints ) ;
for ( ; delta > baseMinusTMin * tMax >> 1 ; k += base ) {
delta = floor ( delta / baseMinusTMin ) ;
}
return floor ( k + ( baseMinusTMin + 1 ) * delta / ( delta + skew ) ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/ * *
* Converts a string of Unicode symbols ( e . g . a domain name label ) to a
* Punycode string of ASCII - only symbols .
* /
// eslint-disable-next-line max-statements -- TODO
var encode = function ( input ) {
var output = [ ] ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Convert the input in UCS-2 to an array of Unicode code points.
input = ucs2decode ( input ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Cache the length.
var inputLength = input . length ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Initialize the state.
var n = initialN ;
var delta = 0 ;
var bias = initialBias ;
var i , currentValue ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Handle the basic code points.
for ( i = 0 ; i < input . length ; i ++ ) {
currentValue = input [ i ] ;
if ( currentValue < 0x80 ) {
output . push ( stringFromCharCode ( currentValue ) ) ;
}
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
var basicLength = output . length ; // number of basic code points.
var handledCPCount = basicLength ; // number of code points that have been handled;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Finish the basic string with a delimiter unless it's empty.
if ( basicLength ) {
output . push ( delimiter ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Main encoding loop:
while ( handledCPCount < inputLength ) {
// All non-basic code points < n have been handled already. Find the next larger one:
var m = maxInt ;
for ( i = 0 ; i < input . length ; i ++ ) {
currentValue = input [ i ] ;
if ( currentValue >= n && currentValue < m ) {
m = currentValue ;
}
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
var handledCPCountPlusOne = handledCPCount + 1 ;
if ( m - n > floor ( ( maxInt - delta ) / handledCPCountPlusOne ) ) {
throw RangeError ( OVERFLOW _ERROR ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
delta += ( m - n ) * handledCPCountPlusOne ;
n = m ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
for ( i = 0 ; i < input . length ; i ++ ) {
currentValue = input [ i ] ;
if ( currentValue < n && ++ delta > maxInt ) {
throw RangeError ( OVERFLOW _ERROR ) ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
if ( currentValue == n ) {
// Represent delta as a generalized variable-length integer.
var q = delta ;
for ( var k = base ; /* no condition */ ; k += base ) {
var t = k <= bias ? tMin : ( k >= bias + tMax ? tMax : k - bias ) ;
if ( q < t ) break ;
var qMinusT = q - t ;
var baseMinusT = base - t ;
output . push ( stringFromCharCode ( digitToBasic ( t + qMinusT % baseMinusT ) ) ) ;
q = floor ( qMinusT / baseMinusT ) ;
}
output . push ( stringFromCharCode ( digitToBasic ( q ) ) ) ;
bias = adapt ( delta , handledCPCountPlusOne , handledCPCount == basicLength ) ;
delta = 0 ;
++ handledCPCount ;
2021-02-10 07:13:13 +00:00
}
}
2021-03-20 20:39:14 +00:00
++ delta ;
++ n ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
return output . join ( '' ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( input ) {
var encoded = [ ] ;
var labels = input . toLowerCase ( ) . replace ( regexSeparators , '\u002E' ) . split ( '.' ) ;
var i , label ;
for ( i = 0 ; i < labels . length ; i ++ ) {
label = labels [ i ] ;
encoded . push ( regexNonASCII . test ( label ) ? 'xn--' + encode ( label ) : label ) ;
}
return encoded . join ( '.' ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 6091 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fails = _ _webpack _require _ _ ( 7293 ) ;
var whitespaces = _ _webpack _require _ _ ( 1361 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var non = '\u200B\u0085\u180E' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// check that a method works with the correct list
// of whitespaces and has a correct name
module . exports = function ( METHOD _NAME ) {
return fails ( function ( ) {
return ! ! whitespaces [ METHOD _NAME ] ( ) || non [ METHOD _NAME ] ( ) != non || whitespaces [ METHOD _NAME ] . name !== METHOD _NAME ;
} ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3111 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var requireObjectCoercible = _ _webpack _require _ _ ( 4488 ) ;
var whitespaces = _ _webpack _require _ _ ( 1361 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var whitespace = '[' + whitespaces + ']' ;
var ltrim = RegExp ( '^' + whitespace + whitespace + '*' ) ;
var rtrim = RegExp ( whitespace + whitespace + '*$' ) ;
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
var createMethod = function ( TYPE ) {
return function ( $this ) {
var string = String ( requireObjectCoercible ( $this ) ) ;
if ( TYPE & 1 ) string = string . replace ( ltrim , '' ) ;
if ( TYPE & 2 ) string = string . replace ( rtrim , '' ) ;
return string ;
} ;
2021-02-10 07:13:13 +00:00
} ;
module . exports = {
2021-03-20 20:39:14 +00:00
// `String.prototype.{ trimLeft, trimStart }` methods
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
start : createMethod ( 1 ) ,
// `String.prototype.{ trimRight, trimEnd }` methods
// https://tc39.es/ecma262/#sec-string.prototype.trimend
end : createMethod ( 2 ) ,
// `String.prototype.trim` method
// https://tc39.es/ecma262/#sec-string.prototype.trim
trim : createMethod ( 3 )
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1400 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var max = Math . max ;
var min = Math . min ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module . exports = function ( index , length ) {
var integer = toInteger ( index ) ;
return integer < 0 ? max ( integer + length , 0 ) : min ( integer , length ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7067 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `ToIndex` abstract operation
// https://tc39.es/ecma262/#sec-toindex
module . exports = function ( it ) {
if ( it === undefined ) return 0 ;
var number = toInteger ( it ) ;
var length = toLength ( number ) ;
if ( number !== length ) throw RangeError ( 'Wrong length or index' ) ;
return length ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 5656 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = _ _webpack _require _ _ ( 8361 ) ;
var requireObjectCoercible = _ _webpack _require _ _ ( 4488 ) ;
module . exports = function ( it ) {
return IndexedObject ( requireObjectCoercible ( it ) ) ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9958 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ceil = Math . ceil ;
var floor = Math . floor ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `ToInteger` abstract operation
// https://tc39.es/ecma262/#sec-tointeger
module . exports = function ( argument ) {
return isNaN ( argument = + argument ) ? 0 : ( argument > 0 ? floor : ceil ) ( argument ) ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7466 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var min = Math . min ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module . exports = function ( argument ) {
return argument > 0 ? min ( toInteger ( argument ) , 0x1FFFFFFFFFFFFF ) : 0 ; // 2 ** 53 - 1 == 9007199254740991
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 7908 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var requireObjectCoercible = _ _webpack _require _ _ ( 4488 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module . exports = function ( argument ) {
return Object ( requireObjectCoercible ( argument ) ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 4590 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toPositiveInteger = _ _webpack _require _ _ ( 3002 ) ;
module . exports = function ( it , BYTES ) {
var offset = toPositiveInteger ( it ) ;
if ( offset % BYTES ) throw RangeError ( 'Wrong offset' ) ;
return offset ;
} ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3002 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( it ) {
var result = toInteger ( it ) ;
if ( result < 0 ) throw RangeError ( "The argument can't be less than 0" ) ;
return result ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 7593 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var isObject = _ _webpack _require _ _ ( 111 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module . exports = function ( input , PREFERRED _STRING ) {
if ( ! isObject ( input ) ) return input ;
var fn , val ;
if ( PREFERRED _STRING && typeof ( fn = input . toString ) == 'function' && ! isObject ( val = fn . call ( input ) ) ) return val ;
if ( typeof ( fn = input . valueOf ) == 'function' && ! isObject ( val = fn . call ( input ) ) ) return val ;
if ( ! PREFERRED _STRING && typeof ( fn = input . toString ) == 'function' && ! isObject ( val = fn . call ( input ) ) ) return val ;
throw TypeError ( "Can't convert object to primitive value" ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 1694 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var TO _STRING _TAG = wellKnownSymbol ( 'toStringTag' ) ;
var test = { } ;
test [ TO _STRING _TAG ] = 'z' ;
module . exports = String ( test ) === '[object z]' ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9843 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var global = _ _webpack _require _ _ ( 7854 ) ;
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var TYPED _ARRAYS _CONSTRUCTORS _REQUIRES _WRAPPERS = _ _webpack _require _ _ ( 3832 ) ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var ArrayBufferModule = _ _webpack _require _ _ ( 3331 ) ;
var anInstance = _ _webpack _require _ _ ( 5787 ) ;
var createPropertyDescriptor = _ _webpack _require _ _ ( 9114 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var toIndex = _ _webpack _require _ _ ( 7067 ) ;
var toOffset = _ _webpack _require _ _ ( 4590 ) ;
var toPrimitive = _ _webpack _require _ _ ( 7593 ) ;
var has = _ _webpack _require _ _ ( 6656 ) ;
var classof = _ _webpack _require _ _ ( 648 ) ;
var isObject = _ _webpack _require _ _ ( 111 ) ;
var create = _ _webpack _require _ _ ( 30 ) ;
var setPrototypeOf = _ _webpack _require _ _ ( 7674 ) ;
var getOwnPropertyNames = _ _webpack _require _ _ ( 8006 ) . f ;
var typedArrayFrom = _ _webpack _require _ _ ( 7321 ) ;
var forEach = _ _webpack _require _ _ ( 2092 ) . forEach ;
var setSpecies = _ _webpack _require _ _ ( 6340 ) ;
var definePropertyModule = _ _webpack _require _ _ ( 3070 ) ;
var getOwnPropertyDescriptorModule = _ _webpack _require _ _ ( 1236 ) ;
var InternalStateModule = _ _webpack _require _ _ ( 9909 ) ;
var inheritIfRequired = _ _webpack _require _ _ ( 9587 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getInternalState = InternalStateModule . get ;
var setInternalState = InternalStateModule . set ;
var nativeDefineProperty = definePropertyModule . f ;
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule . f ;
var round = Math . round ;
var RangeError = global . RangeError ;
var ArrayBuffer = ArrayBufferModule . ArrayBuffer ;
var DataView = ArrayBufferModule . DataView ;
var NATIVE _ARRAY _BUFFER _VIEWS = ArrayBufferViewCore . NATIVE _ARRAY _BUFFER _VIEWS ;
var TYPED _ARRAY _TAG = ArrayBufferViewCore . TYPED _ARRAY _TAG ;
var TypedArray = ArrayBufferViewCore . TypedArray ;
var TypedArrayPrototype = ArrayBufferViewCore . TypedArrayPrototype ;
var aTypedArrayConstructor = ArrayBufferViewCore . aTypedArrayConstructor ;
var isTypedArray = ArrayBufferViewCore . isTypedArray ;
var BYTES _PER _ELEMENT = 'BYTES_PER_ELEMENT' ;
var WRONG _LENGTH = 'Wrong length' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fromList = function ( C , list ) {
var index = 0 ;
var length = list . length ;
var result = new ( aTypedArrayConstructor ( C ) ) ( length ) ;
while ( length > index ) result [ index ] = list [ index ++ ] ;
return result ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var addGetter = function ( it , key ) {
nativeDefineProperty ( it , key , { get : function ( ) {
return getInternalState ( this ) [ key ] ;
} } ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var isArrayBuffer = function ( it ) {
var klass ;
return it instanceof ArrayBuffer || ( klass = classof ( it ) ) == 'ArrayBuffer' || klass == 'SharedArrayBuffer' ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var isTypedArrayIndex = function ( target , key ) {
return isTypedArray ( target )
&& typeof key != 'symbol'
&& key in target
&& String ( + key ) == String ( key ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor ( target , key ) {
return isTypedArrayIndex ( target , key = toPrimitive ( key , true ) )
? createPropertyDescriptor ( 2 , target [ key ] )
: nativeGetOwnPropertyDescriptor ( target , key ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var wrappedDefineProperty = function defineProperty ( target , key , descriptor ) {
if ( isTypedArrayIndex ( target , key = toPrimitive ( key , true ) )
&& isObject ( descriptor )
&& has ( descriptor , 'value' )
&& ! has ( descriptor , 'get' )
&& ! has ( descriptor , 'set' )
// TODO: add validation descriptor w/o calling accessors
&& ! descriptor . configurable
&& ( ! has ( descriptor , 'writable' ) || descriptor . writable )
&& ( ! has ( descriptor , 'enumerable' ) || descriptor . enumerable )
2021-02-10 07:13:13 +00:00
) {
target [ key ] = descriptor . value ;
return target ;
} return nativeDefineProperty ( target , key , descriptor ) ;
} ;
if ( DESCRIPTORS ) {
if ( ! NATIVE _ARRAY _BUFFER _VIEWS ) {
getOwnPropertyDescriptorModule . f = wrappedGetOwnPropertyDescriptor ;
definePropertyModule . f = wrappedDefineProperty ;
addGetter ( TypedArrayPrototype , 'buffer' ) ;
addGetter ( TypedArrayPrototype , 'byteOffset' ) ;
addGetter ( TypedArrayPrototype , 'byteLength' ) ;
addGetter ( TypedArrayPrototype , 'length' ) ;
}
$ ( { target : 'Object' , stat : true , forced : ! NATIVE _ARRAY _BUFFER _VIEWS } , {
getOwnPropertyDescriptor : wrappedGetOwnPropertyDescriptor ,
defineProperty : wrappedDefineProperty
} ) ;
module . exports = function ( TYPE , wrapper , CLAMPED ) {
var BYTES = TYPE . match ( /\d+$/ ) [ 0 ] / 8 ;
var CONSTRUCTOR _NAME = TYPE + ( CLAMPED ? 'Clamped' : '' ) + 'Array' ;
var GETTER = 'get' + TYPE ;
var SETTER = 'set' + TYPE ;
var NativeTypedArrayConstructor = global [ CONSTRUCTOR _NAME ] ;
var TypedArrayConstructor = NativeTypedArrayConstructor ;
var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor . prototype ;
var exported = { } ;
var getter = function ( that , index ) {
var data = getInternalState ( that ) ;
return data . view [ GETTER ] ( index * BYTES + data . byteOffset , true ) ;
} ;
var setter = function ( that , index , value ) {
var data = getInternalState ( that ) ;
if ( CLAMPED ) value = ( value = round ( value ) ) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF ;
data . view [ SETTER ] ( index * BYTES + data . byteOffset , value , true ) ;
} ;
var addElement = function ( that , index ) {
nativeDefineProperty ( that , index , {
get : function ( ) {
return getter ( this , index ) ;
} ,
set : function ( value ) {
return setter ( this , index , value ) ;
} ,
enumerable : true
} ) ;
} ;
if ( ! NATIVE _ARRAY _BUFFER _VIEWS ) {
TypedArrayConstructor = wrapper ( function ( that , data , offset , $length ) {
anInstance ( that , TypedArrayConstructor , CONSTRUCTOR _NAME ) ;
var index = 0 ;
var byteOffset = 0 ;
var buffer , byteLength , length ;
if ( ! isObject ( data ) ) {
length = toIndex ( data ) ;
byteLength = length * BYTES ;
buffer = new ArrayBuffer ( byteLength ) ;
} else if ( isArrayBuffer ( data ) ) {
buffer = data ;
byteOffset = toOffset ( offset , BYTES ) ;
var $len = data . byteLength ;
if ( $length === undefined ) {
if ( $len % BYTES ) throw RangeError ( WRONG _LENGTH ) ;
byteLength = $len - byteOffset ;
if ( byteLength < 0 ) throw RangeError ( WRONG _LENGTH ) ;
} else {
byteLength = toLength ( $length ) * BYTES ;
if ( byteLength + byteOffset > $len ) throw RangeError ( WRONG _LENGTH ) ;
}
length = byteLength / BYTES ;
} else if ( isTypedArray ( data ) ) {
return fromList ( TypedArrayConstructor , data ) ;
} else {
return typedArrayFrom . call ( TypedArrayConstructor , data ) ;
}
setInternalState ( that , {
buffer : buffer ,
byteOffset : byteOffset ,
byteLength : byteLength ,
length : length ,
view : new DataView ( buffer )
} ) ;
while ( index < length ) addElement ( that , index ++ ) ;
} ) ;
if ( setPrototypeOf ) setPrototypeOf ( TypedArrayConstructor , TypedArray ) ;
TypedArrayConstructorPrototype = TypedArrayConstructor . prototype = create ( TypedArrayPrototype ) ;
} else if ( TYPED _ARRAYS _CONSTRUCTORS _REQUIRES _WRAPPERS ) {
TypedArrayConstructor = wrapper ( function ( dummy , data , typedArrayOffset , $length ) {
anInstance ( dummy , TypedArrayConstructor , CONSTRUCTOR _NAME ) ;
return inheritIfRequired ( function ( ) {
if ( ! isObject ( data ) ) return new NativeTypedArrayConstructor ( toIndex ( data ) ) ;
if ( isArrayBuffer ( data ) ) return $length !== undefined
? new NativeTypedArrayConstructor ( data , toOffset ( typedArrayOffset , BYTES ) , $length )
: typedArrayOffset !== undefined
? new NativeTypedArrayConstructor ( data , toOffset ( typedArrayOffset , BYTES ) )
: new NativeTypedArrayConstructor ( data ) ;
if ( isTypedArray ( data ) ) return fromList ( TypedArrayConstructor , data ) ;
return typedArrayFrom . call ( TypedArrayConstructor , data ) ;
} ( ) , dummy , TypedArrayConstructor ) ;
} ) ;
if ( setPrototypeOf ) setPrototypeOf ( TypedArrayConstructor , TypedArray ) ;
forEach ( getOwnPropertyNames ( NativeTypedArrayConstructor ) , function ( key ) {
if ( ! ( key in TypedArrayConstructor ) ) {
createNonEnumerableProperty ( TypedArrayConstructor , key , NativeTypedArrayConstructor [ key ] ) ;
}
} ) ;
TypedArrayConstructor . prototype = TypedArrayConstructorPrototype ;
}
if ( TypedArrayConstructorPrototype . constructor !== TypedArrayConstructor ) {
createNonEnumerableProperty ( TypedArrayConstructorPrototype , 'constructor' , TypedArrayConstructor ) ;
}
if ( TYPED _ARRAY _TAG ) {
createNonEnumerableProperty ( TypedArrayConstructorPrototype , TYPED _ARRAY _TAG , CONSTRUCTOR _NAME ) ;
}
exported [ CONSTRUCTOR _NAME ] = TypedArrayConstructor ;
$ ( {
global : true , forced : TypedArrayConstructor != NativeTypedArrayConstructor , sham : ! NATIVE _ARRAY _BUFFER _VIEWS
} , exported ) ;
if ( ! ( BYTES _PER _ELEMENT in TypedArrayConstructor ) ) {
createNonEnumerableProperty ( TypedArrayConstructor , BYTES _PER _ELEMENT , BYTES ) ;
}
if ( ! ( BYTES _PER _ELEMENT in TypedArrayConstructorPrototype ) ) {
createNonEnumerableProperty ( TypedArrayConstructorPrototype , BYTES _PER _ELEMENT , BYTES ) ;
}
setSpecies ( CONSTRUCTOR _NAME ) ;
} ;
} else module . exports = function ( ) { /* empty */ } ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3832 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
/* eslint-disable no-new -- required for testing */
var global = _ _webpack _require _ _ ( 7854 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var checkCorrectnessOfIteration = _ _webpack _require _ _ ( 7072 ) ;
var NATIVE _ARRAY _BUFFER _VIEWS = _ _webpack _require _ _ ( 260 ) . NATIVE _ARRAY _BUFFER _VIEWS ;
2021-02-10 07:13:13 +00:00
var ArrayBuffer = global . ArrayBuffer ;
var Int8Array = global . Int8Array ;
module . exports = ! NATIVE _ARRAY _BUFFER _VIEWS || ! fails ( function ( ) {
Int8Array ( 1 ) ;
} ) || ! fails ( function ( ) {
new Int8Array ( - 1 ) ;
} ) || ! checkCorrectnessOfIteration ( function ( iterable ) {
new Int8Array ( ) ;
new Int8Array ( null ) ;
new Int8Array ( 1.5 ) ;
new Int8Array ( iterable ) ;
} , true ) || fails ( function ( ) {
// Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
return new Int8Array ( new ArrayBuffer ( 2 ) , 1 , undefined ) . length !== 1 ;
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3074 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArrayConstructor = _ _webpack _require _ _ ( 260 ) . aTypedArrayConstructor ;
var speciesConstructor = _ _webpack _require _ _ ( 6707 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( instance , list ) {
var C = speciesConstructor ( instance , instance . constructor ) ;
var index = 0 ;
var length = list . length ;
var result = new ( aTypedArrayConstructor ( C ) ) ( length ) ;
while ( length > index ) result [ index ] = list [ index ++ ] ;
2021-02-10 07:13:13 +00:00
return result ;
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7321 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var getIteratorMethod = _ _webpack _require _ _ ( 1246 ) ;
var isArrayIteratorMethod = _ _webpack _require _ _ ( 7659 ) ;
var bind = _ _webpack _require _ _ ( 9974 ) ;
var aTypedArrayConstructor = _ _webpack _require _ _ ( 260 ) . aTypedArrayConstructor ;
2021-02-10 07:13:13 +00:00
module . exports = function from ( source /* , mapfn, thisArg */ ) {
var O = toObject ( source ) ;
var argumentsLength = arguments . length ;
var mapfn = argumentsLength > 1 ? arguments [ 1 ] : undefined ;
var mapping = mapfn !== undefined ;
var iteratorMethod = getIteratorMethod ( O ) ;
var i , length , result , step , iterator , next ;
if ( iteratorMethod != undefined && ! isArrayIteratorMethod ( iteratorMethod ) ) {
iterator = iteratorMethod . call ( O ) ;
next = iterator . next ;
O = [ ] ;
while ( ! ( step = next . call ( iterator ) ) . done ) {
O . push ( step . value ) ;
}
}
if ( mapping && argumentsLength > 2 ) {
mapfn = bind ( mapfn , arguments [ 2 ] , 2 ) ;
}
length = toLength ( O . length ) ;
result = new ( aTypedArrayConstructor ( this ) ) ( length ) ;
for ( i = 0 ; length > i ; i ++ ) {
result [ i ] = mapping ? mapfn ( O [ i ] , i ) : O [ i ] ;
}
return result ;
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9711 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var id = 0 ;
var postfix = Math . random ( ) ;
module . exports = function ( key ) {
return 'Symbol(' + String ( key === undefined ? '' : key ) + ')_' + ( ++ id + postfix ) . toString ( 36 ) ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3307 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var NATIVE _SYMBOL = _ _webpack _require _ _ ( 133 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = NATIVE _SYMBOL
/* global Symbol -- safe */
&& ! Symbol . sham
&& typeof Symbol . iterator == 'symbol' ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 5112 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
var shared = _ _webpack _require _ _ ( 2309 ) ;
var has = _ _webpack _require _ _ ( 6656 ) ;
var uid = _ _webpack _require _ _ ( 9711 ) ;
var NATIVE _SYMBOL = _ _webpack _require _ _ ( 133 ) ;
var USE _SYMBOL _AS _UID = _ _webpack _require _ _ ( 3307 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var WellKnownSymbolsStore = shared ( 'wks' ) ;
var Symbol = global . Symbol ;
var createWellKnownSymbol = USE _SYMBOL _AS _UID ? Symbol : Symbol && Symbol . withoutSetter || uid ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
module . exports = function ( name ) {
if ( ! has ( WellKnownSymbolsStore , name ) ) {
if ( NATIVE _SYMBOL && has ( Symbol , name ) ) WellKnownSymbolsStore [ name ] = Symbol [ name ] ;
else WellKnownSymbolsStore [ name ] = createWellKnownSymbol ( 'Symbol.' + name ) ;
} return WellKnownSymbolsStore [ name ] ;
2021-02-10 07:13:13 +00:00
} ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1361 :
/***/ ( function ( module ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// a string of all valid unicode whitespaces
module . exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8264 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var global = _ _webpack _require _ _ ( 7854 ) ;
var arrayBufferModule = _ _webpack _require _ _ ( 3331 ) ;
var setSpecies = _ _webpack _require _ _ ( 6340 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ARRAY _BUFFER = 'ArrayBuffer' ;
var ArrayBuffer = arrayBufferModule [ ARRAY _BUFFER ] ;
var NativeArrayBuffer = global [ ARRAY _BUFFER ] ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `ArrayBuffer` constructor
// https://tc39.es/ecma262/#sec-arraybuffer-constructor
$ ( { global : true , forced : NativeArrayBuffer !== ArrayBuffer } , {
ArrayBuffer : ArrayBuffer
2021-02-10 07:13:13 +00:00
} ) ;
2021-03-20 20:39:14 +00:00
setSpecies ( ARRAY _BUFFER ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 2222 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var isArray = _ _webpack _require _ _ ( 3157 ) ;
var isObject = _ _webpack _require _ _ ( 111 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var createProperty = _ _webpack _require _ _ ( 6135 ) ;
var arraySpeciesCreate = _ _webpack _require _ _ ( 5417 ) ;
var arrayMethodHasSpeciesSupport = _ _webpack _require _ _ ( 1194 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var V8 _VERSION = _ _webpack _require _ _ ( 7392 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var IS _CONCAT _SPREADABLE = wellKnownSymbol ( 'isConcatSpreadable' ) ;
var MAX _SAFE _INTEGER = 0x1FFFFFFFFFFFFF ;
var MAXIMUM _ALLOWED _INDEX _EXCEEDED = 'Maximum allowed index exceeded' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS _CONCAT _SPREADABLE _SUPPORT = V8 _VERSION >= 51 || ! fails ( function ( ) {
var array = [ ] ;
array [ IS _CONCAT _SPREADABLE ] = false ;
return array . concat ( ) [ 0 ] !== array ;
2021-02-10 07:13:13 +00:00
} ) ;
2021-03-20 20:39:14 +00:00
var SPECIES _SUPPORT = arrayMethodHasSpeciesSupport ( 'concat' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var isConcatSpreadable = function ( O ) {
if ( ! isObject ( O ) ) return false ;
var spreadable = O [ IS _CONCAT _SPREADABLE ] ;
return spreadable !== undefined ? ! ! spreadable : isArray ( O ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var FORCED = ! IS _CONCAT _SPREADABLE _SUPPORT || ! SPECIES _SUPPORT ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.concat` method
// https://tc39.es/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$ ( { target : 'Array' , proto : true , forced : FORCED } , {
// eslint-disable-next-line no-unused-vars -- required for `.length`
concat : function concat ( arg ) {
var O = toObject ( this ) ;
var A = arraySpeciesCreate ( O , 0 ) ;
var n = 0 ;
var i , k , length , len , E ;
for ( i = - 1 , length = arguments . length ; i < length ; i ++ ) {
E = i === - 1 ? O : arguments [ i ] ;
if ( isConcatSpreadable ( E ) ) {
len = toLength ( E . length ) ;
if ( n + len > MAX _SAFE _INTEGER ) throw TypeError ( MAXIMUM _ALLOWED _INDEX _EXCEEDED ) ;
for ( k = 0 ; k < len ; k ++ , n ++ ) if ( k in E ) createProperty ( A , n , E [ k ] ) ;
} else {
if ( n >= MAX _SAFE _INTEGER ) throw TypeError ( MAXIMUM _ALLOWED _INDEX _EXCEEDED ) ;
createProperty ( A , n ++ , E ) ;
}
}
A . length = n ;
return A ;
}
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7327 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var $filter = _ _webpack _require _ _ ( 2092 ) . filter ;
var arrayMethodHasSpeciesSupport = _ _webpack _require _ _ ( 1194 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var HAS _SPECIES _SUPPORT = arrayMethodHasSpeciesSupport ( 'filter' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.filter` method
// https://tc39.es/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$ ( { target : 'Array' , proto : true , forced : ! HAS _SPECIES _SUPPORT } , {
filter : function filter ( callbackfn /* , thisArg */ ) {
return $filter ( this , callbackfn , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
}
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 2772 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var $indexOf = _ _webpack _require _ _ ( 1318 ) . indexOf ;
var arrayMethodIsStrict = _ _webpack _require _ _ ( 9341 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var nativeIndexOf = [ ] . indexOf ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var NEGATIVE _ZERO = ! ! nativeIndexOf && 1 / [ 1 ] . indexOf ( 1 , - 0 ) < 0 ;
var STRICT _METHOD = arrayMethodIsStrict ( 'indexOf' ) ;
// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
$ ( { target : 'Array' , proto : true , forced : NEGATIVE _ZERO || ! STRICT _METHOD } , {
indexOf : function indexOf ( searchElement /* , fromIndex = 0 */ ) {
return NEGATIVE _ZERO
// convert -0 to +0
? nativeIndexOf . apply ( this , arguments ) || 0
: $indexOf ( this , searchElement , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
}
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 6992 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var toIndexedObject = _ _webpack _require _ _ ( 5656 ) ;
var addToUnscopables = _ _webpack _require _ _ ( 1223 ) ;
var Iterators = _ _webpack _require _ _ ( 7497 ) ;
var InternalStateModule = _ _webpack _require _ _ ( 9909 ) ;
var defineIterator = _ _webpack _require _ _ ( 654 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ARRAY _ITERATOR = 'Array Iterator' ;
var setInternalState = InternalStateModule . set ;
var getInternalState = InternalStateModule . getterFor ( ARRAY _ITERATOR ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.entries` method
// https://tc39.es/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.es/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.es/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.es/ecma262/#sec-createarrayiterator
module . exports = defineIterator ( Array , 'Array' , function ( iterated , kind ) {
setInternalState ( this , {
type : ARRAY _ITERATOR ,
target : toIndexedObject ( iterated ) , // target
index : 0 , // next index
kind : kind // kind
} ) ;
// `%ArrayIteratorPrototype%.next` method
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
} , function ( ) {
var state = getInternalState ( this ) ;
var target = state . target ;
var kind = state . kind ;
var index = state . index ++ ;
if ( ! target || index >= target . length ) {
state . target = undefined ;
return { value : undefined , done : true } ;
}
if ( kind == 'keys' ) return { value : index , done : false } ;
if ( kind == 'values' ) return { value : target [ index ] , done : false } ;
return { value : [ index , target [ index ] ] , done : false } ;
} , 'values' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
Iterators . Arguments = Iterators . Array ;
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables ( 'keys' ) ;
addToUnscopables ( 'values' ) ;
addToUnscopables ( 'entries' ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1249 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var $map = _ _webpack _require _ _ ( 2092 ) . map ;
var arrayMethodHasSpeciesSupport = _ _webpack _require _ _ ( 1194 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var HAS _SPECIES _SUPPORT = arrayMethodHasSpeciesSupport ( 'map' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.map` method
// https://tc39.es/ecma262/#sec-array.prototype.map
// with adding support of @@species
$ ( { target : 'Array' , proto : true , forced : ! HAS _SPECIES _SUPPORT } , {
map : function map ( callbackfn /* , thisArg */ ) {
return $map ( this , callbackfn , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
}
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7042 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var isObject = _ _webpack _require _ _ ( 111 ) ;
var isArray = _ _webpack _require _ _ ( 3157 ) ;
var toAbsoluteIndex = _ _webpack _require _ _ ( 1400 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var toIndexedObject = _ _webpack _require _ _ ( 5656 ) ;
var createProperty = _ _webpack _require _ _ ( 6135 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var arrayMethodHasSpeciesSupport = _ _webpack _require _ _ ( 1194 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var HAS _SPECIES _SUPPORT = arrayMethodHasSpeciesSupport ( 'slice' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var SPECIES = wellKnownSymbol ( 'species' ) ;
var nativeSlice = [ ] . slice ;
var max = Math . max ;
// `Array.prototype.slice` method
// https://tc39.es/ecma262/#sec-array.prototype.slice
// fallback for not array-like ES3 strings and DOM objects
$ ( { target : 'Array' , proto : true , forced : ! HAS _SPECIES _SUPPORT } , {
slice : function slice ( start , end ) {
var O = toIndexedObject ( this ) ;
var length = toLength ( O . length ) ;
var k = toAbsoluteIndex ( start , length ) ;
var fin = toAbsoluteIndex ( end === undefined ? length : end , length ) ;
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
var Constructor , result , n ;
if ( isArray ( O ) ) {
Constructor = O . constructor ;
// cross-realm fallback
if ( typeof Constructor == 'function' && ( Constructor === Array || isArray ( Constructor . prototype ) ) ) {
Constructor = undefined ;
} else if ( isObject ( Constructor ) ) {
Constructor = Constructor [ SPECIES ] ;
if ( Constructor === null ) Constructor = undefined ;
}
if ( Constructor === Array || Constructor === undefined ) {
return nativeSlice . call ( O , k , fin ) ;
}
}
result = new ( Constructor === undefined ? Array : Constructor ) ( max ( fin - k , 0 ) ) ;
for ( n = 0 ; k < fin ; k ++ , n ++ ) if ( k in O ) createProperty ( result , n , O [ k ] ) ;
result . length = n ;
return result ;
}
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 561 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var toAbsoluteIndex = _ _webpack _require _ _ ( 1400 ) ;
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var arraySpeciesCreate = _ _webpack _require _ _ ( 5417 ) ;
var createProperty = _ _webpack _require _ _ ( 6135 ) ;
var arrayMethodHasSpeciesSupport = _ _webpack _require _ _ ( 1194 ) ;
var HAS _SPECIES _SUPPORT = arrayMethodHasSpeciesSupport ( 'splice' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var max = Math . max ;
2021-02-10 07:13:13 +00:00
var min = Math . min ;
2021-03-20 20:39:14 +00:00
var MAX _SAFE _INTEGER = 0x1FFFFFFFFFFFFF ;
var MAXIMUM _ALLOWED _LENGTH _EXCEEDED = 'Maximum allowed length exceeded' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Array.prototype.splice` method
// https://tc39.es/ecma262/#sec-array.prototype.splice
// with adding support of @@species
$ ( { target : 'Array' , proto : true , forced : ! HAS _SPECIES _SUPPORT } , {
splice : function splice ( start , deleteCount /* , ...items */ ) {
var O = toObject ( this ) ;
var len = toLength ( O . length ) ;
var actualStart = toAbsoluteIndex ( start , len ) ;
var argumentsLength = arguments . length ;
var insertCount , actualDeleteCount , A , k , from , to ;
if ( argumentsLength === 0 ) {
insertCount = actualDeleteCount = 0 ;
} else if ( argumentsLength === 1 ) {
insertCount = 0 ;
actualDeleteCount = len - actualStart ;
} else {
insertCount = argumentsLength - 2 ;
actualDeleteCount = min ( max ( toInteger ( deleteCount ) , 0 ) , len - actualStart ) ;
}
if ( len + insertCount - actualDeleteCount > MAX _SAFE _INTEGER ) {
throw TypeError ( MAXIMUM _ALLOWED _LENGTH _EXCEEDED ) ;
}
A = arraySpeciesCreate ( O , actualDeleteCount ) ;
for ( k = 0 ; k < actualDeleteCount ; k ++ ) {
from = actualStart + k ;
if ( from in O ) createProperty ( A , k , O [ from ] ) ;
}
A . length = actualDeleteCount ;
if ( insertCount < actualDeleteCount ) {
for ( k = actualStart ; k < len - actualDeleteCount ; k ++ ) {
from = k + actualDeleteCount ;
to = k + insertCount ;
if ( from in O ) O [ to ] = O [ from ] ;
else delete O [ to ] ;
}
for ( k = len ; k > len - actualDeleteCount + insertCount ; k -- ) delete O [ k - 1 ] ;
} else if ( insertCount > actualDeleteCount ) {
for ( k = len - actualDeleteCount ; k > actualStart ; k -- ) {
from = k + actualDeleteCount - 1 ;
to = k + insertCount - 1 ;
if ( from in O ) O [ to ] = O [ from ] ;
else delete O [ to ] ;
}
}
for ( k = 0 ; k < insertCount ; k ++ ) {
O [ k + actualStart ] = arguments [ k + 2 ] ;
}
O . length = len - actualDeleteCount + insertCount ;
return A ;
}
} ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8309 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var defineProperty = _ _webpack _require _ _ ( 3070 ) . f ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var FunctionPrototype = Function . prototype ;
var FunctionPrototypeToString = FunctionPrototype . toString ;
var nameRE = /^\s*function ([^ (]*)/ ;
var NAME = 'name' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// Function instances `.name` property
// https://tc39.es/ecma262/#sec-function-instances-name
if ( DESCRIPTORS && ! ( NAME in FunctionPrototype ) ) {
defineProperty ( FunctionPrototype , NAME , {
configurable : true ,
get : function ( ) {
try {
return FunctionPrototypeToString . call ( this ) . match ( nameRE ) [ 1 ] ;
} catch ( error ) {
return '' ;
}
}
2021-02-10 07:13:13 +00:00
} ) ;
2021-03-20 20:39:14 +00:00
}
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 489 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var nativeGetPrototypeOf = _ _webpack _require _ _ ( 9518 ) ;
var CORRECT _PROTOTYPE _GETTER = _ _webpack _require _ _ ( 8544 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var FAILS _ON _PRIMITIVES = fails ( function ( ) { nativeGetPrototypeOf ( 1 ) ; } ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
$ ( { target : 'Object' , stat : true , forced : FAILS _ON _PRIMITIVES , sham : ! CORRECT _PROTOTYPE _GETTER } , {
getPrototypeOf : function getPrototypeOf ( it ) {
return nativeGetPrototypeOf ( toObject ( it ) ) ;
}
2021-02-10 07:13:13 +00:00
} ) ;
2021-03-20 20:39:14 +00:00
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 1539 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var TO _STRING _TAG _SUPPORT = _ _webpack _require _ _ ( 1694 ) ;
var redefine = _ _webpack _require _ _ ( 1320 ) ;
var toString = _ _webpack _require _ _ ( 288 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `Object.prototype.toString` method
// https://tc39.es/ecma262/#sec-object.prototype.tostring
if ( ! TO _STRING _TAG _SUPPORT ) {
redefine ( Object . prototype , 'toString' , toString , { unsafe : true } ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
/***/ 4916 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var $ = _ _webpack _require _ _ ( 2109 ) ;
var exec = _ _webpack _require _ _ ( 2261 ) ;
// `RegExp.prototype.exec` method
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
$ ( { target : 'RegExp' , proto : true , forced : /./ . exec !== exec } , {
exec : exec
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 9714 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var redefine = _ _webpack _require _ _ ( 1320 ) ;
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var flags = _ _webpack _require _ _ ( 7066 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var TO _STRING = 'toString' ;
var RegExpPrototype = RegExp . prototype ;
var nativeToString = RegExpPrototype [ TO _STRING ] ;
var NOT _GENERIC = fails ( function ( ) { return nativeToString . call ( { source : 'a' , flags : 'b' } ) != '/a/b' ; } ) ;
// FF44- RegExp#toString has a wrong name
var INCORRECT _NAME = nativeToString . name != TO _STRING ;
// `RegExp.prototype.toString` method
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
if ( NOT _GENERIC || INCORRECT _NAME ) {
redefine ( RegExp . prototype , TO _STRING , function toString ( ) {
var R = anObject ( this ) ;
var p = String ( R . source ) ;
var rf = R . flags ;
var f = String ( rf === undefined && R instanceof RegExp && ! ( 'flags' in RegExpPrototype ) ? flags . call ( R ) : rf ) ;
return '/' + p + '/' + f ;
} , { unsafe : true } ) ;
}
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8783 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var charAt = _ _webpack _require _ _ ( 8710 ) . charAt ;
var InternalStateModule = _ _webpack _require _ _ ( 9909 ) ;
var defineIterator = _ _webpack _require _ _ ( 654 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var STRING _ITERATOR = 'String Iterator' ;
var setInternalState = InternalStateModule . set ;
var getInternalState = InternalStateModule . getterFor ( STRING _ITERATOR ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `String.prototype[@@iterator]` method
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
defineIterator ( String , 'String' , function ( iterated ) {
setInternalState ( this , {
type : STRING _ITERATOR ,
string : String ( iterated ) ,
index : 0
} ) ;
// `%StringIteratorPrototype%.next` method
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
} , function next ( ) {
var state = getInternalState ( this ) ;
var string = state . string ;
var index = state . index ;
var point ;
if ( index >= string . length ) return { value : undefined , done : true } ;
point = charAt ( string , index ) ;
state . index += point . length ;
return { value : point , done : false } ;
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 4723 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fixRegExpWellKnownSymbolLogic = _ _webpack _require _ _ ( 7007 ) ;
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var requireObjectCoercible = _ _webpack _require _ _ ( 4488 ) ;
var advanceStringIndex = _ _webpack _require _ _ ( 1530 ) ;
var regExpExec = _ _webpack _require _ _ ( 7651 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// @@match logic
fixRegExpWellKnownSymbolLogic ( 'match' , 1 , function ( MATCH , nativeMatch , maybeCallNative ) {
return [
// `String.prototype.match` method
// https://tc39.es/ecma262/#sec-string.prototype.match
function match ( regexp ) {
var O = requireObjectCoercible ( this ) ;
var matcher = regexp == undefined ? undefined : regexp [ MATCH ] ;
return matcher !== undefined ? matcher . call ( regexp , O ) : new RegExp ( regexp ) [ MATCH ] ( String ( O ) ) ;
} ,
// `RegExp.prototype[@@match]` method
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
function ( regexp ) {
var res = maybeCallNative ( nativeMatch , regexp , this ) ;
if ( res . done ) return res . value ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var rx = anObject ( regexp ) ;
var S = String ( this ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( ! rx . global ) return regExpExec ( rx , S ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fullUnicode = rx . unicode ;
rx . lastIndex = 0 ;
var A = [ ] ;
var n = 0 ;
var result ;
while ( ( result = regExpExec ( rx , S ) ) !== null ) {
var matchStr = String ( result [ 0 ] ) ;
A [ n ] = matchStr ;
if ( matchStr === '' ) rx . lastIndex = advanceStringIndex ( S , toLength ( rx . lastIndex ) , fullUnicode ) ;
n ++ ;
}
return n === 0 ? null : A ;
}
] ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 5306 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var fixRegExpWellKnownSymbolLogic = _ _webpack _require _ _ ( 7007 ) ;
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var toInteger = _ _webpack _require _ _ ( 9958 ) ;
var requireObjectCoercible = _ _webpack _require _ _ ( 4488 ) ;
var advanceStringIndex = _ _webpack _require _ _ ( 1530 ) ;
var getSubstitution = _ _webpack _require _ _ ( 647 ) ;
var regExpExec = _ _webpack _require _ _ ( 7651 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var max = Math . max ;
var min = Math . min ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var maybeToString = function ( it ) {
return it === undefined ? it : String ( it ) ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// @@replace logic
fixRegExpWellKnownSymbolLogic ( 'replace' , 2 , function ( REPLACE , nativeReplace , maybeCallNative , reason ) {
var REGEXP _REPLACE _SUBSTITUTES _UNDEFINED _CAPTURE = reason . REGEXP _REPLACE _SUBSTITUTES _UNDEFINED _CAPTURE ;
var REPLACE _KEEPS _$0 = reason . REPLACE _KEEPS _$0 ;
var UNSAFE _SUBSTITUTE = REGEXP _REPLACE _SUBSTITUTES _UNDEFINED _CAPTURE ? '$' : '$0' ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
return [
// `String.prototype.replace` method
// https://tc39.es/ecma262/#sec-string.prototype.replace
function replace ( searchValue , replaceValue ) {
var O = requireObjectCoercible ( this ) ;
var replacer = searchValue == undefined ? undefined : searchValue [ REPLACE ] ;
return replacer !== undefined
? replacer . call ( searchValue , O , replaceValue )
: nativeReplace . call ( String ( O ) , searchValue , replaceValue ) ;
} ,
// `RegExp.prototype[@@replace]` method
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
function ( regexp , replaceValue ) {
if (
( ! REGEXP _REPLACE _SUBSTITUTES _UNDEFINED _CAPTURE && REPLACE _KEEPS _$0 ) ||
( typeof replaceValue === 'string' && replaceValue . indexOf ( UNSAFE _SUBSTITUTE ) === - 1 )
) {
var res = maybeCallNative ( nativeReplace , regexp , this , replaceValue ) ;
if ( res . done ) return res . value ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var rx = anObject ( regexp ) ;
var S = String ( this ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var functionalReplace = typeof replaceValue === 'function' ;
if ( ! functionalReplace ) replaceValue = String ( replaceValue ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = rx . global ;
if ( global ) {
var fullUnicode = rx . unicode ;
rx . lastIndex = 0 ;
}
var results = [ ] ;
while ( true ) {
var result = regExpExec ( rx , S ) ;
if ( result === null ) break ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
results . push ( result ) ;
if ( ! global ) break ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var matchStr = String ( result [ 0 ] ) ;
if ( matchStr === '' ) rx . lastIndex = advanceStringIndex ( S , toLength ( rx . lastIndex ) , fullUnicode ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var accumulatedResult = '' ;
var nextSourcePosition = 0 ;
for ( var i = 0 ; i < results . length ; i ++ ) {
result = results [ i ] ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var matched = String ( result [ 0 ] ) ;
var position = max ( min ( toInteger ( result . index ) , S . length ) , 0 ) ;
var captures = [ ] ;
// NOTE: This is equivalent to
// captures = result.slice(1).map(maybeToString)
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
for ( var j = 1 ; j < result . length ; j ++ ) captures . push ( maybeToString ( result [ j ] ) ) ;
var namedCaptures = result . groups ;
if ( functionalReplace ) {
var replacerArgs = [ matched ] . concat ( captures , position , S ) ;
if ( namedCaptures !== undefined ) replacerArgs . push ( namedCaptures ) ;
var replacement = String ( replaceValue . apply ( undefined , replacerArgs ) ) ;
} else {
replacement = getSubstitution ( matched , S , position , captures , namedCaptures , replaceValue ) ;
}
if ( position >= nextSourcePosition ) {
accumulatedResult += S . slice ( nextSourcePosition , position ) + replacement ;
nextSourcePosition = position + matched . length ;
}
}
return accumulatedResult + S . slice ( nextSourcePosition ) ;
}
] ;
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3123 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var fixRegExpWellKnownSymbolLogic = _ _webpack _require _ _ ( 7007 ) ;
var isRegExp = _ _webpack _require _ _ ( 7850 ) ;
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var requireObjectCoercible = _ _webpack _require _ _ ( 4488 ) ;
var speciesConstructor = _ _webpack _require _ _ ( 6707 ) ;
var advanceStringIndex = _ _webpack _require _ _ ( 1530 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var callRegExpExec = _ _webpack _require _ _ ( 7651 ) ;
var regexpExec = _ _webpack _require _ _ ( 2261 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var arrayPush = [ ] . push ;
var min = Math . min ;
var MAX _UINT32 = 0xFFFFFFFF ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS _Y = ! fails ( function ( ) { return ! RegExp ( MAX _UINT32 , 'y' ) ; } ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// @@split logic
fixRegExpWellKnownSymbolLogic ( 'split' , 2 , function ( SPLIT , nativeSplit , maybeCallNative ) {
var internalSplit ;
if (
'abbc' . split ( /(b)*/ ) [ 1 ] == 'c' ||
// eslint-disable-next-line regexp/no-empty-group -- required for testing
'test' . split ( /(?:)/ , - 1 ) . length != 4 ||
'ab' . split ( /(?:ab)*/ ) . length != 2 ||
'.' . split ( /(.?)(.?)/ ) . length != 4 ||
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
'.' . split ( /()()/ ) . length > 1 ||
'' . split ( /.?/ ) . length
) {
// based on es5-shim implementation, need to rework it
internalSplit = function ( separator , limit ) {
var string = String ( requireObjectCoercible ( this ) ) ;
var lim = limit === undefined ? MAX _UINT32 : limit >>> 0 ;
if ( lim === 0 ) return [ ] ;
if ( separator === undefined ) return [ string ] ;
// If `separator` is not a regex, use native split
if ( ! isRegExp ( separator ) ) {
return nativeSplit . call ( string , separator , lim ) ;
}
var output = [ ] ;
var flags = ( separator . ignoreCase ? 'i' : '' ) +
( separator . multiline ? 'm' : '' ) +
( separator . unicode ? 'u' : '' ) +
( separator . sticky ? 'y' : '' ) ;
var lastLastIndex = 0 ;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp ( separator . source , flags + 'g' ) ;
var match , lastIndex , lastLength ;
while ( match = regexpExec . call ( separatorCopy , string ) ) {
lastIndex = separatorCopy . lastIndex ;
if ( lastIndex > lastLastIndex ) {
output . push ( string . slice ( lastLastIndex , match . index ) ) ;
if ( match . length > 1 && match . index < string . length ) arrayPush . apply ( output , match . slice ( 1 ) ) ;
lastLength = match [ 0 ] . length ;
lastLastIndex = lastIndex ;
if ( output . length >= lim ) break ;
}
if ( separatorCopy . lastIndex === match . index ) separatorCopy . lastIndex ++ ; // Avoid an infinite loop
}
if ( lastLastIndex === string . length ) {
if ( lastLength || ! separatorCopy . test ( '' ) ) output . push ( '' ) ;
} else output . push ( string . slice ( lastLastIndex ) ) ;
return output . length > lim ? output . slice ( 0 , lim ) : output ;
} ;
// Chakra, V8
} else if ( '0' . split ( undefined , 0 ) . length ) {
internalSplit = function ( separator , limit ) {
return separator === undefined && limit === 0 ? [ ] : nativeSplit . call ( this , separator , limit ) ;
} ;
} else internalSplit = nativeSplit ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
return [
// `String.prototype.split` method
// https://tc39.es/ecma262/#sec-string.prototype.split
function split ( separator , limit ) {
var O = requireObjectCoercible ( this ) ;
var splitter = separator == undefined ? undefined : separator [ SPLIT ] ;
return splitter !== undefined
? splitter . call ( separator , O , limit )
: internalSplit . call ( String ( O ) , separator , limit ) ;
} ,
// `RegExp.prototype[@@split]` method
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
//
// NOTE: This cannot be properly polyfilled in engines that don't support
// the 'y' flag.
function ( regexp , limit ) {
var res = maybeCallNative ( internalSplit , regexp , this , limit , internalSplit !== nativeSplit ) ;
if ( res . done ) return res . value ;
var rx = anObject ( regexp ) ;
var S = String ( this ) ;
var C = speciesConstructor ( rx , RegExp ) ;
var unicodeMatching = rx . unicode ;
var flags = ( rx . ignoreCase ? 'i' : '' ) +
( rx . multiline ? 'm' : '' ) +
( rx . unicode ? 'u' : '' ) +
( SUPPORTS _Y ? 'y' : 'g' ) ;
// ^(? + rx + ) is needed, in combination with some S slicing, to
// simulate the 'y' flag.
var splitter = new C ( SUPPORTS _Y ? rx : '^(?:' + rx . source + ')' , flags ) ;
var lim = limit === undefined ? MAX _UINT32 : limit >>> 0 ;
if ( lim === 0 ) return [ ] ;
if ( S . length === 0 ) return callRegExpExec ( splitter , S ) === null ? [ S ] : [ ] ;
var p = 0 ;
var q = 0 ;
var A = [ ] ;
while ( q < S . length ) {
splitter . lastIndex = SUPPORTS _Y ? q : 0 ;
var z = callRegExpExec ( splitter , SUPPORTS _Y ? S : S . slice ( q ) ) ;
var e ;
if (
z === null ||
( e = min ( toLength ( splitter . lastIndex + ( SUPPORTS _Y ? 0 : q ) ) , S . length ) ) === p
) {
q = advanceStringIndex ( S , q , unicodeMatching ) ;
} else {
A . push ( S . slice ( p , q ) ) ;
if ( A . length === lim ) return A ;
for ( var i = 1 ; i <= z . length - 1 ; i ++ ) {
A . push ( z [ i ] ) ;
if ( A . length === lim ) return A ;
}
q = p = e ;
}
}
A . push ( S . slice ( p ) ) ;
return A ;
}
] ;
} , ! SUPPORTS _Y ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3210 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var $ = _ _webpack _require _ _ ( 2109 ) ;
var $trim = _ _webpack _require _ _ ( 3111 ) . trim ;
var forcedStringTrimMethod = _ _webpack _require _ _ ( 6091 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `String.prototype.trim` method
// https://tc39.es/ecma262/#sec-string.prototype.trim
$ ( { target : 'String' , proto : true , forced : forcedStringTrimMethod ( 'trim' ) } , {
trim : function trim ( ) {
return $trim ( this ) ;
}
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 2990 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $copyWithin = _ _webpack _require _ _ ( 1048 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.copyWithin` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
exportTypedArrayMethod ( 'copyWithin' , function copyWithin ( target , start /* , end */ ) {
return $copyWithin . call ( aTypedArray ( this ) , target , start , arguments . length > 2 ? arguments [ 2 ] : undefined ) ;
} ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 8927 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $every = _ _webpack _require _ _ ( 2092 ) . every ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
// `%TypedArray%.prototype.every` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
exportTypedArrayMethod ( 'every' , function every ( callbackfn /* , thisArg */ ) {
return $every ( aTypedArray ( this ) , callbackfn , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3105 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $fill = _ _webpack _require _ _ ( 1285 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.fill` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
// eslint-disable-next-line no-unused-vars -- required for `.length`
exportTypedArrayMethod ( 'fill' , function fill ( value /* , start, end */ ) {
return $fill . apply ( aTypedArray ( this ) , arguments ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 5035 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $filter = _ _webpack _require _ _ ( 2092 ) . filter ;
var fromSpeciesAndList = _ _webpack _require _ _ ( 3074 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.filter` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
exportTypedArrayMethod ( 'filter' , function filter ( callbackfn /* , thisArg */ ) {
var list = $filter ( aTypedArray ( this ) , callbackfn , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
return fromSpeciesAndList ( this , list ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
/***/ 7174 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $findIndex = _ _webpack _require _ _ ( 2092 ) . findIndex ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
// `%TypedArray%.prototype.findIndex` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
exportTypedArrayMethod ( 'findIndex' , function findIndex ( predicate /* , thisArg */ ) {
return $findIndex ( aTypedArray ( this ) , predicate , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
2021-02-10 07:13:13 +00:00
} ) ;
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 4345 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $find = _ _webpack _require _ _ ( 2092 ) . find ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.find` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
exportTypedArrayMethod ( 'find' , function find ( predicate /* , thisArg */ ) {
return $find ( aTypedArray ( this ) , predicate , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 2846 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $forEach = _ _webpack _require _ _ ( 2092 ) . forEach ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.forEach` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
exportTypedArrayMethod ( 'forEach' , function forEach ( callbackfn /* , thisArg */ ) {
$forEach ( aTypedArray ( this ) , callbackfn , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 4731 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $includes = _ _webpack _require _ _ ( 1318 ) . includes ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.includes` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
exportTypedArrayMethod ( 'includes' , function includes ( searchElement /* , fromIndex */ ) {
return $includes ( aTypedArray ( this ) , searchElement , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 7209 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $indexOf = _ _webpack _require _ _ ( 1318 ) . indexOf ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
exportTypedArrayMethod ( 'indexOf' , function indexOf ( searchElement /* , fromIndex */ ) {
return $indexOf ( aTypedArray ( this ) , searchElement , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 6319 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var global = _ _webpack _require _ _ ( 7854 ) ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var ArrayIterators = _ _webpack _require _ _ ( 6992 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
var Uint8Array = global . Uint8Array ;
var arrayValues = ArrayIterators . values ;
var arrayKeys = ArrayIterators . keys ;
var arrayEntries = ArrayIterators . entries ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
var nativeTypedArrayIterator = Uint8Array && Uint8Array . prototype [ ITERATOR ] ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var CORRECT _ITER _NAME = ! ! nativeTypedArrayIterator
&& ( nativeTypedArrayIterator . name == 'values' || nativeTypedArrayIterator . name == undefined ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var typedArrayValues = function values ( ) {
return arrayValues . call ( aTypedArray ( this ) ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.entries` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
exportTypedArrayMethod ( 'entries' , function entries ( ) {
return arrayEntries . call ( aTypedArray ( this ) ) ;
} ) ;
// `%TypedArray%.prototype.keys` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
exportTypedArrayMethod ( 'keys' , function keys ( ) {
return arrayKeys . call ( aTypedArray ( this ) ) ;
} ) ;
// `%TypedArray%.prototype.values` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
exportTypedArrayMethod ( 'values' , typedArrayValues , ! CORRECT _ITER _NAME ) ;
// `%TypedArray%.prototype[@@iterator]` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
exportTypedArrayMethod ( ITERATOR , typedArrayValues , ! CORRECT _ITER _NAME ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 8867 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
var $join = [ ] . join ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.join` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
// eslint-disable-next-line no-unused-vars -- required for `.length`
exportTypedArrayMethod ( 'join' , function join ( separator ) {
return $join . apply ( aTypedArray ( this ) , arguments ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 7789 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $lastIndexOf = _ _webpack _require _ _ ( 6583 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.lastIndexOf` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
// eslint-disable-next-line no-unused-vars -- required for `.length`
exportTypedArrayMethod ( 'lastIndexOf' , function lastIndexOf ( searchElement /* , fromIndex */ ) {
return $lastIndexOf . apply ( aTypedArray ( this ) , arguments ) ;
2021-02-10 07:13:13 +00:00
} ) ;
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3739 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $map = _ _webpack _require _ _ ( 2092 ) . map ;
var speciesConstructor = _ _webpack _require _ _ ( 6707 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var aTypedArrayConstructor = ArrayBufferViewCore . aTypedArrayConstructor ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.map` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
exportTypedArrayMethod ( 'map' , function map ( mapfn /* , thisArg */ ) {
return $map ( aTypedArray ( this ) , mapfn , arguments . length > 1 ? arguments [ 1 ] : undefined , function ( O , length ) {
return new ( aTypedArrayConstructor ( speciesConstructor ( O , O . constructor ) ) ) ( length ) ;
} ) ;
} ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 4483 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $reduceRight = _ _webpack _require _ _ ( 3671 ) . right ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
// `%TypedArray%.prototype.reduceRicht` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
exportTypedArrayMethod ( 'reduceRight' , function reduceRight ( callbackfn /* , initialValue */ ) {
return $reduceRight ( aTypedArray ( this ) , callbackfn , arguments . length , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} ) ;
/***/ } ) ,
/***/ 9368 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $reduce = _ _webpack _require _ _ ( 3671 ) . left ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
// `%TypedArray%.prototype.reduce` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
exportTypedArrayMethod ( 'reduce' , function reduce ( callbackfn /* , initialValue */ ) {
return $reduce ( aTypedArray ( this ) , callbackfn , arguments . length , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} ) ;
/***/ } ) ,
/***/ 2056 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
var floor = Math . floor ;
// `%TypedArray%.prototype.reverse` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
exportTypedArrayMethod ( 'reverse' , function reverse ( ) {
var that = this ;
var length = aTypedArray ( that ) . length ;
var middle = floor ( length / 2 ) ;
2021-02-10 07:13:13 +00:00
var index = 0 ;
2021-03-20 20:39:14 +00:00
var value ;
while ( index < middle ) {
value = that [ index ] ;
that [ index ++ ] = that [ -- length ] ;
that [ length ] = value ;
} return that ;
} ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 3462 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var toOffset = _ _webpack _require _ _ ( 4590 ) ;
var toObject = _ _webpack _require _ _ ( 7908 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
var FORCED = fails ( function ( ) {
/* global Int8Array -- safe */
new Int8Array ( 1 ) . set ( { } ) ;
} ) ;
// `%TypedArray%.prototype.set` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
exportTypedArrayMethod ( 'set' , function set ( arrayLike /* , offset */ ) {
aTypedArray ( this ) ;
var offset = toOffset ( arguments . length > 1 ? arguments [ 1 ] : undefined , 1 ) ;
var length = this . length ;
var src = toObject ( arrayLike ) ;
var len = toLength ( src . length ) ;
var index = 0 ;
if ( len + offset > length ) throw RangeError ( 'Wrong length' ) ;
while ( index < len ) this [ offset + index ] = src [ index ++ ] ;
} , FORCED ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 678 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var speciesConstructor = _ _webpack _require _ _ ( 6707 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var aTypedArrayConstructor = ArrayBufferViewCore . aTypedArrayConstructor ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
var $slice = [ ] . slice ;
var FORCED = fails ( function ( ) {
/* global Int8Array -- safe */
new Int8Array ( 1 ) . slice ( ) ;
} ) ;
// `%TypedArray%.prototype.slice` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
exportTypedArrayMethod ( 'slice' , function slice ( start , end ) {
var list = $slice . call ( aTypedArray ( this ) , start , end ) ;
var C = speciesConstructor ( this , this . constructor ) ;
var index = 0 ;
var length = list . length ;
var result = new ( aTypedArrayConstructor ( C ) ) ( length ) ;
while ( length > index ) result [ index ] = list [ index ++ ] ;
return result ;
} , FORCED ) ;
2021-02-10 07:13:13 +00:00
/***/ } ) ,
2021-03-20 20:39:14 +00:00
/***/ 7462 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
"use strict" ;
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var $some = _ _webpack _require _ _ ( 2092 ) . some ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.some` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
exportTypedArrayMethod ( 'some' , function some ( callbackfn /* , thisArg */ ) {
return $some ( aTypedArray ( this ) , callbackfn , arguments . length > 1 ? arguments [ 1 ] : undefined ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ 3824 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
var $sort = [ ] . sort ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `%TypedArray%.prototype.sort` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
exportTypedArrayMethod ( 'sort' , function sort ( comparefn ) {
return $sort . call ( aTypedArray ( this ) , comparefn ) ;
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } ) ,
/***/ 5021 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var toLength = _ _webpack _require _ _ ( 7466 ) ;
var toAbsoluteIndex = _ _webpack _require _ _ ( 1400 ) ;
var speciesConstructor = _ _webpack _require _ _ ( 6707 ) ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
// `%TypedArray%.prototype.subarray` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
exportTypedArrayMethod ( 'subarray' , function subarray ( begin , end ) {
var O = aTypedArray ( this ) ;
var length = O . length ;
var beginIndex = toAbsoluteIndex ( begin , length ) ;
return new ( speciesConstructor ( O , O . constructor ) ) (
O . buffer ,
O . byteOffset + beginIndex * O . BYTES _PER _ELEMENT ,
toLength ( ( end === undefined ? length : toAbsoluteIndex ( end , length ) ) - beginIndex )
) ;
} ) ;
/***/ } ) ,
/***/ 2974 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var global = _ _webpack _require _ _ ( 7854 ) ;
var ArrayBufferViewCore = _ _webpack _require _ _ ( 260 ) ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var Int8Array = global . Int8Array ;
var aTypedArray = ArrayBufferViewCore . aTypedArray ;
var exportTypedArrayMethod = ArrayBufferViewCore . exportTypedArrayMethod ;
var $toLocaleString = [ ] . toLocaleString ;
var $slice = [ ] . slice ;
// iOS Safari 6.x fails here
var TO _LOCALE _STRING _BUG = ! ! Int8Array && fails ( function ( ) {
$toLocaleString . call ( new Int8Array ( 1 ) ) ;
} ) ;
var FORCED = fails ( function ( ) {
return [ 1 , 2 ] . toLocaleString ( ) != new Int8Array ( [ 1 , 2 ] ) . toLocaleString ( ) ;
} ) || ! fails ( function ( ) {
Int8Array . prototype . toLocaleString . call ( [ 1 , 2 ] ) ;
} ) ;
// `%TypedArray%.prototype.toLocaleString` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
exportTypedArrayMethod ( 'toLocaleString' , function toLocaleString ( ) {
return $toLocaleString . apply ( TO _LOCALE _STRING _BUG ? $slice . call ( aTypedArray ( this ) ) : aTypedArray ( this ) , arguments ) ;
} , FORCED ) ;
/***/ } ) ,
/***/ 5016 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
var exportTypedArrayMethod = _ _webpack _require _ _ ( 260 ) . exportTypedArrayMethod ;
var fails = _ _webpack _require _ _ ( 7293 ) ;
var global = _ _webpack _require _ _ ( 7854 ) ;
var Uint8Array = global . Uint8Array ;
var Uint8ArrayPrototype = Uint8Array && Uint8Array . prototype || { } ;
var arrayToString = [ ] . toString ;
var arrayJoin = [ ] . join ;
if ( fails ( function ( ) { arrayToString . call ( { } ) ; } ) ) {
arrayToString = function toString ( ) {
return arrayJoin . call ( this ) ;
} ;
}
var IS _NOT _ARRAY _METHOD = Uint8ArrayPrototype . toString != arrayToString ;
// `%TypedArray%.prototype.toString` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
exportTypedArrayMethod ( 'toString' , arrayToString , IS _NOT _ARRAY _METHOD ) ;
/***/ } ) ,
/***/ 2472 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var createTypedArrayConstructor = _ _webpack _require _ _ ( 9843 ) ;
// `Uint8Array` constructor
// https://tc39.es/ecma262/#sec-typedarray-objects
createTypedArrayConstructor ( 'Uint8' , function ( init ) {
return function Uint8Array ( data , byteOffset , length ) {
return init ( this , data , byteOffset , length ) ;
} ;
} ) ;
/***/ } ) ,
/***/ 4747 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var global = _ _webpack _require _ _ ( 7854 ) ;
var DOMIterables = _ _webpack _require _ _ ( 8324 ) ;
var forEach = _ _webpack _require _ _ ( 8533 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
for ( var COLLECTION _NAME in DOMIterables ) {
var Collection = global [ COLLECTION _NAME ] ;
var CollectionPrototype = Collection && Collection . prototype ;
// some Chrome versions have non-configurable methods on DOMTokenList
if ( CollectionPrototype && CollectionPrototype . forEach !== forEach ) try {
createNonEnumerableProperty ( CollectionPrototype , 'forEach' , forEach ) ;
} catch ( error ) {
CollectionPrototype . forEach = forEach ;
}
}
/***/ } ) ,
/***/ 3948 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
var global = _ _webpack _require _ _ ( 7854 ) ;
var DOMIterables = _ _webpack _require _ _ ( 8324 ) ;
var ArrayIteratorMethods = _ _webpack _require _ _ ( 6992 ) ;
var createNonEnumerableProperty = _ _webpack _require _ _ ( 8880 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
var TO _STRING _TAG = wellKnownSymbol ( 'toStringTag' ) ;
var ArrayValues = ArrayIteratorMethods . values ;
for ( var COLLECTION _NAME in DOMIterables ) {
var Collection = global [ COLLECTION _NAME ] ;
var CollectionPrototype = Collection && Collection . prototype ;
if ( CollectionPrototype ) {
// some Chrome versions have non-configurable methods on DOMTokenList
if ( CollectionPrototype [ ITERATOR ] !== ArrayValues ) try {
createNonEnumerableProperty ( CollectionPrototype , ITERATOR , ArrayValues ) ;
} catch ( error ) {
CollectionPrototype [ ITERATOR ] = ArrayValues ;
}
if ( ! CollectionPrototype [ TO _STRING _TAG ] ) {
createNonEnumerableProperty ( CollectionPrototype , TO _STRING _TAG , COLLECTION _NAME ) ;
}
if ( DOMIterables [ COLLECTION _NAME ] ) for ( var METHOD _NAME in ArrayIteratorMethods ) {
// some Chrome versions have non-configurable methods on DOMTokenList
if ( CollectionPrototype [ METHOD _NAME ] !== ArrayIteratorMethods [ METHOD _NAME ] ) try {
createNonEnumerableProperty ( CollectionPrototype , METHOD _NAME , ArrayIteratorMethods [ METHOD _NAME ] ) ;
} catch ( error ) {
CollectionPrototype [ METHOD _NAME ] = ArrayIteratorMethods [ METHOD _NAME ] ;
}
}
}
}
/***/ } ) ,
/***/ 1637 :
/***/ ( function ( module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
_ _webpack _require _ _ ( 6992 ) ;
var $ = _ _webpack _require _ _ ( 2109 ) ;
var getBuiltIn = _ _webpack _require _ _ ( 5005 ) ;
var USE _NATIVE _URL = _ _webpack _require _ _ ( 590 ) ;
var redefine = _ _webpack _require _ _ ( 1320 ) ;
var redefineAll = _ _webpack _require _ _ ( 2248 ) ;
var setToStringTag = _ _webpack _require _ _ ( 8003 ) ;
var createIteratorConstructor = _ _webpack _require _ _ ( 4994 ) ;
var InternalStateModule = _ _webpack _require _ _ ( 9909 ) ;
var anInstance = _ _webpack _require _ _ ( 5787 ) ;
var hasOwn = _ _webpack _require _ _ ( 6656 ) ;
var bind = _ _webpack _require _ _ ( 9974 ) ;
var classof = _ _webpack _require _ _ ( 648 ) ;
var anObject = _ _webpack _require _ _ ( 9670 ) ;
var isObject = _ _webpack _require _ _ ( 111 ) ;
var create = _ _webpack _require _ _ ( 30 ) ;
var createPropertyDescriptor = _ _webpack _require _ _ ( 9114 ) ;
var getIterator = _ _webpack _require _ _ ( 8554 ) ;
var getIteratorMethod = _ _webpack _require _ _ ( 1246 ) ;
var wellKnownSymbol = _ _webpack _require _ _ ( 5112 ) ;
var $fetch = getBuiltIn ( 'fetch' ) ;
var Headers = getBuiltIn ( 'Headers' ) ;
var ITERATOR = wellKnownSymbol ( 'iterator' ) ;
var URL _SEARCH _PARAMS = 'URLSearchParams' ;
var URL _SEARCH _PARAMS _ITERATOR = URL _SEARCH _PARAMS + 'Iterator' ;
var setInternalState = InternalStateModule . set ;
var getInternalParamsState = InternalStateModule . getterFor ( URL _SEARCH _PARAMS ) ;
var getInternalIteratorState = InternalStateModule . getterFor ( URL _SEARCH _PARAMS _ITERATOR ) ;
var plus = /\+/g ;
var sequences = Array ( 4 ) ;
var percentSequence = function ( bytes ) {
return sequences [ bytes - 1 ] || ( sequences [ bytes - 1 ] = RegExp ( '((?:%[\\da-f]{2}){' + bytes + '})' , 'gi' ) ) ;
} ;
var percentDecode = function ( sequence ) {
try {
return decodeURIComponent ( sequence ) ;
} catch ( error ) {
return sequence ;
}
} ;
var deserialize = function ( it ) {
var result = it . replace ( plus , ' ' ) ;
var bytes = 4 ;
try {
return decodeURIComponent ( result ) ;
} catch ( error ) {
while ( bytes ) {
result = result . replace ( percentSequence ( bytes -- ) , percentDecode ) ;
}
return result ;
}
} ;
var find = /[!'()~]|%20/g ;
var replace = {
'!' : '%21' ,
"'" : '%27' ,
'(' : '%28' ,
')' : '%29' ,
'~' : '%7E' ,
'%20' : '+'
} ;
var replacer = function ( match ) {
return replace [ match ] ;
} ;
var serialize = function ( it ) {
return encodeURIComponent ( it ) . replace ( find , replacer ) ;
} ;
var parseSearchParams = function ( result , query ) {
if ( query ) {
var attributes = query . split ( '&' ) ;
var index = 0 ;
var attribute , entry ;
while ( index < attributes . length ) {
attribute = attributes [ index ++ ] ;
if ( attribute . length ) {
entry = attribute . split ( '=' ) ;
result . push ( {
key : deserialize ( entry . shift ( ) ) ,
value : deserialize ( entry . join ( '=' ) )
} ) ;
}
}
}
} ;
var updateSearchParams = function ( query ) {
this . entries . length = 0 ;
parseSearchParams ( this . entries , query ) ;
} ;
var validateArgumentsLength = function ( passed , required ) {
if ( passed < required ) throw TypeError ( 'Not enough arguments' ) ;
} ;
var URLSearchParamsIterator = createIteratorConstructor ( function Iterator ( params , kind ) {
setInternalState ( this , {
type : URL _SEARCH _PARAMS _ITERATOR ,
iterator : getIterator ( getInternalParamsState ( params ) . entries ) ,
kind : kind
} ) ;
} , 'Iterator' , function next ( ) {
var state = getInternalIteratorState ( this ) ;
var kind = state . kind ;
var step = state . iterator . next ( ) ;
var entry = step . value ;
if ( ! step . done ) {
step . value = kind === 'keys' ? entry . key : kind === 'values' ? entry . value : [ entry . key , entry . value ] ;
} return step ;
} ) ;
// `URLSearchParams` constructor
// https://url.spec.whatwg.org/#interface-urlsearchparams
var URLSearchParamsConstructor = function URLSearchParams ( /* init */ ) {
anInstance ( this , URLSearchParamsConstructor , URL _SEARCH _PARAMS ) ;
var init = arguments . length > 0 ? arguments [ 0 ] : undefined ;
var that = this ;
var entries = [ ] ;
var iteratorMethod , iterator , next , step , entryIterator , entryNext , first , second , key ;
setInternalState ( that , {
type : URL _SEARCH _PARAMS ,
entries : entries ,
updateURL : function ( ) { /* empty */ } ,
updateSearchParams : updateSearchParams
} ) ;
if ( init !== undefined ) {
if ( isObject ( init ) ) {
iteratorMethod = getIteratorMethod ( init ) ;
if ( typeof iteratorMethod === 'function' ) {
iterator = iteratorMethod . call ( init ) ;
next = iterator . next ;
while ( ! ( step = next . call ( iterator ) ) . done ) {
entryIterator = getIterator ( anObject ( step . value ) ) ;
entryNext = entryIterator . next ;
if (
( first = entryNext . call ( entryIterator ) ) . done ||
( second = entryNext . call ( entryIterator ) ) . done ||
! entryNext . call ( entryIterator ) . done
) throw TypeError ( 'Expected sequence with length 2' ) ;
entries . push ( { key : first . value + '' , value : second . value + '' } ) ;
}
} else for ( key in init ) if ( hasOwn ( init , key ) ) entries . push ( { key : key , value : init [ key ] + '' } ) ;
} else {
parseSearchParams ( entries , typeof init === 'string' ? init . charAt ( 0 ) === '?' ? init . slice ( 1 ) : init : init + '' ) ;
}
}
} ;
var URLSearchParamsPrototype = URLSearchParamsConstructor . prototype ;
redefineAll ( URLSearchParamsPrototype , {
// `URLSearchParams.prototype.append` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
append : function append ( name , value ) {
validateArgumentsLength ( arguments . length , 2 ) ;
var state = getInternalParamsState ( this ) ;
state . entries . push ( { key : name + '' , value : value + '' } ) ;
state . updateURL ( ) ;
} ,
// `URLSearchParams.prototype.delete` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
'delete' : function ( name ) {
validateArgumentsLength ( arguments . length , 1 ) ;
var state = getInternalParamsState ( this ) ;
var entries = state . entries ;
var key = name + '' ;
var index = 0 ;
while ( index < entries . length ) {
if ( entries [ index ] . key === key ) entries . splice ( index , 1 ) ;
else index ++ ;
}
state . updateURL ( ) ;
} ,
// `URLSearchParams.prototype.get` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
get : function get ( name ) {
validateArgumentsLength ( arguments . length , 1 ) ;
var entries = getInternalParamsState ( this ) . entries ;
var key = name + '' ;
var index = 0 ;
for ( ; index < entries . length ; index ++ ) {
if ( entries [ index ] . key === key ) return entries [ index ] . value ;
}
return null ;
} ,
// `URLSearchParams.prototype.getAll` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
getAll : function getAll ( name ) {
validateArgumentsLength ( arguments . length , 1 ) ;
var entries = getInternalParamsState ( this ) . entries ;
var key = name + '' ;
var result = [ ] ;
var index = 0 ;
for ( ; index < entries . length ; index ++ ) {
if ( entries [ index ] . key === key ) result . push ( entries [ index ] . value ) ;
}
return result ;
} ,
// `URLSearchParams.prototype.has` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
has : function has ( name ) {
validateArgumentsLength ( arguments . length , 1 ) ;
var entries = getInternalParamsState ( this ) . entries ;
var key = name + '' ;
var index = 0 ;
while ( index < entries . length ) {
if ( entries [ index ++ ] . key === key ) return true ;
}
return false ;
} ,
// `URLSearchParams.prototype.set` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
set : function set ( name , value ) {
validateArgumentsLength ( arguments . length , 1 ) ;
var state = getInternalParamsState ( this ) ;
var entries = state . entries ;
var found = false ;
var key = name + '' ;
var val = value + '' ;
var index = 0 ;
var entry ;
for ( ; index < entries . length ; index ++ ) {
entry = entries [ index ] ;
if ( entry . key === key ) {
if ( found ) entries . splice ( index -- , 1 ) ;
else {
found = true ;
entry . value = val ;
}
}
}
if ( ! found ) entries . push ( { key : key , value : val } ) ;
state . updateURL ( ) ;
} ,
// `URLSearchParams.prototype.sort` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
sort : function sort ( ) {
var state = getInternalParamsState ( this ) ;
var entries = state . entries ;
// Array#sort is not stable in some engines
var slice = entries . slice ( ) ;
var entry , entriesIndex , sliceIndex ;
entries . length = 0 ;
for ( sliceIndex = 0 ; sliceIndex < slice . length ; sliceIndex ++ ) {
entry = slice [ sliceIndex ] ;
for ( entriesIndex = 0 ; entriesIndex < sliceIndex ; entriesIndex ++ ) {
if ( entries [ entriesIndex ] . key > entry . key ) {
entries . splice ( entriesIndex , 0 , entry ) ;
break ;
}
}
if ( entriesIndex === sliceIndex ) entries . push ( entry ) ;
}
state . updateURL ( ) ;
} ,
// `URLSearchParams.prototype.forEach` method
forEach : function forEach ( callback /* , thisArg */ ) {
var entries = getInternalParamsState ( this ) . entries ;
var boundFunction = bind ( callback , arguments . length > 1 ? arguments [ 1 ] : undefined , 3 ) ;
var index = 0 ;
var entry ;
while ( index < entries . length ) {
entry = entries [ index ++ ] ;
boundFunction ( entry . value , entry . key , this ) ;
}
} ,
// `URLSearchParams.prototype.keys` method
keys : function keys ( ) {
return new URLSearchParamsIterator ( this , 'keys' ) ;
} ,
// `URLSearchParams.prototype.values` method
values : function values ( ) {
return new URLSearchParamsIterator ( this , 'values' ) ;
} ,
// `URLSearchParams.prototype.entries` method
entries : function entries ( ) {
return new URLSearchParamsIterator ( this , 'entries' ) ;
}
} , { enumerable : true } ) ;
// `URLSearchParams.prototype[@@iterator]` method
redefine ( URLSearchParamsPrototype , ITERATOR , URLSearchParamsPrototype . entries ) ;
// `URLSearchParams.prototype.toString` method
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
redefine ( URLSearchParamsPrototype , 'toString' , function toString ( ) {
var entries = getInternalParamsState ( this ) . entries ;
var result = [ ] ;
var index = 0 ;
var entry ;
while ( index < entries . length ) {
entry = entries [ index ++ ] ;
result . push ( serialize ( entry . key ) + '=' + serialize ( entry . value ) ) ;
} return result . join ( '&' ) ;
} , { enumerable : true } ) ;
setToStringTag ( URLSearchParamsConstructor , URL _SEARCH _PARAMS ) ;
$ ( { global : true , forced : ! USE _NATIVE _URL } , {
URLSearchParams : URLSearchParamsConstructor
} ) ;
// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
// https://github.com/zloirock/core-js/issues/674
if ( ! USE _NATIVE _URL && typeof $fetch == 'function' && typeof Headers == 'function' ) {
$ ( { global : true , enumerable : true , forced : true } , {
fetch : function fetch ( input /* , init */ ) {
var args = [ input ] ;
var init , body , headers ;
if ( arguments . length > 1 ) {
init = arguments [ 1 ] ;
if ( isObject ( init ) ) {
body = init . body ;
if ( classof ( body ) === URL _SEARCH _PARAMS ) {
headers = init . headers ? new Headers ( init . headers ) : new Headers ( ) ;
if ( ! headers . has ( 'content-type' ) ) {
headers . set ( 'content-type' , 'application/x-www-form-urlencoded;charset=UTF-8' ) ;
}
init = create ( init , {
body : createPropertyDescriptor ( 0 , String ( body ) ) ,
headers : createPropertyDescriptor ( 0 , headers )
} ) ;
}
}
args . push ( init ) ;
} return $fetch . apply ( this , args ) ;
}
} ) ;
}
module . exports = {
URLSearchParams : URLSearchParamsConstructor ,
getState : getInternalParamsState
} ;
/***/ } ) ,
/***/ 285 :
/***/ ( function ( _ _unused _webpack _module , _ _unused _webpack _exports , _ _webpack _require _ _ ) {
"use strict" ;
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
_ _webpack _require _ _ ( 8783 ) ;
var $ = _ _webpack _require _ _ ( 2109 ) ;
var DESCRIPTORS = _ _webpack _require _ _ ( 9781 ) ;
var USE _NATIVE _URL = _ _webpack _require _ _ ( 590 ) ;
var global = _ _webpack _require _ _ ( 7854 ) ;
var defineProperties = _ _webpack _require _ _ ( 6048 ) ;
var redefine = _ _webpack _require _ _ ( 1320 ) ;
var anInstance = _ _webpack _require _ _ ( 5787 ) ;
var has = _ _webpack _require _ _ ( 6656 ) ;
var assign = _ _webpack _require _ _ ( 1574 ) ;
var arrayFrom = _ _webpack _require _ _ ( 8457 ) ;
var codeAt = _ _webpack _require _ _ ( 8710 ) . codeAt ;
var toASCII = _ _webpack _require _ _ ( 3197 ) ;
var setToStringTag = _ _webpack _require _ _ ( 8003 ) ;
var URLSearchParamsModule = _ _webpack _require _ _ ( 1637 ) ;
var InternalStateModule = _ _webpack _require _ _ ( 9909 ) ;
var NativeURL = global . URL ;
var URLSearchParams = URLSearchParamsModule . URLSearchParams ;
var getInternalSearchParamsState = URLSearchParamsModule . getState ;
var setInternalState = InternalStateModule . set ;
var getInternalURLState = InternalStateModule . getterFor ( 'URL' ) ;
var floor = Math . floor ;
var pow = Math . pow ;
var INVALID _AUTHORITY = 'Invalid authority' ;
var INVALID _SCHEME = 'Invalid scheme' ;
var INVALID _HOST = 'Invalid host' ;
var INVALID _PORT = 'Invalid port' ;
var ALPHA = /[A-Za-z]/ ;
var ALPHANUMERIC = /[\d+-.A-Za-z]/ ;
var DIGIT = /\d/ ;
var HEX _START = /^(0x|0X)/ ;
var OCT = /^[0-7]+$/ ;
var DEC = /^\d+$/ ;
var HEX = /^[\dA-Fa-f]+$/ ;
/* eslint-disable no-control-regex -- safe */
var FORBIDDEN _HOST _CODE _POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/ ;
var FORBIDDEN _HOST _CODE _POINT _EXCLUDING _PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/ ;
var LEADING _AND _TRAILING _C0 _CONTROL _OR _SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g ;
var TAB _AND _NEW _LINE = /[\t\u000A\u000D]/g ;
/* eslint-enable no-control-regex -- safe */
var EOF ;
var parseHost = function ( url , input ) {
var result , codePoints , index ;
if ( input . charAt ( 0 ) == '[' ) {
if ( input . charAt ( input . length - 1 ) != ']' ) return INVALID _HOST ;
result = parseIPv6 ( input . slice ( 1 , - 1 ) ) ;
if ( ! result ) return INVALID _HOST ;
url . host = result ;
// opaque host
} else if ( ! isSpecial ( url ) ) {
if ( FORBIDDEN _HOST _CODE _POINT _EXCLUDING _PERCENT . test ( input ) ) return INVALID _HOST ;
result = '' ;
codePoints = arrayFrom ( input ) ;
for ( index = 0 ; index < codePoints . length ; index ++ ) {
result += percentEncode ( codePoints [ index ] , C0ControlPercentEncodeSet ) ;
}
url . host = result ;
} else {
input = toASCII ( input ) ;
if ( FORBIDDEN _HOST _CODE _POINT . test ( input ) ) return INVALID _HOST ;
result = parseIPv4 ( input ) ;
if ( result === null ) return INVALID _HOST ;
url . host = result ;
}
} ;
var parseIPv4 = function ( input ) {
var parts = input . split ( '.' ) ;
var partsLength , numbers , index , part , radix , number , ipv4 ;
if ( parts . length && parts [ parts . length - 1 ] == '' ) {
parts . pop ( ) ;
}
partsLength = parts . length ;
if ( partsLength > 4 ) return input ;
numbers = [ ] ;
for ( index = 0 ; index < partsLength ; index ++ ) {
part = parts [ index ] ;
if ( part == '' ) return input ;
radix = 10 ;
if ( part . length > 1 && part . charAt ( 0 ) == '0' ) {
radix = HEX _START . test ( part ) ? 16 : 8 ;
part = part . slice ( radix == 8 ? 1 : 2 ) ;
}
if ( part === '' ) {
number = 0 ;
} else {
if ( ! ( radix == 10 ? DEC : radix == 8 ? OCT : HEX ) . test ( part ) ) return input ;
number = parseInt ( part , radix ) ;
}
numbers . push ( number ) ;
}
for ( index = 0 ; index < partsLength ; index ++ ) {
number = numbers [ index ] ;
if ( index == partsLength - 1 ) {
if ( number >= pow ( 256 , 5 - partsLength ) ) return null ;
} else if ( number > 255 ) return null ;
}
ipv4 = numbers . pop ( ) ;
for ( index = 0 ; index < numbers . length ; index ++ ) {
ipv4 += numbers [ index ] * pow ( 256 , 3 - index ) ;
}
return ipv4 ;
} ;
// eslint-disable-next-line max-statements -- TODO
var parseIPv6 = function ( input ) {
var address = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ;
var pieceIndex = 0 ;
var compress = null ;
var pointer = 0 ;
var value , length , numbersSeen , ipv4Piece , number , swaps , swap ;
var char = function ( ) {
return input . charAt ( pointer ) ;
} ;
if ( char ( ) == ':' ) {
if ( input . charAt ( 1 ) != ':' ) return ;
pointer += 2 ;
pieceIndex ++ ;
compress = pieceIndex ;
}
while ( char ( ) ) {
if ( pieceIndex == 8 ) return ;
if ( char ( ) == ':' ) {
if ( compress !== null ) return ;
pointer ++ ;
pieceIndex ++ ;
compress = pieceIndex ;
continue ;
}
value = length = 0 ;
while ( length < 4 && HEX . test ( char ( ) ) ) {
value = value * 16 + parseInt ( char ( ) , 16 ) ;
pointer ++ ;
length ++ ;
}
if ( char ( ) == '.' ) {
if ( length == 0 ) return ;
pointer -= length ;
if ( pieceIndex > 6 ) return ;
numbersSeen = 0 ;
while ( char ( ) ) {
ipv4Piece = null ;
if ( numbersSeen > 0 ) {
if ( char ( ) == '.' && numbersSeen < 4 ) pointer ++ ;
else return ;
}
if ( ! DIGIT . test ( char ( ) ) ) return ;
while ( DIGIT . test ( char ( ) ) ) {
number = parseInt ( char ( ) , 10 ) ;
if ( ipv4Piece === null ) ipv4Piece = number ;
else if ( ipv4Piece == 0 ) return ;
else ipv4Piece = ipv4Piece * 10 + number ;
if ( ipv4Piece > 255 ) return ;
pointer ++ ;
}
address [ pieceIndex ] = address [ pieceIndex ] * 256 + ipv4Piece ;
numbersSeen ++ ;
if ( numbersSeen == 2 || numbersSeen == 4 ) pieceIndex ++ ;
}
if ( numbersSeen != 4 ) return ;
break ;
} else if ( char ( ) == ':' ) {
pointer ++ ;
if ( ! char ( ) ) return ;
} else if ( char ( ) ) return ;
address [ pieceIndex ++ ] = value ;
}
if ( compress !== null ) {
swaps = pieceIndex - compress ;
pieceIndex = 7 ;
while ( pieceIndex != 0 && swaps > 0 ) {
swap = address [ pieceIndex ] ;
address [ pieceIndex -- ] = address [ compress + swaps - 1 ] ;
address [ compress + -- swaps ] = swap ;
}
} else if ( pieceIndex != 8 ) return ;
return address ;
} ;
var findLongestZeroSequence = function ( ipv6 ) {
var maxIndex = null ;
var maxLength = 1 ;
var currStart = null ;
var currLength = 0 ;
var index = 0 ;
for ( ; index < 8 ; index ++ ) {
if ( ipv6 [ index ] !== 0 ) {
if ( currLength > maxLength ) {
maxIndex = currStart ;
maxLength = currLength ;
}
currStart = null ;
currLength = 0 ;
} else {
if ( currStart === null ) currStart = index ;
++ currLength ;
}
}
if ( currLength > maxLength ) {
maxIndex = currStart ;
maxLength = currLength ;
}
return maxIndex ;
} ;
var serializeHost = function ( host ) {
var result , index , compress , ignore0 ;
// ipv4
if ( typeof host == 'number' ) {
result = [ ] ;
for ( index = 0 ; index < 4 ; index ++ ) {
result . unshift ( host % 256 ) ;
host = floor ( host / 256 ) ;
} return result . join ( '.' ) ;
// ipv6
} else if ( typeof host == 'object' ) {
result = '' ;
compress = findLongestZeroSequence ( host ) ;
for ( index = 0 ; index < 8 ; index ++ ) {
if ( ignore0 && host [ index ] === 0 ) continue ;
if ( ignore0 ) ignore0 = false ;
if ( compress === index ) {
result += index ? ':' : '::' ;
ignore0 = true ;
} else {
result += host [ index ] . toString ( 16 ) ;
if ( index < 7 ) result += ':' ;
}
}
return '[' + result + ']' ;
} return host ;
} ;
var C0ControlPercentEncodeSet = { } ;
var fragmentPercentEncodeSet = assign ( { } , C0ControlPercentEncodeSet , {
' ' : 1 , '"' : 1 , '<' : 1 , '>' : 1 , '`' : 1
} ) ;
var pathPercentEncodeSet = assign ( { } , fragmentPercentEncodeSet , {
'#' : 1 , '?' : 1 , '{' : 1 , '}' : 1
} ) ;
var userinfoPercentEncodeSet = assign ( { } , pathPercentEncodeSet , {
'/' : 1 , ':' : 1 , ';' : 1 , '=' : 1 , '@' : 1 , '[' : 1 , '\\' : 1 , ']' : 1 , '^' : 1 , '|' : 1
} ) ;
var percentEncode = function ( char , set ) {
var code = codeAt ( char , 0 ) ;
return code > 0x20 && code < 0x7F && ! has ( set , char ) ? char : encodeURIComponent ( char ) ;
} ;
var specialSchemes = {
ftp : 21 ,
file : null ,
http : 80 ,
https : 443 ,
ws : 80 ,
wss : 443
} ;
var isSpecial = function ( url ) {
return has ( specialSchemes , url . scheme ) ;
} ;
var includesCredentials = function ( url ) {
return url . username != '' || url . password != '' ;
} ;
var cannotHaveUsernamePasswordPort = function ( url ) {
return ! url . host || url . cannotBeABaseURL || url . scheme == 'file' ;
} ;
var isWindowsDriveLetter = function ( string , normalized ) {
var second ;
return string . length == 2 && ALPHA . test ( string . charAt ( 0 ) )
&& ( ( second = string . charAt ( 1 ) ) == ':' || ( ! normalized && second == '|' ) ) ;
} ;
var startsWithWindowsDriveLetter = function ( string ) {
var third ;
return string . length > 1 && isWindowsDriveLetter ( string . slice ( 0 , 2 ) ) && (
string . length == 2 ||
( ( third = string . charAt ( 2 ) ) === '/' || third === '\\' || third === '?' || third === '#' )
) ;
} ;
var shortenURLsPath = function ( url ) {
var path = url . path ;
var pathSize = path . length ;
if ( pathSize && ( url . scheme != 'file' || pathSize != 1 || ! isWindowsDriveLetter ( path [ 0 ] , true ) ) ) {
path . pop ( ) ;
}
} ;
var isSingleDot = function ( segment ) {
return segment === '.' || segment . toLowerCase ( ) === '%2e' ;
} ;
var isDoubleDot = function ( segment ) {
segment = segment . toLowerCase ( ) ;
return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e' ;
} ;
// States:
var SCHEME _START = { } ;
var SCHEME = { } ;
var NO _SCHEME = { } ;
var SPECIAL _RELATIVE _OR _AUTHORITY = { } ;
var PATH _OR _AUTHORITY = { } ;
var RELATIVE = { } ;
var RELATIVE _SLASH = { } ;
var SPECIAL _AUTHORITY _SLASHES = { } ;
var SPECIAL _AUTHORITY _IGNORE _SLASHES = { } ;
var AUTHORITY = { } ;
var HOST = { } ;
var HOSTNAME = { } ;
var PORT = { } ;
var FILE = { } ;
var FILE _SLASH = { } ;
var FILE _HOST = { } ;
var PATH _START = { } ;
var PATH = { } ;
var CANNOT _BE _A _BASE _URL _PATH = { } ;
var QUERY = { } ;
var FRAGMENT = { } ;
// eslint-disable-next-line max-statements -- TODO
var parseURL = function ( url , input , stateOverride , base ) {
var state = stateOverride || SCHEME _START ;
var pointer = 0 ;
var buffer = '' ;
var seenAt = false ;
var seenBracket = false ;
var seenPasswordToken = false ;
var codePoints , char , bufferCodePoints , failure ;
if ( ! stateOverride ) {
url . scheme = '' ;
url . username = '' ;
url . password = '' ;
url . host = null ;
url . port = null ;
url . path = [ ] ;
url . query = null ;
url . fragment = null ;
url . cannotBeABaseURL = false ;
input = input . replace ( LEADING _AND _TRAILING _C0 _CONTROL _OR _SPACE , '' ) ;
}
input = input . replace ( TAB _AND _NEW _LINE , '' ) ;
codePoints = arrayFrom ( input ) ;
while ( pointer <= codePoints . length ) {
char = codePoints [ pointer ] ;
switch ( state ) {
case SCHEME _START :
if ( char && ALPHA . test ( char ) ) {
buffer += char . toLowerCase ( ) ;
state = SCHEME ;
} else if ( ! stateOverride ) {
state = NO _SCHEME ;
continue ;
} else return INVALID _SCHEME ;
break ;
case SCHEME :
if ( char && ( ALPHANUMERIC . test ( char ) || char == '+' || char == '-' || char == '.' ) ) {
buffer += char . toLowerCase ( ) ;
} else if ( char == ':' ) {
if ( stateOverride && (
( isSpecial ( url ) != has ( specialSchemes , buffer ) ) ||
( buffer == 'file' && ( includesCredentials ( url ) || url . port !== null ) ) ||
( url . scheme == 'file' && ! url . host )
) ) return ;
url . scheme = buffer ;
if ( stateOverride ) {
if ( isSpecial ( url ) && specialSchemes [ url . scheme ] == url . port ) url . port = null ;
return ;
}
buffer = '' ;
if ( url . scheme == 'file' ) {
state = FILE ;
} else if ( isSpecial ( url ) && base && base . scheme == url . scheme ) {
state = SPECIAL _RELATIVE _OR _AUTHORITY ;
} else if ( isSpecial ( url ) ) {
state = SPECIAL _AUTHORITY _SLASHES ;
} else if ( codePoints [ pointer + 1 ] == '/' ) {
state = PATH _OR _AUTHORITY ;
pointer ++ ;
} else {
url . cannotBeABaseURL = true ;
url . path . push ( '' ) ;
state = CANNOT _BE _A _BASE _URL _PATH ;
}
} else if ( ! stateOverride ) {
buffer = '' ;
state = NO _SCHEME ;
pointer = 0 ;
continue ;
} else return INVALID _SCHEME ;
break ;
case NO _SCHEME :
if ( ! base || ( base . cannotBeABaseURL && char != '#' ) ) return INVALID _SCHEME ;
if ( base . cannotBeABaseURL && char == '#' ) {
url . scheme = base . scheme ;
url . path = base . path . slice ( ) ;
url . query = base . query ;
url . fragment = '' ;
url . cannotBeABaseURL = true ;
state = FRAGMENT ;
break ;
}
state = base . scheme == 'file' ? FILE : RELATIVE ;
continue ;
case SPECIAL _RELATIVE _OR _AUTHORITY :
if ( char == '/' && codePoints [ pointer + 1 ] == '/' ) {
state = SPECIAL _AUTHORITY _IGNORE _SLASHES ;
pointer ++ ;
} else {
state = RELATIVE ;
continue ;
} break ;
case PATH _OR _AUTHORITY :
if ( char == '/' ) {
state = AUTHORITY ;
break ;
} else {
state = PATH ;
continue ;
}
case RELATIVE :
url . scheme = base . scheme ;
if ( char == EOF ) {
url . username = base . username ;
url . password = base . password ;
url . host = base . host ;
url . port = base . port ;
url . path = base . path . slice ( ) ;
url . query = base . query ;
} else if ( char == '/' || ( char == '\\' && isSpecial ( url ) ) ) {
state = RELATIVE _SLASH ;
} else if ( char == '?' ) {
url . username = base . username ;
url . password = base . password ;
url . host = base . host ;
url . port = base . port ;
url . path = base . path . slice ( ) ;
url . query = '' ;
state = QUERY ;
} else if ( char == '#' ) {
url . username = base . username ;
url . password = base . password ;
url . host = base . host ;
url . port = base . port ;
url . path = base . path . slice ( ) ;
url . query = base . query ;
url . fragment = '' ;
state = FRAGMENT ;
} else {
url . username = base . username ;
url . password = base . password ;
url . host = base . host ;
url . port = base . port ;
url . path = base . path . slice ( ) ;
url . path . pop ( ) ;
state = PATH ;
continue ;
} break ;
case RELATIVE _SLASH :
if ( isSpecial ( url ) && ( char == '/' || char == '\\' ) ) {
state = SPECIAL _AUTHORITY _IGNORE _SLASHES ;
} else if ( char == '/' ) {
state = AUTHORITY ;
} else {
url . username = base . username ;
url . password = base . password ;
url . host = base . host ;
url . port = base . port ;
state = PATH ;
continue ;
} break ;
case SPECIAL _AUTHORITY _SLASHES :
state = SPECIAL _AUTHORITY _IGNORE _SLASHES ;
if ( char != '/' || buffer . charAt ( pointer + 1 ) != '/' ) continue ;
pointer ++ ;
break ;
case SPECIAL _AUTHORITY _IGNORE _SLASHES :
if ( char != '/' && char != '\\' ) {
state = AUTHORITY ;
continue ;
} break ;
case AUTHORITY :
if ( char == '@' ) {
if ( seenAt ) buffer = '%40' + buffer ;
seenAt = true ;
bufferCodePoints = arrayFrom ( buffer ) ;
for ( var i = 0 ; i < bufferCodePoints . length ; i ++ ) {
var codePoint = bufferCodePoints [ i ] ;
if ( codePoint == ':' && ! seenPasswordToken ) {
seenPasswordToken = true ;
continue ;
}
var encodedCodePoints = percentEncode ( codePoint , userinfoPercentEncodeSet ) ;
if ( seenPasswordToken ) url . password += encodedCodePoints ;
else url . username += encodedCodePoints ;
}
buffer = '' ;
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
( char == '\\' && isSpecial ( url ) )
) {
if ( seenAt && buffer == '' ) return INVALID _AUTHORITY ;
pointer -= arrayFrom ( buffer ) . length + 1 ;
buffer = '' ;
state = HOST ;
} else buffer += char ;
break ;
case HOST :
case HOSTNAME :
if ( stateOverride && url . scheme == 'file' ) {
state = FILE _HOST ;
continue ;
} else if ( char == ':' && ! seenBracket ) {
if ( buffer == '' ) return INVALID _HOST ;
failure = parseHost ( url , buffer ) ;
if ( failure ) return failure ;
buffer = '' ;
state = PORT ;
if ( stateOverride == HOSTNAME ) return ;
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
( char == '\\' && isSpecial ( url ) )
) {
if ( isSpecial ( url ) && buffer == '' ) return INVALID _HOST ;
if ( stateOverride && buffer == '' && ( includesCredentials ( url ) || url . port !== null ) ) return ;
failure = parseHost ( url , buffer ) ;
if ( failure ) return failure ;
buffer = '' ;
state = PATH _START ;
if ( stateOverride ) return ;
continue ;
} else {
if ( char == '[' ) seenBracket = true ;
else if ( char == ']' ) seenBracket = false ;
buffer += char ;
} break ;
case PORT :
if ( DIGIT . test ( char ) ) {
buffer += char ;
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
( char == '\\' && isSpecial ( url ) ) ||
stateOverride
) {
if ( buffer != '' ) {
var port = parseInt ( buffer , 10 ) ;
if ( port > 0xFFFF ) return INVALID _PORT ;
url . port = ( isSpecial ( url ) && port === specialSchemes [ url . scheme ] ) ? null : port ;
buffer = '' ;
}
if ( stateOverride ) return ;
state = PATH _START ;
continue ;
} else return INVALID _PORT ;
break ;
case FILE :
url . scheme = 'file' ;
if ( char == '/' || char == '\\' ) state = FILE _SLASH ;
else if ( base && base . scheme == 'file' ) {
if ( char == EOF ) {
url . host = base . host ;
url . path = base . path . slice ( ) ;
url . query = base . query ;
} else if ( char == '?' ) {
url . host = base . host ;
url . path = base . path . slice ( ) ;
url . query = '' ;
state = QUERY ;
} else if ( char == '#' ) {
url . host = base . host ;
url . path = base . path . slice ( ) ;
url . query = base . query ;
url . fragment = '' ;
state = FRAGMENT ;
} else {
if ( ! startsWithWindowsDriveLetter ( codePoints . slice ( pointer ) . join ( '' ) ) ) {
url . host = base . host ;
url . path = base . path . slice ( ) ;
shortenURLsPath ( url ) ;
}
state = PATH ;
continue ;
}
} else {
state = PATH ;
continue ;
} break ;
case FILE _SLASH :
if ( char == '/' || char == '\\' ) {
state = FILE _HOST ;
break ;
}
if ( base && base . scheme == 'file' && ! startsWithWindowsDriveLetter ( codePoints . slice ( pointer ) . join ( '' ) ) ) {
if ( isWindowsDriveLetter ( base . path [ 0 ] , true ) ) url . path . push ( base . path [ 0 ] ) ;
else url . host = base . host ;
}
state = PATH ;
continue ;
case FILE _HOST :
if ( char == EOF || char == '/' || char == '\\' || char == '?' || char == '#' ) {
if ( ! stateOverride && isWindowsDriveLetter ( buffer ) ) {
state = PATH ;
} else if ( buffer == '' ) {
url . host = '' ;
if ( stateOverride ) return ;
state = PATH _START ;
} else {
failure = parseHost ( url , buffer ) ;
if ( failure ) return failure ;
if ( url . host == 'localhost' ) url . host = '' ;
if ( stateOverride ) return ;
buffer = '' ;
state = PATH _START ;
} continue ;
} else buffer += char ;
break ;
case PATH _START :
if ( isSpecial ( url ) ) {
state = PATH ;
if ( char != '/' && char != '\\' ) continue ;
} else if ( ! stateOverride && char == '?' ) {
url . query = '' ;
state = QUERY ;
} else if ( ! stateOverride && char == '#' ) {
url . fragment = '' ;
state = FRAGMENT ;
} else if ( char != EOF ) {
state = PATH ;
if ( char != '/' ) continue ;
} break ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
case PATH :
if (
char == EOF || char == '/' ||
( char == '\\' && isSpecial ( url ) ) ||
( ! stateOverride && ( char == '?' || char == '#' ) )
) {
if ( isDoubleDot ( buffer ) ) {
shortenURLsPath ( url ) ;
if ( char != '/' && ! ( char == '\\' && isSpecial ( url ) ) ) {
url . path . push ( '' ) ;
}
} else if ( isSingleDot ( buffer ) ) {
if ( char != '/' && ! ( char == '\\' && isSpecial ( url ) ) ) {
url . path . push ( '' ) ;
}
} else {
if ( url . scheme == 'file' && ! url . path . length && isWindowsDriveLetter ( buffer ) ) {
if ( url . host ) url . host = '' ;
buffer = buffer . charAt ( 0 ) + ':' ; // normalize windows drive letter
}
url . path . push ( buffer ) ;
}
buffer = '' ;
if ( url . scheme == 'file' && ( char == EOF || char == '?' || char == '#' ) ) {
while ( url . path . length > 1 && url . path [ 0 ] === '' ) {
url . path . shift ( ) ;
}
}
if ( char == '?' ) {
url . query = '' ;
state = QUERY ;
} else if ( char == '#' ) {
url . fragment = '' ;
state = FRAGMENT ;
}
} else {
buffer += percentEncode ( char , pathPercentEncodeSet ) ;
} break ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
case CANNOT _BE _A _BASE _URL _PATH :
if ( char == '?' ) {
url . query = '' ;
state = QUERY ;
} else if ( char == '#' ) {
url . fragment = '' ;
state = FRAGMENT ;
} else if ( char != EOF ) {
url . path [ 0 ] += percentEncode ( char , C0ControlPercentEncodeSet ) ;
} break ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
case QUERY :
if ( ! stateOverride && char == '#' ) {
url . fragment = '' ;
state = FRAGMENT ;
} else if ( char != EOF ) {
if ( char == "'" && isSpecial ( url ) ) url . query += '%27' ;
else if ( char == '#' ) url . query += '%23' ;
else url . query += percentEncode ( char , C0ControlPercentEncodeSet ) ;
} break ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
case FRAGMENT :
if ( char != EOF ) url . fragment += percentEncode ( char , fragmentPercentEncodeSet ) ;
break ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
pointer ++ ;
2021-02-10 07:13:13 +00:00
}
} ;
2021-03-20 20:39:14 +00:00
// `URL` constructor
// https://url.spec.whatwg.org/#url-class
var URLConstructor = function URL ( url /* , base */ ) {
var that = anInstance ( this , URLConstructor , 'URL' ) ;
var base = arguments . length > 1 ? arguments [ 1 ] : undefined ;
var urlString = String ( url ) ;
var state = setInternalState ( that , { type : 'URL' } ) ;
var baseState , failure ;
if ( base !== undefined ) {
if ( base instanceof URLConstructor ) baseState = getInternalURLState ( base ) ;
else {
failure = parseURL ( baseState = { } , String ( base ) ) ;
if ( failure ) throw TypeError ( failure ) ;
}
}
failure = parseURL ( state , urlString , null , baseState ) ;
if ( failure ) throw TypeError ( failure ) ;
var searchParams = state . searchParams = new URLSearchParams ( ) ;
var searchParamsState = getInternalSearchParamsState ( searchParams ) ;
searchParamsState . updateSearchParams ( state . query ) ;
searchParamsState . updateURL = function ( ) {
state . query = String ( searchParams ) || null ;
} ;
if ( ! DESCRIPTORS ) {
that . href = serializeURL . call ( that ) ;
that . origin = getOrigin . call ( that ) ;
that . protocol = getProtocol . call ( that ) ;
that . username = getUsername . call ( that ) ;
that . password = getPassword . call ( that ) ;
that . host = getHost . call ( that ) ;
that . hostname = getHostname . call ( that ) ;
that . port = getPort . call ( that ) ;
that . pathname = getPathname . call ( that ) ;
that . search = getSearch . call ( that ) ;
that . searchParams = getSearchParams . call ( that ) ;
that . hash = getHash . call ( that ) ;
2021-02-10 07:13:13 +00:00
}
} ;
2021-03-20 20:39:14 +00:00
var URLPrototype = URLConstructor . prototype ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var serializeURL = function ( ) {
var url = getInternalURLState ( this ) ;
var scheme = url . scheme ;
var username = url . username ;
var password = url . password ;
var host = url . host ;
var port = url . port ;
var path = url . path ;
var query = url . query ;
var fragment = url . fragment ;
var output = scheme + ':' ;
if ( host !== null ) {
output += '//' ;
if ( includesCredentials ( url ) ) {
output += username + ( password ? ':' + password : '' ) + '@' ;
}
output += serializeHost ( host ) ;
if ( port !== null ) output += ':' + port ;
} else if ( scheme == 'file' ) output += '//' ;
output += url . cannotBeABaseURL ? path [ 0 ] : path . length ? '/' + path . join ( '/' ) : '' ;
if ( query !== null ) output += '?' + query ;
if ( fragment !== null ) output += '#' + fragment ;
return output ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var getOrigin = function ( ) {
var url = getInternalURLState ( this ) ;
var scheme = url . scheme ;
var port = url . port ;
if ( scheme == 'blob' ) try {
return new URL ( scheme . path [ 0 ] ) . origin ;
2021-02-10 07:13:13 +00:00
} catch ( error ) {
2021-03-20 20:39:14 +00:00
return 'null' ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
if ( scheme == 'file' || ! isSpecial ( url ) ) return 'null' ;
return scheme + '://' + serializeHost ( url . host ) + ( port !== null ? ':' + port : '' ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var getProtocol = function ( ) {
return getInternalURLState ( this ) . scheme + ':' ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var getUsername = function ( ) {
return getInternalURLState ( this ) . username ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var getPassword = function ( ) {
return getInternalURLState ( this ) . password ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var getHost = function ( ) {
var url = getInternalURLState ( this ) ;
var host = url . host ;
var port = url . port ;
return host === null ? ''
: port === null ? serializeHost ( host )
: serializeHost ( host ) + ':' + port ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var getHostname = function ( ) {
var host = getInternalURLState ( this ) . host ;
return host === null ? '' : serializeHost ( host ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var getPort = function ( ) {
var port = getInternalURLState ( this ) . port ;
return port === null ? '' : String ( port ) ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var getPathname = function ( ) {
var url = getInternalURLState ( this ) ;
var path = url . path ;
return url . cannotBeABaseURL ? path [ 0 ] : path . length ? '/' + path . join ( '/' ) : '' ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getSearch = function ( ) {
var query = getInternalURLState ( this ) . query ;
return query ? '?' + query : '' ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getSearchParams = function ( ) {
return getInternalURLState ( this ) . searchParams ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var getHash = function ( ) {
var fragment = getInternalURLState ( this ) . fragment ;
return fragment ? '#' + fragment : '' ;
2021-02-10 07:13:13 +00:00
} ;
2021-03-20 20:39:14 +00:00
var accessorDescriptor = function ( getter , setter ) {
return { get : getter , set : setter , configurable : true , enumerable : true } ;
} ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( DESCRIPTORS ) {
defineProperties ( URLPrototype , {
// `URL.prototype.href` accessors pair
// https://url.spec.whatwg.org/#dom-url-href
href : accessorDescriptor ( serializeURL , function ( href ) {
var url = getInternalURLState ( this ) ;
var urlString = String ( href ) ;
var failure = parseURL ( url , urlString ) ;
if ( failure ) throw TypeError ( failure ) ;
getInternalSearchParamsState ( url . searchParams ) . updateSearchParams ( url . query ) ;
} ) ,
// `URL.prototype.origin` getter
// https://url.spec.whatwg.org/#dom-url-origin
origin : accessorDescriptor ( getOrigin ) ,
// `URL.prototype.protocol` accessors pair
// https://url.spec.whatwg.org/#dom-url-protocol
protocol : accessorDescriptor ( getProtocol , function ( protocol ) {
var url = getInternalURLState ( this ) ;
parseURL ( url , String ( protocol ) + ':' , SCHEME _START ) ;
} ) ,
// `URL.prototype.username` accessors pair
// https://url.spec.whatwg.org/#dom-url-username
username : accessorDescriptor ( getUsername , function ( username ) {
var url = getInternalURLState ( this ) ;
var codePoints = arrayFrom ( String ( username ) ) ;
if ( cannotHaveUsernamePasswordPort ( url ) ) return ;
url . username = '' ;
for ( var i = 0 ; i < codePoints . length ; i ++ ) {
url . username += percentEncode ( codePoints [ i ] , userinfoPercentEncodeSet ) ;
}
} ) ,
// `URL.prototype.password` accessors pair
// https://url.spec.whatwg.org/#dom-url-password
password : accessorDescriptor ( getPassword , function ( password ) {
var url = getInternalURLState ( this ) ;
var codePoints = arrayFrom ( String ( password ) ) ;
if ( cannotHaveUsernamePasswordPort ( url ) ) return ;
url . password = '' ;
for ( var i = 0 ; i < codePoints . length ; i ++ ) {
url . password += percentEncode ( codePoints [ i ] , userinfoPercentEncodeSet ) ;
}
} ) ,
// `URL.prototype.host` accessors pair
// https://url.spec.whatwg.org/#dom-url-host
host : accessorDescriptor ( getHost , function ( host ) {
var url = getInternalURLState ( this ) ;
if ( url . cannotBeABaseURL ) return ;
parseURL ( url , String ( host ) , HOST ) ;
} ) ,
// `URL.prototype.hostname` accessors pair
// https://url.spec.whatwg.org/#dom-url-hostname
hostname : accessorDescriptor ( getHostname , function ( hostname ) {
var url = getInternalURLState ( this ) ;
if ( url . cannotBeABaseURL ) return ;
parseURL ( url , String ( hostname ) , HOSTNAME ) ;
} ) ,
// `URL.prototype.port` accessors pair
// https://url.spec.whatwg.org/#dom-url-port
port : accessorDescriptor ( getPort , function ( port ) {
var url = getInternalURLState ( this ) ;
if ( cannotHaveUsernamePasswordPort ( url ) ) return ;
port = String ( port ) ;
if ( port == '' ) url . port = null ;
else parseURL ( url , port , PORT ) ;
} ) ,
// `URL.prototype.pathname` accessors pair
// https://url.spec.whatwg.org/#dom-url-pathname
pathname : accessorDescriptor ( getPathname , function ( pathname ) {
var url = getInternalURLState ( this ) ;
if ( url . cannotBeABaseURL ) return ;
url . path = [ ] ;
parseURL ( url , pathname + '' , PATH _START ) ;
} ) ,
// `URL.prototype.search` accessors pair
// https://url.spec.whatwg.org/#dom-url-search
search : accessorDescriptor ( getSearch , function ( search ) {
var url = getInternalURLState ( this ) ;
search = String ( search ) ;
if ( search == '' ) {
url . query = null ;
} else {
if ( '?' == search . charAt ( 0 ) ) search = search . slice ( 1 ) ;
url . query = '' ;
parseURL ( url , search , QUERY ) ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
getInternalSearchParamsState ( url . searchParams ) . updateSearchParams ( url . query ) ;
} ) ,
// `URL.prototype.searchParams` getter
// https://url.spec.whatwg.org/#dom-url-searchparams
searchParams : accessorDescriptor ( getSearchParams ) ,
// `URL.prototype.hash` accessors pair
// https://url.spec.whatwg.org/#dom-url-hash
hash : accessorDescriptor ( getHash , function ( hash ) {
var url = getInternalURLState ( this ) ;
hash = String ( hash ) ;
if ( hash == '' ) {
url . fragment = null ;
return ;
2021-02-10 07:13:13 +00:00
}
2021-03-20 20:39:14 +00:00
if ( '#' == hash . charAt ( 0 ) ) hash = hash . slice ( 1 ) ;
url . fragment = '' ;
parseURL ( url , hash , FRAGMENT ) ;
} )
} ) ;
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
redefine ( URLPrototype , 'toJSON' , function toJSON ( ) {
return serializeURL . call ( this ) ;
2021-02-10 07:13:13 +00:00
} , { enumerable : true } ) ;
2021-03-20 20:39:14 +00:00
// `URL.prototype.toString` method
// https://url.spec.whatwg.org/#URL-stringification-behavior
redefine ( URLPrototype , 'toString' , function toString ( ) {
return serializeURL . call ( this ) ;
} , { enumerable : true } ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
if ( NativeURL ) {
var nativeCreateObjectURL = NativeURL . createObjectURL ;
var nativeRevokeObjectURL = NativeURL . revokeObjectURL ;
// `URL.createObjectURL` method
// https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
// eslint-disable-next-line no-unused-vars -- required for `.length`
if ( nativeCreateObjectURL ) redefine ( URLConstructor , 'createObjectURL' , function createObjectURL ( blob ) {
return nativeCreateObjectURL . apply ( NativeURL , arguments ) ;
} ) ;
// `URL.revokeObjectURL` method
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
// eslint-disable-next-line no-unused-vars -- required for `.length`
if ( nativeRevokeObjectURL ) redefine ( URLConstructor , 'revokeObjectURL' , function revokeObjectURL ( url ) {
return nativeRevokeObjectURL . apply ( NativeURL , arguments ) ;
2021-02-10 07:13:13 +00:00
} ) ;
}
2021-03-20 20:39:14 +00:00
setToStringTag ( URLConstructor , 'URL' ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
$ ( { global : true , forced : ! USE _NATIVE _URL , sham : ! DESCRIPTORS } , {
URL : URLConstructor
} ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/***/ } )
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
/******/ } ) ;
/************************************************************************/
/******/ // The module cache
/******/ var _ _webpack _module _cache _ _ = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/ // Check if module is in cache
/******/ if ( _ _webpack _module _cache _ _ [ moduleId ] ) {
/******/ return _ _webpack _module _cache _ _ [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = _ _webpack _module _cache _ _ [ moduleId ] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ _ _webpack _modules _ _ [ moduleId ] ( module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ ! function ( ) {
/******/ // define getter functions for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , definition ) {
/******/ for ( var key in definition ) {
/******/ if ( _ _webpack _require _ _ . o ( definition , key ) && ! _ _webpack _require _ _ . o ( exports , key ) ) {
/******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
/******/ }
/******/ }
/******/ } ;
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/global */
/******/ ! function ( ) {
/******/ _ _webpack _require _ _ . g = ( function ( ) {
/******/ if ( typeof globalThis === 'object' ) return globalThis ;
/******/ try {
/******/ return this || new Function ( 'return this' ) ( ) ;
/******/ } catch ( e ) {
/******/ if ( typeof window === 'object' ) return window ;
/******/ }
/******/ } ) ( ) ;
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ ! function ( ) {
/******/ _ _webpack _require _ _ . o = function ( obj , prop ) { return Object . prototype . hasOwnProperty . call ( obj , prop ) ; }
/******/ } ( ) ;
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ ! function ( ) {
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/ } ( ) ;
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
! function ( ) {
2020-07-24 12:56:45 +00:00
"use strict" ;
2021-02-10 07:13:13 +00:00
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
// EXPORTS
2021-03-20 20:39:14 +00:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
"Dropzone" : function ( ) { return /* reexport */ Dropzone ; } ,
"default" : function ( ) { return /* binding */ dropzone _dist ; }
} ) ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
2021-03-20 20:39:14 +00:00
var es _array _concat = _ _webpack _require _ _ ( 2222 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
2021-03-20 20:39:14 +00:00
var es _array _filter = _ _webpack _require _ _ ( 7327 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
2021-03-20 20:39:14 +00:00
var es _array _index _of = _ _webpack _require _ _ ( 2772 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
2021-03-20 20:39:14 +00:00
var es _array _iterator = _ _webpack _require _ _ ( 6992 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
2021-03-20 20:39:14 +00:00
var es _array _map = _ _webpack _require _ _ ( 1249 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
2021-03-20 20:39:14 +00:00
var es _array _slice = _ _webpack _require _ _ ( 7042 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
2021-03-20 20:39:14 +00:00
var es _array _splice = _ _webpack _require _ _ ( 561 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.constructor.js
2021-03-20 20:39:14 +00:00
var es _array _buffer _constructor = _ _webpack _require _ _ ( 8264 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
2021-03-20 20:39:14 +00:00
var es _function _name = _ _webpack _require _ _ ( 8309 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js
2021-03-20 20:39:14 +00:00
var es _object _get _prototype _of = _ _webpack _require _ _ ( 489 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
2021-03-20 20:39:14 +00:00
var es _object _to _string = _ _webpack _require _ _ ( 1539 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
2021-03-20 20:39:14 +00:00
var es _regexp _exec = _ _webpack _require _ _ ( 4916 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
2021-03-20 20:39:14 +00:00
var es _regexp _to _string = _ _webpack _require _ _ ( 9714 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
2021-03-20 20:39:14 +00:00
var es _string _iterator = _ _webpack _require _ _ ( 8783 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
2021-03-20 20:39:14 +00:00
var es _string _match = _ _webpack _require _ _ ( 4723 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
2021-03-20 20:39:14 +00:00
var es _string _replace = _ _webpack _require _ _ ( 5306 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
2021-03-20 20:39:14 +00:00
var es _string _split = _ _webpack _require _ _ ( 3123 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
2021-03-20 20:39:14 +00:00
var es _string _trim = _ _webpack _require _ _ ( 3210 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js
2021-03-20 20:39:14 +00:00
var es _typed _array _uint8 _array = _ _webpack _require _ _ ( 2472 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js
2021-03-20 20:39:14 +00:00
var es _typed _array _copy _within = _ _webpack _require _ _ ( 2990 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js
2021-03-20 20:39:14 +00:00
var es _typed _array _every = _ _webpack _require _ _ ( 8927 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js
2021-03-20 20:39:14 +00:00
var es _typed _array _fill = _ _webpack _require _ _ ( 3105 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js
2021-03-20 20:39:14 +00:00
var es _typed _array _filter = _ _webpack _require _ _ ( 5035 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js
2021-03-20 20:39:14 +00:00
var es _typed _array _find = _ _webpack _require _ _ ( 4345 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js
2021-03-20 20:39:14 +00:00
var es _typed _array _find _index = _ _webpack _require _ _ ( 7174 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js
2021-03-20 20:39:14 +00:00
var es _typed _array _for _each = _ _webpack _require _ _ ( 2846 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js
2021-03-20 20:39:14 +00:00
var es _typed _array _includes = _ _webpack _require _ _ ( 4731 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js
2021-03-20 20:39:14 +00:00
var es _typed _array _index _of = _ _webpack _require _ _ ( 7209 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js
2021-03-20 20:39:14 +00:00
var es _typed _array _iterator = _ _webpack _require _ _ ( 6319 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js
2021-03-20 20:39:14 +00:00
var es _typed _array _join = _ _webpack _require _ _ ( 8867 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js
2021-03-20 20:39:14 +00:00
var es _typed _array _last _index _of = _ _webpack _require _ _ ( 7789 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js
2021-03-20 20:39:14 +00:00
var es _typed _array _map = _ _webpack _require _ _ ( 3739 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js
2021-03-20 20:39:14 +00:00
var es _typed _array _reduce = _ _webpack _require _ _ ( 9368 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js
2021-03-20 20:39:14 +00:00
var es _typed _array _reduce _right = _ _webpack _require _ _ ( 4483 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js
2021-03-20 20:39:14 +00:00
var es _typed _array _reverse = _ _webpack _require _ _ ( 2056 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js
2021-03-20 20:39:14 +00:00
var es _typed _array _set = _ _webpack _require _ _ ( 3462 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js
2021-03-20 20:39:14 +00:00
var es _typed _array _slice = _ _webpack _require _ _ ( 678 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js
2021-03-20 20:39:14 +00:00
var es _typed _array _some = _ _webpack _require _ _ ( 7462 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js
2021-03-20 20:39:14 +00:00
var es _typed _array _sort = _ _webpack _require _ _ ( 3824 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js
2021-03-20 20:39:14 +00:00
var es _typed _array _subarray = _ _webpack _require _ _ ( 5021 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js
2021-03-20 20:39:14 +00:00
var es _typed _array _to _locale _string = _ _webpack _require _ _ ( 2974 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js
2021-03-20 20:39:14 +00:00
var es _typed _array _to _string = _ _webpack _require _ _ ( 5016 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
2021-03-20 20:39:14 +00:00
var web _dom _collections _for _each = _ _webpack _require _ _ ( 4747 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
2021-03-20 20:39:14 +00:00
var web _dom _collections _iterator = _ _webpack _require _ _ ( 3948 ) ;
2021-02-10 07:13:13 +00:00
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
2021-03-20 20:39:14 +00:00
var web _url = _ _webpack _require _ _ ( 285 ) ;
; // CONCATENATED MODULE: ./src/emitter.js
2021-02-10 07:13:13 +00:00
function _createForOfIteratorHelper ( o , allowArrayLike ) { var it ; if ( typeof Symbol === "undefined" || o [ Symbol . iterator ] == null ) { if ( Array . isArray ( o ) || ( it = _unsupportedIterableToArray ( o ) ) || allowArrayLike && o && typeof o . length === "number" ) { if ( it ) o = it ; var i = 0 ; var F = function F ( ) { } ; return { s : F , n : function n ( ) { if ( i >= o . length ) return { done : true } ; return { done : false , value : o [ i ++ ] } ; } , e : function e ( _e ) { throw _e ; } , f : F } ; } throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; } var normalCompletion = true , didErr = false , err ; return { s : function s ( ) { it = o [ Symbol . iterator ] ( ) ; } , n : function n ( ) { var step = it . next ( ) ; normalCompletion = step . done ; return step ; } , e : function e ( _e2 ) { didErr = true ; err = _e2 ; } , f : function f ( ) { try { if ( ! normalCompletion && it . return != null ) it . return ( ) ; } finally { if ( didErr ) throw err ; } } } ; }
2020-07-24 12:56:45 +00:00
function _unsupportedIterableToArray ( o , minLen ) { if ( ! o ) return ; if ( typeof o === "string" ) return _arrayLikeToArray ( o , minLen ) ; var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ; if ( n === "Object" && o . constructor ) n = o . constructor . name ; if ( n === "Map" || n === "Set" ) return Array . from ( o ) ; if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return _arrayLikeToArray ( o , minLen ) ; }
function _arrayLikeToArray ( arr , len ) { if ( len == null || len > arr . length ) len = arr . length ; for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; }
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
function _defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } }
function _createClass ( Constructor , protoProps , staticProps ) { if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) _defineProperties ( Constructor , staticProps ) ; return Constructor ; }
// The Emitter class provides the ability to call `.on()` on Dropzone to listen
// to events.
// It is strongly based on component's emitter class, and I removed the
// functionality because of the dependency hell with different frameworks.
var Emitter = /*#__PURE__*/ function ( ) {
function Emitter ( ) {
_classCallCheck ( this , Emitter ) ;
}
_createClass ( Emitter , [ {
key : "on" ,
2021-02-10 07:13:13 +00:00
value : // Add an event listener for given event
function on ( event , fn ) {
2020-07-24 12:56:45 +00:00
this . _callbacks = this . _callbacks || { } ; // Create namespace for this event
if ( ! this . _callbacks [ event ] ) {
this . _callbacks [ event ] = [ ] ;
}
this . _callbacks [ event ] . push ( fn ) ;
return this ;
}
} , {
key : "emit" ,
value : function emit ( event ) {
this . _callbacks = this . _callbacks || { } ;
var callbacks = this . _callbacks [ event ] ;
2021-03-20 20:39:14 +00:00
for ( var _len = arguments . length , args = new Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) {
args [ _key - 1 ] = arguments [ _key ] ;
}
2020-07-24 12:56:45 +00:00
2021-03-20 20:39:14 +00:00
if ( callbacks ) {
2021-02-10 07:13:13 +00:00
var _iterator = _createForOfIteratorHelper ( callbacks , true ) ,
2020-07-24 12:56:45 +00:00
_step ;
try {
for ( _iterator . s ( ) ; ! ( _step = _iterator . n ( ) ) . done ; ) {
var callback = _step . value ;
callback . apply ( this , args ) ;
}
} catch ( err ) {
_iterator . e ( err ) ;
} finally {
_iterator . f ( ) ;
}
2021-03-20 20:39:14 +00:00
} // trigger a corresponding DOM event
if ( this . element ) {
this . element . dispatchEvent ( this . makeEvent ( "dropzone:" + event , {
args : args
} ) ) ;
2020-07-24 12:56:45 +00:00
}
return this ;
2021-03-20 20:39:14 +00:00
}
} , {
key : "makeEvent" ,
value : function makeEvent ( eventName , detail ) {
var params = {
bubbles : true ,
cancelable : true ,
detail : detail
} ;
if ( typeof window . CustomEvent === "function" ) {
return new CustomEvent ( eventName , params ) ;
} else {
// IE 11 support
// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
var evt = document . createEvent ( "CustomEvent" ) ;
evt . initCustomEvent ( eventName , params . bubbles , params . cancelable , params . detail ) ;
return evt ;
}
2020-07-24 12:56:45 +00:00
} // Remove event listener for given event. If fn is not provided, all event
// listeners for that event will be removed. If neither is provided, all
// event listeners will be removed.
} , {
key : "off" ,
value : function off ( event , fn ) {
if ( ! this . _callbacks || arguments . length === 0 ) {
this . _callbacks = { } ;
return this ;
} // specific event
var callbacks = this . _callbacks [ event ] ;
if ( ! callbacks ) {
return this ;
} // remove all handlers
if ( arguments . length === 1 ) {
delete this . _callbacks [ event ] ;
return this ;
} // remove specific handler
for ( var i = 0 ; i < callbacks . length ; i ++ ) {
var callback = callbacks [ i ] ;
if ( callback === fn ) {
callbacks . splice ( i , 1 ) ;
break ;
}
}
return this ;
}
} ] ) ;
return Emitter ;
} ( ) ;
2021-03-20 20:39:14 +00:00
; // CONCATENATED MODULE: ./src/preview-template.html
// Module
var code = "<div class=\"dz-preview dz-file-preview\"> <div class=\"dz-image\"><img data-dz-thumbnail/></div> <div class=\"dz-details\"> <div class=\"dz-size\"><span data-dz-size></span></div> <div class=\"dz-filename\"><span data-dz-name></span></div> </div> <div class=\"dz-progress\"> <span class=\"dz-upload\" data-dz-uploadprogress></span> </div> <div class=\"dz-error-message\"><span data-dz-errormessage></span></div> <div class=\"dz-success-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Check</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\"></path> </g> </svg> </div> <div class=\"dz-error-mark\"> <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <title>Error</title> <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <g stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\"> <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\"></path> </g> </g> </svg> </div> </div> " ;
// Exports
/* harmony default export */ var preview _template = ( code ) ;
; // CONCATENATED MODULE: ./src/options.js
2021-02-10 07:13:13 +00:00
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function options _createForOfIteratorHelper ( o , allowArrayLike ) { var it ; if ( typeof Symbol === "undefined" || o [ Symbol . iterator ] == null ) { if ( Array . isArray ( o ) || ( it = options _unsupportedIterableToArray ( o ) ) || allowArrayLike && o && typeof o . length === "number" ) { if ( it ) o = it ; var i = 0 ; var F = function F ( ) { } ; return { s : F , n : function n ( ) { if ( i >= o . length ) return { done : true } ; return { done : false , value : o [ i ++ ] } ; } , e : function e ( _e ) { throw _e ; } , f : F } ; } throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; } var normalCompletion = true , didErr = false , err ; return { s : function s ( ) { it = o [ Symbol . iterator ] ( ) ; } , n : function n ( ) { var step = it . next ( ) ; normalCompletion = step . done ; return step ; } , e : function e ( _e2 ) { didErr = true ; err = _e2 ; } , f : function f ( ) { try { if ( ! normalCompletion && it . return != null ) it . return ( ) ; } finally { if ( didErr ) throw err ; } } } ; }
function options _unsupportedIterableToArray ( o , minLen ) { if ( ! o ) return ; if ( typeof o === "string" ) return options _arrayLikeToArray ( o , minLen ) ; var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ; if ( n === "Object" && o . constructor ) n = o . constructor . name ; if ( n === "Map" || n === "Set" ) return Array . from ( o ) ; if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return options _arrayLikeToArray ( o , minLen ) ; }
function options _arrayLikeToArray ( arr , len ) { if ( len == null || len > arr . length ) len = arr . length ; for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; }
2021-03-20 20:39:14 +00:00
2021-02-10 07:13:13 +00:00
var defaultOptions = {
/ * *
* Has to be specified on elements other than form ( or when the form
* doesn ' t have an ` action ` attribute ) . You can also
* provide a function that will be called with ` files ` and
* must return the url ( since ` v3.12.0 ` )
* /
url : null ,
/ * *
* Can be changed to ` "put" ` if necessary . You can also provide a function
* that will be called with ` files ` and must return the method ( since ` v3.12.0 ` ) .
* /
method : "post" ,
/ * *
* Will be set on the XHRequest .
* /
withCredentials : false ,
/ * *
* The timeout for the XHR requests in milliseconds ( since ` v4.4.0 ` ) .
2021-09-17 19:28:20 +00:00
* If set to null or 0 , no timeout is going to be set .
2021-02-10 07:13:13 +00:00
* /
2021-09-17 19:28:20 +00:00
timeout : null ,
2021-02-10 07:13:13 +00:00
/ * *
* How many file uploads to process in parallel ( See the
* Enqueuing file uploads documentation section for more info )
* /
parallelUploads : 2 ,
/ * *
* Whether to send multiple files in one request . If
* this it set to true , then the fallback file input element will
* have the ` multiple ` attribute as well . This option will
* also trigger additional events ( like ` processingmultiple ` ) . See the events
* documentation section for more information .
* /
uploadMultiple : false ,
/ * *
* Whether you want files to be uploaded in chunks to your server . This can ' t be
* used in combination with ` uploadMultiple ` .
*
* See [ chunksUploaded ] ( # config - chunksUploaded ) for the callback to finalise an upload .
* /
chunking : false ,
/ * *
* If ` chunking ` is enabled , this defines whether * * every * * file should be chunked ,
* even if the file size is below chunkSize . This means , that the additional chunk
* form data will be submitted and the ` chunksUploaded ` callback will be invoked .
* /
forceChunking : false ,
/ * *
* If ` chunking ` is ` true ` , then this defines the chunk size in bytes .
* /
chunkSize : 2000000 ,
/ * *
* If ` true ` , the individual chunks of a file are being uploaded simultaneously .
* /
parallelChunkUploads : false ,
/ * *
* Whether a chunk should be retried if it fails .
* /
retryChunks : false ,
/ * *
* If ` retryChunks ` is true , how many times should it be retried .
* /
retryChunksLimit : 3 ,
/ * *
* The maximum filesize ( in bytes ) that is allowed to be uploaded .
* /
maxFilesize : 256 ,
/ * *
* The name of the file param that gets transferred .
* * * NOTE * * : If you have the option ` uploadMultiple ` set to ` true ` , then
* Dropzone will append ` [] ` to the name .
* /
paramName : "file" ,
/ * *
* Whether thumbnails for images should be generated
* /
createImageThumbnails : true ,
/ * *
* In MB . When the filename exceeds this limit , the thumbnail will not be generated .
* /
maxThumbnailFilesize : 10 ,
/ * *
* If ` null ` , the ratio of the image will be used to calculate it .
* /
thumbnailWidth : 120 ,
/ * *
* The same as ` thumbnailWidth ` . If both are null , images will not be resized .
* /
thumbnailHeight : 120 ,
/ * *
* How the images should be scaled down in case both , ` thumbnailWidth ` and ` thumbnailHeight ` are provided .
* Can be either ` contain ` or ` crop ` .
* /
thumbnailMethod : "crop" ,
/ * *
* If set , images will be resized to these dimensions before being * * uploaded * * .
* If only one , ` resizeWidth ` * * or * * ` resizeHeight ` is provided , the original aspect
* ratio of the file will be preserved .
*
* The ` options.transformFile ` function uses these options , so if the ` transformFile ` function
* is overridden , these options don ' t do anything .
* /
resizeWidth : null ,
/ * *
* See ` resizeWidth ` .
* /
resizeHeight : null ,
/ * *
* The mime type of the resized image ( before it gets uploaded to the server ) .
* If ` null ` the original mime type will be used . To force jpeg , for example , use ` image/jpeg ` .
* See ` resizeWidth ` for more information .
* /
resizeMimeType : null ,
/ * *
* The quality of the resized images . See ` resizeWidth ` .
* /
resizeQuality : 0.8 ,
/ * *
* How the images should be scaled down in case both , ` resizeWidth ` and ` resizeHeight ` are provided .
* Can be either ` contain ` or ` crop ` .
* /
resizeMethod : "contain" ,
/ * *
* The base that is used to calculate the * * displayed * * filesize . You can
* change this to 1024 if you would rather display kibibytes , mebibytes ,
* etc ... 1024 is technically incorrect , because ` 1024 bytes ` are ` 1 kibibyte `
* not ` 1 kilobyte ` . You can change this to ` 1024 ` if you don ' t care about
* validity .
* /
filesizeBase : 1000 ,
/ * *
* If not ` null ` defines how many files this Dropzone handles . If it exceeds ,
* the event ` maxfilesexceeded ` will be called . The dropzone element gets the
* class ` dz-max-files-reached ` accordingly so you can provide visual
* feedback .
* /
maxFiles : null ,
/ * *
* An optional object to send additional headers to the server . Eg :
* ` { "My-Awesome-Header": "header value" } `
* /
headers : null ,
/ * *
* If ` true ` , the dropzone element itself will be clickable , if ` false `
* nothing will be clickable .
*
* You can also pass an HTML element , a CSS selector ( for multiple elements )
* or an array of those . In that case , all of those elements will trigger an
* upload when clicked .
* /
clickable : true ,
/ * *
* Whether hidden files in directories should be ignored .
* /
ignoreHiddenFiles : true ,
/ * *
* The default implementation of ` accept ` checks the file ' s mime type or
* extension against this list . This is a comma separated list of mime
* types or file extensions .
*
* Eg . : ` image/*,application/pdf,.psd `
*
* If the Dropzone is ` clickable ` this option will also be used as
* [ ` accept ` ] ( https : //developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)
* parameter on the hidden file input as well .
* /
acceptedFiles : null ,
/ * *
* * * Deprecated ! * *
* Use acceptedFiles instead .
* /
acceptedMimeTypes : null ,
/ * *
* If false , files will be added to the queue but the queue will not be
* processed automatically .
* This can be useful if you need some additional user input before sending
* files ( or if you want want all files sent at once ) .
* If you ' re ready to send the file simply call ` myDropzone.processQueue() ` .
*
* See the [ enqueuing file uploads ] ( # enqueuing - file - uploads ) documentation
* section for more information .
* /
autoProcessQueue : true ,
/ * *
* If false , files added to the dropzone will not be queued by default .
* You ' ll have to call ` enqueueFile(file) ` manually .
* /
autoQueue : true ,
/ * *
* If ` true ` , this will add a link to every file preview to remove or cancel ( if
* already uploading ) the file . The ` dictCancelUpload ` , ` dictCancelUploadConfirmation `
* and ` dictRemoveFile ` options are used for the wording .
* /
addRemoveLinks : false ,
/ * *
* Defines where to display the file previews – if ` null ` the
* Dropzone element itself is used . Can be a plain ` HTMLElement ` or a CSS
* selector . The element should have the ` dropzone-previews ` class so
* the previews are displayed properly .
* /
previewsContainer : null ,
/ * *
* Set this to ` true ` if you don ' t want previews to be shown .
* /
disablePreviews : false ,
/ * *
* This is the element the hidden input field ( which is used when clicking on the
* dropzone to trigger file selection ) will be appended to . This might
* be important in case you use frameworks to switch the content of your page .
*
* Can be a selector string , or an element directly .
* /
hiddenInputContainer : "body" ,
/ * *
* If null , no capture type will be specified
* If camera , mobile devices will skip the file selection and choose camera
* If microphone , mobile devices will skip the file selection and choose the microphone
* If camcorder , mobile devices will skip the file selection and choose the camera in video mode
* On apple devices multiple must be set to false . AcceptedFiles may need to
* be set to an appropriate mime type ( e . g . "image/*" , "audio/*" , or "video/*" ) .
* /
capture : null ,
/ * *
* * * Deprecated * * . Use ` renameFile ` instead .
* /
renameFilename : null ,
/ * *
* A function that is invoked before the file is uploaded to the server and renames the file .
* This function gets the ` File ` as argument and can use the ` file.name ` . The actual name of the
* file that gets used during the upload can be accessed through ` file.upload.filename ` .
* /
renameFile : null ,
/ * *
* If ` true ` the fallback will be forced . This is very useful to test your server
* implementations first and make sure that everything works as
* expected without dropzone if you experience problems , and to test
* how your fallbacks will look .
* /
forceFallback : false ,
/ * *
* The text used before any files are dropped .
* /
dictDefaultMessage : "Drop files here to upload" ,
/ * *
* The text that replaces the default message text it the browser is not supported .
* /
dictFallbackMessage : "Your browser does not support drag'n'drop file uploads." ,
/ * *
* The text that will be added before the fallback form .
* If you provide a fallback element yourself , or if this option is ` null ` this will
* be ignored .
* /
dictFallbackText : "Please use the fallback form below to upload your files like in the olden days." ,
/ * *
* If the filesize is too big .
* ` {{filesize}} ` and ` {{maxFilesize}} ` will be replaced with the respective configuration values .
* /
dictFileTooBig : "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB." ,
/ * *
* If the file doesn ' t match the file type .
* /
dictInvalidFileType : "You can't upload files of this type." ,
/ * *
* If the server response was invalid .
* ` {{statusCode}} ` will be replaced with the servers status code .
* /
dictResponseError : "Server responded with {{statusCode}} code." ,
/ * *
* If ` addRemoveLinks ` is true , the text to be used for the cancel upload link .
* /
dictCancelUpload : "Cancel upload" ,
/ * *
* The text that is displayed if an upload was manually canceled
* /
dictUploadCanceled : "Upload canceled." ,
/ * *
* If ` addRemoveLinks ` is true , the text to be used for confirmation when cancelling upload .
* /
dictCancelUploadConfirmation : "Are you sure you want to cancel this upload?" ,
/ * *
* If ` addRemoveLinks ` is true , the text to be used to remove a file .
* /
dictRemoveFile : "Remove file" ,
/ * *
* If this is not null , then the user will be prompted before removing a file .
* /
dictRemoveFileConfirmation : null ,
/ * *
* Displayed if ` maxFiles ` is st and exceeded .
* The string ` {{maxFiles}} ` will be replaced by the configuration value .
* /
dictMaxFilesExceeded : "You can not upload any more files." ,
/ * *
* Allows you to translate the different units . Starting with ` tb ` for terabytes and going down to
* ` b ` for bytes .
* /
dictFileSizeUnits : {
tb : "TB" ,
gb : "GB" ,
mb : "MB" ,
kb : "KB" ,
b : "b"
} ,
/ * *
* Called when dropzone initialized
* You can add event listeners here
* /
init : function init ( ) { } ,
/ * *
* Can be an * * object * * of additional parameters to transfer to the server , * * or * * a ` Function `
* that gets invoked with the ` files ` , ` xhr ` and , if it ' s a chunked upload , ` chunk ` arguments . In case
* of a function , this needs to return a map .
*
* The default implementation does nothing for normal uploads , but adds relevant information for
* chunked uploads .
*
* This is the same as adding hidden input fields in the form element .
* /
params : function params ( files , xhr , chunk ) {
if ( chunk ) {
return {
dzuuid : chunk . file . upload . uuid ,
dzchunkindex : chunk . index ,
dztotalfilesize : chunk . file . size ,
dzchunksize : this . options . chunkSize ,
dztotalchunkcount : chunk . file . upload . totalChunkCount ,
dzchunkbyteoffset : chunk . index * this . options . chunkSize
} ;
}
} ,
/ * *
* A function that gets a [ file ] ( https : //developer.mozilla.org/en-US/docs/DOM/File)
* and a ` done ` function as parameters .
*
* If the done function is invoked without arguments , the file is "accepted" and will
* be processed . If you pass an error message , the file is rejected , and the error
* message will be displayed .
* This function will not be called if the file is too big or doesn ' t match the mime types .
* /
accept : function accept ( file , done ) {
return done ( ) ;
} ,
/ * *
* The callback that will be invoked when all chunks have been uploaded for a file .
* It gets the file for which the chunks have been uploaded as the first parameter ,
* and the ` done ` function as second . ` done() ` needs to be invoked when everything
* needed to finish the upload process is done .
* /
chunksUploaded : function chunksUploaded ( file , done ) {
done ( ) ;
} ,
/ * *
* Gets called when the browser is not supported .
* The default implementation shows the fallback input field and adds
* a text .
* /
fallback : function fallback ( ) {
// This code should pass in IE7... :(
var messageElement ;
this . element . className = "" . concat ( this . element . className , " dz-browser-not-supported" ) ;
var _iterator = options _createForOfIteratorHelper ( this . element . getElementsByTagName ( "div" ) , true ) ,
_step ;
try {
for ( _iterator . s ( ) ; ! ( _step = _iterator . n ( ) ) . done ; ) {
var child = _step . value ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
if ( /(^| )dz-message($| )/ . test ( child . className ) ) {
messageElement = child ;
child . className = "dz-message" ; // Removes the 'dz-default' class
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
break ;
}
}
} catch ( err ) {
_iterator . e ( err ) ;
} finally {
_iterator . f ( ) ;
}
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
if ( ! messageElement ) {
2021-03-20 20:39:14 +00:00
messageElement = Dropzone . createElement ( '<div class="dz-message"><span></span></div>' ) ;
2021-02-10 07:13:13 +00:00
this . element . appendChild ( messageElement ) ;
}
var span = messageElement . getElementsByTagName ( "span" ) [ 0 ] ;
if ( span ) {
if ( span . textContent != null ) {
span . textContent = this . options . dictFallbackMessage ;
} else if ( span . innerText != null ) {
span . innerText = this . options . dictFallbackMessage ;
}
}
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
return this . element . appendChild ( this . getFallbackForm ( ) ) ;
} ,
/ * *
* Gets called to calculate the thumbnail dimensions .
*
* It gets ` file ` , ` width ` and ` height ` ( both may be ` null ` ) as parameters and must return an object containing :
*
* - ` srcWidth ` & ` srcHeight ` ( required )
* - ` trgWidth ` & ` trgHeight ` ( required )
* - ` srcX ` & ` srcY ` ( optional , default ` 0 ` )
* - ` trgX ` & ` trgY ` ( optional , default ` 0 ` )
*
* Those values are going to be used by ` ctx.drawImage() ` .
* /
resize : function resize ( file , width , height , resizeMethod ) {
var info = {
srcX : 0 ,
srcY : 0 ,
srcWidth : file . width ,
srcHeight : file . height
} ;
var srcRatio = file . width / file . height ; // Automatically calculate dimensions if not specified
if ( width == null && height == null ) {
width = info . srcWidth ;
height = info . srcHeight ;
} else if ( width == null ) {
width = height * srcRatio ;
} else if ( height == null ) {
height = width / srcRatio ;
} // Make sure images aren't upscaled
width = Math . min ( width , info . srcWidth ) ;
height = Math . min ( height , info . srcHeight ) ;
var trgRatio = width / height ;
if ( info . srcWidth > width || info . srcHeight > height ) {
// Image is bigger and needs rescaling
if ( resizeMethod === "crop" ) {
if ( srcRatio > trgRatio ) {
info . srcHeight = file . height ;
info . srcWidth = info . srcHeight * trgRatio ;
} else {
info . srcWidth = file . width ;
info . srcHeight = info . srcWidth / trgRatio ;
}
} else if ( resizeMethod === "contain" ) {
// Method 'contain'
if ( srcRatio > trgRatio ) {
height = width / srcRatio ;
} else {
width = height * srcRatio ;
}
} else {
throw new Error ( "Unknown resizeMethod '" . concat ( resizeMethod , "'" ) ) ;
}
}
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
info . srcX = ( file . width - info . srcWidth ) / 2 ;
info . srcY = ( file . height - info . srcHeight ) / 2 ;
info . trgWidth = width ;
info . trgHeight = height ;
return info ;
} ,
/ * *
* Can be used to transform the file ( for example , resize an image if necessary ) .
*
* The default implementation uses ` resizeWidth ` and ` resizeHeight ` ( if provided ) and resizes
* images according to those dimensions .
*
* Gets the ` file ` as the first parameter , and a ` done() ` function as the second , that needs
* to be invoked with the file when the transformation is done .
* /
transformFile : function transformFile ( file , done ) {
if ( ( this . options . resizeWidth || this . options . resizeHeight ) && file . type . match ( /image.*/ ) ) {
return this . resizeImage ( file , this . options . resizeWidth , this . options . resizeHeight , this . options . resizeMethod , done ) ;
} else {
return done ( file ) ;
}
} ,
/ * *
* A string that contains the template used for each dropped
* file . Change it to fulfill your needs but make sure to properly
* provide all elements .
*
* If you want to use an actual HTML element instead of providing a String
* as a config option , you could create a div with the id ` tpl ` ,
* put the template inside it and provide the element like this :
*
* document
* . querySelector ( '#tpl' )
* . innerHTML
*
* /
2021-03-20 20:39:14 +00:00
previewTemplate : preview _template ,
2021-02-10 07:13:13 +00:00
/ *
Those functions register themselves to the events on init and handle all
the user interface specific stuff . Overwriting them won ' t break the upload
but can break the way it ' s displayed .
You can overwrite them if you don ' t like the default behavior . If you just
want to add an additional event handler , register it on the dropzone object
and don ' t overwrite those options .
* /
// Those are self explanatory and simply concern the DragnDrop.
drop : function drop ( e ) {
return this . element . classList . remove ( "dz-drag-hover" ) ;
} ,
dragstart : function dragstart ( e ) { } ,
dragend : function dragend ( e ) {
return this . element . classList . remove ( "dz-drag-hover" ) ;
} ,
dragenter : function dragenter ( e ) {
return this . element . classList . add ( "dz-drag-hover" ) ;
} ,
dragover : function dragover ( e ) {
return this . element . classList . add ( "dz-drag-hover" ) ;
} ,
dragleave : function dragleave ( e ) {
return this . element . classList . remove ( "dz-drag-hover" ) ;
} ,
paste : function paste ( e ) { } ,
// Called whenever there are no files left in the dropzone anymore, and the
// dropzone should be displayed as if in the initial state.
reset : function reset ( ) {
return this . element . classList . remove ( "dz-started" ) ;
} ,
// Called when a file is added to the queue
// Receives `file`
addedfile : function addedfile ( file ) {
var _this = this ;
if ( this . element === this . previewsContainer ) {
this . element . classList . add ( "dz-started" ) ;
}
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
if ( this . previewsContainer && ! this . options . disablePreviews ) {
2021-03-20 20:39:14 +00:00
file . previewElement = Dropzone . createElement ( this . options . previewTemplate . trim ( ) ) ;
2021-02-10 07:13:13 +00:00
file . previewTemplate = file . previewElement ; // Backwards compatibility
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
this . previewsContainer . appendChild ( file . previewElement ) ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
var _iterator2 = options _createForOfIteratorHelper ( file . previewElement . querySelectorAll ( "[data-dz-name]" ) , true ) ,
_step2 ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
try {
for ( _iterator2 . s ( ) ; ! ( _step2 = _iterator2 . n ( ) ) . done ; ) {
var node = _step2 . value ;
node . textContent = file . name ;
}
} catch ( err ) {
_iterator2 . e ( err ) ;
} finally {
_iterator2 . f ( ) ;
}
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
var _iterator3 = options _createForOfIteratorHelper ( file . previewElement . querySelectorAll ( "[data-dz-size]" ) , true ) ,
_step3 ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
try {
for ( _iterator3 . s ( ) ; ! ( _step3 = _iterator3 . n ( ) ) . done ; ) {
node = _step3 . value ;
node . innerHTML = this . filesize ( file . size ) ;
}
} catch ( err ) {
_iterator3 . e ( err ) ;
} finally {
_iterator3 . f ( ) ;
}
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
if ( this . options . addRemoveLinks ) {
2021-03-20 20:39:14 +00:00
file . _removeLink = Dropzone . createElement ( "<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>" . concat ( this . options . dictRemoveFile , "</a>" ) ) ;
2021-02-10 07:13:13 +00:00
file . previewElement . appendChild ( file . _removeLink ) ;
}
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
var removeFileEvent = function removeFileEvent ( e ) {
e . preventDefault ( ) ;
e . stopPropagation ( ) ;
2021-03-20 20:39:14 +00:00
if ( file . status === Dropzone . UPLOADING ) {
return Dropzone . confirm ( _this . options . dictCancelUploadConfirmation , function ( ) {
2021-02-10 07:13:13 +00:00
return _this . removeFile ( file ) ;
} ) ;
} else {
if ( _this . options . dictRemoveFileConfirmation ) {
2021-03-20 20:39:14 +00:00
return Dropzone . confirm ( _this . options . dictRemoveFileConfirmation , function ( ) {
2021-02-10 07:13:13 +00:00
return _this . removeFile ( file ) ;
} ) ;
} else {
return _this . removeFile ( file ) ;
2020-07-24 12:56:45 +00:00
}
2021-02-10 07:13:13 +00:00
}
} ;
var _iterator4 = options _createForOfIteratorHelper ( file . previewElement . querySelectorAll ( "[data-dz-remove]" ) , true ) ,
_step4 ;
try {
for ( _iterator4 . s ( ) ; ! ( _step4 = _iterator4 . n ( ) ) . done ; ) {
var removeLink = _step4 . value ;
removeLink . addEventListener ( "click" , removeFileEvent ) ;
}
} catch ( err ) {
_iterator4 . e ( err ) ;
} finally {
_iterator4 . f ( ) ;
}
}
} ,
// Called whenever a file is removed.
removedfile : function removedfile ( file ) {
if ( file . previewElement != null && file . previewElement . parentNode != null ) {
file . previewElement . parentNode . removeChild ( file . previewElement ) ;
}
return this . _updateMaxFilesReachedClass ( ) ;
} ,
// Called when a thumbnail has been generated
// Receives `file` and `dataUrl`
thumbnail : function thumbnail ( file , dataUrl ) {
if ( file . previewElement ) {
file . previewElement . classList . remove ( "dz-file-preview" ) ;
var _iterator5 = options _createForOfIteratorHelper ( file . previewElement . querySelectorAll ( "[data-dz-thumbnail]" ) , true ) ,
_step5 ;
try {
for ( _iterator5 . s ( ) ; ! ( _step5 = _iterator5 . n ( ) ) . done ; ) {
var thumbnailElement = _step5 . value ;
thumbnailElement . alt = file . name ;
thumbnailElement . src = dataUrl ;
}
} catch ( err ) {
_iterator5 . e ( err ) ;
} finally {
_iterator5 . f ( ) ;
}
return setTimeout ( function ( ) {
return file . previewElement . classList . add ( "dz-image-preview" ) ;
} , 1 ) ;
}
} ,
// Called whenever an error occurs
// Receives `file` and `message`
error : function error ( file , message ) {
if ( file . previewElement ) {
file . previewElement . classList . add ( "dz-error" ) ;
if ( typeof message !== "string" && message . error ) {
message = message . error ;
}
var _iterator6 = options _createForOfIteratorHelper ( file . previewElement . querySelectorAll ( "[data-dz-errormessage]" ) , true ) ,
_step6 ;
try {
for ( _iterator6 . s ( ) ; ! ( _step6 = _iterator6 . n ( ) ) . done ; ) {
var node = _step6 . value ;
node . textContent = message ;
}
} catch ( err ) {
_iterator6 . e ( err ) ;
} finally {
_iterator6 . f ( ) ;
}
}
} ,
errormultiple : function errormultiple ( ) { } ,
// Called when a file gets processed. Since there is a cue, not all added
// files are processed immediately.
// Receives `file`
processing : function processing ( file ) {
if ( file . previewElement ) {
file . previewElement . classList . add ( "dz-processing" ) ;
if ( file . _removeLink ) {
return file . _removeLink . innerHTML = this . options . dictCancelUpload ;
}
}
} ,
processingmultiple : function processingmultiple ( ) { } ,
// Called whenever the upload progress gets updated.
// Receives `file`, `progress` (percentage 0-100) and `bytesSent`.
// To get the total number of bytes of the file, use `file.size`
uploadprogress : function uploadprogress ( file , progress , bytesSent ) {
if ( file . previewElement ) {
var _iterator7 = options _createForOfIteratorHelper ( file . previewElement . querySelectorAll ( "[data-dz-uploadprogress]" ) , true ) ,
_step7 ;
try {
for ( _iterator7 . s ( ) ; ! ( _step7 = _iterator7 . n ( ) ) . done ; ) {
var node = _step7 . value ;
node . nodeName === "PROGRESS" ? node . value = progress : node . style . width = "" . concat ( progress , "%" ) ;
}
} catch ( err ) {
_iterator7 . e ( err ) ;
} finally {
_iterator7 . f ( ) ;
}
}
} ,
// Called whenever the total upload progress gets updated.
// Called with totalUploadProgress (0-100), totalBytes and totalBytesSent
totaluploadprogress : function totaluploadprogress ( ) { } ,
// Called just before the file is sent. Gets the `xhr` object as second
// parameter, so you can modify it (for example to add a CSRF token) and a
// `formData` object to add additional information.
sending : function sending ( ) { } ,
sendingmultiple : function sendingmultiple ( ) { } ,
// When the complete upload is finished and successful
// Receives `file`
success : function success ( file ) {
if ( file . previewElement ) {
return file . previewElement . classList . add ( "dz-success" ) ;
}
} ,
successmultiple : function successmultiple ( ) { } ,
// When the upload is canceled.
canceled : function canceled ( file ) {
return this . emit ( "error" , file , this . options . dictUploadCanceled ) ;
} ,
canceledmultiple : function canceledmultiple ( ) { } ,
// When the upload is finished, either with success or an error.
// Receives `file`
complete : function complete ( file ) {
if ( file . _removeLink ) {
file . _removeLink . innerHTML = this . options . dictRemoveFile ;
}
if ( file . previewElement ) {
return file . previewElement . classList . add ( "dz-complete" ) ;
}
} ,
completemultiple : function completemultiple ( ) { } ,
maxfilesexceeded : function maxfilesexceeded ( ) { } ,
maxfilesreached : function maxfilesreached ( ) { } ,
queuecomplete : function queuecomplete ( ) { } ,
addedfiles : function addedfiles ( ) { }
} ;
/* harmony default export */ var src _options = ( defaultOptions ) ;
2021-03-20 20:39:14 +00:00
; // CONCATENATED MODULE: ./src/dropzone.js
2021-02-10 07:13:13 +00:00
function _typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function dropzone _createForOfIteratorHelper ( o , allowArrayLike ) { var it ; if ( typeof Symbol === "undefined" || o [ Symbol . iterator ] == null ) { if ( Array . isArray ( o ) || ( it = dropzone _unsupportedIterableToArray ( o ) ) || allowArrayLike && o && typeof o . length === "number" ) { if ( it ) o = it ; var i = 0 ; var F = function F ( ) { } ; return { s : F , n : function n ( ) { if ( i >= o . length ) return { done : true } ; return { done : false , value : o [ i ++ ] } ; } , e : function e ( _e ) { throw _e ; } , f : F } ; } throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; } var normalCompletion = true , didErr = false , err ; return { s : function s ( ) { it = o [ Symbol . iterator ] ( ) ; } , n : function n ( ) { var step = it . next ( ) ; normalCompletion = step . done ; return step ; } , e : function e ( _e2 ) { didErr = true ; err = _e2 ; } , f : function f ( ) { try { if ( ! normalCompletion && it . return != null ) it . return ( ) ; } finally { if ( didErr ) throw err ; } } } ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function dropzone _unsupportedIterableToArray ( o , minLen ) { if ( ! o ) return ; if ( typeof o === "string" ) return dropzone _arrayLikeToArray ( o , minLen ) ; var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ; if ( n === "Object" && o . constructor ) n = o . constructor . name ; if ( n === "Map" || n === "Set" ) return Array . from ( o ) ; if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return dropzone _arrayLikeToArray ( o , minLen ) ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function dropzone _arrayLikeToArray ( arr , len ) { if ( len == null || len > arr . length ) len = arr . length ; for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function dropzone _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function dropzone _defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function dropzone _createClass ( Constructor , protoProps , staticProps ) { if ( protoProps ) dropzone _defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) dropzone _defineProperties ( Constructor , staticProps ) ; return Constructor ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function" ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , writable : true , configurable : true } } ) ; if ( superClass ) _setPrototypeOf ( subClass , superClass ) ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function _setPrototypeOf ( o , p ) { _setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) { o . _ _proto _ _ = p ; return o ; } ; return _setPrototypeOf ( o , p ) ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function _createSuper ( Derived ) { var hasNativeReflectConstruct = _isNativeReflectConstruct ( ) ; return function _createSuperInternal ( ) { var Super = _getPrototypeOf ( Derived ) , result ; if ( hasNativeReflectConstruct ) { var NewTarget = _getPrototypeOf ( this ) . constructor ; result = Reflect . construct ( Super , arguments , NewTarget ) ; } else { result = Super . apply ( this , arguments ) ; } return _possibleConstructorReturn ( this , result ) ; } ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function _possibleConstructorReturn ( self , call ) { if ( call && ( _typeof ( call ) === "object" || typeof call === "function" ) ) { return call ; } return _assertThisInitialized ( self ) ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function _assertThisInitialized ( self ) { if ( self === void 0 ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return self ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function _isNativeReflectConstruct ( ) { if ( typeof Reflect === "undefined" || ! Reflect . construct ) return false ; if ( Reflect . construct . sham ) return false ; if ( typeof Proxy === "function" ) return true ; try { Date . prototype . toString . call ( Reflect . construct ( Date , [ ] , function ( ) { } ) ) ; return true ; } catch ( e ) { return false ; } }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
function _getPrototypeOf ( o ) { _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) { return o . _ _proto _ _ || Object . getPrototypeOf ( o ) ; } ; return _getPrototypeOf ( o ) ; }
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
var Dropzone = /*#__PURE__*/ function ( _Emitter ) {
2021-02-10 07:13:13 +00:00
_inherits ( Dropzone , _Emitter ) ;
var _super = _createSuper ( Dropzone ) ;
2020-07-24 12:56:45 +00:00
function Dropzone ( el , options ) {
var _this ;
2021-02-10 07:13:13 +00:00
dropzone _classCallCheck ( this , Dropzone ) ;
2020-07-24 12:56:45 +00:00
_this = _super . call ( this ) ;
var fallback , left ;
_this . element = el ; // For backwards compatibility since the version was in the prototype previously
_this . version = Dropzone . version ;
_this . clickableElements = [ ] ;
_this . listeners = [ ] ;
_this . files = [ ] ; // All files
if ( typeof _this . element === "string" ) {
_this . element = document . querySelector ( _this . element ) ;
} // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.
if ( ! _this . element || _this . element . nodeType == null ) {
throw new Error ( "Invalid dropzone element." ) ;
}
if ( _this . element . dropzone ) {
throw new Error ( "Dropzone already attached." ) ;
} // Now add this dropzone to the instances.
Dropzone . instances . push ( _assertThisInitialized ( _this ) ) ; // Put the dropzone inside the element itself.
_this . element . dropzone = _assertThisInitialized ( _this ) ;
var elementOptions = ( left = Dropzone . optionsForElement ( _this . element ) ) != null ? left : { } ;
2021-02-10 07:13:13 +00:00
_this . options = Dropzone . extend ( { } , src _options , elementOptions , options != null ? options : { } ) ;
_this . options . previewTemplate = _this . options . previewTemplate . replace ( /\n*/g , "" ) ; // If the browser failed, just call the fallback and leave
2020-07-24 12:56:45 +00:00
if ( _this . options . forceFallback || ! Dropzone . isBrowserSupported ( ) ) {
return _possibleConstructorReturn ( _this , _this . options . fallback . call ( _assertThisInitialized ( _this ) ) ) ;
} // @options.url = @element.getAttribute "action" unless @options.url?
if ( _this . options . url == null ) {
_this . options . url = _this . element . getAttribute ( "action" ) ;
}
if ( ! _this . options . url ) {
throw new Error ( "No URL provided." ) ;
}
if ( _this . options . acceptedFiles && _this . options . acceptedMimeTypes ) {
throw new Error ( "You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated." ) ;
}
if ( _this . options . uploadMultiple && _this . options . chunking ) {
2021-02-10 07:13:13 +00:00
throw new Error ( "You cannot set both: uploadMultiple and chunking." ) ;
2020-07-24 12:56:45 +00:00
} // Backwards compatibility
if ( _this . options . acceptedMimeTypes ) {
_this . options . acceptedFiles = _this . options . acceptedMimeTypes ;
delete _this . options . acceptedMimeTypes ;
} // Backwards compatibility
if ( _this . options . renameFilename != null ) {
_this . options . renameFile = function ( file ) {
return _this . options . renameFilename . call ( _assertThisInitialized ( _this ) , file . name , file ) ;
} ;
}
2021-02-10 07:13:13 +00:00
if ( typeof _this . options . method === "string" ) {
2020-07-24 12:56:45 +00:00
_this . options . method = _this . options . method . toUpperCase ( ) ;
}
if ( ( fallback = _this . getExistingFallback ( ) ) && fallback . parentNode ) {
// Remove the fallback
fallback . parentNode . removeChild ( fallback ) ;
} // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false
if ( _this . options . previewsContainer !== false ) {
if ( _this . options . previewsContainer ) {
_this . previewsContainer = Dropzone . getElement ( _this . options . previewsContainer , "previewsContainer" ) ;
} else {
_this . previewsContainer = _this . element ;
}
}
if ( _this . options . clickable ) {
if ( _this . options . clickable === true ) {
_this . clickableElements = [ _this . element ] ;
} else {
_this . clickableElements = Dropzone . getElements ( _this . options . clickable , "clickable" ) ;
}
}
_this . init ( ) ;
return _this ;
} // Returns all files that have been accepted
2021-02-10 07:13:13 +00:00
dropzone _createClass ( Dropzone , [ {
2020-07-24 12:56:45 +00:00
key : "getAcceptedFiles" ,
value : function getAcceptedFiles ( ) {
return this . files . filter ( function ( file ) {
return file . accepted ;
} ) . map ( function ( file ) {
return file ;
} ) ;
} // Returns all files that have been rejected
// Not sure when that's going to be useful, but added for completeness.
} , {
key : "getRejectedFiles" ,
value : function getRejectedFiles ( ) {
return this . files . filter ( function ( file ) {
return ! file . accepted ;
} ) . map ( function ( file ) {
return file ;
} ) ;
}
} , {
key : "getFilesWithStatus" ,
value : function getFilesWithStatus ( status ) {
return this . files . filter ( function ( file ) {
return file . status === status ;
} ) . map ( function ( file ) {
return file ;
} ) ;
} // Returns all files that are in the queue
} , {
key : "getQueuedFiles" ,
value : function getQueuedFiles ( ) {
return this . getFilesWithStatus ( Dropzone . QUEUED ) ;
}
} , {
key : "getUploadingFiles" ,
value : function getUploadingFiles ( ) {
return this . getFilesWithStatus ( Dropzone . UPLOADING ) ;
}
} , {
key : "getAddedFiles" ,
value : function getAddedFiles ( ) {
return this . getFilesWithStatus ( Dropzone . ADDED ) ;
} // Files that are either queued or uploading
} , {
key : "getActiveFiles" ,
value : function getActiveFiles ( ) {
return this . files . filter ( function ( file ) {
return file . status === Dropzone . UPLOADING || file . status === Dropzone . QUEUED ;
} ) . map ( function ( file ) {
return file ;
} ) ;
} // The function that gets called when Dropzone is initialized. You
// can (and should) setup event listeners inside this function.
} , {
key : "init" ,
value : function init ( ) {
2021-02-10 07:13:13 +00:00
var _this2 = this ;
2020-07-24 12:56:45 +00:00
// In case it isn't set already
if ( this . element . tagName === "form" ) {
this . element . setAttribute ( "enctype" , "multipart/form-data" ) ;
}
if ( this . element . classList . contains ( "dropzone" ) && ! this . element . querySelector ( ".dz-message" ) ) {
this . element . appendChild ( Dropzone . createElement ( "<div class=\"dz-default dz-message\"><button class=\"dz-button\" type=\"button\">" . concat ( this . options . dictDefaultMessage , "</button></div>" ) ) ) ;
}
if ( this . clickableElements . length ) {
var setupHiddenFileInput = function setupHiddenFileInput ( ) {
2021-02-10 07:13:13 +00:00
if ( _this2 . hiddenFileInput ) {
_this2 . hiddenFileInput . parentNode . removeChild ( _this2 . hiddenFileInput ) ;
2020-07-24 12:56:45 +00:00
}
2021-02-10 07:13:13 +00:00
_this2 . hiddenFileInput = document . createElement ( "input" ) ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
_this2 . hiddenFileInput . setAttribute ( "type" , "file" ) ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
if ( _this2 . options . maxFiles === null || _this2 . options . maxFiles > 1 ) {
_this2 . hiddenFileInput . setAttribute ( "multiple" , "multiple" ) ;
2020-07-24 12:56:45 +00:00
}
2021-02-10 07:13:13 +00:00
_this2 . hiddenFileInput . className = "dz-hidden-input" ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
if ( _this2 . options . acceptedFiles !== null ) {
_this2 . hiddenFileInput . setAttribute ( "accept" , _this2 . options . acceptedFiles ) ;
2020-07-24 12:56:45 +00:00
}
2021-02-10 07:13:13 +00:00
if ( _this2 . options . capture !== null ) {
_this2 . hiddenFileInput . setAttribute ( "capture" , _this2 . options . capture ) ;
} // Making sure that no one can "tab" into this field.
_this2 . hiddenFileInput . setAttribute ( "tabindex" , "-1" ) ; // Not setting `display="none"` because some browsers don't accept clicks
2020-07-24 12:56:45 +00:00
// on elements that aren't displayed.
2021-02-10 07:13:13 +00:00
_this2 . hiddenFileInput . style . visibility = "hidden" ;
_this2 . hiddenFileInput . style . position = "absolute" ;
_this2 . hiddenFileInput . style . top = "0" ;
_this2 . hiddenFileInput . style . left = "0" ;
_this2 . hiddenFileInput . style . height = "0" ;
_this2 . hiddenFileInput . style . width = "0" ;
Dropzone . getElement ( _this2 . options . hiddenInputContainer , "hiddenInputContainer" ) . appendChild ( _this2 . hiddenFileInput ) ;
_this2 . hiddenFileInput . addEventListener ( "change" , function ( ) {
var files = _this2 . hiddenFileInput . files ;
2020-07-24 12:56:45 +00:00
if ( files . length ) {
2021-02-10 07:13:13 +00:00
var _iterator = dropzone _createForOfIteratorHelper ( files , true ) ,
_step ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator . s ( ) ; ! ( _step = _iterator . n ( ) ) . done ; ) {
var file = _step . value ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
_this2 . addFile ( file ) ;
2020-07-24 12:56:45 +00:00
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator . f ( ) ;
2020-07-24 12:56:45 +00:00
}
}
2021-02-10 07:13:13 +00:00
_this2 . emit ( "addedfiles" , files ) ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
setupHiddenFileInput ( ) ;
2020-07-24 12:56:45 +00:00
} ) ;
} ;
setupHiddenFileInput ( ) ;
}
this . URL = window . URL !== null ? window . URL : window . webkitURL ; // Setup all event listeners on the Dropzone object itself.
// They're not in @setupEventListeners() because they shouldn't be removed
// again when the dropzone gets disabled.
2021-02-10 07:13:13 +00:00
var _iterator2 = dropzone _createForOfIteratorHelper ( this . events , true ) ,
_step2 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator2 . s ( ) ; ! ( _step2 = _iterator2 . n ( ) ) . done ; ) {
var eventName = _step2 . value ;
2020-07-24 12:56:45 +00:00
this . on ( eventName , this . options [ eventName ] ) ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator2 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator2 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
this . on ( "uploadprogress" , function ( ) {
2021-02-10 07:13:13 +00:00
return _this2 . updateTotalUploadProgress ( ) ;
2020-07-24 12:56:45 +00:00
} ) ;
this . on ( "removedfile" , function ( ) {
2021-02-10 07:13:13 +00:00
return _this2 . updateTotalUploadProgress ( ) ;
2020-07-24 12:56:45 +00:00
} ) ;
this . on ( "canceled" , function ( file ) {
2021-02-10 07:13:13 +00:00
return _this2 . emit ( "complete" , file ) ;
2020-07-24 12:56:45 +00:00
} ) ; // Emit a `queuecomplete` event if all files finished uploading.
this . on ( "complete" , function ( file ) {
2021-02-10 07:13:13 +00:00
if ( _this2 . getAddedFiles ( ) . length === 0 && _this2 . getUploadingFiles ( ) . length === 0 && _this2 . getQueuedFiles ( ) . length === 0 ) {
2020-07-24 12:56:45 +00:00
// This needs to be deferred so that `queuecomplete` really triggers after `complete`
return setTimeout ( function ( ) {
2021-02-10 07:13:13 +00:00
return _this2 . emit ( "queuecomplete" ) ;
2020-07-24 12:56:45 +00:00
} , 0 ) ;
}
} ) ;
var containsFiles = function containsFiles ( e ) {
if ( e . dataTransfer . types ) {
// Because e.dataTransfer.types is an Object in
// IE, we need to iterate like this instead of
// using e.dataTransfer.types.some()
for ( var i = 0 ; i < e . dataTransfer . types . length ; i ++ ) {
if ( e . dataTransfer . types [ i ] === "Files" ) return true ;
}
}
return false ;
} ;
var noPropagation = function noPropagation ( e ) {
// If there are no files, we don't want to stop
// propagation so we don't interfere with other
// drag and drop behaviour.
if ( ! containsFiles ( e ) ) return ;
e . stopPropagation ( ) ;
if ( e . preventDefault ) {
return e . preventDefault ( ) ;
} else {
return e . returnValue = false ;
}
} ; // Create the listeners
this . listeners = [ {
element : this . element ,
events : {
2021-02-10 07:13:13 +00:00
dragstart : function dragstart ( e ) {
return _this2 . emit ( "dragstart" , e ) ;
2020-07-24 12:56:45 +00:00
} ,
2021-02-10 07:13:13 +00:00
dragenter : function dragenter ( e ) {
2020-07-24 12:56:45 +00:00
noPropagation ( e ) ;
2021-02-10 07:13:13 +00:00
return _this2 . emit ( "dragenter" , e ) ;
2020-07-24 12:56:45 +00:00
} ,
2021-02-10 07:13:13 +00:00
dragover : function dragover ( e ) {
2020-07-24 12:56:45 +00:00
// Makes it possible to drag files from chrome's download bar
// http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar
// Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)
var efct ;
try {
efct = e . dataTransfer . effectAllowed ;
} catch ( error ) { }
2021-02-10 07:13:13 +00:00
e . dataTransfer . dropEffect = "move" === efct || "linkMove" === efct ? "move" : "copy" ;
2020-07-24 12:56:45 +00:00
noPropagation ( e ) ;
2021-02-10 07:13:13 +00:00
return _this2 . emit ( "dragover" , e ) ;
2020-07-24 12:56:45 +00:00
} ,
2021-02-10 07:13:13 +00:00
dragleave : function dragleave ( e ) {
return _this2 . emit ( "dragleave" , e ) ;
2020-07-24 12:56:45 +00:00
} ,
2021-02-10 07:13:13 +00:00
drop : function drop ( e ) {
2020-07-24 12:56:45 +00:00
noPropagation ( e ) ;
2021-02-10 07:13:13 +00:00
return _this2 . drop ( e ) ;
2020-07-24 12:56:45 +00:00
} ,
2021-02-10 07:13:13 +00:00
dragend : function dragend ( e ) {
return _this2 . emit ( "dragend" , e ) ;
2020-07-24 12:56:45 +00:00
}
} // This is disabled right now, because the browsers don't implement it properly.
// "paste": (e) =>
// noPropagation e
// @paste e
} ] ;
this . clickableElements . forEach ( function ( clickableElement ) {
2021-02-10 07:13:13 +00:00
return _this2 . listeners . push ( {
2020-07-24 12:56:45 +00:00
element : clickableElement ,
events : {
2021-02-10 07:13:13 +00:00
click : function click ( evt ) {
2020-07-24 12:56:45 +00:00
// Only the actual dropzone or the message element should trigger file selection
2021-02-10 07:13:13 +00:00
if ( clickableElement !== _this2 . element || evt . target === _this2 . element || Dropzone . elementInside ( evt . target , _this2 . element . querySelector ( ".dz-message" ) ) ) {
_this2 . hiddenFileInput . click ( ) ; // Forward the click
2020-07-24 12:56:45 +00:00
}
return true ;
}
}
} ) ;
} ) ;
this . enable ( ) ;
return this . options . init . call ( this ) ;
} // Not fully tested yet
} , {
key : "destroy" ,
value : function destroy ( ) {
this . disable ( ) ;
this . removeAllFiles ( true ) ;
if ( this . hiddenFileInput != null ? this . hiddenFileInput . parentNode : undefined ) {
this . hiddenFileInput . parentNode . removeChild ( this . hiddenFileInput ) ;
this . hiddenFileInput = null ;
}
delete this . element . dropzone ;
return Dropzone . instances . splice ( Dropzone . instances . indexOf ( this ) , 1 ) ;
}
} , {
key : "updateTotalUploadProgress" ,
value : function updateTotalUploadProgress ( ) {
var totalUploadProgress ;
var totalBytesSent = 0 ;
var totalBytes = 0 ;
var activeFiles = this . getActiveFiles ( ) ;
if ( activeFiles . length ) {
2021-02-10 07:13:13 +00:00
var _iterator3 = dropzone _createForOfIteratorHelper ( this . getActiveFiles ( ) , true ) ,
_step3 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator3 . s ( ) ; ! ( _step3 = _iterator3 . n ( ) ) . done ; ) {
var file = _step3 . value ;
2020-07-24 12:56:45 +00:00
totalBytesSent += file . upload . bytesSent ;
totalBytes += file . upload . total ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator3 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator3 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
totalUploadProgress = 100 * totalBytesSent / totalBytes ;
} else {
totalUploadProgress = 100 ;
}
return this . emit ( "totaluploadprogress" , totalUploadProgress , totalBytes , totalBytesSent ) ;
} // @options.paramName can be a function taking one parameter rather than a string.
// A parameter name for a file is obtained simply by calling this with an index number.
} , {
key : "_getParamName" ,
value : function _getParamName ( n ) {
if ( typeof this . options . paramName === "function" ) {
return this . options . paramName ( n ) ;
} else {
return "" . concat ( this . options . paramName ) . concat ( this . options . uploadMultiple ? "[" . concat ( n , "]" ) : "" ) ;
}
} // If @options.renameFile is a function,
// the function will be used to rename the file.name before appending it to the formData
} , {
key : "_renameFile" ,
value : function _renameFile ( file ) {
if ( typeof this . options . renameFile !== "function" ) {
return file . name ;
}
return this . options . renameFile ( file ) ;
} // Returns a form that can be used as fallback if the browser does not support DragnDrop
//
// If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.
// This code has to pass in IE7 :(
} , {
key : "getFallbackForm" ,
value : function getFallbackForm ( ) {
var existingFallback , form ;
if ( existingFallback = this . getExistingFallback ( ) ) {
return existingFallback ;
}
2021-02-10 07:13:13 +00:00
var fieldsString = '<div class="dz-fallback">' ;
2020-07-24 12:56:45 +00:00
if ( this . options . dictFallbackText ) {
fieldsString += "<p>" . concat ( this . options . dictFallbackText , "</p>" ) ;
}
fieldsString += "<input type=\"file\" name=\"" . concat ( this . _getParamName ( 0 ) , "\" " ) . concat ( this . options . uploadMultiple ? 'multiple="multiple"' : undefined , " /><input type=\"submit\" value=\"Upload!\"></div>" ) ;
var fields = Dropzone . createElement ( fieldsString ) ;
if ( this . element . tagName !== "FORM" ) {
form = Dropzone . createElement ( "<form action=\"" . concat ( this . options . url , "\" enctype=\"multipart/form-data\" method=\"" ) . concat ( this . options . method , "\"></form>" ) ) ;
form . appendChild ( fields ) ;
} else {
// Make sure that the enctype and method attributes are set properly
this . element . setAttribute ( "enctype" , "multipart/form-data" ) ;
this . element . setAttribute ( "method" , this . options . method ) ;
}
return form != null ? form : fields ;
} // Returns the fallback elements if they exist already
//
// This code has to pass in IE7 :(
} , {
key : "getExistingFallback" ,
value : function getExistingFallback ( ) {
var getFallback = function getFallback ( elements ) {
2021-02-10 07:13:13 +00:00
var _iterator4 = dropzone _createForOfIteratorHelper ( elements , true ) ,
_step4 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator4 . s ( ) ; ! ( _step4 = _iterator4 . n ( ) ) . done ; ) {
var el = _step4 . value ;
2020-07-24 12:56:45 +00:00
if ( /(^| )fallback($| )/ . test ( el . className ) ) {
return el ;
}
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator4 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator4 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
} ;
2021-02-10 07:13:13 +00:00
for ( var _i = 0 , _arr = [ "div" , "form" ] ; _i < _arr . length ; _i ++ ) {
var tagName = _arr [ _i ] ;
2020-07-24 12:56:45 +00:00
var fallback ;
if ( fallback = getFallback ( this . element . getElementsByTagName ( tagName ) ) ) {
return fallback ;
}
}
} // Activates all listeners stored in @listeners
} , {
key : "setupEventListeners" ,
value : function setupEventListeners ( ) {
return this . listeners . map ( function ( elementListeners ) {
return function ( ) {
var result = [ ] ;
for ( var event in elementListeners . events ) {
var listener = elementListeners . events [ event ] ;
result . push ( elementListeners . element . addEventListener ( event , listener , false ) ) ;
}
return result ;
} ( ) ;
} ) ;
} // Deactivates all listeners stored in @listeners
} , {
key : "removeEventListeners" ,
value : function removeEventListeners ( ) {
return this . listeners . map ( function ( elementListeners ) {
return function ( ) {
var result = [ ] ;
for ( var event in elementListeners . events ) {
var listener = elementListeners . events [ event ] ;
result . push ( elementListeners . element . removeEventListener ( event , listener , false ) ) ;
}
return result ;
} ( ) ;
} ) ;
} // Removes all event listeners and cancels all files in the queue or being processed.
} , {
key : "disable" ,
value : function disable ( ) {
2021-02-10 07:13:13 +00:00
var _this3 = this ;
2020-07-24 12:56:45 +00:00
this . clickableElements . forEach ( function ( element ) {
return element . classList . remove ( "dz-clickable" ) ;
} ) ;
this . removeEventListeners ( ) ;
this . disabled = true ;
return this . files . map ( function ( file ) {
2021-02-10 07:13:13 +00:00
return _this3 . cancelUpload ( file ) ;
2020-07-24 12:56:45 +00:00
} ) ;
}
} , {
key : "enable" ,
value : function enable ( ) {
delete this . disabled ;
this . clickableElements . forEach ( function ( element ) {
return element . classList . add ( "dz-clickable" ) ;
} ) ;
return this . setupEventListeners ( ) ;
} // Returns a nicely formatted filesize
} , {
key : "filesize" ,
value : function filesize ( size ) {
var selectedSize = 0 ;
var selectedUnit = "b" ;
if ( size > 0 ) {
2021-02-10 07:13:13 +00:00
var units = [ "tb" , "gb" , "mb" , "kb" , "b" ] ;
2020-07-24 12:56:45 +00:00
for ( var i = 0 ; i < units . length ; i ++ ) {
var unit = units [ i ] ;
var cutoff = Math . pow ( this . options . filesizeBase , 4 - i ) / 10 ;
if ( size >= cutoff ) {
selectedSize = size / Math . pow ( this . options . filesizeBase , 4 - i ) ;
selectedUnit = unit ;
break ;
}
}
selectedSize = Math . round ( 10 * selectedSize ) / 10 ; // Cutting of digits
}
return "<strong>" . concat ( selectedSize , "</strong> " ) . concat ( this . options . dictFileSizeUnits [ selectedUnit ] ) ;
} // Adds or removes the `dz-max-files-reached` class from the form.
} , {
key : "_updateMaxFilesReachedClass" ,
value : function _updateMaxFilesReachedClass ( ) {
if ( this . options . maxFiles != null && this . getAcceptedFiles ( ) . length >= this . options . maxFiles ) {
if ( this . getAcceptedFiles ( ) . length === this . options . maxFiles ) {
2021-02-10 07:13:13 +00:00
this . emit ( "maxfilesreached" , this . files ) ;
2020-07-24 12:56:45 +00:00
}
return this . element . classList . add ( "dz-max-files-reached" ) ;
} else {
return this . element . classList . remove ( "dz-max-files-reached" ) ;
}
}
} , {
key : "drop" ,
value : function drop ( e ) {
if ( ! e . dataTransfer ) {
return ;
}
this . emit ( "drop" , e ) ; // Convert the FileList to an Array
// This is necessary for IE11
var files = [ ] ;
for ( var i = 0 ; i < e . dataTransfer . files . length ; i ++ ) {
files [ i ] = e . dataTransfer . files [ i ] ;
} // Even if it's a folder, files.length will contain the folders.
if ( files . length ) {
var items = e . dataTransfer . items ;
if ( items && items . length && items [ 0 ] . webkitGetAsEntry != null ) {
// The browser supports dropping of folders, so handle items instead of files
this . _addFilesFromItems ( items ) ;
} else {
this . handleFiles ( files ) ;
}
}
this . emit ( "addedfiles" , files ) ;
}
} , {
key : "paste" ,
value : function paste ( e ) {
if ( _ _guard _ _ ( e != null ? e . clipboardData : undefined , function ( x ) {
return x . items ;
} ) == null ) {
return ;
}
this . emit ( "paste" , e ) ;
var items = e . clipboardData . items ;
if ( items . length ) {
return this . _addFilesFromItems ( items ) ;
}
}
} , {
key : "handleFiles" ,
value : function handleFiles ( files ) {
2021-02-10 07:13:13 +00:00
var _iterator5 = dropzone _createForOfIteratorHelper ( files , true ) ,
_step5 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator5 . s ( ) ; ! ( _step5 = _iterator5 . n ( ) ) . done ; ) {
var file = _step5 . value ;
2020-07-24 12:56:45 +00:00
this . addFile ( file ) ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator5 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator5 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
} // When a folder is dropped (or files are pasted), items must be handled
// instead of files.
} , {
key : "_addFilesFromItems" ,
value : function _addFilesFromItems ( items ) {
2021-02-10 07:13:13 +00:00
var _this4 = this ;
2020-07-24 12:56:45 +00:00
return function ( ) {
var result = [ ] ;
2021-02-10 07:13:13 +00:00
var _iterator6 = dropzone _createForOfIteratorHelper ( items , true ) ,
_step6 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator6 . s ( ) ; ! ( _step6 = _iterator6 . n ( ) ) . done ; ) {
var item = _step6 . value ;
2020-07-24 12:56:45 +00:00
var entry ;
if ( item . webkitGetAsEntry != null && ( entry = item . webkitGetAsEntry ( ) ) ) {
if ( entry . isFile ) {
2021-02-10 07:13:13 +00:00
result . push ( _this4 . addFile ( item . getAsFile ( ) ) ) ;
2020-07-24 12:56:45 +00:00
} else if ( entry . isDirectory ) {
// Append all files from that directory to files
2021-02-10 07:13:13 +00:00
result . push ( _this4 . _addFilesFromDirectory ( entry , entry . name ) ) ;
2020-07-24 12:56:45 +00:00
} else {
result . push ( undefined ) ;
}
} else if ( item . getAsFile != null ) {
if ( item . kind == null || item . kind === "file" ) {
2021-02-10 07:13:13 +00:00
result . push ( _this4 . addFile ( item . getAsFile ( ) ) ) ;
2020-07-24 12:56:45 +00:00
} else {
result . push ( undefined ) ;
}
} else {
result . push ( undefined ) ;
}
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator6 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator6 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
return result ;
} ( ) ;
} // Goes through the directory, and adds each file it finds recursively
} , {
key : "_addFilesFromDirectory" ,
value : function _addFilesFromDirectory ( directory , path ) {
2021-02-10 07:13:13 +00:00
var _this5 = this ;
2020-07-24 12:56:45 +00:00
var dirReader = directory . createReader ( ) ;
var errorHandler = function errorHandler ( error ) {
2021-02-10 07:13:13 +00:00
return _ _guardMethod _ _ ( console , "log" , function ( o ) {
2020-07-24 12:56:45 +00:00
return o . log ( error ) ;
} ) ;
} ;
var readEntries = function readEntries ( ) {
return dirReader . readEntries ( function ( entries ) {
if ( entries . length > 0 ) {
2021-02-10 07:13:13 +00:00
var _iterator7 = dropzone _createForOfIteratorHelper ( entries , true ) ,
_step7 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator7 . s ( ) ; ! ( _step7 = _iterator7 . n ( ) ) . done ; ) {
var entry = _step7 . value ;
2020-07-24 12:56:45 +00:00
if ( entry . isFile ) {
entry . file ( function ( file ) {
2021-02-10 07:13:13 +00:00
if ( _this5 . options . ignoreHiddenFiles && file . name . substring ( 0 , 1 ) === "." ) {
2020-07-24 12:56:45 +00:00
return ;
}
file . fullPath = "" . concat ( path , "/" ) . concat ( file . name ) ;
2021-02-10 07:13:13 +00:00
return _this5 . addFile ( file ) ;
2020-07-24 12:56:45 +00:00
} ) ;
} else if ( entry . isDirectory ) {
2021-02-10 07:13:13 +00:00
_this5 . _addFilesFromDirectory ( entry , "" . concat ( path , "/" ) . concat ( entry . name ) ) ;
2020-07-24 12:56:45 +00:00
}
} // Recursively call readEntries() again, since browser only handle
// the first 100 entries.
// See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator7 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator7 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
readEntries ( ) ;
}
return null ;
} , errorHandler ) ;
} ;
return readEntries ( ) ;
} // If `done()` is called without argument the file is accepted
// If you call it with an error message, the file is rejected
// (This allows for asynchronous validation)
//
// This function checks the filesize, and if the file.type passes the
// `acceptedFiles` check.
} , {
key : "accept" ,
value : function accept ( file , done ) {
if ( this . options . maxFilesize && file . size > this . options . maxFilesize * 1024 * 1024 ) {
done ( this . options . dictFileTooBig . replace ( "{{filesize}}" , Math . round ( file . size / 1024 / 10.24 ) / 100 ) . replace ( "{{maxFilesize}}" , this . options . maxFilesize ) ) ;
} else if ( ! Dropzone . isValidFile ( file , this . options . acceptedFiles ) ) {
done ( this . options . dictInvalidFileType ) ;
} else if ( this . options . maxFiles != null && this . getAcceptedFiles ( ) . length >= this . options . maxFiles ) {
done ( this . options . dictMaxFilesExceeded . replace ( "{{maxFiles}}" , this . options . maxFiles ) ) ;
this . emit ( "maxfilesexceeded" , file ) ;
} else {
this . options . accept . call ( this , file , done ) ;
}
}
} , {
key : "addFile" ,
value : function addFile ( file ) {
2021-02-10 07:13:13 +00:00
var _this6 = this ;
2020-07-24 12:56:45 +00:00
file . upload = {
uuid : Dropzone . uuidv4 ( ) ,
progress : 0 ,
// Setting the total upload size to file.size for the beginning
// It's actual different than the size to be transmitted.
total : file . size ,
bytesSent : 0 ,
filename : this . _renameFile ( file ) // Not setting chunking information here, because the acutal data — and
// thus the chunks — might change if `options.transformFile` is set
// and does something to the data.
} ;
this . files . push ( file ) ;
file . status = Dropzone . ADDED ;
this . emit ( "addedfile" , file ) ;
this . _enqueueThumbnail ( file ) ;
this . accept ( file , function ( error ) {
if ( error ) {
file . accepted = false ;
2021-02-10 07:13:13 +00:00
_this6 . _errorProcessing ( [ file ] , error ) ; // Will set the file.status
2020-07-24 12:56:45 +00:00
} else {
file . accepted = true ;
2021-02-10 07:13:13 +00:00
if ( _this6 . options . autoQueue ) {
_this6 . enqueueFile ( file ) ;
2020-07-24 12:56:45 +00:00
} // Will set .accepted = true
}
2021-02-10 07:13:13 +00:00
_this6 . _updateMaxFilesReachedClass ( ) ;
2020-07-24 12:56:45 +00:00
} ) ;
} // Wrapper for enqueueFile
} , {
key : "enqueueFiles" ,
value : function enqueueFiles ( files ) {
2021-02-10 07:13:13 +00:00
var _iterator8 = dropzone _createForOfIteratorHelper ( files , true ) ,
_step8 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator8 . s ( ) ; ! ( _step8 = _iterator8 . n ( ) ) . done ; ) {
var file = _step8 . value ;
2020-07-24 12:56:45 +00:00
this . enqueueFile ( file ) ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator8 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator8 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
return null ;
}
} , {
key : "enqueueFile" ,
value : function enqueueFile ( file ) {
2021-02-10 07:13:13 +00:00
var _this7 = this ;
2020-07-24 12:56:45 +00:00
if ( file . status === Dropzone . ADDED && file . accepted === true ) {
file . status = Dropzone . QUEUED ;
if ( this . options . autoProcessQueue ) {
return setTimeout ( function ( ) {
2021-02-10 07:13:13 +00:00
return _this7 . processQueue ( ) ;
2020-07-24 12:56:45 +00:00
} , 0 ) ; // Deferring the call
}
} else {
throw new Error ( "This file can't be queued because it has already been processed or was rejected." ) ;
}
}
} , {
key : "_enqueueThumbnail" ,
value : function _enqueueThumbnail ( file ) {
2021-02-10 07:13:13 +00:00
var _this8 = this ;
2020-07-24 12:56:45 +00:00
if ( this . options . createImageThumbnails && file . type . match ( /image.*/ ) && file . size <= this . options . maxThumbnailFilesize * 1024 * 1024 ) {
this . _thumbnailQueue . push ( file ) ;
return setTimeout ( function ( ) {
2021-02-10 07:13:13 +00:00
return _this8 . _processThumbnailQueue ( ) ;
2020-07-24 12:56:45 +00:00
} , 0 ) ; // Deferring the call
}
}
} , {
key : "_processThumbnailQueue" ,
value : function _processThumbnailQueue ( ) {
2021-02-10 07:13:13 +00:00
var _this9 = this ;
2020-07-24 12:56:45 +00:00
if ( this . _processingThumbnail || this . _thumbnailQueue . length === 0 ) {
return ;
}
this . _processingThumbnail = true ;
var file = this . _thumbnailQueue . shift ( ) ;
return this . createThumbnail ( file , this . options . thumbnailWidth , this . options . thumbnailHeight , this . options . thumbnailMethod , true , function ( dataUrl ) {
2021-02-10 07:13:13 +00:00
_this9 . emit ( "thumbnail" , file , dataUrl ) ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
_this9 . _processingThumbnail = false ;
return _this9 . _processThumbnailQueue ( ) ;
2020-07-24 12:56:45 +00:00
} ) ;
} // Can be called by the user to remove a file
} , {
key : "removeFile" ,
value : function removeFile ( file ) {
if ( file . status === Dropzone . UPLOADING ) {
this . cancelUpload ( file ) ;
}
this . files = without ( this . files , file ) ;
this . emit ( "removedfile" , file ) ;
if ( this . files . length === 0 ) {
return this . emit ( "reset" ) ;
}
} // Removes all files that aren't currently processed from the list
} , {
key : "removeAllFiles" ,
value : function removeAllFiles ( cancelIfNecessary ) {
// Create a copy of files since removeFile() changes the @files array.
if ( cancelIfNecessary == null ) {
cancelIfNecessary = false ;
}
2021-02-10 07:13:13 +00:00
var _iterator9 = dropzone _createForOfIteratorHelper ( this . files . slice ( ) , true ) ,
_step9 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator9 . s ( ) ; ! ( _step9 = _iterator9 . n ( ) ) . done ; ) {
var file = _step9 . value ;
2020-07-24 12:56:45 +00:00
if ( file . status !== Dropzone . UPLOADING || cancelIfNecessary ) {
this . removeFile ( file ) ;
}
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator9 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator9 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
return null ;
} // Resizes an image before it gets sent to the server. This function is the default behavior of
// `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with
// the resized blob.
} , {
key : "resizeImage" ,
value : function resizeImage ( file , width , height , resizeMethod , callback ) {
2021-02-10 07:13:13 +00:00
var _this10 = this ;
2020-07-24 12:56:45 +00:00
return this . createThumbnail ( file , width , height , resizeMethod , true , function ( dataUrl , canvas ) {
if ( canvas == null ) {
// The image has not been resized
return callback ( file ) ;
} else {
2021-02-10 07:13:13 +00:00
var resizeMimeType = _this10 . options . resizeMimeType ;
2020-07-24 12:56:45 +00:00
if ( resizeMimeType == null ) {
resizeMimeType = file . type ;
}
2021-02-10 07:13:13 +00:00
var resizedDataURL = canvas . toDataURL ( resizeMimeType , _this10 . options . resizeQuality ) ;
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
if ( resizeMimeType === "image/jpeg" || resizeMimeType === "image/jpg" ) {
2020-07-24 12:56:45 +00:00
// Now add the original EXIF information
resizedDataURL = ExifRestore . restore ( file . dataURL , resizedDataURL ) ;
}
return callback ( Dropzone . dataURItoBlob ( resizedDataURL ) ) ;
}
} ) ;
}
} , {
key : "createThumbnail" ,
value : function createThumbnail ( file , width , height , resizeMethod , fixOrientation , callback ) {
2021-02-10 07:13:13 +00:00
var _this11 = this ;
2020-07-24 12:56:45 +00:00
var fileReader = new FileReader ( ) ;
fileReader . onload = function ( ) {
file . dataURL = fileReader . result ; // Don't bother creating a thumbnail for SVG images since they're vector
if ( file . type === "image/svg+xml" ) {
if ( callback != null ) {
callback ( fileReader . result ) ;
}
return ;
}
2021-02-10 07:13:13 +00:00
_this11 . createThumbnailFromUrl ( file , width , height , resizeMethod , fixOrientation , callback ) ;
2020-07-24 12:56:45 +00:00
} ;
fileReader . readAsDataURL ( file ) ;
} // `mockFile` needs to have these attributes:
2021-02-10 07:13:13 +00:00
//
2020-07-24 12:56:45 +00:00
// { name: 'name', size: 12345, imageUrl: '' }
//
// `callback` will be invoked when the image has been downloaded and displayed.
// `crossOrigin` will be added to the `img` tag when accessing the file.
} , {
key : "displayExistingFile" ,
value : function displayExistingFile ( mockFile , imageUrl , callback , crossOrigin ) {
2021-02-10 07:13:13 +00:00
var _this12 = this ;
2020-07-24 12:56:45 +00:00
var resizeThumbnail = arguments . length > 4 && arguments [ 4 ] !== undefined ? arguments [ 4 ] : true ;
this . emit ( "addedfile" , mockFile ) ;
this . emit ( "complete" , mockFile ) ;
if ( ! resizeThumbnail ) {
this . emit ( "thumbnail" , mockFile , imageUrl ) ;
if ( callback ) callback ( ) ;
} else {
var onDone = function onDone ( thumbnail ) {
2021-02-10 07:13:13 +00:00
_this12 . emit ( "thumbnail" , mockFile , thumbnail ) ;
2020-07-24 12:56:45 +00:00
if ( callback ) callback ( ) ;
} ;
mockFile . dataURL = imageUrl ;
this . createThumbnailFromUrl ( mockFile , this . options . thumbnailWidth , this . options . thumbnailHeight , this . options . resizeMethod , this . options . fixOrientation , onDone , crossOrigin ) ;
}
}
} , {
key : "createThumbnailFromUrl" ,
value : function createThumbnailFromUrl ( file , width , height , resizeMethod , fixOrientation , callback , crossOrigin ) {
2021-02-10 07:13:13 +00:00
var _this13 = this ;
2020-07-24 12:56:45 +00:00
// Not using `new Image` here because of a bug in latest Chrome versions.
// See https://github.com/enyo/dropzone/pull/226
var img = document . createElement ( "img" ) ;
if ( crossOrigin ) {
img . crossOrigin = crossOrigin ;
} // fixOrientation is not needed anymore with browsers handling imageOrientation
2021-02-10 07:13:13 +00:00
fixOrientation = getComputedStyle ( document . body ) [ "imageOrientation" ] == "from-image" ? false : fixOrientation ;
2020-07-24 12:56:45 +00:00
img . onload = function ( ) {
var loadExif = function loadExif ( callback ) {
return callback ( 1 ) ;
} ;
2021-02-10 07:13:13 +00:00
if ( typeof EXIF !== "undefined" && EXIF !== null && fixOrientation ) {
2020-07-24 12:56:45 +00:00
loadExif = function loadExif ( callback ) {
return EXIF . getData ( img , function ( ) {
2021-02-10 07:13:13 +00:00
return callback ( EXIF . getTag ( this , "Orientation" ) ) ;
2020-07-24 12:56:45 +00:00
} ) ;
} ;
}
return loadExif ( function ( orientation ) {
file . width = img . width ;
file . height = img . height ;
2021-02-10 07:13:13 +00:00
var resizeInfo = _this13 . options . resize . call ( _this13 , file , width , height , resizeMethod ) ;
2020-07-24 12:56:45 +00:00
var canvas = document . createElement ( "canvas" ) ;
var ctx = canvas . getContext ( "2d" ) ;
canvas . width = resizeInfo . trgWidth ;
canvas . height = resizeInfo . trgHeight ;
if ( orientation > 4 ) {
canvas . width = resizeInfo . trgHeight ;
canvas . height = resizeInfo . trgWidth ;
}
switch ( orientation ) {
case 2 :
// horizontal flip
ctx . translate ( canvas . width , 0 ) ;
ctx . scale ( - 1 , 1 ) ;
break ;
case 3 :
// 180° rotate left
ctx . translate ( canvas . width , canvas . height ) ;
ctx . rotate ( Math . PI ) ;
break ;
case 4 :
// vertical flip
ctx . translate ( 0 , canvas . height ) ;
ctx . scale ( 1 , - 1 ) ;
break ;
case 5 :
// vertical flip + 90 rotate right
ctx . rotate ( 0.5 * Math . PI ) ;
ctx . scale ( 1 , - 1 ) ;
break ;
case 6 :
// 90° rotate right
ctx . rotate ( 0.5 * Math . PI ) ;
ctx . translate ( 0 , - canvas . width ) ;
break ;
case 7 :
// horizontal flip + 90 rotate right
ctx . rotate ( 0.5 * Math . PI ) ;
ctx . translate ( canvas . height , - canvas . width ) ;
ctx . scale ( - 1 , 1 ) ;
break ;
case 8 :
// 90° rotate left
ctx . rotate ( - 0.5 * Math . PI ) ;
ctx . translate ( - canvas . height , 0 ) ;
break ;
} // This is a bugfix for iOS' scaling bug.
drawImageIOSFix ( ctx , img , resizeInfo . srcX != null ? resizeInfo . srcX : 0 , resizeInfo . srcY != null ? resizeInfo . srcY : 0 , resizeInfo . srcWidth , resizeInfo . srcHeight , resizeInfo . trgX != null ? resizeInfo . trgX : 0 , resizeInfo . trgY != null ? resizeInfo . trgY : 0 , resizeInfo . trgWidth , resizeInfo . trgHeight ) ;
var thumbnail = canvas . toDataURL ( "image/png" ) ;
if ( callback != null ) {
return callback ( thumbnail , canvas ) ;
}
} ) ;
} ;
if ( callback != null ) {
img . onerror = callback ;
}
return img . src = file . dataURL ;
} // Goes through the queue and processes files if there aren't too many already.
} , {
key : "processQueue" ,
value : function processQueue ( ) {
var parallelUploads = this . options . parallelUploads ;
var processingLength = this . getUploadingFiles ( ) . length ;
var i = processingLength ; // There are already at least as many files uploading than should be
if ( processingLength >= parallelUploads ) {
return ;
}
var queuedFiles = this . getQueuedFiles ( ) ;
if ( ! ( queuedFiles . length > 0 ) ) {
return ;
}
if ( this . options . uploadMultiple ) {
// The files should be uploaded in one request
return this . processFiles ( queuedFiles . slice ( 0 , parallelUploads - processingLength ) ) ;
} else {
while ( i < parallelUploads ) {
if ( ! queuedFiles . length ) {
return ;
} // Nothing left to process
this . processFile ( queuedFiles . shift ( ) ) ;
i ++ ;
}
}
} // Wrapper for `processFiles`
} , {
key : "processFile" ,
value : function processFile ( file ) {
return this . processFiles ( [ file ] ) ;
} // Loads the file, then calls finishedLoading()
} , {
key : "processFiles" ,
value : function processFiles ( files ) {
2021-02-10 07:13:13 +00:00
var _iterator10 = dropzone _createForOfIteratorHelper ( files , true ) ,
_step10 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator10 . s ( ) ; ! ( _step10 = _iterator10 . n ( ) ) . done ; ) {
var file = _step10 . value ;
2020-07-24 12:56:45 +00:00
file . processing = true ; // Backwards compatibility
file . status = Dropzone . UPLOADING ;
this . emit ( "processing" , file ) ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator10 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator10 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
if ( this . options . uploadMultiple ) {
this . emit ( "processingmultiple" , files ) ;
}
return this . uploadFiles ( files ) ;
}
} , {
key : "_getFilesWithXhr" ,
value : function _getFilesWithXhr ( xhr ) {
var files ;
return files = this . files . filter ( function ( file ) {
return file . xhr === xhr ;
} ) . map ( function ( file ) {
return file ;
} ) ;
} // Cancels the file upload and sets the status to CANCELED
// **if** the file is actually being uploaded.
// If it's still in the queue, the file is being removed from it and the status
// set to CANCELED.
} , {
key : "cancelUpload" ,
value : function cancelUpload ( file ) {
if ( file . status === Dropzone . UPLOADING ) {
var groupedFiles = this . _getFilesWithXhr ( file . xhr ) ;
2021-02-10 07:13:13 +00:00
var _iterator11 = dropzone _createForOfIteratorHelper ( groupedFiles , true ) ,
_step11 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator11 . s ( ) ; ! ( _step11 = _iterator11 . n ( ) ) . done ; ) {
var groupedFile = _step11 . value ;
2020-07-24 12:56:45 +00:00
groupedFile . status = Dropzone . CANCELED ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator11 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator11 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
2021-02-10 07:13:13 +00:00
if ( typeof file . xhr !== "undefined" ) {
2020-07-24 12:56:45 +00:00
file . xhr . abort ( ) ;
}
2021-02-10 07:13:13 +00:00
var _iterator12 = dropzone _createForOfIteratorHelper ( groupedFiles , true ) ,
_step12 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator12 . s ( ) ; ! ( _step12 = _iterator12 . n ( ) ) . done ; ) {
var _groupedFile = _step12 . value ;
2020-07-24 12:56:45 +00:00
this . emit ( "canceled" , _groupedFile ) ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator12 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator12 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
if ( this . options . uploadMultiple ) {
this . emit ( "canceledmultiple" , groupedFiles ) ;
}
} else if ( file . status === Dropzone . ADDED || file . status === Dropzone . QUEUED ) {
file . status = Dropzone . CANCELED ;
this . emit ( "canceled" , file ) ;
if ( this . options . uploadMultiple ) {
this . emit ( "canceledmultiple" , [ file ] ) ;
}
}
if ( this . options . autoProcessQueue ) {
return this . processQueue ( ) ;
}
}
} , {
key : "resolveOption" ,
value : function resolveOption ( option ) {
2021-02-10 07:13:13 +00:00
if ( typeof option === "function" ) {
for ( var _len = arguments . length , args = new Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) {
args [ _key - 1 ] = arguments [ _key ] ;
2020-07-24 12:56:45 +00:00
}
return option . apply ( this , args ) ;
}
return option ;
}
} , {
key : "uploadFile" ,
value : function uploadFile ( file ) {
return this . uploadFiles ( [ file ] ) ;
}
} , {
key : "uploadFiles" ,
value : function uploadFiles ( files ) {
2021-02-10 07:13:13 +00:00
var _this14 = this ;
2020-07-24 12:56:45 +00:00
this . _transformFiles ( files , function ( transformedFiles ) {
2021-02-10 07:13:13 +00:00
if ( _this14 . options . chunking ) {
2020-07-24 12:56:45 +00:00
// Chunking is not allowed to be used with `uploadMultiple` so we know
// that there is only __one__file.
var transformedFile = transformedFiles [ 0 ] ;
2021-02-10 07:13:13 +00:00
files [ 0 ] . upload . chunked = _this14 . options . chunking && ( _this14 . options . forceChunking || transformedFile . size > _this14 . options . chunkSize ) ;
files [ 0 ] . upload . totalChunkCount = Math . ceil ( transformedFile . size / _this14 . options . chunkSize ) ;
2020-07-24 12:56:45 +00:00
}
if ( files [ 0 ] . upload . chunked ) {
// This file should be sent in chunks!
// If the chunking option is set, we **know** that there can only be **one** file, since
// uploadMultiple is not allowed with this option.
var file = files [ 0 ] ;
var _transformedFile = transformedFiles [ 0 ] ;
var startedChunkCount = 0 ;
file . upload . chunks = [ ] ;
var handleNextChunk = function handleNextChunk ( ) {
var chunkIndex = 0 ; // Find the next item in file.upload.chunks that is not defined yet.
while ( file . upload . chunks [ chunkIndex ] !== undefined ) {
chunkIndex ++ ;
} // This means, that all chunks have already been started.
if ( chunkIndex >= file . upload . totalChunkCount ) return ;
startedChunkCount ++ ;
2021-02-10 07:13:13 +00:00
var start = chunkIndex * _this14 . options . chunkSize ;
var end = Math . min ( start + _this14 . options . chunkSize , _transformedFile . size ) ;
2020-07-24 12:56:45 +00:00
var dataBlock = {
2021-02-10 07:13:13 +00:00
name : _this14 . _getParamName ( 0 ) ,
2020-07-24 12:56:45 +00:00
data : _transformedFile . webkitSlice ? _transformedFile . webkitSlice ( start , end ) : _transformedFile . slice ( start , end ) ,
filename : file . upload . filename ,
chunkIndex : chunkIndex
} ;
file . upload . chunks [ chunkIndex ] = {
file : file ,
index : chunkIndex ,
dataBlock : dataBlock ,
// In case we want to retry.
status : Dropzone . UPLOADING ,
progress : 0 ,
retries : 0 // The number of times this block has been retried.
} ;
2021-02-10 07:13:13 +00:00
_this14 . _uploadData ( files , [ dataBlock ] ) ;
2020-07-24 12:56:45 +00:00
} ;
2021-09-17 19:28:20 +00:00
file . upload . finishedChunkUpload = function ( chunk , response ) {
2020-07-24 12:56:45 +00:00
var allFinished = true ;
chunk . status = Dropzone . SUCCESS ; // Clear the data from the chunk
chunk . dataBlock = null ; // Leaving this reference to xhr intact here will cause memory leaks in some browsers
chunk . xhr = null ;
for ( var i = 0 ; i < file . upload . totalChunkCount ; i ++ ) {
if ( file . upload . chunks [ i ] === undefined ) {
return handleNextChunk ( ) ;
}
if ( file . upload . chunks [ i ] . status !== Dropzone . SUCCESS ) {
allFinished = false ;
}
}
if ( allFinished ) {
2021-02-10 07:13:13 +00:00
_this14 . options . chunksUploaded ( file , function ( ) {
2021-09-17 19:28:20 +00:00
_this14 . _finished ( files , response , null ) ;
2020-07-24 12:56:45 +00:00
} ) ;
}
} ;
2021-02-10 07:13:13 +00:00
if ( _this14 . options . parallelChunkUploads ) {
2020-07-24 12:56:45 +00:00
for ( var i = 0 ; i < file . upload . totalChunkCount ; i ++ ) {
handleNextChunk ( ) ;
}
} else {
handleNextChunk ( ) ;
}
} else {
var dataBlocks = [ ] ;
2021-02-10 07:13:13 +00:00
for ( var _i2 = 0 ; _i2 < files . length ; _i2 ++ ) {
dataBlocks [ _i2 ] = {
name : _this14 . _getParamName ( _i2 ) ,
data : transformedFiles [ _i2 ] ,
filename : files [ _i2 ] . upload . filename
2020-07-24 12:56:45 +00:00
} ;
}
2021-02-10 07:13:13 +00:00
_this14 . _uploadData ( files , dataBlocks ) ;
2020-07-24 12:56:45 +00:00
}
} ) ;
} /// Returns the right chunk for given file and xhr
} , {
key : "_getChunk" ,
value : function _getChunk ( file , xhr ) {
for ( var i = 0 ; i < file . upload . totalChunkCount ; i ++ ) {
if ( file . upload . chunks [ i ] !== undefined && file . upload . chunks [ i ] . xhr === xhr ) {
return file . upload . chunks [ i ] ;
}
}
} // This function actually uploads the file(s) to the server.
// If dataBlocks contains the actual data to upload (meaning, that this could either be transformed
// files, or individual chunks for chunked upload).
} , {
key : "_uploadData" ,
value : function _uploadData ( files , dataBlocks ) {
2021-02-10 07:13:13 +00:00
var _this15 = this ;
2020-07-24 12:56:45 +00:00
var xhr = new XMLHttpRequest ( ) ; // Put the xhr object in the file objects to be able to reference it later.
2021-02-10 07:13:13 +00:00
var _iterator13 = dropzone _createForOfIteratorHelper ( files , true ) ,
_step13 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator13 . s ( ) ; ! ( _step13 = _iterator13 . n ( ) ) . done ; ) {
var file = _step13 . value ;
2020-07-24 12:56:45 +00:00
file . xhr = xhr ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator13 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator13 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
if ( files [ 0 ] . upload . chunked ) {
// Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk
files [ 0 ] . upload . chunks [ dataBlocks [ 0 ] . chunkIndex ] . xhr = xhr ;
}
var method = this . resolveOption ( this . options . method , files ) ;
var url = this . resolveOption ( this . options . url , files ) ;
xhr . open ( method , url , true ) ; // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8
2021-09-17 19:28:20 +00:00
var timeout = this . resolveOption ( this . options . timeout , files ) ;
if ( timeout ) xhr . timeout = this . resolveOption ( this . options . timeout , files ) ; // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
2020-07-24 12:56:45 +00:00
xhr . withCredentials = ! ! this . options . withCredentials ;
xhr . onload = function ( e ) {
2021-02-10 07:13:13 +00:00
_this15 . _finishedUploading ( files , xhr , e ) ;
2020-07-24 12:56:45 +00:00
} ;
xhr . ontimeout = function ( ) {
2021-02-10 07:13:13 +00:00
_this15 . _handleUploadError ( files , xhr , "Request timedout after " . concat ( _this15 . options . timeout / 1000 , " seconds" ) ) ;
2020-07-24 12:56:45 +00:00
} ;
xhr . onerror = function ( ) {
2021-02-10 07:13:13 +00:00
_this15 . _handleUploadError ( files , xhr ) ;
2020-07-24 12:56:45 +00:00
} ; // Some browsers do not have the .upload property
var progressObj = xhr . upload != null ? xhr . upload : xhr ;
progressObj . onprogress = function ( e ) {
2021-02-10 07:13:13 +00:00
return _this15 . _updateFilesUploadProgress ( files , xhr , e ) ;
2020-07-24 12:56:45 +00:00
} ;
var headers = {
2021-02-10 07:13:13 +00:00
Accept : "application/json" ,
2020-07-24 12:56:45 +00:00
"Cache-Control" : "no-cache" ,
"X-Requested-With" : "XMLHttpRequest"
} ;
if ( this . options . headers ) {
Dropzone . extend ( headers , this . options . headers ) ;
}
for ( var headerName in headers ) {
var headerValue = headers [ headerName ] ;
if ( headerValue ) {
xhr . setRequestHeader ( headerName , headerValue ) ;
}
}
var formData = new FormData ( ) ; // Adding all @options parameters
if ( this . options . params ) {
var additionalParams = this . options . params ;
2021-02-10 07:13:13 +00:00
if ( typeof additionalParams === "function" ) {
2020-07-24 12:56:45 +00:00
additionalParams = additionalParams . call ( this , files , xhr , files [ 0 ] . upload . chunked ? this . _getChunk ( files [ 0 ] , xhr ) : null ) ;
}
for ( var key in additionalParams ) {
var value = additionalParams [ key ] ;
if ( Array . isArray ( value ) ) {
// The additional parameter contains an array,
// so lets iterate over it to attach each value
// individually.
for ( var i = 0 ; i < value . length ; i ++ ) {
formData . append ( key , value [ i ] ) ;
}
} else {
formData . append ( key , value ) ;
}
}
} // Let the user add additional data if necessary
2021-02-10 07:13:13 +00:00
var _iterator14 = dropzone _createForOfIteratorHelper ( files , true ) ,
_step14 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator14 . s ( ) ; ! ( _step14 = _iterator14 . n ( ) ) . done ; ) {
var _file = _step14 . value ;
2020-07-24 12:56:45 +00:00
this . emit ( "sending" , _file , xhr , formData ) ;
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator14 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator14 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
if ( this . options . uploadMultiple ) {
this . emit ( "sendingmultiple" , files , xhr , formData ) ;
}
this . _addFormElementData ( formData ) ; // Finally add the files
// Has to be last because some servers (eg: S3) expect the file to be the last parameter
2021-02-10 07:13:13 +00:00
for ( var _i3 = 0 ; _i3 < dataBlocks . length ; _i3 ++ ) {
var dataBlock = dataBlocks [ _i3 ] ;
2020-07-24 12:56:45 +00:00
formData . append ( dataBlock . name , dataBlock . data , dataBlock . filename ) ;
}
this . submitRequest ( xhr , formData , files ) ;
} // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.
} , {
key : "_transformFiles" ,
value : function _transformFiles ( files , done ) {
2021-02-10 07:13:13 +00:00
var _this16 = this ;
2020-07-24 12:56:45 +00:00
var transformedFiles = [ ] ; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.
var doneCounter = 0 ;
var _loop = function _loop ( i ) {
2021-02-10 07:13:13 +00:00
_this16 . options . transformFile . call ( _this16 , files [ i ] , function ( transformedFile ) {
2020-07-24 12:56:45 +00:00
transformedFiles [ i ] = transformedFile ;
if ( ++ doneCounter === files . length ) {
done ( transformedFiles ) ;
}
} ) ;
} ;
for ( var i = 0 ; i < files . length ; i ++ ) {
_loop ( i ) ;
}
} // Takes care of adding other input elements of the form to the AJAX request
} , {
key : "_addFormElementData" ,
value : function _addFormElementData ( formData ) {
// Take care of other input elements
if ( this . element . tagName === "FORM" ) {
2021-02-10 07:13:13 +00:00
var _iterator15 = dropzone _createForOfIteratorHelper ( this . element . querySelectorAll ( "input, textarea, select, button" ) , true ) ,
_step15 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator15 . s ( ) ; ! ( _step15 = _iterator15 . n ( ) ) . done ; ) {
var input = _step15 . value ;
2020-07-24 12:56:45 +00:00
var inputName = input . getAttribute ( "name" ) ;
var inputType = input . getAttribute ( "type" ) ;
if ( inputType ) inputType = inputType . toLowerCase ( ) ; // If the input doesn't have a name, we can't use it.
2021-02-10 07:13:13 +00:00
if ( typeof inputName === "undefined" || inputName === null ) continue ;
2020-07-24 12:56:45 +00:00
if ( input . tagName === "SELECT" && input . hasAttribute ( "multiple" ) ) {
// Possibly multiple values
2021-02-10 07:13:13 +00:00
var _iterator16 = dropzone _createForOfIteratorHelper ( input . options , true ) ,
_step16 ;
2020-07-24 12:56:45 +00:00
try {
2021-02-10 07:13:13 +00:00
for ( _iterator16 . s ( ) ; ! ( _step16 = _iterator16 . n ( ) ) . done ; ) {
var option = _step16 . value ;
2020-07-24 12:56:45 +00:00
if ( option . selected ) {
formData . append ( inputName , option . value ) ;
}
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator16 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator16 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
} else if ( ! inputType || inputType !== "checkbox" && inputType !== "radio" || input . checked ) {
formData . append ( inputName , input . value ) ;
}
}
} catch ( err ) {
2021-02-10 07:13:13 +00:00
_iterator15 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-02-10 07:13:13 +00:00
_iterator15 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
}
} // Invoked when there is new progress information about given files.
// If e is not provided, it is assumed that the upload is finished.
} , {
key : "_updateFilesUploadProgress" ,
value : function _updateFilesUploadProgress ( files , xhr , e ) {
2021-09-17 19:28:20 +00:00
if ( ! files [ 0 ] . upload . chunked ) {
// Handle file uploads without chunking
var _iterator17 = dropzone _createForOfIteratorHelper ( files , true ) ,
_step17 ;
2020-07-24 12:56:45 +00:00
2021-09-17 19:28:20 +00:00
try {
for ( _iterator17 . s ( ) ; ! ( _step17 = _iterator17 . n ( ) ) . done ; ) {
var file = _step17 . value ;
2020-07-24 12:56:45 +00:00
2021-09-17 19:28:20 +00:00
if ( file . upload . total && file . upload . bytesSent && file . upload . bytesSent == file . upload . total ) {
// If both, the `total` and `bytesSent` have already been set, and
// they are equal (meaning progress is at 100%), we can skip this
// file, since an upload progress shouldn't go down.
continue ;
2020-07-24 12:56:45 +00:00
}
2021-09-17 19:28:20 +00:00
if ( e ) {
file . upload . progress = 100 * e . loaded / e . total ;
file . upload . total = e . total ;
file . upload . bytesSent = e . loaded ;
} else {
// No event, so we're at 100%
file . upload . progress = 100 ;
file . upload . bytesSent = file . upload . total ;
2020-07-24 12:56:45 +00:00
}
2021-09-17 19:28:20 +00:00
this . emit ( "uploadprogress" , file , file . upload . progress , file . upload . bytesSent ) ;
2020-07-24 12:56:45 +00:00
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator17 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator17 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
} else {
2021-09-17 19:28:20 +00:00
// Handle chunked file uploads
// Chunked upload is not compatible with uploading multiple files in one
// request, so we know there's only one file.
var _file2 = files [ 0 ] ; // Since this is a chunked upload, we need to update the appropriate chunk
// progress.
2020-07-24 12:56:45 +00:00
2021-09-17 19:28:20 +00:00
var chunk = this . _getChunk ( _file2 , xhr ) ;
2020-07-24 12:56:45 +00:00
2021-09-17 19:28:20 +00:00
if ( e ) {
chunk . progress = 100 * e . loaded / e . total ;
chunk . total = e . total ;
chunk . bytesSent = e . loaded ;
} else {
// No event, so we're at 100%
chunk . progress = 100 ;
chunk . bytesSent = chunk . total ;
} // Now tally the *file* upload progress from its individual chunks
2020-07-24 12:56:45 +00:00
2021-09-17 19:28:20 +00:00
_file2 . upload . progress = 0 ;
_file2 . upload . total = 0 ;
_file2 . upload . bytesSent = 0 ;
2020-07-24 12:56:45 +00:00
2021-09-17 19:28:20 +00:00
for ( var i = 0 ; i < _file2 . upload . totalChunkCount ; i ++ ) {
if ( _file2 . upload . chunks [ i ] && typeof _file2 . upload . chunks [ i ] . progress !== "undefined" ) {
_file2 . upload . progress += _file2 . upload . chunks [ i ] . progress ;
_file2 . upload . total += _file2 . upload . chunks [ i ] . total ;
_file2 . upload . bytesSent += _file2 . upload . chunks [ i ] . bytesSent ;
}
} // Since the process is a percentage, we need to divide by the amount of
// chunks we've used.
2020-07-24 12:56:45 +00:00
2021-09-17 19:28:20 +00:00
_file2 . upload . progress = _file2 . upload . progress / _file2 . upload . totalChunkCount ;
this . emit ( "uploadprogress" , _file2 , _file2 . upload . progress , _file2 . upload . bytesSent ) ;
2020-07-24 12:56:45 +00:00
}
}
} , {
key : "_finishedUploading" ,
value : function _finishedUploading ( files , xhr , e ) {
var response ;
if ( files [ 0 ] . status === Dropzone . CANCELED ) {
return ;
}
if ( xhr . readyState !== 4 ) {
return ;
}
2021-02-10 07:13:13 +00:00
if ( xhr . responseType !== "arraybuffer" && xhr . responseType !== "blob" ) {
2020-07-24 12:56:45 +00:00
response = xhr . responseText ;
if ( xhr . getResponseHeader ( "content-type" ) && ~ xhr . getResponseHeader ( "content-type" ) . indexOf ( "application/json" ) ) {
try {
response = JSON . parse ( response ) ;
} catch ( error ) {
e = error ;
response = "Invalid JSON response from server." ;
}
}
}
2021-09-17 19:28:20 +00:00
this . _updateFilesUploadProgress ( files , xhr ) ;
2020-07-24 12:56:45 +00:00
if ( ! ( 200 <= xhr . status && xhr . status < 300 ) ) {
this . _handleUploadError ( files , xhr , response ) ;
} else {
if ( files [ 0 ] . upload . chunked ) {
2021-09-17 19:28:20 +00:00
files [ 0 ] . upload . finishedChunkUpload ( this . _getChunk ( files [ 0 ] , xhr ) , response ) ;
2020-07-24 12:56:45 +00:00
} else {
this . _finished ( files , response , e ) ;
}
}
}
} , {
key : "_handleUploadError" ,
value : function _handleUploadError ( files , xhr , response ) {
if ( files [ 0 ] . status === Dropzone . CANCELED ) {
return ;
}
if ( files [ 0 ] . upload . chunked && this . options . retryChunks ) {
var chunk = this . _getChunk ( files [ 0 ] , xhr ) ;
if ( chunk . retries ++ < this . options . retryChunksLimit ) {
this . _uploadData ( files , [ chunk . dataBlock ] ) ;
return ;
} else {
2021-02-10 07:13:13 +00:00
console . warn ( "Retried this chunk too often. Giving up." ) ;
2020-07-24 12:56:45 +00:00
}
}
this . _errorProcessing ( files , response || this . options . dictResponseError . replace ( "{{statusCode}}" , xhr . status ) , xhr ) ;
}
} , {
key : "submitRequest" ,
value : function submitRequest ( xhr , formData , files ) {
2021-09-17 19:28:20 +00:00
if ( xhr . readyState != 1 ) {
console . warn ( "Cannot send this request because the XMLHttpRequest.readyState is not OPENED." ) ;
return ;
}
2020-07-24 12:56:45 +00:00
xhr . send ( formData ) ;
} // Called internally when processing is finished.
// Individual callbacks have to be called in the appropriate sections.
} , {
key : "_finished" ,
value : function _finished ( files , responseText , e ) {
2021-09-17 19:28:20 +00:00
var _iterator18 = dropzone _createForOfIteratorHelper ( files , true ) ,
_step18 ;
2020-07-24 12:56:45 +00:00
try {
2021-09-17 19:28:20 +00:00
for ( _iterator18 . s ( ) ; ! ( _step18 = _iterator18 . n ( ) ) . done ; ) {
var file = _step18 . value ;
2020-07-24 12:56:45 +00:00
file . status = Dropzone . SUCCESS ;
this . emit ( "success" , file , responseText , e ) ;
this . emit ( "complete" , file ) ;
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator18 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator18 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
if ( this . options . uploadMultiple ) {
this . emit ( "successmultiple" , files , responseText , e ) ;
this . emit ( "completemultiple" , files ) ;
}
if ( this . options . autoProcessQueue ) {
return this . processQueue ( ) ;
}
} // Called internally when processing is finished.
// Individual callbacks have to be called in the appropriate sections.
} , {
key : "_errorProcessing" ,
value : function _errorProcessing ( files , message , xhr ) {
2021-09-17 19:28:20 +00:00
var _iterator19 = dropzone _createForOfIteratorHelper ( files , true ) ,
_step19 ;
2020-07-24 12:56:45 +00:00
try {
2021-09-17 19:28:20 +00:00
for ( _iterator19 . s ( ) ; ! ( _step19 = _iterator19 . n ( ) ) . done ; ) {
var file = _step19 . value ;
2020-07-24 12:56:45 +00:00
file . status = Dropzone . ERROR ;
this . emit ( "error" , file , message , xhr ) ;
this . emit ( "complete" , file ) ;
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator19 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator19 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
if ( this . options . uploadMultiple ) {
this . emit ( "errormultiple" , files , message , xhr ) ;
this . emit ( "completemultiple" , files ) ;
}
if ( this . options . autoProcessQueue ) {
return this . processQueue ( ) ;
}
}
} ] , [ {
2021-02-10 07:13:13 +00:00
key : "initClass" ,
value : function initClass ( ) {
// Exposing the emitter class, mainly for tests
this . prototype . Emitter = Emitter ;
/ *
This is a list of all available events you can register on a dropzone object .
You can register an event handler like this :
dropzone . on ( "dragEnter" , function ( ) { } ) ;
* /
this . prototype . events = [ "drop" , "dragstart" , "dragend" , "dragenter" , "dragover" , "dragleave" , "addedfile" , "addedfiles" , "removedfile" , "thumbnail" , "error" , "errormultiple" , "processing" , "processingmultiple" , "uploadprogress" , "totaluploadprogress" , "sending" , "sendingmultiple" , "success" , "successmultiple" , "canceled" , "canceledmultiple" , "complete" , "completemultiple" , "reset" , "maxfilesexceeded" , "maxfilesreached" , "queuecomplete" ] ;
this . prototype . _thumbnailQueue = [ ] ;
this . prototype . _processingThumbnail = false ;
} // global utility
} , {
key : "extend" ,
value : function extend ( target ) {
for ( var _len2 = arguments . length , objects = new Array ( _len2 > 1 ? _len2 - 1 : 0 ) , _key2 = 1 ; _key2 < _len2 ; _key2 ++ ) {
objects [ _key2 - 1 ] = arguments [ _key2 ] ;
}
for ( var _i4 = 0 , _objects = objects ; _i4 < _objects . length ; _i4 ++ ) {
var object = _objects [ _i4 ] ;
for ( var key in object ) {
var val = object [ key ] ;
target [ key ] = val ;
}
}
return target ;
}
} , {
2020-07-24 12:56:45 +00:00
key : "uuidv4" ,
value : function uuidv4 ( ) {
2021-02-10 07:13:13 +00:00
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" . replace ( /[xy]/g , function ( c ) {
2020-07-24 12:56:45 +00:00
var r = Math . random ( ) * 16 | 0 ,
2021-02-10 07:13:13 +00:00
v = c === "x" ? r : r & 0x3 | 0x8 ;
2020-07-24 12:56:45 +00:00
return v . toString ( 16 ) ;
} ) ;
}
} ] ) ;
return Dropzone ;
} ( Emitter ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
Dropzone . initClass ( ) ;
2021-09-17 19:28:20 +00:00
Dropzone . version = "5.9.2" ; // This is a map of options for your different dropzones. Add configurations
2020-07-24 12:56:45 +00:00
// to this object for your different dropzone elemens.
//
// Example:
//
// Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };
//
// To disable autoDiscover for a specific element, you can set `false` as an option:
//
// Dropzone.options.myDisabledElementId = false;
//
// And in html:
//
// <form action="/upload" id="my-dropzone-element-id" class="dropzone"></form>
2021-03-20 20:39:14 +00:00
Dropzone . options = { } ; // Returns the options for an element or undefined if none available.
2020-07-24 12:56:45 +00:00
2021-03-20 20:39:14 +00:00
Dropzone . optionsForElement = function ( element ) {
2020-07-24 12:56:45 +00:00
// Get the `Dropzone.options.elementId` for this element if it exists
if ( element . getAttribute ( "id" ) ) {
2021-03-20 20:39:14 +00:00
return Dropzone . options [ camelize ( element . getAttribute ( "id" ) ) ] ;
2020-07-24 12:56:45 +00:00
} else {
return undefined ;
}
} ; // Holds a list of all dropzone instances
2021-03-20 20:39:14 +00:00
Dropzone . instances = [ ] ; // Returns the dropzone for given element if any
2020-07-24 12:56:45 +00:00
2021-03-20 20:39:14 +00:00
Dropzone . forElement = function ( element ) {
2020-07-24 12:56:45 +00:00
if ( typeof element === "string" ) {
element = document . querySelector ( element ) ;
}
if ( ( element != null ? element . dropzone : undefined ) == null ) {
throw new Error ( "No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone." ) ;
}
return element . dropzone ;
} ; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.
2021-03-20 20:39:14 +00:00
Dropzone . autoDiscover = true ; // Looks for all .dropzone elements and creates a dropzone for them
2020-07-24 12:56:45 +00:00
2021-03-20 20:39:14 +00:00
Dropzone . discover = function ( ) {
2020-07-24 12:56:45 +00:00
var dropzones ;
if ( document . querySelectorAll ) {
dropzones = document . querySelectorAll ( ".dropzone" ) ;
} else {
dropzones = [ ] ; // IE :(
var checkElements = function checkElements ( elements ) {
return function ( ) {
var result = [ ] ;
2021-09-17 19:28:20 +00:00
var _iterator20 = dropzone _createForOfIteratorHelper ( elements , true ) ,
_step20 ;
2020-07-24 12:56:45 +00:00
try {
2021-09-17 19:28:20 +00:00
for ( _iterator20 . s ( ) ; ! ( _step20 = _iterator20 . n ( ) ) . done ; ) {
var el = _step20 . value ;
2020-07-24 12:56:45 +00:00
if ( /(^| )dropzone($| )/ . test ( el . className ) ) {
result . push ( dropzones . push ( el ) ) ;
} else {
result . push ( undefined ) ;
}
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator20 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator20 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
return result ;
} ( ) ;
} ;
checkElements ( document . getElementsByTagName ( "div" ) ) ;
checkElements ( document . getElementsByTagName ( "form" ) ) ;
}
return function ( ) {
var result = [ ] ;
2021-09-17 19:28:20 +00:00
var _iterator21 = dropzone _createForOfIteratorHelper ( dropzones , true ) ,
_step21 ;
2020-07-24 12:56:45 +00:00
try {
2021-09-17 19:28:20 +00:00
for ( _iterator21 . s ( ) ; ! ( _step21 = _iterator21 . n ( ) ) . done ; ) {
var dropzone = _step21 . value ;
2020-07-24 12:56:45 +00:00
// Create a dropzone unless auto discover has been disabled for specific element
2021-03-20 20:39:14 +00:00
if ( Dropzone . optionsForElement ( dropzone ) !== false ) {
result . push ( new Dropzone ( dropzone ) ) ;
2020-07-24 12:56:45 +00:00
} else {
result . push ( undefined ) ;
}
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator21 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator21 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
return result ;
} ( ) ;
2021-02-17 07:25:25 +00:00
} ; // Some browsers support drag and drog functionality, but not correctly.
//
// So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know.
2020-07-24 12:56:45 +00:00
// But what to do when browsers *theoretically* support an API, but crash
// when using it.
//
// This is a list of regular expressions tested against navigator.userAgent
//
// ** It should only be used on browser that *do* support the API, but
// incorrectly **
2021-03-20 20:39:14 +00:00
Dropzone . blockedBrowsers = [ // The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.
2020-07-24 12:56:45 +00:00
/opera.*(Macintosh|Windows Phone).*version\/12/i ] ; // Checks if the browser is supported
2021-03-20 20:39:14 +00:00
Dropzone . isBrowserSupported = function ( ) {
2020-07-24 12:56:45 +00:00
var capableBrowser = true ;
if ( window . File && window . FileReader && window . FileList && window . Blob && window . FormData && document . querySelector ) {
if ( ! ( "classList" in document . createElement ( "a" ) ) ) {
capableBrowser = false ;
} else {
2021-03-20 20:39:14 +00:00
if ( Dropzone . blacklistedBrowsers !== undefined ) {
2021-02-17 07:25:25 +00:00
// Since this has been renamed, this makes sure we don't break older
// configuration.
2021-03-20 20:39:14 +00:00
Dropzone . blockedBrowsers = Dropzone . blacklistedBrowsers ;
2021-02-17 07:25:25 +00:00
} // The browser supports the API, but may be blocked.
2021-09-17 19:28:20 +00:00
var _iterator22 = dropzone _createForOfIteratorHelper ( Dropzone . blockedBrowsers , true ) ,
_step22 ;
2020-07-24 12:56:45 +00:00
try {
2021-09-17 19:28:20 +00:00
for ( _iterator22 . s ( ) ; ! ( _step22 = _iterator22 . n ( ) ) . done ; ) {
var regex = _step22 . value ;
2020-07-24 12:56:45 +00:00
if ( regex . test ( navigator . userAgent ) ) {
capableBrowser = false ;
continue ;
}
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator22 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator22 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
}
} else {
capableBrowser = false ;
}
return capableBrowser ;
} ;
2021-03-20 20:39:14 +00:00
Dropzone . dataURItoBlob = function ( dataURI ) {
2020-07-24 12:56:45 +00:00
// convert base64 to raw binary data held in a string
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
2021-02-10 07:13:13 +00:00
var byteString = atob ( dataURI . split ( "," ) [ 1 ] ) ; // separate out the mime component
2020-07-24 12:56:45 +00:00
2021-02-10 07:13:13 +00:00
var mimeString = dataURI . split ( "," ) [ 0 ] . split ( ":" ) [ 1 ] . split ( ";" ) [ 0 ] ; // write the bytes of the string to an ArrayBuffer
2020-07-24 12:56:45 +00:00
var ab = new ArrayBuffer ( byteString . length ) ;
var ia = new Uint8Array ( ab ) ;
for ( var i = 0 , end = byteString . length , asc = 0 <= end ; asc ? i <= end : i >= end ; asc ? i ++ : i -- ) {
ia [ i ] = byteString . charCodeAt ( i ) ;
} // write the ArrayBuffer to a blob
return new Blob ( [ ab ] , {
type : mimeString
} ) ;
} ; // Returns an array without the rejected item
var without = function without ( list , rejectedItem ) {
return list . filter ( function ( item ) {
return item !== rejectedItem ;
} ) . map ( function ( item ) {
return item ;
} ) ;
} ; // abc-def_ghi -> abcDefGhi
var camelize = function camelize ( str ) {
return str . replace ( /[\-_](\w)/g , function ( match ) {
return match . charAt ( 1 ) . toUpperCase ( ) ;
} ) ;
} ; // Creates an element from string
2021-03-20 20:39:14 +00:00
Dropzone . createElement = function ( string ) {
2020-07-24 12:56:45 +00:00
var div = document . createElement ( "div" ) ;
div . innerHTML = string ;
return div . childNodes [ 0 ] ;
} ; // Tests if given element is inside (or simply is) the container
2021-03-20 20:39:14 +00:00
Dropzone . elementInside = function ( element , container ) {
2020-07-24 12:56:45 +00:00
if ( element === container ) {
return true ;
} // Coffeescript doesn't support do/while loops
while ( element = element . parentNode ) {
if ( element === container ) {
return true ;
}
}
return false ;
} ;
2021-03-20 20:39:14 +00:00
Dropzone . getElement = function ( el , name ) {
2020-07-24 12:56:45 +00:00
var element ;
if ( typeof el === "string" ) {
element = document . querySelector ( el ) ;
} else if ( el . nodeType != null ) {
element = el ;
}
if ( element == null ) {
throw new Error ( "Invalid `" . concat ( name , "` option provided. Please provide a CSS selector or a plain HTML element." ) ) ;
}
return element ;
} ;
2021-03-20 20:39:14 +00:00
Dropzone . getElements = function ( els , name ) {
2020-07-24 12:56:45 +00:00
var el , elements ;
if ( els instanceof Array ) {
elements = [ ] ;
try {
2021-09-17 19:28:20 +00:00
var _iterator23 = dropzone _createForOfIteratorHelper ( els , true ) ,
_step23 ;
2020-07-24 12:56:45 +00:00
try {
2021-09-17 19:28:20 +00:00
for ( _iterator23 . s ( ) ; ! ( _step23 = _iterator23 . n ( ) ) . done ; ) {
el = _step23 . value ;
2020-07-24 12:56:45 +00:00
elements . push ( this . getElement ( el , name ) ) ;
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator23 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator23 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
} catch ( e ) {
elements = null ;
}
} else if ( typeof els === "string" ) {
elements = [ ] ;
2021-09-17 19:28:20 +00:00
var _iterator24 = dropzone _createForOfIteratorHelper ( document . querySelectorAll ( els ) , true ) ,
_step24 ;
2020-07-24 12:56:45 +00:00
try {
2021-09-17 19:28:20 +00:00
for ( _iterator24 . s ( ) ; ! ( _step24 = _iterator24 . n ( ) ) . done ; ) {
el = _step24 . value ;
2020-07-24 12:56:45 +00:00
elements . push ( el ) ;
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator24 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator24 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
} else if ( els . nodeType != null ) {
elements = [ els ] ;
}
if ( elements == null || ! elements . length ) {
throw new Error ( "Invalid `" . concat ( name , "` option provided. Please provide a CSS selector, a plain HTML element or a list of those." ) ) ;
}
return elements ;
} ; // Asks the user the question and calls accepted or rejected accordingly
//
// The default implementation just uses `window.confirm` and then calls the
// appropriate callback.
2021-03-20 20:39:14 +00:00
Dropzone . confirm = function ( question , accepted , rejected ) {
2020-07-24 12:56:45 +00:00
if ( window . confirm ( question ) ) {
return accepted ( ) ;
} else if ( rejected != null ) {
return rejected ( ) ;
}
} ; // Validates the mime type like this:
//
// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept
2021-03-20 20:39:14 +00:00
Dropzone . isValidFile = function ( file , acceptedFiles ) {
2020-07-24 12:56:45 +00:00
if ( ! acceptedFiles ) {
return true ;
} // If there are no accepted mime types, it's OK
acceptedFiles = acceptedFiles . split ( "," ) ;
var mimeType = file . type ;
var baseMimeType = mimeType . replace ( /\/.*$/ , "" ) ;
2021-09-17 19:28:20 +00:00
var _iterator25 = dropzone _createForOfIteratorHelper ( acceptedFiles , true ) ,
_step25 ;
2020-07-24 12:56:45 +00:00
try {
2021-09-17 19:28:20 +00:00
for ( _iterator25 . s ( ) ; ! ( _step25 = _iterator25 . n ( ) ) . done ; ) {
var validType = _step25 . value ;
2020-07-24 12:56:45 +00:00
validType = validType . trim ( ) ;
if ( validType . charAt ( 0 ) === "." ) {
if ( file . name . toLowerCase ( ) . indexOf ( validType . toLowerCase ( ) , file . name . length - validType . length ) !== - 1 ) {
return true ;
}
} else if ( /\/\*$/ . test ( validType ) ) {
// This is something like a image/* mime type
if ( baseMimeType === validType . replace ( /\/.*$/ , "" ) ) {
return true ;
}
} else {
if ( mimeType === validType ) {
return true ;
}
}
}
} catch ( err ) {
2021-09-17 19:28:20 +00:00
_iterator25 . e ( err ) ;
2020-07-24 12:56:45 +00:00
} finally {
2021-09-17 19:28:20 +00:00
_iterator25 . f ( ) ;
2020-07-24 12:56:45 +00:00
}
return false ;
} ; // Augment jQuery
2021-02-10 07:13:13 +00:00
if ( typeof jQuery !== "undefined" && jQuery !== null ) {
2020-07-24 12:56:45 +00:00
jQuery . fn . dropzone = function ( options ) {
return this . each ( function ( ) {
2021-03-20 20:39:14 +00:00
return new Dropzone ( this , options ) ;
2020-07-24 12:56:45 +00:00
} ) ;
} ;
} // Dropzone file status codes
2021-03-20 20:39:14 +00:00
Dropzone . ADDED = "added" ;
Dropzone . QUEUED = "queued" ; // For backwards compatibility. Now, if a file is accepted, it's either queued
2020-07-24 12:56:45 +00:00
// or uploading.
2021-03-20 20:39:14 +00:00
Dropzone . ACCEPTED = Dropzone . QUEUED ;
Dropzone . UPLOADING = "uploading" ;
Dropzone . PROCESSING = Dropzone . UPLOADING ; // alias
2020-07-24 12:56:45 +00:00
2021-03-20 20:39:14 +00:00
Dropzone . CANCELED = "canceled" ;
Dropzone . ERROR = "error" ;
Dropzone . SUCCESS = "success" ;
2020-07-24 12:56:45 +00:00
/ *
Bugfix for iOS 6 and 7
Source : http : //stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
based on the work of https : //github.com/stomita/ios-imagefile-megapixel
* /
// Detecting vertical squash in loaded image.
// Fixes a bug which squash image vertically while drawing into canvas for some images.
// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel
var detectVerticalSquash = function detectVerticalSquash ( img ) {
var iw = img . naturalWidth ;
var ih = img . naturalHeight ;
var canvas = document . createElement ( "canvas" ) ;
canvas . width = 1 ;
canvas . height = ih ;
var ctx = canvas . getContext ( "2d" ) ;
ctx . drawImage ( img , 0 , 0 ) ;
var _ctx$getImageData = ctx . getImageData ( 1 , 0 , 1 , ih ) ,
data = _ctx$getImageData . data ; // search image edge pixel position in case it is squashed vertically.
var sy = 0 ;
var ey = ih ;
var py = ih ;
while ( py > sy ) {
var alpha = data [ ( py - 1 ) * 4 + 3 ] ;
if ( alpha === 0 ) {
ey = py ;
} else {
sy = py ;
}
py = ey + sy >> 1 ;
}
var ratio = py / ih ;
if ( ratio === 0 ) {
return 1 ;
} else {
return ratio ;
}
} ; // A replacement for context.drawImage
// (args are for source and destination).
var drawImageIOSFix = function drawImageIOSFix ( ctx , img , sx , sy , sw , sh , dx , dy , dw , dh ) {
var vertSquashRatio = detectVerticalSquash ( img ) ;
return ctx . drawImage ( img , sx , sy , sw , sh , dx , dy , dw , dh / vertSquashRatio ) ;
} ; // Based on MinifyJpeg
// Source: http://www.perry.cz/files/ExifRestorer.js
// http://elicon.blog57.fc2.com/blog-entry-206.html
var ExifRestore = /*#__PURE__*/ function ( ) {
function ExifRestore ( ) {
2021-02-10 07:13:13 +00:00
dropzone _classCallCheck ( this , ExifRestore ) ;
2020-07-24 12:56:45 +00:00
}
2021-02-10 07:13:13 +00:00
dropzone _createClass ( ExifRestore , null , [ {
2020-07-24 12:56:45 +00:00
key : "initClass" ,
value : function initClass ( ) {
2021-02-10 07:13:13 +00:00
this . KEY _STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" ;
2020-07-24 12:56:45 +00:00
}
} , {
key : "encode64" ,
value : function encode64 ( input ) {
2021-02-10 07:13:13 +00:00
var output = "" ;
2020-07-24 12:56:45 +00:00
var chr1 = undefined ;
var chr2 = undefined ;
2021-02-10 07:13:13 +00:00
var chr3 = "" ;
2020-07-24 12:56:45 +00:00
var enc1 = undefined ;
var enc2 = undefined ;
var enc3 = undefined ;
2021-02-10 07:13:13 +00:00
var enc4 = "" ;
2020-07-24 12:56:45 +00:00
var i = 0 ;
while ( true ) {
chr1 = input [ i ++ ] ;
chr2 = input [ i ++ ] ;
chr3 = input [ i ++ ] ;
enc1 = chr1 >> 2 ;
enc2 = ( chr1 & 3 ) << 4 | chr2 >> 4 ;
enc3 = ( chr2 & 15 ) << 2 | chr3 >> 6 ;
enc4 = chr3 & 63 ;
if ( isNaN ( chr2 ) ) {
enc3 = enc4 = 64 ;
} else if ( isNaN ( chr3 ) ) {
enc4 = 64 ;
}
output = output + this . KEY _STR . charAt ( enc1 ) + this . KEY _STR . charAt ( enc2 ) + this . KEY _STR . charAt ( enc3 ) + this . KEY _STR . charAt ( enc4 ) ;
2021-02-10 07:13:13 +00:00
chr1 = chr2 = chr3 = "" ;
enc1 = enc2 = enc3 = enc4 = "" ;
2020-07-24 12:56:45 +00:00
if ( ! ( i < input . length ) ) {
break ;
}
}
return output ;
}
} , {
key : "restore" ,
value : function restore ( origFileBase64 , resizedFileBase64 ) {
2021-02-10 07:13:13 +00:00
if ( ! origFileBase64 . match ( "data:image/jpeg;base64," ) ) {
2020-07-24 12:56:45 +00:00
return resizedFileBase64 ;
}
2021-02-10 07:13:13 +00:00
var rawImage = this . decode64 ( origFileBase64 . replace ( "data:image/jpeg;base64," , "" ) ) ;
2020-07-24 12:56:45 +00:00
var segments = this . slice2Segments ( rawImage ) ;
var image = this . exifManipulation ( resizedFileBase64 , segments ) ;
return "data:image/jpeg;base64," . concat ( this . encode64 ( image ) ) ;
}
} , {
key : "exifManipulation" ,
value : function exifManipulation ( resizedFileBase64 , segments ) {
var exifArray = this . getExifArray ( segments ) ;
var newImageArray = this . insertExif ( resizedFileBase64 , exifArray ) ;
var aBuffer = new Uint8Array ( newImageArray ) ;
return aBuffer ;
}
} , {
key : "getExifArray" ,
value : function getExifArray ( segments ) {
var seg = undefined ;
var x = 0 ;
while ( x < segments . length ) {
seg = segments [ x ] ;
if ( seg [ 0 ] === 255 & seg [ 1 ] === 225 ) {
return seg ;
}
x ++ ;
}
return [ ] ;
}
} , {
key : "insertExif" ,
value : function insertExif ( resizedFileBase64 , exifArray ) {
2021-02-10 07:13:13 +00:00
var imageData = resizedFileBase64 . replace ( "data:image/jpeg;base64," , "" ) ;
2020-07-24 12:56:45 +00:00
var buf = this . decode64 ( imageData ) ;
var separatePoint = buf . indexOf ( 255 , 3 ) ;
var mae = buf . slice ( 0 , separatePoint ) ;
var ato = buf . slice ( separatePoint ) ;
var array = mae ;
array = array . concat ( exifArray ) ;
array = array . concat ( ato ) ;
return array ;
}
} , {
key : "slice2Segments" ,
value : function slice2Segments ( rawImageArray ) {
var head = 0 ;
var segments = [ ] ;
while ( true ) {
var length ;
if ( rawImageArray [ head ] === 255 & rawImageArray [ head + 1 ] === 218 ) {
break ;
}
if ( rawImageArray [ head ] === 255 & rawImageArray [ head + 1 ] === 216 ) {
head += 2 ;
} else {
length = rawImageArray [ head + 2 ] * 256 + rawImageArray [ head + 3 ] ;
var endPoint = head + length + 2 ;
var seg = rawImageArray . slice ( head , endPoint ) ;
segments . push ( seg ) ;
head = endPoint ;
}
if ( head > rawImageArray . length ) {
break ;
}
}
return segments ;
}
} , {
key : "decode64" ,
value : function decode64 ( input ) {
2021-02-10 07:13:13 +00:00
var output = "" ;
2020-07-24 12:56:45 +00:00
var chr1 = undefined ;
var chr2 = undefined ;
2021-02-10 07:13:13 +00:00
var chr3 = "" ;
2020-07-24 12:56:45 +00:00
var enc1 = undefined ;
var enc2 = undefined ;
var enc3 = undefined ;
2021-02-10 07:13:13 +00:00
var enc4 = "" ;
2020-07-24 12:56:45 +00:00
var i = 0 ;
var buf = [ ] ; // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
var base64test = /[^A-Za-z0-9\+\/\=]/g ;
if ( base64test . exec ( input ) ) {
2021-02-10 07:13:13 +00:00
console . warn ( "There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding." ) ;
2020-07-24 12:56:45 +00:00
}
2021-02-10 07:13:13 +00:00
input = input . replace ( /[^A-Za-z0-9\+\/\=]/g , "" ) ;
2020-07-24 12:56:45 +00:00
while ( true ) {
enc1 = this . KEY _STR . indexOf ( input . charAt ( i ++ ) ) ;
enc2 = this . KEY _STR . indexOf ( input . charAt ( i ++ ) ) ;
enc3 = this . KEY _STR . indexOf ( input . charAt ( i ++ ) ) ;
enc4 = this . KEY _STR . indexOf ( input . charAt ( i ++ ) ) ;
chr1 = enc1 << 2 | enc2 >> 4 ;
chr2 = ( enc2 & 15 ) << 4 | enc3 >> 2 ;
chr3 = ( enc3 & 3 ) << 6 | enc4 ;
buf . push ( chr1 ) ;
if ( enc3 !== 64 ) {
buf . push ( chr2 ) ;
}
if ( enc4 !== 64 ) {
buf . push ( chr3 ) ;
}
2021-02-10 07:13:13 +00:00
chr1 = chr2 = chr3 = "" ;
enc1 = enc2 = enc3 = enc4 = "" ;
2020-07-24 12:56:45 +00:00
if ( ! ( i < input . length ) ) {
break ;
}
}
return buf ;
}
} ] ) ;
return ExifRestore ;
} ( ) ;
ExifRestore . initClass ( ) ;
/ *
* contentloaded . js
*
* Author : Diego Perini ( diego . perini at gmail . com )
* Summary : cross - browser wrapper for DOMContentLoaded
* Updated : 20101020
* License : MIT
* Version : 1.2
*
* URL :
* http : //javascript.nwbox.com/ContentLoaded/
* http : //javascript.nwbox.com/ContentLoaded/MIT-LICENSE
* /
// @win window reference
// @fn function reference
var contentLoaded = function contentLoaded ( win , fn ) {
var done = false ;
var top = true ;
var doc = win . document ;
var root = doc . documentElement ;
var add = doc . addEventListener ? "addEventListener" : "attachEvent" ;
var rem = doc . addEventListener ? "removeEventListener" : "detachEvent" ;
var pre = doc . addEventListener ? "" : "on" ;
var init = function init ( e ) {
if ( e . type === "readystatechange" && doc . readyState !== "complete" ) {
return ;
}
( e . type === "load" ? win : doc ) [ rem ] ( pre + e . type , init , false ) ;
if ( ! done && ( done = true ) ) {
return fn . call ( win , e . type || e ) ;
}
} ;
var poll = function poll ( ) {
try {
root . doScroll ( "left" ) ;
} catch ( e ) {
setTimeout ( poll , 50 ) ;
return ;
}
return init ( "poll" ) ;
} ;
if ( doc . readyState !== "complete" ) {
if ( doc . createEventObject && root . doScroll ) {
try {
top = ! win . frameElement ;
} catch ( error ) { }
if ( top ) {
poll ( ) ;
}
}
doc [ add ] ( pre + "DOMContentLoaded" , init , false ) ;
doc [ add ] ( pre + "readystatechange" , init , false ) ;
return win [ add ] ( pre + "load" , init , false ) ;
}
} ; // As a single function to be able to write tests.
2021-03-20 20:39:14 +00:00
Dropzone . _autoDiscoverFunction = function ( ) {
if ( Dropzone . autoDiscover ) {
return Dropzone . discover ( ) ;
2020-07-24 12:56:45 +00:00
}
} ;
2021-03-20 20:39:14 +00:00
contentLoaded ( window , Dropzone . _autoDiscoverFunction ) ;
2020-07-24 12:56:45 +00:00
function _ _guard _ _ ( value , transform ) {
2021-02-10 07:13:13 +00:00
return typeof value !== "undefined" && value !== null ? transform ( value ) : undefined ;
2020-07-24 12:56:45 +00:00
}
function _ _guardMethod _ _ ( obj , methodName , transform ) {
2021-02-10 07:13:13 +00:00
if ( typeof obj !== "undefined" && obj !== null && typeof obj [ methodName ] === "function" ) {
2020-07-24 12:56:45 +00:00
return transform ( obj , methodName ) ;
} else {
return undefined ;
}
}
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
; // CONCATENATED MODULE: ./tool/dropzone.dist.js
2021-02-10 07:13:13 +00:00
/// Make Dropzone a global variable.
2021-03-20 20:39:14 +00:00
window . Dropzone = Dropzone ;
/* harmony default export */ var dropzone _dist = ( Dropzone ) ;
2021-02-10 07:13:13 +00:00
2021-03-20 20:39:14 +00:00
} ( ) ;
/******/ return _ _webpack _exports _ _ ;
/******/ } ) ( )
;
2021-02-10 07:13:13 +00:00
} ) ;