2018-12-13 23:41:57 -05:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "element" ] =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // 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 } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
2021-05-25 01:22:08 -04:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = "o/Ny" ) ;
2018-12-13 23:41:57 -05:00
/******/ } )
/************************************************************************/
/******/ ( {
2021-05-25 01:22:08 -04:00
/***/ "25BE" :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-07-21 08:14:37 -04:00
2021-05-25 01:22:08 -04:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _iterableToArray ; } ) ;
function _iterableToArray ( iter ) {
if ( typeof Symbol !== "undefined" && Symbol . iterator in Object ( iter ) ) return Array . from ( iter ) ;
}
2020-07-21 08:14:37 -04:00
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "BsWD" :
2020-01-08 06:57:23 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-13 23:41:57 -05:00
2020-01-08 06:57:23 -05:00
"use strict" ;
2021-05-25 01:22:08 -04:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _unsupportedIterableToArray ; } ) ;
/* harmony import */ var _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( "a3WO" ) ;
2020-01-08 06:57:23 -05:00
2021-05-25 01:22:08 -04:00
function _unsupportedIterableToArray ( o , minLen ) {
if ( ! o ) return ;
if ( typeof o === "string" ) return Object ( _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( 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 Object ( _babel _runtime _helpers _esm _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
2020-01-08 06:57:23 -05:00
}
2021-05-25 01:22:08 -04:00
/***/ } ) ,
2020-01-08 06:57:23 -05:00
2021-05-25 01:22:08 -04:00
/***/ "DSFK" :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-03-23 19:40:19 -04:00
2021-05-25 01:22:08 -04:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayWithHoles ; } ) ;
function _arrayWithHoles ( arr ) {
if ( Array . isArray ( arr ) ) return arr ;
2020-01-08 06:57:23 -05:00
}
2018-12-13 23:41:57 -05:00
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "Ff2n" :
2020-07-07 10:43:35 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _objectWithoutProperties ; } ) ;
2021-05-25 01:22:08 -04:00
/* harmony import */ var _babel _runtime _helpers _esm _objectWithoutPropertiesLoose _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( "zLVn" ) ;
2020-07-07 10:43:35 -04:00
function _objectWithoutProperties ( source , excluded ) {
if ( source == null ) return { } ;
2021-01-27 21:04:13 -05:00
var target = Object ( _babel _runtime _helpers _esm _objectWithoutPropertiesLoose _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( source , excluded ) ;
2020-07-07 10:43:35 -04:00
var key , i ;
if ( Object . getOwnPropertySymbols ) {
var sourceSymbolKeys = Object . getOwnPropertySymbols ( source ) ;
for ( i = 0 ; i < sourceSymbolKeys . length ; i ++ ) {
key = sourceSymbolKeys [ i ] ;
if ( excluded . indexOf ( key ) >= 0 ) continue ;
if ( ! Object . prototype . propertyIsEnumerable . call ( source , key ) ) continue ;
target [ key ] = source [ key ] ;
}
}
return target ;
}
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "KQm4" :
2020-06-26 09:33:47 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 07:50:29 -04:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _toConsumableArray ; } ) ;
2020-06-26 09:33:47 -04:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
2021-05-25 01:22:08 -04:00
var arrayLikeToArray = _ _webpack _require _ _ ( "a3WO" ) ;
2020-06-26 09:33:47 -04:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles ( arr ) {
if ( Array . isArray ( arr ) ) return Object ( arrayLikeToArray [ "a" /* default */ ] ) ( arr ) ;
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
2021-05-25 01:22:08 -04:00
var iterableToArray = _ _webpack _require _ _ ( "25BE" ) ;
2020-06-26 09:33:47 -04:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2021-05-25 01:22:08 -04:00
var unsupportedIterableToArray = _ _webpack _require _ _ ( "BsWD" ) ;
2020-06-26 09:33:47 -04:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread ( ) {
throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function _toConsumableArray ( arr ) {
return _arrayWithoutHoles ( arr ) || Object ( iterableToArray [ "a" /* default */ ] ) ( arr ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr ) || _nonIterableSpread ( ) ;
}
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "ODXe" :
2020-03-23 19:40:19 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2021-05-25 01:22:08 -04:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _slicedToArray ; } ) ;
2020-03-23 19:40:19 -04:00
2021-05-25 01:22:08 -04:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
var arrayWithHoles = _ _webpack _require _ _ ( "DSFK" ) ;
2020-03-23 19:40:19 -04:00
2021-05-25 01:22:08 -04:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit ( arr , i ) {
if ( typeof Symbol === "undefined" || ! ( Symbol . iterator in Object ( arr ) ) ) return ;
var _arr = [ ] ;
var _n = true ;
var _d = false ;
var _e = undefined ;
2020-03-23 19:40:19 -04:00
2021-05-25 01:22:08 -04:00
try {
for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) {
_arr . push ( _s . value ) ;
2020-03-23 19:40:19 -04:00
2021-05-25 01:22:08 -04:00
if ( i && _arr . length === i ) break ;
}
} catch ( err ) {
_d = true ;
_e = err ;
} finally {
try {
if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ;
} finally {
if ( _d ) throw _e ;
}
}
2020-03-23 19:40:19 -04:00
2021-05-25 01:22:08 -04:00
return _arr ;
2020-03-23 19:40:19 -04:00
}
2021-05-25 01:22:08 -04:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = _ _webpack _require _ _ ( "BsWD" ) ;
2020-03-23 19:40:19 -04:00
2021-05-25 01:22:08 -04:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
var nonIterableRest = _ _webpack _require _ _ ( "PYwp" ) ;
2020-03-23 19:40:19 -04:00
2021-05-25 01:22:08 -04:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
2020-03-16 18:07:16 -04:00
2020-01-08 06:57:23 -05:00
2021-05-25 01:22:08 -04:00
function _slicedToArray ( arr , i ) {
return Object ( arrayWithHoles [ "a" /* default */ ] ) ( arr ) || _iterableToArrayLimit ( arr , i ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr , i ) || Object ( nonIterableRest [ "a" /* default */ ] ) ( ) ;
2020-01-08 06:57:23 -05:00
}
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "PYwp" :
2020-01-08 06:57:23 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _nonIterableRest ; } ) ;
function _nonIterableRest ( ) {
2020-03-23 19:40:19 -04:00
throw new TypeError ( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
2020-01-08 06:57:23 -05:00
}
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "U8pU" :
2020-06-26 09:33:47 -04:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _typeof ; } ) ;
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 ) ;
}
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "Vx3V" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "escapeHtml" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "YLtl" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "lodash" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "a3WO" :
2020-02-06 16:03:31 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2021-05-25 01:22:08 -04:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayLikeToArray ; } ) ;
function _arrayLikeToArray ( arr , len ) {
if ( len == null || len > arr . length ) len = arr . length ;
2020-02-06 16:03:31 -05:00
2021-05-25 01:22:08 -04:00
for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) {
arr2 [ i ] = arr [ i ] ;
2020-02-06 16:03:31 -05:00
}
2021-05-25 01:22:08 -04:00
return arr2 ;
2020-02-06 16:03:31 -05:00
}
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "cDcd" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "React" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "faye" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "ReactDOM" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "o/Ny" :
2018-12-13 23:41:57 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 07:50:29 -04:00
// ESM COMPAT FLAG
2018-12-13 23:41:57 -05:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2020-06-29 07:50:29 -04:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createInterpolateElement" , function ( ) { return /* reexport */ create _interpolate _element ; } ) ;
2021-01-27 21:04:13 -05:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "Children" , function ( ) { return /* reexport */ external _React _ [ "Children" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "cloneElement" , function ( ) { return /* reexport */ external _React _ [ "cloneElement" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "Component" , function ( ) { return /* reexport */ external _React _ [ "Component" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createContext" , function ( ) { return /* reexport */ external _React _ [ "createContext" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createElement" , function ( ) { return /* reexport */ external _React _ [ "createElement" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createRef" , function ( ) { return /* reexport */ external _React _ [ "createRef" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "forwardRef" , function ( ) { return /* reexport */ external _React _ [ "forwardRef" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "Fragment" , function ( ) { return /* reexport */ external _React _ [ "Fragment" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isValidElement" , function ( ) { return /* reexport */ external _React _ [ "isValidElement" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "memo" , function ( ) { return /* reexport */ external _React _ [ "memo" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "StrictMode" , function ( ) { return /* reexport */ external _React _ [ "StrictMode" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useCallback" , function ( ) { return /* reexport */ external _React _ [ "useCallback" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useContext" , function ( ) { return /* reexport */ external _React _ [ "useContext" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useDebugValue" , function ( ) { return /* reexport */ external _React _ [ "useDebugValue" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useEffect" , function ( ) { return /* reexport */ external _React _ [ "useEffect" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useImperativeHandle" , function ( ) { return /* reexport */ external _React _ [ "useImperativeHandle" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useLayoutEffect" , function ( ) { return /* reexport */ external _React _ [ "useLayoutEffect" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useMemo" , function ( ) { return /* reexport */ external _React _ [ "useMemo" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useReducer" , function ( ) { return /* reexport */ external _React _ [ "useReducer" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useRef" , function ( ) { return /* reexport */ external _React _ [ "useRef" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "useState" , function ( ) { return /* reexport */ external _React _ [ "useState" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "lazy" , function ( ) { return /* reexport */ external _React _ [ "lazy" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "Suspense" , function ( ) { return /* reexport */ external _React _ [ "Suspense" ] ; } ) ;
2020-06-29 07:50:29 -04:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "concatChildren" , function ( ) { return /* reexport */ concatChildren ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "switchChildrenNodeName" , function ( ) { return /* reexport */ switchChildrenNodeName ; } ) ;
2021-01-27 21:04:13 -05:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "createPortal" , function ( ) { return /* reexport */ external _ReactDOM _ [ "createPortal" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "findDOMNode" , function ( ) { return /* reexport */ external _ReactDOM _ [ "findDOMNode" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "render" , function ( ) { return /* reexport */ external _ReactDOM _ [ "render" ] ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "unmountComponentAtNode" , function ( ) { return /* reexport */ external _ReactDOM _ [ "unmountComponentAtNode" ] ; } ) ;
2020-06-29 07:50:29 -04:00
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "isEmptyElement" , function ( ) { return /* reexport */ utils _isEmptyElement ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "Platform" , function ( ) { return /* reexport */ platform ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "renderToString" , function ( ) { return /* reexport */ serialize ; } ) ;
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "RawHTML" , function ( ) { return /* reexport */ RawHTML ; } ) ;
2020-01-08 06:57:23 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
2021-05-25 01:22:08 -04:00
var slicedToArray = _ _webpack _require _ _ ( "ODXe" ) ;
2020-01-08 06:57:23 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
2021-05-25 01:22:08 -04:00
var esm _typeof = _ _webpack _require _ _ ( "U8pU" ) ;
2020-01-08 06:57:23 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
2021-05-25 01:22:08 -04:00
var toConsumableArray = _ _webpack _require _ _ ( "KQm4" ) ;
2020-01-08 06:57:23 -05:00
2021-01-27 21:04:13 -05:00
// EXTERNAL MODULE: external "React"
2021-05-25 01:22:08 -04:00
var external _React _ = _ _webpack _require _ _ ( "cDcd" ) ;
2020-01-08 06:57:23 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/create-interpolate-element.js
/ * *
2021-02-02 00:17:13 -05:00
* Internal dependencies
2020-01-08 06:57:23 -05:00
* /
2020-06-26 09:33:47 -04:00
/** @typedef {import('./react').WPElement} WPElement */
2020-01-08 06:57:23 -05:00
var indoc , offset , output , stack ;
/ * *
* Matches tags in the localized string
*
* This is used for extracting the tag pattern groups for parsing the localized
* string and along with the map converting it to a react element .
*
* There are four references extracted using this tokenizer :
*
* match : Full match of the tag ( i . e . < strong > , < /strong>, <br/ > )
* isClosing : The closing slash , it it exists .
* name : The name portion of the tag ( strong , br ) ( if )
* isSelfClosed : The slash on a self closing tag , if it exists .
*
* @ type { RegExp }
* /
var tokenizer = /<(\/)?(\w+)\s*(\/)?>/g ;
2020-06-26 09:33:47 -04:00
/ * *
* The stack frame tracking parse progress .
*
* @ typedef Frame
*
* @ property { WPElement } element A parent element which may still have
* @ property { number } tokenStart Offset at which parent element first
* appears .
* @ property { number } tokenLength Length of string marking start of parent
* element .
* @ property { number } [ prevOffset ] Running offset at which parsing should
* continue .
* @ property { number } [ leadingTextStart ] Offset at which last closing element
* finished , used for finding text between
* elements .
* @ property { WPElement [ ] } children Children .
* /
2020-01-08 06:57:23 -05:00
/ * *
* Tracks recursive - descent parse state .
*
* This is a Stack frame holding parent elements until all children have been
* parsed .
*
* @ private
2020-06-26 09:33:47 -04:00
* @ param { WPElement } element A parent element which may still have
* nested children not yet parsed .
* @ param { number } tokenStart Offset at which parent element first
* appears .
* @ param { number } tokenLength Length of string marking start of parent
* element .
* @ param { number } [ prevOffset ] Running offset at which parsing should
* continue .
* @ param { number } [ leadingTextStart ] Offset at which last closing element
* finished , used for finding text between
* elements .
2020-01-08 06:57:23 -05:00
*
* @ return { Frame } The stack frame tracking parse progress .
* /
2020-06-26 09:33:47 -04:00
function createFrame ( element , tokenStart , tokenLength , prevOffset , leadingTextStart ) {
2020-01-08 06:57:23 -05:00
return {
element : element ,
tokenStart : tokenStart ,
tokenLength : tokenLength ,
prevOffset : prevOffset ,
leadingTextStart : leadingTextStart ,
children : [ ]
} ;
}
/ * *
* This function creates an interpolated element from a passed in string with
* specific tags matching how the string should be converted to an element via
* the conversion map value .
*
* @ example
* For example , for the given string :
*
* " This is a < span > string < / s p a n > w i t h < a > a l i n k < / a > a n d a s e l f - c l o s i n g
* < CustomComponentB / > tag "
*
* You would have something like this as the conversionMap value :
*
* ` ` ` js
* {
* span : < span / > ,
* a : < a href = { 'https://github.com' } / > ,
* CustomComponentB : < CustomComponent / > ,
* }
* ` ` `
*
* @ param { string } interpolatedString The interpolation string to be parsed .
* @ param { Object } conversionMap The map used to convert the string to
* a react element .
* @ throws { TypeError }
* @ return { WPElement } A wp element .
* /
var create _interpolate _element _createInterpolateElement = function createInterpolateElement ( interpolatedString , conversionMap ) {
indoc = interpolatedString ;
offset = 0 ;
output = [ ] ;
stack = [ ] ;
tokenizer . lastIndex = 0 ;
if ( ! create _interpolate _element _isValidConversionMap ( conversionMap ) ) {
throw new TypeError ( 'The conversionMap provided is not valid. It must be an object with values that are WPElements' ) ;
}
do { // twiddle our thumbs
} while ( proceed ( conversionMap ) ) ;
2021-01-27 21:04:13 -05:00
return external _React _ [ "createElement" ] . apply ( void 0 , [ external _React _ [ "Fragment" ] , null ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( output ) ) ) ;
2020-01-08 06:57:23 -05:00
} ;
/ * *
* Validate conversion map .
*
* A map is considered valid if it ' s an object and every value in the object
* is a WPElement
*
* @ private
*
* @ param { Object } conversionMap The map being validated .
*
* @ return { boolean } True means the map is valid .
* /
var create _interpolate _element _isValidConversionMap = function isValidConversionMap ( conversionMap ) {
var isObject = Object ( esm _typeof [ "a" /* default */ ] ) ( conversionMap ) === 'object' ;
var values = isObject && Object . values ( conversionMap ) ;
return isObject && values . length && values . every ( function ( element ) {
2021-01-27 21:04:13 -05:00
return Object ( external _React _ [ "isValidElement" ] ) ( element ) ;
2020-01-08 06:57:23 -05:00
} ) ;
} ;
/ * *
* This is the iterator over the matches in the string .
*
* @ private
*
* @ param { Object } conversionMap The conversion map for the string .
*
* @ return { boolean } true for continuing to iterate , false for finished .
* /
function proceed ( conversionMap ) {
var next = nextToken ( ) ;
var _next = Object ( slicedToArray [ "a" /* default */ ] ) ( next , 4 ) ,
tokenType = _next [ 0 ] ,
name = _next [ 1 ] ,
startOffset = _next [ 2 ] ,
tokenLength = _next [ 3 ] ;
var stackDepth = stack . length ;
var leadingTextStart = startOffset > offset ? offset : null ;
if ( ! conversionMap [ name ] ) {
addText ( ) ;
return false ;
}
switch ( tokenType ) {
case 'no-more-tokens' :
if ( stackDepth !== 0 ) {
var _stack$pop = stack . pop ( ) ,
stackLeadingText = _stack$pop . leadingTextStart ,
tokenStart = _stack$pop . tokenStart ;
output . push ( indoc . substr ( stackLeadingText , tokenStart ) ) ;
}
addText ( ) ;
return false ;
case 'self-closed' :
if ( 0 === stackDepth ) {
if ( null !== leadingTextStart ) {
output . push ( indoc . substr ( leadingTextStart , startOffset - leadingTextStart ) ) ;
}
output . push ( conversionMap [ name ] ) ;
offset = startOffset + tokenLength ;
return true ;
} // otherwise we found an inner element
2020-06-26 09:33:47 -04:00
addChild ( createFrame ( conversionMap [ name ] , startOffset , tokenLength ) ) ;
2020-01-08 06:57:23 -05:00
offset = startOffset + tokenLength ;
return true ;
case 'opener' :
2020-06-26 09:33:47 -04:00
stack . push ( createFrame ( conversionMap [ name ] , startOffset , tokenLength , startOffset + tokenLength , leadingTextStart ) ) ;
2020-01-08 06:57:23 -05:00
offset = startOffset + tokenLength ;
return true ;
case 'closer' :
// if we're not nesting then this is easy - close the block
if ( 1 === stackDepth ) {
closeOuterElement ( startOffset ) ;
offset = startOffset + tokenLength ;
return true ;
} // otherwise we're nested and we have to close out the current
// block and add it as a innerBlock to the parent
var stackTop = stack . pop ( ) ;
var text = indoc . substr ( stackTop . prevOffset , startOffset - stackTop . prevOffset ) ;
stackTop . children . push ( text ) ;
stackTop . prevOffset = startOffset + tokenLength ;
2020-06-26 09:33:47 -04:00
var frame = createFrame ( stackTop . element , stackTop . tokenStart , stackTop . tokenLength , startOffset + tokenLength ) ;
2020-01-08 06:57:23 -05:00
frame . children = stackTop . children ;
addChild ( frame ) ;
offset = startOffset + tokenLength ;
return true ;
default :
addText ( ) ;
return false ;
}
}
/ * *
* Grabs the next token match in the string and returns it ' s details .
*
* @ private
*
* @ return { Array } An array of details for the token matched .
* /
function nextToken ( ) {
var matches = tokenizer . exec ( indoc ) ; // we have no more tokens
if ( null === matches ) {
return [ 'no-more-tokens' ] ;
}
var startedAt = matches . index ;
var _matches = Object ( slicedToArray [ "a" /* default */ ] ) ( matches , 4 ) ,
match = _matches [ 0 ] ,
isClosing = _matches [ 1 ] ,
name = _matches [ 2 ] ,
isSelfClosed = _matches [ 3 ] ;
var length = match . length ;
if ( isSelfClosed ) {
return [ 'self-closed' , name , startedAt , length ] ;
}
if ( isClosing ) {
return [ 'closer' , name , startedAt , length ] ;
}
return [ 'opener' , name , startedAt , length ] ;
}
/ * *
* Pushes text extracted from the indoc string to the output stack given the
* current rawLength value and offset ( if rawLength is provided ) or the
* indoc . length and offset .
*
* @ private
* /
function addText ( ) {
var length = indoc . length - offset ;
if ( 0 === length ) {
return ;
}
output . push ( indoc . substr ( offset , length ) ) ;
}
/ * *
* Pushes a child element to the associated parent element ' s children for the
* parent currently active in the stack .
*
* @ private
*
* @ param { Frame } frame The Frame containing the child element and it ' s
* token information .
* /
function addChild ( frame ) {
var element = frame . element ,
tokenStart = frame . tokenStart ,
tokenLength = frame . tokenLength ,
prevOffset = frame . prevOffset ,
children = frame . children ;
var parent = stack [ stack . length - 1 ] ;
var text = indoc . substr ( parent . prevOffset , tokenStart - parent . prevOffset ) ;
if ( text ) {
parent . children . push ( text ) ;
}
2021-01-27 21:04:13 -05:00
parent . children . push ( external _React _ [ "cloneElement" ] . apply ( void 0 , [ element , null ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( children ) ) ) ) ;
2020-01-08 06:57:23 -05:00
parent . prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength ;
}
/ * *
* This is called for closing tags . It creates the element currently active in
* the stack .
*
* @ private
*
* @ param { number } endOffset Offset at which the closing tag for the element
* begins in the string . If this is greater than the
* prevOffset attached to the element , then this
* helps capture any remaining nested text nodes in
* the element .
* /
function closeOuterElement ( endOffset ) {
var _stack$pop2 = stack . pop ( ) ,
element = _stack$pop2 . element ,
leadingTextStart = _stack$pop2 . leadingTextStart ,
prevOffset = _stack$pop2 . prevOffset ,
tokenStart = _stack$pop2 . tokenStart ,
children = _stack$pop2 . children ;
var text = endOffset ? indoc . substr ( prevOffset , endOffset - prevOffset ) : indoc . substr ( prevOffset ) ;
if ( text ) {
children . push ( text ) ;
}
if ( null !== leadingTextStart ) {
output . push ( indoc . substr ( leadingTextStart , tokenStart - leadingTextStart ) ) ;
}
2021-01-27 21:04:13 -05:00
output . push ( external _React _ [ "cloneElement" ] . apply ( void 0 , [ element , null ] . concat ( Object ( toConsumableArray [ "a" /* default */ ] ) ( children ) ) ) ) ;
2020-01-08 06:57:23 -05:00
}
/* harmony default export */ var create _interpolate _element = ( create _interpolate _element _createInterpolateElement ) ;
2020-02-06 16:03:31 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
2021-05-25 01:22:08 -04:00
var defineProperty = _ _webpack _require _ _ ( "rePB" ) ;
2018-12-13 23:41:57 -05:00
2020-01-08 06:57:23 -05:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
2021-05-25 01:22:08 -04:00
var objectWithoutProperties = _ _webpack _require _ _ ( "Ff2n" ) ;
2018-12-13 23:41:57 -05:00
2021-01-27 21:04:13 -05:00
// EXTERNAL MODULE: external "lodash"
2021-05-25 01:22:08 -04:00
var external _lodash _ = _ _webpack _require _ _ ( "YLtl" ) ;
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/react.js
2018-12-13 23:41:57 -05:00
2020-02-06 16:03:31 -05:00
function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2018-12-13 23:41:57 -05:00
/ * *
* External dependencies
* /
2021-02-02 00:17:13 -05:00
// eslint-disable-next-line no-restricted-imports
2018-12-13 23:41:57 -05:00
2020-01-08 06:57:23 -05:00
/ * *
* Object containing a React element .
*
* @ typedef { import ( 'react' ) . ReactElement } WPElement
* /
/ * *
* Object containing a React component .
*
2020-06-26 09:33:47 -04:00
* @ typedef { import ( 'react' ) . ComponentType } WPComponent
2020-01-08 06:57:23 -05:00
* /
/ * *
* Object containing a React synthetic event .
*
* @ typedef { import ( 'react' ) . SyntheticEvent } WPSyntheticEvent
* /
2019-03-21 08:48:00 -04:00
/ * *
* Object that provides utilities for dealing with React children .
* /
2018-12-13 23:41:57 -05:00
/ * *
* Creates a copy of an element with extended props .
*
* @ param { WPElement } element Element
* @ param { ? Object } props Props to apply to cloned element
*
* @ return { WPElement } Cloned element .
* /
/ * *
* A base class to create WordPress Components ( Refs , state and lifecycle hooks )
* /
/ * *
* Creates a context object containing two components : a provider and consumer .
*
* @ param { Object } defaultValue A default data stored in the context .
*
* @ return { Object } Context object .
* /
/ * *
* Returns a new element of given type . Type can be either a string tag name or
* another function which itself returns an element .
*
* @ param { ? ( string | Function ) } type Tag name or element creator
* @ param { Object } props Element properties , either attribute
2020-01-08 06:57:23 -05:00
* set to apply to DOM node or values to
* pass through to element creator
2018-12-13 23:41:57 -05:00
* @ param { ... WPElement } children Descendant elements
*
* @ return { WPElement } Element .
* /
/ * *
* Returns an object tracking a reference to a rendered element via its
* ` current ` property as either a DOMElement or Element , dependent upon the
* type of element rendered with the ref attribute .
*
* @ return { Object } Ref object .
* /
/ * *
* Component enhancer used to enable passing a ref to its wrapped component .
* Pass a function argument which receives ` props ` and ` ref ` as its arguments ,
* returning an element using the forwarded ref . The return value is a new
* component which forwards its ref .
*
* @ param { Function } forwarder Function passed ` props ` and ` ref ` , expected to
* return an element .
*
* @ return { WPComponent } Enhanced component .
* /
/ * *
* A component which renders its children without any wrapping element .
* /
/ * *
2020-01-08 06:57:23 -05:00
* Checks if an object is a valid WPElement .
2018-12-13 23:41:57 -05:00
*
* @ param { Object } objectToCheck The object to be checked .
*
* @ return { boolean } true if objectToTest is a valid WPElement and false otherwise .
* /
2019-09-19 11:19:18 -04:00
/ * *
* @ see https : //reactjs.org/docs/react-api.html#reactmemo
* /
2019-03-21 08:48:00 -04:00
/ * *
* Component that activates additional checks and warnings for its descendants .
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#usecallback
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#usecontext
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#usedebugvalue
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#useeffect
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#useimperativehandle
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#uselayouteffect
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#usememo
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#usereducer
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#useref
* /
/ * *
* @ see https : //reactjs.org/docs/hooks-reference.html#usestate
* /
2018-12-13 23:41:57 -05:00
2019-09-19 11:19:18 -04:00
/ * *
* @ see https : //reactjs.org/docs/react-api.html#reactlazy
* /
/ * *
* @ see https : //reactjs.org/docs/react-api.html#reactsuspense
* /
2018-12-13 23:41:57 -05:00
/ * *
* Concatenate two or more React children objects .
*
* @ param { ... ? Object } childrenArguments Array of children arguments ( array of arrays / strings / objects ) to concatenate .
*
* @ return { Array } The concatenated value .
* /
function concatChildren ( ) {
for ( var _len = arguments . length , childrenArguments = new Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) {
childrenArguments [ _key ] = arguments [ _key ] ;
}
2020-01-08 06:57:23 -05:00
return childrenArguments . reduce ( function ( accumulator , children , i ) {
2021-01-27 21:04:13 -05:00
external _React _ [ "Children" ] . forEach ( children , function ( child , j ) {
2018-12-13 23:41:57 -05:00
if ( child && 'string' !== typeof child ) {
2021-01-27 21:04:13 -05:00
child = Object ( external _React _ [ "cloneElement" ] ) ( child , {
2018-12-13 23:41:57 -05:00
key : [ i , j ] . join ( )
} ) ;
}
2020-01-08 06:57:23 -05:00
accumulator . push ( child ) ;
2018-12-13 23:41:57 -05:00
} ) ;
2020-01-08 06:57:23 -05:00
return accumulator ;
2018-12-13 23:41:57 -05:00
} , [ ] ) ;
}
/ * *
* Switches the nodeName of all the elements in the children object .
*
* @ param { ? Object } children Children object .
* @ param { string } nodeName Node name .
*
* @ return { ? Object } The updated children object .
* /
function switchChildrenNodeName ( children , nodeName ) {
2021-01-27 21:04:13 -05:00
return children && external _React _ [ "Children" ] . map ( children , function ( elt , index ) {
if ( Object ( external _lodash _ [ "isString" ] ) ( elt ) ) {
return Object ( external _React _ [ "createElement" ] ) ( nodeName , {
2018-12-13 23:41:57 -05:00
key : index
} , elt ) ;
}
var _elt$props = elt . props ,
childrenProp = _elt$props . children ,
2018-12-17 22:14:52 -05:00
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _elt$props , [ "children" ] ) ;
2018-12-13 23:41:57 -05:00
2021-01-27 21:04:13 -05:00
return Object ( external _React _ [ "createElement" ] ) ( nodeName , _objectSpread ( {
2018-12-13 23:41:57 -05:00
key : index
} , props ) , childrenProp ) ;
} ) ;
}
2021-01-27 21:04:13 -05:00
// EXTERNAL MODULE: external "ReactDOM"
2021-05-25 01:22:08 -04:00
var external _ReactDOM _ = _ _webpack _require _ _ ( "faye" ) ;
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/react-platform.js
/ * *
* External dependencies
* /
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
/ * *
* Creates a portal into which a component can be rendered .
*
* @ see https : //github.com/facebook/react/issues/10309#issuecomment-318433235
*
2020-06-26 09:33:47 -04:00
* @ param { import ( './react' ) . WPElement } child Any renderable child , such as an element ,
2020-01-08 06:57:23 -05:00
* string , or fragment .
* @ param { HTMLElement } container DOM node into which element should be rendered .
2018-12-17 22:14:52 -05:00
* /
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
/ * *
2020-01-08 06:57:23 -05:00
* Finds the dom node of a React component .
2018-12-17 22:14:52 -05:00
*
2020-06-26 09:33:47 -04:00
* @ param { import ( './react' ) . WPComponent } component Component ' s instance .
2018-12-17 22:14:52 -05:00
* /
/ * *
* Renders a given element into the target DOM node .
*
2020-06-26 09:33:47 -04:00
* @ param { import ( './react' ) . WPElement } element Element to render .
2020-01-08 06:57:23 -05:00
* @ param { HTMLElement } target DOM node into which element should be rendered .
2018-12-17 22:14:52 -05:00
* /
/ * *
* Removes any mounted element from the target DOM node .
*
* @ param { Element } target DOM node in which element is to be removed
* /
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/utils.js
/ * *
* External dependencies
* /
/ * *
* Checks if the provided WP element is empty .
*
* @ param { * } element WP element to check .
* @ return { boolean } True when an element is considered empty .
* /
var utils _isEmptyElement = function isEmptyElement ( element ) {
2021-01-27 21:04:13 -05:00
if ( Object ( external _lodash _ [ "isNumber" ] ) ( element ) ) {
2018-12-17 22:14:52 -05:00
return false ;
}
2021-01-27 21:04:13 -05:00
if ( Object ( external _lodash _ [ "isString" ] ) ( element ) || Object ( external _lodash _ [ "isArray" ] ) ( element ) ) {
2018-12-17 22:14:52 -05:00
return ! element . length ;
}
return ! element ;
} ;
2020-01-08 06:57:23 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/platform.js
/ * *
* Parts of this source were derived and modified from react - native - web ,
* released under the MIT license .
*
* Copyright ( c ) 2016 - present , Nicolas Gallagher .
* Copyright ( c ) 2015 - present , Facebook , Inc .
*
* /
var Platform = {
OS : 'web' ,
select : function select ( spec ) {
return 'web' in spec ? spec . web : spec . default ;
}
} ;
/ * *
* Component used to detect the current Platform being used .
* Use Platform . OS === 'web' to detect if running on web enviroment .
*
* This is the same concept as the React Native implementation .
*
* @ see https : //facebook.github.io/react-native/docs/platform-specific-code#platform-module
*
* Here is an example of how to use the select method :
* @ example
* ` ` ` js
* import { Platform } from '@wordpress/element' ;
*
* const placeholderLabel = Platform . select ( {
* native : _ _ ( 'Add media' ) ,
* web : _ _ ( 'Drag images, upload new ones or select files from your library.' ) ,
* } ) ;
* ` ` `
* /
/* harmony default export */ var platform = ( Platform ) ;
2018-12-17 22:14:52 -05:00
2021-01-27 21:04:13 -05:00
// EXTERNAL MODULE: external ["wp","escapeHtml"]
2021-05-25 01:22:08 -04:00
var external _wp _escapeHtml _ = _ _webpack _require _ _ ( "Vx3V" ) ;
2018-12-17 22:14:52 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/raw-html.js
2020-02-06 16:03:31 -05:00
function raw _html _ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
function raw _html _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { raw _html _ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { raw _html _ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2018-12-17 22:14:52 -05:00
/ * *
2019-03-07 04:09:59 -05:00
* Internal dependencies
2018-12-17 22:14:52 -05:00
* /
2020-06-26 09:33:47 -04:00
// Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
/** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */
2018-12-17 22:14:52 -05:00
/ * *
* Component used as equivalent of Fragment with unescaped HTML , in cases where
* it is desirable to render dangerous HTML without needing a wrapper element .
* To preserve additional props , a ` div ` wrapper _will _ be created if any props
* aside from ` children ` are passed .
*
2020-06-26 09:33:47 -04:00
* @ param { RawHTMLProps } props Children should be a string of HTML . Other props
* will be passed through to div wrapper .
2018-12-17 22:14:52 -05:00
*
2020-06-26 09:33:47 -04:00
* @ return { JSX . Element } Dangerously - rendering component .
2018-12-17 22:14:52 -05:00
* /
function RawHTML ( _ref ) {
var children = _ref . children ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "children" ] ) ;
// The DIV wrapper will be stripped by serializer, unless there are
// non-children props present.
2021-01-27 21:04:13 -05:00
return Object ( external _React _ [ "createElement" ] ) ( 'div' , raw _html _objectSpread ( {
2018-12-17 22:14:52 -05:00
dangerouslySetInnerHTML : {
_ _html : children
}
} , props ) ) ;
}
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/serialize.js
2018-12-13 23:41:57 -05:00
2020-02-06 16:03:31 -05:00
function serialize _ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
function serialize _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { serialize _ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { serialize _ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2018-12-13 23:41:57 -05:00
/ * *
* Parts of this source were derived and modified from fast - react - render ,
* released under the MIT license .
*
* https : //github.com/alt-j/fast-react-render
*
* Copyright ( c ) 2016 Andrey Morozov
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the "Software" ) , to deal
* in the Software without restriction , including without limitation the rights
* to use , copy , modify , merge , publish , distribute , sublicense , and / or sell
* copies of the Software , and to permit persons to whom the Software is
* furnished to do so , subject to the following conditions :
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software .
*
* THE SOFTWARE IS PROVIDED "AS IS" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
* IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY ,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER
* LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM ,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE .
* /
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2020-06-26 09:33:47 -04:00
/** @typedef {import('./react').WPElement} WPElement */
2018-12-13 23:41:57 -05:00
2021-01-27 21:04:13 -05:00
var _createContext = Object ( external _React _ [ "createContext" ] ) ( undefined ) ,
2018-12-13 23:41:57 -05:00
Provider = _createContext . Provider ,
Consumer = _createContext . Consumer ;
2019-09-19 11:19:18 -04:00
2021-01-27 21:04:13 -05:00
var ForwardRef = Object ( external _React _ [ "forwardRef" ] ) ( function ( ) {
2019-09-19 11:19:18 -04:00
return null ;
} ) ;
2018-12-13 23:41:57 -05:00
/ * *
* Valid attribute types .
*
2020-06-26 09:33:47 -04:00
* @ type { Set < string > }
2018-12-13 23:41:57 -05:00
* /
var ATTRIBUTES _TYPES = new Set ( [ 'string' , 'boolean' , 'number' ] ) ;
/ * *
* Element tags which can be self - closing .
*
2020-06-26 09:33:47 -04:00
* @ type { Set < string > }
2018-12-13 23:41:57 -05:00
* /
var SELF _CLOSING _TAGS = new Set ( [ 'area' , 'base' , 'br' , 'col' , 'command' , 'embed' , 'hr' , 'img' , 'input' , 'keygen' , 'link' , 'meta' , 'param' , 'source' , 'track' , 'wbr' ] ) ;
/ * *
* Boolean attributes are attributes whose presence as being assigned is
* meaningful , even if only empty .
*
* See : https : //html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
* Extracted from : https : //html.spec.whatwg.org/multipage/indices.html#attributes-3
*
* Object . keys ( [ ... document . querySelectorAll ( '#attributes-1 > tbody > tr' ) ]
* . filter ( ( tr ) => tr . lastChild . textContent . indexOf ( 'Boolean attribute' ) !== - 1 )
* . reduce ( ( result , tr ) => Object . assign ( result , {
* [ tr . firstChild . textContent . trim ( ) ] : true
* } ) , { } ) ) . sort ( ) ;
*
2020-06-26 09:33:47 -04:00
* @ type { Set < string > }
2018-12-13 23:41:57 -05:00
* /
2018-12-14 06:02:53 -05:00
var BOOLEAN _ATTRIBUTES = new Set ( [ 'allowfullscreen' , 'allowpaymentrequest' , 'allowusermedia' , 'async' , 'autofocus' , 'autoplay' , 'checked' , 'controls' , 'default' , 'defer' , 'disabled' , 'download' , 'formnovalidate' , 'hidden' , 'ismap' , 'itemscope' , 'loop' , 'multiple' , 'muted' , 'nomodule' , 'novalidate' , 'open' , 'playsinline' , 'readonly' , 'required' , 'reversed' , 'selected' , 'typemustmatch' ] ) ;
2018-12-13 23:41:57 -05:00
/ * *
* Enumerated attributes are attributes which must be of a specific value form .
* Like boolean attributes , these are meaningful if specified , even if not of a
* valid enumerated value .
*
* See : https : //html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute
* Extracted from : https : //html.spec.whatwg.org/multipage/indices.html#attributes-3
*
* Object . keys ( [ ... document . querySelectorAll ( '#attributes-1 > tbody > tr' ) ]
* . filter ( ( tr ) => / ^ ( "(.+?)" ; ? \ s * ) + / . t e s t ( t r . l a s t C h i l d . t e x t C o n t e n t . t r i m ( ) ) )
* . reduce ( ( result , tr ) => Object . assign ( result , {
* [ tr . firstChild . textContent . trim ( ) ] : true
* } ) , { } ) ) . sort ( ) ;
*
* Some notable omissions :
*
* - ` alt ` : https : //blog.whatwg.org/omit-alt
*
2020-06-26 09:33:47 -04:00
* @ type { Set < string > }
2018-12-13 23:41:57 -05:00
* /
var ENUMERATED _ATTRIBUTES = new Set ( [ 'autocapitalize' , 'autocomplete' , 'charset' , 'contenteditable' , 'crossorigin' , 'decoding' , 'dir' , 'draggable' , 'enctype' , 'formenctype' , 'formmethod' , 'http-equiv' , 'inputmode' , 'kind' , 'method' , 'preload' , 'scope' , 'shape' , 'spellcheck' , 'translate' , 'type' , 'wrap' ] ) ;
/ * *
* Set of CSS style properties which support assignment of unitless numbers .
* Used in rendering of style properties , where ` px ` unit is assumed unless
* property is included in this set or value is zero .
*
* Generated via :
*
* Object . entries ( document . createElement ( 'div' ) . style )
* . filter ( ( [ key ] ) => (
* ! /^(webkit|ms|moz)/ . test ( key ) &&
* ( e . style [ key ] = 10 ) &&
* e . style [ key ] === '10'
* ) )
* . map ( ( [ key ] ) => key )
* . sort ( ) ;
*
2020-06-26 09:33:47 -04:00
* @ type { Set < string > }
2018-12-13 23:41:57 -05:00
* /
var CSS _PROPERTIES _SUPPORTS _UNITLESS = new Set ( [ 'animation' , 'animationIterationCount' , 'baselineShift' , 'borderImageOutset' , 'borderImageSlice' , 'borderImageWidth' , 'columnCount' , 'cx' , 'cy' , 'fillOpacity' , 'flexGrow' , 'flexShrink' , 'floodOpacity' , 'fontWeight' , 'gridColumnEnd' , 'gridColumnStart' , 'gridRowEnd' , 'gridRowStart' , 'lineHeight' , 'opacity' , 'order' , 'orphans' , 'r' , 'rx' , 'ry' , 'shapeImageThreshold' , 'stopOpacity' , 'strokeDasharray' , 'strokeDashoffset' , 'strokeMiterlimit' , 'strokeOpacity' , 'strokeWidth' , 'tabSize' , 'widows' , 'x' , 'y' , 'zIndex' , 'zoom' ] ) ;
/ * *
* Returns true if the specified string is prefixed by one of an array of
* possible prefixes .
*
* @ param { string } string String to check .
* @ param { string [ ] } prefixes Possible prefixes .
*
* @ return { boolean } Whether string has prefix .
* /
function hasPrefix ( string , prefixes ) {
return prefixes . some ( function ( prefix ) {
return string . indexOf ( prefix ) === 0 ;
} ) ;
}
/ * *
* Returns true if the given prop name should be ignored in attributes
* serialization , or false otherwise .
*
* @ param { string } attribute Attribute to check .
*
* @ return { boolean } Whether attribute should be ignored .
* /
function isInternalAttribute ( attribute ) {
return 'key' === attribute || 'children' === attribute ;
}
/ * *
* Returns the normal form of the element ' s attribute value for HTML .
*
* @ param { string } attribute Attribute name .
* @ param { * } value Non - normalized attribute value .
*
2020-06-26 09:33:47 -04:00
* @ return { * } Normalized attribute value .
2018-12-13 23:41:57 -05:00
* /
function getNormalAttributeValue ( attribute , value ) {
switch ( attribute ) {
case 'style' :
return renderStyle ( value ) ;
}
return value ;
}
/ * *
* Returns the normal form of the element ' s attribute name for HTML .
*
* @ param { string } attribute Non - normalized attribute name .
*
* @ return { string } Normalized attribute name .
* /
function getNormalAttributeName ( attribute ) {
switch ( attribute ) {
case 'htmlFor' :
return 'for' ;
case 'className' :
return 'class' ;
}
return attribute . toLowerCase ( ) ;
}
/ * *
* Returns the normal form of the style property name for HTML .
*
* - Converts property names to kebab - case , e . g . 'backgroundColor' → 'background-color'
* - Leaves custom attributes alone , e . g . '--myBackgroundColor' → '--myBackgroundColor'
* - Converts vendor - prefixed property names to - kebab - case , e . g . 'MozTransform' → '-moz-transform'
*
* @ param { string } property Property name .
*
* @ return { string } Normalized property name .
* /
function getNormalStylePropertyName ( property ) {
2021-01-27 21:04:13 -05:00
if ( Object ( external _lodash _ [ "startsWith" ] ) ( property , '--' ) ) {
2018-12-13 23:41:57 -05:00
return property ;
}
if ( hasPrefix ( property , [ 'ms' , 'O' , 'Moz' , 'Webkit' ] ) ) {
2021-01-27 21:04:13 -05:00
return '-' + Object ( external _lodash _ [ "kebabCase" ] ) ( property ) ;
2018-12-13 23:41:57 -05:00
}
2021-01-27 21:04:13 -05:00
return Object ( external _lodash _ [ "kebabCase" ] ) ( property ) ;
2018-12-13 23:41:57 -05:00
}
/ * *
* Returns the normal form of the style property value for HTML . Appends a
* default pixel unit if numeric , not a unitless property , and not zero .
*
* @ param { string } property Property name .
* @ param { * } value Non - normalized property value .
*
* @ return { * } Normalized property value .
* /
function getNormalStylePropertyValue ( property , value ) {
if ( typeof value === 'number' && 0 !== value && ! CSS _PROPERTIES _SUPPORTS _UNITLESS . has ( property ) ) {
return value + 'px' ;
}
return value ;
}
/ * *
* Serializes a React element to string .
*
2020-06-26 09:33:47 -04:00
* @ param { import ( 'react' ) . ReactNode } element Element to serialize .
* @ param { Object } [ context ] Context object .
* @ param { Object } [ legacyContext ] Legacy context object .
2018-12-13 23:41:57 -05:00
*
* @ return { string } Serialized element .
* /
function renderElement ( element , context ) {
var legacyContext = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : { } ;
if ( null === element || undefined === element || false === element ) {
return '' ;
}
if ( Array . isArray ( element ) ) {
return renderChildren ( element , context , legacyContext ) ;
}
2018-12-17 22:14:52 -05:00
switch ( Object ( esm _typeof [ "a" /* default */ ] ) ( element ) ) {
2018-12-13 23:41:57 -05:00
case 'string' :
2021-01-27 21:04:13 -05:00
return Object ( external _wp _escapeHtml _ [ "escapeHTML" ] ) ( element ) ;
2018-12-13 23:41:57 -05:00
case 'number' :
return element . toString ( ) ;
}
2020-06-26 09:33:47 -04:00
var type =
/** @type {{type?: any, props?: any}} */
element . type ,
2018-12-13 23:41:57 -05:00
props = element . props ;
switch ( type ) {
2021-01-27 21:04:13 -05:00
case external _React _ [ "StrictMode" ] :
case external _React _ [ "Fragment" ] :
2018-12-13 23:41:57 -05:00
return renderChildren ( props . children , context , legacyContext ) ;
2018-12-17 22:14:52 -05:00
case RawHTML :
2018-12-13 23:41:57 -05:00
var children = props . children ,
2018-12-17 22:14:52 -05:00
wrapperProps = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( props , [ "children" ] ) ;
2018-12-13 23:41:57 -05:00
2021-01-27 21:04:13 -05:00
return renderNativeComponent ( Object ( external _lodash _ [ "isEmpty" ] ) ( wrapperProps ) ? null : 'div' , serialize _objectSpread ( serialize _objectSpread ( { } , wrapperProps ) , { } , {
2018-12-13 23:41:57 -05:00
dangerouslySetInnerHTML : {
_ _html : children
}
} ) , context , legacyContext ) ;
}
2018-12-17 22:14:52 -05:00
switch ( Object ( esm _typeof [ "a" /* default */ ] ) ( type ) ) {
2018-12-13 23:41:57 -05:00
case 'string' :
return renderNativeComponent ( type , props , context , legacyContext ) ;
case 'function' :
if ( type . prototype && typeof type . prototype . render === 'function' ) {
return renderComponent ( type , props , context , legacyContext ) ;
}
return renderElement ( type ( props , legacyContext ) , context , legacyContext ) ;
}
switch ( type && type . $$typeof ) {
case Provider . $$typeof :
return renderChildren ( props . children , props . value , legacyContext ) ;
case Consumer . $$typeof :
return renderElement ( props . children ( context || type . _currentValue ) , context , legacyContext ) ;
2019-09-19 11:19:18 -04:00
case ForwardRef . $$typeof :
return renderElement ( type . render ( props ) , context , legacyContext ) ;
2018-12-13 23:41:57 -05:00
}
return '' ;
}
/ * *
* Serializes a native component type to string .
*
2020-06-26 09:33:47 -04:00
* @ param { ? string } type Native component type to serialize , or null if
* rendering as fragment of children content .
* @ param { Object } props Props object .
* @ param { Object } [ context ] Context object .
* @ param { Object } [ legacyContext ] Legacy context object .
2018-12-13 23:41:57 -05:00
*
* @ return { string } Serialized element .
* /
function renderNativeComponent ( type , props , context ) {
var legacyContext = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : { } ;
var content = '' ;
if ( type === 'textarea' && props . hasOwnProperty ( 'value' ) ) {
// Textarea children can be assigned as value prop. If it is, render in
// place of children. Ensure to omit so it is not assigned as attribute
// as well.
content = renderChildren ( props . value , context , legacyContext ) ;
2021-01-27 21:04:13 -05:00
props = Object ( external _lodash _ [ "omit" ] ) ( props , 'value' ) ;
2018-12-13 23:41:57 -05:00
} else if ( props . dangerouslySetInnerHTML && typeof props . dangerouslySetInnerHTML . _ _html === 'string' ) {
// Dangerous content is left unescaped.
content = props . dangerouslySetInnerHTML . _ _html ;
} else if ( typeof props . children !== 'undefined' ) {
content = renderChildren ( props . children , context , legacyContext ) ;
}
if ( ! type ) {
return content ;
}
var attributes = renderAttributes ( props ) ;
if ( SELF _CLOSING _TAGS . has ( type ) ) {
return '<' + type + attributes + '/>' ;
}
return '<' + type + attributes + '>' + content + '</' + type + '>' ;
}
2020-06-26 09:33:47 -04:00
/** @typedef {import('./react').WPComponent} WPComponent */
2018-12-13 23:41:57 -05:00
/ * *
* Serializes a non - native component type to string .
*
2020-06-26 09:33:47 -04:00
* @ param { WPComponent } Component Component type to serialize .
* @ param { Object } props Props object .
* @ param { Object } [ context ] Context object .
* @ param { Object } [ legacyContext ] Legacy context object .
2018-12-13 23:41:57 -05:00
*
* @ return { string } Serialized element
* /
function renderComponent ( Component , props , context ) {
var legacyContext = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : { } ;
2020-06-26 09:33:47 -04:00
var instance = new
/** @type {import('react').ComponentClass} */
Component ( props , legacyContext ) ;
if ( typeof // Ignore reason: Current prettier reformats parens and mangles type assertion
// prettier-ignore
/** @type {{getChildContext?: () => unknown}} */
instance . getChildContext === 'function' ) {
Object . assign ( legacyContext ,
/** @type {{getChildContext?: () => unknown}} */
instance . getChildContext ( ) ) ;
2018-12-13 23:41:57 -05:00
}
var html = renderElement ( instance . render ( ) , context , legacyContext ) ;
return html ;
}
/ * *
* Serializes an array of children to string .
*
2020-06-26 09:33:47 -04:00
* @ param { import ( 'react' ) . ReactNodeArray } children Children to serialize .
* @ param { Object } [ context ] Context object .
* @ param { Object } [ legacyContext ] Legacy context object .
2018-12-13 23:41:57 -05:00
*
* @ return { string } Serialized children .
* /
function renderChildren ( children , context ) {
var legacyContext = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : { } ;
var result = '' ;
2021-01-27 21:04:13 -05:00
children = Object ( external _lodash _ [ "castArray" ] ) ( children ) ;
2018-12-13 23:41:57 -05:00
for ( var i = 0 ; i < children . length ; i ++ ) {
var child = children [ i ] ;
result += renderElement ( child , context , legacyContext ) ;
}
return result ;
}
/ * *
* Renders a props object as a string of HTML attributes .
*
* @ param { Object } props Props object .
*
* @ return { string } Attributes string .
* /
function renderAttributes ( props ) {
var result = '' ;
for ( var key in props ) {
var attribute = getNormalAttributeName ( key ) ;
2021-01-27 21:04:13 -05:00
if ( ! Object ( external _wp _escapeHtml _ [ "isValidAttributeName" ] ) ( attribute ) ) {
2018-12-13 23:41:57 -05:00
continue ;
}
var value = getNormalAttributeValue ( key , props [ key ] ) ; // If value is not of serializeable type, skip.
2018-12-17 22:14:52 -05:00
if ( ! ATTRIBUTES _TYPES . has ( Object ( esm _typeof [ "a" /* default */ ] ) ( value ) ) ) {
2018-12-13 23:41:57 -05:00
continue ;
} // Don't render internal attribute names.
if ( isInternalAttribute ( key ) ) {
continue ;
}
var isBooleanAttribute = BOOLEAN _ATTRIBUTES . has ( attribute ) ; // Boolean attribute should be omitted outright if its value is false.
if ( isBooleanAttribute && value === false ) {
continue ;
}
var isMeaningfulAttribute = isBooleanAttribute || hasPrefix ( key , [ 'data-' , 'aria-' ] ) || ENUMERATED _ATTRIBUTES . has ( attribute ) ; // Only write boolean value as attribute if meaningful.
if ( typeof value === 'boolean' && ! isMeaningfulAttribute ) {
continue ;
}
result += ' ' + attribute ; // Boolean attributes should write attribute name, but without value.
// Mere presence of attribute name is effective truthiness.
if ( isBooleanAttribute ) {
continue ;
}
if ( typeof value === 'string' ) {
2021-01-27 21:04:13 -05:00
value = Object ( external _wp _escapeHtml _ [ "escapeAttribute" ] ) ( value ) ;
2018-12-13 23:41:57 -05:00
}
result += '="' + value + '"' ;
}
return result ;
}
/ * *
* Renders a style object as a string attribute value .
*
* @ param { Object } style Style object .
*
* @ return { string } Style attribute value .
* /
function renderStyle ( style ) {
// Only generate from object, e.g. tolerate string value.
2021-01-27 21:04:13 -05:00
if ( ! Object ( external _lodash _ [ "isPlainObject" ] ) ( style ) ) {
2018-12-13 23:41:57 -05:00
return style ;
}
var result ;
for ( var property in style ) {
var value = style [ property ] ;
if ( null === value || undefined === value ) {
continue ;
}
if ( result ) {
result += ';' ;
} else {
result = '' ;
}
var normalName = getNormalStylePropertyName ( property ) ;
var normalValue = getNormalStylePropertyValue ( property , value ) ;
result += normalName + ':' + normalValue ;
}
return result ;
}
2018-12-17 22:14:52 -05:00
/* harmony default export */ var serialize = ( renderElement ) ;
2018-12-13 23:41:57 -05:00
2018-12-17 22:14:52 -05:00
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/index.js
2018-12-13 23:41:57 -05:00
2020-01-08 06:57:23 -05:00
2018-12-13 23:41:57 -05:00
/***/ } ) ,
2021-05-25 01:22:08 -04:00
/***/ "rePB" :
2020-01-08 06:57:23 -05:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-10-15 12:17:12 -04:00
2020-01-08 06:57:23 -05:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _defineProperty ; } ) ;
function _defineProperty ( obj , key , value ) {
if ( key in obj ) {
Object . defineProperty ( obj , key , {
value : value ,
enumerable : true ,
configurable : true ,
writable : true
} ) ;
} else {
obj [ key ] = value ;
}
return obj ;
}
2019-10-15 12:17:12 -04:00
2021-05-25 01:22:08 -04:00
/***/ } ) ,
/***/ "zLVn" :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _objectWithoutPropertiesLoose ; } ) ;
function _objectWithoutPropertiesLoose ( source , excluded ) {
if ( source == null ) return { } ;
var target = { } ;
var sourceKeys = Object . keys ( source ) ;
var key , i ;
for ( i = 0 ; i < sourceKeys . length ; i ++ ) {
key = sourceKeys [ i ] ;
if ( excluded . indexOf ( key ) >= 0 ) continue ;
target [ key ] = source [ key ] ;
}
return target ;
}
2018-12-13 23:41:57 -05:00
/***/ } )
2018-12-17 22:14:52 -05:00
/******/ } ) ;