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iBAAiB,QAAS1G,KAAK8V,cAExC9V,KAAKgW,kBACPhW,KAAKW,QAAQ+F,iBAAiB,WAAY1G,KAAK4V,aAGjD5V,KAAKiW,eAAiB,IAAIC,gBAAe,IAAMnL,YAAW,IAAM/K,KAAK+V,cACrE/V,KAAKiW,eAAeE,QAAQnW,KAAKW,QACnC,CAEAuK,UAAAA,GACEpI,SAAS2N,oBAAoB,QAASzQ,KAAK8V,cAC3ChT,SAAS2N,oBAAoB,WAAYzQ,KAAK4V,aAC9C5V,KAAKiW,eAAe/K,YACtB,CAIA2K,cAAAA,GACE7V,KAAKW,QAAQqQ,MAAMoF,SAAW,QAChC,CAEAL,OAAAA,GACE,GAAkC,OAA9B/V,KAAKW,QAAQ0V,aAAuB,OAExC,IAAIC,EAAaC,SAASC,iBAAiBxW,KAAKW,SAAS2V,YACzDtW,KAAKW,QAAQ8V,KAAO,EACpBzW,KAAKW,QAAQ8V,KAAOC,KAAKC,MAAM3W,KAAKW,QAAQiW,aAAeN,EAC7D,CAEAV,WAAAA,CAAY7V,GACO,SAAbA,EAAMmR,KACRnR,EAAMiC,gBAEV,E","sources":["webpack:///./app/javascript/controllers/admin/guard_controller.js","webpack:///./app/javascript/controllers/admin/trix_image_controller.js","webpack:///./app/javascript/controllers/shared/trix_align_text_controller.js","webpack:///./app/javascript/controllers/shared/trix_image_toolbar_controller.js","webpack:///./app/javascript/controllers/admin/popover_controller.js","webpack:///./app/javascript/controllers/shared/trix_image_link_controller.js","webpack:///./app/javascript/helpers/trix.js","webpack:///./app/javascript/controllers/shared/mux_upload_controller.js","webpack:///./app/javascript/controllers/shared/sortable_controller.js","webpack:///./app/javascript/controllers/shared/toast_controller.js","webpack:///./app/javascript/controllers/shared/reload_controller.js","webpack:///./app/javascript/controllers/shared/toggle_controller.js","webpack:///./app/javascript/controllers/admin/file_size_controller.js","webpack:///./app/javascript/controllers/admin/trix_video_embed_controller.js","webpack:///./app/javascript/controllers/shared/fade_out_controller.js","webpack:///./app/javascript/controllers/admin/unsaved_changes_controller.js","webpack:///./app/javascript/controllers/admin/checkboxes_controller.js","webpack:///./app/javascript/controllers/admin/preview_controller.js","webpack:///./app/javascript/controllers/shared/tooltip_controller.js","webpack:///./app/javascript/controllers/shared/display_controller.js","webpack:///./app/javascript/controllers/shared/video_upload_form_controller.js","webpack:///./app/javascript/controllers/admin/color_picker_controller.js","webpack:///./app/javascript/controllers/shared/touch_sortable_controller.js","webpack:///./app/javascript/helpers/http.js","webpack:///./app/javascript/helpers/index.js","webpack:///./app/javascript/controllers/shared/expandable_text_area_controller.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"dependent\", \"required\"]\n\n clear(event) {\n this.dependentTargets.forEach(input => {\n if (!event.currentTarget.checked) input.checked = false\n })\n }\n\n require(event) {\n this.requiredTargets.forEach(input => {\n if (event.currentTarget.checked) input.checked = true\n })\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { toast } from \"../shared/toast_controller\"\n\nexport default class extends Controller {\n static classes = [\"highlight\"]\n static values = { constraints: Object }\n\n toggleHighlight() {\n this.element.classList.toggle(this.highlightClass)\n }\n\n removeHighlight() {\n this.element.classList.remove(this.highlightClass)\n }\n\n rejectLocalFiles(event) {\n const url = event.attachment.getAttribute(\"url\")\n\n if (url && !url.startsWith(\"http\")) {\n event.attachment.remove()\n }\n }\n\n validate(event) {\n const file = event.file\n\n this.validateType(file)\n this.validateSize(file)\n\n this.removeHighlight()\n }\n\n validateType(file) {\n const constraint = this.constraintsValue.fileType\n\n if (!constraint.inclusion.includes(file.type)) {\n event.preventDefault()\n toast(this.element, \"error\", constraint.message)\n }\n }\n\n validateSize(file) {\n const constraint = this.constraintsValue.fileSize\n\n if (file.size > constraint.maximum) {\n event.preventDefault()\n toast(this.element, \"error\", constraint.message)\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n addAlignmentButtons({ target }) {\n const buttonRow = target.toolbarElement.querySelector(\"[data-trix-button-group='block-tools']\")\n\n if (!buttonRow.querySelector(\"button[data-trix-attribute='alignLeft']\")) buttonRow.appendChild(this.#alignmentButton(\"Left\"))\n if (!buttonRow.querySelector(\"button[data-trix-attribute='alignCenter']\")) buttonRow.appendChild(this.#alignmentButton(\"Center\"))\n if (!buttonRow.querySelector(\"button[data-trix-attribute='alignRight']\")) buttonRow.appendChild(this.#alignmentButton(\"Right\"))\n }\n\n #alignmentButton(alignment) {\n const button = document.createElement(\"button\")\n\n button.type = \"button\"\n button.classList.add(\"trix-button\", \"trix-button--icon\", `trix-button--icon-align-${alignment.toLowerCase()}`)\n button.setAttribute(\"data-trix-attribute\", `align${alignment}`)\n button.tabIndex = \"-1\"\n button.title = `Align ${alignment}`\n button.textContent = `Align ${alignment}`\n\n return button\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport http from \"helpers/http\"\n\nexport default class extends Controller {\n static values = { elementHtml: String }\n\n showLinkButton({ toolbar, attachment }) {\n const contentType = attachment.getContentType()\n if (!contentType || !contentType.startsWith('image/')) return\n\n toolbar.querySelector(\".trix-button-row > span.trix-button-group\").appendChild(this.#linkElement(attachment.id))\n }\n\n #linkElement(attachmentId) {\n const tempContainer = document.createElement('div')\n tempContainer.innerHTML = this.elementHtmlValue\n\n const element = tempContainer.firstElementChild\n element.dataset.trixImageLinkAttachmentIdValue = attachmentId\n\n return element\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n hide() {\n this.element.hidePopover()\n }\n\n submit(event) {\n if (event.detail.success) {\n this.hide()\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"input\", \"dialog\"]\n static values = { attachmentId: Number }\n\n connect() {\n this.attachment = this.element.closest(\"trix-editor\").editor.getDocument().getAttachmentById(this.attachmentIdValue)\n this.#importAttachmentHref()\n }\n\n openDialog() {\n this.dialogTarget.showModal()\n this.inputTarget.required = true\n }\n\n reset() {\n this.#validInput()\n this.#importAttachmentHref()\n this.#close()\n }\n\n link() {\n if (this.inputTarget.checkValidity()) {\n this.attachment.setAttributes({ href: this.inputTarget.value })\n this.#validInput()\n this.#close()\n } else {\n this.inputTarget.classList.add(this.invalidInputBg)\n }\n }\n\n unlink() {\n this.attachment.setAttributes({ href: null })\n this.inputTarget.value = \"\"\n this.#close()\n }\n\n #close() {\n this.dialogTarget.close()\n this.inputTarget.required = false\n }\n\n #importAttachmentHref() {\n if (this.attachment.hasAttribute(\"href\"))\n this.inputTarget.value = this.attachment.getHref()\n }\n\n #validInput() {\n this.inputTarget.classList.remove(this.invalidInputBg)\n }\n\n get invalidInputBg() {\n return \"bg-[#ffdddd]\"\n }\n}\n","class AlignElement extends HTMLElement {\n}\n\nclass AlignLeftElement extends AlignElement {\n}\n\nclass AlignCenterElement extends AlignElement {\n}\n\nclass AlignRightElement extends AlignElement {\n}\n\nexport const registerCustomAlignElements = () => {\n window.customElements.define(\"align-left\", AlignLeftElement)\n window.customElements.define(\"align-center\", AlignCenterElement)\n window.customElements.define(\"align-right\", AlignRightElement)\n}\n\nexport const configureTrixAlignmentAttributes = () => {\n document.addEventListener(\"trix-before-initialize\", (event) => {\n if (!event.target.dataset.controller?.includes(\"trix-align-text\")) return\n\n const alignConfig = {\n nestable: false,\n exclusive: true,\n }\n\n Trix.config.blockAttributes.alignLeft = { ...alignConfig, tagName: \"align-left\" }\n Trix.config.blockAttributes.alignCenter = { ...alignConfig, tagName: \"align-center\" }\n Trix.config.blockAttributes.alignRight = { ...alignConfig, tagName: \"align-right\" }\n\n // https://github.com/basecamp/trix#html-sanitization\n Trix.config.dompurify.ADD_TAGS = [ \"align-left\", \"align-center\", \"align-right\" ]\n\n Trix.config.blockAttributes.heading1.terminal = false\n })\n}\n\nexport const configureTrixUrlPlaceholder = () => {\n document.addEventListener(\"trix-before-initialize\", () => {\n Trix.config.lang.urlPlaceholder = \"Enter a URL starting with either https:// or http://\"\n })\n}\n","import \"@mux/mux-uploader\"\nimport { Controller } from \"@hotwired/stimulus\"\nimport http from \"helpers/http\"\n\nexport default class extends Controller {\n static targets = [\"uploader\"]\n static values = { directUploadEndpoint: String, maximumDuration: Number }\n\n connect() {\n this.uploaderTarget.endpoint = this.#directUploadEndpoint.bind(this)\n this.uploaderTarget.addEventListener(\"success\", this.#success.bind(this))\n\n this.uploaderTarget.addEventListener(\"file-ready\", this.#validateFile.bind(this))\n\n this.uploaderTarget.addEventListener(\"uploadstart\", () => this.dispatch(\"start\"))\n\n this.uploaderTarget.addEventListener(\"uploaderror\", () => this.dispatch(\"done\"))\n this.uploaderTarget.addEventListener(\"success\", () => this.dispatch(\"done\"))\n this.uploaderTarget.addEventListener(\"reset\", () => this.dispatch(\"done\"))\n }\n\n cancelUpload() {\n this.uploaderTarget.paused = true\n this.uploaderTarget.dispatchEvent(new Event(\"reset\"))\n }\n\n #directUploadEndpoint() {\n return http.post(this.directUploadEndpointValue).json().then(json => {\n this.videoId = json.video_id\n return json.direct_upload_url\n }).catch(_error => {\n this.#fail(\"upload-failed\")\n })\n }\n\n #success() {\n this.dispatch(\"success\", { detail: { videoId: this.videoId } })\n }\n\n #validateFile(event) {\n const file = event.detail\n\n if (!file.type.startsWith(\"video/\"))\n this.#fail(\"invalid-file-type\")\n\n if (this.hasMaximumDurationValue)\n this.#validateVideoDuration(file)\n }\n\n #validateVideoDuration(file) {\n const video = document.createElement('video')\n\n video.addEventListener(\"loadedmetadata\", () => {\n window.URL.revokeObjectURL(video.src)\n const duration = video.duration\n\n if (duration && duration > this.maximumDurationValue) {\n this.#fail(\"video-too-long\")\n }\n })\n\n video.preload = 'metadata'\n video.src = URL.createObjectURL(file)\n }\n\n #fail(reason) {\n this.dispatch(\"fail\", { detail: { reason: reason } })\n this.cancelUpload()\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"item\"]\n\n itemTargetConnected() {\n this.updatePositions()\n }\n\n updatePositions() {\n let changed = false\n\n this.itemTargets.forEach(function(item, index) {\n const currentPosition = String(index)\n const positionInput = item.querySelector(\"[name*='position']\")\n\n if (positionInput && positionInput.value !== currentPosition) {\n positionInput.value = currentPosition\n changed = true\n }\n })\n\n if (changed) this.notifyPositionUpdate()\n }\n\n notifyPositionUpdate() {\n const event = new Event(\"position-updated\", { bubbles: true })\n this.element.dispatchEvent(event)\n }\n\n itemFor(element) {\n return element.closest(`[data-${this.controllerName}-target~=\"item\"]`)\n }\n\n get controllerName() {\n return this.context.scope.identifier\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"toast\"]\n\n render(event) {\n const { message, type, delay } = event.detail\n\n this.toastTarget.textContent = message\n this.toastTarget.classList.add(\"active\", type)\n\n this.timeout = setTimeout(() => {\n clearTimeout(this.timeout)\n this.toastTarget.textContent = \"\"\n this.toastTarget.classList.remove(\"active\", type)\n }, delay)\n }\n}\n\nexport function toast(element, type, message, delay = 4000) {\n const event = new CustomEvent(\"toast\", {\n bubbles: true,\n detail: { message: message, type: type, delay: delay }\n })\n\n element.dispatchEvent(event)\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = {\n delay: Number,\n src: String\n }\n\n connect() {\n this.timeout = setTimeout(this.#reload.bind(this), this.delayValue)\n }\n\n disconnect() {\n clearTimeout(this.timeout)\n }\n\n #reload() {\n const frame = this.element.closest(\"turbo-frame\")\n\n if (this.hasSrcValue && frame.src === null) {\n frame.src = this.srcValue\n } else {\n frame.reload()\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n static targets = [ \"toggleable\" ]\n static classes = [ \"toggle\" ]\n\n toggle(event) {\n this.toggleableTargets.forEach((target) => {\n target.classList.toggle(this.toggleClass)\n });\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = { maxSize: Number }\n\n validate(event) {\n const file = event.target.files[0]\n\n if (file.size > this.maxSizeValue) {\n event.preventDefault()\n event.stopImmediatePropagation()\n\n this.element.value = null\n\n alert(`Maximum allowed file size is ${this.#sizeInMegabytes(this.maxSizeValue)}. Please choose a smaller file.`)\n }\n }\n\n #sizeInMegabytes(bytes) {\n const megabytes = bytes / (1024 * 1024)\n\n return `${megabytes} MB`\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport Trix from \"trix\";\nimport getVideoId from \"get-video-id\";\nimport { toast } from \"../shared/toast_controller\"\nimport http from \"helpers/http\"\n\nconst VIDEO_PROVIDERS_REGEX = /youtube.com|youtu.be|vimeo.com/i\n\nexport default class extends Controller {\n handlePaste(event) {\n try {\n const pastedText = event.paste.string\n const url = new URL(pastedText)\n\n if (url.hostname.match(VIDEO_PROVIDERS_REGEX)) {\n const { id, service } = getVideoId(pastedText)\n\n if (!id) {\n throw \"Failed to find a valid ID from the video URL\"\n }\n\n const data = {\n video_embed: {\n video_id: id,\n source: service,\n video_url: service === \"vimeo\" ? pastedText : null\n }\n }\n\n this.fetchThumbnailAndHandleEmbed(data, event.paste.range)\n }\n } catch (error) {\n // Do nothing if the pasted text cannot be embedded as a video\n return\n }\n }\n\n fetchThumbnailAndHandleEmbed(data, range) {\n http.post(\"/admin/video_embeds\", { json: data })\n .json()\n .then(data => {\n this.element.editor.insertAttachment(new Trix.Attachment(data))\n this.element.editor.setSelectedRange(range)\n this.element.editor.deleteInDirection(\"backward\")\n })\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n connect() {\n setTimeout(() => this.fadeOut(), 4000)\n }\n\n fadeOut() {\n this.element.ontransitionend = () => this.element.remove()\n this.element.classList.add(\"fade-out\")\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = { hasChanges: Boolean }\n\n update(event) {\n // Check canUndo() to ignore trix-change events during page load\n // https://github.com/basecamp/trix/issues/895\n if (event.type === \"trix-change\" && !event.target.editor.canUndo()) return\n\n this.hasChangesValue = true\n }\n\n preventVisit(event) {\n if (this.hasChangesValue) {\n if (!confirm(\"You have unsaved changes. Are you sure you want to leave?\")) {\n event.preventDefault()\n }\n }\n }\n\n preventUnload(event) {\n if (this.hasChangesValue) event.preventDefault()\n }\n\n reset() {\n this.hasChangesValue = false\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"parent\", \"child\"]\n\n connect() {\n this.updateParent()\n }\n\n change(event) {\n if (event.target === this.parentTarget) {\n this.childTargets.forEach(child => child.checked = event.target.checked)\n } else {\n this.updateParent()\n }\n }\n\n updateParent() {\n const count = this.childTargets.reduce((count, child) => count += child.checked, 0)\n\n this.parentTarget.checked = count > 0\n this.parentTarget.indeterminate = (count > 0 && count < this.childTargets.length)\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport http from \"helpers/http\"\n\nexport default class extends Controller {\n static targets = [\"input\", \"output\"]\n static values = { url: String }\n\n load(event) {\n const formData = new FormData()\n\n this.inputTargets.forEach(input => {\n formData.append(input.name, input.type === \"checkbox\" ? input.checked : input.value)\n })\n\n http.post(this.urlValue, { body: formData, searchParams: event.params }).text().then(html => {\n if (this.hasOutputTarget) {\n this.outputTarget.innerHTML = html\n } else {\n Turbo.renderStreamMessage(html)\n }\n })\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport tippy from \"tippy.js\";\n\nexport default class extends Controller {\n static values = { \n content: String,\n templateId: String,\n appendToParent: Boolean,\n hideArrow: Boolean,\n placement: String\n }\n\n connect() {\n const settings = {\n allowHTML: true,\n content: this.contentValue,\n arrow: this.hideArrowValue ? false : true,\n placement: this.placementValue || 'top',\n appendTo: this.appendToParentValue ? \"parent\" : document.body,\n }\n\n if (this.templateIdValue) {\n settings['arrow'] = false\n settings['appendTo'] = document.body,\n settings['content'] = document.getElementById(this.templateIdValue).innerHTML\n settings['interactive'] = true\n settings['theme'] = 'html'\n }\n\n tippy(this.element, settings)\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nconst ATTRIBUTES = {\n \"data-display-if-target\": true,\n \"data-display-unless-target\": false\n}\n\nexport default class extends Controller {\n static target = [\"insert\"]\n\n insertTargetConnected(element) {\n if (this.listener) this.#sync(element)\n }\n\n connect() {\n this.listener = this.update.bind(this)\n this.element.addEventListener(\"change\", this.listener)\n\n this.#sync(this.element)\n }\n\n disconnect() {\n this.element.removeEventListener(\"change\", this.listener)\n }\n\n update(event) {\n const targets = this.element.querySelectorAll(`[name=\"${event.target.name}\"]`)\n\n for (const attribute of Object.keys(ATTRIBUTES)) {\n targets.forEach(target => {\n this.element.querySelectorAll(`[${attribute}~=\"${target.id}\"]`).forEach(child => {\n this.#toggle(child, target, attribute)\n })\n })\n }\n }\n\n #sync(element) {\n for (const attribute of Object.keys(ATTRIBUTES)) {\n element.querySelectorAll(`[${attribute}]`).forEach(child => {\n const targets = this.#targets(child, attribute)\n\n targets.forEach(target => this.#toggle(child, target, attribute))\n })\n }\n }\n\n #toggle(element, target, attribute) {\n const show = this.#compare(element, target, attribute)\n const className = this.#option(element, target, attribute, \"class\")\n\n if (className) {\n element.classList.toggle(className, show)\n } else {\n element.style.display = show ? \"\" : \"none\"\n }\n }\n\n #compare(element, target, attribute) {\n const value = this.#option(element, target, attribute, \"value\")\n\n let match\n\n if (target.type === \"checkbox\" || target.type === \"radio\") {\n match = target.checked\n } else {\n match = target.value === value\n }\n\n return ATTRIBUTES[attribute] ? match : !match\n }\n\n #option(element, target, attribute, key) {\n const value = element.getAttribute(attribute.replace(\"target\", key))\n\n try {\n const json = JSON.parse(value)\n\n if (typeof json === \"object\") {\n return json[target.id]\n } else {\n return value\n }\n } catch {\n return value\n }\n }\n\n #targets(element, attribute) {\n return element.getAttribute(attribute).split(\" \").reduce((array, id) => {\n const target = this.element.querySelector(`#${id}`)\n\n if (target) {\n array.push(target)\n } else {\n console.error(`Missing ${attribute} ${id}:`, element)\n }\n\n return array\n }, [])\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { toast } from \"../shared/toast_controller\"\n\nconst ERROR_MESSAGES = {\n \"generic\": \"We couldn't upload your video. Please try a different file.\",\n \"invalid-file-type\": \"Video file not recognized. Please upload a valid video file\",\n \"upload-failed\": \"There was an unknown error uploading your video. Please try again.\",\n \"video-too-long\": \"Your video is too long. Please upload a shorter video\"\n}\n\nexport default class extends Controller {\n static targets = [\"destroy\", \"frame\", \"input\", \"uploaderContainer\"]\n static values = { videoUrl: String }\n\n uploaded({ detail: { videoId } }) {\n this.videoId = videoId\n this.destroyTarget.value = false\n this.frame.src = this.videoUrlValue.replace(\":video_id\", videoId)\n this.hideUploader()\n this.showFrame()\n this.dispatch(\"attached\")\n }\n\n uploadFailed({ detail: { reason } }) {\n toast(this.element, \"error\", this.#errorMessage(reason), 10000)\n }\n\n remove() {\n this.destroyTarget.value = true\n this.#clearFrame()\n this.#resetUploader()\n this.hideFrame()\n this.showUploader()\n this.dispatch(\"detached\")\n }\n\n showUploader() {\n this.uploaderContainerTarget.classList.remove(\"!hidden\")\n }\n\n hideUploader() {\n this.uploaderContainerTarget.classList.add(\"!hidden\")\n }\n\n showFrame() {\n this.frameTarget.classList.remove(\"!hidden\")\n }\n\n hideFrame() {\n this.frameTarget.classList.add(\"!hidden\")\n }\n\n #clearFrame() {\n this.frame.innerHTML = \"\"\n }\n\n #resetUploader() {\n this.uploaderContainerTarget.querySelector(\"mux-uploader\").dispatchEvent(new Event(\"reset\"))\n }\n\n #errorMessage(reason) {\n return ERROR_MESSAGES[reason] || ERROR_MESSAGES[\"generic\"]\n }\n\n get frame() {\n return this.frameTarget.querySelector(\"turbo-frame\")\n }\n\n set videoId(value) {\n this.inputTarget.value = value\n this.inputTarget.dispatchEvent(new Event(\"change\", { bubbles: true }))\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { debounce } from \"lodash\"\n\nconst HEX_COLOR_PATTERN = /^#[0-9a-fA-F]{6}$/\n\nexport default class extends Controller {\n static targets = [\"input\", \"sample\"]\n static values = {\n default: String,\n attribute: String\n }\n\n input(event) {\n const { value } = event.target\n\n if (HEX_COLOR_PATTERN.test(value)) {\n this.#color = value\n }\n }\n\n reset(event) {\n this.#color = this.defaultValue\n }\n\n set #color(value) {\n this.inputTargets.forEach(input => input.value = value)\n this.sampleTarget.style.backgroundColor = value\n this.#broadcast(value)\n }\n\n #broadcast = debounce(value => {\n this.dispatch(\"change\", {\n detail: {\n default: value === this.defaultValue\n }\n })\n }, 100)\n}\n","import SortableController from \"./sortable_controller\"\n\nexport default class extends SortableController {\n static targets = [\"item\"]\n\n moveBack(event) {\n event.preventDefault()\n let item = this.itemFor(event.currentTarget)\n let previousItem = this.previousSibling(item)\n\n if(previousItem) {\n item.insertAdjacentElement('afterend', previousItem)\n this.updatePositions()\n }\n }\n\n moveForward(event) {\n event.preventDefault()\n let item = this.itemFor(event.currentTarget)\n let nextItem = this.nextSibling(item)\n\n if(nextItem) {\n item.insertAdjacentElement('beforebegin', nextItem)\n this.updatePositions()\n }\n }\n\n // private\n\n previousSibling(item) {\n let previousItem\n\n for(let i = 0; i < this.itemTargets.length; i++) {\n if(item.isEqualNode(this.itemTargets[i])) {\n return previousItem\n }\n previousItem = this.itemTargets[i]\n }\n }\n\n nextSibling(item) {\n for(let i = 0; i < this.itemTargets.length; i++) {\n if(item.isEqualNode(this.itemTargets[i])) {\n return this.itemTargets[i+1]\n }\n }\n }\n}\n","import { getMetaValue } from \"helpers\"\nimport ky from \"ky\"\n\nexport default ky.extend({\n hooks: {\n beforeRequest: [\n request => {\n request.headers.set(\"X-CSRF-Token\", getMetaValue(\"csrf-token\"))\n }\n ]\n },\n retry: 0\n})\n","import formDataEntries from \"form-data-entries\"\n\nconst EMOJI_FLAG_OFFSET = 127397\n\nconst RAILS_FIELD_NAME = /([a-z_]+)\\[([a-z_]+)\\]/\n\nexport function focusWithin(element) {\n element.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])').focus()\n}\n\nexport function generateFlagEmoji(country) {\n return country.replace(/[A-Z]/g, char =>\n String.fromCodePoint(char.charCodeAt(0) + EMOJI_FLAG_OFFSET)\n )\n}\n\nexport function getSearchParam(name) {\n const searchParams = new URLSearchParams(document.location.search)\n return searchParams.get(name)\n}\n\nexport function getMetaValue(name) {\n const element = document.head.querySelector(`meta[name=\"${name}\"]`)\n if(element) {\n return element.getAttribute(\"content\")\n }\n}\n\nexport function getOrdinal(number) {\n return `${ number }${ [,'st','nd','rd'][number / 10%10^1 && number%10] || 'th' }`\n}\n\nexport function serializeForm(form) {\n let formData = {}\n\n for (let [name, value] of formDataEntries(form)) {\n let result = name.match(RAILS_FIELD_NAME)\n\n if (result) {\n let [, model, attribute] = result\n formData[model] = formData[model] || {}\n formData[model][attribute] = value\n } else {\n formData[name] = value\n }\n }\n\n return formData\n}\n\nexport function selectedOptions(options) {\n return options\n .filter(option => option.checked)\n .map(option => option.labels[0].textContent)\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = { ignoreEnter: Boolean }\n\n connect() {\n this.hideScrollbars()\n\n this.inputHandler = this.setRows.bind(this)\n this.element.addEventListener(\"input\", this.inputHandler)\n\n if (this.ignoreEnterValue) {\n this.element.addEventListener(\"keypress\", this.ignoreEnter)\n }\n\n this.resizeObserver = new ResizeObserver(() => setTimeout(() => this.setRows()))\n this.resizeObserver.observe(this.element)\n }\n\n disconnect() {\n document.removeEventListener(\"input\", this.inputHandler)\n document.removeEventListener(\"keypress\", this.ignoreEnter)\n this.resizeObserver.disconnect()\n }\n\n // private\n\n hideScrollbars() {\n this.element.style.overflow = \"hidden\"\n }\n\n setRows() {\n if (this.element.offsetParent === null) return // Skip if hidden\n\n let lineHeight = parseInt(getComputedStyle(this.element).lineHeight)\n this.element.rows = 1\n this.element.rows = Math.floor(this.element.scrollHeight / lineHeight)\n }\n\n ignoreEnter(event) {\n if (event.key == \"Enter\") {\n event.preventDefault()\n }\n }\n}\n"],"names":["Controller","static","clear","event","this","dependentTargets","forEach","input","currentTarget","checked","require","requiredTargets","constraints","Object","toggleHighlight","element","classList","toggle","highlightClass","removeHighlight","remove","rejectLocalFiles","url","attachment","getAttribute","startsWith","validate","file","validateType","validateSize","constraint","constraintsValue","fileType","inclusion","includes","type","preventDefault","toast","message","fileSize","size","maximum","addAlignmentButtons","target","buttonRow","toolbarElement","querySelector","appendChild","alignment","button","document","createElement","add","toLowerCase","setAttribute","tabIndex","title","textContent","elementHtml","String","showLinkButton","toolbar","contentType","getContentType","id","attachmentId","tempContainer","innerHTML","elementHtmlValue","firstElementChild","dataset","trixImageLinkAttachmentIdValue","hide","hidePopover","submit","detail","success","Number","connect","closest","editor","getDocument","getAttachmentById","attachmentIdValue","openDialog","dialogTarget","showModal","inputTarget","required","reset","link","checkValidity","setAttributes","href","value","invalidInputBg","unlink","close","hasAttribute","getHref","AlignElement","HTMLElement","AlignLeftElement","AlignCenterElement","AlignRightElement","registerCustomAlignElements","window","customElements","define","configureTrixAlignmentAttributes","addEventListener","controller","alignConfig","nestable","exclusive","Trix","config","blockAttributes","alignLeft","tagName","alignCenter","alignRight","dompurify","ADD_TAGS","heading1","terminal","configureTrixUrlPlaceholder","lang","urlPlaceholder","directUploadEndpoint","maximumDuration","uploaderTarget","endpoint","bind","dispatch","cancelUpload","paused","dispatchEvent","Event","http","post","directUploadEndpointValue","json","then","videoId","video_id","direct_upload_url","catch","_error","hasMaximumDurationValue","video","URL","revokeObjectURL","src","duration","maximumDurationValue","preload","createObjectURL","reason","itemTargetConnected","updatePositions","changed","itemTargets","item","index","currentPosition","positionInput","notifyPositionUpdate","bubbles","itemFor","controllerName","context","scope","identifier","delay","CustomEvent","render","toastTarget","timeout","setTimeout","clearTimeout","delayValue","disconnect","frame","hasSrcValue","srcValue","reload","toggleableTargets","toggleClass","maxSize","files","maxSizeValue","stopImmediatePropagation","alert","bytes","VIDEO_PROVIDERS_REGEX","handlePaste","pastedText","paste","string","hostname","match","service","getVideoId","data","video_embed","source","video_url","fetchThumbnailAndHandleEmbed","range","error","insertAttachment","Attachment","setSelectedRange","deleteInDirection","fadeOut","ontransitionend","hasChanges","Boolean","update","canUndo","hasChangesValue","preventVisit","confirm","preventUnload","updateParent","change","parentTarget","childTargets","child","count","reduce","indeterminate","length","load","formData","FormData","inputTargets","append","name","urlValue","body","searchParams","params","text","html","hasOutputTarget","outputTarget","Turbo","renderStreamMessage","content","templateId","appendToParent","hideArrow","placement","settings","allowHTML","contentValue","arrow","hideArrowValue","placementValue","appendTo","appendToParentValue","templateIdValue","getElementById","tippy","ATTRIBUTES","insertTargetConnected","listener","removeEventListener","targets","querySelectorAll","attribute","keys","show","className","style","display","key","replace","JSON","parse","split","array","push","console","ERROR_MESSAGES","videoUrl","uploaded","destroyTarget","videoUrlValue","hideUploader","showFrame","uploadFailed","hideFrame","showUploader","uploaderContainerTarget","frameTarget","HEX_COLOR_PATTERN","default","test","defaultValue","sampleTarget","backgroundColor","debounce","SortableController","moveBack","previousItem","previousSibling","insertAdjacentElement","moveForward","nextItem","nextSibling","i","isEqualNode","ky","extend","hooks","beforeRequest","request","headers","set","getMetaValue","retry","EMOJI_FLAG_OFFSET","RAILS_FIELD_NAME","focusWithin","focus","generateFlagEmoji","country","char","fromCodePoint","charCodeAt","getSearchParam","URLSearchParams","location","search","get","head","getOrdinal","number","serializeForm","form","formDataEntries","result","model","selectedOptions","options","filter","option","map","labels","ignoreEnter","hideScrollbars","inputHandler","setRows","ignoreEnterValue","resizeObserver","ResizeObserver","observe","overflow","offsetParent","lineHeight","parseInt","getComputedStyle","rows","Math","floor","scrollHeight"],"sourceRoot":""}