import { makeMap } from './makeMap' ; export { makeMap } ; export * from './patchFlags' ; export * from './shapeFlags' ; export * from './slotFlags' ; export * from './globalsWhitelist' ; export * from './codeframe' ; export * from './normalizeProp' ; export * from './domTagConfig' ; export * from './domAttrConfig' ; export * from './escapeHtml' ; export * from './looseEqual' ; export * from './toDisplayString' ; /**
 * List of @babel/parser plugins that are used for template expression
 * transforms and SFC script transforms. By default we enable proposals slated
 * for ES2020. This will need to be updated as the spec moves forward.
 * Full list at https://babeljs.io/docs/en/next/babel-parser#plugins
 */ export const babelParserDefaultPlugins = [ 'bigInt' , 'optionalChaining' , 'nullishCoalescingOperator' ] as const ; export const EMPTY_OBJ = __DEV__ ? Object . freeze ( { } ) : { } ; export const EMPTY_ARR = __DEV__ ? Object . freeze ( [ ] ) : [ ] ; export const NOOP = ( ) => { } ; /**
 * Always return false.
 */ export const NO = ( ) => false ; const onRE = /^on[^a-z]/ ; export const isOn = ( key ) => onRE . test ( key ) ; export const isModelListener = ( key ) => key . startsWith ( 'onUpdate:' ) ; export const extend = Object . assign ; export const remove = < T > ( arr , el ) => { const i = arr . indexOf ( el ) ; if ( i > - 1 ) { arr . splice ( i , 1 ) ; } } ; const hasOwnProperty = Object . prototype . hasOwnProperty ; export const hasOwn = ( val , key ) : key is keyof typeof val => hasOwnProperty . call ( val , key ) ; export const isArray = Array . isArray ; export const isMap = ( val ) : val is Map < any , any > => toTypeString ( val ) === '[object Map]' ; export const isSet = ( val ) : val is Set < any > => toTypeString ( val ) === '[object Set]' ; export const isDate = ( val ) : val is Date => val instanceof Date ; export const isFunction = ( val ) : val is Function => typeof val === 'function' ; export const isString = ( val ) : val is string => typeof val === 'string' ; export const isSymbol = ( val ) : val is symbol => typeof val === 'symbol' ; export const isObject = ( val ) : val is Record < any , any > => val !== null && typeof val === 'object' ; export const isPromise = < T = any > ( val ) : val is Promise < T > => { return isObject ( val ) && isFunction ( val . then ) && isFunction ( val . catch ) ; } ; export const objectToString = Object . prototype . toString ; export const toTypeString = ( value ) : string => objectToString . call ( value ) ; export const toRawType = ( value ) : string => { return toTypeString ( value ) . slice ( 8 , - 1 ) ; } ; export const isPlainObject = ( val ) : val is object => toTypeString ( val ) === '[object Object]' ; export const isIntegerKey = ( key ) => isString ( key ) && key !== 'NaN' && key [ 0 ] !== '-' && '' + parseInt ( key , 10 ) === key ; export const isReservedProp = makeMap ( ',key,ref,' + 'onVnodeBeforeMount,onVnodeMounted,' + 'onVnodeBeforeUpdate,onVnodeUpdated,' + 'onVnodeBeforeUnmount,onVnodeUnmounted' ) ; const cacheStringFunction = < T extends ( str : string ) => string > ( fn ) : T => { const cache = Object . create ( null ) ; return ( ( str ) => { const hit = cache [ str ] ; return hit || ( cache [ str ] = fn ( str ) ) ; } ) as any ; } ; const camelizeRE = /-(\w)/g ; private export const camelize = cacheStringFunction ( ( str ) : string => { return str . replace ( camelizeRE , ( _ , c ) => ( c ? c . toUpperCase ( ) : '' ) ) ; } ) ; const hyphenateRE = /\B([A-Z])/g ; private export const hyphenate = cacheStringFunction ( ( str ) => str . replace ( hyphenateRE , '-$1' ) . toLowerCase ( ) ) ; private export const capitalize = cacheStringFunction ( ( str ) => str . charAt ( 0 ) . toUpperCase ( ) + str . slice ( 1 ) ) ; private export const toHandlerKey = cacheStringFunction ( ( str ) => str ? `on${ capitalize ( str ) }` : `` ) ; export const hasChanged = ( value , oldValue ) : boolean => ! Object . is ( value , oldValue ) ; export const invokeArrayFns = ( fns , arg ? ) => { for ( let i = 0 ; i < fns . length ; i ++ ) { fns [ i ] ( arg ) ; } } ; export const def = ( obj , key , value ) => { Object . defineProperty ( obj , key , { configurable : true , enumerable : false , value } ) ; } ; export const toNumber = ( val ) : any => { const n = parseFloat ( val ) ; return isNaN ( n ) ? val : n ; } ; let _globalThis ; export const getGlobalThis = ( ) : any => { return ( _globalThis || ( _globalThis = typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : { } ) ) ; } ;