{ "version": 3, "sources": ["../../../node_modules/@rails/actioncable/src/adapters.js", "../../../node_modules/@rails/actioncable/src/logger.js", "../../../node_modules/@rails/actioncable/src/connection_monitor.js", "../../../node_modules/@rails/actioncable/src/internal.js", "../../../node_modules/@rails/actioncable/src/connection.js", "../../../node_modules/@rails/actioncable/src/subscription.js", "../../../node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../node_modules/@rails/actioncable/src/subscriptions.js", "../../../node_modules/@rails/actioncable/src/consumer.js", "../../../node_modules/@rails/actioncable/src/index.js", "../../../node_modules/intl-tel-input/build/js/intlTelInput.js", "../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascript/controllers/application.js", "../../javascript/controllers/hello_controller.js", "../../javascript/controllers/phone_flags_controller.js", "../../../node_modules/@deltablot/dropzone/dist/src/dropzone.js", "../../../node_modules/@deltablot/dropzone/dist/src/emitter.js", "../../../node_modules/@deltablot/dropzone/dist/src/options.js", "../../../node_modules/@deltablot/dropzone/dist/src/preview-template.js", "../../../node_modules/@rails/activestorage/app/assets/javascripts/activestorage.esm.js", "../../javascript/helpers/index.js", "../../javascript/controllers/dropzone_controller.js", "../../javascript/controllers/newsletter_controller.js", "../../javascript/controllers/language_switcher.js", "../../javascript/controllers/index.js", "../../../node_modules/@popperjs/core/lib/index.js", "../../../node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/@popperjs/core/lib/popper-lite.js", "../../../node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/bootstrap/js/src/dom/data.js", "../../../node_modules/bootstrap/js/src/util/index.js", "../../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../../node_modules/bootstrap/js/src/util/config.js", "../../../node_modules/bootstrap/js/src/base-component.js", "../../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../../node_modules/bootstrap/js/src/util/component-functions.js", "../../../node_modules/bootstrap/js/src/alert.js", "../../../node_modules/bootstrap/js/src/button.js", "../../../node_modules/bootstrap/js/src/util/swipe.js", "../../../node_modules/bootstrap/js/src/carousel.js", "../../../node_modules/bootstrap/js/src/collapse.js", "../../../node_modules/bootstrap/js/src/dropdown.js", "../../../node_modules/bootstrap/js/src/util/backdrop.js", "../../../node_modules/bootstrap/js/src/util/focustrap.js", "../../../node_modules/bootstrap/js/src/util/scrollbar.js", "../../../node_modules/bootstrap/js/src/modal.js", "../../../node_modules/bootstrap/js/src/offcanvas.js", "../../../node_modules/bootstrap/js/src/util/sanitizer.js", "../../../node_modules/bootstrap/js/src/util/template-factory.js", "../../../node_modules/bootstrap/js/src/tooltip.js", "../../../node_modules/bootstrap/js/src/popover.js", "../../../node_modules/bootstrap/js/src/scrollspy.js", "../../../node_modules/bootstrap/js/src/tab.js", "../../../node_modules/bootstrap/js/src/toast.js", "../../../node_modules/trix/src/trix/config/attachments.js", "../../../node_modules/trix/src/trix/config/block_attributes.js", "../../../node_modules/trix/src/trix/config/browser.js", "../../../node_modules/trix/src/trix/config/dompurify.js", "../../../node_modules/trix/src/trix/config/lang.js", "../../../node_modules/trix/src/trix/config/file_size_formatting.js", "../../../node_modules/trix/src/trix/constants.js", "../../../node_modules/trix/src/trix/core/helpers/extend.js", "../../../node_modules/trix/src/trix/core/helpers/dom.js", "../../../node_modules/trix/src/trix/config/input.js", "../../../node_modules/trix/src/trix/config/key_names.js", "../../../node_modules/trix/src/trix/config/parser.js", "../../../node_modules/trix/src/trix/config/text_attributes.js", "../../../node_modules/trix/src/trix/config/toolbar.js", "../../../node_modules/trix/src/trix/config/undo.js", "../../../node_modules/trix/src/trix/config/css.js", "../../../node_modules/trix/src/trix/core/basic_object.js", "../../../node_modules/trix/src/trix/core/utilities/utf16_string.js", "../../../node_modules/trix/src/trix/core/object.js", "../../../node_modules/trix/src/trix/core/helpers/arrays.js", "../../../node_modules/trix/src/trix/core/helpers/bidi.js", "../../../node_modules/trix/src/trix/core/helpers/config.js", "../../../node_modules/trix/src/trix/core/helpers/custom_elements.js", "../../../node_modules/trix/src/trix/core/helpers/events.js", "../../../node_modules/trix/src/trix/core/helpers/functions.js", "../../../node_modules/trix/src/trix/core/helpers/objects.js", "../../../node_modules/trix/src/trix/core/helpers/ranges.js", "../../../node_modules/trix/src/trix/observers/selection_change_observer.js", "../../../node_modules/trix/src/trix/core/helpers/strings.js", "../../../node_modules/trix/src/trix/core/collections/hash.js", "../../../node_modules/trix/src/trix/core/collections/object_group.js", "../../../node_modules/trix/src/trix/core/collections/object_map.js", "../../../node_modules/trix/src/trix/core/collections/element_store.js", "../../../node_modules/trix/src/trix/core/utilities/operation.js", "../../../node_modules/trix/src/trix/views/object_view.js", "../../../node_modules/trix/node_modules/dompurify/dist/purify.es.mjs", "../../../node_modules/trix/src/trix/models/html_sanitizer.js", "../../../node_modules/trix/src/trix/views/attachment_view.js", "../../../node_modules/trix/src/trix/views/previewable_attachment_view.js", "../../../node_modules/trix/src/trix/views/piece_view.js", "../../../node_modules/trix/src/trix/views/text_view.js", "../../../node_modules/trix/src/trix/views/block_view.js", "../../../node_modules/trix/src/trix/views/document_view.js", "../../../node_modules/trix/src/trix/models/piece.js", "../../../node_modules/trix/src/trix/operations/image_preload_operation.js", "../../../node_modules/trix/src/trix/models/attachment.js", "../../../node_modules/trix/src/trix/models/attachment_piece.js", "../../../node_modules/trix/src/trix/models/string_piece.js", "../../../node_modules/trix/src/trix/models/splittable_list.js", "../../../node_modules/trix/src/trix/models/text.js", "../../../node_modules/trix/src/trix/models/block.js", "../../../node_modules/trix/src/trix/models/document.js", "../../../node_modules/trix/src/trix/models/html_parser.js", "../../../node_modules/trix/src/trix/core/serialization.js", "../../../node_modules/trix/src/trix/models/managed_attachment.js", "../../../node_modules/trix/src/trix/models/attachment_manager.js", "../../../node_modules/trix/src/trix/models/line_break_insertion.js", "../../../node_modules/trix/src/trix/models/composition.js", "../../../node_modules/trix/src/trix/models/undo_manager.js", "../../../node_modules/trix/src/trix/filters/filter.js", "../../../node_modules/trix/src/trix/filters/attachment_gallery_filter.js", "../../../node_modules/trix/src/trix/models/editor.js", "../../../node_modules/trix/src/trix/models/location_mapper.js", "../../../node_modules/trix/src/trix/models/point_mapper.js", "../../../node_modules/trix/src/trix/models/selection_manager.js", "../../../node_modules/trix/src/trix/controllers/attachment_editor_controller.js", "../../../node_modules/trix/src/trix/controllers/composition_controller.js", "../../../node_modules/trix/src/trix/controllers/controller.js", "../../../node_modules/trix/src/trix/observers/mutation_observer.js", "../../../node_modules/trix/src/trix/operations/file_verification_operation.js", "../../../node_modules/trix/src/trix/models/flaky_android_keyboard_detector.js", "../../../node_modules/trix/src/trix/controllers/input_controller.js", "../../../node_modules/trix/src/trix/controllers/level_0_input_controller.js", "../../../node_modules/trix/src/trix/controllers/level_2_input_controller.js", "../../../node_modules/trix/src/trix/controllers/toolbar_controller.js", "../../../node_modules/trix/src/trix/controllers/editor_controller.js", "../../../node_modules/trix/src/trix/elements/trix_toolbar_element.js", "../../../node_modules/trix/src/trix/elements/trix_editor_element.js", "../../../node_modules/trix/src/trix/trix.js", "../../../node_modules/@rails/actiontext/app/assets/javascripts/actiontext.esm.js"], "sourcesContent": ["export default {\n logger: typeof console !== \"undefined\" ? console : undefined,\n WebSocket: typeof WebSocket !== \"undefined\" ? WebSocket : undefined,\n}\n", "import adapters from \"./adapters\"\n\n// The logger is disabled by default. You can enable it with:\n//\n// ActionCable.logger.enabled = true\n//\n// Example:\n//\n// import * as ActionCable from '@rails/actioncable'\n//\n// ActionCable.logger.enabled = true\n// ActionCable.logger.log('Connection Established.')\n//\n\nexport default {\n log(...messages) {\n if (this.enabled) {\n messages.push(Date.now())\n adapters.logger.log(\"[ActionCable]\", ...messages)\n }\n },\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring the cable connection is in good health by validating the heartbeat pings sent from the server, and attempting\n// revival reconnections if things go astray. Internal class, not intended for direct user manipulation.\n\nconst now = () => new Date().getTime()\n\nconst secondsSince = time => (now() - time) / 1000\n\nclass ConnectionMonitor {\n constructor(connection) {\n this.visibilityDidChange = this.visibilityDidChange.bind(this)\n this.connection = connection\n this.reconnectAttempts = 0\n }\n\n start() {\n if (!this.isRunning()) {\n this.startedAt = now()\n delete this.stoppedAt\n this.startPolling()\n addEventListener(\"visibilitychange\", this.visibilityDidChange)\n logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`)\n }\n }\n\n stop() {\n if (this.isRunning()) {\n this.stoppedAt = now()\n this.stopPolling()\n removeEventListener(\"visibilitychange\", this.visibilityDidChange)\n logger.log(\"ConnectionMonitor stopped\")\n }\n }\n\n isRunning() {\n return this.startedAt && !this.stoppedAt\n }\n\n recordMessage() {\n this.pingedAt = now()\n }\n\n recordConnect() {\n this.reconnectAttempts = 0\n delete this.disconnectedAt\n logger.log(\"ConnectionMonitor recorded connect\")\n }\n\n recordDisconnect() {\n this.disconnectedAt = now()\n logger.log(\"ConnectionMonitor recorded disconnect\")\n }\n\n // Private\n\n startPolling() {\n this.stopPolling()\n this.poll()\n }\n\n stopPolling() {\n clearTimeout(this.pollTimeout)\n }\n\n poll() {\n this.pollTimeout = setTimeout(() => {\n this.reconnectIfStale()\n this.poll()\n }\n , this.getPollInterval())\n }\n\n getPollInterval() {\n const { staleThreshold, reconnectionBackoffRate } = this.constructor\n const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10))\n const jitterMax = this.reconnectAttempts === 0 ? 1.0 : reconnectionBackoffRate\n const jitter = jitterMax * Math.random()\n return staleThreshold * 1000 * backoff * (1 + jitter)\n }\n\n reconnectIfStale() {\n if (this.connectionIsStale()) {\n logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`)\n this.reconnectAttempts++\n if (this.disconnectedRecently()) {\n logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`)\n } else {\n logger.log(\"ConnectionMonitor reopening\")\n this.connection.reopen()\n }\n }\n }\n\n get refreshedAt() {\n return this.pingedAt ? this.pingedAt : this.startedAt\n }\n\n connectionIsStale() {\n return secondsSince(this.refreshedAt) > this.constructor.staleThreshold\n }\n\n disconnectedRecently() {\n return this.disconnectedAt && (secondsSince(this.disconnectedAt) < this.constructor.staleThreshold)\n }\n\n visibilityDidChange() {\n if (document.visibilityState === \"visible\") {\n setTimeout(() => {\n if (this.connectionIsStale() || !this.connection.isOpen()) {\n logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`)\n this.connection.reopen()\n }\n }\n , 200)\n }\n }\n\n}\n\nConnectionMonitor.staleThreshold = 6 // Server::Connections::BEAT_INTERVAL * 2 (missed two pings)\nConnectionMonitor.reconnectionBackoffRate = 0.15\n\nexport default ConnectionMonitor\n", "export default {\n \"message_types\": {\n \"welcome\": \"welcome\",\n \"disconnect\": \"disconnect\",\n \"ping\": \"ping\",\n \"confirmation\": \"confirm_subscription\",\n \"rejection\": \"reject_subscription\"\n },\n \"disconnect_reasons\": {\n \"unauthorized\": \"unauthorized\",\n \"invalid_request\": \"invalid_request\",\n \"server_restart\": \"server_restart\",\n \"remote\": \"remote\"\n },\n \"default_mount_path\": \"/cable\",\n \"protocols\": [\n \"actioncable-v1-json\",\n \"actioncable-unsupported\"\n ]\n}\n", "import adapters from \"./adapters\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport INTERNAL from \"./internal\"\nimport logger from \"./logger\"\n\n// Encapsulate the cable connection held by the consumer. This is an internal class not intended for direct user manipulation.\n\nconst {message_types, protocols} = INTERNAL\nconst supportedProtocols = protocols.slice(0, protocols.length - 1)\n\nconst indexOf = [].indexOf\n\nclass Connection {\n constructor(consumer) {\n this.open = this.open.bind(this)\n this.consumer = consumer\n this.subscriptions = this.consumer.subscriptions\n this.monitor = new ConnectionMonitor(this)\n this.disconnected = true\n }\n\n send(data) {\n if (this.isOpen()) {\n this.webSocket.send(JSON.stringify(data))\n return true\n } else {\n return false\n }\n }\n\n open() {\n if (this.isActive()) {\n logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`)\n return false\n } else {\n const socketProtocols = [...protocols, ...this.consumer.subprotocols || []]\n logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${socketProtocols}`)\n if (this.webSocket) { this.uninstallEventHandlers() }\n this.webSocket = new adapters.WebSocket(this.consumer.url, socketProtocols)\n this.installEventHandlers()\n this.monitor.start()\n return true\n }\n }\n\n close({allowReconnect} = {allowReconnect: true}) {\n if (!allowReconnect) { this.monitor.stop() }\n // Avoid closing websockets in a \"connecting\" state due to Safari 15.1+ bug. See: https://github.com/rails/rails/issues/43835#issuecomment-1002288478\n if (this.isOpen()) {\n return this.webSocket.close()\n }\n }\n\n reopen() {\n logger.log(`Reopening WebSocket, current state is ${this.getState()}`)\n if (this.isActive()) {\n try {\n return this.close()\n } catch (error) {\n logger.log(\"Failed to reopen WebSocket\", error)\n }\n finally {\n logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`)\n setTimeout(this.open, this.constructor.reopenDelay)\n }\n } else {\n return this.open()\n }\n }\n\n getProtocol() {\n if (this.webSocket) {\n return this.webSocket.protocol\n }\n }\n\n isOpen() {\n return this.isState(\"open\")\n }\n\n isActive() {\n return this.isState(\"open\", \"connecting\")\n }\n\n triedToReconnect() {\n return this.monitor.reconnectAttempts > 0\n }\n\n // Private\n\n isProtocolSupported() {\n return indexOf.call(supportedProtocols, this.getProtocol()) >= 0\n }\n\n isState(...states) {\n return indexOf.call(states, this.getState()) >= 0\n }\n\n getState() {\n if (this.webSocket) {\n for (let state in adapters.WebSocket) {\n if (adapters.WebSocket[state] === this.webSocket.readyState) {\n return state.toLowerCase()\n }\n }\n }\n return null\n }\n\n installEventHandlers() {\n for (let eventName in this.events) {\n const handler = this.events[eventName].bind(this)\n this.webSocket[`on${eventName}`] = handler\n }\n }\n\n uninstallEventHandlers() {\n for (let eventName in this.events) {\n this.webSocket[`on${eventName}`] = function() {}\n }\n }\n\n}\n\nConnection.reopenDelay = 500\n\nConnection.prototype.events = {\n message(event) {\n if (!this.isProtocolSupported()) { return }\n const {identifier, message, reason, reconnect, type} = JSON.parse(event.data)\n this.monitor.recordMessage()\n switch (type) {\n case message_types.welcome:\n if (this.triedToReconnect()) {\n this.reconnectAttempted = true\n }\n this.monitor.recordConnect()\n return this.subscriptions.reload()\n case message_types.disconnect:\n logger.log(`Disconnecting. Reason: ${reason}`)\n return this.close({allowReconnect: reconnect})\n case message_types.ping:\n return null\n case message_types.confirmation:\n this.subscriptions.confirmSubscription(identifier)\n if (this.reconnectAttempted) {\n this.reconnectAttempted = false\n return this.subscriptions.notify(identifier, \"connected\", {reconnected: true})\n } else {\n return this.subscriptions.notify(identifier, \"connected\", {reconnected: false})\n }\n case message_types.rejection:\n return this.subscriptions.reject(identifier)\n default:\n return this.subscriptions.notify(identifier, \"received\", message)\n }\n },\n\n open() {\n logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`)\n this.disconnected = false\n if (!this.isProtocolSupported()) {\n logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\")\n return this.close({allowReconnect: false})\n }\n },\n\n close(event) {\n logger.log(\"WebSocket onclose event\")\n if (this.disconnected) { return }\n this.disconnected = true\n this.monitor.recordDisconnect()\n return this.subscriptions.notifyAll(\"disconnected\", {willAttemptReconnect: this.monitor.isRunning()})\n },\n\n error() {\n logger.log(\"WebSocket onerror event\")\n }\n}\n\nexport default Connection\n", "// A new subscription is created through the ActionCable.Subscriptions instance available on the consumer.\n// It provides a number of callbacks and a method for calling remote procedure calls on the corresponding\n// Channel instance on the server side.\n//\n// An example demonstrates the basic functionality:\n//\n// App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\", {\n// connected() {\n// // Called once the subscription has been successfully completed\n// },\n//\n// disconnected({ willAttemptReconnect: boolean }) {\n// // Called when the client has disconnected with the server.\n// // The object will have an `willAttemptReconnect` property which\n// // says whether the client has the intention of attempting\n// // to reconnect.\n// },\n//\n// appear() {\n// this.perform('appear', {appearing_on: this.appearingOn()})\n// },\n//\n// away() {\n// this.perform('away')\n// },\n//\n// appearingOn() {\n// $('main').data('appearing-on')\n// }\n// })\n//\n// The methods #appear and #away forward their intent to the remote AppearanceChannel instance on the server\n// by calling the `perform` method with the first parameter being the action (which maps to AppearanceChannel#appear/away).\n// The second parameter is a hash that'll get JSON encoded and made available on the server in the data parameter.\n//\n// This is how the server component would look:\n//\n// class AppearanceChannel < ApplicationActionCable::Channel\n// def subscribed\n// current_user.appear\n// end\n//\n// def unsubscribed\n// current_user.disappear\n// end\n//\n// def appear(data)\n// current_user.appear on: data['appearing_on']\n// end\n//\n// def away\n// current_user.away\n// end\n// end\n//\n// The \"AppearanceChannel\" name is automatically mapped between the client-side subscription creation and the server-side Ruby class name.\n// The AppearanceChannel#appear/away public methods are exposed automatically to client-side invocation through the perform method.\n\nconst extend = function(object, properties) {\n if (properties != null) {\n for (let key in properties) {\n const value = properties[key]\n object[key] = value\n }\n }\n return object\n}\n\nexport default class Subscription {\n constructor(consumer, params = {}, mixin) {\n this.consumer = consumer\n this.identifier = JSON.stringify(params)\n extend(this, mixin)\n }\n\n // Perform a channel action with the optional data passed as an attribute\n perform(action, data = {}) {\n data.action = action\n return this.send(data)\n }\n\n send(data) {\n return this.consumer.send({command: \"message\", identifier: this.identifier, data: JSON.stringify(data)})\n }\n\n unsubscribe() {\n return this.consumer.subscriptions.remove(this)\n }\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring channel subscribe command is confirmed, retrying until confirmation is received.\n// Internal class, not intended for direct user manipulation.\n\nclass SubscriptionGuarantor {\n constructor(subscriptions) {\n this.subscriptions = subscriptions\n this.pendingSubscriptions = []\n }\n\n guarantee(subscription) {\n if(this.pendingSubscriptions.indexOf(subscription) == -1){ \n logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`)\n this.pendingSubscriptions.push(subscription) \n }\n else {\n logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`)\n }\n this.startGuaranteeing()\n }\n\n forget(subscription) {\n logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`)\n this.pendingSubscriptions = (this.pendingSubscriptions.filter((s) => s !== subscription))\n }\n\n startGuaranteeing() {\n this.stopGuaranteeing()\n this.retrySubscribing()\n }\n \n stopGuaranteeing() {\n clearTimeout(this.retryTimeout)\n }\n\n retrySubscribing() {\n this.retryTimeout = setTimeout(() => {\n if (this.subscriptions && typeof(this.subscriptions.subscribe) === \"function\") {\n this.pendingSubscriptions.map((subscription) => {\n logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`)\n this.subscriptions.subscribe(subscription)\n })\n }\n }\n , 500)\n }\n}\n\nexport default SubscriptionGuarantor", "import logger from \"./logger\"\nimport Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\n\n// Collection class for creating (and internally managing) channel subscriptions.\n// The only method intended to be triggered by the user is ActionCable.Subscriptions#create,\n// and it should be called through the consumer like so:\n//\n// App = {}\n// App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n// App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n\nexport default class Subscriptions {\n constructor(consumer) {\n this.consumer = consumer\n this.guarantor = new SubscriptionGuarantor(this)\n this.subscriptions = []\n }\n\n create(channelName, mixin) {\n const channel = channelName\n const params = typeof channel === \"object\" ? channel : {channel}\n const subscription = new Subscription(this.consumer, params, mixin)\n return this.add(subscription)\n }\n\n // Private\n\n add(subscription) {\n this.subscriptions.push(subscription)\n this.consumer.ensureActiveConnection()\n this.notify(subscription, \"initialized\")\n this.subscribe(subscription)\n return subscription\n }\n\n remove(subscription) {\n this.forget(subscription)\n if (!this.findAll(subscription.identifier).length) {\n this.sendCommand(subscription, \"unsubscribe\")\n }\n return subscription\n }\n\n reject(identifier) {\n return this.findAll(identifier).map((subscription) => {\n this.forget(subscription)\n this.notify(subscription, \"rejected\")\n return subscription\n })\n }\n\n forget(subscription) {\n this.guarantor.forget(subscription)\n this.subscriptions = (this.subscriptions.filter((s) => s !== subscription))\n return subscription\n }\n\n findAll(identifier) {\n return this.subscriptions.filter((s) => s.identifier === identifier)\n }\n\n reload() {\n return this.subscriptions.map((subscription) =>\n this.subscribe(subscription))\n }\n\n notifyAll(callbackName, ...args) {\n return this.subscriptions.map((subscription) =>\n this.notify(subscription, callbackName, ...args))\n }\n\n notify(subscription, callbackName, ...args) {\n let subscriptions\n if (typeof subscription === \"string\") {\n subscriptions = this.findAll(subscription)\n } else {\n subscriptions = [subscription]\n }\n\n return subscriptions.map((subscription) =>\n (typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined))\n }\n\n subscribe(subscription) {\n if (this.sendCommand(subscription, \"subscribe\")) {\n this.guarantor.guarantee(subscription)\n }\n }\n\n confirmSubscription(identifier) {\n logger.log(`Subscription confirmed ${identifier}`)\n this.findAll(identifier).map((subscription) =>\n this.guarantor.forget(subscription))\n }\n\n sendCommand(subscription, command) {\n const {identifier} = subscription\n return this.consumer.send({command, identifier})\n }\n}\n", "import Connection from \"./connection\"\nimport Subscriptions from \"./subscriptions\"\n\n// The ActionCable.Consumer establishes the connection to a server-side Ruby Connection object. Once established,\n// the ActionCable.ConnectionMonitor will ensure that its properly maintained through heartbeats and checking for stale updates.\n// The Consumer instance is also the gateway to establishing subscriptions to desired channels through the #createSubscription\n// method.\n//\n// The following example shows how this can be set up:\n//\n// App = {}\n// App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n// App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n//\n// When a consumer is created, it automatically connects with the server.\n//\n// To disconnect from the server, call\n//\n// App.cable.disconnect()\n//\n// and to restart the connection:\n//\n// App.cable.connect()\n//\n// Any channel subscriptions which existed prior to disconnecting will\n// automatically resubscribe.\n\nexport default class Consumer {\n constructor(url) {\n this._url = url\n this.subscriptions = new Subscriptions(this)\n this.connection = new Connection(this)\n this.subprotocols = []\n }\n\n get url() {\n return createWebSocketURL(this._url)\n }\n\n send(data) {\n return this.connection.send(data)\n }\n\n connect() {\n return this.connection.open()\n }\n\n disconnect() {\n return this.connection.close({allowReconnect: false})\n }\n\n ensureActiveConnection() {\n if (!this.connection.isActive()) {\n return this.connection.open()\n }\n }\n\n addSubProtocol(subprotocol) {\n this.subprotocols = [...this.subprotocols, subprotocol]\n }\n}\n\nexport function createWebSocketURL(url) {\n if (typeof url === \"function\") {\n url = url()\n }\n\n if (url && !/^wss?:/i.test(url)) {\n const a = document.createElement(\"a\")\n a.href = url\n // Fix populating Location properties in IE. Otherwise, protocol will be blank.\n a.href = a.href // eslint-disable-line\n a.protocol = a.protocol.replace(\"http\", \"ws\")\n return a.href\n } else {\n return url\n }\n}\n", "import adapters from \"./adapters\"\nimport Connection from \"./connection\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport Consumer, { createWebSocketURL } from \"./consumer\"\nimport INTERNAL from \"./internal\"\nimport logger from \"./logger\"\nimport Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport Subscriptions from \"./subscriptions\"\n\nexport {\n Connection,\n ConnectionMonitor,\n Consumer,\n INTERNAL,\n Subscription,\n Subscriptions,\n SubscriptionGuarantor,\n adapters,\n createWebSocketURL,\n logger,\n}\n\nexport function createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n return new Consumer(url)\n}\n\nexport function getConfig(name) {\n const element = document.head.querySelector(`meta[name='action-cable-${name}']`)\n if (element) {\n return element.getAttribute(\"content\")\n }\n}\n", "/*\n * International Telephone Input v25.15.1\n * https://github.com/jackocnr/intl-tel-input.git\n * Licensed under the MIT license\n */\n\n// UMD\n(function(factory) {\n if (typeof module === 'object' && module.exports) {\n module.exports = factory();\n } else {\n window.intlTelInput = factory();\n }\n}(() => {\n\nvar factoryOutput = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // src/js/intl-tel-input.ts\n var intl_tel_input_exports = {};\n __export(intl_tel_input_exports, {\n Iti: () => Iti,\n default: () => intl_tel_input_default\n });\n\n // src/js/intl-tel-input/data.ts\n var rawCountryData = [\n [\n \"af\",\n // Afghanistan\n \"93\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ax\",\n // \u00C5land Islands\n \"358\",\n 1,\n [\"18\", \"4\"],\n // (4 is a mobile range shared with FI)\n \"0\"\n ],\n [\n \"al\",\n // Albania\n \"355\",\n 0,\n null,\n \"0\"\n ],\n [\n \"dz\",\n // Algeria\n \"213\",\n 0,\n null,\n \"0\"\n ],\n [\n \"as\",\n // American Samoa\n \"1\",\n 5,\n [\"684\"],\n \"1\"\n ],\n [\n \"ad\",\n // Andorra\n \"376\"\n ],\n [\n \"ao\",\n // Angola\n \"244\"\n ],\n [\n \"ai\",\n // Anguilla\n \"1\",\n 6,\n [\"264\"],\n \"1\"\n ],\n [\n \"ag\",\n // Antigua and Barbuda\n \"1\",\n 7,\n [\"268\"],\n \"1\"\n ],\n [\n \"ar\",\n // Argentina\n \"54\",\n 0,\n null,\n \"0\"\n ],\n [\n \"am\",\n // Armenia\n \"374\",\n 0,\n null,\n \"0\"\n ],\n [\n \"aw\",\n // Aruba\n \"297\"\n ],\n [\n \"ac\",\n // Ascension Island\n \"247\"\n ],\n [\n \"au\",\n // Australia\n \"61\",\n 0,\n [\"4\"],\n // (mobile range shared with CX and CC)\n \"0\"\n ],\n [\n \"at\",\n // Austria\n \"43\",\n 0,\n null,\n \"0\"\n ],\n [\n \"az\",\n // Azerbaijan\n \"994\",\n 0,\n null,\n \"0\"\n ],\n [\n \"bs\",\n // Bahamas\n \"1\",\n 8,\n [\"242\"],\n \"1\"\n ],\n [\n \"bh\",\n // Bahrain\n \"973\"\n ],\n [\n \"bd\",\n // Bangladesh\n \"880\",\n 0,\n null,\n \"0\"\n ],\n [\n \"bb\",\n // Barbados\n \"1\",\n 9,\n [\"246\"],\n \"1\"\n ],\n [\n \"by\",\n // Belarus\n \"375\",\n 0,\n null,\n \"8\"\n ],\n [\n \"be\",\n // Belgium\n \"32\",\n 0,\n null,\n \"0\"\n ],\n [\n \"bz\",\n // Belize\n \"501\"\n ],\n [\n \"bj\",\n // Benin\n \"229\"\n ],\n [\n \"bm\",\n // Bermuda\n \"1\",\n 10,\n [\"441\"],\n \"1\"\n ],\n [\n \"bt\",\n // Bhutan\n \"975\"\n ],\n [\n \"bo\",\n // Bolivia\n \"591\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ba\",\n // Bosnia and Herzegovina\n \"387\",\n 0,\n null,\n \"0\"\n ],\n [\n \"bw\",\n // Botswana\n \"267\"\n ],\n [\n \"br\",\n // Brazil\n \"55\",\n 0,\n null,\n \"0\"\n ],\n [\n \"io\",\n // British Indian Ocean Territory\n \"246\"\n ],\n [\n \"vg\",\n // British Virgin Islands\n \"1\",\n 11,\n [\"284\"],\n \"1\"\n ],\n [\n \"bn\",\n // Brunei\n \"673\"\n ],\n [\n \"bg\",\n // Bulgaria\n \"359\",\n 0,\n null,\n \"0\"\n ],\n [\n \"bf\",\n // Burkina Faso\n \"226\"\n ],\n [\n \"bi\",\n // Burundi\n \"257\"\n ],\n [\n \"kh\",\n // Cambodia\n \"855\",\n 0,\n null,\n \"0\"\n ],\n [\n \"cm\",\n // Cameroon\n \"237\"\n ],\n [\n \"ca\",\n // Canada\n \"1\",\n 1,\n [\"204\", \"226\", \"236\", \"249\", \"250\", \"257\", \"263\", \"289\", \"306\", \"343\", \"354\", \"365\", \"367\", \"368\", \"382\", \"403\", \"416\", \"418\", \"428\", \"431\", \"437\", \"438\", \"450\", \"468\", \"474\", \"506\", \"514\", \"519\", \"548\", \"579\", \"581\", \"584\", \"587\", \"604\", \"613\", \"639\", \"647\", \"672\", \"683\", \"705\", \"709\", \"742\", \"753\", \"778\", \"780\", \"782\", \"807\", \"819\", \"825\", \"867\", \"873\", \"879\", \"902\", \"905\", \"942\"],\n \"1\"\n ],\n [\n \"cv\",\n // Cape Verde\n \"238\"\n ],\n [\n \"bq\",\n // Caribbean Netherlands\n \"599\",\n 1,\n [\"3\", \"4\", \"7\"]\n ],\n [\n \"ky\",\n // Cayman Islands\n \"1\",\n 12,\n [\"345\"],\n \"1\"\n ],\n [\n \"cf\",\n // Central African Republic\n \"236\"\n ],\n [\n \"td\",\n // Chad\n \"235\"\n ],\n [\n \"cl\",\n // Chile\n \"56\"\n ],\n [\n \"cn\",\n // China\n \"86\",\n 0,\n null,\n \"0\"\n ],\n [\n \"cx\",\n // Christmas Island\n \"61\",\n 2,\n [\"4\", \"89164\"],\n // (4 is a mobile range shared with AU and CC)\n \"0\"\n ],\n [\n \"cc\",\n // Cocos (Keeling) Islands\n \"61\",\n 1,\n [\"4\", \"89162\"],\n // (4 is a mobile range shared with AU and CX)\n \"0\"\n ],\n [\n \"co\",\n // Colombia\n \"57\",\n 0,\n null,\n \"0\"\n ],\n [\n \"km\",\n // Comoros\n \"269\"\n ],\n [\n \"cg\",\n // Congo (Brazzaville)\n \"242\"\n ],\n [\n \"cd\",\n // Congo (Kinshasa)\n \"243\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ck\",\n // Cook Islands\n \"682\"\n ],\n [\n \"cr\",\n // Costa Rica\n \"506\"\n ],\n [\n \"ci\",\n // C\u00F4te d'Ivoire\n \"225\"\n ],\n [\n \"hr\",\n // Croatia\n \"385\",\n 0,\n null,\n \"0\"\n ],\n [\n \"cu\",\n // Cuba\n \"53\",\n 0,\n null,\n \"0\"\n ],\n [\n \"cw\",\n // Cura\u00E7ao\n \"599\",\n 0\n ],\n [\n \"cy\",\n // Cyprus\n \"357\"\n ],\n [\n \"cz\",\n // Czech Republic\n \"420\"\n ],\n [\n \"dk\",\n // Denmark\n \"45\"\n ],\n [\n \"dj\",\n // Djibouti\n \"253\"\n ],\n [\n \"dm\",\n // Dominica\n \"1\",\n 13,\n [\"767\"],\n \"1\"\n ],\n [\n \"do\",\n // Dominican Republic\n \"1\",\n 2,\n [\"809\", \"829\", \"849\"],\n \"1\"\n ],\n [\n \"ec\",\n // Ecuador\n \"593\",\n 0,\n null,\n \"0\"\n ],\n [\n \"eg\",\n // Egypt\n \"20\",\n 0,\n null,\n \"0\"\n ],\n [\n \"sv\",\n // El Salvador\n \"503\"\n ],\n [\n \"gq\",\n // Equatorial Guinea\n \"240\"\n ],\n [\n \"er\",\n // Eritrea\n \"291\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ee\",\n // Estonia\n \"372\"\n ],\n [\n \"sz\",\n // Eswatini\n \"268\"\n ],\n [\n \"et\",\n // Ethiopia\n \"251\",\n 0,\n null,\n \"0\"\n ],\n [\n \"fk\",\n // Falkland Islands (Malvinas)\n \"500\"\n ],\n [\n \"fo\",\n // Faroe Islands\n \"298\"\n ],\n [\n \"fj\",\n // Fiji\n \"679\"\n ],\n [\n \"fi\",\n // Finland\n \"358\",\n 0,\n [\"4\"],\n // (mobile range shared with AX)\n \"0\"\n ],\n [\n \"fr\",\n // France\n \"33\",\n 0,\n null,\n \"0\"\n ],\n [\n \"gf\",\n // French Guiana\n \"594\",\n 0,\n null,\n \"0\"\n ],\n [\n \"pf\",\n // French Polynesia\n \"689\"\n ],\n [\n \"ga\",\n // Gabon\n \"241\"\n ],\n [\n \"gm\",\n // Gambia\n \"220\"\n ],\n [\n \"ge\",\n // Georgia\n \"995\",\n 0,\n null,\n \"0\"\n ],\n [\n \"de\",\n // Germany\n \"49\",\n 0,\n null,\n \"0\"\n ],\n [\n \"gh\",\n // Ghana\n \"233\",\n 0,\n null,\n \"0\"\n ],\n [\n \"gi\",\n // Gibraltar\n \"350\"\n ],\n [\n \"gr\",\n // Greece\n \"30\"\n ],\n [\n \"gl\",\n // Greenland\n \"299\"\n ],\n [\n \"gd\",\n // Grenada\n \"1\",\n 14,\n [\"473\"],\n \"1\"\n ],\n [\n \"gp\",\n // Guadeloupe\n \"590\",\n 0,\n null,\n \"0\"\n ],\n [\n \"gu\",\n // Guam\n \"1\",\n 15,\n [\"671\"],\n \"1\"\n ],\n [\n \"gt\",\n // Guatemala\n \"502\"\n ],\n [\n \"gg\",\n // Guernsey\n \"44\",\n 1,\n [\"1481\", \"7781\", \"7839\", \"7911\"],\n \"0\"\n ],\n [\n \"gn\",\n // Guinea\n \"224\"\n ],\n [\n \"gw\",\n // Guinea-Bissau\n \"245\"\n ],\n [\n \"gy\",\n // Guyana\n \"592\"\n ],\n [\n \"ht\",\n // Haiti\n \"509\"\n ],\n [\n \"hn\",\n // Honduras\n \"504\"\n ],\n [\n \"hk\",\n // Hong Kong SAR China\n \"852\"\n ],\n [\n \"hu\",\n // Hungary\n \"36\",\n 0,\n null,\n \"06\"\n ],\n [\n \"is\",\n // Iceland\n \"354\"\n ],\n [\n \"in\",\n // India\n \"91\",\n 0,\n null,\n \"0\"\n ],\n [\n \"id\",\n // Indonesia\n \"62\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ir\",\n // Iran\n \"98\",\n 0,\n null,\n \"0\"\n ],\n [\n \"iq\",\n // Iraq\n \"964\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ie\",\n // Ireland\n \"353\",\n 0,\n null,\n \"0\"\n ],\n [\n \"im\",\n // Isle of Man\n \"44\",\n 2,\n [\"1624\", \"74576\", \"7524\", \"7624\", \"7924\"],\n \"0\"\n ],\n [\n \"il\",\n // Israel\n \"972\",\n 0,\n null,\n \"0\"\n ],\n [\n \"it\",\n // Italy\n \"39\",\n 0,\n [\"3\"]\n // (mobile range shared with VA)\n ],\n [\n \"jm\",\n // Jamaica\n \"1\",\n 4,\n [\"658\", \"876\"],\n \"1\"\n ],\n [\n \"jp\",\n // Japan\n \"81\",\n 0,\n null,\n \"0\"\n ],\n [\n \"je\",\n // Jersey\n \"44\",\n 3,\n [\"1534\", \"7509\", \"7700\", \"7797\", \"7829\", \"7937\"],\n \"0\"\n ],\n [\n \"jo\",\n // Jordan\n \"962\",\n 0,\n null,\n \"0\"\n ],\n [\n \"kz\",\n // Kazakhstan\n \"7\",\n 1,\n [\"33\", \"7\"],\n // (33 is shared with RU)\n \"8\"\n ],\n [\n \"ke\",\n // Kenya\n \"254\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ki\",\n // Kiribati\n \"686\",\n 0,\n null,\n \"0\"\n ],\n [\n \"xk\",\n // Kosovo\n \"383\",\n 0,\n null,\n \"0\"\n ],\n [\n \"kw\",\n // Kuwait\n \"965\"\n ],\n [\n \"kg\",\n // Kyrgyzstan\n \"996\",\n 0,\n null,\n \"0\"\n ],\n [\n \"la\",\n // Laos\n \"856\",\n 0,\n null,\n \"0\"\n ],\n [\n \"lv\",\n // Latvia\n \"371\"\n ],\n [\n \"lb\",\n // Lebanon\n \"961\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ls\",\n // Lesotho\n \"266\"\n ],\n [\n \"lr\",\n // Liberia\n \"231\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ly\",\n // Libya\n \"218\",\n 0,\n null,\n \"0\"\n ],\n [\n \"li\",\n // Liechtenstein\n \"423\",\n 0,\n null,\n \"0\"\n ],\n [\n \"lt\",\n // Lithuania\n \"370\",\n 0,\n null,\n \"0\"\n ],\n [\n \"lu\",\n // Luxembourg\n \"352\"\n ],\n [\n \"mo\",\n // Macao SAR China\n \"853\"\n ],\n [\n \"mg\",\n // Madagascar\n \"261\",\n 0,\n null,\n \"0\"\n ],\n [\n \"mw\",\n // Malawi\n \"265\",\n 0,\n null,\n \"0\"\n ],\n [\n \"my\",\n // Malaysia\n \"60\",\n 0,\n null,\n \"0\"\n ],\n [\n \"mv\",\n // Maldives\n \"960\"\n ],\n [\n \"ml\",\n // Mali\n \"223\"\n ],\n [\n \"mt\",\n // Malta\n \"356\"\n ],\n [\n \"mh\",\n // Marshall Islands\n \"692\",\n 0,\n null,\n \"1\"\n ],\n [\n \"mq\",\n // Martinique\n \"596\",\n 0,\n null,\n \"0\"\n ],\n [\n \"mr\",\n // Mauritania\n \"222\"\n ],\n [\n \"mu\",\n // Mauritius\n \"230\"\n ],\n [\n \"yt\",\n // Mayotte\n \"262\",\n 1,\n [\"269\", \"639\"],\n \"0\"\n ],\n [\n \"mx\",\n // Mexico\n \"52\"\n ],\n [\n \"fm\",\n // Micronesia\n \"691\"\n ],\n [\n \"md\",\n // Moldova\n \"373\",\n 0,\n null,\n \"0\"\n ],\n [\n \"mc\",\n // Monaco\n \"377\",\n 0,\n null,\n \"0\"\n ],\n [\n \"mn\",\n // Mongolia\n \"976\",\n 0,\n null,\n \"0\"\n ],\n [\n \"me\",\n // Montenegro\n \"382\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ms\",\n // Montserrat\n \"1\",\n 16,\n [\"664\"],\n \"1\"\n ],\n [\n \"ma\",\n // Morocco\n \"212\",\n 0,\n [\"6\", \"7\"],\n // (mobile ranges shared with EH)\n \"0\"\n ],\n [\n \"mz\",\n // Mozambique\n \"258\"\n ],\n [\n \"mm\",\n // Myanmar (Burma)\n \"95\",\n 0,\n null,\n \"0\"\n ],\n [\n \"na\",\n // Namibia\n \"264\",\n 0,\n null,\n \"0\"\n ],\n [\n \"nr\",\n // Nauru\n \"674\"\n ],\n [\n \"np\",\n // Nepal\n \"977\",\n 0,\n null,\n \"0\"\n ],\n [\n \"nl\",\n // Netherlands\n \"31\",\n 0,\n null,\n \"0\"\n ],\n [\n \"nc\",\n // New Caledonia\n \"687\"\n ],\n [\n \"nz\",\n // New Zealand\n \"64\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ni\",\n // Nicaragua\n \"505\"\n ],\n [\n \"ne\",\n // Niger\n \"227\"\n ],\n [\n \"ng\",\n // Nigeria\n \"234\",\n 0,\n null,\n \"0\"\n ],\n [\n \"nu\",\n // Niue\n \"683\"\n ],\n [\n \"nf\",\n // Norfolk Island\n \"672\"\n ],\n [\n \"kp\",\n // North Korea\n \"850\",\n 0,\n null,\n \"0\"\n ],\n [\n \"mk\",\n // North Macedonia\n \"389\",\n 0,\n null,\n \"0\"\n ],\n [\n \"mp\",\n // Northern Mariana Islands\n \"1\",\n 17,\n [\"670\"],\n \"1\"\n ],\n [\n \"no\",\n // Norway\n \"47\",\n 0,\n [\"4\", \"9\"]\n // (mobile ranges shared with SJ)\n ],\n [\n \"om\",\n // Oman\n \"968\"\n ],\n [\n \"pk\",\n // Pakistan\n \"92\",\n 0,\n null,\n \"0\"\n ],\n [\n \"pw\",\n // Palau\n \"680\"\n ],\n [\n \"ps\",\n // Palestinian Territories\n \"970\",\n 0,\n null,\n \"0\"\n ],\n [\n \"pa\",\n // Panama\n \"507\"\n ],\n [\n \"pg\",\n // Papua New Guinea\n \"675\"\n ],\n [\n \"py\",\n // Paraguay\n \"595\",\n 0,\n null,\n \"0\"\n ],\n [\n \"pe\",\n // Peru\n \"51\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ph\",\n // Philippines\n \"63\",\n 0,\n null,\n \"0\"\n ],\n [\n \"pl\",\n // Poland\n \"48\"\n ],\n [\n \"pt\",\n // Portugal\n \"351\"\n ],\n [\n \"pr\",\n // Puerto Rico\n \"1\",\n 3,\n [\"787\", \"939\"],\n \"1\"\n ],\n [\n \"qa\",\n // Qatar\n \"974\"\n ],\n [\n \"re\",\n // R\u00E9union\n \"262\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ro\",\n // Romania\n \"40\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ru\",\n // Russia\n \"7\",\n 0,\n [\"33\"],\n // (shared with KZ)\n \"8\"\n ],\n [\n \"rw\",\n // Rwanda\n \"250\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ws\",\n // Samoa\n \"685\"\n ],\n [\n \"sm\",\n // San Marino\n \"378\"\n ],\n [\n \"st\",\n // S\u00E3o Tom\u00E9 & Pr\u00EDncipe\n \"239\"\n ],\n [\n \"sa\",\n // Saudi Arabia\n \"966\",\n 0,\n null,\n \"0\"\n ],\n [\n \"sn\",\n // Senegal\n \"221\"\n ],\n [\n \"rs\",\n // Serbia\n \"381\",\n 0,\n null,\n \"0\"\n ],\n [\n \"sc\",\n // Seychelles\n \"248\"\n ],\n [\n \"sl\",\n // Sierra Leone\n \"232\",\n 0,\n null,\n \"0\"\n ],\n [\n \"sg\",\n // Singapore\n \"65\"\n ],\n [\n \"sx\",\n // Sint Maarten\n \"1\",\n 21,\n [\"721\"],\n \"1\"\n ],\n [\n \"sk\",\n // Slovakia\n \"421\",\n 0,\n null,\n \"0\"\n ],\n [\n \"si\",\n // Slovenia\n \"386\",\n 0,\n null,\n \"0\"\n ],\n [\n \"sb\",\n // Solomon Islands\n \"677\"\n ],\n [\n \"so\",\n // Somalia\n \"252\",\n 0,\n null,\n \"0\"\n ],\n [\n \"za\",\n // South Africa\n \"27\",\n 0,\n null,\n \"0\"\n ],\n [\n \"kr\",\n // South Korea\n \"82\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ss\",\n // South Sudan\n \"211\",\n 0,\n null,\n \"0\"\n ],\n [\n \"es\",\n // Spain\n \"34\"\n ],\n [\n \"lk\",\n // Sri Lanka\n \"94\",\n 0,\n null,\n \"0\"\n ],\n [\n \"bl\",\n // St. Barth\u00E9lemy\n \"590\",\n 1,\n null,\n \"0\"\n ],\n [\n \"sh\",\n // St. Helena\n \"290\"\n ],\n [\n \"kn\",\n // St. Kitts & Nevis\n \"1\",\n 18,\n [\"869\"],\n \"1\"\n ],\n [\n \"lc\",\n // St. Lucia\n \"1\",\n 19,\n [\"758\"],\n \"1\"\n ],\n [\n \"mf\",\n // St. Martin\n \"590\",\n 2,\n null,\n \"0\"\n ],\n [\n \"pm\",\n // St. Pierre & Miquelon\n \"508\",\n 0,\n null,\n \"0\"\n ],\n [\n \"vc\",\n // St. Vincent & Grenadines\n \"1\",\n 20,\n [\"784\"],\n \"1\"\n ],\n [\n \"sd\",\n // Sudan\n \"249\",\n 0,\n null,\n \"0\"\n ],\n [\n \"sr\",\n // Suriname\n \"597\"\n ],\n [\n \"sj\",\n // Svalbard & Jan Mayen\n \"47\",\n 1,\n [\"4\", \"79\", \"9\"]\n // (4 and 9 are mobile ranges shared with NO)\n ],\n [\n \"se\",\n // Sweden\n \"46\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ch\",\n // Switzerland\n \"41\",\n 0,\n null,\n \"0\"\n ],\n [\n \"sy\",\n // Syria\n \"963\",\n 0,\n null,\n \"0\"\n ],\n [\n \"tw\",\n // Taiwan\n \"886\",\n 0,\n null,\n \"0\"\n ],\n [\n \"tj\",\n // Tajikistan\n \"992\"\n ],\n [\n \"tz\",\n // Tanzania\n \"255\",\n 0,\n null,\n \"0\"\n ],\n [\n \"th\",\n // Thailand\n \"66\",\n 0,\n null,\n \"0\"\n ],\n [\n \"tl\",\n // Timor-Leste\n \"670\"\n ],\n [\n \"tg\",\n // Togo\n \"228\"\n ],\n [\n \"tk\",\n // Tokelau\n \"690\"\n ],\n [\n \"to\",\n // Tonga\n \"676\"\n ],\n [\n \"tt\",\n // Trinidad & Tobago\n \"1\",\n 22,\n [\"868\"],\n \"1\"\n ],\n [\n \"tn\",\n // Tunisia\n \"216\"\n ],\n [\n \"tr\",\n // Turkey\n \"90\",\n 0,\n null,\n \"0\"\n ],\n [\n \"tm\",\n // Turkmenistan\n \"993\",\n 0,\n null,\n \"8\"\n ],\n [\n \"tc\",\n // Turks & Caicos Islands\n \"1\",\n 23,\n [\"649\"],\n \"1\"\n ],\n [\n \"tv\",\n // Tuvalu\n \"688\"\n ],\n [\n \"vi\",\n // U.S. Virgin Islands\n \"1\",\n 24,\n [\"340\"],\n \"1\"\n ],\n [\n \"ug\",\n // Uganda\n \"256\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ua\",\n // Ukraine\n \"380\",\n 0,\n null,\n \"0\"\n ],\n [\n \"ae\",\n // United Arab Emirates\n \"971\",\n 0,\n null,\n \"0\"\n ],\n [\n \"gb\",\n // United Kingdom\n \"44\",\n 0,\n null,\n \"0\"\n ],\n [\n \"us\",\n // United States\n \"1\",\n 0,\n null,\n \"1\"\n ],\n [\n \"uy\",\n // Uruguay\n \"598\",\n 0,\n null,\n \"0\"\n ],\n [\n \"uz\",\n // Uzbekistan\n \"998\"\n ],\n [\n \"vu\",\n // Vanuatu\n \"678\"\n ],\n [\n \"va\",\n // Vatican City\n \"39\",\n 1,\n [\"06698\", \"3\"]\n // (3 is a mobile range shared with IT)\n ],\n [\n \"ve\",\n // Venezuela\n \"58\",\n 0,\n null,\n \"0\"\n ],\n [\n \"vn\",\n // Vietnam\n \"84\",\n 0,\n null,\n \"0\"\n ],\n [\n \"wf\",\n // Wallis & Futuna\n \"681\"\n ],\n [\n \"eh\",\n // Western Sahara\n \"212\",\n 1,\n [\"5288\", \"5289\", \"6\", \"7\"],\n // (6 and 7 are mobile ranges shared with MA)\n \"0\"\n ],\n [\n \"ye\",\n // Yemen\n \"967\",\n 0,\n null,\n \"0\"\n ],\n [\n \"zm\",\n // Zambia\n \"260\",\n 0,\n null,\n \"0\"\n ],\n [\n \"zw\",\n // Zimbabwe\n \"263\",\n 0,\n null,\n \"0\"\n ]\n ];\n var allCountries = [];\n for (const c of rawCountryData) {\n allCountries.push({\n name: \"\",\n // populated in the plugin\n iso2: c[0],\n dialCode: c[1],\n priority: c[2] || 0,\n areaCodes: c[3] || null,\n nodeById: {},\n // populated by the plugin\n nationalPrefix: c[4] || null,\n normalisedName: \"\",\n // populated in the plugin\n initials: \"\",\n // populated in the plugin\n dialCodePlus: \"\"\n // populated in the plugin\n });\n }\n var data_default = allCountries;\n\n // src/js/intl-tel-input/i18n/en/countries.ts\n var countryTranslations = {\n ad: \"Andorra\",\n ae: \"United Arab Emirates\",\n af: \"Afghanistan\",\n ag: \"Antigua & Barbuda\",\n ai: \"Anguilla\",\n al: \"Albania\",\n am: \"Armenia\",\n ao: \"Angola\",\n ar: \"Argentina\",\n as: \"American Samoa\",\n at: \"Austria\",\n au: \"Australia\",\n aw: \"Aruba\",\n ax: \"\\xC5land Islands\",\n az: \"Azerbaijan\",\n ba: \"Bosnia & Herzegovina\",\n bb: \"Barbados\",\n bd: \"Bangladesh\",\n be: \"Belgium\",\n bf: \"Burkina Faso\",\n bg: \"Bulgaria\",\n bh: \"Bahrain\",\n bi: \"Burundi\",\n bj: \"Benin\",\n bl: \"St. Barth\\xE9lemy\",\n bm: \"Bermuda\",\n bn: \"Brunei\",\n bo: \"Bolivia\",\n bq: \"Caribbean Netherlands\",\n br: \"Brazil\",\n bs: \"Bahamas\",\n bt: \"Bhutan\",\n bw: \"Botswana\",\n by: \"Belarus\",\n bz: \"Belize\",\n ca: \"Canada\",\n cc: \"Cocos (Keeling) Islands\",\n cd: \"Congo - Kinshasa\",\n cf: \"Central African Republic\",\n cg: \"Congo - Brazzaville\",\n ch: \"Switzerland\",\n ci: \"C\\xF4te d\\u2019Ivoire\",\n ck: \"Cook Islands\",\n cl: \"Chile\",\n cm: \"Cameroon\",\n cn: \"China\",\n co: \"Colombia\",\n cr: \"Costa Rica\",\n cu: \"Cuba\",\n cv: \"Cape Verde\",\n cw: \"Cura\\xE7ao\",\n cx: \"Christmas Island\",\n cy: \"Cyprus\",\n cz: \"Czechia\",\n de: \"Germany\",\n dj: \"Djibouti\",\n dk: \"Denmark\",\n dm: \"Dominica\",\n do: \"Dominican Republic\",\n dz: \"Algeria\",\n ec: \"Ecuador\",\n ee: \"Estonia\",\n eg: \"Egypt\",\n eh: \"Western Sahara\",\n er: \"Eritrea\",\n es: \"Spain\",\n et: \"Ethiopia\",\n fi: \"Finland\",\n fj: \"Fiji\",\n fk: \"Falkland Islands\",\n fm: \"Micronesia\",\n fo: \"Faroe Islands\",\n fr: \"France\",\n ga: \"Gabon\",\n gb: \"United Kingdom\",\n gd: \"Grenada\",\n ge: \"Georgia\",\n gf: \"French Guiana\",\n gg: \"Guernsey\",\n gh: \"Ghana\",\n gi: \"Gibraltar\",\n gl: \"Greenland\",\n gm: \"Gambia\",\n gn: \"Guinea\",\n gp: \"Guadeloupe\",\n gq: \"Equatorial Guinea\",\n gr: \"Greece\",\n gt: \"Guatemala\",\n gu: \"Guam\",\n gw: \"Guinea-Bissau\",\n gy: \"Guyana\",\n hk: \"Hong Kong SAR China\",\n hn: \"Honduras\",\n hr: \"Croatia\",\n ht: \"Haiti\",\n hu: \"Hungary\",\n id: \"Indonesia\",\n ie: \"Ireland\",\n il: \"Israel\",\n im: \"Isle of Man\",\n in: \"India\",\n io: \"British Indian Ocean Territory\",\n iq: \"Iraq\",\n ir: \"Iran\",\n is: \"Iceland\",\n it: \"Italy\",\n je: \"Jersey\",\n jm: \"Jamaica\",\n jo: \"Jordan\",\n jp: \"Japan\",\n ke: \"Kenya\",\n kg: \"Kyrgyzstan\",\n kh: \"Cambodia\",\n ki: \"Kiribati\",\n km: \"Comoros\",\n kn: \"St. Kitts & Nevis\",\n kp: \"North Korea\",\n kr: \"South Korea\",\n kw: \"Kuwait\",\n ky: \"Cayman Islands\",\n kz: \"Kazakhstan\",\n la: \"Laos\",\n lb: \"Lebanon\",\n lc: \"St. Lucia\",\n li: \"Liechtenstein\",\n lk: \"Sri Lanka\",\n lr: \"Liberia\",\n ls: \"Lesotho\",\n lt: \"Lithuania\",\n lu: \"Luxembourg\",\n lv: \"Latvia\",\n ly: \"Libya\",\n ma: \"Morocco\",\n mc: \"Monaco\",\n md: \"Moldova\",\n me: \"Montenegro\",\n mf: \"St. Martin\",\n mg: \"Madagascar\",\n mh: \"Marshall Islands\",\n mk: \"North Macedonia\",\n ml: \"Mali\",\n mm: \"Myanmar (Burma)\",\n mn: \"Mongolia\",\n mo: \"Macao SAR China\",\n mp: \"Northern Mariana Islands\",\n mq: \"Martinique\",\n mr: \"Mauritania\",\n ms: \"Montserrat\",\n mt: \"Malta\",\n mu: \"Mauritius\",\n mv: \"Maldives\",\n mw: \"Malawi\",\n mx: \"Mexico\",\n my: \"Malaysia\",\n mz: \"Mozambique\",\n na: \"Namibia\",\n nc: \"New Caledonia\",\n ne: \"Niger\",\n nf: \"Norfolk Island\",\n ng: \"Nigeria\",\n ni: \"Nicaragua\",\n nl: \"Netherlands\",\n no: \"Norway\",\n np: \"Nepal\",\n nr: \"Nauru\",\n nu: \"Niue\",\n nz: \"New Zealand\",\n om: \"Oman\",\n pa: \"Panama\",\n pe: \"Peru\",\n pf: \"French Polynesia\",\n pg: \"Papua New Guinea\",\n ph: \"Philippines\",\n pk: \"Pakistan\",\n pl: \"Poland\",\n pm: \"St. Pierre & Miquelon\",\n pr: \"Puerto Rico\",\n ps: \"Palestinian Territories\",\n pt: \"Portugal\",\n pw: \"Palau\",\n py: \"Paraguay\",\n qa: \"Qatar\",\n re: \"R\\xE9union\",\n ro: \"Romania\",\n rs: \"Serbia\",\n ru: \"Russia\",\n rw: \"Rwanda\",\n sa: \"Saudi Arabia\",\n sb: \"Solomon Islands\",\n sc: \"Seychelles\",\n sd: \"Sudan\",\n se: \"Sweden\",\n sg: \"Singapore\",\n sh: \"St. Helena\",\n si: \"Slovenia\",\n sj: \"Svalbard & Jan Mayen\",\n sk: \"Slovakia\",\n sl: \"Sierra Leone\",\n sm: \"San Marino\",\n sn: \"Senegal\",\n so: \"Somalia\",\n sr: \"Suriname\",\n ss: \"South Sudan\",\n st: \"S\\xE3o Tom\\xE9 & Pr\\xEDncipe\",\n sv: \"El Salvador\",\n sx: \"Sint Maarten\",\n sy: \"Syria\",\n sz: \"Eswatini\",\n tc: \"Turks & Caicos Islands\",\n td: \"Chad\",\n tg: \"Togo\",\n th: \"Thailand\",\n tj: \"Tajikistan\",\n tk: \"Tokelau\",\n tl: \"Timor-Leste\",\n tm: \"Turkmenistan\",\n tn: \"Tunisia\",\n to: \"Tonga\",\n tr: \"Turkey\",\n tt: \"Trinidad & Tobago\",\n tv: \"Tuvalu\",\n tw: \"Taiwan\",\n tz: \"Tanzania\",\n ua: \"Ukraine\",\n ug: \"Uganda\",\n us: \"United States\",\n uy: \"Uruguay\",\n uz: \"Uzbekistan\",\n va: \"Vatican City\",\n vc: \"St. Vincent & Grenadines\",\n ve: \"Venezuela\",\n vg: \"British Virgin Islands\",\n vi: \"U.S. Virgin Islands\",\n vn: \"Vietnam\",\n vu: \"Vanuatu\",\n wf: \"Wallis & Futuna\",\n ws: \"Samoa\",\n ye: \"Yemen\",\n yt: \"Mayotte\",\n za: \"South Africa\",\n zm: \"Zambia\",\n zw: \"Zimbabwe\"\n };\n var countries_default = countryTranslations;\n\n // src/js/intl-tel-input/i18n/en/interface.ts\n var interfaceTranslations = {\n selectedCountryAriaLabel: \"Change country, selected ${countryName} (${dialCode})\",\n noCountrySelected: \"Select country\",\n countryListAriaLabel: \"List of countries\",\n searchPlaceholder: \"Search\",\n clearSearchAriaLabel: \"Clear search\",\n zeroSearchResults: \"No results found\",\n oneSearchResult: \"1 result found\",\n multipleSearchResults: \"${count} results found\",\n // additional countries (not supported by country-list library)\n ac: \"Ascension Island\",\n xk: \"Kosovo\"\n };\n var interface_default = interfaceTranslations;\n\n // src/js/intl-tel-input/i18n/en/index.ts\n var allTranslations = { ...countries_default, ...interface_default };\n var en_default = allTranslations;\n\n // src/js/modules/constants.ts\n var EVENTS = {\n OPEN_COUNTRY_DROPDOWN: \"open:countrydropdown\",\n CLOSE_COUNTRY_DROPDOWN: \"close:countrydropdown\",\n COUNTRY_CHANGE: \"countrychange\",\n INPUT: \"input\"\n // used for synthetic input trigger\n };\n var CLASSES = {\n HIDE: \"iti__hide\",\n V_HIDE: \"iti__v-hide\",\n ARROW_UP: \"iti__arrow--up\",\n GLOBE: \"iti__globe\",\n FLAG: \"iti__flag\",\n COUNTRY_ITEM: \"iti__country\",\n HIGHLIGHT: \"iti__highlight\"\n };\n var KEYS = {\n ARROW_UP: \"ArrowUp\",\n ARROW_DOWN: \"ArrowDown\",\n SPACE: \" \",\n ENTER: \"Enter\",\n ESC: \"Escape\",\n TAB: \"Tab\"\n };\n var INPUT_TYPES = {\n PASTE: \"insertFromPaste\",\n DELETE_FWD: \"deleteContentForward\"\n };\n var REGEX = {\n ALPHA_UNICODE: /\\p{L}/u,\n // any kind of letter from any language\n NON_PLUS_NUMERIC: /[^+0-9]/,\n // chars that are NOT + or digit\n NON_PLUS_NUMERIC_GLOBAL: /[^+0-9]/g,\n // chars that are NOT + or digit (global)\n HIDDEN_SEARCH_CHAR: /^[a-zA-Z\u00C0-\u00FF\u0430-\u044F\u0410-\u042F ]$/\n // single acceptable hidden-search char\n };\n var TIMINGS = {\n SEARCH_DEBOUNCE_MS: 100,\n HIDDEN_SEARCH_RESET_MS: 1e3,\n NEXT_TICK: 0\n };\n var SENTINELS = {\n UNKNOWN_NUMBER_TYPE: -99,\n UNKNOWN_VALIDATION_ERROR: -99\n };\n var LAYOUT = {\n SANE_SELECTED_WITH_DIAL_WIDTH: 78,\n // px width fallback when separateDialCode enabled\n SANE_SELECTED_NO_DIAL_WIDTH: 42,\n // px width fallback when no separate dial code\n INPUT_PADDING_EXTRA_LEFT: 6\n // px gap between selected country container and input text\n };\n var DIAL = {\n PLUS: \"+\",\n NANP: \"1\"\n // North American Numbering Plan\n };\n var UK = {\n ISO2: \"gb\",\n DIAL_CODE: \"44\",\n // +44 United Kingdom\n MOBILE_PREFIX: \"7\",\n // UK mobile numbers start with 7 after national trunk (0) or core section\n MOBILE_CORE_LENGTH: 10\n // core number length (excluding dial code / national prefix) for mobiles\n };\n var US = {\n ISO2: \"us\",\n DIAL_CODE: \"1\"\n // +1 United States\n };\n var PLACEHOLDER_MODES = {\n AGGRESSIVE: \"aggressive\",\n POLITE: \"polite\",\n OFF: \"off\"\n };\n var INITIAL_COUNTRY = {\n AUTO: \"auto\"\n };\n var DATA_KEYS = {\n COUNTRY_CODE: \"countryCode\",\n DIAL_CODE: \"dialCode\"\n };\n var ARIA = {\n EXPANDED: \"aria-expanded\",\n LABEL: \"aria-label\",\n SELECTED: \"aria-selected\",\n ACTIVE_DESCENDANT: \"aria-activedescendant\",\n HASPOPUP: \"aria-haspopup\",\n CONTROLS: \"aria-controls\",\n HIDDEN: \"aria-hidden\",\n AUTOCOMPLETE: \"aria-autocomplete\",\n MODAL: \"aria-modal\"\n };\n\n // src/js/modules/core/options.ts\n var mq = (q) => typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" && window.matchMedia(q).matches;\n var computeDefaultUseFullscreenPopup = () => {\n if (typeof navigator !== \"undefined\" && typeof window !== \"undefined\") {\n const isMobileUserAgent = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n );\n const isNarrowViewport = mq(\"(max-width: 500px)\");\n const isShortViewport = mq(\"(max-height: 600px)\");\n const isCoarsePointer = mq(\"(pointer: coarse)\");\n return isMobileUserAgent || isNarrowViewport || isCoarsePointer && isShortViewport;\n }\n return false;\n };\n var defaults = {\n // Allow alphanumeric \"phonewords\" (e.g. +1 800 FLOWERS) as valid numbers\n allowPhonewords: false,\n //* Whether or not to allow the dropdown.\n allowDropdown: true,\n //* Add a placeholder in the input with an example number for the selected country.\n autoPlaceholder: PLACEHOLDER_MODES.POLITE,\n //* Modify the parentClass.\n containerClass: \"\",\n //* The order of the countries in the dropdown. Defaults to alphabetical.\n countryOrder: null,\n //* Add a country search input at the top of the dropdown.\n countrySearch: true,\n //* Modify the auto placeholder.\n customPlaceholder: null,\n //* Append menu to specified element.\n dropdownContainer: null,\n //* Don't display these countries.\n excludeCountries: [],\n //* Fix the dropdown width to the input width (rather than being as wide as the longest country name).\n fixDropdownWidth: true,\n //* Format the number as the user types\n formatAsYouType: true,\n //* Format the input value during initialisation and on setNumber.\n formatOnDisplay: true,\n //* geoIp lookup function.\n geoIpLookup: null,\n //* Inject a hidden input with the name returned from this function, and on submit, populate it with the result of getNumber.\n hiddenInput: null,\n //* Internationalise the plugin text e.g. search input placeholder, country names.\n i18n: {},\n //* Initial country.\n initialCountry: \"\",\n //* A function to load the utils script.\n loadUtils: null,\n //* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.\n nationalMode: true,\n //* Display only these countries.\n onlyCountries: [],\n //* Number type to use for placeholders.\n placeholderNumberType: \"MOBILE\",\n //* Show flags - for both the selected country, and in the country dropdown\n showFlags: true,\n //* Display the international dial code next to the selected flag.\n separateDialCode: false,\n //* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.\n strictMode: false,\n //* Use full screen popup instead of dropdown for country list.\n useFullscreenPopup: computeDefaultUseFullscreenPopup(),\n //* The number type to enforce during validation.\n validationNumberTypes: [\"MOBILE\"]\n };\n var applyOptionSideEffects = (o, defaultEnglishStrings) => {\n if (o.useFullscreenPopup) {\n o.fixDropdownWidth = false;\n }\n if (o.onlyCountries.length === 1) {\n o.initialCountry = o.onlyCountries[0];\n }\n if (o.separateDialCode) {\n o.nationalMode = false;\n }\n if (o.allowDropdown && !o.showFlags && !o.separateDialCode) {\n o.nationalMode = false;\n }\n if (o.useFullscreenPopup && !o.dropdownContainer) {\n o.dropdownContainer = document.body;\n }\n o.i18n = { ...defaultEnglishStrings, ...o.i18n };\n };\n\n // src/js/modules/utils/string.ts\n var getNumeric = (s) => s.replace(/\\D/g, \"\");\n var normaliseString = (s = \"\") => s.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\").toLowerCase();\n\n // src/js/modules/core/countrySearch.ts\n var getMatchedCountries = (countries, query) => {\n const normalisedQuery = normaliseString(query);\n const iso2Matches = [];\n const nameStartWith = [];\n const nameContains = [];\n const dialCodeMatches = [];\n const dialCodeContains = [];\n const initialsMatches = [];\n for (const c of countries) {\n if (c.iso2 === normalisedQuery) {\n iso2Matches.push(c);\n } else if (c.normalisedName.startsWith(normalisedQuery)) {\n nameStartWith.push(c);\n } else if (c.normalisedName.includes(normalisedQuery)) {\n nameContains.push(c);\n } else if (normalisedQuery === c.dialCode || normalisedQuery === c.dialCodePlus) {\n dialCodeMatches.push(c);\n } else if (c.dialCodePlus.includes(normalisedQuery)) {\n dialCodeContains.push(c);\n } else if (c.initials.includes(normalisedQuery)) {\n initialsMatches.push(c);\n }\n }\n const sortByPriority = (a, b) => a.priority - b.priority;\n return [\n ...iso2Matches.sort(sortByPriority),\n ...nameStartWith.sort(sortByPriority),\n ...nameContains.sort(sortByPriority),\n ...dialCodeMatches.sort(sortByPriority),\n ...dialCodeContains.sort(sortByPriority),\n ...initialsMatches.sort(sortByPriority)\n ];\n };\n var findFirstCountryStartingWith = (countries, query) => {\n const lowerQuery = query.toLowerCase();\n for (const c of countries) {\n const lowerName = c.name.toLowerCase();\n if (lowerName.startsWith(lowerQuery)) {\n return c;\n }\n }\n return null;\n };\n\n // src/js/modules/utils/dom.ts\n var buildClassNames = (flags) => Object.keys(flags).filter((k) => Boolean(flags[k])).join(\" \");\n var createEl = (tagName, attrs, container) => {\n const el = document.createElement(tagName);\n if (attrs) {\n Object.entries(attrs).forEach(\n ([key, value]) => el.setAttribute(key, value)\n );\n }\n if (container) {\n container.appendChild(el);\n }\n return el;\n };\n\n // src/js/modules/core/icons.ts\n var buildSearchIcon = () => `\n \n \n \n `;\n var buildClearIcon = (id2) => {\n const maskId = `iti-${id2}-clear-mask`;\n return `\n \n \n \n \n \n \n `;\n };\n\n // src/js/modules/core/ui.ts\n var UI = class {\n constructor(input, options, id2) {\n this.highlightedItem = null;\n this.selectedItem = null;\n input.dataset.intlTelInputId = id2.toString();\n this.telInput = input;\n this.options = options;\n this.id = id2;\n this.hadInitialPlaceholder = Boolean(input.getAttribute(\"placeholder\"));\n this.isRTL = !!this.telInput.closest(\"[dir=rtl]\");\n if (this.options.separateDialCode) {\n this.originalPaddingLeft = this.telInput.style.paddingLeft;\n }\n }\n //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.\n generateMarkup(countries) {\n this.countries = countries;\n this._prepareTelInput();\n const wrapper = this._createWrapperAndInsert();\n this._maybeBuildCountryContainer(wrapper);\n wrapper.appendChild(this.telInput);\n this._maybeUpdateInputPaddingAndReveal();\n this._maybeBuildHiddenInputs(wrapper);\n }\n _prepareTelInput() {\n this.telInput.classList.add(\"iti__tel-input\");\n if (!this.telInput.hasAttribute(\"autocomplete\") && !this.telInput.form?.hasAttribute(\"autocomplete\")) {\n this.telInput.setAttribute(\"autocomplete\", \"off\");\n }\n }\n _createWrapperAndInsert() {\n const { allowDropdown, showFlags, containerClass, useFullscreenPopup } = this.options;\n const parentClasses = buildClassNames({\n iti: true,\n \"iti--allow-dropdown\": allowDropdown,\n \"iti--show-flags\": showFlags,\n \"iti--inline-dropdown\": !useFullscreenPopup,\n [containerClass]: Boolean(containerClass)\n });\n const wrapper = createEl(\"div\", { class: parentClasses });\n if (this.isRTL) {\n wrapper.setAttribute(\"dir\", \"ltr\");\n }\n this.telInput.before(wrapper);\n return wrapper;\n }\n _maybeBuildCountryContainer(wrapper) {\n const { allowDropdown, separateDialCode, showFlags } = this.options;\n if (allowDropdown || showFlags || separateDialCode) {\n this.countryContainer = createEl(\n \"div\",\n // visibly hidden until we measure it's width to set the input padding correctly\n { class: `iti__country-container ${CLASSES.V_HIDE}` },\n wrapper\n );\n if (allowDropdown) {\n this.selectedCountry = createEl(\n \"button\",\n {\n type: \"button\",\n class: \"iti__selected-country\",\n [ARIA.EXPANDED]: \"false\",\n [ARIA.LABEL]: this.options.i18n.noCountrySelected,\n [ARIA.HASPOPUP]: \"dialog\",\n [ARIA.CONTROLS]: `iti-${this.id}__dropdown-content`\n },\n this.countryContainer\n );\n if (this.telInput.disabled) {\n this.selectedCountry.setAttribute(\"disabled\", \"true\");\n }\n } else {\n this.selectedCountry = createEl(\n \"div\",\n { class: \"iti__selected-country\" },\n this.countryContainer\n );\n }\n const selectedCountryPrimary = createEl(\n \"div\",\n { class: \"iti__selected-country-primary\" },\n this.selectedCountry\n );\n this.selectedCountryInner = createEl(\n \"div\",\n { class: CLASSES.FLAG },\n selectedCountryPrimary\n );\n if (allowDropdown) {\n this.dropdownArrow = createEl(\n \"div\",\n { class: \"iti__arrow\", [ARIA.HIDDEN]: \"true\" },\n selectedCountryPrimary\n );\n }\n if (separateDialCode) {\n this.selectedDialCode = createEl(\n \"div\",\n { class: \"iti__selected-dial-code\" },\n this.selectedCountry\n );\n }\n if (allowDropdown) {\n this._buildDropdownContent();\n }\n }\n }\n _buildDropdownContent() {\n const {\n fixDropdownWidth,\n useFullscreenPopup,\n countrySearch,\n i18n,\n dropdownContainer,\n containerClass\n } = this.options;\n const extraClasses = fixDropdownWidth ? \"\" : \"iti--flexible-dropdown-width\";\n this.dropdownContent = createEl(\"div\", {\n id: `iti-${this.id}__dropdown-content`,\n class: `iti__dropdown-content ${CLASSES.HIDE} ${extraClasses}`,\n role: \"dialog\",\n [ARIA.MODAL]: \"true\"\n });\n if (this.isRTL) {\n this.dropdownContent.setAttribute(\"dir\", \"rtl\");\n }\n if (countrySearch) {\n this._buildSearchUI();\n }\n this.countryList = createEl(\n \"ul\",\n {\n class: \"iti__country-list\",\n id: `iti-${this.id}__country-listbox`,\n role: \"listbox\",\n [ARIA.LABEL]: i18n.countryListAriaLabel\n },\n this.dropdownContent\n );\n this._appendListItems();\n if (countrySearch) {\n this.updateSearchResultsA11yText();\n }\n if (dropdownContainer) {\n const dropdownClasses = buildClassNames({\n iti: true,\n \"iti--container\": true,\n \"iti--fullscreen-popup\": useFullscreenPopup,\n \"iti--inline-dropdown\": !useFullscreenPopup,\n [containerClass]: Boolean(containerClass)\n });\n this.dropdown = createEl(\"div\", { class: dropdownClasses });\n this.dropdown.appendChild(this.dropdownContent);\n } else {\n this.countryContainer.appendChild(this.dropdownContent);\n }\n }\n _buildSearchUI() {\n const { i18n } = this.options;\n const searchWrapper = createEl(\n \"div\",\n { class: \"iti__search-input-wrapper\" },\n this.dropdownContent\n );\n this.searchIcon = createEl(\n \"span\",\n {\n class: \"iti__search-icon\",\n [ARIA.HIDDEN]: \"true\"\n },\n searchWrapper\n );\n this.searchIcon.innerHTML = buildSearchIcon();\n this.searchInput = createEl(\n \"input\",\n {\n id: `iti-${this.id}__search-input`,\n // Chrome says inputs need either a name or an id\n type: \"search\",\n class: \"iti__search-input\",\n placeholder: i18n.searchPlaceholder,\n // role=combobox + aria-autocomplete=list + aria-activedescendant allows maintaining focus on the search input while allowing users to navigate search results with up/down keyboard keys\n role: \"combobox\",\n [ARIA.EXPANDED]: \"true\",\n [ARIA.LABEL]: i18n.searchPlaceholder,\n [ARIA.CONTROLS]: `iti-${this.id}__country-listbox`,\n [ARIA.AUTOCOMPLETE]: \"list\",\n autocomplete: \"off\"\n },\n searchWrapper\n );\n this.searchClearButton = createEl(\n \"button\",\n {\n type: \"button\",\n class: `iti__search-clear ${CLASSES.HIDE}`,\n [ARIA.LABEL]: i18n.clearSearchAriaLabel,\n tabindex: \"-1\"\n },\n searchWrapper\n );\n this.searchClearButton.innerHTML = buildClearIcon(this.id);\n this.searchResultsA11yText = createEl(\n \"span\",\n { class: \"iti__a11y-text\" },\n this.dropdownContent\n );\n this.searchNoResults = createEl(\n \"div\",\n {\n class: `iti__no-results ${CLASSES.HIDE}`,\n [ARIA.HIDDEN]: \"true\"\n // all a11y messaging happens in this.searchResultsA11yText\n },\n this.dropdownContent\n );\n this.searchNoResults.textContent = i18n.zeroSearchResults;\n }\n _maybeUpdateInputPaddingAndReveal() {\n if (this.countryContainer) {\n this.updateInputPadding();\n this.countryContainer.classList.remove(CLASSES.V_HIDE);\n }\n }\n _maybeBuildHiddenInputs(wrapper) {\n const { hiddenInput } = this.options;\n if (hiddenInput) {\n const telInputName = this.telInput.getAttribute(\"name\") || \"\";\n const names = hiddenInput(telInputName);\n if (names.phone) {\n const existingInput = this.telInput.form?.querySelector(\n `input[name=\"${names.phone}\"]`\n );\n if (existingInput) {\n this.hiddenInput = existingInput;\n } else {\n this.hiddenInput = createEl(\"input\", {\n type: \"hidden\",\n name: names.phone\n });\n wrapper.appendChild(this.hiddenInput);\n }\n }\n if (names.country) {\n const existingInput = this.telInput.form?.querySelector(\n `input[name=\"${names.country}\"]`\n );\n if (existingInput) {\n this.hiddenInputCountry = existingInput;\n } else {\n this.hiddenInputCountry = createEl(\"input\", {\n type: \"hidden\",\n name: names.country\n });\n wrapper.appendChild(this.hiddenInputCountry);\n }\n }\n }\n }\n //* For each country: add a country list item
  • to the countryList