[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 this["wp"] = this["wp"] || {}; this["wp"]["blockEditor"] = 2 /******/ (function(modules) { // webpackBootstrap 3 /******/ // The module cache 4 /******/ var installedModules = {}; 5 /******/ 6 /******/ // The require function 7 /******/ function __webpack_require__(moduleId) { 8 /******/ 9 /******/ // Check if module is in cache 10 /******/ if(installedModules[moduleId]) { 11 /******/ return installedModules[moduleId].exports; 12 /******/ } 13 /******/ // Create a new module (and put it into the cache) 14 /******/ var module = installedModules[moduleId] = { 15 /******/ i: moduleId, 16 /******/ l: false, 17 /******/ exports: {} 18 /******/ }; 19 /******/ 20 /******/ // Execute the module function 21 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 22 /******/ 23 /******/ // Flag the module as loaded 24 /******/ module.l = true; 25 /******/ 26 /******/ // Return the exports of the module 27 /******/ return module.exports; 28 /******/ } 29 /******/ 30 /******/ 31 /******/ // expose the modules object (__webpack_modules__) 32 /******/ __webpack_require__.m = modules; 33 /******/ 34 /******/ // expose the module cache 35 /******/ __webpack_require__.c = installedModules; 36 /******/ 37 /******/ // define getter function for harmony exports 38 /******/ __webpack_require__.d = function(exports, name, getter) { 39 /******/ if(!__webpack_require__.o(exports, name)) { 40 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 41 /******/ } 42 /******/ }; 43 /******/ 44 /******/ // define __esModule on exports 45 /******/ __webpack_require__.r = function(exports) { 46 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 47 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 48 /******/ } 49 /******/ Object.defineProperty(exports, '__esModule', { value: true }); 50 /******/ }; 51 /******/ 52 /******/ // create a fake namespace object 53 /******/ // mode & 1: value is a module id, require it 54 /******/ // mode & 2: merge all properties of value into the ns 55 /******/ // mode & 4: return value when already ns object 56 /******/ // mode & 8|1: behave like require 57 /******/ __webpack_require__.t = function(value, mode) { 58 /******/ if(mode & 1) value = __webpack_require__(value); 59 /******/ if(mode & 8) return value; 60 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 61 /******/ var ns = Object.create(null); 62 /******/ __webpack_require__.r(ns); 63 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 64 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 65 /******/ return ns; 66 /******/ }; 67 /******/ 68 /******/ // getDefaultExport function for compatibility with non-harmony modules 69 /******/ __webpack_require__.n = function(module) { 70 /******/ var getter = module && module.__esModule ? 71 /******/ function getDefault() { return module['default']; } : 72 /******/ function getModuleExports() { return module; }; 73 /******/ __webpack_require__.d(getter, 'a', getter); 74 /******/ return getter; 75 /******/ }; 76 /******/ 77 /******/ // Object.prototype.hasOwnProperty.call 78 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 79 /******/ 80 /******/ // __webpack_public_path__ 81 /******/ __webpack_require__.p = ""; 82 /******/ 83 /******/ 84 /******/ // Load entry module and return exports 85 /******/ return __webpack_require__(__webpack_require__.s = 456); 86 /******/ }) 87 /************************************************************************/ 88 /******/ ({ 89 90 /***/ 0: 91 /***/ (function(module, exports) { 92 93 (function() { module.exports = window["wp"]["element"]; }()); 94 95 /***/ }), 96 97 /***/ 1: 98 /***/ (function(module, exports) { 99 100 (function() { module.exports = window["wp"]["i18n"]; }()); 101 102 /***/ }), 103 104 /***/ 10: 105 /***/ (function(module, exports, __webpack_require__) { 106 107 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 108 Copyright (c) 2017 Jed Watson. 109 Licensed under the MIT License (MIT), see 110 http://jedwatson.github.io/classnames 111 */ 112 /* global define */ 113 114 (function () { 115 'use strict'; 116 117 var hasOwn = {}.hasOwnProperty; 118 119 function classNames () { 120 var classes = []; 121 122 for (var i = 0; i < arguments.length; i++) { 123 var arg = arguments[i]; 124 if (!arg) continue; 125 126 var argType = typeof arg; 127 128 if (argType === 'string' || argType === 'number') { 129 classes.push(arg); 130 } else if (Array.isArray(arg) && arg.length) { 131 var inner = classNames.apply(null, arg); 132 if (inner) { 133 classes.push(inner); 134 } 135 } else if (argType === 'object') { 136 for (var key in arg) { 137 if (hasOwn.call(arg, key) && arg[key]) { 138 classes.push(key); 139 } 140 } 141 } 142 } 143 144 return classes.join(' '); 145 } 146 147 if ( true && module.exports) { 148 classNames.default = classNames; 149 module.exports = classNames; 150 } else if (true) { 151 // register as 'classnames', consistent with npm package name 152 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { 153 return classNames; 154 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 155 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 156 } else {} 157 }()); 158 159 160 /***/ }), 161 162 /***/ 11: 163 /***/ (function(module, __webpack_exports__, __webpack_require__) { 164 165 "use strict"; 166 167 // EXPORTS 168 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; }); 169 170 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js 171 var arrayWithHoles = __webpack_require__(38); 172 173 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js 174 function _iterableToArrayLimit(arr, i) { 175 if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; 176 var _arr = []; 177 var _n = true; 178 var _d = false; 179 var _e = undefined; 180 181 try { 182 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { 183 _arr.push(_s.value); 184 185 if (i && _arr.length === i) break; 186 } 187 } catch (err) { 188 _d = true; 189 _e = err; 190 } finally { 191 try { 192 if (!_n && _i["return"] != null) _i["return"](); 193 } finally { 194 if (_d) throw _e; 195 } 196 } 197 198 return _arr; 199 } 200 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js 201 var unsupportedIterableToArray = __webpack_require__(31); 202 203 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js 204 var nonIterableRest = __webpack_require__(39); 205 206 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js 207 208 209 210 211 function _slicedToArray(arr, i) { 212 return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])(); 213 } 214 215 /***/ }), 216 217 /***/ 113: 218 /***/ (function(module, exports, __webpack_require__) { 219 220 "use strict"; 221 222 223 Object.defineProperty(exports, '__esModule', { value: true }); 224 225 function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } 226 227 var _extends = _interopDefault(__webpack_require__(183)); 228 var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(184)); 229 var React = __webpack_require__(14); 230 var React__default = _interopDefault(React); 231 var _inheritsLoose = _interopDefault(__webpack_require__(158)); 232 var _assertThisInitialized = _interopDefault(__webpack_require__(185)); 233 234 var is = { 235 arr: Array.isArray, 236 obj: function obj(a) { 237 return Object.prototype.toString.call(a) === '[object Object]'; 238 }, 239 fun: function fun(a) { 240 return typeof a === 'function'; 241 }, 242 str: function str(a) { 243 return typeof a === 'string'; 244 }, 245 num: function num(a) { 246 return typeof a === 'number'; 247 }, 248 und: function und(a) { 249 return a === void 0; 250 }, 251 nul: function nul(a) { 252 return a === null; 253 }, 254 set: function set(a) { 255 return a instanceof Set; 256 }, 257 map: function map(a) { 258 return a instanceof Map; 259 }, 260 equ: function equ(a, b) { 261 if (typeof a !== typeof b) return false; 262 if (is.str(a) || is.num(a)) return a === b; 263 if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true; 264 var i; 265 266 for (i in a) { 267 if (!(i in b)) return false; 268 } 269 270 for (i in b) { 271 if (a[i] !== b[i]) return false; 272 } 273 274 return is.und(i) ? a === b : true; 275 } 276 }; 277 function merge(target, lowercase) { 278 if (lowercase === void 0) { 279 lowercase = true; 280 } 281 282 return function (object) { 283 return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) { 284 var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element; 285 acc[key] = target(key); 286 return acc; 287 }, target); 288 }; 289 } 290 function useForceUpdate() { 291 var _useState = React.useState(false), 292 f = _useState[1]; 293 294 var forceUpdate = React.useCallback(function () { 295 return f(function (v) { 296 return !v; 297 }); 298 }, []); 299 return forceUpdate; 300 } 301 function withDefault(value, defaultValue) { 302 return is.und(value) || is.nul(value) ? defaultValue : value; 303 } 304 function toArray(a) { 305 return !is.und(a) ? is.arr(a) ? a : [a] : []; 306 } 307 function callProp(obj) { 308 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 309 args[_key - 1] = arguments[_key]; 310 } 311 312 return is.fun(obj) ? obj.apply(void 0, args) : obj; 313 } 314 315 function getForwardProps(props) { 316 var to = props.to, 317 from = props.from, 318 config = props.config, 319 onStart = props.onStart, 320 onRest = props.onRest, 321 onFrame = props.onFrame, 322 children = props.children, 323 reset = props.reset, 324 reverse = props.reverse, 325 force = props.force, 326 immediate = props.immediate, 327 delay = props.delay, 328 attach = props.attach, 329 destroyed = props.destroyed, 330 interpolateTo = props.interpolateTo, 331 ref = props.ref, 332 lazy = props.lazy, 333 forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]); 334 335 return forward; 336 } 337 338 function interpolateTo(props) { 339 var forward = getForwardProps(props); 340 if (is.und(forward)) return _extends({ 341 to: forward 342 }, props); 343 var rest = Object.keys(props).reduce(function (a, k) { 344 var _extends2; 345 346 return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2)); 347 }, {}); 348 return _extends({ 349 to: forward 350 }, rest); 351 } 352 function handleRef(ref, forward) { 353 if (forward) { 354 // If it's a function, assume it's a ref callback 355 if (is.fun(forward)) forward(ref);else if (is.obj(forward)) { 356 forward.current = ref; 357 } 358 } 359 360 return ref; 361 } 362 363 var Animated = 364 /*#__PURE__*/ 365 function () { 366 function Animated() { 367 this.payload = void 0; 368 this.children = []; 369 } 370 371 var _proto = Animated.prototype; 372 373 _proto.getAnimatedValue = function getAnimatedValue() { 374 return this.getValue(); 375 }; 376 377 _proto.getPayload = function getPayload() { 378 return this.payload || this; 379 }; 380 381 _proto.attach = function attach() {}; 382 383 _proto.detach = function detach() {}; 384 385 _proto.getChildren = function getChildren() { 386 return this.children; 387 }; 388 389 _proto.addChild = function addChild(child) { 390 if (this.children.length === 0) this.attach(); 391 this.children.push(child); 392 }; 393 394 _proto.removeChild = function removeChild(child) { 395 var index = this.children.indexOf(child); 396 this.children.splice(index, 1); 397 if (this.children.length === 0) this.detach(); 398 }; 399 400 return Animated; 401 }(); 402 var AnimatedArray = 403 /*#__PURE__*/ 404 function (_Animated) { 405 _inheritsLoose(AnimatedArray, _Animated); 406 407 function AnimatedArray() { 408 var _this; 409 410 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 411 args[_key] = arguments[_key]; 412 } 413 414 _this = _Animated.call.apply(_Animated, [this].concat(args)) || this; 415 _this.payload = []; 416 417 _this.attach = function () { 418 return _this.payload.forEach(function (p) { 419 return p instanceof Animated && p.addChild(_assertThisInitialized(_this)); 420 }); 421 }; 422 423 _this.detach = function () { 424 return _this.payload.forEach(function (p) { 425 return p instanceof Animated && p.removeChild(_assertThisInitialized(_this)); 426 }); 427 }; 428 429 return _this; 430 } 431 432 return AnimatedArray; 433 }(Animated); 434 var AnimatedObject = 435 /*#__PURE__*/ 436 function (_Animated2) { 437 _inheritsLoose(AnimatedObject, _Animated2); 438 439 function AnimatedObject() { 440 var _this2; 441 442 for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { 443 args[_key3] = arguments[_key3]; 444 } 445 446 _this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this; 447 _this2.payload = {}; 448 449 _this2.attach = function () { 450 return Object.values(_this2.payload).forEach(function (s) { 451 return s instanceof Animated && s.addChild(_assertThisInitialized(_this2)); 452 }); 453 }; 454 455 _this2.detach = function () { 456 return Object.values(_this2.payload).forEach(function (s) { 457 return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2)); 458 }); 459 }; 460 461 return _this2; 462 } 463 464 var _proto2 = AnimatedObject.prototype; 465 466 _proto2.getValue = function getValue(animated) { 467 if (animated === void 0) { 468 animated = false; 469 } 470 471 var payload = {}; 472 473 for (var _key4 in this.payload) { 474 var value = this.payload[_key4]; 475 if (animated && !(value instanceof Animated)) continue; 476 payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value; 477 } 478 479 return payload; 480 }; 481 482 _proto2.getAnimatedValue = function getAnimatedValue() { 483 return this.getValue(true); 484 }; 485 486 return AnimatedObject; 487 }(Animated); 488 489 var applyAnimatedValues; 490 function injectApplyAnimatedValues(fn, transform) { 491 applyAnimatedValues = { 492 fn: fn, 493 transform: transform 494 }; 495 } 496 var colorNames; 497 function injectColorNames(names) { 498 colorNames = names; 499 } 500 var requestFrame = function requestFrame(cb) { 501 return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1; 502 }; 503 var cancelFrame = function cancelFrame(id) { 504 typeof window !== 'undefined' && window.cancelAnimationFrame(id); 505 }; 506 function injectFrame(raf, caf) { 507 requestFrame = raf; 508 cancelFrame = caf; 509 } 510 var interpolation; 511 function injectStringInterpolator(fn) { 512 interpolation = fn; 513 } 514 var now = function now() { 515 return Date.now(); 516 }; 517 function injectNow(nowFn) { 518 now = nowFn; 519 } 520 var defaultElement; 521 function injectDefaultElement(el) { 522 defaultElement = el; 523 } 524 var animatedApi = function animatedApi(node) { 525 return node.current; 526 }; 527 function injectAnimatedApi(fn) { 528 animatedApi = fn; 529 } 530 var createAnimatedStyle; 531 function injectCreateAnimatedStyle(factory) { 532 createAnimatedStyle = factory; 533 } 534 var manualFrameloop; 535 function injectManualFrameloop(callback) { 536 manualFrameloop = callback; 537 } 538 539 var Globals = /*#__PURE__*/Object.freeze({ 540 get applyAnimatedValues () { return applyAnimatedValues; }, 541 injectApplyAnimatedValues: injectApplyAnimatedValues, 542 get colorNames () { return colorNames; }, 543 injectColorNames: injectColorNames, 544 get requestFrame () { return requestFrame; }, 545 get cancelFrame () { return cancelFrame; }, 546 injectFrame: injectFrame, 547 get interpolation () { return interpolation; }, 548 injectStringInterpolator: injectStringInterpolator, 549 get now () { return now; }, 550 injectNow: injectNow, 551 get defaultElement () { return defaultElement; }, 552 injectDefaultElement: injectDefaultElement, 553 get animatedApi () { return animatedApi; }, 554 injectAnimatedApi: injectAnimatedApi, 555 get createAnimatedStyle () { return createAnimatedStyle; }, 556 injectCreateAnimatedStyle: injectCreateAnimatedStyle, 557 get manualFrameloop () { return manualFrameloop; }, 558 injectManualFrameloop: injectManualFrameloop 559 }); 560 561 /** 562 * Wraps the `style` property with `AnimatedStyle`. 563 */ 564 565 var AnimatedProps = 566 /*#__PURE__*/ 567 function (_AnimatedObject) { 568 _inheritsLoose(AnimatedProps, _AnimatedObject); 569 570 function AnimatedProps(props, callback) { 571 var _this; 572 573 _this = _AnimatedObject.call(this) || this; 574 _this.update = void 0; 575 _this.payload = !props.style ? props : _extends({}, props, { 576 style: createAnimatedStyle(props.style) 577 }); 578 _this.update = callback; 579 580 _this.attach(); 581 582 return _this; 583 } 584 585 return AnimatedProps; 586 }(AnimatedObject); 587 588 var isFunctionComponent = function isFunctionComponent(val) { 589 return is.fun(val) && !(val.prototype instanceof React__default.Component); 590 }; 591 592 var createAnimatedComponent = function createAnimatedComponent(Component) { 593 var AnimatedComponent = React.forwardRef(function (props, ref) { 594 var forceUpdate = useForceUpdate(); 595 var mounted = React.useRef(true); 596 var propsAnimated = React.useRef(null); 597 var node = React.useRef(null); 598 var attachProps = React.useCallback(function (props) { 599 var oldPropsAnimated = propsAnimated.current; 600 601 var callback = function callback() { 602 var didUpdate = false; 603 604 if (node.current) { 605 didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue()); 606 } 607 608 if (!node.current || didUpdate === false) { 609 // If no referenced node has been found, or the update target didn't have a 610 // native-responder, then forceUpdate the animation ... 611 forceUpdate(); 612 } 613 }; 614 615 propsAnimated.current = new AnimatedProps(props, callback); 616 oldPropsAnimated && oldPropsAnimated.detach(); 617 }, []); 618 React.useEffect(function () { 619 return function () { 620 mounted.current = false; 621 propsAnimated.current && propsAnimated.current.detach(); 622 }; 623 }, []); 624 React.useImperativeHandle(ref, function () { 625 return animatedApi(node, mounted, forceUpdate); 626 }); 627 attachProps(props); 628 629 var _getValue = propsAnimated.current.getValue(), 630 scrollTop = _getValue.scrollTop, 631 scrollLeft = _getValue.scrollLeft, 632 animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see: 633 // See: https://github.com/react-spring/react-spring/issues/569 634 635 636 var refFn = isFunctionComponent(Component) ? undefined : function (childRef) { 637 return node.current = handleRef(childRef, ref); 638 }; 639 return React__default.createElement(Component, _extends({}, animatedProps, { 640 ref: refFn 641 })); 642 }); 643 return AnimatedComponent; 644 }; 645 646 var active = false; 647 var controllers = new Set(); 648 649 var update = function update() { 650 if (!active) return false; 651 var time = now(); 652 653 for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { 654 var _ref; 655 656 if (_isArray) { 657 if (_i >= _iterator.length) break; 658 _ref = _iterator[_i++]; 659 } else { 660 _i = _iterator.next(); 661 if (_i.done) break; 662 _ref = _i.value; 663 } 664 665 var controller = _ref; 666 var isActive = false; 667 668 for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) { 669 var config = controller.configs[configIdx]; 670 var endOfAnimation = void 0, 671 lastTime = void 0; 672 673 for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) { 674 var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude 675 676 if (animation.done) continue; 677 var from = config.fromValues[valIdx]; 678 var to = config.toValues[valIdx]; 679 var position = animation.lastPosition; 680 var isAnimated = to instanceof Animated; 681 var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity; 682 if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state 683 684 if (config.immediate) { 685 animation.setValue(to); 686 animation.done = true; 687 continue; 688 } // Break animation when string values are involved 689 690 691 if (typeof from === 'string' || typeof to === 'string') { 692 animation.setValue(to); 693 animation.done = true; 694 continue; 695 } 696 697 if (config.duration !== void 0) { 698 /** Duration easing */ 699 position = from + config.easing((time - animation.startTime) / config.duration) * (to - from); 700 endOfAnimation = time >= animation.startTime + config.duration; 701 } else if (config.decay) { 702 /** Decay easing */ 703 position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime))); 704 endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1; 705 if (endOfAnimation) to = position; 706 } else { 707 /** Spring easing */ 708 lastTime = animation.lastTime !== void 0 ? animation.lastTime : time; 709 velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end. 710 711 if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/ 712 713 var numSteps = Math.floor(time - lastTime); 714 715 for (var i = 0; i < numSteps; ++i) { 716 var force = -config.tension * (position - to); 717 var damping = -config.friction * velocity; 718 var acceleration = (force + damping) / config.mass; 719 velocity = velocity + acceleration * 1 / 1000; 720 position = position + velocity * 1 / 1000; 721 } // Conditions for stopping the spring animation 722 723 724 var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false; 725 var isVelocity = Math.abs(velocity) <= config.precision; 726 var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true; 727 endOfAnimation = isOvershooting || isVelocity && isDisplacement; 728 animation.lastVelocity = velocity; 729 animation.lastTime = time; 730 } // Trails aren't done until their parents conclude 731 732 733 if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false; 734 735 if (endOfAnimation) { 736 // Ensure that we end up with a round value 737 if (animation.value !== to) position = to; 738 animation.done = true; 739 } else isActive = true; 740 741 animation.setValue(position); 742 animation.lastPosition = position; 743 } // Keep track of updated values only when necessary 744 745 746 if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue(); 747 } // Update callbacks in the end of the frame 748 749 750 if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame 751 752 if (!isActive) { 753 controllers.delete(controller); 754 controller.stop(true); 755 } 756 } // Loop over as long as there are controllers ... 757 758 759 if (controllers.size) { 760 if (manualFrameloop) manualFrameloop();else requestFrame(update); 761 } else { 762 active = false; 763 } 764 765 return active; 766 }; 767 768 var start = function start(controller) { 769 if (!controllers.has(controller)) controllers.add(controller); 770 771 if (!active) { 772 active = true; 773 if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update); 774 } 775 }; 776 777 var stop = function stop(controller) { 778 if (controllers.has(controller)) controllers.delete(controller); 779 }; 780 781 function createInterpolator(range, output, extrapolate) { 782 if (typeof range === 'function') { 783 return range; 784 } 785 786 if (Array.isArray(range)) { 787 return createInterpolator({ 788 range: range, 789 output: output, 790 extrapolate: extrapolate 791 }); 792 } 793 794 if (interpolation && typeof range.output[0] === 'string') { 795 return interpolation(range); 796 } 797 798 var config = range; 799 var outputRange = config.output; 800 var inputRange = config.range || [0, 1]; 801 var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend'; 802 var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend'; 803 804 var easing = config.easing || function (t) { 805 return t; 806 }; 807 808 return function (input) { 809 var range = findRange(input, inputRange); 810 return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map); 811 }; 812 } 813 814 function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) { 815 var result = map ? map(input) : input; // Extrapolate 816 817 if (result < inputMin) { 818 if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin; 819 } 820 821 if (result > inputMax) { 822 if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax; 823 } 824 825 if (outputMin === outputMax) return outputMin; 826 if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range 827 828 if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing 829 830 result = easing(result); // Output Range 831 832 if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin; 833 return result; 834 } 835 836 function findRange(input, inputRange) { 837 for (var i = 1; i < inputRange.length - 1; ++i) { 838 if (inputRange[i] >= input) break; 839 } 840 841 return i - 1; 842 } 843 844 var AnimatedInterpolation = 845 /*#__PURE__*/ 846 function (_AnimatedArray) { 847 _inheritsLoose(AnimatedInterpolation, _AnimatedArray); 848 849 function AnimatedInterpolation(parents, range, output, extrapolate) { 850 var _this; 851 852 _this = _AnimatedArray.call(this) || this; 853 _this.calc = void 0; 854 _this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents]; 855 _this.calc = createInterpolator(range, output, extrapolate); 856 return _this; 857 } 858 859 var _proto = AnimatedInterpolation.prototype; 860 861 _proto.getValue = function getValue() { 862 return this.calc.apply(this, this.payload.map(function (value) { 863 return value.getValue(); 864 })); 865 }; 866 867 _proto.updateConfig = function updateConfig(range, output, extrapolate) { 868 this.calc = createInterpolator(range, output, extrapolate); 869 }; 870 871 _proto.interpolate = function interpolate(range, output, extrapolate) { 872 return new AnimatedInterpolation(this, range, output, extrapolate); 873 }; 874 875 return AnimatedInterpolation; 876 }(AnimatedArray); 877 878 var interpolate$1 = function interpolate(parents, range, output) { 879 return parents && new AnimatedInterpolation(parents, range, output); 880 }; 881 882 var config = { 883 default: { 884 tension: 170, 885 friction: 26 886 }, 887 gentle: { 888 tension: 120, 889 friction: 14 890 }, 891 wobbly: { 892 tension: 180, 893 friction: 12 894 }, 895 stiff: { 896 tension: 210, 897 friction: 20 898 }, 899 slow: { 900 tension: 280, 901 friction: 60 902 }, 903 molasses: { 904 tension: 280, 905 friction: 120 906 } 907 }; 908 909 /** API 910 * useChain(references, timeSteps, timeFrame) 911 */ 912 913 function useChain(refs, timeSteps, timeFrame) { 914 if (timeFrame === void 0) { 915 timeFrame = 1000; 916 } 917 918 var previous = React.useRef(); 919 React.useEffect(function () { 920 if (is.equ(refs, previous.current)) refs.forEach(function (_ref) { 921 var current = _ref.current; 922 return current && current.start(); 923 });else if (timeSteps) { 924 refs.forEach(function (_ref2, index) { 925 var current = _ref2.current; 926 927 if (current) { 928 var ctrls = current.controllers; 929 930 if (ctrls.length) { 931 var t = timeFrame * timeSteps[index]; 932 ctrls.forEach(function (ctrl) { 933 ctrl.queue = ctrl.queue.map(function (e) { 934 return _extends({}, e, { 935 delay: e.delay + t 936 }); 937 }); 938 ctrl.start(); 939 }); 940 } 941 } 942 }); 943 } else refs.reduce(function (q, _ref3, rI) { 944 var current = _ref3.current; 945 return q = q.then(function () { 946 return current.start(); 947 }); 948 }, Promise.resolve()); 949 previous.current = refs; 950 }); 951 } 952 953 /** 954 * Animated works by building a directed acyclic graph of dependencies 955 * transparently when you render your Animated components. 956 * 957 * new Animated.Value(0) 958 * .interpolate() .interpolate() new Animated.Value(1) 959 * opacity translateY scale 960 * style transform 961 * View#234 style 962 * View#123 963 * 964 * A) Top Down phase 965 * When an AnimatedValue is updated, we recursively go down through this 966 * graph in order to find leaf nodes: the views that we flag as needing 967 * an update. 968 * 969 * B) Bottom Up phase 970 * When a view is flagged as needing an update, we recursively go back up 971 * in order to build the new value that it needs. The reason why we need 972 * this two-phases process is to deal with composite props such as 973 * transform which can receive values from multiple parents. 974 */ 975 function addAnimatedStyles(node, styles) { 976 if ('update' in node) { 977 styles.add(node); 978 } else { 979 node.getChildren().forEach(function (child) { 980 return addAnimatedStyles(child, styles); 981 }); 982 } 983 } 984 985 var AnimatedValue = 986 /*#__PURE__*/ 987 function (_Animated) { 988 _inheritsLoose(AnimatedValue, _Animated); 989 990 function AnimatedValue(_value) { 991 var _this; 992 993 _this = _Animated.call(this) || this; 994 _this.animatedStyles = new Set(); 995 _this.value = void 0; 996 _this.startPosition = void 0; 997 _this.lastPosition = void 0; 998 _this.lastVelocity = void 0; 999 _this.startTime = void 0; 1000 _this.lastTime = void 0; 1001 _this.done = false; 1002 1003 _this.setValue = function (value, flush) { 1004 if (flush === void 0) { 1005 flush = true; 1006 } 1007 1008 _this.value = value; 1009 if (flush) _this.flush(); 1010 }; 1011 1012 _this.value = _value; 1013 _this.startPosition = _value; 1014 _this.lastPosition = _value; 1015 return _this; 1016 } 1017 1018 var _proto = AnimatedValue.prototype; 1019 1020 _proto.flush = function flush() { 1021 if (this.animatedStyles.size === 0) { 1022 addAnimatedStyles(this, this.animatedStyles); 1023 } 1024 1025 this.animatedStyles.forEach(function (animatedStyle) { 1026 return animatedStyle.update(); 1027 }); 1028 }; 1029 1030 _proto.clearStyles = function clearStyles() { 1031 this.animatedStyles.clear(); 1032 }; 1033 1034 _proto.getValue = function getValue() { 1035 return this.value; 1036 }; 1037 1038 _proto.interpolate = function interpolate(range, output, extrapolate) { 1039 return new AnimatedInterpolation(this, range, output, extrapolate); 1040 }; 1041 1042 return AnimatedValue; 1043 }(Animated); 1044 1045 var AnimatedValueArray = 1046 /*#__PURE__*/ 1047 function (_AnimatedArray) { 1048 _inheritsLoose(AnimatedValueArray, _AnimatedArray); 1049 1050 function AnimatedValueArray(values) { 1051 var _this; 1052 1053 _this = _AnimatedArray.call(this) || this; 1054 _this.payload = values.map(function (n) { 1055 return new AnimatedValue(n); 1056 }); 1057 return _this; 1058 } 1059 1060 var _proto = AnimatedValueArray.prototype; 1061 1062 _proto.setValue = function setValue(value, flush) { 1063 var _this2 = this; 1064 1065 if (flush === void 0) { 1066 flush = true; 1067 } 1068 1069 if (Array.isArray(value)) { 1070 if (value.length === this.payload.length) { 1071 value.forEach(function (v, i) { 1072 return _this2.payload[i].setValue(v, flush); 1073 }); 1074 } 1075 } else { 1076 this.payload.forEach(function (p) { 1077 return p.setValue(value, flush); 1078 }); 1079 } 1080 }; 1081 1082 _proto.getValue = function getValue() { 1083 return this.payload.map(function (v) { 1084 return v.getValue(); 1085 }); 1086 }; 1087 1088 _proto.interpolate = function interpolate(range, output) { 1089 return new AnimatedInterpolation(this, range, output); 1090 }; 1091 1092 return AnimatedValueArray; 1093 }(AnimatedArray); 1094 1095 var G = 0; 1096 1097 var Controller = 1098 /*#__PURE__*/ 1099 function () { 1100 function Controller() { 1101 var _this = this; 1102 1103 this.id = void 0; 1104 this.idle = true; 1105 this.hasChanged = false; 1106 this.guid = 0; 1107 this.local = 0; 1108 this.props = {}; 1109 this.merged = {}; 1110 this.animations = {}; 1111 this.interpolations = {}; 1112 this.values = {}; 1113 this.configs = []; 1114 this.listeners = []; 1115 this.queue = []; 1116 this.localQueue = void 0; 1117 1118 this.getValues = function () { 1119 return _this.interpolations; 1120 }; 1121 1122 this.id = G++; 1123 } 1124 /** update(props) 1125 * This function filters input props and creates an array of tasks which are executed in .start() 1126 * Each task is allowed to carry a delay, which means it can execute asnychroneously */ 1127 1128 1129 var _proto = Controller.prototype; 1130 1131 _proto.update = function update$$1(args) { 1132 //this._id = n + this.id 1133 if (!args) return this; // Extract delay and the to-prop from props 1134 1135 var _ref = interpolateTo(args), 1136 _ref$delay = _ref.delay, 1137 delay = _ref$delay === void 0 ? 0 : _ref$delay, 1138 to = _ref.to, 1139 props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]); 1140 1141 if (is.arr(to) || is.fun(to)) { 1142 // If config is either a function or an array queue it up as is 1143 this.queue.push(_extends({}, props, { 1144 delay: delay, 1145 to: to 1146 })); 1147 } else if (to) { 1148 // Otherwise go through each key since it could be delayed individually 1149 var ops = {}; 1150 Object.entries(to).forEach(function (_ref2) { 1151 var _to; 1152 1153 var k = _ref2[0], 1154 v = _ref2[1]; 1155 1156 // Fetch delay and create an entry, consisting of the to-props, the delay, and basic props 1157 var entry = _extends({ 1158 to: (_to = {}, _to[k] = v, _to), 1159 delay: callProp(delay, k) 1160 }, props); 1161 1162 var previous = ops[entry.delay] && ops[entry.delay].to; 1163 ops[entry.delay] = _extends({}, ops[entry.delay], entry, { 1164 to: _extends({}, previous, entry.to) 1165 }); 1166 }); 1167 this.queue = Object.values(ops); 1168 } // Sort queue, so that async calls go last 1169 1170 1171 this.queue = this.queue.sort(function (a, b) { 1172 return a.delay - b.delay; 1173 }); // Diff the reduced props immediately (they'll contain the from-prop and some config) 1174 1175 this.diff(props); 1176 return this; 1177 } 1178 /** start(onEnd) 1179 * This function either executes a queue, if present, or starts the frameloop, which animates */ 1180 ; 1181 1182 _proto.start = function start$$1(onEnd) { 1183 var _this2 = this; 1184 1185 // If a queue is present we must excecute it 1186 if (this.queue.length) { 1187 this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values 1188 1189 if (this.localQueue) { 1190 this.localQueue.forEach(function (_ref3) { 1191 var _ref3$from = _ref3.from, 1192 from = _ref3$from === void 0 ? {} : _ref3$from, 1193 _ref3$to = _ref3.to, 1194 to = _ref3$to === void 0 ? {} : _ref3$to; 1195 if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged); 1196 if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to); 1197 }); 1198 } // The guid helps us tracking frames, a new queue over an old one means an override 1199 // We discard async calls in that caseÍ 1200 1201 1202 var local = this.local = ++this.guid; 1203 var queue = this.localQueue = this.queue; 1204 this.queue = []; // Go through each entry and execute it 1205 1206 queue.forEach(function (_ref4, index) { 1207 var delay = _ref4.delay, 1208 props = _objectWithoutPropertiesLoose(_ref4, ["delay"]); 1209 1210 var cb = function cb(finished) { 1211 if (index === queue.length - 1 && local === _this2.guid && finished) { 1212 _this2.idle = true; 1213 if (_this2.props.onRest) _this2.props.onRest(_this2.merged); 1214 } 1215 1216 if (onEnd) onEnd(); 1217 }; // Entries can be delayed, ansyc or immediate 1218 1219 1220 var async = is.arr(props.to) || is.fun(props.to); 1221 1222 if (delay) { 1223 setTimeout(function () { 1224 if (local === _this2.guid) { 1225 if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb); 1226 } 1227 }, delay); 1228 } else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb); 1229 }); 1230 } // Otherwise we kick of the frameloop 1231 else { 1232 if (is.fun(onEnd)) this.listeners.push(onEnd); 1233 if (this.props.onStart) this.props.onStart(); 1234 1235 start(this); 1236 } 1237 1238 return this; 1239 }; 1240 1241 _proto.stop = function stop$$1(finished) { 1242 this.listeners.forEach(function (onEnd) { 1243 return onEnd(finished); 1244 }); 1245 this.listeners = []; 1246 return this; 1247 } 1248 /** Pause sets onEnd listeners free, but also removes the controller from the frameloop */ 1249 ; 1250 1251 _proto.pause = function pause(finished) { 1252 this.stop(true); 1253 if (finished) stop(this); 1254 return this; 1255 }; 1256 1257 _proto.runAsync = function runAsync(_ref5, onEnd) { 1258 var _this3 = this; 1259 1260 var delay = _ref5.delay, 1261 props = _objectWithoutPropertiesLoose(_ref5, ["delay"]); 1262 1263 var local = this.local; // If "to" is either a function or an array it will be processed async, therefor "to" should be empty right now 1264 // If the view relies on certain values "from" has to be present 1265 1266 var queue = Promise.resolve(undefined); 1267 1268 if (is.arr(props.to)) { 1269 var _loop = function _loop(i) { 1270 var index = i; 1271 1272 var fresh = _extends({}, props, interpolateTo(props.to[index])); 1273 1274 if (is.arr(fresh.config)) fresh.config = fresh.config[index]; 1275 queue = queue.then(function () { 1276 //this.stop() 1277 if (local === _this3.guid) return new Promise(function (r) { 1278 return _this3.diff(fresh).start(r); 1279 }); 1280 }); 1281 }; 1282 1283 for (var i = 0; i < props.to.length; i++) { 1284 _loop(i); 1285 } 1286 } else if (is.fun(props.to)) { 1287 var index = 0; 1288 var last; 1289 queue = queue.then(function () { 1290 return props.to( // next(props) 1291 function (p) { 1292 var fresh = _extends({}, props, interpolateTo(p)); 1293 1294 if (is.arr(fresh.config)) fresh.config = fresh.config[index]; 1295 index++; //this.stop() 1296 1297 if (local === _this3.guid) return last = new Promise(function (r) { 1298 return _this3.diff(fresh).start(r); 1299 }); 1300 return; 1301 }, // cancel() 1302 function (finished) { 1303 if (finished === void 0) { 1304 finished = true; 1305 } 1306 1307 return _this3.stop(finished); 1308 }).then(function () { 1309 return last; 1310 }); 1311 }); 1312 } 1313 1314 queue.then(onEnd); 1315 }; 1316 1317 _proto.diff = function diff(props) { 1318 var _this4 = this; 1319 1320 this.props = _extends({}, this.props, props); 1321 var _this$props = this.props, 1322 _this$props$from = _this$props.from, 1323 from = _this$props$from === void 0 ? {} : _this$props$from, 1324 _this$props$to = _this$props.to, 1325 to = _this$props$to === void 0 ? {} : _this$props$to, 1326 _this$props$config = _this$props.config, 1327 config = _this$props$config === void 0 ? {} : _this$props$config, 1328 reverse = _this$props.reverse, 1329 attach = _this$props.attach, 1330 reset = _this$props.reset, 1331 immediate = _this$props.immediate; // Reverse values when requested 1332 1333 if (reverse) { 1334 var _ref6 = [to, from]; 1335 from = _ref6[0]; 1336 to = _ref6[1]; 1337 } // This will collect all props that were ever set, reset merged props when necessary 1338 1339 1340 this.merged = _extends({}, from, this.merged, to); 1341 this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring 1342 1343 var target = attach && attach(this); // Reduces input { name: value } pairs into animated values 1344 1345 this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) { 1346 var name = _ref7[0], 1347 value = _ref7[1]; 1348 // Issue cached entries, except on reset 1349 var entry = acc[name] || {}; // Figure out what the value is supposed to be 1350 1351 var isNumber = is.num(value); 1352 var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value]; 1353 var isArray = is.arr(value); 1354 var isInterpolation = !isNumber && !isArray && !isString; 1355 var fromValue = !is.und(from[name]) ? from[name] : value; 1356 var toValue = isNumber || isArray ? value : isString ? value : 1; 1357 var toConfig = callProp(config, name); 1358 if (target) toValue = target.animations[name].parent; 1359 var parent = entry.parent, 1360 interpolation$$1 = entry.interpolation, 1361 toValues = toArray(target ? toValue.getPayload() : toValue), 1362 animatedValues; 1363 var newValue = value; 1364 if (isInterpolation) newValue = interpolation({ 1365 range: [0, 1], 1366 output: [value, value] 1367 })(1); 1368 var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags 1369 1370 var isFirst = is.und(parent); 1371 var isActive = !isFirst && entry.animatedValues.some(function (v) { 1372 return !v.done; 1373 }); 1374 var currentValueDiffersFromGoal = !is.equ(newValue, currentValue); 1375 var hasNewGoal = !is.equ(newValue, entry.previous); 1376 var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one) 1377 // and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?) 1378 1379 if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) { 1380 var _extends2; 1381 1382 // Convert regular values into animated values, ALWAYS re-use if possible 1383 if (isNumber || isString) parent = interpolation$$1 = entry.parent || new AnimatedValue(fromValue);else if (isArray) parent = interpolation$$1 = entry.parent || new AnimatedValueArray(fromValue);else if (isInterpolation) { 1384 var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value); 1385 prev = prev !== void 0 && !reset ? prev : fromValue; 1386 1387 if (entry.parent) { 1388 parent = entry.parent; 1389 parent.setValue(0, false); 1390 } else parent = new AnimatedValue(0); 1391 1392 var range = { 1393 output: [prev, value] 1394 }; 1395 1396 if (entry.interpolation) { 1397 interpolation$$1 = entry.interpolation; 1398 entry.interpolation.updateConfig(range); 1399 } else interpolation$$1 = parent.interpolate(range); 1400 } 1401 toValues = toArray(target ? toValue.getPayload() : toValue); 1402 animatedValues = toArray(parent.getPayload()); 1403 if (reset && !isInterpolation) parent.setValue(fromValue, false); 1404 _this4.hasChanged = true; // Reset animated values 1405 1406 animatedValues.forEach(function (value) { 1407 value.startPosition = value.value; 1408 value.lastPosition = value.value; 1409 value.lastVelocity = isActive ? value.lastVelocity : undefined; 1410 value.lastTime = isActive ? value.lastTime : undefined; 1411 value.startTime = now(); 1412 value.done = false; 1413 value.animatedStyles.clear(); 1414 }); // Set immediate values 1415 1416 if (callProp(immediate, name)) { 1417 parent.setValue(isInterpolation ? toValue : value, false); 1418 } 1419 1420 return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, { 1421 name: name, 1422 parent: parent, 1423 interpolation: interpolation$$1, 1424 animatedValues: animatedValues, 1425 toValues: toValues, 1426 previous: newValue, 1427 config: toConfig, 1428 fromValues: toArray(parent.getValue()), 1429 immediate: callProp(immediate, name), 1430 initialVelocity: withDefault(toConfig.velocity, 0), 1431 clamp: withDefault(toConfig.clamp, false), 1432 precision: withDefault(toConfig.precision, 0.01), 1433 tension: withDefault(toConfig.tension, 170), 1434 friction: withDefault(toConfig.friction, 26), 1435 mass: withDefault(toConfig.mass, 1), 1436 duration: toConfig.duration, 1437 easing: withDefault(toConfig.easing, function (t) { 1438 return t; 1439 }), 1440 decay: toConfig.decay 1441 }), _extends2)); 1442 } else { 1443 if (!currentValueDiffersFromGoal) { 1444 var _extends3; 1445 1446 // So ... the current target value (newValue) appears to be different from the previous value, 1447 // which normally constitutes an update, but the actual value (currentValue) matches the target! 1448 // In order to resolve this without causing an animation update we silently flag the animation as done, 1449 // which it technically is. Interpolations also needs a config update with their target set to 1. 1450 if (isInterpolation) { 1451 parent.setValue(1, false); 1452 interpolation$$1.updateConfig({ 1453 output: [newValue, newValue] 1454 }); 1455 } 1456 1457 parent.done = true; 1458 _this4.hasChanged = true; 1459 return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], { 1460 previous: newValue 1461 }), _extends3)); 1462 } 1463 1464 return acc; 1465 } 1466 }, this.animations); 1467 1468 if (this.hasChanged) { 1469 // Make animations available to frameloop 1470 this.configs = Object.values(this.animations); 1471 this.values = {}; 1472 this.interpolations = {}; 1473 1474 for (var key in this.animations) { 1475 this.interpolations[key] = this.animations[key].interpolation; 1476 this.values[key] = this.animations[key].interpolation.getValue(); 1477 } 1478 } 1479 1480 return this; 1481 }; 1482 1483 _proto.destroy = function destroy() { 1484 this.stop(); 1485 this.props = {}; 1486 this.merged = {}; 1487 this.animations = {}; 1488 this.interpolations = {}; 1489 this.values = {}; 1490 this.configs = []; 1491 this.local = 0; 1492 }; 1493 1494 return Controller; 1495 }(); 1496 1497 /** API 1498 * const props = useSprings(number, [{ ... }, { ... }, ...]) 1499 * const [props, set] = useSprings(number, (i, controller) => ({ ... })) 1500 */ 1501 1502 var useSprings = function useSprings(length, props) { 1503 var mounted = React.useRef(false); 1504 var ctrl = React.useRef(); 1505 var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations 1506 1507 var _useMemo = React.useMemo(function () { 1508 // Remove old controllers 1509 if (ctrl.current) { 1510 ctrl.current.map(function (c) { 1511 return c.destroy(); 1512 }); 1513 ctrl.current = undefined; 1514 } 1515 1516 var ref; 1517 return [new Array(length).fill().map(function (_, i) { 1518 var ctrl = new Controller(); 1519 var newProps = isFn ? callProp(props, i, ctrl) : props[i]; 1520 if (i === 0) ref = newProps.ref; 1521 ctrl.update(newProps); 1522 if (!ref) ctrl.start(); 1523 return ctrl; 1524 }), ref]; 1525 }, [length]), 1526 controllers = _useMemo[0], 1527 ref = _useMemo[1]; 1528 1529 ctrl.current = controllers; // The hooks reference api gets defined here ... 1530 1531 var api = React.useImperativeHandle(ref, function () { 1532 return { 1533 start: function start() { 1534 return Promise.all(ctrl.current.map(function (c) { 1535 return new Promise(function (r) { 1536 return c.start(r); 1537 }); 1538 })); 1539 }, 1540 stop: function stop(finished) { 1541 return ctrl.current.forEach(function (c) { 1542 return c.stop(finished); 1543 }); 1544 }, 1545 1546 get controllers() { 1547 return ctrl.current; 1548 } 1549 1550 }; 1551 }); // This function updates the controllers 1552 1553 var updateCtrl = React.useMemo(function () { 1554 return function (updateProps) { 1555 return ctrl.current.map(function (c, i) { 1556 c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]); 1557 if (!ref) c.start(); 1558 }); 1559 }; 1560 }, [length]); // Update controller if props aren't functional 1561 1562 React.useEffect(function () { 1563 if (mounted.current) { 1564 if (!isFn) updateCtrl(props); 1565 } else if (!ref) ctrl.current.forEach(function (c) { 1566 return c.start(); 1567 }); 1568 }); // Update mounted flag and destroy controller on unmount 1569 1570 React.useEffect(function () { 1571 return mounted.current = true, function () { 1572 return ctrl.current.forEach(function (c) { 1573 return c.destroy(); 1574 }); 1575 }; 1576 }, []); // Return animated props, or, anim-props + the update-setter above 1577 1578 var propValues = ctrl.current.map(function (c) { 1579 return c.getValues(); 1580 }); 1581 return isFn ? [propValues, updateCtrl, function (finished) { 1582 return ctrl.current.forEach(function (c) { 1583 return c.pause(finished); 1584 }); 1585 }] : propValues; 1586 }; 1587 1588 /** API 1589 * const props = useSpring({ ... }) 1590 * const [props, set] = useSpring(() => ({ ... })) 1591 */ 1592 1593 var useSpring = function useSpring(props) { 1594 var isFn = is.fun(props); 1595 1596 var _useSprings = useSprings(1, isFn ? props : [props]), 1597 result = _useSprings[0], 1598 set = _useSprings[1], 1599 pause = _useSprings[2]; 1600 1601 return isFn ? [result[0], set, pause] : result; 1602 }; 1603 1604 /** API 1605 * const trails = useTrail(number, { ... }) 1606 * const [trails, set] = useTrail(number, () => ({ ... })) 1607 */ 1608 1609 var useTrail = function useTrail(length, props) { 1610 var mounted = React.useRef(false); 1611 var isFn = is.fun(props); 1612 var updateProps = callProp(props); 1613 var instances = React.useRef(); 1614 1615 var _useSprings = useSprings(length, function (i, ctrl) { 1616 if (i === 0) instances.current = []; 1617 instances.current.push(ctrl); 1618 return _extends({}, updateProps, { 1619 config: callProp(updateProps.config, i), 1620 attach: i > 0 && function () { 1621 return instances.current[i - 1]; 1622 } 1623 }); 1624 }), 1625 result = _useSprings[0], 1626 set = _useSprings[1], 1627 pause = _useSprings[2]; // Set up function to update controller 1628 1629 1630 var updateCtrl = React.useMemo(function () { 1631 return function (props) { 1632 return set(function (i, ctrl) { 1633 var last = props.reverse ? i === 0 : length - 1 === i; 1634 var attachIdx = props.reverse ? i + 1 : i - 1; 1635 var attachController = instances.current[attachIdx]; 1636 return _extends({}, props, { 1637 config: callProp(props.config || updateProps.config, i), 1638 attach: attachController && function () { 1639 return attachController; 1640 } 1641 }); 1642 }); 1643 }; 1644 }, [length, updateProps.reverse]); // Update controller if props aren't functional 1645 1646 React.useEffect(function () { 1647 return void (mounted.current && !isFn && updateCtrl(props)); 1648 }); // Update mounted flag and destroy controller on unmount 1649 1650 React.useEffect(function () { 1651 return void (mounted.current = true); 1652 }, []); 1653 return isFn ? [result, updateCtrl, pause] : result; 1654 }; 1655 1656 /** API 1657 * const transitions = useTransition(items, itemKeys, { ... }) 1658 * const [transitions, update] = useTransition(items, itemKeys, () => ({ ... })) 1659 */ 1660 1661 var guid = 0; 1662 var ENTER = 'enter'; 1663 var LEAVE = 'leave'; 1664 var UPDATE = 'update'; 1665 1666 var mapKeys = function mapKeys(items, keys) { 1667 return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String); 1668 }; 1669 1670 var get = function get(props) { 1671 var items = props.items, 1672 _props$keys = props.keys, 1673 keys = _props$keys === void 0 ? function (item) { 1674 return item; 1675 } : _props$keys, 1676 rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]); 1677 1678 items = toArray(items !== void 0 ? items : null); 1679 return _extends({ 1680 items: items, 1681 keys: mapKeys(items, keys) 1682 }, rest); 1683 }; 1684 1685 function useTransition(input, keyTransform, config) { 1686 var props = _extends({ 1687 items: input, 1688 keys: keyTransform || function (i) { 1689 return i; 1690 } 1691 }, config); 1692 1693 var _get = get(props), 1694 _get$lazy = _get.lazy, 1695 lazy = _get$lazy === void 0 ? false : _get$lazy, 1696 _get$unique = _get.unique, 1697 _get$reset = _get.reset, 1698 reset = _get$reset === void 0 ? false : _get$reset, 1699 enter = _get.enter, 1700 leave = _get.leave, 1701 update = _get.update, 1702 onDestroyed = _get.onDestroyed, 1703 keys = _get.keys, 1704 items = _get.items, 1705 onFrame = _get.onFrame, 1706 _onRest = _get.onRest, 1707 onStart = _get.onStart, 1708 ref = _get.ref, 1709 extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]); 1710 1711 var forceUpdate = useForceUpdate(); 1712 var mounted = React.useRef(false); 1713 var state = React.useRef({ 1714 mounted: false, 1715 first: true, 1716 deleted: [], 1717 current: {}, 1718 transitions: [], 1719 prevProps: {}, 1720 paused: !!props.ref, 1721 instances: !mounted.current && new Map(), 1722 forceUpdate: forceUpdate 1723 }); 1724 React.useImperativeHandle(props.ref, function () { 1725 return { 1726 start: function start() { 1727 return Promise.all(Array.from(state.current.instances).map(function (_ref) { 1728 var c = _ref[1]; 1729 return new Promise(function (r) { 1730 return c.start(r); 1731 }); 1732 })); 1733 }, 1734 stop: function stop(finished) { 1735 return Array.from(state.current.instances).forEach(function (_ref2) { 1736 var c = _ref2[1]; 1737 return c.stop(finished); 1738 }); 1739 }, 1740 1741 get controllers() { 1742 return Array.from(state.current.instances).map(function (_ref3) { 1743 var c = _ref3[1]; 1744 return c; 1745 }); 1746 } 1747 1748 }; 1749 }); // Update state 1750 1751 state.current = diffItems(state.current, props); 1752 1753 if (state.current.changed) { 1754 // Update state 1755 state.current.transitions.forEach(function (transition) { 1756 var slot = transition.slot, 1757 from = transition.from, 1758 to = transition.to, 1759 config = transition.config, 1760 trail = transition.trail, 1761 key = transition.key, 1762 item = transition.item; 1763 if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object 1764 1765 var ctrl = state.current.instances.get(key); 1766 1767 var newProps = _extends({}, extra, { 1768 to: to, 1769 from: from, 1770 config: config, 1771 ref: ref, 1772 onRest: function onRest(values) { 1773 if (state.current.mounted) { 1774 if (transition.destroyed) { 1775 // If no ref is given delete destroyed items immediately 1776 if (!ref && !lazy) cleanUp(state, key); 1777 if (onDestroyed) onDestroyed(item); 1778 } // A transition comes to rest once all its springs conclude 1779 1780 1781 var curInstances = Array.from(state.current.instances); 1782 var active = curInstances.some(function (_ref4) { 1783 var c = _ref4[1]; 1784 return !c.idle; 1785 }); 1786 if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state); 1787 if (_onRest) _onRest(item, slot, values); 1788 } 1789 }, 1790 onStart: onStart && function () { 1791 return onStart(item, slot); 1792 }, 1793 onFrame: onFrame && function (values) { 1794 return onFrame(item, slot, values); 1795 }, 1796 delay: trail, 1797 reset: reset && slot === ENTER // Update controller 1798 1799 }); 1800 1801 ctrl.update(newProps); 1802 if (!state.current.paused) ctrl.start(); 1803 }); 1804 } 1805 1806 React.useEffect(function () { 1807 state.current.mounted = mounted.current = true; 1808 return function () { 1809 state.current.mounted = mounted.current = false; 1810 Array.from(state.current.instances).map(function (_ref5) { 1811 var c = _ref5[1]; 1812 return c.destroy(); 1813 }); 1814 state.current.instances.clear(); 1815 }; 1816 }, []); 1817 return state.current.transitions.map(function (_ref6) { 1818 var item = _ref6.item, 1819 slot = _ref6.slot, 1820 key = _ref6.key; 1821 return { 1822 item: item, 1823 key: key, 1824 state: slot, 1825 props: state.current.instances.get(key).getValues() 1826 }; 1827 }); 1828 } 1829 1830 function cleanUp(state, filterKey) { 1831 var deleted = state.current.deleted; 1832 1833 var _loop = function _loop() { 1834 if (_isArray) { 1835 if (_i >= _iterator.length) return "break"; 1836 _ref8 = _iterator[_i++]; 1837 } else { 1838 _i = _iterator.next(); 1839 if (_i.done) return "break"; 1840 _ref8 = _i.value; 1841 } 1842 1843 var _ref7 = _ref8; 1844 var key = _ref7.key; 1845 1846 var filter = function filter(t) { 1847 return t.key !== key; 1848 }; 1849 1850 if (is.und(filterKey) || filterKey === key) { 1851 state.current.instances.delete(key); 1852 state.current.transitions = state.current.transitions.filter(filter); 1853 state.current.deleted = state.current.deleted.filter(filter); 1854 } 1855 }; 1856 1857 for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { 1858 var _ref8; 1859 1860 var _ret = _loop(); 1861 1862 if (_ret === "break") break; 1863 } 1864 1865 state.current.forceUpdate(); 1866 } 1867 1868 function diffItems(_ref9, props) { 1869 var first = _ref9.first, 1870 prevProps = _ref9.prevProps, 1871 state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]); 1872 1873 var _get2 = get(props), 1874 items = _get2.items, 1875 keys = _get2.keys, 1876 initial = _get2.initial, 1877 from = _get2.from, 1878 enter = _get2.enter, 1879 leave = _get2.leave, 1880 update = _get2.update, 1881 _get2$trail = _get2.trail, 1882 trail = _get2$trail === void 0 ? 0 : _get2$trail, 1883 unique = _get2.unique, 1884 config = _get2.config, 1885 _get2$order = _get2.order, 1886 order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order; 1887 1888 var _get3 = get(prevProps), 1889 _keys = _get3.keys, 1890 _items = _get3.items; 1891 1892 var current = _extends({}, state.current); 1893 1894 var deleted = [].concat(state.deleted); // Compare next keys with current keys 1895 1896 var currentKeys = Object.keys(current); 1897 var currentSet = new Set(currentKeys); 1898 var nextSet = new Set(keys); 1899 var added = keys.filter(function (item) { 1900 return !currentSet.has(item); 1901 }); 1902 var removed = state.transitions.filter(function (item) { 1903 return !item.destroyed && !nextSet.has(item.originalKey); 1904 }).map(function (i) { 1905 return i.originalKey; 1906 }); 1907 var updated = keys.filter(function (item) { 1908 return currentSet.has(item); 1909 }); 1910 var delay = -trail; 1911 1912 while (order.length) { 1913 var changeType = order.shift(); 1914 1915 switch (changeType) { 1916 case ENTER: 1917 { 1918 added.forEach(function (key, index) { 1919 // In unique mode, remove fading out transitions if their key comes in again 1920 if (unique && deleted.find(function (d) { 1921 return d.originalKey === key; 1922 })) deleted = deleted.filter(function (t) { 1923 return t.originalKey !== key; 1924 }); 1925 var keyIndex = keys.indexOf(key); 1926 var item = items[keyIndex]; 1927 var slot = first && initial !== void 0 ? 'initial' : ENTER; 1928 current[key] = { 1929 slot: slot, 1930 originalKey: key, 1931 key: unique ? String(key) : guid++, 1932 item: item, 1933 trail: delay = delay + trail, 1934 config: callProp(config, item, slot), 1935 from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item), 1936 to: callProp(enter, item) 1937 }; 1938 }); 1939 break; 1940 } 1941 1942 case LEAVE: 1943 { 1944 removed.forEach(function (key) { 1945 var keyIndex = _keys.indexOf(key); 1946 1947 var item = _items[keyIndex]; 1948 var slot = LEAVE; 1949 deleted.unshift(_extends({}, current[key], { 1950 slot: slot, 1951 destroyed: true, 1952 left: _keys[Math.max(0, keyIndex - 1)], 1953 right: _keys[Math.min(_keys.length, keyIndex + 1)], 1954 trail: delay = delay + trail, 1955 config: callProp(config, item, slot), 1956 to: callProp(leave, item) 1957 })); 1958 delete current[key]; 1959 }); 1960 break; 1961 } 1962 1963 case UPDATE: 1964 { 1965 updated.forEach(function (key) { 1966 var keyIndex = keys.indexOf(key); 1967 var item = items[keyIndex]; 1968 var slot = UPDATE; 1969 current[key] = _extends({}, current[key], { 1970 item: item, 1971 slot: slot, 1972 trail: delay = delay + trail, 1973 config: callProp(config, item, slot), 1974 to: callProp(update, item) 1975 }); 1976 }); 1977 break; 1978 } 1979 } 1980 } 1981 1982 var out = keys.map(function (key) { 1983 return current[key]; 1984 }); // This tries to restore order for deleted items by finding their last known siblings 1985 // only using the left sibling to keep order placement consistent for all deleted items 1986 1987 deleted.forEach(function (_ref10) { 1988 var left = _ref10.left, 1989 right = _ref10.right, 1990 item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]); 1991 1992 var pos; // Was it the element on the left, if yes, move there ... 1993 1994 if ((pos = out.findIndex(function (t) { 1995 return t.originalKey === left; 1996 })) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯ 1997 1998 pos = Math.max(0, pos); 1999 out = [].concat(out.slice(0, pos), [item], out.slice(pos)); 2000 }); 2001 return _extends({}, state, { 2002 changed: added.length || removed.length || updated.length, 2003 first: first && added.length === 0, 2004 transitions: out, 2005 current: current, 2006 deleted: deleted, 2007 prevProps: props 2008 }); 2009 } 2010 2011 var AnimatedStyle = 2012 /*#__PURE__*/ 2013 function (_AnimatedObject) { 2014 _inheritsLoose(AnimatedStyle, _AnimatedObject); 2015 2016 function AnimatedStyle(style) { 2017 var _this; 2018 2019 if (style === void 0) { 2020 style = {}; 2021 } 2022 2023 _this = _AnimatedObject.call(this) || this; 2024 2025 if (style.transform && !(style.transform instanceof Animated)) { 2026 style = applyAnimatedValues.transform(style); 2027 } 2028 2029 _this.payload = style; 2030 return _this; 2031 } 2032 2033 return AnimatedStyle; 2034 }(AnimatedObject); 2035 2036 // http://www.w3.org/TR/css3-color/#svg-color 2037 var colors = { 2038 transparent: 0x00000000, 2039 aliceblue: 0xf0f8ffff, 2040 antiquewhite: 0xfaebd7ff, 2041 aqua: 0x00ffffff, 2042 aquamarine: 0x7fffd4ff, 2043 azure: 0xf0ffffff, 2044 beige: 0xf5f5dcff, 2045 bisque: 0xffe4c4ff, 2046 black: 0x000000ff, 2047 blanchedalmond: 0xffebcdff, 2048 blue: 0x0000ffff, 2049 blueviolet: 0x8a2be2ff, 2050 brown: 0xa52a2aff, 2051 burlywood: 0xdeb887ff, 2052 burntsienna: 0xea7e5dff, 2053 cadetblue: 0x5f9ea0ff, 2054 chartreuse: 0x7fff00ff, 2055 chocolate: 0xd2691eff, 2056 coral: 0xff7f50ff, 2057 cornflowerblue: 0x6495edff, 2058 cornsilk: 0xfff8dcff, 2059 crimson: 0xdc143cff, 2060 cyan: 0x00ffffff, 2061 darkblue: 0x00008bff, 2062 darkcyan: 0x008b8bff, 2063 darkgoldenrod: 0xb8860bff, 2064 darkgray: 0xa9a9a9ff, 2065 darkgreen: 0x006400ff, 2066 darkgrey: 0xa9a9a9ff, 2067 darkkhaki: 0xbdb76bff, 2068 darkmagenta: 0x8b008bff, 2069 darkolivegreen: 0x556b2fff, 2070 darkorange: 0xff8c00ff, 2071 darkorchid: 0x9932ccff, 2072 darkred: 0x8b0000ff, 2073 darksalmon: 0xe9967aff, 2074 darkseagreen: 0x8fbc8fff, 2075 darkslateblue: 0x483d8bff, 2076 darkslategray: 0x2f4f4fff, 2077 darkslategrey: 0x2f4f4fff, 2078 darkturquoise: 0x00ced1ff, 2079 darkviolet: 0x9400d3ff, 2080 deeppink: 0xff1493ff, 2081 deepskyblue: 0x00bfffff, 2082 dimgray: 0x696969ff, 2083 dimgrey: 0x696969ff, 2084 dodgerblue: 0x1e90ffff, 2085 firebrick: 0xb22222ff, 2086 floralwhite: 0xfffaf0ff, 2087 forestgreen: 0x228b22ff, 2088 fuchsia: 0xff00ffff, 2089 gainsboro: 0xdcdcdcff, 2090 ghostwhite: 0xf8f8ffff, 2091 gold: 0xffd700ff, 2092 goldenrod: 0xdaa520ff, 2093 gray: 0x808080ff, 2094 green: 0x008000ff, 2095 greenyellow: 0xadff2fff, 2096 grey: 0x808080ff, 2097 honeydew: 0xf0fff0ff, 2098 hotpink: 0xff69b4ff, 2099 indianred: 0xcd5c5cff, 2100 indigo: 0x4b0082ff, 2101 ivory: 0xfffff0ff, 2102 khaki: 0xf0e68cff, 2103 lavender: 0xe6e6faff, 2104 lavenderblush: 0xfff0f5ff, 2105 lawngreen: 0x7cfc00ff, 2106 lemonchiffon: 0xfffacdff, 2107 lightblue: 0xadd8e6ff, 2108 lightcoral: 0xf08080ff, 2109 lightcyan: 0xe0ffffff, 2110 lightgoldenrodyellow: 0xfafad2ff, 2111 lightgray: 0xd3d3d3ff, 2112 lightgreen: 0x90ee90ff, 2113 lightgrey: 0xd3d3d3ff, 2114 lightpink: 0xffb6c1ff, 2115 lightsalmon: 0xffa07aff, 2116 lightseagreen: 0x20b2aaff, 2117 lightskyblue: 0x87cefaff, 2118 lightslategray: 0x778899ff, 2119 lightslategrey: 0x778899ff, 2120 lightsteelblue: 0xb0c4deff, 2121 lightyellow: 0xffffe0ff, 2122 lime: 0x00ff00ff, 2123 limegreen: 0x32cd32ff, 2124 linen: 0xfaf0e6ff, 2125 magenta: 0xff00ffff, 2126 maroon: 0x800000ff, 2127 mediumaquamarine: 0x66cdaaff, 2128 mediumblue: 0x0000cdff, 2129 mediumorchid: 0xba55d3ff, 2130 mediumpurple: 0x9370dbff, 2131 mediumseagreen: 0x3cb371ff, 2132 mediumslateblue: 0x7b68eeff, 2133 mediumspringgreen: 0x00fa9aff, 2134 mediumturquoise: 0x48d1ccff, 2135 mediumvioletred: 0xc71585ff, 2136 midnightblue: 0x191970ff, 2137 mintcream: 0xf5fffaff, 2138 mistyrose: 0xffe4e1ff, 2139 moccasin: 0xffe4b5ff, 2140 navajowhite: 0xffdeadff, 2141 navy: 0x000080ff, 2142 oldlace: 0xfdf5e6ff, 2143 olive: 0x808000ff, 2144 olivedrab: 0x6b8e23ff, 2145 orange: 0xffa500ff, 2146 orangered: 0xff4500ff, 2147 orchid: 0xda70d6ff, 2148 palegoldenrod: 0xeee8aaff, 2149 palegreen: 0x98fb98ff, 2150 paleturquoise: 0xafeeeeff, 2151 palevioletred: 0xdb7093ff, 2152 papayawhip: 0xffefd5ff, 2153 peachpuff: 0xffdab9ff, 2154 peru: 0xcd853fff, 2155 pink: 0xffc0cbff, 2156 plum: 0xdda0ddff, 2157 powderblue: 0xb0e0e6ff, 2158 purple: 0x800080ff, 2159 rebeccapurple: 0x663399ff, 2160 red: 0xff0000ff, 2161 rosybrown: 0xbc8f8fff, 2162 royalblue: 0x4169e1ff, 2163 saddlebrown: 0x8b4513ff, 2164 salmon: 0xfa8072ff, 2165 sandybrown: 0xf4a460ff, 2166 seagreen: 0x2e8b57ff, 2167 seashell: 0xfff5eeff, 2168 sienna: 0xa0522dff, 2169 silver: 0xc0c0c0ff, 2170 skyblue: 0x87ceebff, 2171 slateblue: 0x6a5acdff, 2172 slategray: 0x708090ff, 2173 slategrey: 0x708090ff, 2174 snow: 0xfffafaff, 2175 springgreen: 0x00ff7fff, 2176 steelblue: 0x4682b4ff, 2177 tan: 0xd2b48cff, 2178 teal: 0x008080ff, 2179 thistle: 0xd8bfd8ff, 2180 tomato: 0xff6347ff, 2181 turquoise: 0x40e0d0ff, 2182 violet: 0xee82eeff, 2183 wheat: 0xf5deb3ff, 2184 white: 0xffffffff, 2185 whitesmoke: 0xf5f5f5ff, 2186 yellow: 0xffff00ff, 2187 yellowgreen: 0x9acd32ff 2188 }; 2189 2190 // const INTEGER = '[-+]?\\d+'; 2191 var NUMBER = '[-+]?\\d*\\.?\\d+'; 2192 var PERCENTAGE = NUMBER + '%'; 2193 2194 function call() { 2195 for (var _len = arguments.length, parts = new Array(_len), _key = 0; _key < _len; _key++) { 2196 parts[_key] = arguments[_key]; 2197 } 2198 2199 return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)'; 2200 } 2201 2202 var rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)); 2203 var rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)); 2204 var hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)); 2205 var hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)); 2206 var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; 2207 var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; 2208 var hex6 = /^#([0-9a-fA-F]{6})$/; 2209 var hex8 = /^#([0-9a-fA-F]{8})$/; 2210 2211 /* 2212 https://github.com/react-community/normalize-css-color 2213 2214 BSD 3-Clause License 2215 2216 Copyright (c) 2016, React Community 2217 All rights reserved. 2218 2219 Redistribution and use in source and binary forms, with or without 2220 modification, are permitted provided that the following conditions are met: 2221 2222 * Redistributions of source code must retain the above copyright notice, this 2223 list of conditions and the following disclaimer. 2224 2225 * Redistributions in binary form must reproduce the above copyright notice, 2226 this list of conditions and the following disclaimer in the documentation 2227 and/or other materials provided with the distribution. 2228 2229 * Neither the name of the copyright holder nor the names of its 2230 contributors may be used to endorse or promote products derived from 2231 this software without specific prior written permission. 2232 2233 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2234 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2235 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 2236 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 2237 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2238 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 2239 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 2240 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2241 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2242 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2243 */ 2244 function normalizeColor(color) { 2245 var match; 2246 2247 if (typeof color === 'number') { 2248 return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null; 2249 } // Ordered based on occurrences on Facebook codebase 2250 2251 2252 if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0; 2253 if (colors.hasOwnProperty(color)) return colors[color]; 2254 2255 if (match = rgb.exec(color)) { 2256 return (parse255(match[1]) << 24 | // r 2257 parse255(match[2]) << 16 | // g 2258 parse255(match[3]) << 8 | // b 2259 0x000000ff) >>> // a 2260 0; 2261 } 2262 2263 if (match = rgba.exec(color)) { 2264 return (parse255(match[1]) << 24 | // r 2265 parse255(match[2]) << 16 | // g 2266 parse255(match[3]) << 8 | // b 2267 parse1(match[4])) >>> // a 2268 0; 2269 } 2270 2271 if (match = hex3.exec(color)) { 2272 return parseInt(match[1] + match[1] + // r 2273 match[2] + match[2] + // g 2274 match[3] + match[3] + // b 2275 'ff', // a 2276 16) >>> 0; 2277 } // https://drafts.csswg.org/css-color-4/#hex-notation 2278 2279 2280 if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0; 2281 2282 if (match = hex4.exec(color)) { 2283 return parseInt(match[1] + match[1] + // r 2284 match[2] + match[2] + // g 2285 match[3] + match[3] + // b 2286 match[4] + match[4], // a 2287 16) >>> 0; 2288 } 2289 2290 if (match = hsl.exec(color)) { 2291 return (hslToRgb(parse360(match[1]), // h 2292 parsePercentage(match[2]), // s 2293 parsePercentage(match[3]) // l 2294 ) | 0x000000ff) >>> // a 2295 0; 2296 } 2297 2298 if (match = hsla.exec(color)) { 2299 return (hslToRgb(parse360(match[1]), // h 2300 parsePercentage(match[2]), // s 2301 parsePercentage(match[3]) // l 2302 ) | parse1(match[4])) >>> // a 2303 0; 2304 } 2305 2306 return null; 2307 } 2308 2309 function hue2rgb(p, q, t) { 2310 if (t < 0) t += 1; 2311 if (t > 1) t -= 1; 2312 if (t < 1 / 6) return p + (q - p) * 6 * t; 2313 if (t < 1 / 2) return q; 2314 if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; 2315 return p; 2316 } 2317 2318 function hslToRgb(h, s, l) { 2319 var q = l < 0.5 ? l * (1 + s) : l + s - l * s; 2320 var p = 2 * l - q; 2321 var r = hue2rgb(p, q, h + 1 / 3); 2322 var g = hue2rgb(p, q, h); 2323 var b = hue2rgb(p, q, h - 1 / 3); 2324 return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8; 2325 } 2326 2327 function parse255(str) { 2328 var int = parseInt(str, 10); 2329 if (int < 0) return 0; 2330 if (int > 255) return 255; 2331 return int; 2332 } 2333 2334 function parse360(str) { 2335 var int = parseFloat(str); 2336 return (int % 360 + 360) % 360 / 360; 2337 } 2338 2339 function parse1(str) { 2340 var num = parseFloat(str); 2341 if (num < 0) return 0; 2342 if (num > 1) return 255; 2343 return Math.round(num * 255); 2344 } 2345 2346 function parsePercentage(str) { 2347 // parseFloat conveniently ignores the final % 2348 var int = parseFloat(str); 2349 if (int < 0) return 0; 2350 if (int > 100) return 1; 2351 return int / 100; 2352 } 2353 2354 function colorToRgba(input) { 2355 var int32Color = normalizeColor(input); 2356 if (int32Color === null) return input; 2357 int32Color = int32Color || 0; 2358 var r = (int32Color & 0xff000000) >>> 24; 2359 var g = (int32Color & 0x00ff0000) >>> 16; 2360 var b = (int32Color & 0x0000ff00) >>> 8; 2361 var a = (int32Color & 0x000000ff) / 255; 2362 return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")"; 2363 } // Problem: https://github.com/animatedjs/animated/pull/102 2364 // Solution: https://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly/658662 2365 2366 2367 var stringShapeRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; // Covers rgb, rgba, hsl, hsla 2368 // Taken from https://gist.github.com/olmokramer/82ccce673f86db7cda5e 2369 2370 var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; // Covers color names (transparent, blue, etc.) 2371 2372 var colorNamesRegex = new RegExp("(" + Object.keys(colors).join('|') + ")", 'g'); 2373 /** 2374 * Supports string shapes by extracting numbers so new values can be computed, 2375 * and recombines those values into new strings of the same shape. Supports 2376 * things like: 2377 * 2378 * rgba(123, 42, 99, 0.36) // colors 2379 * -45deg // values with units 2380 * 0 2px 2px 0px rgba(0, 0, 0, 0.12) // box shadows 2381 */ 2382 2383 var createStringInterpolator = function createStringInterpolator(config) { 2384 // Replace colors with rgba 2385 var outputRange = config.output.map(function (rangeValue) { 2386 return rangeValue.replace(colorRegex, colorToRgba); 2387 }).map(function (rangeValue) { 2388 return rangeValue.replace(colorNamesRegex, colorToRgba); 2389 }); 2390 var outputRanges = outputRange[0].match(stringShapeRegex).map(function () { 2391 return []; 2392 }); 2393 outputRange.forEach(function (value) { 2394 value.match(stringShapeRegex).forEach(function (number, i) { 2395 return outputRanges[i].push(+number); 2396 }); 2397 }); 2398 var interpolations = outputRange[0].match(stringShapeRegex).map(function (_value, i) { 2399 return createInterpolator(_extends({}, config, { 2400 output: outputRanges[i] 2401 })); 2402 }); 2403 return function (input) { 2404 var i = 0; 2405 return outputRange[0] // 'rgba(0, 100, 200, 0)' 2406 // -> 2407 // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...' 2408 .replace(stringShapeRegex, function () { 2409 return interpolations[i++](input); 2410 }) // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to 2411 // round the opacity (4th column). 2412 .replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, function (_, p1, p2, p3, p4) { 2413 return "rgba(" + Math.round(p1) + ", " + Math.round(p2) + ", " + Math.round(p3) + ", " + p4 + ")"; 2414 }); 2415 }; 2416 }; 2417 2418 var isUnitlessNumber = { 2419 animationIterationCount: true, 2420 borderImageOutset: true, 2421 borderImageSlice: true, 2422 borderImageWidth: true, 2423 boxFlex: true, 2424 boxFlexGroup: true, 2425 boxOrdinalGroup: true, 2426 columnCount: true, 2427 columns: true, 2428 flex: true, 2429 flexGrow: true, 2430 flexPositive: true, 2431 flexShrink: true, 2432 flexNegative: true, 2433 flexOrder: true, 2434 gridRow: true, 2435 gridRowEnd: true, 2436 gridRowSpan: true, 2437 gridRowStart: true, 2438 gridColumn: true, 2439 gridColumnEnd: true, 2440 gridColumnSpan: true, 2441 gridColumnStart: true, 2442 fontWeight: true, 2443 lineClamp: true, 2444 lineHeight: true, 2445 opacity: true, 2446 order: true, 2447 orphans: true, 2448 tabSize: true, 2449 widows: true, 2450 zIndex: true, 2451 zoom: true, 2452 // SVG-related properties 2453 fillOpacity: true, 2454 floodOpacity: true, 2455 stopOpacity: true, 2456 strokeDasharray: true, 2457 strokeDashoffset: true, 2458 strokeMiterlimit: true, 2459 strokeOpacity: true, 2460 strokeWidth: true 2461 }; 2462 2463 var prefixKey = function prefixKey(prefix, key) { 2464 return prefix + key.charAt(0).toUpperCase() + key.substring(1); 2465 }; 2466 2467 var prefixes = ['Webkit', 'Ms', 'Moz', 'O']; 2468 isUnitlessNumber = Object.keys(isUnitlessNumber).reduce(function (acc, prop) { 2469 prefixes.forEach(function (prefix) { 2470 return acc[prefixKey(prefix, prop)] = acc[prop]; 2471 }); 2472 return acc; 2473 }, isUnitlessNumber); 2474 2475 function dangerousStyleValue(name, value, isCustomProperty) { 2476 if (value == null || typeof value === 'boolean' || value === '') return ''; 2477 if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers 2478 2479 return ('' + value).trim(); 2480 } 2481 2482 var attributeCache = {}; 2483 injectCreateAnimatedStyle(function (style) { 2484 return new AnimatedStyle(style); 2485 }); 2486 injectDefaultElement('div'); 2487 injectStringInterpolator(createStringInterpolator); 2488 injectColorNames(colors); 2489 injectApplyAnimatedValues(function (instance, props) { 2490 if (instance.nodeType && instance.setAttribute !== undefined) { 2491 var style = props.style, 2492 children = props.children, 2493 scrollTop = props.scrollTop, 2494 scrollLeft = props.scrollLeft, 2495 attributes = _objectWithoutPropertiesLoose(props, ["style", "children", "scrollTop", "scrollLeft"]); 2496 2497 var filter = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter'; 2498 if (scrollTop !== void 0) instance.scrollTop = scrollTop; 2499 if (scrollLeft !== void 0) instance.scrollLeft = scrollLeft; // Set textContent, if children is an animatable value 2500 2501 if (children !== void 0) instance.textContent = children; // Set styles ... 2502 2503 for (var styleName in style) { 2504 if (!style.hasOwnProperty(styleName)) continue; 2505 var isCustomProperty = styleName.indexOf('--') === 0; 2506 var styleValue = dangerousStyleValue(styleName, style[styleName], isCustomProperty); 2507 if (styleName === 'float') styleName = 'cssFloat'; 2508 if (isCustomProperty) instance.style.setProperty(styleName, styleValue);else instance.style[styleName] = styleValue; 2509 } // Set attributes ... 2510 2511 2512 for (var name in attributes) { 2513 // Attributes are written in dash case 2514 var dashCase = filter ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, function (n) { 2515 return '-' + n.toLowerCase(); 2516 })); 2517 if (typeof instance.getAttribute(dashCase) !== 'undefined') instance.setAttribute(dashCase, attributes[name]); 2518 } 2519 2520 return; 2521 } else return false; 2522 }, function (style) { 2523 return style; 2524 }); 2525 2526 var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG 2527 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; 2528 // Extend animated with all the available THREE elements 2529 var apply = merge(createAnimatedComponent, false); 2530 var extendedAnimated = apply(domElements); 2531 2532 exports.apply = apply; 2533 exports.config = config; 2534 exports.update = update; 2535 exports.animated = extendedAnimated; 2536 exports.a = extendedAnimated; 2537 exports.interpolate = interpolate$1; 2538 exports.Globals = Globals; 2539 exports.useSpring = useSpring; 2540 exports.useTrail = useTrail; 2541 exports.useTransition = useTransition; 2542 exports.useChain = useChain; 2543 exports.useSprings = useSprings; 2544 2545 2546 /***/ }), 2547 2548 /***/ 12: 2549 /***/ (function(module, exports) { 2550 2551 (function() { module.exports = window["wp"]["compose"]; }()); 2552 2553 /***/ }), 2554 2555 /***/ 125: 2556 /***/ (function(module, exports, __webpack_require__) { 2557 2558 "use strict"; 2559 2560 2561 module.exports = __webpack_require__(190); 2562 2563 /***/ }), 2564 2565 /***/ 126: 2566 /***/ (function(module, exports) { 2567 2568 (function() { module.exports = window["wp"]["wordcount"]; }()); 2569 2570 /***/ }), 2571 2572 /***/ 129: 2573 /***/ (function(module, exports) { 2574 2575 (function() { module.exports = window["wp"]["shortcode"]; }()); 2576 2577 /***/ }), 2578 2579 /***/ 13: 2580 /***/ (function(module, __webpack_exports__, __webpack_require__) { 2581 2582 "use strict"; 2583 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); 2584 /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); 2585 2586 function _objectWithoutProperties(source, excluded) { 2587 if (source == null) return {}; 2588 var target = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded); 2589 var key, i; 2590 2591 if (Object.getOwnPropertySymbols) { 2592 var sourceSymbolKeys = Object.getOwnPropertySymbols(source); 2593 2594 for (i = 0; i < sourceSymbolKeys.length; i++) { 2595 key = sourceSymbolKeys[i]; 2596 if (excluded.indexOf(key) >= 0) continue; 2597 if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; 2598 target[key] = source[key]; 2599 } 2600 } 2601 2602 return target; 2603 } 2604 2605 /***/ }), 2606 2607 /***/ 138: 2608 /***/ (function(module, __webpack_exports__, __webpack_require__) { 2609 2610 "use strict"; 2611 /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); 2612 /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); 2613 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0); 2614 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); 2615 2616 2617 2618 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; } 2619 2620 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(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(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; } 2621 2622 /** 2623 * WordPress dependencies 2624 */ 2625 2626 /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */ 2627 2628 /** 2629 * Return an SVG icon. 2630 * 2631 * @param {IconProps} props icon is the SVG component to render 2632 * size is a number specifiying the icon size in pixels 2633 * Other props will be passed to wrapped SVG component 2634 * 2635 * @return {JSX.Element} Icon component 2636 */ 2637 2638 function Icon(_ref) { 2639 var icon = _ref.icon, 2640 _ref$size = _ref.size, 2641 size = _ref$size === void 0 ? 24 : _ref$size, 2642 props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]); 2643 2644 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({ 2645 width: size, 2646 height: size 2647 }, props)); 2648 } 2649 2650 /* harmony default export */ __webpack_exports__["a"] = (Icon); 2651 2652 2653 /***/ }), 2654 2655 /***/ 139: 2656 /***/ (function(module, exports, __webpack_require__) { 2657 2658 "use strict"; 2659 /** 2660 * Copyright (c) 2013-present, Facebook, Inc. 2661 * 2662 * This source code is licensed under the MIT license found in the 2663 * LICENSE file in the root directory of this source tree. 2664 */ 2665 2666 2667 2668 var ReactPropTypesSecret = __webpack_require__(140); 2669 2670 function emptyFunction() {} 2671 function emptyFunctionWithReset() {} 2672 emptyFunctionWithReset.resetWarningCache = emptyFunction; 2673 2674 module.exports = function() { 2675 function shim(props, propName, componentName, location, propFullName, secret) { 2676 if (secret === ReactPropTypesSecret) { 2677 // It is still safe when called from React. 2678 return; 2679 } 2680 var err = new Error( 2681 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 2682 'Use PropTypes.checkPropTypes() to call them. ' + 2683 'Read more at http://fb.me/use-check-prop-types' 2684 ); 2685 err.name = 'Invariant Violation'; 2686 throw err; 2687 }; 2688 shim.isRequired = shim; 2689 function getShim() { 2690 return shim; 2691 }; 2692 // Important! 2693 // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. 2694 var ReactPropTypes = { 2695 array: shim, 2696 bool: shim, 2697 func: shim, 2698 number: shim, 2699 object: shim, 2700 string: shim, 2701 symbol: shim, 2702 2703 any: shim, 2704 arrayOf: getShim, 2705 element: shim, 2706 elementType: shim, 2707 instanceOf: getShim, 2708 node: shim, 2709 objectOf: getShim, 2710 oneOf: getShim, 2711 oneOfType: getShim, 2712 shape: getShim, 2713 exact: getShim, 2714 2715 checkPropTypes: emptyFunctionWithReset, 2716 resetWarningCache: emptyFunction 2717 }; 2718 2719 ReactPropTypes.PropTypes = ReactPropTypes; 2720 2721 return ReactPropTypes; 2722 }; 2723 2724 2725 /***/ }), 2726 2727 /***/ 14: 2728 /***/ (function(module, exports) { 2729 2730 (function() { module.exports = window["React"]; }()); 2731 2732 /***/ }), 2733 2734 /***/ 140: 2735 /***/ (function(module, exports, __webpack_require__) { 2736 2737 "use strict"; 2738 /** 2739 * Copyright (c) 2013-present, Facebook, Inc. 2740 * 2741 * This source code is licensed under the MIT license found in the 2742 * LICENSE file in the root directory of this source tree. 2743 */ 2744 2745 2746 2747 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; 2748 2749 module.exports = ReactPropTypesSecret; 2750 2751 2752 /***/ }), 2753 2754 /***/ 15: 2755 /***/ (function(module, __webpack_exports__, __webpack_require__) { 2756 2757 "use strict"; 2758 2759 // EXPORTS 2760 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); 2761 2762 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js 2763 var arrayLikeToArray = __webpack_require__(24); 2764 2765 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js 2766 2767 function _arrayWithoutHoles(arr) { 2768 if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); 2769 } 2770 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js 2771 var iterableToArray = __webpack_require__(37); 2772 2773 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js 2774 var unsupportedIterableToArray = __webpack_require__(31); 2775 2776 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js 2777 function _nonIterableSpread() { 2778 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 2779 } 2780 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js 2781 2782 2783 2784 2785 function _toConsumableArray(arr) { 2786 return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); 2787 } 2788 2789 /***/ }), 2790 2791 /***/ 155: 2792 /***/ (function(module, exports) { 2793 2794 (function() { module.exports = window["wp"]["tokenList"]; }()); 2795 2796 /***/ }), 2797 2798 /***/ 158: 2799 /***/ (function(module, exports) { 2800 2801 function _inheritsLoose(subClass, superClass) { 2802 subClass.prototype = Object.create(superClass.prototype); 2803 subClass.prototype.constructor = subClass; 2804 subClass.__proto__ = superClass; 2805 } 2806 2807 module.exports = _inheritsLoose; 2808 2809 /***/ }), 2810 2811 /***/ 159: 2812 /***/ (function(module, __webpack_exports__, __webpack_require__) { 2813 2814 "use strict"; 2815 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 2816 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 2817 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 2818 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 2819 2820 2821 /** 2822 * WordPress dependencies 2823 */ 2824 2825 var closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 2826 xmlns: "http://www.w3.org/2000/svg", 2827 viewBox: "0 0 24 24" 2828 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 2829 d: "M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z" 2830 })); 2831 /* harmony default export */ __webpack_exports__["a"] = (closeSmall); 2832 2833 2834 /***/ }), 2835 2836 /***/ 16: 2837 /***/ (function(module, exports) { 2838 2839 (function() { module.exports = window["regeneratorRuntime"]; }()); 2840 2841 /***/ }), 2842 2843 /***/ 160: 2844 /***/ (function(module, __webpack_exports__, __webpack_require__) { 2845 2846 "use strict"; 2847 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 2848 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 2849 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 2850 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 2851 2852 2853 /** 2854 * WordPress dependencies 2855 */ 2856 2857 var close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 2858 xmlns: "http://www.w3.org/2000/svg", 2859 viewBox: "0 0 24 24" 2860 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 2861 d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" 2862 })); 2863 /* harmony default export */ __webpack_exports__["a"] = (close); 2864 2865 2866 /***/ }), 2867 2868 /***/ 161: 2869 /***/ (function(module, __webpack_exports__, __webpack_require__) { 2870 2871 "use strict"; 2872 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 2873 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 2874 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 2875 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 2876 2877 2878 /** 2879 * WordPress dependencies 2880 */ 2881 2882 var check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 2883 xmlns: "http://www.w3.org/2000/svg", 2884 viewBox: "0 0 24 24" 2885 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 2886 d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z" 2887 })); 2888 /* harmony default export */ __webpack_exports__["a"] = (check); 2889 2890 2891 /***/ }), 2892 2893 /***/ 17: 2894 /***/ (function(module, exports) { 2895 2896 (function() { module.exports = window["wp"]["keycodes"]; }()); 2897 2898 /***/ }), 2899 2900 /***/ 173: 2901 /***/ (function(module, exports) { 2902 2903 if (typeof Object.create === 'function') { 2904 // implementation from standard node.js 'util' module 2905 module.exports = function inherits(ctor, superCtor) { 2906 if (superCtor) { 2907 ctor.super_ = superCtor 2908 ctor.prototype = Object.create(superCtor.prototype, { 2909 constructor: { 2910 value: ctor, 2911 enumerable: false, 2912 writable: true, 2913 configurable: true 2914 } 2915 }) 2916 } 2917 }; 2918 } else { 2919 // old school shim for old browsers 2920 module.exports = function inherits(ctor, superCtor) { 2921 if (superCtor) { 2922 ctor.super_ = superCtor 2923 var TempCtor = function () {} 2924 TempCtor.prototype = superCtor.prototype 2925 ctor.prototype = new TempCtor() 2926 ctor.prototype.constructor = ctor 2927 } 2928 } 2929 } 2930 2931 2932 /***/ }), 2933 2934 /***/ 18: 2935 /***/ (function(module, __webpack_exports__, __webpack_require__) { 2936 2937 "use strict"; 2938 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); 2939 function _assertThisInitialized(self) { 2940 if (self === void 0) { 2941 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 2942 } 2943 2944 return self; 2945 } 2946 2947 /***/ }), 2948 2949 /***/ 183: 2950 /***/ (function(module, exports) { 2951 2952 function _extends() { 2953 module.exports = _extends = Object.assign || function (target) { 2954 for (var i = 1; i < arguments.length; i++) { 2955 var source = arguments[i]; 2956 2957 for (var key in source) { 2958 if (Object.prototype.hasOwnProperty.call(source, key)) { 2959 target[key] = source[key]; 2960 } 2961 } 2962 } 2963 2964 return target; 2965 }; 2966 2967 return _extends.apply(this, arguments); 2968 } 2969 2970 module.exports = _extends; 2971 2972 /***/ }), 2973 2974 /***/ 184: 2975 /***/ (function(module, exports) { 2976 2977 function _objectWithoutPropertiesLoose(source, excluded) { 2978 if (source == null) return {}; 2979 var target = {}; 2980 var sourceKeys = Object.keys(source); 2981 var key, i; 2982 2983 for (i = 0; i < sourceKeys.length; i++) { 2984 key = sourceKeys[i]; 2985 if (excluded.indexOf(key) >= 0) continue; 2986 target[key] = source[key]; 2987 } 2988 2989 return target; 2990 } 2991 2992 module.exports = _objectWithoutPropertiesLoose; 2993 2994 /***/ }), 2995 2996 /***/ 185: 2997 /***/ (function(module, exports) { 2998 2999 function _assertThisInitialized(self) { 3000 if (self === void 0) { 3001 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 3002 } 3003 3004 return self; 3005 } 3006 3007 module.exports = _assertThisInitialized; 3008 3009 /***/ }), 3010 3011 /***/ 186: 3012 /***/ (function(module, exports, __webpack_require__) { 3013 3014 "use strict"; 3015 3016 var __extends = (this && this.__extends) || (function () { 3017 var extendStatics = Object.setPrototypeOf || 3018 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 3019 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 3020 return function (d, b) { 3021 extendStatics(d, b); 3022 function __() { this.constructor = d; } 3023 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 3024 }; 3025 })(); 3026 var __assign = (this && this.__assign) || Object.assign || function(t) { 3027 for (var s, i = 1, n = arguments.length; i < n; i++) { 3028 s = arguments[i]; 3029 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 3030 t[p] = s[p]; 3031 } 3032 return t; 3033 }; 3034 var __rest = (this && this.__rest) || function (s, e) { 3035 var t = {}; 3036 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) 3037 t[p] = s[p]; 3038 if (s != null && typeof Object.getOwnPropertySymbols === "function") 3039 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) 3040 t[p[i]] = s[p[i]]; 3041 return t; 3042 }; 3043 exports.__esModule = true; 3044 var React = __webpack_require__(14); 3045 var PropTypes = __webpack_require__(30); 3046 var autosize = __webpack_require__(187); 3047 var _getLineHeight = __webpack_require__(188); 3048 var getLineHeight = _getLineHeight; 3049 var RESIZED = "autosize:resized"; 3050 /** 3051 * A light replacement for built-in textarea component 3052 * which automaticaly adjusts its height to match the content 3053 */ 3054 var TextareaAutosizeClass = /** @class */ (function (_super) { 3055 __extends(TextareaAutosizeClass, _super); 3056 function TextareaAutosizeClass() { 3057 var _this = _super !== null && _super.apply(this, arguments) || this; 3058 _this.state = { 3059 lineHeight: null 3060 }; 3061 _this.textarea = null; 3062 _this.onResize = function (e) { 3063 if (_this.props.onResize) { 3064 _this.props.onResize(e); 3065 } 3066 }; 3067 _this.updateLineHeight = function () { 3068 if (_this.textarea) { 3069 _this.setState({ 3070 lineHeight: getLineHeight(_this.textarea) 3071 }); 3072 } 3073 }; 3074 _this.onChange = function (e) { 3075 var onChange = _this.props.onChange; 3076 _this.currentValue = e.currentTarget.value; 3077 onChange && onChange(e); 3078 }; 3079 return _this; 3080 } 3081 TextareaAutosizeClass.prototype.componentDidMount = function () { 3082 var _this = this; 3083 var _a = this.props, maxRows = _a.maxRows, async = _a.async; 3084 if (typeof maxRows === "number") { 3085 this.updateLineHeight(); 3086 } 3087 if (typeof maxRows === "number" || async) { 3088 /* 3089 the defer is needed to: 3090 - force "autosize" to activate the scrollbar when this.props.maxRows is passed 3091 - support StyledComponents (see #71) 3092 */ 3093 setTimeout(function () { return _this.textarea && autosize(_this.textarea); }); 3094 } 3095 else { 3096 this.textarea && autosize(this.textarea); 3097 } 3098 if (this.textarea) { 3099 this.textarea.addEventListener(RESIZED, this.onResize); 3100 } 3101 }; 3102 TextareaAutosizeClass.prototype.componentWillUnmount = function () { 3103 if (this.textarea) { 3104 this.textarea.removeEventListener(RESIZED, this.onResize); 3105 autosize.destroy(this.textarea); 3106 } 3107 }; 3108 TextareaAutosizeClass.prototype.render = function () { 3109 var _this = this; 3110 var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef", "children"]), lineHeight = _a.state.lineHeight; 3111 var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null; 3112 return (React.createElement("textarea", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) { 3113 _this.textarea = element; 3114 if (typeof _this.props.innerRef === 'function') { 3115 _this.props.innerRef(element); 3116 } 3117 else if (_this.props.innerRef) { 3118 _this.props.innerRef.current = element; 3119 } 3120 } }), children)); 3121 }; 3122 TextareaAutosizeClass.prototype.componentDidUpdate = function () { 3123 this.textarea && autosize.update(this.textarea); 3124 }; 3125 TextareaAutosizeClass.defaultProps = { 3126 rows: 1, 3127 async: false 3128 }; 3129 TextareaAutosizeClass.propTypes = { 3130 rows: PropTypes.number, 3131 maxRows: PropTypes.number, 3132 onResize: PropTypes.func, 3133 innerRef: PropTypes.any, 3134 async: PropTypes.bool 3135 }; 3136 return TextareaAutosizeClass; 3137 }(React.Component)); 3138 exports.TextareaAutosize = React.forwardRef(function (props, ref) { 3139 return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref })); 3140 }); 3141 3142 3143 /***/ }), 3144 3145 /***/ 187: 3146 /***/ (function(module, exports, __webpack_require__) { 3147 3148 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 3149 autosize 4.0.2 3150 license: MIT 3151 http://www.jacklmoore.com/autosize 3152 */ 3153 (function (global, factory) { 3154 if (true) { 3155 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 3156 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 3157 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 3158 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 3159 } else { var mod; } 3160 })(this, function (module, exports) { 3161 'use strict'; 3162 3163 var map = typeof Map === "function" ? new Map() : function () { 3164 var keys = []; 3165 var values = []; 3166 3167 return { 3168 has: function has(key) { 3169 return keys.indexOf(key) > -1; 3170 }, 3171 get: function get(key) { 3172 return values[keys.indexOf(key)]; 3173 }, 3174 set: function set(key, value) { 3175 if (keys.indexOf(key) === -1) { 3176 keys.push(key); 3177 values.push(value); 3178 } 3179 }, 3180 delete: function _delete(key) { 3181 var index = keys.indexOf(key); 3182 if (index > -1) { 3183 keys.splice(index, 1); 3184 values.splice(index, 1); 3185 } 3186 } 3187 }; 3188 }(); 3189 3190 var createEvent = function createEvent(name) { 3191 return new Event(name, { bubbles: true }); 3192 }; 3193 try { 3194 new Event('test'); 3195 } catch (e) { 3196 // IE does not support `new Event()` 3197 createEvent = function createEvent(name) { 3198 var evt = document.createEvent('Event'); 3199 evt.initEvent(name, true, false); 3200 return evt; 3201 }; 3202 } 3203 3204 function assign(ta) { 3205 if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return; 3206 3207 var heightOffset = null; 3208 var clientWidth = null; 3209 var cachedHeight = null; 3210 3211 function init() { 3212 var style = window.getComputedStyle(ta, null); 3213 3214 if (style.resize === 'vertical') { 3215 ta.style.resize = 'none'; 3216 } else if (style.resize === 'both') { 3217 ta.style.resize = 'horizontal'; 3218 } 3219 3220 if (style.boxSizing === 'content-box') { 3221 heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom)); 3222 } else { 3223 heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth); 3224 } 3225 // Fix when a textarea is not on document body and heightOffset is Not a Number 3226 if (isNaN(heightOffset)) { 3227 heightOffset = 0; 3228 } 3229 3230 update(); 3231 } 3232 3233 function changeOverflow(value) { 3234 { 3235 // Chrome/Safari-specific fix: 3236 // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space 3237 // made available by removing the scrollbar. The following forces the necessary text reflow. 3238 var width = ta.style.width; 3239 ta.style.width = '0px'; 3240 // Force reflow: 3241 /* jshint ignore:start */ 3242 ta.offsetWidth; 3243 /* jshint ignore:end */ 3244 ta.style.width = width; 3245 } 3246 3247 ta.style.overflowY = value; 3248 } 3249 3250 function getParentOverflows(el) { 3251 var arr = []; 3252 3253 while (el && el.parentNode && el.parentNode instanceof Element) { 3254 if (el.parentNode.scrollTop) { 3255 arr.push({ 3256 node: el.parentNode, 3257 scrollTop: el.parentNode.scrollTop 3258 }); 3259 } 3260 el = el.parentNode; 3261 } 3262 3263 return arr; 3264 } 3265 3266 function resize() { 3267 if (ta.scrollHeight === 0) { 3268 // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM. 3269 return; 3270 } 3271 3272 var overflows = getParentOverflows(ta); 3273 var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240) 3274 3275 ta.style.height = ''; 3276 ta.style.height = ta.scrollHeight + heightOffset + 'px'; 3277 3278 // used to check if an update is actually necessary on window.resize 3279 clientWidth = ta.clientWidth; 3280 3281 // prevents scroll-position jumping 3282 overflows.forEach(function (el) { 3283 el.node.scrollTop = el.scrollTop; 3284 }); 3285 3286 if (docTop) { 3287 document.documentElement.scrollTop = docTop; 3288 } 3289 } 3290 3291 function update() { 3292 resize(); 3293 3294 var styleHeight = Math.round(parseFloat(ta.style.height)); 3295 var computed = window.getComputedStyle(ta, null); 3296 3297 // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box 3298 var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight; 3299 3300 // The actual height not matching the style height (set via the resize method) indicates that 3301 // the max-height has been exceeded, in which case the overflow should be allowed. 3302 if (actualHeight < styleHeight) { 3303 if (computed.overflowY === 'hidden') { 3304 changeOverflow('scroll'); 3305 resize(); 3306 actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight; 3307 } 3308 } else { 3309 // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands. 3310 if (computed.overflowY !== 'hidden') { 3311 changeOverflow('hidden'); 3312 resize(); 3313 actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight; 3314 } 3315 } 3316 3317 if (cachedHeight !== actualHeight) { 3318 cachedHeight = actualHeight; 3319 var evt = createEvent('autosize:resized'); 3320 try { 3321 ta.dispatchEvent(evt); 3322 } catch (err) { 3323 // Firefox will throw an error on dispatchEvent for a detached element 3324 // https://bugzilla.mozilla.org/show_bug.cgi?id=889376 3325 } 3326 } 3327 } 3328 3329 var pageResize = function pageResize() { 3330 if (ta.clientWidth !== clientWidth) { 3331 update(); 3332 } 3333 }; 3334 3335 var destroy = function (style) { 3336 window.removeEventListener('resize', pageResize, false); 3337 ta.removeEventListener('input', update, false); 3338 ta.removeEventListener('keyup', update, false); 3339 ta.removeEventListener('autosize:destroy', destroy, false); 3340 ta.removeEventListener('autosize:update', update, false); 3341 3342 Object.keys(style).forEach(function (key) { 3343 ta.style[key] = style[key]; 3344 }); 3345 3346 map.delete(ta); 3347 }.bind(ta, { 3348 height: ta.style.height, 3349 resize: ta.style.resize, 3350 overflowY: ta.style.overflowY, 3351 overflowX: ta.style.overflowX, 3352 wordWrap: ta.style.wordWrap 3353 }); 3354 3355 ta.addEventListener('autosize:destroy', destroy, false); 3356 3357 // IE9 does not fire onpropertychange or oninput for deletions, 3358 // so binding to onkeyup to catch most of those events. 3359 // There is no way that I know of to detect something like 'cut' in IE9. 3360 if ('onpropertychange' in ta && 'oninput' in ta) { 3361 ta.addEventListener('keyup', update, false); 3362 } 3363 3364 window.addEventListener('resize', pageResize, false); 3365 ta.addEventListener('input', update, false); 3366 ta.addEventListener('autosize:update', update, false); 3367 ta.style.overflowX = 'hidden'; 3368 ta.style.wordWrap = 'break-word'; 3369 3370 map.set(ta, { 3371 destroy: destroy, 3372 update: update 3373 }); 3374 3375 init(); 3376 } 3377 3378 function destroy(ta) { 3379 var methods = map.get(ta); 3380 if (methods) { 3381 methods.destroy(); 3382 } 3383 } 3384 3385 function update(ta) { 3386 var methods = map.get(ta); 3387 if (methods) { 3388 methods.update(); 3389 } 3390 } 3391 3392 var autosize = null; 3393 3394 // Do nothing in Node.js environment and IE8 (or lower) 3395 if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') { 3396 autosize = function autosize(el) { 3397 return el; 3398 }; 3399 autosize.destroy = function (el) { 3400 return el; 3401 }; 3402 autosize.update = function (el) { 3403 return el; 3404 }; 3405 } else { 3406 autosize = function autosize(el, options) { 3407 if (el) { 3408 Array.prototype.forEach.call(el.length ? el : [el], function (x) { 3409 return assign(x, options); 3410 }); 3411 } 3412 return el; 3413 }; 3414 autosize.destroy = function (el) { 3415 if (el) { 3416 Array.prototype.forEach.call(el.length ? el : [el], destroy); 3417 } 3418 return el; 3419 }; 3420 autosize.update = function (el) { 3421 if (el) { 3422 Array.prototype.forEach.call(el.length ? el : [el], update); 3423 } 3424 return el; 3425 }; 3426 } 3427 3428 exports.default = autosize; 3429 module.exports = exports['default']; 3430 }); 3431 3432 /***/ }), 3433 3434 /***/ 188: 3435 /***/ (function(module, exports, __webpack_require__) { 3436 3437 // Load in dependencies 3438 var computedStyle = __webpack_require__(189); 3439 3440 /** 3441 * Calculate the `line-height` of a given node 3442 * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM. 3443 * @returns {Number} `line-height` of the element in pixels 3444 */ 3445 function lineHeight(node) { 3446 // Grab the line-height via style 3447 var lnHeightStr = computedStyle(node, 'line-height'); 3448 var lnHeight = parseFloat(lnHeightStr, 10); 3449 3450 // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em') 3451 if (lnHeightStr === lnHeight + '') { 3452 // Save the old lineHeight style and update the em unit to the element 3453 var _lnHeightStyle = node.style.lineHeight; 3454 node.style.lineHeight = lnHeightStr + 'em'; 3455 3456 // Calculate the em based height 3457 lnHeightStr = computedStyle(node, 'line-height'); 3458 lnHeight = parseFloat(lnHeightStr, 10); 3459 3460 // Revert the lineHeight style 3461 if (_lnHeightStyle) { 3462 node.style.lineHeight = _lnHeightStyle; 3463 } else { 3464 delete node.style.lineHeight; 3465 } 3466 } 3467 3468 // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt) 3469 // DEV: `em` units are converted to `pt` in IE6 3470 // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length 3471 if (lnHeightStr.indexOf('pt') !== -1) { 3472 lnHeight *= 4; 3473 lnHeight /= 3; 3474 // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm) 3475 } else if (lnHeightStr.indexOf('mm') !== -1) { 3476 lnHeight *= 96; 3477 lnHeight /= 25.4; 3478 // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm) 3479 } else if (lnHeightStr.indexOf('cm') !== -1) { 3480 lnHeight *= 96; 3481 lnHeight /= 2.54; 3482 // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in) 3483 } else if (lnHeightStr.indexOf('in') !== -1) { 3484 lnHeight *= 96; 3485 // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc) 3486 } else if (lnHeightStr.indexOf('pc') !== -1) { 3487 lnHeight *= 16; 3488 } 3489 3490 // Continue our computation 3491 lnHeight = Math.round(lnHeight); 3492 3493 // If the line-height is "normal", calculate by font-size 3494 if (lnHeightStr === 'normal') { 3495 // Create a temporary node 3496 var nodeName = node.nodeName; 3497 var _node = document.createElement(nodeName); 3498 _node.innerHTML = ' '; 3499 3500 // If we have a text area, reset it to only 1 row 3501 // https://github.com/twolfson/line-height/issues/4 3502 if (nodeName.toUpperCase() === 'TEXTAREA') { 3503 _node.setAttribute('rows', '1'); 3504 } 3505 3506 // Set the font-size of the element 3507 var fontSizeStr = computedStyle(node, 'font-size'); 3508 _node.style.fontSize = fontSizeStr; 3509 3510 // Remove default padding/border which can affect offset height 3511 // https://github.com/twolfson/line-height/issues/4 3512 // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight 3513 _node.style.padding = '0px'; 3514 _node.style.border = '0px'; 3515 3516 // Append it to the body 3517 var body = document.body; 3518 body.appendChild(_node); 3519 3520 // Assume the line height of the element is the height 3521 var height = _node.offsetHeight; 3522 lnHeight = height; 3523 3524 // Remove our child from the DOM 3525 body.removeChild(_node); 3526 } 3527 3528 // Return the calculated height 3529 return lnHeight; 3530 } 3531 3532 // Export lineHeight 3533 module.exports = lineHeight; 3534 3535 3536 /***/ }), 3537 3538 /***/ 189: 3539 /***/ (function(module, exports) { 3540 3541 // This code has been refactored for 140 bytes 3542 // You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js 3543 var computedStyle = function (el, prop, getComputedStyle) { 3544 getComputedStyle = window.getComputedStyle; 3545 3546 // In one fell swoop 3547 return ( 3548 // If we have getComputedStyle 3549 getComputedStyle ? 3550 // Query it 3551 // TODO: From CSS-Query notes, we might need (node, null) for FF 3552 getComputedStyle(el) : 3553 3554 // Otherwise, we are in IE and use currentStyle 3555 el.currentStyle 3556 )[ 3557 // Switch to camelCase for CSSOM 3558 // DEV: Grabbed from jQuery 3559 // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194 3560 // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597 3561 prop.replace(/-(\w)/gi, function (word, letter) { 3562 return letter.toUpperCase(); 3563 }) 3564 ]; 3565 }; 3566 3567 module.exports = computedStyle; 3568 3569 3570 /***/ }), 3571 3572 /***/ 19: 3573 /***/ (function(module, __webpack_exports__, __webpack_require__) { 3574 3575 "use strict"; 3576 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; }); 3577 function _getPrototypeOf(o) { 3578 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { 3579 return o.__proto__ || Object.getPrototypeOf(o); 3580 }; 3581 return _getPrototypeOf(o); 3582 } 3583 3584 /***/ }), 3585 3586 /***/ 190: 3587 /***/ (function(module, exports, __webpack_require__) { 3588 3589 "use strict"; 3590 3591 3592 var util = __webpack_require__(191); 3593 3594 function scrollIntoView(elem, container, config) { 3595 config = config || {}; 3596 // document 归一化到 window 3597 if (container.nodeType === 9) { 3598 container = util.getWindow(container); 3599 } 3600 3601 var allowHorizontalScroll = config.allowHorizontalScroll; 3602 var onlyScrollIfNeeded = config.onlyScrollIfNeeded; 3603 var alignWithTop = config.alignWithTop; 3604 var alignWithLeft = config.alignWithLeft; 3605 var offsetTop = config.offsetTop || 0; 3606 var offsetLeft = config.offsetLeft || 0; 3607 var offsetBottom = config.offsetBottom || 0; 3608 var offsetRight = config.offsetRight || 0; 3609 3610 allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll; 3611 3612 var isWin = util.isWindow(container); 3613 var elemOffset = util.offset(elem); 3614 var eh = util.outerHeight(elem); 3615 var ew = util.outerWidth(elem); 3616 var containerOffset = undefined; 3617 var ch = undefined; 3618 var cw = undefined; 3619 var containerScroll = undefined; 3620 var diffTop = undefined; 3621 var diffBottom = undefined; 3622 var win = undefined; 3623 var winScroll = undefined; 3624 var ww = undefined; 3625 var wh = undefined; 3626 3627 if (isWin) { 3628 win = container; 3629 wh = util.height(win); 3630 ww = util.width(win); 3631 winScroll = { 3632 left: util.scrollLeft(win), 3633 top: util.scrollTop(win) 3634 }; 3635 // elem 相对 container 可视视窗的距离 3636 diffTop = { 3637 left: elemOffset.left - winScroll.left - offsetLeft, 3638 top: elemOffset.top - winScroll.top - offsetTop 3639 }; 3640 diffBottom = { 3641 left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight, 3642 top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom 3643 }; 3644 containerScroll = winScroll; 3645 } else { 3646 containerOffset = util.offset(container); 3647 ch = container.clientHeight; 3648 cw = container.clientWidth; 3649 containerScroll = { 3650 left: container.scrollLeft, 3651 top: container.scrollTop 3652 }; 3653 // elem 相对 container 可视视窗的距离 3654 // 注意边框, offset 是边框到根节点 3655 diffTop = { 3656 left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft, 3657 top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop 3658 }; 3659 diffBottom = { 3660 left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight, 3661 top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom 3662 }; 3663 } 3664 3665 if (diffTop.top < 0 || diffBottom.top > 0) { 3666 // 强制向上 3667 if (alignWithTop === true) { 3668 util.scrollTop(container, containerScroll.top + diffTop.top); 3669 } else if (alignWithTop === false) { 3670 util.scrollTop(container, containerScroll.top + diffBottom.top); 3671 } else { 3672 // 自动调整 3673 if (diffTop.top < 0) { 3674 util.scrollTop(container, containerScroll.top + diffTop.top); 3675 } else { 3676 util.scrollTop(container, containerScroll.top + diffBottom.top); 3677 } 3678 } 3679 } else { 3680 if (!onlyScrollIfNeeded) { 3681 alignWithTop = alignWithTop === undefined ? true : !!alignWithTop; 3682 if (alignWithTop) { 3683 util.scrollTop(container, containerScroll.top + diffTop.top); 3684 } else { 3685 util.scrollTop(container, containerScroll.top + diffBottom.top); 3686 } 3687 } 3688 } 3689 3690 if (allowHorizontalScroll) { 3691 if (diffTop.left < 0 || diffBottom.left > 0) { 3692 // 强制向上 3693 if (alignWithLeft === true) { 3694 util.scrollLeft(container, containerScroll.left + diffTop.left); 3695 } else if (alignWithLeft === false) { 3696 util.scrollLeft(container, containerScroll.left + diffBottom.left); 3697 } else { 3698 // 自动调整 3699 if (diffTop.left < 0) { 3700 util.scrollLeft(container, containerScroll.left + diffTop.left); 3701 } else { 3702 util.scrollLeft(container, containerScroll.left + diffBottom.left); 3703 } 3704 } 3705 } else { 3706 if (!onlyScrollIfNeeded) { 3707 alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft; 3708 if (alignWithLeft) { 3709 util.scrollLeft(container, containerScroll.left + diffTop.left); 3710 } else { 3711 util.scrollLeft(container, containerScroll.left + diffBottom.left); 3712 } 3713 } 3714 } 3715 } 3716 } 3717 3718 module.exports = scrollIntoView; 3719 3720 /***/ }), 3721 3722 /***/ 191: 3723 /***/ (function(module, exports, __webpack_require__) { 3724 3725 "use strict"; 3726 3727 3728 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 3729 3730 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; 3731 3732 var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; 3733 3734 function getClientPosition(elem) { 3735 var box = undefined; 3736 var x = undefined; 3737 var y = undefined; 3738 var doc = elem.ownerDocument; 3739 var body = doc.body; 3740 var docElem = doc && doc.documentElement; 3741 // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 3742 box = elem.getBoundingClientRect(); 3743 3744 // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop 3745 // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 3746 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin 3747 3748 x = box.left; 3749 y = box.top; 3750 3751 // In IE, most of the time, 2 extra pixels are added to the top and left 3752 // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and 3753 // IE6 standards mode, this border can be overridden by setting the 3754 // document element's border to zero -- thus, we cannot rely on the 3755 // offset always being 2 pixels. 3756 3757 // In quirks mode, the offset can be determined by querying the body's 3758 // clientLeft/clientTop, but in standards mode, it is found by querying 3759 // the document element's clientLeft/clientTop. Since we already called 3760 // getClientBoundingRect we have already forced a reflow, so it is not 3761 // too expensive just to query them all. 3762 3763 // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 3764 // 窗口边框标准是设 documentElement ,quirks 时设置 body 3765 // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 3766 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 3767 // 标准 ie 下 docElem.clientTop 就是 border-top 3768 // ie7 html 即窗口边框改变不了。永远为 2 3769 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 3770 3771 x -= docElem.clientLeft || body.clientLeft || 0; 3772 y -= docElem.clientTop || body.clientTop || 0; 3773 3774 return { 3775 left: x, 3776 top: y 3777 }; 3778 } 3779 3780 function getScroll(w, top) { 3781 var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; 3782 var method = 'scroll' + (top ? 'Top' : 'Left'); 3783 if (typeof ret !== 'number') { 3784 var d = w.document; 3785 // ie6,7,8 standard mode 3786 ret = d.documentElement[method]; 3787 if (typeof ret !== 'number') { 3788 // quirks mode 3789 ret = d.body[method]; 3790 } 3791 } 3792 return ret; 3793 } 3794 3795 function getScrollLeft(w) { 3796 return getScroll(w); 3797 } 3798 3799 function getScrollTop(w) { 3800 return getScroll(w, true); 3801 } 3802 3803 function getOffset(el) { 3804 var pos = getClientPosition(el); 3805 var doc = el.ownerDocument; 3806 var w = doc.defaultView || doc.parentWindow; 3807 pos.left += getScrollLeft(w); 3808 pos.top += getScrollTop(w); 3809 return pos; 3810 } 3811 function _getComputedStyle(elem, name, computedStyle_) { 3812 var val = ''; 3813 var d = elem.ownerDocument; 3814 var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null); 3815 3816 // https://github.com/kissyteam/kissy/issues/61 3817 if (computedStyle) { 3818 val = computedStyle.getPropertyValue(name) || computedStyle[name]; 3819 } 3820 3821 return val; 3822 } 3823 3824 var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); 3825 var RE_POS = /^(top|right|bottom|left)$/; 3826 var CURRENT_STYLE = 'currentStyle'; 3827 var RUNTIME_STYLE = 'runtimeStyle'; 3828 var LEFT = 'left'; 3829 var PX = 'px'; 3830 3831 function _getComputedStyleIE(elem, name) { 3832 // currentStyle maybe null 3833 // http://msdn.microsoft.com/en-us/library/ms535231.aspx 3834 var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; 3835 3836 // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 3837 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 3838 // 在 ie 下不对,需要直接用 offset 方式 3839 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 3840 3841 // From the awesome hack by Dean Edwards 3842 // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 3843 // If we're not dealing with a regular pixel number 3844 // but a number that has a weird ending, we need to convert it to pixels 3845 // exclude left right for relativity 3846 if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { 3847 // Remember the original values 3848 var style = elem.style; 3849 var left = style[LEFT]; 3850 var rsLeft = elem[RUNTIME_STYLE][LEFT]; 3851 3852 // prevent flashing of content 3853 elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; 3854 3855 // Put in the new values to get a computed value out 3856 style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; 3857 ret = style.pixelLeft + PX; 3858 3859 // Revert the changed values 3860 style[LEFT] = left; 3861 3862 elem[RUNTIME_STYLE][LEFT] = rsLeft; 3863 } 3864 return ret === '' ? 'auto' : ret; 3865 } 3866 3867 var getComputedStyleX = undefined; 3868 if (typeof window !== 'undefined') { 3869 getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; 3870 } 3871 3872 function each(arr, fn) { 3873 for (var i = 0; i < arr.length; i++) { 3874 fn(arr[i]); 3875 } 3876 } 3877 3878 function isBorderBoxFn(elem) { 3879 return getComputedStyleX(elem, 'boxSizing') === 'border-box'; 3880 } 3881 3882 var BOX_MODELS = ['margin', 'border', 'padding']; 3883 var CONTENT_INDEX = -1; 3884 var PADDING_INDEX = 2; 3885 var BORDER_INDEX = 1; 3886 var MARGIN_INDEX = 0; 3887 3888 function swap(elem, options, callback) { 3889 var old = {}; 3890 var style = elem.style; 3891 var name = undefined; 3892 3893 // Remember the old values, and insert the new ones 3894 for (name in options) { 3895 if (options.hasOwnProperty(name)) { 3896 old[name] = style[name]; 3897 style[name] = options[name]; 3898 } 3899 } 3900 3901 callback.call(elem); 3902 3903 // Revert the old values 3904 for (name in options) { 3905 if (options.hasOwnProperty(name)) { 3906 style[name] = old[name]; 3907 } 3908 } 3909 } 3910 3911 function getPBMWidth(elem, props, which) { 3912 var value = 0; 3913 var prop = undefined; 3914 var j = undefined; 3915 var i = undefined; 3916 for (j = 0; j < props.length; j++) { 3917 prop = props[j]; 3918 if (prop) { 3919 for (i = 0; i < which.length; i++) { 3920 var cssProp = undefined; 3921 if (prop === 'border') { 3922 cssProp = prop + which[i] + 'Width'; 3923 } else { 3924 cssProp = prop + which[i]; 3925 } 3926 value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; 3927 } 3928 } 3929 } 3930 return value; 3931 } 3932 3933 /** 3934 * A crude way of determining if an object is a window 3935 * @member util 3936 */ 3937 function isWindow(obj) { 3938 // must use == for ie8 3939 /* eslint eqeqeq:0 */ 3940 return obj != null && obj == obj.window; 3941 } 3942 3943 var domUtils = {}; 3944 3945 each(['Width', 'Height'], function (name) { 3946 domUtils['doc' + name] = function (refWin) { 3947 var d = refWin.document; 3948 return Math.max( 3949 // firefox chrome documentElement.scrollHeight< body.scrollHeight 3950 // ie standard mode : documentElement.scrollHeight> body.scrollHeight 3951 d.documentElement['scroll' + name], 3952 // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? 3953 d.body['scroll' + name], domUtils['viewport' + name](d)); 3954 }; 3955 3956 domUtils['viewport' + name] = function (win) { 3957 // pc browser includes scrollbar in window.innerWidth 3958 var prop = 'client' + name; 3959 var doc = win.document; 3960 var body = doc.body; 3961 var documentElement = doc.documentElement; 3962 var documentElementProp = documentElement[prop]; 3963 // 标准模式取 documentElement 3964 // backcompat 取 body 3965 return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; 3966 }; 3967 }); 3968 3969 /* 3970 得到元素的大小信息 3971 @param elem 3972 @param name 3973 @param {String} [extra] 'padding' : (css width) + padding 3974 'border' : (css width) + padding + border 3975 'margin' : (css width) + padding + border + margin 3976 */ 3977 function getWH(elem, name, extra) { 3978 if (isWindow(elem)) { 3979 return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); 3980 } else if (elem.nodeType === 9) { 3981 return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); 3982 } 3983 var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; 3984 var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight; 3985 var computedStyle = getComputedStyleX(elem); 3986 var isBorderBox = isBorderBoxFn(elem, computedStyle); 3987 var cssBoxValue = 0; 3988 if (borderBoxValue == null || borderBoxValue <= 0) { 3989 borderBoxValue = undefined; 3990 // Fall back to computed then un computed css if necessary 3991 cssBoxValue = getComputedStyleX(elem, name); 3992 if (cssBoxValue == null || Number(cssBoxValue) < 0) { 3993 cssBoxValue = elem.style[name] || 0; 3994 } 3995 // Normalize '', auto, and prepare for extra 3996 cssBoxValue = parseFloat(cssBoxValue) || 0; 3997 } 3998 if (extra === undefined) { 3999 extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; 4000 } 4001 var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; 4002 var val = borderBoxValue || cssBoxValue; 4003 if (extra === CONTENT_INDEX) { 4004 if (borderBoxValueOrIsBorderBox) { 4005 return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); 4006 } 4007 return cssBoxValue; 4008 } 4009 if (borderBoxValueOrIsBorderBox) { 4010 var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle); 4011 return val + (extra === BORDER_INDEX ? 0 : padding); 4012 } 4013 return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); 4014 } 4015 4016 var cssShow = { 4017 position: 'absolute', 4018 visibility: 'hidden', 4019 display: 'block' 4020 }; 4021 4022 // fix #119 : https://github.com/kissyteam/kissy/issues/119 4023 function getWHIgnoreDisplay(elem) { 4024 var val = undefined; 4025 var args = arguments; 4026 // in case elem is window 4027 // elem.offsetWidth === undefined 4028 if (elem.offsetWidth !== 0) { 4029 val = getWH.apply(undefined, args); 4030 } else { 4031 swap(elem, cssShow, function () { 4032 val = getWH.apply(undefined, args); 4033 }); 4034 } 4035 return val; 4036 } 4037 4038 function css(el, name, v) { 4039 var value = v; 4040 if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { 4041 for (var i in name) { 4042 if (name.hasOwnProperty(i)) { 4043 css(el, i, name[i]); 4044 } 4045 } 4046 return undefined; 4047 } 4048 if (typeof value !== 'undefined') { 4049 if (typeof value === 'number') { 4050 value += 'px'; 4051 } 4052 el.style[name] = value; 4053 return undefined; 4054 } 4055 return getComputedStyleX(el, name); 4056 } 4057 4058 each(['width', 'height'], function (name) { 4059 var first = name.charAt(0).toUpperCase() + name.slice(1); 4060 domUtils['outer' + first] = function (el, includeMargin) { 4061 return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); 4062 }; 4063 var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; 4064 4065 domUtils[name] = function (elem, val) { 4066 if (val !== undefined) { 4067 if (elem) { 4068 var computedStyle = getComputedStyleX(elem); 4069 var isBorderBox = isBorderBoxFn(elem); 4070 if (isBorderBox) { 4071 val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); 4072 } 4073 return css(elem, name, val); 4074 } 4075 return undefined; 4076 } 4077 return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); 4078 }; 4079 }); 4080 4081 // 设置 elem 相对 elem.ownerDocument 的坐标 4082 function setOffset(elem, offset) { 4083 // set position first, in-case top/left are set even on static elem 4084 if (css(elem, 'position') === 'static') { 4085 elem.style.position = 'relative'; 4086 } 4087 4088 var old = getOffset(elem); 4089 var ret = {}; 4090 var current = undefined; 4091 var key = undefined; 4092 4093 for (key in offset) { 4094 if (offset.hasOwnProperty(key)) { 4095 current = parseFloat(css(elem, key)) || 0; 4096 ret[key] = current + offset[key] - old[key]; 4097 } 4098 } 4099 css(elem, ret); 4100 } 4101 4102 module.exports = _extends({ 4103 getWindow: function getWindow(node) { 4104 var doc = node.ownerDocument || node; 4105 return doc.defaultView || doc.parentWindow; 4106 }, 4107 offset: function offset(el, value) { 4108 if (typeof value !== 'undefined') { 4109 setOffset(el, value); 4110 } else { 4111 return getOffset(el); 4112 } 4113 }, 4114 4115 isWindow: isWindow, 4116 each: each, 4117 css: css, 4118 clone: function clone(obj) { 4119 var ret = {}; 4120 for (var i in obj) { 4121 if (obj.hasOwnProperty(i)) { 4122 ret[i] = obj[i]; 4123 } 4124 } 4125 var overflow = obj.overflow; 4126 if (overflow) { 4127 for (var i in obj) { 4128 if (obj.hasOwnProperty(i)) { 4129 ret.overflow[i] = obj.overflow[i]; 4130 } 4131 } 4132 } 4133 return ret; 4134 }, 4135 scrollLeft: function scrollLeft(w, v) { 4136 if (isWindow(w)) { 4137 if (v === undefined) { 4138 return getScrollLeft(w); 4139 } 4140 window.scrollTo(v, getScrollTop(w)); 4141 } else { 4142 if (v === undefined) { 4143 return w.scrollLeft; 4144 } 4145 w.scrollLeft = v; 4146 } 4147 }, 4148 scrollTop: function scrollTop(w, v) { 4149 if (isWindow(w)) { 4150 if (v === undefined) { 4151 return getScrollTop(w); 4152 } 4153 window.scrollTo(getScrollLeft(w), v); 4154 } else { 4155 if (v === undefined) { 4156 return w.scrollTop; 4157 } 4158 w.scrollTop = v; 4159 } 4160 }, 4161 4162 viewportWidth: 0, 4163 viewportHeight: 0 4164 }, domUtils); 4165 4166 /***/ }), 4167 4168 /***/ 192: 4169 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4170 4171 "use strict"; 4172 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 4173 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 4174 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 4175 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 4176 4177 4178 /** 4179 * WordPress dependencies 4180 */ 4181 4182 var link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 4183 xmlns: "http://www.w3.org/2000/svg", 4184 viewBox: "0 0 24 24" 4185 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 4186 d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" 4187 })); 4188 /* harmony default export */ __webpack_exports__["a"] = (link); 4189 4190 4191 /***/ }), 4192 4193 /***/ 2: 4194 /***/ (function(module, exports) { 4195 4196 (function() { module.exports = window["lodash"]; }()); 4197 4198 /***/ }), 4199 4200 /***/ 21: 4201 /***/ (function(module, exports) { 4202 4203 (function() { module.exports = window["wp"]["richText"]; }()); 4204 4205 /***/ }), 4206 4207 /***/ 215: 4208 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4209 4210 "use strict"; 4211 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 4212 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 4213 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 4214 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 4215 4216 4217 /** 4218 * WordPress dependencies 4219 */ 4220 4221 var blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 4222 xmlns: "http://www.w3.org/2000/svg", 4223 viewBox: "0 0 24 24" 4224 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 4225 d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" 4226 })); 4227 /* harmony default export */ __webpack_exports__["a"] = (blockDefault); 4228 4229 4230 /***/ }), 4231 4232 /***/ 216: 4233 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4234 4235 "use strict"; 4236 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 4237 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 4238 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 4239 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 4240 4241 4242 /** 4243 * WordPress dependencies 4244 */ 4245 4246 var plus = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 4247 xmlns: "http://www.w3.org/2000/svg", 4248 viewBox: "0 0 24 24" 4249 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 4250 d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z" 4251 })); 4252 /* harmony default export */ __webpack_exports__["a"] = (plus); 4253 4254 4255 /***/ }), 4256 4257 /***/ 217: 4258 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4259 4260 "use strict"; 4261 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 4262 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 4263 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 4264 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 4265 4266 4267 /** 4268 * WordPress dependencies 4269 */ 4270 4271 var search = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 4272 xmlns: "http://www.w3.org/2000/svg", 4273 viewBox: "0 0 24 24" 4274 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 4275 d: "M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z" 4276 })); 4277 /* harmony default export */ __webpack_exports__["a"] = (search); 4278 4279 4280 /***/ }), 4281 4282 /***/ 218: 4283 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4284 4285 "use strict"; 4286 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 4287 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 4288 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 4289 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 4290 4291 4292 /** 4293 * WordPress dependencies 4294 */ 4295 4296 var chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 4297 xmlns: "http://www.w3.org/2000/svg", 4298 viewBox: "0 0 24 24" 4299 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 4300 d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" 4301 })); 4302 /* harmony default export */ __webpack_exports__["a"] = (chevronRight); 4303 4304 4305 /***/ }), 4306 4307 /***/ 219: 4308 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4309 4310 "use strict"; 4311 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 4312 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 4313 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 4314 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 4315 4316 4317 /** 4318 * WordPress dependencies 4319 */ 4320 4321 var chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 4322 xmlns: "http://www.w3.org/2000/svg", 4323 viewBox: "0 0 24 24" 4324 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 4325 d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" 4326 })); 4327 /* harmony default export */ __webpack_exports__["a"] = (chevronLeft); 4328 4329 4330 /***/ }), 4331 4332 /***/ 220: 4333 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4334 4335 "use strict"; 4336 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 4337 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 4338 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 4339 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 4340 4341 4342 /** 4343 * WordPress dependencies 4344 */ 4345 4346 var keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 4347 xmlns: "http://www.w3.org/2000/svg", 4348 viewBox: "-2 -2 24 24" 4349 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 4350 d: "M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z" 4351 })); 4352 /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn); 4353 4354 4355 /***/ }), 4356 4357 /***/ 221: 4358 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4359 4360 "use strict"; 4361 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 4362 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 4363 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 4364 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 4365 4366 4367 /** 4368 * WordPress dependencies 4369 */ 4370 4371 var upload = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 4372 xmlns: "http://www.w3.org/2000/svg", 4373 viewBox: "0 0 24 24" 4374 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 4375 d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z" 4376 })); 4377 /* harmony default export */ __webpack_exports__["a"] = (upload); 4378 4379 4380 /***/ }), 4381 4382 /***/ 24: 4383 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4384 4385 "use strict"; 4386 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); 4387 function _arrayLikeToArray(arr, len) { 4388 if (len == null || len > arr.length) len = arr.length; 4389 4390 for (var i = 0, arr2 = new Array(len); i < len; i++) { 4391 arr2[i] = arr[i]; 4392 } 4393 4394 return arr2; 4395 } 4396 4397 /***/ }), 4398 4399 /***/ 25: 4400 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4401 4402 "use strict"; 4403 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; }); 4404 function _classCallCheck(instance, Constructor) { 4405 if (!(instance instanceof Constructor)) { 4406 throw new TypeError("Cannot call a class as a function"); 4407 } 4408 } 4409 4410 /***/ }), 4411 4412 /***/ 26: 4413 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4414 4415 "use strict"; 4416 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); 4417 function _defineProperties(target, props) { 4418 for (var i = 0; i < props.length; i++) { 4419 var descriptor = props[i]; 4420 descriptor.enumerable = descriptor.enumerable || false; 4421 descriptor.configurable = true; 4422 if ("value" in descriptor) descriptor.writable = true; 4423 Object.defineProperty(target, descriptor.key, descriptor); 4424 } 4425 } 4426 4427 function _createClass(Constructor, protoProps, staticProps) { 4428 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 4429 if (staticProps) _defineProperties(Constructor, staticProps); 4430 return Constructor; 4431 } 4432 4433 /***/ }), 4434 4435 /***/ 27: 4436 /***/ (function(module, exports) { 4437 4438 (function() { module.exports = window["wp"]["dom"]; }()); 4439 4440 /***/ }), 4441 4442 /***/ 276: 4443 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4444 4445 "use strict"; 4446 4447 // EXTERNAL MODULE: external ["wp","element"] 4448 var external_wp_element_ = __webpack_require__(0); 4449 4450 // EXTERNAL MODULE: external ["wp","primitives"] 4451 var external_wp_primitives_ = __webpack_require__(7); 4452 4453 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js 4454 4455 4456 /** 4457 * WordPress dependencies 4458 */ 4459 4460 var pencil = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { 4461 xmlns: "http://www.w3.org/2000/svg", 4462 viewBox: "0 0 24 24" 4463 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { 4464 d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z" 4465 })); 4466 /* harmony default export */ var library_pencil = (pencil); 4467 4468 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js 4469 /** 4470 * Internal dependencies 4471 */ 4472 4473 /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil); 4474 4475 4476 /***/ }), 4477 4478 /***/ 279: 4479 /***/ (function(module, exports, __webpack_require__) { 4480 4481 "use strict"; 4482 /*istanbul ignore start*/ 4483 4484 4485 Object.defineProperty(exports, "__esModule", { 4486 value: true 4487 }); 4488 exports.diffChars = diffChars; 4489 exports.characterDiff = void 0; 4490 4491 /*istanbul ignore end*/ 4492 var 4493 /*istanbul ignore start*/ 4494 _base = _interopRequireDefault(__webpack_require__(312)) 4495 /*istanbul ignore end*/ 4496 ; 4497 4498 /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 4499 4500 /*istanbul ignore end*/ 4501 var characterDiff = new 4502 /*istanbul ignore start*/ 4503 _base 4504 /*istanbul ignore end*/ 4505 . 4506 /*istanbul ignore start*/ 4507 default 4508 /*istanbul ignore end*/ 4509 (); 4510 4511 /*istanbul ignore start*/ 4512 exports.characterDiff = characterDiff; 4513 4514 /*istanbul ignore end*/ 4515 function diffChars(oldStr, newStr, options) { 4516 return characterDiff.diff(oldStr, newStr, options); 4517 } 4518 4519 4520 /***/ }), 4521 4522 /***/ 28: 4523 /***/ (function(module, __webpack_exports__, __webpack_require__) { 4524 4525 "use strict"; 4526 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; }); 4527 /* harmony import */ var _babel_runtime_helpers_esm_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52); 4528 4529 function _inherits(subClass, superClass) { 4530 if (typeof superClass !== "function" && superClass !== null) { 4531 throw new TypeError("Super expression must either be null or a function"); 4532 } 4533 4534 subClass.prototype = Object.create(superClass && superClass.prototype, { 4535 constructor: { 4536 value: subClass, 4537 writable: true, 4538 configurable: true 4539 } 4540 }); 4541 if (superClass) Object(_babel_runtime_helpers_esm_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(subClass, superClass); 4542 } 4543 4544 /***/ }), 4545 4546 /***/ 280: 4547 /***/ (function(module, exports, __webpack_require__) { 4548 4549 "use strict"; 4550 /* 4551 Copyright (c) 2014, Yahoo! Inc. All rights reserved. 4552 Copyrights licensed under the New BSD License. 4553 See the accompanying LICENSE file for terms. 4554 */ 4555 4556 4557 4558 exports.match = matchQuery; 4559 exports.parse = parseQuery; 4560 4561 // ----------------------------------------------------------------------------- 4562 4563 var RE_MEDIA_QUERY = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i, 4564 RE_MQ_EXPRESSION = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/, 4565 RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/, 4566 RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/, 4567 RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/; 4568 4569 function matchQuery(mediaQuery, values) { 4570 return parseQuery(mediaQuery).some(function (query) { 4571 var inverse = query.inverse; 4572 4573 // Either the parsed or specified `type` is "all", or the types must be 4574 // equal for a match. 4575 var typeMatch = query.type === 'all' || values.type === query.type; 4576 4577 // Quit early when `type` doesn't match, but take "not" into account. 4578 if ((typeMatch && inverse) || !(typeMatch || inverse)) { 4579 return false; 4580 } 4581 4582 var expressionsMatch = query.expressions.every(function (expression) { 4583 var feature = expression.feature, 4584 modifier = expression.modifier, 4585 expValue = expression.value, 4586 value = values[feature]; 4587 4588 // Missing or falsy values don't match. 4589 if (!value) { return false; } 4590 4591 switch (feature) { 4592 case 'orientation': 4593 case 'scan': 4594 return value.toLowerCase() === expValue.toLowerCase(); 4595 4596 case 'width': 4597 case 'height': 4598 case 'device-width': 4599 case 'device-height': 4600 expValue = toPx(expValue); 4601 value = toPx(value); 4602 break; 4603 4604 case 'resolution': 4605 expValue = toDpi(expValue); 4606 value = toDpi(value); 4607 break; 4608 4609 case 'aspect-ratio': 4610 case 'device-aspect-ratio': 4611 case /* Deprecated */ 'device-pixel-ratio': 4612 expValue = toDecimal(expValue); 4613 value = toDecimal(value); 4614 break; 4615 4616 case 'grid': 4617 case 'color': 4618 case 'color-index': 4619 case 'monochrome': 4620 expValue = parseInt(expValue, 10) || 1; 4621 value = parseInt(value, 10) || 0; 4622 break; 4623 } 4624 4625 switch (modifier) { 4626 case 'min': return value >= expValue; 4627 case 'max': return value <= expValue; 4628 default : return value === expValue; 4629 } 4630 }); 4631 4632 return (expressionsMatch && !inverse) || (!expressionsMatch && inverse); 4633 }); 4634 } 4635 4636 function parseQuery(mediaQuery) { 4637 return mediaQuery.split(',').map(function (query) { 4638 query = query.trim(); 4639 4640 var captures = query.match(RE_MEDIA_QUERY), 4641 modifier = captures[1], 4642 type = captures[2], 4643 expressions = captures[3] || '', 4644 parsed = {}; 4645 4646 parsed.inverse = !!modifier && modifier.toLowerCase() === 'not'; 4647 parsed.type = type ? type.toLowerCase() : 'all'; 4648 4649 // Split expressions into a list. 4650 expressions = expressions.match(/\([^\)]+\)/g) || []; 4651 4652 parsed.expressions = expressions.map(function (expression) { 4653 var captures = expression.match(RE_MQ_EXPRESSION), 4654 feature = captures[1].toLowerCase().match(RE_MQ_FEATURE); 4655 4656 return { 4657 modifier: feature[1], 4658 feature : feature[2], 4659 value : captures[2] 4660 }; 4661 }); 4662 4663 return parsed; 4664 }); 4665 } 4666 4667 // -- Utilities ---------------------------------------------------------------- 4668 4669 function toDecimal(ratio) { 4670 var decimal = Number(ratio), 4671 numbers; 4672 4673 if (!decimal) { 4674 numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/); 4675 decimal = numbers[1] / numbers[2]; 4676 } 4677 4678 return decimal; 4679 } 4680 4681 function toDpi(resolution) { 4682 var value = parseFloat(resolution), 4683 units = String(resolution).match(RE_RESOLUTION_UNIT)[1]; 4684 4685 switch (units) { 4686 case 'dpcm': return value / 2.54; 4687 case 'dppx': return value * 96; 4688 default : return value; 4689 } 4690 } 4691 4692 function toPx(length) { 4693 var value = parseFloat(length), 4694 units = String(length).match(RE_LENGTH_UNIT)[1]; 4695 4696 switch (units) { 4697 case 'em' : return value * 16; 4698 case 'rem': return value * 16; 4699 case 'cm' : return value * 96 / 2.54; 4700 case 'mm' : return value * 96 / 2.54 / 10; 4701 case 'in' : return value * 96; 4702 case 'pt' : return value * 72; 4703 case 'pc' : return value * 72 / 12; 4704 default : return value; 4705 } 4706 } 4707 4708 4709 /***/ }), 4710 4711 /***/ 281: 4712 /***/ (function(module, exports) { 4713 4714 var traverse = module.exports = function (obj) { 4715 return new Traverse(obj); 4716 }; 4717 4718 function Traverse (obj) { 4719 this.value = obj; 4720 } 4721 4722 Traverse.prototype.get = function (ps) { 4723 var node = this.value; 4724 for (var i = 0; i < ps.length; i ++) { 4725 var key = ps[i]; 4726 if (!node || !hasOwnProperty.call(node, key)) { 4727 node = undefined; 4728 break; 4729 } 4730 node = node[key]; 4731 } 4732 return node; 4733 }; 4734 4735 Traverse.prototype.has = function (ps) { 4736 var node = this.value; 4737 for (var i = 0; i < ps.length; i ++) { 4738 var key = ps[i]; 4739 if (!node || !hasOwnProperty.call(node, key)) { 4740 return false; 4741 } 4742 node = node[key]; 4743 } 4744 return true; 4745 }; 4746 4747 Traverse.prototype.set = function (ps, value) { 4748 var node = this.value; 4749 for (var i = 0; i < ps.length - 1; i ++) { 4750 var key = ps[i]; 4751 if (!hasOwnProperty.call(node, key)) node[key] = {}; 4752 node = node[key]; 4753 } 4754 node[ps[i]] = value; 4755 return value; 4756 }; 4757 4758 Traverse.prototype.map = function (cb) { 4759 return walk(this.value, cb, true); 4760 }; 4761 4762 Traverse.prototype.forEach = function (cb) { 4763 this.value = walk(this.value, cb, false); 4764 return this.value; 4765 }; 4766 4767 Traverse.prototype.reduce = function (cb, init) { 4768 var skip = arguments.length === 1; 4769 var acc = skip ? this.value : init; 4770 this.forEach(function (x) { 4771 if (!this.isRoot || !skip) { 4772 acc = cb.call(this, acc, x); 4773 } 4774 }); 4775 return acc; 4776 }; 4777 4778 Traverse.prototype.paths = function () { 4779 var acc = []; 4780 this.forEach(function (x) { 4781 acc.push(this.path); 4782 }); 4783 return acc; 4784 }; 4785 4786 Traverse.prototype.nodes = function () { 4787 var acc = []; 4788 this.forEach(function (x) { 4789 acc.push(this.node); 4790 }); 4791 return acc; 4792 }; 4793 4794 Traverse.prototype.clone = function () { 4795 var parents = [], nodes = []; 4796 4797 return (function clone (src) { 4798 for (var i = 0; i < parents.length; i++) { 4799 if (parents[i] === src) { 4800 return nodes[i]; 4801 } 4802 } 4803 4804 if (typeof src === 'object' && src !== null) { 4805 var dst = copy(src); 4806 4807 parents.push(src); 4808 nodes.push(dst); 4809 4810 forEach(objectKeys(src), function (key) { 4811 dst[key] = clone(src[key]); 4812 }); 4813 4814 parents.pop(); 4815 nodes.pop(); 4816 return dst; 4817 } 4818 else { 4819 return src; 4820 } 4821 })(this.value); 4822 }; 4823 4824 function walk (root, cb, immutable) { 4825 var path = []; 4826 var parents = []; 4827 var alive = true; 4828 4829 return (function walker (node_) { 4830 var node = immutable ? copy(node_) : node_; 4831 var modifiers = {}; 4832 4833 var keepGoing = true; 4834 4835 var state = { 4836 node : node, 4837 node_ : node_, 4838 path : [].concat(path), 4839 parent : parents[parents.length - 1], 4840 parents : parents, 4841 key : path.slice(-1)[0], 4842 isRoot : path.length === 0, 4843 level : path.length, 4844 circular : null, 4845 update : function (x, stopHere) { 4846 if (!state.isRoot) { 4847 state.parent.node[state.key] = x; 4848 } 4849 state.node = x; 4850 if (stopHere) keepGoing = false; 4851 }, 4852 'delete' : function (stopHere) { 4853 delete state.parent.node[state.key]; 4854 if (stopHere) keepGoing = false; 4855 }, 4856 remove : function (stopHere) { 4857 if (isArray(state.parent.node)) { 4858 state.parent.node.splice(state.key, 1); 4859 } 4860 else { 4861 delete state.parent.node[state.key]; 4862 } 4863 if (stopHere) keepGoing = false; 4864 }, 4865 keys : null, 4866 before : function (f) { modifiers.before = f }, 4867 after : function (f) { modifiers.after = f }, 4868 pre : function (f) { modifiers.pre = f }, 4869 post : function (f) { modifiers.post = f }, 4870 stop : function () { alive = false }, 4871 block : function () { keepGoing = false } 4872 }; 4873 4874 if (!alive) return state; 4875 4876 function updateState() { 4877 if (typeof state.node === 'object' && state.node !== null) { 4878 if (!state.keys || state.node_ !== state.node) { 4879 state.keys = objectKeys(state.node) 4880 } 4881 4882 state.isLeaf = state.keys.length == 0; 4883 4884 for (var i = 0; i < parents.length; i++) { 4885 if (parents[i].node_ === node_) { 4886 state.circular = parents[i]; 4887 break; 4888 } 4889 } 4890 } 4891 else { 4892 state.isLeaf = true; 4893 state.keys = null; 4894 } 4895 4896 state.notLeaf = !state.isLeaf; 4897 state.notRoot = !state.isRoot; 4898 } 4899 4900 updateState(); 4901 4902 // use return values to update if defined 4903 var ret = cb.call(state, state.node); 4904 if (ret !== undefined && state.update) state.update(ret); 4905 4906 if (modifiers.before) modifiers.before.call(state, state.node); 4907 4908 if (!keepGoing) return state; 4909 4910 if (typeof state.node == 'object' 4911 && state.node !== null && !state.circular) { 4912 parents.push(state); 4913 4914 updateState(); 4915 4916 forEach(state.keys, function (key, i) { 4917 path.push(key); 4918 4919 if (modifiers.pre) modifiers.pre.call(state, state.node[key], key); 4920 4921 var child = walker(state.node[key]); 4922 if (immutable && hasOwnProperty.call(state.node, key)) { 4923 state.node[key] = child.node; 4924 } 4925 4926 child.isLast = i == state.keys.length - 1; 4927 child.isFirst = i == 0; 4928 4929 if (modifiers.post) modifiers.post.call(state, child); 4930 4931 path.pop(); 4932 }); 4933 parents.pop(); 4934 } 4935 4936 if (modifiers.after) modifiers.after.call(state, state.node); 4937 4938 return state; 4939 })(root).node; 4940 } 4941 4942 function copy (src) { 4943 if (typeof src === 'object' && src !== null) { 4944 var dst; 4945 4946 if (isArray(src)) { 4947 dst = []; 4948 } 4949 else if (isDate(src)) { 4950 dst = new Date(src.getTime ? src.getTime() : src); 4951 } 4952 else if (isRegExp(src)) { 4953 dst = new RegExp(src); 4954 } 4955 else if (isError(src)) { 4956 dst = { message: src.message }; 4957 } 4958 else if (isBoolean(src)) { 4959 dst = new Boolean(src); 4960 } 4961 else if (isNumber(src)) { 4962 dst = new Number(src); 4963 } 4964 else if (isString(src)) { 4965 dst = new String(src); 4966 } 4967 else if (Object.create && Object.getPrototypeOf) { 4968 dst = Object.create(Object.getPrototypeOf(src)); 4969 } 4970 else if (src.constructor === Object) { 4971 dst = {}; 4972 } 4973 else { 4974 var proto = 4975 (src.constructor && src.constructor.prototype) 4976 || src.__proto__ 4977 || {} 4978 ; 4979 var T = function () {}; 4980 T.prototype = proto; 4981 dst = new T; 4982 } 4983 4984 forEach(objectKeys(src), function (key) { 4985 dst[key] = src[key]; 4986 }); 4987 return dst; 4988 } 4989 else return src; 4990 } 4991 4992 var objectKeys = Object.keys || function keys (obj) { 4993 var res = []; 4994 for (var key in obj) res.push(key) 4995 return res; 4996 }; 4997 4998 function toS (obj) { return Object.prototype.toString.call(obj) } 4999 function isDate (obj) { return toS(obj) === '[object Date]' } 5000 function isRegExp (obj) { return toS(obj) === '[object RegExp]' } 5001 function isError (obj) { return toS(obj) === '[object Error]' } 5002 function isBoolean (obj) { return toS(obj) === '[object Boolean]' } 5003 function isNumber (obj) { return toS(obj) === '[object Number]' } 5004 function isString (obj) { return toS(obj) === '[object String]' } 5005 5006 var isArray = Array.isArray || function isArray (xs) { 5007 return Object.prototype.toString.call(xs) === '[object Array]'; 5008 }; 5009 5010 var forEach = function (xs, fn) { 5011 if (xs.forEach) return xs.forEach(fn) 5012 else for (var i = 0; i < xs.length; i++) { 5013 fn(xs[i], i, xs); 5014 } 5015 }; 5016 5017 forEach(objectKeys(Traverse.prototype), function (key) { 5018 traverse[key] = function (obj) { 5019 var args = [].slice.call(arguments, 1); 5020 var t = new Traverse(obj); 5021 return t[key].apply(t, args); 5022 }; 5023 }); 5024 5025 var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { 5026 return key in obj; 5027 }; 5028 5029 5030 /***/ }), 5031 5032 /***/ 29: 5033 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5034 5035 "use strict"; 5036 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; }); 5037 /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42); 5038 /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18); 5039 5040 5041 function _possibleConstructorReturn(self, call) { 5042 if (call && (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) { 5043 return call; 5044 } 5045 5046 return Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self); 5047 } 5048 5049 /***/ }), 5050 5051 /***/ 3: 5052 /***/ (function(module, exports) { 5053 5054 (function() { module.exports = window["wp"]["components"]; }()); 5055 5056 /***/ }), 5057 5058 /***/ 30: 5059 /***/ (function(module, exports, __webpack_require__) { 5060 5061 /** 5062 * Copyright (c) 2013-present, Facebook, Inc. 5063 * 5064 * This source code is licensed under the MIT license found in the 5065 * LICENSE file in the root directory of this source tree. 5066 */ 5067 5068 if (false) { var throwOnDirectAccess, ReactIs; } else { 5069 // By explicitly using `prop-types` you are opting into new production behavior. 5070 // http://fb.me/prop-types-in-prod 5071 module.exports = __webpack_require__(139)(); 5072 } 5073 5074 5075 /***/ }), 5076 5077 /***/ 305: 5078 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5079 5080 "use strict"; 5081 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5082 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5083 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5084 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5085 5086 5087 /** 5088 * WordPress dependencies 5089 */ 5090 5091 var formatStrikethrough = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5092 xmlns: "http://www.w3.org/2000/svg", 5093 viewBox: "0 0 24 24" 5094 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5095 d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z" 5096 })); 5097 /* harmony default export */ __webpack_exports__["a"] = (formatStrikethrough); 5098 5099 5100 /***/ }), 5101 5102 /***/ 306: 5103 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5104 5105 "use strict"; 5106 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5107 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5108 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5109 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5110 5111 5112 /** 5113 * WordPress dependencies 5114 */ 5115 5116 var alignLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5117 xmlns: "http://www.w3.org/2000/svg", 5118 viewBox: "0 0 24 24" 5119 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5120 d: "M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z" 5121 })); 5122 /* harmony default export */ __webpack_exports__["a"] = (alignLeft); 5123 5124 5125 /***/ }), 5126 5127 /***/ 307: 5128 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5129 5130 "use strict"; 5131 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5132 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5133 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5134 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5135 5136 5137 /** 5138 * WordPress dependencies 5139 */ 5140 5141 var alignCenter = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5142 xmlns: "http://www.w3.org/2000/svg", 5143 viewBox: "0 0 24 24" 5144 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5145 d: "M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z" 5146 })); 5147 /* harmony default export */ __webpack_exports__["a"] = (alignCenter); 5148 5149 5150 /***/ }), 5151 5152 /***/ 308: 5153 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5154 5155 "use strict"; 5156 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5157 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5158 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5159 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5160 5161 5162 /** 5163 * WordPress dependencies 5164 */ 5165 5166 var alignRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5167 xmlns: "http://www.w3.org/2000/svg", 5168 viewBox: "0 0 24 24" 5169 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5170 d: "M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z" 5171 })); 5172 /* harmony default export */ __webpack_exports__["a"] = (alignRight); 5173 5174 5175 /***/ }), 5176 5177 /***/ 309: 5178 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5179 5180 "use strict"; 5181 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5182 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5183 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5184 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5185 5186 5187 /** 5188 * WordPress dependencies 5189 */ 5190 5191 var chevronUp = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5192 viewBox: "0 0 24 24", 5193 xmlns: "http://www.w3.org/2000/svg" 5194 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5195 d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" 5196 })); 5197 /* harmony default export */ __webpack_exports__["a"] = (chevronUp); 5198 5199 5200 /***/ }), 5201 5202 /***/ 31: 5203 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5204 5205 "use strict"; 5206 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); 5207 /* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); 5208 5209 function _unsupportedIterableToArray(o, minLen) { 5210 if (!o) return; 5211 if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); 5212 var n = Object.prototype.toString.call(o).slice(8, -1); 5213 if (n === "Object" && o.constructor) n = o.constructor.name; 5214 if (n === "Map" || n === "Set") return Array.from(o); 5215 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); 5216 } 5217 5218 /***/ }), 5219 5220 /***/ 310: 5221 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5222 5223 "use strict"; 5224 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5225 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5226 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5227 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5228 5229 5230 /** 5231 * WordPress dependencies 5232 */ 5233 5234 var chevronDown = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5235 viewBox: "0 0 24 24", 5236 xmlns: "http://www.w3.org/2000/svg" 5237 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5238 d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" 5239 })); 5240 /* harmony default export */ __webpack_exports__["a"] = (chevronDown); 5241 5242 5243 /***/ }), 5244 5245 /***/ 311: 5246 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5247 5248 "use strict"; 5249 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5250 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5251 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5252 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5253 5254 5255 /** 5256 * WordPress dependencies 5257 */ 5258 5259 var moreVertical = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5260 xmlns: "http://www.w3.org/2000/svg", 5261 viewBox: "0 0 24 24" 5262 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5263 d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" 5264 })); 5265 /* harmony default export */ __webpack_exports__["a"] = (moreVertical); 5266 5267 5268 /***/ }), 5269 5270 /***/ 312: 5271 /***/ (function(module, exports, __webpack_require__) { 5272 5273 "use strict"; 5274 /*istanbul ignore start*/ 5275 5276 5277 Object.defineProperty(exports, "__esModule", { 5278 value: true 5279 }); 5280 exports.default = Diff; 5281 5282 /*istanbul ignore end*/ 5283 function Diff() {} 5284 5285 Diff.prototype = { 5286 /*istanbul ignore start*/ 5287 5288 /*istanbul ignore end*/ 5289 diff: function diff(oldString, newString) { 5290 /*istanbul ignore start*/ 5291 var 5292 /*istanbul ignore end*/ 5293 options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 5294 var callback = options.callback; 5295 5296 if (typeof options === 'function') { 5297 callback = options; 5298 options = {}; 5299 } 5300 5301 this.options = options; 5302 var self = this; 5303 5304 function done(value) { 5305 if (callback) { 5306 setTimeout(function () { 5307 callback(undefined, value); 5308 }, 0); 5309 return true; 5310 } else { 5311 return value; 5312 } 5313 } // Allow subclasses to massage the input prior to running 5314 5315 5316 oldString = this.castInput(oldString); 5317 newString = this.castInput(newString); 5318 oldString = this.removeEmpty(this.tokenize(oldString)); 5319 newString = this.removeEmpty(this.tokenize(newString)); 5320 var newLen = newString.length, 5321 oldLen = oldString.length; 5322 var editLength = 1; 5323 var maxEditLength = newLen + oldLen; 5324 var bestPath = [{ 5325 newPos: -1, 5326 components: [] 5327 }]; // Seed editLength = 0, i.e. the content starts with the same values 5328 5329 var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); 5330 5331 if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { 5332 // Identity per the equality and tokenizer 5333 return done([{ 5334 value: this.join(newString), 5335 count: newString.length 5336 }]); 5337 } // Main worker method. checks all permutations of a given edit length for acceptance. 5338 5339 5340 function execEditLength() { 5341 for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { 5342 var basePath = 5343 /*istanbul ignore start*/ 5344 void 0 5345 /*istanbul ignore end*/ 5346 ; 5347 5348 var addPath = bestPath[diagonalPath - 1], 5349 removePath = bestPath[diagonalPath + 1], 5350 _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; 5351 5352 if (addPath) { 5353 // No one else is going to attempt to use this value, clear it 5354 bestPath[diagonalPath - 1] = undefined; 5355 } 5356 5357 var canAdd = addPath && addPath.newPos + 1 < newLen, 5358 canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; 5359 5360 if (!canAdd && !canRemove) { 5361 // If this path is a terminal then prune 5362 bestPath[diagonalPath] = undefined; 5363 continue; 5364 } // Select the diagonal that we want to branch from. We select the prior 5365 // path whose position in the new string is the farthest from the origin 5366 // and does not pass the bounds of the diff graph 5367 5368 5369 if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { 5370 basePath = clonePath(removePath); 5371 self.pushComponent(basePath.components, undefined, true); 5372 } else { 5373 basePath = addPath; // No need to clone, we've pulled it from the list 5374 5375 basePath.newPos++; 5376 self.pushComponent(basePath.components, true, undefined); 5377 } 5378 5379 _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done 5380 5381 if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { 5382 return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); 5383 } else { 5384 // Otherwise track this path as a potential candidate and continue. 5385 bestPath[diagonalPath] = basePath; 5386 } 5387 } 5388 5389 editLength++; 5390 } // Performs the length of edit iteration. Is a bit fugly as this has to support the 5391 // sync and async mode which is never fun. Loops over execEditLength until a value 5392 // is produced. 5393 5394 5395 if (callback) { 5396 (function exec() { 5397 setTimeout(function () { 5398 // This should not happen, but we want to be safe. 5399 5400 /* istanbul ignore next */ 5401 if (editLength > maxEditLength) { 5402 return callback(); 5403 } 5404 5405 if (!execEditLength()) { 5406 exec(); 5407 } 5408 }, 0); 5409 })(); 5410 } else { 5411 while (editLength <= maxEditLength) { 5412 var ret = execEditLength(); 5413 5414 if (ret) { 5415 return ret; 5416 } 5417 } 5418 } 5419 }, 5420 5421 /*istanbul ignore start*/ 5422 5423 /*istanbul ignore end*/ 5424 pushComponent: function pushComponent(components, added, removed) { 5425 var last = components[components.length - 1]; 5426 5427 if (last && last.added === added && last.removed === removed) { 5428 // We need to clone here as the component clone operation is just 5429 // as shallow array clone 5430 components[components.length - 1] = { 5431 count: last.count + 1, 5432 added: added, 5433 removed: removed 5434 }; 5435 } else { 5436 components.push({ 5437 count: 1, 5438 added: added, 5439 removed: removed 5440 }); 5441 } 5442 }, 5443 5444 /*istanbul ignore start*/ 5445 5446 /*istanbul ignore end*/ 5447 extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { 5448 var newLen = newString.length, 5449 oldLen = oldString.length, 5450 newPos = basePath.newPos, 5451 oldPos = newPos - diagonalPath, 5452 commonCount = 0; 5453 5454 while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { 5455 newPos++; 5456 oldPos++; 5457 commonCount++; 5458 } 5459 5460 if (commonCount) { 5461 basePath.components.push({ 5462 count: commonCount 5463 }); 5464 } 5465 5466 basePath.newPos = newPos; 5467 return oldPos; 5468 }, 5469 5470 /*istanbul ignore start*/ 5471 5472 /*istanbul ignore end*/ 5473 equals: function equals(left, right) { 5474 if (this.options.comparator) { 5475 return this.options.comparator(left, right); 5476 } else { 5477 return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); 5478 } 5479 }, 5480 5481 /*istanbul ignore start*/ 5482 5483 /*istanbul ignore end*/ 5484 removeEmpty: function removeEmpty(array) { 5485 var ret = []; 5486 5487 for (var i = 0; i < array.length; i++) { 5488 if (array[i]) { 5489 ret.push(array[i]); 5490 } 5491 } 5492 5493 return ret; 5494 }, 5495 5496 /*istanbul ignore start*/ 5497 5498 /*istanbul ignore end*/ 5499 castInput: function castInput(value) { 5500 return value; 5501 }, 5502 5503 /*istanbul ignore start*/ 5504 5505 /*istanbul ignore end*/ 5506 tokenize: function tokenize(value) { 5507 return value.split(''); 5508 }, 5509 5510 /*istanbul ignore start*/ 5511 5512 /*istanbul ignore end*/ 5513 join: function join(chars) { 5514 return chars.join(''); 5515 } 5516 }; 5517 5518 function buildValues(diff, components, newString, oldString, useLongestToken) { 5519 var componentPos = 0, 5520 componentLen = components.length, 5521 newPos = 0, 5522 oldPos = 0; 5523 5524 for (; componentPos < componentLen; componentPos++) { 5525 var component = components[componentPos]; 5526 5527 if (!component.removed) { 5528 if (!component.added && useLongestToken) { 5529 var value = newString.slice(newPos, newPos + component.count); 5530 value = value.map(function (value, i) { 5531 var oldValue = oldString[oldPos + i]; 5532 return oldValue.length > value.length ? oldValue : value; 5533 }); 5534 component.value = diff.join(value); 5535 } else { 5536 component.value = diff.join(newString.slice(newPos, newPos + component.count)); 5537 } 5538 5539 newPos += component.count; // Common case 5540 5541 if (!component.added) { 5542 oldPos += component.count; 5543 } 5544 } else { 5545 component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); 5546 oldPos += component.count; // Reverse add and remove so removes are output first to match common convention 5547 // The diffing algorithm is tied to add then remove output and this is the simplest 5548 // route to get the desired output with minimal overhead. 5549 5550 if (componentPos && components[componentPos - 1].added) { 5551 var tmp = components[componentPos - 1]; 5552 components[componentPos - 1] = components[componentPos]; 5553 components[componentPos] = tmp; 5554 } 5555 } 5556 } // Special case handle for when one terminal is ignored (i.e. whitespace). 5557 // For this case we merge the terminal into the prior string and drop the change. 5558 // This is only available for string mode. 5559 5560 5561 var lastComponent = components[componentLen - 1]; 5562 5563 if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { 5564 components[componentLen - 2].value += lastComponent.value; 5565 components.pop(); 5566 } 5567 5568 return components; 5569 } 5570 5571 function clonePath(path) { 5572 return { 5573 newPos: path.newPos, 5574 components: path.components.slice(0) 5575 }; 5576 } 5577 5578 5579 /***/ }), 5580 5581 /***/ 313: 5582 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5583 5584 "use strict"; 5585 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5586 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5587 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5588 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5589 5590 5591 /** 5592 * WordPress dependencies 5593 */ 5594 5595 var layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5596 xmlns: "http://www.w3.org/2000/svg", 5597 viewBox: "-2 -2 24 24" 5598 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5599 d: "M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z" 5600 })); 5601 /* harmony default export */ __webpack_exports__["a"] = (layout); 5602 5603 5604 /***/ }), 5605 5606 /***/ 314: 5607 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5608 5609 "use strict"; 5610 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); 5611 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 5612 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); 5613 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); 5614 5615 5616 /** 5617 * WordPress dependencies 5618 */ 5619 5620 var media = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { 5621 xmlns: "http://www.w3.org/2000/svg", 5622 viewBox: "0 0 24 24" 5623 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { 5624 d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z" 5625 })); 5626 /* harmony default export */ __webpack_exports__["a"] = (media); 5627 5628 5629 /***/ }), 5630 5631 /***/ 32: 5632 /***/ (function(module, exports) { 5633 5634 (function() { module.exports = window["wp"]["url"]; }()); 5635 5636 /***/ }), 5637 5638 /***/ 33: 5639 /***/ (function(module, exports) { 5640 5641 (function() { module.exports = window["wp"]["hooks"]; }()); 5642 5643 /***/ }), 5644 5645 /***/ 35: 5646 /***/ (function(module, exports) { 5647 5648 (function() { module.exports = window["wp"]["deprecated"]; }()); 5649 5650 /***/ }), 5651 5652 /***/ 37: 5653 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5654 5655 "use strict"; 5656 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; }); 5657 function _iterableToArray(iter) { 5658 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); 5659 } 5660 5661 /***/ }), 5662 5663 /***/ 38: 5664 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5665 5666 "use strict"; 5667 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; }); 5668 function _arrayWithHoles(arr) { 5669 if (Array.isArray(arr)) return arr; 5670 } 5671 5672 /***/ }), 5673 5674 /***/ 39: 5675 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5676 5677 "use strict"; 5678 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; }); 5679 function _nonIterableRest() { 5680 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 5681 } 5682 5683 /***/ }), 5684 5685 /***/ 4: 5686 /***/ (function(module, exports) { 5687 5688 (function() { module.exports = window["wp"]["data"]; }()); 5689 5690 /***/ }), 5691 5692 /***/ 41: 5693 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5694 5695 "use strict"; 5696 5697 5698 var LEAF_KEY, hasWeakMap; 5699 5700 /** 5701 * Arbitrary value used as key for referencing cache object in WeakMap tree. 5702 * 5703 * @type {Object} 5704 */ 5705 LEAF_KEY = {}; 5706 5707 /** 5708 * Whether environment supports WeakMap. 5709 * 5710 * @type {boolean} 5711 */ 5712 hasWeakMap = typeof WeakMap !== 'undefined'; 5713 5714 /** 5715 * Returns the first argument as the sole entry in an array. 5716 * 5717 * @param {*} value Value to return. 5718 * 5719 * @return {Array} Value returned as entry in array. 5720 */ 5721 function arrayOf( value ) { 5722 return [ value ]; 5723 } 5724 5725 /** 5726 * Returns true if the value passed is object-like, or false otherwise. A value 5727 * is object-like if it can support property assignment, e.g. object or array. 5728 * 5729 * @param {*} value Value to test. 5730 * 5731 * @return {boolean} Whether value is object-like. 5732 */ 5733 function isObjectLike( value ) { 5734 return !! value && 'object' === typeof value; 5735 } 5736 5737 /** 5738 * Creates and returns a new cache object. 5739 * 5740 * @return {Object} Cache object. 5741 */ 5742 function createCache() { 5743 var cache = { 5744 clear: function() { 5745 cache.head = null; 5746 }, 5747 }; 5748 5749 return cache; 5750 } 5751 5752 /** 5753 * Returns true if entries within the two arrays are strictly equal by 5754 * reference from a starting index. 5755 * 5756 * @param {Array} a First array. 5757 * @param {Array} b Second array. 5758 * @param {number} fromIndex Index from which to start comparison. 5759 * 5760 * @return {boolean} Whether arrays are shallowly equal. 5761 */ 5762 function isShallowEqual( a, b, fromIndex ) { 5763 var i; 5764 5765 if ( a.length !== b.length ) { 5766 return false; 5767 } 5768 5769 for ( i = fromIndex; i < a.length; i++ ) { 5770 if ( a[ i ] !== b[ i ] ) { 5771 return false; 5772 } 5773 } 5774 5775 return true; 5776 } 5777 5778 /** 5779 * Returns a memoized selector function. The getDependants function argument is 5780 * called before the memoized selector and is expected to return an immutable 5781 * reference or array of references on which the selector depends for computing 5782 * its own return value. The memoize cache is preserved only as long as those 5783 * dependant references remain the same. If getDependants returns a different 5784 * reference(s), the cache is cleared and the selector value regenerated. 5785 * 5786 * @param {Function} selector Selector function. 5787 * @param {Function} getDependants Dependant getter returning an immutable 5788 * reference or array of reference used in 5789 * cache bust consideration. 5790 * 5791 * @return {Function} Memoized selector. 5792 */ 5793 /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) { 5794 var rootCache, getCache; 5795 5796 // Use object source as dependant if getter not provided 5797 if ( ! getDependants ) { 5798 getDependants = arrayOf; 5799 } 5800 5801 /** 5802 * Returns the root cache. If WeakMap is supported, this is assigned to the 5803 * root WeakMap cache set, otherwise it is a shared instance of the default 5804 * cache object. 5805 * 5806 * @return {(WeakMap|Object)} Root cache object. 5807 */ 5808 function getRootCache() { 5809 return rootCache; 5810 } 5811 5812 /** 5813 * Returns the cache for a given dependants array. When possible, a WeakMap 5814 * will be used to create a unique cache for each set of dependants. This 5815 * is feasible due to the nature of WeakMap in allowing garbage collection 5816 * to occur on entries where the key object is no longer referenced. Since 5817 * WeakMap requires the key to be an object, this is only possible when the 5818 * dependant is object-like. The root cache is created as a hierarchy where 5819 * each top-level key is the first entry in a dependants set, the value a 5820 * WeakMap where each key is the next dependant, and so on. This continues 5821 * so long as the dependants are object-like. If no dependants are object- 5822 * like, then the cache is shared across all invocations. 5823 * 5824 * @see isObjectLike 5825 * 5826 * @param {Array} dependants Selector dependants. 5827 * 5828 * @return {Object} Cache object. 5829 */ 5830 function getWeakMapCache( dependants ) { 5831 var caches = rootCache, 5832 isUniqueByDependants = true, 5833 i, dependant, map, cache; 5834 5835 for ( i = 0; i < dependants.length; i++ ) { 5836 dependant = dependants[ i ]; 5837 5838 // Can only compose WeakMap from object-like key. 5839 if ( ! isObjectLike( dependant ) ) { 5840 isUniqueByDependants = false; 5841 break; 5842 } 5843 5844 // Does current segment of cache already have a WeakMap? 5845 if ( caches.has( dependant ) ) { 5846 // Traverse into nested WeakMap. 5847 caches = caches.get( dependant ); 5848 } else { 5849 // Create, set, and traverse into a new one. 5850 map = new WeakMap(); 5851 caches.set( dependant, map ); 5852 caches = map; 5853 } 5854 } 5855 5856 // We use an arbitrary (but consistent) object as key for the last item 5857 // in the WeakMap to serve as our running cache. 5858 if ( ! caches.has( LEAF_KEY ) ) { 5859 cache = createCache(); 5860 cache.isUniqueByDependants = isUniqueByDependants; 5861 caches.set( LEAF_KEY, cache ); 5862 } 5863 5864 return caches.get( LEAF_KEY ); 5865 } 5866 5867 // Assign cache handler by availability of WeakMap 5868 getCache = hasWeakMap ? getWeakMapCache : getRootCache; 5869 5870 /** 5871 * Resets root memoization cache. 5872 */ 5873 function clear() { 5874 rootCache = hasWeakMap ? new WeakMap() : createCache(); 5875 } 5876 5877 // eslint-disable-next-line jsdoc/check-param-names 5878 /** 5879 * The augmented selector call, considering first whether dependants have 5880 * changed before passing it to underlying memoize function. 5881 * 5882 * @param {Object} source Source object for derivation. 5883 * @param {...*} extraArgs Additional arguments to pass to selector. 5884 * 5885 * @return {*} Selector result. 5886 */ 5887 function callSelector( /* source, ...extraArgs */ ) { 5888 var len = arguments.length, 5889 cache, node, i, args, dependants; 5890 5891 // Create copy of arguments (avoid leaking deoptimization). 5892 args = new Array( len ); 5893 for ( i = 0; i < len; i++ ) { 5894 args[ i ] = arguments[ i ]; 5895 } 5896 5897 dependants = getDependants.apply( null, args ); 5898 cache = getCache( dependants ); 5899 5900 // If not guaranteed uniqueness by dependants (primitive type or lack 5901 // of WeakMap support), shallow compare against last dependants and, if 5902 // references have changed, destroy cache to recalculate result. 5903 if ( ! cache.isUniqueByDependants ) { 5904 if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) { 5905 cache.clear(); 5906 } 5907 5908 cache.lastDependants = dependants; 5909 } 5910 5911 node = cache.head; 5912 while ( node ) { 5913 // Check whether node arguments match arguments 5914 if ( ! isShallowEqual( node.args, args, 1 ) ) { 5915 node = node.next; 5916 continue; 5917 } 5918 5919 // At this point we can assume we've found a match 5920 5921 // Surface matched node to head if not already 5922 if ( node !== cache.head ) { 5923 // Adjust siblings to point to each other. 5924 node.prev.next = node.next; 5925 if ( node.next ) { 5926 node.next.prev = node.prev; 5927 } 5928 5929 node.next = cache.head; 5930 node.prev = null; 5931 cache.head.prev = node; 5932 cache.head = node; 5933 } 5934 5935 // Return immediately 5936 return node.val; 5937 } 5938 5939 // No cached value found. Continue to insertion phase: 5940 5941 node = { 5942 // Generate the result from original function 5943 val: selector.apply( null, args ), 5944 }; 5945 5946 // Avoid including the source object in the cache. 5947 args[ 0 ] = null; 5948 node.args = args; 5949 5950 // Don't need to check whether node is already head, since it would 5951 // have been returned above already if it was 5952 5953 // Shift existing head down list 5954 if ( cache.head ) { 5955 cache.head.prev = node; 5956 node.next = cache.head; 5957 } 5958 5959 cache.head = node; 5960 5961 return node.val; 5962 } 5963 5964 callSelector.getDependants = getDependants; 5965 callSelector.clear = clear; 5966 clear(); 5967 5968 return callSelector; 5969 }); 5970 5971 5972 /***/ }), 5973 5974 /***/ 42: 5975 /***/ (function(module, __webpack_exports__, __webpack_require__) { 5976 5977 "use strict"; 5978 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); 5979 function _typeof(obj) { 5980 "@babel/helpers - typeof"; 5981 5982 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 5983 _typeof = function _typeof(obj) { 5984 return typeof obj; 5985 }; 5986 } else { 5987 _typeof = function _typeof(obj) { 5988 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 5989 }; 5990 } 5991 5992 return _typeof(obj); 5993 } 5994 5995 /***/ }), 5996 5997 /***/ 43: 5998 /***/ (function(module, exports) { 5999 6000 (function() { module.exports = window["wp"]["blob"]; }()); 6001 6002 /***/ }), 6003 6004 /***/ 44: 6005 /***/ (function(module, __webpack_exports__, __webpack_require__) { 6006 6007 "use strict"; 6008 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; }); 6009 function _objectWithoutPropertiesLoose(source, excluded) { 6010 if (source == null) return {}; 6011 var target = {}; 6012 var sourceKeys = Object.keys(source); 6013 var key, i; 6014 6015 for (i = 0; i < sourceKeys.length; i++) { 6016 key = sourceKeys[i]; 6017 if (excluded.indexOf(key) >= 0) continue; 6018 target[key] = source[key]; 6019 } 6020 6021 return target; 6022 } 6023 6024 /***/ }), 6025 6026 /***/ 456: 6027 /***/ (function(module, __webpack_exports__, __webpack_require__) { 6028 6029 "use strict"; 6030 // ESM COMPAT FLAG 6031 __webpack_require__.r(__webpack_exports__); 6032 6033 // EXPORTS 6034 __webpack_require__.d(__webpack_exports__, "getColorClassName", function() { return /* reexport */ getColorClassName; }); 6035 __webpack_require__.d(__webpack_exports__, "getColorObjectByAttributeValues", function() { return /* reexport */ utils_getColorObjectByAttributeValues; }); 6036 __webpack_require__.d(__webpack_exports__, "getColorObjectByColorValue", function() { return /* reexport */ utils_getColorObjectByColorValue; }); 6037 __webpack_require__.d(__webpack_exports__, "createCustomColorsHOC", function() { return /* reexport */ createCustomColorsHOC; }); 6038 __webpack_require__.d(__webpack_exports__, "withColors", function() { return /* reexport */ withColors; }); 6039 __webpack_require__.d(__webpack_exports__, "__experimentalUseColors", function() { return /* reexport */ __experimentalUseColors; }); 6040 __webpack_require__.d(__webpack_exports__, "__experimentalGetGradientClass", function() { return /* reexport */ __experimentalGetGradientClass; }); 6041 __webpack_require__.d(__webpack_exports__, "getGradientValueBySlug", function() { return /* reexport */ getGradientValueBySlug; }); 6042 __webpack_require__.d(__webpack_exports__, "__experimentalGetGradientObjectByGradientValue", function() { return /* reexport */ __experimentalGetGradientObjectByGradientValue; }); 6043 __webpack_require__.d(__webpack_exports__, "getGradientSlugByValue", function() { return /* reexport */ getGradientSlugByValue; }); 6044 __webpack_require__.d(__webpack_exports__, "__experimentalUseGradient", function() { return /* reexport */ __experimentalUseGradient; }); 6045 __webpack_require__.d(__webpack_exports__, "getFontSize", function() { return /* reexport */ utils_getFontSize; }); 6046 __webpack_require__.d(__webpack_exports__, "getFontSizeClass", function() { return /* reexport */ getFontSizeClass; }); 6047 __webpack_require__.d(__webpack_exports__, "getFontSizeObjectByValue", function() { return /* reexport */ getFontSizeObjectByValue; }); 6048 __webpack_require__.d(__webpack_exports__, "FontSizePicker", function() { return /* reexport */ font_size_picker; }); 6049 __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return /* reexport */ with_font_sizes; }); 6050 __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return /* reexport */ alignment_toolbar; }); 6051 __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return /* reexport */ autocomplete; }); 6052 __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return /* reexport */ block_alignment_toolbar; }); 6053 __webpack_require__.d(__webpack_exports__, "__experimentalBlockFullHeightAligmentToolbar", function() { return /* reexport */ block_full_height_alignment_toolbar; }); 6054 __webpack_require__.d(__webpack_exports__, "__experimentalBlockAlignmentMatrixToolbar", function() { return /* reexport */ block_alignment_matrix_toolbar; }); 6055 __webpack_require__.d(__webpack_exports__, "BlockBreadcrumb", function() { return /* reexport */ block_breadcrumb; }); 6056 __webpack_require__.d(__webpack_exports__, "BlockContextProvider", function() { return /* reexport */ BlockContextProvider; }); 6057 __webpack_require__.d(__webpack_exports__, "BlockControls", function() { return /* reexport */ block_controls; }); 6058 __webpack_require__.d(__webpack_exports__, "BlockColorsStyleSelector", function() { return /* reexport */ color_style_selector; }); 6059 __webpack_require__.d(__webpack_exports__, "BlockEdit", function() { return /* reexport */ block_edit_BlockEdit; }); 6060 __webpack_require__.d(__webpack_exports__, "useBlockEditContext", function() { return /* reexport */ useBlockEditContext; }); 6061 __webpack_require__.d(__webpack_exports__, "BlockFormatControls", function() { return /* reexport */ block_format_controls; }); 6062 __webpack_require__.d(__webpack_exports__, "BlockIcon", function() { return /* reexport */ BlockIcon; }); 6063 __webpack_require__.d(__webpack_exports__, "BlockNavigationDropdown", function() { return /* reexport */ dropdown; }); 6064 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationBlockFill", function() { return /* reexport */ block_slot_BlockNavigationBlockFill; }); 6065 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationEditor", function() { return /* reexport */ BlockNavigationEditor; }); 6066 __webpack_require__.d(__webpack_exports__, "__experimentalBlockNavigationTree", function() { return /* reexport */ BlockNavigationTree; }); 6067 __webpack_require__.d(__webpack_exports__, "__experimentalBlockVariationPicker", function() { return /* reexport */ block_variation_picker; }); 6068 __webpack_require__.d(__webpack_exports__, "__experimentalBlockVariationTransforms", function() { return /* reexport */ block_variation_transforms; }); 6069 __webpack_require__.d(__webpack_exports__, "BlockVerticalAlignmentToolbar", function() { return /* reexport */ block_vertical_alignment_toolbar; }); 6070 __webpack_require__.d(__webpack_exports__, "ButtonBlockerAppender", function() { return /* reexport */ button_block_appender; }); 6071 __webpack_require__.d(__webpack_exports__, "ColorPalette", function() { return /* reexport */ color_palette; }); 6072 __webpack_require__.d(__webpack_exports__, "ColorPaletteControl", function() { return /* reexport */ ColorPaletteControl; }); 6073 __webpack_require__.d(__webpack_exports__, "ContrastChecker", function() { return /* reexport */ contrast_checker; }); 6074 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPicker", function() { return /* reexport */ gradient_picker; }); 6075 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPickerControl", function() { return /* reexport */ GradientPickerControl; }); 6076 __webpack_require__.d(__webpack_exports__, "__experimentalGradientPickerPanel", function() { return /* reexport */ GradientPanel; }); 6077 __webpack_require__.d(__webpack_exports__, "__experimentalFontAppearanceControl", function() { return /* reexport */ FontAppearanceControl; }); 6078 __webpack_require__.d(__webpack_exports__, "__experimentalFontFamilyControl", function() { return /* reexport */ FontFamilyControl; }); 6079 __webpack_require__.d(__webpack_exports__, "__experimentalColorGradientControl", function() { return /* reexport */ control; }); 6080 __webpack_require__.d(__webpack_exports__, "__experimentalPanelColorGradientSettings", function() { return /* reexport */ panel_color_gradient_settings; }); 6081 __webpack_require__.d(__webpack_exports__, "__experimentalImageSizeControl", function() { return /* reexport */ ImageSizeControl; }); 6082 __webpack_require__.d(__webpack_exports__, "InnerBlocks", function() { return /* reexport */ inner_blocks; }); 6083 __webpack_require__.d(__webpack_exports__, "__experimentalUseInnerBlocksProps", function() { return /* reexport */ useInnerBlocksProps; }); 6084 __webpack_require__.d(__webpack_exports__, "InspectorAdvancedControls", function() { return /* reexport */ inspector_advanced_controls; }); 6085 __webpack_require__.d(__webpack_exports__, "InspectorControls", function() { return /* reexport */ inspector_controls; }); 6086 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControl", function() { return /* reexport */ link_control; }); 6087 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControlSearchInput", function() { return /* reexport */ search_input; }); 6088 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControlSearchResults", function() { return /* reexport */ LinkControlSearchResults; }); 6089 __webpack_require__.d(__webpack_exports__, "__experimentalLinkControlSearchItem", function() { return /* reexport */ search_item; }); 6090 __webpack_require__.d(__webpack_exports__, "LineHeightControl", function() { return /* reexport */ LineHeightControl; }); 6091 __webpack_require__.d(__webpack_exports__, "MediaReplaceFlow", function() { return /* reexport */ media_replace_flow; }); 6092 __webpack_require__.d(__webpack_exports__, "MediaPlaceholder", function() { return /* reexport */ media_placeholder; }); 6093 __webpack_require__.d(__webpack_exports__, "MediaUpload", function() { return /* reexport */ media_upload; }); 6094 __webpack_require__.d(__webpack_exports__, "MediaUploadCheck", function() { return /* reexport */ check; }); 6095 __webpack_require__.d(__webpack_exports__, "PanelColorSettings", function() { return /* reexport */ panel_color_settings; }); 6096 __webpack_require__.d(__webpack_exports__, "PlainText", function() { return /* reexport */ plain_text; }); 6097 __webpack_require__.d(__webpack_exports__, "__experimentalResponsiveBlockControl", function() { return /* reexport */ responsive_block_control; }); 6098 __webpack_require__.d(__webpack_exports__, "RichText", function() { return /* reexport */ rich_text; }); 6099 __webpack_require__.d(__webpack_exports__, "RichTextShortcut", function() { return /* reexport */ RichTextShortcut; }); 6100 __webpack_require__.d(__webpack_exports__, "RichTextToolbarButton", function() { return /* reexport */ RichTextToolbarButton; }); 6101 __webpack_require__.d(__webpack_exports__, "__unstableRichTextInputEvent", function() { return /* reexport */ input_event_unstableRichTextInputEvent; }); 6102 __webpack_require__.d(__webpack_exports__, "ToolSelector", function() { return /* reexport */ tool_selector; }); 6103 __webpack_require__.d(__webpack_exports__, "__experimentalUnitControl", function() { return /* reexport */ UnitControl; }); 6104 __webpack_require__.d(__webpack_exports__, "URLInput", function() { return /* reexport */ url_input; }); 6105 __webpack_require__.d(__webpack_exports__, "URLInputButton", function() { return /* reexport */ url_input_button; }); 6106 __webpack_require__.d(__webpack_exports__, "URLPopover", function() { return /* reexport */ url_popover; }); 6107 __webpack_require__.d(__webpack_exports__, "__experimentalImageURLInputUI", function() { return /* reexport */ image_url_input_ui_ImageURLInputUI; }); 6108 __webpack_require__.d(__webpack_exports__, "withColorContext", function() { return /* reexport */ with_color_context; }); 6109 __webpack_require__.d(__webpack_exports__, "__experimentalBlockSettingsMenuFirstItem", function() { return /* reexport */ block_settings_menu_first_item; }); 6110 __webpack_require__.d(__webpack_exports__, "__experimentalInserterMenuExtension", function() { return /* reexport */ inserter_menu_extension; }); 6111 __webpack_require__.d(__webpack_exports__, "__experimentalPreviewOptions", function() { return /* reexport */ PreviewOptions; }); 6112 __webpack_require__.d(__webpack_exports__, "__experimentalUseResizeCanvas", function() { return /* reexport */ useResizeCanvas; }); 6113 __webpack_require__.d(__webpack_exports__, "BlockInspector", function() { return /* reexport */ block_inspector; }); 6114 __webpack_require__.d(__webpack_exports__, "BlockList", function() { return /* reexport */ BlockList; }); 6115 __webpack_require__.d(__webpack_exports__, "useBlockProps", function() { return /* reexport */ useBlockProps; }); 6116 __webpack_require__.d(__webpack_exports__, "__experimentalBlock", function() { return /* reexport */ block_wrapper_Block; }); 6117 __webpack_require__.d(__webpack_exports__, "BlockMover", function() { return /* reexport */ block_mover; }); 6118 __webpack_require__.d(__webpack_exports__, "BlockPreview", function() { return /* reexport */ block_preview; }); 6119 __webpack_require__.d(__webpack_exports__, "BlockSelectionClearer", function() { return /* reexport */ BlockSelectionClearer; }); 6120 __webpack_require__.d(__webpack_exports__, "__unstableUseBlockSelectionClearer", function() { return /* reexport */ useBlockSelectionClearer; }); 6121 __webpack_require__.d(__webpack_exports__, "BlockSettingsMenu", function() { return /* reexport */ block_settings_menu; }); 6122 __webpack_require__.d(__webpack_exports__, "BlockSettingsMenuControls", function() { return /* reexport */ block_settings_menu_controls; }); 6123 __webpack_require__.d(__webpack_exports__, "BlockTitle", function() { return /* reexport */ BlockTitle; }); 6124 __webpack_require__.d(__webpack_exports__, "BlockToolbar", function() { return /* reexport */ BlockToolbar; }); 6125 __webpack_require__.d(__webpack_exports__, "CopyHandler", function() { return /* reexport */ copy_handler; }); 6126 __webpack_require__.d(__webpack_exports__, "__unstableUseClipboardHandler", function() { return /* reexport */ useClipboardHandler; }); 6127 __webpack_require__.d(__webpack_exports__, "DefaultBlockAppender", function() { return /* reexport */ default_block_appender; }); 6128 __webpack_require__.d(__webpack_exports__, "__unstableUseEditorStyles", function() { return /* reexport */ useEditorStyles; }); 6129 __webpack_require__.d(__webpack_exports__, "Inserter", function() { return /* reexport */ inserter; }); 6130 __webpack_require__.d(__webpack_exports__, "__experimentalLibrary", function() { return /* reexport */ library; }); 6131 __webpack_require__.d(__webpack_exports__, "__experimentalSearchForm", function() { return /* reexport */ search_form; }); 6132 __webpack_require__.d(__webpack_exports__, "BlockEditorKeyboardShortcuts", function() { return /* reexport */ keyboard_shortcuts; }); 6133 __webpack_require__.d(__webpack_exports__, "MultiSelectScrollIntoView", function() { return /* reexport */ MultiSelectScrollIntoView; }); 6134 __webpack_require__.d(__webpack_exports__, "__unstableUseScrollMultiSelectionIntoView", function() { return /* reexport */ useScrollMultiSelectionIntoView; }); 6135 __webpack_require__.d(__webpack_exports__, "NavigableToolbar", function() { return /* reexport */ navigable_toolbar; }); 6136 __webpack_require__.d(__webpack_exports__, "ObserveTyping", function() { return /* reexport */ observe_typing; }); 6137 __webpack_require__.d(__webpack_exports__, "__unstableUseTypingObserver", function() { return /* reexport */ useTypingObserver; }); 6138 __webpack_require__.d(__webpack_exports__, "__unstableUseMouseMoveTypingReset", function() { return /* reexport */ useMouseMoveTypingReset; }); 6139 __webpack_require__.d(__webpack_exports__, "PreserveScrollInReorder", function() { return /* reexport */ PreserveScrollInReorder; }); 6140 __webpack_require__.d(__webpack_exports__, "SkipToSelectedBlock", function() { return /* reexport */ skip_to_selected_block; }); 6141 __webpack_require__.d(__webpack_exports__, "Typewriter", function() { return /* reexport */ typewriter; }); 6142 __webpack_require__.d(__webpack_exports__, "__unstableUseTypewriter", function() { return /* reexport */ useTypewriter; }); 6143 __webpack_require__.d(__webpack_exports__, "Warning", function() { return /* reexport */ warning; }); 6144 __webpack_require__.d(__webpack_exports__, "WritingFlow", function() { return /* reexport */ WritingFlow; }); 6145 __webpack_require__.d(__webpack_exports__, "__unstableUseCanvasClickRedirect", function() { return /* reexport */ useCanvasClickRedirect; }); 6146 __webpack_require__.d(__webpack_exports__, "useBlockDisplayInformation", function() { return /* reexport */ useBlockDisplayInformation; }); 6147 __webpack_require__.d(__webpack_exports__, "__unstableIframe", function() { return /* reexport */ iframe; }); 6148 __webpack_require__.d(__webpack_exports__, "__experimentalUseNoRecursiveRenders", function() { return /* reexport */ useNoRecursiveRenders; }); 6149 __webpack_require__.d(__webpack_exports__, "BlockEditorProvider", function() { return /* reexport */ provider; }); 6150 __webpack_require__.d(__webpack_exports__, "__experimentalUseSimulatedMediaQuery", function() { return /* reexport */ useSimulatedMediaQuery; }); 6151 __webpack_require__.d(__webpack_exports__, "__experimentalUseEditorFeature", function() { return /* reexport */ useEditorFeature; }); 6152 __webpack_require__.d(__webpack_exports__, "transformStyles", function() { return /* reexport */ transform_styles; }); 6153 __webpack_require__.d(__webpack_exports__, "validateThemeColors", function() { return /* reexport */ validateThemeColors; }); 6154 __webpack_require__.d(__webpack_exports__, "validateThemeGradients", function() { return /* reexport */ validateThemeGradients; }); 6155 __webpack_require__.d(__webpack_exports__, "__experimentalGetMatchingVariation", function() { return /* reexport */ block_variation_transforms_experimentalGetMatchingVariation; }); 6156 __webpack_require__.d(__webpack_exports__, "storeConfig", function() { return /* reexport */ storeConfig; }); 6157 __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; }); 6158 __webpack_require__.d(__webpack_exports__, "SETTINGS_DEFAULTS", function() { return /* reexport */ SETTINGS_DEFAULTS; }); 6159 6160 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-editor/build-module/store/selectors.js 6161 var selectors_namespaceObject = {}; 6162 __webpack_require__.r(selectors_namespaceObject); 6163 __webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return selectors_getBlockName; }); 6164 __webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return selectors_isBlockValid; }); 6165 __webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return selectors_getBlockAttributes; }); 6166 __webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; }); 6167 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return selectors_unstableGetBlockWithoutInnerBlocks; }); 6168 __webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; }); 6169 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithBlockTree", function() { return __unstableGetBlockWithBlockTree; }); 6170 __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockTree", function() { return __unstableGetBlockTree; }); 6171 __webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return selectors_getClientIdsOfDescendants; }); 6172 __webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; }); 6173 __webpack_require__.d(selectors_namespaceObject, "getGlobalBlockCount", function() { return getGlobalBlockCount; }); 6174 __webpack_require__.d(selectors_namespaceObject, "getBlocksByClientId", function() { return selectors_getBlocksByClientId; }); 6175 __webpack_require__.d(selectors_namespaceObject, "getBlockCount", function() { return selectors_getBlockCount; }); 6176 __webpack_require__.d(selectors_namespaceObject, "getSelectionStart", function() { return selectors_getSelectionStart; }); 6177 __webpack_require__.d(selectors_namespaceObject, "getSelectionEnd", function() { return selectors_getSelectionEnd; }); 6178 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionStart", function() { return selectors_getBlockSelectionStart; }); 6179 __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionEnd", function() { return getBlockSelectionEnd; }); 6180 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockCount", function() { return selectors_getSelectedBlockCount; }); 6181 __webpack_require__.d(selectors_namespaceObject, "hasSelectedBlock", function() { return selectors_hasSelectedBlock; }); 6182 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientId", function() { return selectors_getSelectedBlockClientId; }); 6183 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlock", function() { return getSelectedBlock; }); 6184 __webpack_require__.d(selectors_namespaceObject, "getBlockRootClientId", function() { return selectors_getBlockRootClientId; }); 6185 __webpack_require__.d(selectors_namespaceObject, "getBlockParents", function() { return selectors_getBlockParents; }); 6186 __webpack_require__.d(selectors_namespaceObject, "getBlockParentsByBlockName", function() { return getBlockParentsByBlockName; }); 6187 __webpack_require__.d(selectors_namespaceObject, "getBlockHierarchyRootClientId", function() { return getBlockHierarchyRootClientId; }); 6188 __webpack_require__.d(selectors_namespaceObject, "getLowestCommonAncestorWithSelectedBlock", function() { return getLowestCommonAncestorWithSelectedBlock; }); 6189 __webpack_require__.d(selectors_namespaceObject, "getAdjacentBlockClientId", function() { return getAdjacentBlockClientId; }); 6190 __webpack_require__.d(selectors_namespaceObject, "getPreviousBlockClientId", function() { return selectors_getPreviousBlockClientId; }); 6191 __webpack_require__.d(selectors_namespaceObject, "getNextBlockClientId", function() { return selectors_getNextBlockClientId; }); 6192 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlocksInitialCaretPosition", function() { return getSelectedBlocksInitialCaretPosition; }); 6193 __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientIds", function() { return selectors_getSelectedBlockClientIds; }); 6194 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlockClientIds", function() { return selectors_getMultiSelectedBlockClientIds; }); 6195 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocks", function() { return getMultiSelectedBlocks; }); 6196 __webpack_require__.d(selectors_namespaceObject, "getFirstMultiSelectedBlockClientId", function() { return selectors_getFirstMultiSelectedBlockClientId; }); 6197 __webpack_require__.d(selectors_namespaceObject, "getLastMultiSelectedBlockClientId", function() { return selectors_getLastMultiSelectedBlockClientId; }); 6198 __webpack_require__.d(selectors_namespaceObject, "isFirstMultiSelectedBlock", function() { return isFirstMultiSelectedBlock; }); 6199 __webpack_require__.d(selectors_namespaceObject, "isBlockMultiSelected", function() { return isBlockMultiSelected; }); 6200 __webpack_require__.d(selectors_namespaceObject, "isAncestorMultiSelected", function() { return isAncestorMultiSelected; }); 6201 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksStartClientId", function() { return selectors_getMultiSelectedBlocksStartClientId; }); 6202 __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksEndClientId", function() { return selectors_getMultiSelectedBlocksEndClientId; }); 6203 __webpack_require__.d(selectors_namespaceObject, "getBlockOrder", function() { return selectors_getBlockOrder; }); 6204 __webpack_require__.d(selectors_namespaceObject, "getBlockIndex", function() { return selectors_getBlockIndex; }); 6205 __webpack_require__.d(selectors_namespaceObject, "isBlockSelected", function() { return selectors_isBlockSelected; }); 6206 __webpack_require__.d(selectors_namespaceObject, "hasSelectedInnerBlock", function() { return hasSelectedInnerBlock; }); 6207 __webpack_require__.d(selectors_namespaceObject, "isBlockWithinSelection", function() { return isBlockWithinSelection; }); 6208 __webpack_require__.d(selectors_namespaceObject, "hasMultiSelection", function() { return selectors_hasMultiSelection; }); 6209 __webpack_require__.d(selectors_namespaceObject, "isMultiSelecting", function() { return selectors_isMultiSelecting; }); 6210 __webpack_require__.d(selectors_namespaceObject, "isSelectionEnabled", function() { return selectors_isSelectionEnabled; }); 6211 __webpack_require__.d(selectors_namespaceObject, "getBlockMode", function() { return selectors_getBlockMode; }); 6212 __webpack_require__.d(selectors_namespaceObject, "isTyping", function() { return selectors_isTyping; }); 6213 __webpack_require__.d(selectors_namespaceObject, "isDraggingBlocks", function() { return isDraggingBlocks; }); 6214 __webpack_require__.d(selectors_namespaceObject, "getDraggedBlockClientIds", function() { return selectors_getDraggedBlockClientIds; }); 6215 __webpack_require__.d(selectors_namespaceObject, "isBlockBeingDragged", function() { return isBlockBeingDragged; }); 6216 __webpack_require__.d(selectors_namespaceObject, "isAncestorBeingDragged", function() { return isAncestorBeingDragged; }); 6217 __webpack_require__.d(selectors_namespaceObject, "isCaretWithinFormattedText", function() { return selectors_isCaretWithinFormattedText; }); 6218 __webpack_require__.d(selectors_namespaceObject, "getBlockInsertionPoint", function() { return getBlockInsertionPoint; }); 6219 __webpack_require__.d(selectors_namespaceObject, "isBlockInsertionPointVisible", function() { return isBlockInsertionPointVisible; }); 6220 __webpack_require__.d(selectors_namespaceObject, "isValidTemplate", function() { return selectors_isValidTemplate; }); 6221 __webpack_require__.d(selectors_namespaceObject, "getTemplate", function() { return getTemplate; }); 6222 __webpack_require__.d(selectors_namespaceObject, "getTemplateLock", function() { return selectors_getTemplateLock; }); 6223 __webpack_require__.d(selectors_namespaceObject, "canInsertBlockType", function() { return selectors_canInsertBlockType; }); 6224 __webpack_require__.d(selectors_namespaceObject, "canInsertBlocks", function() { return selectors_canInsertBlocks; }); 6225 __webpack_require__.d(selectors_namespaceObject, "getInserterItems", function() { return selectors_getInserterItems; }); 6226 __webpack_require__.d(selectors_namespaceObject, "getBlockTransformItems", function() { return selectors_getBlockTransformItems; }); 6227 __webpack_require__.d(selectors_namespaceObject, "hasInserterItems", function() { return selectors_hasInserterItems; }); 6228 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAllowedBlocks", function() { return selectors_experimentalGetAllowedBlocks; }); 6229 __webpack_require__.d(selectors_namespaceObject, "getBlockListSettings", function() { return selectors_getBlockListSettings; }); 6230 __webpack_require__.d(selectors_namespaceObject, "getSettings", function() { return selectors_getSettings; }); 6231 __webpack_require__.d(selectors_namespaceObject, "isLastBlockChangePersistent", function() { return isLastBlockChangePersistent; }); 6232 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetBlockListSettingsForBlocks", function() { return selectors_experimentalGetBlockListSettingsForBlocks; }); 6233 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetParsedReusableBlock", function() { return __experimentalGetParsedReusableBlock; }); 6234 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetReusableBlockTitle", function() { return selectors_experimentalGetReusableBlockTitle; }); 6235 __webpack_require__.d(selectors_namespaceObject, "__unstableIsLastBlockChangeIgnored", function() { return __unstableIsLastBlockChangeIgnored; }); 6236 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetLastBlockAttributeChanges", function() { return __experimentalGetLastBlockAttributeChanges; }); 6237 __webpack_require__.d(selectors_namespaceObject, "isNavigationMode", function() { return selectors_isNavigationMode; }); 6238 __webpack_require__.d(selectors_namespaceObject, "hasBlockMovingClientId", function() { return selectors_hasBlockMovingClientId; }); 6239 __webpack_require__.d(selectors_namespaceObject, "didAutomaticChange", function() { return selectors_didAutomaticChange; }); 6240 __webpack_require__.d(selectors_namespaceObject, "isBlockHighlighted", function() { return isBlockHighlighted; }); 6241 __webpack_require__.d(selectors_namespaceObject, "areInnerBlocksControlled", function() { return areInnerBlocksControlled; }); 6242 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetActiveBlockIdByBlockNames", function() { return __experimentalGetActiveBlockIdByBlockNames; }); 6243 6244 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-editor/build-module/store/actions.js 6245 var actions_namespaceObject = {}; 6246 __webpack_require__.r(actions_namespaceObject); 6247 __webpack_require__.d(actions_namespaceObject, "resetBlocks", function() { return actions_resetBlocks; }); 6248 __webpack_require__.d(actions_namespaceObject, "validateBlocksToTemplate", function() { return validateBlocksToTemplate; }); 6249 __webpack_require__.d(actions_namespaceObject, "resetSelection", function() { return actions_resetSelection; }); 6250 __webpack_require__.d(actions_namespaceObject, "receiveBlocks", function() { return receiveBlocks; }); 6251 __webpack_require__.d(actions_namespaceObject, "updateBlockAttributes", function() { return actions_updateBlockAttributes; }); 6252 __webpack_require__.d(actions_namespaceObject, "updateBlock", function() { return actions_updateBlock; }); 6253 __webpack_require__.d(actions_namespaceObject, "selectBlock", function() { return actions_selectBlock; }); 6254 __webpack_require__.d(actions_namespaceObject, "selectPreviousBlock", function() { return selectPreviousBlock; }); 6255 __webpack_require__.d(actions_namespaceObject, "selectNextBlock", function() { return selectNextBlock; }); 6256 __webpack_require__.d(actions_namespaceObject, "startMultiSelect", function() { return actions_startMultiSelect; }); 6257 __webpack_require__.d(actions_namespaceObject, "stopMultiSelect", function() { return actions_stopMultiSelect; }); 6258 __webpack_require__.d(actions_namespaceObject, "multiSelect", function() { return actions_multiSelect; }); 6259 __webpack_require__.d(actions_namespaceObject, "clearSelectedBlock", function() { return actions_clearSelectedBlock; }); 6260 __webpack_require__.d(actions_namespaceObject, "toggleSelection", function() { return actions_toggleSelection; }); 6261 __webpack_require__.d(actions_namespaceObject, "replaceBlocks", function() { return actions_replaceBlocks; }); 6262 __webpack_require__.d(actions_namespaceObject, "replaceBlock", function() { return replaceBlock; }); 6263 __webpack_require__.d(actions_namespaceObject, "moveBlocksDown", function() { return actions_moveBlocksDown; }); 6264 __webpack_require__.d(actions_namespaceObject, "moveBlocksUp", function() { return actions_moveBlocksUp; }); 6265 __webpack_require__.d(actions_namespaceObject, "moveBlocksToPosition", function() { return actions_moveBlocksToPosition; }); 6266 __webpack_require__.d(actions_namespaceObject, "moveBlockToPosition", function() { return actions_moveBlockToPosition; }); 6267 __webpack_require__.d(actions_namespaceObject, "insertBlock", function() { return actions_insertBlock; }); 6268 __webpack_require__.d(actions_namespaceObject, "insertBlocks", function() { return actions_insertBlocks; }); 6269 __webpack_require__.d(actions_namespaceObject, "__unstableSetInsertionPoint", function() { return actions_unstableSetInsertionPoint; }); 6270 __webpack_require__.d(actions_namespaceObject, "showInsertionPoint", function() { return actions_showInsertionPoint; }); 6271 __webpack_require__.d(actions_namespaceObject, "hideInsertionPoint", function() { return actions_hideInsertionPoint; }); 6272 __webpack_require__.d(actions_namespaceObject, "setTemplateValidity", function() { return setTemplateValidity; }); 6273 __webpack_require__.d(actions_namespaceObject, "synchronizeTemplate", function() { return synchronizeTemplate; }); 6274 __webpack_require__.d(actions_namespaceObject, "mergeBlocks", function() { return actions_mergeBlocks; }); 6275 __webpack_require__.d(actions_namespaceObject, "removeBlocks", function() { return actions_removeBlocks; }); 6276 __webpack_require__.d(actions_namespaceObject, "removeBlock", function() { return actions_removeBlock; }); 6277 __webpack_require__.d(actions_namespaceObject, "replaceInnerBlocks", function() { return actions_replaceInnerBlocks; }); 6278 __webpack_require__.d(actions_namespaceObject, "toggleBlockMode", function() { return toggleBlockMode; }); 6279 __webpack_require__.d(actions_namespaceObject, "startTyping", function() { return actions_startTyping; }); 6280 __webpack_require__.d(actions_namespaceObject, "stopTyping", function() { return actions_stopTyping; }); 6281 __webpack_require__.d(actions_namespaceObject, "startDraggingBlocks", function() { return actions_startDraggingBlocks; }); 6282 __webpack_require__.d(actions_namespaceObject, "stopDraggingBlocks", function() { return actions_stopDraggingBlocks; }); 6283 __webpack_require__.d(actions_namespaceObject, "enterFormattedText", function() { return actions_enterFormattedText; }); 6284 __webpack_require__.d(actions_namespaceObject, "exitFormattedText", function() { return actions_exitFormattedText; }); 6285 __webpack_require__.d(actions_namespaceObject, "selectionChange", function() { return actions_selectionChange; }); 6286 __webpack_require__.d(actions_namespaceObject, "insertDefaultBlock", function() { return actions_insertDefaultBlock; }); 6287 __webpack_require__.d(actions_namespaceObject, "updateBlockListSettings", function() { return actions_updateBlockListSettings; }); 6288 __webpack_require__.d(actions_namespaceObject, "updateSettings", function() { return actions_updateSettings; }); 6289 __webpack_require__.d(actions_namespaceObject, "__unstableSaveReusableBlock", function() { return __unstableSaveReusableBlock; }); 6290 __webpack_require__.d(actions_namespaceObject, "__unstableMarkLastChangeAsPersistent", function() { return actions_unstableMarkLastChangeAsPersistent; }); 6291 __webpack_require__.d(actions_namespaceObject, "__unstableMarkNextChangeAsNotPersistent", function() { return actions_unstableMarkNextChangeAsNotPersistent; }); 6292 __webpack_require__.d(actions_namespaceObject, "__unstableMarkAutomaticChange", function() { return actions_unstableMarkAutomaticChange; }); 6293 __webpack_require__.d(actions_namespaceObject, "__unstableMarkAutomaticChangeFinal", function() { return __unstableMarkAutomaticChangeFinal; }); 6294 __webpack_require__.d(actions_namespaceObject, "setNavigationMode", function() { return actions_setNavigationMode; }); 6295 __webpack_require__.d(actions_namespaceObject, "setBlockMovingClientId", function() { return actions_setBlockMovingClientId; }); 6296 __webpack_require__.d(actions_namespaceObject, "duplicateBlocks", function() { return actions_duplicateBlocks; }); 6297 __webpack_require__.d(actions_namespaceObject, "insertBeforeBlock", function() { return actions_insertBeforeBlock; }); 6298 __webpack_require__.d(actions_namespaceObject, "insertAfterBlock", function() { return actions_insertAfterBlock; }); 6299 __webpack_require__.d(actions_namespaceObject, "toggleBlockHighlight", function() { return actions_toggleBlockHighlight; }); 6300 __webpack_require__.d(actions_namespaceObject, "flashBlock", function() { return actions_flashBlock; }); 6301 __webpack_require__.d(actions_namespaceObject, "setHasControlledInnerBlocks", function() { return actions_setHasControlledInnerBlocks; }); 6302 6303 // EXTERNAL MODULE: external ["wp","richText"] 6304 var external_wp_richText_ = __webpack_require__(21); 6305 6306 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js 6307 var esm_extends = __webpack_require__(8); 6308 6309 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js 6310 var defineProperty = __webpack_require__(5); 6311 6312 // EXTERNAL MODULE: external ["wp","element"] 6313 var external_wp_element_ = __webpack_require__(0); 6314 6315 // EXTERNAL MODULE: ./node_modules/classnames/index.js 6316 var classnames = __webpack_require__(10); 6317 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); 6318 6319 // EXTERNAL MODULE: external "lodash" 6320 var external_lodash_ = __webpack_require__(2); 6321 6322 // EXTERNAL MODULE: external ["wp","compose"] 6323 var external_wp_compose_ = __webpack_require__(12); 6324 6325 // EXTERNAL MODULE: external ["wp","hooks"] 6326 var external_wp_hooks_ = __webpack_require__(33); 6327 6328 // EXTERNAL MODULE: external ["wp","blocks"] 6329 var external_wp_blocks_ = __webpack_require__(9); 6330 6331 // EXTERNAL MODULE: external ["wp","data"] 6332 var external_wp_data_ = __webpack_require__(4); 6333 6334 // EXTERNAL MODULE: external ["wp","components"] 6335 var external_wp_components_ = __webpack_require__(3); 6336 6337 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/context.js 6338 /** 6339 * External dependencies 6340 */ 6341 6342 /** 6343 * WordPress dependencies 6344 */ 6345 6346 6347 var Context = Object(external_wp_element_["createContext"])({ 6348 name: '', 6349 isSelected: false, 6350 focusedElement: null, 6351 setFocusedElement: external_lodash_["noop"], 6352 clientId: null 6353 }); 6354 var context_Provider = Context.Provider; 6355 6356 /** 6357 * A hook that returns the block edit context. 6358 * 6359 * @return {Object} Block edit context 6360 */ 6361 6362 function useBlockEditContext() { 6363 return Object(external_wp_element_["useContext"])(Context); 6364 } 6365 6366 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-display-block-controls/index.js 6367 /** 6368 * WordPress dependencies 6369 */ 6370 6371 /** 6372 * Internal dependencies 6373 */ 6374 6375 6376 function useDisplayBlockControls() { 6377 var _useBlockEditContext = useBlockEditContext(), 6378 isSelected = _useBlockEditContext.isSelected, 6379 clientId = _useBlockEditContext.clientId, 6380 name = _useBlockEditContext.name; 6381 6382 var isFirstAndSameTypeMultiSelected = Object(external_wp_data_["useSelect"])(function (select) { 6383 // Don't bother checking, see OR statement below. 6384 if (isSelected) { 6385 return; 6386 } 6387 6388 var _select = select('core/block-editor'), 6389 getBlockName = _select.getBlockName, 6390 isFirstMultiSelectedBlock = _select.isFirstMultiSelectedBlock, 6391 getMultiSelectedBlockClientIds = _select.getMultiSelectedBlockClientIds; 6392 6393 if (!isFirstMultiSelectedBlock(clientId)) { 6394 return false; 6395 } 6396 6397 return getMultiSelectedBlockClientIds().every(function (id) { 6398 return getBlockName(id) === name; 6399 }); 6400 }, [clientId, isSelected, name]); 6401 return isSelected || isFirstAndSameTypeMultiSelected; 6402 } 6403 6404 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-controls/index.js 6405 6406 6407 6408 /** 6409 * External dependencies 6410 */ 6411 6412 /** 6413 * WordPress dependencies 6414 */ 6415 6416 6417 6418 /** 6419 * Internal dependencies 6420 */ 6421 6422 6423 6424 var _createSlotFill = Object(external_wp_components_["createSlotFill"])('BlockControls'), 6425 Fill = _createSlotFill.Fill, 6426 Slot = _createSlotFill.Slot; 6427 6428 function BlockControlsSlot(props) { 6429 var accessibleToolbarState = Object(external_wp_element_["useContext"])(external_wp_components_["__experimentalToolbarContext"]); 6430 return Object(external_wp_element_["createElement"])(Slot, Object(esm_extends["a" /* default */])({}, props, { 6431 fillProps: accessibleToolbarState 6432 })); 6433 } 6434 6435 function BlockControlsFill(_ref) { 6436 var controls = _ref.controls, 6437 children = _ref.children; 6438 6439 if (!useDisplayBlockControls()) { 6440 return null; 6441 } 6442 6443 return Object(external_wp_element_["createElement"])(Fill, null, function (fillProps) { 6444 // Children passed to BlockControlsFill will not have access to any 6445 // React Context whose Provider is part of the BlockControlsSlot tree. 6446 // So we re-create the Provider in this subtree. 6447 var value = !Object(external_lodash_["isEmpty"])(fillProps) ? fillProps : null; 6448 return Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToolbarContext"].Provider, { 6449 value: value 6450 }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], { 6451 controls: controls 6452 }), children); 6453 }); 6454 } 6455 6456 var BlockControls = BlockControlsFill; 6457 BlockControls.Slot = BlockControlsSlot; 6458 /* harmony default export */ var block_controls = (BlockControls); 6459 6460 // EXTERNAL MODULE: external ["wp","i18n"] 6461 var external_wp_i18n_ = __webpack_require__(1); 6462 6463 // EXTERNAL MODULE: external ["wp","primitives"] 6464 var external_wp_primitives_ = __webpack_require__(7); 6465 6466 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-left.js 6467 6468 6469 /** 6470 * WordPress dependencies 6471 */ 6472 6473 var positionLeft = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { 6474 xmlns: "http://www.w3.org/2000/svg", 6475 viewBox: "0 0 24 24" 6476 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { 6477 d: "M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z" 6478 })); 6479 /* harmony default export */ var position_left = (positionLeft); 6480 6481 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-center.js 6482 6483 6484 /** 6485 * WordPress dependencies 6486 */ 6487 6488 var positionCenter = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { 6489 xmlns: "http://www.w3.org/2000/svg", 6490 viewBox: "0 0 24 24" 6491 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { 6492 d: "M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z" 6493 })); 6494 /* harmony default export */ var position_center = (positionCenter); 6495 6496 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-right.js 6497 6498 6499 /** 6500 * WordPress dependencies 6501 */ 6502 6503 var positionRight = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { 6504 xmlns: "http://www.w3.org/2000/svg", 6505 viewBox: "0 0 24 24" 6506 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { 6507 d: "M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z" 6508 })); 6509 /* harmony default export */ var position_right = (positionRight); 6510 6511 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stretch-wide.js 6512 6513 6514 /** 6515 * WordPress dependencies 6516 */ 6517 6518 var stretchWide = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { 6519 xmlns: "http://www.w3.org/2000/svg", 6520 viewBox: "0 0 24 24" 6521 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { 6522 d: "M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z" 6523 })); 6524 /* harmony default export */ var stretch_wide = (stretchWide); 6525 6526 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stretch-full-width.js 6527 6528 6529 /** 6530 * WordPress dependencies 6531 */ 6532 6533 var stretchFullWidth = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { 6534 xmlns: "http://www.w3.org/2000/svg", 6535 viewBox: "0 0 24 24" 6536 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { 6537 d: "M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z" 6538 })); 6539 /* harmony default export */ var stretch_full_width = (stretchFullWidth); 6540 6541 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inner-blocks/layout.js 6542 /** 6543 * WordPress dependencies 6544 */ 6545 6546 var defaultLayout = { 6547 type: 'default' 6548 }; 6549 var Layout = Object(external_wp_element_["createContext"])(defaultLayout); 6550 /** 6551 * Allows to define the layout. 6552 */ 6553 6554 var LayoutProvider = Layout.Provider; 6555 /** 6556 * React hook used to retrieve the layout config. 6557 */ 6558 6559 function useLayout() { 6560 return Object(external_wp_element_["useContext"])(Layout); 6561 } 6562 6563 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-alignment-toolbar/index.js 6564 6565 6566 6567 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; } 6568 6569 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; } 6570 6571 /** 6572 * WordPress dependencies 6573 */ 6574 6575 6576 6577 6578 /** 6579 * Internal dependencies 6580 */ 6581 6582 6583 var BLOCK_ALIGNMENTS_CONTROLS = { 6584 left: { 6585 icon: position_left, 6586 title: Object(external_wp_i18n_["__"])('Align left') 6587 }, 6588 center: { 6589 icon: position_center, 6590 title: Object(external_wp_i18n_["__"])('Align center') 6591 }, 6592 right: { 6593 icon: position_right, 6594 title: Object(external_wp_i18n_["__"])('Align right') 6595 }, 6596 wide: { 6597 icon: stretch_wide, 6598 title: Object(external_wp_i18n_["__"])('Wide width') 6599 }, 6600 full: { 6601 icon: stretch_full_width, 6602 title: Object(external_wp_i18n_["__"])('Full width') 6603 } 6604 }; 6605 var DEFAULT_CONTROLS = ['left', 'center', 'right', 'wide', 'full']; 6606 var DEFAULT_CONTROL = 'center'; 6607 var WIDE_CONTROLS = ['wide', 'full']; 6608 var block_alignment_toolbar_POPOVER_PROPS = { 6609 isAlternate: true 6610 }; 6611 function BlockAlignmentToolbar(_ref) { 6612 var value = _ref.value, 6613 onChange = _ref.onChange, 6614 _ref$controls = _ref.controls, 6615 controls = _ref$controls === void 0 ? DEFAULT_CONTROLS : _ref$controls, 6616 _ref$isCollapsed = _ref.isCollapsed, 6617 isCollapsed = _ref$isCollapsed === void 0 ? true : _ref$isCollapsed; 6618 6619 var _useSelect = Object(external_wp_data_["useSelect"])(function (select) { 6620 var _select = select('core/block-editor'), 6621 getSettings = _select.getSettings; 6622 6623 var settings = getSettings(); 6624 return { 6625 wideControlsEnabled: settings.alignWide 6626 }; 6627 }), 6628 _useSelect$wideContro = _useSelect.wideControlsEnabled, 6629 wideControlsEnabled = _useSelect$wideContro === void 0 ? false : _useSelect$wideContro; 6630 6631 var layout = useLayout(); 6632 var supportsAlignments = layout.type === 'default'; 6633 6634 if (!supportsAlignments) { 6635 return null; 6636 } 6637 6638 var _layout$alignments = layout.alignments, 6639 availableAlignments = _layout$alignments === void 0 ? DEFAULT_CONTROLS : _layout$alignments; 6640 var enabledControls = controls.filter(function (control) { 6641 return (wideControlsEnabled || !WIDE_CONTROLS.includes(control)) && availableAlignments.includes(control); 6642 }); 6643 6644 if (enabledControls.length === 0) { 6645 return null; 6646 } 6647 6648 function applyOrUnset(align) { 6649 return function () { 6650 return onChange(value === align ? undefined : align); 6651 }; 6652 } 6653 6654 var activeAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[value]; 6655 var defaultAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[DEFAULT_CONTROL]; 6656 return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], { 6657 popoverProps: block_alignment_toolbar_POPOVER_PROPS, 6658 isCollapsed: isCollapsed, 6659 icon: activeAlignmentControl ? activeAlignmentControl.icon : defaultAlignmentControl.icon, 6660 label: Object(external_wp_i18n_["__"])('Align'), 6661 toggleProps: { 6662 describedBy: Object(external_wp_i18n_["__"])('Change alignment') 6663 }, 6664 controls: enabledControls.map(function (control) { 6665 return _objectSpread(_objectSpread({}, BLOCK_ALIGNMENTS_CONTROLS[control]), {}, { 6666 isActive: value === control, 6667 role: isCollapsed ? 'menuitemradio' : undefined, 6668 onClick: applyOrUnset(control) 6669 }); 6670 }) 6671 }); 6672 } 6673 /* harmony default export */ var block_alignment_toolbar = (BlockAlignmentToolbar); 6674 6675 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/align.js 6676 6677 6678 6679 6680 function align_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; } 6681 6682 function align_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { align_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 { align_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 6683 6684 /** 6685 * External dependencies 6686 */ 6687 6688 6689 /** 6690 * WordPress dependencies 6691 */ 6692 6693 6694 6695 6696 6697 /** 6698 * Internal dependencies 6699 */ 6700 6701 6702 /** 6703 * An array which includes all possible valid alignments, 6704 * used to validate if an alignment is valid or not. 6705 * 6706 * @constant 6707 * @type {string[]} 6708 */ 6709 6710 var ALL_ALIGNMENTS = ['left', 'center', 'right', 'wide', 'full']; 6711 /** 6712 * An array which includes all wide alignments. 6713 * In order for this alignments to be valid they need to be supported by the block, 6714 * and by the theme. 6715 * 6716 * @constant 6717 * @type {string[]} 6718 */ 6719 6720 var WIDE_ALIGNMENTS = ['wide', 'full']; 6721 /** 6722 * Returns the valid alignments. 6723 * Takes into consideration the aligns supported by a block, if the block supports wide controls or not and if theme supports wide controls or not. 6724 * Exported just for testing purposes, not exported outside the module. 6725 * 6726 * @param {?boolean|string[]} blockAlign Aligns supported by the block. 6727 * @param {?boolean} hasWideBlockSupport True if block supports wide alignments. And False otherwise. 6728 * @param {?boolean} hasWideEnabled True if theme supports wide alignments. And False otherwise. 6729 * 6730 * @return {string[]} Valid alignments. 6731 */ 6732 6733 function getValidAlignments(blockAlign) { 6734 var hasWideBlockSupport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 6735 var hasWideEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; 6736 var validAlignments; 6737 6738 if (Array.isArray(blockAlign)) { 6739 validAlignments = ALL_ALIGNMENTS.filter(function (value) { 6740 return blockAlign.includes(value); 6741 }); 6742 } else if (blockAlign === true) { 6743 // `true` includes all alignments... 6744 validAlignments = ALL_ALIGNMENTS; 6745 } else { 6746 validAlignments = []; 6747 } 6748 6749 if (!hasWideEnabled || blockAlign === true && !hasWideBlockSupport) { 6750 return external_lodash_["without"].apply(void 0, [validAlignments].concat(WIDE_ALIGNMENTS)); 6751 } 6752 6753 return validAlignments; 6754 } 6755 /** 6756 * Filters registered block settings, extending attributes to include `align`. 6757 * 6758 * @param {Object} settings Original block settings 6759 * @return {Object} Filtered block settings 6760 */ 6761 6762 function addAttribute(settings) { 6763 // allow blocks to specify their own attribute definition with default values if needed. 6764 if (Object(external_lodash_["has"])(settings.attributes, ['align', 'type'])) { 6765 return settings; 6766 } 6767 6768 if (Object(external_wp_blocks_["hasBlockSupport"])(settings, 'align')) { 6769 // Gracefully handle if settings.attributes is undefined. 6770 settings.attributes = align_objectSpread(align_objectSpread({}, settings.attributes), {}, { 6771 align: { 6772 type: 'string', 6773 // Allow for '' since it is used by updateAlignment function 6774 // in withToolbarControls for special cases with defined default values. 6775 enum: [].concat(ALL_ALIGNMENTS, ['']) 6776 } 6777 }); 6778 } 6779 6780 return settings; 6781 } 6782 /** 6783 * Override the default edit UI to include new toolbar controls for block 6784 * alignment, if block defines support. 6785 * 6786 * @param {Function} BlockEdit Original component 6787 * @return {Function} Wrapped component 6788 */ 6789 6790 var withToolbarControls = Object(external_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) { 6791 return function (props) { 6792 var blockName = props.name; // Compute valid alignments without taking into account, 6793 // if the theme supports wide alignments or not 6794 // and without checking the layout for availble alignments. 6795 // BlockAlignmentToolbar takes both of these into account. 6796 6797 var validAlignments = getValidAlignments(Object(external_wp_blocks_["getBlockSupport"])(blockName, 'align'), Object(external_wp_blocks_["hasBlockSupport"])(blockName, 'alignWide', true)); 6798 6799 var updateAlignment = function updateAlignment(nextAlign) { 6800 if (!nextAlign) { 6801 var _blockType$attributes, _blockType$attributes2; 6802 6803 var blockType = Object(external_wp_blocks_["getBlockType"])(props.name); 6804 var blockDefaultAlign = (_blockType$attributes = blockType.attributes) === null || _blockType$attributes === void 0 ? void 0 : (_blockType$attributes2 = _blockType$attributes.align) === null || _blockType$attributes2 === void 0 ? void 0 : _blockType$attributes2.default; 6805 6806 if (blockDefaultAlign) { 6807 nextAlign = ''; 6808 } 6809 } 6810 6811 props.setAttributes({ 6812 align: nextAlign 6813 }); 6814 }; 6815 6816 return [validAlignments.length > 0 && props.isSelected && Object(external_wp_element_["createElement"])(block_controls, { 6817 key: "align-controls" 6818 }, Object(external_wp_element_["createElement"])(block_alignment_toolbar, { 6819 value: props.attributes.align, 6820 onChange: updateAlignment, 6821 controls: validAlignments 6822 })), Object(external_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({ 6823 key: "edit" 6824 }, props))]; 6825 }; 6826 }, 'withToolbarControls'); 6827 /** 6828 * Override the default block element to add alignment wrapper props. 6829 * 6830 * @param {Function} BlockListBlock Original component 6831 * @return {Function} Wrapped component 6832 */ 6833 6834 var withDataAlign = Object(external_wp_compose_["createHigherOrderComponent"])(function (BlockListBlock) { 6835 return function (props) { 6836 var name = props.name, 6837 attributes = props.attributes; 6838 var align = attributes.align; 6839 var hasWideEnabled = Object(external_wp_data_["useSelect"])(function (select) { 6840 return !!select('core/block-editor').getSettings().alignWide; 6841 }, []); // If an alignment is not assigned, there's no need to go through the 6842 // effort to validate or assign its value. 6843 6844 if (align === undefined) { 6845 return Object(external_wp_element_["createElement"])(BlockListBlock, props); 6846 } 6847 6848 var validAlignments = getValidAlignments(Object(external_wp_blocks_["getBlockSupport"])(name, 'align'), Object(external_wp_blocks_["hasBlockSupport"])(name, 'alignWide', true), hasWideEnabled); 6849 var wrapperProps = props.wrapperProps; 6850 6851 if (validAlignments.includes(align)) { 6852 wrapperProps = align_objectSpread(align_objectSpread({}, wrapperProps), {}, { 6853 'data-align': align 6854 }); 6855 } 6856 6857 return Object(external_wp_element_["createElement"])(BlockListBlock, Object(esm_extends["a" /* default */])({}, props, { 6858 wrapperProps: wrapperProps 6859 })); 6860 }; 6861 }); 6862 /** 6863 * Override props assigned to save component to inject alignment class name if 6864 * block supports it. 6865 * 6866 * @param {Object} props Additional props applied to save element 6867 * @param {Object} blockType Block type 6868 * @param {Object} attributes Block attributes 6869 * @return {Object} Filtered props applied to save element 6870 */ 6871 6872 function addAssignedAlign(props, blockType, attributes) { 6873 var align = attributes.align; 6874 var blockAlign = Object(external_wp_blocks_["getBlockSupport"])(blockType, 'align'); 6875 var hasWideBlockSupport = Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'alignWide', true); // Compute valid alignments without taking into account if 6876 // the theme supports wide alignments or not. 6877 // This way changing themes does not impact the block save. 6878 6879 var isAlignValid = getValidAlignments(blockAlign, hasWideBlockSupport).includes(align); 6880 6881 if (isAlignValid) { 6882 props.className = classnames_default()("align".concat(align), props.className); 6883 } 6884 6885 return props; 6886 } 6887 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/align/addAttribute', addAttribute); 6888 Object(external_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/editor/align/with-data-align', withDataAlign); 6889 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/align/with-toolbar-controls', withToolbarControls); 6890 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/align/addAssignedAlign', addAssignedAlign); 6891 6892 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-advanced-controls/index.js 6893 6894 6895 /** 6896 * WordPress dependencies 6897 */ 6898 6899 /** 6900 * Internal dependencies 6901 */ 6902 6903 6904 var inspector_advanced_controls_name = 'InspectorAdvancedControls'; 6905 6906 var inspector_advanced_controls_createSlotFill = Object(external_wp_components_["createSlotFill"])(inspector_advanced_controls_name), 6907 inspector_advanced_controls_Fill = inspector_advanced_controls_createSlotFill.Fill, 6908 inspector_advanced_controls_Slot = inspector_advanced_controls_createSlotFill.Slot; 6909 6910 function InspectorAdvancedControls(_ref) { 6911 var children = _ref.children; 6912 6913 var _useBlockEditContext = useBlockEditContext(), 6914 isSelected = _useBlockEditContext.isSelected; 6915 6916 return isSelected ? Object(external_wp_element_["createElement"])(inspector_advanced_controls_Fill, null, children) : null; 6917 } 6918 6919 InspectorAdvancedControls.slotName = inspector_advanced_controls_name; 6920 InspectorAdvancedControls.Slot = inspector_advanced_controls_Slot; 6921 /** 6922 * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-advanced-controls/README.md 6923 */ 6924 6925 /* harmony default export */ var inspector_advanced_controls = (InspectorAdvancedControls); 6926 6927 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-controls/index.js 6928 6929 6930 /** 6931 * WordPress dependencies 6932 */ 6933 6934 /** 6935 * Internal dependencies 6936 */ 6937 6938 6939 6940 var inspector_controls_createSlotFill = Object(external_wp_components_["createSlotFill"])('InspectorControls'), 6941 inspector_controls_Fill = inspector_controls_createSlotFill.Fill, 6942 inspector_controls_Slot = inspector_controls_createSlotFill.Slot; 6943 6944 function InspectorControls(_ref) { 6945 var children = _ref.children; 6946 return useDisplayBlockControls() ? Object(external_wp_element_["createElement"])(inspector_controls_Fill, null, children) : null; 6947 } 6948 6949 InspectorControls.Slot = inspector_controls_Slot; 6950 /** 6951 * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-controls/README.md 6952 */ 6953 6954 /* harmony default export */ var inspector_controls = (InspectorControls); 6955 6956 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/anchor.js 6957 6958 6959 6960 function anchor_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; } 6961 6962 function anchor_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { anchor_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 { anchor_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 6963 6964 /** 6965 * External dependencies 6966 */ 6967 6968 /** 6969 * WordPress dependencies 6970 */ 6971 6972 6973 6974 6975 6976 6977 6978 /** 6979 * Internal dependencies 6980 */ 6981 6982 6983 /** 6984 * Regular expression matching invalid anchor characters for replacement. 6985 * 6986 * @type {RegExp} 6987 */ 6988 6989 var ANCHOR_REGEX = /[\s#]/g; 6990 /** 6991 * Filters registered block settings, extending attributes with anchor using ID 6992 * of the first node. 6993 * 6994 * @param {Object} settings Original block settings. 6995 * 6996 * @return {Object} Filtered block settings. 6997 */ 6998 6999 function anchor_addAttribute(settings) { 7000 // allow blocks to specify their own attribute definition with default values if needed. 7001 if (Object(external_lodash_["has"])(settings.attributes, ['anchor', 'type'])) { 7002 return settings; 7003 } 7004 7005 if (Object(external_wp_blocks_["hasBlockSupport"])(settings, 'anchor')) { 7006 // Gracefully handle if settings.attributes is undefined. 7007 settings.attributes = anchor_objectSpread(anchor_objectSpread({}, settings.attributes), {}, { 7008 anchor: { 7009 type: 'string', 7010 source: 'attribute', 7011 attribute: 'id', 7012 selector: '*' 7013 } 7014 }); 7015 } 7016 7017 return settings; 7018 } 7019 /** 7020 * Override the default edit UI to include a new block inspector control for 7021 * assigning the anchor ID, if block supports anchor. 7022 * 7023 * @param {WPComponent} BlockEdit Original component. 7024 * 7025 * @return {WPComponent} Wrapped component. 7026 */ 7027 7028 var withInspectorControl = Object(external_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) { 7029 return function (props) { 7030 var hasAnchor = Object(external_wp_blocks_["hasBlockSupport"])(props.name, 'anchor'); 7031 7032 if (hasAnchor && props.isSelected) { 7033 var isWeb = external_wp_element_["Platform"].OS === 'web'; 7034 var textControl = Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { 7035 className: "html-anchor-control", 7036 label: Object(external_wp_i18n_["__"])('HTML anchor'), 7037 help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_i18n_["__"])('Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page.'), Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], { 7038 href: 'https://wordpress.org/support/article/page-jumps/' 7039 }, Object(external_wp_i18n_["__"])('Learn more about anchors'))), 7040 value: props.attributes.anchor || '', 7041 valuePlaceholder: !isWeb ? Object(external_wp_i18n_["__"])('Add an anchor') : null, 7042 onChange: function onChange(nextValue) { 7043 nextValue = nextValue.replace(ANCHOR_REGEX, '-'); 7044 props.setAttributes({ 7045 anchor: nextValue 7046 }); 7047 }, 7048 autoCapitalize: "none", 7049 autoComplete: "off" 7050 }); 7051 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(BlockEdit, props), isWeb && Object(external_wp_element_["createElement"])(inspector_advanced_controls, null, textControl), !isWeb && props.name === 'core/heading' && Object(external_wp_element_["createElement"])(inspector_controls, null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { 7052 title: Object(external_wp_i18n_["__"])('Heading settings') 7053 }, textControl))); 7054 } 7055 7056 return Object(external_wp_element_["createElement"])(BlockEdit, props); 7057 }; 7058 }, 'withInspectorControl'); 7059 /** 7060 * Override props assigned to save component to inject anchor ID, if block 7061 * supports anchor. This is only applied if the block's save result is an 7062 * element and not a markup string. 7063 * 7064 * @param {Object} extraProps Additional props applied to save element. 7065 * @param {Object} blockType Block type. 7066 * @param {Object} attributes Current block attributes. 7067 * 7068 * @return {Object} Filtered props applied to save element. 7069 */ 7070 7071 function addSaveProps(extraProps, blockType, attributes) { 7072 if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'anchor')) { 7073 extraProps.id = attributes.anchor === '' ? null : attributes.anchor; 7074 } 7075 7076 return extraProps; 7077 } 7078 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/anchor/attribute', anchor_addAttribute); 7079 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/anchor/with-inspector-control', withInspectorControl); 7080 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/anchor/save-props', addSaveProps); 7081 7082 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/custom-class-name.js 7083 7084 7085 7086 function custom_class_name_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; } 7087 7088 function custom_class_name_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { custom_class_name_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 { custom_class_name_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 7089 7090 /** 7091 * External dependencies 7092 */ 7093 7094 7095 /** 7096 * WordPress dependencies 7097 */ 7098 7099 7100 7101 7102 7103 7104 /** 7105 * Internal dependencies 7106 */ 7107 7108 7109 /** 7110 * Filters registered block settings, extending attributes with anchor using ID 7111 * of the first node. 7112 * 7113 * @param {Object} settings Original block settings. 7114 * 7115 * @return {Object} Filtered block settings. 7116 */ 7117 7118 function custom_class_name_addAttribute(settings) { 7119 if (Object(external_wp_blocks_["hasBlockSupport"])(settings, 'customClassName', true)) { 7120 // Gracefully handle if settings.attributes is undefined. 7121 settings.attributes = custom_class_name_objectSpread(custom_class_name_objectSpread({}, settings.attributes), {}, { 7122 className: { 7123 type: 'string' 7124 } 7125 }); 7126 } 7127 7128 return settings; 7129 } 7130 /** 7131 * Override the default edit UI to include a new block inspector control for 7132 * assigning the custom class name, if block supports custom class name. 7133 * 7134 * @param {WPComponent} BlockEdit Original component. 7135 * 7136 * @return {WPComponent} Wrapped component. 7137 */ 7138 7139 var custom_class_name_withInspectorControl = Object(external_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) { 7140 return function (props) { 7141 var hasCustomClassName = Object(external_wp_blocks_["hasBlockSupport"])(props.name, 'customClassName', true); 7142 7143 if (hasCustomClassName && props.isSelected) { 7144 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(BlockEdit, props), Object(external_wp_element_["createElement"])(inspector_advanced_controls, null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { 7145 autoComplete: "off", 7146 label: Object(external_wp_i18n_["__"])('Additional CSS class(es)'), 7147 value: props.attributes.className || '', 7148 onChange: function onChange(nextValue) { 7149 props.setAttributes({ 7150 className: nextValue !== '' ? nextValue : undefined 7151 }); 7152 }, 7153 help: Object(external_wp_i18n_["__"])('Separate multiple classes with spaces.') 7154 }))); 7155 } 7156 7157 return Object(external_wp_element_["createElement"])(BlockEdit, props); 7158 }; 7159 }, 'withInspectorControl'); 7160 /** 7161 * Override props assigned to save component to inject anchor ID, if block 7162 * supports anchor. This is only applied if the block's save result is an 7163 * element and not a markup string. 7164 * 7165 * @param {Object} extraProps Additional props applied to save element. 7166 * @param {Object} blockType Block type. 7167 * @param {Object} attributes Current block attributes. 7168 * 7169 * @return {Object} Filtered props applied to save element. 7170 */ 7171 7172 function custom_class_name_addSaveProps(extraProps, blockType, attributes) { 7173 if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'customClassName', true) && attributes.className) { 7174 extraProps.className = classnames_default()(extraProps.className, attributes.className); 7175 } 7176 7177 return extraProps; 7178 } 7179 /** 7180 * Given an HTML string, returns an array of class names assigned to the root 7181 * element in the markup. 7182 * 7183 * @param {string} innerHTML Markup string from which to extract classes. 7184 * 7185 * @return {string[]} Array of class names assigned to the root element. 7186 */ 7187 7188 function getHTMLRootElementClasses(innerHTML) { 7189 innerHTML = "<div data-custom-class-name>".concat(innerHTML, "</div>"); 7190 var parsed = Object(external_wp_blocks_["parseWithAttributeSchema"])(innerHTML, { 7191 type: 'string', 7192 source: 'attribute', 7193 selector: '[data-custom-class-name] > *', 7194 attribute: 'class' 7195 }); 7196 return parsed ? parsed.trim().split(/\s+/) : []; 7197 } 7198 /** 7199 * Given a parsed set of block attributes, if the block supports custom class 7200 * names and an unknown class (per the block's serialization behavior) is 7201 * found, the unknown classes are treated as custom classes. This prevents the 7202 * block from being considered as invalid. 7203 * 7204 * @param {Object} blockAttributes Original block attributes. 7205 * @param {Object} blockType Block type settings. 7206 * @param {string} innerHTML Original block markup. 7207 * 7208 * @return {Object} Filtered block attributes. 7209 */ 7210 7211 function addParsedDifference(blockAttributes, blockType, innerHTML) { 7212 if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'customClassName', true)) { 7213 // To determine difference, serialize block given the known set of 7214 // attributes, with the exception of `className`. This will determine 7215 // the default set of classes. From there, any difference in innerHTML 7216 // can be considered as custom classes. 7217 var attributesSansClassName = Object(external_lodash_["omit"])(blockAttributes, ['className']); 7218 var serialized = Object(external_wp_blocks_["getSaveContent"])(blockType, attributesSansClassName); 7219 var defaultClasses = getHTMLRootElementClasses(serialized); 7220 var actualClasses = getHTMLRootElementClasses(innerHTML); 7221 var customClasses = Object(external_lodash_["difference"])(actualClasses, defaultClasses); 7222 7223 if (customClasses.length) { 7224 blockAttributes.className = customClasses.join(' '); 7225 } else if (serialized) { 7226 delete blockAttributes.className; 7227 } 7228 } 7229 7230 return blockAttributes; 7231 } 7232 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/custom-class-name/attribute', custom_class_name_addAttribute); 7233 Object(external_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/editor/custom-class-name/with-inspector-control', custom_class_name_withInspectorControl); 7234 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/custom-class-name/save-props', custom_class_name_addSaveProps); 7235 Object(external_wp_hooks_["addFilter"])('blocks.getBlockAttributes', 'core/custom-class-name/addParsedDifference', addParsedDifference); 7236 7237 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules 7238 var toConsumableArray = __webpack_require__(15); 7239 7240 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/generated-class-name.js 7241 7242 7243 /** 7244 * External dependencies 7245 */ 7246 7247 /** 7248 * WordPress dependencies 7249 */ 7250 7251 7252 7253 /** 7254 * Override props assigned to save component to inject generated className if 7255 * block supports it. This is only applied if the block's save result is an 7256 * element and not a markup string. 7257 * 7258 * @param {Object} extraProps Additional props applied to save element. 7259 * @param {Object} blockType Block type. 7260 * 7261 * @return {Object} Filtered props applied to save element. 7262 */ 7263 7264 function addGeneratedClassName(extraProps, blockType) { 7265 // Adding the generated className 7266 if (Object(external_wp_blocks_["hasBlockSupport"])(blockType, 'className', true)) { 7267 if (typeof extraProps.className === 'string') { 7268 // We have some extra classes and want to add the default classname 7269 // We use uniq to prevent duplicate classnames 7270 extraProps.className = Object(external_lodash_["uniq"])([Object(external_wp_blocks_["getBlockDefaultClassName"])(blockType.name)].concat(Object(toConsumableArray["a" /* default */])(extraProps.className.split(' ')))).join(' ').trim(); 7271 } else { 7272 // There is no string in the className variable, 7273 // so we just dump the default name in there 7274 extraProps.className = Object(external_wp_blocks_["getBlockDefaultClassName"])(blockType.name); 7275 } 7276 } 7277 7278 return extraProps; 7279 } 7280 Object(external_wp_hooks_["addFilter"])('blocks.getSaveContent.extraProps', 'core/generated-class-name/save-props', addGeneratedClassName); 7281 7282 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-editor-feature/index.js 7283 /** 7284 * External dependencies 7285 */ 7286 7287 /** 7288 * WordPress dependencies 7289 */ 7290 7291 7292 7293 /** 7294 * Internal dependencies 7295 */ 7296 7297 7298 var deprecatedFlags = { 7299 'color.palette': function colorPalette(settings) { 7300 return settings.colors === undefined ? undefined : settings.colors; 7301 }, 7302 'color.gradients': function colorGradients(settings) { 7303 return settings.gradients === undefined ? undefined : settings.gradients; 7304 }, 7305 'color.custom': function colorCustom(settings) { 7306 return settings.disableCustomColors === undefined ? undefined : !settings.disableCustomColors; 7307 }, 7308 'color.customGradient': function colorCustomGradient(settings) { 7309 return settings.disableCustomGradients === undefined ? undefined : !settings.disableCustomGradients; 7310 }, 7311 'typography.fontSizes': function typographyFontSizes(settings) { 7312 return settings.fontSizes === undefined ? undefined : settings.fontSizes; 7313 }, 7314 'typography.customFontSize': function typographyCustomFontSize(settings) { 7315 return settings.disableCustomFontSizes === undefined ? undefined : !settings.disableCustomFontSizes; 7316 }, 7317 'typography.customLineHeight': function typographyCustomLineHeight(settings) { 7318 return settings.enableCustomLineHeight; 7319 }, 7320 'spacing.units': function spacingUnits(settings) { 7321 if (settings.enableCustomUnits === undefined) { 7322 return; 7323 } 7324 7325 if (settings.enableCustomUnits === true) { 7326 return ['px', 'em', 'rem', 'vh', 'vw']; 7327 } 7328 7329 return settings.enableCustomUnits; 7330 }, 7331 'spacing.customPadding': function spacingCustomPadding(settings) { 7332 return settings.enableCustomSpacing; 7333 } 7334 }; 7335 7336 function blockAttributesMatch(blockAttributes, attributes) { 7337 for (var attribute in attributes) { 7338 if (attributes[attribute] !== blockAttributes[attribute]) { 7339 return false; 7340 } 7341 } 7342 7343 return true; 7344 } 7345 /** 7346 * Hook that retrieves the setting for the given editor feature. 7347 * It works with nested objects using by finding the value at path. 7348 * 7349 * @param {string} featurePath The path to the feature. 7350 * 7351 * @return {any} Returns the value defined for the setting. 7352 * 7353 * @example 7354 * ```js 7355 * const isEnabled = useEditorFeature( 'typography.dropCap' ); 7356 * ``` 7357 */ 7358 7359 7360 function useEditorFeature(featurePath) { 7361 var _useBlockEditContext = useBlockEditContext(), 7362 blockName = _useBlockEditContext.name, 7363 clientId = _useBlockEditContext.clientId; 7364 7365 var setting = Object(external_wp_data_["useSelect"])(function (select) { 7366 var _get; 7367 7368 var _select = select('core/block-editor'), 7369 getBlockAttributes = _select.getBlockAttributes, 7370 getSettings = _select.getSettings; 7371 7372 var settings = getSettings(); 7373 var blockType = select(external_wp_blocks_["store"]).getBlockType(blockName); 7374 var context = blockName; 7375 var selectors = Object(external_lodash_["get"])(blockType, ['supports', '__experimentalSelector']); 7376 7377 if (Object(external_lodash_["isObject"])(selectors)) { 7378 var blockAttributes = getBlockAttributes(clientId) || {}; 7379 7380 for (var contextSelector in selectors) { 7381 var attributes = selectors[contextSelector].attributes; 7382 7383 if (blockAttributesMatch(blockAttributes, attributes)) { 7384 context = contextSelector; 7385 break; 7386 } 7387 } 7388 } // 1 - Use __experimental features, if available. 7389 // We cascade to the all value if the block one is not available. 7390 7391 7392 var defaultsPath = "__experimentalFeatures.defaults.".concat(featurePath); 7393 var blockPath = "__experimentalFeatures.".concat(context, ".").concat(featurePath); 7394 var experimentalFeaturesResult = (_get = Object(external_lodash_["get"])(settings, blockPath)) !== null && _get !== void 0 ? _get : Object(external_lodash_["get"])(settings, defaultsPath); 7395 7396 if (experimentalFeaturesResult !== undefined) { 7397 return experimentalFeaturesResult; 7398 } // 2 - Use deprecated settings, otherwise. 7399 7400 7401 var deprecatedSettingsValue = deprecatedFlags[featurePath] ? deprecatedFlags[featurePath](settings) : undefined; 7402 7403 if (deprecatedSettingsValue !== undefined) { 7404 return deprecatedSettingsValue; 7405 } // 3 - Fall back for typography.dropCap: 7406 // This is only necessary to support typography.dropCap. 7407 // when __experimentalFeatures are not present (core without plugin). 7408 // To remove when __experimentalFeatures are ported to core. 7409 7410 7411 return featurePath === 'typography.dropCap' ? true : undefined; 7412 }, [blockName, clientId, featurePath]); 7413 return setting; 7414 } 7415 7416 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/utils.js 7417 /** 7418 * External dependencies 7419 */ 7420 7421 /** 7422 * Removed undefined values from nested object. 7423 * 7424 * @param {*} object 7425 * @return {*} Object cleaned from undefined values 7426 */ 7427 7428 var utils_cleanEmptyObject = function cleanEmptyObject(object) { 7429 if (!Object(external_lodash_["isObject"])(object)) { 7430 return object; 7431 } 7432 7433 var cleanedNestedObjects = Object(external_lodash_["pickBy"])(Object(external_lodash_["mapValues"])(object, cleanEmptyObject), external_lodash_["identity"]); 7434 return Object(external_lodash_["isEqual"])(cleanedNestedObjects, {}) ? undefined : cleanedNestedObjects; 7435 }; 7436 7437 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/border-radius.js 7438 7439 7440 7441 function border_radius_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; } 7442 7443 function border_radius_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { border_radius_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 { border_radius_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 7444 7445 /** 7446 * WordPress dependencies 7447 */ 7448 7449 7450 7451 /** 7452 * Internal dependencies 7453 */ 7454 7455 7456 7457 7458 var MIN_BORDER_RADIUS_VALUE = 0; 7459 var MAX_BORDER_RADIUS_VALUE = 50; 7460 /** 7461 * Inspector control panel containing the border radius related configuration. 7462 * 7463 * @param {Object} props Block properties. 7464 * @return {WPElement} Border radius edit element. 7465 */ 7466 7467 function BorderRadiusEdit(props) { 7468 var _style$border; 7469 7470 var style = props.attributes.style, 7471 setAttributes = props.setAttributes; 7472 7473 if (useIsBorderRadiusDisabled(props)) { 7474 return null; 7475 } 7476 7477 var onChange = function onChange(newRadius) { 7478 var newStyle = border_radius_objectSpread(border_radius_objectSpread({}, style), {}, { 7479 border: border_radius_objectSpread(border_radius_objectSpread({}, style === null || style === void 0 ? void 0 : style.border), {}, { 7480 radius: newRadius 7481 }) 7482 }); 7483 7484 setAttributes({ 7485 style: utils_cleanEmptyObject(newStyle) 7486 }); 7487 }; 7488 7489 return Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { 7490 value: style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius, 7491 label: Object(external_wp_i18n_["__"])('Border radius'), 7492 min: MIN_BORDER_RADIUS_VALUE, 7493 max: MAX_BORDER_RADIUS_VALUE, 7494 initialPosition: 0, 7495 allowReset: true, 7496 onChange: onChange 7497 }); 7498 } 7499 /** 7500 * Determines if there is border radius support. 7501 * 7502 * @param {string|Object} blockType Block name or Block Type object. 7503 * @return {boolean} Whether there is support. 7504 */ 7505 7506 function hasBorderRadiusSupport(blockType) { 7507 var support = Object(external_wp_blocks_["getBlockSupport"])(blockType, BORDER_SUPPORT_KEY); 7508 return !!(true === support || support !== null && support !== void 0 && support.radius); 7509 } 7510 /** 7511 * Custom hook that checks if border radius settings have been disabled. 7512 * 7513 * @param {string} name The name of the block. 7514 * @return {boolean} Whether border radius setting is disabled. 7515 */ 7516 7517 function useIsBorderRadiusDisabled() { 7518 var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, 7519 blockName = _ref.name; 7520 7521 var isDisabled = !useEditorFeature('border.customRadius'); 7522 return !hasBorderRadiusSupport(blockName) || isDisabled; 7523 } 7524 7525 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/border.js 7526 7527 7528 /** 7529 * WordPress dependencies 7530 */ 7531 7532 7533 7534 7535 /** 7536 * Internal dependencies 7537 */ 7538 7539 7540 7541 var BORDER_SUPPORT_KEY = '__experimentalBorder'; 7542 function BorderPanel(props) { 7543 var isDisabled = border_useIsBorderDisabled(props); 7544 var isSupported = hasBorderSupport(props.name); 7545 7546 if (isDisabled || !isSupported) { 7547 return null; 7548 } 7549 7550 return Object(external_wp_element_["createElement"])(inspector_controls, null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { 7551 title: Object(external_wp_i18n_["__"])('Border settings') 7552 }, Object(external_wp_element_["createElement"])(BorderRadiusEdit, props))); 7553 } 7554 /** 7555 * Determine whether there is block support for borders. 7556 * 7557 * @param {string} blockName Block name. 7558 * @return {boolean} Whether there is support. 7559 */ 7560 7561 function hasBorderSupport(blockName) { 7562 if (external_wp_element_["Platform"].OS !== 'web') { 7563 return false; 7564 } 7565 7566 var support = Object(external_wp_blocks_["getBlockSupport"])(blockName, BORDER_SUPPORT_KEY); // Further border properties to be added in future iterations. 7567 // e.g. support && ( support.radius || support.width || support.style ) 7568 7569 return !!(true === support || support !== null && support !== void 0 && support.radius); 7570 } 7571 /** 7572 * Determines whether there is any block support for borders e.g. border radius, 7573 * style, width etc. 7574 * 7575 * @param {Object} props Block properties. 7576 * @return {boolean} If border support is completely disabled. 7577 */ 7578 7579 var border_useIsBorderDisabled = function useIsBorderDisabled() { 7580 var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 7581 // Further border properties to be added in future iterations. 7582 // e.g. const configs = [ 7583 // useIsBorderRadiusDisabled( props ), 7584 // useIsBorderWidthDisabled( props ), 7585 // ]; 7586 var configs = [useIsBorderRadiusDisabled(props)]; 7587 return configs.every(Boolean); 7588 }; 7589 7590 // EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js 7591 var tinycolor = __webpack_require__(60); 7592 var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor); 7593 7594 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/utils.js 7595 /** 7596 * External dependencies 7597 */ 7598 7599 7600 /** 7601 * Provided an array of color objects as set by the theme or by the editor defaults, 7602 * and the values of the defined color or custom color returns a color object describing the color. 7603 * 7604 * @param {Array} colors Array of color objects as set by the theme or by the editor defaults. 7605 * @param {?string} definedColor A string containing the color slug. 7606 * @param {?string} customColor A string containing the customColor value. 7607 * 7608 * @return {?Object} If definedColor is passed and the name is found in colors, 7609 * the color object exactly as set by the theme or editor defaults is returned. 7610 * Otherwise, an object that just sets the color is defined. 7611 */ 7612 7613 var utils_getColorObjectByAttributeValues = function getColorObjectByAttributeValues(colors, definedColor, customColor) { 7614 if (definedColor) { 7615 var colorObj = Object(external_lodash_["find"])(colors, { 7616 slug: definedColor 7617 }); 7618 7619 if (colorObj) { 7620 return colorObj; 7621 } 7622 } 7623 7624 return { 7625 color: customColor 7626 }; 7627 }; 7628 /** 7629 * Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined. 7630 * 7631 * @param {Array} colors Array of color objects as set by the theme or by the editor defaults. 7632 * @param {?string} colorValue A string containing the color value. 7633 * 7634 * @return {?Object} Color object included in the colors array whose color property equals colorValue. 7635 * Returns undefined if no color object matches this requirement. 7636 */ 7637 7638 var utils_getColorObjectByColorValue = function getColorObjectByColorValue(colors, colorValue) { 7639 return Object(external_lodash_["find"])(colors, { 7640 color: colorValue 7641 }); 7642 }; 7643 /** 7644 * Returns a class based on the context a color is being used and its slug. 7645 * 7646 * @param {string} colorContextName Context/place where color is being used e.g: background, text etc... 7647 * @param {string} colorSlug Slug of the color. 7648 * 7649 * @return {?string} String with the class corresponding to the color in the provided context. 7650 * Returns undefined if either colorContextName or colorSlug are not provided. 7651 */ 7652 7653 function getColorClassName(colorContextName, colorSlug) { 7654 if (!colorContextName || !colorSlug) { 7655 return undefined; 7656 } 7657 7658 return "has-".concat(Object(external_lodash_["kebabCase"])(colorSlug), "-").concat(colorContextName); 7659 } 7660 /** 7661 * Given an array of color objects and a color value returns the color value of the most readable color in the array. 7662 * 7663 * @param {Array} colors Array of color objects as set by the theme or by the editor defaults. 7664 * @param {?string} colorValue A string containing the color value. 7665 * 7666 * @return {string} String with the color value of the most readable color. 7667 */ 7668 7669 function utils_getMostReadableColor(colors, colorValue) { 7670 return tinycolor_default.a.mostReadable(colorValue, Object(external_lodash_["map"])(colors, 'color')).toHexString(); 7671 } 7672 7673 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradients/use-gradient.js 7674 7675 7676 /** 7677 * External dependencies 7678 */ 7679 7680 /** 7681 * WordPress dependencies 7682 */ 7683 7684 7685 7686 /** 7687 * Internal dependencies 7688 */ 7689 7690 7691 7692 var EMPTY_ARRAY = []; 7693 function __experimentalGetGradientClass(gradientSlug) { 7694 if (!gradientSlug) { 7695 return undefined; 7696 } 7697 7698 return "has-".concat(gradientSlug, "-gradient-background"); 7699 } 7700 /** 7701 * Retrieves the gradient value per slug. 7702 * 7703 * @param {Array} gradients Gradient Palette 7704 * @param {string} slug Gradient slug 7705 * 7706 * @return {string} Gradient value. 7707 */ 7708 7709 function getGradientValueBySlug(gradients, slug) { 7710 var gradient = Object(external_lodash_["find"])(gradients, ['slug', slug]); 7711 return gradient && gradient.gradient; 7712 } 7713 function __experimentalGetGradientObjectByGradientValue(gradients, value) { 7714 var gradient = Object(external_lodash_["find"])(gradients, ['gradient', value]); 7715 return gradient; 7716 } 7717 /** 7718 * Retrieves the gradient slug per slug. 7719 * 7720 * @param {Array} gradients Gradient Palette 7721 * @param {string} value Gradient value 7722 * @return {string} Gradient slug. 7723 */ 7724 7725 function getGradientSlugByValue(gradients, value) { 7726 var gradient = __experimentalGetGradientObjectByGradientValue(gradients, value); 7727 7728 return gradient && gradient.slug; 7729 } 7730 function __experimentalUseGradient() { 7731 var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, 7732 _ref$gradientAttribut = _ref.gradientAttribute, 7733 gradientAttribute = _ref$gradientAttribut === void 0 ? 'gradient' : _ref$gradientAttribut, 7734 _ref$customGradientAt = _ref.customGradientAttribute, 7735 customGradientAttribute = _ref$customGradientAt === void 0 ? 'customGradient' : _ref$customGradientAt; 7736 7737 var _useBlockEditContext = useBlockEditContext(), 7738 clientId = _useBlockEditContext.clientId; 7739 7740 var gradients = useEditorFeature('color.gradients') || EMPTY_ARRAY; 7741 7742 var _useSelect = Object(external_wp_data_["useSelect"])(function (select) { 7743 var _select = select('core/block-editor'), 7744 getBlockAttributes = _select.getBlockAttributes; 7745 7746 var attributes = getBlockAttributes(clientId) || {}; 7747 return { 7748 customGradient: attributes[customGradientAttribute], 7749 gradient: attributes[gradientAttribute] 7750 }; 7751 }, [clientId, gradientAttribute, customGradientAttribute]), 7752 gradient = _useSelect.gradient, 7753 customGradient = _useSelect.customGradient; 7754 7755 var _useDispatch = Object(external_wp_data_["useDispatch"])('core/block-editor'), 7756 updateBlockAttributes = _useDispatch.updateBlockAttributes; 7757 7758 var setGradient = Object(external_wp_element_["useCallback"])(function (newGradientValue) { 7759 var _updateBlockAttribute2; 7760 7761 var slug = getGradientSlugByValue(gradients, newGradientValue); 7762 7763 if (slug) { 7764 var _updateBlockAttribute; 7765 7766 updateBlockAttributes(clientId, (_updateBlockAttribute = {}, Object(defineProperty["a" /* default */])(_updateBlockAttribute, gradientAttribute, slug), Object(defineProperty["a" /* default */])(_updateBlockAttribute, customGradientAttribute, undefined), _updateBlockAttribute)); 7767 return; 7768 } 7769 7770 updateBlockAttributes(clientId, (_updateBlockAttribute2 = {}, Object(defineProperty["a" /* default */])(_updateBlockAttribute2, gradientAttribute, undefined), Object(defineProperty["a" /* default */])(_updateBlockAttribute2, customGradientAttribute, newGradientValue), _updateBlockAttribute2)); 7771 }, [gradients, clientId, updateBlockAttributes]); 7772 7773 var gradientClass = __experimentalGetGradientClass(gradient); 7774 7775 var gradientValue; 7776 7777 if (gradient) { 7778 gradientValue = getGradientValueBySlug(gradients, gradient); 7779 } else { 7780 gradientValue = customGradient; 7781 } 7782 7783 return { 7784 gradientClass: gradientClass, 7785 gradientValue: gradientValue, 7786 setGradient: setGradient 7787 }; 7788 } 7789 7790 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules 7791 var slicedToArray = __webpack_require__(11); 7792 7793 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js 7794 var objectWithoutProperties = __webpack_require__(13); 7795 7796 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/control.js 7797 7798 7799 7800 7801 7802 function control_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; } 7803 7804 function control_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { control_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 { control_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 7805 7806 /** 7807 * External dependencies 7808 */ 7809 7810 7811 /** 7812 * WordPress dependencies 7813 */ 7814 7815 7816 7817 7818 /** 7819 * Internal dependencies 7820 */ 7821 7822 7823 7824 // translators: first %s: the color name or value (e.g. red or #ff0000) 7825 7826 var colorIndicatorAriaLabel = Object(external_wp_i18n_["__"])('(Color: %s)'); // translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%) 7827 7828 7829 var gradientIndicatorAriaLabel = Object(external_wp_i18n_["__"])('(Gradient: %s)'); 7830 7831 var colorsAndGradientKeys = ['colors', 'disableCustomColors', 'gradients', 'disableCustomGradients']; 7832 7833 function VisualLabel(_ref) { 7834 var colors = _ref.colors, 7835 gradients = _ref.gradients, 7836 label = _ref.label, 7837 currentTab = _ref.currentTab, 7838 colorValue = _ref.colorValue, 7839 gradientValue = _ref.gradientValue; 7840 var value, ariaLabel; 7841 7842 if (currentTab === 'color') { 7843 if (colorValue) { 7844 value = colorValue; 7845 var colorObject = utils_getColorObjectByColorValue(colors, value); 7846 var colorName = colorObject && colorObject.name; 7847 ariaLabel = Object(external_wp_i18n_["sprintf"])(colorIndicatorAriaLabel, colorName || value); 7848 } 7849 } else if (currentTab === 'gradient' && gradientValue) { 7850 value = gradientValue; 7851 7852 var gradientObject = __experimentalGetGradientObjectByGradientValue(gradients, value); 7853 7854 var gradientName = gradientObject && gradientObject.name; 7855 ariaLabel = Object(external_wp_i18n_["sprintf"])(gradientIndicatorAriaLabel, gradientName || value); 7856 } 7857 7858 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, label, !!value && Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], { 7859 colorValue: value, 7860 "aria-label": ariaLabel 7861 })); 7862 } 7863 7864 function ColorGradientControlInner(_ref2) { 7865 var colors = _ref2.colors, 7866 gradients = _ref2.gradients, 7867 disableCustomColors = _ref2.disableCustomColors, 7868 disableCustomGradients = _ref2.disableCustomGradients, 7869 className = _ref2.className, 7870 label = _ref2.label, 7871 onColorChange = _ref2.onColorChange, 7872 onGradientChange = _ref2.onGradientChange, 7873 colorValue = _ref2.colorValue, 7874 gradientValue = _ref2.gradientValue, 7875 clearable = _ref2.clearable; 7876 var canChooseAColor = onColorChange && (!Object(external_lodash_["isEmpty"])(colors) || !disableCustomColors); 7877 var canChooseAGradient = onGradientChange && (!Object(external_lodash_["isEmpty"])(gradients) || !disableCustomGradients); 7878 7879 var _useState = Object(external_wp_element_["useState"])(gradientValue ? 'gradient' : !!canChooseAColor && 'color'), 7880 _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), 7881 currentTab = _useState2[0], 7882 setCurrentTab = _useState2[1]; 7883 7884 if (!canChooseAColor && !canChooseAGradient) { 7885 return null; 7886 } 7887 7888 return Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], { 7889 className: classnames_default()('block-editor-color-gradient-control', className) 7890 }, Object(external_wp_element_["createElement"])("fieldset", null, Object(external_wp_element_["createElement"])("legend", null, Object(external_wp_element_["createElement"])("div", { 7891 className: "block-editor-color-gradient-control__color-indicator" 7892 }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"].VisualLabel, null, Object(external_wp_element_["createElement"])(VisualLabel, { 7893 currentTab: currentTab, 7894 label: label, 7895 colorValue: colorValue, 7896 gradientValue: gradientValue 7897 })))), canChooseAColor && canChooseAGradient && Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], { 7898 className: "block-editor-color-gradient-control__button-tabs" 7899 }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { 7900 isSmall: true, 7901 isPressed: currentTab === 'color', 7902 onClick: function onClick() { 7903 return setCurrentTab('color'); 7904 } 7905 }, Object(external_wp_i18n_["__"])('Solid')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { 7906 isSmall: true, 7907 isPressed: currentTab === 'gradient', 7908 onClick: function onClick() { 7909 return setCurrentTab('gradient'); 7910 } 7911 }, Object(external_wp_i18n_["__"])('Gradient'))), (currentTab === 'color' || !canChooseAGradient) && Object(external_wp_element_["createElement"])(external_wp_components_["ColorPalette"], Object(esm_extends["a" /* default */])({ 7912 value: colorValue, 7913 onChange: canChooseAGradient ? function (newColor) { 7914 onColorChange(newColor); 7915 onGradientChange(); 7916 } : onColorChange 7917 }, { 7918 colors: colors, 7919 disableCustomColors: disableCustomColors 7920 }, { 7921 clearable: clearable 7922 })), (currentTab === 'gradient' || !canChooseAColor) && Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalGradientPicker"], Object(esm_extends["a" /* default */])({ 7923 value: gradientValue, 7924 onChange: canChooseAColor ? function (newGradient) { 7925 onGradientChange(newGradient); 7926 onColorChange(); 7927 } : onGradientChange 7928 }, { 7929 gradients: gradients, 7930 disableCustomGradients: disableCustomGradients 7931 }, { 7932 clearable: clearable 7933 })))); 7934 } 7935 7936 function ColorGradientControlSelect(props) { 7937 var colorGradientSettings = {}; 7938 colorGradientSettings.colors = useEditorFeature('color.palette'); 7939 colorGradientSettings.gradients = useEditorFeature('color.gradients'); 7940 colorGradientSettings.disableCustomColors = !useEditorFeature('color.custom'); 7941 colorGradientSettings.disableCustomGradients = !useEditorFeature('color.customGradient'); 7942 return Object(external_wp_element_["createElement"])(ColorGradientControlInner, control_objectSpread(control_objectSpread({}, colorGradientSettings), props)); 7943 } 7944 7945 function ColorGradientControl(props) { 7946 if (Object(external_lodash_["every"])(colorsAndGradientKeys, function (key) { 7947 return props.hasOwnProperty(key); 7948 })) { 7949 return Object(external_wp_element_["createElement"])(ColorGradientControlInner, props); 7950 } 7951 7952 return Object(external_wp_element_["createElement"])(ColorGradientControlSelect, props); 7953 } 7954 7955 /* harmony default export */ var control = (ColorGradientControl); 7956 7957 // CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/panel-color-gradient-settings.js 7958 7959 7960 7961 7962 7963 function panel_color_gradient_settings_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; } 7964 7965 function panel_color_gradient_settings_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { panel_color_gradient_settings_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 { panel_color_gradient_settings_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 7966 7967 /** 7968 * External dependencies 7969 */ 7970 7971 7972 /** 7973 * WordPress dependencies 7974 */ 7975 7976 7977 7978 /** 7979 * Internal dependencies 7980 */ 7981 7982 7983 7984 7985 // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000) 7986 7987 var panel_color_gradient_settings_colorIndicatorAriaLabel = Object(external_wp_i18n_["__"])('(%s: color %s)'); // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000) 7988 7989 7990 var panel_color_gradient_settings_gradientIndicatorAriaLabel = Object(external_wp_i18n_["__"])('(%s: gradient %s)'); 7991 7992 var panel_color_gradient_settings_colorsAndGradientKeys = ['colors', 'disableCustomColors', 'gradients', 'disableCustomGradients']; 7993 7994 var panel_color_gradient_settings_Indicators = function Indicators(_ref) { 7995 var colors = _ref.colors, 7996 gradients = _ref.gradients, 7997 settings = _ref.settings; 7998 return settings.map(function (_ref2, index) { 7999 var colorValue = _ref2.colorValue, 8000 gradientValue = _ref2.gradientValue, 8001 label = _ref2.label, 8002 availableColors = _ref2.colors, 8003 availableGradients = _ref2.gradients; 8004 8005 if (!colorValue && !gradientValue) { 8006 return null; 8007 } 8008 8009 var ariaLabel; 8010 8011 if (colorValue) { 8012 var colorObject = utils_getColorObjectByColorValue(availableColors || colors, colorValue); 8013 ariaLabel = Object(external_wp_i18n_["sprintf"])(panel_color_gradient_settings_colorIndicatorAriaLabel, label.toLowerCase(), colorObject && colorObject.name || colorValue); 8014 } else { 8015 var gradientObject = __experimentalGetGradientObjectByGradientValue(availableGradients || gradients, colorValue); 8016 8017 ariaLabel = Object(external_wp_i18n_["sprintf"])(panel_color_gradient_settings_gradientIndicatorAriaLabel, label.toLowerCase(), gradientObject && gradientObject.name || gradientValue); 8018 } 8019 8020 return Object(external_wp_element_["createElement"])(external_wp_components_["ColorIndicator"], { 8021 key: index, 8022 colorValue: colorValue || gradientValue, 8023 "aria-label": ariaLabel 8024 }); 8025 }); 8026 }; 8027 8028 var panel_color_gradient_settings_PanelColorGradientSettingsInner = function PanelColorGradientSettingsInner(_ref3) { 8029 var className = _ref3.className, 8030 colors = _ref3.colors, 8031 gradients = _ref3.gradients, 8032 disableCustomColors = _ref3.disableCustomColors, 8033 disableCustomGradients = _ref3.disableCustomGradients, 8034 children = _ref3.children, 8035 settings = _ref3.settings, 8036 title = _ref3.title, 8037 props = Object(objectWithoutProperties["a" /* default */])(_ref3, ["className", "colors", "gradients", "disableCustomColors", "disableCustomGradients", "children", "settings", "title"]); 8038 8039 if (Object(external_lodash_["isEmpty"])(colors) && Object(external_lodash_["isEmpty"])(gradients) && disableCustomColors && disableCustomGradients && Object(external_lodash_["every"])(settings, function (setting) { 8040 return Object(external_lodash_["isEmpty"])(setting.colors) && Object(external_lodash_["isEmpty"])(setting.gradients) && (setting.disableCustomColors === undefined || setting.disableCustomColors) && (setting.disableCustomGradients === undefined || setting.disableCustomGradients); 8041 })) { 8042 return null; 8043 } 8044 8045 var titleElement = Object(external_wp_element_["createElement"])("span", { 8046 className: "block-editor-panel-color-gradient-settings__panel-title" 8047 }, title, Object(external_wp_element_["createElement"])(panel_color_gradient_settings_Indicators, { 8048 colors: colors, 8049 gradients: gradients, 8050 settings: settings 8051 })); 8052 return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], Object(esm_extends["a" /* default */])({ 8053 className: classnames_default()('block-editor-panel-color-gradient-settings', className), 8054 title: titleElement 8055 }, props), settings.map(function (setting, index) { 8056 return Object(external_wp_element_["createElement"])(control, Object(esm_extends["a" /* default */])({ 8057 key: index 8058 }, panel_color_gradient_settings_objectSpread({ 8059 colors: colors, 8060 gradients: gradients, 8061 disableCustomColors: disableCustomColors, 8062 disableCustomGradients: disableCustomGradients 8063 }, setting))); 8064 }), children); 8065 }; 8066 8067 var panel_color_gradient_settings_PanelColorGradientSettingsSelect = function PanelColorGradientSettingsSelect(props) { 8068 var colorGradientSettings = {}; 8069 colorGradientSettings.colors = useEditorFeature('color.palette'); 8070 colorGradientSettings.gradients = useEditorFeature('color.gradients'); 8071 colorGradientSettings.disableCustomColors = !useEditorFeature('color.custom'); 8072 colorGradientSettings.disableCustomGradients = !useEditorFeature('color.customGradient'); 8073 return Object(external_wp_element_["createElement"])(panel_color_gradient_settings_PanelColorGradientSettingsInner, panel_color_gradient_settings_objectSpread(panel_color_gradient_settings_objectSpread({}, colorGradientSettings), props)); 8074 }; 8075 8076 var panel_c