app/assets/build/coco/app.js in coveragebook_components-0.7.4 vs app/assets/build/coco/app.js in coveragebook_components-0.7.5

- old
+ new

@@ -14030,11 +14030,11 @@ // ../../../package.json var package_default = { name: "coveragebook-components", type: "module", - version: "0.7.4", + version: "0.7.5", main: "index.js", repository: "git@github.com:coveragebook/coco.git", author: "Mark Perkins <mark@coveragebook.com>", license: "NO LICENSE", browserslist: [ @@ -14113,18 +14113,17 @@ }, hooks: { "before:init": [ "npm install", "bundle install", - "bundle exec rake test", - "cd lookbook && bundle" + "bundle exec rake test" ], "after:bump": [ "npm run lint:fix", "npm run build" ], - "after:version:bump": "./bin/bump-version ${version} && bundle", + "after:version:bump": "./bin/bump-version ${version} && bundle && cd lookbook && bundle", "after:release": "./bin/build-gem ${version}" } } }; @@ -17958,19 +17957,19 @@ modifiers.includes("self") ? delete el._x_ignoreSelf : delete el._x_ignore; }); }; directive("ignore", handler); directive("effect", (el, { expression }, { effect: effect32 }) => effect32(evaluateLater(el, expression))); - function on(el, event2, modifiers, callback) { + function on(el, event, modifiers, callback) { let listenerTarget = el; let handler3 = (e3) => callback(e3); let options = {}; let wrapHandler = (callback2, wrapper) => (e3) => wrapper(callback2, e3); if (modifiers.includes("dot")) - event2 = dotSyntax(event2); + event = dotSyntax(event); if (modifiers.includes("camel")) - event2 = camelCase2(event2); + event = camelCase2(event); if (modifiers.includes("passive")) options.passive = true; if (modifiers.includes("capture")) options.capture = true; if (modifiers.includes("window")) @@ -18016,24 +18015,24 @@ }); } if (modifiers.includes("once")) { handler3 = wrapHandler(handler3, (next, e3) => { next(e3); - listenerTarget.removeEventListener(event2, handler3, options); + listenerTarget.removeEventListener(event, handler3, options); }); } handler3 = wrapHandler(handler3, (next, e3) => { - if (isKeyEvent(event2)) { + if (isKeyEvent(event)) { if (isListeningForASpecificKeyThatHasntBeenPressed(e3, modifiers)) { return; } } next(e3); }); - listenerTarget.addEventListener(event2, handler3, options); + listenerTarget.addEventListener(event, handler3, options); return () => { - listenerTarget.removeEventListener(event2, handler3, options); + listenerTarget.removeEventListener(event, handler3, options); }; } function dotSyntax(subject) { return subject.replace(/-/g, "."); } @@ -18046,12 +18045,12 @@ function kebabCase2(subject) { if ([" ", "_"].includes(subject)) return subject; return subject.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[_\s]/, "-").toLowerCase(); } - function isKeyEvent(event2) { - return ["keydown", "keyup"].includes(event2); + function isKeyEvent(event) { + return ["keydown", "keyup"].includes(event); } function isListeningForASpecificKeyThatHasntBeenPressed(e3, modifiers) { let keyModifiers = modifiers.filter((i3) => { return !["window", "document", "prevent", "stop", "once", "capture"].includes(i3); }); @@ -18145,17 +18144,17 @@ mutateDom(() => { if (!el.hasAttribute("name")) el.setAttribute("name", expression); }); } - var event2 = el.tagName.toLowerCase() === "select" || ["checkbox", "radio"].includes(el.type) || modifiers.includes("lazy") ? "change" : "input"; + var event = el.tagName.toLowerCase() === "select" || ["checkbox", "radio"].includes(el.type) || modifiers.includes("lazy") ? "change" : "input"; let removeListener = isCloning ? () => { - } : on(el, event2, modifiers, (e3) => { + } : on(el, event, modifiers, (e3) => { setValue(getInputValue(el, modifiers, e3, getValue())); }); if (modifiers.includes("fill") && [null, ""].includes(getValue())) { - el.dispatchEvent(new Event(event2, {})); + el.dispatchEvent(new Event(event, {})); } if (!el._x_removeModelListeners) el._x_removeModelListeners = {}; el._x_removeModelListeners["default"] = removeListener; cleanup2(() => el._x_removeModelListeners["default"]()); @@ -18186,31 +18185,31 @@ if (modifiers.includes("unintrusive") && document.activeElement.isSameNode(el)) return; el._x_forceModelUpdate(value); }); }); - function getInputValue(el, modifiers, event2, currentValue) { + function getInputValue(el, modifiers, event, currentValue) { return mutateDom(() => { var _a; - if (event2 instanceof CustomEvent && event2.detail !== void 0) - return (_a = event2.detail) != null ? _a : event2.target.value; + if (event instanceof CustomEvent && event.detail !== void 0) + return (_a = event.detail) != null ? _a : event.target.value; else if (el.type === "checkbox") { if (Array.isArray(currentValue)) { - let newValue = modifiers.includes("number") ? safeParseNumber(event2.target.value) : event2.target.value; - return event2.target.checked ? currentValue.concat([newValue]) : currentValue.filter((el2) => !checkedAttrLooseCompare2(el2, newValue)); + let newValue = modifiers.includes("number") ? safeParseNumber(event.target.value) : event.target.value; + return event.target.checked ? currentValue.concat([newValue]) : currentValue.filter((el2) => !checkedAttrLooseCompare2(el2, newValue)); } else { - return event2.target.checked; + return event.target.checked; } } else if (el.tagName.toLowerCase() === "select" && el.multiple) { - return modifiers.includes("number") ? Array.from(event2.target.selectedOptions).map((option) => { + return modifiers.includes("number") ? Array.from(event.target.selectedOptions).map((option) => { let rawValue = option.value || option.text; return safeParseNumber(rawValue); - }) : Array.from(event2.target.selectedOptions).map((option) => { + }) : Array.from(event.target.selectedOptions).map((option) => { return option.value || option.text; }); } else { - let rawValue = event2.target.value; + let rawValue = event.target.value; return modifiers.includes("number") ? safeParseNumber(rawValue) : modifiers.includes("trim") ? rawValue.trim() : rawValue; } }); } function safeParseNumber(rawValue) { @@ -21878,12 +21877,12 @@ function getOwnerDocument(elementOrElements) { var _element$ownerDocumen; var _normalizeToArray = normalizeToArray(elementOrElements), element = _normalizeToArray[0]; return element != null && (_element$ownerDocumen = element.ownerDocument) != null && _element$ownerDocumen.body ? element.ownerDocument : document; } - function isCursorOutsideInteractiveBorder(popperTreeData, event2) { - var clientX = event2.clientX, clientY = event2.clientY; + function isCursorOutsideInteractiveBorder(popperTreeData, event) { + var clientX = event.clientX, clientY = event.clientY; return popperTreeData.every(function(_ref) { var popperRect = _ref.popperRect, popperState = _ref.popperState, props = _ref.props; var interactiveBorder = props.interactiveBorder; var basePlacement = getBasePlacement2(popperState.placement); var offsetData = popperState.modifiersData.offset; @@ -21901,12 +21900,12 @@ return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight; }); } function updateTransitionEndListener(box, action, listener) { var method = action + "EventListener"; - ["transitionend", "webkitTransitionEnd"].forEach(function(event2) { - box[method](event2, listener); + ["transitionend", "webkitTransitionEnd"].forEach(function(event) { + box[method](event, listener); }); } function actualContains(parent, child) { var target = child; while (target) { @@ -22426,17 +22425,17 @@ getDocument().removeEventListener("mousemove", debouncedOnMouseMove); mouseMoveListeners = mouseMoveListeners.filter(function(listener) { return listener !== debouncedOnMouseMove; }); } - function onDocumentPress(event2) { + function onDocumentPress(event) { if (currentInput.isTouch) { - if (didTouchMove || event2.type === "mousedown") { + if (didTouchMove || event.type === "mousedown") { return; } } - var actualTarget = event2.composedPath && event2.composedPath()[0] || event2.target; + var actualTarget = event.composedPath && event.composedPath()[0] || event.target; if (instance.props.interactive && actualContains(popper2, actualTarget)) { return; } if (normalizeToArray(instance.props.triggerTarget || reference2).some(function(el) { return actualContains(el, actualTarget); @@ -22446,11 +22445,11 @@ } if (instance.state.isVisible && instance.props.trigger.indexOf("click") >= 0) { return; } } else { - invokeHook("onClickOutside", [instance, event2]); + invokeHook("onClickOutside", [instance, event]); } if (instance.props.hideOnClick === true) { instance.clearDelayTimeouts(); instance.hide(); didHideDueToDocumentMouseDown = true; @@ -22492,12 +22491,12 @@ function onTransitionedIn(duration, callback) { onTransitionEnd(duration, callback); } function onTransitionEnd(duration, callback) { var box = getDefaultTemplateChildren().box; - function listener(event2) { - if (event2.target === box) { + function listener(event) { + if (event.target === box) { updateTransitionEndListener(box, "remove", listener); callback(); } } if (duration === 0) { @@ -22554,41 +22553,41 @@ var node = _ref.node, eventType = _ref.eventType, handler3 = _ref.handler, options = _ref.options; node.removeEventListener(eventType, handler3, options); }); listeners = []; } - function onTrigger2(event2) { + function onTrigger2(event) { var _lastTriggerEvent; var shouldScheduleClickHide = false; - if (!instance.state.isEnabled || isEventListenerStopped(event2) || didHideDueToDocumentMouseDown) { + if (!instance.state.isEnabled || isEventListenerStopped(event) || didHideDueToDocumentMouseDown) { return; } var wasFocused = ((_lastTriggerEvent = lastTriggerEvent) == null ? void 0 : _lastTriggerEvent.type) === "focus"; - lastTriggerEvent = event2; - currentTarget = event2.currentTarget; + lastTriggerEvent = event; + currentTarget = event.currentTarget; handleAriaExpandedAttribute(); - if (!instance.state.isVisible && isMouseEvent(event2)) { + if (!instance.state.isVisible && isMouseEvent(event)) { mouseMoveListeners.forEach(function(listener) { - return listener(event2); + return listener(event); }); } - if (event2.type === "click" && (instance.props.trigger.indexOf("mouseenter") < 0 || isVisibleFromClick) && instance.props.hideOnClick !== false && instance.state.isVisible) { + if (event.type === "click" && (instance.props.trigger.indexOf("mouseenter") < 0 || isVisibleFromClick) && instance.props.hideOnClick !== false && instance.state.isVisible) { shouldScheduleClickHide = true; } else { - scheduleShow(event2); + scheduleShow(event); } - if (event2.type === "click") { + if (event.type === "click") { isVisibleFromClick = !shouldScheduleClickHide; } if (shouldScheduleClickHide && !wasFocused) { - scheduleHide(event2); + scheduleHide(event); } } - function onMouseMove(event2) { - var target = event2.target; + function onMouseMove(event) { + var target = event.target; var isCursorOverReferenceOrPopper = getCurrentTarget().contains(target) || popper2.contains(target); - if (event2.type === "mousemove" && isCursorOverReferenceOrPopper) { + if (event.type === "mousemove" && isCursorOverReferenceOrPopper) { return; } var popperTreeData = getNestedPopperTree().concat(popper2).map(function(popper3) { var _instance$popperInsta; var instance2 = popper3._tippy; @@ -22600,37 +22599,37 @@ props }; } return null; }).filter(Boolean); - if (isCursorOutsideInteractiveBorder(popperTreeData, event2)) { + if (isCursorOutsideInteractiveBorder(popperTreeData, event)) { cleanupInteractiveMouseListeners(); - scheduleHide(event2); + scheduleHide(event); } } - function onMouseLeave(event2) { - var shouldBail = isEventListenerStopped(event2) || instance.props.trigger.indexOf("click") >= 0 && isVisibleFromClick; + function onMouseLeave(event) { + var shouldBail = isEventListenerStopped(event) || instance.props.trigger.indexOf("click") >= 0 && isVisibleFromClick; if (shouldBail) { return; } if (instance.props.interactive) { - instance.hideWithInteractivity(event2); + instance.hideWithInteractivity(event); return; } - scheduleHide(event2); + scheduleHide(event); } - function onBlurOrFocusOut(event2) { - if (instance.props.trigger.indexOf("focusin") < 0 && event2.target !== getCurrentTarget()) { + function onBlurOrFocusOut(event) { + if (instance.props.trigger.indexOf("focusin") < 0 && event.target !== getCurrentTarget()) { return; } - if (instance.props.interactive && event2.relatedTarget && popper2.contains(event2.relatedTarget)) { + if (instance.props.interactive && event.relatedTarget && popper2.contains(event.relatedTarget)) { return; } - scheduleHide(event2); + scheduleHide(event); } - function isEventListenerStopped(event2) { - return currentInput.isTouch ? getIsCustomTouchBehavior() !== event2.type.indexOf("touch") >= 0 : false; + function isEventListenerStopped(event) { + return currentInput.isTouch ? getIsCustomTouchBehavior() !== event.type.indexOf("touch") >= 0 : false; } function createPopperInstance() { destroyPopperInstance(); var _instance$props2 = instance.props, popperOptions = _instance$props2.popperOptions, placement = _instance$props2.placement, offset2 = _instance$props2.offset, getReferenceClientRect = _instance$props2.getReferenceClientRect, moveTransition = _instance$props2.moveTransition; var arrow2 = getIsDefaultRenderFn() ? getChildren(popper2).arrow : null; @@ -22729,14 +22728,14 @@ } } function getNestedPopperTree() { return arrayFrom(popper2.querySelectorAll("[data-tippy-root]")); } - function scheduleShow(event2) { + function scheduleShow(event) { instance.clearDelayTimeouts(); - if (event2) { - invokeHook("onTrigger", [instance, event2]); + if (event) { + invokeHook("onTrigger", [instance, event]); } addDocumentPress(); var delay3 = getDelay(true); var _getNormalizedTouchSe = getNormalizedTouchSettings(), touchValue = _getNormalizedTouchSe[0], touchDelay = _getNormalizedTouchSe[1]; if (currentInput.isTouch && touchValue === "hold" && touchDelay) { @@ -22748,18 +22747,18 @@ }, delay3); } else { instance.show(); } } - function scheduleHide(event2) { + function scheduleHide(event) { instance.clearDelayTimeouts(); - invokeHook("onUntrigger", [instance, event2]); + invokeHook("onUntrigger", [instance, event]); if (!instance.state.isVisible) { removeDocumentPress(); return; } - if (instance.props.trigger.indexOf("mouseenter") >= 0 && instance.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(event2.type) >= 0 && isVisibleFromClick) { + if (instance.props.trigger.indexOf("mouseenter") >= 0 && instance.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(event.type) >= 0 && isVisibleFromClick) { return; } var delay3 = getDelay(false); if (delay3) { hideTimeout = setTimeout(function() { @@ -22928,17 +22927,17 @@ } } else { instance.unmount(); } } - function hideWithInteractivity(event2) { + function hideWithInteractivity(event) { if (true) { warnWhen(instance.state.isDestroyed, createMemoryLeakWarning("hideWithInteractivity")); } getDocument().addEventListener("mousemove", debouncedOnMouseMove); pushIfUnique(mouseMoveListeners, debouncedOnMouseMove); - debouncedOnMouseMove(event2); + debouncedOnMouseMove(event); } function unmount() { if (true) { warnWhen(instance.state.isDestroyed, createMemoryLeakWarning("unmount")); } @@ -23118,12 +23117,12 @@ if (instance.props.showOnCreate && !shownOnCreate) { shownOnCreate = true; prepareInstance(instance, references[0]); } }, - onTrigger: function onTrigger2(instance, event2) { - prepareInstance(instance, event2.currentTarget); + onTrigger: function onTrigger2(instance, event) { + prepareInstance(instance, event.currentTarget); } }; } }; var singleton = tippy(div(), Object.assign({}, removeProperties(optionalProps, ["overrides"]), { @@ -23234,14 +23233,14 @@ instance.setProps({ getReferenceClientRect: null }); isInternalUpdate = false; } - function onMouseMove(event2) { - var isCursorOverReference = event2.target ? reference2.contains(event2.target) : true; + function onMouseMove(event) { + var isCursorOverReference = event.target ? reference2.contains(event.target) : true; var followCursor2 = instance.props.followCursor; - var clientX = event2.clientX, clientY = event2.clientY; + var clientX = event.clientX, clientY = event.clientY; var rect = reference2.getBoundingClientRect(); var relativeX = clientX - rect.left; var relativeY = clientY - rect.top; if (isCursorOverReference || !instance.props.interactive) { instance.setProps({ @@ -23322,18 +23321,18 @@ if (!getIsInitialBehavior()) { addListener(); } } }, - onTrigger: function onTrigger2(_3, event2) { - if (isMouseEvent(event2)) { + onTrigger: function onTrigger2(_3, event) { + if (isMouseEvent(event)) { mouseCoords = { - clientX: event2.clientX, - clientY: event2.clientY + clientX: event.clientX, + clientY: event.clientY }; } - wasFocusEvent = event2.type === "focus"; + wasFocusEvent = event.type === "focus"; }, onHidden: function onHidden2() { if (instance.props.followCursor) { unsetGetReferenceClientRect(); removeListener(); @@ -23351,12 +23350,12 @@ // libs/tippy/plugins/hide_on_esc.js var hide_on_esc_default = hideOnEsc = { name: "hideOnEsc", defaultValue: true, fn({ hide: hide2 }) { - function onKeyDown(event2) { - if (event2.keyCode === 27) { + function onKeyDown(event) { + if (event.keyCode === 27) { hide2(); } } return { onShow() { @@ -23633,12 +23632,12 @@ } }, clearAutoDismiss() { clearTimeout(notification.dismissTimer); }, - clearFromQueue(event2) { - if (notification.type === event2.detail.type && notification.position === "fixed" && notification.id !== event2.detail.id && notification.queuePosition < event2.detail.queuePosition) { + clearFromQueue(event) { + if (notification.type === event.detail.type && notification.position === "fixed" && notification.id !== event.detail.id && notification.queuePosition < event.detail.queuePosition) { notification.dismiss(); } } }); setData(el, { notification }); @@ -23748,29 +23747,29 @@ if (this.dropdown) { this.dropdown.show(); } }, /* confirmation */ - checkConfirmation(event2) { + checkConfirmation(event) { if (!this.confirmed) { this.approving = true; - event2.preventDefault(); + event.preventDefault(); } }, - approveAndRun(event2) { + approveAndRun(event) { if (this.approving) { - event2.stopPropagation(); + event.stopPropagation(); this.confirmed = true; this.dropdown.trigger.click(); this.dropdown.hide(); this.confirmed = false; this.approving = false; } }, - cancelConfirmation(event2) { + cancelConfirmation(event) { if (this.approving) { - event2.stopPropagation(); + event.stopPropagation(); this.approving = false; this.dropdown.hide(); } }, /* state */ @@ -23914,12 +23913,12 @@ }, clear() { this.file = null; this.$dispatch("image-uploader:clear"); }, - handleDrop(event2) { - const files = event2.detail.files || event2.dataTransfer.files; + handleDrop(event) { + const files = event.detail.files || event.dataTransfer.files; this.handleFiles(files); }, handleFiles(files) { Array.from(files).forEach((file) => this.readFile(file)); }, @@ -23950,46 +23949,81 @@ }); var modal_default = CocoComponent("modal", () => { return { open: false, frame: null, + modal: null, options: ["dismissable", "closeOnSubmit"], init() { + this.modal = this; this.onFrameSubmitEnd = this.onFrameSubmitEnd.bind(this); this.frame = this.$el.closest("turbo-frame"); this.frame.addEventListener("turbo:submit-end", this.onFrameSubmitEnd); this.$nextTick(() => this.show()); }, show() { this.open = true; + setTimeout(() => { + this.$dispatch("modal:shown"); + }, 400); }, hide() { this.open = false; - setTimeout(() => this.clearFrame(), 100); + setTimeout(() => { + this.clearFrame(); + this.$dispatch("modal:hidden"); + }, 200); }, - dismiss(event2) { + dismiss(event) { if (this.$options.dismissable) this.hide(); }, + scrollTo(pos) { + this.$root.scrollTop = pos + this.contentOffsetTop; + }, clearFrame() { this.frame.removeAttribute("src"); this.frame.removeAttribute("complete"); this.frame.innerHTML = ""; }, - onFrameSubmitEnd() { + onFrameSubmitEnd(event) { if (this.$options.closeOnSubmit && event.detail.success) { this.hide(); } }, destroy() { this.frame.removeEventListener("turbo:submit-end", this.onFrameSubmitEnd); }, + get contentOffsetTop() { + return parseInt( + window.getComputedStyle(this.$refs.container).paddingTop, + 10 + ); + }, root: { "x-options": "options", "x-show": "open", "@keydown.escape.document": "dismiss", "@modal:hide.document": "hide" + }, + overlay: { + "x-show": "open", + "x-transition:enter": "overlay-enter", + "x-transition:enter-start": "overlay-enter-start", + "x-transition:enter-end": "overlay-enter-end", + "x-transition:leave": "overlay-leave", + "x-transition:leave-start": "overlay-leave-start", + "x-transition:leave-end": "overlay-leave-end" + }, + container: { + "x-show": "open", + "x-transition:enter": "container-enter", + "x-transition:enter-start": "container-enter-start", + "x-transition:enter-end": "container-enter-end", + "x-transition:leave": "container-leave", + "x-transition:leave-start": "container-leave-start", + "x-transition:leave-end": "container-leave-end" } }; }); // ../../components/coco/base/modal_dialog/modal_dialog.js @@ -24006,11 +24040,11 @@ if (this.frame) { this.frame.addEventListener("turbo:frame-load", this.onFrameLoad); } }, close() { - this.$dispatch("modal:hide"); + this.modal.hide(); }, onFrameLoad() { this.$focus.focus(this.firstInput); }, destroy() { @@ -24024,12 +24058,46 @@ ); } }; }); + // ../../components/coco/base/modal_lightbox/modal_lightbox.js + var modal_lightbox_exports = {}; + __export(modal_lightbox_exports, { + default: () => modal_lightbox_default + }); + var modal_lightbox_default = CocoComponent("modalLightbox", () => { + return { + loaded: false, + init() { + if (this.img.complete && this.img.naturalHeight !== 0) { + this.imageLoaded(); + } + }, + close() { + this.modal.hide(); + }, + imageLoaded() { + this.loaded = true; + this.$nextTick(() => { + const scrollTop = parseInt(this.img.dataset.scrollTop, 10); + if (!isNaN(scrollTop) && scrollTop !== 0) { + this.modal.scrollTo(scrollTop); + } + }); + }, + get img() { + return this.$refs.media.querySelector("img"); + }, + root: { + ":class": "{loaded}" + } + }; + }); + // import-glob:/Users/mark/Code/coveragebook/coco/app/assets/js/base|@baseComponents/**/*.js - var modules = [button_exports, dropdown_exports, icon_exports, image_uploader_exports, modal_exports, modal_dialog_exports]; + var modules = [button_exports, dropdown_exports, icon_exports, image_uploader_exports, modal_exports, modal_dialog_exports, modal_lightbox_exports]; var __default = modules; // base/components.js var components_default = registerComponents(__default); @@ -24164,12 +24232,12 @@ function formatHex(str) { return `#${str.toUpperCase().replace("#", "")}`; } // helpers/turbo_events.js - function wasSuccessful(event2) { - return getEventDetail(event2).success; + function wasSuccessful(event) { + return getEventDetail(event).success; } function getEventDetail(obj) { return obj instanceof CustomEvent ? obj.detail : obj; } @@ -24246,16 +24314,16 @@ Array.from(inputs).forEach((el) => getData(el).onResize()); }, setLayout(layout) { this.layout = layout; }, - handleImageDrop(event2) { + handleImageDrop(event) { this.dragging = false; if (this.bgImagePicker) { - this.bgImagePicker.handleExternalDrop(event2); + this.bgImagePicker.handleExternalDrop(event); } else { - event2.preventDefault(); + event.preventDefault(); } }, async save() { this.clearErrors(); this.saving = true; @@ -24313,13 +24381,13 @@ if (file && file instanceof File) { dataTransfer.items.add(file); } input.files = dataTransfer.files; }, - handleSlideClick(event2) { - if (Array.from(event2.target.classList).includes("slide-text")) { - event2.target.querySelector("textarea").focus(); + handleSlideClick(event) { + if (Array.from(event.target.classList).includes("slide-text")) { + event.target.querySelector("textarea").focus(); } }, get blankTextAreasList() { return ["title", "text1", "text2"].map((textareaName) => this[textareaName] === "" ? textareaName : "").join(" ").trim(); }, @@ -25705,12 +25773,12 @@ y3, 0 /* Start */ ); if (result !== false) { - SECONDARY_EVENTS.forEach(function(event2) { - document.addEventListener(event2, this$1, { passive: false }); + SECONDARY_EVENTS.forEach(function(event) { + document.addEventListener(event, this$1, { passive: false }); }); } break; case "mousemove": case "touchmove": @@ -25727,12 +25795,12 @@ x3, y3, 2 /* End */ ); - SECONDARY_EVENTS.forEach(function(event2) { - document.removeEventListener(event2, this$1, { passive: false }); + SECONDARY_EVENTS.forEach(function(event) { + document.removeEventListener(event, this$1, { passive: false }); }); break; } }; return IroComponentWrapper2; @@ -26392,11 +26460,11 @@ getPicker() { return getData( this.$root.querySelector("[data-role='image-picker'").firstElementChild ); }, - handleExternalDrop(event2) { - this.readFile(event2.dataTransfer.files[0]); + handleExternalDrop(event) { + this.readFile(event.dataTransfer.files[0]); }, readFile(file) { const reader = new FileReader(); reader.addEventListener("load", () => { this.selectedImage = {