| 1 |
/******/ (function() { // webpackBootstrap |
| 2 |
/******/ "use strict"; |
| 3 |
/******/ var __webpack_modules__ = ({ |
| 4 |
|
| 5 |
/***/ "./node_modules/react-dom/client.js": |
| 6 |
/*!******************************************!*\ |
| 7 |
!*** ./node_modules/react-dom/client.js ***! |
| 8 |
\******************************************/ |
| 9 |
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
var m = __webpack_require__(/*! react-dom */ "react-dom"); |
| 14 |
if (false) {} else { |
| 15 |
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 16 |
exports.createRoot = function(c, o) { |
| 17 |
i.usingClientEntryPoint = true; |
| 18 |
try { |
| 19 |
return m.createRoot(c, o); |
| 20 |
} finally { |
| 21 |
i.usingClientEntryPoint = false; |
| 22 |
} |
| 23 |
}; |
| 24 |
exports.hydrateRoot = function(c, h, o) { |
| 25 |
i.usingClientEntryPoint = true; |
| 26 |
try { |
| 27 |
return m.hydrateRoot(c, h, o); |
| 28 |
} finally { |
| 29 |
i.usingClientEntryPoint = false; |
| 30 |
} |
| 31 |
}; |
| 32 |
} |
| 33 |
|
| 34 |
|
| 35 |
/***/ }), |
| 36 |
|
| 37 |
/***/ "react": |
| 38 |
/*!**************************!*\ |
| 39 |
!*** external ["React"] ***! |
| 40 |
\**************************/ |
| 41 |
/***/ (function(module) { |
| 42 |
|
| 43 |
module.exports = window["React"]; |
| 44 |
|
| 45 |
/***/ }), |
| 46 |
|
| 47 |
/***/ "react-dom": |
| 48 |
/*!*****************************!*\ |
| 49 |
!*** external ["ReactDOM"] ***! |
| 50 |
\*****************************/ |
| 51 |
/***/ (function(module) { |
| 52 |
|
| 53 |
module.exports = window["ReactDOM"]; |
| 54 |
|
| 55 |
/***/ }), |
| 56 |
|
| 57 |
/***/ "@elementor/editor-documents": |
| 58 |
/*!**************************************************!*\ |
| 59 |
!*** external ["elementorV2","editorDocuments"] ***! |
| 60 |
\**************************************************/ |
| 61 |
/***/ (function(module) { |
| 62 |
|
| 63 |
module.exports = window["elementorV2"]["editorDocuments"]; |
| 64 |
|
| 65 |
/***/ }), |
| 66 |
|
| 67 |
/***/ "@elementor/editor-v1-adapters": |
| 68 |
/*!***************************************************!*\ |
| 69 |
!*** external ["elementorV2","editorV1Adapters"] ***! |
| 70 |
\***************************************************/ |
| 71 |
/***/ (function(module) { |
| 72 |
|
| 73 |
module.exports = window["elementorV2"]["editorV1Adapters"]; |
| 74 |
|
| 75 |
/***/ }), |
| 76 |
|
| 77 |
/***/ "@elementor/locations": |
| 78 |
/*!********************************************!*\ |
| 79 |
!*** external ["elementorV2","locations"] ***! |
| 80 |
\********************************************/ |
| 81 |
/***/ (function(module) { |
| 82 |
|
| 83 |
module.exports = window["elementorV2"]["locations"]; |
| 84 |
|
| 85 |
/***/ }), |
| 86 |
|
| 87 |
/***/ "@elementor/query": |
| 88 |
/*!****************************************!*\ |
| 89 |
!*** external ["elementorV2","query"] ***! |
| 90 |
\****************************************/ |
| 91 |
/***/ (function(module) { |
| 92 |
|
| 93 |
module.exports = window["elementorV2"]["query"]; |
| 94 |
|
| 95 |
/***/ }), |
| 96 |
|
| 97 |
/***/ "@elementor/store": |
| 98 |
/*!****************************************!*\ |
| 99 |
!*** external ["elementorV2","store"] ***! |
| 100 |
\****************************************/ |
| 101 |
/***/ (function(module) { |
| 102 |
|
| 103 |
module.exports = window["elementorV2"]["store"]; |
| 104 |
|
| 105 |
/***/ }), |
| 106 |
|
| 107 |
/***/ "@elementor/ui": |
| 108 |
/*!*************************************!*\ |
| 109 |
!*** external ["elementorV2","ui"] ***! |
| 110 |
\*************************************/ |
| 111 |
/***/ (function(module) { |
| 112 |
|
| 113 |
module.exports = window["elementorV2"]["ui"]; |
| 114 |
|
| 115 |
/***/ }), |
| 116 |
|
| 117 |
/***/ "@wordpress/i18n": |
| 118 |
/*!******************************!*\ |
| 119 |
!*** external ["wp","i18n"] ***! |
| 120 |
\******************************/ |
| 121 |
/***/ (function(module) { |
| 122 |
|
| 123 |
module.exports = window["wp"]["i18n"]; |
| 124 |
|
| 125 |
/***/ }) |
| 126 |
|
| 127 |
/******/ }); |
| 128 |
/************************************************************************/ |
| 129 |
/******/ // The module cache |
| 130 |
/******/ var __webpack_module_cache__ = {}; |
| 131 |
/******/ |
| 132 |
/******/ // The require function |
| 133 |
/******/ function __webpack_require__(moduleId) { |
| 134 |
/******/ // Check if module is in cache |
| 135 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 136 |
/******/ if (cachedModule !== undefined) { |
| 137 |
/******/ return cachedModule.exports; |
| 138 |
/******/ } |
| 139 |
/******/ // Create a new module (and put it into the cache) |
| 140 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 141 |
/******/ // no module.id needed |
| 142 |
/******/ // no module.loaded needed |
| 143 |
/******/ exports: {} |
| 144 |
/******/ }; |
| 145 |
/******/ |
| 146 |
/******/ // Execute the module function |
| 147 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 148 |
/******/ |
| 149 |
/******/ // Return the exports of the module |
| 150 |
/******/ return module.exports; |
| 151 |
/******/ } |
| 152 |
/******/ |
| 153 |
/************************************************************************/ |
| 154 |
/******/ /* webpack/runtime/define property getters */ |
| 155 |
/******/ !function() { |
| 156 |
/******/ // define getter functions for harmony exports |
| 157 |
/******/ __webpack_require__.d = function(exports, definition) { |
| 158 |
/******/ for(var key in definition) { |
| 159 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 160 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 161 |
/******/ } |
| 162 |
/******/ } |
| 163 |
/******/ }; |
| 164 |
/******/ }(); |
| 165 |
/******/ |
| 166 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 167 |
/******/ !function() { |
| 168 |
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } |
| 169 |
/******/ }(); |
| 170 |
/******/ |
| 171 |
/******/ /* webpack/runtime/make namespace object */ |
| 172 |
/******/ !function() { |
| 173 |
/******/ // define __esModule on exports |
| 174 |
/******/ __webpack_require__.r = function(exports) { |
| 175 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| 176 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 177 |
/******/ } |
| 178 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 179 |
/******/ }; |
| 180 |
/******/ }(); |
| 181 |
/******/ |
| 182 |
/************************************************************************/ |
| 183 |
var __webpack_exports__ = {}; |
| 184 |
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. |
| 185 |
!function() { |
| 186 |
/*!*******************************************************!*\ |
| 187 |
!*** ./node_modules/@elementor/editor/dist/index.mjs ***! |
| 188 |
\*******************************************************/ |
| 189 |
__webpack_require__.r(__webpack_exports__); |
| 190 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 191 |
/* harmony export */ init: function() { return /* binding */ init; }, |
| 192 |
/* harmony export */ injectIntoTop: function() { return /* binding */ injectIntoTop; } |
| 193 |
/* harmony export */ }); |
| 194 |
/* harmony import */ var _elementor_locations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/locations */ "@elementor/locations"); |
| 195 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); |
| 196 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom"); |
| 197 |
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js"); |
| 198 |
/* harmony import */ var _elementor_editor_documents__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @elementor/editor-documents */ "@elementor/editor-documents"); |
| 199 |
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 200 |
/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 201 |
/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @elementor/store */ "@elementor/store"); |
| 202 |
/* harmony import */ var _elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); |
| 203 |
/* harmony import */ var _elementor_query__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @elementor/query */ "@elementor/query"); |
| 204 |
// src/locations.ts |
| 205 |
|
| 206 |
var { |
| 207 |
Slot: TopSlot, |
| 208 |
inject: injectIntoTop |
| 209 |
} = (0,_elementor_locations__WEBPACK_IMPORTED_MODULE_0__.createLocation)(); |
| 210 |
|
| 211 |
// src/init.tsx |
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
// src/components/shell.tsx |
| 217 |
|
| 218 |
|
| 219 |
// src/hooks/use-sync-document-title.ts |
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
function useSyncDocumentTitle() { |
| 224 |
const activeDocument = (0,_elementor_editor_documents__WEBPACK_IMPORTED_MODULE_4__.useActiveDocument)(); |
| 225 |
const hostDocument = (0,_elementor_editor_documents__WEBPACK_IMPORTED_MODULE_4__.useHostDocument)(); |
| 226 |
const document = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument; |
| 227 |
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 228 |
if (document?.title === void 0) { |
| 229 |
return; |
| 230 |
} |
| 231 |
const title = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Edit "%s" with Elementor', "elementor").replace("%s", document.title); |
| 232 |
window.document.title = title; |
| 233 |
}, [document?.title]); |
| 234 |
} |
| 235 |
|
| 236 |
// src/components/shell.tsx |
| 237 |
function Shell() { |
| 238 |
useSyncDocumentTitle(); |
| 239 |
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_1__.createElement(TopSlot, null); |
| 240 |
} |
| 241 |
|
| 242 |
// src/init.tsx |
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
// src/components/theme-provider.tsx |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
// src/sync/use-color-scheme.ts |
| 252 |
|
| 253 |
|
| 254 |
function useColorScheme() { |
| 255 |
const [colorScheme, setColorScheme] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(() => getV1ColorScheme()); |
| 256 |
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 257 |
return (0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_8__.listenTo)( |
| 258 |
(0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_8__.v1ReadyEvent)(), |
| 259 |
() => setColorScheme(getV1ColorScheme()) |
| 260 |
); |
| 261 |
}, []); |
| 262 |
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 263 |
return (0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_8__.listenTo)( |
| 264 |
(0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_8__.commandEndEvent)("document/elements/settings"), |
| 265 |
(e) => { |
| 266 |
const event = e; |
| 267 |
const isColorScheme = event.args?.settings && "ui_theme" in event.args.settings; |
| 268 |
if (isColorScheme) { |
| 269 |
setColorScheme(getV1ColorScheme()); |
| 270 |
} |
| 271 |
} |
| 272 |
); |
| 273 |
}, []); |
| 274 |
return colorScheme; |
| 275 |
} |
| 276 |
function getV1ColorScheme() { |
| 277 |
return window.elementor?.getPreferences?.("ui_theme") || "auto"; |
| 278 |
} |
| 279 |
|
| 280 |
// src/components/theme-provider.tsx |
| 281 |
function ThemeProvider({ children }) { |
| 282 |
const colorScheme = useColorScheme(); |
| 283 |
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_6__.ThemeProvider, { colorScheme }, children); |
| 284 |
} |
| 285 |
|
| 286 |
// src/init.tsx |
| 287 |
|
| 288 |
function init(domElement) { |
| 289 |
const store = (0,_elementor_store__WEBPACK_IMPORTED_MODULE_7__.createStore)(); |
| 290 |
const queryClient = (0,_elementor_query__WEBPACK_IMPORTED_MODULE_9__.createQueryClient)(); |
| 291 |
(0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_8__.dispatchReadyEvent)(); |
| 292 |
render2(/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_elementor_store__WEBPACK_IMPORTED_MODULE_7__.StoreProvider, { store }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_elementor_query__WEBPACK_IMPORTED_MODULE_9__.QueryClientProvider, { client: queryClient }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_6__.DirectionProvider, { rtl: window.document.dir === "rtl" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_1__.createElement(ThemeProvider, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_1__.createElement(Shell, null))))), domElement); |
| 293 |
} |
| 294 |
function render2(app, domElement) { |
| 295 |
let renderFn; |
| 296 |
try { |
| 297 |
const root = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_3__.createRoot)(domElement); |
| 298 |
renderFn = () => { |
| 299 |
root.render(app); |
| 300 |
}; |
| 301 |
} catch (e) { |
| 302 |
renderFn = () => { |
| 303 |
react_dom__WEBPACK_IMPORTED_MODULE_2__.render(app, domElement); |
| 304 |
}; |
| 305 |
} |
| 306 |
renderFn(); |
| 307 |
} |
| 308 |
|
| 309 |
//# sourceMappingURL=index.mjs.map |
| 310 |
}(); |
| 311 |
(window.elementorV2 = window.elementorV2 || {}).editor = __webpack_exports__; |
| 312 |
/******/ })() |
| 313 |
; |