import WebpackerReact from "webpacker-react"; import { B as BarGraph, C as CircleChart, D as Dialog, a as DialogBody, b as DialogFooter, c as DialogHeader, d as DistributionBar, M as MultiLevelSelect, L as Legend, e as LineGraph, P as Passphrase, R as RichTextEditor, T as TreemapChart, f as Typeahead, G as Gauge, g as PhoneNumberInput } from "./chunks/_typeahead.js"; import "react"; import "./chunks/lib.js"; import "react-dom"; var ujs$1 = {}; Object.defineProperty(ujs$1, "__esModule", { value: true }); var ujs = { handleEvent: function handleEvent(eventName, callback) { var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { once: false }, once = _ref.once; var $ = typeof window.jQuery !== "undefined" && window.jQuery; if ($) { if (once) { $(document).one(eventName, callback); } else { $(document).on(eventName, callback); } } else { document.addEventListener(eventName, callback, { once }); } }, setup: function setup(onMount, onUnmount) { var $ = typeof window.jQuery !== "undefined" && window.jQuery; var Turbolinks = window.Turbolinks; if (typeof Turbolinks !== "undefined" && Turbolinks.supported) { if (typeof Turbolinks.EVENTS !== "undefined") { this.turbolinksClassic(onMount, onUnmount); } else if (typeof Turbolinks.controller !== "undefined") { this.turbolinks5(onMount, onUnmount); } else { this.turbolinksClassicDeprecated(onMount, onUnmount); } } else if ($ && typeof $.pjax === "function") { this.pjax(onMount, onUnmount); } else { this.native(onMount); } }, turbolinks5: function turbolinks5(onMount, onUnmount) { this.handleEvent("turbolinks:load", onMount, { once: true }); this.handleEvent("turbolinks:render", onMount); this.handleEvent("turbolinks:before-render", onUnmount); }, turbolinksClassic: function turbolinksClassic(onMount, onUnmount) { var Turbolinks = window.Turbolinks; this.handleEvent(Turbolinks.EVENTS.CHANGE, onMount); this.handleEvent(Turbolinks.EVENTS.BEFORE_UNLOAD, onUnmount); }, turbolinksClassicDeprecated: function turbolinksClassicDeprecated(onMount, onUnmount) { var Turbolinks = window.Turbolinks; Turbolinks.pagesCached(0); this.handleEvent("page:change", onMount); this.handleEvent("page:receive", onUnmount); }, pjax: function pjax(onMount, onUnmount) { this.handleEvent("ready", onMount); this.handleEvent("pjax:end", onMount); this.handleEvent("pjax:beforeReplace", onUnmount); }, native: function native(onMount) { var $ = typeof window.jQuery !== "undefined" && window.jQuery; if ($) { $(function() { return onMount(); }); } else if ("addEventListener" in window) { document.addEventListener("DOMContentLoaded", onMount); } else { window.attachEvent("onload", onMount); } } }; var _default = ujs$1.default = ujs; WebpackerReact.registerComponents({ BarGraph, CircleChart, Dialog, DialogBody, DialogFooter, DialogHeader, DistributionBar, MultiLevelSelect, Legend, LineGraph, Passphrase, RichTextEditor, TreemapChart, Typeahead, Gauge, PhoneNumberInput }); _default.setup( () => WebpackerReact.mountComponents(), () => WebpackerReact.unmountComponents() );