deploy: 8cdefdcd01
This commit is contained in:
commit
25a2f60550
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,11 @@
|
|||
/*! axe v4.8.2
|
||||
* Copyright (c) 2015 - 2023 Deque Systems, Inc.
|
||||
*
|
||||
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This entire copyright notice must appear in every copy of this file you
|
||||
* distribute or in any file that contains substantial portions of this source
|
||||
* code.
|
||||
*/
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,6 @@
|
|||
/*!
|
||||
* Determine if an object is a Buffer
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/
|
|
@ -0,0 +1 @@
|
|||
"use strict";(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[1050],{"../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-body/component.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>card_body_component});var esm_extends=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js"),react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),context_connect=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/context-connect.js"),component=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/view/component.js"),use_context_system=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/use-context-system.js"),emotion_react_browser_esm=__webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),config_values=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/config-values.js");const scrollableScrollbar=(0,emotion_react_browser_esm.AH)("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",config_values.A.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",config_values.A.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",config_values.A.colorScrollbarThumbHover,";}}",""),Scrollable={name:"13udsys",styles:"height:100%"},styles_smoothScroll={name:"7zq9w",styles:"scroll-behavior:smooth"},scrollX={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},scrollY={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},scrollAuto={name:"umwchj",styles:"overflow-y:auto"};var use_cx=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js");const scrollable_component=(0,context_connect.KZ)((function component_Scrollable(props,forwardedRef){const scrollableProps=function useScrollable(props){const{className,scrollDirection="y",smoothScroll=!1,...otherProps}=(0,use_context_system.A)(props,"Scrollable"),cx=(0,use_cx.l)();return{...otherProps,className:(0,react.useMemo)((()=>cx(Scrollable,scrollableScrollbar,smoothScroll&&styles_smoothScroll,"x"===scrollDirection&&scrollX,"y"===scrollDirection&&scrollY,"auto"===scrollDirection&&scrollAuto,className)),[className,cx,scrollDirection,smoothScroll])}}(props);return(0,react.createElement)(component.A,(0,esm_extends.A)({},scrollableProps,{ref:forwardedRef}))}),"Scrollable");var styles=__webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/styles.js");const card_body_component=(0,context_connect.KZ)((function CardBody(props,forwardedRef){const{isScrollable,...otherProps}=function useCardBody(props){const{className,isScrollable=!1,isShady=!1,size="medium",...otherProps}=(0,use_context_system.A)(props,"CardBody"),cx=(0,use_cx.l)();return{...otherProps,className:(0,react.useMemo)((()=>cx(styles.nB,styles.Vq,styles.L7[size],isShady&&styles.QC,"components-card__body",className)),[className,cx,isShady,size]),isScrollable}}(props);return isScrollable?(0,react.createElement)(scrollable_component,(0,esm_extends.A)({},otherProps,{ref:forwardedRef})):(0,react.createElement)(component.A,(0,esm_extends.A)({},otherProps,{ref:forwardedRef}))}),"CardBody")}}]);
|
|
@ -0,0 +1,233 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[1050],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-body/component.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ card_body_component)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
||||
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/context-connect.js
|
||||
var context_connect = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/context-connect.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/view/component.js
|
||||
var component = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/view/component.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/use-context-system.js + 1 modules
|
||||
var use_context_system = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/use-context-system.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js
|
||||
var emotion_react_browser_esm = __webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/config-values.js
|
||||
var config_values = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/config-values.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/scrollable/styles.js
|
||||
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
const scrollableScrollbar = /*#__PURE__*/(0,emotion_react_browser_esm/* css */.AH)("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:", config_values/* default */.A.colorScrollbarTrack, ";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:", config_values/* default */.A.colorScrollbarThumb, ";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:", config_values/* default */.A.colorScrollbarThumbHover, ";}}" + ( true ? "" : 0), true ? "" : 0);
|
||||
const Scrollable = true ? {
|
||||
name: "13udsys",
|
||||
styles: "height:100%"
|
||||
} : 0;
|
||||
const Content = true ? {
|
||||
name: "bjn8wh",
|
||||
styles: "position:relative"
|
||||
} : 0;
|
||||
const styles_smoothScroll = true ? {
|
||||
name: "7zq9w",
|
||||
styles: "scroll-behavior:smooth"
|
||||
} : 0;
|
||||
const scrollX = true ? {
|
||||
name: "q33xhg",
|
||||
styles: "overflow-x:auto;overflow-y:hidden"
|
||||
} : 0;
|
||||
const scrollY = true ? {
|
||||
name: "103x71s",
|
||||
styles: "overflow-x:hidden;overflow-y:auto"
|
||||
} : 0;
|
||||
const scrollAuto = true ? {
|
||||
name: "umwchj",
|
||||
styles: "overflow-y:auto"
|
||||
} : 0;
|
||||
//# sourceMappingURL=styles.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js
|
||||
var use_cx = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/scrollable/hook.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/* eslint-disable jsdoc/valid-types */
|
||||
|
||||
/**
|
||||
* @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props
|
||||
*/
|
||||
|
||||
/* eslint-enable jsdoc/valid-types */
|
||||
|
||||
function useScrollable(props) {
|
||||
const {
|
||||
className,
|
||||
scrollDirection = 'y',
|
||||
smoothScroll = false,
|
||||
...otherProps
|
||||
} = (0,use_context_system/* useContextSystem */.A)(props, 'Scrollable');
|
||||
const cx = (0,use_cx/* useCx */.l)();
|
||||
const classes = (0,react.useMemo)(() => cx(Scrollable, scrollableScrollbar, smoothScroll && styles_smoothScroll, scrollDirection === 'x' && scrollX, scrollDirection === 'y' && scrollY, scrollDirection === 'auto' && scrollAuto, className), [className, cx, scrollDirection, smoothScroll]);
|
||||
return { ...otherProps,
|
||||
className: classes
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=hook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/scrollable/component.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props
|
||||
* @param {import('react').ForwardedRef<any>} forwardedRef
|
||||
*/
|
||||
|
||||
function component_Scrollable(props, forwardedRef) {
|
||||
const scrollableProps = useScrollable(props);
|
||||
return (0,react.createElement)(component/* default */.A, (0,esm_extends/* default */.A)({}, scrollableProps, {
|
||||
ref: forwardedRef
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* `Scrollable` is a layout component that content in a scrollable container.
|
||||
*
|
||||
* @example
|
||||
* ```jsx
|
||||
* import { __experimentalScrollable as Scrollable } from `@wordpress/components`;
|
||||
*
|
||||
* function Example() {
|
||||
* return (
|
||||
* <Scrollable style={ { maxHeight: 200 } }>
|
||||
* <div style={ { height: 500 } }>...</div>
|
||||
* </Scrollable>
|
||||
* );
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
|
||||
|
||||
const ConnectedScrollable = (0,context_connect/* contextConnect */.KZ)(component_Scrollable, 'Scrollable');
|
||||
/* harmony default export */ const scrollable_component = (ConnectedScrollable);
|
||||
//# sourceMappingURL=component.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/styles.js
|
||||
var styles = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/styles.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-body/hook.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../../ui/context').WordPressComponentProps<import('../types').BodyProps, 'div'>} props
|
||||
*/
|
||||
|
||||
function useCardBody(props) {
|
||||
const {
|
||||
className,
|
||||
isScrollable = false,
|
||||
isShady = false,
|
||||
size = 'medium',
|
||||
...otherProps
|
||||
} = (0,use_context_system/* useContextSystem */.A)(props, 'CardBody');
|
||||
const cx = (0,use_cx/* useCx */.l)();
|
||||
const classes = (0,react.useMemo)(() => cx(styles/* Body */.nB, styles/* borderRadius */.Vq, styles/* cardPaddings */.L7[size], isShady && styles/* shady */.QC, // This classname is added for legacy compatibility reasons.
|
||||
'components-card__body', className), [className, cx, isShady, size]);
|
||||
return { ...otherProps,
|
||||
className: classes,
|
||||
isScrollable
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=hook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-body/component.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../../ui/context').WordPressComponentProps<import('../types').BodyProps, 'div'>} props
|
||||
* @param {import('react').ForwardedRef<any>} forwardedRef
|
||||
*/
|
||||
|
||||
function CardBody(props, forwardedRef) {
|
||||
const {
|
||||
isScrollable,
|
||||
...otherProps
|
||||
} = useCardBody(props);
|
||||
|
||||
if (isScrollable) {
|
||||
return (0,react.createElement)(scrollable_component, (0,esm_extends/* default */.A)({}, otherProps, {
|
||||
ref: forwardedRef
|
||||
}));
|
||||
}
|
||||
|
||||
return (0,react.createElement)(component/* default */.A, (0,esm_extends/* default */.A)({}, otherProps, {
|
||||
ref: forwardedRef
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* `CardBody` renders an optional content area for a `Card`.
|
||||
* Multiple `CardBody` components can be used within `Card` if needed.
|
||||
*
|
||||
* @example
|
||||
* ```jsx
|
||||
* import { Card, CardBody } from `@wordpress/components`;
|
||||
*
|
||||
* <Card>
|
||||
* <CardBody>
|
||||
* ...
|
||||
* </CardBody>
|
||||
* </Card>
|
||||
* ```
|
||||
*/
|
||||
|
||||
|
||||
const ConnectedCardBody = (0,context_connect/* contextConnect */.KZ)(CardBody, 'CardBody');
|
||||
/* harmony default export */ const card_body_component = (ConnectedCardBody);
|
||||
//# sourceMappingURL=component.js.map
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,55 @@
|
|||
/*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"1135.c1af66ad.iframe.bundle.js","mappings":";;AAUA;AACA;;;;;AAOA;;AAEA","sources":["webpack://@woocommerce/storybook/../../node_modules/.pnpm/@storybook+core-events@7.6.19/node_modules/@storybook/core-events/dist/errors/preview-errors.mjs"],"sourcesContent":["import { StorybookError } from '../chunk-3FIG6PJN.mjs';\nimport dedent from 'ts-dedent';\n\nvar Category=(Category2=>(Category2.PREVIEW_CLIENT_LOGGER=\"PREVIEW_CLIENT-LOGGER\",Category2.PREVIEW_CHANNELS=\"PREVIEW_CHANNELS\",Category2.PREVIEW_CORE_EVENTS=\"PREVIEW_CORE-EVENTS\",Category2.PREVIEW_INSTRUMENTER=\"PREVIEW_INSTRUMENTER\",Category2.PREVIEW_API=\"PREVIEW_API\",Category2.PREVIEW_REACT_DOM_SHIM=\"PREVIEW_REACT-DOM-SHIM\",Category2.PREVIEW_ROUTER=\"PREVIEW_ROUTER\",Category2.PREVIEW_THEMING=\"PREVIEW_THEMING\",Category2.RENDERER_HTML=\"RENDERER_HTML\",Category2.RENDERER_PREACT=\"RENDERER_PREACT\",Category2.RENDERER_REACT=\"RENDERER_REACT\",Category2.RENDERER_SERVER=\"RENDERER_SERVER\",Category2.RENDERER_SVELTE=\"RENDERER_SVELTE\",Category2.RENDERER_VUE=\"RENDERER_VUE\",Category2.RENDERER_VUE3=\"RENDERER_VUE3\",Category2.RENDERER_WEB_COMPONENTS=\"RENDERER_WEB-COMPONENTS\",Category2))(Category||{}),MissingStoryAfterHmrError=class extends StorybookError{constructor(data){super();this.data=data;this.category=\"PREVIEW_API\";this.code=1;}template(){return dedent`\n Couldn't find story matching id '${this.data.storyId}' after HMR.\n - Did you just rename a story?\n - Did you remove it from your CSF file?\n - Are you sure a story with the id '${this.data.storyId}' exists?\n - Please check the values in the stories field of your main.js config and see if they would match your CSF File.\n - Also check the browser console and terminal for potential error messages.`}},ImplicitActionsDuringRendering=class extends StorybookError{constructor(data){super();this.data=data;this.category=\"PREVIEW_API\";this.code=2;this.documentation=\"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-for-example-in-the-play-function\";}template(){return dedent`\n We detected that you use an implicit action arg during ${this.data.phase} of your story. \n ${this.data.deprecated?`\nThis is deprecated and won't work in Storybook 8 anymore.\n`:\"\"}\n Please provide an explicit spy to your args like this:\n import { fn } from '@storybook/test';\n ... \n args: {\n ${this.data.name}: fn()\n }\n `}};\n\nexport { Category, ImplicitActionsDuringRendering, MissingStoryAfterHmrError };\n"],"names":[],"sourceRoot":""}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,759 @@
|
|||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[1313],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js":
|
||||
/***/ ((module, exports, __webpack_require__) => {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
|
||||
|
||||
!function() {
|
||||
'use strict'
|
||||
|
||||
var re = {
|
||||
not_string: /[^s]/,
|
||||
not_bool: /[^t]/,
|
||||
not_type: /[^T]/,
|
||||
not_primitive: /[^v]/,
|
||||
number: /[diefg]/,
|
||||
numeric_arg: /[bcdiefguxX]/,
|
||||
json: /[j]/,
|
||||
not_json: /[^j]/,
|
||||
text: /^[^\x25]+/,
|
||||
modulo: /^\x25{2}/,
|
||||
placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
|
||||
key: /^([a-z_][a-z_\d]*)/i,
|
||||
key_access: /^\.([a-z_][a-z_\d]*)/i,
|
||||
index_access: /^\[(\d+)\]/,
|
||||
sign: /^[+-]/
|
||||
}
|
||||
|
||||
function sprintf(key) {
|
||||
// `arguments` is not an array, but should be fine for this call
|
||||
return sprintf_format(sprintf_parse(key), arguments)
|
||||
}
|
||||
|
||||
function vsprintf(fmt, argv) {
|
||||
return sprintf.apply(null, [fmt].concat(argv || []))
|
||||
}
|
||||
|
||||
function sprintf_format(parse_tree, argv) {
|
||||
var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign
|
||||
for (i = 0; i < tree_length; i++) {
|
||||
if (typeof parse_tree[i] === 'string') {
|
||||
output += parse_tree[i]
|
||||
}
|
||||
else if (typeof parse_tree[i] === 'object') {
|
||||
ph = parse_tree[i] // convenience purposes only
|
||||
if (ph.keys) { // keyword argument
|
||||
arg = argv[cursor]
|
||||
for (k = 0; k < ph.keys.length; k++) {
|
||||
if (arg == undefined) {
|
||||
throw new Error(sprintf('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k-1]))
|
||||
}
|
||||
arg = arg[ph.keys[k]]
|
||||
}
|
||||
}
|
||||
else if (ph.param_no) { // positional argument (explicit)
|
||||
arg = argv[ph.param_no]
|
||||
}
|
||||
else { // positional argument (implicit)
|
||||
arg = argv[cursor++]
|
||||
}
|
||||
|
||||
if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
|
||||
arg = arg()
|
||||
}
|
||||
|
||||
if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {
|
||||
throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
|
||||
}
|
||||
|
||||
if (re.number.test(ph.type)) {
|
||||
is_positive = arg >= 0
|
||||
}
|
||||
|
||||
switch (ph.type) {
|
||||
case 'b':
|
||||
arg = parseInt(arg, 10).toString(2)
|
||||
break
|
||||
case 'c':
|
||||
arg = String.fromCharCode(parseInt(arg, 10))
|
||||
break
|
||||
case 'd':
|
||||
case 'i':
|
||||
arg = parseInt(arg, 10)
|
||||
break
|
||||
case 'j':
|
||||
arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)
|
||||
break
|
||||
case 'e':
|
||||
arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()
|
||||
break
|
||||
case 'f':
|
||||
arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)
|
||||
break
|
||||
case 'g':
|
||||
arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)
|
||||
break
|
||||
case 'o':
|
||||
arg = (parseInt(arg, 10) >>> 0).toString(8)
|
||||
break
|
||||
case 's':
|
||||
arg = String(arg)
|
||||
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
|
||||
break
|
||||
case 't':
|
||||
arg = String(!!arg)
|
||||
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
|
||||
break
|
||||
case 'T':
|
||||
arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()
|
||||
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
|
||||
break
|
||||
case 'u':
|
||||
arg = parseInt(arg, 10) >>> 0
|
||||
break
|
||||
case 'v':
|
||||
arg = arg.valueOf()
|
||||
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
|
||||
break
|
||||
case 'x':
|
||||
arg = (parseInt(arg, 10) >>> 0).toString(16)
|
||||
break
|
||||
case 'X':
|
||||
arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()
|
||||
break
|
||||
}
|
||||
if (re.json.test(ph.type)) {
|
||||
output += arg
|
||||
}
|
||||
else {
|
||||
if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
|
||||
sign = is_positive ? '+' : '-'
|
||||
arg = arg.toString().replace(re.sign, '')
|
||||
}
|
||||
else {
|
||||
sign = ''
|
||||
}
|
||||
pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '
|
||||
pad_length = ph.width - (sign + arg).length
|
||||
pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''
|
||||
output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)
|
||||
}
|
||||
}
|
||||
}
|
||||
return output
|
||||
}
|
||||
|
||||
var sprintf_cache = Object.create(null)
|
||||
|
||||
function sprintf_parse(fmt) {
|
||||
if (sprintf_cache[fmt]) {
|
||||
return sprintf_cache[fmt]
|
||||
}
|
||||
|
||||
var _fmt = fmt, match, parse_tree = [], arg_names = 0
|
||||
while (_fmt) {
|
||||
if ((match = re.text.exec(_fmt)) !== null) {
|
||||
parse_tree.push(match[0])
|
||||
}
|
||||
else if ((match = re.modulo.exec(_fmt)) !== null) {
|
||||
parse_tree.push('%')
|
||||
}
|
||||
else if ((match = re.placeholder.exec(_fmt)) !== null) {
|
||||
if (match[2]) {
|
||||
arg_names |= 1
|
||||
var field_list = [], replacement_field = match[2], field_match = []
|
||||
if ((field_match = re.key.exec(replacement_field)) !== null) {
|
||||
field_list.push(field_match[1])
|
||||
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
|
||||
if ((field_match = re.key_access.exec(replacement_field)) !== null) {
|
||||
field_list.push(field_match[1])
|
||||
}
|
||||
else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
|
||||
field_list.push(field_match[1])
|
||||
}
|
||||
else {
|
||||
throw new SyntaxError('[sprintf] failed to parse named argument key')
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new SyntaxError('[sprintf] failed to parse named argument key')
|
||||
}
|
||||
match[2] = field_list
|
||||
}
|
||||
else {
|
||||
arg_names |= 2
|
||||
}
|
||||
if (arg_names === 3) {
|
||||
throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')
|
||||
}
|
||||
|
||||
parse_tree.push(
|
||||
{
|
||||
placeholder: match[0],
|
||||
param_no: match[1],
|
||||
keys: match[2],
|
||||
sign: match[3],
|
||||
pad_char: match[4],
|
||||
align: match[5],
|
||||
width: match[6],
|
||||
precision: match[7],
|
||||
type: match[8]
|
||||
}
|
||||
)
|
||||
}
|
||||
else {
|
||||
throw new SyntaxError('[sprintf] unexpected placeholder')
|
||||
}
|
||||
_fmt = _fmt.substring(match[0].length)
|
||||
}
|
||||
return sprintf_cache[fmt] = parse_tree
|
||||
}
|
||||
|
||||
/**
|
||||
* export to either browser or node.js
|
||||
*/
|
||||
/* eslint-disable quote-props */
|
||||
if (true) {
|
||||
exports.sprintf = sprintf
|
||||
exports.vsprintf = vsprintf
|
||||
}
|
||||
if (typeof window !== 'undefined') {
|
||||
window['sprintf'] = sprintf
|
||||
window['vsprintf'] = vsprintf
|
||||
|
||||
if (true) {
|
||||
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
|
||||
return {
|
||||
'sprintf': sprintf,
|
||||
'vsprintf': vsprintf
|
||||
}
|
||||
}).call(exports, __webpack_require__, exports, module),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))
|
||||
}
|
||||
}
|
||||
/* eslint-enable quote-props */
|
||||
}(); // eslint-disable-line
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/tannin@1.2.0/node_modules/tannin/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ Tannin)
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tannin+postfix@1.1.0/node_modules/@tannin/postfix/index.js
|
||||
var PRECEDENCE, OPENERS, TERMINATORS, PATTERN;
|
||||
|
||||
/**
|
||||
* Operator precedence mapping.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
PRECEDENCE = {
|
||||
'(': 9,
|
||||
'!': 8,
|
||||
'*': 7,
|
||||
'/': 7,
|
||||
'%': 7,
|
||||
'+': 6,
|
||||
'-': 6,
|
||||
'<': 5,
|
||||
'<=': 5,
|
||||
'>': 5,
|
||||
'>=': 5,
|
||||
'==': 4,
|
||||
'!=': 4,
|
||||
'&&': 3,
|
||||
'||': 2,
|
||||
'?': 1,
|
||||
'?:': 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* Characters which signal pair opening, to be terminated by terminators.
|
||||
*
|
||||
* @type {string[]}
|
||||
*/
|
||||
OPENERS = [ '(', '?' ];
|
||||
|
||||
/**
|
||||
* Characters which signal pair termination, the value an array with the
|
||||
* opener as its first member. The second member is an optional operator
|
||||
* replacement to push to the stack.
|
||||
*
|
||||
* @type {string[]}
|
||||
*/
|
||||
TERMINATORS = {
|
||||
')': [ '(' ],
|
||||
':': [ '?', '?:' ],
|
||||
};
|
||||
|
||||
/**
|
||||
* Pattern matching operators and openers.
|
||||
*
|
||||
* @type {RegExp}
|
||||
*/
|
||||
PATTERN = /<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;
|
||||
|
||||
/**
|
||||
* Given a C expression, returns the equivalent postfix (Reverse Polish)
|
||||
* notation terms as an array.
|
||||
*
|
||||
* If a postfix string is desired, simply `.join( ' ' )` the result.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* ```js
|
||||
* import postfix from '@tannin/postfix';
|
||||
*
|
||||
* postfix( 'n > 1' );
|
||||
* // ⇒ [ 'n', '1', '>' ]
|
||||
* ```
|
||||
*
|
||||
* @param {string} expression C expression.
|
||||
*
|
||||
* @return {string[]} Postfix terms.
|
||||
*/
|
||||
function postfix( expression ) {
|
||||
var terms = [],
|
||||
stack = [],
|
||||
match, operator, term, element;
|
||||
|
||||
while ( ( match = expression.match( PATTERN ) ) ) {
|
||||
operator = match[ 0 ];
|
||||
|
||||
// Term is the string preceding the operator match. It may contain
|
||||
// whitespace, and may be empty (if operator is at beginning).
|
||||
term = expression.substr( 0, match.index ).trim();
|
||||
if ( term ) {
|
||||
terms.push( term );
|
||||
}
|
||||
|
||||
while ( ( element = stack.pop() ) ) {
|
||||
if ( TERMINATORS[ operator ] ) {
|
||||
if ( TERMINATORS[ operator ][ 0 ] === element ) {
|
||||
// Substitution works here under assumption that because
|
||||
// the assigned operator will no longer be a terminator, it
|
||||
// will be pushed to the stack during the condition below.
|
||||
operator = TERMINATORS[ operator ][ 1 ] || operator;
|
||||
break;
|
||||
}
|
||||
} else if ( OPENERS.indexOf( element ) >= 0 || PRECEDENCE[ element ] < PRECEDENCE[ operator ] ) {
|
||||
// Push to stack if either an opener or when pop reveals an
|
||||
// element of lower precedence.
|
||||
stack.push( element );
|
||||
break;
|
||||
}
|
||||
|
||||
// For each popped from stack, push to terms.
|
||||
terms.push( element );
|
||||
}
|
||||
|
||||
if ( ! TERMINATORS[ operator ] ) {
|
||||
stack.push( operator );
|
||||
}
|
||||
|
||||
// Slice matched fragment from expression to continue match.
|
||||
expression = expression.substr( match.index + operator.length );
|
||||
}
|
||||
|
||||
// Push remainder of operand, if exists, to terms.
|
||||
expression = expression.trim();
|
||||
if ( expression ) {
|
||||
terms.push( expression );
|
||||
}
|
||||
|
||||
// Pop remaining items from stack into terms.
|
||||
return terms.concat( stack.reverse() );
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tannin+evaluate@1.2.0/node_modules/@tannin/evaluate/index.js
|
||||
/**
|
||||
* Operator callback functions.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
var OPERATORS = {
|
||||
'!': function( a ) {
|
||||
return ! a;
|
||||
},
|
||||
'*': function( a, b ) {
|
||||
return a * b;
|
||||
},
|
||||
'/': function( a, b ) {
|
||||
return a / b;
|
||||
},
|
||||
'%': function( a, b ) {
|
||||
return a % b;
|
||||
},
|
||||
'+': function( a, b ) {
|
||||
return a + b;
|
||||
},
|
||||
'-': function( a, b ) {
|
||||
return a - b;
|
||||
},
|
||||
'<': function( a, b ) {
|
||||
return a < b;
|
||||
},
|
||||
'<=': function( a, b ) {
|
||||
return a <= b;
|
||||
},
|
||||
'>': function( a, b ) {
|
||||
return a > b;
|
||||
},
|
||||
'>=': function( a, b ) {
|
||||
return a >= b;
|
||||
},
|
||||
'==': function( a, b ) {
|
||||
return a === b;
|
||||
},
|
||||
'!=': function( a, b ) {
|
||||
return a !== b;
|
||||
},
|
||||
'&&': function( a, b ) {
|
||||
return a && b;
|
||||
},
|
||||
'||': function( a, b ) {
|
||||
return a || b;
|
||||
},
|
||||
'?:': function( a, b, c ) {
|
||||
if ( a ) {
|
||||
throw b;
|
||||
}
|
||||
|
||||
return c;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Given an array of postfix terms and operand variables, returns the result of
|
||||
* the postfix evaluation.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* ```js
|
||||
* import evaluate from '@tannin/evaluate';
|
||||
*
|
||||
* // 3 + 4 * 5 / 6 ⇒ '3 4 5 * 6 / +'
|
||||
* const terms = [ '3', '4', '5', '*', '6', '/', '+' ];
|
||||
*
|
||||
* evaluate( terms, {} );
|
||||
* // ⇒ 6.333333333333334
|
||||
* ```
|
||||
*
|
||||
* @param {string[]} postfix Postfix terms.
|
||||
* @param {Object} variables Operand variables.
|
||||
*
|
||||
* @return {*} Result of evaluation.
|
||||
*/
|
||||
function evaluate( postfix, variables ) {
|
||||
var stack = [],
|
||||
i, j, args, getOperatorResult, term, value;
|
||||
|
||||
for ( i = 0; i < postfix.length; i++ ) {
|
||||
term = postfix[ i ];
|
||||
|
||||
getOperatorResult = OPERATORS[ term ];
|
||||
if ( getOperatorResult ) {
|
||||
// Pop from stack by number of function arguments.
|
||||
j = getOperatorResult.length;
|
||||
args = Array( j );
|
||||
while ( j-- ) {
|
||||
args[ j ] = stack.pop();
|
||||
}
|
||||
|
||||
try {
|
||||
value = getOperatorResult.apply( null, args );
|
||||
} catch ( earlyReturn ) {
|
||||
return earlyReturn;
|
||||
}
|
||||
} else if ( variables.hasOwnProperty( term ) ) {
|
||||
value = variables[ term ];
|
||||
} else {
|
||||
value = +term;
|
||||
}
|
||||
|
||||
stack.push( value );
|
||||
}
|
||||
|
||||
return stack[ 0 ];
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tannin+compile@1.1.0/node_modules/@tannin/compile/index.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given a C expression, returns a function which can be called to evaluate its
|
||||
* result.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* ```js
|
||||
* import compile from '@tannin/compile';
|
||||
*
|
||||
* const evaluate = compile( 'n > 1' );
|
||||
*
|
||||
* evaluate( { n: 2 } );
|
||||
* // ⇒ true
|
||||
* ```
|
||||
*
|
||||
* @param {string} expression C expression.
|
||||
*
|
||||
* @return {(variables?:{[variable:string]:*})=>*} Compiled evaluator.
|
||||
*/
|
||||
function compile( expression ) {
|
||||
var terms = postfix( expression );
|
||||
|
||||
return function( variables ) {
|
||||
return evaluate( terms, variables );
|
||||
};
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@tannin+plural-forms@1.1.0/node_modules/@tannin/plural-forms/index.js
|
||||
|
||||
|
||||
/**
|
||||
* Given a C expression, returns a function which, when called with a value,
|
||||
* evaluates the result with the value assumed to be the "n" variable of the
|
||||
* expression. The result will be coerced to its numeric equivalent.
|
||||
*
|
||||
* @param {string} expression C expression.
|
||||
*
|
||||
* @return {Function} Evaluator function.
|
||||
*/
|
||||
function pluralForms( expression ) {
|
||||
var evaluate = compile( expression );
|
||||
|
||||
return function( n ) {
|
||||
return +evaluate( { n: n } );
|
||||
};
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/tannin@1.2.0/node_modules/tannin/index.js
|
||||
|
||||
|
||||
/**
|
||||
* Tannin constructor options.
|
||||
*
|
||||
* @typedef {Object} TanninOptions
|
||||
*
|
||||
* @property {string} [contextDelimiter] Joiner in string lookup with context.
|
||||
* @property {Function} [onMissingKey] Callback to invoke when key missing.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Domain metadata.
|
||||
*
|
||||
* @typedef {Object} TanninDomainMetadata
|
||||
*
|
||||
* @property {string} [domain] Domain name.
|
||||
* @property {string} [lang] Language code.
|
||||
* @property {(string|Function)} [plural_forms] Plural forms expression or
|
||||
* function evaluator.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Domain translation pair respectively representing the singular and plural
|
||||
* translation.
|
||||
*
|
||||
* @typedef {[string,string]} TanninTranslation
|
||||
*/
|
||||
|
||||
/**
|
||||
* Locale data domain. The key is used as reference for lookup, the value an
|
||||
* array of two string entries respectively representing the singular and plural
|
||||
* translation.
|
||||
*
|
||||
* @typedef {{[key:string]:TanninDomainMetadata|TanninTranslation,'':TanninDomainMetadata|TanninTranslation}} TanninLocaleDomain
|
||||
*/
|
||||
|
||||
/**
|
||||
* Jed-formatted locale data.
|
||||
*
|
||||
* @see http://messageformat.github.io/Jed/
|
||||
*
|
||||
* @typedef {{[domain:string]:TanninLocaleDomain}} TanninLocaleData
|
||||
*/
|
||||
|
||||
/**
|
||||
* Default Tannin constructor options.
|
||||
*
|
||||
* @type {TanninOptions}
|
||||
*/
|
||||
var DEFAULT_OPTIONS = {
|
||||
contextDelimiter: '\u0004',
|
||||
onMissingKey: null,
|
||||
};
|
||||
|
||||
/**
|
||||
* Given a specific locale data's config `plural_forms` value, returns the
|
||||
* expression.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* ```
|
||||
* getPluralExpression( 'nplurals=2; plural=(n != 1);' ) === '(n != 1)'
|
||||
* ```
|
||||
*
|
||||
* @param {string} pf Locale data plural forms.
|
||||
*
|
||||
* @return {string} Plural forms expression.
|
||||
*/
|
||||
function getPluralExpression( pf ) {
|
||||
var parts, i, part;
|
||||
|
||||
parts = pf.split( ';' );
|
||||
|
||||
for ( i = 0; i < parts.length; i++ ) {
|
||||
part = parts[ i ].trim();
|
||||
if ( part.indexOf( 'plural=' ) === 0 ) {
|
||||
return part.substr( 7 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tannin constructor.
|
||||
*
|
||||
* @class
|
||||
*
|
||||
* @param {TanninLocaleData} data Jed-formatted locale data.
|
||||
* @param {TanninOptions} [options] Tannin options.
|
||||
*/
|
||||
function Tannin( data, options ) {
|
||||
var key;
|
||||
|
||||
/**
|
||||
* Jed-formatted locale data.
|
||||
*
|
||||
* @name Tannin#data
|
||||
* @type {TanninLocaleData}
|
||||
*/
|
||||
this.data = data;
|
||||
|
||||
/**
|
||||
* Plural forms function cache, keyed by plural forms string.
|
||||
*
|
||||
* @name Tannin#pluralForms
|
||||
* @type {Object<string,Function>}
|
||||
*/
|
||||
this.pluralForms = {};
|
||||
|
||||
/**
|
||||
* Effective options for instance, including defaults.
|
||||
*
|
||||
* @name Tannin#options
|
||||
* @type {TanninOptions}
|
||||
*/
|
||||
this.options = {};
|
||||
|
||||
for ( key in DEFAULT_OPTIONS ) {
|
||||
this.options[ key ] = options !== undefined && key in options
|
||||
? options[ key ]
|
||||
: DEFAULT_OPTIONS[ key ];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the plural form index for the given domain and value.
|
||||
*
|
||||
* @param {string} domain Domain on which to calculate plural form.
|
||||
* @param {number} n Value for which plural form is to be calculated.
|
||||
*
|
||||
* @return {number} Plural form index.
|
||||
*/
|
||||
Tannin.prototype.getPluralForm = function( domain, n ) {
|
||||
var getPluralForm = this.pluralForms[ domain ],
|
||||
config, plural, pf;
|
||||
|
||||
if ( ! getPluralForm ) {
|
||||
config = this.data[ domain ][ '' ];
|
||||
|
||||
pf = (
|
||||
config[ 'Plural-Forms' ] ||
|
||||
config[ 'plural-forms' ] ||
|
||||
// Ignore reason: As known, there's no way to document the empty
|
||||
// string property on a key to guarantee this as metadata.
|
||||
// @ts-ignore
|
||||
config.plural_forms
|
||||
);
|
||||
|
||||
if ( typeof pf !== 'function' ) {
|
||||
plural = getPluralExpression(
|
||||
config[ 'Plural-Forms' ] ||
|
||||
config[ 'plural-forms' ] ||
|
||||
// Ignore reason: As known, there's no way to document the empty
|
||||
// string property on a key to guarantee this as metadata.
|
||||
// @ts-ignore
|
||||
config.plural_forms
|
||||
);
|
||||
|
||||
pf = pluralForms( plural );
|
||||
}
|
||||
|
||||
getPluralForm = this.pluralForms[ domain ] = pf;
|
||||
}
|
||||
|
||||
return getPluralForm( n );
|
||||
};
|
||||
|
||||
/**
|
||||
* Translate a string.
|
||||
*
|
||||
* @param {string} domain Translation domain.
|
||||
* @param {string|void} context Context distinguishing terms of the same name.
|
||||
* @param {string} singular Primary key for translation lookup.
|
||||
* @param {string=} plural Fallback value used for non-zero plural
|
||||
* form index.
|
||||
* @param {number=} n Value to use in calculating plural form.
|
||||
*
|
||||
* @return {string} Translated string.
|
||||
*/
|
||||
Tannin.prototype.dcnpgettext = function( domain, context, singular, plural, n ) {
|
||||
var index, key, entry;
|
||||
|
||||
if ( n === undefined ) {
|
||||
// Default to singular.
|
||||
index = 0;
|
||||
} else {
|
||||
// Find index by evaluating plural form for value.
|
||||
index = this.getPluralForm( domain, n );
|
||||
}
|
||||
|
||||
key = singular;
|
||||
|
||||
// If provided, context is prepended to key with delimiter.
|
||||
if ( context ) {
|
||||
key = context + this.options.contextDelimiter + singular;
|
||||
}
|
||||
|
||||
entry = this.data[ domain ][ key ];
|
||||
|
||||
// Verify not only that entry exists, but that the intended index is within
|
||||
// range and non-empty.
|
||||
if ( entry && entry[ index ] ) {
|
||||
return entry[ index ];
|
||||
}
|
||||
|
||||
if ( this.options.onMissingKey ) {
|
||||
this.options.onMissingKey( singular, domain );
|
||||
}
|
||||
|
||||
// If entry not found, fall back to singular vs. plural with zero index
|
||||
// representing the singular value.
|
||||
return index === 0 ? singular : plural;
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
|
@ -0,0 +1,801 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[133],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+i18n@4.47.0/node_modules/@wordpress/i18n/build-module/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
__: () => (/* reexport */ __),
|
||||
_n: () => (/* reexport */ _n),
|
||||
_x: () => (/* reexport */ _x),
|
||||
V8: () => (/* reexport */ isRTL),
|
||||
nv: () => (/* reexport */ sprintf_sprintf)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: _nx, createI18n, defaultI18n, getLocaleData, hasTranslation, resetLocaleData, setLocaleData, subscribe
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/memize@2.1.0/node_modules/memize/dist/index.js
|
||||
var dist = __webpack_require__("../../node_modules/.pnpm/memize@2.1.0/node_modules/memize/dist/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js
|
||||
var sprintf = __webpack_require__("../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js");
|
||||
var sprintf_default = /*#__PURE__*/__webpack_require__.n(sprintf);
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+i18n@4.47.0/node_modules/@wordpress/i18n/build-module/sprintf.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Log to console, once per message; or more precisely, per referentially equal
|
||||
* argument set. Because Jed throws errors, we log these to the console instead
|
||||
* to avoid crashing the application.
|
||||
*
|
||||
* @param {...*} args Arguments to pass to `console.error`
|
||||
*/
|
||||
const logErrorOnce = (0,dist/* default */.A)(console.error); // eslint-disable-line no-console
|
||||
|
||||
/**
|
||||
* Returns a formatted string. If an error occurs in applying the format, the
|
||||
* original format string is returned.
|
||||
*
|
||||
* @param {string} format The format of the string to generate.
|
||||
* @param {...*} args Arguments to apply to the format.
|
||||
*
|
||||
* @see https://www.npmjs.com/package/sprintf-js
|
||||
*
|
||||
* @return {string} The formatted string.
|
||||
*/
|
||||
function sprintf_sprintf(format, ...args) {
|
||||
try {
|
||||
return sprintf_default().sprintf(format, ...args);
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
logErrorOnce('sprintf error: \n\n' + error.toString());
|
||||
}
|
||||
return format;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=sprintf.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/tannin@1.2.0/node_modules/tannin/index.js + 4 modules
|
||||
var node_modules_tannin = __webpack_require__("../../node_modules/.pnpm/tannin@1.2.0/node_modules/tannin/index.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+i18n@4.47.0/node_modules/@wordpress/i18n/build-module/create-i18n.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Record<string,any>} LocaleData
|
||||
*/
|
||||
|
||||
/**
|
||||
* Default locale data to use for Tannin domain when not otherwise provided.
|
||||
* Assumes an English plural forms expression.
|
||||
*
|
||||
* @type {LocaleData}
|
||||
*/
|
||||
const DEFAULT_LOCALE_DATA = {
|
||||
'': {
|
||||
/** @param {number} n */
|
||||
plural_forms(n) {
|
||||
return n === 1 ? 0 : 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Regular expression that matches i18n hooks like `i18n.gettext`, `i18n.ngettext`,
|
||||
* `i18n.gettext_domain` or `i18n.ngettext_with_context` or `i18n.has_translation`.
|
||||
*/
|
||||
const I18N_HOOK_REGEXP = /^i18n\.(n?gettext|has_translation)(_|$)/;
|
||||
|
||||
/**
|
||||
* @typedef {(domain?: string) => LocaleData} GetLocaleData
|
||||
*
|
||||
* Returns locale data by domain in a
|
||||
* Jed-formatted JSON object shape.
|
||||
*
|
||||
* @see http://messageformat.github.io/Jed/
|
||||
*/
|
||||
/**
|
||||
* @typedef {(data?: LocaleData, domain?: string) => void} SetLocaleData
|
||||
*
|
||||
* Merges locale data into the Tannin instance by domain. Note that this
|
||||
* function will overwrite the domain configuration. Accepts data in a
|
||||
* Jed-formatted JSON object shape.
|
||||
*
|
||||
* @see http://messageformat.github.io/Jed/
|
||||
*/
|
||||
/**
|
||||
* @typedef {(data?: LocaleData, domain?: string) => void} AddLocaleData
|
||||
*
|
||||
* Merges locale data into the Tannin instance by domain. Note that this
|
||||
* function will also merge the domain configuration. Accepts data in a
|
||||
* Jed-formatted JSON object shape.
|
||||
*
|
||||
* @see http://messageformat.github.io/Jed/
|
||||
*/
|
||||
/**
|
||||
* @typedef {(data?: LocaleData, domain?: string) => void} ResetLocaleData
|
||||
*
|
||||
* Resets all current Tannin instance locale data and sets the specified
|
||||
* locale data for the domain. Accepts data in a Jed-formatted JSON object shape.
|
||||
*
|
||||
* @see http://messageformat.github.io/Jed/
|
||||
*/
|
||||
/** @typedef {() => void} SubscribeCallback */
|
||||
/** @typedef {() => void} UnsubscribeCallback */
|
||||
/**
|
||||
* @typedef {(callback: SubscribeCallback) => UnsubscribeCallback} Subscribe
|
||||
*
|
||||
* Subscribes to changes of locale data
|
||||
*/
|
||||
/**
|
||||
* @typedef {(domain?: string) => string} GetFilterDomain
|
||||
* Retrieve the domain to use when calling domain-specific filters.
|
||||
*/
|
||||
/**
|
||||
* @typedef {(text: string, domain?: string) => string} __
|
||||
*
|
||||
* Retrieve the translation of text.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/__/
|
||||
*/
|
||||
/**
|
||||
* @typedef {(text: string, context: string, domain?: string) => string} _x
|
||||
*
|
||||
* Retrieve translated string with gettext context.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/_x/
|
||||
*/
|
||||
/**
|
||||
* @typedef {(single: string, plural: string, number: number, domain?: string) => string} _n
|
||||
*
|
||||
* Translates and retrieves the singular or plural form based on the supplied
|
||||
* number.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/_n/
|
||||
*/
|
||||
/**
|
||||
* @typedef {(single: string, plural: string, number: number, context: string, domain?: string) => string} _nx
|
||||
*
|
||||
* Translates and retrieves the singular or plural form based on the supplied
|
||||
* number, with gettext context.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/_nx/
|
||||
*/
|
||||
/**
|
||||
* @typedef {() => boolean} IsRtl
|
||||
*
|
||||
* Check if current locale is RTL.
|
||||
*
|
||||
* **RTL (Right To Left)** is a locale property indicating that text is written from right to left.
|
||||
* For example, the `he` locale (for Hebrew) specifies right-to-left. Arabic (ar) is another common
|
||||
* language written RTL. The opposite of RTL, LTR (Left To Right) is used in other languages,
|
||||
* including English (`en`, `en-US`, `en-GB`, etc.), Spanish (`es`), and French (`fr`).
|
||||
*/
|
||||
/**
|
||||
* @typedef {(single: string, context?: string, domain?: string) => boolean} HasTranslation
|
||||
*
|
||||
* Check if there is a translation for a given string in singular form.
|
||||
*/
|
||||
/** @typedef {import('@wordpress/hooks').Hooks} Hooks */
|
||||
|
||||
/**
|
||||
* An i18n instance
|
||||
*
|
||||
* @typedef I18n
|
||||
* @property {GetLocaleData} getLocaleData Returns locale data by domain in a Jed-formatted JSON object shape.
|
||||
* @property {SetLocaleData} setLocaleData Merges locale data into the Tannin instance by domain. Note that this
|
||||
* function will overwrite the domain configuration. Accepts data in a
|
||||
* Jed-formatted JSON object shape.
|
||||
* @property {AddLocaleData} addLocaleData Merges locale data into the Tannin instance by domain. Note that this
|
||||
* function will also merge the domain configuration. Accepts data in a
|
||||
* Jed-formatted JSON object shape.
|
||||
* @property {ResetLocaleData} resetLocaleData Resets all current Tannin instance locale data and sets the specified
|
||||
* locale data for the domain. Accepts data in a Jed-formatted JSON object shape.
|
||||
* @property {Subscribe} subscribe Subscribes to changes of Tannin locale data.
|
||||
* @property {__} __ Retrieve the translation of text.
|
||||
* @property {_x} _x Retrieve translated string with gettext context.
|
||||
* @property {_n} _n Translates and retrieves the singular or plural form based on the supplied
|
||||
* number.
|
||||
* @property {_nx} _nx Translates and retrieves the singular or plural form based on the supplied
|
||||
* number, with gettext context.
|
||||
* @property {IsRtl} isRTL Check if current locale is RTL.
|
||||
* @property {HasTranslation} hasTranslation Check if there is a translation for a given string.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create an i18n instance
|
||||
*
|
||||
* @param {LocaleData} [initialData] Locale data configuration.
|
||||
* @param {string} [initialDomain] Domain for which configuration applies.
|
||||
* @param {Hooks} [hooks] Hooks implementation.
|
||||
*
|
||||
* @return {I18n} I18n instance.
|
||||
*/
|
||||
const createI18n = (initialData, initialDomain, hooks) => {
|
||||
/**
|
||||
* The underlying instance of Tannin to which exported functions interface.
|
||||
*
|
||||
* @type {Tannin}
|
||||
*/
|
||||
const tannin = new node_modules_tannin/* default */.A({});
|
||||
const listeners = new Set();
|
||||
const notifyListeners = () => {
|
||||
listeners.forEach(listener => listener());
|
||||
};
|
||||
|
||||
/**
|
||||
* Subscribe to changes of locale data.
|
||||
*
|
||||
* @param {SubscribeCallback} callback Subscription callback.
|
||||
* @return {UnsubscribeCallback} Unsubscribe callback.
|
||||
*/
|
||||
const subscribe = callback => {
|
||||
listeners.add(callback);
|
||||
return () => listeners.delete(callback);
|
||||
};
|
||||
|
||||
/** @type {GetLocaleData} */
|
||||
const getLocaleData = (domain = 'default') => tannin.data[domain];
|
||||
|
||||
/**
|
||||
* @param {LocaleData} [data]
|
||||
* @param {string} [domain]
|
||||
*/
|
||||
const doSetLocaleData = (data, domain = 'default') => {
|
||||
tannin.data[domain] = {
|
||||
...tannin.data[domain],
|
||||
...data
|
||||
};
|
||||
|
||||
// Populate default domain configuration (supported locale date which omits
|
||||
// a plural forms expression).
|
||||
tannin.data[domain][''] = {
|
||||
...DEFAULT_LOCALE_DATA[''],
|
||||
...tannin.data[domain]?.['']
|
||||
};
|
||||
|
||||
// Clean up cached plural forms functions cache as it might be updated.
|
||||
delete tannin.pluralForms[domain];
|
||||
};
|
||||
|
||||
/** @type {SetLocaleData} */
|
||||
const setLocaleData = (data, domain) => {
|
||||
doSetLocaleData(data, domain);
|
||||
notifyListeners();
|
||||
};
|
||||
|
||||
/** @type {AddLocaleData} */
|
||||
const addLocaleData = (data, domain = 'default') => {
|
||||
tannin.data[domain] = {
|
||||
...tannin.data[domain],
|
||||
...data,
|
||||
// Populate default domain configuration (supported locale date which omits
|
||||
// a plural forms expression).
|
||||
'': {
|
||||
...DEFAULT_LOCALE_DATA[''],
|
||||
...tannin.data[domain]?.[''],
|
||||
...data?.['']
|
||||
}
|
||||
};
|
||||
|
||||
// Clean up cached plural forms functions cache as it might be updated.
|
||||
delete tannin.pluralForms[domain];
|
||||
notifyListeners();
|
||||
};
|
||||
|
||||
/** @type {ResetLocaleData} */
|
||||
const resetLocaleData = (data, domain) => {
|
||||
// Reset all current Tannin locale data.
|
||||
tannin.data = {};
|
||||
|
||||
// Reset cached plural forms functions cache.
|
||||
tannin.pluralForms = {};
|
||||
setLocaleData(data, domain);
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrapper for Tannin's `dcnpgettext`. Populates default locale data if not
|
||||
* otherwise previously assigned.
|
||||
*
|
||||
* @param {string|undefined} domain Domain to retrieve the translated text.
|
||||
* @param {string|undefined} context Context information for the translators.
|
||||
* @param {string} single Text to translate if non-plural. Used as
|
||||
* fallback return value on a caught error.
|
||||
* @param {string} [plural] The text to be used if the number is
|
||||
* plural.
|
||||
* @param {number} [number] The number to compare against to use
|
||||
* either the singular or plural form.
|
||||
*
|
||||
* @return {string} The translated string.
|
||||
*/
|
||||
const dcnpgettext = (domain = 'default', context, single, plural, number) => {
|
||||
if (!tannin.data[domain]) {
|
||||
// Use `doSetLocaleData` to set silently, without notifying listeners.
|
||||
doSetLocaleData(undefined, domain);
|
||||
}
|
||||
return tannin.dcnpgettext(domain, context, single, plural, number);
|
||||
};
|
||||
|
||||
/** @type {GetFilterDomain} */
|
||||
const getFilterDomain = (domain = 'default') => domain;
|
||||
|
||||
/** @type {__} */
|
||||
const __ = (text, domain) => {
|
||||
let translation = dcnpgettext(domain, undefined, text);
|
||||
if (!hooks) {
|
||||
return translation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters text with its translation.
|
||||
*
|
||||
* @param {string} translation Translated text.
|
||||
* @param {string} text Text to translate.
|
||||
* @param {string} domain Text domain. Unique identifier for retrieving translated strings.
|
||||
*/
|
||||
translation = /** @type {string} */
|
||||
/** @type {*} */hooks.applyFilters('i18n.gettext', translation, text, domain);
|
||||
return (/** @type {string} */
|
||||
/** @type {*} */hooks.applyFilters('i18n.gettext_' + getFilterDomain(domain), translation, text, domain)
|
||||
);
|
||||
};
|
||||
|
||||
/** @type {_x} */
|
||||
const _x = (text, context, domain) => {
|
||||
let translation = dcnpgettext(domain, context, text);
|
||||
if (!hooks) {
|
||||
return translation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters text with its translation based on context information.
|
||||
*
|
||||
* @param {string} translation Translated text.
|
||||
* @param {string} text Text to translate.
|
||||
* @param {string} context Context information for the translators.
|
||||
* @param {string} domain Text domain. Unique identifier for retrieving translated strings.
|
||||
*/
|
||||
translation = /** @type {string} */
|
||||
/** @type {*} */hooks.applyFilters('i18n.gettext_with_context', translation, text, context, domain);
|
||||
return (/** @type {string} */
|
||||
/** @type {*} */hooks.applyFilters('i18n.gettext_with_context_' + getFilterDomain(domain), translation, text, context, domain)
|
||||
);
|
||||
};
|
||||
|
||||
/** @type {_n} */
|
||||
const _n = (single, plural, number, domain) => {
|
||||
let translation = dcnpgettext(domain, undefined, single, plural, number);
|
||||
if (!hooks) {
|
||||
return translation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the singular or plural form of a string.
|
||||
*
|
||||
* @param {string} translation Translated text.
|
||||
* @param {string} single The text to be used if the number is singular.
|
||||
* @param {string} plural The text to be used if the number is plural.
|
||||
* @param {string} number The number to compare against to use either the singular or plural form.
|
||||
* @param {string} domain Text domain. Unique identifier for retrieving translated strings.
|
||||
*/
|
||||
translation = /** @type {string} */
|
||||
/** @type {*} */hooks.applyFilters('i18n.ngettext', translation, single, plural, number, domain);
|
||||
return (/** @type {string} */
|
||||
/** @type {*} */hooks.applyFilters('i18n.ngettext_' + getFilterDomain(domain), translation, single, plural, number, domain)
|
||||
);
|
||||
};
|
||||
|
||||
/** @type {_nx} */
|
||||
const _nx = (single, plural, number, context, domain) => {
|
||||
let translation = dcnpgettext(domain, context, single, plural, number);
|
||||
if (!hooks) {
|
||||
return translation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the singular or plural form of a string with gettext context.
|
||||
*
|
||||
* @param {string} translation Translated text.
|
||||
* @param {string} single The text to be used if the number is singular.
|
||||
* @param {string} plural The text to be used if the number is plural.
|
||||
* @param {string} number The number to compare against to use either the singular or plural form.
|
||||
* @param {string} context Context information for the translators.
|
||||
* @param {string} domain Text domain. Unique identifier for retrieving translated strings.
|
||||
*/
|
||||
translation = /** @type {string} */
|
||||
/** @type {*} */hooks.applyFilters('i18n.ngettext_with_context', translation, single, plural, number, context, domain);
|
||||
return (/** @type {string} */
|
||||
/** @type {*} */hooks.applyFilters('i18n.ngettext_with_context_' + getFilterDomain(domain), translation, single, plural, number, context, domain)
|
||||
);
|
||||
};
|
||||
|
||||
/** @type {IsRtl} */
|
||||
const isRTL = () => {
|
||||
return 'rtl' === _x('ltr', 'text direction');
|
||||
};
|
||||
|
||||
/** @type {HasTranslation} */
|
||||
const hasTranslation = (single, context, domain) => {
|
||||
const key = context ? context + '\u0004' + single : single;
|
||||
let result = !!tannin.data?.[domain !== null && domain !== void 0 ? domain : 'default']?.[key];
|
||||
if (hooks) {
|
||||
/**
|
||||
* Filters the presence of a translation in the locale data.
|
||||
*
|
||||
* @param {boolean} hasTranslation Whether the translation is present or not..
|
||||
* @param {string} single The singular form of the translated text (used as key in locale data)
|
||||
* @param {string} context Context information for the translators.
|
||||
* @param {string} domain Text domain. Unique identifier for retrieving translated strings.
|
||||
*/
|
||||
result = /** @type { boolean } */
|
||||
/** @type {*} */hooks.applyFilters('i18n.has_translation', result, single, context, domain);
|
||||
result = /** @type { boolean } */
|
||||
/** @type {*} */hooks.applyFilters('i18n.has_translation_' + getFilterDomain(domain), result, single, context, domain);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
if (initialData) {
|
||||
setLocaleData(initialData, initialDomain);
|
||||
}
|
||||
if (hooks) {
|
||||
/**
|
||||
* @param {string} hookName
|
||||
*/
|
||||
const onHookAddedOrRemoved = hookName => {
|
||||
if (I18N_HOOK_REGEXP.test(hookName)) {
|
||||
notifyListeners();
|
||||
}
|
||||
};
|
||||
hooks.addAction('hookAdded', 'core/i18n', onHookAddedOrRemoved);
|
||||
hooks.addAction('hookRemoved', 'core/i18n', onHookAddedOrRemoved);
|
||||
}
|
||||
return {
|
||||
getLocaleData,
|
||||
setLocaleData,
|
||||
addLocaleData,
|
||||
resetLocaleData,
|
||||
subscribe,
|
||||
__,
|
||||
_x,
|
||||
_n,
|
||||
_nx,
|
||||
isRTL,
|
||||
hasTranslation
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=create-i18n.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+hooks@3.57.0/node_modules/@wordpress/hooks/build-module/index.js + 10 modules
|
||||
var build_module = __webpack_require__("../../node_modules/.pnpm/@wordpress+hooks@3.57.0/node_modules/@wordpress/hooks/build-module/index.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+i18n@4.47.0/node_modules/@wordpress/i18n/build-module/default-i18n.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
const i18n = createI18n(undefined, undefined, build_module/* defaultHooks */.se);
|
||||
|
||||
/**
|
||||
* Default, singleton instance of `I18n`.
|
||||
*/
|
||||
/* harmony default export */ const default_i18n = ((/* unused pure expression or super */ null && (i18n)));
|
||||
|
||||
/*
|
||||
* Comments in this file are duplicated from ./i18n due to
|
||||
* https://github.com/WordPress/gutenberg/pull/20318#issuecomment-590837722
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {import('./create-i18n').LocaleData} LocaleData
|
||||
* @typedef {import('./create-i18n').SubscribeCallback} SubscribeCallback
|
||||
* @typedef {import('./create-i18n').UnsubscribeCallback} UnsubscribeCallback
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns locale data by domain in a Jed-formatted JSON object shape.
|
||||
*
|
||||
* @see http://messageformat.github.io/Jed/
|
||||
*
|
||||
* @param {string} [domain] Domain for which to get the data.
|
||||
* @return {LocaleData} Locale data.
|
||||
*/
|
||||
const getLocaleData = i18n.getLocaleData.bind(i18n);
|
||||
|
||||
/**
|
||||
* Merges locale data into the Tannin instance by domain. Accepts data in a
|
||||
* Jed-formatted JSON object shape.
|
||||
*
|
||||
* @see http://messageformat.github.io/Jed/
|
||||
*
|
||||
* @param {LocaleData} [data] Locale data configuration.
|
||||
* @param {string} [domain] Domain for which configuration applies.
|
||||
*/
|
||||
const setLocaleData = i18n.setLocaleData.bind(i18n);
|
||||
|
||||
/**
|
||||
* Resets all current Tannin instance locale data and sets the specified
|
||||
* locale data for the domain. Accepts data in a Jed-formatted JSON object shape.
|
||||
*
|
||||
* @see http://messageformat.github.io/Jed/
|
||||
*
|
||||
* @param {LocaleData} [data] Locale data configuration.
|
||||
* @param {string} [domain] Domain for which configuration applies.
|
||||
*/
|
||||
const resetLocaleData = i18n.resetLocaleData.bind(i18n);
|
||||
|
||||
/**
|
||||
* Subscribes to changes of locale data
|
||||
*
|
||||
* @param {SubscribeCallback} callback Subscription callback
|
||||
* @return {UnsubscribeCallback} Unsubscribe callback
|
||||
*/
|
||||
const subscribe = i18n.subscribe.bind(i18n);
|
||||
|
||||
/**
|
||||
* Retrieve the translation of text.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/__/
|
||||
*
|
||||
* @param {string} text Text to translate.
|
||||
* @param {string} [domain] Domain to retrieve the translated text.
|
||||
*
|
||||
* @return {string} Translated text.
|
||||
*/
|
||||
const __ = i18n.__.bind(i18n);
|
||||
|
||||
/**
|
||||
* Retrieve translated string with gettext context.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/_x/
|
||||
*
|
||||
* @param {string} text Text to translate.
|
||||
* @param {string} context Context information for the translators.
|
||||
* @param {string} [domain] Domain to retrieve the translated text.
|
||||
*
|
||||
* @return {string} Translated context string without pipe.
|
||||
*/
|
||||
const _x = i18n._x.bind(i18n);
|
||||
|
||||
/**
|
||||
* Translates and retrieves the singular or plural form based on the supplied
|
||||
* number.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/_n/
|
||||
*
|
||||
* @param {string} single The text to be used if the number is singular.
|
||||
* @param {string} plural The text to be used if the number is plural.
|
||||
* @param {number} number The number to compare against to use either the
|
||||
* singular or plural form.
|
||||
* @param {string} [domain] Domain to retrieve the translated text.
|
||||
*
|
||||
* @return {string} The translated singular or plural form.
|
||||
*/
|
||||
const _n = i18n._n.bind(i18n);
|
||||
|
||||
/**
|
||||
* Translates and retrieves the singular or plural form based on the supplied
|
||||
* number, with gettext context.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/_nx/
|
||||
*
|
||||
* @param {string} single The text to be used if the number is singular.
|
||||
* @param {string} plural The text to be used if the number is plural.
|
||||
* @param {number} number The number to compare against to use either the
|
||||
* singular or plural form.
|
||||
* @param {string} context Context information for the translators.
|
||||
* @param {string} [domain] Domain to retrieve the translated text.
|
||||
*
|
||||
* @return {string} The translated singular or plural form.
|
||||
*/
|
||||
const _nx = i18n._nx.bind(i18n);
|
||||
|
||||
/**
|
||||
* Check if current locale is RTL.
|
||||
*
|
||||
* **RTL (Right To Left)** is a locale property indicating that text is written from right to left.
|
||||
* For example, the `he` locale (for Hebrew) specifies right-to-left. Arabic (ar) is another common
|
||||
* language written RTL. The opposite of RTL, LTR (Left To Right) is used in other languages,
|
||||
* including English (`en`, `en-US`, `en-GB`, etc.), Spanish (`es`), and French (`fr`).
|
||||
*
|
||||
* @return {boolean} Whether locale is RTL.
|
||||
*/
|
||||
const isRTL = i18n.isRTL.bind(i18n);
|
||||
|
||||
/**
|
||||
* Check if there is a translation for a given string (in singular form).
|
||||
*
|
||||
* @param {string} single Singular form of the string to look up.
|
||||
* @param {string} [context] Context information for the translators.
|
||||
* @param {string} [domain] Domain to retrieve the translated text.
|
||||
* @return {boolean} Whether the translation exists or not.
|
||||
*/
|
||||
const hasTranslation = i18n.hasTranslation.bind(i18n);
|
||||
//# sourceMappingURL=default-i18n.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+i18n@4.47.0/node_modules/@wordpress/i18n/build-module/index.js
|
||||
|
||||
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/memize@2.1.0/node_modules/memize/dist/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ memize)
|
||||
/* harmony export */ });
|
||||
/**
|
||||
* Memize options object.
|
||||
*
|
||||
* @typedef MemizeOptions
|
||||
*
|
||||
* @property {number} [maxSize] Maximum size of the cache.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal cache entry.
|
||||
*
|
||||
* @typedef MemizeCacheNode
|
||||
*
|
||||
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
|
||||
* @property {?MemizeCacheNode|undefined} [next] Next node.
|
||||
* @property {Array<*>} args Function arguments for cache
|
||||
* entry.
|
||||
* @property {*} val Function result.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Properties of the enhanced function for controlling cache.
|
||||
*
|
||||
* @typedef MemizeMemoizedFunction
|
||||
*
|
||||
* @property {()=>void} clear Clear the cache.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Accepts a function to be memoized, and returns a new memoized function, with
|
||||
* optional options.
|
||||
*
|
||||
* @template {(...args: any[]) => any} F
|
||||
*
|
||||
* @param {F} fn Function to memoize.
|
||||
* @param {MemizeOptions} [options] Options object.
|
||||
*
|
||||
* @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
|
||||
*/
|
||||
function memize(fn, options) {
|
||||
var size = 0;
|
||||
|
||||
/** @type {?MemizeCacheNode|undefined} */
|
||||
var head;
|
||||
|
||||
/** @type {?MemizeCacheNode|undefined} */
|
||||
var tail;
|
||||
|
||||
options = options || {};
|
||||
|
||||
function memoized(/* ...args */) {
|
||||
var node = head,
|
||||
len = arguments.length,
|
||||
args,
|
||||
i;
|
||||
|
||||
searchCache: while (node) {
|
||||
// Perform a shallow equality test to confirm that whether the node
|
||||
// under test is a candidate for the arguments passed. Two arrays
|
||||
// are shallowly equal if their length matches and each entry is
|
||||
// strictly equal between the two sets. Avoid abstracting to a
|
||||
// function which could incur an arguments leaking deoptimization.
|
||||
|
||||
// Check whether node arguments match arguments length
|
||||
if (node.args.length !== arguments.length) {
|
||||
node = node.next;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check whether node arguments match arguments values
|
||||
for (i = 0; i < len; i++) {
|
||||
if (node.args[i] !== arguments[i]) {
|
||||
node = node.next;
|
||||
continue searchCache;
|
||||
}
|
||||
}
|
||||
|
||||
// At this point we can assume we've found a match
|
||||
|
||||
// Surface matched node to head if not already
|
||||
if (node !== head) {
|
||||
// As tail, shift to previous. Must only shift if not also
|
||||
// head, since if both head and tail, there is no previous.
|
||||
if (node === tail) {
|
||||
tail = node.prev;
|
||||
}
|
||||
|
||||
// Adjust siblings to point to each other. If node was tail,
|
||||
// this also handles new tail's empty `next` assignment.
|
||||
/** @type {MemizeCacheNode} */ (node.prev).next = node.next;
|
||||
if (node.next) {
|
||||
node.next.prev = node.prev;
|
||||
}
|
||||
|
||||
node.next = head;
|
||||
node.prev = null;
|
||||
/** @type {MemizeCacheNode} */ (head).prev = node;
|
||||
head = node;
|
||||
}
|
||||
|
||||
// Return immediately
|
||||
return node.val;
|
||||
}
|
||||
|
||||
// No cached value found. Continue to insertion phase:
|
||||
|
||||
// Create a copy of arguments (avoid leaking deoptimization)
|
||||
args = new Array(len);
|
||||
for (i = 0; i < len; i++) {
|
||||
args[i] = arguments[i];
|
||||
}
|
||||
|
||||
node = {
|
||||
args: args,
|
||||
|
||||
// Generate the result from original function
|
||||
val: fn.apply(null, args),
|
||||
};
|
||||
|
||||
// Don't need to check whether node is already head, since it would
|
||||
// have been returned above already if it was
|
||||
|
||||
// Shift existing head down list
|
||||
if (head) {
|
||||
head.prev = node;
|
||||
node.next = head;
|
||||
} else {
|
||||
// If no head, follows that there's no tail (at initial or reset)
|
||||
tail = node;
|
||||
}
|
||||
|
||||
// Trim tail if we're reached max size and are pending cache insertion
|
||||
if (size === /** @type {MemizeOptions} */ (options).maxSize) {
|
||||
tail = /** @type {MemizeCacheNode} */ (tail).prev;
|
||||
/** @type {MemizeCacheNode} */ (tail).next = null;
|
||||
} else {
|
||||
size++;
|
||||
}
|
||||
|
||||
head = node;
|
||||
|
||||
return node.val;
|
||||
}
|
||||
|
||||
memoized.clear = function () {
|
||||
head = null;
|
||||
tail = null;
|
||||
size = 0;
|
||||
};
|
||||
|
||||
// Ignore reason: There's not a clear solution to create an intersection of
|
||||
// the function with additional properties, where the goal is to retain the
|
||||
// function signature of the incoming argument and add control properties
|
||||
// on the return value.
|
||||
|
||||
// @ts-ignore
|
||||
return memoized;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
|||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,915 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[1397],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/notice/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ notice)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
||||
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js
|
||||
var lodash = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+i18n@4.6.1/node_modules/@wordpress/i18n/build-module/index.js + 3 modules
|
||||
var build_module = __webpack_require__("../../node_modules/.pnpm/@wordpress+i18n@4.6.1/node_modules/@wordpress/i18n/build-module/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+escape-html@2.47.0/node_modules/@wordpress/escape-html/build-module/index.js + 1 modules
|
||||
var escape_html_build_module = __webpack_require__("../../node_modules/.pnpm/@wordpress+escape-html@2.47.0/node_modules/@wordpress/escape-html/build-module/index.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+element@4.4.1/node_modules/@wordpress/element/build-module/raw-html.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
// Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
|
||||
|
||||
/** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */
|
||||
|
||||
/**
|
||||
* Component used as equivalent of Fragment with unescaped HTML, in cases where
|
||||
* it is desirable to render dangerous HTML without needing a wrapper element.
|
||||
* To preserve additional props, a `div` wrapper _will_ be created if any props
|
||||
* aside from `children` are passed.
|
||||
*
|
||||
* @param {RawHTMLProps} props Children should be a string of HTML or an array
|
||||
* of strings. Other props will be passed through
|
||||
* to the div wrapper.
|
||||
*
|
||||
* @return {JSX.Element} Dangerously-rendering component.
|
||||
*/
|
||||
|
||||
function RawHTML(_ref) {
|
||||
let {
|
||||
children,
|
||||
...props
|
||||
} = _ref;
|
||||
let rawHtml = ''; // Cast children as an array, and concatenate each element if it is a string.
|
||||
|
||||
react.Children.toArray(children).forEach(child => {
|
||||
if (typeof child === 'string' && child.trim() !== '') {
|
||||
rawHtml += child;
|
||||
}
|
||||
}); // The `div` wrapper will be stripped by the `renderElement` serializer in
|
||||
// `./serialize.js` unless there are non-children props present.
|
||||
|
||||
return (0,react.createElement)('div', {
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: rawHtml
|
||||
},
|
||||
...props
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=raw-html.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+element@4.4.1/node_modules/@wordpress/element/build-module/serialize.js
|
||||
/**
|
||||
* Parts of this source were derived and modified from fast-react-render,
|
||||
* released under the MIT license.
|
||||
*
|
||||
* https://github.com/alt-j/fast-react-render
|
||||
*
|
||||
* Copyright (c) 2016 Andrey Morozov
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/** @typedef {import('./react').WPElement} WPElement */
|
||||
|
||||
const {
|
||||
Provider,
|
||||
Consumer
|
||||
} = (0,react.createContext)(undefined);
|
||||
const ForwardRef = (0,react.forwardRef)(() => {
|
||||
return null;
|
||||
});
|
||||
/**
|
||||
* Valid attribute types.
|
||||
*
|
||||
* @type {Set<string>}
|
||||
*/
|
||||
|
||||
const ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']);
|
||||
/**
|
||||
* Element tags which can be self-closing.
|
||||
*
|
||||
* @type {Set<string>}
|
||||
*/
|
||||
|
||||
const SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
|
||||
/**
|
||||
* Boolean attributes are attributes whose presence as being assigned is
|
||||
* meaningful, even if only empty.
|
||||
*
|
||||
* See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
|
||||
* Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3
|
||||
*
|
||||
* Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ]
|
||||
* .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 )
|
||||
* .reduce( ( result, tr ) => Object.assign( result, {
|
||||
* [ tr.firstChild.textContent.trim() ]: true
|
||||
* } ), {} ) ).sort();
|
||||
*
|
||||
* @type {Set<string>}
|
||||
*/
|
||||
|
||||
const BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']);
|
||||
/**
|
||||
* Enumerated attributes are attributes which must be of a specific value form.
|
||||
* Like boolean attributes, these are meaningful if specified, even if not of a
|
||||
* valid enumerated value.
|
||||
*
|
||||
* See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute
|
||||
* Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3
|
||||
*
|
||||
* Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ]
|
||||
* .filter( ( tr ) => /^("(.+?)";?\s*)+/.test( tr.lastChild.textContent.trim() ) )
|
||||
* .reduce( ( result, tr ) => Object.assign( result, {
|
||||
* [ tr.firstChild.textContent.trim() ]: true
|
||||
* } ), {} ) ).sort();
|
||||
*
|
||||
* Some notable omissions:
|
||||
*
|
||||
* - `alt`: https://blog.whatwg.org/omit-alt
|
||||
*
|
||||
* @type {Set<string>}
|
||||
*/
|
||||
|
||||
const ENUMERATED_ATTRIBUTES = new Set(['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap']);
|
||||
/**
|
||||
* Set of CSS style properties which support assignment of unitless numbers.
|
||||
* Used in rendering of style properties, where `px` unit is assumed unless
|
||||
* property is included in this set or value is zero.
|
||||
*
|
||||
* Generated via:
|
||||
*
|
||||
* Object.entries( document.createElement( 'div' ).style )
|
||||
* .filter( ( [ key ] ) => (
|
||||
* ! /^(webkit|ms|moz)/.test( key ) &&
|
||||
* ( e.style[ key ] = 10 ) &&
|
||||
* e.style[ key ] === '10'
|
||||
* ) )
|
||||
* .map( ( [ key ] ) => key )
|
||||
* .sort();
|
||||
*
|
||||
* @type {Set<string>}
|
||||
*/
|
||||
|
||||
const CSS_PROPERTIES_SUPPORTS_UNITLESS = new Set(['animation', 'animationIterationCount', 'baselineShift', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'columnCount', 'cx', 'cy', 'fillOpacity', 'flexGrow', 'flexShrink', 'floodOpacity', 'fontWeight', 'gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart', 'lineHeight', 'opacity', 'order', 'orphans', 'r', 'rx', 'ry', 'shapeImageThreshold', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'widows', 'x', 'y', 'zIndex', 'zoom']);
|
||||
/**
|
||||
* Returns true if the specified string is prefixed by one of an array of
|
||||
* possible prefixes.
|
||||
*
|
||||
* @param {string} string String to check.
|
||||
* @param {string[]} prefixes Possible prefixes.
|
||||
*
|
||||
* @return {boolean} Whether string has prefix.
|
||||
*/
|
||||
|
||||
function hasPrefix(string, prefixes) {
|
||||
return prefixes.some(prefix => string.indexOf(prefix) === 0);
|
||||
}
|
||||
/**
|
||||
* Returns true if the given prop name should be ignored in attributes
|
||||
* serialization, or false otherwise.
|
||||
*
|
||||
* @param {string} attribute Attribute to check.
|
||||
*
|
||||
* @return {boolean} Whether attribute should be ignored.
|
||||
*/
|
||||
|
||||
function isInternalAttribute(attribute) {
|
||||
return 'key' === attribute || 'children' === attribute;
|
||||
}
|
||||
/**
|
||||
* Returns the normal form of the element's attribute value for HTML.
|
||||
*
|
||||
* @param {string} attribute Attribute name.
|
||||
* @param {*} value Non-normalized attribute value.
|
||||
*
|
||||
* @return {*} Normalized attribute value.
|
||||
*/
|
||||
|
||||
|
||||
function getNormalAttributeValue(attribute, value) {
|
||||
switch (attribute) {
|
||||
case 'style':
|
||||
return renderStyle(value);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* This is a map of all SVG attributes that have dashes. Map(lower case prop => dashed lower case attribute).
|
||||
* We need this to render e.g strokeWidth as stroke-width.
|
||||
*
|
||||
* List from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute.
|
||||
*/
|
||||
|
||||
|
||||
const SVG_ATTRIBUTE_WITH_DASHES_LIST = ['accentHeight', 'alignmentBaseline', 'arabicForm', 'baselineShift', 'capHeight', 'clipPath', 'clipRule', 'colorInterpolation', 'colorInterpolationFilters', 'colorProfile', 'colorRendering', 'dominantBaseline', 'enableBackground', 'fillOpacity', 'fillRule', 'floodColor', 'floodOpacity', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontWeight', 'glyphName', 'glyphOrientationHorizontal', 'glyphOrientationVertical', 'horizAdvX', 'horizOriginX', 'imageRendering', 'letterSpacing', 'lightingColor', 'markerEnd', 'markerMid', 'markerStart', 'overlinePosition', 'overlineThickness', 'paintOrder', 'panose1', 'pointerEvents', 'renderingIntent', 'shapeRendering', 'stopColor', 'stopOpacity', 'strikethroughPosition', 'strikethroughThickness', 'strokeDasharray', 'strokeDashoffset', 'strokeLinecap', 'strokeLinejoin', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'textAnchor', 'textDecoration', 'textRendering', 'underlinePosition', 'underlineThickness', 'unicodeBidi', 'unicodeRange', 'unitsPerEm', 'vAlphabetic', 'vHanging', 'vIdeographic', 'vMathematical', 'vectorEffect', 'vertAdvY', 'vertOriginX', 'vertOriginY', 'wordSpacing', 'writingMode', 'xmlnsXlink', 'xHeight'].reduce((map, attribute) => {
|
||||
// The keys are lower-cased for more robust lookup.
|
||||
map[attribute.toLowerCase()] = attribute;
|
||||
return map;
|
||||
}, {});
|
||||
/**
|
||||
* This is a map of all case-sensitive SVG attributes. Map(lowercase key => proper case attribute).
|
||||
* The keys are lower-cased for more robust lookup.
|
||||
* Note that this list only contains attributes that contain at least one capital letter.
|
||||
* Lowercase attributes don't need mapping, since we lowercase all attributes by default.
|
||||
*/
|
||||
|
||||
const CASE_SENSITIVE_SVG_ATTRIBUTES = ['allowReorder', 'attributeName', 'attributeType', 'autoReverse', 'baseFrequency', 'baseProfile', 'calcMode', 'clipPathUnits', 'contentScriptType', 'contentStyleType', 'diffuseConstant', 'edgeMode', 'externalResourcesRequired', 'filterRes', 'filterUnits', 'glyphRef', 'gradientTransform', 'gradientUnits', 'kernelMatrix', 'kernelUnitLength', 'keyPoints', 'keySplines', 'keyTimes', 'lengthAdjust', 'limitingConeAngle', 'markerHeight', 'markerUnits', 'markerWidth', 'maskContentUnits', 'maskUnits', 'numOctaves', 'pathLength', 'patternContentUnits', 'patternTransform', 'patternUnits', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'preserveAlpha', 'preserveAspectRatio', 'primitiveUnits', 'refX', 'refY', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'specularConstant', 'specularExponent', 'spreadMethod', 'startOffset', 'stdDeviation', 'stitchTiles', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'surfaceScale', 'systemLanguage', 'tableValues', 'targetX', 'targetY', 'textLength', 'viewBox', 'viewTarget', 'xChannelSelector', 'yChannelSelector'].reduce((map, attribute) => {
|
||||
// The keys are lower-cased for more robust lookup.
|
||||
map[attribute.toLowerCase()] = attribute;
|
||||
return map;
|
||||
}, {});
|
||||
/**
|
||||
* This is a map of all SVG attributes that have colons.
|
||||
* Keys are lower-cased and stripped of their colons for more robust lookup.
|
||||
*/
|
||||
|
||||
const SVG_ATTRIBUTES_WITH_COLONS = ['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'xmlns:xlink'].reduce((map, attribute) => {
|
||||
map[attribute.replace(':', '').toLowerCase()] = attribute;
|
||||
return map;
|
||||
}, {});
|
||||
/**
|
||||
* Returns the normal form of the element's attribute name for HTML.
|
||||
*
|
||||
* @param {string} attribute Non-normalized attribute name.
|
||||
*
|
||||
* @return {string} Normalized attribute name.
|
||||
*/
|
||||
|
||||
function getNormalAttributeName(attribute) {
|
||||
switch (attribute) {
|
||||
case 'htmlFor':
|
||||
return 'for';
|
||||
|
||||
case 'className':
|
||||
return 'class';
|
||||
}
|
||||
|
||||
const attributeLowerCase = attribute.toLowerCase();
|
||||
|
||||
if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) {
|
||||
return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase];
|
||||
} else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) {
|
||||
return (0,lodash.kebabCase)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]);
|
||||
} else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) {
|
||||
return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase];
|
||||
}
|
||||
|
||||
return attributeLowerCase;
|
||||
}
|
||||
/**
|
||||
* Returns the normal form of the style property name for HTML.
|
||||
*
|
||||
* - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color'
|
||||
* - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor'
|
||||
* - Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform'
|
||||
*
|
||||
* @param {string} property Property name.
|
||||
*
|
||||
* @return {string} Normalized property name.
|
||||
*/
|
||||
|
||||
|
||||
function getNormalStylePropertyName(property) {
|
||||
if ((0,lodash.startsWith)(property, '--')) {
|
||||
return property;
|
||||
}
|
||||
|
||||
if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) {
|
||||
return '-' + (0,lodash.kebabCase)(property);
|
||||
}
|
||||
|
||||
return (0,lodash.kebabCase)(property);
|
||||
}
|
||||
/**
|
||||
* Returns the normal form of the style property value for HTML. Appends a
|
||||
* default pixel unit if numeric, not a unitless property, and not zero.
|
||||
*
|
||||
* @param {string} property Property name.
|
||||
* @param {*} value Non-normalized property value.
|
||||
*
|
||||
* @return {*} Normalized property value.
|
||||
*/
|
||||
|
||||
|
||||
function getNormalStylePropertyValue(property, value) {
|
||||
if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) {
|
||||
return value + 'px';
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Serializes a React element to string.
|
||||
*
|
||||
* @param {import('react').ReactNode} element Element to serialize.
|
||||
* @param {Object} [context] Context object.
|
||||
* @param {Object} [legacyContext] Legacy context object.
|
||||
*
|
||||
* @return {string} Serialized element.
|
||||
*/
|
||||
|
||||
|
||||
function renderElement(element, context) {
|
||||
let legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
|
||||
if (null === element || undefined === element || false === element) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (Array.isArray(element)) {
|
||||
return renderChildren(element, context, legacyContext);
|
||||
}
|
||||
|
||||
switch (typeof element) {
|
||||
case 'string':
|
||||
return (0,escape_html_build_module/* escapeHTML */.Zn)(element);
|
||||
|
||||
case 'number':
|
||||
return element.toString();
|
||||
}
|
||||
|
||||
const {
|
||||
type,
|
||||
props
|
||||
} =
|
||||
/** @type {{type?: any, props?: any}} */
|
||||
element;
|
||||
|
||||
switch (type) {
|
||||
case react.StrictMode:
|
||||
case react.Fragment:
|
||||
return renderChildren(props.children, context, legacyContext);
|
||||
|
||||
case RawHTML:
|
||||
const {
|
||||
children,
|
||||
...wrapperProps
|
||||
} = props;
|
||||
return renderNativeComponent((0,lodash.isEmpty)(wrapperProps) ? null : 'div', { ...wrapperProps,
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: children
|
||||
}
|
||||
}, context, legacyContext);
|
||||
}
|
||||
|
||||
switch (typeof type) {
|
||||
case 'string':
|
||||
return renderNativeComponent(type, props, context, legacyContext);
|
||||
|
||||
case 'function':
|
||||
if (type.prototype && typeof type.prototype.render === 'function') {
|
||||
return renderComponent(type, props, context, legacyContext);
|
||||
}
|
||||
|
||||
return renderElement(type(props, legacyContext), context, legacyContext);
|
||||
}
|
||||
|
||||
switch (type && type.$$typeof) {
|
||||
case Provider.$$typeof:
|
||||
return renderChildren(props.children, props.value, legacyContext);
|
||||
|
||||
case Consumer.$$typeof:
|
||||
return renderElement(props.children(context || type._currentValue), context, legacyContext);
|
||||
|
||||
case ForwardRef.$$typeof:
|
||||
return renderElement(type.render(props), context, legacyContext);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
/**
|
||||
* Serializes a native component type to string.
|
||||
*
|
||||
* @param {?string} type Native component type to serialize, or null if
|
||||
* rendering as fragment of children content.
|
||||
* @param {Object} props Props object.
|
||||
* @param {Object} [context] Context object.
|
||||
* @param {Object} [legacyContext] Legacy context object.
|
||||
*
|
||||
* @return {string} Serialized element.
|
||||
*/
|
||||
|
||||
function renderNativeComponent(type, props, context) {
|
||||
let legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
||||
let content = '';
|
||||
|
||||
if (type === 'textarea' && props.hasOwnProperty('value')) {
|
||||
// Textarea children can be assigned as value prop. If it is, render in
|
||||
// place of children. Ensure to omit so it is not assigned as attribute
|
||||
// as well.
|
||||
content = renderChildren(props.value, context, legacyContext);
|
||||
props = (0,lodash.omit)(props, 'value');
|
||||
} else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') {
|
||||
// Dangerous content is left unescaped.
|
||||
content = props.dangerouslySetInnerHTML.__html;
|
||||
} else if (typeof props.children !== 'undefined') {
|
||||
content = renderChildren(props.children, context, legacyContext);
|
||||
}
|
||||
|
||||
if (!type) {
|
||||
return content;
|
||||
}
|
||||
|
||||
const attributes = renderAttributes(props);
|
||||
|
||||
if (SELF_CLOSING_TAGS.has(type)) {
|
||||
return '<' + type + attributes + '/>';
|
||||
}
|
||||
|
||||
return '<' + type + attributes + '>' + content + '</' + type + '>';
|
||||
}
|
||||
/** @typedef {import('./react').WPComponent} WPComponent */
|
||||
|
||||
/**
|
||||
* Serializes a non-native component type to string.
|
||||
*
|
||||
* @param {WPComponent} Component Component type to serialize.
|
||||
* @param {Object} props Props object.
|
||||
* @param {Object} [context] Context object.
|
||||
* @param {Object} [legacyContext] Legacy context object.
|
||||
*
|
||||
* @return {string} Serialized element
|
||||
*/
|
||||
|
||||
function renderComponent(Component, props, context) {
|
||||
let legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
||||
const instance = new
|
||||
/** @type {import('react').ComponentClass} */
|
||||
Component(props, legacyContext);
|
||||
|
||||
if (typeof // Ignore reason: Current prettier reformats parens and mangles type assertion
|
||||
// prettier-ignore
|
||||
|
||||
/** @type {{getChildContext?: () => unknown}} */
|
||||
instance.getChildContext === 'function') {
|
||||
Object.assign(legacyContext,
|
||||
/** @type {{getChildContext?: () => unknown}} */
|
||||
instance.getChildContext());
|
||||
}
|
||||
|
||||
const html = renderElement(instance.render(), context, legacyContext);
|
||||
return html;
|
||||
}
|
||||
/**
|
||||
* Serializes an array of children to string.
|
||||
*
|
||||
* @param {import('react').ReactNodeArray} children Children to serialize.
|
||||
* @param {Object} [context] Context object.
|
||||
* @param {Object} [legacyContext] Legacy context object.
|
||||
*
|
||||
* @return {string} Serialized children.
|
||||
*/
|
||||
|
||||
function renderChildren(children, context) {
|
||||
let legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
let result = '';
|
||||
children = (0,lodash.castArray)(children);
|
||||
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
result += renderElement(child, context, legacyContext);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Renders a props object as a string of HTML attributes.
|
||||
*
|
||||
* @param {Object} props Props object.
|
||||
*
|
||||
* @return {string} Attributes string.
|
||||
*/
|
||||
|
||||
|
||||
function renderAttributes(props) {
|
||||
let result = '';
|
||||
|
||||
for (const key in props) {
|
||||
const attribute = getNormalAttributeName(key);
|
||||
|
||||
if (!(0,escape_html_build_module/* isValidAttributeName */.i8)(attribute)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let value = getNormalAttributeValue(key, props[key]); // If value is not of serializeable type, skip.
|
||||
|
||||
if (!ATTRIBUTES_TYPES.has(typeof value)) {
|
||||
continue;
|
||||
} // Don't render internal attribute names.
|
||||
|
||||
|
||||
if (isInternalAttribute(key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute); // Boolean attribute should be omitted outright if its value is false.
|
||||
|
||||
if (isBooleanAttribute && value === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute); // Only write boolean value as attribute if meaningful.
|
||||
|
||||
if (typeof value === 'boolean' && !isMeaningfulAttribute) {
|
||||
continue;
|
||||
}
|
||||
|
||||
result += ' ' + attribute; // Boolean attributes should write attribute name, but without value.
|
||||
// Mere presence of attribute name is effective truthiness.
|
||||
|
||||
if (isBooleanAttribute) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof value === 'string') {
|
||||
value = (0,escape_html_build_module/* escapeAttribute */.Gj)(value);
|
||||
}
|
||||
|
||||
result += '="' + value + '"';
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Renders a style object as a string attribute value.
|
||||
*
|
||||
* @param {Object} style Style object.
|
||||
*
|
||||
* @return {string} Style attribute value.
|
||||
*/
|
||||
|
||||
function renderStyle(style) {
|
||||
// Only generate from object, e.g. tolerate string value.
|
||||
if (!(0,lodash.isPlainObject)(style)) {
|
||||
return style;
|
||||
}
|
||||
|
||||
let result;
|
||||
|
||||
for (const property in style) {
|
||||
const value = style[property];
|
||||
|
||||
if (null === value || undefined === value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (result) {
|
||||
result += ';';
|
||||
} else {
|
||||
result = '';
|
||||
}
|
||||
|
||||
const normalName = getNormalStylePropertyName(property);
|
||||
const normalValue = getNormalStylePropertyValue(property, value);
|
||||
result += normalName + ':' + normalValue;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/* harmony default export */ const serialize = (renderElement);
|
||||
//# sourceMappingURL=serialize.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+a11y@3.6.1/node_modules/@wordpress/a11y/build-module/index.js + 5 modules
|
||||
var a11y_build_module = __webpack_require__("../../node_modules/.pnpm/@wordpress+a11y@3.6.1/node_modules/@wordpress/a11y/build-module/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/library/close.js
|
||||
var library_close = __webpack_require__("../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/library/close.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/button/index.js
|
||||
var build_module_button = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/button/index.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/notice/index.js
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/** @typedef {import('@wordpress/element').WPElement} WPElement */
|
||||
|
||||
/**
|
||||
* Custom hook which announces the message with the given politeness, if a
|
||||
* valid message is provided.
|
||||
*
|
||||
* @param {string|WPElement} [message] Message to announce.
|
||||
* @param {'polite'|'assertive'} politeness Politeness to announce.
|
||||
*/
|
||||
|
||||
function useSpokenMessage(message, politeness) {
|
||||
const spokenMessage = typeof message === 'string' ? message : serialize(message);
|
||||
(0,react.useEffect)(() => {
|
||||
if (spokenMessage) {
|
||||
(0,a11y_build_module/* speak */.L)(spokenMessage, politeness);
|
||||
}
|
||||
}, [spokenMessage, politeness]);
|
||||
}
|
||||
/**
|
||||
* Given a notice status, returns an assumed default politeness for the status.
|
||||
* Defaults to 'assertive'.
|
||||
*
|
||||
* @param {string} [status] Notice status.
|
||||
*
|
||||
* @return {'polite'|'assertive'} Notice politeness.
|
||||
*/
|
||||
|
||||
|
||||
function getDefaultPoliteness(status) {
|
||||
switch (status) {
|
||||
case 'success':
|
||||
case 'warning':
|
||||
case 'info':
|
||||
return 'polite';
|
||||
|
||||
case 'error':
|
||||
default:
|
||||
return 'assertive';
|
||||
}
|
||||
}
|
||||
|
||||
function Notice(_ref) {
|
||||
let {
|
||||
className,
|
||||
status = 'info',
|
||||
children,
|
||||
spokenMessage = children,
|
||||
onRemove = lodash.noop,
|
||||
isDismissible = true,
|
||||
actions = [],
|
||||
politeness = getDefaultPoliteness(status),
|
||||
__unstableHTML,
|
||||
// onDismiss is a callback executed when the notice is dismissed.
|
||||
// It is distinct from onRemove, which _looks_ like a callback but is
|
||||
// actually the function to call to remove the notice from the UI.
|
||||
onDismiss = lodash.noop
|
||||
} = _ref;
|
||||
useSpokenMessage(spokenMessage, politeness);
|
||||
const classes = classnames_default()(className, 'components-notice', 'is-' + status, {
|
||||
'is-dismissible': isDismissible
|
||||
});
|
||||
|
||||
if (__unstableHTML) {
|
||||
children = (0,react.createElement)(RawHTML, null, children);
|
||||
}
|
||||
|
||||
const onDismissNotice = event => {
|
||||
var _event$preventDefault;
|
||||
|
||||
event === null || event === void 0 ? void 0 : (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);
|
||||
onDismiss();
|
||||
onRemove();
|
||||
};
|
||||
|
||||
return (0,react.createElement)("div", {
|
||||
className: classes
|
||||
}, (0,react.createElement)("div", {
|
||||
className: "components-notice__content"
|
||||
}, children, (0,react.createElement)("div", {
|
||||
className: "components-notice__actions"
|
||||
}, actions.map((_ref2, index) => {
|
||||
let {
|
||||
className: buttonCustomClasses,
|
||||
label,
|
||||
isPrimary,
|
||||
variant,
|
||||
noDefaultClasses = false,
|
||||
onClick,
|
||||
url
|
||||
} = _ref2;
|
||||
let computedVariant = variant;
|
||||
|
||||
if (variant !== 'primary' && !noDefaultClasses) {
|
||||
computedVariant = !url ? 'secondary' : 'link';
|
||||
}
|
||||
|
||||
if (typeof computedVariant === 'undefined' && isPrimary) {
|
||||
computedVariant = 'primary';
|
||||
}
|
||||
|
||||
return (0,react.createElement)(build_module_button/* default */.A, {
|
||||
key: index,
|
||||
href: url,
|
||||
variant: computedVariant,
|
||||
onClick: url ? undefined : onClick,
|
||||
className: classnames_default()('components-notice__action', buttonCustomClasses)
|
||||
}, label);
|
||||
}))), isDismissible && (0,react.createElement)(build_module_button/* default */.A, {
|
||||
className: "components-notice__dismiss",
|
||||
icon: library_close/* default */.A,
|
||||
label: (0,build_module.__)('Dismiss this notice'),
|
||||
onClick: onDismissNotice,
|
||||
showTooltip: false
|
||||
}));
|
||||
}
|
||||
|
||||
/* harmony default export */ const notice = (Notice);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+escape-html@2.47.0/node_modules/@wordpress/escape-html/build-module/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Gj: () => (/* binding */ escapeAttribute),
|
||||
jG: () => (/* binding */ escapeEditableHTML),
|
||||
Zn: () => (/* binding */ escapeHTML),
|
||||
i8: () => (/* binding */ isValidAttributeName)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: escapeAmpersand, escapeLessThan, escapeQuotationMark
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+escape-html@2.47.0/node_modules/@wordpress/escape-html/build-module/escape-greater.js
|
||||
/**
|
||||
* Returns a string with greater-than sign replaced.
|
||||
*
|
||||
* Note that if a resolution for Trac#45387 comes to fruition, it is no longer
|
||||
* necessary for `__unstableEscapeGreaterThan` to exist.
|
||||
*
|
||||
* See: https://core.trac.wordpress.org/ticket/45387
|
||||
*
|
||||
* @param {string} value Original string.
|
||||
*
|
||||
* @return {string} Escaped string.
|
||||
*/
|
||||
function __unstableEscapeGreaterThan(value) {
|
||||
return value.replace(/>/g, '>');
|
||||
}
|
||||
//# sourceMappingURL=escape-greater.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+escape-html@2.47.0/node_modules/@wordpress/escape-html/build-module/index.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Regular expression matching invalid attribute names.
|
||||
*
|
||||
* "Attribute names must consist of one or more characters other than controls,
|
||||
* U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=),
|
||||
* and noncharacters."
|
||||
*
|
||||
* @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
|
||||
*
|
||||
* @type {RegExp}
|
||||
*/
|
||||
const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;
|
||||
|
||||
/**
|
||||
* Returns a string with ampersands escaped. Note that this is an imperfect
|
||||
* implementation, where only ampersands which do not appear as a pattern of
|
||||
* named, decimal, or hexadecimal character references are escaped. Invalid
|
||||
* named references (i.e. ambiguous ampersand) are still permitted.
|
||||
*
|
||||
* @see https://w3c.github.io/html/syntax.html#character-references
|
||||
* @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand
|
||||
* @see https://w3c.github.io/html/syntax.html#named-character-references
|
||||
*
|
||||
* @param {string} value Original string.
|
||||
*
|
||||
* @return {string} Escaped string.
|
||||
*/
|
||||
function escapeAmpersand(value) {
|
||||
return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string with quotation marks replaced.
|
||||
*
|
||||
* @param {string} value Original string.
|
||||
*
|
||||
* @return {string} Escaped string.
|
||||
*/
|
||||
function escapeQuotationMark(value) {
|
||||
return value.replace(/"/g, '"');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string with less-than sign replaced.
|
||||
*
|
||||
* @param {string} value Original string.
|
||||
*
|
||||
* @return {string} Escaped string.
|
||||
*/
|
||||
function escapeLessThan(value) {
|
||||
return value.replace(/</g, '<');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an escaped attribute value.
|
||||
*
|
||||
* @see https://w3c.github.io/html/syntax.html#elements-attributes
|
||||
*
|
||||
* "[...] the text cannot contain an ambiguous ampersand [...] must not contain
|
||||
* any literal U+0022 QUOTATION MARK characters (")"
|
||||
*
|
||||
* Note we also escape the greater than symbol, as this is used by wptexturize to
|
||||
* split HTML strings. This is a WordPress specific fix
|
||||
*
|
||||
* Note that if a resolution for Trac#45387 comes to fruition, it is no longer
|
||||
* necessary for `__unstableEscapeGreaterThan` to be used.
|
||||
*
|
||||
* See: https://core.trac.wordpress.org/ticket/45387
|
||||
*
|
||||
* @param {string} value Attribute value.
|
||||
*
|
||||
* @return {string} Escaped attribute value.
|
||||
*/
|
||||
function escapeAttribute(value) {
|
||||
return __unstableEscapeGreaterThan(escapeQuotationMark(escapeAmpersand(value)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an escaped HTML element value.
|
||||
*
|
||||
* @see https://w3c.github.io/html/syntax.html#writing-html-documents-elements
|
||||
*
|
||||
* "the text must not contain the character U+003C LESS-THAN SIGN (<) or an
|
||||
* ambiguous ampersand."
|
||||
*
|
||||
* @param {string} value Element value.
|
||||
*
|
||||
* @return {string} Escaped HTML element value.
|
||||
*/
|
||||
function escapeHTML(value) {
|
||||
return escapeLessThan(escapeAmpersand(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an escaped Editable HTML element value. This is different from
|
||||
* `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in
|
||||
* order to render the content correctly on the page.
|
||||
*
|
||||
* @param {string} value Element value.
|
||||
*
|
||||
* @return {string} Escaped HTML element value.
|
||||
*/
|
||||
function escapeEditableHTML(value) {
|
||||
return escapeLessThan(value.replace(/&/g, '&'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given attribute name is valid, or false otherwise.
|
||||
*
|
||||
* @param {string} name Attribute name to test.
|
||||
*
|
||||
* @return {boolean} Whether attribute is valid.
|
||||
*/
|
||||
function isValidAttributeName(name) {
|
||||
return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name);
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,946 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[1408],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _assertThisInitialized)
|
||||
/* harmony export */ });
|
||||
function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _classCallCheck)
|
||||
/* harmony export */ });
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/createClass.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _createClass)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(descriptor.key), descriptor);
|
||||
}
|
||||
}
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
Object.defineProperty(Constructor, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _getPrototypeOf)
|
||||
/* harmony export */ });
|
||||
function _getPrototypeOf(o) {
|
||||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
||||
return o.__proto__ || Object.getPrototypeOf(o);
|
||||
};
|
||||
return _getPrototypeOf(o);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/inherits.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _inherits)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
|
||||
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== "function" && superClass !== null) {
|
||||
throw new TypeError("Super expression must either be null or a function");
|
||||
}
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
constructor: {
|
||||
value: subClass,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
Object.defineProperty(subClass, "prototype", {
|
||||
writable: false
|
||||
});
|
||||
if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(subClass, superClass);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ _objectWithoutProperties)
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
for (i = 0; i < sourceKeys.length; i++) {
|
||||
key = sourceKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
return target;
|
||||
}
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
||||
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
var key, i;
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
||||
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
||||
key = sourceSymbolKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _possibleConstructorReturn)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
||||
/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
|
||||
|
||||
|
||||
function _possibleConstructorReturn(self, call) {
|
||||
if (call && ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(call) === "object" || typeof call === "function")) {
|
||||
return call;
|
||||
} else if (call !== void 0) {
|
||||
throw new TypeError("Derived constructors may only return object or undefined");
|
||||
}
|
||||
return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(self);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _setPrototypeOf)
|
||||
/* harmony export */ });
|
||||
function _setPrototypeOf(o, p) {
|
||||
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
return o;
|
||||
};
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/higher-order/with-focus-outside/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/utils/create-higher-order-component/index.js");
|
||||
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-focus-outside/index.js");
|
||||
|
||||
|
||||
//@ts-nocheck
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(WrappedComponent => props => {
|
||||
const [handleFocusOutside, setHandleFocusOutside] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)();
|
||||
const bindFocusOutsideHandler = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useCallback)(node => setHandleFocusOutside(() => node !== null && node !== void 0 && node.handleFocusOutside ? node.handleFocusOutside.bind(node) : undefined), []);
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(handleFocusOutside), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(WrappedComponent, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({
|
||||
ref: bindFocusOutsideHandler
|
||||
}, props)));
|
||||
}, 'withFocusOutside'));
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/library/cancel-circle-filled.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@3.4.1/node_modules/@wordpress/primitives/build-module/svg/index.js");
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
const cancelCircleFilled = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__/* .SVG */ .t4, {
|
||||
viewBox: "0 0 24 24",
|
||||
xmlns: "http://www.w3.org/2000/svg"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__/* .Path */ .wA, {
|
||||
d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"
|
||||
}));
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cancelCircleFilled);
|
||||
//# sourceMappingURL=cancel-circle-filled.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/library/search.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@3.4.1/node_modules/@wordpress/primitives/build-module/svg/index.js");
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
const search = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__/* .SVG */ .t4, {
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
viewBox: "0 0 24 24"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__/* .Path */ .wA, {
|
||||
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"
|
||||
}));
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (search);
|
||||
//# sourceMappingURL=search.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/icon/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
|
||||
|
||||
/**
|
||||
* Return an SVG icon.
|
||||
*
|
||||
* @param {IconProps} props icon is the SVG component to render
|
||||
* size is a number specifiying the icon size in pixels
|
||||
* Other props will be passed to wrapped SVG component
|
||||
*
|
||||
* @return {JSX.Element} Icon component
|
||||
*/
|
||||
|
||||
function Icon(_ref) {
|
||||
let {
|
||||
icon,
|
||||
size = 24,
|
||||
...props
|
||||
} = _ref;
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(icon, {
|
||||
width: size,
|
||||
height: size,
|
||||
...props
|
||||
});
|
||||
}
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Icon);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-reduce.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var aCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/a-callable.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
var IndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/indexed-object.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
||||
var createMethod = function (IS_RIGHT) {
|
||||
return function (that, callbackfn, argumentsLength, memo) {
|
||||
var O = toObject(that);
|
||||
var self = IndexedObject(O);
|
||||
var length = lengthOfArrayLike(O);
|
||||
aCallable(callbackfn);
|
||||
var index = IS_RIGHT ? length - 1 : 0;
|
||||
var i = IS_RIGHT ? -1 : 1;
|
||||
if (argumentsLength < 2) while (true) {
|
||||
if (index in self) {
|
||||
memo = self[index];
|
||||
index += i;
|
||||
break;
|
||||
}
|
||||
index += i;
|
||||
if (IS_RIGHT ? index < 0 : length <= index) {
|
||||
throw new $TypeError('Reduce of empty array with no initial value');
|
||||
}
|
||||
}
|
||||
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
||||
memo = callbackfn(memo, self[index], index, O);
|
||||
}
|
||||
return memo;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `Array.prototype.reduce` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
||||
left: createMethod(false),
|
||||
// `Array.prototype.reduceRight` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
||||
right: createMethod(true)
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/correct-is-regexp-logic.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
|
||||
var MATCH = wellKnownSymbol('match');
|
||||
|
||||
module.exports = function (METHOD_NAME) {
|
||||
var regexp = /./;
|
||||
try {
|
||||
'/./'[METHOD_NAME](regexp);
|
||||
} catch (error1) {
|
||||
try {
|
||||
regexp[MATCH] = false;
|
||||
return '/./'[METHOD_NAME](regexp);
|
||||
} catch (error2) { /* empty */ }
|
||||
} return false;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var aCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/a-callable.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
||||
var arraySlice = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-slice.js");
|
||||
var NATIVE_BIND = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind-native.js");
|
||||
|
||||
var $Function = Function;
|
||||
var concat = uncurryThis([].concat);
|
||||
var join = uncurryThis([].join);
|
||||
var factories = {};
|
||||
|
||||
var construct = function (C, argsLength, args) {
|
||||
if (!hasOwn(factories, argsLength)) {
|
||||
var list = [];
|
||||
var i = 0;
|
||||
for (; i < argsLength; i++) list[i] = 'a[' + i + ']';
|
||||
factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')');
|
||||
} return factories[argsLength](C, args);
|
||||
};
|
||||
|
||||
// `Function.prototype.bind` method implementation
|
||||
// https://tc39.es/ecma262/#sec-function.prototype.bind
|
||||
// eslint-disable-next-line es/no-function-prototype-bind -- detection
|
||||
module.exports = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) {
|
||||
var F = aCallable(this);
|
||||
var Prototype = F.prototype;
|
||||
var partArgs = arraySlice(arguments, 1);
|
||||
var boundFunction = function bound(/* args... */) {
|
||||
var args = concat(partArgs, arraySlice(arguments));
|
||||
return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);
|
||||
};
|
||||
if (isObject(Prototype)) boundFunction.prototype = Prototype;
|
||||
return boundFunction;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/not-a-regexp.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var isRegExp = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-regexp.js");
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
module.exports = function (it) {
|
||||
if (isRegExp(it)) {
|
||||
throw new $TypeError("The method doesn't accept regular expressions");
|
||||
} return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-to-array.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var objectGetPrototypeOf = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-prototype-of.js");
|
||||
var objectKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-keys.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var $propertyIsEnumerable = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-property-is-enumerable.js").f);
|
||||
|
||||
var propertyIsEnumerable = uncurryThis($propertyIsEnumerable);
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
// in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys
|
||||
// of `null` prototype objects
|
||||
var IE_BUG = DESCRIPTORS && fails(function () {
|
||||
// eslint-disable-next-line es/no-object-create -- safe
|
||||
var O = Object.create(null);
|
||||
O[2] = 2;
|
||||
return !propertyIsEnumerable(O, 2);
|
||||
});
|
||||
|
||||
// `Object.{ entries, values }` methods implementation
|
||||
var createMethod = function (TO_ENTRIES) {
|
||||
return function (it) {
|
||||
var O = toIndexedObject(it);
|
||||
var keys = objectKeys(O);
|
||||
var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;
|
||||
var length = keys.length;
|
||||
var i = 0;
|
||||
var result = [];
|
||||
var key;
|
||||
while (length > i) {
|
||||
key = keys[i++];
|
||||
if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {
|
||||
push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `Object.entries` method
|
||||
// https://tc39.es/ecma262/#sec-object.entries
|
||||
entries: createMethod(true),
|
||||
// `Object.values` method
|
||||
// https://tc39.es/ecma262/#sec-object.values
|
||||
values: createMethod(false)
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/string-trim-forced.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var PROPER_FUNCTION_NAME = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-name.js").PROPER);
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var whitespaces = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/whitespaces.js");
|
||||
|
||||
var non = '\u200B\u0085\u180E';
|
||||
|
||||
// check that a method works with the correct list
|
||||
// of whitespaces and has a correct name
|
||||
module.exports = function (METHOD_NAME) {
|
||||
return fails(function () {
|
||||
return !!whitespaces[METHOD_NAME]()
|
||||
|| non[METHOD_NAME]() !== non
|
||||
|| (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/string-trim.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var requireObjectCoercible = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/require-object-coercible.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var whitespaces = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/whitespaces.js");
|
||||
|
||||
var replace = uncurryThis(''.replace);
|
||||
var ltrim = RegExp('^[' + whitespaces + ']+');
|
||||
var rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');
|
||||
|
||||
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
||||
var createMethod = function (TYPE) {
|
||||
return function ($this) {
|
||||
var string = toString(requireObjectCoercible($this));
|
||||
if (TYPE & 1) string = replace(string, ltrim, '');
|
||||
if (TYPE & 2) string = replace(string, rtrim, '$1');
|
||||
return string;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `String.prototype.{ trimLeft, trimStart }` methods
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
||||
start: createMethod(1),
|
||||
// `String.prototype.{ trimRight, trimEnd }` methods
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
||||
end: createMethod(2),
|
||||
// `String.prototype.trim` method
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
||||
trim: createMethod(3)
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/whitespaces.js":
|
||||
/***/ ((module) => {
|
||||
|
||||
|
||||
// a string of all valid unicode whitespaces
|
||||
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
||||
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find-index.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $findIndex = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").findIndex);
|
||||
var addToUnscopables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/add-to-unscopables.js");
|
||||
|
||||
var FIND_INDEX = 'findIndex';
|
||||
var SKIPS_HOLES = true;
|
||||
|
||||
// Shouldn't skip holes
|
||||
// eslint-disable-next-line es/no-array-prototype-findindex -- testing
|
||||
if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
|
||||
|
||||
// `Array.prototype.findIndex` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.findindex
|
||||
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
||||
findIndex: function findIndex(callbackfn /* , that = undefined */) {
|
||||
return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
||||
addToUnscopables(FIND_INDEX);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $find = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").find);
|
||||
var addToUnscopables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/add-to-unscopables.js");
|
||||
|
||||
var FIND = 'find';
|
||||
var SKIPS_HOLES = true;
|
||||
|
||||
// Shouldn't skip holes
|
||||
// eslint-disable-next-line es/no-array-prototype-find -- testing
|
||||
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
||||
|
||||
// `Array.prototype.find` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.find
|
||||
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
||||
find: function find(callbackfn /* , that = undefined */) {
|
||||
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
||||
addToUnscopables(FIND);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.includes.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $includes = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-includes.js").includes);
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var addToUnscopables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/add-to-unscopables.js");
|
||||
|
||||
// FF99+ bug
|
||||
var BROKEN_ON_SPARSE = fails(function () {
|
||||
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
||||
return !Array(1).includes();
|
||||
});
|
||||
|
||||
// `Array.prototype.includes` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
||||
$({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
||||
includes: function includes(el /* , fromIndex = 0 */) {
|
||||
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
||||
addToUnscopables('includes');
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.is-array.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var isArray = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js");
|
||||
|
||||
// `Array.isArray` method
|
||||
// https://tc39.es/ecma262/#sec-array.isarray
|
||||
$({ target: 'Array', stat: true }, {
|
||||
isArray: isArray
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.reduce.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $reduce = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-reduce.js").left);
|
||||
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
||||
var CHROME_VERSION = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-v8-version.js");
|
||||
var IS_NODE = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-is-node.js");
|
||||
|
||||
// Chrome 80-82 has a critical bug
|
||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
|
||||
var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
|
||||
var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
|
||||
|
||||
// `Array.prototype.reduce` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
||||
$({ target: 'Array', proto: true, forced: FORCED }, {
|
||||
reduce: function reduce(callbackfn /* , initialValue */) {
|
||||
var length = arguments.length;
|
||||
return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.some.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $some = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").some);
|
||||
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
||||
|
||||
var STRICT_METHOD = arrayMethodIsStrict('some');
|
||||
|
||||
// `Array.prototype.some` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.some
|
||||
$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
|
||||
some: function some(callbackfn /* , thisArg */) {
|
||||
return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.function.bind.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
// TODO: Remove from `core-js@4`
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var bind = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind.js");
|
||||
|
||||
// `Function.prototype.bind` method
|
||||
// https://tc39.es/ecma262/#sec-function.prototype.bind
|
||||
// eslint-disable-next-line es/no-function-prototype-bind -- detection
|
||||
$({ target: 'Function', proto: true, forced: Function.bind !== bind }, {
|
||||
bind: bind
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.entries.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $entries = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-to-array.js").entries);
|
||||
|
||||
// `Object.entries` method
|
||||
// https://tc39.es/ecma262/#sec-object.entries
|
||||
$({ target: 'Object', stat: true }, {
|
||||
entries: function entries(O) {
|
||||
return $entries(O);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.values.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $values = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-to-array.js").values);
|
||||
|
||||
// `Object.values` method
|
||||
// https://tc39.es/ecma262/#sec-object.values
|
||||
$({ target: 'Object', stat: true }, {
|
||||
values: function values(O) {
|
||||
return $values(O);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.reflect.construct.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var getBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-built-in.js");
|
||||
var apply = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-apply.js");
|
||||
var bind = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind.js");
|
||||
var aConstructor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/a-constructor.js");
|
||||
var anObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/an-object.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var create = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-create.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
|
||||
var nativeConstruct = getBuiltIn('Reflect', 'construct');
|
||||
var ObjectPrototype = Object.prototype;
|
||||
var push = [].push;
|
||||
|
||||
// `Reflect.construct` method
|
||||
// https://tc39.es/ecma262/#sec-reflect.construct
|
||||
// MS Edge supports only 2 arguments and argumentsList argument is optional
|
||||
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
|
||||
var NEW_TARGET_BUG = fails(function () {
|
||||
function F() { /* empty */ }
|
||||
return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
|
||||
});
|
||||
|
||||
var ARGS_BUG = !fails(function () {
|
||||
nativeConstruct(function () { /* empty */ });
|
||||
});
|
||||
|
||||
var FORCED = NEW_TARGET_BUG || ARGS_BUG;
|
||||
|
||||
$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
|
||||
construct: function construct(Target, args /* , newTarget */) {
|
||||
aConstructor(Target);
|
||||
anObject(args);
|
||||
var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);
|
||||
if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
|
||||
if (Target === newTarget) {
|
||||
// w/o altered newTarget, optimization for 0-4 arguments
|
||||
switch (args.length) {
|
||||
case 0: return new Target();
|
||||
case 1: return new Target(args[0]);
|
||||
case 2: return new Target(args[0], args[1]);
|
||||
case 3: return new Target(args[0], args[1], args[2]);
|
||||
case 4: return new Target(args[0], args[1], args[2], args[3]);
|
||||
}
|
||||
// w/o altered newTarget, lot of arguments case
|
||||
var $args = [null];
|
||||
apply(push, $args, args);
|
||||
return new (apply(bind, Target, $args))();
|
||||
}
|
||||
// with altered newTarget, not support built-in constructors
|
||||
var proto = newTarget.prototype;
|
||||
var instance = create(isObject(proto) ? proto : ObjectPrototype);
|
||||
var result = apply(Target, instance, args);
|
||||
return isObject(result) ? result : instance;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.includes.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var notARegExp = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/not-a-regexp.js");
|
||||
var requireObjectCoercible = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/require-object-coercible.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var correctIsRegExpLogic = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/correct-is-regexp-logic.js");
|
||||
|
||||
var stringIndexOf = uncurryThis(''.indexOf);
|
||||
|
||||
// `String.prototype.includes` method
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
||||
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
||||
includes: function includes(searchString /* , position = 0 */) {
|
||||
return !!~stringIndexOf(
|
||||
toString(requireObjectCoercible(this)),
|
||||
toString(notARegExp(searchString)),
|
||||
arguments.length > 1 ? arguments[1] : undefined
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.trim.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $trim = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/string-trim.js").trim);
|
||||
var forcedStringTrimMethod = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/string-trim-forced.js");
|
||||
|
||||
// `String.prototype.trim` method
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
||||
$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
||||
trim: function trim() {
|
||||
return $trim(this);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.description.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
// `Symbol.prototype.description` getter
|
||||
// https://tc39.es/ecma262/#sec-symbol.prototype.description
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var global = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
||||
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
||||
var isPrototypeOf = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-is-prototype-of.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var defineBuiltInAccessor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in-accessor.js");
|
||||
var copyConstructorProperties = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/copy-constructor-properties.js");
|
||||
|
||||
var NativeSymbol = global.Symbol;
|
||||
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
||||
|
||||
if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
||||
// Safari 12 bug
|
||||
NativeSymbol().description !== undefined
|
||||
)) {
|
||||
var EmptyStringDescriptionStore = {};
|
||||
// wrap Symbol constructor for correct work with undefined description
|
||||
var SymbolWrapper = function Symbol() {
|
||||
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
||||
var result = isPrototypeOf(SymbolPrototype, this)
|
||||
? new NativeSymbol(description)
|
||||
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
||||
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
||||
if (description === '') EmptyStringDescriptionStore[result] = true;
|
||||
return result;
|
||||
};
|
||||
|
||||
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
||||
SymbolWrapper.prototype = SymbolPrototype;
|
||||
SymbolPrototype.constructor = SymbolWrapper;
|
||||
|
||||
var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
|
||||
var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);
|
||||
var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);
|
||||
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
||||
var replace = uncurryThis(''.replace);
|
||||
var stringSlice = uncurryThis(''.slice);
|
||||
|
||||
defineBuiltInAccessor(SymbolPrototype, 'description', {
|
||||
configurable: true,
|
||||
get: function description() {
|
||||
var symbol = thisSymbolValue(this);
|
||||
if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
|
||||
var string = symbolDescriptiveString(symbol);
|
||||
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
||||
return desc === '' ? undefined : desc;
|
||||
}
|
||||
});
|
||||
|
||||
$({ global: true, constructor: true, forced: true }, {
|
||||
Symbol: SymbolWrapper
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
|
@ -0,0 +1,642 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[1460],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+deprecated@4.6.0/node_modules/@wordpress/deprecated/build-module/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ deprecated)
|
||||
/* harmony export */ });
|
||||
/* unused harmony export logged */
|
||||
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/index.js");
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Object map tracking messages which have been logged, for use in ensuring a
|
||||
* message is only logged once.
|
||||
*
|
||||
* @type {Record<string, true | undefined>}
|
||||
*/
|
||||
const logged = Object.create(null);
|
||||
|
||||
/**
|
||||
* Logs a message to notify developers about a deprecated feature.
|
||||
*
|
||||
* @param {string} feature Name of the deprecated feature.
|
||||
* @param {Object} [options] Personalisation options
|
||||
* @param {string} [options.since] Version in which the feature was deprecated.
|
||||
* @param {string} [options.version] Version in which the feature will be removed.
|
||||
* @param {string} [options.alternative] Feature to use instead
|
||||
* @param {string} [options.plugin] Plugin name if it's a plugin feature
|
||||
* @param {string} [options.link] Link to documentation
|
||||
* @param {string} [options.hint] Additional message to help transition away from the deprecated feature.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* import deprecated from '@wordpress/deprecated';
|
||||
*
|
||||
* deprecated( 'Eating meat', {
|
||||
* since: '2019.01.01'
|
||||
* version: '2020.01.01',
|
||||
* alternative: 'vegetables',
|
||||
* plugin: 'the earth',
|
||||
* hint: 'You may find it beneficial to transition gradually.',
|
||||
* } );
|
||||
*
|
||||
* // Logs: 'Eating meat is deprecated since version 2019.01.01 and will be removed from the earth in version 2020.01.01. Please use vegetables instead. Note: You may find it beneficial to transition gradually.'
|
||||
* ```
|
||||
*/
|
||||
function deprecated(feature, options = {}) {
|
||||
const {
|
||||
since,
|
||||
version,
|
||||
alternative,
|
||||
plugin,
|
||||
link,
|
||||
hint
|
||||
} = options;
|
||||
const pluginMessage = plugin ? ` from ${plugin}` : '';
|
||||
const sinceMessage = since ? ` since version ${since}` : '';
|
||||
const versionMessage = version ? ` and will be removed${pluginMessage} in version ${version}` : '';
|
||||
const useInsteadMessage = alternative ? ` Please use ${alternative} instead.` : '';
|
||||
const linkMessage = link ? ` See: ${link}` : '';
|
||||
const hintMessage = hint ? ` Note: ${hint}` : '';
|
||||
const message = `${feature} is deprecated${sinceMessage}${versionMessage}.${useInsteadMessage}${linkMessage}${hintMessage}`;
|
||||
|
||||
// Skip if already logged.
|
||||
if (message in logged) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires whenever a deprecated feature is encountered
|
||||
*
|
||||
* @param {string} feature Name of the deprecated feature.
|
||||
* @param {?Object} options Personalisation options
|
||||
* @param {string} options.since Version in which the feature was deprecated.
|
||||
* @param {?string} options.version Version in which the feature will be removed.
|
||||
* @param {?string} options.alternative Feature to use instead
|
||||
* @param {?string} options.plugin Plugin name if it's a plugin feature
|
||||
* @param {?string} options.link Link to documentation
|
||||
* @param {?string} options.hint Additional message to help transition away from the deprecated feature.
|
||||
* @param {?string} message Message sent to console.warn
|
||||
*/
|
||||
(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__/* .doAction */ .Eo)('deprecated', feature, options, message);
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(message);
|
||||
logged[message] = true;
|
||||
}
|
||||
|
||||
/** @typedef {import('utility-types').NonUndefined<Parameters<typeof deprecated>[1]>} DeprecatedOptions */
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
se: () => (/* binding */ defaultHooks),
|
||||
Eo: () => (/* binding */ doAction)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: actions, addAction, addFilter, applyFilters, createHooks, currentAction, currentFilter, didAction, didFilter, doingAction, doingFilter, filters, hasAction, hasFilter, removeAction, removeAllActions, removeAllFilters, removeFilter
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/validateNamespace.js
|
||||
/**
|
||||
* Validate a namespace string.
|
||||
*
|
||||
* @param {string} namespace The namespace to validate - should take the form
|
||||
* `vendor/plugin/function`.
|
||||
*
|
||||
* @return {boolean} Whether the namespace is valid.
|
||||
*/
|
||||
function validateNamespace(namespace) {
|
||||
if ('string' !== typeof namespace || '' === namespace) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('The namespace must be a non-empty string.');
|
||||
return false;
|
||||
}
|
||||
if (!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(namespace)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/* harmony default export */ const build_module_validateNamespace = (validateNamespace);
|
||||
//# sourceMappingURL=validateNamespace.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/validateHookName.js
|
||||
/**
|
||||
* Validate a hookName string.
|
||||
*
|
||||
* @param {string} hookName The hook name to validate. Should be a non empty string containing
|
||||
* only numbers, letters, dashes, periods and underscores. Also,
|
||||
* the hook name cannot begin with `__`.
|
||||
*
|
||||
* @return {boolean} Whether the hook name is valid.
|
||||
*/
|
||||
function validateHookName(hookName) {
|
||||
if ('string' !== typeof hookName || '' === hookName) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('The hook name must be a non-empty string.');
|
||||
return false;
|
||||
}
|
||||
if (/^__/.test(hookName)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('The hook name cannot begin with `__`.');
|
||||
return false;
|
||||
}
|
||||
if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/* harmony default export */ const build_module_validateHookName = (validateHookName);
|
||||
//# sourceMappingURL=validateHookName.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/createAddHook.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @callback AddHook
|
||||
*
|
||||
* Adds the hook to the appropriate hooks container.
|
||||
*
|
||||
* @param {string} hookName Name of hook to add
|
||||
* @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.
|
||||
* @param {import('.').Callback} callback Function to call when the hook is run
|
||||
* @param {number} [priority=10] Priority of this hook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns a function which, when invoked, will add a hook.
|
||||
*
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').StoreKey} storeKey
|
||||
*
|
||||
* @return {AddHook} Function that adds a new hook.
|
||||
*/
|
||||
function createAddHook(hooks, storeKey) {
|
||||
return function addHook(hookName, namespace, callback, priority = 10) {
|
||||
const hooksStore = hooks[storeKey];
|
||||
if (!build_module_validateHookName(hookName)) {
|
||||
return;
|
||||
}
|
||||
if (!build_module_validateNamespace(namespace)) {
|
||||
return;
|
||||
}
|
||||
if ('function' !== typeof callback) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('The hook callback must be a function.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Validate numeric priority
|
||||
if ('number' !== typeof priority) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('If specified, the hook priority must be a number.');
|
||||
return;
|
||||
}
|
||||
const handler = {
|
||||
callback,
|
||||
priority,
|
||||
namespace
|
||||
};
|
||||
if (hooksStore[hookName]) {
|
||||
// Find the correct insert index of the new hook.
|
||||
const handlers = hooksStore[hookName].handlers;
|
||||
|
||||
/** @type {number} */
|
||||
let i;
|
||||
for (i = handlers.length; i > 0; i--) {
|
||||
if (priority >= handlers[i - 1].priority) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i === handlers.length) {
|
||||
// If append, operate via direct assignment.
|
||||
handlers[i] = handler;
|
||||
} else {
|
||||
// Otherwise, insert before index via splice.
|
||||
handlers.splice(i, 0, handler);
|
||||
}
|
||||
|
||||
// We may also be currently executing this hook. If the callback
|
||||
// we're adding would come after the current callback, there's no
|
||||
// problem; otherwise we need to increase the execution index of
|
||||
// any other runs by 1 to account for the added element.
|
||||
hooksStore.__current.forEach(hookInfo => {
|
||||
if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {
|
||||
hookInfo.currentIndex++;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// This is the first hook of its type.
|
||||
hooksStore[hookName] = {
|
||||
handlers: [handler],
|
||||
runs: 0
|
||||
};
|
||||
}
|
||||
if (hookName !== 'hookAdded') {
|
||||
hooks.doAction('hookAdded', hookName, namespace, callback, priority);
|
||||
}
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createAddHook = (createAddHook);
|
||||
//# sourceMappingURL=createAddHook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/createRemoveHook.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @callback RemoveHook
|
||||
* Removes the specified callback (or all callbacks) from the hook with a given hookName
|
||||
* and namespace.
|
||||
*
|
||||
* @param {string} hookName The name of the hook to modify.
|
||||
* @param {string} namespace The unique namespace identifying the callback in the
|
||||
* form `vendor/plugin/function`.
|
||||
*
|
||||
* @return {number | undefined} The number of callbacks removed.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns a function which, when invoked, will remove a specified hook or all
|
||||
* hooks by the given name.
|
||||
*
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').StoreKey} storeKey
|
||||
* @param {boolean} [removeAll=false] Whether to remove all callbacks for a hookName,
|
||||
* without regard to namespace. Used to create
|
||||
* `removeAll*` functions.
|
||||
*
|
||||
* @return {RemoveHook} Function that removes hooks.
|
||||
*/
|
||||
function createRemoveHook(hooks, storeKey, removeAll = false) {
|
||||
return function removeHook(hookName, namespace) {
|
||||
const hooksStore = hooks[storeKey];
|
||||
if (!build_module_validateHookName(hookName)) {
|
||||
return;
|
||||
}
|
||||
if (!removeAll && !build_module_validateNamespace(namespace)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Bail if no hooks exist by this name.
|
||||
if (!hooksStore[hookName]) {
|
||||
return 0;
|
||||
}
|
||||
let handlersRemoved = 0;
|
||||
if (removeAll) {
|
||||
handlersRemoved = hooksStore[hookName].handlers.length;
|
||||
hooksStore[hookName] = {
|
||||
runs: hooksStore[hookName].runs,
|
||||
handlers: []
|
||||
};
|
||||
} else {
|
||||
// Try to find the specified callback to remove.
|
||||
const handlers = hooksStore[hookName].handlers;
|
||||
for (let i = handlers.length - 1; i >= 0; i--) {
|
||||
if (handlers[i].namespace === namespace) {
|
||||
handlers.splice(i, 1);
|
||||
handlersRemoved++;
|
||||
// This callback may also be part of a hook that is
|
||||
// currently executing. If the callback we're removing
|
||||
// comes after the current callback, there's no problem;
|
||||
// otherwise we need to decrease the execution index of any
|
||||
// other runs by 1 to account for the removed element.
|
||||
hooksStore.__current.forEach(hookInfo => {
|
||||
if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {
|
||||
hookInfo.currentIndex--;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hookName !== 'hookRemoved') {
|
||||
hooks.doAction('hookRemoved', hookName, namespace);
|
||||
}
|
||||
return handlersRemoved;
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createRemoveHook = (createRemoveHook);
|
||||
//# sourceMappingURL=createRemoveHook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/createHasHook.js
|
||||
/**
|
||||
* @callback HasHook
|
||||
*
|
||||
* Returns whether any handlers are attached for the given hookName and optional namespace.
|
||||
*
|
||||
* @param {string} hookName The name of the hook to check for.
|
||||
* @param {string} [namespace] Optional. The unique namespace identifying the callback
|
||||
* in the form `vendor/plugin/function`.
|
||||
*
|
||||
* @return {boolean} Whether there are handlers that are attached to the given hook.
|
||||
*/
|
||||
/**
|
||||
* Returns a function which, when invoked, will return whether any handlers are
|
||||
* attached to a particular hook.
|
||||
*
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').StoreKey} storeKey
|
||||
*
|
||||
* @return {HasHook} Function that returns whether any handlers are
|
||||
* attached to a particular hook and optional namespace.
|
||||
*/
|
||||
function createHasHook(hooks, storeKey) {
|
||||
return function hasHook(hookName, namespace) {
|
||||
const hooksStore = hooks[storeKey];
|
||||
|
||||
// Use the namespace if provided.
|
||||
if ('undefined' !== typeof namespace) {
|
||||
return hookName in hooksStore && hooksStore[hookName].handlers.some(hook => hook.namespace === namespace);
|
||||
}
|
||||
return hookName in hooksStore;
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createHasHook = (createHasHook);
|
||||
//# sourceMappingURL=createHasHook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/createRunHook.js
|
||||
/**
|
||||
* Returns a function which, when invoked, will execute all callbacks
|
||||
* registered to a hook of the specified type, optionally returning the final
|
||||
* value of the call chain.
|
||||
*
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').StoreKey} storeKey
|
||||
* @param {boolean} [returnFirstArg=false] Whether each hook callback is expected to
|
||||
* return its first argument.
|
||||
*
|
||||
* @return {(hookName:string, ...args: unknown[]) => undefined|unknown} Function that runs hook callbacks.
|
||||
*/
|
||||
function createRunHook(hooks, storeKey, returnFirstArg = false) {
|
||||
return function runHooks(hookName, ...args) {
|
||||
const hooksStore = hooks[storeKey];
|
||||
if (!hooksStore[hookName]) {
|
||||
hooksStore[hookName] = {
|
||||
handlers: [],
|
||||
runs: 0
|
||||
};
|
||||
}
|
||||
hooksStore[hookName].runs++;
|
||||
const handlers = hooksStore[hookName].handlers;
|
||||
|
||||
// The following code is stripped from production builds.
|
||||
if (false) {}
|
||||
if (!handlers || !handlers.length) {
|
||||
return returnFirstArg ? args[0] : undefined;
|
||||
}
|
||||
const hookInfo = {
|
||||
name: hookName,
|
||||
currentIndex: 0
|
||||
};
|
||||
hooksStore.__current.push(hookInfo);
|
||||
while (hookInfo.currentIndex < handlers.length) {
|
||||
const handler = handlers[hookInfo.currentIndex];
|
||||
const result = handler.callback.apply(null, args);
|
||||
if (returnFirstArg) {
|
||||
args[0] = result;
|
||||
}
|
||||
hookInfo.currentIndex++;
|
||||
}
|
||||
hooksStore.__current.pop();
|
||||
if (returnFirstArg) {
|
||||
return args[0];
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createRunHook = (createRunHook);
|
||||
//# sourceMappingURL=createRunHook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/createCurrentHook.js
|
||||
/**
|
||||
* Returns a function which, when invoked, will return the name of the
|
||||
* currently running hook, or `null` if no hook of the given type is currently
|
||||
* running.
|
||||
*
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').StoreKey} storeKey
|
||||
*
|
||||
* @return {() => string | null} Function that returns the current hook name or null.
|
||||
*/
|
||||
function createCurrentHook(hooks, storeKey) {
|
||||
return function currentHook() {
|
||||
var _hooksStore$__current;
|
||||
const hooksStore = hooks[storeKey];
|
||||
return (_hooksStore$__current = hooksStore.__current[hooksStore.__current.length - 1]?.name) !== null && _hooksStore$__current !== void 0 ? _hooksStore$__current : null;
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createCurrentHook = (createCurrentHook);
|
||||
//# sourceMappingURL=createCurrentHook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/createDoingHook.js
|
||||
/**
|
||||
* @callback DoingHook
|
||||
* Returns whether a hook is currently being executed.
|
||||
*
|
||||
* @param {string} [hookName] The name of the hook to check for. If
|
||||
* omitted, will check for any hook being executed.
|
||||
*
|
||||
* @return {boolean} Whether the hook is being executed.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns a function which, when invoked, will return whether a hook is
|
||||
* currently being executed.
|
||||
*
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').StoreKey} storeKey
|
||||
*
|
||||
* @return {DoingHook} Function that returns whether a hook is currently
|
||||
* being executed.
|
||||
*/
|
||||
function createDoingHook(hooks, storeKey) {
|
||||
return function doingHook(hookName) {
|
||||
const hooksStore = hooks[storeKey];
|
||||
|
||||
// If the hookName was not passed, check for any current hook.
|
||||
if ('undefined' === typeof hookName) {
|
||||
return 'undefined' !== typeof hooksStore.__current[0];
|
||||
}
|
||||
|
||||
// Return the __current hook.
|
||||
return hooksStore.__current[0] ? hookName === hooksStore.__current[0].name : false;
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createDoingHook = (createDoingHook);
|
||||
//# sourceMappingURL=createDoingHook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/createDidHook.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @callback DidHook
|
||||
*
|
||||
* Returns the number of times an action has been fired.
|
||||
*
|
||||
* @param {string} hookName The hook name to check.
|
||||
*
|
||||
* @return {number | undefined} The number of times the hook has run.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns a function which, when invoked, will return the number of times a
|
||||
* hook has been called.
|
||||
*
|
||||
* @param {import('.').Hooks} hooks Hooks instance.
|
||||
* @param {import('.').StoreKey} storeKey
|
||||
*
|
||||
* @return {DidHook} Function that returns a hook's call count.
|
||||
*/
|
||||
function createDidHook(hooks, storeKey) {
|
||||
return function didHook(hookName) {
|
||||
const hooksStore = hooks[storeKey];
|
||||
if (!build_module_validateHookName(hookName)) {
|
||||
return;
|
||||
}
|
||||
return hooksStore[hookName] && hooksStore[hookName].runs ? hooksStore[hookName].runs : 0;
|
||||
};
|
||||
}
|
||||
/* harmony default export */ const build_module_createDidHook = (createDidHook);
|
||||
//# sourceMappingURL=createDidHook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/createHooks.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal class for constructing hooks. Use `createHooks()` function
|
||||
*
|
||||
* Note, it is necessary to expose this class to make its type public.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
class _Hooks {
|
||||
constructor() {
|
||||
/** @type {import('.').Store} actions */
|
||||
this.actions = Object.create(null);
|
||||
this.actions.__current = [];
|
||||
|
||||
/** @type {import('.').Store} filters */
|
||||
this.filters = Object.create(null);
|
||||
this.filters.__current = [];
|
||||
this.addAction = build_module_createAddHook(this, 'actions');
|
||||
this.addFilter = build_module_createAddHook(this, 'filters');
|
||||
this.removeAction = build_module_createRemoveHook(this, 'actions');
|
||||
this.removeFilter = build_module_createRemoveHook(this, 'filters');
|
||||
this.hasAction = build_module_createHasHook(this, 'actions');
|
||||
this.hasFilter = build_module_createHasHook(this, 'filters');
|
||||
this.removeAllActions = build_module_createRemoveHook(this, 'actions', true);
|
||||
this.removeAllFilters = build_module_createRemoveHook(this, 'filters', true);
|
||||
this.doAction = build_module_createRunHook(this, 'actions');
|
||||
this.applyFilters = build_module_createRunHook(this, 'filters', true);
|
||||
this.currentAction = build_module_createCurrentHook(this, 'actions');
|
||||
this.currentFilter = build_module_createCurrentHook(this, 'filters');
|
||||
this.doingAction = build_module_createDoingHook(this, 'actions');
|
||||
this.doingFilter = build_module_createDoingHook(this, 'filters');
|
||||
this.didAction = build_module_createDidHook(this, 'actions');
|
||||
this.didFilter = build_module_createDidHook(this, 'filters');
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {_Hooks} Hooks */
|
||||
|
||||
/**
|
||||
* Returns an instance of the hooks object.
|
||||
*
|
||||
* @return {Hooks} A Hooks instance.
|
||||
*/
|
||||
function createHooks() {
|
||||
return new _Hooks();
|
||||
}
|
||||
/* harmony default export */ const build_module_createHooks = (createHooks);
|
||||
//# sourceMappingURL=createHooks.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+hooks@4.6.0/node_modules/@wordpress/hooks/build-module/index.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/** @typedef {(...args: any[])=>any} Callback */
|
||||
|
||||
/**
|
||||
* @typedef Handler
|
||||
* @property {Callback} callback The callback
|
||||
* @property {string} namespace The namespace
|
||||
* @property {number} priority The namespace
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Hook
|
||||
* @property {Handler[]} handlers Array of handlers
|
||||
* @property {number} runs Run counter
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Current
|
||||
* @property {string} name Hook name
|
||||
* @property {number} currentIndex The index
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Record<string, Hook> & {__current: Current[]}} Store
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {'actions' | 'filters'} StoreKey
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {import('./createHooks').Hooks} Hooks
|
||||
*/
|
||||
|
||||
const defaultHooks = build_module_createHooks();
|
||||
const {
|
||||
addAction,
|
||||
addFilter,
|
||||
removeAction,
|
||||
removeFilter,
|
||||
hasAction,
|
||||
hasFilter,
|
||||
removeAllActions,
|
||||
removeAllFilters,
|
||||
doAction,
|
||||
applyFilters,
|
||||
currentAction,
|
||||
currentFilter,
|
||||
doingAction,
|
||||
doingFilter,
|
||||
didAction,
|
||||
didFilter,
|
||||
actions,
|
||||
filters
|
||||
} = defaultHooks;
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
|||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,875 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[1772],{
|
||||
|
||||
/***/ "../../packages/js/components/src/experimental-select-control/combo-box.tsx":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ a: () => (/* binding */ ComboBox)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/icon/index.js");
|
||||
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/library/chevron-down.js");
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var ToggleButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
|
||||
// using forwardRef here because getToggleButtonProps injects a ref prop
|
||||
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)({
|
||||
className: "woocommerce-experimental-select-control__combox-box-toggle-button"
|
||||
}, props, {
|
||||
ref: ref
|
||||
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A, {
|
||||
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A
|
||||
}));
|
||||
});
|
||||
var ComboBox = function ComboBox(_ref) {
|
||||
var children = _ref.children,
|
||||
comboBoxProps = _ref.comboBoxProps,
|
||||
_ref$getToggleButtonP = _ref.getToggleButtonProps,
|
||||
getToggleButtonProps = _ref$getToggleButtonP === void 0 ? function () {
|
||||
return {};
|
||||
} : _ref$getToggleButtonP,
|
||||
inputProps = _ref.inputProps,
|
||||
suffix = _ref.suffix,
|
||||
showToggleButton = _ref.showToggleButton;
|
||||
var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
||||
var maybeFocusInput = function maybeFocusInput(event) {
|
||||
if (!inputRef || !inputRef.current) {
|
||||
return;
|
||||
}
|
||||
if (document.activeElement !== inputRef.current) {
|
||||
event.preventDefault();
|
||||
inputRef.current.focus();
|
||||
event.stopPropagation();
|
||||
}
|
||||
};
|
||||
return (
|
||||
// Disable reason: The click event is purely for accidental clicks around the input.
|
||||
// Keyboard users are still able to tab to and interact with elements in the combobox.
|
||||
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('woocommerce-experimental-select-control__combo-box-wrapper', {
|
||||
'woocommerce-experimental-select-control__combo-box-wrapper--disabled': inputProps.disabled
|
||||
}),
|
||||
onMouseDown: maybeFocusInput
|
||||
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
className: "woocommerce-experimental-select-control__items-wrapper"
|
||||
}, children, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)({}, comboBoxProps, {
|
||||
className: "woocommerce-experimental-select-control__combox-box"
|
||||
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)({}, inputProps, {
|
||||
ref: function ref(node) {
|
||||
inputRef.current = node;
|
||||
if (typeof inputProps.ref === 'function') {
|
||||
inputProps.ref(node);
|
||||
}
|
||||
}
|
||||
})))), suffix && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
||||
className: "woocommerce-experimental-select-control__suffix"
|
||||
}, suffix), showToggleButton && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleButton, getToggleButtonProps()))
|
||||
);
|
||||
};
|
||||
try {
|
||||
// @ts-ignore
|
||||
ComboBox.displayName = "ComboBox";
|
||||
// @ts-ignore
|
||||
ComboBox.__docgenInfo = { "description": "", "displayName": "ComboBox", "props": { "comboBoxProps": { "defaultValue": null, "description": "", "name": "comboBoxProps", "required": true, "type": { "name": "DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>" } }, "inputProps": { "defaultValue": null, "description": "", "name": "inputProps", "required": true, "type": { "name": "DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>" } }, "getToggleButtonProps": { "defaultValue": { value: "() => ( {} )" }, "description": "", "name": "getToggleButtonProps", "required": false, "type": { "name": "(() => Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, \"ref\">)" } }, "suffix": { "defaultValue": null, "description": "", "name": "suffix", "required": false, "type": { "name": "Element | null" } }, "showToggleButton": { "defaultValue": null, "description": "", "name": "showToggleButton", "required": false, "type": { "name": "boolean" } } } };
|
||||
// @ts-ignore
|
||||
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
||||
// @ts-ignore
|
||||
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/experimental-select-control/combo-box.tsx#ComboBox"] = { docgenInfo: ComboBox.__docgenInfo, name: "ComboBox", path: "../../packages/js/components/src/experimental-select-control/combo-box.tsx#ComboBox" };
|
||||
}
|
||||
catch (__react_docgen_typescript_loader_error) { }
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../packages/js/components/src/experimental-select-control/menu-item.tsx":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ D: () => (/* binding */ MenuItem)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/tooltip/index.js");
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
var MenuItem = function MenuItem(_ref) {
|
||||
var children = _ref.children,
|
||||
getItemProps = _ref.getItemProps,
|
||||
index = _ref.index,
|
||||
isActive = _ref.isActive,
|
||||
_ref$activeStyle = _ref.activeStyle,
|
||||
activeStyle = _ref$activeStyle === void 0 ? {
|
||||
backgroundColor: '#bde4ff'
|
||||
} : _ref$activeStyle,
|
||||
item = _ref.item,
|
||||
tooltipText = _ref.tooltipText,
|
||||
className = _ref.className;
|
||||
function renderListItem() {
|
||||
var itemProps = getItemProps({
|
||||
item: item,
|
||||
index: index
|
||||
});
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("li", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)({}, itemProps, {
|
||||
style: isActive ? activeStyle : itemProps.style,
|
||||
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('woocommerce-experimental-select-control__menu-item', itemProps.className, className)
|
||||
}), children);
|
||||
}
|
||||
if (tooltipText) {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A, {
|
||||
text: tooltipText,
|
||||
position: "top center"
|
||||
}, renderListItem());
|
||||
}
|
||||
return renderListItem();
|
||||
};
|
||||
try {
|
||||
// @ts-ignore
|
||||
MenuItem.displayName = "MenuItem";
|
||||
// @ts-ignore
|
||||
MenuItem.__docgenInfo = { "description": "", "displayName": "MenuItem", "props": { "index": { "defaultValue": null, "description": "", "name": "index", "required": true, "type": { "name": "number" } }, "isActive": { "defaultValue": null, "description": "", "name": "isActive", "required": true, "type": { "name": "boolean" } }, "item": { "defaultValue": null, "description": "", "name": "item", "required": true, "type": { "name": "ItemType" } }, "getItemProps": { "defaultValue": null, "description": "", "name": "getItemProps", "required": true, "type": { "name": "getItemPropsType<ItemType>" } }, "activeStyle": { "defaultValue": { value: "{ backgroundColor: '#bde4ff' }" }, "description": "", "name": "activeStyle", "required": false, "type": { "name": "CSSProperties" } }, "tooltipText": { "defaultValue": null, "description": "", "name": "tooltipText", "required": false, "type": { "name": "string" } }, "className": { "defaultValue": null, "description": "", "name": "className", "required": false, "type": { "name": "string" } } } };
|
||||
// @ts-ignore
|
||||
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
||||
// @ts-ignore
|
||||
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/experimental-select-control/menu-item.tsx#MenuItem"] = { docgenInfo: MenuItem.__docgenInfo, name: "MenuItem", path: "../../packages/js/components/src/experimental-select-control/menu-item.tsx#MenuItem" };
|
||||
}
|
||||
catch (__react_docgen_typescript_loader_error) { }
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../packages/js/components/src/experimental-select-control/menu.tsx":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ W: () => (/* binding */ Menu),
|
||||
/* harmony export */ c: () => (/* binding */ MenuSlot)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/popover/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js");
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
var Menu = function Menu(_ref) {
|
||||
var _selectControlMenuRef2;
|
||||
var children = _ref.children,
|
||||
getMenuProps = _ref.getMenuProps,
|
||||
isOpen = _ref.isOpen,
|
||||
className = _ref.className,
|
||||
_ref$position = _ref.position,
|
||||
position = _ref$position === void 0 ? 'bottom right' : _ref$position,
|
||||
_ref$scrollIntoViewOn = _ref.scrollIntoViewOnOpen,
|
||||
scrollIntoViewOnOpen = _ref$scrollIntoViewOn === void 0 ? false : _ref$scrollIntoViewOn;
|
||||
var selectControlMenuRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
||||
var popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
||||
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(function () {
|
||||
var _selectControlMenuRef, _popoverRef$current;
|
||||
var comboboxWrapper = (_selectControlMenuRef = selectControlMenuRef.current) === null || _selectControlMenuRef === void 0 ? void 0 : _selectControlMenuRef.closest('.woocommerce-experimental-select-control__combo-box-wrapper');
|
||||
var popoverContent = (_popoverRef$current = popoverRef.current) === null || _popoverRef$current === void 0 ? void 0 : _popoverRef$current.querySelector('.components-popover__content');
|
||||
if (comboboxWrapper && (comboboxWrapper === null || comboboxWrapper === void 0 ? void 0 : comboboxWrapper.clientWidth) > 0) {
|
||||
if (popoverContent) {
|
||||
popoverContent.style.width = "".concat(comboboxWrapper.getBoundingClientRect().width, "px");
|
||||
}
|
||||
}
|
||||
}, [selectControlMenuRef.current, (_selectControlMenuRef2 = selectControlMenuRef.current) === null || _selectControlMenuRef2 === void 0 ? void 0 : _selectControlMenuRef2.clientWidth, popoverRef.current]);
|
||||
|
||||
// Scroll the selected item into view when the menu opens.
|
||||
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
||||
if (isOpen && scrollIntoViewOnOpen) {
|
||||
var _selectControlMenuRef3;
|
||||
(_selectControlMenuRef3 = selectControlMenuRef.current) === null || _selectControlMenuRef3 === void 0 || _selectControlMenuRef3.scrollIntoView();
|
||||
}
|
||||
}, [isOpen, scrollIntoViewOnOpen]);
|
||||
|
||||
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
|
||||
/* Disabled because of the onmouseup on the ul element below. */
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
|
||||
ref: selectControlMenuRef,
|
||||
className: "woocommerce-experimental-select-control__menu"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A
|
||||
// @ts-expect-error this prop does exist, see: https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/popover/index.tsx#L180.
|
||||
, {
|
||||
__unstableSlotName: "woocommerce-select-control-menu",
|
||||
focusOnMount: false,
|
||||
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('woocommerce-experimental-select-control__popover-menu', {
|
||||
'is-open': isOpen,
|
||||
'has-results': _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Children.count(children) > 0
|
||||
}),
|
||||
position: position,
|
||||
animate: false,
|
||||
resize: false,
|
||||
ref: popoverRef
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("ul", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({}, getMenuProps(), {
|
||||
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('woocommerce-experimental-select-control__popover-menu-container', className),
|
||||
onMouseUp: function onMouseUp(e) {
|
||||
return (
|
||||
// Fix to prevent select control dropdown from closing when selecting within the Popover.
|
||||
e.stopPropagation()
|
||||
);
|
||||
}
|
||||
}), isOpen && children))));
|
||||
/* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
|
||||
};
|
||||
var MenuSlot = function MenuSlot() {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.createPortal)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
|
||||
"aria-live": "off"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.Slot, {
|
||||
name: "woocommerce-select-control-menu"
|
||||
})), document.body);
|
||||
};
|
||||
try {
|
||||
// @ts-ignore
|
||||
Menu.displayName = "Menu";
|
||||
// @ts-ignore
|
||||
Menu.__docgenInfo = { "description": "", "displayName": "Menu", "props": { "getMenuProps": { "defaultValue": null, "description": "", "name": "getMenuProps", "required": true, "type": { "name": "getMenuPropsType" } }, "isOpen": { "defaultValue": null, "description": "", "name": "isOpen", "required": true, "type": { "name": "boolean" } }, "className": { "defaultValue": null, "description": "", "name": "className", "required": false, "type": { "name": "string" } }, "position": { "defaultValue": { value: "bottom right" }, "description": "", "name": "position", "required": false, "type": { "name": "enum", "value": [{ "value": "\"top left\"" }, { "value": "\"top right\"" }, { "value": "\"top center\"" }, { "value": "\"middle left\"" }, { "value": "\"middle right\"" }, { "value": "\"middle center\"" }, { "value": "\"bottom left\"" }, { "value": "\"bottom right\"" }, { "value": "\"bottom center\"" }] } }, "scrollIntoViewOnOpen": { "defaultValue": { value: "false" }, "description": "", "name": "scrollIntoViewOnOpen", "required": false, "type": { "name": "boolean" } } } };
|
||||
// @ts-ignore
|
||||
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
||||
// @ts-ignore
|
||||
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/experimental-select-control/menu.tsx#Menu"] = { docgenInfo: Menu.__docgenInfo, name: "Menu", path: "../../packages/js/components/src/experimental-select-control/menu.tsx#Menu" };
|
||||
}
|
||||
catch (__react_docgen_typescript_loader_error) { }
|
||||
try {
|
||||
// @ts-ignore
|
||||
MenuSlot.displayName = "MenuSlot";
|
||||
// @ts-ignore
|
||||
MenuSlot.__docgenInfo = { "description": "", "displayName": "MenuSlot", "props": {} };
|
||||
// @ts-ignore
|
||||
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
||||
// @ts-ignore
|
||||
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/experimental-select-control/menu.tsx#MenuSlot"] = { docgenInfo: MenuSlot.__docgenInfo, name: "MenuSlot", path: "../../packages/js/components/src/experimental-select-control/menu.tsx#MenuSlot" };
|
||||
}
|
||||
catch (__react_docgen_typescript_loader_error) { }
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../packages/js/components/src/experimental-select-control/select-control.tsx":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Y: () => (/* binding */ SelectControl),
|
||||
U: () => (/* binding */ selectControlStateChangeTypes)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
||||
var defineProperty = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
|
||||
var objectWithoutProperties = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
||||
var slicedToArray = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
||||
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.map.js
|
||||
var es_array_map = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.map.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.concat.js
|
||||
var es_array_concat = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.concat.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.is-array.js
|
||||
var es_array_is_array = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.is-array.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.filter.js
|
||||
var es_array_filter = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.filter.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.to-string.js
|
||||
var es_object_to_string = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.to-string.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.keys.js
|
||||
var es_object_keys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.keys.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.js
|
||||
var es_symbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.js
|
||||
var es_object_get_own_property_descriptor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.for-each.js
|
||||
var es_array_for_each = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.for-each.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.for-each.js
|
||||
var web_dom_collections_for_each = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.for-each.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.js
|
||||
var es_object_get_own_property_descriptors = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-properties.js
|
||||
var es_object_define_properties = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-properties.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-property.js
|
||||
var es_object_define_property = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-property.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/downshift@6.1.12_react@17.0.2/node_modules/downshift/dist/downshift.esm.js + 1 modules
|
||||
var downshift_esm = __webpack_require__("../../node_modules/.pnpm/downshift@6.1.12_react@17.0.2/node_modules/downshift/dist/downshift.esm.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js
|
||||
var use_instance_id = __webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/library/chevron-down.js
|
||||
var chevron_down = __webpack_require__("../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/library/chevron-down.js");
|
||||
// EXTERNAL MODULE: ../../packages/js/components/src/experimental-select-control/selected-items.tsx
|
||||
var selected_items = __webpack_require__("../../packages/js/components/src/experimental-select-control/selected-items.tsx");
|
||||
// EXTERNAL MODULE: ../../packages/js/components/src/experimental-select-control/combo-box.tsx
|
||||
var combo_box = __webpack_require__("../../packages/js/components/src/experimental-select-control/combo-box.tsx");
|
||||
// EXTERNAL MODULE: ../../packages/js/components/src/experimental-select-control/menu.tsx
|
||||
var menu = __webpack_require__("../../packages/js/components/src/experimental-select-control/menu.tsx");
|
||||
// EXTERNAL MODULE: ../../packages/js/components/src/experimental-select-control/menu-item.tsx
|
||||
var menu_item = __webpack_require__("../../packages/js/components/src/experimental-select-control/menu-item.tsx");
|
||||
// EXTERNAL MODULE: ../../packages/js/components/src/experimental-select-control/suffix-icon.tsx
|
||||
var suffix_icon = __webpack_require__("../../packages/js/components/src/experimental-select-control/suffix-icon.tsx");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.exec.js
|
||||
var es_regexp_exec = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.exec.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.replace.js
|
||||
var es_string_replace = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.replace.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.constructor.js
|
||||
var es_regexp_constructor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.constructor.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.to-string.js
|
||||
var es_regexp_to_string = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.to-string.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.index-of.js
|
||||
var es_array_index_of = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.index-of.js");
|
||||
;// CONCATENATED MODULE: ../../packages/js/components/src/experimental-select-control/utils.ts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
function isDefaultItemType(item) {
|
||||
return Boolean(item) && item.label !== undefined && item.value !== undefined;
|
||||
}
|
||||
var defaultGetItemLabel = function defaultGetItemLabel(item) {
|
||||
if (isDefaultItemType(item)) {
|
||||
return item.label;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
var defaultGetItemValue = function defaultGetItemValue(item) {
|
||||
if (isDefaultItemType(item)) {
|
||||
return item.value;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
var defaultGetFilteredItems = function defaultGetFilteredItems(allItems, inputValue, selectedItems, getItemLabel) {
|
||||
var escapedInputValue = inputValue.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
var re = new RegExp(escapedInputValue, 'gi');
|
||||
return allItems.filter(function (item) {
|
||||
return selectedItems.indexOf(item) < 0 && re.test(getItemLabel(item).toLowerCase());
|
||||
});
|
||||
};
|
||||
;// CONCATENATED MODULE: ../../packages/js/components/src/experimental-select-control/select-control.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
var _excluded = ["inputValue"];
|
||||
|
||||
function ownKeys(e, r) {
|
||||
var t = Object.keys(e);
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var o = Object.getOwnPropertySymbols(e);
|
||||
r && (o = o.filter(function (r) {
|
||||
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
||||
})), t.push.apply(t, o);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
function _objectSpread(e) {
|
||||
for (var r = 1; r < arguments.length; r++) {
|
||||
var t = null != arguments[r] ? arguments[r] : {};
|
||||
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
||||
(0,defineProperty/* default */.A)(e, r, t[r]);
|
||||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
||||
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
||||
});
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var selectControlStateChangeTypes = downshift_esm/* useCombobox */.Bp.stateChangeTypes;
|
||||
function SelectControl(_ref) {
|
||||
var _ref$getItemLabel = _ref.getItemLabel,
|
||||
getItemLabel = _ref$getItemLabel === void 0 ? defaultGetItemLabel : _ref$getItemLabel,
|
||||
_ref$getItemValue = _ref.getItemValue,
|
||||
getItemValue = _ref$getItemValue === void 0 ? defaultGetItemValue : _ref$getItemValue,
|
||||
_ref$hasExternalTags = _ref.hasExternalTags,
|
||||
hasExternalTags = _ref$hasExternalTags === void 0 ? false : _ref$hasExternalTags,
|
||||
_ref$children = _ref.children,
|
||||
children = _ref$children === void 0 ? function (_ref2) {
|
||||
var renderItems = _ref2.items,
|
||||
highlightedIndex = _ref2.highlightedIndex,
|
||||
getItemProps = _ref2.getItemProps,
|
||||
getMenuProps = _ref2.getMenuProps,
|
||||
isOpen = _ref2.isOpen;
|
||||
return (0,react.createElement)(menu/* Menu */.W, {
|
||||
getMenuProps: getMenuProps,
|
||||
isOpen: isOpen
|
||||
}, renderItems.map(function (item, index) {
|
||||
return (0,react.createElement)(menu_item/* MenuItem */.D, {
|
||||
key: "".concat(getItemValue(item)).concat(index),
|
||||
index: index,
|
||||
isActive: highlightedIndex === index,
|
||||
item: item,
|
||||
getItemProps: getItemProps
|
||||
}, getItemLabel(item));
|
||||
}));
|
||||
} : _ref$children,
|
||||
_ref$multiple = _ref.multiple,
|
||||
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
||||
items = _ref.items,
|
||||
label = _ref.label,
|
||||
_ref$getFilteredItems = _ref.getFilteredItems,
|
||||
getFilteredItems = _ref$getFilteredItems === void 0 ? defaultGetFilteredItems : _ref$getFilteredItems,
|
||||
_ref$onInputChange = _ref.onInputChange,
|
||||
onInputChange = _ref$onInputChange === void 0 ? function () {
|
||||
return null;
|
||||
} : _ref$onInputChange,
|
||||
_ref$onRemove = _ref.onRemove,
|
||||
onRemove = _ref$onRemove === void 0 ? function () {
|
||||
return null;
|
||||
} : _ref$onRemove,
|
||||
_ref$onSelect = _ref.onSelect,
|
||||
onSelect = _ref$onSelect === void 0 ? function () {
|
||||
return null;
|
||||
} : _ref$onSelect,
|
||||
_ref$onFocus = _ref.onFocus,
|
||||
_onFocus = _ref$onFocus === void 0 ? function () {
|
||||
return null;
|
||||
} : _ref$onFocus,
|
||||
_ref$onKeyDown = _ref.onKeyDown,
|
||||
onKeyDown = _ref$onKeyDown === void 0 ? function () {
|
||||
return null;
|
||||
} : _ref$onKeyDown,
|
||||
_ref$stateReducer = _ref.stateReducer,
|
||||
_stateReducer = _ref$stateReducer === void 0 ? function (state, actionAndChanges) {
|
||||
return actionAndChanges.changes;
|
||||
} : _ref$stateReducer,
|
||||
placeholder = _ref.placeholder,
|
||||
selected = _ref.selected,
|
||||
className = _ref.className,
|
||||
disabled = _ref.disabled,
|
||||
_ref$inputProps = _ref.inputProps,
|
||||
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps,
|
||||
_ref$suffix = _ref.suffix,
|
||||
suffix = _ref$suffix === void 0 ? (0,react.createElement)(suffix_icon/* SuffixIcon */.f, {
|
||||
icon: chevron_down/* default */.A
|
||||
}) : _ref$suffix,
|
||||
_ref$showToggleButton = _ref.showToggleButton,
|
||||
showToggleButton = _ref$showToggleButton === void 0 ? false : _ref$showToggleButton,
|
||||
_ref$readOnlyWhenClos = _ref.readOnlyWhenClosed,
|
||||
readOnlyWhenClosed = _ref$readOnlyWhenClos === void 0 ? true : _ref$readOnlyWhenClos,
|
||||
_ref$__experimentalOp = _ref.__experimentalOpenMenuOnFocus,
|
||||
__experimentalOpenMenuOnFocus = _ref$__experimentalOp === void 0 ? false : _ref$__experimentalOp;
|
||||
var _useState = (0,react.useState)(false),
|
||||
_useState2 = (0,slicedToArray/* default */.A)(_useState, 2),
|
||||
isFocused = _useState2[0],
|
||||
setIsFocused = _useState2[1];
|
||||
var _useState3 = (0,react.useState)(''),
|
||||
_useState4 = (0,slicedToArray/* default */.A)(_useState3, 2),
|
||||
inputValue = _useState4[0],
|
||||
setInputValue = _useState4[1];
|
||||
var instanceId = (0,use_instance_id/* default */.A)(SelectControl, 'woocommerce-experimental-select-control');
|
||||
var innerInputClassName = 'woocommerce-experimental-select-control__input';
|
||||
var selectControlWrapperRef = (0,react.useRef)(null);
|
||||
var selectedItems = selected === null ? [] : selected;
|
||||
selectedItems = Array.isArray(selectedItems) ? selectedItems : [selectedItems].filter(Boolean);
|
||||
var singleSelectedItem = !multiple && selectedItems.length ? selectedItems[0] : null;
|
||||
var filteredItems = getFilteredItems(items, inputValue, selectedItems, getItemLabel);
|
||||
var _useMultipleSelection = (0,downshift_esm/* useMultipleSelection */.mH)({
|
||||
itemToString: getItemLabel,
|
||||
selectedItems: selectedItems
|
||||
}),
|
||||
getSelectedItemProps = _useMultipleSelection.getSelectedItemProps,
|
||||
getDropdownProps = _useMultipleSelection.getDropdownProps,
|
||||
removeSelectedItem = _useMultipleSelection.removeSelectedItem;
|
||||
(0,react.useEffect)(function () {
|
||||
if (multiple) {
|
||||
return;
|
||||
}
|
||||
setInputValue(getItemLabel(singleSelectedItem));
|
||||
}, [getItemLabel, multiple, singleSelectedItem]);
|
||||
var _useCombobox = (0,downshift_esm/* useCombobox */.Bp)({
|
||||
id: instanceId,
|
||||
initialSelectedItem: singleSelectedItem,
|
||||
inputValue: inputValue,
|
||||
items: filteredItems,
|
||||
selectedItem: multiple ? null : singleSelectedItem,
|
||||
itemToString: getItemLabel,
|
||||
onSelectedItemChange: function onSelectedItemChange(_ref3) {
|
||||
var selectedItem = _ref3.selectedItem;
|
||||
if (selectedItem) {
|
||||
onSelect(selectedItem);
|
||||
} else if (singleSelectedItem) {
|
||||
onRemove(singleSelectedItem);
|
||||
}
|
||||
},
|
||||
onInputValueChange: function onInputValueChange(_ref4) {
|
||||
var value = _ref4.inputValue,
|
||||
changes = (0,objectWithoutProperties/* default */.A)(_ref4, _excluded);
|
||||
if (value !== undefined) {
|
||||
setInputValue(value);
|
||||
onInputChange(value, changes);
|
||||
}
|
||||
},
|
||||
// @ts-expect-error We're allowed to use the property.
|
||||
stateReducer: function stateReducer(state, actionAndChanges) {
|
||||
var _changes$inputValue, _changes$inputValue2, _newChanges;
|
||||
var changes = actionAndChanges.changes,
|
||||
type = actionAndChanges.type;
|
||||
var newChanges;
|
||||
switch (type) {
|
||||
case selectControlStateChangeTypes.InputBlur:
|
||||
// Set input back to selected item if there is a selected item, blank otherwise.
|
||||
newChanges = _objectSpread(_objectSpread({}, changes), {}, {
|
||||
selectedItem: !((_changes$inputValue = changes.inputValue) !== null && _changes$inputValue !== void 0 && _changes$inputValue.length) && !multiple ? null : changes.selectedItem,
|
||||
inputValue: changes.selectedItem === state.selectedItem && (_changes$inputValue2 = changes.inputValue) !== null && _changes$inputValue2 !== void 0 && _changes$inputValue2.length && !multiple ? getItemLabel(comboboxSingleSelectedItem) : ''
|
||||
});
|
||||
break;
|
||||
case selectControlStateChangeTypes.InputKeyDownEnter:
|
||||
case selectControlStateChangeTypes.FunctionSelectItem:
|
||||
case selectControlStateChangeTypes.ItemClick:
|
||||
if (changes.selectedItem && multiple) {
|
||||
newChanges = _objectSpread(_objectSpread({}, changes), {}, {
|
||||
inputValue: ''
|
||||
});
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return _stateReducer(state, _objectSpread(_objectSpread({}, actionAndChanges), {}, {
|
||||
changes: (_newChanges = newChanges) !== null && _newChanges !== void 0 ? _newChanges : changes
|
||||
}));
|
||||
}
|
||||
}),
|
||||
isOpen = _useCombobox.isOpen,
|
||||
getLabelProps = _useCombobox.getLabelProps,
|
||||
getMenuProps = _useCombobox.getMenuProps,
|
||||
getToggleButtonProps = _useCombobox.getToggleButtonProps,
|
||||
getInputProps = _useCombobox.getInputProps,
|
||||
getComboboxProps = _useCombobox.getComboboxProps,
|
||||
highlightedIndex = _useCombobox.highlightedIndex,
|
||||
getItemProps = _useCombobox.getItemProps,
|
||||
selectItem = _useCombobox.selectItem,
|
||||
comboboxSingleSelectedItem = _useCombobox.selectedItem,
|
||||
openMenu = _useCombobox.openMenu,
|
||||
closeMenu = _useCombobox.closeMenu;
|
||||
var isEventOutside = function isEventOutside(event) {
|
||||
var selectControlWrapperElement = selectControlWrapperRef.current;
|
||||
var menuElement = document.getElementById("".concat(instanceId, "-menu"));
|
||||
var parentPopoverMenuElement = menuElement === null || menuElement === void 0 ? void 0 : menuElement.closest('.woocommerce-experimental-select-control__popover-menu');
|
||||
return !(selectControlWrapperElement !== null && selectControlWrapperElement !== void 0 && selectControlWrapperElement.contains(event.relatedTarget)) && !(parentPopoverMenuElement !== null && parentPopoverMenuElement !== void 0 && parentPopoverMenuElement.contains(event.relatedTarget));
|
||||
};
|
||||
var onRemoveItem = function onRemoveItem(item) {
|
||||
selectItem(null);
|
||||
removeSelectedItem(item);
|
||||
onRemove(item);
|
||||
};
|
||||
var isReadOnly = readOnlyWhenClosed && !isOpen && !isFocused;
|
||||
var selectedItemTags = multiple ? (0,react.createElement)(selected_items/* SelectedItems */.K, {
|
||||
items: selectedItems,
|
||||
isReadOnly: isReadOnly,
|
||||
getItemLabel: getItemLabel,
|
||||
getItemValue: getItemValue,
|
||||
getSelectedItemProps: getSelectedItemProps,
|
||||
onRemove: onRemoveItem
|
||||
}) : null;
|
||||
return (0,react.createElement)("div", {
|
||||
id: instanceId,
|
||||
ref: selectControlWrapperRef,
|
||||
className: classnames_default()('woocommerce-experimental-select-control', className, {
|
||||
'is-read-only': isReadOnly,
|
||||
'is-focused': isFocused,
|
||||
'is-multiple': multiple,
|
||||
'has-selected-items': selectedItems.length
|
||||
})
|
||||
}, label && (0,react.createElement)("label", (0,esm_extends/* default */.A)({}, getLabelProps(), {
|
||||
className: "woocommerce-experimental-select-control__label"
|
||||
}), label), (0,react.createElement)(combo_box/* ComboBox */.a, {
|
||||
comboBoxProps: getComboboxProps(),
|
||||
getToggleButtonProps: getToggleButtonProps,
|
||||
inputProps: getInputProps(_objectSpread(_objectSpread({}, getDropdownProps({
|
||||
preventKeyAction: isOpen
|
||||
})), {}, {
|
||||
className: innerInputClassName,
|
||||
onFocus: function onFocus() {
|
||||
setIsFocused(true);
|
||||
_onFocus({
|
||||
inputValue: inputValue
|
||||
});
|
||||
if (__experimentalOpenMenuOnFocus) {
|
||||
openMenu();
|
||||
}
|
||||
},
|
||||
onBlur: function onBlur(event) {
|
||||
if (isEventOutside(event)) {
|
||||
setIsFocused(false);
|
||||
}
|
||||
},
|
||||
onKeyDown: onKeyDown,
|
||||
placeholder: placeholder,
|
||||
disabled: disabled
|
||||
}, inputProps)),
|
||||
suffix: suffix,
|
||||
showToggleButton: showToggleButton
|
||||
}, (0,react.createElement)(react.Fragment, null, children({
|
||||
items: filteredItems,
|
||||
highlightedIndex: highlightedIndex,
|
||||
getItemProps: getItemProps,
|
||||
getMenuProps: getMenuProps,
|
||||
isOpen: isOpen,
|
||||
getItemLabel: getItemLabel,
|
||||
getItemValue: getItemValue,
|
||||
selectItem: selectItem,
|
||||
setInputValue: setInputValue,
|
||||
openMenu: openMenu,
|
||||
closeMenu: closeMenu
|
||||
}), !hasExternalTags && selectedItemTags)), hasExternalTags && selectedItemTags);
|
||||
}
|
||||
|
||||
try {
|
||||
// @ts-ignore
|
||||
SelectControl.displayName = "SelectControl";
|
||||
// @ts-ignore
|
||||
SelectControl.__docgenInfo = { "description": "", "displayName": "SelectControl", "props": { "items": { "defaultValue": null, "description": "", "name": "items", "required": true, "type": { "name": "ItemType[]" } }, "label": { "defaultValue": null, "description": "", "name": "label", "required": true, "type": { "name": "string | Element" } }, "getItemLabel": { "defaultValue": { value: "< ItemType >( item: ItemType | null ) => {\n\tif ( isDefaultItemType< ItemType >( item ) ) {\n\t\treturn item.label;\n\t}\n\treturn '';\n}" }, "description": "", "name": "getItemLabel", "required": false, "type": { "name": "getItemLabelType<ItemType>" } }, "getItemValue": { "defaultValue": { value: "< ItemType >( item: ItemType | null ) => {\n\tif ( isDefaultItemType< ItemType >( item ) ) {\n\t\treturn item.value;\n\t}\n\treturn '';\n}" }, "description": "", "name": "getItemValue", "required": false, "type": { "name": "getItemValueType<ItemType>" } }, "getFilteredItems": { "defaultValue": { value: "< ItemType >(\n\tallItems: ItemType[],\n\tinputValue: string,\n\tselectedItems: ItemType[],\n\tgetItemLabel: getItemLabelType< ItemType >\n) => {\n\tconst escapedInputValue = inputValue.replace(\n\t\t/[.*+?^${}()|[\\]\\\\]/g,\n\t\t'\\\\$&'\n\t);\n\tconst re = new RegExp( escapedInputValue, 'gi' );\n\n\treturn allItems.filter( ( item ) => {\n\t\treturn (\n\t\t\tselectedItems.indexOf( item ) < 0 &&\n\t\t\tre.test( getItemLabel( item ).toLowerCase() )\n\t\t);\n\t} );\n}" }, "description": "", "name": "getFilteredItems", "required": false, "type": { "name": "((allItems: ItemType[], inputValue: string, selectedItems: ItemType[], getItemLabel: getItemLabelType<ItemType>) => ItemType[])" } }, "hasExternalTags": { "defaultValue": { value: "false" }, "description": "", "name": "hasExternalTags", "required": false, "type": { "name": "boolean" } }, "multiple": { "defaultValue": { value: "false" }, "description": "", "name": "multiple", "required": false, "type": { "name": "boolean" } }, "onInputChange": { "defaultValue": { value: "() => null" }, "description": "", "name": "onInputChange", "required": false, "type": { "name": "((value: string, changes: Partial<Omit<UseComboboxState<ItemType>, \"inputValue\">>) => void)" } }, "onRemove": { "defaultValue": { value: "() => null" }, "description": "", "name": "onRemove", "required": false, "type": { "name": "((item: ItemType) => void)" } }, "onSelect": { "defaultValue": { value: "() => null" }, "description": "", "name": "onSelect", "required": false, "type": { "name": "((selected: ItemType) => void)" } }, "onKeyDown": { "defaultValue": { value: "() => null" }, "description": "", "name": "onKeyDown", "required": false, "type": { "name": "((e: KeyboardEvent) => void)" } }, "onFocus": { "defaultValue": { value: "() => null" }, "description": "", "name": "onFocus", "required": false, "type": { "name": "((data: { inputValue: string; }) => void)" } }, "stateReducer": { "defaultValue": { value: "( state, actionAndChanges ) => actionAndChanges.changes" }, "description": "", "name": "stateReducer", "required": false, "type": { "name": "((state: UseComboboxState<ItemType | null>, actionAndChanges: UseComboboxStateChangeOptions<ItemType | null>) => Partial<...>)" } }, "placeholder": { "defaultValue": null, "description": "", "name": "placeholder", "required": false, "type": { "name": "string" } }, "selected": { "defaultValue": null, "description": "", "name": "selected", "required": true, "type": { "name": "ItemType | ItemType[] | null" } }, "className": { "defaultValue": null, "description": "", "name": "className", "required": false, "type": { "name": "string" } }, "disabled": { "defaultValue": null, "description": "", "name": "disabled", "required": false, "type": { "name": "boolean" } }, "inputProps": { "defaultValue": { value: "{}" }, "description": "", "name": "inputProps", "required": false, "type": { "name": "GetInputPropsOptions" } }, "suffix": { "defaultValue": { value: "<SuffixIcon icon={ chevronDown } />" }, "description": "", "name": "suffix", "required": false, "type": { "name": "Element | null" } }, "showToggleButton": { "defaultValue": { value: "false" }, "description": "", "name": "showToggleButton", "required": false, "type": { "name": "boolean" } }, "readOnlyWhenClosed": { "defaultValue": { value: "true" }, "description": "", "name": "readOnlyWhenClosed", "required": false, "type": { "name": "boolean" } }, "__experimentalOpenMenuOnFocus": { "defaultValue": { value: "false" }, "description": "This is a feature already implemented in downshift@7.0.0 through the\nreducer. In order for us to use it this prop is added temporarily until\ncurrent downshift version get updated.\n@see https://www.downshift-js.com/use-multiple-selection#usage-with-combobox", "name": "__experimentalOpenMenuOnFocus", "required": false, "type": { "name": "boolean" } } } };
|
||||
// @ts-ignore
|
||||
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
||||
// @ts-ignore
|
||||
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/experimental-select-control/select-control.tsx#SelectControl"] = { docgenInfo: SelectControl.__docgenInfo, name: "SelectControl", path: "../../packages/js/components/src/experimental-select-control/select-control.tsx#SelectControl" };
|
||||
}
|
||||
catch (__react_docgen_typescript_loader_error) { }
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../packages/js/components/src/experimental-select-control/selected-items.tsx":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ K: () => (/* binding */ SelectedItems)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.join.js");
|
||||
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.map.js");
|
||||
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+html-entities@3.6.1/node_modules/@wordpress/html-entities/build-module/index.js");
|
||||
/* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../packages/js/components/src/tag/index.tsx");
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
var PrivateSelectedItems = function PrivateSelectedItems(_ref, ref) {
|
||||
var isReadOnly = _ref.isReadOnly,
|
||||
items = _ref.items,
|
||||
getItemLabel = _ref.getItemLabel,
|
||||
getItemValue = _ref.getItemValue,
|
||||
getSelectedItemProps = _ref.getSelectedItemProps,
|
||||
onRemove = _ref.onRemove,
|
||||
onBlur = _ref.onBlur,
|
||||
onSelectedItemsEnd = _ref.onSelectedItemsEnd;
|
||||
var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('woocommerce-experimental-select-control__selected-items', {
|
||||
'is-read-only': isReadOnly
|
||||
});
|
||||
var lastRemoveButtonRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
|
||||
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useImperativeHandle)(ref, function () {
|
||||
return function () {
|
||||
var _lastRemoveButtonRef$;
|
||||
return (_lastRemoveButtonRef$ = lastRemoveButtonRef.current) === null || _lastRemoveButtonRef$ === void 0 ? void 0 : _lastRemoveButtonRef$.focus();
|
||||
};
|
||||
}, []);
|
||||
if (isReadOnly) {
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", {
|
||||
className: classes
|
||||
}, items.map(function (item) {
|
||||
return (0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__/* .decodeEntities */ .S)(getItemLabel(item));
|
||||
}).join(', '));
|
||||
}
|
||||
var focusSibling = function focusSibling(event) {
|
||||
var selectedItem = event.target.closest('.woocommerce-experimental-select-control__selected-item');
|
||||
var sibling = event.key === 'ArrowLeft' || event.key === 'Backspace' ? selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.previousSibling : selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.nextSibling;
|
||||
if (sibling) {
|
||||
var _querySelector;
|
||||
(_querySelector = sibling.querySelector('.woocommerce-tag__remove')) === null || _querySelector === void 0 || _querySelector.focus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", {
|
||||
className: classes
|
||||
}, items.map(function (item, index) {
|
||||
return (
|
||||
// Disable reason: We prevent the default action to keep the input focused on click.
|
||||
// Keyboard users are unaffected by this change.
|
||||
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
|
||||
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
|
||||
key: "selected-item-".concat(index),
|
||||
className: "woocommerce-experimental-select-control__selected-item"
|
||||
}, getSelectedItemProps({
|
||||
selectedItem: item,
|
||||
index: index
|
||||
}), {
|
||||
onMouseDown: function onMouseDown(event) {
|
||||
event.preventDefault();
|
||||
},
|
||||
onClick: function onClick(event) {
|
||||
event.preventDefault();
|
||||
},
|
||||
onKeyDown: function onKeyDown(event) {
|
||||
if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
|
||||
var focused = focusSibling(event);
|
||||
if (!focused && event.key === 'ArrowRight' && onSelectedItemsEnd) {
|
||||
onSelectedItemsEnd();
|
||||
}
|
||||
} else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
||||
event.preventDefault(); // prevent unwanted scroll
|
||||
} else if (event.key === 'Backspace') {
|
||||
onRemove(item);
|
||||
focusSibling(event);
|
||||
}
|
||||
},
|
||||
onBlur: onBlur
|
||||
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.createElement)(_tag__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
||||
id: getItemValue(item),
|
||||
remove: function remove() {
|
||||
return function () {
|
||||
return onRemove(item);
|
||||
};
|
||||
},
|
||||
label: getItemLabel(item),
|
||||
ref: index === items.length - 1 ? lastRemoveButtonRef : undefined
|
||||
}))
|
||||
);
|
||||
}));
|
||||
};
|
||||
var SelectedItems = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.forwardRef)(PrivateSelectedItems);
|
||||
try {
|
||||
// @ts-ignore
|
||||
SelectedItems.displayName = "SelectedItems";
|
||||
// @ts-ignore
|
||||
SelectedItems.__docgenInfo = { "description": "", "displayName": "SelectedItems", "props": { "isReadOnly": { "defaultValue": null, "description": "", "name": "isReadOnly", "required": true, "type": { "name": "boolean" } }, "items": { "defaultValue": null, "description": "", "name": "items", "required": true, "type": { "name": "ItemType[]" } }, "getItemLabel": { "defaultValue": null, "description": "", "name": "getItemLabel", "required": true, "type": { "name": "getItemLabelType<ItemType>" } }, "getItemValue": { "defaultValue": null, "description": "", "name": "getItemValue", "required": true, "type": { "name": "getItemValueType<ItemType>" } }, "getSelectedItemProps": { "defaultValue": null, "description": "", "name": "getSelectedItemProps", "required": true, "type": { "name": "({ selectedItem: any, index: any }: { selectedItem: any; index: any; }) => { [key: string]: string; }" } }, "onRemove": { "defaultValue": null, "description": "", "name": "onRemove", "required": true, "type": { "name": "(item: ItemType) => void" } }, "onBlur": { "defaultValue": null, "description": "", "name": "onBlur", "required": false, "type": { "name": "((event: FocusEvent<Element, Element>) => void)" } }, "onSelectedItemsEnd": { "defaultValue": null, "description": "", "name": "onSelectedItemsEnd", "required": false, "type": { "name": "(() => void)" } }, "ref": { "defaultValue": null, "description": "", "name": "ref", "required": false, "type": { "name": "ForwardedRef<SelectedItemFocusHandle>" } } } };
|
||||
// @ts-ignore
|
||||
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
||||
// @ts-ignore
|
||||
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/experimental-select-control/selected-items.tsx#SelectedItems"] = { docgenInfo: SelectedItems.__docgenInfo, name: "SelectedItems", path: "../../packages/js/components/src/experimental-select-control/selected-items.tsx#SelectedItems" };
|
||||
}
|
||||
catch (__react_docgen_typescript_loader_error) { }
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../packages/js/components/src/experimental-select-control/suffix-icon.tsx":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ f: () => (/* binding */ SuffixIcon)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/icon/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var SuffixIcon = function SuffixIcon(_ref) {
|
||||
var _ref$className = _ref.className,
|
||||
className = _ref$className === void 0 ? '' : _ref$className,
|
||||
icon = _ref.icon;
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
|
||||
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()('woocommerce-experimental-select-control__suffix-icon', className)
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, {
|
||||
icon: icon,
|
||||
size: 24
|
||||
}));
|
||||
};
|
||||
try {
|
||||
// @ts-ignore
|
||||
SuffixIcon.displayName = "SuffixIcon";
|
||||
// @ts-ignore
|
||||
SuffixIcon.__docgenInfo = { "description": "", "displayName": "SuffixIcon", "props": { "icon": { "defaultValue": null, "description": "", "name": "icon", "required": true, "type": { "name": "Element" } }, "className": { "defaultValue": { value: "" }, "description": "", "name": "className", "required": false, "type": { "name": "string" } } } };
|
||||
// @ts-ignore
|
||||
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
||||
// @ts-ignore
|
||||
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/experimental-select-control/suffix-icon.tsx#SuffixIcon"] = { docgenInfo: SuffixIcon.__docgenInfo, name: "SuffixIcon", path: "../../packages/js/components/src/experimental-select-control/suffix-icon.tsx#SuffixIcon" };
|
||||
}
|
||||
catch (__react_docgen_typescript_loader_error) { }
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,645 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[2137],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-buffer-non-extensible.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
|
||||
module.exports = fails(function () {
|
||||
if (typeof ArrayBuffer == 'function') {
|
||||
var buffer = new ArrayBuffer(8);
|
||||
// eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
|
||||
if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-reduce.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var aCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/a-callable.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
var IndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/indexed-object.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
||||
var createMethod = function (IS_RIGHT) {
|
||||
return function (that, callbackfn, argumentsLength, memo) {
|
||||
var O = toObject(that);
|
||||
var self = IndexedObject(O);
|
||||
var length = lengthOfArrayLike(O);
|
||||
aCallable(callbackfn);
|
||||
var index = IS_RIGHT ? length - 1 : 0;
|
||||
var i = IS_RIGHT ? -1 : 1;
|
||||
if (argumentsLength < 2) while (true) {
|
||||
if (index in self) {
|
||||
memo = self[index];
|
||||
index += i;
|
||||
break;
|
||||
}
|
||||
index += i;
|
||||
if (IS_RIGHT ? index < 0 : length <= index) {
|
||||
throw new $TypeError('Reduce of empty array with no initial value');
|
||||
}
|
||||
}
|
||||
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
||||
memo = callbackfn(memo, self[index], index, O);
|
||||
}
|
||||
return memo;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `Array.prototype.reduce` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
||||
left: createMethod(false),
|
||||
// `Array.prototype.reduceRight` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
||||
right: createMethod(true)
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/collection-strong.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var create = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-create.js");
|
||||
var defineBuiltInAccessor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in-accessor.js");
|
||||
var defineBuiltIns = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-ins.js");
|
||||
var bind = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind-context.js");
|
||||
var anInstance = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/an-instance.js");
|
||||
var isNullOrUndefined = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-null-or-undefined.js");
|
||||
var iterate = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/iterate.js");
|
||||
var defineIterator = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/iterator-define.js");
|
||||
var createIterResultObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-iter-result-object.js");
|
||||
var setSpecies = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/set-species.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var fastKey = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/internal-metadata.js").fastKey);
|
||||
var InternalStateModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/internal-state.js");
|
||||
|
||||
var setInternalState = InternalStateModule.set;
|
||||
var internalStateGetterFor = InternalStateModule.getterFor;
|
||||
|
||||
module.exports = {
|
||||
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
||||
var Constructor = wrapper(function (that, iterable) {
|
||||
anInstance(that, Prototype);
|
||||
setInternalState(that, {
|
||||
type: CONSTRUCTOR_NAME,
|
||||
index: create(null),
|
||||
first: undefined,
|
||||
last: undefined,
|
||||
size: 0
|
||||
});
|
||||
if (!DESCRIPTORS) that.size = 0;
|
||||
if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
||||
});
|
||||
|
||||
var Prototype = Constructor.prototype;
|
||||
|
||||
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
||||
|
||||
var define = function (that, key, value) {
|
||||
var state = getInternalState(that);
|
||||
var entry = getEntry(that, key);
|
||||
var previous, index;
|
||||
// change existing entry
|
||||
if (entry) {
|
||||
entry.value = value;
|
||||
// create new entry
|
||||
} else {
|
||||
state.last = entry = {
|
||||
index: index = fastKey(key, true),
|
||||
key: key,
|
||||
value: value,
|
||||
previous: previous = state.last,
|
||||
next: undefined,
|
||||
removed: false
|
||||
};
|
||||
if (!state.first) state.first = entry;
|
||||
if (previous) previous.next = entry;
|
||||
if (DESCRIPTORS) state.size++;
|
||||
else that.size++;
|
||||
// add to index
|
||||
if (index !== 'F') state.index[index] = entry;
|
||||
} return that;
|
||||
};
|
||||
|
||||
var getEntry = function (that, key) {
|
||||
var state = getInternalState(that);
|
||||
// fast case
|
||||
var index = fastKey(key);
|
||||
var entry;
|
||||
if (index !== 'F') return state.index[index];
|
||||
// frozen object case
|
||||
for (entry = state.first; entry; entry = entry.next) {
|
||||
if (entry.key === key) return entry;
|
||||
}
|
||||
};
|
||||
|
||||
defineBuiltIns(Prototype, {
|
||||
// `{ Map, Set }.prototype.clear()` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.clear
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.clear
|
||||
clear: function clear() {
|
||||
var that = this;
|
||||
var state = getInternalState(that);
|
||||
var data = state.index;
|
||||
var entry = state.first;
|
||||
while (entry) {
|
||||
entry.removed = true;
|
||||
if (entry.previous) entry.previous = entry.previous.next = undefined;
|
||||
delete data[entry.index];
|
||||
entry = entry.next;
|
||||
}
|
||||
state.first = state.last = undefined;
|
||||
if (DESCRIPTORS) state.size = 0;
|
||||
else that.size = 0;
|
||||
},
|
||||
// `{ Map, Set }.prototype.delete(key)` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.delete
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.delete
|
||||
'delete': function (key) {
|
||||
var that = this;
|
||||
var state = getInternalState(that);
|
||||
var entry = getEntry(that, key);
|
||||
if (entry) {
|
||||
var next = entry.next;
|
||||
var prev = entry.previous;
|
||||
delete state.index[entry.index];
|
||||
entry.removed = true;
|
||||
if (prev) prev.next = next;
|
||||
if (next) next.previous = prev;
|
||||
if (state.first === entry) state.first = next;
|
||||
if (state.last === entry) state.last = prev;
|
||||
if (DESCRIPTORS) state.size--;
|
||||
else that.size--;
|
||||
} return !!entry;
|
||||
},
|
||||
// `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.foreach
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.foreach
|
||||
forEach: function forEach(callbackfn /* , that = undefined */) {
|
||||
var state = getInternalState(this);
|
||||
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
var entry;
|
||||
while (entry = entry ? entry.next : state.first) {
|
||||
boundFunction(entry.value, entry.key, this);
|
||||
// revert to the last existing entry
|
||||
while (entry && entry.removed) entry = entry.previous;
|
||||
}
|
||||
},
|
||||
// `{ Map, Set}.prototype.has(key)` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.has
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.has
|
||||
has: function has(key) {
|
||||
return !!getEntry(this, key);
|
||||
}
|
||||
});
|
||||
|
||||
defineBuiltIns(Prototype, IS_MAP ? {
|
||||
// `Map.prototype.get(key)` method
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.get
|
||||
get: function get(key) {
|
||||
var entry = getEntry(this, key);
|
||||
return entry && entry.value;
|
||||
},
|
||||
// `Map.prototype.set(key, value)` method
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.set
|
||||
set: function set(key, value) {
|
||||
return define(this, key === 0 ? 0 : key, value);
|
||||
}
|
||||
} : {
|
||||
// `Set.prototype.add(value)` method
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.add
|
||||
add: function add(value) {
|
||||
return define(this, value = value === 0 ? 0 : value, value);
|
||||
}
|
||||
});
|
||||
if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {
|
||||
configurable: true,
|
||||
get: function () {
|
||||
return getInternalState(this).size;
|
||||
}
|
||||
});
|
||||
return Constructor;
|
||||
},
|
||||
setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
|
||||
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
|
||||
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
||||
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
|
||||
// `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.entries
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.keys
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.values
|
||||
// https://tc39.es/ecma262/#sec-map.prototype-@@iterator
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.entries
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.keys
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.values
|
||||
// https://tc39.es/ecma262/#sec-set.prototype-@@iterator
|
||||
defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
|
||||
setInternalState(this, {
|
||||
type: ITERATOR_NAME,
|
||||
target: iterated,
|
||||
state: getInternalCollectionState(iterated),
|
||||
kind: kind,
|
||||
last: undefined
|
||||
});
|
||||
}, function () {
|
||||
var state = getInternalIteratorState(this);
|
||||
var kind = state.kind;
|
||||
var entry = state.last;
|
||||
// revert to the last existing entry
|
||||
while (entry && entry.removed) entry = entry.previous;
|
||||
// get next entry
|
||||
if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
|
||||
// or finish the iteration
|
||||
state.target = undefined;
|
||||
return createIterResultObject(undefined, true);
|
||||
}
|
||||
// return step by kind
|
||||
if (kind === 'keys') return createIterResultObject(entry.key, false);
|
||||
if (kind === 'values') return createIterResultObject(entry.value, false);
|
||||
return createIterResultObject([entry.key, entry.value], false);
|
||||
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
|
||||
|
||||
// `{ Map, Set }.prototype[@@species]` accessors
|
||||
// https://tc39.es/ecma262/#sec-get-map-@@species
|
||||
// https://tc39.es/ecma262/#sec-get-set-@@species
|
||||
setSpecies(CONSTRUCTOR_NAME);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/collection.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var global = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var isForced = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-forced.js");
|
||||
var defineBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in.js");
|
||||
var InternalMetadataModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/internal-metadata.js");
|
||||
var iterate = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/iterate.js");
|
||||
var anInstance = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/an-instance.js");
|
||||
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
||||
var isNullOrUndefined = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-null-or-undefined.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var checkCorrectnessOfIteration = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/check-correctness-of-iteration.js");
|
||||
var setToStringTag = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/set-to-string-tag.js");
|
||||
var inheritIfRequired = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/inherit-if-required.js");
|
||||
|
||||
module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
|
||||
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
|
||||
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
|
||||
var ADDER = IS_MAP ? 'set' : 'add';
|
||||
var NativeConstructor = global[CONSTRUCTOR_NAME];
|
||||
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
||||
var Constructor = NativeConstructor;
|
||||
var exported = {};
|
||||
|
||||
var fixMethod = function (KEY) {
|
||||
var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);
|
||||
defineBuiltIn(NativePrototype, KEY,
|
||||
KEY === 'add' ? function add(value) {
|
||||
uncurriedNativeMethod(this, value === 0 ? 0 : value);
|
||||
return this;
|
||||
} : KEY === 'delete' ? function (key) {
|
||||
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
||||
} : KEY === 'get' ? function get(key) {
|
||||
return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
||||
} : KEY === 'has' ? function has(key) {
|
||||
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
||||
} : function set(key, value) {
|
||||
uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
|
||||
return this;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
var REPLACE = isForced(
|
||||
CONSTRUCTOR_NAME,
|
||||
!isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
|
||||
new NativeConstructor().entries().next();
|
||||
}))
|
||||
);
|
||||
|
||||
if (REPLACE) {
|
||||
// create collection constructor
|
||||
Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
|
||||
InternalMetadataModule.enable();
|
||||
} else if (isForced(CONSTRUCTOR_NAME, true)) {
|
||||
var instance = new Constructor();
|
||||
// early implementations not supports chaining
|
||||
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) !== instance;
|
||||
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
|
||||
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
|
||||
// most early implementations doesn't supports iterables, most modern - not close it correctly
|
||||
// eslint-disable-next-line no-new -- required for testing
|
||||
var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
|
||||
// for early implementations -0 and +0 not the same
|
||||
var BUGGY_ZERO = !IS_WEAK && fails(function () {
|
||||
// V8 ~ Chromium 42- fails only with 5+ elements
|
||||
var $instance = new NativeConstructor();
|
||||
var index = 5;
|
||||
while (index--) $instance[ADDER](index, index);
|
||||
return !$instance.has(-0);
|
||||
});
|
||||
|
||||
if (!ACCEPT_ITERABLES) {
|
||||
Constructor = wrapper(function (dummy, iterable) {
|
||||
anInstance(dummy, NativePrototype);
|
||||
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
||||
if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
||||
return that;
|
||||
});
|
||||
Constructor.prototype = NativePrototype;
|
||||
NativePrototype.constructor = Constructor;
|
||||
}
|
||||
|
||||
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
|
||||
fixMethod('delete');
|
||||
fixMethod('has');
|
||||
IS_MAP && fixMethod('get');
|
||||
}
|
||||
|
||||
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
|
||||
|
||||
// weak collections should not contains .clear method
|
||||
if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
|
||||
}
|
||||
|
||||
exported[CONSTRUCTOR_NAME] = Constructor;
|
||||
$({ global: true, constructor: true, forced: Constructor !== NativeConstructor }, exported);
|
||||
|
||||
setToStringTag(Constructor, CONSTRUCTOR_NAME);
|
||||
|
||||
if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
|
||||
|
||||
return Constructor;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-ins.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var defineBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in.js");
|
||||
|
||||
module.exports = function (target, src, options) {
|
||||
for (var key in src) defineBuiltIn(target, key, src[key], options);
|
||||
return target;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/freezing.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
|
||||
module.exports = !fails(function () {
|
||||
// eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
|
||||
return Object.isExtensible(Object.preventExtensions({}));
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/internal-metadata.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var hiddenKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/hidden-keys.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
||||
var defineProperty = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-property.js").f);
|
||||
var getOwnPropertyNamesModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-names.js");
|
||||
var getOwnPropertyNamesExternalModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-names-external.js");
|
||||
var isExtensible = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-is-extensible.js");
|
||||
var uid = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/uid.js");
|
||||
var FREEZING = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/freezing.js");
|
||||
|
||||
var REQUIRED = false;
|
||||
var METADATA = uid('meta');
|
||||
var id = 0;
|
||||
|
||||
var setMetadata = function (it) {
|
||||
defineProperty(it, METADATA, { value: {
|
||||
objectID: 'O' + id++, // object ID
|
||||
weakData: {} // weak collections IDs
|
||||
} });
|
||||
};
|
||||
|
||||
var fastKey = function (it, create) {
|
||||
// return a primitive with prefix
|
||||
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
||||
if (!hasOwn(it, METADATA)) {
|
||||
// can't set metadata to uncaught frozen object
|
||||
if (!isExtensible(it)) return 'F';
|
||||
// not necessary to add metadata
|
||||
if (!create) return 'E';
|
||||
// add missing metadata
|
||||
setMetadata(it);
|
||||
// return object ID
|
||||
} return it[METADATA].objectID;
|
||||
};
|
||||
|
||||
var getWeakData = function (it, create) {
|
||||
if (!hasOwn(it, METADATA)) {
|
||||
// can't set metadata to uncaught frozen object
|
||||
if (!isExtensible(it)) return true;
|
||||
// not necessary to add metadata
|
||||
if (!create) return false;
|
||||
// add missing metadata
|
||||
setMetadata(it);
|
||||
// return the store of weak collections IDs
|
||||
} return it[METADATA].weakData;
|
||||
};
|
||||
|
||||
// add metadata on freeze-family methods calling
|
||||
var onFreeze = function (it) {
|
||||
if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);
|
||||
return it;
|
||||
};
|
||||
|
||||
var enable = function () {
|
||||
meta.enable = function () { /* empty */ };
|
||||
REQUIRED = true;
|
||||
var getOwnPropertyNames = getOwnPropertyNamesModule.f;
|
||||
var splice = uncurryThis([].splice);
|
||||
var test = {};
|
||||
test[METADATA] = 1;
|
||||
|
||||
// prevent exposing of metadata key
|
||||
if (getOwnPropertyNames(test).length) {
|
||||
getOwnPropertyNamesModule.f = function (it) {
|
||||
var result = getOwnPropertyNames(it);
|
||||
for (var i = 0, length = result.length; i < length; i++) {
|
||||
if (result[i] === METADATA) {
|
||||
splice(result, i, 1);
|
||||
break;
|
||||
}
|
||||
} return result;
|
||||
};
|
||||
|
||||
$({ target: 'Object', stat: true, forced: true }, {
|
||||
getOwnPropertyNames: getOwnPropertyNamesExternalModule.f
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var meta = module.exports = {
|
||||
enable: enable,
|
||||
fastKey: fastKey,
|
||||
getWeakData: getWeakData,
|
||||
onFreeze: onFreeze
|
||||
};
|
||||
|
||||
hiddenKeys[METADATA] = true;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-is-extensible.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var classof = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/classof-raw.js");
|
||||
var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-buffer-non-extensible.js");
|
||||
|
||||
// eslint-disable-next-line es/no-object-isextensible -- safe
|
||||
var $isExtensible = Object.isExtensible;
|
||||
var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
|
||||
|
||||
// `Object.isExtensible` method
|
||||
// https://tc39.es/ecma262/#sec-object.isextensible
|
||||
module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {
|
||||
if (!isObject(it)) return false;
|
||||
if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false;
|
||||
return $isExtensible ? $isExtensible(it) : true;
|
||||
} : $isExtensible;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/string-trim.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var requireObjectCoercible = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/require-object-coercible.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var whitespaces = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/whitespaces.js");
|
||||
|
||||
var replace = uncurryThis(''.replace);
|
||||
var ltrim = RegExp('^[' + whitespaces + ']+');
|
||||
var rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');
|
||||
|
||||
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
||||
var createMethod = function (TYPE) {
|
||||
return function ($this) {
|
||||
var string = toString(requireObjectCoercible($this));
|
||||
if (TYPE & 1) string = replace(string, ltrim, '');
|
||||
if (TYPE & 2) string = replace(string, rtrim, '$1');
|
||||
return string;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `String.prototype.{ trimLeft, trimStart }` methods
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
||||
start: createMethod(1),
|
||||
// `String.prototype.{ trimRight, trimEnd }` methods
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
||||
end: createMethod(2),
|
||||
// `String.prototype.trim` method
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
||||
trim: createMethod(3)
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/whitespaces.js":
|
||||
/***/ ((module) => {
|
||||
|
||||
|
||||
// a string of all valid unicode whitespaces
|
||||
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
||||
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.reduce.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $reduce = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-reduce.js").left);
|
||||
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
||||
var CHROME_VERSION = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-v8-version.js");
|
||||
var IS_NODE = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-is-node.js");
|
||||
|
||||
// Chrome 80-82 has a critical bug
|
||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
|
||||
var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
|
||||
var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
|
||||
|
||||
// `Array.prototype.reduce` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
||||
$({ target: 'Array', proto: true, forced: FORCED }, {
|
||||
reduce: function reduce(callbackfn /* , initialValue */) {
|
||||
var length = arguments.length;
|
||||
return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.some.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $some = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").some);
|
||||
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
||||
|
||||
var STRICT_METHOD = arrayMethodIsStrict('some');
|
||||
|
||||
// `Array.prototype.some` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.some
|
||||
$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
|
||||
some: function some(callbackfn /* , thisArg */) {
|
||||
return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,595 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[2175],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+a11y@3.6.1/node_modules/@wordpress/a11y/build-module/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
L: () => (/* binding */ speak)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: setup
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+dom-ready@3.27.0/node_modules/@wordpress/dom-ready/build-module/index.js
|
||||
/**
|
||||
* @typedef {() => void} Callback
|
||||
*
|
||||
* TODO: Remove this typedef and inline `() => void` type.
|
||||
*
|
||||
* This typedef is used so that a descriptive type is provided in our
|
||||
* automatically generated documentation.
|
||||
*
|
||||
* An in-line type `() => void` would be preferable, but the generated
|
||||
* documentation is `null` in that case.
|
||||
*
|
||||
* @see https://github.com/WordPress/gutenberg/issues/18045
|
||||
*/
|
||||
|
||||
/**
|
||||
* Specify a function to execute when the DOM is fully loaded.
|
||||
*
|
||||
* @param {Callback} callback A function to execute after the DOM is ready.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* import domReady from '@wordpress/dom-ready';
|
||||
*
|
||||
* domReady( function() {
|
||||
* //do something after DOM loads.
|
||||
* } );
|
||||
* ```
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
function domReady(callback) {
|
||||
if (typeof document === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (document.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.
|
||||
document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.
|
||||
) {
|
||||
return void callback();
|
||||
} // DOMContentLoaded has not fired yet, delay callback until then.
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', callback);
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+i18n@4.6.1/node_modules/@wordpress/i18n/build-module/index.js + 3 modules
|
||||
var build_module = __webpack_require__("../../node_modules/.pnpm/@wordpress+i18n@4.6.1/node_modules/@wordpress/i18n/build-module/index.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+a11y@3.6.1/node_modules/@wordpress/a11y/build-module/add-intro-text.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Build the explanatory text to be placed before the aria live regions.
|
||||
*
|
||||
* This text is initially hidden from assistive technologies by using a `hidden`
|
||||
* HTML attribute which is then removed once a message fills the aria-live regions.
|
||||
*
|
||||
* @return {HTMLParagraphElement} The explanatory text HTML element.
|
||||
*/
|
||||
|
||||
function addIntroText() {
|
||||
const introText = document.createElement('p');
|
||||
introText.id = 'a11y-speak-intro-text';
|
||||
introText.className = 'a11y-speak-intro-text';
|
||||
introText.textContent = (0,build_module.__)('Notifications');
|
||||
introText.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;');
|
||||
introText.setAttribute('hidden', 'hidden');
|
||||
const {
|
||||
body
|
||||
} = document;
|
||||
|
||||
if (body) {
|
||||
body.appendChild(introText);
|
||||
}
|
||||
|
||||
return introText;
|
||||
}
|
||||
//# sourceMappingURL=add-intro-text.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+a11y@3.6.1/node_modules/@wordpress/a11y/build-module/add-container.js
|
||||
/**
|
||||
* Build the live regions markup.
|
||||
*
|
||||
* @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'.
|
||||
*
|
||||
* @return {HTMLDivElement} The ARIA live region HTML element.
|
||||
*/
|
||||
function addContainer() {
|
||||
let ariaLive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'polite';
|
||||
const container = document.createElement('div');
|
||||
container.id = `a11y-speak-${ariaLive}`;
|
||||
container.className = 'a11y-speak-region';
|
||||
container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;');
|
||||
container.setAttribute('aria-live', ariaLive);
|
||||
container.setAttribute('aria-relevant', 'additions text');
|
||||
container.setAttribute('aria-atomic', 'true');
|
||||
const {
|
||||
body
|
||||
} = document;
|
||||
|
||||
if (body) {
|
||||
body.appendChild(container);
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
//# sourceMappingURL=add-container.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+a11y@3.6.1/node_modules/@wordpress/a11y/build-module/clear.js
|
||||
/**
|
||||
* Clears the a11y-speak-region elements and hides the explanatory text.
|
||||
*/
|
||||
function clear() {
|
||||
const regions = document.getElementsByClassName('a11y-speak-region');
|
||||
const introText = document.getElementById('a11y-speak-intro-text');
|
||||
|
||||
for (let i = 0; i < regions.length; i++) {
|
||||
regions[i].textContent = '';
|
||||
} // Make sure the explanatory text is hidden from assistive technologies.
|
||||
|
||||
|
||||
if (introText) {
|
||||
introText.setAttribute('hidden', 'hidden');
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=clear.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+a11y@3.6.1/node_modules/@wordpress/a11y/build-module/filter-message.js
|
||||
let previousMessage = '';
|
||||
/**
|
||||
* Filter the message to be announced to the screenreader.
|
||||
*
|
||||
* @param {string} message The message to be announced.
|
||||
*
|
||||
* @return {string} The filtered message.
|
||||
*/
|
||||
|
||||
function filterMessage(message) {
|
||||
/*
|
||||
* Strip HTML tags (if any) from the message string. Ideally, messages should
|
||||
* be simple strings, carefully crafted for specific use with A11ySpeak.
|
||||
* When re-using already existing strings this will ensure simple HTML to be
|
||||
* stripped out and replaced with a space. Browsers will collapse multiple
|
||||
* spaces natively.
|
||||
*/
|
||||
message = message.replace(/<[^<>]+>/g, ' ');
|
||||
/*
|
||||
* Safari + VoiceOver don't announce repeated, identical strings. We use
|
||||
* a `no-break space` to force them to think identical strings are different.
|
||||
*/
|
||||
|
||||
if (previousMessage === message) {
|
||||
message += '\u00A0';
|
||||
}
|
||||
|
||||
previousMessage = message;
|
||||
return message;
|
||||
}
|
||||
//# sourceMappingURL=filter-message.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+a11y@3.6.1/node_modules/@wordpress/a11y/build-module/index.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create the live regions.
|
||||
*/
|
||||
|
||||
function setup() {
|
||||
const introText = document.getElementById('a11y-speak-intro-text');
|
||||
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
||||
const containerPolite = document.getElementById('a11y-speak-polite');
|
||||
|
||||
if (introText === null) {
|
||||
addIntroText();
|
||||
}
|
||||
|
||||
if (containerAssertive === null) {
|
||||
addContainer('assertive');
|
||||
}
|
||||
|
||||
if (containerPolite === null) {
|
||||
addContainer('polite');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Run setup on domReady.
|
||||
*/
|
||||
|
||||
domReady(setup);
|
||||
/**
|
||||
* Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
|
||||
* This module is inspired by the `speak` function in `wp-a11y.js`.
|
||||
*
|
||||
* @param {string} message The message to be announced by assistive technologies.
|
||||
* @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* import { speak } from '@wordpress/a11y';
|
||||
*
|
||||
* // For polite messages that shouldn't interrupt what screen readers are currently announcing.
|
||||
* speak( 'The message you want to send to the ARIA live region' );
|
||||
*
|
||||
* // For assertive messages that should interrupt what screen readers are currently announcing.
|
||||
* speak( 'The message you want to send to the ARIA live region', 'assertive' );
|
||||
* ```
|
||||
*/
|
||||
|
||||
function speak(message, ariaLive) {
|
||||
/*
|
||||
* Clear previous messages to allow repeated strings being read out and hide
|
||||
* the explanatory text from assistive technologies.
|
||||
*/
|
||||
clear();
|
||||
message = filterMessage(message);
|
||||
const introText = document.getElementById('a11y-speak-intro-text');
|
||||
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
||||
const containerPolite = document.getElementById('a11y-speak-polite');
|
||||
|
||||
if (containerAssertive && ariaLive === 'assertive') {
|
||||
containerAssertive.textContent = message;
|
||||
} else if (containerPolite) {
|
||||
containerPolite.textContent = message;
|
||||
}
|
||||
/*
|
||||
* Make the explanatory text available to assistive technologies by removing
|
||||
* the 'hidden' HTML attribute.
|
||||
*/
|
||||
|
||||
|
||||
if (introText) {
|
||||
introText.removeAttribute('hidden');
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/textarea-control/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ TextareaControl)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
||||
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js
|
||||
var use_instance_id = __webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/index.js + 1 modules
|
||||
var base_control = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js
|
||||
var emotion_styled_base_browser_esm = __webpack_require__("../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js
|
||||
var emotion_react_browser_esm = __webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js + 1 modules
|
||||
var colors_values = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/config-values.js
|
||||
var config_values = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/config-values.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/input/base.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
const inputStyleNeutral = /*#__PURE__*/(0,emotion_react_browser_esm/* css */.AH)("box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:", config_values/* default */.A.radiusBlockUi, ";border:", config_values/* default */.A.borderWidth, " solid ", colors_values/* COLORS */.lm.ui.border, ";" + ( true ? "" : 0), true ? "" : 0);
|
||||
const inputStyleFocus = /*#__PURE__*/(0,emotion_react_browser_esm/* css */.AH)("border-color:var( --wp-admin-theme-color );box-shadow:0 0 0 calc( ", config_values/* default */.A.borderWidthFocus, " - ", config_values/* default */.A.borderWidth, " ) var( --wp-admin-theme-color );outline:2px solid transparent;" + ( true ? "" : 0), true ? "" : 0);
|
||||
//# sourceMappingURL=base.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/font.js + 1 modules
|
||||
var font = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/font.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/breakpoint-values.js
|
||||
/* harmony default export */ const breakpoint_values = ({
|
||||
huge: '1440px',
|
||||
wide: '1280px',
|
||||
'x-large': '1080px',
|
||||
large: '960px',
|
||||
// admin sidebar auto folds
|
||||
medium: '782px',
|
||||
// Adminbar goes big.
|
||||
small: '600px',
|
||||
mobile: '480px',
|
||||
'zoomed-in': '280px'
|
||||
});
|
||||
//# sourceMappingURL=breakpoint-values.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/breakpoint.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {keyof breakpoints} point
|
||||
* @return {string} Media query declaration.
|
||||
*/
|
||||
|
||||
const breakpoint = point => `@media (min-width: ${breakpoint_values[point]})`;
|
||||
//# sourceMappingURL=breakpoint.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/input/input-control.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const inputControl = /*#__PURE__*/(0,emotion_react_browser_esm/* css */.AH)("font-family:", (0,font/* font */.g)('default.fontFamily'), ";padding:6px 8px;", inputStyleNeutral, ";font-size:", (0,font/* font */.g)('mobileTextMinFontSize'), ";line-height:normal;", breakpoint('small'), "{font-size:", (0,font/* font */.g)('default.fontSize'), ";line-height:normal;}&:focus{", inputStyleFocus, ";}&::-webkit-input-placeholder{color:", colors_values/* COLORS */.lm.darkGray.placeholder, ";}&::-moz-placeholder{opacity:1;color:", colors_values/* COLORS */.lm.darkGray.placeholder, ";}&:-ms-input-placeholder{color:", colors_values/* COLORS */.lm.darkGray.placeholder, ";}.is-dark-theme &{&::-webkit-input-placeholder{color:", colors_values/* COLORS */.lm.lightGray.placeholder, ";}&::-moz-placeholder{opacity:1;color:", colors_values/* COLORS */.lm.lightGray.placeholder, ";}&:-ms-input-placeholder{color:", colors_values/* COLORS */.lm.lightGray.placeholder, ";}}" + ( true ? "" : 0), true ? "" : 0);
|
||||
//# sourceMappingURL=input-control.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/textarea-control/styles/textarea-control-styles.js
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
const StyledTextarea = (0,emotion_styled_base_browser_esm/* default */.A)("textarea", true ? {
|
||||
target: "ebk7yr50"
|
||||
} : 0)("width:100%;", inputControl, ";" + ( true ? "" : 0));
|
||||
//# sourceMappingURL=textarea-control-styles.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/textarea-control/index.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function TextareaControl(_ref) {
|
||||
let {
|
||||
label,
|
||||
hideLabelFromVision,
|
||||
value,
|
||||
help,
|
||||
onChange,
|
||||
rows = 4,
|
||||
className,
|
||||
...props
|
||||
} = _ref;
|
||||
const instanceId = (0,use_instance_id/* default */.A)(TextareaControl);
|
||||
const id = `inspector-textarea-control-${instanceId}`;
|
||||
|
||||
const onChangeValue = event => onChange(event.target.value);
|
||||
|
||||
return (0,react.createElement)(base_control/* default */.Ay, {
|
||||
label: label,
|
||||
hideLabelFromVision: hideLabelFromVision,
|
||||
id: id,
|
||||
help: help,
|
||||
className: className
|
||||
}, (0,react.createElement)(StyledTextarea, (0,esm_extends/* default */.A)({
|
||||
className: "components-textarea-control__input",
|
||||
id: id,
|
||||
rows: rows,
|
||||
onChange: onChangeValue,
|
||||
"aria-describedby": !!help ? id + '__help' : undefined,
|
||||
value: value
|
||||
}, props)));
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/config-values.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _ui_utils_space__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/utils/space.js");
|
||||
/* harmony import */ var _colors_values__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js");
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
const CONTROL_HEIGHT = '36px';
|
||||
const CONTROL_PADDING_X = '12px';
|
||||
const CONTROL_PROPS = {
|
||||
controlSurfaceColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.white,
|
||||
controlTextActiveColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.ui.theme,
|
||||
controlPaddingX: CONTROL_PADDING_X,
|
||||
controlPaddingXLarge: `calc(${CONTROL_PADDING_X} * 1.3334)`,
|
||||
controlPaddingXSmall: `calc(${CONTROL_PADDING_X} / 1.3334)`,
|
||||
controlBackgroundColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.white,
|
||||
controlBorderRadius: '2px',
|
||||
controlBorderColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.gray[700],
|
||||
controlBoxShadow: 'transparent',
|
||||
controlBorderColorHover: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.gray[700],
|
||||
controlBoxShadowFocus: `0 0 0 0.5px ${_colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.admin.theme}`,
|
||||
controlDestructiveBorderColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.alert.red,
|
||||
controlHeight: CONTROL_HEIGHT,
|
||||
controlHeightXSmall: `calc( ${CONTROL_HEIGHT} * 0.6 )`,
|
||||
controlHeightSmall: `calc( ${CONTROL_HEIGHT} * 0.8 )`,
|
||||
controlHeightLarge: `calc( ${CONTROL_HEIGHT} * 1.2 )`,
|
||||
controlHeightXLarge: `calc( ${CONTROL_HEIGHT} * 1.4 )`
|
||||
};
|
||||
const TOGGLE_GROUP_CONTROL_PROPS = {
|
||||
toggleGroupControlBackgroundColor: CONTROL_PROPS.controlBackgroundColor,
|
||||
toggleGroupControlBorderColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.ui.border,
|
||||
toggleGroupControlBackdropBackgroundColor: CONTROL_PROPS.controlSurfaceColor,
|
||||
toggleGroupControlBackdropBorderColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.ui.border,
|
||||
toggleGroupControlBackdropBoxShadow: 'transparent',
|
||||
toggleGroupControlButtonColorActive: CONTROL_PROPS.controlBackgroundColor
|
||||
}; // Using Object.assign to avoid creating circular references when emitting
|
||||
// TypeScript type declarations.
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Object.assign({}, CONTROL_PROPS, TOGGLE_GROUP_CONTROL_PROPS, {
|
||||
colorDivider: 'rgba(0, 0, 0, 0.1)',
|
||||
colorScrollbarThumb: 'rgba(0, 0, 0, 0.2)',
|
||||
colorScrollbarThumbHover: 'rgba(0, 0, 0, 0.5)',
|
||||
colorScrollbarTrack: 'rgba(0, 0, 0, 0.04)',
|
||||
elevationIntensity: 1,
|
||||
radiusBlockUi: '2px',
|
||||
borderWidth: '1px',
|
||||
borderWidthFocus: '1.5px',
|
||||
borderWidthTab: '4px',
|
||||
spinnerSize: 16,
|
||||
fontSize: '13px',
|
||||
fontSizeH1: 'calc(2.44 * 13px)',
|
||||
fontSizeH2: 'calc(1.95 * 13px)',
|
||||
fontSizeH3: 'calc(1.56 * 13px)',
|
||||
fontSizeH4: 'calc(1.25 * 13px)',
|
||||
fontSizeH5: '13px',
|
||||
fontSizeH6: 'calc(0.8 * 13px)',
|
||||
fontSizeInputMobile: '16px',
|
||||
fontSizeMobile: '15px',
|
||||
fontSizeSmall: 'calc(0.92 * 13px)',
|
||||
fontSizeXSmall: 'calc(0.75 * 13px)',
|
||||
fontLineHeightBase: '1.2',
|
||||
fontWeight: 'normal',
|
||||
fontWeightHeading: '600',
|
||||
gridBase: '4px',
|
||||
cardBorderRadius: '2px',
|
||||
cardPaddingXSmall: `${(0,_ui_utils_space__WEBPACK_IMPORTED_MODULE_1__/* .space */ .x)(2)}`,
|
||||
cardPaddingSmall: `${(0,_ui_utils_space__WEBPACK_IMPORTED_MODULE_1__/* .space */ .x)(4)}`,
|
||||
cardPaddingMedium: `${(0,_ui_utils_space__WEBPACK_IMPORTED_MODULE_1__/* .space */ .x)(4)} ${(0,_ui_utils_space__WEBPACK_IMPORTED_MODULE_1__/* .space */ .x)(6)}`,
|
||||
cardPaddingLarge: `${(0,_ui_utils_space__WEBPACK_IMPORTED_MODULE_1__/* .space */ .x)(6)} ${(0,_ui_utils_space__WEBPACK_IMPORTED_MODULE_1__/* .space */ .x)(8)}`,
|
||||
surfaceBackgroundColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.white,
|
||||
surfaceBackgroundSubtleColor: '#F3F3F3',
|
||||
surfaceBackgroundTintColor: '#F5F5F5',
|
||||
surfaceBorderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
surfaceBorderBoldColor: 'rgba(0, 0, 0, 0.15)',
|
||||
surfaceBorderSubtleColor: 'rgba(0, 0, 0, 0.05)',
|
||||
surfaceBackgroundTertiaryColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.white,
|
||||
surfaceColor: _colors_values__WEBPACK_IMPORTED_MODULE_0__/* .COLORS */ .lm.white,
|
||||
transitionDuration: '200ms',
|
||||
transitionDurationFast: '160ms',
|
||||
transitionDurationFaster: '120ms',
|
||||
transitionDurationFastest: '100ms',
|
||||
transitionTimingFunction: 'cubic-bezier(0.08, 0.52, 0.52, 1)',
|
||||
transitionTimingFunctionControl: 'cubic-bezier(0.12, 0.8, 0.32, 1)'
|
||||
}));
|
||||
//# sourceMappingURL=config-values.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* unused harmony export clsx */
|
||||
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/flatten-into-array.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var isArray = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
var doesNotExceedSafeInteger = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/does-not-exceed-safe-integer.js");
|
||||
var bind = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind-context.js");
|
||||
|
||||
// `FlattenIntoArray` abstract operation
|
||||
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
||||
var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
||||
var targetIndex = start;
|
||||
var sourceIndex = 0;
|
||||
var mapFn = mapper ? bind(mapper, thisArg) : false;
|
||||
var element, elementLen;
|
||||
|
||||
while (sourceIndex < sourceLen) {
|
||||
if (sourceIndex in source) {
|
||||
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
||||
|
||||
if (depth > 0 && isArray(element)) {
|
||||
elementLen = lengthOfArrayLike(element);
|
||||
targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
|
||||
} else {
|
||||
doesNotExceedSafeInteger(targetIndex + 1);
|
||||
target[targetIndex] = element;
|
||||
}
|
||||
|
||||
targetIndex++;
|
||||
}
|
||||
sourceIndex++;
|
||||
}
|
||||
return targetIndex;
|
||||
};
|
||||
|
||||
module.exports = flattenIntoArray;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.flat.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var flattenIntoArray = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/flatten-into-array.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
var toIntegerOrInfinity = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-integer-or-infinity.js");
|
||||
var arraySpeciesCreate = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-create.js");
|
||||
|
||||
// `Array.prototype.flat` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.flat
|
||||
$({ target: 'Array', proto: true }, {
|
||||
flat: function flat(/* depthArg = 1 */) {
|
||||
var depthArg = arguments.length ? arguments[0] : undefined;
|
||||
var O = toObject(this);
|
||||
var sourceLen = lengthOfArrayLike(O);
|
||||
var A = arraySpeciesCreate(O, 0);
|
||||
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
|
||||
return A;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.unscopables.flat.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
// this method was added to unscopables after implementation
|
||||
// in popular engines, so it's moved to a separate module
|
||||
var addToUnscopables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/add-to-unscopables.js");
|
||||
|
||||
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
||||
addToUnscopables('flat');
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,945 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[2244],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
G_: () => (/* binding */ BACKSPACE),
|
||||
SJ: () => (/* binding */ DELETE),
|
||||
PX: () => (/* binding */ DOWN),
|
||||
Fm: () => (/* binding */ ENTER),
|
||||
_f: () => (/* binding */ ESCAPE),
|
||||
M3: () => (/* binding */ LEFT),
|
||||
NS: () => (/* binding */ RIGHT),
|
||||
t6: () => (/* binding */ SPACE),
|
||||
wn: () => (/* binding */ TAB),
|
||||
UP: () => (/* binding */ UP),
|
||||
dz: () => (/* binding */ displayShortcut),
|
||||
kx: () => (/* binding */ isKeyboardEvent),
|
||||
JF: () => (/* binding */ rawShortcut),
|
||||
_A: () => (/* binding */ shortcutAriaLabel)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: ALT, COMMAND, CTRL, END, F10, HOME, PAGEDOWN, PAGEUP, SHIFT, ZERO, displayShortcutList, isAppleOS, modifiers
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/tslib@2.6.3/node_modules/tslib/tslib.es6.mjs
|
||||
var tslib_es6 = __webpack_require__("../../node_modules/.pnpm/tslib@2.6.3/node_modules/tslib/tslib.es6.mjs");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js + 1 modules
|
||||
var dist_es2015 = __webpack_require__("../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/upper-case-first@2.0.2/node_modules/upper-case-first/dist.es2015/index.js
|
||||
/**
|
||||
* Upper case the first character of an input string.
|
||||
*/
|
||||
function upperCaseFirst(input) {
|
||||
return input.charAt(0).toUpperCase() + input.substr(1);
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/capital-case@1.0.4/node_modules/capital-case/dist.es2015/index.js
|
||||
|
||||
|
||||
|
||||
function capitalCaseTransform(input) {
|
||||
return upperCaseFirst(input.toLowerCase());
|
||||
}
|
||||
function capitalCase(input, options) {
|
||||
if (options === void 0) { options = {}; }
|
||||
return (0,dist_es2015/* noCase */.W)(input, (0,tslib_es6/* __assign */.Cl)({ delimiter: " ", transform: capitalCaseTransform }, options));
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+i18n@4.47.0/node_modules/@wordpress/i18n/build-module/index.js + 3 modules
|
||||
var build_module = __webpack_require__("../../node_modules/.pnpm/@wordpress+i18n@4.47.0/node_modules/@wordpress/i18n/build-module/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/platform.js
|
||||
var platform = __webpack_require__("../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/platform.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/index.js
|
||||
/**
|
||||
* Note: The order of the modifier keys in many of the [foo]Shortcut()
|
||||
* functions in this file are intentional and should not be changed. They're
|
||||
* designed to fit with the standard menu keyboard shortcuts shown in the
|
||||
* user's platform.
|
||||
*
|
||||
* For example, on MacOS menu shortcuts will place Shift before Command, but
|
||||
* on Windows Control will usually come first. So don't provide your own
|
||||
* shortcut combos directly to keyboardShortcut().
|
||||
*/
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/** @typedef {typeof ALT | CTRL | COMMAND | SHIFT } WPModifierPart */
|
||||
|
||||
/** @typedef {'primary' | 'primaryShift' | 'primaryAlt' | 'secondary' | 'access' | 'ctrl' | 'alt' | 'ctrlShift' | 'shift' | 'shiftAlt' | 'undefined'} WPKeycodeModifier */
|
||||
|
||||
/**
|
||||
* An object of handler functions for each of the possible modifier
|
||||
* combinations. A handler will return a value for a given key.
|
||||
*
|
||||
* @template T
|
||||
*
|
||||
* @typedef {Record<WPKeycodeModifier, T>} WPModifierHandler
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template T
|
||||
*
|
||||
* @typedef {(character: string, isApple?: () => boolean) => T} WPKeyHandler
|
||||
*/
|
||||
/** @typedef {(event: import('react').KeyboardEvent<HTMLElement> | KeyboardEvent, character: string, isApple?: () => boolean) => boolean} WPEventKeyHandler */
|
||||
|
||||
/** @typedef {( isApple: () => boolean ) => WPModifierPart[]} WPModifier */
|
||||
|
||||
/**
|
||||
* Keycode for BACKSPACE key.
|
||||
*/
|
||||
const BACKSPACE = 8;
|
||||
|
||||
/**
|
||||
* Keycode for TAB key.
|
||||
*/
|
||||
const TAB = 9;
|
||||
|
||||
/**
|
||||
* Keycode for ENTER key.
|
||||
*/
|
||||
const ENTER = 13;
|
||||
|
||||
/**
|
||||
* Keycode for ESCAPE key.
|
||||
*/
|
||||
const ESCAPE = 27;
|
||||
|
||||
/**
|
||||
* Keycode for SPACE key.
|
||||
*/
|
||||
const SPACE = 32;
|
||||
|
||||
/**
|
||||
* Keycode for PAGEUP key.
|
||||
*/
|
||||
const PAGEUP = 33;
|
||||
|
||||
/**
|
||||
* Keycode for PAGEDOWN key.
|
||||
*/
|
||||
const PAGEDOWN = 34;
|
||||
|
||||
/**
|
||||
* Keycode for END key.
|
||||
*/
|
||||
const END = 35;
|
||||
|
||||
/**
|
||||
* Keycode for HOME key.
|
||||
*/
|
||||
const HOME = 36;
|
||||
|
||||
/**
|
||||
* Keycode for LEFT key.
|
||||
*/
|
||||
const LEFT = 37;
|
||||
|
||||
/**
|
||||
* Keycode for UP key.
|
||||
*/
|
||||
const UP = 38;
|
||||
|
||||
/**
|
||||
* Keycode for RIGHT key.
|
||||
*/
|
||||
const RIGHT = 39;
|
||||
|
||||
/**
|
||||
* Keycode for DOWN key.
|
||||
*/
|
||||
const DOWN = 40;
|
||||
|
||||
/**
|
||||
* Keycode for DELETE key.
|
||||
*/
|
||||
const DELETE = 46;
|
||||
|
||||
/**
|
||||
* Keycode for F10 key.
|
||||
*/
|
||||
const F10 = 121;
|
||||
|
||||
/**
|
||||
* Keycode for ALT key.
|
||||
*/
|
||||
const ALT = 'alt';
|
||||
|
||||
/**
|
||||
* Keycode for CTRL key.
|
||||
*/
|
||||
const CTRL = 'ctrl';
|
||||
|
||||
/**
|
||||
* Keycode for COMMAND/META key.
|
||||
*/
|
||||
const COMMAND = 'meta';
|
||||
|
||||
/**
|
||||
* Keycode for SHIFT key.
|
||||
*/
|
||||
const SHIFT = 'shift';
|
||||
|
||||
/**
|
||||
* Keycode for ZERO key.
|
||||
*/
|
||||
const ZERO = 48;
|
||||
|
||||
|
||||
/**
|
||||
* Map the values of an object with a specified callback and return the result object.
|
||||
*
|
||||
* @template {{ [s: string]: any; } | ArrayLike<any>} T
|
||||
*
|
||||
* @param {T} object Object to map values of.
|
||||
* @param {( value: any ) => any} mapFn Mapping function
|
||||
*
|
||||
* @return {any} Active modifier constants.
|
||||
*/
|
||||
function mapValues(object, mapFn) {
|
||||
return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, mapFn(value)]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Object that contains functions that return the available modifier
|
||||
* depending on platform.
|
||||
*
|
||||
* @type {WPModifierHandler< ( isApple: () => boolean ) => WPModifierPart[]>}
|
||||
*/
|
||||
const modifiers = {
|
||||
primary: _isApple => _isApple() ? [COMMAND] : [CTRL],
|
||||
primaryShift: _isApple => _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT],
|
||||
primaryAlt: _isApple => _isApple() ? [ALT, COMMAND] : [CTRL, ALT],
|
||||
secondary: _isApple => _isApple() ? [SHIFT, ALT, COMMAND] : [CTRL, SHIFT, ALT],
|
||||
access: _isApple => _isApple() ? [CTRL, ALT] : [SHIFT, ALT],
|
||||
ctrl: () => [CTRL],
|
||||
alt: () => [ALT],
|
||||
ctrlShift: () => [CTRL, SHIFT],
|
||||
shift: () => [SHIFT],
|
||||
shiftAlt: () => [SHIFT, ALT],
|
||||
undefined: () => []
|
||||
};
|
||||
|
||||
/**
|
||||
* An object that contains functions to get raw shortcuts.
|
||||
*
|
||||
* These are intended for user with the KeyboardShortcuts.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* // Assuming macOS:
|
||||
* rawShortcut.primary( 'm' )
|
||||
* // "meta+m""
|
||||
* ```
|
||||
*
|
||||
* @type {WPModifierHandler<WPKeyHandler<string>>} Keyed map of functions to raw
|
||||
* shortcuts.
|
||||
*/
|
||||
const rawShortcut = mapValues(modifiers, ( /** @type {WPModifier} */modifier) => {
|
||||
return (/** @type {WPKeyHandler<string>} */(character, _isApple = platform/* isAppleOS */.H) => {
|
||||
return [...modifier(_isApple), character.toLowerCase()].join('+');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Return an array of the parts of a keyboard shortcut chord for display.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* // Assuming macOS:
|
||||
* displayShortcutList.primary( 'm' );
|
||||
* // [ "⌘", "M" ]
|
||||
* ```
|
||||
*
|
||||
* @type {WPModifierHandler<WPKeyHandler<string[]>>} Keyed map of functions to
|
||||
* shortcut sequences.
|
||||
*/
|
||||
const displayShortcutList = mapValues(modifiers, ( /** @type {WPModifier} */modifier) => {
|
||||
return (/** @type {WPKeyHandler<string[]>} */(character, _isApple = platform/* isAppleOS */.H) => {
|
||||
const isApple = _isApple();
|
||||
const replacementKeyMap = {
|
||||
[ALT]: isApple ? '⌥' : 'Alt',
|
||||
[CTRL]: isApple ? '⌃' : 'Ctrl',
|
||||
// Make sure ⌃ is the U+2303 UP ARROWHEAD unicode character and not the caret character.
|
||||
[COMMAND]: '⌘',
|
||||
[SHIFT]: isApple ? '⇧' : 'Shift'
|
||||
};
|
||||
const modifierKeys = modifier(_isApple).reduce((accumulator, key) => {
|
||||
var _replacementKeyMap$ke;
|
||||
const replacementKey = (_replacementKeyMap$ke = replacementKeyMap[key]) !== null && _replacementKeyMap$ke !== void 0 ? _replacementKeyMap$ke : key;
|
||||
// If on the Mac, adhere to platform convention and don't show plus between keys.
|
||||
if (isApple) {
|
||||
return [...accumulator, replacementKey];
|
||||
}
|
||||
return [...accumulator, replacementKey, '+'];
|
||||
}, /** @type {string[]} */[]);
|
||||
|
||||
// Symbols (~`,.) are removed by the default regular expression,
|
||||
// so override the rule to allow symbols used for shortcuts.
|
||||
// see: https://github.com/blakeembrey/change-case#options
|
||||
const capitalizedCharacter = capitalCase(character, {
|
||||
stripRegexp: /[^A-Z0-9~`,\.\\\-]/gi
|
||||
});
|
||||
return [...modifierKeys, capitalizedCharacter];
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* An object that contains functions to display shortcuts.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* // Assuming macOS:
|
||||
* displayShortcut.primary( 'm' );
|
||||
* // "⌘M"
|
||||
* ```
|
||||
*
|
||||
* @type {WPModifierHandler<WPKeyHandler<string>>} Keyed map of functions to
|
||||
* display shortcuts.
|
||||
*/
|
||||
const displayShortcut = mapValues(displayShortcutList, ( /** @type {WPKeyHandler<string[]>} */shortcutList) => {
|
||||
return (/** @type {WPKeyHandler<string>} */(character, _isApple = platform/* isAppleOS */.H) => shortcutList(character, _isApple).join('')
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* An object that contains functions to return an aria label for a keyboard
|
||||
* shortcut.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* // Assuming macOS:
|
||||
* shortcutAriaLabel.primary( '.' );
|
||||
* // "Command + Period"
|
||||
* ```
|
||||
*
|
||||
* @type {WPModifierHandler<WPKeyHandler<string>>} Keyed map of functions to
|
||||
* shortcut ARIA labels.
|
||||
*/
|
||||
const shortcutAriaLabel = mapValues(modifiers, ( /** @type {WPModifier} */modifier) => {
|
||||
return (/** @type {WPKeyHandler<string>} */(character, _isApple = platform/* isAppleOS */.H) => {
|
||||
const isApple = _isApple();
|
||||
/** @type {Record<string,string>} */
|
||||
const replacementKeyMap = {
|
||||
[SHIFT]: 'Shift',
|
||||
[COMMAND]: isApple ? 'Command' : 'Control',
|
||||
[CTRL]: 'Control',
|
||||
[ALT]: isApple ? 'Option' : 'Alt',
|
||||
/* translators: comma as in the character ',' */
|
||||
',': (0,build_module.__)('Comma'),
|
||||
/* translators: period as in the character '.' */
|
||||
'.': (0,build_module.__)('Period'),
|
||||
/* translators: backtick as in the character '`' */
|
||||
'`': (0,build_module.__)('Backtick'),
|
||||
/* translators: tilde as in the character '~' */
|
||||
'~': (0,build_module.__)('Tilde')
|
||||
};
|
||||
return [...modifier(_isApple), character].map(key => {
|
||||
var _replacementKeyMap$ke2;
|
||||
return capitalCase((_replacementKeyMap$ke2 = replacementKeyMap[key]) !== null && _replacementKeyMap$ke2 !== void 0 ? _replacementKeyMap$ke2 : key);
|
||||
}).join(isApple ? ' ' : ' + ');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* From a given KeyboardEvent, returns an array of active modifier constants for
|
||||
* the event.
|
||||
*
|
||||
* @param {import('react').KeyboardEvent<HTMLElement> | KeyboardEvent} event Keyboard event.
|
||||
*
|
||||
* @return {Array<WPModifierPart>} Active modifier constants.
|
||||
*/
|
||||
function getEventModifiers(event) {
|
||||
return (/** @type {WPModifierPart[]} */[ALT, CTRL, COMMAND, SHIFT].filter(key => event[/** @type {'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'} */
|
||||
`${key}Key`])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* An object that contains functions to check if a keyboard event matches a
|
||||
* predefined shortcut combination.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* // Assuming an event for ⌘M key press:
|
||||
* isKeyboardEvent.primary( event, 'm' );
|
||||
* // true
|
||||
* ```
|
||||
*
|
||||
* @type {WPModifierHandler<WPEventKeyHandler>} Keyed map of functions
|
||||
* to match events.
|
||||
*/
|
||||
const isKeyboardEvent = mapValues(modifiers, ( /** @type {WPModifier} */getModifiers) => {
|
||||
return (/** @type {WPEventKeyHandler} */(event, character, _isApple = platform/* isAppleOS */.H) => {
|
||||
const mods = getModifiers(_isApple);
|
||||
const eventMods = getEventModifiers(event);
|
||||
/** @type {Record<string,string>} */
|
||||
const replacementWithShiftKeyMap = {
|
||||
Comma: ',',
|
||||
Backslash: '\\',
|
||||
// Windows returns `\` for both IntlRo and IntlYen.
|
||||
IntlRo: '\\',
|
||||
IntlYen: '\\'
|
||||
};
|
||||
const modsDiff = mods.filter(mod => !eventMods.includes(mod));
|
||||
const eventModsDiff = eventMods.filter(mod => !mods.includes(mod));
|
||||
if (modsDiff.length > 0 || eventModsDiff.length > 0) {
|
||||
return false;
|
||||
}
|
||||
let key = event.key.toLowerCase();
|
||||
if (!character) {
|
||||
return mods.includes( /** @type {WPModifierPart} */key);
|
||||
}
|
||||
if (event.altKey && character.length === 1) {
|
||||
key = String.fromCharCode(event.keyCode).toLowerCase();
|
||||
}
|
||||
|
||||
// `event.key` returns the value of the key pressed, taking into the state of
|
||||
// modifier keys such as `Shift`. If the shift key is pressed, a different
|
||||
// value may be returned depending on the keyboard layout. It is necessary to
|
||||
// convert to the physical key value that don't take into account keyboard
|
||||
// layout or modifier key state.
|
||||
if (event.shiftKey && character.length === 1 && replacementWithShiftKeyMap[event.code]) {
|
||||
key = replacementWithShiftKeyMap[event.code];
|
||||
}
|
||||
|
||||
// For backwards compatibility.
|
||||
if (character === 'del') {
|
||||
character = 'delete';
|
||||
}
|
||||
return key === character.toLowerCase();
|
||||
}
|
||||
);
|
||||
});
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+keycodes@3.47.0/node_modules/@wordpress/keycodes/build-module/platform.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ H: () => (/* binding */ isAppleOS)
|
||||
/* harmony export */ });
|
||||
/**
|
||||
* Return true if platform is MacOS.
|
||||
*
|
||||
* @param {Window?} _window window object by default; used for DI testing.
|
||||
*
|
||||
* @return {boolean} True if MacOS; false otherwise.
|
||||
*/
|
||||
function isAppleOS(_window = null) {
|
||||
if (!_window) {
|
||||
if (typeof window === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
_window = window;
|
||||
}
|
||||
const {
|
||||
platform
|
||||
} = _window.navigator;
|
||||
return platform.indexOf('Mac') !== -1 || ['iPad', 'iPhone'].includes(platform);
|
||||
}
|
||||
//# sourceMappingURL=platform.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
W: () => (/* binding */ noCase)
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist.es2015/index.js
|
||||
/**
|
||||
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
||||
*/
|
||||
var SUPPORTED_LOCALE = {
|
||||
tr: {
|
||||
regexp: /\u0130|\u0049|\u0049\u0307/g,
|
||||
map: {
|
||||
İ: "\u0069",
|
||||
I: "\u0131",
|
||||
İ: "\u0069",
|
||||
},
|
||||
},
|
||||
az: {
|
||||
regexp: /\u0130/g,
|
||||
map: {
|
||||
İ: "\u0069",
|
||||
I: "\u0131",
|
||||
İ: "\u0069",
|
||||
},
|
||||
},
|
||||
lt: {
|
||||
regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
|
||||
map: {
|
||||
I: "\u0069\u0307",
|
||||
J: "\u006A\u0307",
|
||||
Į: "\u012F\u0307",
|
||||
Ì: "\u0069\u0307\u0300",
|
||||
Í: "\u0069\u0307\u0301",
|
||||
Ĩ: "\u0069\u0307\u0303",
|
||||
},
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Localized lower case.
|
||||
*/
|
||||
function localeLowerCase(str, locale) {
|
||||
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
|
||||
if (lang)
|
||||
return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
|
||||
return lowerCase(str);
|
||||
}
|
||||
/**
|
||||
* Lower case as a function.
|
||||
*/
|
||||
function lowerCase(str) {
|
||||
return str.toLowerCase();
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist.es2015/index.js
|
||||
|
||||
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
|
||||
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
||||
// Remove all non-word characters.
|
||||
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
|
||||
/**
|
||||
* Normalize the string into something other libraries can manipulate easier.
|
||||
*/
|
||||
function noCase(input, options) {
|
||||
if (options === void 0) { options = {}; }
|
||||
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
|
||||
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
||||
var start = 0;
|
||||
var end = result.length;
|
||||
// Trim the delimiter from around the output string.
|
||||
while (result.charAt(start) === "\0")
|
||||
start++;
|
||||
while (result.charAt(end - 1) === "\0")
|
||||
end--;
|
||||
// Transform each token independently.
|
||||
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
||||
}
|
||||
/**
|
||||
* Replace `re` in the input string with the replacement value.
|
||||
*/
|
||||
function replace(input, re, value) {
|
||||
if (re instanceof RegExp)
|
||||
return input.replace(re, value);
|
||||
return re.reduce(function (input, re) { return input.replace(re, value); }, input);
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/tslib@2.6.3/node_modules/tslib/tslib.es6.mjs":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ Cl: () => (/* binding */ __assign),
|
||||
/* harmony export */ Tt: () => (/* binding */ __rest)
|
||||
/* harmony export */ });
|
||||
/* unused harmony exports __extends, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources */
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise, SuppressedError, Symbol */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
function __extends(d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
}
|
||||
|
||||
var __assign = function() {
|
||||
__assign = Object.assign || function __assign(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
return __assign.apply(this, arguments);
|
||||
}
|
||||
|
||||
function __rest(s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
function __decorate(decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
}
|
||||
|
||||
function __param(paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
}
|
||||
|
||||
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
||||
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
||||
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
||||
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _, done = false;
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var context = {};
|
||||
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
||||
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
if (_ = accept(result.get)) descriptor.get = _;
|
||||
if (_ = accept(result.set)) descriptor.set = _;
|
||||
if (_ = accept(result.init)) initializers.unshift(_);
|
||||
}
|
||||
else if (_ = accept(result)) {
|
||||
if (kind === "field") initializers.unshift(_);
|
||||
else descriptor[key] = _;
|
||||
}
|
||||
}
|
||||
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
||||
done = true;
|
||||
};
|
||||
|
||||
function __runInitializers(thisArg, initializers, value) {
|
||||
var useValue = arguments.length > 2;
|
||||
for (var i = 0; i < initializers.length; i++) {
|
||||
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
||||
}
|
||||
return useValue ? value : void 0;
|
||||
};
|
||||
|
||||
function __propKey(x) {
|
||||
return typeof x === "symbol" ? x : "".concat(x);
|
||||
};
|
||||
|
||||
function __setFunctionName(f, name, prefix) {
|
||||
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
||||
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
||||
};
|
||||
|
||||
function __metadata(metadataKey, metadataValue) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||||
}
|
||||
|
||||
function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
function __generator(thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
}
|
||||
|
||||
var __createBinding = Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
});
|
||||
|
||||
function __exportStar(m, o) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
||||
}
|
||||
|
||||
function __values(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
}
|
||||
|
||||
function __read(o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
function __spread() {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++)
|
||||
ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
function __spreadArrays() {
|
||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
||||
r[k] = a[j];
|
||||
return r;
|
||||
}
|
||||
|
||||
function __spreadArray(to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
}
|
||||
|
||||
function __await(v) {
|
||||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
||||
}
|
||||
|
||||
function __asyncGenerator(thisArg, _arguments, generator) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
||||
return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
||||
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
||||
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
||||
function fulfill(value) { resume("next", value); }
|
||||
function reject(value) { resume("throw", value); }
|
||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
||||
}
|
||||
|
||||
function __asyncDelegator(o) {
|
||||
var i, p;
|
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
||||
}
|
||||
|
||||
function __asyncValues(o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator], i;
|
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||
}
|
||||
|
||||
function __makeTemplateObject(cooked, raw) {
|
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||||
return cooked;
|
||||
};
|
||||
|
||||
var __setModuleDefault = Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
};
|
||||
|
||||
function __importStar(mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
}
|
||||
|
||||
function __importDefault(mod) {
|
||||
return (mod && mod.__esModule) ? mod : { default: mod };
|
||||
}
|
||||
|
||||
function __classPrivateFieldGet(receiver, state, kind, f) {
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
||||
}
|
||||
|
||||
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
||||
}
|
||||
|
||||
function __classPrivateFieldIn(state, receiver) {
|
||||
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
||||
return typeof state === "function" ? receiver === state : state.has(receiver);
|
||||
}
|
||||
|
||||
function __addDisposableResource(env, value, async) {
|
||||
if (value !== null && value !== void 0) {
|
||||
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
||||
var dispose, inner;
|
||||
if (async) {
|
||||
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
||||
dispose = value[Symbol.asyncDispose];
|
||||
}
|
||||
if (dispose === void 0) {
|
||||
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
||||
dispose = value[Symbol.dispose];
|
||||
if (async) inner = dispose;
|
||||
}
|
||||
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
||||
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
||||
env.stack.push({ value: value, dispose: dispose, async: async });
|
||||
}
|
||||
else if (async) {
|
||||
env.stack.push({ async: true });
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
||||
var e = new Error(message);
|
||||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
||||
};
|
||||
|
||||
function __disposeResources(env) {
|
||||
function fail(e) {
|
||||
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
||||
env.hasError = true;
|
||||
}
|
||||
function next() {
|
||||
while (env.stack.length) {
|
||||
var rec = env.stack.pop();
|
||||
try {
|
||||
var result = rec.dispose && rec.dispose.call(rec.value);
|
||||
if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
||||
}
|
||||
catch (e) {
|
||||
fail(e);
|
||||
}
|
||||
}
|
||||
if (env.hasError) throw env.error;
|
||||
}
|
||||
return next();
|
||||
}
|
||||
|
||||
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||
__extends,
|
||||
__assign,
|
||||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
__createBinding,
|
||||
__exportStar,
|
||||
__values,
|
||||
__read,
|
||||
__spread,
|
||||
__spreadArrays,
|
||||
__spreadArray,
|
||||
__await,
|
||||
__asyncGenerator,
|
||||
__asyncDelegator,
|
||||
__asyncValues,
|
||||
__makeTemplateObject,
|
||||
__importStar,
|
||||
__importDefault,
|
||||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
__classPrivateFieldIn,
|
||||
__addDisposableResource,
|
||||
__disposeResources,
|
||||
});
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
"use strict";(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[2282],{"../../node_modules/.pnpm/@storybook+components@7.6.19_@types+react-dom@18.3.0_@types+react@17.0.71_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/components/dist/WithTooltip-V3YHNWJZ.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{WithToolTipState:()=>_chunk_NE5YGCQB_mjs__WEBPACK_IMPORTED_MODULE_0__.vb,WithTooltip:()=>_chunk_NE5YGCQB_mjs__WEBPACK_IMPORTED_MODULE_0__.vb,WithTooltipPure:()=>_chunk_NE5YGCQB_mjs__WEBPACK_IMPORTED_MODULE_0__.o4});var _chunk_NE5YGCQB_mjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@storybook+components@7.6.19_@types+react-dom@18.3.0_@types+react@17.0.71_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/components/dist/chunk-NE5YGCQB.mjs")}}]);
|
|
@ -0,0 +1,20 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[2282],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@storybook+components@7.6.19_@types+react-dom@18.3.0_@types+react@17.0.71_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/components/dist/WithTooltip-V3YHNWJZ.mjs":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ WithToolTipState: () => (/* reexport safe */ _chunk_NE5YGCQB_mjs__WEBPACK_IMPORTED_MODULE_0__.vb),
|
||||
/* harmony export */ WithTooltip: () => (/* reexport safe */ _chunk_NE5YGCQB_mjs__WEBPACK_IMPORTED_MODULE_0__.vb),
|
||||
/* harmony export */ WithTooltipPure: () => (/* reexport safe */ _chunk_NE5YGCQB_mjs__WEBPACK_IMPORTED_MODULE_0__.o4)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _chunk_NE5YGCQB_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@storybook+components@7.6.19_@types+react-dom@18.3.0_@types+react@17.0.71_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/components/dist/chunk-NE5YGCQB.mjs");
|
||||
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,781 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[2434],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _arrayLikeToArray)
|
||||
/* harmony export */ });
|
||||
function _arrayLikeToArray(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
||||
return arr2;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _defineProperty)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(key);
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _iterableToArray)
|
||||
/* harmony export */ });
|
||||
function _iterableToArray(iter) {
|
||||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ _toConsumableArray)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
||||
var arrayLikeToArray = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
||||
|
||||
function _arrayWithoutHoles(arr) {
|
||||
if (Array.isArray(arr)) return (0,arrayLikeToArray/* default */.A)(arr);
|
||||
}
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
||||
var iterableToArray = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
||||
var unsupportedIterableToArray = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
|
||||
function _nonIterableSpread() {
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
||||
|
||||
|
||||
|
||||
|
||||
function _toConsumableArray(arr) {
|
||||
return _arrayWithoutHoles(arr) || (0,iterableToArray/* default */.A)(arr) || (0,unsupportedIterableToArray/* default */.A)(arr) || _nonIterableSpread();
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ _toPropertyKey)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js
|
||||
var esm_typeof = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
||||
|
||||
function _toPrimitive(input, hint) {
|
||||
if ((0,esm_typeof/* default */.A)(input) !== "object" || input === null) return input;
|
||||
var prim = input[Symbol.toPrimitive];
|
||||
if (prim !== undefined) {
|
||||
var res = prim.call(input, hint || "default");
|
||||
if ((0,esm_typeof/* default */.A)(res) !== "object") return res;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
return (hint === "string" ? String : Number)(input);
|
||||
}
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
||||
|
||||
|
||||
function _toPropertyKey(arg) {
|
||||
var key = _toPrimitive(arg, "string");
|
||||
return (0,esm_typeof/* default */.A)(key) === "symbol" ? key : String(key);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _typeof)
|
||||
/* harmony export */ });
|
||||
function _typeof(o) {
|
||||
"@babel/helpers - typeof";
|
||||
|
||||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
||||
return typeof o;
|
||||
} : function (o) {
|
||||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
||||
}, _typeof(o);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _unsupportedIterableToArray)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) {
|
||||
if (!o) return;
|
||||
if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(o, minLen);
|
||||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||||
if (n === "Object" && o.constructor) n = o.constructor.name;
|
||||
if (n === "Map" || n === "Set") return Array.from(o);
|
||||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(o, minLen);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-for-each.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $forEach = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").forEach);
|
||||
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
||||
|
||||
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
||||
|
||||
// `Array.prototype.forEach` method implementation
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
||||
module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
||||
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
||||
} : [].forEach;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
var V8_VERSION = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-v8-version.js");
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
|
||||
module.exports = function (METHOD_NAME) {
|
||||
// We can't use this feature detection in V8 since it causes
|
||||
// deoptimization and serious performance degradation
|
||||
// https://github.com/zloirock/core-js/issues/677
|
||||
return V8_VERSION >= 51 || !fails(function () {
|
||||
var array = [];
|
||||
var constructor = array.constructor = {};
|
||||
constructor[SPECIES] = function () {
|
||||
return { foo: 1 };
|
||||
};
|
||||
return array[METHOD_NAME](Boolean).foo !== 1;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
|
||||
module.exports = function (METHOD_NAME, argument) {
|
||||
var method = [][METHOD_NAME];
|
||||
return !!method && fails(function () {
|
||||
// eslint-disable-next-line no-useless-call -- required for testing
|
||||
method.call(null, argument || function () { return 1; }, 1);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/does-not-exceed-safe-integer.js":
|
||||
/***/ ((module) => {
|
||||
|
||||
|
||||
var $TypeError = TypeError;
|
||||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
||||
|
||||
module.exports = function (it) {
|
||||
if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
|
||||
return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
// TODO: Remove from `core-js@4` since it's moved to entry points
|
||||
__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.regexp.exec.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this-clause.js");
|
||||
var defineBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in.js");
|
||||
var regexpExec = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/regexp-exec.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
var createNonEnumerableProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-non-enumerable-property.js");
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
var RegExpPrototype = RegExp.prototype;
|
||||
|
||||
module.exports = function (KEY, exec, FORCED, SHAM) {
|
||||
var SYMBOL = wellKnownSymbol(KEY);
|
||||
|
||||
var DELEGATES_TO_SYMBOL = !fails(function () {
|
||||
// String methods call symbol-named RegEp methods
|
||||
var O = {};
|
||||
O[SYMBOL] = function () { return 7; };
|
||||
return ''[KEY](O) !== 7;
|
||||
});
|
||||
|
||||
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
||||
// Symbol-named RegExp methods call .exec
|
||||
var execCalled = false;
|
||||
var re = /a/;
|
||||
|
||||
if (KEY === 'split') {
|
||||
// We can't use real regex here since it causes deoptimization
|
||||
// and serious performance degradation in V8
|
||||
// https://github.com/zloirock/core-js/issues/306
|
||||
re = {};
|
||||
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
||||
// a new one. We need to return the patched regex when creating the new one.
|
||||
re.constructor = {};
|
||||
re.constructor[SPECIES] = function () { return re; };
|
||||
re.flags = '';
|
||||
re[SYMBOL] = /./[SYMBOL];
|
||||
}
|
||||
|
||||
re.exec = function () {
|
||||
execCalled = true;
|
||||
return null;
|
||||
};
|
||||
|
||||
re[SYMBOL]('');
|
||||
return !execCalled;
|
||||
});
|
||||
|
||||
if (
|
||||
!DELEGATES_TO_SYMBOL ||
|
||||
!DELEGATES_TO_EXEC ||
|
||||
FORCED
|
||||
) {
|
||||
var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);
|
||||
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
||||
var uncurriedNativeMethod = uncurryThis(nativeMethod);
|
||||
var $exec = regexp.exec;
|
||||
if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
|
||||
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
||||
// The native String method already delegates to @@method (this
|
||||
// polyfilled function), leasing to infinite recursion.
|
||||
// We avoid it by directly calling the native @@method method.
|
||||
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
||||
}
|
||||
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
||||
}
|
||||
return { done: false };
|
||||
});
|
||||
|
||||
defineBuiltIn(String.prototype, KEY, methods[0]);
|
||||
defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
|
||||
}
|
||||
|
||||
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/inherit-if-required.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var setPrototypeOf = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-set-prototype-of.js");
|
||||
|
||||
// makes subclassing work correct for wrapped built-ins
|
||||
module.exports = function ($this, dummy, Wrapper) {
|
||||
var NewTarget, NewTargetPrototype;
|
||||
if (
|
||||
// it can work only with native `setPrototypeOf`
|
||||
setPrototypeOf &&
|
||||
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
||||
isCallable(NewTarget = dummy.constructor) &&
|
||||
NewTarget !== Wrapper &&
|
||||
isObject(NewTargetPrototype = NewTarget.prototype) &&
|
||||
NewTargetPrototype !== Wrapper.prototype
|
||||
) setPrototypeOf($this, NewTargetPrototype);
|
||||
return $this;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-regexp.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var classof = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/classof-raw.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
|
||||
var MATCH = wellKnownSymbol('match');
|
||||
|
||||
// `IsRegExp` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-isregexp
|
||||
module.exports = function (it) {
|
||||
var isRegExp;
|
||||
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/regexp-exec-abstract.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var call = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-call.js");
|
||||
var anObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/an-object.js");
|
||||
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
||||
var classof = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/classof-raw.js");
|
||||
var regexpExec = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/regexp-exec.js");
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// `RegExpExec` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-regexpexec
|
||||
module.exports = function (R, S) {
|
||||
var exec = R.exec;
|
||||
if (isCallable(exec)) {
|
||||
var result = call(exec, R, S);
|
||||
if (result !== null) anObject(result);
|
||||
return result;
|
||||
}
|
||||
if (classof(R) === 'RegExp') return call(regexpExec, R, S);
|
||||
throw new $TypeError('RegExp#exec called on incompatible receiver');
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/same-value.js":
|
||||
/***/ ((module) => {
|
||||
|
||||
|
||||
// `SameValue` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-samevalue
|
||||
// eslint-disable-next-line es/no-object-is -- safe
|
||||
module.exports = Object.is || function is(x, y) {
|
||||
// eslint-disable-next-line no-self-compare -- NaN check
|
||||
return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.concat.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var isArray = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
var doesNotExceedSafeInteger = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/does-not-exceed-safe-integer.js");
|
||||
var createProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property.js");
|
||||
var arraySpeciesCreate = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-create.js");
|
||||
var arrayMethodHasSpeciesSupport = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
var V8_VERSION = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-v8-version.js");
|
||||
|
||||
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
||||
|
||||
// We can't use this feature detection in V8 since it causes
|
||||
// deoptimization and serious performance degradation
|
||||
// https://github.com/zloirock/core-js/issues/679
|
||||
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
|
||||
var array = [];
|
||||
array[IS_CONCAT_SPREADABLE] = false;
|
||||
return array.concat()[0] !== array;
|
||||
});
|
||||
|
||||
var isConcatSpreadable = function (O) {
|
||||
if (!isObject(O)) return false;
|
||||
var spreadable = O[IS_CONCAT_SPREADABLE];
|
||||
return spreadable !== undefined ? !!spreadable : isArray(O);
|
||||
};
|
||||
|
||||
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');
|
||||
|
||||
// `Array.prototype.concat` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
||||
// with adding support of @@isConcatSpreadable and @@species
|
||||
$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
||||
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
||||
concat: function concat(arg) {
|
||||
var O = toObject(this);
|
||||
var A = arraySpeciesCreate(O, 0);
|
||||
var n = 0;
|
||||
var i, k, length, len, E;
|
||||
for (i = -1, length = arguments.length; i < length; i++) {
|
||||
E = i === -1 ? O : arguments[i];
|
||||
if (isConcatSpreadable(E)) {
|
||||
len = lengthOfArrayLike(E);
|
||||
doesNotExceedSafeInteger(n + len);
|
||||
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
||||
} else {
|
||||
doesNotExceedSafeInteger(n + 1);
|
||||
createProperty(A, n++, E);
|
||||
}
|
||||
}
|
||||
A.length = n;
|
||||
return A;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.filter.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $filter = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").filter);
|
||||
var arrayMethodHasSpeciesSupport = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js");
|
||||
|
||||
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
||||
|
||||
// `Array.prototype.filter` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
||||
// with adding support of @@species
|
||||
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
||||
filter: function filter(callbackfn /* , thisArg */) {
|
||||
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.for-each.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var forEach = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-for-each.js");
|
||||
|
||||
// `Array.prototype.forEach` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
||||
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
||||
$({ target: 'Array', proto: true, forced: [].forEach !== forEach }, {
|
||||
forEach: forEach
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.map.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $map = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").map);
|
||||
var arrayMethodHasSpeciesSupport = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js");
|
||||
|
||||
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
|
||||
|
||||
// `Array.prototype.map` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.map
|
||||
// with adding support of @@species
|
||||
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
||||
map: function map(callbackfn /* , thisArg */) {
|
||||
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.slice.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var isArray = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js");
|
||||
var isConstructor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-constructor.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var toAbsoluteIndex = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-absolute-index.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var createProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
var arrayMethodHasSpeciesSupport = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js");
|
||||
var nativeSlice = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-slice.js");
|
||||
|
||||
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
var $Array = Array;
|
||||
var max = Math.max;
|
||||
|
||||
// `Array.prototype.slice` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.slice
|
||||
// fallback for not array-like ES3 strings and DOM objects
|
||||
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
||||
slice: function slice(start, end) {
|
||||
var O = toIndexedObject(this);
|
||||
var length = lengthOfArrayLike(O);
|
||||
var k = toAbsoluteIndex(start, length);
|
||||
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
||||
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
||||
var Constructor, result, n;
|
||||
if (isArray(O)) {
|
||||
Constructor = O.constructor;
|
||||
// cross-realm fallback
|
||||
if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {
|
||||
Constructor = undefined;
|
||||
} else if (isObject(Constructor)) {
|
||||
Constructor = Constructor[SPECIES];
|
||||
if (Constructor === null) Constructor = undefined;
|
||||
}
|
||||
if (Constructor === $Array || Constructor === undefined) {
|
||||
return nativeSlice(O, k, fin);
|
||||
}
|
||||
}
|
||||
result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));
|
||||
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
||||
result.length = n;
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-properties.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var defineProperties = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-properties.js").f);
|
||||
|
||||
// `Object.defineProperties` method
|
||||
// https://tc39.es/ecma262/#sec-object.defineproperties
|
||||
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
||||
$({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {
|
||||
defineProperties: defineProperties
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-property.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var defineProperty = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-property.js").f);
|
||||
|
||||
// `Object.defineProperty` method
|
||||
// https://tc39.es/ecma262/#sec-object.defineproperty
|
||||
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
||||
$({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {
|
||||
defineProperty: defineProperty
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var nativeGetOwnPropertyDescriptor = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-descriptor.js").f);
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
|
||||
var FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });
|
||||
|
||||
// `Object.getOwnPropertyDescriptor` method
|
||||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
||||
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
||||
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
||||
return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var ownKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/own-keys.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var getOwnPropertyDescriptorModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-descriptor.js");
|
||||
var createProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property.js");
|
||||
|
||||
// `Object.getOwnPropertyDescriptors` method
|
||||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
||||
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
||||
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
|
||||
var O = toIndexedObject(object);
|
||||
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
||||
var keys = ownKeys(O);
|
||||
var result = {};
|
||||
var index = 0;
|
||||
var key, descriptor;
|
||||
while (keys.length > index) {
|
||||
descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
|
||||
if (descriptor !== undefined) createProperty(result, key, descriptor);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.keys.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
var nativeKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-keys.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
|
||||
var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
|
||||
|
||||
// `Object.keys` method
|
||||
// https://tc39.es/ecma262/#sec-object.keys
|
||||
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
||||
keys: function keys(it) {
|
||||
return nativeKeys(toObject(it));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.search.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var call = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-call.js");
|
||||
var fixRegExpWellKnownSymbolLogic = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
|
||||
var anObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/an-object.js");
|
||||
var isNullOrUndefined = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-null-or-undefined.js");
|
||||
var requireObjectCoercible = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/require-object-coercible.js");
|
||||
var sameValue = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/same-value.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var getMethod = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-method.js");
|
||||
var regExpExec = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/regexp-exec-abstract.js");
|
||||
|
||||
// @@search logic
|
||||
fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
|
||||
return [
|
||||
// `String.prototype.search` method
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.search
|
||||
function search(regexp) {
|
||||
var O = requireObjectCoercible(this);
|
||||
var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
|
||||
return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
|
||||
},
|
||||
// `RegExp.prototype[@@search]` method
|
||||
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
||||
function (string) {
|
||||
var rx = anObject(this);
|
||||
var S = toString(string);
|
||||
var res = maybeCallNative(nativeSearch, rx, S);
|
||||
|
||||
if (res.done) return res.value;
|
||||
|
||||
var previousLastIndex = rx.lastIndex;
|
||||
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
||||
var result = regExpExec(rx, S);
|
||||
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
|
||||
return result === null ? -1 : result.index;
|
||||
}
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.for-each.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var global = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js");
|
||||
var DOMIterables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/dom-iterables.js");
|
||||
var DOMTokenListPrototype = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/dom-token-list-prototype.js");
|
||||
var forEach = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-for-each.js");
|
||||
var createNonEnumerableProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-non-enumerable-property.js");
|
||||
|
||||
var handlePrototype = function (CollectionPrototype) {
|
||||
// some Chrome versions have non-configurable methods on DOMTokenList
|
||||
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
||||
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
||||
} catch (error) {
|
||||
CollectionPrototype.forEach = forEach;
|
||||
}
|
||||
};
|
||||
|
||||
for (var COLLECTION_NAME in DOMIterables) {
|
||||
if (DOMIterables[COLLECTION_NAME]) {
|
||||
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
|
||||
}
|
||||
}
|
||||
|
||||
handlePrototype(DOMTokenListPrototype);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[2491],{"../../node_modules/.pnpm/memoizerific@1.11.3/node_modules/memoizerific sync recursive":module=>{function webpackEmptyContext(req){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="../../node_modules/.pnpm/memoizerific@1.11.3/node_modules/memoizerific sync recursive",module.exports=webpackEmptyContext}}]);
|
|
@ -0,0 +1,18 @@
|
|||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[2491],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/memoizerific@1.11.3/node_modules/memoizerific sync recursive":
|
||||
/***/ ((module) => {
|
||||
|
||||
function webpackEmptyContext(req) {
|
||||
var e = new Error("Cannot find module '" + req + "'");
|
||||
e.code = 'MODULE_NOT_FOUND';
|
||||
throw e;
|
||||
}
|
||||
webpackEmptyContext.keys = () => ([]);
|
||||
webpackEmptyContext.resolve = webpackEmptyContext;
|
||||
webpackEmptyContext.id = "../../node_modules/.pnpm/memoizerific@1.11.3/node_modules/memoizerific sync recursive";
|
||||
module.exports = webpackEmptyContext;
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
|
@ -0,0 +1,546 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[2911],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/spinner/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ Spinner)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
||||
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js
|
||||
var emotion_styled_base_browser_esm = __webpack_require__("../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js
|
||||
var emotion_react_browser_esm = __webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/config-values.js
|
||||
var config_values = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/config-values.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js + 1 modules
|
||||
var colors_values = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/spinner/styles.js
|
||||
|
||||
|
||||
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
const spinAnimation = (0,emotion_react_browser_esm/* keyframes */.i7)`
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
`;
|
||||
const StyledSpinner = (0,emotion_styled_base_browser_esm/* default */.A)("svg", true ? {
|
||||
target: "e1bj2jdf2"
|
||||
} : 0)("width:", config_values/* default */.A.spinnerSize, "px;height:", config_values/* default */.A.spinnerSize, "px;display:inline-block;margin:5px 11px 0;position:relative;color:var( --wp-admin-theme-color );overflow:visible;" + ( true ? "" : 0));
|
||||
const commonPathProps = true ? {
|
||||
name: "9s4963",
|
||||
styles: "fill:transparent;stroke-width:1.5px"
|
||||
} : 0;
|
||||
const SpinnerTrack = (0,emotion_styled_base_browser_esm/* default */.A)("circle", true ? {
|
||||
target: "e1bj2jdf1"
|
||||
} : 0)(commonPathProps, ";stroke:", colors_values/* COLORS */.lm.gray[300], ";" + ( true ? "" : 0));
|
||||
const SpinnerIndicator = (0,emotion_styled_base_browser_esm/* default */.A)("path", true ? {
|
||||
target: "e1bj2jdf0"
|
||||
} : 0)(commonPathProps, ";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ", spinAnimation, ";" + ( true ? "" : 0));
|
||||
//# sourceMappingURL=styles.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/spinner/index.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @typedef OwnProps
|
||||
*
|
||||
* @property {string} [className] Class name
|
||||
*/
|
||||
|
||||
/** @typedef {import('react').ComponentPropsWithoutRef<'svg'> & OwnProps} Props */
|
||||
|
||||
/**
|
||||
* @param {Props} props
|
||||
* @return {JSX.Element} Element
|
||||
*/
|
||||
|
||||
function Spinner(_ref) {
|
||||
let {
|
||||
className,
|
||||
...props
|
||||
} = _ref;
|
||||
return (0,react.createElement)(StyledSpinner, (0,esm_extends/* default */.A)({
|
||||
className: classnames_default()('components-spinner', className),
|
||||
viewBox: "0 0 100 100",
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
role: "presentation",
|
||||
focusable: "false"
|
||||
}, props), (0,react.createElement)(SpinnerTrack, {
|
||||
cx: "50",
|
||||
cy: "50",
|
||||
r: "50",
|
||||
vectorEffect: "non-scaling-stroke"
|
||||
}), (0,react.createElement)(SpinnerIndicator, {
|
||||
d: "m 50 0 a 50 50 0 0 1 50 50",
|
||||
vectorEffect: "non-scaling-stroke"
|
||||
}));
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+element@4.4.1/node_modules/@wordpress/element/build-module/create-interpolate-element.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
/** @typedef {import('./react').WPElement} WPElement */
|
||||
|
||||
let indoc, offset, output, stack;
|
||||
/**
|
||||
* Matches tags in the localized string
|
||||
*
|
||||
* This is used for extracting the tag pattern groups for parsing the localized
|
||||
* string and along with the map converting it to a react element.
|
||||
*
|
||||
* There are four references extracted using this tokenizer:
|
||||
*
|
||||
* match: Full match of the tag (i.e. <strong>, </strong>, <br/>)
|
||||
* isClosing: The closing slash, it it exists.
|
||||
* name: The name portion of the tag (strong, br) (if )
|
||||
* isSelfClosed: The slash on a self closing tag, if it exists.
|
||||
*
|
||||
* @type {RegExp}
|
||||
*/
|
||||
|
||||
const tokenizer = /<(\/)?(\w+)\s*(\/)?>/g;
|
||||
/**
|
||||
* The stack frame tracking parse progress.
|
||||
*
|
||||
* @typedef Frame
|
||||
*
|
||||
* @property {WPElement} element A parent element which may still have
|
||||
* @property {number} tokenStart Offset at which parent element first
|
||||
* appears.
|
||||
* @property {number} tokenLength Length of string marking start of parent
|
||||
* element.
|
||||
* @property {number} [prevOffset] Running offset at which parsing should
|
||||
* continue.
|
||||
* @property {number} [leadingTextStart] Offset at which last closing element
|
||||
* finished, used for finding text between
|
||||
* elements.
|
||||
* @property {WPElement[]} children Children.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Tracks recursive-descent parse state.
|
||||
*
|
||||
* This is a Stack frame holding parent elements until all children have been
|
||||
* parsed.
|
||||
*
|
||||
* @private
|
||||
* @param {WPElement} element A parent element which may still have
|
||||
* nested children not yet parsed.
|
||||
* @param {number} tokenStart Offset at which parent element first
|
||||
* appears.
|
||||
* @param {number} tokenLength Length of string marking start of parent
|
||||
* element.
|
||||
* @param {number} [prevOffset] Running offset at which parsing should
|
||||
* continue.
|
||||
* @param {number} [leadingTextStart] Offset at which last closing element
|
||||
* finished, used for finding text between
|
||||
* elements.
|
||||
*
|
||||
* @return {Frame} The stack frame tracking parse progress.
|
||||
*/
|
||||
|
||||
function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) {
|
||||
return {
|
||||
element,
|
||||
tokenStart,
|
||||
tokenLength,
|
||||
prevOffset,
|
||||
leadingTextStart,
|
||||
children: []
|
||||
};
|
||||
}
|
||||
/**
|
||||
* This function creates an interpolated element from a passed in string with
|
||||
* specific tags matching how the string should be converted to an element via
|
||||
* the conversion map value.
|
||||
*
|
||||
* @example
|
||||
* For example, for the given string:
|
||||
*
|
||||
* "This is a <span>string</span> with <a>a link</a> and a self-closing
|
||||
* <CustomComponentB/> tag"
|
||||
*
|
||||
* You would have something like this as the conversionMap value:
|
||||
*
|
||||
* ```js
|
||||
* {
|
||||
* span: <span />,
|
||||
* a: <a href={ 'https://github.com' } />,
|
||||
* CustomComponentB: <CustomComponent />,
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param {string} interpolatedString The interpolation string to be parsed.
|
||||
* @param {Object} conversionMap The map used to convert the string to
|
||||
* a react element.
|
||||
* @throws {TypeError}
|
||||
* @return {WPElement} A wp element.
|
||||
*/
|
||||
|
||||
|
||||
const createInterpolateElement = (interpolatedString, conversionMap) => {
|
||||
indoc = interpolatedString;
|
||||
offset = 0;
|
||||
output = [];
|
||||
stack = [];
|
||||
tokenizer.lastIndex = 0;
|
||||
|
||||
if (!isValidConversionMap(conversionMap)) {
|
||||
throw new TypeError('The conversionMap provided is not valid. It must be an object with values that are WPElements');
|
||||
}
|
||||
|
||||
do {// twiddle our thumbs
|
||||
} while (proceed(conversionMap));
|
||||
|
||||
return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, ...output);
|
||||
};
|
||||
/**
|
||||
* Validate conversion map.
|
||||
*
|
||||
* A map is considered valid if it's an object and every value in the object
|
||||
* is a WPElement
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Object} conversionMap The map being validated.
|
||||
*
|
||||
* @return {boolean} True means the map is valid.
|
||||
*/
|
||||
|
||||
|
||||
const isValidConversionMap = conversionMap => {
|
||||
const isObject = typeof conversionMap === 'object';
|
||||
const values = isObject && Object.values(conversionMap);
|
||||
return isObject && values.length && values.every(element => (0,_react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(element));
|
||||
};
|
||||
/**
|
||||
* This is the iterator over the matches in the string.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Object} conversionMap The conversion map for the string.
|
||||
*
|
||||
* @return {boolean} true for continuing to iterate, false for finished.
|
||||
*/
|
||||
|
||||
|
||||
function proceed(conversionMap) {
|
||||
const next = nextToken();
|
||||
const [tokenType, name, startOffset, tokenLength] = next;
|
||||
const stackDepth = stack.length;
|
||||
const leadingTextStart = startOffset > offset ? offset : null;
|
||||
|
||||
if (!conversionMap[name]) {
|
||||
addText();
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (tokenType) {
|
||||
case 'no-more-tokens':
|
||||
if (stackDepth !== 0) {
|
||||
const {
|
||||
leadingTextStart: stackLeadingText,
|
||||
tokenStart
|
||||
} = stack.pop();
|
||||
output.push(indoc.substr(stackLeadingText, tokenStart));
|
||||
}
|
||||
|
||||
addText();
|
||||
return false;
|
||||
|
||||
case 'self-closed':
|
||||
if (0 === stackDepth) {
|
||||
if (null !== leadingTextStart) {
|
||||
output.push(indoc.substr(leadingTextStart, startOffset - leadingTextStart));
|
||||
}
|
||||
|
||||
output.push(conversionMap[name]);
|
||||
offset = startOffset + tokenLength;
|
||||
return true;
|
||||
} // Otherwise we found an inner element.
|
||||
|
||||
|
||||
addChild(createFrame(conversionMap[name], startOffset, tokenLength));
|
||||
offset = startOffset + tokenLength;
|
||||
return true;
|
||||
|
||||
case 'opener':
|
||||
stack.push(createFrame(conversionMap[name], startOffset, tokenLength, startOffset + tokenLength, leadingTextStart));
|
||||
offset = startOffset + tokenLength;
|
||||
return true;
|
||||
|
||||
case 'closer':
|
||||
// If we're not nesting then this is easy - close the block.
|
||||
if (1 === stackDepth) {
|
||||
closeOuterElement(startOffset);
|
||||
offset = startOffset + tokenLength;
|
||||
return true;
|
||||
} // Otherwise we're nested and we have to close out the current
|
||||
// block and add it as a innerBlock to the parent.
|
||||
|
||||
|
||||
const stackTop = stack.pop();
|
||||
const text = indoc.substr(stackTop.prevOffset, startOffset - stackTop.prevOffset);
|
||||
stackTop.children.push(text);
|
||||
stackTop.prevOffset = startOffset + tokenLength;
|
||||
const frame = createFrame(stackTop.element, stackTop.tokenStart, stackTop.tokenLength, startOffset + tokenLength);
|
||||
frame.children = stackTop.children;
|
||||
addChild(frame);
|
||||
offset = startOffset + tokenLength;
|
||||
return true;
|
||||
|
||||
default:
|
||||
addText();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Grabs the next token match in the string and returns it's details.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @return {Array} An array of details for the token matched.
|
||||
*/
|
||||
|
||||
|
||||
function nextToken() {
|
||||
const matches = tokenizer.exec(indoc); // We have no more tokens.
|
||||
|
||||
if (null === matches) {
|
||||
return ['no-more-tokens'];
|
||||
}
|
||||
|
||||
const startedAt = matches.index;
|
||||
const [match, isClosing, name, isSelfClosed] = matches;
|
||||
const length = match.length;
|
||||
|
||||
if (isSelfClosed) {
|
||||
return ['self-closed', name, startedAt, length];
|
||||
}
|
||||
|
||||
if (isClosing) {
|
||||
return ['closer', name, startedAt, length];
|
||||
}
|
||||
|
||||
return ['opener', name, startedAt, length];
|
||||
}
|
||||
/**
|
||||
* Pushes text extracted from the indoc string to the output stack given the
|
||||
* current rawLength value and offset (if rawLength is provided ) or the
|
||||
* indoc.length and offset.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
|
||||
|
||||
function addText() {
|
||||
const length = indoc.length - offset;
|
||||
|
||||
if (0 === length) {
|
||||
return;
|
||||
}
|
||||
|
||||
output.push(indoc.substr(offset, length));
|
||||
}
|
||||
/**
|
||||
* Pushes a child element to the associated parent element's children for the
|
||||
* parent currently active in the stack.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {Frame} frame The Frame containing the child element and it's
|
||||
* token information.
|
||||
*/
|
||||
|
||||
|
||||
function addChild(frame) {
|
||||
const {
|
||||
element,
|
||||
tokenStart,
|
||||
tokenLength,
|
||||
prevOffset,
|
||||
children
|
||||
} = frame;
|
||||
const parent = stack[stack.length - 1];
|
||||
const text = indoc.substr(parent.prevOffset, tokenStart - parent.prevOffset);
|
||||
|
||||
if (text) {
|
||||
parent.children.push(text);
|
||||
}
|
||||
|
||||
parent.children.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children));
|
||||
parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength;
|
||||
}
|
||||
/**
|
||||
* This is called for closing tags. It creates the element currently active in
|
||||
* the stack.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
* @param {number} endOffset Offset at which the closing tag for the element
|
||||
* begins in the string. If this is greater than the
|
||||
* prevOffset attached to the element, then this
|
||||
* helps capture any remaining nested text nodes in
|
||||
* the element.
|
||||
*/
|
||||
|
||||
|
||||
function closeOuterElement(endOffset) {
|
||||
const {
|
||||
element,
|
||||
leadingTextStart,
|
||||
prevOffset,
|
||||
tokenStart,
|
||||
children
|
||||
} = stack.pop();
|
||||
const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset);
|
||||
|
||||
if (text) {
|
||||
children.push(text);
|
||||
}
|
||||
|
||||
if (null !== leadingTextStart) {
|
||||
output.push(indoc.substr(leadingTextStart, tokenStart - leadingTextStart));
|
||||
}
|
||||
|
||||
output.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children));
|
||||
}
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createInterpolateElement);
|
||||
//# sourceMappingURL=create-interpolate-element.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.replace-all.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var call = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-call.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var requireObjectCoercible = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/require-object-coercible.js");
|
||||
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
||||
var isNullOrUndefined = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-null-or-undefined.js");
|
||||
var isRegExp = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-regexp.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var getMethod = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-method.js");
|
||||
var getRegExpFlags = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/regexp-get-flags.js");
|
||||
var getSubstitution = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-substitution.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
var IS_PURE = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-pure.js");
|
||||
|
||||
var REPLACE = wellKnownSymbol('replace');
|
||||
var $TypeError = TypeError;
|
||||
var indexOf = uncurryThis(''.indexOf);
|
||||
var replace = uncurryThis(''.replace);
|
||||
var stringSlice = uncurryThis(''.slice);
|
||||
var max = Math.max;
|
||||
|
||||
var stringIndexOf = function (string, searchValue, fromIndex) {
|
||||
if (fromIndex > string.length) return -1;
|
||||
if (searchValue === '') return fromIndex;
|
||||
return indexOf(string, searchValue, fromIndex);
|
||||
};
|
||||
|
||||
// `String.prototype.replaceAll` method
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.replaceall
|
||||
$({ target: 'String', proto: true }, {
|
||||
replaceAll: function replaceAll(searchValue, replaceValue) {
|
||||
var O = requireObjectCoercible(this);
|
||||
var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;
|
||||
var position = 0;
|
||||
var endOfLastMatch = 0;
|
||||
var result = '';
|
||||
if (!isNullOrUndefined(searchValue)) {
|
||||
IS_REG_EXP = isRegExp(searchValue);
|
||||
if (IS_REG_EXP) {
|
||||
flags = toString(requireObjectCoercible(getRegExpFlags(searchValue)));
|
||||
if (!~indexOf(flags, 'g')) throw new $TypeError('`.replaceAll` does not allow non-global regexes');
|
||||
}
|
||||
replacer = getMethod(searchValue, REPLACE);
|
||||
if (replacer) {
|
||||
return call(replacer, searchValue, O, replaceValue);
|
||||
} else if (IS_PURE && IS_REG_EXP) {
|
||||
return replace(toString(O), searchValue, replaceValue);
|
||||
}
|
||||
}
|
||||
string = toString(O);
|
||||
searchString = toString(searchValue);
|
||||
functionalReplace = isCallable(replaceValue);
|
||||
if (!functionalReplace) replaceValue = toString(replaceValue);
|
||||
searchLength = searchString.length;
|
||||
advanceBy = max(1, searchLength);
|
||||
position = stringIndexOf(string, searchString, 0);
|
||||
while (position !== -1) {
|
||||
replacement = functionalReplace
|
||||
? toString(replaceValue(searchString, position, string))
|
||||
: getSubstitution(searchString, string, position, [], undefined, replaceValue);
|
||||
result += stringSlice(string, endOfLastMatch, position) + replacement;
|
||||
endOfLastMatch = position + searchLength;
|
||||
position = stringIndexOf(string, searchString, position + advanceBy);
|
||||
}
|
||||
if (endOfLastMatch < string.length) {
|
||||
result += stringSlice(string, endOfLastMatch);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/esnext.string.replace-all.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
// TODO: Remove from `core-js@4`
|
||||
__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.replace-all.js");
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,782 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[2974],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var bind = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind-context.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var IndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/indexed-object.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
var arraySpeciesCreate = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-create.js");
|
||||
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
||||
var createMethod = function (TYPE) {
|
||||
var IS_MAP = TYPE === 1;
|
||||
var IS_FILTER = TYPE === 2;
|
||||
var IS_SOME = TYPE === 3;
|
||||
var IS_EVERY = TYPE === 4;
|
||||
var IS_FIND_INDEX = TYPE === 6;
|
||||
var IS_FILTER_REJECT = TYPE === 7;
|
||||
var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
|
||||
return function ($this, callbackfn, that, specificCreate) {
|
||||
var O = toObject($this);
|
||||
var self = IndexedObject(O);
|
||||
var length = lengthOfArrayLike(self);
|
||||
var boundFunction = bind(callbackfn, that);
|
||||
var index = 0;
|
||||
var create = specificCreate || arraySpeciesCreate;
|
||||
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
||||
var value, result;
|
||||
for (;length > index; index++) if (NO_HOLES || index in self) {
|
||||
value = self[index];
|
||||
result = boundFunction(value, index, O);
|
||||
if (TYPE) {
|
||||
if (IS_MAP) target[index] = result; // map
|
||||
else if (result) switch (TYPE) {
|
||||
case 3: return true; // some
|
||||
case 5: return value; // find
|
||||
case 6: return index; // findIndex
|
||||
case 2: push(target, value); // filter
|
||||
} else switch (TYPE) {
|
||||
case 4: return false; // every
|
||||
case 7: push(target, value); // filterReject
|
||||
}
|
||||
}
|
||||
}
|
||||
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `Array.prototype.forEach` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
||||
forEach: createMethod(0),
|
||||
// `Array.prototype.map` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.map
|
||||
map: createMethod(1),
|
||||
// `Array.prototype.filter` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
||||
filter: createMethod(2),
|
||||
// `Array.prototype.some` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.some
|
||||
some: createMethod(3),
|
||||
// `Array.prototype.every` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.every
|
||||
every: createMethod(4),
|
||||
// `Array.prototype.find` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.find
|
||||
find: createMethod(5),
|
||||
// `Array.prototype.findIndex` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
||||
findIndex: createMethod(6),
|
||||
// `Array.prototype.filterReject` method
|
||||
// https://github.com/tc39/proposal-array-filtering
|
||||
filterReject: createMethod(7)
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-slice-simple.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var toAbsoluteIndex = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-absolute-index.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
var createProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property.js");
|
||||
|
||||
var $Array = Array;
|
||||
var max = Math.max;
|
||||
|
||||
module.exports = function (O, start, end) {
|
||||
var length = lengthOfArrayLike(O);
|
||||
var k = toAbsoluteIndex(start, length);
|
||||
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
||||
var result = $Array(max(fin - k, 0));
|
||||
var n = 0;
|
||||
for (; k < fin; k++, n++) createProperty(result, n, O[k]);
|
||||
result.length = n;
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-constructor.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var isArray = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js");
|
||||
var isConstructor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-constructor.js");
|
||||
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
var $Array = Array;
|
||||
|
||||
// a part of `ArraySpeciesCreate` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
||||
module.exports = function (originalArray) {
|
||||
var C;
|
||||
if (isArray(originalArray)) {
|
||||
C = originalArray.constructor;
|
||||
// cross-realm fallback
|
||||
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
||||
else if (isObject(C)) {
|
||||
C = C[SPECIES];
|
||||
if (C === null) C = undefined;
|
||||
}
|
||||
} return C === undefined ? $Array : C;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-create.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var arraySpeciesConstructor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-species-constructor.js");
|
||||
|
||||
// `ArraySpeciesCreate` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
||||
module.exports = function (originalArray, length) {
|
||||
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var toPropertyKey = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-property-key.js");
|
||||
var definePropertyModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-property.js");
|
||||
var createPropertyDescriptor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property-descriptor.js");
|
||||
|
||||
module.exports = function (object, key, value) {
|
||||
var propertyKey = toPropertyKey(key);
|
||||
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
||||
else object[propertyKey] = value;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-json-replacer-function.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var isArray = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js");
|
||||
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
||||
var classof = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/classof-raw.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
module.exports = function (replacer) {
|
||||
if (isCallable(replacer)) return replacer;
|
||||
if (!isArray(replacer)) return;
|
||||
var rawLength = replacer.length;
|
||||
var keys = [];
|
||||
for (var i = 0; i < rawLength; i++) {
|
||||
var element = replacer[i];
|
||||
if (typeof element == 'string') push(keys, element);
|
||||
else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));
|
||||
}
|
||||
var keysLength = keys.length;
|
||||
var root = true;
|
||||
return function (key, value) {
|
||||
if (root) {
|
||||
root = false;
|
||||
return value;
|
||||
}
|
||||
if (isArray(this)) return value;
|
||||
for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-array.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var classof = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/classof-raw.js");
|
||||
|
||||
// `IsArray` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-isarray
|
||||
// eslint-disable-next-line es/no-array-isarray -- safe
|
||||
module.exports = Array.isArray || function isArray(argument) {
|
||||
return classof(argument) === 'Array';
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-names-external.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
/* eslint-disable es/no-object-getownpropertynames -- safe */
|
||||
var classof = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/classof-raw.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var $getOwnPropertyNames = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-names.js").f);
|
||||
var arraySlice = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-slice-simple.js");
|
||||
|
||||
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
||||
? Object.getOwnPropertyNames(window) : [];
|
||||
|
||||
var getWindowNames = function (it) {
|
||||
try {
|
||||
return $getOwnPropertyNames(it);
|
||||
} catch (error) {
|
||||
return arraySlice(windowNames);
|
||||
}
|
||||
};
|
||||
|
||||
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
||||
module.exports.f = function getOwnPropertyNames(it) {
|
||||
return windowNames && classof(it) === 'Window'
|
||||
? getWindowNames(it)
|
||||
: $getOwnPropertyNames(toIndexedObject(it));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/path.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var global = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js");
|
||||
|
||||
module.exports = global;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-define-to-primitive.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var call = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-call.js");
|
||||
var getBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-built-in.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
var defineBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in.js");
|
||||
|
||||
module.exports = function () {
|
||||
var Symbol = getBuiltIn('Symbol');
|
||||
var SymbolPrototype = Symbol && Symbol.prototype;
|
||||
var valueOf = SymbolPrototype && SymbolPrototype.valueOf;
|
||||
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
||||
|
||||
if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) {
|
||||
// `Symbol.prototype[@@toPrimitive]` method
|
||||
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
|
||||
// eslint-disable-next-line no-unused-vars -- required for .length
|
||||
defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) {
|
||||
return call(valueOf, this);
|
||||
}, { arity: 1 });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-registry-detection.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var NATIVE_SYMBOL = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-constructor-detection.js");
|
||||
|
||||
/* eslint-disable es/no-symbol -- safe */
|
||||
module.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol-define.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var path = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/path.js");
|
||||
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
||||
var wrappedWellKnownSymbolModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol-wrapped.js");
|
||||
var defineProperty = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-property.js").f);
|
||||
|
||||
module.exports = function (NAME) {
|
||||
var Symbol = path.Symbol || (path.Symbol = {});
|
||||
if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {
|
||||
value: wrappedWellKnownSymbolModule.f(NAME)
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol-wrapped.js":
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
|
||||
exports.f = wellKnownSymbol;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.json.stringify.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var getBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-built-in.js");
|
||||
var apply = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-apply.js");
|
||||
var call = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-call.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
||||
var isSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-symbol.js");
|
||||
var arraySlice = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-slice.js");
|
||||
var getReplacerFunction = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-json-replacer-function.js");
|
||||
var NATIVE_SYMBOL = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-constructor-detection.js");
|
||||
|
||||
var $String = String;
|
||||
var $stringify = getBuiltIn('JSON', 'stringify');
|
||||
var exec = uncurryThis(/./.exec);
|
||||
var charAt = uncurryThis(''.charAt);
|
||||
var charCodeAt = uncurryThis(''.charCodeAt);
|
||||
var replace = uncurryThis(''.replace);
|
||||
var numberToString = uncurryThis(1.0.toString);
|
||||
|
||||
var tester = /[\uD800-\uDFFF]/g;
|
||||
var low = /^[\uD800-\uDBFF]$/;
|
||||
var hi = /^[\uDC00-\uDFFF]$/;
|
||||
|
||||
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
|
||||
var symbol = getBuiltIn('Symbol')('stringify detection');
|
||||
// MS Edge converts symbol values to JSON as {}
|
||||
return $stringify([symbol]) !== '[null]'
|
||||
// WebKit converts symbol values to JSON as null
|
||||
|| $stringify({ a: symbol }) !== '{}'
|
||||
// V8 throws on boxed symbols
|
||||
|| $stringify(Object(symbol)) !== '{}';
|
||||
});
|
||||
|
||||
// https://github.com/tc39/proposal-well-formed-stringify
|
||||
var ILL_FORMED_UNICODE = fails(function () {
|
||||
return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|
||||
|| $stringify('\uDEAD') !== '"\\udead"';
|
||||
});
|
||||
|
||||
var stringifyWithSymbolsFix = function (it, replacer) {
|
||||
var args = arraySlice(arguments);
|
||||
var $replacer = getReplacerFunction(replacer);
|
||||
if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
|
||||
args[1] = function (key, value) {
|
||||
// some old implementations (like WebKit) could pass numbers as keys
|
||||
if (isCallable($replacer)) value = call($replacer, this, $String(key), value);
|
||||
if (!isSymbol(value)) return value;
|
||||
};
|
||||
return apply($stringify, null, args);
|
||||
};
|
||||
|
||||
var fixIllFormed = function (match, offset, string) {
|
||||
var prev = charAt(string, offset - 1);
|
||||
var next = charAt(string, offset + 1);
|
||||
if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {
|
||||
return '\\u' + numberToString(charCodeAt(match, 0), 16);
|
||||
} return match;
|
||||
};
|
||||
|
||||
if ($stringify) {
|
||||
// `JSON.stringify` method
|
||||
// https://tc39.es/ecma262/#sec-json.stringify
|
||||
$({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
|
||||
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
||||
stringify: function stringify(it, replacer, space) {
|
||||
var args = arraySlice(arguments);
|
||||
var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
|
||||
return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-symbols.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var NATIVE_SYMBOL = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-constructor-detection.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var getOwnPropertySymbolsModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-symbols.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
|
||||
// V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
|
||||
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
|
||||
var FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); });
|
||||
|
||||
// `Object.getOwnPropertySymbols` method
|
||||
// https://tc39.es/ecma262/#sec-object.getownpropertysymbols
|
||||
$({ target: 'Object', stat: true, forced: FORCED }, {
|
||||
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
||||
var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
||||
return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : [];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.constructor.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var global = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js");
|
||||
var call = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-call.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var IS_PURE = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-pure.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var NATIVE_SYMBOL = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-constructor-detection.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
||||
var isPrototypeOf = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-is-prototype-of.js");
|
||||
var anObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/an-object.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var toPropertyKey = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-property-key.js");
|
||||
var $toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var createPropertyDescriptor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property-descriptor.js");
|
||||
var nativeObjectCreate = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-create.js");
|
||||
var objectKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-keys.js");
|
||||
var getOwnPropertyNamesModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-names.js");
|
||||
var getOwnPropertyNamesExternal = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-names-external.js");
|
||||
var getOwnPropertySymbolsModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-symbols.js");
|
||||
var getOwnPropertyDescriptorModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-descriptor.js");
|
||||
var definePropertyModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-property.js");
|
||||
var definePropertiesModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-properties.js");
|
||||
var propertyIsEnumerableModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-property-is-enumerable.js");
|
||||
var defineBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in.js");
|
||||
var defineBuiltInAccessor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in-accessor.js");
|
||||
var shared = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/shared.js");
|
||||
var sharedKey = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/shared-key.js");
|
||||
var hiddenKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/hidden-keys.js");
|
||||
var uid = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/uid.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
var wrappedWellKnownSymbolModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol-wrapped.js");
|
||||
var defineWellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol-define.js");
|
||||
var defineSymbolToPrimitive = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-define-to-primitive.js");
|
||||
var setToStringTag = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/set-to-string-tag.js");
|
||||
var InternalStateModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/internal-state.js");
|
||||
var $forEach = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").forEach);
|
||||
|
||||
var HIDDEN = sharedKey('hidden');
|
||||
var SYMBOL = 'Symbol';
|
||||
var PROTOTYPE = 'prototype';
|
||||
|
||||
var setInternalState = InternalStateModule.set;
|
||||
var getInternalState = InternalStateModule.getterFor(SYMBOL);
|
||||
|
||||
var ObjectPrototype = Object[PROTOTYPE];
|
||||
var $Symbol = global.Symbol;
|
||||
var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];
|
||||
var RangeError = global.RangeError;
|
||||
var TypeError = global.TypeError;
|
||||
var QObject = global.QObject;
|
||||
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
||||
var nativeDefineProperty = definePropertyModule.f;
|
||||
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
|
||||
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
var AllSymbols = shared('symbols');
|
||||
var ObjectPrototypeSymbols = shared('op-symbols');
|
||||
var WellKnownSymbolsStore = shared('wks');
|
||||
|
||||
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
||||
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
||||
|
||||
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
||||
var fallbackDefineProperty = function (O, P, Attributes) {
|
||||
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
|
||||
if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
|
||||
nativeDefineProperty(O, P, Attributes);
|
||||
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
|
||||
nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
|
||||
}
|
||||
};
|
||||
|
||||
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
|
||||
return nativeObjectCreate(nativeDefineProperty({}, 'a', {
|
||||
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
|
||||
})).a !== 7;
|
||||
}) ? fallbackDefineProperty : nativeDefineProperty;
|
||||
|
||||
var wrap = function (tag, description) {
|
||||
var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);
|
||||
setInternalState(symbol, {
|
||||
type: SYMBOL,
|
||||
tag: tag,
|
||||
description: description
|
||||
});
|
||||
if (!DESCRIPTORS) symbol.description = description;
|
||||
return symbol;
|
||||
};
|
||||
|
||||
var $defineProperty = function defineProperty(O, P, Attributes) {
|
||||
if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
|
||||
anObject(O);
|
||||
var key = toPropertyKey(P);
|
||||
anObject(Attributes);
|
||||
if (hasOwn(AllSymbols, key)) {
|
||||
if (!Attributes.enumerable) {
|
||||
if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
|
||||
O[HIDDEN][key] = true;
|
||||
} else {
|
||||
if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
|
||||
Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
|
||||
} return setSymbolDescriptor(O, key, Attributes);
|
||||
} return nativeDefineProperty(O, key, Attributes);
|
||||
};
|
||||
|
||||
var $defineProperties = function defineProperties(O, Properties) {
|
||||
anObject(O);
|
||||
var properties = toIndexedObject(Properties);
|
||||
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
||||
$forEach(keys, function (key) {
|
||||
if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);
|
||||
});
|
||||
return O;
|
||||
};
|
||||
|
||||
var $create = function create(O, Properties) {
|
||||
return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
|
||||
};
|
||||
|
||||
var $propertyIsEnumerable = function propertyIsEnumerable(V) {
|
||||
var P = toPropertyKey(V);
|
||||
var enumerable = call(nativePropertyIsEnumerable, this, P);
|
||||
if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;
|
||||
return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]
|
||||
? enumerable : true;
|
||||
};
|
||||
|
||||
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
|
||||
var it = toIndexedObject(O);
|
||||
var key = toPropertyKey(P);
|
||||
if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;
|
||||
var descriptor = nativeGetOwnPropertyDescriptor(it, key);
|
||||
if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {
|
||||
descriptor.enumerable = true;
|
||||
}
|
||||
return descriptor;
|
||||
};
|
||||
|
||||
var $getOwnPropertyNames = function getOwnPropertyNames(O) {
|
||||
var names = nativeGetOwnPropertyNames(toIndexedObject(O));
|
||||
var result = [];
|
||||
$forEach(names, function (key) {
|
||||
if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
var $getOwnPropertySymbols = function (O) {
|
||||
var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
|
||||
var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
|
||||
var result = [];
|
||||
$forEach(names, function (key) {
|
||||
if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {
|
||||
push(result, AllSymbols[key]);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
// `Symbol` constructor
|
||||
// https://tc39.es/ecma262/#sec-symbol-constructor
|
||||
if (!NATIVE_SYMBOL) {
|
||||
$Symbol = function Symbol() {
|
||||
if (isPrototypeOf(SymbolPrototype, this)) throw new TypeError('Symbol is not a constructor');
|
||||
var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
|
||||
var tag = uid(description);
|
||||
var setter = function (value) {
|
||||
var $this = this === undefined ? global : this;
|
||||
if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
|
||||
if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false;
|
||||
var descriptor = createPropertyDescriptor(1, value);
|
||||
try {
|
||||
setSymbolDescriptor($this, tag, descriptor);
|
||||
} catch (error) {
|
||||
if (!(error instanceof RangeError)) throw error;
|
||||
fallbackDefineProperty($this, tag, descriptor);
|
||||
}
|
||||
};
|
||||
if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
||||
return wrap(tag, description);
|
||||
};
|
||||
|
||||
SymbolPrototype = $Symbol[PROTOTYPE];
|
||||
|
||||
defineBuiltIn(SymbolPrototype, 'toString', function toString() {
|
||||
return getInternalState(this).tag;
|
||||
});
|
||||
|
||||
defineBuiltIn($Symbol, 'withoutSetter', function (description) {
|
||||
return wrap(uid(description), description);
|
||||
});
|
||||
|
||||
propertyIsEnumerableModule.f = $propertyIsEnumerable;
|
||||
definePropertyModule.f = $defineProperty;
|
||||
definePropertiesModule.f = $defineProperties;
|
||||
getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
|
||||
getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
|
||||
getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
|
||||
|
||||
wrappedWellKnownSymbolModule.f = function (name) {
|
||||
return wrap(wellKnownSymbol(name), name);
|
||||
};
|
||||
|
||||
if (DESCRIPTORS) {
|
||||
// https://github.com/tc39/proposal-Symbol-description
|
||||
defineBuiltInAccessor(SymbolPrototype, 'description', {
|
||||
configurable: true,
|
||||
get: function description() {
|
||||
return getInternalState(this).description;
|
||||
}
|
||||
});
|
||||
if (!IS_PURE) {
|
||||
defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
|
||||
Symbol: $Symbol
|
||||
});
|
||||
|
||||
$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
|
||||
defineWellKnownSymbol(name);
|
||||
});
|
||||
|
||||
$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
|
||||
useSetter: function () { USE_SETTER = true; },
|
||||
useSimple: function () { USE_SETTER = false; }
|
||||
});
|
||||
|
||||
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
|
||||
// `Object.create` method
|
||||
// https://tc39.es/ecma262/#sec-object.create
|
||||
create: $create,
|
||||
// `Object.defineProperty` method
|
||||
// https://tc39.es/ecma262/#sec-object.defineproperty
|
||||
defineProperty: $defineProperty,
|
||||
// `Object.defineProperties` method
|
||||
// https://tc39.es/ecma262/#sec-object.defineproperties
|
||||
defineProperties: $defineProperties,
|
||||
// `Object.getOwnPropertyDescriptor` method
|
||||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
||||
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
||||
});
|
||||
|
||||
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
|
||||
// `Object.getOwnPropertyNames` method
|
||||
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
||||
getOwnPropertyNames: $getOwnPropertyNames
|
||||
});
|
||||
|
||||
// `Symbol.prototype[@@toPrimitive]` method
|
||||
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
|
||||
defineSymbolToPrimitive();
|
||||
|
||||
// `Symbol.prototype[@@toStringTag]` property
|
||||
// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
|
||||
setToStringTag($Symbol, SYMBOL);
|
||||
|
||||
hiddenKeys[HIDDEN] = true;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.for.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var getBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-built-in.js");
|
||||
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var shared = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/shared.js");
|
||||
var NATIVE_SYMBOL_REGISTRY = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-registry-detection.js");
|
||||
|
||||
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
||||
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
||||
|
||||
// `Symbol.for` method
|
||||
// https://tc39.es/ecma262/#sec-symbol.for
|
||||
$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
|
||||
'for': function (key) {
|
||||
var string = toString(key);
|
||||
if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
||||
var symbol = getBuiltIn('Symbol')(string);
|
||||
StringToSymbolRegistry[string] = symbol;
|
||||
SymbolToStringRegistry[symbol] = string;
|
||||
return symbol;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
// TODO: Remove this module from `core-js@4` since it's split to modules listed below
|
||||
__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.constructor.js");
|
||||
__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.for.js");
|
||||
__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.key-for.js");
|
||||
__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.json.stringify.js");
|
||||
__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-symbols.js");
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.key-for.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
||||
var isSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-symbol.js");
|
||||
var tryToString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/try-to-string.js");
|
||||
var shared = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/shared.js");
|
||||
var NATIVE_SYMBOL_REGISTRY = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/symbol-registry-detection.js");
|
||||
|
||||
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
||||
|
||||
// `Symbol.keyFor` method
|
||||
// https://tc39.es/ecma262/#sec-symbol.keyfor
|
||||
$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
|
||||
keyFor: function keyFor(sym) {
|
||||
if (!isSymbol(sym)) throw new TypeError(tryToString(sym) + ' is not a symbol');
|
||||
if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,580 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[3],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex-item/component.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var _ui_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/context-connect.js");
|
||||
/* harmony import */ var _view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/view/component.js");
|
||||
/* harmony import */ var _hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex-item/hook.js");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FlexItemProps, 'div'>} props
|
||||
* @param {import('react').ForwardedRef<any>} forwardedRef
|
||||
*/
|
||||
|
||||
function FlexItem(props, forwardedRef) {
|
||||
const flexItemProps = (0,_hook__WEBPACK_IMPORTED_MODULE_0__/* .useFlexItem */ .K)(props);
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_view__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({}, flexItemProps, {
|
||||
ref: forwardedRef
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* `FlexItem` is a primitive layout component that aligns content within layout containers like `Flex`.
|
||||
*
|
||||
* @example
|
||||
* ```jsx
|
||||
* <Flex>
|
||||
* <FlexItem>...</FlexItem>
|
||||
* </Flex>
|
||||
* ```
|
||||
*/
|
||||
|
||||
|
||||
const ConnectedFlexItem = (0,_ui_context__WEBPACK_IMPORTED_MODULE_4__/* .contextConnect */ .KZ)(FlexItem, 'FlexItem');
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectedFlexItem);
|
||||
//# sourceMappingURL=component.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex-item/hook.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ K: () => (/* binding */ useFlexItem)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");
|
||||
/* harmony import */ var _ui_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/use-context-system.js");
|
||||
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/context.js");
|
||||
/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/styles.js");
|
||||
/* harmony import */ var _utils_hooks_use_cx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js");
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FlexItemProps, 'div'>} props
|
||||
*/
|
||||
|
||||
function useFlexItem(props) {
|
||||
const {
|
||||
className,
|
||||
display: displayProp,
|
||||
isBlock = false,
|
||||
...otherProps
|
||||
} = (0,_ui_context__WEBPACK_IMPORTED_MODULE_0__/* .useContextSystem */ .A)(props, 'FlexItem');
|
||||
const sx = {};
|
||||
const contextDisplay = (0,_context__WEBPACK_IMPORTED_MODULE_1__/* .useFlexContext */ .a)().flexItemDisplay;
|
||||
sx.Base = /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__/* .css */ .AH)({
|
||||
display: displayProp || contextDisplay
|
||||
}, true ? "" : 0, true ? "" : 0);
|
||||
const cx = (0,_utils_hooks_use_cx__WEBPACK_IMPORTED_MODULE_3__/* .useCx */ .l)();
|
||||
const classes = cx(_styles__WEBPACK_IMPORTED_MODULE_4__/* .Item */ .q7, sx.Base, isBlock && _styles__WEBPACK_IMPORTED_MODULE_4__/* .block */ .om, className);
|
||||
return { ...otherProps,
|
||||
className: classes
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=hook.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/input-control/input-base.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ input_base)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: InputBase
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
||||
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js
|
||||
var use_instance_id = __webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/input-control/styles/input-control-styles.js
|
||||
var input_control_styles = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/input-control/styles/input-control-styles.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/input-control/backdrop.js
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function Backdrop(_ref) {
|
||||
let {
|
||||
disabled = false,
|
||||
isFocused = false
|
||||
} = _ref;
|
||||
return (0,react.createElement)(input_control_styles/* BackdropUI */.Hr, {
|
||||
"aria-hidden": "true",
|
||||
className: "components-input-control__backdrop",
|
||||
disabled: disabled,
|
||||
isFocused: isFocused
|
||||
});
|
||||
}
|
||||
|
||||
const MemoizedBackdrop = (0,react.memo)(Backdrop);
|
||||
/* harmony default export */ const backdrop = (MemoizedBackdrop);
|
||||
//# sourceMappingURL=backdrop.js.map
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/visually-hidden/component.js + 1 modules
|
||||
var component = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/visually-hidden/component.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/input-control/label.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
function Label(_ref) {
|
||||
let {
|
||||
children,
|
||||
hideLabelFromVision,
|
||||
htmlFor,
|
||||
...props
|
||||
} = _ref;
|
||||
if (!children) return null;
|
||||
|
||||
if (hideLabelFromVision) {
|
||||
return (0,react.createElement)(component/* default */.A, {
|
||||
as: "label",
|
||||
htmlFor: htmlFor
|
||||
}, children);
|
||||
}
|
||||
|
||||
return (0,react.createElement)(input_control_styles/* Label */.JU, (0,esm_extends/* default */.A)({
|
||||
htmlFor: htmlFor
|
||||
}, props), children);
|
||||
}
|
||||
//# sourceMappingURL=label.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/input-control/input-base.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function useUniqueId(idProp) {
|
||||
const instanceId = (0,use_instance_id/* default */.A)(InputBase);
|
||||
const id = `input-base-control-${instanceId}`;
|
||||
return idProp || id;
|
||||
} // Adapter to map props for the new ui/flex compopnent.
|
||||
|
||||
|
||||
function getUIFlexProps(labelPosition) {
|
||||
const props = {};
|
||||
|
||||
switch (labelPosition) {
|
||||
case 'top':
|
||||
props.direction = 'column';
|
||||
props.gap = 0;
|
||||
break;
|
||||
|
||||
case 'bottom':
|
||||
props.direction = 'column-reverse';
|
||||
props.gap = 0;
|
||||
break;
|
||||
|
||||
case 'edge':
|
||||
props.justify = 'space-between';
|
||||
break;
|
||||
}
|
||||
|
||||
return props;
|
||||
}
|
||||
|
||||
function InputBase(_ref, ref) {
|
||||
let {
|
||||
__unstableInputWidth,
|
||||
children,
|
||||
className,
|
||||
disabled = false,
|
||||
hideLabelFromVision = false,
|
||||
labelPosition,
|
||||
id: idProp,
|
||||
isFocused = false,
|
||||
label,
|
||||
prefix,
|
||||
size = 'default',
|
||||
suffix,
|
||||
...props
|
||||
} = _ref;
|
||||
const id = useUniqueId(idProp);
|
||||
const hideLabel = hideLabelFromVision || !label;
|
||||
return (// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.
|
||||
(0,react.createElement)(input_control_styles/* Root */.bL, (0,esm_extends/* default */.A)({}, props, getUIFlexProps(labelPosition), {
|
||||
className: className,
|
||||
isFocused: isFocused,
|
||||
labelPosition: labelPosition,
|
||||
ref: ref
|
||||
}), (0,react.createElement)(input_control_styles/* LabelWrapper */.cR, null, (0,react.createElement)(Label, {
|
||||
className: "components-input-control__label",
|
||||
hideLabelFromVision: hideLabelFromVision,
|
||||
labelPosition: labelPosition,
|
||||
htmlFor: id,
|
||||
size: size
|
||||
}, label)), (0,react.createElement)(input_control_styles/* Container */.mc, {
|
||||
__unstableInputWidth: __unstableInputWidth,
|
||||
className: "components-input-control__container",
|
||||
disabled: disabled,
|
||||
hideLabel: hideLabel,
|
||||
labelPosition: labelPosition
|
||||
}, prefix && (0,react.createElement)(input_control_styles/* Prefix */.b3, {
|
||||
className: "components-input-control__prefix"
|
||||
}, prefix), children, suffix && (0,react.createElement)(input_control_styles/* Suffix */.sZ, {
|
||||
className: "components-input-control__suffix"
|
||||
}, suffix), (0,react.createElement)(backdrop, {
|
||||
disabled: disabled,
|
||||
isFocused: isFocused
|
||||
})))
|
||||
);
|
||||
}
|
||||
/* harmony default export */ const input_base = ((0,react.forwardRef)(InputBase));
|
||||
//# sourceMappingURL=input-base.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/input-control/styles/input-control-styles.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ Hr: () => (/* binding */ BackdropUI),
|
||||
/* harmony export */ JU: () => (/* binding */ Label),
|
||||
/* harmony export */ b3: () => (/* binding */ Prefix),
|
||||
/* harmony export */ bL: () => (/* binding */ Root),
|
||||
/* harmony export */ cR: () => (/* binding */ LabelWrapper),
|
||||
/* harmony export */ mc: () => (/* binding */ Container),
|
||||
/* harmony export */ pd: () => (/* binding */ Input),
|
||||
/* harmony export */ sZ: () => (/* binding */ Suffix)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
/* harmony import */ var _emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js");
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");
|
||||
/* harmony import */ var _flex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex/component.js");
|
||||
/* harmony import */ var _flex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex-item/component.js");
|
||||
/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/text/component.js");
|
||||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js");
|
||||
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/rtl.js");
|
||||
|
||||
|
||||
|
||||
|
||||
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _ref6 = true ? {
|
||||
name: "1739oy8",
|
||||
styles: "z-index:1"
|
||||
} : 0;
|
||||
|
||||
const rootFocusedStyles = _ref7 => {
|
||||
let {
|
||||
isFocused
|
||||
} = _ref7;
|
||||
if (!isFocused) return '';
|
||||
return _ref6;
|
||||
};
|
||||
|
||||
var _ref3 = true ? {
|
||||
name: "2o6p8u",
|
||||
styles: "justify-content:space-between"
|
||||
} : 0;
|
||||
|
||||
var _ref4 = true ? {
|
||||
name: "14qk3ip",
|
||||
styles: "align-items:flex-start;flex-direction:column-reverse"
|
||||
} : 0;
|
||||
|
||||
var _ref5 = true ? {
|
||||
name: "hbng6e",
|
||||
styles: "align-items:flex-start;flex-direction:column"
|
||||
} : 0;
|
||||
|
||||
const rootLabelPositionStyles = _ref8 => {
|
||||
let {
|
||||
labelPosition
|
||||
} = _ref8;
|
||||
|
||||
switch (labelPosition) {
|
||||
case 'top':
|
||||
return _ref5;
|
||||
|
||||
case 'bottom':
|
||||
return _ref4;
|
||||
|
||||
case 'edge':
|
||||
return _ref3;
|
||||
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
const Root = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(_flex__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, true ? {
|
||||
target: "em5sgkm7"
|
||||
} : 0)("position:relative;border-radius:2px;padding-top:0;", rootFocusedStyles, " ", rootLabelPositionStyles, ";" + ( true ? "" : 0));
|
||||
|
||||
const containerDisabledStyles = _ref9 => {
|
||||
let {
|
||||
disabled
|
||||
} = _ref9;
|
||||
const backgroundColor = disabled ? _utils__WEBPACK_IMPORTED_MODULE_2__/* .COLORS */ .lm.ui.backgroundDisabled : _utils__WEBPACK_IMPORTED_MODULE_2__/* .COLORS */ .lm.ui.background;
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)({
|
||||
backgroundColor
|
||||
}, true ? "" : 0, true ? "" : 0);
|
||||
}; // Normalizes the margins from the <Flex /> (components/ui/flex/) container.
|
||||
|
||||
|
||||
var _ref2 = true ? {
|
||||
name: "wyxldh",
|
||||
styles: "margin:0 !important"
|
||||
} : 0;
|
||||
|
||||
const containerMarginStyles = _ref10 => {
|
||||
let {
|
||||
hideLabel
|
||||
} = _ref10;
|
||||
return hideLabel ? _ref2 : null;
|
||||
};
|
||||
|
||||
var _ref = true ? {
|
||||
name: "1d3w5wq",
|
||||
styles: "width:100%"
|
||||
} : 0;
|
||||
|
||||
const containerWidthStyles = _ref11 => {
|
||||
let {
|
||||
__unstableInputWidth,
|
||||
labelPosition
|
||||
} = _ref11;
|
||||
if (!__unstableInputWidth) return _ref;
|
||||
if (labelPosition === 'side') return '';
|
||||
|
||||
if (labelPosition === 'edge') {
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)({
|
||||
flex: `0 0 ${__unstableInputWidth}`
|
||||
}, true ? "" : 0, true ? "" : 0);
|
||||
}
|
||||
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)({
|
||||
width: __unstableInputWidth
|
||||
}, true ? "" : 0, true ? "" : 0);
|
||||
};
|
||||
|
||||
const Container = (0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)("div", true ? {
|
||||
target: "em5sgkm6"
|
||||
} : 0)("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;", containerDisabledStyles, " ", containerMarginStyles, " ", containerWidthStyles, ";" + ( true ? "" : 0));
|
||||
|
||||
const disabledStyles = _ref12 => {
|
||||
let {
|
||||
disabled
|
||||
} = _ref12;
|
||||
if (!disabled) return '';
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)({
|
||||
color: _utils__WEBPACK_IMPORTED_MODULE_2__/* .COLORS */ .lm.ui.textDisabled
|
||||
}, true ? "" : 0, true ? "" : 0);
|
||||
};
|
||||
|
||||
const fontSizeStyles = _ref13 => {
|
||||
let {
|
||||
inputSize: size
|
||||
} = _ref13;
|
||||
const sizes = {
|
||||
default: '13px',
|
||||
small: '11px',
|
||||
'__unstable-large': '13px'
|
||||
};
|
||||
const fontSize = sizes[size] || sizes.default;
|
||||
const fontSizeMobile = '16px';
|
||||
if (!fontSize) return '';
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)("font-size:", fontSizeMobile, ";@media ( min-width: 600px ){font-size:", fontSize, ";}" + ( true ? "" : 0), true ? "" : 0);
|
||||
};
|
||||
|
||||
const sizeStyles = _ref14 => {
|
||||
let {
|
||||
inputSize: size
|
||||
} = _ref14;
|
||||
const sizes = {
|
||||
default: {
|
||||
height: 30,
|
||||
lineHeight: 1,
|
||||
minHeight: 30,
|
||||
paddingLeft: 8,
|
||||
paddingRight: 8
|
||||
},
|
||||
small: {
|
||||
height: 24,
|
||||
lineHeight: 1,
|
||||
minHeight: 24,
|
||||
paddingLeft: 8,
|
||||
paddingRight: 8
|
||||
},
|
||||
'__unstable-large': {
|
||||
height: 40,
|
||||
lineHeight: 1,
|
||||
minHeight: 40,
|
||||
paddingLeft: 16,
|
||||
paddingRight: 16
|
||||
}
|
||||
};
|
||||
const style = sizes[size] || sizes.default;
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)(style, true ? "" : 0, true ? "" : 0);
|
||||
};
|
||||
|
||||
const dragStyles = _ref15 => {
|
||||
let {
|
||||
isDragging,
|
||||
dragCursor
|
||||
} = _ref15;
|
||||
let defaultArrowStyles;
|
||||
let activeDragCursorStyles;
|
||||
|
||||
if (isDragging) {
|
||||
defaultArrowStyles = /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)("cursor:", dragCursor, ";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}" + ( true ? "" : 0), true ? "" : 0);
|
||||
}
|
||||
|
||||
if (isDragging && dragCursor) {
|
||||
activeDragCursorStyles = /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)("&:active{cursor:", dragCursor, ";}" + ( true ? "" : 0), true ? "" : 0);
|
||||
}
|
||||
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)(defaultArrowStyles, " ", activeDragCursorStyles, ";" + ( true ? "" : 0), true ? "" : 0);
|
||||
}; // TODO: Resolve need to use &&& to increase specificity
|
||||
// https://github.com/WordPress/gutenberg/issues/18483
|
||||
|
||||
|
||||
const Input = (0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)("input", true ? {
|
||||
target: "em5sgkm5"
|
||||
} : 0)("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:", _utils__WEBPACK_IMPORTED_MODULE_2__/* .COLORS */ .lm.black, ";display:block;font-family:inherit;margin:0;outline:none;width:100%;", dragStyles, " ", disabledStyles, " ", fontSizeStyles, " ", sizeStyles, " &::-webkit-input-placeholder{line-height:normal;}}" + ( true ? "" : 0));
|
||||
|
||||
const labelMargin = _ref16 => {
|
||||
let {
|
||||
labelPosition
|
||||
} = _ref16;
|
||||
let marginBottom = 8;
|
||||
|
||||
if (labelPosition === 'edge' || labelPosition === 'side') {
|
||||
marginBottom = 0;
|
||||
}
|
||||
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)({
|
||||
marginTop: 0,
|
||||
marginRight: 0,
|
||||
marginBottom,
|
||||
marginLeft: 0
|
||||
}, true ? "" : 0, true ? "" : 0);
|
||||
};
|
||||
|
||||
const BaseLabel = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(_text__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A, true ? {
|
||||
target: "em5sgkm4"
|
||||
} : 0)("&&&{box-sizing:border-box;color:currentColor;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;", labelMargin, " overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}" + ( true ? "" : 0));
|
||||
|
||||
const Label = props => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.createElement)(BaseLabel, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)({}, props, {
|
||||
as: "label"
|
||||
}));
|
||||
const LabelWrapper = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(_flex__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, true ? {
|
||||
target: "em5sgkm3"
|
||||
} : 0)( true ? {
|
||||
name: "1b6uupn",
|
||||
styles: "max-width:calc( 100% - 10px )"
|
||||
} : 0);
|
||||
|
||||
const backdropFocusedStyles = _ref17 => {
|
||||
let {
|
||||
disabled,
|
||||
isFocused
|
||||
} = _ref17;
|
||||
let borderColor = isFocused ? _utils__WEBPACK_IMPORTED_MODULE_2__/* .COLORS */ .lm.ui.borderFocus : _utils__WEBPACK_IMPORTED_MODULE_2__/* .COLORS */ .lm.ui.border;
|
||||
let boxShadow;
|
||||
|
||||
if (isFocused) {
|
||||
boxShadow = `0 0 0 1px ${_utils__WEBPACK_IMPORTED_MODULE_2__/* .COLORS */ .lm.ui.borderFocus} inset`;
|
||||
}
|
||||
|
||||
if (disabled) {
|
||||
borderColor = _utils__WEBPACK_IMPORTED_MODULE_2__/* .COLORS */ .lm.ui.borderDisabled;
|
||||
}
|
||||
|
||||
return /*#__PURE__*/(0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__/* .css */ .AH)({
|
||||
boxShadow,
|
||||
borderColor,
|
||||
borderStyle: 'solid',
|
||||
borderWidth: 1
|
||||
}, true ? "" : 0, true ? "" : 0);
|
||||
};
|
||||
|
||||
const BackdropUI = (0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)("div", true ? {
|
||||
target: "em5sgkm2"
|
||||
} : 0)("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;", backdropFocusedStyles, " ", (0,_utils__WEBPACK_IMPORTED_MODULE_8__/* .rtl */ .h)({
|
||||
paddingLeft: 2
|
||||
}), ";}" + ( true ? "" : 0));
|
||||
const Prefix = (0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)("span", true ? {
|
||||
target: "em5sgkm1"
|
||||
} : 0)( true ? {
|
||||
name: "pvvbxf",
|
||||
styles: "box-sizing:border-box;display:block"
|
||||
} : 0);
|
||||
const Suffix = (0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)("span", true ? {
|
||||
target: "em5sgkm0"
|
||||
} : 0)( true ? {
|
||||
name: "jgf79h",
|
||||
styles: "align-items:center;align-self:stretch;box-sizing:border-box;display:flex"
|
||||
} : 0);
|
||||
//# sourceMappingURL=input-control-styles.js.map
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,797 @@
|
|||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[3041],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _defineProperty)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(key);
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _extends)
|
||||
/* harmony export */ });
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : 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;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ _toPropertyKey)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js
|
||||
var esm_typeof = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
||||
|
||||
function _toPrimitive(input, hint) {
|
||||
if ((0,esm_typeof/* default */.A)(input) !== "object" || input === null) return input;
|
||||
var prim = input[Symbol.toPrimitive];
|
||||
if (prim !== undefined) {
|
||||
var res = prim.call(input, hint || "default");
|
||||
if ((0,esm_typeof/* default */.A)(res) !== "object") return res;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
return (hint === "string" ? String : Number)(input);
|
||||
}
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
||||
|
||||
|
||||
function _toPropertyKey(arg) {
|
||||
var key = _toPrimitive(arg, "string");
|
||||
return (0,esm_typeof/* default */.A)(key) === "symbol" ? key : String(key);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ _typeof)
|
||||
/* harmony export */ });
|
||||
function _typeof(o) {
|
||||
"@babel/helpers - typeof";
|
||||
|
||||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
||||
return typeof o;
|
||||
} : function (o) {
|
||||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
||||
}, _typeof(o);
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/draggable/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (/* binding */ Draggable)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js");
|
||||
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
const dragImageClass = 'components-draggable__invisible-drag-image';
|
||||
const cloneWrapperClass = 'components-draggable__clone';
|
||||
const clonePadding = 0;
|
||||
const bodyClass = 'is-dragging-components-draggable';
|
||||
/**
|
||||
* @typedef RenderProp
|
||||
* @property {(event: import('react').DragEvent) => void} onDraggableStart `onDragStart` handler.
|
||||
* @property {(event: import('react').DragEvent) => void} onDraggableEnd `onDragEnd` handler.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Props
|
||||
* @property {(props: RenderProp) => JSX.Element | null} children Children.
|
||||
* @property {(event: import('react').DragEvent) => void} [onDragStart] Callback when dragging starts.
|
||||
* @property {(event: import('react').DragEvent) => void} [onDragOver] Callback when dragging happens over the document.
|
||||
* @property {(event: import('react').DragEvent) => void} [onDragEnd] Callback when dragging ends.
|
||||
* @property {string} [cloneClassname] Classname for the cloned element.
|
||||
* @property {string} [elementId] ID for the element.
|
||||
* @property {any} [transferData] Transfer data for the drag event.
|
||||
* @property {string} [__experimentalTransferDataType] The transfer data type to set.
|
||||
* @property {import('react').ReactNode} __experimentalDragComponent Component to show when dragging.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Props} props
|
||||
* @return {JSX.Element} A draggable component.
|
||||
*/
|
||||
|
||||
function Draggable(_ref) {
|
||||
let {
|
||||
children,
|
||||
onDragStart,
|
||||
onDragOver,
|
||||
onDragEnd,
|
||||
cloneClassname,
|
||||
elementId,
|
||||
transferData,
|
||||
__experimentalTransferDataType: transferDataType = 'text',
|
||||
__experimentalDragComponent: dragComponent
|
||||
} = _ref;
|
||||
|
||||
/** @type {import('react').MutableRefObject<HTMLDivElement | null>} */
|
||||
const dragComponentRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
||||
const cleanup = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(() => {});
|
||||
/**
|
||||
* Removes the element clone, resets cursor, and removes drag listener.
|
||||
*
|
||||
* @param {import('react').DragEvent} event The non-custom DragEvent.
|
||||
*/
|
||||
|
||||
function end(event) {
|
||||
event.preventDefault();
|
||||
cleanup.current();
|
||||
|
||||
if (onDragEnd) {
|
||||
onDragEnd(event);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This method does a couple of things:
|
||||
*
|
||||
* - Clones the current element and spawns clone over original element.
|
||||
* - Adds a fake temporary drag image to avoid browser defaults.
|
||||
* - Sets transfer data.
|
||||
* - Adds dragover listener.
|
||||
*
|
||||
* @param {import('react').DragEvent} event The non-custom DragEvent.
|
||||
*/
|
||||
|
||||
|
||||
function start(event) {
|
||||
// @ts-ignore We know that ownerDocument does exist on an Element
|
||||
const {
|
||||
ownerDocument
|
||||
} = event.target;
|
||||
event.dataTransfer.setData(transferDataType, JSON.stringify(transferData));
|
||||
const cloneWrapper = ownerDocument.createElement('div'); // Reset position to 0,0. Natural stacking order will position this lower, even with a transform otherwise.
|
||||
|
||||
cloneWrapper.style.top = 0;
|
||||
cloneWrapper.style.left = 0;
|
||||
const dragImage = ownerDocument.createElement('div'); // Set a fake drag image to avoid browser defaults. Remove from DOM
|
||||
// right after. event.dataTransfer.setDragImage is not supported yet in
|
||||
// IE, we need to check for its existence first.
|
||||
|
||||
if ('function' === typeof event.dataTransfer.setDragImage) {
|
||||
dragImage.classList.add(dragImageClass);
|
||||
ownerDocument.body.appendChild(dragImage);
|
||||
event.dataTransfer.setDragImage(dragImage, 0, 0);
|
||||
}
|
||||
|
||||
cloneWrapper.classList.add(cloneWrapperClass);
|
||||
|
||||
if (cloneClassname) {
|
||||
cloneWrapper.classList.add(cloneClassname);
|
||||
}
|
||||
|
||||
let x = 0;
|
||||
let y = 0; // If a dragComponent is defined, the following logic will clone the
|
||||
// HTML node and inject it into the cloneWrapper.
|
||||
|
||||
if (dragComponentRef.current) {
|
||||
// Position dragComponent at the same position as the cursor.
|
||||
x = event.clientX;
|
||||
y = event.clientY;
|
||||
cloneWrapper.style.transform = `translate( ${x}px, ${y}px )`;
|
||||
const clonedDragComponent = ownerDocument.createElement('div');
|
||||
clonedDragComponent.innerHTML = dragComponentRef.current.innerHTML;
|
||||
cloneWrapper.appendChild(clonedDragComponent); // Inject the cloneWrapper into the DOM.
|
||||
|
||||
ownerDocument.body.appendChild(cloneWrapper);
|
||||
} else {
|
||||
const element = ownerDocument.getElementById(elementId); // Prepare element clone and append to element wrapper.
|
||||
|
||||
const elementRect = element.getBoundingClientRect();
|
||||
const elementWrapper = element.parentNode;
|
||||
const elementTopOffset = parseInt(elementRect.top, 10);
|
||||
const elementLeftOffset = parseInt(elementRect.left, 10);
|
||||
cloneWrapper.style.width = `${elementRect.width + clonePadding * 2}px`;
|
||||
const clone = element.cloneNode(true);
|
||||
clone.id = `clone-${elementId}`; // Position clone right over the original element (20px padding).
|
||||
|
||||
x = elementLeftOffset - clonePadding;
|
||||
y = elementTopOffset - clonePadding;
|
||||
cloneWrapper.style.transform = `translate( ${x}px, ${y}px )`; // Hack: Remove iFrames as it's causing the embeds drag clone to freeze.
|
||||
|
||||
Array.from(clone.querySelectorAll('iframe')).forEach(child => child.parentNode.removeChild(child));
|
||||
cloneWrapper.appendChild(clone); // Inject the cloneWrapper into the DOM.
|
||||
|
||||
elementWrapper.appendChild(cloneWrapper);
|
||||
} // Mark the current cursor coordinates.
|
||||
|
||||
|
||||
let cursorLeft = event.clientX;
|
||||
let cursorTop = event.clientY;
|
||||
/**
|
||||
* @param {import('react').DragEvent<Element>} e
|
||||
*/
|
||||
|
||||
function over(e) {
|
||||
// Skip doing any work if mouse has not moved.
|
||||
if (cursorLeft === e.clientX && cursorTop === e.clientY) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nextX = x + e.clientX - cursorLeft;
|
||||
const nextY = y + e.clientY - cursorTop;
|
||||
cloneWrapper.style.transform = `translate( ${nextX}px, ${nextY}px )`;
|
||||
cursorLeft = e.clientX;
|
||||
cursorTop = e.clientY;
|
||||
x = nextX;
|
||||
y = nextY;
|
||||
|
||||
if (onDragOver) {
|
||||
onDragOver(e);
|
||||
}
|
||||
} // Aim for 60fps (16 ms per frame) for now. We can potentially use requestAnimationFrame (raf) instead,
|
||||
// note that browsers may throttle raf below 60fps in certain conditions.
|
||||
|
||||
|
||||
const throttledDragOver = (0,lodash__WEBPACK_IMPORTED_MODULE_0__.throttle)(over, 16);
|
||||
ownerDocument.addEventListener('dragover', throttledDragOver); // Update cursor to 'grabbing', document wide.
|
||||
|
||||
ownerDocument.body.classList.add(bodyClass); // Allow the Synthetic Event to be accessed from asynchronous code.
|
||||
// https://reactjs.org/docs/events.html#event-pooling
|
||||
|
||||
event.persist();
|
||||
/** @type {number | undefined} */
|
||||
|
||||
let timerId;
|
||||
|
||||
if (onDragStart) {
|
||||
timerId = setTimeout(() => onDragStart(event));
|
||||
}
|
||||
|
||||
cleanup.current = () => {
|
||||
// Remove drag clone.
|
||||
if (cloneWrapper && cloneWrapper.parentNode) {
|
||||
cloneWrapper.parentNode.removeChild(cloneWrapper);
|
||||
}
|
||||
|
||||
if (dragImage && dragImage.parentNode) {
|
||||
dragImage.parentNode.removeChild(dragImage);
|
||||
} // Reset cursor.
|
||||
|
||||
|
||||
ownerDocument.body.classList.remove(bodyClass);
|
||||
ownerDocument.removeEventListener('dragover', throttledDragOver);
|
||||
clearTimeout(timerId);
|
||||
};
|
||||
}
|
||||
|
||||
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => () => {
|
||||
cleanup.current();
|
||||
}, []);
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, children({
|
||||
onDraggableStart: start,
|
||||
onDraggableEnd: end
|
||||
}), dragComponent && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
|
||||
className: "components-draggable-drag-component-root",
|
||||
style: {
|
||||
display: 'none'
|
||||
},
|
||||
ref: dragComponentRef
|
||||
}, dragComponent));
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/icon/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
|
||||
|
||||
/**
|
||||
* Return an SVG icon.
|
||||
*
|
||||
* @param {IconProps} props icon is the SVG component to render
|
||||
* size is a number specifiying the icon size in pixels
|
||||
* Other props will be passed to wrapped SVG component
|
||||
*
|
||||
* @return {JSX.Element} Icon component
|
||||
*/
|
||||
|
||||
function Icon(_ref) {
|
||||
let {
|
||||
icon,
|
||||
size = 24,
|
||||
...props
|
||||
} = _ref;
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(icon, {
|
||||
width: size,
|
||||
height: size,
|
||||
...props
|
||||
});
|
||||
}
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Icon);
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+icons@8.2.3/node_modules/@wordpress/icons/build-module/library/wordpress.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@3.4.1/node_modules/@wordpress/primitives/build-module/svg/index.js");
|
||||
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
const wordpress = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__/* .SVG */ .t4, {
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
viewBox: "-2 -2 24 24"
|
||||
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__/* .Path */ .wA, {
|
||||
d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
|
||||
}));
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (wordpress);
|
||||
//# sourceMappingURL=wordpress.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+primitives@3.4.1/node_modules/@wordpress/primitives/build-module/svg/index.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ G: () => (/* binding */ G),
|
||||
/* harmony export */ rw: () => (/* binding */ Rect),
|
||||
/* harmony export */ t4: () => (/* binding */ SVG),
|
||||
/* harmony export */ wA: () => (/* binding */ Path)
|
||||
/* harmony export */ });
|
||||
/* unused harmony exports Circle, Polygon, Defs, RadialGradient, LinearGradient, Stop */
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */
|
||||
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'circle'>} props
|
||||
*
|
||||
* @return {JSX.Element} Circle component
|
||||
*/
|
||||
|
||||
const Circle = props => createElement('circle', props);
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'g'>} props
|
||||
*
|
||||
* @return {JSX.Element} G component
|
||||
*/
|
||||
|
||||
const G = props => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('g', props);
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'path'>} props
|
||||
*
|
||||
* @return {JSX.Element} Path component
|
||||
*/
|
||||
|
||||
const Path = props => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('path', props);
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'polygon'>} props
|
||||
*
|
||||
* @return {JSX.Element} Polygon component
|
||||
*/
|
||||
|
||||
const Polygon = props => createElement('polygon', props);
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'rect'>} props
|
||||
*
|
||||
* @return {JSX.Element} Rect component
|
||||
*/
|
||||
|
||||
const Rect = props => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)('rect', props);
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'defs'>} props
|
||||
*
|
||||
* @return {JSX.Element} Defs component
|
||||
*/
|
||||
|
||||
const Defs = props => createElement('defs', props);
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props
|
||||
*
|
||||
* @return {JSX.Element} RadialGradient component
|
||||
*/
|
||||
|
||||
const RadialGradient = props => createElement('radialGradient', props);
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props
|
||||
*
|
||||
* @return {JSX.Element} LinearGradient component
|
||||
*/
|
||||
|
||||
const LinearGradient = props => createElement('linearGradient', props);
|
||||
/**
|
||||
* @param {import('react').ComponentPropsWithoutRef<'stop'>} props
|
||||
*
|
||||
* @return {JSX.Element} Stop component
|
||||
*/
|
||||
|
||||
const Stop = props => createElement('stop', props);
|
||||
/**
|
||||
*
|
||||
* @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
|
||||
* Other props will be passed through to svg component.
|
||||
*
|
||||
* @return {JSX.Element} Stop component
|
||||
*/
|
||||
|
||||
const SVG = _ref => {
|
||||
let {
|
||||
className,
|
||||
isPressed,
|
||||
...props
|
||||
} = _ref;
|
||||
const appliedProps = { ...props,
|
||||
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(className, {
|
||||
'is-pressed': isPressed
|
||||
}) || undefined,
|
||||
'aria-hidden': true,
|
||||
focusable: false
|
||||
}; // Disable reason: We need to have a way to render HTML tag for web.
|
||||
// eslint-disable-next-line react/forbid-elements
|
||||
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", appliedProps);
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js":
|
||||
/***/ ((module, exports) => {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
/* global define */
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var hasOwn = {}.hasOwnProperty;
|
||||
var nativeCodeString = '[native code]';
|
||||
|
||||
function classNames() {
|
||||
var classes = [];
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var arg = arguments[i];
|
||||
if (!arg) continue;
|
||||
|
||||
var argType = typeof arg;
|
||||
|
||||
if (argType === 'string' || argType === 'number') {
|
||||
classes.push(arg);
|
||||
} else if (Array.isArray(arg)) {
|
||||
if (arg.length) {
|
||||
var inner = classNames.apply(null, arg);
|
||||
if (inner) {
|
||||
classes.push(inner);
|
||||
}
|
||||
}
|
||||
} else if (argType === 'object') {
|
||||
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
||||
classes.push(arg.toString());
|
||||
continue;
|
||||
}
|
||||
|
||||
for (var key in arg) {
|
||||
if (hasOwn.call(arg, key) && arg[key]) {
|
||||
classes.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return classes.join(' ');
|
||||
}
|
||||
|
||||
if ( true && module.exports) {
|
||||
classNames.default = classNames;
|
||||
module.exports = classNames;
|
||||
} else if (true) {
|
||||
// register as 'classnames', consistent with npm package name
|
||||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
||||
return classNames;
|
||||
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||||
} else {}
|
||||
}());
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-for-each.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $forEach = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").forEach);
|
||||
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
||||
|
||||
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
||||
|
||||
// `Array.prototype.forEach` method implementation
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
||||
module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
||||
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
||||
} : [].forEach;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.filter.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var $filter = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").filter);
|
||||
var arrayMethodHasSpeciesSupport = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js");
|
||||
|
||||
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
||||
|
||||
// `Array.prototype.filter` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
||||
// with adding support of @@species
|
||||
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
||||
filter: function filter(callbackfn /* , thisArg */) {
|
||||
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.for-each.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var forEach = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-for-each.js");
|
||||
|
||||
// `Array.prototype.forEach` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
||||
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
||||
$({ target: 'Array', proto: true, forced: [].forEach !== forEach }, {
|
||||
forEach: forEach
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-properties.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var defineProperties = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-properties.js").f);
|
||||
|
||||
// `Object.defineProperties` method
|
||||
// https://tc39.es/ecma262/#sec-object.defineproperties
|
||||
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
||||
$({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {
|
||||
defineProperties: defineProperties
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-property.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var defineProperty = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-property.js").f);
|
||||
|
||||
// `Object.defineProperty` method
|
||||
// https://tc39.es/ecma262/#sec-object.defineproperty
|
||||
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
||||
$({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {
|
||||
defineProperty: defineProperty
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var nativeGetOwnPropertyDescriptor = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-descriptor.js").f);
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
|
||||
var FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });
|
||||
|
||||
// `Object.getOwnPropertyDescriptor` method
|
||||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
||||
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
||||
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
||||
return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
||||
var ownKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/own-keys.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var getOwnPropertyDescriptorModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-descriptor.js");
|
||||
var createProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property.js");
|
||||
|
||||
// `Object.getOwnPropertyDescriptors` method
|
||||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
||||
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
||||
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
|
||||
var O = toIndexedObject(object);
|
||||
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
||||
var keys = ownKeys(O);
|
||||
var result = {};
|
||||
var index = 0;
|
||||
var key, descriptor;
|
||||
while (keys.length > index) {
|
||||
descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
|
||||
if (descriptor !== undefined) createProperty(result, key, descriptor);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.keys.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
var nativeKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-keys.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
|
||||
var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
|
||||
|
||||
// `Object.keys` method
|
||||
// https://tc39.es/ecma262/#sec-object.keys
|
||||
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
||||
keys: function keys(it) {
|
||||
return nativeKeys(toObject(it));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.for-each.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var global = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js");
|
||||
var DOMIterables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/dom-iterables.js");
|
||||
var DOMTokenListPrototype = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/dom-token-list-prototype.js");
|
||||
var forEach = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-for-each.js");
|
||||
var createNonEnumerableProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-non-enumerable-property.js");
|
||||
|
||||
var handlePrototype = function (CollectionPrototype) {
|
||||
// some Chrome versions have non-configurable methods on DOMTokenList
|
||||
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
||||
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
||||
} catch (error) {
|
||||
CollectionPrototype.forEach = forEach;
|
||||
}
|
||||
};
|
||||
|
||||
for (var COLLECTION_NAME in DOMIterables) {
|
||||
if (DOMIterables[COLLECTION_NAME]) {
|
||||
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
|
||||
}
|
||||
}
|
||||
|
||||
handlePrototype(DOMTokenListPrototype);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,34 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[3306],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@storybook+components@7.6.19_@types+react-dom@18.3.0_@types+react@17.0.71_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/components/dist/syntaxhighlighter-B5GMVT5T.mjs":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ SyntaxHighlighter: () => (/* reexport safe */ _chunk_LWG3MFN2_mjs__WEBPACK_IMPORTED_MODULE_0__.bF),
|
||||
/* harmony export */ createCopyToClipboardFunction: () => (/* reexport safe */ _chunk_LWG3MFN2_mjs__WEBPACK_IMPORTED_MODULE_0__.zH),
|
||||
/* harmony export */ "default": () => (/* reexport safe */ _chunk_LWG3MFN2_mjs__WEBPACK_IMPORTED_MODULE_0__.L0)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _chunk_LWG3MFN2_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@storybook+components@7.6.19_@types+react-dom@18.3.0_@types+react@17.0.71_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/components/dist/chunk-LWG3MFN2.mjs");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
|
@ -0,0 +1 @@
|
|||
"use strict";(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[3306],{"../../node_modules/.pnpm/@storybook+components@7.6.19_@types+react-dom@18.3.0_@types+react@17.0.71_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/components/dist/syntaxhighlighter-B5GMVT5T.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SyntaxHighlighter:()=>_chunk_LWG3MFN2_mjs__WEBPACK_IMPORTED_MODULE_0__.bF,createCopyToClipboardFunction:()=>_chunk_LWG3MFN2_mjs__WEBPACK_IMPORTED_MODULE_0__.zH,default:()=>_chunk_LWG3MFN2_mjs__WEBPACK_IMPORTED_MODULE_0__.L0});var _chunk_LWG3MFN2_mjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/@storybook+components@7.6.19_@types+react-dom@18.3.0_@types+react@17.0.71_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@storybook/components/dist/chunk-LWG3MFN2.mjs")}}]);
|
|
@ -0,0 +1,797 @@
|
|||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[3338],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ _objectWithoutProperties)
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
for (i = 0; i < sourceKeys.length; i++) {
|
||||
key = sourceKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
return target;
|
||||
}
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
||||
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
var key, i;
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
||||
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
||||
key = sourceSymbolKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/advance-string-index.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var charAt = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/string-multibyte.js").charAt);
|
||||
|
||||
// `AdvanceStringIndex` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-advancestringindex
|
||||
module.exports = function (S, index, unicode) {
|
||||
return index + (unicode ? charAt(S, index).length : 1);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-substitution.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
|
||||
var floor = Math.floor;
|
||||
var charAt = uncurryThis(''.charAt);
|
||||
var replace = uncurryThis(''.replace);
|
||||
var stringSlice = uncurryThis(''.slice);
|
||||
// eslint-disable-next-line redos/no-vulnerable -- safe
|
||||
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
||||
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
||||
|
||||
// `GetSubstitution` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-getsubstitution
|
||||
module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
|
||||
var tailPos = position + matched.length;
|
||||
var m = captures.length;
|
||||
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
||||
if (namedCaptures !== undefined) {
|
||||
namedCaptures = toObject(namedCaptures);
|
||||
symbols = SUBSTITUTION_SYMBOLS;
|
||||
}
|
||||
return replace(replacement, symbols, function (match, ch) {
|
||||
var capture;
|
||||
switch (charAt(ch, 0)) {
|
||||
case '$': return '$';
|
||||
case '&': return matched;
|
||||
case '`': return stringSlice(str, 0, position);
|
||||
case "'": return stringSlice(str, tailPos);
|
||||
case '<':
|
||||
capture = namedCaptures[stringSlice(ch, 1, -1)];
|
||||
break;
|
||||
default: // \d\d?
|
||||
var n = +ch;
|
||||
if (n === 0) return match;
|
||||
if (n > m) {
|
||||
var f = floor(n / 10);
|
||||
if (f === 0) return match;
|
||||
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
||||
return match;
|
||||
}
|
||||
capture = captures[n - 1];
|
||||
}
|
||||
return capture === undefined ? '' : capture;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.string.replace.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
var apply = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-apply.js");
|
||||
var call = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-call.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var fixRegExpWellKnownSymbolLogic = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var anObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/an-object.js");
|
||||
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
||||
var isNullOrUndefined = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-null-or-undefined.js");
|
||||
var toIntegerOrInfinity = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-integer-or-infinity.js");
|
||||
var toLength = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-length.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var requireObjectCoercible = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/require-object-coercible.js");
|
||||
var advanceStringIndex = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/advance-string-index.js");
|
||||
var getMethod = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-method.js");
|
||||
var getSubstitution = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-substitution.js");
|
||||
var regExpExec = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/regexp-exec-abstract.js");
|
||||
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
||||
|
||||
var REPLACE = wellKnownSymbol('replace');
|
||||
var max = Math.max;
|
||||
var min = Math.min;
|
||||
var concat = uncurryThis([].concat);
|
||||
var push = uncurryThis([].push);
|
||||
var stringIndexOf = uncurryThis(''.indexOf);
|
||||
var stringSlice = uncurryThis(''.slice);
|
||||
|
||||
var maybeToString = function (it) {
|
||||
return it === undefined ? it : String(it);
|
||||
};
|
||||
|
||||
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
||||
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
||||
var REPLACE_KEEPS_$0 = (function () {
|
||||
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
||||
return 'a'.replace(/./, '$0') === '$0';
|
||||
})();
|
||||
|
||||
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
||||
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
||||
if (/./[REPLACE]) {
|
||||
return /./[REPLACE]('a', '$0') === '';
|
||||
}
|
||||
return false;
|
||||
})();
|
||||
|
||||
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
||||
var re = /./;
|
||||
re.exec = function () {
|
||||
var result = [];
|
||||
result.groups = { a: '7' };
|
||||
return result;
|
||||
};
|
||||
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
||||
return ''.replace(re, '$<a>') !== '7';
|
||||
});
|
||||
|
||||
// @@replace logic
|
||||
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
||||
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
||||
|
||||
return [
|
||||
// `String.prototype.replace` method
|
||||
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
||||
function replace(searchValue, replaceValue) {
|
||||
var O = requireObjectCoercible(this);
|
||||
var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
|
||||
return replacer
|
||||
? call(replacer, searchValue, O, replaceValue)
|
||||
: call(nativeReplace, toString(O), searchValue, replaceValue);
|
||||
},
|
||||
// `RegExp.prototype[@@replace]` method
|
||||
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
||||
function (string, replaceValue) {
|
||||
var rx = anObject(this);
|
||||
var S = toString(string);
|
||||
|
||||
if (
|
||||
typeof replaceValue == 'string' &&
|
||||
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
||||
stringIndexOf(replaceValue, '$<') === -1
|
||||
) {
|
||||
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
||||
if (res.done) return res.value;
|
||||
}
|
||||
|
||||
var functionalReplace = isCallable(replaceValue);
|
||||
if (!functionalReplace) replaceValue = toString(replaceValue);
|
||||
|
||||
var global = rx.global;
|
||||
var fullUnicode;
|
||||
if (global) {
|
||||
fullUnicode = rx.unicode;
|
||||
rx.lastIndex = 0;
|
||||
}
|
||||
|
||||
var results = [];
|
||||
var result;
|
||||
while (true) {
|
||||
result = regExpExec(rx, S);
|
||||
if (result === null) break;
|
||||
|
||||
push(results, result);
|
||||
if (!global) break;
|
||||
|
||||
var matchStr = toString(result[0]);
|
||||
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
||||
}
|
||||
|
||||
var accumulatedResult = '';
|
||||
var nextSourcePosition = 0;
|
||||
for (var i = 0; i < results.length; i++) {
|
||||
result = results[i];
|
||||
|
||||
var matched = toString(result[0]);
|
||||
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
||||
var captures = [];
|
||||
var replacement;
|
||||
// NOTE: This is equivalent to
|
||||
// captures = result.slice(1).map(maybeToString)
|
||||
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
||||
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
||||
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
||||
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
||||
var namedCaptures = result.groups;
|
||||
if (functionalReplace) {
|
||||
var replacerArgs = concat([matched], captures, position, S);
|
||||
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
||||
replacement = toString(apply(replaceValue, undefined, replacerArgs));
|
||||
} else {
|
||||
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
||||
}
|
||||
if (position >= nextSourcePosition) {
|
||||
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
||||
nextSourcePosition = position + matched.length;
|
||||
}
|
||||
}
|
||||
|
||||
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
||||
}
|
||||
];
|
||||
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var hasMap = typeof Map === 'function' && Map.prototype;
|
||||
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
||||
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
||||
var mapForEach = hasMap && Map.prototype.forEach;
|
||||
var hasSet = typeof Set === 'function' && Set.prototype;
|
||||
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
||||
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
||||
var setForEach = hasSet && Set.prototype.forEach;
|
||||
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
||||
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
||||
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
||||
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
||||
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
||||
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
||||
var booleanValueOf = Boolean.prototype.valueOf;
|
||||
var objectToString = Object.prototype.toString;
|
||||
var functionToString = Function.prototype.toString;
|
||||
var $match = String.prototype.match;
|
||||
var $slice = String.prototype.slice;
|
||||
var $replace = String.prototype.replace;
|
||||
var $toUpperCase = String.prototype.toUpperCase;
|
||||
var $toLowerCase = String.prototype.toLowerCase;
|
||||
var $test = RegExp.prototype.test;
|
||||
var $concat = Array.prototype.concat;
|
||||
var $join = Array.prototype.join;
|
||||
var $arrSlice = Array.prototype.slice;
|
||||
var $floor = Math.floor;
|
||||
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
||||
var gOPS = Object.getOwnPropertySymbols;
|
||||
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
||||
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
||||
// ie, `has-tostringtag/shams
|
||||
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
||||
? Symbol.toStringTag
|
||||
: null;
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
|
||||
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
||||
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
||||
? function (O) {
|
||||
return O.__proto__; // eslint-disable-line no-proto
|
||||
}
|
||||
: null
|
||||
);
|
||||
|
||||
function addNumericSeparator(num, str) {
|
||||
if (
|
||||
num === Infinity
|
||||
|| num === -Infinity
|
||||
|| num !== num
|
||||
|| (num && num > -1000 && num < 1000)
|
||||
|| $test.call(/e/, str)
|
||||
) {
|
||||
return str;
|
||||
}
|
||||
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
||||
if (typeof num === 'number') {
|
||||
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
||||
if (int !== num) {
|
||||
var intStr = String(int);
|
||||
var dec = $slice.call(str, intStr.length + 1);
|
||||
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
||||
}
|
||||
}
|
||||
return $replace.call(str, sepRegex, '$&_');
|
||||
}
|
||||
|
||||
var utilInspect = __webpack_require__("?bbf9");
|
||||
var inspectCustom = utilInspect.custom;
|
||||
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
||||
|
||||
module.exports = function inspect_(obj, options, depth, seen) {
|
||||
var opts = options || {};
|
||||
|
||||
if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
||||
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
||||
}
|
||||
if (
|
||||
has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
||||
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
||||
: opts.maxStringLength !== null
|
||||
)
|
||||
) {
|
||||
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
||||
}
|
||||
var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
|
||||
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
||||
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
||||
}
|
||||
|
||||
if (
|
||||
has(opts, 'indent')
|
||||
&& opts.indent !== null
|
||||
&& opts.indent !== '\t'
|
||||
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
||||
) {
|
||||
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
||||
}
|
||||
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
||||
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
||||
}
|
||||
var numericSeparator = opts.numericSeparator;
|
||||
|
||||
if (typeof obj === 'undefined') {
|
||||
return 'undefined';
|
||||
}
|
||||
if (obj === null) {
|
||||
return 'null';
|
||||
}
|
||||
if (typeof obj === 'boolean') {
|
||||
return obj ? 'true' : 'false';
|
||||
}
|
||||
|
||||
if (typeof obj === 'string') {
|
||||
return inspectString(obj, opts);
|
||||
}
|
||||
if (typeof obj === 'number') {
|
||||
if (obj === 0) {
|
||||
return Infinity / obj > 0 ? '0' : '-0';
|
||||
}
|
||||
var str = String(obj);
|
||||
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
||||
}
|
||||
if (typeof obj === 'bigint') {
|
||||
var bigIntStr = String(obj) + 'n';
|
||||
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
||||
}
|
||||
|
||||
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
||||
if (typeof depth === 'undefined') { depth = 0; }
|
||||
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
||||
return isArray(obj) ? '[Array]' : '[Object]';
|
||||
}
|
||||
|
||||
var indent = getIndent(opts, depth);
|
||||
|
||||
if (typeof seen === 'undefined') {
|
||||
seen = [];
|
||||
} else if (indexOf(seen, obj) >= 0) {
|
||||
return '[Circular]';
|
||||
}
|
||||
|
||||
function inspect(value, from, noIndent) {
|
||||
if (from) {
|
||||
seen = $arrSlice.call(seen);
|
||||
seen.push(from);
|
||||
}
|
||||
if (noIndent) {
|
||||
var newOpts = {
|
||||
depth: opts.depth
|
||||
};
|
||||
if (has(opts, 'quoteStyle')) {
|
||||
newOpts.quoteStyle = opts.quoteStyle;
|
||||
}
|
||||
return inspect_(value, newOpts, depth + 1, seen);
|
||||
}
|
||||
return inspect_(value, opts, depth + 1, seen);
|
||||
}
|
||||
|
||||
if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
|
||||
var name = nameOf(obj);
|
||||
var keys = arrObjKeys(obj, inspect);
|
||||
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
||||
}
|
||||
if (isSymbol(obj)) {
|
||||
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
||||
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
||||
}
|
||||
if (isElement(obj)) {
|
||||
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
||||
var attrs = obj.attributes || [];
|
||||
for (var i = 0; i < attrs.length; i++) {
|
||||
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
||||
}
|
||||
s += '>';
|
||||
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
||||
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
||||
return s;
|
||||
}
|
||||
if (isArray(obj)) {
|
||||
if (obj.length === 0) { return '[]'; }
|
||||
var xs = arrObjKeys(obj, inspect);
|
||||
if (indent && !singleLineValues(xs)) {
|
||||
return '[' + indentedJoin(xs, indent) + ']';
|
||||
}
|
||||
return '[ ' + $join.call(xs, ', ') + ' ]';
|
||||
}
|
||||
if (isError(obj)) {
|
||||
var parts = arrObjKeys(obj, inspect);
|
||||
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
||||
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
||||
}
|
||||
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
||||
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
||||
}
|
||||
if (typeof obj === 'object' && customInspect) {
|
||||
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
||||
return utilInspect(obj, { depth: maxDepth - depth });
|
||||
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
||||
return obj.inspect();
|
||||
}
|
||||
}
|
||||
if (isMap(obj)) {
|
||||
var mapParts = [];
|
||||
if (mapForEach) {
|
||||
mapForEach.call(obj, function (value, key) {
|
||||
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
||||
});
|
||||
}
|
||||
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
||||
}
|
||||
if (isSet(obj)) {
|
||||
var setParts = [];
|
||||
if (setForEach) {
|
||||
setForEach.call(obj, function (value) {
|
||||
setParts.push(inspect(value, obj));
|
||||
});
|
||||
}
|
||||
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
||||
}
|
||||
if (isWeakMap(obj)) {
|
||||
return weakCollectionOf('WeakMap');
|
||||
}
|
||||
if (isWeakSet(obj)) {
|
||||
return weakCollectionOf('WeakSet');
|
||||
}
|
||||
if (isWeakRef(obj)) {
|
||||
return weakCollectionOf('WeakRef');
|
||||
}
|
||||
if (isNumber(obj)) {
|
||||
return markBoxed(inspect(Number(obj)));
|
||||
}
|
||||
if (isBigInt(obj)) {
|
||||
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
||||
}
|
||||
if (isBoolean(obj)) {
|
||||
return markBoxed(booleanValueOf.call(obj));
|
||||
}
|
||||
if (isString(obj)) {
|
||||
return markBoxed(inspect(String(obj)));
|
||||
}
|
||||
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
||||
/* eslint-env browser */
|
||||
if (typeof window !== 'undefined' && obj === window) {
|
||||
return '{ [object Window] }';
|
||||
}
|
||||
if (obj === __webpack_require__.g) {
|
||||
return '{ [object globalThis] }';
|
||||
}
|
||||
if (!isDate(obj) && !isRegExp(obj)) {
|
||||
var ys = arrObjKeys(obj, inspect);
|
||||
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
||||
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
||||
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
||||
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
||||
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
||||
if (ys.length === 0) { return tag + '{}'; }
|
||||
if (indent) {
|
||||
return tag + '{' + indentedJoin(ys, indent) + '}';
|
||||
}
|
||||
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
||||
}
|
||||
return String(obj);
|
||||
};
|
||||
|
||||
function wrapQuotes(s, defaultStyle, opts) {
|
||||
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
||||
return quoteChar + s + quoteChar;
|
||||
}
|
||||
|
||||
function quote(s) {
|
||||
return $replace.call(String(s), /"/g, '"');
|
||||
}
|
||||
|
||||
function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
|
||||
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
||||
function isSymbol(obj) {
|
||||
if (hasShammedSymbols) {
|
||||
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
||||
}
|
||||
if (typeof obj === 'symbol') {
|
||||
return true;
|
||||
}
|
||||
if (!obj || typeof obj !== 'object' || !symToString) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
symToString.call(obj);
|
||||
return true;
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isBigInt(obj) {
|
||||
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
bigIntValueOf.call(obj);
|
||||
return true;
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
||||
function has(obj, key) {
|
||||
return hasOwn.call(obj, key);
|
||||
}
|
||||
|
||||
function toStr(obj) {
|
||||
return objectToString.call(obj);
|
||||
}
|
||||
|
||||
function nameOf(f) {
|
||||
if (f.name) { return f.name; }
|
||||
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
||||
if (m) { return m[1]; }
|
||||
return null;
|
||||
}
|
||||
|
||||
function indexOf(xs, x) {
|
||||
if (xs.indexOf) { return xs.indexOf(x); }
|
||||
for (var i = 0, l = xs.length; i < l; i++) {
|
||||
if (xs[i] === x) { return i; }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function isMap(x) {
|
||||
if (!mapSize || !x || typeof x !== 'object') {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
mapSize.call(x);
|
||||
try {
|
||||
setSize.call(x);
|
||||
} catch (s) {
|
||||
return true;
|
||||
}
|
||||
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isWeakMap(x) {
|
||||
if (!weakMapHas || !x || typeof x !== 'object') {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
weakMapHas.call(x, weakMapHas);
|
||||
try {
|
||||
weakSetHas.call(x, weakSetHas);
|
||||
} catch (s) {
|
||||
return true;
|
||||
}
|
||||
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isWeakRef(x) {
|
||||
if (!weakRefDeref || !x || typeof x !== 'object') {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
weakRefDeref.call(x);
|
||||
return true;
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isSet(x) {
|
||||
if (!setSize || !x || typeof x !== 'object') {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
setSize.call(x);
|
||||
try {
|
||||
mapSize.call(x);
|
||||
} catch (m) {
|
||||
return true;
|
||||
}
|
||||
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isWeakSet(x) {
|
||||
if (!weakSetHas || !x || typeof x !== 'object') {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
weakSetHas.call(x, weakSetHas);
|
||||
try {
|
||||
weakMapHas.call(x, weakMapHas);
|
||||
} catch (s) {
|
||||
return true;
|
||||
}
|
||||
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isElement(x) {
|
||||
if (!x || typeof x !== 'object') { return false; }
|
||||
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
||||
return true;
|
||||
}
|
||||
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
||||
}
|
||||
|
||||
function inspectString(str, opts) {
|
||||
if (str.length > opts.maxStringLength) {
|
||||
var remaining = str.length - opts.maxStringLength;
|
||||
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
||||
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
||||
}
|
||||
// eslint-disable-next-line no-control-regex
|
||||
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
||||
return wrapQuotes(s, 'single', opts);
|
||||
}
|
||||
|
||||
function lowbyte(c) {
|
||||
var n = c.charCodeAt(0);
|
||||
var x = {
|
||||
8: 'b',
|
||||
9: 't',
|
||||
10: 'n',
|
||||
12: 'f',
|
||||
13: 'r'
|
||||
}[n];
|
||||
if (x) { return '\\' + x; }
|
||||
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
||||
}
|
||||
|
||||
function markBoxed(str) {
|
||||
return 'Object(' + str + ')';
|
||||
}
|
||||
|
||||
function weakCollectionOf(type) {
|
||||
return type + ' { ? }';
|
||||
}
|
||||
|
||||
function collectionOf(type, size, entries, indent) {
|
||||
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
||||
return type + ' (' + size + ') {' + joinedEntries + '}';
|
||||
}
|
||||
|
||||
function singleLineValues(xs) {
|
||||
for (var i = 0; i < xs.length; i++) {
|
||||
if (indexOf(xs[i], '\n') >= 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function getIndent(opts, depth) {
|
||||
var baseIndent;
|
||||
if (opts.indent === '\t') {
|
||||
baseIndent = '\t';
|
||||
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
||||
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
base: baseIndent,
|
||||
prev: $join.call(Array(depth + 1), baseIndent)
|
||||
};
|
||||
}
|
||||
|
||||
function indentedJoin(xs, indent) {
|
||||
if (xs.length === 0) { return ''; }
|
||||
var lineJoiner = '\n' + indent.prev + indent.base;
|
||||
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
||||
}
|
||||
|
||||
function arrObjKeys(obj, inspect) {
|
||||
var isArr = isArray(obj);
|
||||
var xs = [];
|
||||
if (isArr) {
|
||||
xs.length = obj.length;
|
||||
for (var i = 0; i < obj.length; i++) {
|
||||
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
|
||||
}
|
||||
}
|
||||
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
||||
var symMap;
|
||||
if (hasShammedSymbols) {
|
||||
symMap = {};
|
||||
for (var k = 0; k < syms.length; k++) {
|
||||
symMap['$' + syms[k]] = syms[k];
|
||||
}
|
||||
}
|
||||
|
||||
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
||||
if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
||||
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
||||
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
||||
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
||||
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
||||
} else if ($test.call(/[^\w$]/, key)) {
|
||||
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
||||
} else {
|
||||
xs.push(key + ': ' + inspect(obj[key], obj));
|
||||
}
|
||||
}
|
||||
if (typeof gOPS === 'function') {
|
||||
for (var j = 0; j < syms.length; j++) {
|
||||
if (isEnumerable.call(obj, syms[j])) {
|
||||
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
return xs;
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,832 @@
|
|||
"use strict";
|
||||
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[3369],{
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-footer/component.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ card_footer_component)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
||||
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/context-connect.js
|
||||
var context_connect = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/context-connect.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex/component.js + 2 modules
|
||||
var component = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex/component.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/use-context-system.js + 1 modules
|
||||
var use_context_system = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/use-context-system.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/styles.js
|
||||
var styles = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/styles.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js
|
||||
var use_cx = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-footer/hook.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FooterProps, 'div'>} props
|
||||
*/
|
||||
|
||||
function useCardFooter(props) {
|
||||
const {
|
||||
className,
|
||||
justify,
|
||||
isBorderless = false,
|
||||
isShady = false,
|
||||
size = 'medium',
|
||||
...otherProps
|
||||
} = (0,use_context_system/* useContextSystem */.A)(props, 'CardFooter');
|
||||
const cx = (0,use_cx/* useCx */.l)();
|
||||
const classes = (0,react.useMemo)(() => cx(styles/* Footer */.wi, styles/* borderRadius */.Vq, styles/* borderColor */.Cz, styles/* cardPaddings */.L7[size], isBorderless && styles/* borderless */.Gn, isShady && styles/* shady */.QC, // This classname is added for legacy compatibility reasons.
|
||||
'components-card__footer', className), [className, cx, isBorderless, isShady, size]);
|
||||
return { ...otherProps,
|
||||
className: classes,
|
||||
justify
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=hook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-footer/component.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FooterProps, 'div'>} props
|
||||
* @param {import('react').ForwardedRef<any>} forwardedRef
|
||||
*/
|
||||
|
||||
function CardFooter(props, forwardedRef) {
|
||||
const footerProps = useCardFooter(props);
|
||||
return (0,react.createElement)(component/* default */.A, (0,esm_extends/* default */.A)({}, footerProps, {
|
||||
ref: forwardedRef
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* `CardFooter` renders an optional footer within a `Card`.
|
||||
*
|
||||
* @example
|
||||
* ```jsx
|
||||
* import { Card, CardBody, CardFooter } from `@wordpress/components`;
|
||||
*
|
||||
* <Card>
|
||||
* <CardBody>...</CardBody>
|
||||
* <CardFooter>...</CardFooter>
|
||||
* </Card>
|
||||
* ```
|
||||
*/
|
||||
|
||||
|
||||
const ConnectedCardFooter = (0,context_connect/* contextConnect */.KZ)(CardFooter, 'CardFooter');
|
||||
/* harmony default export */ const card_footer_component = (ConnectedCardFooter);
|
||||
//# sourceMappingURL=component.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-header/component.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
A: () => (/* binding */ card_header_component)
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
||||
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/context-connect.js
|
||||
var context_connect = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/context-connect.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex/component.js + 2 modules
|
||||
var component = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/flex/flex/component.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/use-context-system.js + 1 modules
|
||||
var use_context_system = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/context/use-context-system.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/styles.js
|
||||
var styles = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/styles.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js
|
||||
var use_cx = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-header/hook.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../../ui/context').WordPressComponentProps<import('../types').HeaderProps, 'div'>} props
|
||||
*/
|
||||
|
||||
function useCardHeader(props) {
|
||||
const {
|
||||
className,
|
||||
isBorderless = false,
|
||||
isShady = false,
|
||||
size = 'medium',
|
||||
...otherProps
|
||||
} = (0,use_context_system/* useContextSystem */.A)(props, 'CardHeader');
|
||||
const cx = (0,use_cx/* useCx */.l)();
|
||||
const classes = (0,react.useMemo)(() => cx(styles/* Header */.Y9, styles/* borderRadius */.Vq, styles/* borderColor */.Cz, styles/* cardPaddings */.L7[size], isBorderless && styles/* borderless */.Gn, isShady && styles/* shady */.QC, // This classname is added for legacy compatibility reasons.
|
||||
'components-card__header', className), [className, cx, isBorderless, isShady, size]);
|
||||
return { ...otherProps,
|
||||
className: classes
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=hook.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/card/card-header/component.js
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param {import('../../ui/context').WordPressComponentProps<import('../types').HeaderProps, 'div'>} props
|
||||
* @param {import('react').ForwardedRef<any>} forwardedRef
|
||||
*/
|
||||
|
||||
function CardHeader(props, forwardedRef) {
|
||||
const headerProps = useCardHeader(props);
|
||||
return (0,react.createElement)(component/* default */.A, (0,esm_extends/* default */.A)({}, headerProps, {
|
||||
ref: forwardedRef
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* `CardHeader` renders an optional header within a `Card`.
|
||||
*
|
||||
* @example
|
||||
* ```jsx
|
||||
* import { Card, CardBody, CardHeader } from `@wordpress/components`;
|
||||
*
|
||||
* <Card>
|
||||
* <CardHeader>...</CardHeader>
|
||||
* <CardBody>...</CardBody>
|
||||
* </Card>
|
||||
* ```
|
||||
*/
|
||||
|
||||
|
||||
const ConnectedCardHeader = (0,context_connect/* contextConnect */.KZ)(CardHeader, 'CardHeader');
|
||||
/* harmony default export */ const card_header_component = (ConnectedCardHeader);
|
||||
//# sourceMappingURL=component.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/index.js":
|
||||
/***/ (() => {
|
||||
|
||||
// Primitives.
|
||||
// Components.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Higher-Order Components.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/utils/space.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ x: () => (/* binding */ space)
|
||||
/* harmony export */ });
|
||||
/**
|
||||
* A real number or something parsable as a number
|
||||
*/
|
||||
const GRID_BASE = '4px';
|
||||
/**
|
||||
* A function that handles numbers, numeric strings, and unit values.
|
||||
*
|
||||
* When given a number or a numeric string, it will return the grid-based
|
||||
* value as a factor of GRID_BASE, defined above.
|
||||
*
|
||||
* When given a unit value or one of the named CSS values like `auto`,
|
||||
* it will simply return the value back.
|
||||
*
|
||||
* @param value A number, numeric string, or a unit value.
|
||||
*/
|
||||
|
||||
function space(value) {
|
||||
var _window$CSS, _window$CSS$supports;
|
||||
|
||||
if (typeof value === 'undefined') {
|
||||
return undefined;
|
||||
} // Handle empty strings, if it's the number 0 this still works.
|
||||
|
||||
|
||||
if (!value) {
|
||||
return '0';
|
||||
}
|
||||
|
||||
const asInt = typeof value === 'number' ? value : Number(value); // Test if the input has a unit, was NaN, or was one of the named CSS values (like `auto`), in which case just use that value.
|
||||
|
||||
if (typeof window !== 'undefined' && (_window$CSS = window.CSS) !== null && _window$CSS !== void 0 && (_window$CSS$supports = _window$CSS.supports) !== null && _window$CSS$supports !== void 0 && _window$CSS$supports.call(_window$CSS, 'margin', value.toString()) || Number.isNaN(asInt)) {
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
return `calc(${GRID_BASE} * ${value})`;
|
||||
}
|
||||
//# sourceMappingURL=space.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
lm: () => (/* binding */ COLORS)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: ADMIN, ALERT, BASE, BLUE, DARK_GRAY, DARK_OPACITY, DARK_OPACITY_LIGHT, G2, LIGHT_GRAY, LIGHT_OPACITY_LIGHT, UI, default
|
||||
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js
|
||||
var lodash = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs
|
||||
var colord = __webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs");
|
||||
// EXTERNAL MODULE: ../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs
|
||||
var names = __webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs");
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
(0,colord/* extend */.X$)([names/* default */.A]);
|
||||
/**
|
||||
* Generating a CSS compliant rgba() color value.
|
||||
*
|
||||
* @param {string} hexValue The hex value to convert to rgba().
|
||||
* @param {number} alpha The alpha value for opacity.
|
||||
* @return {string} The converted rgba() color value.
|
||||
*
|
||||
* @example
|
||||
* rgba( '#000000', 0.5 )
|
||||
* // rgba(0, 0, 0, 0.5)
|
||||
*/
|
||||
|
||||
function rgba() {
|
||||
let hexValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||
let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
||||
return (0,colord/* colord */.Mj)(hexValue).alpha(alpha).toRgbString();
|
||||
}
|
||||
//# sourceMappingURL=colors.js.map
|
||||
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
const BASE = {
|
||||
black: '#000',
|
||||
white: '#fff'
|
||||
};
|
||||
/**
|
||||
* TODO: Continue to update values as "G2" design evolves.
|
||||
*
|
||||
* "G2" refers to the movement to advance the interface of the block editor.
|
||||
* https://github.com/WordPress/gutenberg/issues/18667
|
||||
*/
|
||||
|
||||
const G2 = {
|
||||
blue: {
|
||||
medium: {
|
||||
focus: '#007cba',
|
||||
focusDark: '#fff'
|
||||
}
|
||||
},
|
||||
gray: {
|
||||
900: '#1e1e1e',
|
||||
700: '#757575',
|
||||
// Meets 4.6:1 text contrast against white.
|
||||
600: '#949494',
|
||||
// Meets 3:1 UI or large text contrast against white.
|
||||
400: '#ccc',
|
||||
300: '#ddd',
|
||||
// Used for most borders.
|
||||
200: '#e0e0e0',
|
||||
// Used sparingly for light borders.
|
||||
100: '#f0f0f0' // Used for light gray backgrounds.
|
||||
|
||||
},
|
||||
darkGray: {
|
||||
primary: '#1e1e1e',
|
||||
heading: '#050505'
|
||||
},
|
||||
mediumGray: {
|
||||
text: '#757575'
|
||||
},
|
||||
lightGray: {
|
||||
ui: '#949494',
|
||||
secondary: '#ccc',
|
||||
tertiary: '#e7e8e9'
|
||||
}
|
||||
};
|
||||
const DARK_GRAY = {
|
||||
900: '#191e23',
|
||||
800: '#23282d',
|
||||
700: '#32373c',
|
||||
600: '#40464d',
|
||||
500: '#555d66',
|
||||
// Use this most of the time for dark items.
|
||||
400: '#606a73',
|
||||
300: '#6c7781',
|
||||
// Lightest gray that can be used for AA text contrast.
|
||||
200: '#7e8993',
|
||||
150: '#8d96a0',
|
||||
// Lightest gray that can be used for AA non-text contrast.
|
||||
100: '#8f98a1',
|
||||
placeholder: rgba(G2.gray[900], 0.62)
|
||||
};
|
||||
const DARK_OPACITY = {
|
||||
900: rgba('#000510', 0.9),
|
||||
800: rgba('#00000a', 0.85),
|
||||
700: rgba('#06060b', 0.8),
|
||||
600: rgba('#000913', 0.75),
|
||||
500: rgba('#0a1829', 0.7),
|
||||
400: rgba('#0a1829', 0.65),
|
||||
300: rgba('#0e1c2e', 0.62),
|
||||
200: rgba('#162435', 0.55),
|
||||
100: rgba('#223443', 0.5),
|
||||
backgroundFill: rgba(DARK_GRAY[700], 0.7)
|
||||
};
|
||||
const DARK_OPACITY_LIGHT = {
|
||||
900: rgba('#304455', 0.45),
|
||||
800: rgba('#425863', 0.4),
|
||||
700: rgba('#667886', 0.35),
|
||||
600: rgba('#7b86a2', 0.3),
|
||||
500: rgba('#9197a2', 0.25),
|
||||
400: rgba('#95959c', 0.2),
|
||||
300: rgba('#829493', 0.15),
|
||||
200: rgba('#8b8b96', 0.1),
|
||||
100: rgba('#747474', 0.05)
|
||||
};
|
||||
const LIGHT_GRAY = {
|
||||
900: '#a2aab2',
|
||||
800: '#b5bcc2',
|
||||
700: '#ccd0d4',
|
||||
600: '#d7dade',
|
||||
500: '#e2e4e7',
|
||||
// Good for "grayed" items and borders.
|
||||
400: '#e8eaeb',
|
||||
// Good for "readonly" input fields and special text selection.
|
||||
300: '#edeff0',
|
||||
200: '#f3f4f5',
|
||||
100: '#f8f9f9',
|
||||
placeholder: rgba(BASE.white, 0.65)
|
||||
};
|
||||
const LIGHT_OPACITY_LIGHT = {
|
||||
900: rgba(BASE.white, 0.5),
|
||||
800: rgba(BASE.white, 0.45),
|
||||
700: rgba(BASE.white, 0.4),
|
||||
600: rgba(BASE.white, 0.35),
|
||||
500: rgba(BASE.white, 0.3),
|
||||
400: rgba(BASE.white, 0.25),
|
||||
300: rgba(BASE.white, 0.2),
|
||||
200: rgba(BASE.white, 0.15),
|
||||
100: rgba(BASE.white, 0.1),
|
||||
backgroundFill: rgba(LIGHT_GRAY[300], 0.8)
|
||||
}; // Additional colors.
|
||||
// Some are from https://make.wordpress.org/design/handbook/foundations/colors/.
|
||||
|
||||
const BLUE = {
|
||||
wordpress: {
|
||||
700: '#00669b'
|
||||
},
|
||||
dark: {
|
||||
900: '#0071a1'
|
||||
},
|
||||
medium: {
|
||||
900: '#006589',
|
||||
800: '#00739c',
|
||||
700: '#007fac',
|
||||
600: '#008dbe',
|
||||
500: '#00a0d2',
|
||||
400: '#33b3db',
|
||||
300: '#66c6e4',
|
||||
200: '#bfe7f3',
|
||||
100: '#e5f5fa',
|
||||
highlight: '#b3e7fe',
|
||||
focus: '#007cba'
|
||||
}
|
||||
};
|
||||
const ALERT = {
|
||||
yellow: '#f0b849',
|
||||
red: '#d94f4f',
|
||||
green: '#4ab866'
|
||||
};
|
||||
const ADMIN = {
|
||||
theme: `var( --wp-admin-theme-color, ${BLUE.wordpress[700]})`,
|
||||
themeDark10: `var( --wp-admin-theme-color-darker-10, ${BLUE.medium.focus})`
|
||||
}; // Namespaced values for raw colors hex codes.
|
||||
|
||||
const UI = {
|
||||
theme: ADMIN.theme,
|
||||
background: BASE.white,
|
||||
backgroundDisabled: LIGHT_GRAY[200],
|
||||
border: G2.gray[700],
|
||||
borderHover: G2.gray[700],
|
||||
borderFocus: ADMIN.themeDark10,
|
||||
borderDisabled: G2.gray[400],
|
||||
borderLight: G2.gray[300],
|
||||
label: DARK_GRAY[500],
|
||||
textDisabled: DARK_GRAY[150],
|
||||
textDark: BASE.white,
|
||||
textLight: BASE.black
|
||||
}; // Using Object.assign instead of { ...spread } syntax helps TypeScript
|
||||
// to extract the correct type defs here.
|
||||
|
||||
const COLORS = Object.assign({}, BASE, {
|
||||
darkGray: (0,lodash.merge)({}, DARK_GRAY, G2.darkGray),
|
||||
darkOpacity: DARK_OPACITY,
|
||||
darkOpacityLight: DARK_OPACITY_LIGHT,
|
||||
mediumGray: G2.mediumGray,
|
||||
gray: G2.gray,
|
||||
lightGray: (0,lodash.merge)({}, LIGHT_GRAY, G2.lightGray),
|
||||
lightGrayLight: LIGHT_OPACITY_LIGHT,
|
||||
blue: (0,lodash.merge)({}, BLUE, G2.blue),
|
||||
alert: ALERT,
|
||||
admin: ADMIN,
|
||||
ui: UI
|
||||
});
|
||||
/* harmony default export */ const colors_values = ((/* unused pure expression or super */ null && (COLORS)));
|
||||
//# sourceMappingURL=colors-values.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/delete-property-or-throw.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var tryToString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/try-to-string.js");
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
module.exports = function (O, P) {
|
||||
if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-ff-version.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var userAgent = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-user-agent.js");
|
||||
|
||||
var firefox = userAgent.match(/firefox\/(\d+)/i);
|
||||
|
||||
module.exports = !!firefox && +firefox[1];
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-is-ie-or-edge.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var UA = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-user-agent.js");
|
||||
|
||||
module.exports = /MSIE|Trident/.test(UA);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-webkit-version.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var userAgent = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-user-agent.js");
|
||||
|
||||
var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
|
||||
|
||||
module.exports = !!webkit && +webkit[1];
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.join.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var IndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/indexed-object.js");
|
||||
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
||||
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
||||
|
||||
var nativeJoin = uncurryThis([].join);
|
||||
|
||||
var ES3_STRINGS = IndexedObject !== Object;
|
||||
var FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');
|
||||
|
||||
// `Array.prototype.join` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.join
|
||||
$({ target: 'Array', proto: true, forced: FORCED }, {
|
||||
join: function join(separator) {
|
||||
return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.sort.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var aCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/a-callable.js");
|
||||
var toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
||||
var lengthOfArrayLike = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/length-of-array-like.js");
|
||||
var deletePropertyOrThrow = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/delete-property-or-throw.js");
|
||||
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
||||
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
||||
var internalSort = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-sort.js");
|
||||
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
||||
var FF = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-ff-version.js");
|
||||
var IE_OR_EDGE = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-is-ie-or-edge.js");
|
||||
var V8 = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-v8-version.js");
|
||||
var WEBKIT = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-webkit-version.js");
|
||||
|
||||
var test = [];
|
||||
var nativeSort = uncurryThis(test.sort);
|
||||
var push = uncurryThis(test.push);
|
||||
|
||||
// IE8-
|
||||
var FAILS_ON_UNDEFINED = fails(function () {
|
||||
test.sort(undefined);
|
||||
});
|
||||
// V8 bug
|
||||
var FAILS_ON_NULL = fails(function () {
|
||||
test.sort(null);
|
||||
});
|
||||
// Old WebKit
|
||||
var STRICT_METHOD = arrayMethodIsStrict('sort');
|
||||
|
||||
var STABLE_SORT = !fails(function () {
|
||||
// feature detection can be too slow, so check engines versions
|
||||
if (V8) return V8 < 70;
|
||||
if (FF && FF > 3) return;
|
||||
if (IE_OR_EDGE) return true;
|
||||
if (WEBKIT) return WEBKIT < 603;
|
||||
|
||||
var result = '';
|
||||
var code, chr, value, index;
|
||||
|
||||
// generate an array with more 512 elements (Chakra and old V8 fails only in this case)
|
||||
for (code = 65; code < 76; code++) {
|
||||
chr = String.fromCharCode(code);
|
||||
|
||||
switch (code) {
|
||||
case 66: case 69: case 70: case 72: value = 3; break;
|
||||
case 68: case 71: value = 4; break;
|
||||
default: value = 2;
|
||||
}
|
||||
|
||||
for (index = 0; index < 47; index++) {
|
||||
test.push({ k: chr + index, v: value });
|
||||
}
|
||||
}
|
||||
|
||||
test.sort(function (a, b) { return b.v - a.v; });
|
||||
|
||||
for (index = 0; index < test.length; index++) {
|
||||
chr = test[index].k.charAt(0);
|
||||
if (result.charAt(result.length - 1) !== chr) result += chr;
|
||||
}
|
||||
|
||||
return result !== 'DGBEFHACIJK';
|
||||
});
|
||||
|
||||
var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
|
||||
|
||||
var getSortCompare = function (comparefn) {
|
||||
return function (x, y) {
|
||||
if (y === undefined) return -1;
|
||||
if (x === undefined) return 1;
|
||||
if (comparefn !== undefined) return +comparefn(x, y) || 0;
|
||||
return toString(x) > toString(y) ? 1 : -1;
|
||||
};
|
||||
};
|
||||
|
||||
// `Array.prototype.sort` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
||||
$({ target: 'Array', proto: true, forced: FORCED }, {
|
||||
sort: function sort(comparefn) {
|
||||
if (comparefn !== undefined) aCallable(comparefn);
|
||||
|
||||
var array = toObject(this);
|
||||
|
||||
if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
|
||||
|
||||
var items = [];
|
||||
var arrayLength = lengthOfArrayLike(array);
|
||||
var itemsLength, index;
|
||||
|
||||
for (index = 0; index < arrayLength; index++) {
|
||||
if (index in array) push(items, array[index]);
|
||||
}
|
||||
|
||||
internalSort(items, getSortCompare(comparefn));
|
||||
|
||||
itemsLength = lengthOfArrayLike(items);
|
||||
index = 0;
|
||||
|
||||
while (index < itemsLength) array[index] = items[index++];
|
||||
while (index < arrayLength) deletePropertyOrThrow(array, index++);
|
||||
|
||||
return array;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.date.to-string.js":
|
||||
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
|
||||
// TODO: Remove from `core-js@4`
|
||||
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
||||
var defineBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in.js");
|
||||
|
||||
var DatePrototype = Date.prototype;
|
||||
var INVALID_DATE = 'Invalid Date';
|
||||
var TO_STRING = 'toString';
|
||||
var nativeDateToString = uncurryThis(DatePrototype[TO_STRING]);
|
||||
var thisTimeValue = uncurryThis(DatePrototype.getTime);
|
||||
|
||||
// `Date.prototype.toString` method
|
||||
// https://tc39.es/ecma262/#sec-date.prototype.tostring
|
||||
if (String(new Date(NaN)) !== INVALID_DATE) {
|
||||
defineBuiltIn(DatePrototype, TO_STRING, function toString() {
|
||||
var value = thisTimeValue(this);
|
||||
// eslint-disable-next-line no-self-compare -- NaN check
|
||||
return value === value ? nativeDateToString(this) : INVALID_DATE;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue