589 lines
25 KiB
JavaScript
589 lines
25 KiB
JavaScript
/******/ (() => { // webpackBootstrap
|
|
/******/ "use strict";
|
|
/******/ var __webpack_modules__ = ({
|
|
|
|
/***/ "./src/audio-player/block.json":
|
|
/*!*************************************!*\
|
|
!*** ./src/audio-player/block.json ***!
|
|
\*************************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/audio-player","version":"0.1.0","title":"Lecteur audio","category":"carhop-blocks","icon":{"src":"format-audio","foreground":"#136f63"},"description":"Lecteur audio pour intégrer un fichier audio dans votre contenu","example":{},"attributes":{"audioUrl":{"type":"string","default":""},"audioId":{"type":"number","default":0},"title":{"type":"string","default":"Titre du bloc audio"},"description":{"type":"string","default":""},"caption":{"type":"string","default":""}},"supports":{"html":false},"keywords":["audio","player","lecteur audio"],"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/audio-player/edit.js":
|
|
/*!**********************************!*\
|
|
!*** ./src/audio-player/edit.js ***!
|
|
\**********************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ Edit)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
|
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
|
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
|
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
|
|
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
|
|
/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data");
|
|
/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__);
|
|
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editor.scss */ "./src/audio-player/editor.scss");
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Edit({
|
|
attributes,
|
|
setAttributes
|
|
}) {
|
|
const {
|
|
audioUrl,
|
|
audioId,
|
|
title,
|
|
caption
|
|
} = attributes;
|
|
const audioRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
|
|
const plyrInstance = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
|
|
const {
|
|
saveEntityRecord
|
|
} = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.store);
|
|
const [isSavingCaption, setIsSavingCaption] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(false);
|
|
const [saveMessage, setSaveMessage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)("");
|
|
const saveCaptionToMedia = async newCaption => {
|
|
if (!audioId) return;
|
|
try {
|
|
setIsSavingCaption(true);
|
|
setSaveMessage("");
|
|
await saveEntityRecord("postType", "attachment", {
|
|
id: audioId,
|
|
caption: newCaption
|
|
});
|
|
setSaveMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Légende mise à jour dans la médiathèque.", "carhop-blocks"));
|
|
} catch (e) {
|
|
setSaveMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Erreur lors de la mise à jour dans la médiathèque.", "carhop-blocks"));
|
|
} finally {
|
|
setIsSavingCaption(false);
|
|
}
|
|
};
|
|
const handleCaptionChange = value => {
|
|
setAttributes({
|
|
caption: value
|
|
});
|
|
if (audioId) {
|
|
void saveCaptionToMedia(value);
|
|
}
|
|
};
|
|
const onSelectAudio = media => {
|
|
setAttributes({
|
|
audioUrl: media.url,
|
|
audioId: media.id,
|
|
// Récupérer les métadonnées depuis la médiathèque
|
|
caption: media.caption || ""
|
|
});
|
|
};
|
|
const onSelectURL = url => {
|
|
setAttributes({
|
|
audioUrl: url,
|
|
audioId: 0
|
|
});
|
|
};
|
|
const onRemoveAudio = () => {
|
|
setAttributes({
|
|
audioUrl: "",
|
|
audioId: 0,
|
|
caption: ""
|
|
});
|
|
};
|
|
|
|
// Initialize Plyr in the editor
|
|
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
|
|
// Wait for Plyr to be loaded (via PHP)
|
|
if (!audioUrl || !audioRef.current || typeof window.Plyr === "undefined") {
|
|
return;
|
|
}
|
|
|
|
// Destroy previous instance if it exists
|
|
if (plyrInstance.current) {
|
|
plyrInstance.current.destroy();
|
|
}
|
|
|
|
// Create new Plyr instance
|
|
plyrInstance.current = new window.Plyr(audioRef.current, {
|
|
controls: ["play-large", "play", "progress", "current-time", "mute", "volume", "settings"],
|
|
settings: ["speed"],
|
|
speed: {
|
|
selected: 1,
|
|
options: [0.5, 0.75, 1, 1.25, 1.5, 2]
|
|
}
|
|
});
|
|
|
|
// Cleanup on unmount
|
|
return () => {
|
|
if (plyrInstance.current) {
|
|
plyrInstance.current.destroy();
|
|
plyrInstance.current = null;
|
|
}
|
|
};
|
|
}, [audioUrl]);
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
|
|
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({
|
|
className: "audio-player"
|
|
}),
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
|
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Informations", "carhop-blocks"),
|
|
initialOpen: true,
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
|
|
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Titre", "carhop-blocks"),
|
|
value: title,
|
|
onChange: value => setAttributes({
|
|
title: value
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
|
|
label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Légende", "carhop-blocks"),
|
|
value: caption,
|
|
onChange: handleCaptionChange
|
|
}), audioId ? isSavingCaption ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
|
|
status: "info",
|
|
isDismissible: false,
|
|
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Sauvegarde…", "carhop-blocks")
|
|
}) : saveMessage ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
|
|
status: "success",
|
|
isDismissible: false,
|
|
children: saveMessage
|
|
}) : null : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Notice, {
|
|
status: "info",
|
|
isDismissible: false,
|
|
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Média externe : la légende n'est pas synchronisée dans la médiathèque.", "carhop-blocks")
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
|
|
className: "audio-player__title",
|
|
value: title,
|
|
onChange: value => setAttributes({
|
|
title: value
|
|
}),
|
|
tagName: "h4"
|
|
}), !audioUrl ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaPlaceholder, {
|
|
icon: "format-audio",
|
|
onSelect: onSelectAudio,
|
|
onSelectURL: onSelectURL,
|
|
accept: "audio/*",
|
|
allowedTypes: ["audio"],
|
|
labels: {
|
|
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Fichier audio", "carhop-blocks"),
|
|
instructions: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Téléchargez un fichier audio, sélectionnez-en un depuis la médiathèque ou insérez-en un depuis une URL.", "carhop-blocks")
|
|
}
|
|
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment, {
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, {
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaReplaceFlow, {
|
|
mediaId: audioId,
|
|
mediaURL: audioUrl,
|
|
allowedTypes: ["audio"],
|
|
accept: "audio/*",
|
|
onSelectURL: onSelectURL,
|
|
onSelect: onSelectAudio
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToolbarButton, {
|
|
onClick: onRemoveAudio,
|
|
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Retirer", "carhop-blocks")
|
|
})]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
|
|
className: "audio-player-preview",
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("audio", {
|
|
ref: audioRef,
|
|
className: "js-plyr",
|
|
src: audioUrl,
|
|
preload: "metadata",
|
|
children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Votre navigateur ne supporte pas l'élément audio.", "carhop-blocks")
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("p", {
|
|
className: "audio-player__details",
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("span", {
|
|
className: "audio-player__details__label",
|
|
children: "Audio"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, {
|
|
className: "audio-player__details__caption",
|
|
placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Renseignez ici la légende de l'audio", "carhop-blocks"),
|
|
value: caption,
|
|
onChange: value => handleCaptionChange(value),
|
|
tagName: "span"
|
|
})]
|
|
})]
|
|
});
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/audio-player/editor.scss":
|
|
/*!**************************************!*\
|
|
!*** ./src/audio-player/editor.scss ***!
|
|
\**************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/audio-player/index.js":
|
|
/*!***********************************!*\
|
|
!*** ./src/audio-player/index.js ***!
|
|
\***********************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
|
|
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/audio-player/style.scss");
|
|
/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/audio-player/edit.js");
|
|
/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/audio-player/save.js");
|
|
/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/audio-player/block.json");
|
|
|
|
|
|
|
|
|
|
|
|
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, {
|
|
/**
|
|
* @see ./edit.js
|
|
*/
|
|
edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
/**
|
|
* @see ./save.js
|
|
*/
|
|
save: _save__WEBPACK_IMPORTED_MODULE_3__["default"]
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/audio-player/save.js":
|
|
/*!**********************************!*\
|
|
!*** ./src/audio-player/save.js ***!
|
|
\**********************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "default": () => (/* binding */ save)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
|
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
|
|
|
|
|
function save({
|
|
attributes
|
|
}) {
|
|
const {
|
|
audioUrl,
|
|
title,
|
|
caption
|
|
} = attributes;
|
|
if (!audioUrl) {
|
|
return null;
|
|
}
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
|
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({
|
|
className: "audio-player"
|
|
}),
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.RichText.Content, {
|
|
value: title,
|
|
className: "audio-player__title",
|
|
tagName: "h4"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("audio", {
|
|
className: "js-plyr",
|
|
src: audioUrl,
|
|
preload: "metadata",
|
|
children: "Votre navigateur ne supporte pas l'\xE9l\xE9ment audio."
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p", {
|
|
className: "audio-player__details",
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
|
className: "audio-player__details__label",
|
|
children: "Audio"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
|
className: "audio-player__details__caption",
|
|
children: caption !== null && caption !== void 0 ? caption : ""
|
|
})]
|
|
})]
|
|
});
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./src/audio-player/style.scss":
|
|
/*!*************************************!*\
|
|
!*** ./src/audio-player/style.scss ***!
|
|
\*************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "@wordpress/block-editor":
|
|
/*!*************************************!*\
|
|
!*** external ["wp","blockEditor"] ***!
|
|
\*************************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = window["wp"]["blockEditor"];
|
|
|
|
/***/ }),
|
|
|
|
/***/ "@wordpress/blocks":
|
|
/*!********************************!*\
|
|
!*** external ["wp","blocks"] ***!
|
|
\********************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = window["wp"]["blocks"];
|
|
|
|
/***/ }),
|
|
|
|
/***/ "@wordpress/components":
|
|
/*!************************************!*\
|
|
!*** external ["wp","components"] ***!
|
|
\************************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = window["wp"]["components"];
|
|
|
|
/***/ }),
|
|
|
|
/***/ "@wordpress/core-data":
|
|
/*!**********************************!*\
|
|
!*** external ["wp","coreData"] ***!
|
|
\**********************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = window["wp"]["coreData"];
|
|
|
|
/***/ }),
|
|
|
|
/***/ "@wordpress/data":
|
|
/*!******************************!*\
|
|
!*** external ["wp","data"] ***!
|
|
\******************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = window["wp"]["data"];
|
|
|
|
/***/ }),
|
|
|
|
/***/ "@wordpress/element":
|
|
/*!*********************************!*\
|
|
!*** external ["wp","element"] ***!
|
|
\*********************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = window["wp"]["element"];
|
|
|
|
/***/ }),
|
|
|
|
/***/ "@wordpress/i18n":
|
|
/*!******************************!*\
|
|
!*** external ["wp","i18n"] ***!
|
|
\******************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = window["wp"]["i18n"];
|
|
|
|
/***/ }),
|
|
|
|
/***/ "react/jsx-runtime":
|
|
/*!**********************************!*\
|
|
!*** external "ReactJSXRuntime" ***!
|
|
\**********************************/
|
|
/***/ ((module) => {
|
|
|
|
module.exports = window["ReactJSXRuntime"];
|
|
|
|
/***/ })
|
|
|
|
/******/ });
|
|
/************************************************************************/
|
|
/******/ // The module cache
|
|
/******/ var __webpack_module_cache__ = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/ // Check if module is in cache
|
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
/******/ if (cachedModule !== undefined) {
|
|
/******/ return cachedModule.exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
/******/ // no module.id needed
|
|
/******/ // no module.loaded needed
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = __webpack_modules__;
|
|
/******/
|
|
/************************************************************************/
|
|
/******/ /* webpack/runtime/chunk loaded */
|
|
/******/ (() => {
|
|
/******/ var deferred = [];
|
|
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
|
/******/ if(chunkIds) {
|
|
/******/ priority = priority || 0;
|
|
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
|
/******/ deferred[i] = [chunkIds, fn, priority];
|
|
/******/ return;
|
|
/******/ }
|
|
/******/ var notFulfilled = Infinity;
|
|
/******/ for (var i = 0; i < deferred.length; i++) {
|
|
/******/ var [chunkIds, fn, priority] = deferred[i];
|
|
/******/ var fulfilled = true;
|
|
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
|
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
|
/******/ chunkIds.splice(j--, 1);
|
|
/******/ } else {
|
|
/******/ fulfilled = false;
|
|
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
|
/******/ }
|
|
/******/ }
|
|
/******/ if(fulfilled) {
|
|
/******/ deferred.splice(i--, 1)
|
|
/******/ var r = fn();
|
|
/******/ if (r !== undefined) result = r;
|
|
/******/ }
|
|
/******/ }
|
|
/******/ return result;
|
|
/******/ };
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/compat get default export */
|
|
/******/ (() => {
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = (module) => {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ () => (module['default']) :
|
|
/******/ () => (module);
|
|
/******/ __webpack_require__.d(getter, { a: getter });
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/define property getters */
|
|
/******/ (() => {
|
|
/******/ // define getter functions for harmony exports
|
|
/******/ __webpack_require__.d = (exports, definition) => {
|
|
/******/ for(var key in definition) {
|
|
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
/******/ }
|
|
/******/ }
|
|
/******/ };
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
/******/ (() => {
|
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/make namespace object */
|
|
/******/ (() => {
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = (exports) => {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/ })();
|
|
/******/
|
|
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
/******/ (() => {
|
|
/******/ // no baseURI
|
|
/******/
|
|
/******/ // object to store loaded and loading chunks
|
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
/******/ var installedChunks = {
|
|
/******/ "audio-player/index": 0,
|
|
/******/ "audio-player/style-index": 0
|
|
/******/ };
|
|
/******/
|
|
/******/ // no chunk on demand loading
|
|
/******/
|
|
/******/ // no prefetching
|
|
/******/
|
|
/******/ // no preloaded
|
|
/******/
|
|
/******/ // no HMR
|
|
/******/
|
|
/******/ // no HMR manifest
|
|
/******/
|
|
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
|
/******/
|
|
/******/ // install a JSONP callback for chunk loading
|
|
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
/******/ // add "moreModules" to the modules object,
|
|
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
/******/ var moduleId, chunkId, i = 0;
|
|
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
/******/ for(moduleId in moreModules) {
|
|
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
/******/ }
|
|
/******/ }
|
|
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
/******/ }
|
|
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
/******/ for(;i < chunkIds.length; i++) {
|
|
/******/ chunkId = chunkIds[i];
|
|
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
/******/ installedChunks[chunkId][0]();
|
|
/******/ }
|
|
/******/ installedChunks[chunkId] = 0;
|
|
/******/ }
|
|
/******/ return __webpack_require__.O(result);
|
|
/******/ }
|
|
/******/
|
|
/******/ var chunkLoadingGlobal = globalThis["webpackChunkcarhop_blocks"] = globalThis["webpackChunkcarhop_blocks"] || [];
|
|
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
/******/ })();
|
|
/******/
|
|
/************************************************************************/
|
|
/******/
|
|
/******/ // startup
|
|
/******/ // Load entry module and return exports
|
|
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
|
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["audio-player/style-index"], () => (__webpack_require__("./src/audio-player/index.js")))
|
|
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
|
|
/******/
|
|
/******/ })()
|
|
;
|
|
//# sourceMappingURL=index.js.map
|