{"version":3,"file":"fields.umd.js","sources":["../../../node_modules/@stimulus/webpack-helpers/dist/index.js","../../javascript/controllers/fields/button_toggle_controller.js","../../javascript/controllers/fields/cloudinary_image_controller.js","../../javascript/controllers/fields/color_picker_controller.js","../../javascript/controllers/fields/date_controller.js","../../javascript/controllers/fields/file_field_controller.js","../../javascript/controllers/fields/phone_controller.js","../../javascript/controllers/fields/super_select_controller.js","../../javascript/controllers/index.js","../../javascript/trix_editor.js"],"sourcesContent":["export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"shadowField\" ]\n\n clickShadowField(event) {\n // we have to stop safari from doing what we originally expected.\n event.preventDefault();\n\n // then we need to manually click the hidden checkbox or radio button ourselves.\n this.shadowFieldTarget.click()\n }\n}","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"uploadButton\", \"hiddenField\", \"thumbnail\" ]\n static values = { \n signaturesUrl: String,\n height: Number,\n width: Number,\n cloudName: String,\n apiKey: String,\n googleApiKey: String,\n urlFormat: String,\n sources: String,\n searchByRights: Boolean\n }\n static classes = [ \"thumbnailShown\" ]\n\n pickImageAndUpload(event) {\n // don't submit the form.\n event.preventDefault()\n\n // prepare the list of default sources a user can upload an image from.\n var defaultSources = ['local', 'url', 'camera']\n if (this.hasGoogleApiKeyValue) {\n defaultSources.push('image_search')\n }\n\n // configure cloudinary's uploader's options.\n // many of these are configurable at the point where the `shared/fields/cloudinary_image` partial is included.\n var options = {\n cloud_name: this.cloudNameValue,\n apiKey: this.apiKeyValue,\n upload_preset: this.uploadPresetValue,\n upload_signature: this.getCloudinarySignature.bind(this),\n multiple: false,\n sources: this.hasSourcesValue ? this.sourcesValue.split(',') : defaultSources,\n search_by_rights: this.hasSearchByRightsValue && this.searchByRightsValue === false ? false : true // default to true.\n }\n \n if (this.hasGoogleApiKeyValue) {\n options['google_api_key'] = this.googleApiKeyValue\n }\n \n // open cloudinary's upload widget.\n cloudinary.openUploadWidget(options, this.handleWidgetResponse.bind(this))\n }\n \n clearImage(event) {\n // don't submit the form.\n event.preventDefault()\n\n // clear the cloudinary id.\n this.hiddenFieldTarget.value = null\n \n // remove any existing image from the button.\n this.removeThumbnail()\n }\n \n getCloudinarySignature(callback, paramsToSign) {\n $.ajax({\n url: this.signaturesUrlValue,\n type: \"GET\",\n dataType: \"text\",\n data: {data: paramsToSign},\n complete: function() { console.log(\"complete\") },\n success: function(signature, textStatus, xhr) { callback(signature) },\n error: function(xhr, status, error) { console.log(xhr, status, error) }\n })\n }\n \n handleWidgetResponse(error, response) {\n // after the user has successfully uploaded a single file ..\n if (!error && response && response.event === \"success\") { \n const data = response.info\n \n // update the cloudinary id field in the form.\n this.hiddenFieldTarget.value = data.public_id\n\n // remove any existing image.\n this.removeThumbnail()\n\n // generate a new image preview url.\n this.addThumbnail(this.urlFormatValue.replace('CLOUDINARY_ID', data.public_id))\n }\n }\n \n addThumbnail(url) {\n var $imageElement = $(``)\n $(this.uploadButtonTarget).prepend($imageElement)\n\n // mark the image as present.\n this.uploadButtonTarget.classList.add(this.thumbnailShownClass)\n }\n \n removeThumbnail() {\n if (!this.hasThumbnailTarget) { return }\n this.uploadButtonTarget.removeChild(this.thumbnailTarget)\n this.uploadButtonTarget.classList.remove(this.thumbnailShownClass)\n }\n}\n","import { Controller } from \"stimulus\"\nimport '@simonwep/pickr/dist/themes/monolith.min.css'\n\nimport Pickr from '@simonwep/pickr';\n\nexport default class extends Controller {\n static targets = [ \"colorPickerValue\", \"colorField\", \"colorInput\", \"userSelectedColor\", \"colorOptions\" ];\n static values = { initialColor: String }\n\n connect() {\n this.initPluginInstance()\n this.colorOptions = $(this.colorOptionsTarget).find('button').map(function (_, button) { return $(button).attr('data-color'); }).get()\n }\n\n disconnect() {\n this.teardownPluginInstance()\n }\n\n pickColor(event) {\n event.preventDefault();\n\n const targetEl = event.target;\n const color = targetEl.dataset.color;\n\n $(this.colorInputTarget).val(color);\n $(this.colorPickerValueTarget).val(color);\n $(this.userSelectedColorTarget).data('color', color);\n $('.button-color').removeClass('ring-2 ring-offset-2');\n\n this.pickr.setColor(color);\n\n targetEl.classList.add('ring-2', 'ring-offset-2');\n }\n\n pickRandomColor(event) {\n event.preventDefault();\n\n const r = Math.floor(Math.random() * 256);\n const g = Math.floor(Math.random() * 256);\n const b = Math.floor(Math.random() * 256);\n\n this.pickr.setColor(`rgb ${r} ${g} ${b}`);\n const hexColor = this.pickr.getColor().toHEXA().toString();\n this.pickr.setColor(hexColor);\n\n this.showUserSelectedColor(hexColor);\n }\n\n showUserSelectedColor(color) {\n $(this.colorInputTarget).val(color);\n $(this.colorPickerValueTarget).val(color);\n\n $('.button-color').removeClass('ring-2 ring-offset-2');\n\n $(this.userSelectedColorTarget)\n .addClass('ring-2')\n .addClass('ring-offset-2')\n .css('background-color', color)\n .css('--tw-ring-color', color)\n .attr('data-color', color)\n .show();\n }\n\n unpickColor(event) {\n event.preventDefault();\n $(this.colorPickerValueTarget).val('');\n $(this.colorInputTarget).val('');\n $(this.userSelectedColorTarget).hide();\n $('.button-color').removeClass('ring-2 ring-offset-2');\n }\n\n togglePickr(event) {\n event.preventDefault();\n }\n\n initPluginInstance() {\n this.pickr = Pickr.create({\n el: '.btn-pickr',\n theme: 'monolith',\n useAsButton: true,\n default: this.initialColorValue || '#1E90FF',\n components: {\n // Main components\n preview: true,\n hue: true,\n\n // Input / output Options\n interaction: {\n input: true,\n save: true,\n },\n }\n });\n\n this.pickr.on('save', (color, _instance) => {\n const hexaColor = color.toHEXA().toString()\n if (!this.colorOptions.includes(hexaColor)) {\n this.showUserSelectedColor(hexaColor);\n }\n this.pickr.hide();\n });\n\n const that = this\n\n $('input[type=\"text\"].pcr-result').on('keydown', function (e) {\n if (e.key === 'Enter') {\n that.pickr.applyColor(false)\n }\n })\n }\n\n teardownPluginInstance() {\n this.pickr.destroy()\n }\n}\n","import { Controller } from \"stimulus\"\nrequire(\"daterangepicker/daterangepicker.css\");\n\n// requires jQuery, moment, might want to consider a vanilla JS alternative\nimport 'daterangepicker';\n\nexport default class extends Controller {\n static targets = [ \"field\", \"clearButton\", \"currentTimeZoneWrapper\", \"timeZoneButtons\", \"timeZoneSelectWrapper\", \"timeZoneField\" ]\n static values = {\n includeTime: Boolean,\n defaultTimeZones: Array,\n cancelButtonLabel: String,\n applyButtonLabel: String\n }\n\n connect() {\n this.initPluginInstance()\n }\n\n disconnect() {\n this.teardownPluginInstance()\n }\n\n clearDate(event) {\n // don't submit the form, unless it originated from the cancel/clear button\n event.preventDefault()\n\n $(this.fieldTarget).val('')\n }\n\n applyDateToField(event, picker) {\n const format = this.includeTimeValue ? 'MM/DD/YYYY h:mm A' : 'MM/DD/YYYY'\n $(this.fieldTarget).val(picker.startDate.format(format))\n }\n\n showTimeZoneButtons(event) {\n // don't follow the anchor\n event.preventDefault()\n\n $(this.currentTimeZoneWrapperTarget).toggleClass('hidden')\n $(this.timeZoneButtonsTarget).toggleClass('hidden')\n }\n\n showTimeZoneSelectWrapper(event) {\n // don't follow the anchor\n event.preventDefault()\n\n $(this.timeZoneButtonsTarget).toggleClass('hidden')\n\n if (this.hasTimeZoneSelectWrapperTarget) {\n $(this.timeZoneSelectWrapperTarget).toggleClass('hidden')\n }\n }\n\n resetTimeZoneUI(e) {\n e && e.preventDefault()\n\n $(this.currentTimeZoneWrapperTarget).removeClass('hidden')\n $(this.timeZoneButtonsTarget).addClass('hidden')\n\n if (this.hasTimeZoneSelectWrapperTarget) {\n $(this.timeZoneSelectWrapperTarget).addClass('hidden')\n }\n }\n\n setTimeZone(event) {\n // don't follow the anchor\n event.preventDefault()\n\n const currentTimeZoneEl = this.currentTimeZoneWrapperTarget.querySelector('a')\n const {value} = event.target.dataset\n\n $(this.timeZoneFieldTarget).val(value)\n $(currentTimeZoneEl).text(value)\n\n $('.time-zone-button').removeClass('button').addClass('button-alternative')\n $(event.target).removeClass('button-alternative').addClass('button')\n\n this.resetTimeZoneUI()\n }\n\n initPluginInstance() {\n $(this.fieldTarget).daterangepicker({\n singleDatePicker: true,\n timePicker: this.includeTimeValue,\n timePickerIncrement: 5,\n autoUpdateInput: false,\n locale: {\n cancelLabel: (this.hasCancelButtonLabelValue)? this.cancelButtonLabelValue: \"cancel\",\n applyLabel: (this.hasApplyButtonLabelValue)? this.applyButtonLabelValue: \"apply\",\n format: this.includeTimeValue ? 'MM/DD/YYYY h:mm A' : 'MM/DD/YYYY'\n }\n })\n\n $(this.fieldTarget).on('apply.daterangepicker', this.applyDateToField.bind(this))\n $(this.fieldTarget).on('cancel.daterangepicker', this.clearDate.bind(this))\n\n this.pluginMainEl = this.fieldTarget\n this.plugin = $(this.pluginMainEl).data('daterangepicker') // weird\n\n // Init time zone select\n if (this.includeTimeValue && this.hasTimeZoneSelectWrapperTarget) {\n this.timeZoneSelect = this.timeZoneSelectWrapperTarget.querySelector('select.select2')\n\n $(this.timeZoneSelect).select2({\n width: 'style'\n })\n\n const self = this\n\n $(this.timeZoneSelect).on('change.select2', function(event) {\n const currentTimeZoneEl = self.currentTimeZoneWrapperTarget.querySelector('a')\n const {value} = event.target\n\n $(self.timeZoneFieldTarget).val(value)\n $(currentTimeZoneEl).text(value)\n\n const selectedOptionTimeZoneButton = $('.selected-option-time-zone-button')\n\n if (self.defaultTimeZonesValue.includes(value)) {\n $('.time-zone-button').removeClass('button').addClass('button-alternative')\n selectedOptionTimeZoneButton.addClass('hidden').attr('hidden', true)\n $(`a[data-value=\"${value}\"`).removeClass('button-alternative').addClass('button')\n } else {\n // deselect any selected button\n $('.time-zone-button').removeClass('button').addClass('button-alternative')\n\n selectedOptionTimeZoneButton.text(value)\n selectedOptionTimeZoneButton.attr('data-value', value).removeAttr('hidden')\n selectedOptionTimeZoneButton.removeClass(['hidden', 'button-alternative']).addClass('button')\n }\n\n self.resetTimeZoneUI()\n })\n }\n }\n\n teardownPluginInstance() {\n if (this.plugin === undefined) { return }\n\n $(this.pluginMainEl).off('apply.daterangepicker')\n $(this.pluginMainEl).off('cancel.daterangepicker')\n\n // revert to original markup, remove any event listeners\n this.plugin.remove()\n\n if (this.includeTimeValue) {\n $(this.timeZoneSelect).select2('destroy');\n }\n }\n}\n","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n static targets = [\n \"fileField\",\n \"removeFileFlag\",\n \"downloadFileButton\",\n \"removeFileButton\",\n \"selectFileButton\",\n \"progressBar\",\n ];\n\n connect() {\n // Add upload event listeners\n const initializeListener = document.addEventListener(\n \"direct-upload:initialize\",\n (event) => {\n this.selectFileButtonTarget.classList.add(\"hidden\");\n this.progressBarTarget.innerText = \"0%\";\n this.progressBarTarget.style.width = \"0%\";\n this.progressBarTarget.setAttribute(\"aria-valuenow\", 0);\n this.progressBarTarget.parentNode.classList.remove(\"hidden\");\n }\n );\n\n const progressListener = document.addEventListener(\n \"direct-upload:progress\",\n (event) => {\n const { progress } = event.detail;\n const width = `${progress.toFixed(1)}%`;\n\n this.progressBarTarget.innerText = width;\n this.progressBarTarget.setAttribute(\"aria-valuenow\", progress);\n this.progressBarTarget.style.width = width;\n }\n );\n\n const errorListener = document.addEventListener(\n \"direct-upload:error\",\n (event) => {\n event.preventDefault();\n\n const { error } = event.detail;\n this.progressBarTarget.innerText = error;\n }\n );\n\n this.uploadListeners = {\n \"direct-upload:initialize\": initializeListener,\n \"direct-upload:progress\": progressListener,\n \"direct-upload:error\": errorListener,\n };\n }\n\n disconnect() {\n // Teardown event listeners\n for (const event in this.uploadListeners) {\n document.removeEventListener(event, this.uploadListeners[event]);\n }\n }\n\n uploadFile() {\n this.fileFieldTarget.click();\n }\n\n removeFile() {\n if (this.hasDownloadFileButtonTarget) {\n this.downloadFileButtonTarget.classList.add(\"hidden\");\n }\n\n this.removeFileButtonTarget.classList.add(\"hidden\");\n this.removeFileFlagTarget.value = true;\n }\n\n handleFileSelected() {\n const statusText = this.selectFileButtonTarget.querySelector(\"span\");\n const icon = this.selectFileButtonTarget.querySelector(\"i\");\n\n if (this.hasDownloadFileButtonTarget) {\n this.downloadFileButtonTarget.remove();\n }\n\n statusText.innerText = \"Select Another File\";\n icon.classList.remove(\"ti-upload\");\n icon.classList.add(\"ti-check\");\n }\n}\n","import { Controller } from \"stimulus\"\nrequire(\"intl-tel-input/build/css/intlTelInput.css\");\nimport intlTelInput from 'intl-tel-input';\n\nexport default class extends Controller {\n static targets = [ \"field\" ]\n\n connect() {\n this.initPluginInstance()\n }\n\n disconnect() {\n this.teardownPluginInstance()\n }\n\n initPluginInstance() {\n let options = {\n hiddenInput: this.fieldTarget.dataset.method,\n customContainer: \"w-full\"\n }\n\n // TODO: add instructions on how to copy this asset into the application's assets path and write the meta tag into the head (via the engine?)\n const utilsScriptPath = metaContent(\"intl_tel_input_utils_path\")\n if (utilsScriptPath) {\n options['utilsScript'] = utilsScriptPath\n }\n\n this.plugin = intlTelInput(this.fieldTarget, options);\n }\n\n teardownPluginInstance() {\n if (this.plugin === undefined) { return }\n\n // revert to original markup, remove any event listeners\n this.plugin.destroy()\n }\n}\n\nfunction metaContent (name) {\n const element = document.head.querySelector(`meta[name=\"${name}\"]`)\n return element && element.content\n}","import { Controller } from \"stimulus\"\nrequire(\"select2/dist/css/select2.min.css\");\nimport select2 from \"select2\";\n\nexport default class extends Controller {\n static targets = [ \"select\" ]\n static values = {\n acceptsNew: Boolean,\n enableSearch: Boolean,\n searchUrl: String,\n }\n\n initialize() {\n if (this.isSelect2LoadedOnWindowJquery) {\n select2(window.$)\n }\n }\n\n get isSelect2LoadedOnWindowJquery() {\n return (window.$ !== undefined && window.$.select2 === undefined)\n }\n\n connect() {\n if (this.isSelect2LoadedOnWindowJquery) {\n this.initPluginInstance()\n }\n }\n\n disconnect() {\n this.teardownPluginInstance()\n }\n\n cleanupBeforeInit() {\n $(this.element).find('.select2-container--default').remove()\n }\n\n initPluginInstance() {\n let options = {};\n\n if (!this.enableSearchValue) {\n options.minimumResultsForSearch = -1;\n }\n\n options.tags = this.acceptsNewValue\n\n if (this.searchUrlValue) {\n options.ajax = {\n url: this.searchUrlValue,\n dataType: 'json',\n // We enable pagination by default here\n data: function(params) {\n var query = {\n search: params.term,\n page: params.page || 1\n }\n return query\n }\n // Any additional params go here...\n }\n }\n\n options.templateResult = this.formatState;\n options.templateSelection = this.formatState;\n options.width = 'style';\n\n this.cleanupBeforeInit() // in case improperly torn down\n this.pluginMainEl = this.selectTarget // required because this.selectTarget is unavailable on disconnect()\n $(this.pluginMainEl).select2(options);\n }\n\n teardownPluginInstance() {\n if (this.pluginMainEl === undefined) { return }\n\n // revert to original markup, remove any event listeners\n $(this.pluginMainEl).select2('destroy');\n }\n\n // https://stackoverflow.com/questions/29290389/select2-add-image-icon-to-option-dynamically\n formatState(opt) {\n var imageUrl = $(opt.element).attr('data-image');\n var imageHtml = \"\";\n if (imageUrl) {\n imageHtml = ' ';\n }\n return $('' + imageHtml + opt.text + '');\n }\n}\n","import { identifierForContextKey } from \"@stimulus/webpack-helpers\"\n\nimport ButtonToggleController from './fields/button_toggle_controller'\nimport CloudinaryImageController from './fields/cloudinary_image_controller'\nimport ColorPickerController from './fields/color_picker_controller'\nimport DateController from './fields/date_controller'\nimport FileFieldController from './fields/file_field_controller'\nimport PhoneController from './fields/phone_controller'\nimport SuperSelectController from './fields/super_select_controller'\n\nexport const controllerDefinitions = [\n [ButtonToggleController, 'fields/button_toggle_controller.js'],\n [CloudinaryImageController, 'fields/cloudinary_image_controller.js'],\n [ColorPickerController, 'fields/color_picker_controller.js'],\n [DateController, 'fields/date_controller.js'],\n [FileFieldController, 'fields/file_field_controller.js'],\n [PhoneController, 'fields/phone_controller.js'],\n [SuperSelectController, 'fields/super_select_controller.js']\n].map(function(d) {\n const key = d[1]\n const controller = d[0]\n return {\n identifier: identifierForContextKey(key),\n controllerConstructor: controller\n }\n})\n\nexport {\n ButtonToggleController,\n CloudinaryImageController,\n ColorPickerController,\n DateController,\n FileFieldController,\n PhoneController,\n SuperSelectController\n}","import Tribute from 'tributejs'\nrequire(\"trix/dist/trix.css\");\n\nrequire(\"trix\")\nrequire(\"@rails/actiontext\")\n\n// only show the editor tool bar when the user is editing the field.\n// inspired by https://github.com/basecamp/trix/issues/343 and `app/assets/stylesheets/account/fields/trix_editor.scss`\n\nexport function trixEditor() {\n document.addEventListener('trix-initialize', function() {\n addEventListener(\"trix-focus\", updateTrixToolbarVisability);\n addEventListener(\"trix-blur\", updateTrixToolbarVisability);\n updateTrixToolbarVisability();\n initializeTribute();\n })\n}\n\nfunction updateTrixToolbarVisability() {\n document.querySelectorAll(\"trix-editor\").forEach((editorElement, index) => {\n var toolbarElement = editorElement.toolbarElement;\n if (editorElement == document.activeElement) {\n toolbarElement.classList.add('visible');\n } else {\n // don't hide the toolbar if we've unfocused to focus on the link dialog.\n if (!toolbarElement.contains(document.activeElement)) {\n toolbarElement.classList.remove('visible');\n }\n }\n })\n}\n\nfunction initializeTribute() {\n document.querySelectorAll(\"trix-editor\").forEach((el, index) => {\n var editor = el.editor;\n \n var mentionConfig = {\n trigger: '@',\n values: JSON.parse(editor.element.dataset.mentions),\n selectTemplate: function (item) {\n item = item.original;\n return '' + item.label + '';\n },\n menuItemTemplate: function (item) {\n return ' ' + item.string;\n },\n requireLeadingSpace: true,\n replaceTextSuffix: ''\n }\n \n var topicConfig = {\n trigger: '#',\n values: JSON.parse(editor.element.dataset.topics),\n selectTemplate: function (item) {\n item = item.original;\n return '' + item.label + '';\n },\n menuItemTemplate: function (item) {\n return ' ' + item.string;\n },\n requireLeadingSpace: true,\n replaceTextSuffix: ''\n }\n \n var tribute = new Tribute({\n collection: [topicConfig, mentionConfig],\n });\n \n tribute.attach(el);\n })\n}\n"],"names":["identifierForContextKey","key","logicalName","match","replace","clickShadowField","event","preventDefault","this","shadowFieldTarget","click","Controller","targets","pickImageAndUpload","defaultSources","hasGoogleApiKeyValue","push","options","cloud_name","cloudNameValue","apiKey","apiKeyValue","upload_preset","uploadPresetValue","upload_signature","getCloudinarySignature","bind","multiple","sources","hasSourcesValue","sourcesValue","split","search_by_rights","hasSearchByRightsValue","searchByRightsValue","googleApiKeyValue","cloudinary","openUploadWidget","handleWidgetResponse","clearImage","hiddenFieldTarget","value","removeThumbnail","callback","paramsToSign","$","ajax","url","signaturesUrlValue","type","dataType","data","complete","console","log","success","signature","textStatus","xhr","error","status","response","info","public_id","addThumbnail","urlFormatValue","$imageElement","widthValue","heightValue","identifier","uploadButtonTarget","prepend","classList","add","thumbnailShownClass","hasThumbnailTarget","removeChild","thumbnailTarget","remove","values","signaturesUrl","String","height","Number","width","cloudName","googleApiKey","urlFormat","searchByRights","Boolean","classes","connect","initPluginInstance","colorOptions","colorOptionsTarget","find","map","_","button","attr","get","disconnect","teardownPluginInstance","pickColor","targetEl","target","color","dataset","colorInputTarget","val","colorPickerValueTarget","userSelectedColorTarget","removeClass","pickr","setColor","pickRandomColor","r","Math","floor","random","g","b","hexColor","getColor","toHEXA","toString","showUserSelectedColor","addClass","css","show","unpickColor","hide","togglePickr","Pickr","create","el","theme","useAsButton","default","initialColorValue","components","preview","hue","interaction","input","save","on","_instance","hexaColor","_this","includes","that","e","applyColor","destroy","initialColor","require","clearDate","fieldTarget","applyDateToField","picker","format","includeTimeValue","startDate","showTimeZoneButtons","currentTimeZoneWrapperTarget","toggleClass","timeZoneButtonsTarget","showTimeZoneSelectWrapper","hasTimeZoneSelectWrapperTarget","timeZoneSelectWrapperTarget","resetTimeZoneUI","setTimeZone","currentTimeZoneEl","querySelector","timeZoneFieldTarget","text","daterangepicker","singleDatePicker","timePicker","timePickerIncrement","autoUpdateInput","locale","cancelLabel","hasCancelButtonLabelValue","cancelButtonLabelValue","applyLabel","hasApplyButtonLabelValue","applyButtonLabelValue","pluginMainEl","plugin","timeZoneSelect","select2","self","selectedOptionTimeZoneButton","defaultTimeZonesValue","removeAttr","undefined","off","includeTime","defaultTimeZones","Array","cancelButtonLabel","applyButtonLabel","initializeListener","document","addEventListener","selectFileButtonTarget","progressBarTarget","innerText","style","setAttribute","parentNode","progressListener","progress","detail","toFixed","errorListener","uploadListeners","removeEventListener","uploadFile","fileFieldTarget","removeFile","hasDownloadFileButtonTarget","downloadFileButtonTarget","removeFileButtonTarget","removeFileFlagTarget","handleFileSelected","statusText","icon","element","hiddenInput","method","customContainer","utilsScriptPath","head","content","intlTelInput","initialize","isSelect2LoadedOnWindowJquery","window","cleanupBeforeInit","enableSearchValue","minimumResultsForSearch","tags","acceptsNewValue","searchUrlValue","params","search","term","page","templateResult","formatState","templateSelection","selectTarget","opt","imageUrl","imageHtml","acceptsNew","enableSearch","searchUrl","controllerDefinitions","ButtonToggleController","CloudinaryImageController","ColorPickerController","DateController","FileFieldController","PhoneController","SuperSelectController","d","controller","controllerConstructor","updateTrixToolbarVisability","querySelectorAll","forEach","editorElement","index","toolbarElement","activeElement","contains","editor","mentionConfig","trigger","JSON","parse","mentions","selectTemplate","item","original","protocol","model","id","label","menuItemTemplate","photo","string","requireLeadingSpace","replaceTextSuffix","topicConfig","topics","Tribute","collection","attach"],"mappings":"2tBAiBO,SAASA,EAAwBC,GACpC,IAAIC,GAAeD,EAAIE,MAAM,2CAA6C,IAAI,GAC9E,GAAID,EACA,OAAOA,EAAYE,QAAQ,KAAM,KAAKA,QAAQ,MAAO,yRCf3DC,iBAAA,SAAiBC,GAEfA,EAAMC,iBAGNC,KAAKC,kBAAkBC,YAREC,gBACpBC,QAAU,CAAE,qH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