← All changes
|
assets/js/packages/editor-ui/editor-ui.js
+3
-3735
4.2.0-beta1
→
3.35.0-dev2
View file →
| @@ -1,3740 +1,8 @@ | ||
| 1 | -/******/ (function() { // webpackBootstrap | |
| 2 | -/******/ "use strict"; | |
| 3 | -/******/ var __webpack_modules__ = ({ | |
| 4 | - | |
| 5 | -/***/ "./packages/node_modules/@tanstack/react-virtual/dist/esm/index.js": | |
| 6 | -/*!*************************************************************************!*\ | |
| 7 | - !*** ./packages/node_modules/@tanstack/react-virtual/dist/esm/index.js ***! | |
| 8 | - \*************************************************************************/ | |
| 9 | -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { | |
| 10 | - | |
| 11 | -__webpack_require__.r(__webpack_exports__); | |
| 12 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 13 | -/* harmony export */ Virtualizer: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.Virtualizer; }, | |
| 14 | -/* harmony export */ approxEqual: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.approxEqual; }, | |
| 15 | -/* harmony export */ debounce: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.debounce; }, | |
| 16 | -/* harmony export */ defaultKeyExtractor: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.defaultKeyExtractor; }, | |
| 17 | -/* harmony export */ defaultRangeExtractor: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.defaultRangeExtractor; }, | |
| 18 | -/* harmony export */ elementScroll: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.elementScroll; }, | |
| 19 | -/* harmony export */ measureElement: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.measureElement; }, | |
| 20 | -/* harmony export */ memo: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.memo; }, | |
| 21 | -/* harmony export */ notUndefined: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.notUndefined; }, | |
| 22 | -/* harmony export */ observeElementOffset: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.observeElementOffset; }, | |
| 23 | -/* harmony export */ observeElementRect: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.observeElementRect; }, | |
| 24 | -/* harmony export */ observeWindowOffset: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.observeWindowOffset; }, | |
| 25 | -/* harmony export */ observeWindowRect: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.observeWindowRect; }, | |
| 26 | -/* harmony export */ useVirtualizer: function() { return /* binding */ useVirtualizer; }, | |
| 27 | -/* harmony export */ useWindowVirtualizer: function() { return /* binding */ useWindowVirtualizer; }, | |
| 28 | -/* harmony export */ windowScroll: function() { return /* reexport safe */ _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.windowScroll; } | |
| 29 | -/* harmony export */ }); | |
| 30 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 31 | -/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 32 | -/* harmony import */ var _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tanstack/virtual-core */ "./packages/node_modules/@tanstack/virtual-core/dist/esm/index.js"); | |
| 33 | - | |
| 34 | - | |
| 35 | - | |
| 36 | - | |
| 37 | -const useIsomorphicLayoutEffect = typeof document !== "undefined" ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect; | |
| 38 | -function useVirtualizerBase({ | |
| 39 | - useFlushSync = true, | |
| 40 | - ...options | |
| 41 | -}) { | |
| 42 | - const rerender = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(() => ({}), {})[1]; | |
| 43 | - const resolvedOptions = { | |
| 44 | - ...options, | |
| 45 | - onChange: (instance2, sync) => { | |
| 46 | - var _a; | |
| 47 | - if (useFlushSync && sync) { | |
| 48 | - (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync)(rerender); | |
| 49 | - } else { | |
| 50 | - rerender(); | |
| 51 | - } | |
| 52 | - (_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync); | |
| 53 | - } | |
| 54 | - }; | |
| 55 | - const [instance] = react__WEBPACK_IMPORTED_MODULE_0__.useState( | |
| 56 | - () => new _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.Virtualizer(resolvedOptions) | |
| 57 | - ); | |
| 58 | - instance.setOptions(resolvedOptions); | |
| 59 | - useIsomorphicLayoutEffect(() => { | |
| 60 | - return instance._didMount(); | |
| 61 | - }, []); | |
| 62 | - useIsomorphicLayoutEffect(() => { | |
| 63 | - return instance._willUpdate(); | |
| 64 | - }); | |
| 65 | - return instance; | |
| 66 | -} | |
| 67 | -function useVirtualizer(options) { | |
| 68 | - return useVirtualizerBase({ | |
| 69 | - observeElementRect: _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.observeElementRect, | |
| 70 | - observeElementOffset: _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.observeElementOffset, | |
| 71 | - scrollToFn: _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.elementScroll, | |
| 72 | - ...options | |
| 73 | - }); | |
| 74 | -} | |
| 75 | -function useWindowVirtualizer(options) { | |
| 76 | - return useVirtualizerBase({ | |
| 77 | - getScrollElement: () => typeof document !== "undefined" ? window : null, | |
| 78 | - observeElementRect: _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.observeWindowRect, | |
| 79 | - observeElementOffset: _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.observeWindowOffset, | |
| 80 | - scrollToFn: _tanstack_virtual_core__WEBPACK_IMPORTED_MODULE_2__.windowScroll, | |
| 81 | - initialOffset: () => typeof document !== "undefined" ? window.scrollY : 0, | |
| 82 | - ...options | |
| 83 | - }); | |
| 84 | -} | |
| 85 | - | |
| 86 | -//# sourceMappingURL=index.js.map | |
| 87 | - | |
| 88 | - | |
| 89 | -/***/ }), | |
| 90 | - | |
| 91 | -/***/ "./packages/node_modules/@tanstack/virtual-core/dist/esm/index.js": | |
| 92 | -/*!************************************************************************!*\ | |
| 93 | - !*** ./packages/node_modules/@tanstack/virtual-core/dist/esm/index.js ***! | |
| 94 | - \************************************************************************/ | |
| 95 | -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { | |
| 96 | - | |
| 97 | -__webpack_require__.r(__webpack_exports__); | |
| 98 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 99 | -/* harmony export */ Virtualizer: function() { return /* binding */ Virtualizer; }, | |
| 100 | -/* harmony export */ approxEqual: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_0__.approxEqual; }, | |
| 101 | -/* harmony export */ debounce: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_0__.debounce; }, | |
| 102 | -/* harmony export */ defaultKeyExtractor: function() { return /* binding */ defaultKeyExtractor; }, | |
| 103 | -/* harmony export */ defaultRangeExtractor: function() { return /* binding */ defaultRangeExtractor; }, | |
| 104 | -/* harmony export */ elementScroll: function() { return /* binding */ elementScroll; }, | |
| 105 | -/* harmony export */ measureElement: function() { return /* binding */ measureElement; }, | |
| 106 | -/* harmony export */ memo: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_0__.memo; }, | |
| 107 | -/* harmony export */ notUndefined: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_0__.notUndefined; }, | |
| 108 | -/* harmony export */ observeElementOffset: function() { return /* binding */ observeElementOffset; }, | |
| 109 | -/* harmony export */ observeElementRect: function() { return /* binding */ observeElementRect; }, | |
| 110 | -/* harmony export */ observeWindowOffset: function() { return /* binding */ observeWindowOffset; }, | |
| 111 | -/* harmony export */ observeWindowRect: function() { return /* binding */ observeWindowRect; }, | |
| 112 | -/* harmony export */ windowScroll: function() { return /* binding */ windowScroll; } | |
| 113 | -/* harmony export */ }); | |
| 114 | -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./packages/node_modules/@tanstack/virtual-core/dist/esm/utils.js"); | |
| 115 | - | |
| 116 | -const getRect = (element) => { | |
| 117 | - const { offsetWidth, offsetHeight } = element; | |
| 118 | - return { width: offsetWidth, height: offsetHeight }; | |
| 119 | -}; | |
| 120 | -const defaultKeyExtractor = (index) => index; | |
| 121 | -const defaultRangeExtractor = (range) => { | |
| 122 | - const start = Math.max(range.startIndex - range.overscan, 0); | |
| 123 | - const end = Math.min(range.endIndex + range.overscan, range.count - 1); | |
| 124 | - const arr = []; | |
| 125 | - for (let i = start; i <= end; i++) { | |
| 126 | - arr.push(i); | |
| 127 | - } | |
| 128 | - return arr; | |
| 129 | -}; | |
| 130 | -const observeElementRect = (instance, cb) => { | |
| 131 | - const element = instance.scrollElement; | |
| 132 | - if (!element) { | |
| 133 | - return; | |
| 134 | - } | |
| 135 | - const targetWindow = instance.targetWindow; | |
| 136 | - if (!targetWindow) { | |
| 137 | - return; | |
| 138 | - } | |
| 139 | - const handler = (rect) => { | |
| 140 | - const { width, height } = rect; | |
| 141 | - cb({ width: Math.round(width), height: Math.round(height) }); | |
| 142 | - }; | |
| 143 | - handler(getRect(element)); | |
| 144 | - if (!targetWindow.ResizeObserver) { | |
| 145 | - return () => { | |
| 146 | - }; | |
| 147 | - } | |
| 148 | - const observer = new targetWindow.ResizeObserver((entries) => { | |
| 149 | - const run = () => { | |
| 150 | - const entry = entries[0]; | |
| 151 | - if (entry == null ? void 0 : entry.borderBoxSize) { | |
| 152 | - const box = entry.borderBoxSize[0]; | |
| 153 | - if (box) { | |
| 154 | - handler({ width: box.inlineSize, height: box.blockSize }); | |
| 155 | - return; | |
| 156 | - } | |
| 157 | - } | |
| 158 | - handler(getRect(element)); | |
| 159 | - }; | |
| 160 | - instance.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run(); | |
| 161 | - }); | |
| 162 | - observer.observe(element, { box: "border-box" }); | |
| 163 | - return () => { | |
| 164 | - observer.unobserve(element); | |
| 165 | - }; | |
| 166 | -}; | |
| 167 | -const addEventListenerOptions = { | |
| 168 | - passive: true | |
| 169 | -}; | |
| 170 | -const observeWindowRect = (instance, cb) => { | |
| 171 | - const element = instance.scrollElement; | |
| 172 | - if (!element) { | |
| 173 | - return; | |
| 174 | - } | |
| 175 | - const handler = () => { | |
| 176 | - cb({ width: element.innerWidth, height: element.innerHeight }); | |
| 177 | - }; | |
| 178 | - handler(); | |
| 179 | - element.addEventListener("resize", handler, addEventListenerOptions); | |
| 180 | - return () => { | |
| 181 | - element.removeEventListener("resize", handler); | |
| 182 | - }; | |
| 183 | -}; | |
| 184 | -const supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window; | |
| 185 | -const observeElementOffset = (instance, cb) => { | |
| 186 | - const element = instance.scrollElement; | |
| 187 | - if (!element) { | |
| 188 | - return; | |
| 189 | - } | |
| 190 | - const targetWindow = instance.targetWindow; | |
| 191 | - if (!targetWindow) { | |
| 192 | - return; | |
| 193 | - } | |
| 194 | - let offset = 0; | |
| 195 | - const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.debounce)( | |
| 196 | - targetWindow, | |
| 197 | - () => { | |
| 198 | - cb(offset, false); | |
| 199 | - }, | |
| 200 | - instance.options.isScrollingResetDelay | |
| 201 | - ); | |
| 202 | - const createHandler = (isScrolling) => () => { | |
| 203 | - const { horizontal, isRtl } = instance.options; | |
| 204 | - offset = horizontal ? element["scrollLeft"] * (isRtl && -1 || 1) : element["scrollTop"]; | |
| 205 | - fallback(); | |
| 206 | - cb(offset, isScrolling); | |
| 207 | - }; | |
| 208 | - const handler = createHandler(true); | |
| 209 | - const endHandler = createHandler(false); | |
| 210 | - element.addEventListener("scroll", handler, addEventListenerOptions); | |
| 211 | - const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend; | |
| 212 | - if (registerScrollendEvent) { | |
| 213 | - element.addEventListener("scrollend", endHandler, addEventListenerOptions); | |
| 214 | - } | |
| 215 | - return () => { | |
| 216 | - element.removeEventListener("scroll", handler); | |
| 217 | - if (registerScrollendEvent) { | |
| 218 | - element.removeEventListener("scrollend", endHandler); | |
| 219 | - } | |
| 220 | - }; | |
| 221 | -}; | |
| 222 | -const observeWindowOffset = (instance, cb) => { | |
| 223 | - const element = instance.scrollElement; | |
| 224 | - if (!element) { | |
| 225 | - return; | |
| 226 | - } | |
| 227 | - const targetWindow = instance.targetWindow; | |
| 228 | - if (!targetWindow) { | |
| 229 | - return; | |
| 230 | - } | |
| 231 | - let offset = 0; | |
| 232 | - const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.debounce)( | |
| 233 | - targetWindow, | |
| 234 | - () => { | |
| 235 | - cb(offset, false); | |
| 236 | - }, | |
| 237 | - instance.options.isScrollingResetDelay | |
| 238 | - ); | |
| 239 | - const createHandler = (isScrolling) => () => { | |
| 240 | - offset = element[instance.options.horizontal ? "scrollX" : "scrollY"]; | |
| 241 | - fallback(); | |
| 242 | - cb(offset, isScrolling); | |
| 243 | - }; | |
| 244 | - const handler = createHandler(true); | |
| 245 | - const endHandler = createHandler(false); | |
| 246 | - element.addEventListener("scroll", handler, addEventListenerOptions); | |
| 247 | - const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend; | |
| 248 | - if (registerScrollendEvent) { | |
| 249 | - element.addEventListener("scrollend", endHandler, addEventListenerOptions); | |
| 250 | - } | |
| 251 | - return () => { | |
| 252 | - element.removeEventListener("scroll", handler); | |
| 253 | - if (registerScrollendEvent) { | |
| 254 | - element.removeEventListener("scrollend", endHandler); | |
| 255 | - } | |
| 256 | - }; | |
| 257 | -}; | |
| 258 | -const measureElement = (element, entry, instance) => { | |
| 259 | - if (entry == null ? void 0 : entry.borderBoxSize) { | |
| 260 | - const box = entry.borderBoxSize[0]; | |
| 261 | - if (box) { | |
| 262 | - const size = Math.round( | |
| 263 | - box[instance.options.horizontal ? "inlineSize" : "blockSize"] | |
| 264 | - ); | |
| 265 | - return size; | |
| 266 | - } | |
| 267 | - } | |
| 268 | - return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"]; | |
| 269 | -}; | |
| 270 | -const windowScroll = (offset, { | |
| 271 | - adjustments = 0, | |
| 272 | - behavior | |
| 273 | -}, instance) => { | |
| 274 | - var _a, _b; | |
| 275 | - const toOffset = offset + adjustments; | |
| 276 | - (_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, { | |
| 277 | - [instance.options.horizontal ? "left" : "top"]: toOffset, | |
| 278 | - behavior | |
| 279 | - }); | |
| 280 | -}; | |
| 281 | -const elementScroll = (offset, { | |
| 282 | - adjustments = 0, | |
| 283 | - behavior | |
| 284 | -}, instance) => { | |
| 285 | - var _a, _b; | |
| 286 | - const toOffset = offset + adjustments; | |
| 287 | - (_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, { | |
| 288 | - [instance.options.horizontal ? "left" : "top"]: toOffset, | |
| 289 | - behavior | |
| 290 | - }); | |
| 291 | -}; | |
| 292 | -class Virtualizer { | |
| 293 | - constructor(opts) { | |
| 294 | - this.unsubs = []; | |
| 295 | - this.scrollElement = null; | |
| 296 | - this.targetWindow = null; | |
| 297 | - this.isScrolling = false; | |
| 298 | - this.scrollState = null; | |
| 299 | - this.measurementsCache = []; | |
| 300 | - this.itemSizeCache = /* @__PURE__ */ new Map(); | |
| 301 | - this.laneAssignments = /* @__PURE__ */ new Map(); | |
| 302 | - this.pendingMeasuredCacheIndexes = []; | |
| 303 | - this.prevLanes = void 0; | |
| 304 | - this.lanesChangedFlag = false; | |
| 305 | - this.lanesSettling = false; | |
| 306 | - this.scrollRect = null; | |
| 307 | - this.scrollOffset = null; | |
| 308 | - this.scrollDirection = null; | |
| 309 | - this.scrollAdjustments = 0; | |
| 310 | - this.elementsCache = /* @__PURE__ */ new Map(); | |
| 311 | - this.now = () => { | |
| 312 | - var _a, _b, _c; | |
| 313 | - return ((_c = (_b = (_a = this.targetWindow) == null ? void 0 : _a.performance) == null ? void 0 : _b.now) == null ? void 0 : _c.call(_b)) ?? Date.now(); | |
| 314 | - }; | |
| 315 | - this.observer = /* @__PURE__ */ (() => { | |
| 316 | - let _ro = null; | |
| 317 | - const get = () => { | |
| 318 | - if (_ro) { | |
| 319 | - return _ro; | |
| 320 | - } | |
| 321 | - if (!this.targetWindow || !this.targetWindow.ResizeObserver) { | |
| 322 | - return null; | |
| 323 | - } | |
| 324 | - return _ro = new this.targetWindow.ResizeObserver((entries) => { | |
| 325 | - entries.forEach((entry) => { | |
| 326 | - const run = () => { | |
| 327 | - const node = entry.target; | |
| 328 | - const index = this.indexFromElement(node); | |
| 329 | - if (!node.isConnected) { | |
| 330 | - this.observer.unobserve(node); | |
| 331 | - return; | |
| 332 | - } | |
| 333 | - if (this.shouldMeasureDuringScroll(index)) { | |
| 334 | - this.resizeItem( | |
| 335 | - index, | |
| 336 | - this.options.measureElement(node, entry, this) | |
| 337 | - ); | |
| 338 | - } | |
| 339 | - }; | |
| 340 | - this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run(); | |
| 341 | - }); | |
| 342 | - }); | |
| 343 | - }; | |
| 344 | - return { | |
| 345 | - disconnect: () => { | |
| 346 | - var _a; | |
| 347 | - (_a = get()) == null ? void 0 : _a.disconnect(); | |
| 348 | - _ro = null; | |
| 349 | - }, | |
| 350 | - observe: (target) => { | |
| 351 | - var _a; | |
| 352 | - return (_a = get()) == null ? void 0 : _a.observe(target, { box: "border-box" }); | |
| 353 | - }, | |
| 354 | - unobserve: (target) => { | |
| 355 | - var _a; | |
| 356 | - return (_a = get()) == null ? void 0 : _a.unobserve(target); | |
| 357 | - } | |
| 358 | - }; | |
| 359 | - })(); | |
| 360 | - this.range = null; | |
| 361 | - this.setOptions = (opts2) => { | |
| 362 | - Object.entries(opts2).forEach(([key, value]) => { | |
| 363 | - if (typeof value === "undefined") delete opts2[key]; | |
| 364 | - }); | |
| 365 | - this.options = { | |
| 366 | - debug: false, | |
| 367 | - initialOffset: 0, | |
| 368 | - overscan: 1, | |
| 369 | - paddingStart: 0, | |
| 370 | - paddingEnd: 0, | |
| 371 | - scrollPaddingStart: 0, | |
| 372 | - scrollPaddingEnd: 0, | |
| 373 | - horizontal: false, | |
| 374 | - getItemKey: defaultKeyExtractor, | |
| 375 | - rangeExtractor: defaultRangeExtractor, | |
| 376 | - onChange: () => { | |
| 377 | - }, | |
| 378 | - measureElement, | |
| 379 | - initialRect: { width: 0, height: 0 }, | |
| 380 | - scrollMargin: 0, | |
| 381 | - gap: 0, | |
| 382 | - indexAttribute: "data-index", | |
| 383 | - initialMeasurementsCache: [], | |
| 384 | - lanes: 1, | |
| 385 | - isScrollingResetDelay: 150, | |
| 386 | - enabled: true, | |
| 387 | - isRtl: false, | |
| 388 | - useScrollendEvent: false, | |
| 389 | - useAnimationFrameWithResizeObserver: false, | |
| 390 | - laneAssignmentMode: "estimate", | |
| 391 | - ...opts2 | |
| 392 | - }; | |
| 393 | - }; | |
| 394 | - this.notify = (sync) => { | |
| 395 | - var _a, _b; | |
| 396 | - (_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, this, sync); | |
| 397 | - }; | |
| 398 | - this.maybeNotify = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.memo)( | |
| 399 | - () => { | |
| 400 | - this.calculateRange(); | |
| 401 | - return [ | |
| 402 | - this.isScrolling, | |
| 403 | - this.range ? this.range.startIndex : null, | |
| 404 | - this.range ? this.range.endIndex : null | |
| 405 | - ]; | |
| 406 | - }, | |
| 407 | - (isScrolling) => { | |
| 408 | - this.notify(isScrolling); | |
| 409 | - }, | |
| 410 | - { | |
| 411 | - key: true && "maybeNotify", | |
| 412 | - debug: () => this.options.debug, | |
| 413 | - initialDeps: [ | |
| 414 | - this.isScrolling, | |
| 415 | - this.range ? this.range.startIndex : null, | |
| 416 | - this.range ? this.range.endIndex : null | |
| 417 | - ] | |
| 418 | - } | |
| 419 | - ); | |
| 420 | - this.cleanup = () => { | |
| 421 | - this.unsubs.filter(Boolean).forEach((d) => d()); | |
| 422 | - this.unsubs = []; | |
| 423 | - this.observer.disconnect(); | |
| 424 | - if (this.rafId != null && this.targetWindow) { | |
| 425 | - this.targetWindow.cancelAnimationFrame(this.rafId); | |
| 426 | - this.rafId = null; | |
| 427 | - } | |
| 428 | - this.scrollState = null; | |
| 429 | - this.scrollElement = null; | |
| 430 | - this.targetWindow = null; | |
| 431 | - }; | |
| 432 | - this._didMount = () => { | |
| 433 | - return () => { | |
| 434 | - this.cleanup(); | |
| 435 | - }; | |
| 436 | - }; | |
| 437 | - this._willUpdate = () => { | |
| 438 | - var _a; | |
| 439 | - const scrollElement = this.options.enabled ? this.options.getScrollElement() : null; | |
| 440 | - if (this.scrollElement !== scrollElement) { | |
| 441 | - this.cleanup(); | |
| 442 | - if (!scrollElement) { | |
| 443 | - this.maybeNotify(); | |
| 444 | - return; | |
| 445 | - } | |
| 446 | - this.scrollElement = scrollElement; | |
| 447 | - if (this.scrollElement && "ownerDocument" in this.scrollElement) { | |
| 448 | - this.targetWindow = this.scrollElement.ownerDocument.defaultView; | |
| 449 | - } else { | |
| 450 | - this.targetWindow = ((_a = this.scrollElement) == null ? void 0 : _a.window) ?? null; | |
| 451 | - } | |
| 452 | - this.elementsCache.forEach((cached) => { | |
| 453 | - this.observer.observe(cached); | |
| 454 | - }); | |
| 455 | - this.unsubs.push( | |
| 456 | - this.options.observeElementRect(this, (rect) => { | |
| 457 | - this.scrollRect = rect; | |
| 458 | - this.maybeNotify(); | |
| 459 | - }) | |
| 460 | - ); | |
| 461 | - this.unsubs.push( | |
| 462 | - this.options.observeElementOffset(this, (offset, isScrolling) => { | |
| 463 | - this.scrollAdjustments = 0; | |
| 464 | - this.scrollDirection = isScrolling ? this.getScrollOffset() < offset ? "forward" : "backward" : null; | |
| 465 | - this.scrollOffset = offset; | |
| 466 | - this.isScrolling = isScrolling; | |
| 467 | - if (this.scrollState) { | |
| 468 | - this.scheduleScrollReconcile(); | |
| 469 | - } | |
| 470 | - this.maybeNotify(); | |
| 471 | - }) | |
| 472 | - ); | |
| 473 | - this._scrollToOffset(this.getScrollOffset(), { | |
| 474 | - adjustments: void 0, | |
| 475 | - behavior: void 0 | |
| 476 | - }); | |
| 477 | - } | |
| 478 | - }; | |
| 479 | - this.rafId = null; | |
| 480 | - this.getSize = () => { | |
| 481 | - if (!this.options.enabled) { | |
| 482 | - this.scrollRect = null; | |
| 483 | - return 0; | |
| 484 | - } | |
| 485 | - this.scrollRect = this.scrollRect ?? this.options.initialRect; | |
| 486 | - return this.scrollRect[this.options.horizontal ? "width" : "height"]; | |
| 487 | - }; | |
| 488 | - this.getScrollOffset = () => { | |
| 489 | - if (!this.options.enabled) { | |
| 490 | - this.scrollOffset = null; | |
| 491 | - return 0; | |
| 492 | - } | |
| 493 | - this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset); | |
| 494 | - return this.scrollOffset; | |
| 495 | - }; | |
| 496 | - this.getFurthestMeasurement = (measurements, index) => { | |
| 497 | - const furthestMeasurementsFound = /* @__PURE__ */ new Map(); | |
| 498 | - const furthestMeasurements = /* @__PURE__ */ new Map(); | |
| 499 | - for (let m = index - 1; m >= 0; m--) { | |
| 500 | - const measurement = measurements[m]; | |
| 501 | - if (furthestMeasurementsFound.has(measurement.lane)) { | |
| 502 | - continue; | |
| 503 | - } | |
| 504 | - const previousFurthestMeasurement = furthestMeasurements.get( | |
| 505 | - measurement.lane | |
| 506 | - ); | |
| 507 | - if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) { | |
| 508 | - furthestMeasurements.set(measurement.lane, measurement); | |
| 509 | - } else if (measurement.end < previousFurthestMeasurement.end) { | |
| 510 | - furthestMeasurementsFound.set(measurement.lane, true); | |
| 511 | - } | |
| 512 | - if (furthestMeasurementsFound.size === this.options.lanes) { | |
| 513 | - break; | |
| 514 | - } | |
| 515 | - } | |
| 516 | - return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a, b) => { | |
| 517 | - if (a.end === b.end) { | |
| 518 | - return a.index - b.index; | |
| 519 | - } | |
| 520 | - return a.end - b.end; | |
| 521 | - })[0] : void 0; | |
| 522 | - }; | |
| 523 | - this.getMeasurementOptions = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.memo)( | |
| 524 | - () => [ | |
| 525 | - this.options.count, | |
| 526 | - this.options.paddingStart, | |
| 527 | - this.options.scrollMargin, | |
| 528 | - this.options.getItemKey, | |
| 529 | - this.options.enabled, | |
| 530 | - this.options.lanes, | |
| 531 | - this.options.laneAssignmentMode | |
| 532 | - ], | |
| 533 | - (count, paddingStart, scrollMargin, getItemKey, enabled, lanes, laneAssignmentMode) => { | |
| 534 | - const lanesChanged = this.prevLanes !== void 0 && this.prevLanes !== lanes; | |
| 535 | - if (lanesChanged) { | |
| 536 | - this.lanesChangedFlag = true; | |
| 537 | - } | |
| 538 | - this.prevLanes = lanes; | |
| 539 | - this.pendingMeasuredCacheIndexes = []; | |
| 540 | - return { | |
| 541 | - count, | |
| 542 | - paddingStart, | |
| 543 | - scrollMargin, | |
| 544 | - getItemKey, | |
| 545 | - enabled, | |
| 546 | - lanes, | |
| 547 | - laneAssignmentMode | |
| 548 | - }; | |
| 549 | - }, | |
| 550 | - { | |
| 551 | - key: false | |
| 552 | - } | |
| 553 | - ); | |
| 554 | - this.getMeasurements = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.memo)( | |
| 555 | - () => [this.getMeasurementOptions(), this.itemSizeCache], | |
| 556 | - ({ | |
| 557 | - count, | |
| 558 | - paddingStart, | |
| 559 | - scrollMargin, | |
| 560 | - getItemKey, | |
| 561 | - enabled, | |
| 562 | - lanes, | |
| 563 | - laneAssignmentMode | |
| 564 | - }, itemSizeCache) => { | |
| 565 | - if (!enabled) { | |
| 566 | - this.measurementsCache = []; | |
| 567 | - this.itemSizeCache.clear(); | |
| 568 | - this.laneAssignments.clear(); | |
| 569 | - return []; | |
| 570 | - } | |
| 571 | - if (this.laneAssignments.size > count) { | |
| 572 | - for (const index of this.laneAssignments.keys()) { | |
| 573 | - if (index >= count) { | |
| 574 | - this.laneAssignments.delete(index); | |
| 575 | - } | |
| 576 | - } | |
| 577 | - } | |
| 578 | - if (this.lanesChangedFlag) { | |
| 579 | - this.lanesChangedFlag = false; | |
| 580 | - this.lanesSettling = true; | |
| 581 | - this.measurementsCache = []; | |
| 582 | - this.itemSizeCache.clear(); | |
| 583 | - this.laneAssignments.clear(); | |
| 584 | - this.pendingMeasuredCacheIndexes = []; | |
| 585 | - } | |
| 586 | - if (this.measurementsCache.length === 0 && !this.lanesSettling) { | |
| 587 | - this.measurementsCache = this.options.initialMeasurementsCache; | |
| 588 | - this.measurementsCache.forEach((item) => { | |
| 589 | - this.itemSizeCache.set(item.key, item.size); | |
| 590 | - }); | |
| 591 | - } | |
| 592 | - const min = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0; | |
| 593 | - this.pendingMeasuredCacheIndexes = []; | |
| 594 | - if (this.lanesSettling && this.measurementsCache.length === count) { | |
| 595 | - this.lanesSettling = false; | |
| 596 | - } | |
| 597 | - const measurements = this.measurementsCache.slice(0, min); | |
| 598 | - const laneLastIndex = new Array(lanes).fill( | |
| 599 | - void 0 | |
| 600 | - ); | |
| 601 | - for (let m = 0; m < min; m++) { | |
| 602 | - const item = measurements[m]; | |
| 603 | - if (item) { | |
| 604 | - laneLastIndex[item.lane] = m; | |
| 605 | - } | |
| 606 | - } | |
| 607 | - for (let i = min; i < count; i++) { | |
| 608 | - const key = getItemKey(i); | |
| 609 | - const cachedLane = this.laneAssignments.get(i); | |
| 610 | - let lane; | |
| 611 | - let start; | |
| 612 | - const shouldCacheLane = laneAssignmentMode === "estimate" || itemSizeCache.has(key); | |
| 613 | - if (cachedLane !== void 0 && this.options.lanes > 1) { | |
| 614 | - lane = cachedLane; | |
| 615 | - const prevIndex = laneLastIndex[lane]; | |
| 616 | - const prevInLane = prevIndex !== void 0 ? measurements[prevIndex] : void 0; | |
| 617 | - start = prevInLane ? prevInLane.end + this.options.gap : paddingStart + scrollMargin; | |
| 618 | - } else { | |
| 619 | - const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i); | |
| 620 | - start = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin; | |
| 621 | - lane = furthestMeasurement ? furthestMeasurement.lane : i % this.options.lanes; | |
| 622 | - if (this.options.lanes > 1 && shouldCacheLane) { | |
| 623 | - this.laneAssignments.set(i, lane); | |
| 624 | - } | |
| 625 | - } | |
| 626 | - const measuredSize = itemSizeCache.get(key); | |
| 627 | - const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i); | |
| 628 | - const end = start + size; | |
| 629 | - measurements[i] = { | |
| 630 | - index: i, | |
| 631 | - start, | |
| 632 | - size, | |
| 633 | - end, | |
| 634 | - key, | |
| 635 | - lane | |
| 636 | - }; | |
| 637 | - laneLastIndex[lane] = i; | |
| 638 | - } | |
| 639 | - this.measurementsCache = measurements; | |
| 640 | - return measurements; | |
| 641 | - }, | |
| 642 | - { | |
| 643 | - key: true && "getMeasurements", | |
| 644 | - debug: () => this.options.debug | |
| 645 | - } | |
| 646 | - ); | |
| 647 | - this.calculateRange = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.memo)( | |
| 648 | - () => [ | |
| 649 | - this.getMeasurements(), | |
| 650 | - this.getSize(), | |
| 651 | - this.getScrollOffset(), | |
| 652 | - this.options.lanes | |
| 653 | - ], | |
| 654 | - (measurements, outerSize, scrollOffset, lanes) => { | |
| 655 | - return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({ | |
| 656 | - measurements, | |
| 657 | - outerSize, | |
| 658 | - scrollOffset, | |
| 659 | - lanes | |
| 660 | - }) : null; | |
| 661 | - }, | |
| 662 | - { | |
| 663 | - key: true && "calculateRange", | |
| 664 | - debug: () => this.options.debug | |
| 665 | - } | |
| 666 | - ); | |
| 667 | - this.getVirtualIndexes = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.memo)( | |
| 668 | - () => { | |
| 669 | - let startIndex = null; | |
| 670 | - let endIndex = null; | |
| 671 | - const range = this.calculateRange(); | |
| 672 | - if (range) { | |
| 673 | - startIndex = range.startIndex; | |
| 674 | - endIndex = range.endIndex; | |
| 675 | - } | |
| 676 | - this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]); | |
| 677 | - return [ | |
| 678 | - this.options.rangeExtractor, | |
| 679 | - this.options.overscan, | |
| 680 | - this.options.count, | |
| 681 | - startIndex, | |
| 682 | - endIndex | |
| 683 | - ]; | |
| 684 | - }, | |
| 685 | - (rangeExtractor, overscan, count, startIndex, endIndex) => { | |
| 686 | - return startIndex === null || endIndex === null ? [] : rangeExtractor({ | |
| 687 | - startIndex, | |
| 688 | - endIndex, | |
| 689 | - overscan, | |
| 690 | - count | |
| 691 | - }); | |
| 692 | - }, | |
| 693 | - { | |
| 694 | - key: true && "getVirtualIndexes", | |
| 695 | - debug: () => this.options.debug | |
| 696 | - } | |
| 697 | - ); | |
| 698 | - this.indexFromElement = (node) => { | |
| 699 | - const attributeName = this.options.indexAttribute; | |
| 700 | - const indexStr = node.getAttribute(attributeName); | |
| 701 | - if (!indexStr) { | |
| 702 | - console.warn( | |
| 703 | - `Missing attribute name '${attributeName}={index}' on measured element.` | |
| 704 | - ); | |
| 705 | - return -1; | |
| 706 | - } | |
| 707 | - return parseInt(indexStr, 10); | |
| 708 | - }; | |
| 709 | - this.shouldMeasureDuringScroll = (index) => { | |
| 710 | - var _a; | |
| 711 | - if (!this.scrollState || this.scrollState.behavior !== "smooth") { | |
| 712 | - return true; | |
| 713 | - } | |
| 714 | - const scrollIndex = this.scrollState.index ?? ((_a = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : _a.index); | |
| 715 | - if (scrollIndex !== void 0 && this.range) { | |
| 716 | - const bufferSize = Math.max( | |
| 717 | - this.options.overscan, | |
| 718 | - Math.ceil((this.range.endIndex - this.range.startIndex) / 2) | |
| 719 | - ); | |
| 720 | - const minIndex = Math.max(0, scrollIndex - bufferSize); | |
| 721 | - const maxIndex = Math.min( | |
| 722 | - this.options.count - 1, | |
| 723 | - scrollIndex + bufferSize | |
| 724 | - ); | |
| 725 | - return index >= minIndex && index <= maxIndex; | |
| 726 | - } | |
| 727 | - return true; | |
| 728 | - }; | |
| 729 | - this.measureElement = (node) => { | |
| 730 | - if (!node) { | |
| 731 | - this.elementsCache.forEach((cached, key2) => { | |
| 732 | - if (!cached.isConnected) { | |
| 733 | - this.observer.unobserve(cached); | |
| 734 | - this.elementsCache.delete(key2); | |
| 735 | - } | |
| 736 | - }); | |
| 737 | - return; | |
| 738 | - } | |
| 739 | - const index = this.indexFromElement(node); | |
| 740 | - const key = this.options.getItemKey(index); | |
| 741 | - const prevNode = this.elementsCache.get(key); | |
| 742 | - if (prevNode !== node) { | |
| 743 | - if (prevNode) { | |
| 744 | - this.observer.unobserve(prevNode); | |
| 745 | - } | |
| 746 | - this.observer.observe(node); | |
| 747 | - this.elementsCache.set(key, node); | |
| 748 | - } | |
| 749 | - if ((!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index)) { | |
| 750 | - this.resizeItem(index, this.options.measureElement(node, void 0, this)); | |
| 751 | - } | |
| 752 | - }; | |
| 753 | - this.resizeItem = (index, size) => { | |
| 754 | - var _a; | |
| 755 | - const item = this.measurementsCache[index]; | |
| 756 | - if (!item) return; | |
| 757 | - const itemSize = this.itemSizeCache.get(item.key) ?? item.size; | |
| 758 | - const delta = size - itemSize; | |
| 759 | - if (delta !== 0) { | |
| 760 | - if (((_a = this.scrollState) == null ? void 0 : _a.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this) : item.start < this.getScrollOffset() + this.scrollAdjustments)) { | |
| 761 | - if ( true && this.options.debug) { | |
| 762 | - console.info("correction", delta); | |
| 763 | - } | |
| 764 | - this._scrollToOffset(this.getScrollOffset(), { | |
| 765 | - adjustments: this.scrollAdjustments += delta, | |
| 766 | - behavior: void 0 | |
| 767 | - }); | |
| 768 | - } | |
| 769 | - this.pendingMeasuredCacheIndexes.push(item.index); | |
| 770 | - this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size)); | |
| 771 | - this.notify(false); | |
| 772 | - } | |
| 773 | - }; | |
| 774 | - this.getVirtualItems = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.memo)( | |
| 775 | - () => [this.getVirtualIndexes(), this.getMeasurements()], | |
| 776 | - (indexes, measurements) => { | |
| 777 | - const virtualItems = []; | |
| 778 | - for (let k = 0, len = indexes.length; k < len; k++) { | |
| 779 | - const i = indexes[k]; | |
| 780 | - const measurement = measurements[i]; | |
| 781 | - virtualItems.push(measurement); | |
| 782 | - } | |
| 783 | - return virtualItems; | |
| 784 | - }, | |
| 785 | - { | |
| 786 | - key: true && "getVirtualItems", | |
| 787 | - debug: () => this.options.debug | |
| 788 | - } | |
| 789 | - ); | |
| 790 | - this.getVirtualItemForOffset = (offset) => { | |
| 791 | - const measurements = this.getMeasurements(); | |
| 792 | - if (measurements.length === 0) { | |
| 793 | - return void 0; | |
| 794 | - } | |
| 795 | - return (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.notUndefined)( | |
| 796 | - measurements[findNearestBinarySearch( | |
| 797 | - 0, | |
| 798 | - measurements.length - 1, | |
| 799 | - (index) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.notUndefined)(measurements[index]).start, | |
| 800 | - offset | |
| 801 | - )] | |
| 802 | - ); | |
| 803 | - }; | |
| 804 | - this.getMaxScrollOffset = () => { | |
| 805 | - if (!this.scrollElement) return 0; | |
| 806 | - if ("scrollHeight" in this.scrollElement) { | |
| 807 | - return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight; | |
| 808 | - } else { | |
| 809 | - const doc = this.scrollElement.document.documentElement; | |
| 810 | - return this.options.horizontal ? doc.scrollWidth - this.scrollElement.innerWidth : doc.scrollHeight - this.scrollElement.innerHeight; | |
| 811 | - } | |
| 812 | - }; | |
| 813 | - this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => { | |
| 814 | - if (!this.scrollElement) return 0; | |
| 815 | - const size = this.getSize(); | |
| 816 | - const scrollOffset = this.getScrollOffset(); | |
| 817 | - if (align === "auto") { | |
| 818 | - align = toOffset >= scrollOffset + size ? "end" : "start"; | |
| 819 | - } | |
| 820 | - if (align === "center") { | |
| 821 | - toOffset += (itemSize - size) / 2; | |
| 822 | - } else if (align === "end") { | |
| 823 | - toOffset -= size; | |
| 824 | - } | |
| 825 | - const maxOffset = this.getMaxScrollOffset(); | |
| 826 | - return Math.max(Math.min(maxOffset, toOffset), 0); | |
| 827 | - }; | |
| 828 | - this.getOffsetForIndex = (index, align = "auto") => { | |
| 829 | - index = Math.max(0, Math.min(index, this.options.count - 1)); | |
| 830 | - const size = this.getSize(); | |
| 831 | - const scrollOffset = this.getScrollOffset(); | |
| 832 | - const item = this.measurementsCache[index]; | |
| 833 | - if (!item) return; | |
| 834 | - if (align === "auto") { | |
| 835 | - if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) { | |
| 836 | - align = "end"; | |
| 837 | - } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) { | |
| 838 | - align = "start"; | |
| 839 | - } else { | |
| 840 | - return [scrollOffset, align]; | |
| 841 | - } | |
| 842 | - } | |
| 843 | - if (align === "end" && index === this.options.count - 1) { | |
| 844 | - return [this.getMaxScrollOffset(), align]; | |
| 845 | - } | |
| 846 | - const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart; | |
| 847 | - return [ | |
| 848 | - this.getOffsetForAlignment(toOffset, align, item.size), | |
| 849 | - align | |
| 850 | - ]; | |
| 851 | - }; | |
| 852 | - this.scrollToOffset = (toOffset, { align = "start", behavior = "auto" } = {}) => { | |
| 853 | - const offset = this.getOffsetForAlignment(toOffset, align); | |
| 854 | - const now = this.now(); | |
| 855 | - this.scrollState = { | |
| 856 | - index: null, | |
| 857 | - align, | |
| 858 | - behavior, | |
| 859 | - startedAt: now, | |
| 860 | - lastTargetOffset: offset, | |
| 861 | - stableFrames: 0 | |
| 862 | - }; | |
| 863 | - this._scrollToOffset(offset, { adjustments: void 0, behavior }); | |
| 864 | - this.scheduleScrollReconcile(); | |
| 865 | - }; | |
| 866 | - this.scrollToIndex = (index, { | |
| 867 | - align: initialAlign = "auto", | |
| 868 | - behavior = "auto" | |
| 869 | - } = {}) => { | |
| 870 | - index = Math.max(0, Math.min(index, this.options.count - 1)); | |
| 871 | - const offsetInfo = this.getOffsetForIndex(index, initialAlign); | |
| 872 | - if (!offsetInfo) { | |
| 873 | - return; | |
| 874 | - } | |
| 875 | - const [offset, align] = offsetInfo; | |
| 876 | - const now = this.now(); | |
| 877 | - this.scrollState = { | |
| 878 | - index, | |
| 879 | - align, | |
| 880 | - behavior, | |
| 881 | - startedAt: now, | |
| 882 | - lastTargetOffset: offset, | |
| 883 | - stableFrames: 0 | |
| 884 | - }; | |
| 885 | - this._scrollToOffset(offset, { adjustments: void 0, behavior }); | |
| 886 | - this.scheduleScrollReconcile(); | |
| 887 | - }; | |
| 888 | - this.scrollBy = (delta, { behavior = "auto" } = {}) => { | |
| 889 | - const offset = this.getScrollOffset() + delta; | |
| 890 | - const now = this.now(); | |
| 891 | - this.scrollState = { | |
| 892 | - index: null, | |
| 893 | - align: "start", | |
| 894 | - behavior, | |
| 895 | - startedAt: now, | |
| 896 | - lastTargetOffset: offset, | |
| 897 | - stableFrames: 0 | |
| 898 | - }; | |
| 899 | - this._scrollToOffset(offset, { adjustments: void 0, behavior }); | |
| 900 | - this.scheduleScrollReconcile(); | |
| 901 | - }; | |
| 902 | - this.getTotalSize = () => { | |
| 903 | - var _a; | |
| 904 | - const measurements = this.getMeasurements(); | |
| 905 | - let end; | |
| 906 | - if (measurements.length === 0) { | |
| 907 | - end = this.options.paddingStart; | |
| 908 | - } else if (this.options.lanes === 1) { | |
| 909 | - end = ((_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) ?? 0; | |
| 910 | - } else { | |
| 911 | - const endByLane = Array(this.options.lanes).fill(null); | |
| 912 | - let endIndex = measurements.length - 1; | |
| 913 | - while (endIndex >= 0 && endByLane.some((val) => val === null)) { | |
| 914 | - const item = measurements[endIndex]; | |
| 915 | - if (endByLane[item.lane] === null) { | |
| 916 | - endByLane[item.lane] = item.end; | |
| 917 | - } | |
| 918 | - endIndex--; | |
| 919 | - } | |
| 920 | - end = Math.max(...endByLane.filter((val) => val !== null)); | |
| 921 | - } | |
| 922 | - return Math.max( | |
| 923 | - end - this.options.scrollMargin + this.options.paddingEnd, | |
| 924 | - 0 | |
| 925 | - ); | |
| 926 | - }; | |
| 927 | - this._scrollToOffset = (offset, { | |
| 928 | - adjustments, | |
| 929 | - behavior | |
| 930 | - }) => { | |
| 931 | - this.options.scrollToFn(offset, { behavior, adjustments }, this); | |
| 932 | - }; | |
| 933 | - this.measure = () => { | |
| 934 | - this.itemSizeCache = /* @__PURE__ */ new Map(); | |
| 935 | - this.laneAssignments = /* @__PURE__ */ new Map(); | |
| 936 | - this.notify(false); | |
| 937 | - }; | |
| 938 | - this.setOptions(opts); | |
| 939 | - } | |
| 940 | - scheduleScrollReconcile() { | |
| 941 | - if (!this.targetWindow) { | |
| 942 | - this.scrollState = null; | |
| 943 | - return; | |
| 944 | - } | |
| 945 | - if (this.rafId != null) return; | |
| 946 | - this.rafId = this.targetWindow.requestAnimationFrame(() => { | |
| 947 | - this.rafId = null; | |
| 948 | - this.reconcileScroll(); | |
| 949 | - }); | |
| 950 | - } | |
| 951 | - reconcileScroll() { | |
| 952 | - if (!this.scrollState) return; | |
| 953 | - const el = this.scrollElement; | |
| 954 | - if (!el) return; | |
| 955 | - const MAX_RECONCILE_MS = 5e3; | |
| 956 | - if (this.now() - this.scrollState.startedAt > MAX_RECONCILE_MS) { | |
| 957 | - this.scrollState = null; | |
| 958 | - return; | |
| 959 | - } | |
| 960 | - const offsetInfo = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0; | |
| 961 | - const targetOffset = offsetInfo ? offsetInfo[0] : this.scrollState.lastTargetOffset; | |
| 962 | - const STABLE_FRAMES = 1; | |
| 963 | - const targetChanged = targetOffset !== this.scrollState.lastTargetOffset; | |
| 964 | - if (!targetChanged && (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.approxEqual)(targetOffset, this.getScrollOffset())) { | |
| 965 | - this.scrollState.stableFrames++; | |
| 966 | - if (this.scrollState.stableFrames >= STABLE_FRAMES) { | |
| 967 | - this.scrollState = null; | |
| 968 | - return; | |
| 969 | - } | |
| 970 | - } else { | |
| 971 | - this.scrollState.stableFrames = 0; | |
| 972 | - if (targetChanged) { | |
| 973 | - this.scrollState.lastTargetOffset = targetOffset; | |
| 974 | - this.scrollState.behavior = "auto"; | |
| 975 | - this._scrollToOffset(targetOffset, { | |
| 976 | - adjustments: void 0, | |
| 977 | - behavior: "auto" | |
| 978 | - }); | |
| 979 | - } | |
| 980 | - } | |
| 981 | - this.scheduleScrollReconcile(); | |
| 982 | - } | |
| 983 | -} | |
| 984 | -const findNearestBinarySearch = (low, high, getCurrentValue, value) => { | |
| 985 | - while (low <= high) { | |
| 986 | - const middle = (low + high) / 2 | 0; | |
| 987 | - const currentValue = getCurrentValue(middle); | |
| 988 | - if (currentValue < value) { | |
| 989 | - low = middle + 1; | |
| 990 | - } else if (currentValue > value) { | |
| 991 | - high = middle - 1; | |
| 992 | - } else { | |
| 993 | - return middle; | |
| 994 | - } | |
| 995 | - } | |
| 996 | - if (low > 0) { | |
| 997 | - return low - 1; | |
| 998 | - } else { | |
| 999 | - return 0; | |
| 1000 | - } | |
| 1001 | -}; | |
| 1002 | -function calculateRange({ | |
| 1003 | - measurements, | |
| 1004 | - outerSize, | |
| 1005 | - scrollOffset, | |
| 1006 | - lanes | |
| 1007 | -}) { | |
| 1008 | - const lastIndex = measurements.length - 1; | |
| 1009 | - const getOffset = (index) => measurements[index].start; | |
| 1010 | - if (measurements.length <= lanes) { | |
| 1011 | - return { | |
| 1012 | - startIndex: 0, | |
| 1013 | - endIndex: lastIndex | |
| 1014 | - }; | |
| 1015 | - } | |
| 1016 | - let startIndex = findNearestBinarySearch( | |
| 1017 | - 0, | |
| 1018 | - lastIndex, | |
| 1019 | - getOffset, | |
| 1020 | - scrollOffset | |
| 1021 | - ); | |
| 1022 | - let endIndex = startIndex; | |
| 1023 | - if (lanes === 1) { | |
| 1024 | - while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) { | |
| 1025 | - endIndex++; | |
| 1026 | - } | |
| 1027 | - } else if (lanes > 1) { | |
| 1028 | - const endPerLane = Array(lanes).fill(0); | |
| 1029 | - while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) { | |
| 1030 | - const item = measurements[endIndex]; | |
| 1031 | - endPerLane[item.lane] = item.end; | |
| 1032 | - endIndex++; | |
| 1033 | - } | |
| 1034 | - const startPerLane = Array(lanes).fill(scrollOffset + outerSize); | |
| 1035 | - while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) { | |
| 1036 | - const item = measurements[startIndex]; | |
| 1037 | - startPerLane[item.lane] = item.start; | |
| 1038 | - startIndex--; | |
| 1039 | - } | |
| 1040 | - startIndex = Math.max(0, startIndex - startIndex % lanes); | |
| 1041 | - endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes)); | |
| 1042 | - } | |
| 1043 | - return { startIndex, endIndex }; | |
| 1044 | -} | |
| 1045 | - | |
| 1046 | -//# sourceMappingURL=index.js.map | |
| 1047 | - | |
| 1048 | - | |
| 1049 | -/***/ }), | |
| 1050 | - | |
| 1051 | -/***/ "./packages/node_modules/@tanstack/virtual-core/dist/esm/utils.js": | |
| 1052 | -/*!************************************************************************!*\ | |
| 1053 | - !*** ./packages/node_modules/@tanstack/virtual-core/dist/esm/utils.js ***! | |
| 1054 | - \************************************************************************/ | |
| 1055 | -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { | |
| 1056 | - | |
| 1057 | -__webpack_require__.r(__webpack_exports__); | |
| 1058 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1059 | -/* harmony export */ approxEqual: function() { return /* binding */ approxEqual; }, | |
| 1060 | -/* harmony export */ debounce: function() { return /* binding */ debounce; }, | |
| 1061 | -/* harmony export */ memo: function() { return /* binding */ memo; }, | |
| 1062 | -/* harmony export */ notUndefined: function() { return /* binding */ notUndefined; } | |
| 1063 | -/* harmony export */ }); | |
| 1064 | -function memo(getDeps, fn, opts) { | |
| 1065 | - let deps = opts.initialDeps ?? []; | |
| 1066 | - let result; | |
| 1067 | - let isInitial = true; | |
| 1068 | - function memoizedFunction() { | |
| 1069 | - var _a, _b, _c; | |
| 1070 | - let depTime; | |
| 1071 | - if (opts.key && ((_a = opts.debug) == null ? void 0 : _a.call(opts))) depTime = Date.now(); | |
| 1072 | - const newDeps = getDeps(); | |
| 1073 | - const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep); | |
| 1074 | - if (!depsChanged) { | |
| 1075 | - return result; | |
| 1076 | - } | |
| 1077 | - deps = newDeps; | |
| 1078 | - let resultTime; | |
| 1079 | - if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now(); | |
| 1080 | - result = fn(...newDeps); | |
| 1081 | - if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) { | |
| 1082 | - const depEndTime = Math.round((Date.now() - depTime) * 100) / 100; | |
| 1083 | - const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100; | |
| 1084 | - const resultFpsPercentage = resultEndTime / 16; | |
| 1085 | - const pad = (str, num) => { | |
| 1086 | - str = String(str); | |
| 1087 | - while (str.length < num) { | |
| 1088 | - str = " " + str; | |
| 1089 | - } | |
| 1090 | - return str; | |
| 1091 | - }; | |
| 1092 | - console.info( | |
| 1093 | - `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`, | |
| 1094 | - ` | |
| 1095 | - font-size: .6rem; | |
| 1096 | - font-weight: bold; | |
| 1097 | - color: hsl(${Math.max( | |
| 1098 | - 0, | |
| 1099 | - Math.min(120 - 120 * resultFpsPercentage, 120) | |
| 1100 | - )}deg 100% 31%);`, | |
| 1101 | - opts == null ? void 0 : opts.key | |
| 1102 | - ); | |
| 1103 | - } | |
| 1104 | - if ((opts == null ? void 0 : opts.onChange) && !(isInitial && opts.skipInitialOnChange)) { | |
| 1105 | - opts.onChange(result); | |
| 1106 | - } | |
| 1107 | - isInitial = false; | |
| 1108 | - return result; | |
| 1109 | - } | |
| 1110 | - memoizedFunction.updateDeps = (newDeps) => { | |
| 1111 | - deps = newDeps; | |
| 1112 | - }; | |
| 1113 | - return memoizedFunction; | |
| 1114 | -} | |
| 1115 | -function notUndefined(value, msg) { | |
| 1116 | - if (value === void 0) { | |
| 1117 | - throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ""}`); | |
| 1118 | - } else { | |
| 1119 | - return value; | |
| 1120 | - } | |
| 1121 | -} | |
| 1122 | -const approxEqual = (a, b) => Math.abs(a - b) < 1.01; | |
| 1123 | -const debounce = (targetWindow, fn, ms) => { | |
| 1124 | - let timeoutId; | |
| 1125 | - return function(...args) { | |
| 1126 | - targetWindow.clearTimeout(timeoutId); | |
| 1127 | - timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms); | |
| 1128 | - }; | |
| 1129 | -}; | |
| 1130 | - | |
| 1131 | -//# sourceMappingURL=utils.js.map | |
| 1132 | - | |
| 1133 | - | |
| 1134 | -/***/ }), | |
| 1135 | - | |
| 1136 | -/***/ "./packages/packages/libs/editor-ui/src/components/collapse-icon.tsx": | |
| 1137 | -/*!***************************************************************************!*\ | |
| 1138 | - !*** ./packages/packages/libs/editor-ui/src/components/collapse-icon.tsx ***! | |
| 1139 | - \***************************************************************************/ | |
| 1140 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1141 | - | |
| 1142 | -__webpack_require__.r(__webpack_exports__); | |
| 1143 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1144 | -/* harmony export */ CollapseIcon: function() { return /* binding */ CollapseIcon; } | |
| 1145 | -/* harmony export */ }); | |
| 1146 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 1147 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_0__); | |
| 1148 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1149 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 1150 | - | |
| 1151 | - | |
| 1152 | - | |
| 1153 | -// TODO: Replace this with future Rotate component that will be implemented in elementor-ui | |
| 1154 | -const CollapseIcon = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.styled)(_elementor_icons__WEBPACK_IMPORTED_MODULE_0__.ChevronDownIcon, { | |
| 1155 | - shouldForwardProp: prop => prop !== 'open' && prop !== 'disabled' | |
| 1156 | -})(({ | |
| 1157 | - theme, | |
| 1158 | - open, | |
| 1159 | - disabled = false | |
| 1160 | -}) => ({ | |
| 1161 | - transform: open ? 'rotate(180deg)' : 'rotate(0deg)', | |
| 1162 | - transition: theme.transitions.create('transform', { | |
| 1163 | - duration: theme.transitions.duration.standard | |
| 1164 | - }), | |
| 1165 | - opacity: disabled ? 0.4 : 1 | |
| 1166 | -})); | |
| 1167 | - | |
| 1168 | -/***/ }), | |
| 1169 | - | |
| 1170 | -/***/ "./packages/packages/libs/editor-ui/src/components/collapsible-content.tsx": | |
| 1171 | -/*!*********************************************************************************!*\ | |
| 1172 | - !*** ./packages/packages/libs/editor-ui/src/components/collapsible-content.tsx ***! | |
| 1173 | - \*********************************************************************************/ | |
| 1174 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1175 | - | |
| 1176 | -__webpack_require__.r(__webpack_exports__); | |
| 1177 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1178 | -/* harmony export */ CollapsibleContent: function() { return /* binding */ CollapsibleContent; }, | |
| 1179 | -/* harmony export */ getCollapsibleValue: function() { return /* binding */ getCollapsibleValue; } | |
| 1180 | -/* harmony export */ }); | |
| 1181 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1182 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1183 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1184 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 1185 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1186 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); | |
| 1187 | -/* harmony import */ var _collapse_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./collapse-icon */ "./packages/packages/libs/editor-ui/src/components/collapse-icon.tsx"); | |
| 1188 | - | |
| 1189 | - | |
| 1190 | - | |
| 1191 | - | |
| 1192 | - | |
| 1193 | -const IndicatorsWrapper = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.styled)('div')` | |
| 1194 | - position: absolute; | |
| 1195 | - top: 0; | |
| 1196 | - right: ${({ | |
| 1197 | - theme | |
| 1198 | -}) => theme.spacing(3)}; | |
| 1199 | - height: 100%; | |
| 1200 | - display: flex; | |
| 1201 | - flex-direction: column; | |
| 1202 | - align-items: center; | |
| 1203 | - justify-content: center; | |
| 1204 | -`; | |
| 1205 | -const CollapsibleContent = ({ | |
| 1206 | - children, | |
| 1207 | - defaultOpen = false, | |
| 1208 | - titleEnd = null | |
| 1209 | -}) => { | |
| 1210 | - const [open, setOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultOpen); | |
| 1211 | - const handleToggle = () => { | |
| 1212 | - setOpen(prevOpen => !prevOpen); | |
| 1213 | - }; | |
| 1214 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Stack, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Stack, { | |
| 1215 | - sx: { | |
| 1216 | - position: 'relative' | |
| 1217 | - } | |
| 1218 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Button, { | |
| 1219 | - fullWidth: true, | |
| 1220 | - size: "small", | |
| 1221 | - color: "secondary", | |
| 1222 | - variant: "outlined", | |
| 1223 | - onClick: handleToggle, | |
| 1224 | - endIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_collapse_icon__WEBPACK_IMPORTED_MODULE_3__.CollapseIcon, { | |
| 1225 | - open: open | |
| 1226 | - }), | |
| 1227 | - sx: { | |
| 1228 | - my: 0.5 | |
| 1229 | - }, | |
| 1230 | - "aria-label": open ? 'Show less' : 'Show more' | |
| 1231 | - }, open ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show less', 'elementor') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show more', 'elementor')), titleEnd && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(IndicatorsWrapper, null, getCollapsibleValue(titleEnd, open))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Collapse, { | |
| 1232 | - in: open, | |
| 1233 | - timeout: "auto", | |
| 1234 | - unmountOnExit: true | |
| 1235 | - }, children)); | |
| 1236 | -}; | |
| 1237 | -function getCollapsibleValue(value, isOpen) { | |
| 1238 | - if (typeof value === 'function') { | |
| 1239 | - return value(isOpen); | |
| 1240 | - } | |
| 1241 | - return value; | |
| 1242 | -} | |
| 1243 | - | |
| 1244 | -/***/ }), | |
| 1245 | - | |
| 1246 | -/***/ "./packages/packages/libs/editor-ui/src/components/confirmation-dialog.tsx": | |
| 1247 | -/*!*********************************************************************************!*\ | |
| 1248 | - !*** ./packages/packages/libs/editor-ui/src/components/confirmation-dialog.tsx ***! | |
| 1249 | - \*********************************************************************************/ | |
| 1250 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1251 | - | |
| 1252 | -__webpack_require__.r(__webpack_exports__); | |
| 1253 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1254 | -/* harmony export */ ConfirmationDialog: function() { return /* binding */ ConfirmationDialog; } | |
| 1255 | -/* harmony export */ }); | |
| 1256 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1257 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1258 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 1259 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 1260 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1261 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 1262 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1263 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); | |
| 1264 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 1265 | - | |
| 1266 | - | |
| 1267 | - | |
| 1268 | - | |
| 1269 | - | |
| 1270 | -const TITLE_ID = 'confirmation-dialog'; | |
| 1271 | -const ConfirmationDialog = ({ | |
| 1272 | - open, | |
| 1273 | - onClose, | |
| 1274 | - children | |
| 1275 | -}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Dialog, { | |
| 1276 | - open: open, | |
| 1277 | - onClose: onClose, | |
| 1278 | - "aria-labelledby": TITLE_ID, | |
| 1279 | - maxWidth: "sm" | |
| 1280 | -}, children); | |
| 1281 | -const ConfirmationDialogTitle = ({ | |
| 1282 | - children, | |
| 1283 | - icon: Icon = _elementor_icons__WEBPACK_IMPORTED_MODULE_1__.AlertOctagonFilledIcon, | |
| 1284 | - iconColor = 'error' | |
| 1285 | -}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.DialogTitle, { | |
| 1286 | - id: TITLE_ID, | |
| 1287 | - display: "flex", | |
| 1288 | - alignItems: "center", | |
| 1289 | - gap: 1, | |
| 1290 | - sx: { | |
| 1291 | - lineHeight: 1 | |
| 1292 | - } | |
| 1293 | -}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Icon, { | |
| 1294 | - color: iconColor | |
| 1295 | -}), children); | |
| 1296 | -const ConfirmationDialogContent = ({ | |
| 1297 | - children | |
| 1298 | -}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.DialogContent, { | |
| 1299 | - sx: { | |
| 1300 | - mt: 2 | |
| 1301 | - } | |
| 1302 | -}, children); | |
| 1303 | -const ConfirmationDialogContentText = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.DialogContentText, _extends({ | |
| 1304 | - variant: "body2", | |
| 1305 | - color: "secondary" | |
| 1306 | -}, props)); | |
| 1307 | -const ConfirmationDialogActions = ({ | |
| 1308 | - onClose, | |
| 1309 | - onConfirm, | |
| 1310 | - cancelLabel, | |
| 1311 | - confirmLabel, | |
| 1312 | - color = 'error', | |
| 1313 | - onSuppressMessage, | |
| 1314 | - suppressLabel = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Don't show this again", 'elementor') | |
| 1315 | -}) => { | |
| 1316 | - const [dontShowAgain, setDontShowAgain] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); | |
| 1317 | - const handleConfirm = () => { | |
| 1318 | - if (dontShowAgain && onSuppressMessage) { | |
| 1319 | - onSuppressMessage(); | |
| 1320 | - } | |
| 1321 | - onConfirm(); | |
| 1322 | - }; | |
| 1323 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.DialogActions, { | |
| 1324 | - sx: onSuppressMessage ? { | |
| 1325 | - justifyContent: 'space-between', | |
| 1326 | - alignItems: 'center' | |
| 1327 | - } : undefined | |
| 1328 | - }, onSuppressMessage && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.FormControlLabel, { | |
| 1329 | - control: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Checkbox, { | |
| 1330 | - checked: dontShowAgain, | |
| 1331 | - onChange: event => setDontShowAgain(event.target.checked), | |
| 1332 | - size: "medium", | |
| 1333 | - color: "secondary" | |
| 1334 | - }), | |
| 1335 | - label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Typography, { | |
| 1336 | - variant: "body2", | |
| 1337 | - color: "text.secondary" | |
| 1338 | - }, suppressLabel) | |
| 1339 | - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { | |
| 1340 | - color: "secondary", | |
| 1341 | - onClick: onClose | |
| 1342 | - }, cancelLabel ?? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Not now', 'elementor')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { | |
| 1343 | - autoFocus: true, | |
| 1344 | - variant: "contained", | |
| 1345 | - color: color, | |
| 1346 | - onClick: handleConfirm, | |
| 1347 | - sx: { | |
| 1348 | - ml: 1 | |
| 1349 | - } | |
| 1350 | - }, confirmLabel ?? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Delete', 'elementor')))); | |
| 1351 | -}; | |
| 1352 | -ConfirmationDialog.Title = ConfirmationDialogTitle; | |
| 1353 | -ConfirmationDialog.Content = ConfirmationDialogContent; | |
| 1354 | -ConfirmationDialog.ContentText = ConfirmationDialogContentText; | |
| 1355 | -ConfirmationDialog.Actions = ConfirmationDialogActions; | |
| 1356 | - | |
| 1357 | -/***/ }), | |
| 1358 | - | |
| 1359 | -/***/ "./packages/packages/libs/editor-ui/src/components/cta-button.tsx": | |
| 1360 | -/*!************************************************************************!*\ | |
| 1361 | - !*** ./packages/packages/libs/editor-ui/src/components/cta-button.tsx ***! | |
| 1362 | - \************************************************************************/ | |
| 1363 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1364 | - | |
| 1365 | -__webpack_require__.r(__webpack_exports__); | |
| 1366 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1367 | -/* harmony export */ CtaButton: function() { return /* binding */ CtaButton; } | |
| 1368 | -/* harmony export */ }); | |
| 1369 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1370 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1371 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 1372 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 1373 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1374 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 1375 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1376 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); | |
| 1377 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 1378 | - | |
| 1379 | - | |
| 1380 | - | |
| 1381 | - | |
| 1382 | -const CtaButton = ({ | |
| 1383 | - href, | |
| 1384 | - children, | |
| 1385 | - showIcon = true, | |
| 1386 | - ...props | |
| 1387 | -}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Button, _extends({ | |
| 1388 | - variant: "contained", | |
| 1389 | - color: "promotion", | |
| 1390 | - href: href, | |
| 1391 | - target: "_blank", | |
| 1392 | - startIcon: showIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.CrownFilledIcon, null) : undefined | |
| 1393 | -}, props), children ?? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Upgrade Now', 'elementor')); | |
| 1394 | - | |
| 1395 | -/***/ }), | |
| 1396 | - | |
| 1397 | -/***/ "./packages/packages/libs/editor-ui/src/components/editable-field.tsx": | |
| 1398 | -/*!****************************************************************************!*\ | |
| 1399 | - !*** ./packages/packages/libs/editor-ui/src/components/editable-field.tsx ***! | |
| 1400 | - \****************************************************************************/ | |
| 1401 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1402 | - | |
| 1403 | -__webpack_require__.r(__webpack_exports__); | |
| 1404 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1405 | -/* harmony export */ EditableField: function() { return /* binding */ EditableField; } | |
| 1406 | -/* harmony export */ }); | |
| 1407 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1408 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1409 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1410 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 1411 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 1412 | - | |
| 1413 | - | |
| 1414 | - | |
| 1415 | -const EditableField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({ | |
| 1416 | - value, | |
| 1417 | - error, | |
| 1418 | - as = 'span', | |
| 1419 | - sx, | |
| 1420 | - ...props | |
| 1421 | -}, ref) => { | |
| 1422 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Tooltip, { | |
| 1423 | - title: error, | |
| 1424 | - open: !!error, | |
| 1425 | - placement: "top" | |
| 1426 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(StyledField, _extends({ | |
| 1427 | - ref: ref, | |
| 1428 | - component: as | |
| 1429 | - }, props), value)); | |
| 1430 | -}); | |
| 1431 | -const StyledField = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.styled)((0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Box))` | |
| 1 | +/*! For license information please see editor-ui.js.LICENSE.txt */ | |
| 2 | +!function(){"use strict";var e={"./packages/node_modules/@tanstack/react-virtual/dist/esm/index.js":function(e,t,n){n.r(t),n.d(t,{Virtualizer:function(){return i.Virtualizer},approxEqual:function(){return i.approxEqual},debounce:function(){return i.debounce},defaultKeyExtractor:function(){return i.defaultKeyExtractor},defaultRangeExtractor:function(){return i.defaultRangeExtractor},elementScroll:function(){return i.elementScroll},measureElement:function(){return i.measureElement},memo:function(){return i.memo},notUndefined:function(){return i.notUndefined},observeElementOffset:function(){return i.observeElementOffset},observeElementRect:function(){return i.observeElementRect},observeWindowOffset:function(){return i.observeWindowOffset},observeWindowRect:function(){return i.observeWindowRect},useVirtualizer:function(){return useVirtualizer},useWindowVirtualizer:function(){return useWindowVirtualizer},windowScroll:function(){return i.windowScroll}});var o=n("react"),r=n("react-dom"),i=n("./packages/node_modules/@tanstack/virtual-core/dist/esm/index.js");const s="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function useVirtualizerBase(e){const t=o.useReducer(()=>({}),{})[1],n={...e,onChange:(n,o)=>{var i;o?(0,r.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,n,o)}},[a]=o.useState(()=>new i.Virtualizer(n));return a.setOptions(n),s(()=>a._didMount(),[]),s(()=>a._willUpdate()),a}function useVirtualizer(e){return useVirtualizerBase({observeElementRect:i.observeElementRect,observeElementOffset:i.observeElementOffset,scrollToFn:i.elementScroll,...e})}function useWindowVirtualizer(e){return useVirtualizerBase({getScrollElement:()=>"undefined"!=typeof document?window:null,observeElementRect:i.observeWindowRect,observeElementOffset:i.observeWindowOffset,scrollToFn:i.windowScroll,initialOffset:()=>"undefined"!=typeof document?window.scrollY:0,...e})}},"./packages/node_modules/@tanstack/virtual-core/dist/esm/index.js":function(e,t,n){n.r(t),n.d(t,{Virtualizer:function(){return Virtualizer},approxEqual:function(){return o.approxEqual},debounce:function(){return o.debounce},defaultKeyExtractor:function(){return defaultKeyExtractor},defaultRangeExtractor:function(){return defaultRangeExtractor},elementScroll:function(){return elementScroll},measureElement:function(){return measureElement},memo:function(){return o.memo},notUndefined:function(){return o.notUndefined},observeElementOffset:function(){return observeElementOffset},observeElementRect:function(){return observeElementRect},observeWindowOffset:function(){return observeWindowOffset},observeWindowRect:function(){return observeWindowRect},windowScroll:function(){return windowScroll}});var o=n("./packages/node_modules/@tanstack/virtual-core/dist/esm/utils.js");const getRect=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},defaultKeyExtractor=e=>e,defaultRangeExtractor=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let e=t;e<=n;e++)o.push(e);return o},observeElementRect=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const handler=e=>{const{width:n,height:o}=e;t({width:Math.round(n),height:Math.round(o)})};if(handler(getRect(n)),!o.ResizeObserver)return()=>{};const r=new o.ResizeObserver(t=>{const run=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void handler({width:t.inlineSize,height:t.blockSize})}handler(getRect(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()});return r.observe(n,{box:"border-box"}),()=>{r.unobserve(n)}},r={passive:!0},observeWindowRect=(e,t)=>{const n=e.scrollElement;if(!n)return;const handler=()=>{t({width:n.innerWidth,height:n.innerHeight})};return handler(),n.addEventListener("resize",handler,r),()=>{n.removeEventListener("resize",handler)}},i="undefined"==typeof window||"onscrollend"in window,observeElementOffset=(e,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;let a=0;const l=e.options.useScrollendEvent&&i?()=>{}:(0,o.debounce)(s,()=>{t(a,!1)},e.options.isScrollingResetDelay),createHandler=o=>()=>{const{horizontal:r,isRtl:i}=e.options;a=r?n.scrollLeft*(i?-1:1):n.scrollTop,l(),t(a,o)},c=createHandler(!0),u=createHandler(!1);u(),n.addEventListener("scroll",c,r);const d=e.options.useScrollendEvent&&i;return d&&n.addEventListener("scrollend",u,r),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",u)}},observeWindowOffset=(e,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;let a=0;const l=e.options.useScrollendEvent&&i?()=>{}:(0,o.debounce)(s,()=>{t(a,!1)},e.options.isScrollingResetDelay),createHandler=o=>()=>{a=n[e.options.horizontal?"scrollX":"scrollY"],l(),t(a,o)},c=createHandler(!0),u=createHandler(!1);u(),n.addEventListener("scroll",c,r);const d=e.options.useScrollendEvent&&i;return d&&n.addEventListener("scrollend",u,r),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",u)}},measureElement=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},windowScroll=(e,{adjustments:t=0,behavior:n},o)=>{var r,i;const s=e+t;null==(i=null==(r=o.scrollElement)?void 0:r.scrollTo)||i.call(r,{[o.options.horizontal?"left":"top"]:s,behavior:n})},elementScroll=(e,{adjustments:t=0,behavior:n},o)=>{var r,i;const s=e+t;null==(i=null==(r=o.scrollElement)?void 0:r.scrollTo)||i.call(r,{[o.options.horizontal?"left":"top"]:s,behavior:n})};class Virtualizer{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const get=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{const run=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()})}):null);return{disconnect:()=>{var t;null==(t=get())||t.disconnect(),e=null},observe:e=>{var t;return null==(t=get())?void 0:t.observe(e,{box:"border-box"})},unobserve:e=>{var t;return null==(t=get())?void 0:t.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement:measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=(0,o.memo)(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,o=new Map;for(let r=t-1;r>=0;r--){const t=e[r];if(n.has(t.lane))continue;const i=o.get(t.lane);if(null==i||t.end>i.end?o.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=(0,o.memo)(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,n,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=(0,o.memo)(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:r},i)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,s);for(let r=s;r<e;r++){const e=o(r),s=1===this.options.lanes?a[r-1]:this.getFurthestMeasurement(a,r),l=s?s.end+this.options.gap:t+n,c=i.get(e),u="number"==typeof c?c:this.options.estimateSize(r),d=l+u,p=s?s.lane:r%this.options.lanes;a[r]={index:r,start:l,size:u,end:d,key:e,lane:p}}return this.measurementsCache=a,a},{key:"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=(0,o.memo)(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,o)=>this.range=e.length>0&&t>0?function calculateRange({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const r=e.length-1,getOffset=t=>e[t].start;if(e.length<=o)return{startIndex:0,endIndex:r};let i=findNearestBinarySearch(0,r,getOffset,n),s=i;if(1===o)for(;s<r&&e[s].end<n+t;)s++;else if(o>1){const a=Array(o).fill(0);for(;s<r&&a.some(e=>e<n+t);){const t=e[s];a[t.lane]=t.end,s++}const l=Array(o).fill(n+t);for(;i>=0&&l.some(e=>e>=n);){const t=e[i];l[t.lane]=t.start,i--}i=Math.max(0,i-i%o),s=Math.min(r,s+(o-1-s%o))}return{startIndex:i,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:n,lanes:o}):null,{key:"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=(0,o.memo)(()=>{let e=null,t=null;const n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,o,r)=>null===o||null===r?[]:e({startIndex:o,endIndex:r,overscan:t,count:n}),{key:"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),o=this.measurementsCache[n];if(!o)return;const r=o.key,i=this.elementsCache.get(r);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(r,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const o=t-(this.itemSizeCache.get(n.key)??n.size);0!==o&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,o,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&(this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=(0,o.memo)(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const n=[];for(let o=0,r=e.length;o<r;o++){const r=t[e[o]];n.push(r)}return n},{key:"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return(0,o.notUndefined)(t[findNearestBinarySearch(0,t.length-1,e=>(0,o.notUndefined)(t[e]).start,e)])},this.getOffsetForAlignment=(e,t,n=0)=>{const o=this.getSize(),r=this.getScrollOffset();"auto"===t&&(t=e>=r+o?"end":"start"),"center"===t?e+=(n-o)/2:"end"===t&&(e-=o);const i=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(i,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const o=this.getSize(),r=this.getScrollOffset();if("auto"===t)if(n.end>=r+o-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}const i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let r=0;const tryScroll=t=>{if(!this.targetWindow)return;const r=this.getOffsetForIndex(e,t);if(!r)return void console.warn("Failed to get offset for index:",e);const[i,s]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{const t=this.getScrollOffset(),n=this.getOffsetForIndex(e,s);n?(0,o.approxEqual)(n[0],t)||scheduleRetry(s):console.warn("Failed to get offset for index:",e)})},scheduleRetry=t=>{this.targetWindow&&(r++,r<10?(this.options.debug&&console.info("Schedule retry",r,10),this.targetWindow.requestAnimationFrame(()=>tryScroll(t))):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};tryScroll(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;if(0===t.length)n=this.options.paddingStart;else if(1===this.options.lanes)n=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let o=t.length-1;for(;o>=0&&e.some(e=>null===e);){const n=t[o];null===e[n.lane]&&(e[n.lane]=n.end),o--}n=Math.max(...e.filter(e=>null!==e))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const findNearestBinarySearch=(e,t,n,o)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(i<o)e=r+1;else{if(!(i>o))return r;t=r-1}}return e>0?e-1:0}},"./packages/node_modules/@tanstack/virtual-core/dist/esm/utils.js":function(e,t,n){function memo(e,t,n){let o,r=n.initialDeps??[];function memoizedFunction(){var i,s,a,l;let c;n.key&&(null==(i=n.debug)?void 0:i.call(n))&&(c=Date.now());const u=e();if(!(u.length!==r.length||u.some((e,t)=>r[t]!==e)))return o;let d;if(r=u,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(d=Date.now()),o=t(...u),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-d))/100,o=t/16,pad=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${pad(t,5)} /${pad(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,o),o}return memoizedFunction.updateDeps=e=>{r=e},memoizedFunction}function notUndefined(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}n.r(t),n.d(t,{approxEqual:function(){return approxEqual},debounce:function(){return debounce},memo:function(){return memo},notUndefined:function(){return notUndefined}});const approxEqual=(e,t)=>Math.abs(e-t)<1.01,debounce=(e,t,n)=>{let o;return function(...r){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,r),n)}}},"./packages/packages/libs/editor-ui/src/components/collapse-icon.tsx":function(e,t,n){n.r(t),n.d(t,{CollapseIcon:function(){return i}});var o=n("@elementor/icons"),r=n("@elementor/ui");const i=(0,r.styled)(o.ChevronDownIcon,{shouldForwardProp:e=>"open"!==e&&"disabled"!==e})(({theme:e,open:t,disabled:n=!1})=>({transform:t?"rotate(180deg)":"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.standard}),opacity:n?.4:1}))},"./packages/packages/libs/editor-ui/src/components/confirmation-dialog.tsx":function(e,t,n){n.r(t),n.d(t,{ConfirmationDialog:function(){return ConfirmationDialog}});var o=n("react"),r=n("@elementor/icons"),i=n("@elementor/ui"),s=n("@wordpress/i18n");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const a="confirmation-dialog",ConfirmationDialog=({open:e,onClose:t,children:n})=>o.createElement(i.Dialog,{open:e,onClose:t,"aria-labelledby":a,maxWidth:"xs"},n);ConfirmationDialog.Title=({children:e})=>o.createElement(i.DialogTitle,{id:a,display:"flex",alignItems:"center",gap:1,sx:{lineHeight:1}},o.createElement(r.AlertOctagonFilledIcon,{color:"error"}),e),ConfirmationDialog.Content=({children:e})=>o.createElement(i.DialogContent,null,e),ConfirmationDialog.ContentText=e=>o.createElement(i.DialogContentText,_extends({variant:"body2",color:"textPrimary"},e)),ConfirmationDialog.Actions=({onClose:e,onConfirm:t,cancelLabel:n,confirmLabel:r})=>o.createElement(i.DialogActions,null,o.createElement(i.Button,{color:"secondary",onClick:e},n??(0,s.__)("Not now","elementor")),o.createElement(i.Button,{autoFocus:!0,variant:"contained",color:"error",onClick:t},r??(0,s.__)("Delete","elementor")))},"./packages/packages/libs/editor-ui/src/components/cta-button.tsx":function(e,t,n){n.r(t),n.d(t,{CtaButton:function(){return CtaButton}});var o=n("react"),r=n("@elementor/icons"),i=n("@elementor/ui"),s=n("@wordpress/i18n");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const CtaButton=({href:e,children:t,showIcon:n=!0,...a})=>o.createElement(i.Button,_extends({variant:"contained",color:"promotion",href:e,target:"_blank",startIcon:n?o.createElement(r.CrownFilledIcon,null):void 0},a),t??(0,s.__)("Upgrade Now","elementor"))},"./packages/packages/libs/editor-ui/src/components/editable-field.tsx":function(e,t,n){n.r(t),n.d(t,{EditableField:function(){return i}});var o=n("react"),r=n("@elementor/ui");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const i=(0,o.forwardRef)(({value:e,error:t,as:n="span",sx:i,...a},l)=>o.createElement(r.Tooltip,{title:t,open:!!t,placement:"top"},o.createElement(s,_extends({ref:l,component:n},a),e))),s=(0,r.styled)(r.Box)` | |
| 1432 | 3 | width: 100%; |
| 1433 | 4 | &:focus { |
| 1434 | 5 | outline: none; |
| 1435 | 6 | } |
| 1436 | -`; | |
| 1437 | - | |
| 1438 | -/***/ }), | |
| 1439 | - | |
| 1440 | -/***/ "./packages/packages/libs/editor-ui/src/components/ellipsis-with-tooltip.tsx": | |
| 1441 | -/*!***********************************************************************************!*\ | |
| 1442 | - !*** ./packages/packages/libs/editor-ui/src/components/ellipsis-with-tooltip.tsx ***! | |
| 1443 | - \***********************************************************************************/ | |
| 1444 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1445 | - | |
| 1446 | -__webpack_require__.r(__webpack_exports__); | |
| 1447 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1448 | -/* harmony export */ EllipsisWithTooltip: function() { return /* binding */ EllipsisWithTooltip; } | |
| 1449 | -/* harmony export */ }); | |
| 1450 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1451 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1452 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1453 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 1454 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 1455 | - | |
| 1456 | - | |
| 1457 | - | |
| 1458 | -const EllipsisWithTooltip = ({ | |
| 1459 | - maxWidth, | |
| 1460 | - title, | |
| 1461 | - as, | |
| 1462 | - ...props | |
| 1463 | -}) => { | |
| 1464 | - const [setRef, isOverflowing] = useIsOverflowing(); | |
| 1465 | - if (isOverflowing) { | |
| 1466 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Tooltip, { | |
| 1467 | - title: title, | |
| 1468 | - placement: "top" | |
| 1469 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Content, _extends({ | |
| 1470 | - maxWidth: maxWidth, | |
| 1471 | - ref: setRef, | |
| 1472 | - as: as | |
| 1473 | - }, props), title)); | |
| 1474 | - } | |
| 1475 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Content, _extends({ | |
| 1476 | - maxWidth: maxWidth, | |
| 1477 | - ref: setRef, | |
| 1478 | - as: as | |
| 1479 | - }, props), title); | |
| 1480 | -}; | |
| 1481 | -const Content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ | |
| 1482 | - maxWidth, | |
| 1483 | - as: Component = _elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Box, | |
| 1484 | - ...props | |
| 1485 | -}, ref) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, _extends({ | |
| 1486 | - ref: ref, | |
| 1487 | - position: "relative" | |
| 1488 | -}, props, { | |
| 1489 | - style: { | |
| 1490 | - overflow: 'hidden', | |
| 1491 | - textOverflow: 'ellipsis', | |
| 1492 | - whiteSpace: 'nowrap', | |
| 1493 | - maxWidth | |
| 1494 | - } | |
| 1495 | -}))); | |
| 1496 | -const useIsOverflowing = () => { | |
| 1497 | - const [el, setEl] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); | |
| 1498 | - const [isOverflowing, setIsOverflown] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); | |
| 1499 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 1500 | - const observer = new ResizeObserver(([{ | |
| 1501 | - target | |
| 1502 | - }]) => { | |
| 1503 | - setIsOverflown(target.scrollWidth > target.clientWidth); | |
| 1504 | - }); | |
| 1505 | - if (el) { | |
| 1506 | - observer.observe(el); | |
| 1507 | - } | |
| 1508 | - return () => { | |
| 1509 | - observer.disconnect(); | |
| 1510 | - }; | |
| 1511 | - }, [el]); | |
| 1512 | - return [setEl, isOverflowing]; | |
| 1513 | -}; | |
| 1514 | - | |
| 1515 | -/***/ }), | |
| 1516 | - | |
| 1517 | -/***/ "./packages/packages/libs/editor-ui/src/components/file-upload/file-upload-dropzone.tsx": | |
| 1518 | -/*!**********************************************************************************************!*\ | |
| 1519 | - !*** ./packages/packages/libs/editor-ui/src/components/file-upload/file-upload-dropzone.tsx ***! | |
| 1520 | - \**********************************************************************************************/ | |
| 1521 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1522 | - | |
| 1523 | -__webpack_require__.r(__webpack_exports__); | |
| 1524 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1525 | -/* harmony export */ FileUploadDropzone: function() { return /* binding */ FileUploadDropzone; } | |
| 1526 | -/* harmony export */ }); | |
| 1527 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1528 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1529 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 1530 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 1531 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1532 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 1533 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1534 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); | |
| 1535 | - | |
| 1536 | - | |
| 1537 | - | |
| 1538 | - | |
| 1539 | - | |
| 1540 | -const cardSx = { | |
| 1541 | - minHeight: 152, | |
| 1542 | - border: '2px dashed', | |
| 1543 | - borderColor: 'divider', | |
| 1544 | - borderRadius: 1 | |
| 1545 | -}; | |
| 1546 | -const FileUploadDropzone = ({ | |
| 1547 | - onFileSelected, | |
| 1548 | - allowedFileTypes, | |
| 1549 | - accept, | |
| 1550 | - regionLabel, | |
| 1551 | - primaryLabel, | |
| 1552 | - secondaryLabel, | |
| 1553 | - helperText | |
| 1554 | -}) => { | |
| 1555 | - const fileInputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); | |
| 1556 | - const { | |
| 1557 | - getDropZoneProps | |
| 1558 | - } = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.useUnstableDropZone)({ | |
| 1559 | - allowedFileTypes, | |
| 1560 | - onChange: ({ | |
| 1561 | - valid | |
| 1562 | - }) => { | |
| 1563 | - if (valid[0]) { | |
| 1564 | - onFileSelected(valid[0]); | |
| 1565 | - } | |
| 1566 | - } | |
| 1567 | - }); | |
| 1568 | - const dropZoneProps = getDropZoneProps(); | |
| 1569 | - const handleBrowseClick = () => fileInputRef.current?.click(); | |
| 1570 | - const handleFileInputChange = event => { | |
| 1571 | - const file = event.target.files?.[0]; | |
| 1572 | - if (file) { | |
| 1573 | - onFileSelected(file); | |
| 1574 | - } | |
| 1575 | - event.target.value = ''; | |
| 1576 | - }; | |
| 1577 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Card, { | |
| 1578 | - variant: "outlined", | |
| 1579 | - role: "region", | |
| 1580 | - "aria-label": regionLabel ?? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('File dropzone', 'elementor'), | |
| 1581 | - onDrop: dropZoneProps.onDrop, | |
| 1582 | - onDragEnter: dropZoneProps.onDragEnter, | |
| 1583 | - onDragLeave: dropZoneProps.onDragLeave, | |
| 1584 | - onDragOver: dropZoneProps.onDragOver, | |
| 1585 | - sx: cardSx | |
| 1586 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Stack, { | |
| 1587 | - alignItems: "center", | |
| 1588 | - spacing: 1, | |
| 1589 | - padding: 3 | |
| 1590 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.UploadIcon, { | |
| 1591 | - fontSize: "medium" | |
| 1592 | - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Stack, { | |
| 1593 | - direction: "row", | |
| 1594 | - spacing: 0.5, | |
| 1595 | - alignItems: "center" | |
| 1596 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Link, { | |
| 1597 | - component: "button", | |
| 1598 | - type: "button", | |
| 1599 | - underline: "always", | |
| 1600 | - onClick: handleBrowseClick | |
| 1601 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Typography, { | |
| 1602 | - variant: "body1", | |
| 1603 | - component: "span" | |
| 1604 | - }, primaryLabel ?? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Upload file', 'elementor'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Typography, { | |
| 1605 | - variant: "body1" | |
| 1606 | - }, secondaryLabel ?? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('or drag and drop', 'elementor'))), helperText ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Typography, { | |
| 1607 | - variant: "caption", | |
| 1608 | - color: "text.secondary" | |
| 1609 | - }, helperText) : null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { | |
| 1610 | - ref: fileInputRef, | |
| 1611 | - type: "file", | |
| 1612 | - accept: accept, | |
| 1613 | - hidden: true, | |
| 1614 | - onChange: handleFileInputChange | |
| 1615 | - })); | |
| 1616 | -}; | |
| 1617 | - | |
| 1618 | -/***/ }), | |
| 1619 | - | |
| 1620 | -/***/ "./packages/packages/libs/editor-ui/src/components/file-upload/file-upload-row.tsx": | |
| 1621 | -/*!*****************************************************************************************!*\ | |
| 1622 | - !*** ./packages/packages/libs/editor-ui/src/components/file-upload/file-upload-row.tsx ***! | |
| 1623 | - \*****************************************************************************************/ | |
| 1624 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1625 | - | |
| 1626 | -__webpack_require__.r(__webpack_exports__); | |
| 1627 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1628 | -/* harmony export */ FileUploadRow: function() { return /* binding */ FileUploadRow; } | |
| 1629 | -/* harmony export */ }); | |
| 1630 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1631 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1632 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 1633 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 1634 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1635 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 1636 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1637 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); | |
| 1638 | - | |
| 1639 | - | |
| 1640 | - | |
| 1641 | - | |
| 1642 | -const BYTES_PER_KILOBYTE = 1024; | |
| 1643 | -const cardSx = { | |
| 1644 | - minHeight: 152, | |
| 1645 | - border: '2px dashed', | |
| 1646 | - borderColor: 'divider', | |
| 1647 | - borderRadius: 1 | |
| 1648 | -}; | |
| 1649 | -const formatFileSize = sizeInBytes => { | |
| 1650 | - const kilobytes = Math.max(1, Math.round(sizeInBytes / BYTES_PER_KILOBYTE)); | |
| 1651 | - return `${kilobytes}kb`; | |
| 1652 | -}; | |
| 1653 | -const FileUploadRow = ({ | |
| 1654 | - file, | |
| 1655 | - onRemove, | |
| 1656 | - statusLabel | |
| 1657 | -}) => { | |
| 1658 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Card, { | |
| 1659 | - variant: "outlined", | |
| 1660 | - sx: cardSx | |
| 1661 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Stack, { | |
| 1662 | - direction: "row", | |
| 1663 | - alignItems: "center", | |
| 1664 | - justifyContent: "space-between", | |
| 1665 | - padding: 2, | |
| 1666 | - spacing: 2, | |
| 1667 | - minHeight: 152 | |
| 1668 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Stack, { | |
| 1669 | - direction: "column", | |
| 1670 | - spacing: 0.5, | |
| 1671 | - minWidth: 0, | |
| 1672 | - flex: 1 | |
| 1673 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Typography, { | |
| 1674 | - variant: "subtitle2", | |
| 1675 | - noWrap: true | |
| 1676 | - }, file.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Typography, { | |
| 1677 | - variant: "caption", | |
| 1678 | - color: "text.secondary", | |
| 1679 | - noWrap: true | |
| 1680 | - }, formatFileSize(file.size), " \xB7 ", statusLabel ?? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Complete', 'elementor'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.IconButton, { | |
| 1681 | - size: "small", | |
| 1682 | - onClick: onRemove, | |
| 1683 | - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Remove file', 'elementor') | |
| 1684 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.XIcon, { | |
| 1685 | - fontSize: "inherit" | |
| 1686 | - })))); | |
| 1687 | -}; | |
| 1688 | - | |
| 1689 | -/***/ }), | |
| 1690 | - | |
| 1691 | -/***/ "./packages/packages/libs/editor-ui/src/components/file-upload/index.ts": | |
| 1692 | -/*!******************************************************************************!*\ | |
| 1693 | - !*** ./packages/packages/libs/editor-ui/src/components/file-upload/index.ts ***! | |
| 1694 | - \******************************************************************************/ | |
| 1695 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1696 | - | |
| 1697 | -__webpack_require__.r(__webpack_exports__); | |
| 1698 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1699 | -/* harmony export */ FileUploadDropzone: function() { return /* reexport safe */ _file_upload_dropzone__WEBPACK_IMPORTED_MODULE_0__.FileUploadDropzone; }, | |
| 1700 | -/* harmony export */ FileUploadRow: function() { return /* reexport safe */ _file_upload_row__WEBPACK_IMPORTED_MODULE_1__.FileUploadRow; } | |
| 1701 | -/* harmony export */ }); | |
| 1702 | -/* harmony import */ var _file_upload_dropzone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./file-upload-dropzone */ "./packages/packages/libs/editor-ui/src/components/file-upload/file-upload-dropzone.tsx"); | |
| 1703 | -/* harmony import */ var _file_upload_row__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./file-upload-row */ "./packages/packages/libs/editor-ui/src/components/file-upload/file-upload-row.tsx"); | |
| 1704 | - | |
| 1705 | - | |
| 1706 | - | |
| 1707 | -/***/ }), | |
| 1708 | - | |
| 1709 | -/***/ "./packages/packages/libs/editor-ui/src/components/floating-bar.tsx": | |
| 1710 | -/*!**************************************************************************!*\ | |
| 1711 | - !*** ./packages/packages/libs/editor-ui/src/components/floating-bar.tsx ***! | |
| 1712 | - \**************************************************************************/ | |
| 1713 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1714 | - | |
| 1715 | -__webpack_require__.r(__webpack_exports__); | |
| 1716 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1717 | -/* harmony export */ FloatingActionsBar: function() { return /* binding */ FloatingActionsBar; }, | |
| 1718 | -/* harmony export */ useFloatingActionsBar: function() { return /* binding */ useFloatingActionsBar; } | |
| 1719 | -/* harmony export */ }); | |
| 1720 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1721 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1722 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1723 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 1724 | - | |
| 1725 | - | |
| 1726 | - | |
| 1727 | - | |
| 1728 | -// CSS hack to hide empty floating bars. | |
| 1729 | -const FloatingBarContainer = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.styled)('span')` | |
| 1730 | - display: contents; | |
| 1731 | - | |
| 1732 | - .MuiFloatingActionBar-popper:has( .MuiFloatingActionBar-actions:empty ) { | |
| 1733 | - display: none; | |
| 1734 | - } | |
| 1735 | - | |
| 1736 | - .MuiFloatingActionBar-popper { | |
| 1737 | - z-index: 1000; | |
| 1738 | - } | |
| 1739 | -`; | |
| 1740 | -const FloatingActionsContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null); | |
| 1741 | -function FloatingActionsBar({ | |
| 1742 | - actions, | |
| 1743 | - children | |
| 1744 | -}) { | |
| 1745 | - const [open, setOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); | |
| 1746 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(FloatingActionsContext.Provider, { | |
| 1747 | - value: { | |
| 1748 | - open, | |
| 1749 | - setOpen | |
| 1750 | - } | |
| 1751 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(FloatingBarContainer, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.UnstableFloatingActionBar, { | |
| 1752 | - actions: actions, | |
| 1753 | - open: open || undefined | |
| 1754 | - }, children))); | |
| 1755 | -} | |
| 1756 | -function useFloatingActionsBar() { | |
| 1757 | - const context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(FloatingActionsContext); | |
| 1758 | - if (!context) { | |
| 1759 | - throw new Error('useFloatingActions must be used within a FloatingActionsBar'); | |
| 1760 | - } | |
| 1761 | - return context; | |
| 1762 | -} | |
| 1763 | - | |
| 1764 | -/***/ }), | |
| 1765 | - | |
| 1766 | -/***/ "./packages/packages/libs/editor-ui/src/components/form.tsx": | |
| 1767 | -/*!******************************************************************!*\ | |
| 1768 | - !*** ./packages/packages/libs/editor-ui/src/components/form.tsx ***! | |
| 1769 | - \******************************************************************/ | |
| 1770 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1771 | - | |
| 1772 | -__webpack_require__.r(__webpack_exports__); | |
| 1773 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1774 | -/* harmony export */ Form: function() { return /* binding */ Form; } | |
| 1775 | -/* harmony export */ }); | |
| 1776 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1777 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1778 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 1779 | - | |
| 1780 | - | |
| 1781 | -const Form = ({ | |
| 1782 | - children, | |
| 1783 | - onSubmit, | |
| 1784 | - 'data-testid': dataTestId | |
| 1785 | -}) => { | |
| 1786 | - const formRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); | |
| 1787 | - const handleSubmit = e => { | |
| 1788 | - e.preventDefault(); | |
| 1789 | - onSubmit?.(); | |
| 1790 | - }; | |
| 1791 | - const handleKeyDown = e => { | |
| 1792 | - const { | |
| 1793 | - target | |
| 1794 | - } = e; | |
| 1795 | - if (e.key === 'Enter' && target instanceof HTMLInputElement && target.type !== 'submit') { | |
| 1796 | - e.preventDefault(); | |
| 1797 | - formRef.current?.requestSubmit(); | |
| 1798 | - } | |
| 1799 | - }; | |
| 1800 | - return ( | |
| 1801 | - /*#__PURE__*/ | |
| 1802 | - // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions | |
| 1803 | - react__WEBPACK_IMPORTED_MODULE_0__.createElement("form", _extends({ | |
| 1804 | - onSubmit: handleSubmit, | |
| 1805 | - ref: formRef, | |
| 1806 | - onKeyDown: handleKeyDown | |
| 1807 | - }, dataTestId ? { | |
| 1808 | - 'data-testid': dataTestId | |
| 1809 | - } : {}), children) | |
| 1810 | - ); | |
| 1811 | -}; | |
| 1812 | - | |
| 1813 | -/***/ }), | |
| 1814 | - | |
| 1815 | -/***/ "./packages/packages/libs/editor-ui/src/components/global-dialog/components/global-dialog.tsx": | |
| 1816 | -/*!****************************************************************************************************!*\ | |
| 1817 | - !*** ./packages/packages/libs/editor-ui/src/components/global-dialog/components/global-dialog.tsx ***! | |
| 1818 | - \****************************************************************************************************/ | |
| 1819 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1820 | - | |
| 1821 | -__webpack_require__.r(__webpack_exports__); | |
| 1822 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1823 | -/* harmony export */ GlobalDialog: function() { return /* binding */ GlobalDialog; } | |
| 1824 | -/* harmony export */ }); | |
| 1825 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1826 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1827 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1828 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 1829 | -/* harmony import */ var _theme_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme-provider */ "./packages/packages/libs/editor-ui/src/components/theme-provider.tsx"); | |
| 1830 | -/* harmony import */ var _subscribers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../subscribers */ "./packages/packages/libs/editor-ui/src/components/global-dialog/subscribers.ts"); | |
| 1831 | - | |
| 1832 | - | |
| 1833 | - | |
| 1834 | - | |
| 1835 | - | |
| 1836 | -const GlobalDialog = () => { | |
| 1837 | - const [content, setContent] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); | |
| 1838 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 1839 | - const unsubscribe = (0,_subscribers__WEBPACK_IMPORTED_MODULE_3__.subscribeToDialogState)(setContent); | |
| 1840 | - return () => { | |
| 1841 | - unsubscribe(); | |
| 1842 | - }; | |
| 1843 | - }, []); | |
| 1844 | - if (!content) { | |
| 1845 | - return null; | |
| 1846 | - } | |
| 1847 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_theme_provider__WEBPACK_IMPORTED_MODULE_2__["default"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Dialog, { | |
| 1848 | - role: "dialog", | |
| 1849 | - open: true, | |
| 1850 | - onClose: _subscribers__WEBPACK_IMPORTED_MODULE_3__.closeDialog, | |
| 1851 | - maxWidth: "sm", | |
| 1852 | - fullWidth: true | |
| 1853 | - }, content.component)); | |
| 1854 | -}; | |
| 1855 | - | |
| 1856 | -/***/ }), | |
| 1857 | - | |
| 1858 | -/***/ "./packages/packages/libs/editor-ui/src/components/global-dialog/index.ts": | |
| 1859 | -/*!********************************************************************************!*\ | |
| 1860 | - !*** ./packages/packages/libs/editor-ui/src/components/global-dialog/index.ts ***! | |
| 1861 | - \********************************************************************************/ | |
| 1862 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1863 | - | |
| 1864 | -__webpack_require__.r(__webpack_exports__); | |
| 1865 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1866 | -/* harmony export */ GlobalDialog: function() { return /* reexport safe */ _components_global_dialog__WEBPACK_IMPORTED_MODULE_0__.GlobalDialog; }, | |
| 1867 | -/* harmony export */ closeDialog: function() { return /* reexport safe */ _subscribers__WEBPACK_IMPORTED_MODULE_1__.closeDialog; }, | |
| 1868 | -/* harmony export */ openDialog: function() { return /* reexport safe */ _subscribers__WEBPACK_IMPORTED_MODULE_1__.openDialog; } | |
| 1869 | -/* harmony export */ }); | |
| 1870 | -/* harmony import */ var _components_global_dialog__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/global-dialog */ "./packages/packages/libs/editor-ui/src/components/global-dialog/components/global-dialog.tsx"); | |
| 1871 | -/* harmony import */ var _subscribers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribers */ "./packages/packages/libs/editor-ui/src/components/global-dialog/subscribers.ts"); | |
| 1872 | - | |
| 1873 | - | |
| 1874 | - | |
| 1875 | -/***/ }), | |
| 1876 | - | |
| 1877 | -/***/ "./packages/packages/libs/editor-ui/src/components/global-dialog/subscribers.ts": | |
| 1878 | -/*!**************************************************************************************!*\ | |
| 1879 | - !*** ./packages/packages/libs/editor-ui/src/components/global-dialog/subscribers.ts ***! | |
| 1880 | - \**************************************************************************************/ | |
| 1881 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1882 | - | |
| 1883 | -__webpack_require__.r(__webpack_exports__); | |
| 1884 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1885 | -/* harmony export */ closeDialog: function() { return /* binding */ closeDialog; }, | |
| 1886 | -/* harmony export */ openDialog: function() { return /* binding */ openDialog; }, | |
| 1887 | -/* harmony export */ subscribeToDialogState: function() { return /* binding */ subscribeToDialogState; } | |
| 1888 | -/* harmony export */ }); | |
| 1889 | -let currentDialogState = null; | |
| 1890 | -const stateSubscribers = new Set(); | |
| 1891 | -const subscribeToDialogState = callback => { | |
| 1892 | - stateSubscribers.add(callback); | |
| 1893 | - callback(currentDialogState); | |
| 1894 | - return () => stateSubscribers.delete(callback); | |
| 1895 | -}; | |
| 1896 | -const notifySubscribers = () => { | |
| 1897 | - stateSubscribers.forEach(callback => callback(currentDialogState)); | |
| 1898 | -}; | |
| 1899 | -const openDialog = ({ | |
| 1900 | - component | |
| 1901 | -}) => { | |
| 1902 | - currentDialogState = { | |
| 1903 | - component | |
| 1904 | - }; | |
| 1905 | - notifySubscribers(); | |
| 1906 | -}; | |
| 1907 | -const closeDialog = () => { | |
| 1908 | - currentDialogState = null; | |
| 1909 | - notifySubscribers(); | |
| 1910 | -}; | |
| 1911 | - | |
| 1912 | -/***/ }), | |
| 1913 | - | |
| 1914 | -/***/ "./packages/packages/libs/editor-ui/src/components/info-alert.tsx": | |
| 1915 | -/*!************************************************************************!*\ | |
| 1916 | - !*** ./packages/packages/libs/editor-ui/src/components/info-alert.tsx ***! | |
| 1917 | - \************************************************************************/ | |
| 1918 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1919 | - | |
| 1920 | -__webpack_require__.r(__webpack_exports__); | |
| 1921 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1922 | -/* harmony export */ InfoAlert: function() { return /* binding */ InfoAlert; } | |
| 1923 | -/* harmony export */ }); | |
| 1924 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1925 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1926 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 1927 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 1928 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1929 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 1930 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 1931 | - | |
| 1932 | - | |
| 1933 | - | |
| 1934 | -const InfoAlert = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Alert, _extends({ | |
| 1935 | - icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.InfoCircleFilledIcon, { | |
| 1936 | - fontSize: "small", | |
| 1937 | - color: "secondary" | |
| 1938 | - }), | |
| 1939 | - variant: 'standard', | |
| 1940 | - color: "secondary", | |
| 1941 | - elevation: 0, | |
| 1942 | - size: "small" | |
| 1943 | -}, props)); | |
| 1944 | - | |
| 1945 | -/***/ }), | |
| 1946 | - | |
| 1947 | -/***/ "./packages/packages/libs/editor-ui/src/components/infotip-card.tsx": | |
| 1948 | -/*!**************************************************************************!*\ | |
| 1949 | - !*** ./packages/packages/libs/editor-ui/src/components/infotip-card.tsx ***! | |
| 1950 | - \**************************************************************************/ | |
| 1951 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 1952 | - | |
| 1953 | -__webpack_require__.r(__webpack_exports__); | |
| 1954 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 1955 | -/* harmony export */ InfoTipCard: function() { return /* binding */ InfoTipCard; } | |
| 1956 | -/* harmony export */ }); | |
| 1957 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 1958 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 1959 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1960 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 1961 | - | |
| 1962 | - | |
| 1963 | -const InfoTipCard = ({ | |
| 1964 | - content, | |
| 1965 | - svgIcon, | |
| 1966 | - learnMoreButton, | |
| 1967 | - ctaButton | |
| 1968 | -}) => { | |
| 1969 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Card, { | |
| 1970 | - elevation: 0, | |
| 1971 | - sx: { | |
| 1972 | - width: 320 | |
| 1973 | - } | |
| 1974 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.CardContent, { | |
| 1975 | - sx: { | |
| 1976 | - pb: 0 | |
| 1977 | - } | |
| 1978 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Box, { | |
| 1979 | - display: "flex", | |
| 1980 | - alignItems: "start" | |
| 1981 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.SvgIcon, { | |
| 1982 | - fontSize: "tiny", | |
| 1983 | - sx: { | |
| 1984 | - mr: 0.5 | |
| 1985 | - } | |
| 1986 | - }, svgIcon), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Typography, { | |
| 1987 | - variant: "body2" | |
| 1988 | - }, content, learnMoreButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, "\xA0", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Link, { | |
| 1989 | - color: "info.main", | |
| 1990 | - href: learnMoreButton.href, | |
| 1991 | - target: "_blank" | |
| 1992 | - }, learnMoreButton.label))))), ctaButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.CardActions, { | |
| 1993 | - sx: { | |
| 1994 | - justifyContent: 'flex-start' | |
| 1995 | - } | |
| 1996 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Button, { | |
| 1997 | - size: "small", | |
| 1998 | - color: "secondary", | |
| 1999 | - variant: "contained", | |
| 2000 | - onClick: ctaButton.onClick, | |
| 2001 | - sx: { | |
| 2002 | - marginInlineStart: '1rem' | |
| 2003 | - } | |
| 2004 | - }, ctaButton.label))); | |
| 2005 | -}; | |
| 2006 | - | |
| 2007 | -/***/ }), | |
| 2008 | - | |
| 2009 | -/***/ "./packages/packages/libs/editor-ui/src/components/introduction-modal.tsx": | |
| 2010 | -/*!********************************************************************************!*\ | |
| 2011 | - !*** ./packages/packages/libs/editor-ui/src/components/introduction-modal.tsx ***! | |
| 2012 | - \********************************************************************************/ | |
| 2013 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2014 | - | |
| 2015 | -__webpack_require__.r(__webpack_exports__); | |
| 2016 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2017 | -/* harmony export */ IntroductionModal: function() { return /* binding */ IntroductionModal; } | |
| 2018 | -/* harmony export */ }); | |
| 2019 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2020 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2021 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2022 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 2023 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 2024 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); | |
| 2025 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 2026 | - | |
| 2027 | - | |
| 2028 | - | |
| 2029 | - | |
| 2030 | -const IntroductionModal = ({ | |
| 2031 | - open, | |
| 2032 | - handleClose, | |
| 2033 | - title, | |
| 2034 | - children | |
| 2035 | -}) => { | |
| 2036 | - const [shouldShowAgain, setShouldShowAgain] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true); | |
| 2037 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Dialog, { | |
| 2038 | - open: open, | |
| 2039 | - onClose: handleClose, | |
| 2040 | - maxWidth: 'sm', | |
| 2041 | - TransitionComponent: Transition | |
| 2042 | - }, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.DialogHeader, { | |
| 2043 | - logo: false | |
| 2044 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.DialogTitle, null, title)), children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.DialogActions, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.FormControlLabel, { | |
| 2045 | - sx: { | |
| 2046 | - marginRight: 'auto' | |
| 2047 | - }, | |
| 2048 | - control: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Checkbox, { | |
| 2049 | - checked: !shouldShowAgain, | |
| 2050 | - onChange: () => setShouldShowAgain(!shouldShowAgain) | |
| 2051 | - }), | |
| 2052 | - label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Typography, { | |
| 2053 | - variant: 'body2' | |
| 2054 | - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Don't show this again", 'elementor')) | |
| 2055 | - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Button, { | |
| 2056 | - size: 'medium', | |
| 2057 | - variant: "contained", | |
| 2058 | - sx: { | |
| 2059 | - minWidth: '135px' | |
| 2060 | - }, | |
| 2061 | - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Got it introduction', 'elementor'), | |
| 2062 | - onClick: () => handleClose(shouldShowAgain) | |
| 2063 | - }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Got it', 'elementor')))); | |
| 2064 | -}; | |
| 2065 | -const Transition = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, ref) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Fade, _extends({ | |
| 2066 | - ref: ref | |
| 2067 | -}, props, { | |
| 2068 | - timeout: { | |
| 2069 | - enter: 1000, | |
| 2070 | - exit: 200 | |
| 2071 | - } | |
| 2072 | -}))); | |
| 2073 | - | |
| 2074 | -/***/ }), | |
| 2075 | - | |
| 2076 | -/***/ "./packages/packages/libs/editor-ui/src/components/menu-item.tsx": | |
| 2077 | -/*!***********************************************************************!*\ | |
| 2078 | - !*** ./packages/packages/libs/editor-ui/src/components/menu-item.tsx ***! | |
| 2079 | - \***********************************************************************/ | |
| 2080 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2081 | - | |
| 2082 | -__webpack_require__.r(__webpack_exports__); | |
| 2083 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2084 | -/* harmony export */ MenuItemInfotip: function() { return /* binding */ MenuItemInfotip; }, | |
| 2085 | -/* harmony export */ MenuListItem: function() { return /* binding */ MenuListItem; } | |
| 2086 | -/* harmony export */ }); | |
| 2087 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2088 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2089 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2090 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 2091 | -/* harmony import */ var _info_alert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./info-alert */ "./packages/packages/libs/editor-ui/src/components/info-alert.tsx"); | |
| 2092 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 2093 | - | |
| 2094 | - | |
| 2095 | - | |
| 2096 | - | |
| 2097 | -const MenuListItem = ({ | |
| 2098 | - children, | |
| 2099 | - menuItemTextProps, | |
| 2100 | - primaryTypographyProps = { | |
| 2101 | - variant: 'caption' | |
| 2102 | - }, | |
| 2103 | - ...props | |
| 2104 | -}) => { | |
| 2105 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.MenuItem, _extends({ | |
| 2106 | - dense: true | |
| 2107 | - }, props, { | |
| 2108 | - sx: { | |
| 2109 | - ...(props.sx ?? {}) | |
| 2110 | - } | |
| 2111 | - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.MenuItemText, _extends({ | |
| 2112 | - primary: children, | |
| 2113 | - primaryTypographyProps: primaryTypographyProps | |
| 2114 | - }, menuItemTextProps))); | |
| 2115 | -}; | |
| 2116 | -const MenuItemInfotip = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({ | |
| 2117 | - showInfoTip = false, | |
| 2118 | - children, | |
| 2119 | - content | |
| 2120 | -}, ref) => { | |
| 2121 | - if (!showInfoTip) { | |
| 2122 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, children); | |
| 2123 | - } | |
| 2124 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Infotip, { | |
| 2125 | - ref: ref, | |
| 2126 | - placement: 'right', | |
| 2127 | - arrow: false, | |
| 2128 | - content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_info_alert__WEBPACK_IMPORTED_MODULE_2__.InfoAlert, { | |
| 2129 | - sx: { | |
| 2130 | - maxWidth: 325 | |
| 2131 | - } | |
| 2132 | - }, content) | |
| 2133 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { | |
| 2134 | - style: { | |
| 2135 | - pointerEvents: 'initial', | |
| 2136 | - width: '100%' | |
| 2137 | - }, | |
| 2138 | - onClick: e => e.stopPropagation() | |
| 2139 | - }, children)); | |
| 2140 | -}); | |
| 2141 | - | |
| 2142 | -/***/ }), | |
| 2143 | - | |
| 2144 | -/***/ "./packages/packages/libs/editor-ui/src/components/popover/body.tsx": | |
| 2145 | -/*!**************************************************************************!*\ | |
| 2146 | - !*** ./packages/packages/libs/editor-ui/src/components/popover/body.tsx ***! | |
| 2147 | - \**************************************************************************/ | |
| 2148 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2149 | - | |
| 2150 | -__webpack_require__.r(__webpack_exports__); | |
| 2151 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2152 | -/* harmony export */ PopoverBody: function() { return /* binding */ PopoverBody; } | |
| 2153 | -/* harmony export */ }); | |
| 2154 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2155 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2156 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2157 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 2158 | - | |
| 2159 | - | |
| 2160 | -const SECTION_PADDING_INLINE = 32; | |
| 2161 | -const DEFAULT_POPOVER_HEIGHT = 348; | |
| 2162 | -const FALLBACK_POPOVER_WIDTH = 220; | |
| 2163 | -const PopoverBody = ({ | |
| 2164 | - children, | |
| 2165 | - height = DEFAULT_POPOVER_HEIGHT, | |
| 2166 | - width, | |
| 2167 | - id | |
| 2168 | -}) => { | |
| 2169 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Box, { | |
| 2170 | - display: "flex", | |
| 2171 | - flexDirection: "column", | |
| 2172 | - sx: { | |
| 2173 | - height, | |
| 2174 | - overflow: 'hidden', | |
| 2175 | - width: `${width ? width - SECTION_PADDING_INLINE : FALLBACK_POPOVER_WIDTH}px`, | |
| 2176 | - maxWidth: 496 | |
| 2177 | - }, | |
| 2178 | - id: id | |
| 2179 | - }, children); | |
| 2180 | -}; | |
| 2181 | - | |
| 2182 | -/***/ }), | |
| 2183 | - | |
| 2184 | -/***/ "./packages/packages/libs/editor-ui/src/components/popover/header.tsx": | |
| 2185 | -/*!****************************************************************************!*\ | |
| 2186 | - !*** ./packages/packages/libs/editor-ui/src/components/popover/header.tsx ***! | |
| 2187 | - \****************************************************************************/ | |
| 2188 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2189 | - | |
| 2190 | -__webpack_require__.r(__webpack_exports__); | |
| 2191 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2192 | -/* harmony export */ PopoverHeader: function() { return /* binding */ PopoverHeader; } | |
| 2193 | -/* harmony export */ }); | |
| 2194 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2195 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2196 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2197 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 2198 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 2199 | - | |
| 2200 | - | |
| 2201 | -const SIZE = 'tiny'; | |
| 2202 | -const PopoverHeader = ({ | |
| 2203 | - title, | |
| 2204 | - onClose, | |
| 2205 | - icon, | |
| 2206 | - actions | |
| 2207 | -}) => { | |
| 2208 | - const paddingAndSizing = { | |
| 2209 | - pl: 2, | |
| 2210 | - pr: 1, | |
| 2211 | - py: 1.5, | |
| 2212 | - maxHeight: 36 | |
| 2213 | - }; | |
| 2214 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Stack, _extends({ | |
| 2215 | - direction: "row", | |
| 2216 | - alignItems: "center" | |
| 2217 | - }, paddingAndSizing, { | |
| 2218 | - sx: { | |
| 2219 | - columnGap: 0.5 | |
| 2220 | - } | |
| 2221 | - }), icon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Typography, { | |
| 2222 | - variant: "subtitle2", | |
| 2223 | - sx: { | |
| 2224 | - fontSize: '12px', | |
| 2225 | - mt: 0.25 | |
| 2226 | - } | |
| 2227 | - }, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Stack, { | |
| 2228 | - direction: "row", | |
| 2229 | - sx: { | |
| 2230 | - ml: 'auto' | |
| 2231 | - } | |
| 2232 | - }, actions, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.CloseButton, { | |
| 2233 | - slotProps: { | |
| 2234 | - icon: { | |
| 2235 | - fontSize: SIZE | |
| 2236 | - } | |
| 2237 | - }, | |
| 2238 | - sx: { | |
| 2239 | - ml: 'auto' | |
| 2240 | - }, | |
| 2241 | - onClick: onClose | |
| 2242 | - }))); | |
| 2243 | -}; | |
| 2244 | - | |
| 2245 | -/***/ }), | |
| 2246 | - | |
| 2247 | -/***/ "./packages/packages/libs/editor-ui/src/components/popover/index.ts": | |
| 2248 | -/*!**************************************************************************!*\ | |
| 2249 | - !*** ./packages/packages/libs/editor-ui/src/components/popover/index.ts ***! | |
| 2250 | - \**************************************************************************/ | |
| 2251 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2252 | - | |
| 2253 | -__webpack_require__.r(__webpack_exports__); | |
| 2254 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2255 | -/* harmony export */ ITEM_HEIGHT: function() { return /* reexport safe */ _menu_list__WEBPACK_IMPORTED_MODULE_3__.ITEM_HEIGHT; }, | |
| 2256 | -/* harmony export */ PopoverAction: function() { return /* reexport safe */ _popover_action__WEBPACK_IMPORTED_MODULE_4__.PopoverAction; }, | |
| 2257 | -/* harmony export */ PopoverBody: function() { return /* reexport safe */ _body__WEBPACK_IMPORTED_MODULE_0__.PopoverBody; }, | |
| 2258 | -/* harmony export */ PopoverHeader: function() { return /* reexport safe */ _header__WEBPACK_IMPORTED_MODULE_2__.PopoverHeader; }, | |
| 2259 | -/* harmony export */ PopoverMenuList: function() { return /* reexport safe */ _menu_list__WEBPACK_IMPORTED_MODULE_3__.PopoverMenuList; }, | |
| 2260 | -/* harmony export */ SectionPopoverBody: function() { return /* reexport safe */ _section_popover_body__WEBPACK_IMPORTED_MODULE_1__.SectionPopoverBody; }, | |
| 2261 | -/* harmony export */ StyledMenuList: function() { return /* reexport safe */ _menu_list__WEBPACK_IMPORTED_MODULE_3__.StyledMenuList; } | |
| 2262 | -/* harmony export */ }); | |
| 2263 | -/* harmony import */ var _body__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./body */ "./packages/packages/libs/editor-ui/src/components/popover/body.tsx"); | |
| 2264 | -/* harmony import */ var _section_popover_body__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./section-popover-body */ "./packages/packages/libs/editor-ui/src/components/popover/section-popover-body.tsx"); | |
| 2265 | -/* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./header */ "./packages/packages/libs/editor-ui/src/components/popover/header.tsx"); | |
| 2266 | -/* harmony import */ var _menu_list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./menu-list */ "./packages/packages/libs/editor-ui/src/components/popover/menu-list.tsx"); | |
| 2267 | -/* harmony import */ var _popover_action__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./popover-action */ "./packages/packages/libs/editor-ui/src/components/popover/popover-action.tsx"); | |
| 2268 | - | |
| 2269 | - | |
| 2270 | - | |
| 2271 | - | |
| 2272 | - | |
| 2273 | - | |
| 2274 | -/***/ }), | |
| 2275 | - | |
| 2276 | -/***/ "./packages/packages/libs/editor-ui/src/components/popover/menu-list.tsx": | |
| 2277 | -/*!*******************************************************************************!*\ | |
| 2278 | - !*** ./packages/packages/libs/editor-ui/src/components/popover/menu-list.tsx ***! | |
| 2279 | - \*******************************************************************************/ | |
| 2280 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2281 | - | |
| 2282 | -__webpack_require__.r(__webpack_exports__); | |
| 2283 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2284 | -/* harmony export */ ITEM_HEIGHT: function() { return /* binding */ ITEM_HEIGHT; }, | |
| 2285 | -/* harmony export */ PopoverMenuList: function() { return /* binding */ PopoverMenuList; }, | |
| 2286 | -/* harmony export */ StyledMenuList: function() { return /* binding */ StyledMenuList; } | |
| 2287 | -/* harmony export */ }); | |
| 2288 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2289 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2290 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2291 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 2292 | -/* harmony import */ var _tanstack_react_virtual__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tanstack/react-virtual */ "./packages/node_modules/@tanstack/react-virtual/dist/esm/index.js"); | |
| 2293 | -/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hooks */ "./packages/packages/libs/editor-ui/src/hooks/index.ts"); | |
| 2294 | - | |
| 2295 | - | |
| 2296 | - | |
| 2297 | - | |
| 2298 | - | |
| 2299 | -const ITEM_HEIGHT = 32; | |
| 2300 | -const LIST_ITEMS_BUFFER = 6; | |
| 2301 | -const MENU_LIST_PADDING_TOP = 8; | |
| 2302 | -const menuSubHeaderAbsoluteStyling = start => ({ | |
| 2303 | - position: 'absolute', | |
| 2304 | - transform: `translateY(${start + MENU_LIST_PADDING_TOP}px)` | |
| 2305 | -}); | |
| 2306 | -const getAdjacentStickyIndices = (stickyIndices, range) => { | |
| 2307 | - const previousTwoStickyIndices = stickyIndices.filter(stickyIndex => stickyIndex < range.startIndex).slice(-2); | |
| 2308 | - const nextTwoStickyIndices = stickyIndices.filter(stickyIndex => stickyIndex > range.endIndex).slice(0, 2); | |
| 2309 | - return [...previousTwoStickyIndices, ...nextTwoStickyIndices]; | |
| 2310 | -}; | |
| 2311 | -const PopoverMenuList = ({ | |
| 2312 | - items, | |
| 2313 | - onSelect, | |
| 2314 | - onClose, | |
| 2315 | - selectedValue, | |
| 2316 | - itemStyle, | |
| 2317 | - onChange, | |
| 2318 | - 'data-testid': dataTestId, | |
| 2319 | - menuItemContentTemplate, | |
| 2320 | - categoryItemContentTemplate, | |
| 2321 | - noResultsComponent, | |
| 2322 | - menuListTemplate: CustomMenuList | |
| 2323 | -}) => { | |
| 2324 | - const containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); | |
| 2325 | - const scrollTop = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useScrollTop)({ | |
| 2326 | - containerRef | |
| 2327 | - }); | |
| 2328 | - const theme = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.useTheme)(); | |
| 2329 | - const MenuListComponent = CustomMenuList || StyledMenuList; | |
| 2330 | - const stickyIndices = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => items.reduce((categoryIndices, item, index) => { | |
| 2331 | - if (item.type === 'category') { | |
| 2332 | - categoryIndices.push(index); | |
| 2333 | - } | |
| 2334 | - return categoryIndices; | |
| 2335 | - }, []), [items]); | |
| 2336 | - const getActiveItemIndices = range => { | |
| 2337 | - const visibleAndStickyIndexes = []; | |
| 2338 | - for (let i = range.startIndex; i <= range.endIndex; i++) { | |
| 2339 | - visibleAndStickyIndexes.push(i); | |
| 2340 | - } | |
| 2341 | - const stickyIndicesToShow = getAdjacentStickyIndices(stickyIndices, range); | |
| 2342 | - stickyIndicesToShow.forEach(stickyIndex => { | |
| 2343 | - if (!visibleAndStickyIndexes.includes(stickyIndex)) { | |
| 2344 | - visibleAndStickyIndexes.push(stickyIndex); | |
| 2345 | - } | |
| 2346 | - }); | |
| 2347 | - return visibleAndStickyIndexes.sort((a, b) => a - b); | |
| 2348 | - }; | |
| 2349 | - const onChangeCallback = ({ | |
| 2350 | - getVirtualIndexes | |
| 2351 | - }) => { | |
| 2352 | - const visibleItems = getVirtualIndexes().map(index => items[index]); | |
| 2353 | - onChange?.(visibleItems); | |
| 2354 | - }; | |
| 2355 | - const virtualizer = (0,_tanstack_react_virtual__WEBPACK_IMPORTED_MODULE_2__.useVirtualizer)({ | |
| 2356 | - count: items.length, | |
| 2357 | - getScrollElement: () => containerRef.current, | |
| 2358 | - estimateSize: () => ITEM_HEIGHT, | |
| 2359 | - overscan: LIST_ITEMS_BUFFER, | |
| 2360 | - rangeExtractor: getActiveItemIndices, | |
| 2361 | - onChange: onChangeCallback | |
| 2362 | - }); | |
| 2363 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 2364 | - onChangeCallback(virtualizer); | |
| 2365 | - // eslint-disable-next-line react-hooks/exhaustive-deps | |
| 2366 | - }, [items]); | |
| 2367 | - (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useScrollToSelected)({ | |
| 2368 | - selectedValue, | |
| 2369 | - items, | |
| 2370 | - virtualizer | |
| 2371 | - }); | |
| 2372 | - const virtualItems = virtualizer.getVirtualItems(); | |
| 2373 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Box, { | |
| 2374 | - ref: containerRef, | |
| 2375 | - sx: { | |
| 2376 | - height: '100%', | |
| 2377 | - overflowY: 'auto' | |
| 2378 | - } | |
| 2379 | - }, items.length === 0 && noResultsComponent ? noResultsComponent : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(MenuListComponent, { | |
| 2380 | - role: "listbox", | |
| 2381 | - style: { | |
| 2382 | - height: `${virtualizer.getTotalSize()}px` | |
| 2383 | - }, | |
| 2384 | - "data-testid": dataTestId | |
| 2385 | - }, virtualItems.map(virtualRow => { | |
| 2386 | - const item = items[virtualRow.index]; | |
| 2387 | - const isLast = virtualRow.index === items.length - 1; | |
| 2388 | - const isFirst = items[0]?.type === 'category' ? virtualRow.index === 1 : virtualRow.index === 0; | |
| 2389 | - const isSelected = selectedValue === item.value; | |
| 2390 | - const tabIndexFallback = !selectedValue ? 0 : -1; | |
| 2391 | - if (!item) { | |
| 2392 | - return null; | |
| 2393 | - } | |
| 2394 | - if (item.type === 'category') { | |
| 2395 | - const shouldStick = virtualRow.start + MENU_LIST_PADDING_TOP <= scrollTop; | |
| 2396 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.MenuSubheader, { | |
| 2397 | - key: virtualRow.key, | |
| 2398 | - style: shouldStick ? {} : menuSubHeaderAbsoluteStyling(virtualRow.start), | |
| 2399 | - sx: { | |
| 2400 | - fontWeight: '400', | |
| 2401 | - color: 'text.tertiary' | |
| 2402 | - } | |
| 2403 | - }, categoryItemContentTemplate ? categoryItemContentTemplate(item) : item.label || item.value); | |
| 2404 | - } | |
| 2405 | - const isDisabled = item.disabled; | |
| 2406 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.ListItem, { | |
| 2407 | - key: virtualRow.key, | |
| 2408 | - role: "option", | |
| 2409 | - "aria-selected": isSelected, | |
| 2410 | - "aria-disabled": isDisabled, | |
| 2411 | - onClick: isDisabled ? undefined : e => { | |
| 2412 | - if (e.target.closest('button')) { | |
| 2413 | - return; | |
| 2414 | - } | |
| 2415 | - onSelect(item.value); | |
| 2416 | - onClose(); | |
| 2417 | - }, | |
| 2418 | - onKeyDown: event => { | |
| 2419 | - if (event.key === 'Enter' && !isDisabled) { | |
| 2420 | - onSelect(item.value); | |
| 2421 | - onClose(); | |
| 2422 | - } | |
| 2423 | - if (event.key === 'ArrowDown' && isLast) { | |
| 2424 | - event.preventDefault(); | |
| 2425 | - event.stopPropagation(); | |
| 2426 | - } | |
| 2427 | - if (event.key === 'ArrowUp' && isFirst) { | |
| 2428 | - event.preventDefault(); | |
| 2429 | - event.stopPropagation(); | |
| 2430 | - } | |
| 2431 | - }, | |
| 2432 | - tabIndex: isSelected ? 0 : tabIndexFallback, | |
| 2433 | - sx: { | |
| 2434 | - transform: `translateY(${virtualRow.start + MENU_LIST_PADDING_TOP}px)`, | |
| 2435 | - ...theme.typography.caption, | |
| 2436 | - ...(itemStyle ? itemStyle(item) : {}) | |
| 2437 | - } | |
| 2438 | - }, menuItemContentTemplate ? menuItemContentTemplate(item) : item.label || item.value); | |
| 2439 | - }))); | |
| 2440 | -}; | |
| 2441 | -const StyledMenuList = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.styled)(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.MenuList)(({ | |
| 2442 | - theme | |
| 2443 | -}) => ({ | |
| 2444 | - '& > li': { | |
| 2445 | - height: ITEM_HEIGHT, | |
| 2446 | - width: '100%', | |
| 2447 | - display: 'flex', | |
| 2448 | - alignItems: 'center' | |
| 2449 | - }, | |
| 2450 | - '& > [role="option"]': { | |
| 2451 | - lineHeight: 'inherit', | |
| 2452 | - padding: theme.spacing(0.75, 2, 0.75, 4), | |
| 2453 | - '&:hover, &:focus': { | |
| 2454 | - backgroundColor: theme.palette.action.hover | |
| 2455 | - }, | |
| 2456 | - '&[aria-selected="true"]': { | |
| 2457 | - backgroundColor: theme.palette.action.selected | |
| 2458 | - }, | |
| 2459 | - '&[aria-disabled="true"]': { | |
| 2460 | - color: theme.palette.text.disabled | |
| 2461 | - }, | |
| 2462 | - cursor: 'pointer', | |
| 2463 | - textOverflow: 'ellipsis', | |
| 2464 | - position: 'absolute', | |
| 2465 | - top: 0, | |
| 2466 | - left: 0 | |
| 2467 | - }, | |
| 2468 | - width: '100%', | |
| 2469 | - position: 'relative' | |
| 2470 | -})); | |
| 2471 | - | |
| 2472 | -/***/ }), | |
| 2473 | - | |
| 2474 | -/***/ "./packages/packages/libs/editor-ui/src/components/popover/popover-action.tsx": | |
| 2475 | -/*!************************************************************************************!*\ | |
| 2476 | - !*** ./packages/packages/libs/editor-ui/src/components/popover/popover-action.tsx ***! | |
| 2477 | - \************************************************************************************/ | |
| 2478 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2479 | - | |
| 2480 | -__webpack_require__.r(__webpack_exports__); | |
| 2481 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2482 | -/* harmony export */ PopoverAction: function() { return /* binding */ PopoverAction; }, | |
| 2483 | -/* harmony export */ useFloatingActionsPopover: function() { return /* binding */ useFloatingActionsPopover; } | |
| 2484 | -/* harmony export */ }); | |
| 2485 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2486 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2487 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2488 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 2489 | -/* harmony import */ var _floating_bar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../floating-bar */ "./packages/packages/libs/editor-ui/src/components/floating-bar.tsx"); | |
| 2490 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 2491 | - | |
| 2492 | - | |
| 2493 | - | |
| 2494 | -const SIZE = 'tiny'; | |
| 2495 | -function PopoverAction({ | |
| 2496 | - title, | |
| 2497 | - visible = true, | |
| 2498 | - icon: Icon, | |
| 2499 | - content: PopoverContent | |
| 2500 | -}) { | |
| 2501 | - const { | |
| 2502 | - popupState, | |
| 2503 | - triggerProps, | |
| 2504 | - popoverProps | |
| 2505 | - } = useFloatingActionsPopover(); | |
| 2506 | - if (!visible) { | |
| 2507 | - return null; | |
| 2508 | - } | |
| 2509 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Tooltip, { | |
| 2510 | - placement: "top", | |
| 2511 | - title: title | |
| 2512 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.IconButton, _extends({ | |
| 2513 | - "aria-label": title, | |
| 2514 | - size: SIZE | |
| 2515 | - }, triggerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Icon, { | |
| 2516 | - fontSize: SIZE | |
| 2517 | - }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Popover, _extends({ | |
| 2518 | - disableScrollLock: true, | |
| 2519 | - anchorOrigin: { | |
| 2520 | - vertical: 'bottom', | |
| 2521 | - horizontal: 'right' | |
| 2522 | - }, | |
| 2523 | - transformOrigin: { | |
| 2524 | - vertical: 'top', | |
| 2525 | - horizontal: 'right' | |
| 2526 | - }, | |
| 2527 | - PaperProps: { | |
| 2528 | - sx: { | |
| 2529 | - my: 2.5 | |
| 2530 | - } | |
| 2531 | - } | |
| 2532 | - }, popoverProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(PopoverContent, { | |
| 2533 | - close: popupState.close | |
| 2534 | - }))); | |
| 2535 | -} | |
| 2536 | -function useFloatingActionsPopover() { | |
| 2537 | - const { | |
| 2538 | - setOpen | |
| 2539 | - } = (0,_floating_bar__WEBPACK_IMPORTED_MODULE_2__.useFloatingActionsBar)(); | |
| 2540 | - const popupState = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.usePopupState)({ | |
| 2541 | - variant: 'popover' | |
| 2542 | - }); | |
| 2543 | - const triggerProps = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.bindTrigger)(popupState); | |
| 2544 | - const popoverProps = (0,_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.bindPopover)(popupState); | |
| 2545 | - const onClick = e => { | |
| 2546 | - triggerProps.onClick(e); | |
| 2547 | - setOpen(true); | |
| 2548 | - }; | |
| 2549 | - const onClose = () => { | |
| 2550 | - popoverProps.onClose(); | |
| 2551 | - setOpen(false); | |
| 2552 | - }; | |
| 2553 | - const close = () => { | |
| 2554 | - popupState.close(); | |
| 2555 | - setOpen(false); | |
| 2556 | - }; | |
| 2557 | - return { | |
| 2558 | - popupState: { | |
| 2559 | - ...popupState, | |
| 2560 | - close | |
| 2561 | - }, | |
| 2562 | - triggerProps: { | |
| 2563 | - ...triggerProps, | |
| 2564 | - onClick | |
| 2565 | - }, | |
| 2566 | - popoverProps: { | |
| 2567 | - ...popoverProps, | |
| 2568 | - onClose | |
| 2569 | - } | |
| 2570 | - }; | |
| 2571 | -} | |
| 2572 | - | |
| 2573 | -/***/ }), | |
| 2574 | - | |
| 2575 | -/***/ "./packages/packages/libs/editor-ui/src/components/popover/section-popover-body.tsx": | |
| 2576 | -/*!******************************************************************************************!*\ | |
| 2577 | - !*** ./packages/packages/libs/editor-ui/src/components/popover/section-popover-body.tsx ***! | |
| 2578 | - \******************************************************************************************/ | |
| 2579 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2580 | - | |
| 2581 | -__webpack_require__.r(__webpack_exports__); | |
| 2582 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2583 | -/* harmony export */ SectionPopoverBody: function() { return /* binding */ SectionPopoverBody; } | |
| 2584 | -/* harmony export */ }); | |
| 2585 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2586 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2587 | -/* harmony import */ var _contexts_section_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../contexts/section-context */ "./packages/packages/libs/editor-ui/src/contexts/section-context.tsx"); | |
| 2588 | -/* harmony import */ var _body__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./body */ "./packages/packages/libs/editor-ui/src/components/popover/body.tsx"); | |
| 2589 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 2590 | - | |
| 2591 | - | |
| 2592 | - | |
| 2593 | -const SectionPopoverBody = props => { | |
| 2594 | - const sectionWidth = (0,_contexts_section_context__WEBPACK_IMPORTED_MODULE_1__.useSectionWidth)(); | |
| 2595 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_body__WEBPACK_IMPORTED_MODULE_2__.PopoverBody, _extends({}, props, { | |
| 2596 | - width: sectionWidth | |
| 2597 | - })); | |
| 2598 | -}; | |
| 2599 | - | |
| 2600 | -/***/ }), | |
| 2601 | - | |
| 2602 | -/***/ "./packages/packages/libs/editor-ui/src/components/promotions/promotion-alert.tsx": | |
| 2603 | -/*!****************************************************************************************!*\ | |
| 2604 | - !*** ./packages/packages/libs/editor-ui/src/components/promotions/promotion-alert.tsx ***! | |
| 2605 | - \****************************************************************************************/ | |
| 2606 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2607 | - | |
| 2608 | -__webpack_require__.r(__webpack_exports__); | |
| 2609 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2610 | -/* harmony export */ PromotionAlert: function() { return /* binding */ PromotionAlert; } | |
| 2611 | -/* harmony export */ }); | |
| 2612 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2613 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2614 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 2615 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 2616 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2617 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 2618 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 2619 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); | |
| 2620 | - | |
| 2621 | - | |
| 2622 | - | |
| 2623 | - | |
| 2624 | -const PromotionAlert = ({ | |
| 2625 | - message, | |
| 2626 | - upgradeUrl, | |
| 2627 | - onCtaClick | |
| 2628 | -}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Alert, { | |
| 2629 | - variant: "standard", | |
| 2630 | - color: "promotion", | |
| 2631 | - icon: false, | |
| 2632 | - role: "dialog", | |
| 2633 | - "aria-label": "promotion-alert", | |
| 2634 | - size: "small", | |
| 2635 | - sx: { | |
| 2636 | - m: 2, | |
| 2637 | - mt: 1, | |
| 2638 | - pt: 0.5, | |
| 2639 | - pb: 0.5 | |
| 2640 | - } | |
| 2641 | -}, message, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { | |
| 2642 | - size: 'tiny', | |
| 2643 | - variant: 'text', | |
| 2644 | - color: 'promotion', | |
| 2645 | - target: "_blank", | |
| 2646 | - href: upgradeUrl, | |
| 2647 | - rel: "noopener noreferrer", | |
| 2648 | - startIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.CrownFilledIcon, { | |
| 2649 | - fontSize: "tiny" | |
| 2650 | - }), | |
| 2651 | - onClick: onCtaClick | |
| 2652 | -}, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Upgrade now', 'elementor'))); | |
| 2653 | - | |
| 2654 | -/***/ }), | |
| 2655 | - | |
| 2656 | -/***/ "./packages/packages/libs/editor-ui/src/components/promotions/promotion-chip.tsx": | |
| 2657 | -/*!***************************************************************************************!*\ | |
| 2658 | - !*** ./packages/packages/libs/editor-ui/src/components/promotions/promotion-chip.tsx ***! | |
| 2659 | - \***************************************************************************************/ | |
| 2660 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2661 | - | |
| 2662 | -__webpack_require__.r(__webpack_exports__); | |
| 2663 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2664 | -/* harmony export */ PromotionChip: function() { return /* binding */ PromotionChip; } | |
| 2665 | -/* harmony export */ }); | |
| 2666 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2667 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2668 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 2669 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 2670 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2671 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 2672 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 2673 | - | |
| 2674 | - | |
| 2675 | - | |
| 2676 | -const PromotionChip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(({ | |
| 2677 | - ...props | |
| 2678 | -}, ref) => { | |
| 2679 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Chip, _extends({ | |
| 2680 | - "aria-label": "Promotion chip", | |
| 2681 | - ref: ref, | |
| 2682 | - size: "tiny", | |
| 2683 | - color: "promotion", | |
| 2684 | - variant: "standard", | |
| 2685 | - icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.CrownFilledIcon, null), | |
| 2686 | - sx: { | |
| 2687 | - ml: 1, | |
| 2688 | - width: '20px', | |
| 2689 | - '& .MuiChip-label': { | |
| 2690 | - display: 'none' | |
| 2691 | - } | |
| 2692 | - } | |
| 2693 | - }, props)); | |
| 2694 | -}); | |
| 2695 | - | |
| 2696 | -/***/ }), | |
| 2697 | - | |
| 2698 | -/***/ "./packages/packages/libs/editor-ui/src/components/promotions/promotion-infotip.tsx": | |
| 2699 | -/*!******************************************************************************************!*\ | |
| 2700 | - !*** ./packages/packages/libs/editor-ui/src/components/promotions/promotion-infotip.tsx ***! | |
| 2701 | - \******************************************************************************************/ | |
| 2702 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2703 | - | |
| 2704 | -__webpack_require__.r(__webpack_exports__); | |
| 2705 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2706 | -/* harmony export */ PromotionInfotip: function() { return /* binding */ PromotionInfotip; } | |
| 2707 | -/* harmony export */ }); | |
| 2708 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2709 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2710 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2711 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 2712 | -/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../hooks */ "./packages/packages/libs/editor-ui/src/hooks/index.ts"); | |
| 2713 | -/* harmony import */ var _cta_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cta-button */ "./packages/packages/libs/editor-ui/src/components/cta-button.tsx"); | |
| 2714 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 2715 | - | |
| 2716 | - | |
| 2717 | - | |
| 2718 | - | |
| 2719 | -const PromotionInfotip = ({ | |
| 2720 | - children, | |
| 2721 | - open, | |
| 2722 | - onClose, | |
| 2723 | - onCtaClick, | |
| 2724 | - ...cardProps | |
| 2725 | -}) => { | |
| 2726 | - (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useCanvasClickHandler)(!!open, onClose); | |
| 2727 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Infotip, { | |
| 2728 | - placement: "right", | |
| 2729 | - content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(InfotipCard, _extends({ | |
| 2730 | - onClose: onClose, | |
| 2731 | - onCtaClick: onCtaClick | |
| 2732 | - }, cardProps)), | |
| 2733 | - open: open | |
| 2734 | - }, children); | |
| 2735 | -}; | |
| 2736 | -function InfotipCard({ | |
| 2737 | - title, | |
| 2738 | - content, | |
| 2739 | - assetUrl, | |
| 2740 | - ctaUrl, | |
| 2741 | - onClose, | |
| 2742 | - onCtaClick | |
| 2743 | -}) { | |
| 2744 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.ClickAwayListener, { | |
| 2745 | - disableReactTree: true, | |
| 2746 | - mouseEvent: "onMouseDown", | |
| 2747 | - touchEvent: "onTouchStart", | |
| 2748 | - onClickAway: onClose | |
| 2749 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Card, { | |
| 2750 | - elevation: 0, | |
| 2751 | - sx: { | |
| 2752 | - maxWidth: 296 | |
| 2753 | - } | |
| 2754 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.CardHeader, { | |
| 2755 | - title: title, | |
| 2756 | - action: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.CloseButton, { | |
| 2757 | - slotProps: { | |
| 2758 | - icon: { | |
| 2759 | - fontSize: 'tiny' | |
| 2760 | - } | |
| 2761 | - }, | |
| 2762 | - onClick: onClose | |
| 2763 | - }) | |
| 2764 | - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.CardMedia, { | |
| 2765 | - component: "img", | |
| 2766 | - image: assetUrl, | |
| 2767 | - alt: "", | |
| 2768 | - sx: { | |
| 2769 | - width: '100%', | |
| 2770 | - aspectRatio: '16 / 9' | |
| 2771 | - } | |
| 2772 | - }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.CardContent, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Typography, { | |
| 2773 | - variant: "body2", | |
| 2774 | - color: "text.secondary" | |
| 2775 | - }, content)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.CardActions, { | |
| 2776 | - sx: { | |
| 2777 | - justifyContent: 'flex-start' | |
| 2778 | - } | |
| 2779 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cta_button__WEBPACK_IMPORTED_MODULE_3__.CtaButton, { | |
| 2780 | - href: ctaUrl, | |
| 2781 | - onClick: onCtaClick | |
| 2782 | - })))); | |
| 2783 | -} | |
| 2784 | - | |
| 2785 | -/***/ }), | |
| 2786 | - | |
| 2787 | -/***/ "./packages/packages/libs/editor-ui/src/components/promotions/promotion-popover.tsx": | |
| 2788 | -/*!******************************************************************************************!*\ | |
| 2789 | - !*** ./packages/packages/libs/editor-ui/src/components/promotions/promotion-popover.tsx ***! | |
| 2790 | - \******************************************************************************************/ | |
| 2791 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2792 | - | |
| 2793 | -__webpack_require__.r(__webpack_exports__); | |
| 2794 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2795 | -/* harmony export */ PromotionPopover: function() { return /* binding */ PromotionPopover; } | |
| 2796 | -/* harmony export */ }); | |
| 2797 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2798 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2799 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 2800 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 2801 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2802 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 2803 | - | |
| 2804 | - | |
| 2805 | - | |
| 2806 | -const PromotionPopover = ({ | |
| 2807 | - children, | |
| 2808 | - open, | |
| 2809 | - placement = 'right', | |
| 2810 | - slotProps, | |
| 2811 | - anchorRef, | |
| 2812 | - ...cardProps | |
| 2813 | -}) => { | |
| 2814 | - const anchorEl = anchorRef?.current; | |
| 2815 | - const defaultSlotProps = { | |
| 2816 | - popper: { | |
| 2817 | - ...(anchorEl && { | |
| 2818 | - anchorEl | |
| 2819 | - }), | |
| 2820 | - modifiers: [{ | |
| 2821 | - name: 'offset', | |
| 2822 | - options: { | |
| 2823 | - offset: anchorRef ? [0, 4] : [0, 10] | |
| 2824 | - } | |
| 2825 | - }] | |
| 2826 | - } | |
| 2827 | - }; | |
| 2828 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Infotip, { | |
| 2829 | - placement: placement, | |
| 2830 | - arrow: false, | |
| 2831 | - content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(PopoverAlert, cardProps), | |
| 2832 | - open: open, | |
| 2833 | - slotProps: slotProps || defaultSlotProps | |
| 2834 | - }, children); | |
| 2835 | -}; | |
| 2836 | -function PopoverAlert({ | |
| 2837 | - title, | |
| 2838 | - content, | |
| 2839 | - ctaUrl, | |
| 2840 | - ctaText, | |
| 2841 | - onClose, | |
| 2842 | - onCtaClick | |
| 2843 | -}) { | |
| 2844 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.ClickAwayListener, { | |
| 2845 | - disableReactTree: true, | |
| 2846 | - mouseEvent: "onMouseDown", | |
| 2847 | - touchEvent: "onTouchStart", | |
| 2848 | - onClickAway: onClose | |
| 2849 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Alert, { | |
| 2850 | - variant: "standard", | |
| 2851 | - color: "promotion", | |
| 2852 | - icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.CrownFilledIcon, { | |
| 2853 | - fontSize: "tiny" | |
| 2854 | - }), | |
| 2855 | - onClose: onClose, | |
| 2856 | - onMouseDown: e => e.stopPropagation(), | |
| 2857 | - role: "dialog", | |
| 2858 | - "aria-label": "promotion-popover-title", | |
| 2859 | - action: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.AlertAction, { | |
| 2860 | - variant: "contained", | |
| 2861 | - color: "promotion", | |
| 2862 | - href: ctaUrl, | |
| 2863 | - target: "_blank", | |
| 2864 | - rel: "noopener noreferrer", | |
| 2865 | - onClick: onCtaClick | |
| 2866 | - }, ctaText), | |
| 2867 | - sx: { | |
| 2868 | - maxWidth: 296 | |
| 2869 | - } | |
| 2870 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Box, { | |
| 2871 | - sx: { | |
| 2872 | - gap: 0.5, | |
| 2873 | - display: 'flex', | |
| 2874 | - flexDirection: 'column' | |
| 2875 | - } | |
| 2876 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.AlertTitle, null, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Typography, { | |
| 2877 | - variant: "body2" | |
| 2878 | - }, content)))); | |
| 2879 | -} | |
| 2880 | - | |
| 2881 | -/***/ }), | |
| 2882 | - | |
| 2883 | -/***/ "./packages/packages/libs/editor-ui/src/components/save-changes-dialog.tsx": | |
| 2884 | -/*!*********************************************************************************!*\ | |
| 2885 | - !*** ./packages/packages/libs/editor-ui/src/components/save-changes-dialog.tsx ***! | |
| 2886 | - \*********************************************************************************/ | |
| 2887 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2888 | - | |
| 2889 | -__webpack_require__.r(__webpack_exports__); | |
| 2890 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2891 | -/* harmony export */ SaveChangesDialog: function() { return /* binding */ SaveChangesDialog; }, | |
| 2892 | -/* harmony export */ useDialog: function() { return /* binding */ useDialog; } | |
| 2893 | -/* harmony export */ }); | |
| 2894 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 2895 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 2896 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 2897 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 2898 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 2899 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 2900 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 2901 | - | |
| 2902 | - | |
| 2903 | - | |
| 2904 | - | |
| 2905 | -const TITLE_ID = 'save-changes-dialog'; | |
| 2906 | -const SaveChangesDialog = ({ | |
| 2907 | - children, | |
| 2908 | - onClose | |
| 2909 | -}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Dialog, { | |
| 2910 | - open: true, | |
| 2911 | - onClose: onClose, | |
| 2912 | - "aria-labelledby": TITLE_ID, | |
| 2913 | - maxWidth: "xs" | |
| 2914 | -}, children); | |
| 2915 | -const SaveChangesDialogTitle = ({ | |
| 2916 | - children, | |
| 2917 | - onClose | |
| 2918 | -}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.DialogTitle, { | |
| 2919 | - id: TITLE_ID, | |
| 2920 | - display: "flex", | |
| 2921 | - alignItems: "center", | |
| 2922 | - gap: 1, | |
| 2923 | - sx: { | |
| 2924 | - lineHeight: 1, | |
| 2925 | - justifyContent: 'space-between' | |
| 2926 | - } | |
| 2927 | -}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Stack, { | |
| 2928 | - direction: "row", | |
| 2929 | - alignItems: "center", | |
| 2930 | - gap: 1 | |
| 2931 | -}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.AlertTriangleFilledIcon, { | |
| 2932 | - color: "secondary" | |
| 2933 | -}), children), onClose && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.IconButton, { | |
| 2934 | - onClick: onClose, | |
| 2935 | - size: "small" | |
| 2936 | -}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.XIcon, null))); | |
| 2937 | -const SaveChangesDialogContent = ({ | |
| 2938 | - children | |
| 2939 | -}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.DialogContent, null, children); | |
| 2940 | -const SaveChangesDialogContentText = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.DialogContentText, _extends({ | |
| 2941 | - variant: "body2", | |
| 2942 | - color: "textPrimary", | |
| 2943 | - display: "flex", | |
| 2944 | - flexDirection: "column" | |
| 2945 | -}, props)); | |
| 2946 | -const SaveChangesDialogActions = ({ | |
| 2947 | - actions | |
| 2948 | -}) => { | |
| 2949 | - const [isConfirming, setIsConfirming] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); | |
| 2950 | - const { | |
| 2951 | - cancel, | |
| 2952 | - confirm, | |
| 2953 | - discard | |
| 2954 | - } = actions; | |
| 2955 | - const onConfirm = async () => { | |
| 2956 | - setIsConfirming(true); | |
| 2957 | - await confirm.action(); | |
| 2958 | - setIsConfirming(false); | |
| 2959 | - }; | |
| 2960 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.DialogActions, null, cancel && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { | |
| 2961 | - variant: "text", | |
| 2962 | - color: "secondary", | |
| 2963 | - onClick: cancel.action | |
| 2964 | - }, cancel.label), discard && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { | |
| 2965 | - variant: "text", | |
| 2966 | - color: "secondary", | |
| 2967 | - onClick: discard.action | |
| 2968 | - }, discard.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Button, { | |
| 2969 | - variant: "contained", | |
| 2970 | - color: "secondary", | |
| 2971 | - onClick: onConfirm, | |
| 2972 | - loading: isConfirming | |
| 2973 | - }, confirm.label)); | |
| 2974 | -}; | |
| 2975 | -SaveChangesDialog.Title = SaveChangesDialogTitle; | |
| 2976 | -SaveChangesDialog.Content = SaveChangesDialogContent; | |
| 2977 | -SaveChangesDialog.ContentText = SaveChangesDialogContentText; | |
| 2978 | -SaveChangesDialog.Actions = SaveChangesDialogActions; | |
| 2979 | -const useDialog = () => { | |
| 2980 | - const [isOpen, setIsOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); | |
| 2981 | - const open = () => setIsOpen(true); | |
| 2982 | - const close = () => setIsOpen(false); | |
| 2983 | - return { | |
| 2984 | - isOpen, | |
| 2985 | - open, | |
| 2986 | - close | |
| 2987 | - }; | |
| 2988 | -}; | |
| 2989 | - | |
| 2990 | -/***/ }), | |
| 2991 | - | |
| 2992 | -/***/ "./packages/packages/libs/editor-ui/src/components/search-field.tsx": | |
| 2993 | -/*!**************************************************************************!*\ | |
| 2994 | - !*** ./packages/packages/libs/editor-ui/src/components/search-field.tsx ***! | |
| 2995 | - \**************************************************************************/ | |
| 2996 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 2997 | - | |
| 2998 | -__webpack_require__.r(__webpack_exports__); | |
| 2999 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3000 | -/* harmony export */ SearchField: function() { return /* binding */ SearchField; } | |
| 3001 | -/* harmony export */ }); | |
| 3002 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3003 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3004 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 3005 | -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__); | |
| 3006 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 3007 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__); | |
| 3008 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 3009 | -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); | |
| 3010 | - | |
| 3011 | - | |
| 3012 | - | |
| 3013 | - | |
| 3014 | - | |
| 3015 | -const SIZE = 'tiny'; | |
| 3016 | -const SearchField = ({ | |
| 3017 | - value, | |
| 3018 | - onSearch, | |
| 3019 | - placeholder, | |
| 3020 | - id, | |
| 3021 | - sx | |
| 3022 | -}) => { | |
| 3023 | - const inputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); | |
| 3024 | - const handleClear = () => { | |
| 3025 | - onSearch(''); | |
| 3026 | - inputRef.current?.focus(); | |
| 3027 | - }; | |
| 3028 | - const handleInputChange = event => { | |
| 3029 | - onSearch(event.target.value); | |
| 3030 | - }; | |
| 3031 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.Box, { | |
| 3032 | - sx: { | |
| 3033 | - px: 2, | |
| 3034 | - pb: 1.5, | |
| 3035 | - ...sx | |
| 3036 | - } | |
| 3037 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.TextField | |
| 3038 | - // eslint-disable-next-line jsx-a11y/no-autofocus | |
| 3039 | - , { | |
| 3040 | - autoFocus: true, | |
| 3041 | - fullWidth: true, | |
| 3042 | - id: id, | |
| 3043 | - size: SIZE, | |
| 3044 | - value: value, | |
| 3045 | - inputRef: inputRef, | |
| 3046 | - onChange: handleInputChange, | |
| 3047 | - placeholder: placeholder, | |
| 3048 | - InputProps: { | |
| 3049 | - startAdornment: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.InputAdornment, { | |
| 3050 | - position: "start" | |
| 3051 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.SearchIcon, { | |
| 3052 | - fontSize: SIZE | |
| 3053 | - })), | |
| 3054 | - endAdornment: value && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_2__.IconButton, { | |
| 3055 | - size: SIZE, | |
| 3056 | - onClick: handleClear, | |
| 3057 | - "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Clear', 'elementor') | |
| 3058 | - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_1__.XIcon, { | |
| 3059 | - color: "action", | |
| 3060 | - fontSize: SIZE | |
| 3061 | - })) | |
| 3062 | - } | |
| 3063 | - })); | |
| 3064 | -}; | |
| 3065 | - | |
| 3066 | -/***/ }), | |
| 3067 | - | |
| 3068 | -/***/ "./packages/packages/libs/editor-ui/src/components/theme-provider.tsx": | |
| 3069 | -/*!****************************************************************************!*\ | |
| 3070 | - !*** ./packages/packages/libs/editor-ui/src/components/theme-provider.tsx ***! | |
| 3071 | - \****************************************************************************/ | |
| 3072 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3073 | - | |
| 3074 | -__webpack_require__.r(__webpack_exports__); | |
| 3075 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3076 | -/* harmony export */ "default": function() { return /* binding */ ThemeProvider; } | |
| 3077 | -/* harmony export */ }); | |
| 3078 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3079 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3080 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 3081 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 3082 | -/* harmony import */ var _hooks_use_color_scheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hooks/use-color-scheme */ "./packages/packages/libs/editor-ui/src/hooks/use-color-scheme.ts"); | |
| 3083 | - | |
| 3084 | - | |
| 3085 | - | |
| 3086 | -const EDITOR_PALETTE = 'unstable'; | |
| 3087 | -function ThemeProvider({ | |
| 3088 | - children | |
| 3089 | -}) { | |
| 3090 | - const colorScheme = (0,_hooks_use_color_scheme__WEBPACK_IMPORTED_MODULE_2__.useColorScheme)(); | |
| 3091 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.ThemeProvider, { | |
| 3092 | - colorScheme: colorScheme, | |
| 3093 | - palette: EDITOR_PALETTE | |
| 3094 | - }, children); | |
| 3095 | -} | |
| 3096 | - | |
| 3097 | -/***/ }), | |
| 3098 | - | |
| 3099 | -/***/ "./packages/packages/libs/editor-ui/src/components/warning-infotip.tsx": | |
| 3100 | -/*!*****************************************************************************!*\ | |
| 3101 | - !*** ./packages/packages/libs/editor-ui/src/components/warning-infotip.tsx ***! | |
| 3102 | - \*****************************************************************************/ | |
| 3103 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3104 | - | |
| 3105 | -__webpack_require__.r(__webpack_exports__); | |
| 3106 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3107 | -/* harmony export */ WarningInfotip: function() { return /* binding */ WarningInfotip; } | |
| 3108 | -/* harmony export */ }); | |
| 3109 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3110 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3111 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 3112 | -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__); | |
| 3113 | - | |
| 3114 | - | |
| 3115 | - | |
| 3116 | -const WarningInfotip = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({ | |
| 3117 | - children, | |
| 3118 | - open, | |
| 3119 | - title, | |
| 3120 | - text, | |
| 3121 | - placement, | |
| 3122 | - width, | |
| 3123 | - offset, | |
| 3124 | - hasError = true | |
| 3125 | -}, ref) => { | |
| 3126 | - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Infotip, { | |
| 3127 | - ref: ref, | |
| 3128 | - open: open, | |
| 3129 | - placement: placement, | |
| 3130 | - PopperProps: { | |
| 3131 | - sx: { | |
| 3132 | - width: width ? width : 'initial', | |
| 3133 | - '.MuiTooltip-tooltip': { | |
| 3134 | - marginLeft: 0, | |
| 3135 | - marginRight: 0 | |
| 3136 | - } | |
| 3137 | - }, | |
| 3138 | - modifiers: offset ? [{ | |
| 3139 | - name: 'offset', | |
| 3140 | - options: { | |
| 3141 | - offset | |
| 3142 | - } | |
| 3143 | - }] : [] | |
| 3144 | - }, | |
| 3145 | - arrow: false, | |
| 3146 | - content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.Alert, { | |
| 3147 | - color: hasError ? 'error' : 'secondary', | |
| 3148 | - severity: "warning", | |
| 3149 | - variant: "standard", | |
| 3150 | - size: "small" | |
| 3151 | - }, title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_1__.AlertTitle, null, title) : null, text) | |
| 3152 | - }, children); | |
| 3153 | -}); | |
| 3154 | - | |
| 3155 | -/***/ }), | |
| 3156 | - | |
| 3157 | -/***/ "./packages/packages/libs/editor-ui/src/contexts/section-context.tsx": | |
| 3158 | -/*!***************************************************************************!*\ | |
| 3159 | - !*** ./packages/packages/libs/editor-ui/src/contexts/section-context.tsx ***! | |
| 3160 | - \***************************************************************************/ | |
| 3161 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3162 | - | |
| 3163 | -__webpack_require__.r(__webpack_exports__); | |
| 3164 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3165 | -/* harmony export */ SectionRefContext: function() { return /* binding */ SectionRefContext; }, | |
| 3166 | -/* harmony export */ useSectionWidth: function() { return /* binding */ useSectionWidth; } | |
| 3167 | -/* harmony export */ }); | |
| 3168 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3169 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3170 | - | |
| 3171 | -const FALLBACK_SECTION_WIDTH = 320; | |
| 3172 | -const SectionRefContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null); | |
| 3173 | -const useSectionRef = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(SectionRefContext); | |
| 3174 | -const useSectionWidth = () => { | |
| 3175 | - const sectionRef = useSectionRef(); | |
| 3176 | - return sectionRef?.current?.offsetWidth ?? FALLBACK_SECTION_WIDTH; | |
| 3177 | -}; | |
| 3178 | - | |
| 3179 | -/***/ }), | |
| 3180 | - | |
| 3181 | -/***/ "./packages/packages/libs/editor-ui/src/hooks/index.ts": | |
| 3182 | -/*!*************************************************************!*\ | |
| 3183 | - !*** ./packages/packages/libs/editor-ui/src/hooks/index.ts ***! | |
| 3184 | - \*************************************************************/ | |
| 3185 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3186 | - | |
| 3187 | -__webpack_require__.r(__webpack_exports__); | |
| 3188 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3189 | -/* harmony export */ useCanvasClickHandler: function() { return /* reexport safe */ _use_canvas_click_handler__WEBPACK_IMPORTED_MODULE_3__.useCanvasClickHandler; }, | |
| 3190 | -/* harmony export */ useScrollToSelected: function() { return /* reexport safe */ _use_scroll_to_selected__WEBPACK_IMPORTED_MODULE_0__.useScrollToSelected; }, | |
| 3191 | -/* harmony export */ useScrollTop: function() { return /* reexport safe */ _use_scroll_top__WEBPACK_IMPORTED_MODULE_1__.useScrollTop; }, | |
| 3192 | -/* harmony export */ useTextFieldAutoSelect: function() { return /* reexport safe */ _use_text_field_auto_select__WEBPACK_IMPORTED_MODULE_2__.useTextFieldAutoSelect; } | |
| 3193 | -/* harmony export */ }); | |
| 3194 | -/* harmony import */ var _use_scroll_to_selected__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use-scroll-to-selected */ "./packages/packages/libs/editor-ui/src/hooks/use-scroll-to-selected.ts"); | |
| 3195 | -/* harmony import */ var _use_scroll_top__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-scroll-top */ "./packages/packages/libs/editor-ui/src/hooks/use-scroll-top.ts"); | |
| 3196 | -/* harmony import */ var _use_text_field_auto_select__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use-text-field-auto-select */ "./packages/packages/libs/editor-ui/src/hooks/use-text-field-auto-select.ts"); | |
| 3197 | -/* harmony import */ var _use_canvas_click_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use-canvas-click-handler */ "./packages/packages/libs/editor-ui/src/hooks/use-canvas-click-handler.tsx"); | |
| 3198 | - | |
| 3199 | - | |
| 3200 | - | |
| 3201 | - | |
| 3202 | - | |
| 3203 | -/***/ }), | |
| 3204 | - | |
| 3205 | -/***/ "./packages/packages/libs/editor-ui/src/hooks/use-canvas-click-handler.tsx": | |
| 3206 | -/*!*********************************************************************************!*\ | |
| 3207 | - !*** ./packages/packages/libs/editor-ui/src/hooks/use-canvas-click-handler.tsx ***! | |
| 3208 | - \*********************************************************************************/ | |
| 3209 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3210 | - | |
| 3211 | -__webpack_require__.r(__webpack_exports__); | |
| 3212 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3213 | -/* harmony export */ useCanvasClickHandler: function() { return /* binding */ useCanvasClickHandler; } | |
| 3214 | -/* harmony export */ }); | |
| 3215 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3216 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3217 | -/* harmony import */ var _elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); | |
| 3218 | -/* harmony import */ var _elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__); | |
| 3219 | - | |
| 3220 | - | |
| 3221 | -const useCanvasClickHandler = (isActive, onClickAway) => { | |
| 3222 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 3223 | - const canvasDocument = isActive ? (0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__.getCanvasIframeDocument)() : null; | |
| 3224 | - if (!canvasDocument) { | |
| 3225 | - return; | |
| 3226 | - } | |
| 3227 | - canvasDocument.addEventListener('mousedown', onClickAway); | |
| 3228 | - return () => canvasDocument.removeEventListener('mousedown', onClickAway); | |
| 3229 | - }, [isActive, onClickAway]); | |
| 3230 | -}; | |
| 3231 | - | |
| 3232 | -/***/ }), | |
| 3233 | - | |
| 3234 | -/***/ "./packages/packages/libs/editor-ui/src/hooks/use-color-scheme.ts": | |
| 3235 | -/*!************************************************************************!*\ | |
| 3236 | - !*** ./packages/packages/libs/editor-ui/src/hooks/use-color-scheme.ts ***! | |
| 3237 | - \************************************************************************/ | |
| 3238 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3239 | - | |
| 3240 | -__webpack_require__.r(__webpack_exports__); | |
| 3241 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3242 | -/* harmony export */ useColorScheme: function() { return /* binding */ useColorScheme; } | |
| 3243 | -/* harmony export */ }); | |
| 3244 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3245 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3246 | -/* harmony import */ var _elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); | |
| 3247 | -/* harmony import */ var _elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__); | |
| 3248 | - | |
| 3249 | - | |
| 3250 | -function useColorScheme() { | |
| 3251 | - const [colorScheme, setColorScheme] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => getV1ColorScheme()); | |
| 3252 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 3253 | - return (0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__.__privateListenTo)((0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__.v1ReadyEvent)(), () => setColorScheme(getV1ColorScheme())); | |
| 3254 | - }, []); | |
| 3255 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 3256 | - return (0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__.__privateListenTo)((0,_elementor_editor_v1_adapters__WEBPACK_IMPORTED_MODULE_1__.commandEndEvent)('document/elements/settings'), e => { | |
| 3257 | - const event = e; | |
| 3258 | - | |
| 3259 | - // The User-Preferences settings object has a key named `ui_theme` that controls the color scheme. | |
| 3260 | - const isColorScheme = event.args?.settings && 'ui_theme' in event.args.settings; | |
| 3261 | - if (isColorScheme) { | |
| 3262 | - setColorScheme(getV1ColorScheme()); | |
| 3263 | - } | |
| 3264 | - }); | |
| 3265 | - }, []); | |
| 3266 | - return colorScheme; | |
| 3267 | -} | |
| 3268 | -function getV1ColorScheme() { | |
| 3269 | - return window.elementor?.getPreferences?.('ui_theme') || 'auto'; | |
| 3270 | -} | |
| 3271 | - | |
| 3272 | -/***/ }), | |
| 3273 | - | |
| 3274 | -/***/ "./packages/packages/libs/editor-ui/src/hooks/use-editable.ts": | |
| 3275 | -/*!********************************************************************!*\ | |
| 3276 | - !*** ./packages/packages/libs/editor-ui/src/hooks/use-editable.ts ***! | |
| 3277 | - \********************************************************************/ | |
| 3278 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3279 | - | |
| 3280 | -__webpack_require__.r(__webpack_exports__); | |
| 3281 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3282 | -/* harmony export */ useEditable: function() { return /* binding */ useEditable; } | |
| 3283 | -/* harmony export */ }); | |
| 3284 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3285 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3286 | - | |
| 3287 | -const useEditable = ({ | |
| 3288 | - value, | |
| 3289 | - onSubmit, | |
| 3290 | - validation, | |
| 3291 | - onClick, | |
| 3292 | - onError | |
| 3293 | -}) => { | |
| 3294 | - const [isEditing, setIsEditing] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false); | |
| 3295 | - const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); | |
| 3296 | - const ref = useSelection(isEditing); | |
| 3297 | - const isDirty = newValue => newValue !== value; | |
| 3298 | - const openEditMode = () => { | |
| 3299 | - setIsEditing(true); | |
| 3300 | - }; | |
| 3301 | - const closeEditMode = () => { | |
| 3302 | - setError(null); | |
| 3303 | - onError?.(null); | |
| 3304 | - setIsEditing(false); | |
| 3305 | - }; | |
| 3306 | - const submit = newValue => { | |
| 3307 | - if (!isDirty(newValue)) { | |
| 3308 | - closeEditMode(); | |
| 3309 | - return; | |
| 3310 | - } | |
| 3311 | - if (!error) { | |
| 3312 | - try { | |
| 3313 | - onSubmit(newValue); | |
| 3314 | - } finally { | |
| 3315 | - closeEditMode(); | |
| 3316 | - } | |
| 3317 | - } | |
| 3318 | - }; | |
| 3319 | - const onChange = event => { | |
| 3320 | - const { | |
| 3321 | - innerText: newValue | |
| 3322 | - } = event.target; | |
| 3323 | - if (validation) { | |
| 3324 | - const updatedError = isDirty(newValue) ? validation(newValue) : null; | |
| 3325 | - setError(updatedError); | |
| 3326 | - onError?.(updatedError); | |
| 3327 | - } | |
| 3328 | - }; | |
| 3329 | - const handleKeyDown = event => { | |
| 3330 | - event.stopPropagation(); | |
| 3331 | - if (['Escape'].includes(event.key)) { | |
| 3332 | - return closeEditMode(); | |
| 3333 | - } | |
| 3334 | - if (['Enter'].includes(event.key)) { | |
| 3335 | - event.preventDefault(); | |
| 3336 | - // submission is invoked only on blur, to avoid issues with double-submission in certain cases | |
| 3337 | - if (!error) { | |
| 3338 | - ref.current?.blur(); | |
| 3339 | - } | |
| 3340 | - } | |
| 3341 | - }; | |
| 3342 | - const handleClick = event => { | |
| 3343 | - if (isEditing) { | |
| 3344 | - event.stopPropagation(); | |
| 3345 | - } | |
| 3346 | - onClick?.(event); | |
| 3347 | - }; | |
| 3348 | - const handleBlur = () => { | |
| 3349 | - if (error) { | |
| 3350 | - closeEditMode(); | |
| 3351 | - return; | |
| 3352 | - } | |
| 3353 | - submit(ref.current.innerText); | |
| 3354 | - }; | |
| 3355 | - const listeners = { | |
| 3356 | - onClick: handleClick, | |
| 3357 | - onKeyDown: handleKeyDown, | |
| 3358 | - onInput: onChange, | |
| 3359 | - onBlur: handleBlur | |
| 3360 | - }; | |
| 3361 | - const attributes = { | |
| 3362 | - value, | |
| 3363 | - role: 'textbox', | |
| 3364 | - contentEditable: isEditing, | |
| 3365 | - ...(isEditing && { | |
| 3366 | - suppressContentEditableWarning: true | |
| 3367 | - }) | |
| 3368 | - }; | |
| 3369 | - return { | |
| 3370 | - ref, | |
| 3371 | - isEditing, | |
| 3372 | - openEditMode, | |
| 3373 | - closeEditMode, | |
| 3374 | - value, | |
| 3375 | - error, | |
| 3376 | - getProps: () => ({ | |
| 3377 | - ...listeners, | |
| 3378 | - ...attributes | |
| 3379 | - }) | |
| 3380 | - }; | |
| 3381 | -}; | |
| 3382 | -const useSelection = isEditing => { | |
| 3383 | - const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); | |
| 3384 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 3385 | - if (isEditing) { | |
| 3386 | - selectAll(ref.current); | |
| 3387 | - } | |
| 3388 | - }, [isEditing]); | |
| 3389 | - return ref; | |
| 3390 | -}; | |
| 3391 | -const selectAll = el => { | |
| 3392 | - const selection = getSelection(); | |
| 3393 | - if (!selection || !el) { | |
| 3394 | - return; | |
| 3395 | - } | |
| 3396 | - const range = document.createRange(); | |
| 3397 | - range.selectNodeContents(el); | |
| 3398 | - selection.removeAllRanges(); | |
| 3399 | - selection.addRange(range); | |
| 3400 | -}; | |
| 3401 | - | |
| 3402 | -/***/ }), | |
| 3403 | - | |
| 3404 | -/***/ "./packages/packages/libs/editor-ui/src/hooks/use-scroll-to-selected.ts": | |
| 3405 | -/*!******************************************************************************!*\ | |
| 3406 | - !*** ./packages/packages/libs/editor-ui/src/hooks/use-scroll-to-selected.ts ***! | |
| 3407 | - \******************************************************************************/ | |
| 3408 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3409 | - | |
| 3410 | -__webpack_require__.r(__webpack_exports__); | |
| 3411 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3412 | -/* harmony export */ useScrollToSelected: function() { return /* binding */ useScrollToSelected; } | |
| 3413 | -/* harmony export */ }); | |
| 3414 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3415 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3416 | - | |
| 3417 | -const useScrollToSelected = ({ | |
| 3418 | - selectedValue, | |
| 3419 | - items, | |
| 3420 | - virtualizer | |
| 3421 | -}) => { | |
| 3422 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 3423 | - if (!selectedValue || items.length === 0) { | |
| 3424 | - return; | |
| 3425 | - } | |
| 3426 | - const selectedIndex = items.findIndex(item => item.value === selectedValue); | |
| 3427 | - if (selectedIndex !== -1) { | |
| 3428 | - virtualizer.scrollToIndex(selectedIndex, { | |
| 3429 | - align: 'center' | |
| 3430 | - }); | |
| 3431 | - } | |
| 3432 | - }, [selectedValue, items, virtualizer]); | |
| 3433 | -}; | |
| 3434 | - | |
| 3435 | -/***/ }), | |
| 3436 | - | |
| 3437 | -/***/ "./packages/packages/libs/editor-ui/src/hooks/use-scroll-top.ts": | |
| 3438 | -/*!**********************************************************************!*\ | |
| 3439 | - !*** ./packages/packages/libs/editor-ui/src/hooks/use-scroll-top.ts ***! | |
| 3440 | - \**********************************************************************/ | |
| 3441 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3442 | - | |
| 3443 | -__webpack_require__.r(__webpack_exports__); | |
| 3444 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3445 | -/* harmony export */ useScrollTop: function() { return /* binding */ useScrollTop; } | |
| 3446 | -/* harmony export */ }); | |
| 3447 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3448 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3449 | - | |
| 3450 | -const useScrollTop = ({ | |
| 3451 | - containerRef | |
| 3452 | -}) => { | |
| 3453 | - const [scrollTop, setScrollTop] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0); | |
| 3454 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 3455 | - const container = containerRef.current; | |
| 3456 | - if (!container) { | |
| 3457 | - return; | |
| 3458 | - } | |
| 3459 | - const handleScroll = () => { | |
| 3460 | - setScrollTop(container.scrollTop); | |
| 3461 | - }; | |
| 3462 | - container.addEventListener('scroll', handleScroll); | |
| 3463 | - return () => container.removeEventListener('scroll', handleScroll); | |
| 3464 | - }, [containerRef]); | |
| 3465 | - return scrollTop; | |
| 3466 | -}; | |
| 3467 | - | |
| 3468 | -/***/ }), | |
| 3469 | - | |
| 3470 | -/***/ "./packages/packages/libs/editor-ui/src/hooks/use-text-field-auto-select.ts": | |
| 3471 | -/*!**********************************************************************************!*\ | |
| 3472 | - !*** ./packages/packages/libs/editor-ui/src/hooks/use-text-field-auto-select.ts ***! | |
| 3473 | - \**********************************************************************************/ | |
| 3474 | -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { | |
| 3475 | - | |
| 3476 | -__webpack_require__.r(__webpack_exports__); | |
| 3477 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3478 | -/* harmony export */ useTextFieldAutoSelect: function() { return /* binding */ useTextFieldAutoSelect; } | |
| 3479 | -/* harmony export */ }); | |
| 3480 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); | |
| 3481 | -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); | |
| 3482 | - | |
| 3483 | - | |
| 3484 | -// Automatically selects the default text in the text field when component mounts | |
| 3485 | -const useTextFieldAutoSelect = () => { | |
| 3486 | - const inputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); | |
| 3487 | - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { | |
| 3488 | - if (inputRef.current) { | |
| 3489 | - inputRef.current.focus(); | |
| 3490 | - inputRef.current.select(); | |
| 3491 | - } | |
| 3492 | - }, []); | |
| 3493 | - return inputRef; | |
| 3494 | -}; | |
| 3495 | - | |
| 3496 | -/***/ }), | |
| 3497 | - | |
| 3498 | -/***/ "@elementor/editor-v1-adapters": | |
| 3499 | -/*!***************************************************!*\ | |
| 3500 | - !*** external ["elementorV2","editorV1Adapters"] ***! | |
| 3501 | - \***************************************************/ | |
| 3502 | -/***/ (function(module) { | |
| 3503 | - | |
| 3504 | -module.exports = window["elementorV2"]["editorV1Adapters"]; | |
| 3505 | - | |
| 3506 | -/***/ }), | |
| 3507 | - | |
| 3508 | -/***/ "@elementor/icons": | |
| 3509 | -/*!****************************************!*\ | |
| 3510 | - !*** external ["elementorV2","icons"] ***! | |
| 3511 | - \****************************************/ | |
| 3512 | -/***/ (function(module) { | |
| 3513 | - | |
| 3514 | -module.exports = window["elementorV2"]["icons"]; | |
| 3515 | - | |
| 3516 | -/***/ }), | |
| 3517 | - | |
| 3518 | -/***/ "@elementor/ui": | |
| 3519 | -/*!*************************************!*\ | |
| 3520 | - !*** external ["elementorV2","ui"] ***! | |
| 3521 | - \*************************************/ | |
| 3522 | -/***/ (function(module) { | |
| 3523 | - | |
| 3524 | -module.exports = window["elementorV2"]["ui"]; | |
| 3525 | - | |
| 3526 | -/***/ }), | |
| 3527 | - | |
| 3528 | -/***/ "@wordpress/i18n": | |
| 3529 | -/*!******************************!*\ | |
| 3530 | - !*** external ["wp","i18n"] ***! | |
| 3531 | - \******************************/ | |
| 3532 | -/***/ (function(module) { | |
| 3533 | - | |
| 3534 | -module.exports = window["wp"]["i18n"]; | |
| 3535 | - | |
| 3536 | -/***/ }), | |
| 3537 | - | |
| 3538 | -/***/ "react": | |
| 3539 | -/*!**************************!*\ | |
| 3540 | - !*** external ["React"] ***! | |
| 3541 | - \**************************/ | |
| 3542 | -/***/ (function(module) { | |
| 3543 | - | |
| 3544 | -module.exports = window["React"]; | |
| 3545 | - | |
| 3546 | -/***/ }), | |
| 3547 | - | |
| 3548 | -/***/ "react-dom": | |
| 3549 | -/*!*****************************!*\ | |
| 3550 | - !*** external ["ReactDOM"] ***! | |
| 3551 | - \*****************************/ | |
| 3552 | -/***/ (function(module) { | |
| 3553 | - | |
| 3554 | -module.exports = window["ReactDOM"]; | |
| 3555 | - | |
| 3556 | -/***/ }) | |
| 3557 | - | |
| 3558 | -/******/ }); | |
| 3559 | -/************************************************************************/ | |
| 3560 | -/******/ // The module cache | |
| 3561 | -/******/ var __webpack_module_cache__ = {}; | |
| 3562 | -/******/ | |
| 3563 | -/******/ // The require function | |
| 3564 | -/******/ function __webpack_require__(moduleId) { | |
| 3565 | -/******/ // Check if module is in cache | |
| 3566 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 3567 | -/******/ if (cachedModule !== undefined) { | |
| 3568 | -/******/ return cachedModule.exports; | |
| 3569 | -/******/ } | |
| 3570 | -/******/ // Create a new module (and put it into the cache) | |
| 3571 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 3572 | -/******/ // no module.id needed | |
| 3573 | -/******/ // no module.loaded needed | |
| 3574 | -/******/ exports: {} | |
| 3575 | -/******/ }; | |
| 3576 | -/******/ | |
| 3577 | -/******/ // Execute the module function | |
| 3578 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 3579 | -/******/ | |
| 3580 | -/******/ // Return the exports of the module | |
| 3581 | -/******/ return module.exports; | |
| 3582 | -/******/ } | |
| 3583 | -/******/ | |
| 3584 | -/************************************************************************/ | |
| 3585 | -/******/ /* webpack/runtime/compat get default export */ | |
| 3586 | -/******/ !function() { | |
| 3587 | -/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 3588 | -/******/ __webpack_require__.n = function(module) { | |
| 3589 | -/******/ var getter = module && module.__esModule ? | |
| 3590 | -/******/ function() { return module['default']; } : | |
| 3591 | -/******/ function() { return module; }; | |
| 3592 | -/******/ __webpack_require__.d(getter, { a: getter }); | |
| 3593 | -/******/ return getter; | |
| 3594 | -/******/ }; | |
| 3595 | -/******/ }(); | |
| 3596 | -/******/ | |
| 3597 | -/******/ /* webpack/runtime/define property getters */ | |
| 3598 | -/******/ !function() { | |
| 3599 | -/******/ // define getter functions for harmony exports | |
| 3600 | -/******/ __webpack_require__.d = function(exports, definition) { | |
| 3601 | -/******/ for(var key in definition) { | |
| 3602 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 3603 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 3604 | -/******/ } | |
| 3605 | -/******/ } | |
| 3606 | -/******/ }; | |
| 3607 | -/******/ }(); | |
| 3608 | -/******/ | |
| 3609 | -/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 3610 | -/******/ !function() { | |
| 3611 | -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } | |
| 3612 | -/******/ }(); | |
| 3613 | -/******/ | |
| 3614 | -/******/ /* webpack/runtime/make namespace object */ | |
| 3615 | -/******/ !function() { | |
| 3616 | -/******/ // define __esModule on exports | |
| 3617 | -/******/ __webpack_require__.r = function(exports) { | |
| 3618 | -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 3619 | -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 3620 | -/******/ } | |
| 3621 | -/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 3622 | -/******/ }; | |
| 3623 | -/******/ }(); | |
| 3624 | -/******/ | |
| 3625 | -/************************************************************************/ | |
| 3626 | -var __webpack_exports__ = {}; | |
| 3627 | -// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. | |
| 3628 | -!function() { | |
| 3629 | -/*!*******************************************************!*\ | |
| 3630 | - !*** ./packages/packages/libs/editor-ui/src/index.ts ***! | |
| 3631 | - \*******************************************************/ | |
| 3632 | -__webpack_require__.r(__webpack_exports__); | |
| 3633 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3634 | -/* harmony export */ CollapseIcon: function() { return /* reexport safe */ _components_collapse_icon__WEBPACK_IMPORTED_MODULE_0__.CollapseIcon; }, | |
| 3635 | -/* harmony export */ CollapsibleContent: function() { return /* reexport safe */ _components_collapsible_content__WEBPACK_IMPORTED_MODULE_1__.CollapsibleContent; }, | |
| 3636 | -/* harmony export */ ConfirmationDialog: function() { return /* reexport safe */ _components_confirmation_dialog__WEBPACK_IMPORTED_MODULE_22__.ConfirmationDialog; }, | |
| 3637 | -/* harmony export */ CtaButton: function() { return /* reexport safe */ _components_cta_button__WEBPACK_IMPORTED_MODULE_13__.CtaButton; }, | |
| 3638 | -/* harmony export */ EditableField: function() { return /* reexport safe */ _components_editable_field__WEBPACK_IMPORTED_MODULE_3__.EditableField; }, | |
| 3639 | -/* harmony export */ EllipsisWithTooltip: function() { return /* reexport safe */ _components_ellipsis_with_tooltip__WEBPACK_IMPORTED_MODULE_2__.EllipsisWithTooltip; }, | |
| 3640 | -/* harmony export */ FileUploadDropzone: function() { return /* reexport safe */ _components_file_upload__WEBPACK_IMPORTED_MODULE_19__.FileUploadDropzone; }, | |
| 3641 | -/* harmony export */ FileUploadRow: function() { return /* reexport safe */ _components_file_upload__WEBPACK_IMPORTED_MODULE_19__.FileUploadRow; }, | |
| 3642 | -/* harmony export */ FloatingActionsBar: function() { return /* reexport safe */ _components_floating_bar__WEBPACK_IMPORTED_MODULE_18__.FloatingActionsBar; }, | |
| 3643 | -/* harmony export */ Form: function() { return /* reexport safe */ _components_form__WEBPACK_IMPORTED_MODULE_12__.Form; }, | |
| 3644 | -/* harmony export */ GlobalDialog: function() { return /* reexport safe */ _components_global_dialog__WEBPACK_IMPORTED_MODULE_10__.GlobalDialog; }, | |
| 3645 | -/* harmony export */ ITEM_HEIGHT: function() { return /* reexport safe */ _components_popover__WEBPACK_IMPORTED_MODULE_20__.ITEM_HEIGHT; }, | |
| 3646 | -/* harmony export */ InfoAlert: function() { return /* reexport safe */ _components_info_alert__WEBPACK_IMPORTED_MODULE_8__.InfoAlert; }, | |
| 3647 | -/* harmony export */ InfoTipCard: function() { return /* reexport safe */ _components_infotip_card__WEBPACK_IMPORTED_MODULE_7__.InfoTipCard; }, | |
| 3648 | -/* harmony export */ IntroductionModal: function() { return /* reexport safe */ _components_introduction_modal__WEBPACK_IMPORTED_MODULE_4__.IntroductionModal; }, | |
| 3649 | -/* harmony export */ MenuItemInfotip: function() { return /* reexport safe */ _components_menu_item__WEBPACK_IMPORTED_MODULE_6__.MenuItemInfotip; }, | |
| 3650 | -/* harmony export */ MenuListItem: function() { return /* reexport safe */ _components_menu_item__WEBPACK_IMPORTED_MODULE_6__.MenuListItem; }, | |
| 3651 | -/* harmony export */ PopoverAction: function() { return /* reexport safe */ _components_popover__WEBPACK_IMPORTED_MODULE_20__.PopoverAction; }, | |
| 3652 | -/* harmony export */ PopoverBody: function() { return /* reexport safe */ _components_popover__WEBPACK_IMPORTED_MODULE_20__.PopoverBody; }, | |
| 3653 | -/* harmony export */ PopoverHeader: function() { return /* reexport safe */ _components_popover__WEBPACK_IMPORTED_MODULE_20__.PopoverHeader; }, | |
| 3654 | -/* harmony export */ PopoverMenuList: function() { return /* reexport safe */ _components_popover__WEBPACK_IMPORTED_MODULE_20__.PopoverMenuList; }, | |
| 3655 | -/* harmony export */ PromotionAlert: function() { return /* reexport safe */ _components_promotions_promotion_alert__WEBPACK_IMPORTED_MODULE_17__.PromotionAlert; }, | |
| 3656 | -/* harmony export */ PromotionChip: function() { return /* reexport safe */ _components_promotions_promotion_chip__WEBPACK_IMPORTED_MODULE_16__.PromotionChip; }, | |
| 3657 | -/* harmony export */ PromotionInfotip: function() { return /* reexport safe */ _components_promotions_promotion_infotip__WEBPACK_IMPORTED_MODULE_14__.PromotionInfotip; }, | |
| 3658 | -/* harmony export */ PromotionPopover: function() { return /* reexport safe */ _components_promotions_promotion_popover__WEBPACK_IMPORTED_MODULE_15__.PromotionPopover; }, | |
| 3659 | -/* harmony export */ SaveChangesDialog: function() { return /* reexport safe */ _components_save_changes_dialog__WEBPACK_IMPORTED_MODULE_21__.SaveChangesDialog; }, | |
| 3660 | -/* harmony export */ SearchField: function() { return /* reexport safe */ _components_search_field__WEBPACK_IMPORTED_MODULE_11__.SearchField; }, | |
| 3661 | -/* harmony export */ SectionPopoverBody: function() { return /* reexport safe */ _components_popover__WEBPACK_IMPORTED_MODULE_20__.SectionPopoverBody; }, | |
| 3662 | -/* harmony export */ SectionRefContext: function() { return /* reexport safe */ _contexts_section_context__WEBPACK_IMPORTED_MODULE_23__.SectionRefContext; }, | |
| 3663 | -/* harmony export */ StyledMenuList: function() { return /* reexport safe */ _components_popover__WEBPACK_IMPORTED_MODULE_20__.StyledMenuList; }, | |
| 3664 | -/* harmony export */ ThemeProvider: function() { return /* reexport safe */ _components_theme_provider__WEBPACK_IMPORTED_MODULE_5__["default"]; }, | |
| 3665 | -/* harmony export */ WarningInfotip: function() { return /* reexport safe */ _components_warning_infotip__WEBPACK_IMPORTED_MODULE_9__.WarningInfotip; }, | |
| 3666 | -/* harmony export */ closeDialog: function() { return /* reexport safe */ _components_global_dialog__WEBPACK_IMPORTED_MODULE_10__.closeDialog; }, | |
| 3667 | -/* harmony export */ getCollapsibleValue: function() { return /* reexport safe */ _components_collapsible_content__WEBPACK_IMPORTED_MODULE_1__.getCollapsibleValue; }, | |
| 3668 | -/* harmony export */ openDialog: function() { return /* reexport safe */ _components_global_dialog__WEBPACK_IMPORTED_MODULE_10__.openDialog; }, | |
| 3669 | -/* harmony export */ useCanvasClickHandler: function() { return /* reexport safe */ _hooks_use_canvas_click_handler__WEBPACK_IMPORTED_MODULE_26__.useCanvasClickHandler; }, | |
| 3670 | -/* harmony export */ useDialog: function() { return /* reexport safe */ _components_save_changes_dialog__WEBPACK_IMPORTED_MODULE_21__.useDialog; }, | |
| 3671 | -/* harmony export */ useEditable: function() { return /* reexport safe */ _hooks_use_editable__WEBPACK_IMPORTED_MODULE_24__.useEditable; }, | |
| 3672 | -/* harmony export */ useFloatingActionsBar: function() { return /* reexport safe */ _components_floating_bar__WEBPACK_IMPORTED_MODULE_18__.useFloatingActionsBar; }, | |
| 3673 | -/* harmony export */ useSectionWidth: function() { return /* reexport safe */ _contexts_section_context__WEBPACK_IMPORTED_MODULE_23__.useSectionWidth; }, | |
| 3674 | -/* harmony export */ useTextFieldAutoSelect: function() { return /* reexport safe */ _hooks_use_text_field_auto_select__WEBPACK_IMPORTED_MODULE_25__.useTextFieldAutoSelect; } | |
| 3675 | -/* harmony export */ }); | |
| 3676 | -/* harmony import */ var _components_collapse_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/collapse-icon */ "./packages/packages/libs/editor-ui/src/components/collapse-icon.tsx"); | |
| 3677 | -/* harmony import */ var _components_collapsible_content__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/collapsible-content */ "./packages/packages/libs/editor-ui/src/components/collapsible-content.tsx"); | |
| 3678 | -/* harmony import */ var _components_ellipsis_with_tooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/ellipsis-with-tooltip */ "./packages/packages/libs/editor-ui/src/components/ellipsis-with-tooltip.tsx"); | |
| 3679 | -/* harmony import */ var _components_editable_field__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/editable-field */ "./packages/packages/libs/editor-ui/src/components/editable-field.tsx"); | |
| 3680 | -/* harmony import */ var _components_introduction_modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/introduction-modal */ "./packages/packages/libs/editor-ui/src/components/introduction-modal.tsx"); | |
| 3681 | -/* harmony import */ var _components_theme_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/theme-provider */ "./packages/packages/libs/editor-ui/src/components/theme-provider.tsx"); | |
| 3682 | -/* harmony import */ var _components_menu_item__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/menu-item */ "./packages/packages/libs/editor-ui/src/components/menu-item.tsx"); | |
| 3683 | -/* harmony import */ var _components_infotip_card__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/infotip-card */ "./packages/packages/libs/editor-ui/src/components/infotip-card.tsx"); | |
| 3684 | -/* harmony import */ var _components_info_alert__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/info-alert */ "./packages/packages/libs/editor-ui/src/components/info-alert.tsx"); | |
| 3685 | -/* harmony import */ var _components_warning_infotip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/warning-infotip */ "./packages/packages/libs/editor-ui/src/components/warning-infotip.tsx"); | |
| 3686 | -/* harmony import */ var _components_global_dialog__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/global-dialog */ "./packages/packages/libs/editor-ui/src/components/global-dialog/index.ts"); | |
| 3687 | -/* harmony import */ var _components_search_field__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/search-field */ "./packages/packages/libs/editor-ui/src/components/search-field.tsx"); | |
| 3688 | -/* harmony import */ var _components_form__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./components/form */ "./packages/packages/libs/editor-ui/src/components/form.tsx"); | |
| 3689 | -/* harmony import */ var _components_cta_button__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/cta-button */ "./packages/packages/libs/editor-ui/src/components/cta-button.tsx"); | |
| 3690 | -/* harmony import */ var _components_promotions_promotion_infotip__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/promotions/promotion-infotip */ "./packages/packages/libs/editor-ui/src/components/promotions/promotion-infotip.tsx"); | |
| 3691 | -/* harmony import */ var _components_promotions_promotion_popover__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./components/promotions/promotion-popover */ "./packages/packages/libs/editor-ui/src/components/promotions/promotion-popover.tsx"); | |
| 3692 | -/* harmony import */ var _components_promotions_promotion_chip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./components/promotions/promotion-chip */ "./packages/packages/libs/editor-ui/src/components/promotions/promotion-chip.tsx"); | |
| 3693 | -/* harmony import */ var _components_promotions_promotion_alert__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./components/promotions/promotion-alert */ "./packages/packages/libs/editor-ui/src/components/promotions/promotion-alert.tsx"); | |
| 3694 | -/* harmony import */ var _components_floating_bar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./components/floating-bar */ "./packages/packages/libs/editor-ui/src/components/floating-bar.tsx"); | |
| 3695 | -/* harmony import */ var _components_file_upload__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./components/file-upload */ "./packages/packages/libs/editor-ui/src/components/file-upload/index.ts"); | |
| 3696 | -/* harmony import */ var _components_popover__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./components/popover */ "./packages/packages/libs/editor-ui/src/components/popover/index.ts"); | |
| 3697 | -/* harmony import */ var _components_save_changes_dialog__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./components/save-changes-dialog */ "./packages/packages/libs/editor-ui/src/components/save-changes-dialog.tsx"); | |
| 3698 | -/* harmony import */ var _components_confirmation_dialog__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./components/confirmation-dialog */ "./packages/packages/libs/editor-ui/src/components/confirmation-dialog.tsx"); | |
| 3699 | -/* harmony import */ var _contexts_section_context__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./contexts/section-context */ "./packages/packages/libs/editor-ui/src/contexts/section-context.tsx"); | |
| 3700 | -/* harmony import */ var _hooks_use_editable__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./hooks/use-editable */ "./packages/packages/libs/editor-ui/src/hooks/use-editable.ts"); | |
| 3701 | -/* harmony import */ var _hooks_use_text_field_auto_select__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./hooks/use-text-field-auto-select */ "./packages/packages/libs/editor-ui/src/hooks/use-text-field-auto-select.ts"); | |
| 3702 | -/* harmony import */ var _hooks_use_canvas_click_handler__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./hooks/use-canvas-click-handler */ "./packages/packages/libs/editor-ui/src/hooks/use-canvas-click-handler.tsx"); | |
| 3703 | -// components | |
| 3704 | - | |
| 3705 | - | |
| 3706 | - | |
| 3707 | - | |
| 3708 | - | |
| 3709 | - | |
| 3710 | - | |
| 3711 | - | |
| 3712 | - | |
| 3713 | - | |
| 3714 | - | |
| 3715 | - | |
| 3716 | - | |
| 3717 | - | |
| 3718 | - | |
| 3719 | - | |
| 3720 | - | |
| 3721 | - | |
| 3722 | - | |
| 3723 | - | |
| 3724 | - | |
| 3725 | - | |
| 3726 | - | |
| 3727 | - | |
| 3728 | -// contexts | |
| 3729 | - | |
| 3730 | - | |
| 3731 | -// hooks | |
| 3732 | - | |
| 3733 | - | |
| 3734 | - | |
| 3735 | -}(); | |
| 3736 | -(window.elementorV2 = window.elementorV2 || {}).editorUi = __webpack_exports__; | |
| 3737 | -/******/ })() | |
| 3738 | -; | |
| 3739 | -window.elementorV2.editorUi?.init?.(); | |
| 7 | +`},"./packages/packages/libs/editor-ui/src/components/ellipsis-with-tooltip.tsx":function(e,t,n){n.r(t),n.d(t,{EllipsisWithTooltip:function(){return EllipsisWithTooltip}});var o=n("react"),r=n("@elementor/ui");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const EllipsisWithTooltip=({maxWidth:e,title:t,as:n,...s})=>{const[a,l]=useIsOverflowing();return l?o.createElement(r.Tooltip,{title:t,placement:"top"},o.createElement(i,_extends({maxWidth:e,ref:a,as:n},s),t)):o.createElement(i,_extends({maxWidth:e,ref:a,as:n},s),t)},i=o.forwardRef(({maxWidth:e,as:t=r.Box,...n},i)=>o.createElement(t,_extends({ref:i,position:"relative"},n,{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:e}}))),useIsOverflowing=()=>{const[e,t]=(0,o.useState)(null),[n,r]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const t=new ResizeObserver(([{target:e}])=>{r(e.scrollWidth>e.clientWidth)});return e&&t.observe(e),()=>{t.disconnect()}},[e]),[t,n]}},"./packages/packages/libs/editor-ui/src/components/form.tsx":function(e,t,n){n.r(t),n.d(t,{Form:function(){return Form}});var o=n("react");const Form=({children:e,onSubmit:t})=>{const n=(0,o.useRef)(null);return o.createElement("form",{onSubmit:e=>{e.preventDefault(),t?.()},ref:n,onKeyDown:e=>{const{target:t}=e;"Enter"===e.key&&t instanceof HTMLInputElement&&"submit"!==t.type&&(e.preventDefault(),n.current?.requestSubmit())}},e)}},"./packages/packages/libs/editor-ui/src/components/global-dialog/components/global-dialog.tsx":function(e,t,n){n.r(t),n.d(t,{GlobalDialog:function(){return GlobalDialog}});var o=n("react"),r=n("@elementor/ui"),i=n("./packages/packages/libs/editor-ui/src/components/theme-provider.tsx"),s=n("./packages/packages/libs/editor-ui/src/components/global-dialog/subscribers.ts");const GlobalDialog=()=>{const[e,t]=(0,o.useState)(null);return(0,o.useEffect)(()=>{const e=(0,s.subscribeToDialogState)(t);return()=>{e()}},[]),e?o.createElement(i.default,null,o.createElement(r.Dialog,{role:"dialog",open:!0,onClose:s.closeDialog,maxWidth:"sm",fullWidth:!0},e.component)):null}},"./packages/packages/libs/editor-ui/src/components/global-dialog/index.ts":function(e,t,n){n.r(t),n.d(t,{GlobalDialog:function(){return o.GlobalDialog},closeDialog:function(){return r.closeDialog},openDialog:function(){return r.openDialog}});var o=n("./packages/packages/libs/editor-ui/src/components/global-dialog/components/global-dialog.tsx"),r=n("./packages/packages/libs/editor-ui/src/components/global-dialog/subscribers.ts")},"./packages/packages/libs/editor-ui/src/components/global-dialog/subscribers.ts":function(e,t,n){n.r(t),n.d(t,{closeDialog:function(){return closeDialog},openDialog:function(){return openDialog},subscribeToDialogState:function(){return subscribeToDialogState}});let o=null;const r=new Set,subscribeToDialogState=e=>(r.add(e),e(o),()=>r.delete(e)),notifySubscribers=()=>{r.forEach(e=>e(o))},openDialog=({component:e})=>{o={component:e},notifySubscribers()},closeDialog=()=>{o=null,notifySubscribers()}},"./packages/packages/libs/editor-ui/src/components/info-alert.tsx":function(e,t,n){n.r(t),n.d(t,{InfoAlert:function(){return InfoAlert}});var o=n("react"),r=n("@elementor/icons"),i=n("@elementor/ui");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const InfoAlert=e=>o.createElement(i.Alert,_extends({icon:o.createElement(r.InfoCircleFilledIcon,{fontSize:"small",color:"secondary"}),variant:"standard",color:"secondary",elevation:0,size:"small"},e))},"./packages/packages/libs/editor-ui/src/components/infotip-card.tsx":function(e,t,n){n.r(t),n.d(t,{InfoTipCard:function(){return InfoTipCard}});var o=n("react"),r=n("@elementor/ui");const InfoTipCard=({content:e,svgIcon:t,learnMoreButton:n,ctaButton:i})=>o.createElement(r.Card,{elevation:0,sx:{width:320}},o.createElement(r.CardContent,{sx:{pb:0}},o.createElement(r.Box,{display:"flex",alignItems:"start"},o.createElement(r.SvgIcon,{fontSize:"tiny",sx:{mr:.5}},t),o.createElement(r.Typography,{variant:"body2"},e,n&&o.createElement(o.Fragment,null," ",o.createElement(r.Link,{color:"info.main",href:n.href,target:"_blank"},n.label))))),i&&o.createElement(r.CardActions,{sx:{justifyContent:"flex-start"}},o.createElement(r.Button,{size:"small",color:"secondary",variant:"contained",onClick:i.onClick,sx:{marginInlineStart:"1rem"}},i.label)))},"./packages/packages/libs/editor-ui/src/components/introduction-modal.tsx":function(e,t,n){n.r(t),n.d(t,{IntroductionModal:function(){return IntroductionModal}});var o=n("react"),r=n("@elementor/ui"),i=n("@wordpress/i18n");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const IntroductionModal=({open:e,handleClose:t,title:n,children:a})=>{const[l,c]=(0,o.useState)(!0);return o.createElement(r.Dialog,{open:e,onClose:t,maxWidth:"sm",TransitionComponent:s},n&&o.createElement(r.DialogHeader,{logo:!1},o.createElement(r.DialogTitle,null,n)),a,o.createElement(r.DialogActions,null,o.createElement(r.FormControlLabel,{sx:{marginRight:"auto"},control:o.createElement(r.Checkbox,{checked:!l,onChange:()=>c(!l)}),label:o.createElement(r.Typography,{variant:"body2"},(0,i.__)("Don't show this again","elementor"))}),o.createElement(r.Button,{size:"medium",variant:"contained",sx:{minWidth:"135px"},onClick:()=>t(l)},(0,i.__)("Got it","elementor"))))},s=o.forwardRef((e,t)=>o.createElement(r.Fade,_extends({ref:t},e,{timeout:{enter:1e3,exit:200}})))},"./packages/packages/libs/editor-ui/src/components/menu-item.tsx":function(e,t,n){n.r(t),n.d(t,{MenuItemInfotip:function(){return s},MenuListItem:function(){return MenuListItem}});var o=n("react"),r=n("@elementor/ui"),i=n("./packages/packages/libs/editor-ui/src/components/info-alert.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const MenuListItem=({children:e,menuItemTextProps:t,primaryTypographyProps:n={variant:"caption"},...i})=>o.createElement(r.MenuItem,_extends({dense:!0},i,{sx:{...i.sx??{}}}),o.createElement(r.MenuItemText,_extends({primary:e,primaryTypographyProps:n},t))),s=(0,o.forwardRef)(({showInfoTip:e=!1,children:t,content:n},s)=>e?o.createElement(r.Infotip,{ref:s,placement:"right",arrow:!1,content:o.createElement(i.InfoAlert,{sx:{maxWidth:325}},n)},o.createElement("div",{style:{pointerEvents:"initial",width:"100%"},onClick:e=>e.stopPropagation()},t)):o.createElement(o.Fragment,null,t))},"./packages/packages/libs/editor-ui/src/components/popover/body.tsx":function(e,t,n){n.r(t),n.d(t,{PopoverBody:function(){return PopoverBody}});var o=n("react"),r=n("@elementor/ui");const PopoverBody=({children:e,height:t=348,width:n,id:i})=>o.createElement(r.Box,{display:"flex",flexDirection:"column",sx:{height:t,overflow:"hidden",width:(n?n-32:220)+"px",maxWidth:496},id:i},e)},"./packages/packages/libs/editor-ui/src/components/popover/header.tsx":function(e,t,n){n.r(t),n.d(t,{PopoverHeader:function(){return PopoverHeader}});var o=n("react"),r=n("@elementor/ui");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const PopoverHeader=({title:e,onClose:t,icon:n,actions:i})=>o.createElement(r.Stack,_extends({direction:"row",alignItems:"center"},{pl:2,pr:1,py:1.5,maxHeight:36},{sx:{columnGap:.5}}),n,o.createElement(r.Typography,{variant:"subtitle2",sx:{fontSize:"12px",mt:.25}},e),o.createElement(r.Stack,{direction:"row",sx:{ml:"auto"}},i,o.createElement(r.CloseButton,{slotProps:{icon:{fontSize:"tiny"}},sx:{ml:"auto"},onClick:t})))},"./packages/packages/libs/editor-ui/src/components/popover/index.ts":function(e,t,n){n.r(t),n.d(t,{ITEM_HEIGHT:function(){return i.ITEM_HEIGHT},PopoverBody:function(){return o.PopoverBody},PopoverHeader:function(){return r.PopoverHeader},PopoverMenuList:function(){return i.PopoverMenuList},StyledMenuList:function(){return i.StyledMenuList}});var o=n("./packages/packages/libs/editor-ui/src/components/popover/body.tsx"),r=n("./packages/packages/libs/editor-ui/src/components/popover/header.tsx"),i=n("./packages/packages/libs/editor-ui/src/components/popover/menu-list.tsx")},"./packages/packages/libs/editor-ui/src/components/popover/menu-list.tsx":function(e,t,n){n.r(t),n.d(t,{ITEM_HEIGHT:function(){return a},PopoverMenuList:function(){return PopoverMenuList},StyledMenuList:function(){return l}});var o=n("react"),r=n("@elementor/ui"),i=n("./packages/node_modules/@tanstack/react-virtual/dist/esm/index.js"),s=n("./packages/packages/libs/editor-ui/src/hooks/index.ts");const a=32,PopoverMenuList=({items:e,onSelect:t,onClose:n,selectedValue:c,itemStyle:u,onChange:d,"data-testid":p,menuItemContentTemplate:m,categoryItemContentTemplate:f,noResultsComponent:h,menuListTemplate:g})=>{const b=(0,o.useRef)(null),v=(0,s.useScrollTop)({containerRef:b}),x=(0,r.useTheme)(),_=g||l,E=(0,o.useMemo)(()=>e.reduce((e,t,n)=>("category"===t.type&&e.push(n),e),[]),[e]),onChangeCallback=({getVirtualIndexes:t})=>{const n=t().map(t=>e[t]);d?.(n)},k=(0,i.useVirtualizer)({count:e.length,getScrollElement:()=>b.current,estimateSize:()=>a,overscan:6,rangeExtractor:e=>{const t=[];for(let n=e.startIndex;n<=e.endIndex;n++)t.push(n);const n=((e,t)=>[...e.filter(e=>e<t.startIndex).slice(-2),...e.filter(e=>e>t.endIndex).slice(0,2)])(E,e);return n.forEach(e=>{t.includes(e)||t.push(e)}),t.sort((e,t)=>e-t)},onChange:onChangeCallback});(0,o.useEffect)(()=>{onChangeCallback(k)},[e]),(0,s.useScrollToSelected)({selectedValue:c,items:e,virtualizer:k});const w=k.getVirtualItems();return o.createElement(r.Box,{ref:b,sx:{height:"100%",overflowY:"auto"}},0===e.length&&h?h:o.createElement(_,{role:"listbox",style:{height:`${k.getTotalSize()}px`},"data-testid":p},w.map(i=>{const s=e[i.index],a=i.index===e.length-1,l="category"===e[0]?.type?1===i.index:0===i.index,d=c===s.value,p=c?-1:0;if(!s)return null;if("category"===s.type){const e=i.start+8<=v;return o.createElement(r.MenuSubheader,{key:i.key,style:e?{}:(h=i.start,{position:"absolute",transform:`translateY(${h+8}px)`}),sx:{fontWeight:"400",color:"text.tertiary"}},f?f(s):s.label||s.value)}var h;const g=s.disabled;return o.createElement(r.ListItem,{key:i.key,role:"option","aria-selected":d,"aria-disabled":g,onClick:g?void 0:e=>{e.target.closest("button")||(t(s.value),n())},onKeyDown:e=>{"Enter"!==e.key||g||(t(s.value),n()),"ArrowDown"===e.key&&a&&(e.preventDefault(),e.stopPropagation()),"ArrowUp"===e.key&&l&&(e.preventDefault(),e.stopPropagation())},tabIndex:d?0:p,sx:{transform:`translateY(${i.start+8}px)`,...x.typography.caption,...u?u(s):{}}},m?m(s):s.label||s.value)})))},l=(0,r.styled)(r.MenuList)(({theme:e})=>({"& > li":{height:a,width:"100%",display:"flex",alignItems:"center"},'& > [role="option"]':{lineHeight:"inherit",padding:e.spacing(.75,2,.75,4),"&:hover, &:focus":{backgroundColor:e.palette.action.hover},'&[aria-selected="true"]':{backgroundColor:e.palette.action.selected},'&[aria-disabled="true"]':{color:e.palette.text.disabled},cursor:"pointer",textOverflow:"ellipsis",position:"absolute",top:0,left:0},width:"100%",position:"relative"}))},"./packages/packages/libs/editor-ui/src/components/promotion-chip.tsx":function(e,t,n){n.r(t),n.d(t,{PromotionChip:function(){return s}});var o=n("react"),r=n("@elementor/icons"),i=n("@elementor/ui");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const s=o.forwardRef(({...e},t)=>o.createElement(i.Chip,_extends({"aria-label":"Promotion chip",ref:t,size:"tiny",color:"promotion",variant:"standard",icon:o.createElement(r.CrownFilledIcon,null),sx:{ml:1,width:"20px","& .MuiChip-label":{display:"none"}}},e)))},"./packages/packages/libs/editor-ui/src/components/promotion-infotip.tsx":function(e,t,n){n.r(t),n.d(t,{PromotionInfotip:function(){return PromotionInfotip}});var o=n("react"),r=n("@elementor/editor-v1-adapters"),i=n("@elementor/ui"),s=n("./packages/packages/libs/editor-ui/src/components/cta-button.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const PromotionInfotip=({children:e,open:t,onClose:n,...s})=>((0,o.useEffect)(()=>{const e=t?(0,r.getCanvasIframeDocument)():null;if(e)return e.addEventListener("mousedown",n),()=>e.removeEventListener("mousedown",n)},[t,n]),o.createElement(i.Infotip,{placement:"right",content:o.createElement(InfotipCard,_extends({onClose:n},s)),open:t},e));function InfotipCard({title:e,content:t,assetUrl:n,ctaUrl:r,onClose:a}){return o.createElement(i.ClickAwayListener,{disableReactTree:!0,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",onClickAway:a},o.createElement(i.Card,{elevation:0,sx:{maxWidth:296}},o.createElement(i.CardHeader,{title:e,action:o.createElement(i.CloseButton,{slotProps:{icon:{fontSize:"tiny"}},onClick:a})}),o.createElement(i.CardMedia,{component:"img",image:n,alt:"",sx:{width:"100%",aspectRatio:"16 / 9"}}),o.createElement(i.CardContent,null,o.createElement(i.Typography,{variant:"body2",color:"text.secondary"},t)),o.createElement(i.CardActions,{sx:{justifyContent:"flex-start"}},o.createElement(s.CtaButton,{href:r}))))}},"./packages/packages/libs/editor-ui/src/components/promotion-popover.tsx":function(e,t,n){n.r(t),n.d(t,{PromotionPopover:function(){return PromotionPopover}});var o=n("react"),r=n("@elementor/icons"),i=n("@elementor/ui");const PromotionPopover=({children:e,open:t,placement:n="right",slotProps:r,...s})=>o.createElement(i.Infotip,{placement:n,arrow:!1,content:o.createElement(PopoverAlert,s),open:t,slotProps:r||{popper:{modifiers:[{name:"offset",options:{offset:[0,10]}}]}}},e);function PopoverAlert({title:e,content:t,ctaUrl:n,ctaText:s,onClose:a}){return o.createElement(i.ClickAwayListener,{disableReactTree:!0,mouseEvent:"onMouseDown",touchEvent:"onTouchStart",onClickAway:a},o.createElement(i.Alert,{variant:"standard",color:"promotion",icon:o.createElement(r.CrownFilledIcon,{fontSize:"tiny"}),onClose:a,role:"dialog","aria-label":"promotion-popover-title",action:o.createElement(i.AlertAction,{variant:"contained",color:"promotion",href:n,target:"_blank",rel:"noopener noreferrer"},s),sx:{maxWidth:296}},o.createElement(i.Box,{sx:{gap:.5,display:"flex",flexDirection:"column"}},o.createElement(i.AlertTitle,null,e),o.createElement(i.Typography,{variant:"body2"},t))))}},"./packages/packages/libs/editor-ui/src/components/save-changes-dialog.tsx":function(e,t,n){n.r(t),n.d(t,{SaveChangesDialog:function(){return SaveChangesDialog},useDialog:function(){return useDialog}});var o=n("react"),r=n("@elementor/icons"),i=n("@elementor/ui");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const s="save-changes-dialog",SaveChangesDialog=({children:e,onClose:t})=>o.createElement(i.Dialog,{open:!0,onClose:t,"aria-labelledby":s,maxWidth:"xs"},e);SaveChangesDialog.Title=({children:e,onClose:t})=>o.createElement(i.DialogTitle,{id:s,display:"flex",alignItems:"center",gap:1,sx:{lineHeight:1,justifyContent:"space-between"}},o.createElement(i.Stack,{direction:"row",alignItems:"center",gap:1},o.createElement(r.AlertTriangleFilledIcon,{color:"secondary"}),e),t&&o.createElement(i.IconButton,{onClick:t,size:"small"},o.createElement(r.XIcon,null))),SaveChangesDialog.Content=({children:e})=>o.createElement(i.DialogContent,null,e),SaveChangesDialog.ContentText=e=>o.createElement(i.DialogContentText,_extends({variant:"body2",color:"textPrimary",display:"flex",flexDirection:"column"},e)),SaveChangesDialog.Actions=({actions:e})=>{const[t,n]=(0,o.useState)(!1),{cancel:r,confirm:s,discard:a}=e;return o.createElement(i.DialogActions,null,r&&o.createElement(i.Button,{variant:"text",color:"secondary",onClick:r.action},r.label),a&&o.createElement(i.Button,{variant:"text",color:"secondary",onClick:a.action},a.label),o.createElement(i.Button,{variant:"contained",color:"secondary",onClick:async()=>{n(!0),await s.action(),n(!1)},loading:t},s.label))};const useDialog=()=>{const[e,t]=(0,o.useState)(!1);return{isOpen:e,open:()=>t(!0),close:()=>t(!1)}}},"./packages/packages/libs/editor-ui/src/components/search-field.tsx":function(e,t,n){n.r(t),n.d(t,{SearchField:function(){return SearchField}});var o=n("react"),r=n("@elementor/icons"),i=n("@elementor/ui"),s=n("@wordpress/i18n");const a="tiny",SearchField=({value:e,onSearch:t,placeholder:n,id:l,sx:c})=>{const u=(0,o.useRef)(null);return o.createElement(i.Box,{sx:{px:2,pb:1.5,...c}},o.createElement(i.TextField,{autoFocus:!0,fullWidth:!0,id:l,size:a,value:e,inputRef:u,onChange:e=>{t(e.target.value)},placeholder:n,InputProps:{startAdornment:o.createElement(i.InputAdornment,{position:"start"},o.createElement(r.SearchIcon,{fontSize:a})),endAdornment:e&&o.createElement(i.IconButton,{size:a,onClick:()=>{t(""),u.current?.focus()},"aria-label":(0,s.__)("Clear","elementor")},o.createElement(r.XIcon,{color:"action",fontSize:a}))}}))}},"./packages/packages/libs/editor-ui/src/components/theme-provider.tsx":function(e,t,n){n.r(t),n.d(t,{default:function(){return ThemeProvider}});var o=n("react"),r=n("@elementor/ui"),i=n("./packages/packages/libs/editor-ui/src/hooks/use-color-scheme.ts");const s="unstable";function ThemeProvider({children:e}){const t=(0,i.useColorScheme)();return o.createElement(r.ThemeProvider,{colorScheme:t,palette:s},e)}},"./packages/packages/libs/editor-ui/src/components/warning-infotip.tsx":function(e,t,n){n.r(t),n.d(t,{WarningInfotip:function(){return i}});var o=n("react"),r=n("@elementor/ui");const i=(0,o.forwardRef)(({children:e,open:t,title:n,text:i,placement:s,width:a,offset:l,hasError:c=!0},u)=>o.createElement(r.Infotip,{ref:u,open:t,placement:s,PopperProps:{sx:{width:a||"initial",".MuiTooltip-tooltip":{marginLeft:0,marginRight:0}},modifiers:l?[{name:"offset",options:{offset:l}}]:[]},arrow:!1,content:o.createElement(r.Alert,{color:c?"error":"secondary",severity:"warning",variant:"standard",size:"small"},n?o.createElement(r.AlertTitle,null,n):null,i)},e))},"./packages/packages/libs/editor-ui/src/hooks/index.ts":function(e,t,n){n.r(t),n.d(t,{useScrollToSelected:function(){return o.useScrollToSelected},useScrollTop:function(){return r.useScrollTop}});var o=n("./packages/packages/libs/editor-ui/src/hooks/use-scroll-to-selected.ts"),r=n("./packages/packages/libs/editor-ui/src/hooks/use-scroll-top.ts")},"./packages/packages/libs/editor-ui/src/hooks/use-color-scheme.ts":function(e,t,n){n.r(t),n.d(t,{useColorScheme:function(){return useColorScheme}});var o=n("react"),r=n("@elementor/editor-v1-adapters");function useColorScheme(){const[e,t]=(0,o.useState)(()=>getV1ColorScheme());return(0,o.useEffect)(()=>(0,r.__privateListenTo)((0,r.v1ReadyEvent)(),()=>t(getV1ColorScheme())),[]),(0,o.useEffect)(()=>(0,r.__privateListenTo)((0,r.commandEndEvent)("document/elements/settings"),e=>{const n=e;n.args?.settings&&"ui_theme"in n.args.settings&&t(getV1ColorScheme())}),[]),e}function getV1ColorScheme(){return window.elementor?.getPreferences?.("ui_theme")||"auto"}},"./packages/packages/libs/editor-ui/src/hooks/use-editable.ts":function(e,t,n){n.r(t),n.d(t,{useEditable:function(){return useEditable}});var o=n("react");const useEditable=({value:e,onSubmit:t,validation:n,onClick:r,onError:i})=>{const[s,a]=(0,o.useState)(!1),[l,c]=(0,o.useState)(null),u=useSelection(s),isDirty=t=>t!==e,closeEditMode=()=>{c(null),i?.(null),a(!1)},d={onClick:e=>{s&&e.stopPropagation(),r?.(e)},onKeyDown:e=>{if(e.stopPropagation(),["Escape"].includes(e.key))return closeEditMode();["Enter"].includes(e.key)&&(e.preventDefault(),l||u.current?.blur())},onInput:e=>{const{innerText:t}=e.target;if(n){const e=isDirty(t)?n(t):null;c(e),i?.(e)}},onBlur:()=>{l?closeEditMode():(e=>{if(isDirty(e)){if(!l)try{t(e)}finally{closeEditMode()}}else closeEditMode()})(u.current.innerText)}},p={value:e,role:"textbox",contentEditable:s,...s&&{suppressContentEditableWarning:!0}};return{ref:u,isEditing:s,openEditMode:()=>{a(!0)},closeEditMode:closeEditMode,value:e,error:l,getProps:()=>({...d,...p})}},useSelection=e=>{const t=(0,o.useRef)(null);return(0,o.useEffect)(()=>{e&&selectAll(t.current)},[e]),t},selectAll=e=>{const t=getSelection();if(!t||!e)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},"./packages/packages/libs/editor-ui/src/hooks/use-scroll-to-selected.ts":function(e,t,n){n.r(t),n.d(t,{useScrollToSelected:function(){return useScrollToSelected}});var o=n("react");const useScrollToSelected=({selectedValue:e,items:t,virtualizer:n})=>{(0,o.useEffect)(()=>{if(!e||0===t.length)return;const o=t.findIndex(t=>t.value===e);-1!==o&&n.scrollToIndex(o,{align:"center"})},[e,t,n])}},"./packages/packages/libs/editor-ui/src/hooks/use-scroll-top.ts":function(e,t,n){n.r(t),n.d(t,{useScrollTop:function(){return useScrollTop}});var o=n("react");const useScrollTop=({containerRef:e})=>{const[t,n]=(0,o.useState)(0);return(0,o.useEffect)(()=>{const t=e.current;if(!t)return;const handleScroll=()=>{n(t.scrollTop)};return t.addEventListener("scroll",handleScroll),()=>t.removeEventListener("scroll",handleScroll)},[e]),t}},"@elementor/editor-v1-adapters":function(e){e.exports=window.elementorV2.editorV1Adapters},"@elementor/icons":function(e){e.exports=window.elementorV2.icons},"@elementor/ui":function(e){e.exports=window.elementorV2.ui},"@wordpress/i18n":function(e){e.exports=window.wp.i18n},react:function(e){e.exports=window.React},"react-dom":function(e){e.exports=window.ReactDOM}},t={};function __webpack_require__(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){__webpack_require__.r(n),__webpack_require__.d(n,{CollapseIcon:function(){return e.CollapseIcon},ConfirmationDialog:function(){return x.ConfirmationDialog},CtaButton:function(){return m.CtaButton},EditableField:function(){return o.EditableField},EllipsisWithTooltip:function(){return t.EllipsisWithTooltip},Form:function(){return p.Form},GlobalDialog:function(){return u.GlobalDialog},ITEM_HEIGHT:function(){return b.ITEM_HEIGHT},InfoAlert:function(){return l.InfoAlert},InfoTipCard:function(){return a.InfoTipCard},IntroductionModal:function(){return r.IntroductionModal},MenuItemInfotip:function(){return s.MenuItemInfotip},MenuListItem:function(){return s.MenuListItem},PopoverBody:function(){return b.PopoverBody},PopoverHeader:function(){return b.PopoverHeader},PopoverMenuList:function(){return b.PopoverMenuList},PromotionChip:function(){return g.PromotionChip},PromotionInfotip:function(){return f.PromotionInfotip},PromotionPopover:function(){return h.PromotionPopover},SaveChangesDialog:function(){return v.SaveChangesDialog},SearchField:function(){return d.SearchField},StyledMenuList:function(){return b.StyledMenuList},ThemeProvider:function(){return i.default},WarningInfotip:function(){return c.WarningInfotip},closeDialog:function(){return u.closeDialog},openDialog:function(){return u.openDialog},useDialog:function(){return v.useDialog},useEditable:function(){return _.useEditable}});var e=__webpack_require__("./packages/packages/libs/editor-ui/src/components/collapse-icon.tsx"),t=__webpack_require__("./packages/packages/libs/editor-ui/src/components/ellipsis-with-tooltip.tsx"),o=__webpack_require__("./packages/packages/libs/editor-ui/src/components/editable-field.tsx"),r=__webpack_require__("./packages/packages/libs/editor-ui/src/components/introduction-modal.tsx"),i=__webpack_require__("./packages/packages/libs/editor-ui/src/components/theme-provider.tsx"),s=__webpack_require__("./packages/packages/libs/editor-ui/src/components/menu-item.tsx"),a=__webpack_require__("./packages/packages/libs/editor-ui/src/components/infotip-card.tsx"),l=__webpack_require__("./packages/packages/libs/editor-ui/src/components/info-alert.tsx"),c=__webpack_require__("./packages/packages/libs/editor-ui/src/components/warning-infotip.tsx"),u=__webpack_require__("./packages/packages/libs/editor-ui/src/components/global-dialog/index.ts"),d=__webpack_require__("./packages/packages/libs/editor-ui/src/components/search-field.tsx"),p=__webpack_require__("./packages/packages/libs/editor-ui/src/components/form.tsx"),m=__webpack_require__("./packages/packages/libs/editor-ui/src/components/cta-button.tsx"),f=__webpack_require__("./packages/packages/libs/editor-ui/src/components/promotion-infotip.tsx"),h=__webpack_require__("./packages/packages/libs/editor-ui/src/components/promotion-popover.tsx"),g=__webpack_require__("./packages/packages/libs/editor-ui/src/components/promotion-chip.tsx"),b=__webpack_require__("./packages/packages/libs/editor-ui/src/components/popover/index.ts"),v=__webpack_require__("./packages/packages/libs/editor-ui/src/components/save-changes-dialog.tsx"),x=__webpack_require__("./packages/packages/libs/editor-ui/src/components/confirmation-dialog.tsx"),_=__webpack_require__("./packages/packages/libs/editor-ui/src/hooks/use-editable.ts")}(),(window.elementorV2=window.elementorV2||{}).editorUi=n}(),window.elementorV2.editorUi?.init?.(); | |
| 3740 | 8 | //# sourceMappingURL=editor-ui.js.map |