{ "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/choices.js/public/assets/scripts/choices.js", "../../../node_modules/@shopify/draggable/lib/draggable.bundle.js", "../../../node_modules/dropzone/dist/dropzone.js", "../../../node_modules/highlight.js/lib/core.js", "../../../node_modules/highlight.js/lib/languages/javascript.js", "../../../node_modules/highlight.js/lib/languages/xml.js", "../../../node_modules/inputmask/dist/inputmask.js", "../../../node_modules/string-natural-compare/natural-compare.js", "../../../node_modules/list.js/src/utils/get-by-class.js", "../../../node_modules/list.js/src/utils/extend.js", "../../../node_modules/list.js/src/utils/index-of.js", "../../../node_modules/list.js/src/utils/to-array.js", "../../../node_modules/list.js/src/utils/events.js", "../../../node_modules/list.js/src/utils/to-string.js", "../../../node_modules/list.js/src/utils/classes.js", "../../../node_modules/list.js/src/utils/get-attribute.js", "../../../node_modules/list.js/src/item.js", "../../../node_modules/list.js/src/add-async.js", "../../../node_modules/list.js/src/pagination.js", "../../../node_modules/list.js/src/parse.js", "../../../node_modules/list.js/src/templater.js", "../../../node_modules/list.js/src/search.js", "../../../node_modules/list.js/src/filter.js", "../../../node_modules/list.js/src/sort.js", "../../../node_modules/list.js/src/utils/fuzzy.js", "../../../node_modules/list.js/src/fuzzy-search.js", "../../../node_modules/list.js/src/index.js", "../../../node_modules/quill/dist/quill.js", "../../../node_modules/jquery/dist/jquery.js", "../../../node_modules/ion-rangeslider/js/ion.rangeSlider.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/statement_controller.js", "../../../node_modules/chart.js/dist/chunks/helpers.segment.mjs", "../../../node_modules/chart.js/dist/chart.mjs", "../../../node_modules/chart.js/auto/auto.mjs", "../../javascript/controllers/donut_chart_controller.js", "../../../node_modules/d3-array/src/fsum.js", "../../../node_modules/d3-array/src/merge.js", "../../../node_modules/d3-array/src/range.js", "../../../node_modules/d3-geo/src/math.js", "../../../node_modules/d3-geo/src/noop.js", "../../../node_modules/d3-geo/src/stream.js", "../../../node_modules/d3-geo/src/cartesian.js", "../../../node_modules/d3-geo/src/compose.js", "../../../node_modules/d3-geo/src/rotation.js", "../../../node_modules/d3-geo/src/circle.js", "../../../node_modules/d3-geo/src/clip/buffer.js", "../../../node_modules/d3-geo/src/pointEqual.js", "../../../node_modules/d3-geo/src/clip/rejoin.js", "../../../node_modules/d3-geo/src/polygonContains.js", "../../../node_modules/d3-geo/src/clip/index.js", "../../../node_modules/d3-geo/src/clip/antimeridian.js", "../../../node_modules/d3-geo/src/clip/circle.js", "../../../node_modules/d3-geo/src/clip/line.js", "../../../node_modules/d3-geo/src/clip/rectangle.js", "../../../node_modules/d3-geo/src/length.js", "../../../node_modules/d3-geo/src/distance.js", "../../../node_modules/d3-geo/src/contains.js", "../../../node_modules/d3-geo/src/graticule.js", "../../../node_modules/d3-geo/src/identity.js", "../../../node_modules/d3-geo/src/path/area.js", "../../../node_modules/d3-geo/src/path/bounds.js", "../../../node_modules/d3-geo/src/path/centroid.js", "../../../node_modules/d3-geo/src/path/context.js", "../../../node_modules/d3-geo/src/path/measure.js", "../../../node_modules/d3-geo/src/path/string.js", "../../../node_modules/d3-geo/src/path/index.js", "../../../node_modules/d3-geo/src/transform.js", "../../../node_modules/d3-geo/src/projection/fit.js", "../../../node_modules/d3-geo/src/projection/resample.js", "../../../node_modules/d3-geo/src/projection/index.js", "../../../node_modules/d3-geo/src/projection/conic.js", "../../../node_modules/d3-geo/src/projection/cylindricalEqualArea.js", "../../../node_modules/d3-geo/src/projection/conicEqualArea.js", "../../../node_modules/d3-geo/src/projection/albers.js", "../../../node_modules/d3-geo/src/projection/albersUsa.js", "../../../node_modules/d3-geo/src/projection/azimuthal.js", "../../../node_modules/d3-geo/src/projection/azimuthalEqualArea.js", "../../../node_modules/d3-geo/src/projection/azimuthalEquidistant.js", "../../../node_modules/d3-geo/src/projection/mercator.js", "../../../node_modules/d3-geo/src/projection/conicConformal.js", "../../../node_modules/d3-geo/src/projection/equirectangular.js", "../../../node_modules/d3-geo/src/projection/conicEquidistant.js", "../../../node_modules/d3-geo/src/projection/equalEarth.js", "../../../node_modules/d3-geo/src/projection/gnomonic.js", "../../../node_modules/d3-geo/src/projection/naturalEarth1.js", "../../../node_modules/d3-geo/src/projection/orthographic.js", "../../../node_modules/d3-geo/src/projection/stereographic.js", "../../../node_modules/d3-geo/src/projection/transverseMercator.js", "../../../node_modules/d3-scale-chromatic/src/colors.js", "../../../node_modules/d3-color/src/define.js", "../../../node_modules/d3-color/src/color.js", "../../../node_modules/d3-color/src/math.js", "../../../node_modules/d3-color/src/cubehelix.js", "../../../node_modules/d3-interpolate/src/basis.js", "../../../node_modules/d3-interpolate/src/basisClosed.js", "../../../node_modules/d3-interpolate/src/constant.js", "../../../node_modules/d3-interpolate/src/color.js", "../../../node_modules/d3-interpolate/src/rgb.js", "../../../node_modules/d3-interpolate/src/cubehelix.js", "../../../node_modules/d3-scale-chromatic/src/ramp.js", "../../../node_modules/d3-scale-chromatic/src/diverging/BrBG.js", "../../../node_modules/d3-scale-chromatic/src/diverging/PRGn.js", "../../../node_modules/d3-scale-chromatic/src/diverging/PiYG.js", "../../../node_modules/d3-scale-chromatic/src/diverging/PuOr.js", "../../../node_modules/d3-scale-chromatic/src/diverging/RdBu.js", "../../../node_modules/d3-scale-chromatic/src/diverging/RdGy.js", "../../../node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js", "../../../node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js", "../../../node_modules/d3-scale-chromatic/src/diverging/Spectral.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Blues.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Greens.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Greys.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Purples.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Reds.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js", "../../../node_modules/topojson-client/src/index.js", "../../../node_modules/topojson-client/src/identity.js", "../../../node_modules/topojson-client/src/transform.js", "../../../node_modules/topojson-client/src/bbox.js", "../../../node_modules/topojson-client/src/reverse.js", "../../../node_modules/topojson-client/src/feature.js", "../../../node_modules/topojson-client/src/stitch.js", "../../../node_modules/topojson-client/src/mesh.js", "../../../node_modules/topojson-client/src/merge.js", "../../../node_modules/topojson-client/src/bisect.js", "../../../node_modules/topojson-client/src/neighbors.js", "../../../node_modules/topojson-client/src/untransform.js", "../../../node_modules/topojson-client/src/quantize.js", "../../../node_modules/chartjs-chart-geo/src/scales/ProjectionScale.ts", "../../../node_modules/chartjs-chart-geo/src/scales/LegendScale.ts", "../../../node_modules/chartjs-chart-geo/src/scales/ColorScale.ts", "../../../node_modules/chartjs-chart-geo/src/scales/SizeScale.ts", "../../../node_modules/chartjs-chart-geo/src/elements/GeoFeature.ts", "../../../node_modules/chartjs-chart-geo/src/controllers/GeoController.ts", "../../../node_modules/chartjs-chart-geo/src/controllers/patchController.ts", "../../../node_modules/chartjs-chart-geo/src/controllers/ChoroplethController.ts", "../../../node_modules/chartjs-chart-geo/src/controllers/BubbleMapController.ts", "../../javascript/controllers/us_states_chart_controller.js", "../../javascript/controllers/states_form_controller.js", "../../javascript/controllers/multi_select_controller.js", "../../javascript/controllers/zipcodes_controller.js", "../../javascript/controllers/range_controller.js", "../../javascript/controllers/states_controller.js", "../../javascript/controllers/cities_controller.js", "../../javascript/controllers/search_select_controller.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/format.js", "../../../node_modules/@popperjs/core/lib/utils/validateModifiers.js", "../../../node_modules/@popperjs/core/lib/utils/uniqueBy.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/util/index.js", "../../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../../node_modules/bootstrap/js/src/dom/data.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/util/component-functions.js", "../../../node_modules/bootstrap/js/src/alert.js", "../../../node_modules/bootstrap/js/src/button.js", "../../../node_modules/bootstrap/js/src/dom/selector-engine.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/scrollbar.js", "../../../node_modules/bootstrap/js/src/util/backdrop.js", "../../../node_modules/bootstrap/js/src/util/focustrap.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/autosize/dist/autosize.esm.js", "../../javascript/theme/autosize.js", "../../javascript/theme/bootstrap.js", "../../javascript/theme/checklist.js", "../../javascript/theme/choices.js", "../../javascript/theme/dropzone.js", "../../../node_modules/flatpickr/dist/esm/types/options.js", "../../../node_modules/flatpickr/dist/esm/l10n/default.js", "../../../node_modules/flatpickr/dist/esm/utils/index.js", "../../../node_modules/flatpickr/dist/esm/utils/dom.js", "../../../node_modules/flatpickr/dist/esm/utils/formatting.js", "../../../node_modules/flatpickr/dist/esm/utils/dates.js", "../../../node_modules/flatpickr/dist/esm/utils/polyfills.js", "../../../node_modules/flatpickr/dist/esm/index.js", "../../javascript/theme/flatpickr.js", "../../javascript/theme/highlight.js", "../../javascript/theme/inputmask.js", "../../javascript/theme/kanban.js", "../../javascript/theme/list.js", "../../javascript/theme/map.js", "../../javascript/theme/navbar-collapse.js", "../../javascript/theme/navbar-dropdown.js", "../../javascript/theme/popover.js", "../../javascript/theme/tooltip.js", "../../javascript/theme/quill.js", "../../javascript/theme/wizard.js", "../../javascript/theme/helpers/getCSSVariableValue.js", "../../javascript/theme/chart.js", "../../javascript/application.js"], "sourcesContent": ["export default {\n logger: self.console,\n WebSocket: self.WebSocket\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 recordPing() {\n this.pingedAt = now()\n }\n\n recordConnect() {\n this.reconnectAttempts = 0\n this.recordPing()\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 },\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 logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`)\n if (this.webSocket) { this.uninstallEventHandlers() }\n this.webSocket = new adapters.WebSocket(this.consumer.url, protocols)\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 // 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 switch (type) {\n case message_types.welcome:\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 this.monitor.recordPing()\n case message_types.confirmation:\n this.subscriptions.confirmSubscription(identifier)\n return this.subscriptions.notify(identifier, \"connected\")\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 Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport logger from \"./logger\"\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 }\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\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\n a.protocol = a.protocol.replace(\"http\", \"ws\")\n return a.href\n } else {\n return url\n }\n}\n", "import Connection from \"./connection\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport Consumer, { createWebSocketURL } from \"./consumer\"\nimport INTERNAL from \"./internal\"\nimport Subscription from \"./subscription\"\nimport Subscriptions from \"./subscriptions\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport adapters from \"./adapters\"\nimport logger from \"./logger\"\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", "/*! choices.js v9.1.0 | \u00A9 2021 Josh Johnson | https://github.com/jshjohnson/Choices#readme */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Choices\"] = factory();\n\telse\n\t\troot[\"Choices\"] = factory();\n})(window, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 282:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.clearChoices = exports.activateChoices = exports.filterChoices = exports.addChoice = void 0;\n\nvar constants_1 = __webpack_require__(883);\n\nvar addChoice = function (_a) {\n var value = _a.value,\n label = _a.label,\n id = _a.id,\n groupId = _a.groupId,\n disabled = _a.disabled,\n elementId = _a.elementId,\n customProperties = _a.customProperties,\n placeholder = _a.placeholder,\n keyCode = _a.keyCode;\n return {\n type: constants_1.ACTION_TYPES.ADD_CHOICE,\n value: value,\n label: label,\n id: id,\n groupId: groupId,\n disabled: disabled,\n elementId: elementId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n\nexports.addChoice = addChoice;\n\nvar filterChoices = function (results) {\n return {\n type: constants_1.ACTION_TYPES.FILTER_CHOICES,\n results: results\n };\n};\n\nexports.filterChoices = filterChoices;\n\nvar activateChoices = function (active) {\n if (active === void 0) {\n active = true;\n }\n\n return {\n type: constants_1.ACTION_TYPES.ACTIVATE_CHOICES,\n active: active\n };\n};\n\nexports.activateChoices = activateChoices;\n\nvar clearChoices = function () {\n return {\n type: constants_1.ACTION_TYPES.CLEAR_CHOICES\n };\n};\n\nexports.clearChoices = clearChoices;\n\n/***/ }),\n\n/***/ 783:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addGroup = void 0;\n\nvar constants_1 = __webpack_require__(883);\n\nvar addGroup = function (_a) {\n var value = _a.value,\n id = _a.id,\n active = _a.active,\n disabled = _a.disabled;\n return {\n type: constants_1.ACTION_TYPES.ADD_GROUP,\n value: value,\n id: id,\n active: active,\n disabled: disabled\n };\n};\n\nexports.addGroup = addGroup;\n\n/***/ }),\n\n/***/ 464:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.highlightItem = exports.removeItem = exports.addItem = void 0;\n\nvar constants_1 = __webpack_require__(883);\n\nvar addItem = function (_a) {\n var value = _a.value,\n label = _a.label,\n id = _a.id,\n choiceId = _a.choiceId,\n groupId = _a.groupId,\n customProperties = _a.customProperties,\n placeholder = _a.placeholder,\n keyCode = _a.keyCode;\n return {\n type: constants_1.ACTION_TYPES.ADD_ITEM,\n value: value,\n label: label,\n id: id,\n choiceId: choiceId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n\nexports.addItem = addItem;\n\nvar removeItem = function (id, choiceId) {\n return {\n type: constants_1.ACTION_TYPES.REMOVE_ITEM,\n id: id,\n choiceId: choiceId\n };\n};\n\nexports.removeItem = removeItem;\n\nvar highlightItem = function (id, highlighted) {\n return {\n type: constants_1.ACTION_TYPES.HIGHLIGHT_ITEM,\n id: id,\n highlighted: highlighted\n };\n};\n\nexports.highlightItem = highlightItem;\n\n/***/ }),\n\n/***/ 137:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.setIsLoading = exports.resetTo = exports.clearAll = void 0;\n\nvar constants_1 = __webpack_require__(883);\n\nvar clearAll = function () {\n return {\n type: constants_1.ACTION_TYPES.CLEAR_ALL\n };\n};\n\nexports.clearAll = clearAll;\n\nvar resetTo = function (state) {\n return {\n type: constants_1.ACTION_TYPES.RESET_TO,\n state: state\n };\n};\n\nexports.resetTo = resetTo;\n\nvar setIsLoading = function (isLoading) {\n return {\n type: constants_1.ACTION_TYPES.SET_IS_LOADING,\n isLoading: isLoading\n };\n};\n\nexports.setIsLoading = setIsLoading;\n\n/***/ }),\n\n/***/ 373:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar deepmerge_1 = __importDefault(__webpack_require__(996));\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n\nvar fuse_js_1 = __importDefault(__webpack_require__(70));\n\nvar choices_1 = __webpack_require__(282);\n\nvar groups_1 = __webpack_require__(783);\n\nvar items_1 = __webpack_require__(464);\n\nvar misc_1 = __webpack_require__(137);\n\nvar components_1 = __webpack_require__(520);\n\nvar constants_1 = __webpack_require__(883);\n\nvar defaults_1 = __webpack_require__(789);\n\nvar utils_1 = __webpack_require__(799);\n\nvar reducers_1 = __webpack_require__(655);\n\nvar store_1 = __importDefault(__webpack_require__(744));\n\nvar templates_1 = __importDefault(__webpack_require__(686));\n/** @see {@link http://browserhacks.com/#hack-acea075d0ac6954f275a70023906050c} */\n\n\nvar IS_IE11 = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style;\nvar USER_DEFAULTS = {};\n/**\n * Choices\n * @author Josh Johnson\n */\n\nvar Choices =\n/** @class */\nfunction () {\n function Choices(element, userConfig) {\n var _this = this;\n\n if (element === void 0) {\n element = '[data-choice]';\n }\n\n if (userConfig === void 0) {\n userConfig = {};\n }\n\n this.config = deepmerge_1.default.all([defaults_1.DEFAULT_CONFIG, Choices.defaults.options, userConfig], // When merging array configs, replace with a copy of the userConfig array,\n // instead of concatenating with the default array\n {\n arrayMerge: function (_, sourceArray) {\n return __spreadArray([], sourceArray, true);\n }\n });\n var invalidConfigOptions = (0, utils_1.diff)(this.config, defaults_1.DEFAULT_CONFIG);\n\n if (invalidConfigOptions.length) {\n console.warn('Unknown config option(s) passed', invalidConfigOptions.join(', '));\n }\n\n var passedElement = typeof element === 'string' ? document.querySelector(element) : element;\n\n if (!(passedElement instanceof HTMLInputElement || passedElement instanceof HTMLSelectElement)) {\n throw TypeError('Expected one of the following types text|select-one|select-multiple');\n }\n\n this._isTextElement = passedElement.type === constants_1.TEXT_TYPE;\n this._isSelectOneElement = passedElement.type === constants_1.SELECT_ONE_TYPE;\n this._isSelectMultipleElement = passedElement.type === constants_1.SELECT_MULTIPLE_TYPE;\n this._isSelectElement = this._isSelectOneElement || this._isSelectMultipleElement;\n this.config.searchEnabled = this._isSelectMultipleElement || this.config.searchEnabled;\n\n if (!['auto', 'always'].includes(\"\".concat(this.config.renderSelectedChoices))) {\n this.config.renderSelectedChoices = 'auto';\n }\n\n if (userConfig.addItemFilter && typeof userConfig.addItemFilter !== 'function') {\n var re = userConfig.addItemFilter instanceof RegExp ? userConfig.addItemFilter : new RegExp(userConfig.addItemFilter);\n this.config.addItemFilter = re.test.bind(re);\n }\n\n if (this._isTextElement) {\n this.passedElement = new components_1.WrappedInput({\n element: passedElement,\n classNames: this.config.classNames,\n delimiter: this.config.delimiter\n });\n } else {\n this.passedElement = new components_1.WrappedSelect({\n element: passedElement,\n classNames: this.config.classNames,\n template: function (data) {\n return _this._templates.option(data);\n }\n });\n }\n\n this.initialised = false;\n this._store = new store_1.default();\n this._initialState = reducers_1.defaultState;\n this._currentState = reducers_1.defaultState;\n this._prevState = reducers_1.defaultState;\n this._currentValue = '';\n this._canSearch = !!this.config.searchEnabled;\n this._isScrollingOnIe = false;\n this._highlightPosition = 0;\n this._wasTap = true;\n this._placeholderValue = this._generatePlaceholderValue();\n this._baseId = (0, utils_1.generateId)(this.passedElement.element, 'choices-');\n /**\n * setting direction in cases where it's explicitly set on passedElement\n * or when calculated direction is different from the document\n */\n\n this._direction = this.passedElement.dir;\n\n if (!this._direction) {\n var elementDirection = window.getComputedStyle(this.passedElement.element).direction;\n var documentDirection = window.getComputedStyle(document.documentElement).direction;\n\n if (elementDirection !== documentDirection) {\n this._direction = elementDirection;\n }\n }\n\n this._idNames = {\n itemChoice: 'item-choice'\n };\n\n if (this._isSelectElement) {\n // Assign preset groups from passed element\n this._presetGroups = this.passedElement.optionGroups; // Assign preset options from passed element\n\n this._presetOptions = this.passedElement.options;\n } // Assign preset choices from passed object\n\n\n this._presetChoices = this.config.choices; // Assign preset items from passed object first\n\n this._presetItems = this.config.items; // Add any values passed from attribute\n\n if (this.passedElement.value && this._isTextElement) {\n var splitValues = this.passedElement.value.split(this.config.delimiter);\n this._presetItems = this._presetItems.concat(splitValues);\n } // Create array of choices from option elements\n\n\n if (this.passedElement.options) {\n this.passedElement.options.forEach(function (option) {\n _this._presetChoices.push({\n value: option.value,\n label: option.innerHTML,\n selected: !!option.selected,\n disabled: option.disabled || option.parentNode.disabled,\n placeholder: option.value === '' || option.hasAttribute('placeholder'),\n customProperties: option.dataset['custom-properties']\n });\n });\n }\n\n this._render = this._render.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this._onKeyUp = this._onKeyUp.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onTouchMove = this._onTouchMove.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this._onMouseDown = this._onMouseDown.bind(this);\n this._onMouseOver = this._onMouseOver.bind(this);\n this._onFormReset = this._onFormReset.bind(this);\n this._onSelectKey = this._onSelectKey.bind(this);\n this._onEnterKey = this._onEnterKey.bind(this);\n this._onEscapeKey = this._onEscapeKey.bind(this);\n this._onDirectionKey = this._onDirectionKey.bind(this);\n this._onDeleteKey = this._onDeleteKey.bind(this); // If element has already been initialised with Choices, fail silently\n\n if (this.passedElement.isActive) {\n if (!this.config.silent) {\n console.warn('Trying to initialise Choices on element already initialised', {\n element: element\n });\n }\n\n this.initialised = true;\n return;\n } // Let's go\n\n\n this.init();\n }\n\n Object.defineProperty(Choices, \"defaults\", {\n get: function () {\n return Object.preventExtensions({\n get options() {\n return USER_DEFAULTS;\n },\n\n get templates() {\n return templates_1.default;\n }\n\n });\n },\n enumerable: false,\n configurable: true\n });\n\n Choices.prototype.init = function () {\n if (this.initialised) {\n return;\n }\n\n this._createTemplates();\n\n this._createElements();\n\n this._createStructure();\n\n this._store.subscribe(this._render);\n\n this._render();\n\n this._addEventListeners();\n\n var shouldDisable = !this.config.addItems || this.passedElement.element.hasAttribute('disabled');\n\n if (shouldDisable) {\n this.disable();\n }\n\n this.initialised = true;\n var callbackOnInit = this.config.callbackOnInit; // Run callback if it is a function\n\n if (callbackOnInit && typeof callbackOnInit === 'function') {\n callbackOnInit.call(this);\n }\n };\n\n Choices.prototype.destroy = function () {\n if (!this.initialised) {\n return;\n }\n\n this._removeEventListeners();\n\n this.passedElement.reveal();\n this.containerOuter.unwrap(this.passedElement.element);\n this.clearStore();\n\n if (this._isSelectElement) {\n this.passedElement.options = this._presetOptions;\n }\n\n this._templates = templates_1.default;\n this.initialised = false;\n };\n\n Choices.prototype.enable = function () {\n if (this.passedElement.isDisabled) {\n this.passedElement.enable();\n }\n\n if (this.containerOuter.isDisabled) {\n this._addEventListeners();\n\n this.input.enable();\n this.containerOuter.enable();\n }\n\n return this;\n };\n\n Choices.prototype.disable = function () {\n if (!this.passedElement.isDisabled) {\n this.passedElement.disable();\n }\n\n if (!this.containerOuter.isDisabled) {\n this._removeEventListeners();\n\n this.input.disable();\n this.containerOuter.disable();\n }\n\n return this;\n };\n\n Choices.prototype.highlightItem = function (item, runEvent) {\n if (runEvent === void 0) {\n runEvent = true;\n }\n\n if (!item || !item.id) {\n return this;\n }\n\n var id = item.id,\n _a = item.groupId,\n groupId = _a === void 0 ? -1 : _a,\n _b = item.value,\n value = _b === void 0 ? '' : _b,\n _c = item.label,\n label = _c === void 0 ? '' : _c;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch((0, items_1.highlightItem)(id, true));\n\n if (runEvent) {\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n }\n\n return this;\n };\n\n Choices.prototype.unhighlightItem = function (item) {\n if (!item || !item.id) {\n return this;\n }\n\n var id = item.id,\n _a = item.groupId,\n groupId = _a === void 0 ? -1 : _a,\n _b = item.value,\n value = _b === void 0 ? '' : _b,\n _c = item.label,\n label = _c === void 0 ? '' : _c;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch((0, items_1.highlightItem)(id, false));\n\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n return this;\n };\n\n Choices.prototype.highlightAll = function () {\n var _this = this;\n\n this._store.items.forEach(function (item) {\n return _this.highlightItem(item);\n });\n\n return this;\n };\n\n Choices.prototype.unhighlightAll = function () {\n var _this = this;\n\n this._store.items.forEach(function (item) {\n return _this.unhighlightItem(item);\n });\n\n return this;\n };\n\n Choices.prototype.removeActiveItemsByValue = function (value) {\n var _this = this;\n\n this._store.activeItems.filter(function (item) {\n return item.value === value;\n }).forEach(function (item) {\n return _this._removeItem(item);\n });\n\n return this;\n };\n\n Choices.prototype.removeActiveItems = function (excludedId) {\n var _this = this;\n\n this._store.activeItems.filter(function (_a) {\n var id = _a.id;\n return id !== excludedId;\n }).forEach(function (item) {\n return _this._removeItem(item);\n });\n\n return this;\n };\n\n Choices.prototype.removeHighlightedItems = function (runEvent) {\n var _this = this;\n\n if (runEvent === void 0) {\n runEvent = false;\n }\n\n this._store.highlightedActiveItems.forEach(function (item) {\n _this._removeItem(item); // If this action was performed by the user\n // trigger the event\n\n\n if (runEvent) {\n _this._triggerChange(item.value);\n }\n });\n\n return this;\n };\n\n Choices.prototype.showDropdown = function (preventInputFocus) {\n var _this = this;\n\n if (this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this.dropdown.show();\n\n _this.containerOuter.open(_this.dropdown.distanceFromTopWindow);\n\n if (!preventInputFocus && _this._canSearch) {\n _this.input.focus();\n }\n\n _this.passedElement.triggerEvent(constants_1.EVENTS.showDropdown, {});\n });\n return this;\n };\n\n Choices.prototype.hideDropdown = function (preventInputBlur) {\n var _this = this;\n\n if (!this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this.dropdown.hide();\n\n _this.containerOuter.close();\n\n if (!preventInputBlur && _this._canSearch) {\n _this.input.removeActiveDescendant();\n\n _this.input.blur();\n }\n\n _this.passedElement.triggerEvent(constants_1.EVENTS.hideDropdown, {});\n });\n return this;\n };\n\n Choices.prototype.getValue = function (valueOnly) {\n if (valueOnly === void 0) {\n valueOnly = false;\n }\n\n var values = this._store.activeItems.reduce(function (selectedItems, item) {\n var itemValue = valueOnly ? item.value : item;\n selectedItems.push(itemValue);\n return selectedItems;\n }, []);\n\n return this._isSelectOneElement ? values[0] : values;\n };\n\n Choices.prototype.setValue = function (items) {\n var _this = this;\n\n if (!this.initialised) {\n return this;\n }\n\n items.forEach(function (value) {\n return _this._setChoiceOrItem(value);\n });\n return this;\n };\n\n Choices.prototype.setChoiceByValue = function (value) {\n var _this = this;\n\n if (!this.initialised || this._isTextElement) {\n return this;\n } // If only one value has been passed, convert to array\n\n\n var choiceValue = Array.isArray(value) ? value : [value]; // Loop through each value and\n\n choiceValue.forEach(function (val) {\n return _this._findAndSelectChoiceByValue(val);\n });\n return this;\n };\n /**\n * Set choices of select input via an array of objects (or function that returns array of object or promise of it),\n * a value field name and a label field name.\n * This behaves the same as passing items via the choices option but can be called after initialising Choices.\n * This can also be used to add groups of choices (see example 2); Optionally pass a true `replaceChoices` value to remove any existing choices.\n * Optionally pass a `customProperties` object to add additional data to your choices (useful when searching/filtering etc).\n *\n * **Input types affected:** select-one, select-multiple\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([\n * {value: 'One', label: 'Label One', disabled: true},\n * {value: 'Two', label: 'Label Two', selected: true},\n * {value: 'Three', label: 'Label Three'},\n * ], 'value', 'label', false);\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices(async () => {\n * try {\n * const items = await fetch('/items');\n * return items.json()\n * } catch(err) {\n * console.error(err)\n * }\n * });\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([{\n * label: 'Group one',\n * id: 1,\n * disabled: false,\n * choices: [\n * {value: 'Child One', label: 'Child One', selected: true},\n * {value: 'Child Two', label: 'Child Two', disabled: true},\n * {value: 'Child Three', label: 'Child Three'},\n * ]\n * },\n * {\n * label: 'Group two',\n * id: 2,\n * disabled: false,\n * choices: [\n * {value: 'Child Four', label: 'Child Four', disabled: true},\n * {value: 'Child Five', label: 'Child Five'},\n * {value: 'Child Six', label: 'Child Six', customProperties: {\n * description: 'Custom description about child six',\n * random: 'Another random custom property'\n * }},\n * ]\n * }], 'value', 'label', false);\n * ```\n */\n\n\n Choices.prototype.setChoices = function (choicesArrayOrFetcher, value, label, replaceChoices) {\n var _this = this;\n\n if (choicesArrayOrFetcher === void 0) {\n choicesArrayOrFetcher = [];\n }\n\n if (value === void 0) {\n value = 'value';\n }\n\n if (label === void 0) {\n label = 'label';\n }\n\n if (replaceChoices === void 0) {\n replaceChoices = false;\n }\n\n if (!this.initialised) {\n throw new ReferenceError(\"setChoices was called on a non-initialized instance of Choices\");\n }\n\n if (!this._isSelectElement) {\n throw new TypeError(\"setChoices can't be used with INPUT based Choices\");\n }\n\n if (typeof value !== 'string' || !value) {\n throw new TypeError(\"value parameter must be a name of 'value' field in passed objects\");\n } // Clear choices if needed\n\n\n if (replaceChoices) {\n this.clearChoices();\n }\n\n if (typeof choicesArrayOrFetcher === 'function') {\n // it's a choices fetcher function\n var fetcher_1 = choicesArrayOrFetcher(this);\n\n if (typeof Promise === 'function' && fetcher_1 instanceof Promise) {\n // that's a promise\n // eslint-disable-next-line no-promise-executor-return\n return new Promise(function (resolve) {\n return requestAnimationFrame(resolve);\n }).then(function () {\n return _this._handleLoadingState(true);\n }).then(function () {\n return fetcher_1;\n }).then(function (data) {\n return _this.setChoices(data, value, label, replaceChoices);\n }).catch(function (err) {\n if (!_this.config.silent) {\n console.error(err);\n }\n }).then(function () {\n return _this._handleLoadingState(false);\n }).then(function () {\n return _this;\n });\n } // function returned something else than promise, let's check if it's an array of choices\n\n\n if (!Array.isArray(fetcher_1)) {\n throw new TypeError(\".setChoices first argument function must return either array of choices or Promise, got: \".concat(typeof fetcher_1));\n } // recursion with results, it's sync and choices were cleared already\n\n\n return this.setChoices(fetcher_1, value, label, false);\n }\n\n if (!Array.isArray(choicesArrayOrFetcher)) {\n throw new TypeError(\".setChoices must be called either with array of choices with a function resulting into Promise of array of choices\");\n }\n\n this.containerOuter.removeLoadingState();\n\n this._startLoading();\n\n choicesArrayOrFetcher.forEach(function (groupOrChoice) {\n if (groupOrChoice.choices) {\n _this._addGroup({\n id: groupOrChoice.id ? parseInt(\"\".concat(groupOrChoice.id), 10) : null,\n group: groupOrChoice,\n valueKey: value,\n labelKey: label\n });\n } else {\n var choice = groupOrChoice;\n\n _this._addChoice({\n value: choice[value],\n label: choice[label],\n isSelected: !!choice.selected,\n isDisabled: !!choice.disabled,\n placeholder: !!choice.placeholder,\n customProperties: choice.customProperties\n });\n }\n });\n\n this._stopLoading();\n\n return this;\n };\n\n Choices.prototype.clearChoices = function () {\n this._store.dispatch((0, choices_1.clearChoices)());\n\n return this;\n };\n\n Choices.prototype.clearStore = function () {\n this._store.dispatch((0, misc_1.clearAll)());\n\n return this;\n };\n\n Choices.prototype.clearInput = function () {\n var shouldSetInputWidth = !this._isSelectOneElement;\n this.input.clear(shouldSetInputWidth);\n\n if (!this._isTextElement && this._canSearch) {\n this._isSearching = false;\n\n this._store.dispatch((0, choices_1.activateChoices)(true));\n }\n\n return this;\n };\n\n Choices.prototype._render = function () {\n if (this._store.isLoading()) {\n return;\n }\n\n this._currentState = this._store.state;\n var stateChanged = this._currentState.choices !== this._prevState.choices || this._currentState.groups !== this._prevState.groups || this._currentState.items !== this._prevState.items;\n var shouldRenderChoices = this._isSelectElement;\n var shouldRenderItems = this._currentState.items !== this._prevState.items;\n\n if (!stateChanged) {\n return;\n }\n\n if (shouldRenderChoices) {\n this._renderChoices();\n }\n\n if (shouldRenderItems) {\n this._renderItems();\n }\n\n this._prevState = this._currentState;\n };\n\n Choices.prototype._renderChoices = function () {\n var _this = this;\n\n var _a = this._store,\n activeGroups = _a.activeGroups,\n activeChoices = _a.activeChoices;\n var choiceListFragment = document.createDocumentFragment();\n this.choiceList.clear();\n\n if (this.config.resetScrollPosition) {\n requestAnimationFrame(function () {\n return _this.choiceList.scrollToTop();\n });\n } // If we have grouped options\n\n\n if (activeGroups.length >= 1 && !this._isSearching) {\n // If we have a placeholder choice along with groups\n var activePlaceholders = activeChoices.filter(function (activeChoice) {\n return activeChoice.placeholder === true && activeChoice.groupId === -1;\n });\n\n if (activePlaceholders.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activePlaceholders, choiceListFragment);\n }\n\n choiceListFragment = this._createGroupsFragment(activeGroups, activeChoices, choiceListFragment);\n } else if (activeChoices.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activeChoices, choiceListFragment);\n } // If we have choices to show\n\n\n if (choiceListFragment.childNodes && choiceListFragment.childNodes.length > 0) {\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, this.input.value); // ...and we can select them\n\n\n if (canAddItem.response) {\n // ...append them and highlight the first choice\n this.choiceList.append(choiceListFragment);\n\n this._highlightChoice();\n } else {\n var notice = this._getTemplate('notice', canAddItem.notice);\n\n this.choiceList.append(notice);\n }\n } else {\n // Otherwise show a notice\n var dropdownItem = void 0;\n var notice = void 0;\n\n if (this._isSearching) {\n notice = typeof this.config.noResultsText === 'function' ? this.config.noResultsText() : this.config.noResultsText;\n dropdownItem = this._getTemplate('notice', notice, 'no-results');\n } else {\n notice = typeof this.config.noChoicesText === 'function' ? this.config.noChoicesText() : this.config.noChoicesText;\n dropdownItem = this._getTemplate('notice', notice, 'no-choices');\n }\n\n this.choiceList.append(dropdownItem);\n }\n };\n\n Choices.prototype._renderItems = function () {\n var activeItems = this._store.activeItems || [];\n this.itemList.clear(); // Create a fragment to store our list items\n // (so we don't have to update the DOM for each item)\n\n var itemListFragment = this._createItemsFragment(activeItems); // If we have items to add, append them\n\n\n if (itemListFragment.childNodes) {\n this.itemList.append(itemListFragment);\n }\n };\n\n Choices.prototype._createGroupsFragment = function (groups, choices, fragment) {\n var _this = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n var getGroupChoices = function (group) {\n return choices.filter(function (choice) {\n if (_this._isSelectOneElement) {\n return choice.groupId === group.id;\n }\n\n return choice.groupId === group.id && (_this.config.renderSelectedChoices === 'always' || !choice.selected);\n });\n }; // If sorting is enabled, filter groups\n\n\n if (this.config.shouldSort) {\n groups.sort(this.config.sorter);\n }\n\n groups.forEach(function (group) {\n var groupChoices = getGroupChoices(group);\n\n if (groupChoices.length >= 1) {\n var dropdownGroup = _this._getTemplate('choiceGroup', group);\n\n fragment.appendChild(dropdownGroup);\n\n _this._createChoicesFragment(groupChoices, fragment, true);\n }\n });\n return fragment;\n };\n\n Choices.prototype._createChoicesFragment = function (choices, fragment, withinGroup) {\n var _this = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n if (withinGroup === void 0) {\n withinGroup = false;\n } // Create a fragment to store our list items (so we don't have to update the DOM for each item)\n\n\n var _a = this.config,\n renderSelectedChoices = _a.renderSelectedChoices,\n searchResultLimit = _a.searchResultLimit,\n renderChoiceLimit = _a.renderChoiceLimit;\n var filter = this._isSearching ? utils_1.sortByScore : this.config.sorter;\n\n var appendChoice = function (choice) {\n var shouldRender = renderSelectedChoices === 'auto' ? _this._isSelectOneElement || !choice.selected : true;\n\n if (shouldRender) {\n var dropdownItem = _this._getTemplate('choice', choice, _this.config.itemSelectText);\n\n fragment.appendChild(dropdownItem);\n }\n };\n\n var rendererableChoices = choices;\n\n if (renderSelectedChoices === 'auto' && !this._isSelectOneElement) {\n rendererableChoices = choices.filter(function (choice) {\n return !choice.selected;\n });\n } // Split array into placeholders and \"normal\" choices\n\n\n var _b = rendererableChoices.reduce(function (acc, choice) {\n if (choice.placeholder) {\n acc.placeholderChoices.push(choice);\n } else {\n acc.normalChoices.push(choice);\n }\n\n return acc;\n }, {\n placeholderChoices: [],\n normalChoices: []\n }),\n placeholderChoices = _b.placeholderChoices,\n normalChoices = _b.normalChoices; // If sorting is enabled or the user is searching, filter choices\n\n\n if (this.config.shouldSort || this._isSearching) {\n normalChoices.sort(filter);\n }\n\n var choiceLimit = rendererableChoices.length; // Prepend placeholeder\n\n var sortedChoices = this._isSelectOneElement ? __spreadArray(__spreadArray([], placeholderChoices, true), normalChoices, true) : normalChoices;\n\n if (this._isSearching) {\n choiceLimit = searchResultLimit;\n } else if (renderChoiceLimit && renderChoiceLimit > 0 && !withinGroup) {\n choiceLimit = renderChoiceLimit;\n } // Add each choice to dropdown within range\n\n\n for (var i = 0; i < choiceLimit; i += 1) {\n if (sortedChoices[i]) {\n appendChoice(sortedChoices[i]);\n }\n }\n\n return fragment;\n };\n\n Choices.prototype._createItemsFragment = function (items, fragment) {\n var _this = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n } // Create fragment to add elements to\n\n\n var _a = this.config,\n shouldSortItems = _a.shouldSortItems,\n sorter = _a.sorter,\n removeItemButton = _a.removeItemButton; // If sorting is enabled, filter items\n\n if (shouldSortItems && !this._isSelectOneElement) {\n items.sort(sorter);\n }\n\n if (this._isTextElement) {\n // Update the value of the hidden input\n this.passedElement.value = items.map(function (_a) {\n var value = _a.value;\n return value;\n }).join(this.config.delimiter);\n } else {\n // Update the options of the hidden input\n this.passedElement.options = items;\n }\n\n var addItemToFragment = function (item) {\n // Create new list element\n var listItem = _this._getTemplate('item', item, removeItemButton); // Append it to list\n\n\n fragment.appendChild(listItem);\n }; // Add each list item to list\n\n\n items.forEach(addItemToFragment);\n return fragment;\n };\n\n Choices.prototype._triggerChange = function (value) {\n if (value === undefined || value === null) {\n return;\n }\n\n this.passedElement.triggerEvent(constants_1.EVENTS.change, {\n value: value\n });\n };\n\n Choices.prototype._selectPlaceholderChoice = function (placeholderChoice) {\n this._addItem({\n value: placeholderChoice.value,\n label: placeholderChoice.label,\n choiceId: placeholderChoice.id,\n groupId: placeholderChoice.groupId,\n placeholder: placeholderChoice.placeholder\n });\n\n this._triggerChange(placeholderChoice.value);\n };\n\n Choices.prototype._handleButtonAction = function (activeItems, element) {\n if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) {\n return;\n }\n\n var itemId = element.parentNode && element.parentNode.dataset.id;\n var itemToRemove = itemId && activeItems.find(function (item) {\n return item.id === parseInt(itemId, 10);\n });\n\n if (!itemToRemove) {\n return;\n } // Remove item associated with button\n\n\n this._removeItem(itemToRemove);\n\n this._triggerChange(itemToRemove.value);\n\n if (this._isSelectOneElement && this._store.placeholderChoice) {\n this._selectPlaceholderChoice(this._store.placeholderChoice);\n }\n };\n\n Choices.prototype._handleItemAction = function (activeItems, element, hasShiftKey) {\n var _this = this;\n\n if (hasShiftKey === void 0) {\n hasShiftKey = false;\n }\n\n if (!activeItems || !element || !this.config.removeItems || this._isSelectOneElement) {\n return;\n }\n\n var passedId = element.dataset.id; // We only want to select one item with a click\n // so we deselect any items that aren't the target\n // unless shift is being pressed\n\n activeItems.forEach(function (item) {\n if (item.id === parseInt(\"\".concat(passedId), 10) && !item.highlighted) {\n _this.highlightItem(item);\n } else if (!hasShiftKey && item.highlighted) {\n _this.unhighlightItem(item);\n }\n }); // Focus input as without focus, a user cannot do anything with a\n // highlighted item\n\n this.input.focus();\n };\n\n Choices.prototype._handleChoiceAction = function (activeItems, element) {\n if (!activeItems || !element) {\n return;\n } // If we are clicking on an option\n\n\n var id = element.dataset.id;\n\n var choice = id && this._store.getChoiceById(id);\n\n if (!choice) {\n return;\n }\n\n var passedKeyCode = activeItems[0] && activeItems[0].keyCode ? activeItems[0].keyCode : undefined;\n var hasActiveDropdown = this.dropdown.isActive; // Update choice keyCode\n\n choice.keyCode = passedKeyCode;\n this.passedElement.triggerEvent(constants_1.EVENTS.choice, {\n choice: choice\n });\n\n if (!choice.selected && !choice.disabled) {\n var canAddItem = this._canAddItem(activeItems, choice.value);\n\n if (canAddItem.response) {\n this._addItem({\n value: choice.value,\n label: choice.label,\n choiceId: choice.id,\n groupId: choice.groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder,\n keyCode: choice.keyCode\n });\n\n this._triggerChange(choice.value);\n }\n }\n\n this.clearInput(); // We want to close the dropdown if we are dealing with a single select box\n\n if (hasActiveDropdown && this._isSelectOneElement) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n Choices.prototype._handleBackspace = function (activeItems) {\n if (!this.config.removeItems || !activeItems) {\n return;\n }\n\n var lastItem = activeItems[activeItems.length - 1];\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n }); // If editing the last item is allowed and there are not other selected items,\n // we can edit the item value. Otherwise if we can remove items, remove all selected items\n\n if (this.config.editItems && !hasHighlightedItems && lastItem) {\n this.input.value = lastItem.value;\n this.input.setWidth();\n\n this._removeItem(lastItem);\n\n this._triggerChange(lastItem.value);\n } else {\n if (!hasHighlightedItems) {\n // Highlight last item if none already highlighted\n this.highlightItem(lastItem, false);\n }\n\n this.removeHighlightedItems(true);\n }\n };\n\n Choices.prototype._startLoading = function () {\n this._store.dispatch((0, misc_1.setIsLoading)(true));\n };\n\n Choices.prototype._stopLoading = function () {\n this._store.dispatch((0, misc_1.setIsLoading)(false));\n };\n\n Choices.prototype._handleLoadingState = function (setLoading) {\n if (setLoading === void 0) {\n setLoading = true;\n }\n\n var placeholderItem = this.itemList.getChild(\".\".concat(this.config.classNames.placeholder));\n\n if (setLoading) {\n this.disable();\n this.containerOuter.addLoadingState();\n\n if (this._isSelectOneElement) {\n if (!placeholderItem) {\n placeholderItem = this._getTemplate('placeholder', this.config.loadingText);\n\n if (placeholderItem) {\n this.itemList.append(placeholderItem);\n }\n } else {\n placeholderItem.innerHTML = this.config.loadingText;\n }\n } else {\n this.input.placeholder = this.config.loadingText;\n }\n } else {\n this.enable();\n this.containerOuter.removeLoadingState();\n\n if (this._isSelectOneElement) {\n if (placeholderItem) {\n placeholderItem.innerHTML = this._placeholderValue || '';\n }\n } else {\n this.input.placeholder = this._placeholderValue || '';\n }\n }\n };\n\n Choices.prototype._handleSearch = function (value) {\n if (!value || !this.input.isFocussed) {\n return;\n }\n\n var choices = this._store.choices;\n var _a = this.config,\n searchFloor = _a.searchFloor,\n searchChoices = _a.searchChoices;\n var hasUnactiveChoices = choices.some(function (option) {\n return !option.active;\n }); // Check that we have a value to search and the input was an alphanumeric character\n\n if (value && value.length >= searchFloor) {\n var resultCount = searchChoices ? this._searchChoices(value) : 0; // Trigger search event\n\n this.passedElement.triggerEvent(constants_1.EVENTS.search, {\n value: value,\n resultCount: resultCount\n });\n } else if (hasUnactiveChoices) {\n // Otherwise reset choices to active\n this._isSearching = false;\n\n this._store.dispatch((0, choices_1.activateChoices)(true));\n }\n };\n\n Choices.prototype._canAddItem = function (activeItems, value) {\n var canAddItem = true;\n var notice = typeof this.config.addItemText === 'function' ? this.config.addItemText(value) : this.config.addItemText;\n\n if (!this._isSelectOneElement) {\n var isDuplicateValue = (0, utils_1.existsInArray)(activeItems, value);\n\n if (this.config.maxItemCount > 0 && this.config.maxItemCount <= activeItems.length) {\n // If there is a max entry limit and we have reached that limit\n // don't update\n canAddItem = false;\n notice = typeof this.config.maxItemText === 'function' ? this.config.maxItemText(this.config.maxItemCount) : this.config.maxItemText;\n }\n\n if (!this.config.duplicateItemsAllowed && isDuplicateValue && canAddItem) {\n canAddItem = false;\n notice = typeof this.config.uniqueItemText === 'function' ? this.config.uniqueItemText(value) : this.config.uniqueItemText;\n }\n\n if (this._isTextElement && this.config.addItems && canAddItem && typeof this.config.addItemFilter === 'function' && !this.config.addItemFilter(value)) {\n canAddItem = false;\n notice = typeof this.config.customAddItemText === 'function' ? this.config.customAddItemText(value) : this.config.customAddItemText;\n }\n }\n\n return {\n response: canAddItem,\n notice: notice\n };\n };\n\n Choices.prototype._searchChoices = function (value) {\n var newValue = typeof value === 'string' ? value.trim() : value;\n var currentValue = typeof this._currentValue === 'string' ? this._currentValue.trim() : this._currentValue;\n\n if (newValue.length < 1 && newValue === \"\".concat(currentValue, \" \")) {\n return 0;\n } // If new value matches the desired length and is not the same as the current value with a space\n\n\n var haystack = this._store.searchableChoices;\n var needle = newValue;\n\n var keys = __spreadArray([], this.config.searchFields, true);\n\n var options = Object.assign(this.config.fuseOptions, {\n keys: keys,\n includeMatches: true\n });\n var fuse = new fuse_js_1.default(haystack, options);\n var results = fuse.search(needle); // see https://github.com/krisk/Fuse/issues/303\n\n this._currentValue = newValue;\n this._highlightPosition = 0;\n this._isSearching = true;\n\n this._store.dispatch((0, choices_1.filterChoices)(results));\n\n return results.length;\n };\n\n Choices.prototype._addEventListeners = function () {\n var documentElement = document.documentElement; // capture events - can cancel event processing or propagation\n\n documentElement.addEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.addEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.addEventListener('mousedown', this._onMouseDown, true); // passive events - doesn't call `preventDefault` or `stopPropagation`\n\n documentElement.addEventListener('click', this._onClick, {\n passive: true\n });\n documentElement.addEventListener('touchmove', this._onTouchMove, {\n passive: true\n });\n this.dropdown.element.addEventListener('mouseover', this._onMouseOver, {\n passive: true\n });\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.containerOuter.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n }\n\n this.input.element.addEventListener('keyup', this._onKeyUp, {\n passive: true\n });\n this.input.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.input.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n\n if (this.input.element.form) {\n this.input.element.form.addEventListener('reset', this._onFormReset, {\n passive: true\n });\n }\n\n this.input.addEventListeners();\n };\n\n Choices.prototype._removeEventListeners = function () {\n var documentElement = document.documentElement;\n documentElement.removeEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.removeEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.removeEventListener('mousedown', this._onMouseDown, true);\n documentElement.removeEventListener('click', this._onClick);\n documentElement.removeEventListener('touchmove', this._onTouchMove);\n this.dropdown.element.removeEventListener('mouseover', this._onMouseOver);\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.removeEventListener('focus', this._onFocus);\n this.containerOuter.element.removeEventListener('blur', this._onBlur);\n }\n\n this.input.element.removeEventListener('keyup', this._onKeyUp);\n this.input.element.removeEventListener('focus', this._onFocus);\n this.input.element.removeEventListener('blur', this._onBlur);\n\n if (this.input.element.form) {\n this.input.element.form.removeEventListener('reset', this._onFormReset);\n }\n\n this.input.removeEventListeners();\n };\n\n Choices.prototype._onKeyDown = function (event) {\n var keyCode = event.keyCode;\n var activeItems = this._store.activeItems;\n var hasFocusedInput = this.input.isFocussed;\n var hasActiveDropdown = this.dropdown.isActive;\n var hasItems = this.itemList.hasChildren();\n var keyString = String.fromCharCode(keyCode);\n var wasAlphaNumericChar = /[a-zA-Z0-9-_ ]/.test(keyString);\n var BACK_KEY = constants_1.KEY_CODES.BACK_KEY,\n DELETE_KEY = constants_1.KEY_CODES.DELETE_KEY,\n ENTER_KEY = constants_1.KEY_CODES.ENTER_KEY,\n A_KEY = constants_1.KEY_CODES.A_KEY,\n ESC_KEY = constants_1.KEY_CODES.ESC_KEY,\n UP_KEY = constants_1.KEY_CODES.UP_KEY,\n DOWN_KEY = constants_1.KEY_CODES.DOWN_KEY,\n PAGE_UP_KEY = constants_1.KEY_CODES.PAGE_UP_KEY,\n PAGE_DOWN_KEY = constants_1.KEY_CODES.PAGE_DOWN_KEY;\n\n if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) {\n this.showDropdown();\n\n if (!this.input.isFocussed) {\n /*\n We update the input value with the pressed key as\n the input was not focussed at the time of key press\n therefore does not have the value of the key.\n */\n this.input.value += keyString.toLowerCase();\n }\n }\n\n switch (keyCode) {\n case A_KEY:\n return this._onSelectKey(event, hasItems);\n\n case ENTER_KEY:\n return this._onEnterKey(event, activeItems, hasActiveDropdown);\n\n case ESC_KEY:\n return this._onEscapeKey(hasActiveDropdown);\n\n case UP_KEY:\n case PAGE_UP_KEY:\n case DOWN_KEY:\n case PAGE_DOWN_KEY:\n return this._onDirectionKey(event, hasActiveDropdown);\n\n case DELETE_KEY:\n case BACK_KEY:\n return this._onDeleteKey(event, activeItems, hasFocusedInput);\n\n default:\n }\n };\n\n Choices.prototype._onKeyUp = function (_a) {\n var target = _a.target,\n keyCode = _a.keyCode;\n var value = this.input.value;\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n var backKey = constants_1.KEY_CODES.BACK_KEY,\n deleteKey = constants_1.KEY_CODES.DELETE_KEY; // We are typing into a text input and have a value, we want to show a dropdown\n // notice. Otherwise hide the dropdown\n\n if (this._isTextElement) {\n var canShowDropdownNotice = canAddItem.notice && value;\n\n if (canShowDropdownNotice) {\n var dropdownItem = this._getTemplate('notice', canAddItem.notice);\n\n this.dropdown.element.innerHTML = dropdownItem.outerHTML;\n this.showDropdown(true);\n } else {\n this.hideDropdown(true);\n }\n } else {\n var wasRemovalKeyCode = keyCode === backKey || keyCode === deleteKey;\n var userHasRemovedValue = wasRemovalKeyCode && target && !target.value;\n var canReactivateChoices = !this._isTextElement && this._isSearching;\n var canSearch = this._canSearch && canAddItem.response;\n\n if (userHasRemovedValue && canReactivateChoices) {\n this._isSearching = false;\n\n this._store.dispatch((0, choices_1.activateChoices)(true));\n } else if (canSearch) {\n this._handleSearch(this.input.value);\n }\n }\n\n this._canSearch = this.config.searchEnabled;\n };\n\n Choices.prototype._onSelectKey = function (event, hasItems) {\n var ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n var hasCtrlDownKeyPressed = ctrlKey || metaKey; // If CTRL + A or CMD + A have been pressed and there are items to select\n\n if (hasCtrlDownKeyPressed && hasItems) {\n this._canSearch = false;\n var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement;\n\n if (shouldHightlightAll) {\n this.highlightAll();\n }\n }\n };\n\n Choices.prototype._onEnterKey = function (event, activeItems, hasActiveDropdown) {\n var target = event.target;\n var enterKey = constants_1.KEY_CODES.ENTER_KEY;\n var targetWasButton = target && target.hasAttribute('data-button');\n\n if (this._isTextElement && target && target.value) {\n var value = this.input.value;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n if (canAddItem.response) {\n this.hideDropdown(true);\n\n this._addItem({\n value: value\n });\n\n this._triggerChange(value);\n\n this.clearInput();\n }\n }\n\n if (targetWasButton) {\n this._handleButtonAction(activeItems, target);\n\n event.preventDefault();\n }\n\n if (hasActiveDropdown) {\n var highlightedChoice = this.dropdown.getChild(\".\".concat(this.config.classNames.highlightedState));\n\n if (highlightedChoice) {\n // add enter keyCode value\n if (activeItems[0]) {\n activeItems[0].keyCode = enterKey; // eslint-disable-line no-param-reassign\n }\n\n this._handleChoiceAction(activeItems, highlightedChoice);\n }\n\n event.preventDefault();\n } else if (this._isSelectOneElement) {\n this.showDropdown();\n event.preventDefault();\n }\n };\n\n Choices.prototype._onEscapeKey = function (hasActiveDropdown) {\n if (hasActiveDropdown) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n Choices.prototype._onDirectionKey = function (event, hasActiveDropdown) {\n var keyCode = event.keyCode,\n metaKey = event.metaKey;\n var downKey = constants_1.KEY_CODES.DOWN_KEY,\n pageUpKey = constants_1.KEY_CODES.PAGE_UP_KEY,\n pageDownKey = constants_1.KEY_CODES.PAGE_DOWN_KEY; // If up or down key is pressed, traverse through options\n\n if (hasActiveDropdown || this._isSelectOneElement) {\n this.showDropdown();\n this._canSearch = false;\n var directionInt = keyCode === downKey || keyCode === pageDownKey ? 1 : -1;\n var skipKey = metaKey || keyCode === pageDownKey || keyCode === pageUpKey;\n var selectableChoiceIdentifier = '[data-choice-selectable]';\n var nextEl = void 0;\n\n if (skipKey) {\n if (directionInt > 0) {\n nextEl = this.dropdown.element.querySelector(\"\".concat(selectableChoiceIdentifier, \":last-of-type\"));\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n } else {\n var currentEl = this.dropdown.element.querySelector(\".\".concat(this.config.classNames.highlightedState));\n\n if (currentEl) {\n nextEl = (0, utils_1.getAdjacentEl)(currentEl, selectableChoiceIdentifier, directionInt);\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n }\n\n if (nextEl) {\n // We prevent default to stop the cursor moving\n // when pressing the arrow\n if (!(0, utils_1.isScrolledIntoView)(nextEl, this.choiceList.element, directionInt)) {\n this.choiceList.scrollToChildElement(nextEl, directionInt);\n }\n\n this._highlightChoice(nextEl);\n } // Prevent default to maintain cursor position whilst\n // traversing dropdown options\n\n\n event.preventDefault();\n }\n };\n\n Choices.prototype._onDeleteKey = function (event, activeItems, hasFocusedInput) {\n var target = event.target; // If backspace or delete key is pressed and the input has no value\n\n if (!this._isSelectOneElement && !target.value && hasFocusedInput) {\n this._handleBackspace(activeItems);\n\n event.preventDefault();\n }\n };\n\n Choices.prototype._onTouchMove = function () {\n if (this._wasTap) {\n this._wasTap = false;\n }\n };\n\n Choices.prototype._onTouchEnd = function (event) {\n var target = (event || event.touches[0]).target;\n var touchWasWithinContainer = this._wasTap && this.containerOuter.element.contains(target);\n\n if (touchWasWithinContainer) {\n var containerWasExactTarget = target === this.containerOuter.element || target === this.containerInner.element;\n\n if (containerWasExactTarget) {\n if (this._isTextElement) {\n this.input.focus();\n } else if (this._isSelectMultipleElement) {\n this.showDropdown();\n }\n } // Prevents focus event firing\n\n\n event.stopPropagation();\n }\n\n this._wasTap = true;\n };\n /**\n * Handles mousedown event in capture mode for containetOuter.element\n */\n\n\n Choices.prototype._onMouseDown = function (event) {\n var target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n } // If we have our mouse down on the scrollbar and are on IE11...\n\n\n if (IS_IE11 && this.choiceList.element.contains(target)) {\n // check if click was on a scrollbar area\n var firstChoice = this.choiceList.element.firstElementChild;\n var isOnScrollbar = this._direction === 'ltr' ? event.offsetX >= firstChoice.offsetWidth : event.offsetX < firstChoice.offsetLeft;\n this._isScrollingOnIe = isOnScrollbar;\n }\n\n if (target === this.input.element) {\n return;\n }\n\n var item = target.closest('[data-button],[data-item],[data-choice]');\n\n if (item instanceof HTMLElement) {\n var hasShiftKey = event.shiftKey;\n var activeItems = this._store.activeItems;\n var dataset = item.dataset;\n\n if ('button' in dataset) {\n this._handleButtonAction(activeItems, item);\n } else if ('item' in dataset) {\n this._handleItemAction(activeItems, item, hasShiftKey);\n } else if ('choice' in dataset) {\n this._handleChoiceAction(activeItems, item);\n }\n }\n\n event.preventDefault();\n };\n /**\n * Handles mouseover event over this.dropdown\n * @param {MouseEvent} event\n */\n\n\n Choices.prototype._onMouseOver = function (_a) {\n var target = _a.target;\n\n if (target instanceof HTMLElement && 'choice' in target.dataset) {\n this._highlightChoice(target);\n }\n };\n\n Choices.prototype._onClick = function (_a) {\n var target = _a.target;\n var clickWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (clickWasWithinContainer) {\n if (!this.dropdown.isActive && !this.containerOuter.isDisabled) {\n if (this._isTextElement) {\n if (document.activeElement !== this.input.element) {\n this.input.focus();\n }\n } else {\n this.showDropdown();\n this.containerOuter.focus();\n }\n } else if (this._isSelectOneElement && target !== this.input.element && !this.dropdown.element.contains(target)) {\n this.hideDropdown();\n }\n } else {\n var hasHighlightedItems = this._store.highlightedActiveItems.length > 0;\n\n if (hasHighlightedItems) {\n this.unhighlightAll();\n }\n\n this.containerOuter.removeFocusState();\n this.hideDropdown(true);\n }\n };\n\n Choices.prototype._onFocus = function (_a) {\n var _b;\n\n var _this = this;\n\n var target = _a.target;\n var focusWasWithinContainer = target && this.containerOuter.element.contains(target);\n\n if (!focusWasWithinContainer) {\n return;\n }\n\n var focusActions = (_b = {}, _b[constants_1.TEXT_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.addFocusState();\n }\n }, _b[constants_1.SELECT_ONE_TYPE] = function () {\n _this.containerOuter.addFocusState();\n\n if (target === _this.input.element) {\n _this.showDropdown(true);\n }\n }, _b[constants_1.SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this.input.element) {\n _this.showDropdown(true); // If element is a select box, the focused element is the container and the dropdown\n // isn't already open, focus and show dropdown\n\n\n _this.containerOuter.addFocusState();\n }\n }, _b);\n focusActions[this.passedElement.element.type]();\n };\n\n Choices.prototype._onBlur = function (_a) {\n var _b;\n\n var _this = this;\n\n var target = _a.target;\n var blurWasWithinContainer = target && this.containerOuter.element.contains(target);\n\n if (blurWasWithinContainer && !this._isScrollingOnIe) {\n var activeItems = this._store.activeItems;\n var hasHighlightedItems_1 = activeItems.some(function (item) {\n return item.highlighted;\n });\n var blurActions = (_b = {}, _b[constants_1.TEXT_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.removeFocusState();\n\n if (hasHighlightedItems_1) {\n _this.unhighlightAll();\n }\n\n _this.hideDropdown(true);\n }\n }, _b[constants_1.SELECT_ONE_TYPE] = function () {\n _this.containerOuter.removeFocusState();\n\n if (target === _this.input.element || target === _this.containerOuter.element && !_this._canSearch) {\n _this.hideDropdown(true);\n }\n }, _b[constants_1.SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.removeFocusState();\n\n _this.hideDropdown(true);\n\n if (hasHighlightedItems_1) {\n _this.unhighlightAll();\n }\n }\n }, _b);\n blurActions[this.passedElement.element.type]();\n } else {\n // On IE11, clicking the scollbar blurs our input and thus\n // closes the dropdown. To stop this, we refocus our input\n // if we know we are on IE *and* are scrolling.\n this._isScrollingOnIe = false;\n this.input.element.focus();\n }\n };\n\n Choices.prototype._onFormReset = function () {\n this._store.dispatch((0, misc_1.resetTo)(this._initialState));\n };\n\n Choices.prototype._highlightChoice = function (el) {\n var _this = this;\n\n if (el === void 0) {\n el = null;\n }\n\n var choices = Array.from(this.dropdown.element.querySelectorAll('[data-choice-selectable]'));\n\n if (!choices.length) {\n return;\n }\n\n var passedEl = el;\n var highlightedChoices = Array.from(this.dropdown.element.querySelectorAll(\".\".concat(this.config.classNames.highlightedState))); // Remove any highlighted choices\n\n highlightedChoices.forEach(function (choice) {\n choice.classList.remove(_this.config.classNames.highlightedState);\n choice.setAttribute('aria-selected', 'false');\n });\n\n if (passedEl) {\n this._highlightPosition = choices.indexOf(passedEl);\n } else {\n // Highlight choice based on last known highlight location\n if (choices.length > this._highlightPosition) {\n // If we have an option to highlight\n passedEl = choices[this._highlightPosition];\n } else {\n // Otherwise highlight the option before\n passedEl = choices[choices.length - 1];\n }\n\n if (!passedEl) {\n passedEl = choices[0];\n }\n }\n\n passedEl.classList.add(this.config.classNames.highlightedState);\n passedEl.setAttribute('aria-selected', 'true');\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightChoice, {\n el: passedEl\n });\n\n if (this.dropdown.isActive) {\n // IE11 ignores aria-label and blocks virtual keyboard\n // if aria-activedescendant is set without a dropdown\n this.input.setActiveDescendant(passedEl.id);\n this.containerOuter.setActiveDescendant(passedEl.id);\n }\n };\n\n Choices.prototype._addItem = function (_a) {\n var value = _a.value,\n _b = _a.label,\n label = _b === void 0 ? null : _b,\n _c = _a.choiceId,\n choiceId = _c === void 0 ? -1 : _c,\n _d = _a.groupId,\n groupId = _d === void 0 ? -1 : _d,\n _e = _a.customProperties,\n customProperties = _e === void 0 ? {} : _e,\n _f = _a.placeholder,\n placeholder = _f === void 0 ? false : _f,\n _g = _a.keyCode,\n keyCode = _g === void 0 ? -1 : _g;\n var passedValue = typeof value === 'string' ? value.trim() : value;\n var items = this._store.items;\n var passedLabel = label || passedValue;\n var passedOptionId = choiceId || -1;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n var id = items ? items.length + 1 : 1; // If a prepended value has been passed, prepend it\n\n if (this.config.prependValue) {\n passedValue = this.config.prependValue + passedValue.toString();\n } // If an appended value has been passed, append it\n\n\n if (this.config.appendValue) {\n passedValue += this.config.appendValue.toString();\n }\n\n this._store.dispatch((0, items_1.addItem)({\n value: passedValue,\n label: passedLabel,\n id: id,\n choiceId: passedOptionId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n\n if (this._isSelectOneElement) {\n this.removeActiveItems(id);\n } // Trigger change event\n\n\n this.passedElement.triggerEvent(constants_1.EVENTS.addItem, {\n id: id,\n value: passedValue,\n label: passedLabel,\n customProperties: customProperties,\n groupValue: group && group.value ? group.value : null,\n keyCode: keyCode\n });\n };\n\n Choices.prototype._removeItem = function (item) {\n var id = item.id,\n value = item.value,\n label = item.label,\n customProperties = item.customProperties,\n choiceId = item.choiceId,\n groupId = item.groupId;\n var group = groupId && groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n if (!id || !choiceId) {\n return;\n }\n\n this._store.dispatch((0, items_1.removeItem)(id, choiceId));\n\n this.passedElement.triggerEvent(constants_1.EVENTS.removeItem, {\n id: id,\n value: value,\n label: label,\n customProperties: customProperties,\n groupValue: group && group.value ? group.value : null\n });\n };\n\n Choices.prototype._addChoice = function (_a) {\n var value = _a.value,\n _b = _a.label,\n label = _b === void 0 ? null : _b,\n _c = _a.isSelected,\n isSelected = _c === void 0 ? false : _c,\n _d = _a.isDisabled,\n isDisabled = _d === void 0 ? false : _d,\n _e = _a.groupId,\n groupId = _e === void 0 ? -1 : _e,\n _f = _a.customProperties,\n customProperties = _f === void 0 ? {} : _f,\n _g = _a.placeholder,\n placeholder = _g === void 0 ? false : _g,\n _h = _a.keyCode,\n keyCode = _h === void 0 ? -1 : _h;\n\n if (typeof value === 'undefined' || value === null) {\n return;\n } // Generate unique id\n\n\n var choices = this._store.choices;\n var choiceLabel = label || value;\n var choiceId = choices ? choices.length + 1 : 1;\n var choiceElementId = \"\".concat(this._baseId, \"-\").concat(this._idNames.itemChoice, \"-\").concat(choiceId);\n\n this._store.dispatch((0, choices_1.addChoice)({\n id: choiceId,\n groupId: groupId,\n elementId: choiceElementId,\n value: value,\n label: choiceLabel,\n disabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n\n if (isSelected) {\n this._addItem({\n value: value,\n label: choiceLabel,\n choiceId: choiceId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n });\n }\n };\n\n Choices.prototype._addGroup = function (_a) {\n var _this = this;\n\n var group = _a.group,\n id = _a.id,\n _b = _a.valueKey,\n valueKey = _b === void 0 ? 'value' : _b,\n _c = _a.labelKey,\n labelKey = _c === void 0 ? 'label' : _c;\n var groupChoices = (0, utils_1.isType)('Object', group) ? group.choices : Array.from(group.getElementsByTagName('OPTION'));\n var groupId = id || Math.floor(new Date().valueOf() * Math.random());\n var isDisabled = group.disabled ? group.disabled : false;\n\n if (groupChoices) {\n this._store.dispatch((0, groups_1.addGroup)({\n value: group.label,\n id: groupId,\n active: true,\n disabled: isDisabled\n }));\n\n var addGroupChoices = function (choice) {\n var isOptDisabled = choice.disabled || choice.parentNode && choice.parentNode.disabled;\n\n _this._addChoice({\n value: choice[valueKey],\n label: (0, utils_1.isType)('Object', choice) ? choice[labelKey] : choice.innerHTML,\n isSelected: choice.selected,\n isDisabled: isOptDisabled,\n groupId: groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder\n });\n };\n\n groupChoices.forEach(addGroupChoices);\n } else {\n this._store.dispatch((0, groups_1.addGroup)({\n value: group.label,\n id: group.id,\n active: false,\n disabled: group.disabled\n }));\n }\n };\n\n Choices.prototype._getTemplate = function (template) {\n var _a;\n\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var classNames = this.config.classNames;\n return (_a = this._templates[template]).call.apply(_a, __spreadArray([this, classNames], args, false));\n };\n\n Choices.prototype._createTemplates = function () {\n var callbackOnCreateTemplates = this.config.callbackOnCreateTemplates;\n var userTemplates = {};\n\n if (callbackOnCreateTemplates && typeof callbackOnCreateTemplates === 'function') {\n userTemplates = callbackOnCreateTemplates.call(this, utils_1.strToEl);\n }\n\n this._templates = (0, deepmerge_1.default)(templates_1.default, userTemplates);\n };\n\n Choices.prototype._createElements = function () {\n this.containerOuter = new components_1.Container({\n element: this._getTemplate('containerOuter', this._direction, this._isSelectElement, this._isSelectOneElement, this.config.searchEnabled, this.passedElement.element.type),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.containerInner = new components_1.Container({\n element: this._getTemplate('containerInner'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.input = new components_1.Input({\n element: this._getTemplate('input', this._placeholderValue),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n preventPaste: !this.config.paste\n });\n this.choiceList = new components_1.List({\n element: this._getTemplate('choiceList', this._isSelectOneElement)\n });\n this.itemList = new components_1.List({\n element: this._getTemplate('itemList', this._isSelectOneElement)\n });\n this.dropdown = new components_1.Dropdown({\n element: this._getTemplate('dropdown'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type\n });\n };\n\n Choices.prototype._createStructure = function () {\n // Hide original element\n this.passedElement.conceal(); // Wrap input in container preserving DOM ordering\n\n this.containerInner.wrap(this.passedElement.element); // Wrapper inner container with outer container\n\n this.containerOuter.wrap(this.containerInner.element);\n\n if (this._isSelectOneElement) {\n this.input.placeholder = this.config.searchPlaceholderValue || '';\n } else if (this._placeholderValue) {\n this.input.placeholder = this._placeholderValue;\n this.input.setWidth();\n }\n\n this.containerOuter.element.appendChild(this.containerInner.element);\n this.containerOuter.element.appendChild(this.dropdown.element);\n this.containerInner.element.appendChild(this.itemList.element);\n\n if (!this._isTextElement) {\n this.dropdown.element.appendChild(this.choiceList.element);\n }\n\n if (!this._isSelectOneElement) {\n this.containerInner.element.appendChild(this.input.element);\n } else if (this.config.searchEnabled) {\n this.dropdown.element.insertBefore(this.input.element, this.dropdown.element.firstChild);\n }\n\n if (this._isSelectElement) {\n this._highlightPosition = 0;\n this._isSearching = false;\n\n this._startLoading();\n\n if (this._presetGroups.length) {\n this._addPredefinedGroups(this._presetGroups);\n } else {\n this._addPredefinedChoices(this._presetChoices);\n }\n\n this._stopLoading();\n }\n\n if (this._isTextElement) {\n this._addPredefinedItems(this._presetItems);\n }\n };\n\n Choices.prototype._addPredefinedGroups = function (groups) {\n var _this = this; // If we have a placeholder option\n\n\n var placeholderChoice = this.passedElement.placeholderOption;\n\n if (placeholderChoice && placeholderChoice.parentNode && placeholderChoice.parentNode.tagName === 'SELECT') {\n this._addChoice({\n value: placeholderChoice.value,\n label: placeholderChoice.innerHTML,\n isSelected: placeholderChoice.selected,\n isDisabled: placeholderChoice.disabled,\n placeholder: true\n });\n }\n\n groups.forEach(function (group) {\n return _this._addGroup({\n group: group,\n id: group.id || null\n });\n });\n };\n\n Choices.prototype._addPredefinedChoices = function (choices) {\n var _this = this; // If sorting is enabled or the user is searching, filter choices\n\n\n if (this.config.shouldSort) {\n choices.sort(this.config.sorter);\n }\n\n var hasSelectedChoice = choices.some(function (choice) {\n return choice.selected;\n });\n var firstEnabledChoiceIndex = choices.findIndex(function (choice) {\n return choice.disabled === undefined || !choice.disabled;\n });\n choices.forEach(function (choice, index) {\n var _a = choice.value,\n value = _a === void 0 ? '' : _a,\n label = choice.label,\n customProperties = choice.customProperties,\n placeholder = choice.placeholder;\n\n if (_this._isSelectElement) {\n // If the choice is actually a group\n if (choice.choices) {\n _this._addGroup({\n group: choice,\n id: choice.id || null\n });\n } else {\n /**\n * If there is a selected choice already or the choice is not the first in\n * the array, add each choice normally.\n *\n * Otherwise we pre-select the first enabled choice in the array (\"select-one\" only)\n */\n var shouldPreselect = _this._isSelectOneElement && !hasSelectedChoice && index === firstEnabledChoiceIndex;\n var isSelected = shouldPreselect ? true : choice.selected;\n var isDisabled = choice.disabled;\n\n _this._addChoice({\n value: value,\n label: label,\n isSelected: !!isSelected,\n isDisabled: !!isDisabled,\n placeholder: !!placeholder,\n customProperties: customProperties\n });\n }\n } else {\n _this._addChoice({\n value: value,\n label: label,\n isSelected: !!choice.selected,\n isDisabled: !!choice.disabled,\n placeholder: !!choice.placeholder,\n customProperties: customProperties\n });\n }\n });\n };\n\n Choices.prototype._addPredefinedItems = function (items) {\n var _this = this;\n\n items.forEach(function (item) {\n if (typeof item === 'object' && item.value) {\n _this._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n\n if (typeof item === 'string') {\n _this._addItem({\n value: item\n });\n }\n });\n };\n\n Choices.prototype._setChoiceOrItem = function (item) {\n var _this = this;\n\n var itemType = (0, utils_1.getType)(item).toLowerCase();\n var handleType = {\n object: function () {\n if (!item.value) {\n return;\n } // If we are dealing with a select input, we need to create an option first\n // that is then selected. For text inputs we can just add items normally.\n\n\n if (!_this._isTextElement) {\n _this._addChoice({\n value: item.value,\n label: item.label,\n isSelected: true,\n isDisabled: false,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n } else {\n _this._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n },\n string: function () {\n if (!_this._isTextElement) {\n _this._addChoice({\n value: item,\n label: item,\n isSelected: true,\n isDisabled: false\n });\n } else {\n _this._addItem({\n value: item\n });\n }\n }\n };\n handleType[itemType]();\n };\n\n Choices.prototype._findAndSelectChoiceByValue = function (value) {\n var _this = this;\n\n var choices = this._store.choices; // Check 'value' property exists and the choice isn't already selected\n\n var foundChoice = choices.find(function (choice) {\n return _this.config.valueComparer(choice.value, value);\n });\n\n if (foundChoice && !foundChoice.selected) {\n this._addItem({\n value: foundChoice.value,\n label: foundChoice.label,\n choiceId: foundChoice.id,\n groupId: foundChoice.groupId,\n customProperties: foundChoice.customProperties,\n placeholder: foundChoice.placeholder,\n keyCode: foundChoice.keyCode\n });\n }\n };\n\n Choices.prototype._generatePlaceholderValue = function () {\n if (this._isSelectElement && this.passedElement.placeholderOption) {\n var placeholderOption = this.passedElement.placeholderOption;\n return placeholderOption ? placeholderOption.text : null;\n }\n\n var _a = this.config,\n placeholder = _a.placeholder,\n placeholderValue = _a.placeholderValue;\n var dataset = this.passedElement.element.dataset;\n\n if (placeholder) {\n if (placeholderValue) {\n return placeholderValue;\n }\n\n if (dataset.placeholder) {\n return dataset.placeholder;\n }\n }\n\n return null;\n };\n\n return Choices;\n}();\n\nexports[\"default\"] = Choices;\n\n/***/ }),\n\n/***/ 613:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar utils_1 = __webpack_require__(799);\n\nvar constants_1 = __webpack_require__(883);\n\nvar Container =\n/** @class */\nfunction () {\n function Container(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames,\n position = _a.position;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.position = position;\n this.isOpen = false;\n this.isFlipped = false;\n this.isFocussed = false;\n this.isDisabled = false;\n this.isLoading = false;\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n\n Container.prototype.addEventListeners = function () {\n this.element.addEventListener('focus', this._onFocus);\n this.element.addEventListener('blur', this._onBlur);\n };\n\n Container.prototype.removeEventListeners = function () {\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n };\n /**\n * Determine whether container should be flipped based on passed\n * dropdown position\n */\n\n\n Container.prototype.shouldFlip = function (dropdownPos) {\n if (typeof dropdownPos !== 'number') {\n return false;\n } // If flip is enabled and the dropdown bottom position is\n // greater than the window height flip the dropdown.\n\n\n var shouldFlip = false;\n\n if (this.position === 'auto') {\n shouldFlip = !window.matchMedia(\"(min-height: \".concat(dropdownPos + 1, \"px)\")).matches;\n } else if (this.position === 'top') {\n shouldFlip = true;\n }\n\n return shouldFlip;\n };\n\n Container.prototype.setActiveDescendant = function (activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n Container.prototype.removeActiveDescendant = function () {\n this.element.removeAttribute('aria-activedescendant');\n };\n\n Container.prototype.open = function (dropdownPos) {\n this.element.classList.add(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isOpen = true;\n\n if (this.shouldFlip(dropdownPos)) {\n this.element.classList.add(this.classNames.flippedState);\n this.isFlipped = true;\n }\n };\n\n Container.prototype.close = function () {\n this.element.classList.remove(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'false');\n this.removeActiveDescendant();\n this.isOpen = false; // A dropdown flips if it does not have space within the page\n\n if (this.isFlipped) {\n this.element.classList.remove(this.classNames.flippedState);\n this.isFlipped = false;\n }\n };\n\n Container.prototype.focus = function () {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n Container.prototype.addFocusState = function () {\n this.element.classList.add(this.classNames.focusState);\n };\n\n Container.prototype.removeFocusState = function () {\n this.element.classList.remove(this.classNames.focusState);\n };\n\n Container.prototype.enable = function () {\n this.element.classList.remove(this.classNames.disabledState);\n this.element.removeAttribute('aria-disabled');\n\n if (this.type === constants_1.SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '0');\n }\n\n this.isDisabled = false;\n };\n\n Container.prototype.disable = function () {\n this.element.classList.add(this.classNames.disabledState);\n this.element.setAttribute('aria-disabled', 'true');\n\n if (this.type === constants_1.SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '-1');\n }\n\n this.isDisabled = true;\n };\n\n Container.prototype.wrap = function (element) {\n (0, utils_1.wrap)(element, this.element);\n };\n\n Container.prototype.unwrap = function (element) {\n if (this.element.parentNode) {\n // Move passed element outside this element\n this.element.parentNode.insertBefore(element, this.element); // Remove this element\n\n this.element.parentNode.removeChild(this.element);\n }\n };\n\n Container.prototype.addLoadingState = function () {\n this.element.classList.add(this.classNames.loadingState);\n this.element.setAttribute('aria-busy', 'true');\n this.isLoading = true;\n };\n\n Container.prototype.removeLoadingState = function () {\n this.element.classList.remove(this.classNames.loadingState);\n this.element.removeAttribute('aria-busy');\n this.isLoading = false;\n };\n\n Container.prototype._onFocus = function () {\n this.isFocussed = true;\n };\n\n Container.prototype._onBlur = function () {\n this.isFocussed = false;\n };\n\n return Container;\n}();\n\nexports[\"default\"] = Container;\n\n/***/ }),\n\n/***/ 217:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar Dropdown =\n/** @class */\nfunction () {\n function Dropdown(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.isActive = false;\n }\n\n Object.defineProperty(Dropdown.prototype, \"distanceFromTopWindow\", {\n /**\n * Bottom position of dropdown in viewport coordinates\n */\n get: function () {\n return this.element.getBoundingClientRect().bottom;\n },\n enumerable: false,\n configurable: true\n });\n\n Dropdown.prototype.getChild = function (selector) {\n return this.element.querySelector(selector);\n };\n /**\n * Show dropdown to user by adding active state class\n */\n\n\n Dropdown.prototype.show = function () {\n this.element.classList.add(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isActive = true;\n return this;\n };\n /**\n * Hide dropdown from user\n */\n\n\n Dropdown.prototype.hide = function () {\n this.element.classList.remove(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'false');\n this.isActive = false;\n return this;\n };\n\n return Dropdown;\n}();\n\nexports[\"default\"] = Dropdown;\n\n/***/ }),\n\n/***/ 520:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.WrappedSelect = exports.WrappedInput = exports.List = exports.Input = exports.Container = exports.Dropdown = void 0;\n\nvar dropdown_1 = __importDefault(__webpack_require__(217));\n\nexports.Dropdown = dropdown_1.default;\n\nvar container_1 = __importDefault(__webpack_require__(613));\n\nexports.Container = container_1.default;\n\nvar input_1 = __importDefault(__webpack_require__(11));\n\nexports.Input = input_1.default;\n\nvar list_1 = __importDefault(__webpack_require__(624));\n\nexports.List = list_1.default;\n\nvar wrapped_input_1 = __importDefault(__webpack_require__(541));\n\nexports.WrappedInput = wrapped_input_1.default;\n\nvar wrapped_select_1 = __importDefault(__webpack_require__(982));\n\nexports.WrappedSelect = wrapped_select_1.default;\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar utils_1 = __webpack_require__(799);\n\nvar constants_1 = __webpack_require__(883);\n\nvar Input =\n/** @class */\nfunction () {\n function Input(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames,\n preventPaste = _a.preventPaste;\n this.element = element;\n this.type = type;\n this.classNames = classNames;\n this.preventPaste = preventPaste;\n this.isFocussed = this.element.isEqualNode(document.activeElement);\n this.isDisabled = element.disabled;\n this._onPaste = this._onPaste.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n\n Object.defineProperty(Input.prototype, \"placeholder\", {\n set: function (placeholder) {\n this.element.placeholder = placeholder;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Input.prototype, \"value\", {\n get: function () {\n return (0, utils_1.sanitise)(this.element.value);\n },\n set: function (value) {\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n\n Input.prototype.addEventListeners = function () {\n this.element.addEventListener('paste', this._onPaste);\n this.element.addEventListener('input', this._onInput, {\n passive: true\n });\n this.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n\n Input.prototype.removeEventListeners = function () {\n this.element.removeEventListener('input', this._onInput);\n this.element.removeEventListener('paste', this._onPaste);\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n };\n\n Input.prototype.enable = function () {\n this.element.removeAttribute('disabled');\n this.isDisabled = false;\n };\n\n Input.prototype.disable = function () {\n this.element.setAttribute('disabled', '');\n this.isDisabled = true;\n };\n\n Input.prototype.focus = function () {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n Input.prototype.blur = function () {\n if (this.isFocussed) {\n this.element.blur();\n }\n };\n\n Input.prototype.clear = function (setWidth) {\n if (setWidth === void 0) {\n setWidth = true;\n }\n\n if (this.element.value) {\n this.element.value = '';\n }\n\n if (setWidth) {\n this.setWidth();\n }\n\n return this;\n };\n /**\n * Set the correct input width based on placeholder\n * value or input value\n */\n\n\n Input.prototype.setWidth = function () {\n // Resize input to contents or placeholder\n var _a = this.element,\n style = _a.style,\n value = _a.value,\n placeholder = _a.placeholder;\n style.minWidth = \"\".concat(placeholder.length + 1, \"ch\");\n style.width = \"\".concat(value.length + 1, \"ch\");\n };\n\n Input.prototype.setActiveDescendant = function (activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n Input.prototype.removeActiveDescendant = function () {\n this.element.removeAttribute('aria-activedescendant');\n };\n\n Input.prototype._onInput = function () {\n if (this.type !== constants_1.SELECT_ONE_TYPE) {\n this.setWidth();\n }\n };\n\n Input.prototype._onPaste = function (event) {\n if (this.preventPaste) {\n event.preventDefault();\n }\n };\n\n Input.prototype._onFocus = function () {\n this.isFocussed = true;\n };\n\n Input.prototype._onBlur = function () {\n this.isFocussed = false;\n };\n\n return Input;\n}();\n\nexports[\"default\"] = Input;\n\n/***/ }),\n\n/***/ 624:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar constants_1 = __webpack_require__(883);\n\nvar List =\n/** @class */\nfunction () {\n function List(_a) {\n var element = _a.element;\n this.element = element;\n this.scrollPos = this.element.scrollTop;\n this.height = this.element.offsetHeight;\n }\n\n List.prototype.clear = function () {\n this.element.innerHTML = '';\n };\n\n List.prototype.append = function (node) {\n this.element.appendChild(node);\n };\n\n List.prototype.getChild = function (selector) {\n return this.element.querySelector(selector);\n };\n\n List.prototype.hasChildren = function () {\n return this.element.hasChildNodes();\n };\n\n List.prototype.scrollToTop = function () {\n this.element.scrollTop = 0;\n };\n\n List.prototype.scrollToChildElement = function (element, direction) {\n var _this = this;\n\n if (!element) {\n return;\n }\n\n var listHeight = this.element.offsetHeight; // Scroll position of dropdown\n\n var listScrollPosition = this.element.scrollTop + listHeight;\n var elementHeight = element.offsetHeight; // Distance from bottom of element to top of parent\n\n var elementPos = element.offsetTop + elementHeight; // Difference between the element and scroll position\n\n var destination = direction > 0 ? this.element.scrollTop + elementPos - listScrollPosition : element.offsetTop;\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n };\n\n List.prototype._scrollDown = function (scrollPos, strength, destination) {\n var easing = (destination - scrollPos) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos + distance;\n };\n\n List.prototype._scrollUp = function (scrollPos, strength, destination) {\n var easing = (scrollPos - destination) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos - distance;\n };\n\n List.prototype._animateScroll = function (destination, direction) {\n var _this = this;\n\n var strength = constants_1.SCROLLING_SPEED;\n var choiceListScrollTop = this.element.scrollTop;\n var continueAnimation = false;\n\n if (direction > 0) {\n this._scrollDown(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop < destination) {\n continueAnimation = true;\n }\n } else {\n this._scrollUp(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop > destination) {\n continueAnimation = true;\n }\n }\n\n if (continueAnimation) {\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n }\n };\n\n return List;\n}();\n\nexports[\"default\"] = List;\n\n/***/ }),\n\n/***/ 730:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar utils_1 = __webpack_require__(799);\n\nvar WrappedElement =\n/** @class */\nfunction () {\n function WrappedElement(_a) {\n var element = _a.element,\n classNames = _a.classNames;\n this.element = element;\n this.classNames = classNames;\n\n if (!(element instanceof HTMLInputElement) && !(element instanceof HTMLSelectElement)) {\n throw new TypeError('Invalid element passed');\n }\n\n this.isDisabled = false;\n }\n\n Object.defineProperty(WrappedElement.prototype, \"isActive\", {\n get: function () {\n return this.element.dataset.choice === 'active';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedElement.prototype, \"dir\", {\n get: function () {\n return this.element.dir;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedElement.prototype, \"value\", {\n get: function () {\n return this.element.value;\n },\n set: function (value) {\n // you must define setter here otherwise it will be readonly property\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n\n WrappedElement.prototype.conceal = function () {\n // Hide passed input\n this.element.classList.add(this.classNames.input);\n this.element.hidden = true; // Remove element from tab index\n\n this.element.tabIndex = -1; // Backup original styles if any\n\n var origStyle = this.element.getAttribute('style');\n\n if (origStyle) {\n this.element.setAttribute('data-choice-orig-style', origStyle);\n }\n\n this.element.setAttribute('data-choice', 'active');\n };\n\n WrappedElement.prototype.reveal = function () {\n // Reinstate passed element\n this.element.classList.remove(this.classNames.input);\n this.element.hidden = false;\n this.element.removeAttribute('tabindex'); // Recover original styles if any\n\n var origStyle = this.element.getAttribute('data-choice-orig-style');\n\n if (origStyle) {\n this.element.removeAttribute('data-choice-orig-style');\n this.element.setAttribute('style', origStyle);\n } else {\n this.element.removeAttribute('style');\n }\n\n this.element.removeAttribute('data-choice'); // Re-assign values - this is weird, I know\n // @todo Figure out why we need to do this\n\n this.element.value = this.element.value; // eslint-disable-line no-self-assign\n };\n\n WrappedElement.prototype.enable = function () {\n this.element.removeAttribute('disabled');\n this.element.disabled = false;\n this.isDisabled = false;\n };\n\n WrappedElement.prototype.disable = function () {\n this.element.setAttribute('disabled', '');\n this.element.disabled = true;\n this.isDisabled = true;\n };\n\n WrappedElement.prototype.triggerEvent = function (eventType, data) {\n (0, utils_1.dispatchEvent)(this.element, eventType, data);\n };\n\n return WrappedElement;\n}();\n\nexports[\"default\"] = WrappedElement;\n\n/***/ }),\n\n/***/ 541:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar wrapped_element_1 = __importDefault(__webpack_require__(730));\n\nvar WrappedInput =\n/** @class */\nfunction (_super) {\n __extends(WrappedInput, _super);\n\n function WrappedInput(_a) {\n var element = _a.element,\n classNames = _a.classNames,\n delimiter = _a.delimiter;\n\n var _this = _super.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n\n _this.delimiter = delimiter;\n return _this;\n }\n\n Object.defineProperty(WrappedInput.prototype, \"value\", {\n get: function () {\n return this.element.value;\n },\n set: function (value) {\n this.element.setAttribute('value', value);\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n return WrappedInput;\n}(wrapped_element_1.default);\n\nexports[\"default\"] = WrappedInput;\n\n/***/ }),\n\n/***/ 982:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar wrapped_element_1 = __importDefault(__webpack_require__(730));\n\nvar WrappedSelect =\n/** @class */\nfunction (_super) {\n __extends(WrappedSelect, _super);\n\n function WrappedSelect(_a) {\n var element = _a.element,\n classNames = _a.classNames,\n template = _a.template;\n\n var _this = _super.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n\n _this.template = template;\n return _this;\n }\n\n Object.defineProperty(WrappedSelect.prototype, \"placeholderOption\", {\n get: function () {\n return this.element.querySelector('option[value=\"\"]') || // Backward compatibility layer for the non-standard placeholder attribute supported in older versions.\n this.element.querySelector('option[placeholder]');\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedSelect.prototype, \"optionGroups\", {\n get: function () {\n return Array.from(this.element.getElementsByTagName('OPTGROUP'));\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedSelect.prototype, \"options\", {\n get: function () {\n return Array.from(this.element.options);\n },\n set: function (options) {\n var _this = this;\n\n var fragment = document.createDocumentFragment();\n\n var addOptionToFragment = function (data) {\n // Create a standard select option\n var option = _this.template(data); // Append it to fragment\n\n\n fragment.appendChild(option);\n }; // Add each list item to list\n\n\n options.forEach(function (optionData) {\n return addOptionToFragment(optionData);\n });\n this.appendDocFragment(fragment);\n },\n enumerable: false,\n configurable: true\n });\n\n WrappedSelect.prototype.appendDocFragment = function (fragment) {\n this.element.innerHTML = '';\n this.element.appendChild(fragment);\n };\n\n return WrappedSelect;\n}(wrapped_element_1.default);\n\nexports[\"default\"] = WrappedSelect;\n\n/***/ }),\n\n/***/ 883:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.SCROLLING_SPEED = exports.SELECT_MULTIPLE_TYPE = exports.SELECT_ONE_TYPE = exports.TEXT_TYPE = exports.KEY_CODES = exports.ACTION_TYPES = exports.EVENTS = void 0;\nexports.EVENTS = {\n showDropdown: 'showDropdown',\n hideDropdown: 'hideDropdown',\n change: 'change',\n choice: 'choice',\n search: 'search',\n addItem: 'addItem',\n removeItem: 'removeItem',\n highlightItem: 'highlightItem',\n highlightChoice: 'highlightChoice',\n unhighlightItem: 'unhighlightItem'\n};\nexports.ACTION_TYPES = {\n ADD_CHOICE: 'ADD_CHOICE',\n FILTER_CHOICES: 'FILTER_CHOICES',\n ACTIVATE_CHOICES: 'ACTIVATE_CHOICES',\n CLEAR_CHOICES: 'CLEAR_CHOICES',\n ADD_GROUP: 'ADD_GROUP',\n ADD_ITEM: 'ADD_ITEM',\n REMOVE_ITEM: 'REMOVE_ITEM',\n HIGHLIGHT_ITEM: 'HIGHLIGHT_ITEM',\n CLEAR_ALL: 'CLEAR_ALL',\n RESET_TO: 'RESET_TO',\n SET_IS_LOADING: 'SET_IS_LOADING'\n};\nexports.KEY_CODES = {\n BACK_KEY: 46,\n DELETE_KEY: 8,\n ENTER_KEY: 13,\n A_KEY: 65,\n ESC_KEY: 27,\n UP_KEY: 38,\n DOWN_KEY: 40,\n PAGE_UP_KEY: 33,\n PAGE_DOWN_KEY: 34\n};\nexports.TEXT_TYPE = 'text';\nexports.SELECT_ONE_TYPE = 'select-one';\nexports.SELECT_MULTIPLE_TYPE = 'select-multiple';\nexports.SCROLLING_SPEED = 4;\n\n/***/ }),\n\n/***/ 789:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.DEFAULT_CONFIG = exports.DEFAULT_CLASSNAMES = void 0;\n\nvar utils_1 = __webpack_require__(799);\n\nexports.DEFAULT_CLASSNAMES = {\n containerOuter: 'choices',\n containerInner: 'choices__inner',\n input: 'choices__input',\n inputCloned: 'choices__input--cloned',\n list: 'choices__list',\n listItems: 'choices__list--multiple',\n listSingle: 'choices__list--single',\n listDropdown: 'choices__list--dropdown',\n item: 'choices__item',\n itemSelectable: 'choices__item--selectable',\n itemDisabled: 'choices__item--disabled',\n itemChoice: 'choices__item--choice',\n placeholder: 'choices__placeholder',\n group: 'choices__group',\n groupHeading: 'choices__heading',\n button: 'choices__button',\n activeState: 'is-active',\n focusState: 'is-focused',\n openState: 'is-open',\n disabledState: 'is-disabled',\n highlightedState: 'is-highlighted',\n selectedState: 'is-selected',\n flippedState: 'is-flipped',\n loadingState: 'is-loading',\n noResults: 'has-no-results',\n noChoices: 'has-no-choices'\n};\nexports.DEFAULT_CONFIG = {\n items: [],\n choices: [],\n silent: false,\n renderChoiceLimit: -1,\n maxItemCount: -1,\n addItems: true,\n addItemFilter: null,\n removeItems: true,\n removeItemButton: false,\n editItems: false,\n duplicateItemsAllowed: true,\n delimiter: ',',\n paste: true,\n searchEnabled: true,\n searchChoices: true,\n searchFloor: 1,\n searchResultLimit: 4,\n searchFields: ['label', 'value'],\n position: 'auto',\n resetScrollPosition: true,\n shouldSort: true,\n shouldSortItems: false,\n sorter: utils_1.sortByAlpha,\n placeholder: true,\n placeholderValue: null,\n searchPlaceholderValue: null,\n prependValue: null,\n appendValue: null,\n renderSelectedChoices: 'auto',\n loadingText: 'Loading...',\n noResultsText: 'No results found',\n noChoicesText: 'No choices to choose from',\n itemSelectText: 'Press to select',\n uniqueItemText: 'Only unique values can be added',\n customAddItemText: 'Only values matching specific conditions can be added',\n addItemText: function (value) {\n return \"Press Enter to add \\\"\".concat((0, utils_1.sanitise)(value), \"\\\"\");\n },\n maxItemText: function (maxItemCount) {\n return \"Only \".concat(maxItemCount, \" values can be added\");\n },\n valueComparer: function (value1, value2) {\n return value1 === value2;\n },\n fuseOptions: {\n includeScore: true\n },\n callbackOnInit: null,\n callbackOnCreateTemplates: null,\n classNames: exports.DEFAULT_CLASSNAMES\n};\n\n/***/ }),\n\n/***/ 799:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.diff = exports.cloneObject = exports.existsInArray = exports.dispatchEvent = exports.sortByScore = exports.sortByAlpha = exports.strToEl = exports.sanitise = exports.isScrolledIntoView = exports.getAdjacentEl = exports.wrap = exports.isType = exports.getType = exports.generateId = exports.generateChars = exports.getRandomNumber = void 0;\n\nvar getRandomNumber = function (min, max) {\n return Math.floor(Math.random() * (max - min) + min);\n};\n\nexports.getRandomNumber = getRandomNumber;\n\nvar generateChars = function (length) {\n return Array.from({\n length: length\n }, function () {\n return (0, exports.getRandomNumber)(0, 36).toString(36);\n }).join('');\n};\n\nexports.generateChars = generateChars;\n\nvar generateId = function (element, prefix) {\n var id = element.id || element.name && \"\".concat(element.name, \"-\").concat((0, exports.generateChars)(2)) || (0, exports.generateChars)(4);\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = \"\".concat(prefix, \"-\").concat(id);\n return id;\n};\n\nexports.generateId = generateId;\n\nvar getType = function (obj) {\n return Object.prototype.toString.call(obj).slice(8, -1);\n};\n\nexports.getType = getType;\n\nvar isType = function (type, obj) {\n return obj !== undefined && obj !== null && (0, exports.getType)(obj) === type;\n};\n\nexports.isType = isType;\n\nvar wrap = function (element, wrapper) {\n if (wrapper === void 0) {\n wrapper = document.createElement('div');\n }\n\n if (element.parentNode) {\n if (element.nextSibling) {\n element.parentNode.insertBefore(wrapper, element.nextSibling);\n } else {\n element.parentNode.appendChild(wrapper);\n }\n }\n\n return wrapper.appendChild(element);\n};\n\nexports.wrap = wrap;\n\nvar getAdjacentEl = function (startEl, selector, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n var prop = \"\".concat(direction > 0 ? 'next' : 'previous', \"ElementSibling\");\n var sibling = startEl[prop];\n\n while (sibling) {\n if (sibling.matches(selector)) {\n return sibling;\n }\n\n sibling = sibling[prop];\n }\n\n return sibling;\n};\n\nexports.getAdjacentEl = getAdjacentEl;\n\nvar isScrolledIntoView = function (element, parent, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n if (!element) {\n return false;\n }\n\n var isVisible;\n\n if (direction > 0) {\n // In view from bottom\n isVisible = parent.scrollTop + parent.offsetHeight >= element.offsetTop + element.offsetHeight;\n } else {\n // In view from top\n isVisible = element.offsetTop >= parent.scrollTop;\n }\n\n return isVisible;\n};\n\nexports.isScrolledIntoView = isScrolledIntoView;\n\nvar sanitise = function (value) {\n if (typeof value !== 'string') {\n return value;\n }\n\n return value.replace(/&/g, '&').replace(/>/g, '&rt;').replace(/ -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(\"\".concat(addItemAction_1.choiceId), 10)) {\n choice.selected = true;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'REMOVE_ITEM':\n {\n var removeItemAction_1 = action; // When an item is removed and it has an associated choice,\n // we want to re-enable it so it can be chosen again\n\n if (removeItemAction_1.choiceId && removeItemAction_1.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(\"\".concat(removeItemAction_1.choiceId), 10)) {\n choice.selected = false;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'FILTER_CHOICES':\n {\n var filterChoicesAction_1 = action;\n return state.map(function (obj) {\n var choice = obj; // Set active state based on whether choice is\n // within filtered results\n\n choice.active = filterChoicesAction_1.results.some(function (_a) {\n var item = _a.item,\n score = _a.score;\n\n if (item.id === choice.id) {\n choice.score = score;\n return true;\n }\n\n return false;\n });\n return choice;\n });\n }\n\n case 'ACTIVATE_CHOICES':\n {\n var activateChoicesAction_1 = action;\n return state.map(function (obj) {\n var choice = obj;\n choice.active = activateChoicesAction_1.active;\n return choice;\n });\n }\n\n case 'CLEAR_CHOICES':\n {\n return exports.defaultState;\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nexports[\"default\"] = choices;\n\n/***/ }),\n\n/***/ 871:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = [];\n\nfunction groups(state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n\n if (action === void 0) {\n action = {};\n }\n\n switch (action.type) {\n case 'ADD_GROUP':\n {\n var addGroupAction = action;\n return __spreadArray(__spreadArray([], state, true), [{\n id: addGroupAction.id,\n value: addGroupAction.value,\n active: addGroupAction.active,\n disabled: addGroupAction.disabled\n }], false);\n }\n\n case 'CLEAR_CHOICES':\n {\n return [];\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nexports[\"default\"] = groups;\n\n/***/ }),\n\n/***/ 655:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\n\nvar redux_1 = __webpack_require__(857);\n\nvar items_1 = __importDefault(__webpack_require__(52));\n\nvar groups_1 = __importDefault(__webpack_require__(871));\n\nvar choices_1 = __importDefault(__webpack_require__(273));\n\nvar loading_1 = __importDefault(__webpack_require__(502));\n\nvar utils_1 = __webpack_require__(799);\n\nexports.defaultState = {\n groups: [],\n items: [],\n choices: [],\n loading: false\n};\nvar appReducer = (0, redux_1.combineReducers)({\n items: items_1.default,\n groups: groups_1.default,\n choices: choices_1.default,\n loading: loading_1.default\n});\n\nvar rootReducer = function (passedState, action) {\n var state = passedState; // If we are clearing all items, groups and options we reassign\n // state and then pass that state to our proper reducer. This isn't\n // mutating our actual state\n // See: http://stackoverflow.com/a/35641992\n\n if (action.type === 'CLEAR_ALL') {\n state = exports.defaultState;\n } else if (action.type === 'RESET_TO') {\n return (0, utils_1.cloneObject)(action.state);\n }\n\n return appReducer(state, action);\n};\n\nexports[\"default\"] = rootReducer;\n\n/***/ }),\n\n/***/ 52:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = [];\n\nfunction items(state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n\n if (action === void 0) {\n action = {};\n }\n\n switch (action.type) {\n case 'ADD_ITEM':\n {\n var addItemAction = action; // Add object to items array\n\n var newState = __spreadArray(__spreadArray([], state, true), [{\n id: addItemAction.id,\n choiceId: addItemAction.choiceId,\n groupId: addItemAction.groupId,\n value: addItemAction.value,\n label: addItemAction.label,\n active: true,\n highlighted: false,\n customProperties: addItemAction.customProperties,\n placeholder: addItemAction.placeholder || false,\n keyCode: null\n }], false);\n\n return newState.map(function (obj) {\n var item = obj;\n item.highlighted = false;\n return item;\n });\n }\n\n case 'REMOVE_ITEM':\n {\n // Set item to inactive\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === action.id) {\n item.active = false;\n }\n\n return item;\n });\n }\n\n case 'HIGHLIGHT_ITEM':\n {\n var highlightItemAction_1 = action;\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === highlightItemAction_1.id) {\n item.highlighted = highlightItemAction_1.highlighted;\n }\n\n return item;\n });\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nexports[\"default\"] = items;\n\n/***/ }),\n\n/***/ 502:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = false;\n\nvar general = function (state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n\n if (action === void 0) {\n action = {};\n }\n\n switch (action.type) {\n case 'SET_IS_LOADING':\n {\n return action.isLoading;\n }\n\n default:\n {\n return state;\n }\n }\n};\n\nexports[\"default\"] = general;\n\n/***/ }),\n\n/***/ 744:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nvar redux_1 = __webpack_require__(857);\n\nvar index_1 = __importDefault(__webpack_require__(655));\n\nvar Store =\n/** @class */\nfunction () {\n function Store() {\n this._store = (0, redux_1.createStore)(index_1.default, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());\n }\n /**\n * Subscribe store to function call (wrapped Redux method)\n */\n\n\n Store.prototype.subscribe = function (onChange) {\n this._store.subscribe(onChange);\n };\n /**\n * Dispatch event to store (wrapped Redux method)\n */\n\n\n Store.prototype.dispatch = function (action) {\n this._store.dispatch(action);\n };\n\n Object.defineProperty(Store.prototype, \"state\", {\n /**\n * Get store object (wrapping Redux method)\n */\n get: function () {\n return this._store.getState();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"items\", {\n /**\n * Get items from store\n */\n get: function () {\n return this.state.items;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeItems\", {\n /**\n * Get active items from store\n */\n get: function () {\n return this.items.filter(function (item) {\n return item.active === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"highlightedActiveItems\", {\n /**\n * Get highlighted items from store\n */\n get: function () {\n return this.items.filter(function (item) {\n return item.active && item.highlighted;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"choices\", {\n /**\n * Get choices from store\n */\n get: function () {\n return this.state.choices;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeChoices\", {\n /**\n * Get active choices from store\n */\n get: function () {\n return this.choices.filter(function (choice) {\n return choice.active === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"selectableChoices\", {\n /**\n * Get selectable choices from store\n */\n get: function () {\n return this.choices.filter(function (choice) {\n return choice.disabled !== true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"searchableChoices\", {\n /**\n * Get choices that can be searched (excluding placeholders)\n */\n get: function () {\n return this.selectableChoices.filter(function (choice) {\n return choice.placeholder !== true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"placeholderChoice\", {\n /**\n * Get placeholder choice from store\n */\n get: function () {\n return __spreadArray([], this.choices, true).reverse().find(function (choice) {\n return choice.placeholder === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"groups\", {\n /**\n * Get groups from store\n */\n get: function () {\n return this.state.groups;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeGroups\", {\n /**\n * Get active groups from store\n */\n get: function () {\n var _a = this,\n groups = _a.groups,\n choices = _a.choices;\n\n return groups.filter(function (group) {\n var isActive = group.active === true && group.disabled === false;\n var hasActiveOptions = choices.some(function (choice) {\n return choice.active === true && choice.disabled === false;\n });\n return isActive && hasActiveOptions;\n }, []);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Get loading state from store\n */\n\n Store.prototype.isLoading = function () {\n return this.state.loading;\n };\n /**\n * Get single choice by it's ID\n */\n\n\n Store.prototype.getChoiceById = function (id) {\n return this.activeChoices.find(function (choice) {\n return choice.id === parseInt(id, 10);\n });\n };\n /**\n * Get group by group id\n */\n\n\n Store.prototype.getGroupById = function (id) {\n return this.groups.find(function (group) {\n return group.id === id;\n });\n };\n\n return Store;\n}();\n\nexports[\"default\"] = Store;\n\n/***/ }),\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n/**\n * Helpers to create HTML elements used by Choices\n * Can be overridden by providing `callbackOnCreateTemplates` option\n */\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar templates = {\n containerOuter: function (_a, dir, isSelectElement, isSelectOneElement, searchEnabled, passedElementType) {\n var containerOuter = _a.containerOuter;\n var div = Object.assign(document.createElement('div'), {\n className: containerOuter\n });\n div.dataset.type = passedElementType;\n\n if (dir) {\n div.dir = dir;\n }\n\n if (isSelectOneElement) {\n div.tabIndex = 0;\n }\n\n if (isSelectElement) {\n div.setAttribute('role', searchEnabled ? 'combobox' : 'listbox');\n\n if (searchEnabled) {\n div.setAttribute('aria-autocomplete', 'list');\n }\n }\n\n div.setAttribute('aria-haspopup', 'true');\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n containerInner: function (_a) {\n var containerInner = _a.containerInner;\n return Object.assign(document.createElement('div'), {\n className: containerInner\n });\n },\n itemList: function (_a, isSelectOneElement) {\n var list = _a.list,\n listSingle = _a.listSingle,\n listItems = _a.listItems;\n return Object.assign(document.createElement('div'), {\n className: \"\".concat(list, \" \").concat(isSelectOneElement ? listSingle : listItems)\n });\n },\n placeholder: function (_a, value) {\n var placeholder = _a.placeholder;\n return Object.assign(document.createElement('div'), {\n className: placeholder,\n innerHTML: value\n });\n },\n item: function (_a, _b, removeItemButton) {\n var item = _a.item,\n button = _a.button,\n highlightedState = _a.highlightedState,\n itemSelectable = _a.itemSelectable,\n placeholder = _a.placeholder;\n var id = _b.id,\n value = _b.value,\n label = _b.label,\n customProperties = _b.customProperties,\n active = _b.active,\n disabled = _b.disabled,\n highlighted = _b.highlighted,\n isPlaceholder = _b.placeholder;\n var div = Object.assign(document.createElement('div'), {\n className: item,\n innerHTML: label\n });\n Object.assign(div.dataset, {\n item: '',\n id: id,\n value: value,\n customProperties: customProperties\n });\n\n if (active) {\n div.setAttribute('aria-selected', 'true');\n }\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.classList.add(highlighted ? highlightedState : itemSelectable);\n\n if (removeItemButton) {\n if (disabled) {\n div.classList.remove(itemSelectable);\n }\n\n div.dataset.deletable = '';\n /** @todo This MUST be localizable, not hardcoded! */\n\n var REMOVE_ITEM_TEXT = 'Remove item';\n var removeButton = Object.assign(document.createElement('button'), {\n type: 'button',\n className: button,\n innerHTML: REMOVE_ITEM_TEXT\n });\n removeButton.setAttribute('aria-label', \"\".concat(REMOVE_ITEM_TEXT, \": '\").concat(value, \"'\"));\n removeButton.dataset.button = '';\n div.appendChild(removeButton);\n }\n\n return div;\n },\n choiceList: function (_a, isSelectOneElement) {\n var list = _a.list;\n var div = Object.assign(document.createElement('div'), {\n className: list\n });\n\n if (!isSelectOneElement) {\n div.setAttribute('aria-multiselectable', 'true');\n }\n\n div.setAttribute('role', 'listbox');\n return div;\n },\n choiceGroup: function (_a, _b) {\n var group = _a.group,\n groupHeading = _a.groupHeading,\n itemDisabled = _a.itemDisabled;\n var id = _b.id,\n value = _b.value,\n disabled = _b.disabled;\n var div = Object.assign(document.createElement('div'), {\n className: \"\".concat(group, \" \").concat(disabled ? itemDisabled : '')\n });\n div.setAttribute('role', 'group');\n Object.assign(div.dataset, {\n group: '',\n id: id,\n value: value\n });\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n div.appendChild(Object.assign(document.createElement('div'), {\n className: groupHeading,\n innerHTML: value\n }));\n return div;\n },\n choice: function (_a, _b, selectText) {\n var item = _a.item,\n itemChoice = _a.itemChoice,\n itemSelectable = _a.itemSelectable,\n selectedState = _a.selectedState,\n itemDisabled = _a.itemDisabled,\n placeholder = _a.placeholder;\n var id = _b.id,\n value = _b.value,\n label = _b.label,\n groupId = _b.groupId,\n elementId = _b.elementId,\n isDisabled = _b.disabled,\n isSelected = _b.selected,\n isPlaceholder = _b.placeholder;\n var div = Object.assign(document.createElement('div'), {\n id: elementId,\n innerHTML: label,\n className: \"\".concat(item, \" \").concat(itemChoice)\n });\n\n if (isSelected) {\n div.classList.add(selectedState);\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.setAttribute('role', groupId && groupId > 0 ? 'treeitem' : 'option');\n Object.assign(div.dataset, {\n choice: '',\n id: id,\n value: value,\n selectText: selectText\n });\n\n if (isDisabled) {\n div.classList.add(itemDisabled);\n div.dataset.choiceDisabled = '';\n div.setAttribute('aria-disabled', 'true');\n } else {\n div.classList.add(itemSelectable);\n div.dataset.choiceSelectable = '';\n }\n\n return div;\n },\n input: function (_a, placeholderValue) {\n var input = _a.input,\n inputCloned = _a.inputCloned;\n var inp = Object.assign(document.createElement('input'), {\n type: 'text',\n className: \"\".concat(input, \" \").concat(inputCloned),\n autocomplete: 'off',\n autocapitalize: 'off',\n spellcheck: false\n });\n inp.setAttribute('role', 'textbox');\n inp.setAttribute('aria-autocomplete', 'list');\n inp.setAttribute('aria-label', placeholderValue);\n return inp;\n },\n dropdown: function (_a) {\n var list = _a.list,\n listDropdown = _a.listDropdown;\n var div = document.createElement('div');\n div.classList.add(list, listDropdown);\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n notice: function (_a, innerHTML, type) {\n var item = _a.item,\n itemChoice = _a.itemChoice,\n noResults = _a.noResults,\n noChoices = _a.noChoices;\n\n if (type === void 0) {\n type = '';\n }\n\n var classes = [item, itemChoice];\n\n if (type === 'no-choices') {\n classes.push(noChoices);\n } else if (type === 'no-results') {\n classes.push(noResults);\n }\n\n return Object.assign(document.createElement('div'), {\n innerHTML: innerHTML,\n className: classes.join(' ')\n });\n },\n option: function (_a) {\n var label = _a.label,\n value = _a.value,\n customProperties = _a.customProperties,\n active = _a.active,\n disabled = _a.disabled;\n var opt = new Option(label, value, false, active);\n\n if (customProperties) {\n opt.dataset.customProperties = \"\".concat(customProperties);\n }\n\n opt.disabled = !!disabled;\n return opt;\n }\n};\nexports[\"default\"] = templates;\n\n/***/ }),\n\n/***/ 996:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n\n\n/***/ }),\n\n/***/ 70:\n/***/ (function(module) {\n\n/*!\n * Fuse.js v3.4.6 - Lightweight fuzzy-search (http://fusejs.io)\n * \n * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n */\n!function(e,t){ true?module.exports=t():0}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function o(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\\nSearch pattern: \"'.concat(e,'\"'));var n=this._prepareSearchers(e),r=n.tokenSearchers,o=n.fullSearcher,i=this._search(r,o),a=i.weights,s=i.results;return this._computeScore(a,s),this.options.shouldSort&&this._sort(s),t.limit&&\"number\"==typeof t.limit&&(s=s.slice(0,t.limit)),this._format(s)}},{key:\"_prepareSearchers\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=this.list,r={},o=[];if(\"string\"==typeof n[0]){for(var i=0,a=n.length;i1)throw new Error(\"Key weight has to be > 0 and <= 1\");d=d.name}else s[d]={weight:1};this._analyze({key:d,value:this.options.getFn(l,d),record:l,index:c},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t})}return{weights:s,results:o}}},{key:\"_analyze\",value:function(e,t){var n=e.key,r=e.arrayIndex,o=void 0===r?-1:r,i=e.value,a=e.record,c=e.index,h=t.tokenSearchers,l=void 0===h?[]:h,u=t.fullSearcher,f=void 0===u?[]:u,d=t.resultMap,v=void 0===d?{}:d,p=t.results,g=void 0===p?[]:p;if(null!=i){var y=!1,m=-1,k=0;if(\"string\"==typeof i){this._log(\"\\nKey: \".concat(\"\"===n?\"-\":n));var S=f.search(i);if(this._log('Full text: \"'.concat(i,'\", score: ').concat(S.score)),this.options.tokenize){for(var x=i.split(this.options.tokenSeparator),b=[],M=0;M-1&&(P=(P+m)/2),this._log(\"Score average:\",P);var F=!this.options.tokenize||!this.options.matchAllTokens||k>=l.length;if(this._log(\"\\nCheck Matches: \".concat(F)),(y||S.isMatch)&&F){var T=v[c];T?T.output.push({key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}):(v[c]={item:a,output:[{key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}]},g.push(v[c]))}}else if(s(i))for(var z=0,E=i.length;z-1&&(a.arrayIndex=i.arrayIndex),t.matches.push(a)}}}),this.options.includeScore&&o.push(function(e,t){t.score=e.score});for(var i=0,a=e.length;in)return o(e,this.pattern,r);var a=this.options,s=a.location,c=a.distance,h=a.threshold,l=a.findAllMatches,u=a.minMatchCharLength;return i(e,this.pattern,this.patternAlphabet,{location:s,distance:c,threshold:h,findAllMatches:l,minMatchCharLength:u})}}])&&r(t.prototype,n),s&&r(t,s),e}();e.exports=s},function(e,t){var n=/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,o=new RegExp(t.replace(n,\"\\\\$&\").replace(r,\"|\")),i=e.match(o),a=!!i,s=[];if(a)for(var c=0,h=i.length;c=P;z-=1){var E=z-1,K=n[e.charAt(E)];if(K&&(x[E]=1),T[z]=(T[z+1]<<1|1)&K,0!==I&&(T[z]|=(L[z+1]|L[z])<<1|1|L[z+1]),T[z]&C&&(w=r(t,{errors:I,currentLocation:E,expectedLocation:g,distance:h}))<=m){if(m=w,(k=E)<=g)break;P=Math.max(1,2*g-k)}}if(r(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:h})>m)break;L=T}return{isMatch:k>=0,score:0===w?.001:w,matchedIndices:o(x,p)}}},function(e,t){e.exports=function(e,t){var n=t.errors,r=void 0===n?0:n,o=t.currentLocation,i=void 0===o?0:o,a=t.expectedLocation,s=void 0===a?0:a,c=t.distance,h=void 0===c?100:c,l=r/e.length,u=Math.abs(s-i);return h?l+u/h:u?1:l}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,o=-1,i=0,a=e.length;i=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,r=0;r 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error( true ? formatProdErrorMessage(12) : 0);\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error( true ? formatProdErrorMessage(13) : 0);\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {}\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (false) {}\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) { var warningMessage; }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var actionType = action && action.type;\n throw new Error( true ? formatProdErrorMessage(14) : 0);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error( true ? formatProdErrorMessage(16) : 0);\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error( true ? formatProdErrorMessage(15) : 0);\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2(_objectSpread2({}, store), {}, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (false) {}\n\n\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t!function() {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__webpack_require__.r = function(exports) {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(373);\n/******/ \t__webpack_exports__ = __webpack_exports__[\"default\"];\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Draggable\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Draggable\"] = factory();\n\telse\n\t\troot[\"Draggable\"] = factory();\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 66);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _AbstractEvent = __webpack_require__(64);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _AbstractEvent2.default;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _AbstractPlugin = __webpack_require__(60);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _AbstractPlugin2.default;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _closest = __webpack_require__(51);\n\nObject.defineProperty(exports, 'closest', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_closest).default;\n }\n});\n\nvar _requestNextAnimationFrame = __webpack_require__(49);\n\nObject.defineProperty(exports, 'requestNextAnimationFrame', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_requestNextAnimationFrame).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SensorEvent = __webpack_require__(44);\n\nObject.keys(_SensorEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _SensorEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Sensor = __webpack_require__(47);\n\nvar _Sensor2 = _interopRequireDefault(_Sensor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Sensor2.default;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _DragEvent = __webpack_require__(14);\n\nObject.keys(_DragEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _DragEvent[key];\n }\n });\n});\n\nvar _DraggableEvent = __webpack_require__(13);\n\nObject.keys(_DraggableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _DraggableEvent[key];\n }\n });\n});\n\nvar _Plugins = __webpack_require__(12);\n\nObject.keys(_Plugins).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _Plugins[key];\n }\n });\n});\n\nvar _Sensors = __webpack_require__(6);\n\nObject.keys(_Sensors).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _Sensors[key];\n }\n });\n});\n\nvar _Draggable = __webpack_require__(37);\n\nvar _Draggable2 = _interopRequireDefault(_Draggable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Draggable2.default;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Sensor = __webpack_require__(4);\n\nObject.defineProperty(exports, 'Sensor', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Sensor).default;\n }\n});\n\nvar _MouseSensor = __webpack_require__(46);\n\nObject.defineProperty(exports, 'MouseSensor', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_MouseSensor).default;\n }\n});\n\nvar _TouchSensor = __webpack_require__(43);\n\nObject.defineProperty(exports, 'TouchSensor', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_TouchSensor).default;\n }\n});\n\nvar _DragSensor = __webpack_require__(41);\n\nObject.defineProperty(exports, 'DragSensor', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_DragSensor).default;\n }\n});\n\nvar _ForceTouchSensor = __webpack_require__(39);\n\nObject.defineProperty(exports, 'ForceTouchSensor', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_ForceTouchSensor).default;\n }\n});\n\nvar _SensorEvent = __webpack_require__(3);\n\nObject.keys(_SensorEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _SensorEvent[key];\n }\n });\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SnappableEvent = __webpack_require__(18);\n\nObject.keys(_SnappableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _SnappableEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _CollidableEvent = __webpack_require__(23);\n\nObject.keys(_CollidableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _CollidableEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SortableEvent = __webpack_require__(27);\n\nObject.keys(_SortableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _SortableEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SwappableEvent = __webpack_require__(30);\n\nObject.keys(_SwappableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _SwappableEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _DroppableEvent = __webpack_require__(33);\n\nObject.keys(_DroppableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _DroppableEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Announcement = __webpack_require__(62);\n\nObject.defineProperty(exports, 'Announcement', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Announcement).default;\n }\n});\nObject.defineProperty(exports, 'defaultAnnouncementOptions', {\n enumerable: true,\n get: function () {\n return _Announcement.defaultOptions;\n }\n});\n\nvar _Focusable = __webpack_require__(59);\n\nObject.defineProperty(exports, 'Focusable', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Focusable).default;\n }\n});\n\nvar _Mirror = __webpack_require__(57);\n\nObject.defineProperty(exports, 'Mirror', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Mirror).default;\n }\n});\nObject.defineProperty(exports, 'defaultMirrorOptions', {\n enumerable: true,\n get: function () {\n return _Mirror.defaultOptions;\n }\n});\n\nvar _Scrollable = __webpack_require__(53);\n\nObject.defineProperty(exports, 'Scrollable', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Scrollable).default;\n }\n});\nObject.defineProperty(exports, 'defaultScrollableOptions', {\n enumerable: true,\n get: function () {\n return _Scrollable.defaultOptions;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _DraggableEvent = __webpack_require__(63);\n\nObject.keys(_DraggableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _DraggableEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _DragEvent = __webpack_require__(65);\n\nObject.keys(_DragEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _DragEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onSortableSorted = Symbol('onSortableSorted');\n\n/**\n * SwapAnimation default options\n * @property {Object} defaultOptions\n * @property {Number} defaultOptions.duration\n * @property {String} defaultOptions.easingFunction\n * @property {Boolean} defaultOptions.horizontal\n * @type {Object}\n */\nconst defaultOptions = exports.defaultOptions = {\n duration: 150,\n easingFunction: 'ease-in-out',\n horizontal: false\n};\n\n/**\n * SwapAnimation plugin adds swap animations for sortable\n * @class SwapAnimation\n * @module SwapAnimation\n * @extends AbstractPlugin\n */\nclass SwapAnimation extends _AbstractPlugin2.default {\n /**\n * SwapAnimation constructor.\n * @constructs SwapAnimation\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n super(draggable);\n\n /**\n * SwapAnimation options\n * @property {Object} options\n * @property {Number} defaultOptions.duration\n * @property {String} defaultOptions.easingFunction\n * @type {Object}\n */\n this.options = _extends({}, defaultOptions, this.getOptions());\n\n /**\n * Last animation frame\n * @property {Number} lastAnimationFrame\n * @type {Number}\n */\n this.lastAnimationFrame = null;\n\n this[onSortableSorted] = this[onSortableSorted].bind(this);\n }\n\n /**\n * Attaches plugins event listeners\n */\n attach() {\n this.draggable.on('sortable:sorted', this[onSortableSorted]);\n }\n\n /**\n * Detaches plugins event listeners\n */\n detach() {\n this.draggable.off('sortable:sorted', this[onSortableSorted]);\n }\n\n /**\n * Returns options passed through draggable\n * @return {Object}\n */\n getOptions() {\n return this.draggable.options.swapAnimation || {};\n }\n\n /**\n * Sortable sorted handler\n * @param {SortableSortedEvent} sortableEvent\n * @private\n */\n [onSortableSorted]({ oldIndex, newIndex, dragEvent }) {\n const { source, over } = dragEvent;\n\n cancelAnimationFrame(this.lastAnimationFrame);\n\n // Can be done in a separate frame\n this.lastAnimationFrame = requestAnimationFrame(() => {\n if (oldIndex >= newIndex) {\n animate(source, over, this.options);\n } else {\n animate(over, source, this.options);\n }\n });\n }\n}\n\nexports.default = SwapAnimation; /**\n * Animates two elements\n * @param {HTMLElement} from\n * @param {HTMLElement} to\n * @param {Object} options\n * @param {Number} options.duration\n * @param {String} options.easingFunction\n * @param {String} options.horizontal\n * @private\n */\n\nfunction animate(from, to, { duration, easingFunction, horizontal }) {\n for (const element of [from, to]) {\n element.style.pointerEvents = 'none';\n }\n\n if (horizontal) {\n const width = from.offsetWidth;\n from.style.transform = `translate3d(${width}px, 0, 0)`;\n to.style.transform = `translate3d(-${width}px, 0, 0)`;\n } else {\n const height = from.offsetHeight;\n from.style.transform = `translate3d(0, ${height}px, 0)`;\n to.style.transform = `translate3d(0, -${height}px, 0)`;\n }\n\n requestAnimationFrame(() => {\n for (const element of [from, to]) {\n element.addEventListener('transitionend', resetElementOnTransitionEnd);\n element.style.transition = `transform ${duration}ms ${easingFunction}`;\n element.style.transform = '';\n }\n });\n}\n\n/**\n * Resets animation style properties after animation has completed\n * @param {Event} event\n * @private\n */\nfunction resetElementOnTransitionEnd(event) {\n event.target.style.transition = '';\n event.target.style.pointerEvents = '';\n event.target.removeEventListener('transitionend', resetElementOnTransitionEnd);\n}\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _SwapAnimation = __webpack_require__(15);\n\nvar _SwapAnimation2 = _interopRequireDefault(_SwapAnimation);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _SwapAnimation2.default;\nexports.defaultOptions = _SwapAnimation.defaultOptions;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nvar _SnappableEvent = __webpack_require__(7);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onDragStart = Symbol('onDragStart');\nconst onDragStop = Symbol('onDragStop');\nconst onDragOver = Symbol('onDragOver');\nconst onDragOut = Symbol('onDragOut');\nconst onMirrorCreated = Symbol('onMirrorCreated');\nconst onMirrorDestroy = Symbol('onMirrorDestroy');\n\n/**\n * Snappable plugin which snaps draggable elements into place\n * @class Snappable\n * @module Snappable\n * @extends AbstractPlugin\n */\nclass Snappable extends _AbstractPlugin2.default {\n /**\n * Snappable constructor.\n * @constructs Snappable\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n super(draggable);\n\n /**\n * Keeps track of the first source element\n * @property {HTMLElement|null} firstSource\n */\n this.firstSource = null;\n\n /**\n * Keeps track of the mirror element\n * @property {HTMLElement} mirror\n */\n this.mirror = null;\n\n this[onDragStart] = this[onDragStart].bind(this);\n this[onDragStop] = this[onDragStop].bind(this);\n this[onDragOver] = this[onDragOver].bind(this);\n this[onDragOut] = this[onDragOut].bind(this);\n this[onMirrorCreated] = this[onMirrorCreated].bind(this);\n this[onMirrorDestroy] = this[onMirrorDestroy].bind(this);\n }\n\n /**\n * Attaches plugins event listeners\n */\n attach() {\n this.draggable.on('drag:start', this[onDragStart]).on('drag:stop', this[onDragStop]).on('drag:over', this[onDragOver]).on('drag:out', this[onDragOut]).on('droppable:over', this[onDragOver]).on('droppable:out', this[onDragOut]).on('mirror:created', this[onMirrorCreated]).on('mirror:destroy', this[onMirrorDestroy]);\n }\n\n /**\n * Detaches plugins event listeners\n */\n detach() {\n this.draggable.off('drag:start', this[onDragStart]).off('drag:stop', this[onDragStop]).off('drag:over', this[onDragOver]).off('drag:out', this[onDragOut]).off('droppable:over', this[onDragOver]).off('droppable:out', this[onDragOut]).off('mirror:created', this[onMirrorCreated]).off('mirror:destroy', this[onMirrorDestroy]);\n }\n\n /**\n * Drag start handler\n * @private\n * @param {DragStartEvent} event - Drag start event\n */\n [onDragStart](event) {\n if (event.canceled()) {\n return;\n }\n\n this.firstSource = event.source;\n }\n\n /**\n * Drag stop handler\n * @private\n * @param {DragStopEvent} event - Drag stop event\n */\n [onDragStop]() {\n this.firstSource = null;\n }\n\n /**\n * Drag over handler\n * @private\n * @param {DragOverEvent|DroppableOverEvent} event - Drag over event\n */\n [onDragOver](event) {\n if (event.canceled()) {\n return;\n }\n\n const source = event.source || event.dragEvent.source;\n\n if (source === this.firstSource) {\n this.firstSource = null;\n return;\n }\n\n const snapInEvent = new _SnappableEvent.SnapInEvent({\n dragEvent: event,\n snappable: event.over || event.droppable\n });\n\n this.draggable.trigger(snapInEvent);\n\n if (snapInEvent.canceled()) {\n return;\n }\n\n if (this.mirror) {\n this.mirror.style.display = 'none';\n }\n\n source.classList.remove(this.draggable.getClassNameFor('source:dragging'));\n source.classList.add(this.draggable.getClassNameFor('source:placed'));\n\n // Need to cancel this in drag out\n setTimeout(() => {\n source.classList.remove(this.draggable.getClassNameFor('source:placed'));\n }, this.draggable.options.placedTimeout);\n }\n\n /**\n * Drag out handler\n * @private\n * @param {DragOutEvent|DroppableOutEvent} event - Drag out event\n */\n [onDragOut](event) {\n if (event.canceled()) {\n return;\n }\n\n const source = event.source || event.dragEvent.source;\n\n const snapOutEvent = new _SnappableEvent.SnapOutEvent({\n dragEvent: event,\n snappable: event.over || event.droppable\n });\n\n this.draggable.trigger(snapOutEvent);\n\n if (snapOutEvent.canceled()) {\n return;\n }\n\n if (this.mirror) {\n this.mirror.style.display = '';\n }\n\n source.classList.add(this.draggable.getClassNameFor('source:dragging'));\n }\n\n /**\n * Mirror created handler\n * @param {MirrorCreatedEvent} mirrorEvent\n * @private\n */\n [onMirrorCreated]({ mirror }) {\n this.mirror = mirror;\n }\n\n /**\n * Mirror destroy handler\n * @param {MirrorDestroyEvent} mirrorEvent\n * @private\n */\n [onMirrorDestroy]() {\n this.mirror = null;\n }\n}\nexports.default = Snappable;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SnapOutEvent = exports.SnapInEvent = exports.SnapEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base snap event\n * @class SnapEvent\n * @module SnapEvent\n * @extends AbstractEvent\n */\nclass SnapEvent extends _AbstractEvent2.default {\n\n /**\n * Drag event that triggered this snap event\n * @property dragEvent\n * @type {DragEvent}\n * @readonly\n */\n get dragEvent() {\n return this.data.dragEvent;\n }\n\n /**\n * Snappable element\n * @property snappable\n * @type {HTMLElement}\n * @readonly\n */\n get snappable() {\n return this.data.snappable;\n }\n}\n\nexports.SnapEvent = SnapEvent; /**\n * Snap in event\n * @class SnapInEvent\n * @module SnapInEvent\n * @extends SnapEvent\n */\n\nSnapEvent.type = 'snap';\nclass SnapInEvent extends SnapEvent {}\n\nexports.SnapInEvent = SnapInEvent; /**\n * Snap out event\n * @class SnapOutEvent\n * @module SnapOutEvent\n * @extends SnapEvent\n */\n\nSnapInEvent.type = 'snap:in';\nSnapInEvent.cancelable = true;\nclass SnapOutEvent extends SnapEvent {}\nexports.SnapOutEvent = SnapOutEvent;\nSnapOutEvent.type = 'snap:out';\nSnapOutEvent.cancelable = true;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SnappableEvent = __webpack_require__(7);\n\nObject.keys(_SnappableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _SnappableEvent[key];\n }\n });\n});\n\nvar _Snappable = __webpack_require__(17);\n\nvar _Snappable2 = _interopRequireDefault(_Snappable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Snappable2.default;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nvar _utils = __webpack_require__(2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onMirrorCreated = Symbol('onMirrorCreated');\nconst onMirrorDestroy = Symbol('onMirrorDestroy');\nconst onDragOver = Symbol('onDragOver');\nconst resize = Symbol('resize');\n\n/**\n * ResizeMirror default options\n * @property {Object} defaultOptions\n * @type {Object}\n */\nconst defaultOptions = exports.defaultOptions = {};\n\n/**\n * The ResizeMirror plugin resizes the mirror element to the dimensions of the draggable element that the mirror is hovering over\n * @class ResizeMirror\n * @module ResizeMirror\n * @extends AbstractPlugin\n */\nclass ResizeMirror extends _AbstractPlugin2.default {\n /**\n * ResizeMirror constructor.\n * @constructs ResizeMirror\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n super(draggable);\n\n /**\n * ResizeMirror options\n * @property {Object} options\n * @type {Object}\n */\n this.options = _extends({}, defaultOptions, this.getOptions());\n\n /**\n * ResizeMirror remembers the last width when resizing the mirror\n * to avoid additional writes to the DOM\n * @property {number} lastWidth\n */\n this.lastWidth = 0;\n\n /**\n * ResizeMirror remembers the last height when resizing the mirror\n * to avoid additional writes to the DOM\n * @property {number} lastHeight\n */\n this.lastHeight = 0;\n\n /**\n * Keeps track of the mirror element\n * @property {HTMLElement} mirror\n */\n this.mirror = null;\n\n this[onMirrorCreated] = this[onMirrorCreated].bind(this);\n this[onMirrorDestroy] = this[onMirrorDestroy].bind(this);\n this[onDragOver] = this[onDragOver].bind(this);\n }\n\n /**\n * Attaches plugins event listeners\n */\n attach() {\n this.draggable.on('mirror:created', this[onMirrorCreated]).on('drag:over', this[onDragOver]).on('drag:over:container', this[onDragOver]);\n }\n\n /**\n * Detaches plugins event listeners\n */\n detach() {\n this.draggable.off('mirror:created', this[onMirrorCreated]).off('mirror:destroy', this[onMirrorDestroy]).off('drag:over', this[onDragOver]).off('drag:over:container', this[onDragOver]);\n }\n\n /**\n * Returns options passed through draggable\n * @return {Object}\n */\n getOptions() {\n return this.draggable.options.resizeMirror || {};\n }\n\n /**\n * Mirror created handler\n * @param {MirrorCreatedEvent} mirrorEvent\n * @private\n */\n [onMirrorCreated]({ mirror }) {\n this.mirror = mirror;\n }\n\n /**\n * Mirror destroy handler\n * @param {MirrorDestroyEvent} mirrorEvent\n * @private\n */\n [onMirrorDestroy]() {\n this.mirror = null;\n }\n\n /**\n * Drag over handler\n * @param {DragOverEvent | DragOverContainer} dragEvent\n * @private\n */\n [onDragOver](dragEvent) {\n this[resize](dragEvent);\n }\n\n /**\n * Resize function for\n * @param {DragOverEvent | DragOverContainer} dragEvent\n * @private\n */\n [resize]({ overContainer, over }) {\n requestAnimationFrame(() => {\n if (this.mirror.parentNode !== overContainer) {\n overContainer.appendChild(this.mirror);\n }\n\n const overElement = over || this.draggable.getDraggableElementsForContainer(overContainer)[0];\n\n if (!overElement) {\n return;\n }\n\n (0, _utils.requestNextAnimationFrame)(() => {\n const overRect = overElement.getBoundingClientRect();\n\n if (this.lastHeight === overRect.height && this.lastWidth === overRect.width) {\n return;\n }\n\n this.mirror.style.width = `${overRect.width}px`;\n this.mirror.style.height = `${overRect.height}px`;\n\n this.lastWidth = overRect.width;\n this.lastHeight = overRect.height;\n });\n });\n }\n}\nexports.default = ResizeMirror;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _ResizeMirror = __webpack_require__(20);\n\nvar _ResizeMirror2 = _interopRequireDefault(_ResizeMirror);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _ResizeMirror2.default;\nexports.defaultOptions = _ResizeMirror.defaultOptions;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nvar _utils = __webpack_require__(2);\n\nvar _CollidableEvent = __webpack_require__(8);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onDragMove = Symbol('onDragMove');\nconst onDragStop = Symbol('onDragStop');\nconst onRequestAnimationFrame = Symbol('onRequestAnimationFrame');\n\n/**\n * Collidable plugin which detects colliding elements while dragging\n * @class Collidable\n * @module Collidable\n * @extends AbstractPlugin\n */\nclass Collidable extends _AbstractPlugin2.default {\n /**\n * Collidable constructor.\n * @constructs Collidable\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n super(draggable);\n\n /**\n * Keeps track of currently colliding elements\n * @property {HTMLElement|null} currentlyCollidingElement\n * @type {HTMLElement|null}\n */\n this.currentlyCollidingElement = null;\n\n /**\n * Keeps track of currently colliding elements\n * @property {HTMLElement|null} lastCollidingElement\n * @type {HTMLElement|null}\n */\n this.lastCollidingElement = null;\n\n /**\n * Animation frame for finding colliding elements\n * @property {Number|null} currentAnimationFrame\n * @type {Number|null}\n */\n this.currentAnimationFrame = null;\n\n this[onDragMove] = this[onDragMove].bind(this);\n this[onDragStop] = this[onDragStop].bind(this);\n this[onRequestAnimationFrame] = this[onRequestAnimationFrame].bind(this);\n }\n\n /**\n * Attaches plugins event listeners\n */\n attach() {\n this.draggable.on('drag:move', this[onDragMove]).on('drag:stop', this[onDragStop]);\n }\n\n /**\n * Detaches plugins event listeners\n */\n detach() {\n this.draggable.off('drag:move', this[onDragMove]).off('drag:stop', this[onDragStop]);\n }\n\n /**\n * Returns current collidables based on `collidables` option\n * @return {HTMLElement[]}\n */\n getCollidables() {\n const collidables = this.draggable.options.collidables;\n\n if (typeof collidables === 'string') {\n return Array.prototype.slice.call(document.querySelectorAll(collidables));\n } else if (collidables instanceof NodeList || collidables instanceof Array) {\n return Array.prototype.slice.call(collidables);\n } else if (collidables instanceof HTMLElement) {\n return [collidables];\n } else if (typeof collidables === 'function') {\n return collidables();\n } else {\n return [];\n }\n }\n\n /**\n * Drag move handler\n * @private\n * @param {DragMoveEvent} event - Drag move event\n */\n [onDragMove](event) {\n const target = event.sensorEvent.target;\n\n this.currentAnimationFrame = requestAnimationFrame(this[onRequestAnimationFrame](target));\n\n if (this.currentlyCollidingElement) {\n event.cancel();\n }\n\n const collidableInEvent = new _CollidableEvent.CollidableInEvent({\n dragEvent: event,\n collidingElement: this.currentlyCollidingElement\n });\n\n const collidableOutEvent = new _CollidableEvent.CollidableOutEvent({\n dragEvent: event,\n collidingElement: this.lastCollidingElement\n });\n\n const enteringCollidable = Boolean(this.currentlyCollidingElement && this.lastCollidingElement !== this.currentlyCollidingElement);\n const leavingCollidable = Boolean(!this.currentlyCollidingElement && this.lastCollidingElement);\n\n if (enteringCollidable) {\n if (this.lastCollidingElement) {\n this.draggable.trigger(collidableOutEvent);\n }\n\n this.draggable.trigger(collidableInEvent);\n } else if (leavingCollidable) {\n this.draggable.trigger(collidableOutEvent);\n }\n\n this.lastCollidingElement = this.currentlyCollidingElement;\n }\n\n /**\n * Drag stop handler\n * @private\n * @param {DragStopEvent} event - Drag stop event\n */\n [onDragStop](event) {\n const lastCollidingElement = this.currentlyCollidingElement || this.lastCollidingElement;\n const collidableOutEvent = new _CollidableEvent.CollidableOutEvent({\n dragEvent: event,\n collidingElement: lastCollidingElement\n });\n\n if (lastCollidingElement) {\n this.draggable.trigger(collidableOutEvent);\n }\n\n this.lastCollidingElement = null;\n this.currentlyCollidingElement = null;\n }\n\n /**\n * Animation frame function\n * @private\n * @param {HTMLElement} target - Current move target\n * @return {Function}\n */\n [onRequestAnimationFrame](target) {\n return () => {\n const collidables = this.getCollidables();\n this.currentlyCollidingElement = (0, _utils.closest)(target, element => collidables.includes(element));\n };\n }\n}\nexports.default = Collidable;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CollidableOutEvent = exports.CollidableInEvent = exports.CollidableEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base collidable event\n * @class CollidableEvent\n * @module CollidableEvent\n * @extends AbstractEvent\n */\nclass CollidableEvent extends _AbstractEvent2.default {\n\n /**\n * Drag event that triggered this colliable event\n * @property dragEvent\n * @type {DragEvent}\n * @readonly\n */\n get dragEvent() {\n return this.data.dragEvent;\n }\n}\n\nexports.CollidableEvent = CollidableEvent; /**\n * Collidable in event\n * @class CollidableInEvent\n * @module CollidableInEvent\n * @extends CollidableEvent\n */\n\nCollidableEvent.type = 'collidable';\nclass CollidableInEvent extends CollidableEvent {\n\n /**\n * Element you are currently colliding with\n * @property collidingElement\n * @type {HTMLElement}\n * @readonly\n */\n get collidingElement() {\n return this.data.collidingElement;\n }\n}\n\nexports.CollidableInEvent = CollidableInEvent; /**\n * Collidable out event\n * @class CollidableOutEvent\n * @module CollidableOutEvent\n * @extends CollidableEvent\n */\n\nCollidableInEvent.type = 'collidable:in';\nclass CollidableOutEvent extends CollidableEvent {\n\n /**\n * Element you were previously colliding with\n * @property collidingElement\n * @type {HTMLElement}\n * @readonly\n */\n get collidingElement() {\n return this.data.collidingElement;\n }\n}\nexports.CollidableOutEvent = CollidableOutEvent;\nCollidableOutEvent.type = 'collidable:out';\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _CollidableEvent = __webpack_require__(8);\n\nObject.keys(_CollidableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _CollidableEvent[key];\n }\n });\n});\n\nvar _Collidable = __webpack_require__(22);\n\nvar _Collidable2 = _interopRequireDefault(_Collidable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Collidable2.default;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Collidable = __webpack_require__(24);\n\nObject.defineProperty(exports, 'Collidable', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Collidable).default;\n }\n});\n\nvar _ResizeMirror = __webpack_require__(21);\n\nObject.defineProperty(exports, 'ResizeMirror', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_ResizeMirror).default;\n }\n});\nObject.defineProperty(exports, 'defaultResizeMirrorOptions', {\n enumerable: true,\n get: function () {\n return _ResizeMirror.defaultOptions;\n }\n});\n\nvar _Snappable = __webpack_require__(19);\n\nObject.defineProperty(exports, 'Snappable', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Snappable).default;\n }\n});\n\nvar _SwapAnimation = __webpack_require__(16);\n\nObject.defineProperty(exports, 'SwapAnimation', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_SwapAnimation).default;\n }\n});\nObject.defineProperty(exports, 'defaultSwapAnimationOptions', {\n enumerable: true,\n get: function () {\n return _SwapAnimation.defaultOptions;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _Draggable = __webpack_require__(5);\n\nvar _Draggable2 = _interopRequireDefault(_Draggable);\n\nvar _SortableEvent = __webpack_require__(9);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onDragStart = Symbol('onDragStart');\nconst onDragOverContainer = Symbol('onDragOverContainer');\nconst onDragOver = Symbol('onDragOver');\nconst onDragStop = Symbol('onDragStop');\n\n/**\n * Returns announcement message when a Draggable element has been sorted with another Draggable element\n * or moved into a new container\n * @param {SortableSortedEvent} sortableEvent\n * @return {String}\n */\nfunction onSortableSortedDefaultAnnouncement({ dragEvent }) {\n const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'sortable element';\n\n if (dragEvent.over) {\n const overText = dragEvent.over.textContent.trim() || dragEvent.over.id || 'sortable element';\n const isFollowing = dragEvent.source.compareDocumentPosition(dragEvent.over) & Node.DOCUMENT_POSITION_FOLLOWING;\n\n if (isFollowing) {\n return `Placed ${sourceText} after ${overText}`;\n } else {\n return `Placed ${sourceText} before ${overText}`;\n }\n } else {\n // need to figure out how to compute container name\n return `Placed ${sourceText} into a different container`;\n }\n}\n\n/**\n * @const {Object} defaultAnnouncements\n * @const {Function} defaultAnnouncements['sortable:sorted']\n */\nconst defaultAnnouncements = {\n 'sortable:sorted': onSortableSortedDefaultAnnouncement\n};\n\n/**\n * Sortable is built on top of Draggable and allows sorting of draggable elements. Sortable will keep\n * track of the original index and emits the new index as you drag over draggable elements.\n * @class Sortable\n * @module Sortable\n * @extends Draggable\n */\nclass Sortable extends _Draggable2.default {\n /**\n * Sortable constructor.\n * @constructs Sortable\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Sortable containers\n * @param {Object} options - Options for Sortable\n */\n constructor(containers = [], options = {}) {\n super(containers, _extends({}, options, {\n announcements: _extends({}, defaultAnnouncements, options.announcements || {})\n }));\n\n /**\n * start index of source on drag start\n * @property startIndex\n * @type {Number}\n */\n this.startIndex = null;\n\n /**\n * start container on drag start\n * @property startContainer\n * @type {HTMLElement}\n * @default null\n */\n this.startContainer = null;\n\n this[onDragStart] = this[onDragStart].bind(this);\n this[onDragOverContainer] = this[onDragOverContainer].bind(this);\n this[onDragOver] = this[onDragOver].bind(this);\n this[onDragStop] = this[onDragStop].bind(this);\n\n this.on('drag:start', this[onDragStart]).on('drag:over:container', this[onDragOverContainer]).on('drag:over', this[onDragOver]).on('drag:stop', this[onDragStop]);\n }\n\n /**\n * Destroys Sortable instance.\n */\n destroy() {\n super.destroy();\n\n this.off('drag:start', this[onDragStart]).off('drag:over:container', this[onDragOverContainer]).off('drag:over', this[onDragOver]).off('drag:stop', this[onDragStop]);\n }\n\n /**\n * Returns true index of element within its container during drag operation, i.e. excluding mirror and original source\n * @param {HTMLElement} element - An element\n * @return {Number}\n */\n index(element) {\n return this.getDraggableElementsForContainer(element.parentNode).indexOf(element);\n }\n\n /**\n * Drag start handler\n * @private\n * @param {DragStartEvent} event - Drag start event\n */\n [onDragStart](event) {\n this.startContainer = event.source.parentNode;\n this.startIndex = this.index(event.source);\n\n const sortableStartEvent = new _SortableEvent.SortableStartEvent({\n dragEvent: event,\n startIndex: this.startIndex,\n startContainer: this.startContainer\n });\n\n this.trigger(sortableStartEvent);\n\n if (sortableStartEvent.canceled()) {\n event.cancel();\n }\n }\n\n /**\n * Drag over container handler\n * @private\n * @param {DragOverContainerEvent} event - Drag over container event\n */\n [onDragOverContainer](event) {\n if (event.canceled()) {\n return;\n }\n\n const { source, over, overContainer } = event;\n const oldIndex = this.index(source);\n\n const sortableSortEvent = new _SortableEvent.SortableSortEvent({\n dragEvent: event,\n currentIndex: oldIndex,\n source,\n over\n });\n\n this.trigger(sortableSortEvent);\n\n if (sortableSortEvent.canceled()) {\n return;\n }\n\n const children = this.getDraggableElementsForContainer(overContainer);\n const moves = move({ source, over, overContainer, children });\n\n if (!moves) {\n return;\n }\n\n const { oldContainer, newContainer } = moves;\n const newIndex = this.index(event.source);\n\n const sortableSortedEvent = new _SortableEvent.SortableSortedEvent({\n dragEvent: event,\n oldIndex,\n newIndex,\n oldContainer,\n newContainer\n });\n\n this.trigger(sortableSortedEvent);\n }\n\n /**\n * Drag over handler\n * @private\n * @param {DragOverEvent} event - Drag over event\n */\n [onDragOver](event) {\n if (event.over === event.originalSource || event.over === event.source) {\n return;\n }\n\n const { source, over, overContainer } = event;\n const oldIndex = this.index(source);\n\n const sortableSortEvent = new _SortableEvent.SortableSortEvent({\n dragEvent: event,\n currentIndex: oldIndex,\n source,\n over\n });\n\n this.trigger(sortableSortEvent);\n\n if (sortableSortEvent.canceled()) {\n return;\n }\n\n const children = this.getDraggableElementsForContainer(overContainer);\n const moves = move({ source, over, overContainer, children });\n\n if (!moves) {\n return;\n }\n\n const { oldContainer, newContainer } = moves;\n const newIndex = this.index(source);\n\n const sortableSortedEvent = new _SortableEvent.SortableSortedEvent({\n dragEvent: event,\n oldIndex,\n newIndex,\n oldContainer,\n newContainer\n });\n\n this.trigger(sortableSortedEvent);\n }\n\n /**\n * Drag stop handler\n * @private\n * @param {DragStopEvent} event - Drag stop event\n */\n [onDragStop](event) {\n const sortableStopEvent = new _SortableEvent.SortableStopEvent({\n dragEvent: event,\n oldIndex: this.startIndex,\n newIndex: this.index(event.source),\n oldContainer: this.startContainer,\n newContainer: event.source.parentNode\n });\n\n this.trigger(sortableStopEvent);\n\n this.startIndex = null;\n this.startContainer = null;\n }\n}\n\nexports.default = Sortable;\nfunction index(element) {\n return Array.prototype.indexOf.call(element.parentNode.children, element);\n}\n\nfunction move({ source, over, overContainer, children }) {\n const emptyOverContainer = !children.length;\n const differentContainer = source.parentNode !== overContainer;\n const sameContainer = over && !differentContainer;\n\n if (emptyOverContainer) {\n return moveInsideEmptyContainer(source, overContainer);\n } else if (sameContainer) {\n return moveWithinContainer(source, over);\n } else if (differentContainer) {\n return moveOutsideContainer(source, over, overContainer);\n } else {\n return null;\n }\n}\n\nfunction moveInsideEmptyContainer(source, overContainer) {\n const oldContainer = source.parentNode;\n\n overContainer.appendChild(source);\n\n return { oldContainer, newContainer: overContainer };\n}\n\nfunction moveWithinContainer(source, over) {\n const oldIndex = index(source);\n const newIndex = index(over);\n\n if (oldIndex < newIndex) {\n source.parentNode.insertBefore(source, over.nextElementSibling);\n } else {\n source.parentNode.insertBefore(source, over);\n }\n\n return { oldContainer: source.parentNode, newContainer: source.parentNode };\n}\n\nfunction moveOutsideContainer(source, over, overContainer) {\n const oldContainer = source.parentNode;\n\n if (over) {\n over.parentNode.insertBefore(source, over);\n } else {\n // need to figure out proper position\n overContainer.appendChild(source);\n }\n\n return { oldContainer, newContainer: source.parentNode };\n}\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SortableStopEvent = exports.SortableSortedEvent = exports.SortableSortEvent = exports.SortableStartEvent = exports.SortableEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base sortable event\n * @class SortableEvent\n * @module SortableEvent\n * @extends AbstractEvent\n */\nclass SortableEvent extends _AbstractEvent2.default {\n\n /**\n * Original drag event that triggered this sortable event\n * @property dragEvent\n * @type {DragEvent}\n * @readonly\n */\n get dragEvent() {\n return this.data.dragEvent;\n }\n}\n\nexports.SortableEvent = SortableEvent; /**\n * Sortable start event\n * @class SortableStartEvent\n * @module SortableStartEvent\n * @extends SortableEvent\n */\n\nSortableEvent.type = 'sortable';\nclass SortableStartEvent extends SortableEvent {\n\n /**\n * Start index of source on sortable start\n * @property startIndex\n * @type {Number}\n * @readonly\n */\n get startIndex() {\n return this.data.startIndex;\n }\n\n /**\n * Start container on sortable start\n * @property startContainer\n * @type {HTMLElement}\n * @readonly\n */\n get startContainer() {\n return this.data.startContainer;\n }\n}\n\nexports.SortableStartEvent = SortableStartEvent; /**\n * Sortable sort event\n * @class SortableSortEvent\n * @module SortableSortEvent\n * @extends SortableEvent\n */\n\nSortableStartEvent.type = 'sortable:start';\nSortableStartEvent.cancelable = true;\nclass SortableSortEvent extends SortableEvent {\n\n /**\n * Index of current draggable element\n * @property currentIndex\n * @type {Number}\n * @readonly\n */\n get currentIndex() {\n return this.data.currentIndex;\n }\n\n /**\n * Draggable element you are hovering over\n * @property over\n * @type {HTMLElement}\n * @readonly\n */\n get over() {\n return this.data.oldIndex;\n }\n\n /**\n * Draggable container element you are hovering over\n * @property overContainer\n * @type {HTMLElement}\n * @readonly\n */\n get overContainer() {\n return this.data.newIndex;\n }\n}\n\nexports.SortableSortEvent = SortableSortEvent; /**\n * Sortable sorted event\n * @class SortableSortedEvent\n * @module SortableSortedEvent\n * @extends SortableEvent\n */\n\nSortableSortEvent.type = 'sortable:sort';\nSortableSortEvent.cancelable = true;\nclass SortableSortedEvent extends SortableEvent {\n\n /**\n * Index of last sorted event\n * @property oldIndex\n * @type {Number}\n * @readonly\n */\n get oldIndex() {\n return this.data.oldIndex;\n }\n\n /**\n * New index of this sorted event\n * @property newIndex\n * @type {Number}\n * @readonly\n */\n get newIndex() {\n return this.data.newIndex;\n }\n\n /**\n * Old container of draggable element\n * @property oldContainer\n * @type {HTMLElement}\n * @readonly\n */\n get oldContainer() {\n return this.data.oldContainer;\n }\n\n /**\n * New container of draggable element\n * @property newContainer\n * @type {HTMLElement}\n * @readonly\n */\n get newContainer() {\n return this.data.newContainer;\n }\n}\n\nexports.SortableSortedEvent = SortableSortedEvent; /**\n * Sortable stop event\n * @class SortableStopEvent\n * @module SortableStopEvent\n * @extends SortableEvent\n */\n\nSortableSortedEvent.type = 'sortable:sorted';\nclass SortableStopEvent extends SortableEvent {\n\n /**\n * Original index on sortable start\n * @property oldIndex\n * @type {Number}\n * @readonly\n */\n get oldIndex() {\n return this.data.oldIndex;\n }\n\n /**\n * New index of draggable element\n * @property newIndex\n * @type {Number}\n * @readonly\n */\n get newIndex() {\n return this.data.newIndex;\n }\n\n /**\n * Original container of draggable element\n * @property oldContainer\n * @type {HTMLElement}\n * @readonly\n */\n get oldContainer() {\n return this.data.oldContainer;\n }\n\n /**\n * New container of draggable element\n * @property newContainer\n * @type {HTMLElement}\n * @readonly\n */\n get newContainer() {\n return this.data.newContainer;\n }\n}\nexports.SortableStopEvent = SortableStopEvent;\nSortableStopEvent.type = 'sortable:stop';\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SortableEvent = __webpack_require__(9);\n\nObject.keys(_SortableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _SortableEvent[key];\n }\n });\n});\n\nvar _Sortable = __webpack_require__(26);\n\nvar _Sortable2 = _interopRequireDefault(_Sortable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Sortable2.default;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _Draggable = __webpack_require__(5);\n\nvar _Draggable2 = _interopRequireDefault(_Draggable);\n\nvar _SwappableEvent = __webpack_require__(10);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onDragStart = Symbol('onDragStart');\nconst onDragOver = Symbol('onDragOver');\nconst onDragStop = Symbol('onDragStop');\n\n/**\n * Returns an announcement message when the Draggable element is swapped with another draggable element\n * @param {SwappableSwappedEvent} swappableEvent\n * @return {String}\n */\nfunction onSwappableSwappedDefaultAnnouncement({ dragEvent, swappedElement }) {\n const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'swappable element';\n const overText = swappedElement.textContent.trim() || swappedElement.id || 'swappable element';\n\n return `Swapped ${sourceText} with ${overText}`;\n}\n\n/**\n * @const {Object} defaultAnnouncements\n * @const {Function} defaultAnnouncements['swappabled:swapped']\n */\nconst defaultAnnouncements = {\n 'swappabled:swapped': onSwappableSwappedDefaultAnnouncement\n};\n\n/**\n * Swappable is built on top of Draggable and allows swapping of draggable elements.\n * Order is irrelevant to Swappable.\n * @class Swappable\n * @module Swappable\n * @extends Draggable\n */\nclass Swappable extends _Draggable2.default {\n /**\n * Swappable constructor.\n * @constructs Swappable\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Swappable containers\n * @param {Object} options - Options for Swappable\n */\n constructor(containers = [], options = {}) {\n super(containers, _extends({}, options, {\n announcements: _extends({}, defaultAnnouncements, options.announcements || {})\n }));\n\n /**\n * Last draggable element that was dragged over\n * @property lastOver\n * @type {HTMLElement}\n */\n this.lastOver = null;\n\n this[onDragStart] = this[onDragStart].bind(this);\n this[onDragOver] = this[onDragOver].bind(this);\n this[onDragStop] = this[onDragStop].bind(this);\n\n this.on('drag:start', this[onDragStart]).on('drag:over', this[onDragOver]).on('drag:stop', this[onDragStop]);\n }\n\n /**\n * Destroys Swappable instance.\n */\n destroy() {\n super.destroy();\n\n this.off('drag:start', this._onDragStart).off('drag:over', this._onDragOver).off('drag:stop', this._onDragStop);\n }\n\n /**\n * Drag start handler\n * @private\n * @param {DragStartEvent} event - Drag start event\n */\n [onDragStart](event) {\n const swappableStartEvent = new _SwappableEvent.SwappableStartEvent({\n dragEvent: event\n });\n\n this.trigger(swappableStartEvent);\n\n if (swappableStartEvent.canceled()) {\n event.cancel();\n }\n }\n\n /**\n * Drag over handler\n * @private\n * @param {DragOverEvent} event - Drag over event\n */\n [onDragOver](event) {\n if (event.over === event.originalSource || event.over === event.source || event.canceled()) {\n return;\n }\n\n const swappableSwapEvent = new _SwappableEvent.SwappableSwapEvent({\n dragEvent: event,\n over: event.over,\n overContainer: event.overContainer\n });\n\n this.trigger(swappableSwapEvent);\n\n if (swappableSwapEvent.canceled()) {\n return;\n }\n\n // swap originally swapped element back\n if (this.lastOver && this.lastOver !== event.over) {\n swap(this.lastOver, event.source);\n }\n\n if (this.lastOver === event.over) {\n this.lastOver = null;\n } else {\n this.lastOver = event.over;\n }\n\n swap(event.source, event.over);\n\n const swappableSwappedEvent = new _SwappableEvent.SwappableSwappedEvent({\n dragEvent: event,\n swappedElement: event.over\n });\n\n this.trigger(swappableSwappedEvent);\n }\n\n /**\n * Drag stop handler\n * @private\n * @param {DragStopEvent} event - Drag stop event\n */\n [onDragStop](event) {\n const swappableStopEvent = new _SwappableEvent.SwappableStopEvent({\n dragEvent: event\n });\n\n this.trigger(swappableStopEvent);\n this.lastOver = null;\n }\n}\n\nexports.default = Swappable;\nfunction withTempElement(callback) {\n const tmpElement = document.createElement('div');\n callback(tmpElement);\n tmpElement.parentNode.removeChild(tmpElement);\n}\n\nfunction swap(source, over) {\n const overParent = over.parentNode;\n const sourceParent = source.parentNode;\n\n withTempElement(tmpElement => {\n sourceParent.insertBefore(tmpElement, source);\n overParent.insertBefore(source, over);\n sourceParent.insertBefore(over, tmpElement);\n });\n}\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SwappableStopEvent = exports.SwappableSwappedEvent = exports.SwappableSwapEvent = exports.SwappableStartEvent = exports.SwappableEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base swappable event\n * @class SwappableEvent\n * @module SwappableEvent\n * @extends AbstractEvent\n */\nclass SwappableEvent extends _AbstractEvent2.default {\n\n /**\n * Original drag event that triggered this swappable event\n * @property dragEvent\n * @type {DragEvent}\n * @readonly\n */\n get dragEvent() {\n return this.data.dragEvent;\n }\n}\n\nexports.SwappableEvent = SwappableEvent; /**\n * Swappable start event\n * @class SwappableStartEvent\n * @module SwappableStartEvent\n * @extends SwappableEvent\n */\n\nSwappableEvent.type = 'swappable';\nclass SwappableStartEvent extends SwappableEvent {}\n\nexports.SwappableStartEvent = SwappableStartEvent; /**\n * Swappable swap event\n * @class SwappableSwapEvent\n * @module SwappableSwapEvent\n * @extends SwappableEvent\n */\n\nSwappableStartEvent.type = 'swappable:start';\nSwappableStartEvent.cancelable = true;\nclass SwappableSwapEvent extends SwappableEvent {\n\n /**\n * Draggable element you are over\n * @property over\n * @type {HTMLElement}\n * @readonly\n */\n get over() {\n return this.data.over;\n }\n\n /**\n * Draggable container you are over\n * @property overContainer\n * @type {HTMLElement}\n * @readonly\n */\n get overContainer() {\n return this.data.overContainer;\n }\n}\n\nexports.SwappableSwapEvent = SwappableSwapEvent; /**\n * Swappable swapped event\n * @class SwappableSwappedEvent\n * @module SwappableSwappedEvent\n * @extends SwappableEvent\n */\n\nSwappableSwapEvent.type = 'swappable:swap';\nSwappableSwapEvent.cancelable = true;\nclass SwappableSwappedEvent extends SwappableEvent {\n\n /**\n * The draggable element that you swapped with\n * @property swappedElement\n * @type {HTMLElement}\n * @readonly\n */\n get swappedElement() {\n return this.data.swappedElement;\n }\n}\n\nexports.SwappableSwappedEvent = SwappableSwappedEvent; /**\n * Swappable stop event\n * @class SwappableStopEvent\n * @module SwappableStopEvent\n * @extends SwappableEvent\n */\n\nSwappableSwappedEvent.type = 'swappable:swapped';\nclass SwappableStopEvent extends SwappableEvent {}\nexports.SwappableStopEvent = SwappableStopEvent;\nSwappableStopEvent.type = 'swappable:stop';\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SwappableEvent = __webpack_require__(10);\n\nObject.keys(_SwappableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _SwappableEvent[key];\n }\n });\n});\n\nvar _Swappable = __webpack_require__(29);\n\nvar _Swappable2 = _interopRequireDefault(_Swappable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Swappable2.default;\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _utils = __webpack_require__(2);\n\nvar _Draggable = __webpack_require__(5);\n\nvar _Draggable2 = _interopRequireDefault(_Draggable);\n\nvar _DroppableEvent = __webpack_require__(11);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onDragStart = Symbol('onDragStart');\nconst onDragMove = Symbol('onDragMove');\nconst onDragStop = Symbol('onDragStop');\nconst dropInDropzone = Symbol('dropInDropZone');\nconst returnToOriginalDropzone = Symbol('returnToOriginalDropzone');\nconst closestDropzone = Symbol('closestDropzone');\nconst getDropzones = Symbol('getDropzones');\n\n/**\n * Returns an announcement message when the Draggable element is dropped into a dropzone element\n * @param {DroppableDroppedEvent} droppableEvent\n * @return {String}\n */\nfunction onDroppableDroppedDefaultAnnouncement({ dragEvent, dropzone }) {\n const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'draggable element';\n const dropzoneText = dropzone.textContent.trim() || dropzone.id || 'droppable element';\n\n return `Dropped ${sourceText} into ${dropzoneText}`;\n}\n\n/**\n * Returns an announcement message when the Draggable element has returned to its original dropzone element\n * @param {DroppableReturnedEvent} droppableEvent\n * @return {String}\n */\nfunction onDroppableReturnedDefaultAnnouncement({ dragEvent, dropzone }) {\n const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'draggable element';\n const dropzoneText = dropzone.textContent.trim() || dropzone.id || 'droppable element';\n\n return `Returned ${sourceText} from ${dropzoneText}`;\n}\n\n/**\n * @const {Object} defaultAnnouncements\n * @const {Function} defaultAnnouncements['droppable:dropped']\n * @const {Function} defaultAnnouncements['droppable:returned']\n */\nconst defaultAnnouncements = {\n 'droppable:dropped': onDroppableDroppedDefaultAnnouncement,\n 'droppable:returned': onDroppableReturnedDefaultAnnouncement\n};\n\nconst defaultClasses = {\n 'droppable:active': 'draggable-dropzone--active',\n 'droppable:occupied': 'draggable-dropzone--occupied'\n};\n\nconst defaultOptions = {\n dropzone: '.draggable-droppable'\n};\n\n/**\n * Droppable is built on top of Draggable and allows dropping draggable elements\n * into dropzone element\n * @class Droppable\n * @module Droppable\n * @extends Draggable\n */\nclass Droppable extends _Draggable2.default {\n /**\n * Droppable constructor.\n * @constructs Droppable\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Droppable containers\n * @param {Object} options - Options for Droppable\n */\n constructor(containers = [], options = {}) {\n super(containers, _extends({}, defaultOptions, options, {\n classes: _extends({}, defaultClasses, options.classes || {}),\n announcements: _extends({}, defaultAnnouncements, options.announcements || {})\n }));\n\n /**\n * All dropzone elements on drag start\n * @property dropzones\n * @type {HTMLElement[]}\n */\n this.dropzones = null;\n\n /**\n * Last dropzone element that the source was dropped into\n * @property lastDropzone\n * @type {HTMLElement}\n */\n this.lastDropzone = null;\n\n /**\n * Initial dropzone element that the source was drag from\n * @property initialDropzone\n * @type {HTMLElement}\n */\n this.initialDropzone = null;\n\n this[onDragStart] = this[onDragStart].bind(this);\n this[onDragMove] = this[onDragMove].bind(this);\n this[onDragStop] = this[onDragStop].bind(this);\n\n this.on('drag:start', this[onDragStart]).on('drag:move', this[onDragMove]).on('drag:stop', this[onDragStop]);\n }\n\n /**\n * Destroys Droppable instance.\n */\n destroy() {\n super.destroy();\n\n this.off('drag:start', this[onDragStart]).off('drag:move', this[onDragMove]).off('drag:stop', this[onDragStop]);\n }\n\n /**\n * Drag start handler\n * @private\n * @param {DragStartEvent} event - Drag start event\n */\n [onDragStart](event) {\n if (event.canceled()) {\n return;\n }\n\n this.dropzones = [...this[getDropzones]()];\n const dropzone = (0, _utils.closest)(event.sensorEvent.target, this.options.dropzone);\n\n if (!dropzone) {\n event.cancel();\n return;\n }\n\n const droppableStartEvent = new _DroppableEvent.DroppableStartEvent({\n dragEvent: event,\n dropzone\n });\n\n this.trigger(droppableStartEvent);\n\n if (droppableStartEvent.canceled()) {\n event.cancel();\n return;\n }\n\n this.initialDropzone = dropzone;\n\n for (const dropzoneElement of this.dropzones) {\n if (dropzoneElement.classList.contains(this.getClassNameFor('droppable:occupied'))) {\n continue;\n }\n\n dropzoneElement.classList.add(this.getClassNameFor('droppable:active'));\n }\n }\n\n /**\n * Drag move handler\n * @private\n * @param {DragMoveEvent} event - Drag move event\n */\n [onDragMove](event) {\n if (event.canceled()) {\n return;\n }\n\n const dropzone = this[closestDropzone](event.sensorEvent.target);\n const overEmptyDropzone = dropzone && !dropzone.classList.contains(this.getClassNameFor('droppable:occupied'));\n\n if (overEmptyDropzone && this[dropInDropzone](event, dropzone)) {\n this.lastDropzone = dropzone;\n } else if ((!dropzone || dropzone === this.initialDropzone) && this.lastDropzone) {\n this[returnToOriginalDropzone](event);\n this.lastDropzone = null;\n }\n }\n\n /**\n * Drag stop handler\n * @private\n * @param {DragStopEvent} event - Drag stop event\n */\n [onDragStop](event) {\n const droppableStopEvent = new _DroppableEvent.DroppableStopEvent({\n dragEvent: event,\n dropzone: this.lastDropzone || this.initialDropzone\n });\n\n this.trigger(droppableStopEvent);\n\n const occupiedClass = this.getClassNameFor('droppable:occupied');\n\n for (const dropzone of this.dropzones) {\n dropzone.classList.remove(this.getClassNameFor('droppable:active'));\n }\n\n if (this.lastDropzone && this.lastDropzone !== this.initialDropzone) {\n this.initialDropzone.classList.remove(occupiedClass);\n }\n\n this.dropzones = null;\n this.lastDropzone = null;\n this.initialDropzone = null;\n }\n\n /**\n * Drops a draggable element into a dropzone element\n * @private\n * @param {DragMoveEvent} event - Drag move event\n * @param {HTMLElement} dropzone - Dropzone element to drop draggable into\n */\n [dropInDropzone](event, dropzone) {\n const droppableDroppedEvent = new _DroppableEvent.DroppableDroppedEvent({\n dragEvent: event,\n dropzone\n });\n\n this.trigger(droppableDroppedEvent);\n\n if (droppableDroppedEvent.canceled()) {\n return false;\n }\n\n const occupiedClass = this.getClassNameFor('droppable:occupied');\n\n if (this.lastDropzone) {\n this.lastDropzone.classList.remove(occupiedClass);\n }\n\n dropzone.appendChild(event.source);\n dropzone.classList.add(occupiedClass);\n\n return true;\n }\n\n /**\n * Moves the previously dropped element back into its original dropzone\n * @private\n * @param {DragMoveEvent} event - Drag move event\n */\n [returnToOriginalDropzone](event) {\n const droppableReturnedEvent = new _DroppableEvent.DroppableReturnedEvent({\n dragEvent: event,\n dropzone: this.lastDropzone\n });\n\n this.trigger(droppableReturnedEvent);\n\n if (droppableReturnedEvent.canceled()) {\n return;\n }\n\n this.initialDropzone.appendChild(event.source);\n this.lastDropzone.classList.remove(this.getClassNameFor('droppable:occupied'));\n }\n\n /**\n * Returns closest dropzone element for even target\n * @private\n * @param {HTMLElement} target - Event target\n * @return {HTMLElement|null}\n */\n [closestDropzone](target) {\n if (!this.dropzones) {\n return null;\n }\n\n return (0, _utils.closest)(target, this.dropzones);\n }\n\n /**\n * Returns all current dropzone elements for this draggable instance\n * @private\n * @return {NodeList|HTMLElement[]|Array}\n */\n [getDropzones]() {\n const dropzone = this.options.dropzone;\n\n if (typeof dropzone === 'string') {\n return document.querySelectorAll(dropzone);\n } else if (dropzone instanceof NodeList || dropzone instanceof Array) {\n return dropzone;\n } else if (typeof dropzone === 'function') {\n return dropzone();\n } else {\n return [];\n }\n }\n}\nexports.default = Droppable;\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DroppableStopEvent = exports.DroppableReturnedEvent = exports.DroppableDroppedEvent = exports.DroppableStartEvent = exports.DroppableEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base droppable event\n * @class DroppableEvent\n * @module DroppableEvent\n * @extends AbstractEvent\n */\nclass DroppableEvent extends _AbstractEvent2.default {\n\n /**\n * Original drag event that triggered this droppable event\n * @property dragEvent\n * @type {DragEvent}\n * @readonly\n */\n get dragEvent() {\n return this.data.dragEvent;\n }\n}\n\nexports.DroppableEvent = DroppableEvent; /**\n * Droppable start event\n * @class DroppableStartEvent\n * @module DroppableStartEvent\n * @extends DroppableEvent\n */\n\nDroppableEvent.type = 'droppable';\nclass DroppableStartEvent extends DroppableEvent {\n\n /**\n * The initial dropzone element of the currently dragging draggable element\n * @property dropzone\n * @type {HTMLElement}\n * @readonly\n */\n get dropzone() {\n return this.data.dropzone;\n }\n}\n\nexports.DroppableStartEvent = DroppableStartEvent; /**\n * Droppable dropped event\n * @class DroppableDroppedEvent\n * @module DroppableDroppedEvent\n * @extends DroppableEvent\n */\n\nDroppableStartEvent.type = 'droppable:start';\nDroppableStartEvent.cancelable = true;\nclass DroppableDroppedEvent extends DroppableEvent {\n\n /**\n * The dropzone element you dropped the draggable element into\n * @property dropzone\n * @type {HTMLElement}\n * @readonly\n */\n get dropzone() {\n return this.data.dropzone;\n }\n}\n\nexports.DroppableDroppedEvent = DroppableDroppedEvent; /**\n * Droppable returned event\n * @class DroppableReturnedEvent\n * @module DroppableReturnedEvent\n * @extends DroppableEvent\n */\n\nDroppableDroppedEvent.type = 'droppable:dropped';\nDroppableDroppedEvent.cancelable = true;\nclass DroppableReturnedEvent extends DroppableEvent {\n\n /**\n * The dropzone element you dragged away from\n * @property dropzone\n * @type {HTMLElement}\n * @readonly\n */\n get dropzone() {\n return this.data.dropzone;\n }\n}\n\nexports.DroppableReturnedEvent = DroppableReturnedEvent; /**\n * Droppable stop event\n * @class DroppableStopEvent\n * @module DroppableStopEvent\n * @extends DroppableEvent\n */\n\nDroppableReturnedEvent.type = 'droppable:returned';\nDroppableReturnedEvent.cancelable = true;\nclass DroppableStopEvent extends DroppableEvent {\n\n /**\n * The final dropzone element of the draggable element\n * @property dropzone\n * @type {HTMLElement}\n * @readonly\n */\n get dropzone() {\n return this.data.dropzone;\n }\n}\nexports.DroppableStopEvent = DroppableStopEvent;\nDroppableStopEvent.type = 'droppable:stop';\nDroppableStopEvent.cancelable = true;\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _DroppableEvent = __webpack_require__(11);\n\nObject.keys(_DroppableEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _DroppableEvent[key];\n }\n });\n});\n\nvar _Droppable = __webpack_require__(32);\n\nvar _Droppable2 = _interopRequireDefault(_Droppable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Droppable2.default;\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * The Emitter is a simple emitter class that provides you with `on()`, `off()` and `trigger()` methods\n * @class Emitter\n * @module Emitter\n */\nclass Emitter {\n constructor() {\n this.callbacks = {};\n }\n\n /**\n * Registers callbacks by event name\n * @param {String} type\n * @param {...Function} callbacks\n */\n on(type, ...callbacks) {\n if (!this.callbacks[type]) {\n this.callbacks[type] = [];\n }\n\n this.callbacks[type].push(...callbacks);\n\n return this;\n }\n\n /**\n * Unregisters callbacks by event name\n * @param {String} type\n * @param {Function} callback\n */\n off(type, callback) {\n if (!this.callbacks[type]) {\n return null;\n }\n\n const copy = this.callbacks[type].slice(0);\n\n for (let i = 0; i < copy.length; i++) {\n if (callback === copy[i]) {\n this.callbacks[type].splice(i, 1);\n }\n }\n\n return this;\n }\n\n /**\n * Triggers event callbacks by event object\n * @param {AbstractEvent} event\n */\n trigger(event) {\n if (!this.callbacks[event.type]) {\n return null;\n }\n\n const callbacks = [...this.callbacks[event.type]];\n const caughtErrors = [];\n\n for (let i = callbacks.length - 1; i >= 0; i--) {\n const callback = callbacks[i];\n\n try {\n callback(event);\n } catch (error) {\n caughtErrors.push(error);\n }\n }\n\n if (caughtErrors.length) {\n /* eslint-disable no-console */\n console.error(`Draggable caught errors while triggering '${event.type}'`, caughtErrors);\n /* eslint-disable no-console */\n }\n\n return this;\n }\n}\nexports.default = Emitter;\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Emitter = __webpack_require__(35);\n\nvar _Emitter2 = _interopRequireDefault(_Emitter);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Emitter2.default;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _utils = __webpack_require__(2);\n\nvar _Plugins = __webpack_require__(12);\n\nvar _Emitter = __webpack_require__(36);\n\nvar _Emitter2 = _interopRequireDefault(_Emitter);\n\nvar _Sensors = __webpack_require__(6);\n\nvar _DraggableEvent = __webpack_require__(13);\n\nvar _DragEvent = __webpack_require__(14);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onDragStart = Symbol('onDragStart');\nconst onDragMove = Symbol('onDragMove');\nconst onDragStop = Symbol('onDragStop');\nconst onDragPressure = Symbol('onDragPressure');\n\n/**\n * @const {Object} defaultAnnouncements\n * @const {Function} defaultAnnouncements['drag:start']\n * @const {Function} defaultAnnouncements['drag:stop']\n */\nconst defaultAnnouncements = {\n 'drag:start': event => `Picked up ${event.source.textContent.trim() || event.source.id || 'draggable element'}`,\n 'drag:stop': event => `Released ${event.source.textContent.trim() || event.source.id || 'draggable element'}`\n};\n\nconst defaultClasses = {\n 'container:dragging': 'draggable-container--is-dragging',\n 'source:dragging': 'draggable-source--is-dragging',\n 'source:placed': 'draggable-source--placed',\n 'container:placed': 'draggable-container--placed',\n 'body:dragging': 'draggable--is-dragging',\n 'draggable:over': 'draggable--over',\n 'container:over': 'draggable-container--over',\n 'source:original': 'draggable--original',\n mirror: 'draggable-mirror'\n};\n\nconst defaultOptions = exports.defaultOptions = {\n draggable: '.draggable-source',\n handle: null,\n delay: 100,\n placedTimeout: 800,\n plugins: [],\n sensors: []\n};\n\n/**\n * This is the core draggable library that does the heavy lifting\n * @class Draggable\n * @module Draggable\n */\nclass Draggable {\n\n /**\n * Draggable constructor.\n * @constructs Draggable\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Draggable containers\n * @param {Object} options - Options for draggable\n */\n constructor(containers = [document.body], options = {}) {\n /**\n * Draggable containers\n * @property containers\n * @type {HTMLElement[]}\n */\n if (containers instanceof NodeList || containers instanceof Array) {\n this.containers = [...containers];\n } else if (containers instanceof HTMLElement) {\n this.containers = [containers];\n } else {\n throw new Error('Draggable containers are expected to be of type `NodeList`, `HTMLElement[]` or `HTMLElement`');\n }\n\n this.options = _extends({}, defaultOptions, options, {\n classes: _extends({}, defaultClasses, options.classes || {}),\n announcements: _extends({}, defaultAnnouncements, options.announcements || {})\n });\n\n /**\n * Draggables event emitter\n * @property emitter\n * @type {Emitter}\n */\n this.emitter = new _Emitter2.default();\n\n /**\n * Current drag state\n * @property dragging\n * @type {Boolean}\n */\n this.dragging = false;\n\n /**\n * Active plugins\n * @property plugins\n * @type {Plugin[]}\n */\n this.plugins = [];\n\n /**\n * Active sensors\n * @property sensors\n * @type {Sensor[]}\n */\n this.sensors = [];\n\n this[onDragStart] = this[onDragStart].bind(this);\n this[onDragMove] = this[onDragMove].bind(this);\n this[onDragStop] = this[onDragStop].bind(this);\n this[onDragPressure] = this[onDragPressure].bind(this);\n\n document.addEventListener('drag:start', this[onDragStart], true);\n document.addEventListener('drag:move', this[onDragMove], true);\n document.addEventListener('drag:stop', this[onDragStop], true);\n document.addEventListener('drag:pressure', this[onDragPressure], true);\n\n const defaultPlugins = Object.values(Draggable.Plugins).map(Plugin => Plugin);\n const defaultSensors = [_Sensors.MouseSensor, _Sensors.TouchSensor];\n\n this.addPlugin(...[...defaultPlugins, ...this.options.plugins]);\n this.addSensor(...[...defaultSensors, ...this.options.sensors]);\n\n const draggableInitializedEvent = new _DraggableEvent.DraggableInitializedEvent({\n draggable: this\n });\n\n this.on('mirror:created', ({ mirror }) => this.mirror = mirror);\n this.on('mirror:destroy', () => this.mirror = null);\n\n this.trigger(draggableInitializedEvent);\n }\n\n /**\n * Destroys Draggable instance. This removes all internal event listeners and\n * deactivates sensors and plugins\n */\n\n /**\n * Default plugins draggable uses\n * @static\n * @property {Object} Plugins\n * @property {Announcement} Plugins.Announcement\n * @property {Focusable} Plugins.Focusable\n * @property {Mirror} Plugins.Mirror\n * @property {Scrollable} Plugins.Scrollable\n * @type {Object}\n */\n destroy() {\n document.removeEventListener('drag:start', this[onDragStart], true);\n document.removeEventListener('drag:move', this[onDragMove], true);\n document.removeEventListener('drag:stop', this[onDragStop], true);\n document.removeEventListener('drag:pressure', this[onDragPressure], true);\n\n const draggableDestroyEvent = new _DraggableEvent.DraggableDestroyEvent({\n draggable: this\n });\n\n this.trigger(draggableDestroyEvent);\n\n this.removePlugin(...this.plugins.map(plugin => plugin.constructor));\n this.removeSensor(...this.sensors.map(sensor => sensor.constructor));\n }\n\n /**\n * Adds plugin to this draggable instance. This will end up calling the attach method of the plugin\n * @param {...typeof Plugin} plugins - Plugins that you want attached to draggable\n * @return {Draggable}\n * @example draggable.addPlugin(CustomA11yPlugin, CustomMirrorPlugin)\n */\n addPlugin(...plugins) {\n const activePlugins = plugins.map(Plugin => new Plugin(this));\n\n activePlugins.forEach(plugin => plugin.attach());\n this.plugins = [...this.plugins, ...activePlugins];\n\n return this;\n }\n\n /**\n * Removes plugins that are already attached to this draggable instance. This will end up calling\n * the detach method of the plugin\n * @param {...typeof Plugin} plugins - Plugins that you want detached from draggable\n * @return {Draggable}\n * @example draggable.removePlugin(MirrorPlugin, CustomMirrorPlugin)\n */\n removePlugin(...plugins) {\n const removedPlugins = this.plugins.filter(plugin => plugins.includes(plugin.constructor));\n\n removedPlugins.forEach(plugin => plugin.detach());\n this.plugins = this.plugins.filter(plugin => !plugins.includes(plugin.constructor));\n\n return this;\n }\n\n /**\n * Adds sensors to this draggable instance. This will end up calling the attach method of the sensor\n * @param {...typeof Sensor} sensors - Sensors that you want attached to draggable\n * @return {Draggable}\n * @example draggable.addSensor(ForceTouchSensor, CustomSensor)\n */\n addSensor(...sensors) {\n const activeSensors = sensors.map(Sensor => new Sensor(this.containers, this.options));\n\n activeSensors.forEach(sensor => sensor.attach());\n this.sensors = [...this.sensors, ...activeSensors];\n\n return this;\n }\n\n /**\n * Removes sensors that are already attached to this draggable instance. This will end up calling\n * the detach method of the sensor\n * @param {...typeof Sensor} sensors - Sensors that you want attached to draggable\n * @return {Draggable}\n * @example draggable.removeSensor(TouchSensor, DragSensor)\n */\n removeSensor(...sensors) {\n const removedSensors = this.sensors.filter(sensor => sensors.includes(sensor.constructor));\n\n removedSensors.forEach(sensor => sensor.detach());\n this.sensors = this.sensors.filter(sensor => !sensors.includes(sensor.constructor));\n\n return this;\n }\n\n /**\n * Adds container to this draggable instance\n * @param {...HTMLElement} containers - Containers you want to add to draggable\n * @return {Draggable}\n * @example draggable.addContainer(document.body)\n */\n addContainer(...containers) {\n this.containers = [...this.containers, ...containers];\n this.sensors.forEach(sensor => sensor.addContainer(...containers));\n return this;\n }\n\n /**\n * Removes container from this draggable instance\n * @param {...HTMLElement} containers - Containers you want to remove from draggable\n * @return {Draggable}\n * @example draggable.removeContainer(document.body)\n */\n removeContainer(...containers) {\n this.containers = this.containers.filter(container => !containers.includes(container));\n this.sensors.forEach(sensor => sensor.removeContainer(...containers));\n return this;\n }\n\n /**\n * Adds listener for draggable events\n * @param {String} type - Event name\n * @param {...Function} callbacks - Event callbacks\n * @return {Draggable}\n * @example draggable.on('drag:start', (dragEvent) => dragEvent.cancel());\n */\n on(type, ...callbacks) {\n this.emitter.on(type, ...callbacks);\n return this;\n }\n\n /**\n * Removes listener from draggable\n * @param {String} type - Event name\n * @param {Function} callback - Event callback\n * @return {Draggable}\n * @example draggable.off('drag:start', handlerFunction);\n */\n off(type, callback) {\n this.emitter.off(type, callback);\n return this;\n }\n\n /**\n * Triggers draggable event\n * @param {AbstractEvent} event - Event instance\n * @return {Draggable}\n * @example draggable.trigger(event);\n */\n trigger(event) {\n this.emitter.trigger(event);\n return this;\n }\n\n /**\n * Returns class name for class identifier\n * @param {String} name - Name of class identifier\n * @return {String|null}\n */\n getClassNameFor(name) {\n return this.options.classes[name];\n }\n\n /**\n * Returns true if this draggable instance is currently dragging\n * @return {Boolean}\n */\n isDragging() {\n return Boolean(this.dragging);\n }\n\n /**\n * Returns all draggable elements\n * @return {HTMLElement[]}\n */\n getDraggableElements() {\n return this.containers.reduce((current, container) => {\n return [...current, ...this.getDraggableElementsForContainer(container)];\n }, []);\n }\n\n /**\n * Returns draggable elements for a given container, excluding the mirror and\n * original source element if present\n * @param {HTMLElement} container\n * @return {HTMLElement[]}\n */\n getDraggableElementsForContainer(container) {\n const allDraggableElements = container.querySelectorAll(this.options.draggable);\n\n return [...allDraggableElements].filter(childElement => {\n return childElement !== this.originalSource && childElement !== this.mirror;\n });\n }\n\n /**\n * Drag start handler\n * @private\n * @param {Event} event - DOM Drag event\n */\n [onDragStart](event) {\n const sensorEvent = getSensorEvent(event);\n const { target, container } = sensorEvent;\n\n if (!this.containers.includes(container)) {\n return;\n }\n\n if (this.options.handle && target && !(0, _utils.closest)(target, this.options.handle)) {\n sensorEvent.cancel();\n return;\n }\n\n // Find draggable source element\n this.originalSource = (0, _utils.closest)(target, this.options.draggable);\n this.sourceContainer = container;\n\n if (!this.originalSource) {\n sensorEvent.cancel();\n return;\n }\n\n if (this.lastPlacedSource && this.lastPlacedContainer) {\n clearTimeout(this.placedTimeoutID);\n this.lastPlacedSource.classList.remove(this.getClassNameFor('source:placed'));\n this.lastPlacedContainer.classList.remove(this.getClassNameFor('container:placed'));\n }\n\n this.source = this.originalSource.cloneNode(true);\n this.originalSource.parentNode.insertBefore(this.source, this.originalSource);\n this.originalSource.style.display = 'none';\n\n const dragEvent = new _DragEvent.DragStartEvent({\n source: this.source,\n originalSource: this.originalSource,\n sourceContainer: container,\n sensorEvent\n });\n\n this.trigger(dragEvent);\n\n this.dragging = !dragEvent.canceled();\n\n if (dragEvent.canceled()) {\n this.source.parentNode.removeChild(this.source);\n this.originalSource.style.display = null;\n return;\n }\n\n this.originalSource.classList.add(this.getClassNameFor('source:original'));\n this.source.classList.add(this.getClassNameFor('source:dragging'));\n this.sourceContainer.classList.add(this.getClassNameFor('container:dragging'));\n document.body.classList.add(this.getClassNameFor('body:dragging'));\n applyUserSelect(document.body, 'none');\n\n requestAnimationFrame(() => {\n const oldSensorEvent = getSensorEvent(event);\n const newSensorEvent = oldSensorEvent.clone({ target: this.source });\n\n this[onDragMove](_extends({}, event, {\n detail: newSensorEvent\n }));\n });\n }\n\n /**\n * Drag move handler\n * @private\n * @param {Event} event - DOM Drag event\n */\n [onDragMove](event) {\n if (!this.dragging) {\n return;\n }\n\n const sensorEvent = getSensorEvent(event);\n const { container } = sensorEvent;\n let target = sensorEvent.target;\n\n const dragMoveEvent = new _DragEvent.DragMoveEvent({\n source: this.source,\n originalSource: this.originalSource,\n sourceContainer: container,\n sensorEvent\n });\n\n this.trigger(dragMoveEvent);\n\n if (dragMoveEvent.canceled()) {\n sensorEvent.cancel();\n }\n\n target = (0, _utils.closest)(target, this.options.draggable);\n const withinCorrectContainer = (0, _utils.closest)(sensorEvent.target, this.containers);\n const overContainer = sensorEvent.overContainer || withinCorrectContainer;\n const isLeavingContainer = this.currentOverContainer && overContainer !== this.currentOverContainer;\n const isLeavingDraggable = this.currentOver && target !== this.currentOver;\n const isOverContainer = overContainer && this.currentOverContainer !== overContainer;\n const isOverDraggable = withinCorrectContainer && target && this.currentOver !== target;\n\n if (isLeavingDraggable) {\n const dragOutEvent = new _DragEvent.DragOutEvent({\n source: this.source,\n originalSource: this.originalSource,\n sourceContainer: container,\n sensorEvent,\n over: this.currentOver\n });\n\n this.currentOver.classList.remove(this.getClassNameFor('draggable:over'));\n this.currentOver = null;\n\n this.trigger(dragOutEvent);\n }\n\n if (isLeavingContainer) {\n const dragOutContainerEvent = new _DragEvent.DragOutContainerEvent({\n source: this.source,\n originalSource: this.originalSource,\n sourceContainer: container,\n sensorEvent,\n overContainer: this.currentOverContainer\n });\n\n this.currentOverContainer.classList.remove(this.getClassNameFor('container:over'));\n this.currentOverContainer = null;\n\n this.trigger(dragOutContainerEvent);\n }\n\n if (isOverContainer) {\n overContainer.classList.add(this.getClassNameFor('container:over'));\n\n const dragOverContainerEvent = new _DragEvent.DragOverContainerEvent({\n source: this.source,\n originalSource: this.originalSource,\n sourceContainer: container,\n sensorEvent,\n overContainer\n });\n\n this.currentOverContainer = overContainer;\n\n this.trigger(dragOverContainerEvent);\n }\n\n if (isOverDraggable) {\n target.classList.add(this.getClassNameFor('draggable:over'));\n\n const dragOverEvent = new _DragEvent.DragOverEvent({\n source: this.source,\n originalSource: this.originalSource,\n sourceContainer: container,\n sensorEvent,\n overContainer,\n over: target\n });\n\n this.currentOver = target;\n\n this.trigger(dragOverEvent);\n }\n }\n\n /**\n * Drag stop handler\n * @private\n * @param {Event} event - DOM Drag event\n */\n [onDragStop](event) {\n if (!this.dragging) {\n return;\n }\n\n this.dragging = false;\n\n const dragStopEvent = new _DragEvent.DragStopEvent({\n source: this.source,\n originalSource: this.originalSource,\n sensorEvent: event.sensorEvent,\n sourceContainer: this.sourceContainer\n });\n\n this.trigger(dragStopEvent);\n\n this.source.parentNode.insertBefore(this.originalSource, this.source);\n this.source.parentNode.removeChild(this.source);\n this.originalSource.style.display = '';\n\n this.source.classList.remove(this.getClassNameFor('source:dragging'));\n this.originalSource.classList.remove(this.getClassNameFor('source:original'));\n this.originalSource.classList.add(this.getClassNameFor('source:placed'));\n this.sourceContainer.classList.add(this.getClassNameFor('container:placed'));\n this.sourceContainer.classList.remove(this.getClassNameFor('container:dragging'));\n document.body.classList.remove(this.getClassNameFor('body:dragging'));\n applyUserSelect(document.body, '');\n\n if (this.currentOver) {\n this.currentOver.classList.remove(this.getClassNameFor('draggable:over'));\n }\n\n if (this.currentOverContainer) {\n this.currentOverContainer.classList.remove(this.getClassNameFor('container:over'));\n }\n\n this.lastPlacedSource = this.originalSource;\n this.lastPlacedContainer = this.sourceContainer;\n\n this.placedTimeoutID = setTimeout(() => {\n if (this.lastPlacedSource) {\n this.lastPlacedSource.classList.remove(this.getClassNameFor('source:placed'));\n }\n\n if (this.lastPlacedContainer) {\n this.lastPlacedContainer.classList.remove(this.getClassNameFor('container:placed'));\n }\n\n this.lastPlacedSource = null;\n this.lastPlacedContainer = null;\n }, this.options.placedTimeout);\n\n this.source = null;\n this.originalSource = null;\n this.currentOverContainer = null;\n this.currentOver = null;\n this.sourceContainer = null;\n }\n\n /**\n * Drag pressure handler\n * @private\n * @param {Event} event - DOM Drag event\n */\n [onDragPressure](event) {\n if (!this.dragging) {\n return;\n }\n\n const sensorEvent = getSensorEvent(event);\n const source = this.source || (0, _utils.closest)(sensorEvent.originalEvent.target, this.options.draggable);\n\n const dragPressureEvent = new _DragEvent.DragPressureEvent({\n sensorEvent,\n source,\n pressure: sensorEvent.pressure\n });\n\n this.trigger(dragPressureEvent);\n }\n}\n\nexports.default = Draggable;\nDraggable.Plugins = { Announcement: _Plugins.Announcement, Focusable: _Plugins.Focusable, Mirror: _Plugins.Mirror, Scrollable: _Plugins.Scrollable };\nfunction getSensorEvent(event) {\n return event.detail;\n}\n\nfunction applyUserSelect(element, value) {\n element.style.webkitUserSelect = value;\n element.style.mozUserSelect = value;\n element.style.msUserSelect = value;\n element.style.oUserSelect = value;\n element.style.userSelect = value;\n}\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Sensor = __webpack_require__(4);\n\nvar _Sensor2 = _interopRequireDefault(_Sensor);\n\nvar _SensorEvent = __webpack_require__(3);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onMouseForceWillBegin = Symbol('onMouseForceWillBegin');\nconst onMouseForceDown = Symbol('onMouseForceDown');\nconst onMouseDown = Symbol('onMouseDown');\nconst onMouseForceChange = Symbol('onMouseForceChange');\nconst onMouseMove = Symbol('onMouseMove');\nconst onMouseUp = Symbol('onMouseUp');\nconst onMouseForceGlobalChange = Symbol('onMouseForceGlobalChange');\n\n/**\n * This sensor picks up native force touch events and dictates drag operations\n * @class ForceTouchSensor\n * @module ForceTouchSensor\n * @extends Sensor\n */\nclass ForceTouchSensor extends _Sensor2.default {\n /**\n * ForceTouchSensor constructor.\n * @constructs ForceTouchSensor\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Containers\n * @param {Object} options - Options\n */\n constructor(containers = [], options = {}) {\n super(containers, options);\n\n /**\n * Draggable element needs to be remembered to unset the draggable attribute after drag operation has completed\n * @property mightDrag\n * @type {Boolean}\n */\n this.mightDrag = false;\n\n this[onMouseForceWillBegin] = this[onMouseForceWillBegin].bind(this);\n this[onMouseForceDown] = this[onMouseForceDown].bind(this);\n this[onMouseDown] = this[onMouseDown].bind(this);\n this[onMouseForceChange] = this[onMouseForceChange].bind(this);\n this[onMouseMove] = this[onMouseMove].bind(this);\n this[onMouseUp] = this[onMouseUp].bind(this);\n }\n\n /**\n * Attaches sensors event listeners to the DOM\n */\n attach() {\n for (const container of this.containers) {\n container.addEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.addEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.addEventListener('mousedown', this[onMouseDown], true);\n container.addEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.addEventListener('mousemove', this[onMouseMove]);\n document.addEventListener('mouseup', this[onMouseUp]);\n }\n\n /**\n * Detaches sensors event listeners to the DOM\n */\n detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }\n\n /**\n * Mouse force will begin handler\n * @private\n * @param {Event} event - Mouse force will begin event\n */\n [onMouseForceWillBegin](event) {\n event.preventDefault();\n this.mightDrag = true;\n }\n\n /**\n * Mouse force down handler\n * @private\n * @param {Event} event - Mouse force down event\n */\n [onMouseForceDown](event) {\n if (this.dragging) {\n return;\n }\n\n const target = document.elementFromPoint(event.clientX, event.clientY);\n const container = event.currentTarget;\n\n const dragStartEvent = new _SensorEvent.DragStartSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container,\n originalEvent: event\n });\n\n this.trigger(container, dragStartEvent);\n\n this.currentContainer = container;\n this.dragging = !dragStartEvent.canceled();\n this.mightDrag = false;\n }\n\n /**\n * Mouse up handler\n * @private\n * @param {Event} event - Mouse up event\n */\n [onMouseUp](event) {\n if (!this.dragging) {\n return;\n }\n\n const dragStopEvent = new _SensorEvent.DragStopSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target: null,\n container: this.currentContainer,\n originalEvent: event\n });\n\n this.trigger(this.currentContainer, dragStopEvent);\n\n this.currentContainer = null;\n this.dragging = false;\n this.mightDrag = false;\n }\n\n /**\n * Mouse down handler\n * @private\n * @param {Event} event - Mouse down event\n */\n [onMouseDown](event) {\n if (!this.mightDrag) {\n return;\n }\n\n // Need workaround for real click\n // Cancel potential drag events\n event.stopPropagation();\n event.stopImmediatePropagation();\n event.preventDefault();\n }\n\n /**\n * Mouse move handler\n * @private\n * @param {Event} event - Mouse force will begin event\n */\n [onMouseMove](event) {\n if (!this.dragging) {\n return;\n }\n\n const target = document.elementFromPoint(event.clientX, event.clientY);\n\n const dragMoveEvent = new _SensorEvent.DragMoveSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container: this.currentContainer,\n originalEvent: event\n });\n\n this.trigger(this.currentContainer, dragMoveEvent);\n }\n\n /**\n * Mouse force change handler\n * @private\n * @param {Event} event - Mouse force change event\n */\n [onMouseForceChange](event) {\n if (this.dragging) {\n return;\n }\n\n const target = event.target;\n const container = event.currentTarget;\n\n const dragPressureEvent = new _SensorEvent.DragPressureSensorEvent({\n pressure: event.webkitForce,\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container,\n originalEvent: event\n });\n\n this.trigger(container, dragPressureEvent);\n }\n\n /**\n * Mouse force global change handler\n * @private\n * @param {Event} event - Mouse force global change event\n */\n [onMouseForceGlobalChange](event) {\n if (!this.dragging) {\n return;\n }\n\n const target = event.target;\n\n const dragPressureEvent = new _SensorEvent.DragPressureSensorEvent({\n pressure: event.webkitForce,\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container: this.currentContainer,\n originalEvent: event\n });\n\n this.trigger(this.currentContainer, dragPressureEvent);\n }\n}\nexports.default = ForceTouchSensor;\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ForceTouchSensor = __webpack_require__(38);\n\nvar _ForceTouchSensor2 = _interopRequireDefault(_ForceTouchSensor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _ForceTouchSensor2.default;\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _utils = __webpack_require__(2);\n\nvar _Sensor = __webpack_require__(4);\n\nvar _Sensor2 = _interopRequireDefault(_Sensor);\n\nvar _SensorEvent = __webpack_require__(3);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onMouseDown = Symbol('onMouseDown');\nconst onMouseUp = Symbol('onMouseUp');\nconst onDragStart = Symbol('onDragStart');\nconst onDragOver = Symbol('onDragOver');\nconst onDragEnd = Symbol('onDragEnd');\nconst onDrop = Symbol('onDrop');\nconst reset = Symbol('reset');\n\n/**\n * This sensor picks up native browser drag events and dictates drag operations\n * @class DragSensor\n * @module DragSensor\n * @extends Sensor\n */\nclass DragSensor extends _Sensor2.default {\n /**\n * DragSensor constructor.\n * @constructs DragSensor\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Containers\n * @param {Object} options - Options\n */\n constructor(containers = [], options = {}) {\n super(containers, options);\n\n /**\n * Mouse down timer which will end up setting the draggable attribute, unless canceled\n * @property mouseDownTimeout\n * @type {Number}\n */\n this.mouseDownTimeout = null;\n\n /**\n * Draggable element needs to be remembered to unset the draggable attribute after drag operation has completed\n * @property draggableElement\n * @type {HTMLElement}\n */\n this.draggableElement = null;\n\n /**\n * Native draggable element could be links or images, their draggable state will be disabled during drag operation\n * @property nativeDraggableElement\n * @type {HTMLElement}\n */\n this.nativeDraggableElement = null;\n\n this[onMouseDown] = this[onMouseDown].bind(this);\n this[onMouseUp] = this[onMouseUp].bind(this);\n this[onDragStart] = this[onDragStart].bind(this);\n this[onDragOver] = this[onDragOver].bind(this);\n this[onDragEnd] = this[onDragEnd].bind(this);\n this[onDrop] = this[onDrop].bind(this);\n }\n\n /**\n * Attaches sensors event listeners to the DOM\n */\n attach() {\n document.addEventListener('mousedown', this[onMouseDown], true);\n }\n\n /**\n * Detaches sensors event listeners to the DOM\n */\n detach() {\n document.removeEventListener('mousedown', this[onMouseDown], true);\n }\n\n /**\n * Drag start handler\n * @private\n * @param {Event} event - Drag start event\n */\n [onDragStart](event) {\n // Need for firefox. \"text\" key is needed for IE\n event.dataTransfer.setData('text', '');\n event.dataTransfer.effectAllowed = this.options.type;\n\n const target = document.elementFromPoint(event.clientX, event.clientY);\n this.currentContainer = (0, _utils.closest)(event.target, this.containers);\n\n if (!this.currentContainer) {\n return;\n }\n\n const dragStartEvent = new _SensorEvent.DragStartSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container: this.currentContainer,\n originalEvent: event\n });\n\n // Workaround\n setTimeout(() => {\n this.trigger(this.currentContainer, dragStartEvent);\n\n if (dragStartEvent.canceled()) {\n this.dragging = false;\n } else {\n this.dragging = true;\n }\n }, 0);\n }\n\n /**\n * Drag over handler\n * @private\n * @param {Event} event - Drag over event\n */\n [onDragOver](event) {\n if (!this.dragging) {\n return;\n }\n\n const target = document.elementFromPoint(event.clientX, event.clientY);\n const container = this.currentContainer;\n\n const dragMoveEvent = new _SensorEvent.DragMoveSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container,\n originalEvent: event\n });\n\n this.trigger(container, dragMoveEvent);\n\n if (!dragMoveEvent.canceled()) {\n event.preventDefault();\n event.dataTransfer.dropEffect = this.options.type;\n }\n }\n\n /**\n * Drag end handler\n * @private\n * @param {Event} event - Drag end event\n */\n [onDragEnd](event) {\n if (!this.dragging) {\n return;\n }\n\n document.removeEventListener('mouseup', this[onMouseUp], true);\n\n const target = document.elementFromPoint(event.clientX, event.clientY);\n const container = this.currentContainer;\n\n const dragStopEvent = new _SensorEvent.DragStopSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container,\n originalEvent: event\n });\n\n this.trigger(container, dragStopEvent);\n\n this.dragging = false;\n\n this[reset]();\n }\n\n /**\n * Drop handler\n * @private\n * @param {Event} event - Drop event\n */\n [onDrop](event) {\n // eslint-disable-line class-methods-use-this\n event.preventDefault();\n }\n\n /**\n * Mouse down handler\n * @private\n * @param {Event} event - Mouse down event\n */\n [onMouseDown](event) {\n // Firefox bug for inputs within draggables https://bugzilla.mozilla.org/show_bug.cgi?id=739071\n if (event.target && (event.target.form || event.target.contenteditable)) {\n return;\n }\n\n const nativeDraggableElement = (0, _utils.closest)(event.target, element => element.draggable);\n\n if (nativeDraggableElement) {\n nativeDraggableElement.draggable = false;\n this.nativeDraggableElement = nativeDraggableElement;\n }\n\n document.addEventListener('mouseup', this[onMouseUp], true);\n document.addEventListener('dragstart', this[onDragStart], false);\n document.addEventListener('dragover', this[onDragOver], false);\n document.addEventListener('dragend', this[onDragEnd], false);\n document.addEventListener('drop', this[onDrop], false);\n\n const target = (0, _utils.closest)(event.target, this.options.draggable);\n\n if (!target) {\n return;\n }\n\n this.mouseDownTimeout = setTimeout(() => {\n target.draggable = true;\n this.draggableElement = target;\n }, this.options.delay);\n }\n\n /**\n * Mouse up handler\n * @private\n * @param {Event} event - Mouse up event\n */\n [onMouseUp]() {\n this[reset]();\n }\n\n /**\n * Mouse up handler\n * @private\n * @param {Event} event - Mouse up event\n */\n [reset]() {\n clearTimeout(this.mouseDownTimeout);\n\n document.removeEventListener('mouseup', this[onMouseUp], true);\n document.removeEventListener('dragstart', this[onDragStart], false);\n document.removeEventListener('dragover', this[onDragOver], false);\n document.removeEventListener('dragend', this[onDragEnd], false);\n document.removeEventListener('drop', this[onDrop], false);\n\n if (this.nativeDraggableElement) {\n this.nativeDraggableElement.draggable = true;\n this.nativeDraggableElement = null;\n }\n\n if (this.draggableElement) {\n this.draggableElement.draggable = false;\n this.draggableElement = null;\n }\n }\n}\nexports.default = DragSensor;\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _DragSensor = __webpack_require__(40);\n\nvar _DragSensor2 = _interopRequireDefault(_DragSensor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _DragSensor2.default;\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _utils = __webpack_require__(2);\n\nvar _Sensor = __webpack_require__(4);\n\nvar _Sensor2 = _interopRequireDefault(_Sensor);\n\nvar _SensorEvent = __webpack_require__(3);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onTouchStart = Symbol('onTouchStart');\nconst onTouchHold = Symbol('onTouchHold');\nconst onTouchEnd = Symbol('onTouchEnd');\nconst onTouchMove = Symbol('onTouchMove');\n\n/**\n * Prevents scrolling when set to true\n * @var {Boolean} preventScrolling\n */\nlet preventScrolling = false;\n\n// WebKit requires cancelable `touchmove` events to be added as early as possible\nwindow.addEventListener('touchmove', event => {\n if (!preventScrolling) {\n return;\n }\n\n // Prevent scrolling\n event.preventDefault();\n}, { passive: false });\n\n/**\n * This sensor picks up native browser touch events and dictates drag operations\n * @class TouchSensor\n * @module TouchSensor\n * @extends Sensor\n */\nclass TouchSensor extends _Sensor2.default {\n /**\n * TouchSensor constructor.\n * @constructs TouchSensor\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Containers\n * @param {Object} options - Options\n */\n constructor(containers = [], options = {}) {\n super(containers, options);\n\n /**\n * Closest scrollable container so accidental scroll can cancel long touch\n * @property currentScrollableParent\n * @type {HTMLElement}\n */\n this.currentScrollableParent = null;\n\n /**\n * TimeoutID for long touch\n * @property tapTimeout\n * @type {Number}\n */\n this.tapTimeout = null;\n\n /**\n * touchMoved indicates if touch has moved during tapTimeout\n * @property touchMoved\n * @type {Boolean}\n */\n this.touchMoved = false;\n\n this[onTouchStart] = this[onTouchStart].bind(this);\n this[onTouchHold] = this[onTouchHold].bind(this);\n this[onTouchEnd] = this[onTouchEnd].bind(this);\n this[onTouchMove] = this[onTouchMove].bind(this);\n }\n\n /**\n * Attaches sensors event listeners to the DOM\n */\n attach() {\n document.addEventListener('touchstart', this[onTouchStart]);\n }\n\n /**\n * Detaches sensors event listeners to the DOM\n */\n detach() {\n document.removeEventListener('touchstart', this[onTouchStart]);\n }\n\n /**\n * Touch start handler\n * @private\n * @param {Event} event - Touch start event\n */\n [onTouchStart](event) {\n const container = (0, _utils.closest)(event.target, this.containers);\n\n if (!container) {\n return;\n }\n\n document.addEventListener('touchmove', this[onTouchMove]);\n document.addEventListener('touchend', this[onTouchEnd]);\n document.addEventListener('touchcancel', this[onTouchEnd]);\n container.addEventListener('contextmenu', onContextMenu);\n\n this.currentContainer = container;\n this.tapTimeout = setTimeout(this[onTouchHold](event, container), this.options.delay);\n }\n\n /**\n * Touch hold handler\n * @private\n * @param {Event} event - Touch start event\n * @param {HTMLElement} container - Container element\n */\n [onTouchHold](event, container) {\n return () => {\n if (this.touchMoved) {\n return;\n }\n\n const touch = event.touches[0] || event.changedTouches[0];\n const target = event.target;\n\n const dragStartEvent = new _SensorEvent.DragStartSensorEvent({\n clientX: touch.pageX,\n clientY: touch.pageY,\n target,\n container,\n originalEvent: event\n });\n\n this.trigger(container, dragStartEvent);\n\n this.dragging = !dragStartEvent.canceled();\n preventScrolling = this.dragging;\n };\n }\n\n /**\n * Touch move handler\n * @private\n * @param {Event} event - Touch move event\n */\n [onTouchMove](event) {\n this.touchMoved = true;\n\n if (!this.dragging) {\n return;\n }\n\n const touch = event.touches[0] || event.changedTouches[0];\n const target = document.elementFromPoint(touch.pageX - window.scrollX, touch.pageY - window.scrollY);\n\n const dragMoveEvent = new _SensorEvent.DragMoveSensorEvent({\n clientX: touch.pageX,\n clientY: touch.pageY,\n target,\n container: this.currentContainer,\n originalEvent: event\n });\n\n this.trigger(this.currentContainer, dragMoveEvent);\n }\n\n /**\n * Touch end handler\n * @private\n * @param {Event} event - Touch end event\n */\n [onTouchEnd](event) {\n this.touchMoved = false;\n preventScrolling = false;\n\n document.removeEventListener('touchend', this[onTouchEnd]);\n document.removeEventListener('touchcancel', this[onTouchEnd]);\n document.removeEventListener('touchmove', this[onTouchMove]);\n\n if (this.currentContainer) {\n this.currentContainer.removeEventListener('contextmenu', onContextMenu);\n }\n\n clearTimeout(this.tapTimeout);\n\n if (!this.dragging) {\n return;\n }\n\n const touch = event.touches[0] || event.changedTouches[0];\n const target = document.elementFromPoint(touch.pageX - window.scrollX, touch.pageY - window.scrollY);\n\n event.preventDefault();\n\n const dragStopEvent = new _SensorEvent.DragStopSensorEvent({\n clientX: touch.pageX,\n clientY: touch.pageY,\n target,\n container: this.currentContainer,\n originalEvent: event\n });\n\n this.trigger(this.currentContainer, dragStopEvent);\n\n this.currentContainer = null;\n this.dragging = false;\n }\n}\n\nexports.default = TouchSensor;\nfunction onContextMenu(event) {\n event.preventDefault();\n event.stopPropagation();\n}\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _TouchSensor = __webpack_require__(42);\n\nvar _TouchSensor2 = _interopRequireDefault(_TouchSensor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _TouchSensor2.default;\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DragPressureSensorEvent = exports.DragStopSensorEvent = exports.DragMoveSensorEvent = exports.DragStartSensorEvent = exports.SensorEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base sensor event\n * @class SensorEvent\n * @module SensorEvent\n * @extends AbstractEvent\n */\nclass SensorEvent extends _AbstractEvent2.default {\n /**\n * Original browser event that triggered a sensor\n * @property originalEvent\n * @type {Event}\n * @readonly\n */\n get originalEvent() {\n return this.data.originalEvent;\n }\n\n /**\n * Normalized clientX for both touch and mouse events\n * @property clientX\n * @type {Number}\n * @readonly\n */\n get clientX() {\n return this.data.clientX;\n }\n\n /**\n * Normalized clientY for both touch and mouse events\n * @property clientY\n * @type {Number}\n * @readonly\n */\n get clientY() {\n return this.data.clientY;\n }\n\n /**\n * Normalized target for both touch and mouse events\n * Returns the element that is behind cursor or touch pointer\n * @property target\n * @type {HTMLElement}\n * @readonly\n */\n get target() {\n return this.data.target;\n }\n\n /**\n * Container that initiated the sensor\n * @property container\n * @type {HTMLElement}\n * @readonly\n */\n get container() {\n return this.data.container;\n }\n\n /**\n * Trackpad pressure\n * @property pressure\n * @type {Number}\n * @readonly\n */\n get pressure() {\n return this.data.pressure;\n }\n}\n\nexports.SensorEvent = SensorEvent; /**\n * Drag start sensor event\n * @class DragStartSensorEvent\n * @module DragStartSensorEvent\n * @extends SensorEvent\n */\n\nclass DragStartSensorEvent extends SensorEvent {}\n\nexports.DragStartSensorEvent = DragStartSensorEvent; /**\n * Drag move sensor event\n * @class DragMoveSensorEvent\n * @module DragMoveSensorEvent\n * @extends SensorEvent\n */\n\nDragStartSensorEvent.type = 'drag:start';\nclass DragMoveSensorEvent extends SensorEvent {}\n\nexports.DragMoveSensorEvent = DragMoveSensorEvent; /**\n * Drag stop sensor event\n * @class DragStopSensorEvent\n * @module DragStopSensorEvent\n * @extends SensorEvent\n */\n\nDragMoveSensorEvent.type = 'drag:move';\nclass DragStopSensorEvent extends SensorEvent {}\n\nexports.DragStopSensorEvent = DragStopSensorEvent; /**\n * Drag pressure sensor event\n * @class DragPressureSensorEvent\n * @module DragPressureSensorEvent\n * @extends SensorEvent\n */\n\nDragStopSensorEvent.type = 'drag:stop';\nclass DragPressureSensorEvent extends SensorEvent {}\nexports.DragPressureSensorEvent = DragPressureSensorEvent;\nDragPressureSensorEvent.type = 'drag:pressure';\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _utils = __webpack_require__(2);\n\nvar _Sensor = __webpack_require__(4);\n\nvar _Sensor2 = _interopRequireDefault(_Sensor);\n\nvar _SensorEvent = __webpack_require__(3);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onContextMenuWhileDragging = Symbol('onContextMenuWhileDragging');\nconst onMouseDown = Symbol('onMouseDown');\nconst onMouseMove = Symbol('onMouseMove');\nconst onMouseUp = Symbol('onMouseUp');\n\n/**\n * This sensor picks up native browser mouse events and dictates drag operations\n * @class MouseSensor\n * @module MouseSensor\n * @extends Sensor\n */\nclass MouseSensor extends _Sensor2.default {\n /**\n * MouseSensor constructor.\n * @constructs MouseSensor\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Containers\n * @param {Object} options - Options\n */\n constructor(containers = [], options = {}) {\n super(containers, options);\n\n /**\n * Indicates if mouse button is still down\n * @property mouseDown\n * @type {Boolean}\n */\n this.mouseDown = false;\n\n /**\n * Mouse down timer which will end up triggering the drag start operation\n * @property mouseDownTimeout\n * @type {Number}\n */\n this.mouseDownTimeout = null;\n\n /**\n * Indicates if context menu has been opened during drag operation\n * @property openedContextMenu\n * @type {Boolean}\n */\n this.openedContextMenu = false;\n\n this[onContextMenuWhileDragging] = this[onContextMenuWhileDragging].bind(this);\n this[onMouseDown] = this[onMouseDown].bind(this);\n this[onMouseMove] = this[onMouseMove].bind(this);\n this[onMouseUp] = this[onMouseUp].bind(this);\n }\n\n /**\n * Attaches sensors event listeners to the DOM\n */\n attach() {\n document.addEventListener('mousedown', this[onMouseDown], true);\n }\n\n /**\n * Detaches sensors event listeners to the DOM\n */\n detach() {\n document.removeEventListener('mousedown', this[onMouseDown], true);\n }\n\n /**\n * Mouse down handler\n * @private\n * @param {Event} event - Mouse down event\n */\n [onMouseDown](event) {\n if (event.button !== 0 || event.ctrlKey || event.metaKey) {\n return;\n }\n\n document.addEventListener('mouseup', this[onMouseUp]);\n\n const target = document.elementFromPoint(event.clientX, event.clientY);\n const container = (0, _utils.closest)(target, this.containers);\n\n if (!container) {\n return;\n }\n\n document.addEventListener('dragstart', preventNativeDragStart);\n\n this.mouseDown = true;\n\n clearTimeout(this.mouseDownTimeout);\n this.mouseDownTimeout = setTimeout(() => {\n if (!this.mouseDown) {\n return;\n }\n\n const dragStartEvent = new _SensorEvent.DragStartSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container,\n originalEvent: event\n });\n\n this.trigger(container, dragStartEvent);\n\n this.currentContainer = container;\n this.dragging = !dragStartEvent.canceled();\n\n if (this.dragging) {\n document.addEventListener('contextmenu', this[onContextMenuWhileDragging]);\n document.addEventListener('mousemove', this[onMouseMove]);\n }\n }, this.options.delay);\n }\n\n /**\n * Mouse move handler\n * @private\n * @param {Event} event - Mouse move event\n */\n [onMouseMove](event) {\n if (!this.dragging) {\n return;\n }\n\n const target = document.elementFromPoint(event.clientX, event.clientY);\n\n const dragMoveEvent = new _SensorEvent.DragMoveSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container: this.currentContainer,\n originalEvent: event\n });\n\n this.trigger(this.currentContainer, dragMoveEvent);\n }\n\n /**\n * Mouse up handler\n * @private\n * @param {Event} event - Mouse up event\n */\n [onMouseUp](event) {\n this.mouseDown = Boolean(this.openedContextMenu);\n\n if (this.openedContextMenu) {\n this.openedContextMenu = false;\n return;\n }\n\n document.removeEventListener('mouseup', this[onMouseUp]);\n document.removeEventListener('dragstart', preventNativeDragStart);\n\n if (!this.dragging) {\n return;\n }\n\n const target = document.elementFromPoint(event.clientX, event.clientY);\n\n const dragStopEvent = new _SensorEvent.DragStopSensorEvent({\n clientX: event.clientX,\n clientY: event.clientY,\n target,\n container: this.currentContainer,\n originalEvent: event\n });\n\n this.trigger(this.currentContainer, dragStopEvent);\n\n document.removeEventListener('contextmenu', this[onContextMenuWhileDragging]);\n document.removeEventListener('mousemove', this[onMouseMove]);\n\n this.currentContainer = null;\n this.dragging = false;\n }\n\n /**\n * Context menu handler\n * @private\n * @param {Event} event - Context menu event\n */\n [onContextMenuWhileDragging](event) {\n event.preventDefault();\n this.openedContextMenu = true;\n }\n}\n\nexports.default = MouseSensor;\nfunction preventNativeDragStart(event) {\n event.preventDefault();\n}\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _MouseSensor = __webpack_require__(45);\n\nvar _MouseSensor2 = _interopRequireDefault(_MouseSensor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _MouseSensor2.default;\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n/**\n * Base sensor class. Extend from this class to create a new or custom sensor\n * @class Sensor\n * @module Sensor\n */\nclass Sensor {\n /**\n * Sensor constructor.\n * @constructs Sensor\n * @param {HTMLElement[]|NodeList|HTMLElement} containers - Containers\n * @param {Object} options - Options\n */\n constructor(containers = [], options = {}) {\n /**\n * Current containers\n * @property containers\n * @type {HTMLElement[]}\n */\n this.containers = [...containers];\n\n /**\n * Current options\n * @property options\n * @type {Object}\n */\n this.options = _extends({}, options);\n\n /**\n * Current drag state\n * @property dragging\n * @type {Boolean}\n */\n this.dragging = false;\n\n /**\n * Current container\n * @property currentContainer\n * @type {HTMLElement}\n */\n this.currentContainer = null;\n }\n\n /**\n * Attaches sensors event listeners to the DOM\n * @return {Sensor}\n */\n attach() {\n return this;\n }\n\n /**\n * Detaches sensors event listeners to the DOM\n * @return {Sensor}\n */\n detach() {\n return this;\n }\n\n /**\n * Adds container to this sensor instance\n * @param {...HTMLElement} containers - Containers you want to add to this sensor\n * @example draggable.addContainer(document.body)\n */\n addContainer(...containers) {\n this.containers = [...this.containers, ...containers];\n }\n\n /**\n * Removes container from this sensor instance\n * @param {...HTMLElement} containers - Containers you want to remove from this sensor\n * @example draggable.removeContainer(document.body)\n */\n removeContainer(...containers) {\n this.containers = this.containers.filter(container => !containers.includes(container));\n }\n\n /**\n * Triggers event on target element\n * @param {HTMLElement} element - Element to trigger event on\n * @param {SensorEvent} sensorEvent - Sensor event to trigger\n */\n trigger(element, sensorEvent) {\n const event = document.createEvent('Event');\n event.detail = sensorEvent;\n event.initEvent(sensorEvent.type, true, true);\n element.dispatchEvent(event);\n this.lastEvent = sensorEvent;\n\n return sensorEvent;\n }\n}\nexports.default = Sensor;\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = requestNextAnimationFrame;\nfunction requestNextAnimationFrame(callback) {\n return requestAnimationFrame(() => {\n requestAnimationFrame(callback);\n });\n}\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _requestNextAnimationFrame = __webpack_require__(48);\n\nvar _requestNextAnimationFrame2 = _interopRequireDefault(_requestNextAnimationFrame);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _requestNextAnimationFrame2.default;\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = closest;\nconst matchFunction = Element.prototype.matches || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector;\n\n/**\n * Get the closest parent element of a given element that matches the given\n * selector string or matching function\n *\n * @param {Element} element The child element to find a parent of\n * @param {String|Function} selector The string or function to use to match\n * the parent element\n * @return {Element|null}\n */\nfunction closest(element, value) {\n if (!element) {\n return null;\n }\n\n const selector = value;\n const callback = value;\n const nodeList = value;\n const singleElement = value;\n\n const isSelector = Boolean(typeof value === 'string');\n const isFunction = Boolean(typeof value === 'function');\n const isNodeList = Boolean(value instanceof NodeList || value instanceof Array);\n const isElement = Boolean(value instanceof HTMLElement);\n\n function conditionFn(currentElement) {\n if (!currentElement) {\n return currentElement;\n } else if (isSelector) {\n return matchFunction.call(currentElement, selector);\n } else if (isNodeList) {\n return [...nodeList].includes(currentElement);\n } else if (isElement) {\n return singleElement === currentElement;\n } else if (isFunction) {\n return callback(currentElement);\n } else {\n return null;\n }\n }\n\n let current = element;\n\n do {\n current = current.correspondingUseElement || current.correspondingElement || current;\n\n if (conditionFn(current)) {\n return current;\n }\n\n current = current.parentNode;\n } while (current && current !== document.body && current !== document);\n\n return null;\n}\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _closest = __webpack_require__(50);\n\nvar _closest2 = _interopRequireDefault(_closest);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _closest2.default;\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = exports.scroll = exports.onDragStop = exports.onDragMove = exports.onDragStart = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nvar _utils = __webpack_require__(2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onDragStart = exports.onDragStart = Symbol('onDragStart');\nconst onDragMove = exports.onDragMove = Symbol('onDragMove');\nconst onDragStop = exports.onDragStop = Symbol('onDragStop');\nconst scroll = exports.scroll = Symbol('scroll');\n\n/**\n * Scrollable default options\n * @property {Object} defaultOptions\n * @property {Number} defaultOptions.speed\n * @property {Number} defaultOptions.sensitivity\n * @property {HTMLElement[]} defaultOptions.scrollableElements\n * @type {Object}\n */\nconst defaultOptions = exports.defaultOptions = {\n speed: 6,\n sensitivity: 50,\n scrollableElements: []\n};\n\n/**\n * Scrollable plugin which scrolls the closest scrollable parent\n * @class Scrollable\n * @module Scrollable\n * @extends AbstractPlugin\n */\nclass Scrollable extends _AbstractPlugin2.default {\n /**\n * Scrollable constructor.\n * @constructs Scrollable\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n super(draggable);\n\n /**\n * Scrollable options\n * @property {Object} options\n * @property {Number} options.speed\n * @property {Number} options.sensitivity\n * @property {HTMLElement[]} options.scrollableElements\n * @type {Object}\n */\n this.options = _extends({}, defaultOptions, this.getOptions());\n\n /**\n * Keeps current mouse position\n * @property {Object} currentMousePosition\n * @property {Number} currentMousePosition.clientX\n * @property {Number} currentMousePosition.clientY\n * @type {Object|null}\n */\n this.currentMousePosition = null;\n\n /**\n * Scroll animation frame\n * @property scrollAnimationFrame\n * @type {Number|null}\n */\n this.scrollAnimationFrame = null;\n\n /**\n * Closest scrollable element\n * @property scrollableElement\n * @type {HTMLElement|null}\n */\n this.scrollableElement = null;\n\n /**\n * Animation frame looking for the closest scrollable element\n * @property findScrollableElementFrame\n * @type {Number|null}\n */\n this.findScrollableElementFrame = null;\n\n this[onDragStart] = this[onDragStart].bind(this);\n this[onDragMove] = this[onDragMove].bind(this);\n this[onDragStop] = this[onDragStop].bind(this);\n this[scroll] = this[scroll].bind(this);\n }\n\n /**\n * Attaches plugins event listeners\n */\n attach() {\n this.draggable.on('drag:start', this[onDragStart]).on('drag:move', this[onDragMove]).on('drag:stop', this[onDragStop]);\n }\n\n /**\n * Detaches plugins event listeners\n */\n detach() {\n this.draggable.off('drag:start', this[onDragStart]).off('drag:move', this[onDragMove]).off('drag:stop', this[onDragStop]);\n }\n\n /**\n * Returns options passed through draggable\n * @return {Object}\n */\n getOptions() {\n return this.draggable.options.scrollable || {};\n }\n\n /**\n * Returns closest scrollable elements by element\n * @param {HTMLElement} target\n * @return {HTMLElement}\n */\n getScrollableElement(target) {\n if (this.hasDefinedScrollableElements()) {\n return (0, _utils.closest)(target, this.options.scrollableElements) || document.documentElement;\n } else {\n return closestScrollableElement(target);\n }\n }\n\n /**\n * Returns true if at least one scrollable element have been defined via options\n * @param {HTMLElement} target\n * @return {Boolean}\n */\n hasDefinedScrollableElements() {\n return Boolean(this.options.scrollableElements.length !== 0);\n }\n\n /**\n * Drag start handler. Finds closest scrollable parent in separate frame\n * @param {DragStartEvent} dragEvent\n * @private\n */\n [onDragStart](dragEvent) {\n this.findScrollableElementFrame = requestAnimationFrame(() => {\n this.scrollableElement = this.getScrollableElement(dragEvent.source);\n });\n }\n\n /**\n * Drag move handler. Remembers mouse position and initiates scrolling\n * @param {DragMoveEvent} dragEvent\n * @private\n */\n [onDragMove](dragEvent) {\n this.findScrollableElementFrame = requestAnimationFrame(() => {\n this.scrollableElement = this.getScrollableElement(dragEvent.sensorEvent.target);\n });\n\n if (!this.scrollableElement) {\n return;\n }\n\n const sensorEvent = dragEvent.sensorEvent;\n const scrollOffset = { x: 0, y: 0 };\n\n if ('ontouchstart' in window) {\n scrollOffset.y = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;\n scrollOffset.x = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;\n }\n\n this.currentMousePosition = {\n clientX: sensorEvent.clientX - scrollOffset.x,\n clientY: sensorEvent.clientY - scrollOffset.y\n };\n\n this.scrollAnimationFrame = requestAnimationFrame(this[scroll]);\n }\n\n /**\n * Drag stop handler. Cancels scroll animations and resets state\n * @private\n */\n [onDragStop]() {\n cancelAnimationFrame(this.scrollAnimationFrame);\n cancelAnimationFrame(this.findScrollableElementFrame);\n\n this.scrollableElement = null;\n this.scrollAnimationFrame = null;\n this.findScrollableElementFrame = null;\n this.currentMousePosition = null;\n }\n\n /**\n * Scroll function that does the heavylifting\n * @private\n */\n [scroll]() {\n if (!this.scrollableElement || !this.currentMousePosition) {\n return;\n }\n\n cancelAnimationFrame(this.scrollAnimationFrame);\n\n const { speed, sensitivity } = this.options;\n\n const rect = this.scrollableElement.getBoundingClientRect();\n const bottomCutOff = rect.bottom > window.innerHeight;\n const topCutOff = rect.top < 0;\n const cutOff = topCutOff || bottomCutOff;\n\n const documentScrollingElement = getDocumentScrollingElement();\n const scrollableElement = this.scrollableElement;\n const clientX = this.currentMousePosition.clientX;\n const clientY = this.currentMousePosition.clientY;\n\n if (scrollableElement !== document.body && scrollableElement !== document.documentElement && !cutOff) {\n const { offsetHeight, offsetWidth } = scrollableElement;\n\n if (rect.top + offsetHeight - clientY < sensitivity) {\n scrollableElement.scrollTop += speed;\n } else if (clientY - rect.top < sensitivity) {\n scrollableElement.scrollTop -= speed;\n }\n\n if (rect.left + offsetWidth - clientX < sensitivity) {\n scrollableElement.scrollLeft += speed;\n } else if (clientX - rect.left < sensitivity) {\n scrollableElement.scrollLeft -= speed;\n }\n } else {\n const { innerHeight, innerWidth } = window;\n\n if (clientY < sensitivity) {\n documentScrollingElement.scrollTop -= speed;\n } else if (innerHeight - clientY < sensitivity) {\n documentScrollingElement.scrollTop += speed;\n }\n\n if (clientX < sensitivity) {\n documentScrollingElement.scrollLeft -= speed;\n } else if (innerWidth - clientX < sensitivity) {\n documentScrollingElement.scrollLeft += speed;\n }\n }\n\n this.scrollAnimationFrame = requestAnimationFrame(this[scroll]);\n }\n}\n\nexports.default = Scrollable; /**\n * Returns true if the passed element has overflow\n * @param {HTMLElement} element\n * @return {Boolean}\n * @private\n */\n\nfunction hasOverflow(element) {\n const overflowRegex = /(auto|scroll)/;\n const computedStyles = getComputedStyle(element, null);\n\n const overflow = computedStyles.getPropertyValue('overflow') + computedStyles.getPropertyValue('overflow-y') + computedStyles.getPropertyValue('overflow-x');\n\n return overflowRegex.test(overflow);\n}\n\n/**\n * Returns true if the passed element is statically positioned\n * @param {HTMLElement} element\n * @return {Boolean}\n * @private\n */\nfunction isStaticallyPositioned(element) {\n const position = getComputedStyle(element).getPropertyValue('position');\n return position === 'static';\n}\n\n/**\n * Finds closest scrollable element\n * @param {HTMLElement} element\n * @return {HTMLElement}\n * @private\n */\nfunction closestScrollableElement(element) {\n if (!element) {\n return getDocumentScrollingElement();\n }\n\n const position = getComputedStyle(element).getPropertyValue('position');\n const excludeStaticParents = position === 'absolute';\n\n const scrollableElement = (0, _utils.closest)(element, parent => {\n if (excludeStaticParents && isStaticallyPositioned(parent)) {\n return false;\n }\n return hasOverflow(parent);\n });\n\n if (position === 'fixed' || !scrollableElement) {\n return getDocumentScrollingElement();\n } else {\n return scrollableElement;\n }\n}\n\n/**\n * Returns element that scrolls document\n * @return {HTMLElement}\n * @private\n */\nfunction getDocumentScrollingElement() {\n return document.scrollingElement || document.documentElement;\n}\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _Scrollable = __webpack_require__(52);\n\nvar _Scrollable2 = _interopRequireDefault(_Scrollable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Scrollable2.default;\nexports.defaultOptions = _Scrollable.defaultOptions;\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MirrorDestroyEvent = exports.MirrorMoveEvent = exports.MirrorAttachedEvent = exports.MirrorCreatedEvent = exports.MirrorCreateEvent = exports.MirrorEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base mirror event\n * @class MirrorEvent\n * @module MirrorEvent\n * @extends AbstractEvent\n */\nclass MirrorEvent extends _AbstractEvent2.default {\n /**\n * Draggables source element\n * @property source\n * @type {HTMLElement}\n * @readonly\n */\n get source() {\n return this.data.source;\n }\n\n /**\n * Draggables original source element\n * @property originalSource\n * @type {HTMLElement}\n * @readonly\n */\n get originalSource() {\n return this.data.originalSource;\n }\n\n /**\n * Draggables source container element\n * @property sourceContainer\n * @type {HTMLElement}\n * @readonly\n */\n get sourceContainer() {\n return this.data.sourceContainer;\n }\n\n /**\n * Sensor event\n * @property sensorEvent\n * @type {SensorEvent}\n * @readonly\n */\n get sensorEvent() {\n return this.data.sensorEvent;\n }\n\n /**\n * Drag event\n * @property dragEvent\n * @type {DragEvent}\n * @readonly\n */\n get dragEvent() {\n return this.data.dragEvent;\n }\n\n /**\n * Original event that triggered sensor event\n * @property originalEvent\n * @type {Event}\n * @readonly\n */\n get originalEvent() {\n if (this.sensorEvent) {\n return this.sensorEvent.originalEvent;\n }\n\n return null;\n }\n}\n\nexports.MirrorEvent = MirrorEvent; /**\n * Mirror create event\n * @class MirrorCreateEvent\n * @module MirrorCreateEvent\n * @extends MirrorEvent\n */\n\nclass MirrorCreateEvent extends MirrorEvent {}\n\nexports.MirrorCreateEvent = MirrorCreateEvent; /**\n * Mirror created event\n * @class MirrorCreatedEvent\n * @module MirrorCreatedEvent\n * @extends MirrorEvent\n */\n\nMirrorCreateEvent.type = 'mirror:create';\nclass MirrorCreatedEvent extends MirrorEvent {\n\n /**\n * Draggables mirror element\n * @property mirror\n * @type {HTMLElement}\n * @readonly\n */\n get mirror() {\n return this.data.mirror;\n }\n}\n\nexports.MirrorCreatedEvent = MirrorCreatedEvent; /**\n * Mirror attached event\n * @class MirrorAttachedEvent\n * @module MirrorAttachedEvent\n * @extends MirrorEvent\n */\n\nMirrorCreatedEvent.type = 'mirror:created';\nclass MirrorAttachedEvent extends MirrorEvent {\n\n /**\n * Draggables mirror element\n * @property mirror\n * @type {HTMLElement}\n * @readonly\n */\n get mirror() {\n return this.data.mirror;\n }\n}\n\nexports.MirrorAttachedEvent = MirrorAttachedEvent; /**\n * Mirror move event\n * @class MirrorMoveEvent\n * @module MirrorMoveEvent\n * @extends MirrorEvent\n */\n\nMirrorAttachedEvent.type = 'mirror:attached';\nclass MirrorMoveEvent extends MirrorEvent {\n\n /**\n * Draggables mirror element\n * @property mirror\n * @type {HTMLElement}\n * @readonly\n */\n get mirror() {\n return this.data.mirror;\n }\n}\n\nexports.MirrorMoveEvent = MirrorMoveEvent; /**\n * Mirror destroy event\n * @class MirrorDestroyEvent\n * @module MirrorDestroyEvent\n * @extends MirrorEvent\n */\n\nMirrorMoveEvent.type = 'mirror:move';\nMirrorMoveEvent.cancelable = true;\nclass MirrorDestroyEvent extends MirrorEvent {\n\n /**\n * Draggables mirror element\n * @property mirror\n * @type {HTMLElement}\n * @readonly\n */\n get mirror() {\n return this.data.mirror;\n }\n}\nexports.MirrorDestroyEvent = MirrorDestroyEvent;\nMirrorDestroyEvent.type = 'mirror:destroy';\nMirrorDestroyEvent.cancelable = true;\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _MirrorEvent = __webpack_require__(54);\n\nObject.keys(_MirrorEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _MirrorEvent[key];\n }\n });\n});\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = exports.getAppendableContainer = exports.onScroll = exports.onMirrorMove = exports.onMirrorCreated = exports.onDragStop = exports.onDragMove = exports.onDragStart = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nvar _MirrorEvent = __webpack_require__(55);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nconst onDragStart = exports.onDragStart = Symbol('onDragStart');\nconst onDragMove = exports.onDragMove = Symbol('onDragMove');\nconst onDragStop = exports.onDragStop = Symbol('onDragStop');\nconst onMirrorCreated = exports.onMirrorCreated = Symbol('onMirrorCreated');\nconst onMirrorMove = exports.onMirrorMove = Symbol('onMirrorMove');\nconst onScroll = exports.onScroll = Symbol('onScroll');\nconst getAppendableContainer = exports.getAppendableContainer = Symbol('getAppendableContainer');\n\n/**\n * Mirror default options\n * @property {Object} defaultOptions\n * @property {Boolean} defaultOptions.constrainDimensions\n * @property {Boolean} defaultOptions.xAxis\n * @property {Boolean} defaultOptions.yAxis\n * @property {null} defaultOptions.cursorOffsetX\n * @property {null} defaultOptions.cursorOffsetY\n * @type {Object}\n */\nconst defaultOptions = exports.defaultOptions = {\n constrainDimensions: false,\n xAxis: true,\n yAxis: true,\n cursorOffsetX: null,\n cursorOffsetY: null\n};\n\n/**\n * Mirror plugin which controls the mirror positioning while dragging\n * @class Mirror\n * @module Mirror\n * @extends AbstractPlugin\n */\nclass Mirror extends _AbstractPlugin2.default {\n /**\n * Mirror constructor.\n * @constructs Mirror\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n super(draggable);\n\n /**\n * Mirror options\n * @property {Object} options\n * @property {Boolean} options.constrainDimensions\n * @property {Boolean} options.xAxis\n * @property {Boolean} options.yAxis\n * @property {Number|null} options.cursorOffsetX\n * @property {Number|null} options.cursorOffsetY\n * @property {String|HTMLElement|Function} options.appendTo\n * @type {Object}\n */\n this.options = _extends({}, defaultOptions, this.getOptions());\n\n /**\n * Scroll offset for touch devices because the mirror is positioned fixed\n * @property {Object} scrollOffset\n * @property {Number} scrollOffset.x\n * @property {Number} scrollOffset.y\n */\n this.scrollOffset = { x: 0, y: 0 };\n\n /**\n * Initial scroll offset for touch devices because the mirror is positioned fixed\n * @property {Object} scrollOffset\n * @property {Number} scrollOffset.x\n * @property {Number} scrollOffset.y\n */\n this.initialScrollOffset = {\n x: window.scrollX,\n y: window.scrollY\n };\n\n this[onDragStart] = this[onDragStart].bind(this);\n this[onDragMove] = this[onDragMove].bind(this);\n this[onDragStop] = this[onDragStop].bind(this);\n this[onMirrorCreated] = this[onMirrorCreated].bind(this);\n this[onMirrorMove] = this[onMirrorMove].bind(this);\n this[onScroll] = this[onScroll].bind(this);\n }\n\n /**\n * Attaches plugins event listeners\n */\n attach() {\n this.draggable.on('drag:start', this[onDragStart]).on('drag:move', this[onDragMove]).on('drag:stop', this[onDragStop]).on('mirror:created', this[onMirrorCreated]).on('mirror:move', this[onMirrorMove]);\n }\n\n /**\n * Detaches plugins event listeners\n */\n detach() {\n this.draggable.off('drag:start', this[onDragStart]).off('drag:move', this[onDragMove]).off('drag:stop', this[onDragStop]).off('mirror:created', this[onMirrorCreated]).off('mirror:move', this[onMirrorMove]);\n }\n\n /**\n * Returns options passed through draggable\n * @return {Object}\n */\n getOptions() {\n return this.draggable.options.mirror || {};\n }\n\n [onDragStart](dragEvent) {\n if (dragEvent.canceled()) {\n return;\n }\n\n if ('ontouchstart' in window) {\n document.addEventListener('scroll', this[onScroll], true);\n }\n\n this.initialScrollOffset = {\n x: window.scrollX,\n y: window.scrollY\n };\n\n const { source, originalSource, sourceContainer, sensorEvent } = dragEvent;\n\n const mirrorCreateEvent = new _MirrorEvent.MirrorCreateEvent({\n source,\n originalSource,\n sourceContainer,\n sensorEvent,\n dragEvent\n });\n\n this.draggable.trigger(mirrorCreateEvent);\n\n if (isNativeDragEvent(sensorEvent) || mirrorCreateEvent.canceled()) {\n return;\n }\n\n const appendableContainer = this[getAppendableContainer](source) || sourceContainer;\n this.mirror = source.cloneNode(true);\n\n const mirrorCreatedEvent = new _MirrorEvent.MirrorCreatedEvent({\n source,\n originalSource,\n sourceContainer,\n sensorEvent,\n dragEvent,\n mirror: this.mirror\n });\n\n const mirrorAttachedEvent = new _MirrorEvent.MirrorAttachedEvent({\n source,\n originalSource,\n sourceContainer,\n sensorEvent,\n dragEvent,\n mirror: this.mirror\n });\n\n this.draggable.trigger(mirrorCreatedEvent);\n appendableContainer.appendChild(this.mirror);\n this.draggable.trigger(mirrorAttachedEvent);\n }\n\n [onDragMove](dragEvent) {\n if (!this.mirror || dragEvent.canceled()) {\n return;\n }\n\n const { source, originalSource, sourceContainer, sensorEvent } = dragEvent;\n\n const mirrorMoveEvent = new _MirrorEvent.MirrorMoveEvent({\n source,\n originalSource,\n sourceContainer,\n sensorEvent,\n dragEvent,\n mirror: this.mirror\n });\n\n this.draggable.trigger(mirrorMoveEvent);\n }\n\n [onDragStop](dragEvent) {\n if ('ontouchstart' in window) {\n document.removeEventListener('scroll', this[onScroll], true);\n }\n\n this.initialScrollOffset = { x: 0, y: 0 };\n this.scrollOffset = { x: 0, y: 0 };\n\n if (!this.mirror) {\n return;\n }\n\n const { source, sourceContainer, sensorEvent } = dragEvent;\n\n const mirrorDestroyEvent = new _MirrorEvent.MirrorDestroyEvent({\n source,\n mirror: this.mirror,\n sourceContainer,\n sensorEvent,\n dragEvent\n });\n\n this.draggable.trigger(mirrorDestroyEvent);\n\n if (!mirrorDestroyEvent.canceled()) {\n this.mirror.parentNode.removeChild(this.mirror);\n }\n }\n\n [onScroll]() {\n this.scrollOffset = {\n x: window.scrollX - this.initialScrollOffset.x,\n y: window.scrollY - this.initialScrollOffset.y\n };\n }\n\n /**\n * Mirror created handler\n * @param {MirrorCreatedEvent} mirrorEvent\n * @return {Promise}\n * @private\n */\n [onMirrorCreated]({ mirror, source, sensorEvent }) {\n const mirrorClass = this.draggable.getClassNameFor('mirror');\n\n const setState = (_ref) => {\n let { mirrorOffset, initialX, initialY } = _ref,\n args = _objectWithoutProperties(_ref, ['mirrorOffset', 'initialX', 'initialY']);\n\n this.mirrorOffset = mirrorOffset;\n this.initialX = initialX;\n this.initialY = initialY;\n return _extends({ mirrorOffset, initialX, initialY }, args);\n };\n\n const initialState = {\n mirror,\n source,\n sensorEvent,\n mirrorClass,\n scrollOffset: this.scrollOffset,\n options: this.options\n };\n\n return Promise.resolve(initialState)\n // Fix reflow here\n .then(computeMirrorDimensions).then(calculateMirrorOffset).then(resetMirror).then(addMirrorClasses).then(positionMirror({ initial: true })).then(removeMirrorID).then(setState);\n }\n\n /**\n * Mirror move handler\n * @param {MirrorMoveEvent} mirrorEvent\n * @return {Promise|null}\n * @private\n */\n [onMirrorMove](mirrorEvent) {\n if (mirrorEvent.canceled()) {\n return null;\n }\n\n const initialState = {\n mirror: mirrorEvent.mirror,\n sensorEvent: mirrorEvent.sensorEvent,\n mirrorOffset: this.mirrorOffset,\n options: this.options,\n initialX: this.initialX,\n initialY: this.initialY,\n scrollOffset: this.scrollOffset\n };\n\n return Promise.resolve(initialState).then(positionMirror({ raf: true }));\n }\n\n /**\n * Returns appendable container for mirror based on the appendTo option\n * @private\n * @param {Object} options\n * @param {HTMLElement} options.source - Current source\n * @return {HTMLElement}\n */\n [getAppendableContainer](source) {\n const appendTo = this.options.appendTo;\n\n if (typeof appendTo === 'string') {\n return document.querySelector(appendTo);\n } else if (appendTo instanceof HTMLElement) {\n return appendTo;\n } else if (typeof appendTo === 'function') {\n return appendTo(source);\n } else {\n return source.parentNode;\n }\n }\n}\n\nexports.default = Mirror; /**\n * Computes mirror dimensions based on the source element\n * Adds sourceRect to state\n * @param {Object} state\n * @param {HTMLElement} state.source\n * @return {Promise}\n * @private\n */\n\nfunction computeMirrorDimensions(_ref2) {\n let { source } = _ref2,\n args = _objectWithoutProperties(_ref2, ['source']);\n\n return withPromise(resolve => {\n const sourceRect = source.getBoundingClientRect();\n resolve(_extends({ source, sourceRect }, args));\n });\n}\n\n/**\n * Calculates mirror offset\n * Adds mirrorOffset to state\n * @param {Object} state\n * @param {SensorEvent} state.sensorEvent\n * @param {DOMRect} state.sourceRect\n * @return {Promise}\n * @private\n */\nfunction calculateMirrorOffset(_ref3) {\n let { sensorEvent, sourceRect, options } = _ref3,\n args = _objectWithoutProperties(_ref3, ['sensorEvent', 'sourceRect', 'options']);\n\n return withPromise(resolve => {\n const top = options.cursorOffsetY === null ? sensorEvent.clientY - sourceRect.top : options.cursorOffsetY;\n const left = options.cursorOffsetX === null ? sensorEvent.clientX - sourceRect.left : options.cursorOffsetX;\n\n const mirrorOffset = { top, left };\n\n resolve(_extends({ sensorEvent, sourceRect, mirrorOffset, options }, args));\n });\n}\n\n/**\n * Applys mirror styles\n * @param {Object} state\n * @param {HTMLElement} state.mirror\n * @param {HTMLElement} state.source\n * @param {Object} state.options\n * @return {Promise}\n * @private\n */\nfunction resetMirror(_ref4) {\n let { mirror, source, options } = _ref4,\n args = _objectWithoutProperties(_ref4, ['mirror', 'source', 'options']);\n\n return withPromise(resolve => {\n let offsetHeight;\n let offsetWidth;\n\n if (options.constrainDimensions) {\n const computedSourceStyles = getComputedStyle(source);\n offsetHeight = computedSourceStyles.getPropertyValue('height');\n offsetWidth = computedSourceStyles.getPropertyValue('width');\n }\n\n mirror.style.position = 'fixed';\n mirror.style.pointerEvents = 'none';\n mirror.style.top = 0;\n mirror.style.left = 0;\n mirror.style.margin = 0;\n\n if (options.constrainDimensions) {\n mirror.style.height = offsetHeight;\n mirror.style.width = offsetWidth;\n }\n\n resolve(_extends({ mirror, source, options }, args));\n });\n}\n\n/**\n * Applys mirror class on mirror element\n * @param {Object} state\n * @param {HTMLElement} state.mirror\n * @param {String} state.mirrorClass\n * @return {Promise}\n * @private\n */\nfunction addMirrorClasses(_ref5) {\n let { mirror, mirrorClass } = _ref5,\n args = _objectWithoutProperties(_ref5, ['mirror', 'mirrorClass']);\n\n return withPromise(resolve => {\n mirror.classList.add(mirrorClass);\n resolve(_extends({ mirror, mirrorClass }, args));\n });\n}\n\n/**\n * Removes source ID from cloned mirror element\n * @param {Object} state\n * @param {HTMLElement} state.mirror\n * @return {Promise}\n * @private\n */\nfunction removeMirrorID(_ref6) {\n let { mirror } = _ref6,\n args = _objectWithoutProperties(_ref6, ['mirror']);\n\n return withPromise(resolve => {\n mirror.removeAttribute('id');\n delete mirror.id;\n resolve(_extends({ mirror }, args));\n });\n}\n\n/**\n * Positions mirror with translate3d\n * @param {Object} state\n * @param {HTMLElement} state.mirror\n * @param {SensorEvent} state.sensorEvent\n * @param {Object} state.mirrorOffset\n * @param {Number} state.initialY\n * @param {Number} state.initialX\n * @param {Object} state.options\n * @return {Promise}\n * @private\n */\nfunction positionMirror({ withFrame = false, initial = false } = {}) {\n return (_ref7) => {\n let { mirror, sensorEvent, mirrorOffset, initialY, initialX, scrollOffset, options } = _ref7,\n args = _objectWithoutProperties(_ref7, ['mirror', 'sensorEvent', 'mirrorOffset', 'initialY', 'initialX', 'scrollOffset', 'options']);\n\n return withPromise(resolve => {\n const result = _extends({\n mirror,\n sensorEvent,\n mirrorOffset,\n options\n }, args);\n\n if (mirrorOffset) {\n const x = sensorEvent.clientX - mirrorOffset.left - scrollOffset.x;\n const y = sensorEvent.clientY - mirrorOffset.top - scrollOffset.y;\n\n if (options.xAxis && options.yAxis || initial) {\n mirror.style.transform = `translate3d(${x}px, ${y}px, 0)`;\n } else if (options.xAxis && !options.yAxis) {\n mirror.style.transform = `translate3d(${x}px, ${initialY}px, 0)`;\n } else if (options.yAxis && !options.xAxis) {\n mirror.style.transform = `translate3d(${initialX}px, ${y}px, 0)`;\n }\n\n if (initial) {\n result.initialX = x;\n result.initialY = y;\n }\n }\n\n resolve(result);\n }, { frame: withFrame });\n };\n}\n\n/**\n * Wraps functions in promise with potential animation frame option\n * @param {Function} callback\n * @param {Object} options\n * @param {Boolean} options.raf\n * @return {Promise}\n * @private\n */\nfunction withPromise(callback, { raf = false } = {}) {\n return new Promise((resolve, reject) => {\n if (raf) {\n requestAnimationFrame(() => {\n callback(resolve, reject);\n });\n } else {\n callback(resolve, reject);\n }\n });\n}\n\n/**\n * Returns true if the sensor event was triggered by a native browser drag event\n * @param {SensorEvent} sensorEvent\n */\nfunction isNativeDragEvent(sensorEvent) {\n return (/^drag/.test(sensorEvent.originalEvent.type)\n );\n}\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _Mirror = __webpack_require__(56);\n\nvar _Mirror2 = _interopRequireDefault(_Mirror);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Mirror2.default;\nexports.defaultOptions = _Mirror.defaultOptions;\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onInitialize = Symbol('onInitialize');\nconst onDestroy = Symbol('onDestroy');\n\n/**\n * Focusable default options\n * @property {Object} defaultOptions\n * @type {Object}\n */\nconst defaultOptions = {};\n\n/**\n * Focusable plugin\n * @class Focusable\n * @module Focusable\n * @extends AbstractPlugin\n */\nclass Focusable extends _AbstractPlugin2.default {\n /**\n * Focusable constructor.\n * @constructs Focusable\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n super(draggable);\n\n /**\n * Focusable options\n * @property {Object} options\n * @type {Object}\n */\n this.options = _extends({}, defaultOptions, this.getOptions());\n\n this[onInitialize] = this[onInitialize].bind(this);\n this[onDestroy] = this[onDestroy].bind(this);\n }\n\n /**\n * Attaches listeners to draggable\n */\n attach() {\n this.draggable.on('draggable:initialize', this[onInitialize]).on('draggable:destroy', this[onDestroy]);\n }\n\n /**\n * Detaches listeners from draggable\n */\n detach() {\n this.draggable.off('draggable:initialize', this[onInitialize]).off('draggable:destroy', this[onDestroy]);\n }\n\n /**\n * Returns options passed through draggable\n * @return {Object}\n */\n getOptions() {\n return this.draggable.options.focusable || {};\n }\n\n /**\n * Returns draggable containers and elements\n * @return {HTMLElement[]}\n */\n getElements() {\n return [...this.draggable.containers, ...this.draggable.getDraggableElements()];\n }\n\n /**\n * Intialize handler\n * @private\n */\n [onInitialize]() {\n // Can wait until the next best frame is available\n requestAnimationFrame(() => {\n this.getElements().forEach(element => decorateElement(element));\n });\n }\n\n /**\n * Destroy handler\n * @private\n */\n [onDestroy]() {\n // Can wait until the next best frame is available\n requestAnimationFrame(() => {\n this.getElements().forEach(element => stripElement(element));\n });\n }\n}\n\nexports.default = Focusable; /**\n * Keeps track of all the elements that are missing tabindex attributes\n * so they can be reset when draggable gets destroyed\n * @const {HTMLElement[]} elementsWithMissingTabIndex\n */\n\nconst elementsWithMissingTabIndex = [];\n\n/**\n * Decorates element with tabindex attributes\n * @param {HTMLElement} element\n * @return {Object}\n * @private\n */\nfunction decorateElement(element) {\n const hasMissingTabIndex = Boolean(!element.getAttribute('tabindex') && element.tabIndex === -1);\n\n if (hasMissingTabIndex) {\n elementsWithMissingTabIndex.push(element);\n element.tabIndex = 0;\n }\n}\n\n/**\n * Removes elements tabindex attributes\n * @param {HTMLElement} element\n * @private\n */\nfunction stripElement(element) {\n const tabIndexElementPosition = elementsWithMissingTabIndex.indexOf(element);\n\n if (tabIndexElementPosition !== -1) {\n element.tabIndex = -1;\n elementsWithMissingTabIndex.splice(tabIndexElementPosition, 1);\n }\n}\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Focusable = __webpack_require__(58);\n\nvar _Focusable2 = _interopRequireDefault(_Focusable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Focusable2.default;\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * All draggable plugins inherit from this class.\n * @abstract\n * @class AbstractPlugin\n * @module AbstractPlugin\n */\nclass AbstractPlugin {\n /**\n * AbstractPlugin constructor.\n * @constructs AbstractPlugin\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n /**\n * Draggable instance\n * @property draggable\n * @type {Draggable}\n */\n this.draggable = draggable;\n }\n\n /**\n * Override to add listeners\n * @abstract\n */\n attach() {\n throw new Error('Not Implemented');\n }\n\n /**\n * Override to remove listeners\n * @abstract\n */\n detach() {\n throw new Error('Not Implemented');\n }\n}\nexports.default = AbstractPlugin;\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst onInitialize = Symbol('onInitialize');\nconst onDestroy = Symbol('onDestroy');\nconst announceEvent = Symbol('announceEvent');\nconst announceMessage = Symbol('announceMessage');\n\nconst ARIA_RELEVANT = 'aria-relevant';\nconst ARIA_ATOMIC = 'aria-atomic';\nconst ARIA_LIVE = 'aria-live';\nconst ROLE = 'role';\n\n/**\n * Announcement default options\n * @property {Object} defaultOptions\n * @property {Number} defaultOptions.expire\n * @type {Object}\n */\nconst defaultOptions = exports.defaultOptions = {\n expire: 7000\n};\n\n/**\n * Announcement plugin\n * @class Announcement\n * @module Announcement\n * @extends AbstractPlugin\n */\nclass Announcement extends _AbstractPlugin2.default {\n /**\n * Announcement constructor.\n * @constructs Announcement\n * @param {Draggable} draggable - Draggable instance\n */\n constructor(draggable) {\n super(draggable);\n\n /**\n * Plugin options\n * @property options\n * @type {Object}\n */\n this.options = _extends({}, defaultOptions, this.getOptions());\n\n /**\n * Original draggable trigger method. Hack until we have onAll or on('all')\n * @property originalTriggerMethod\n * @type {Function}\n */\n this.originalTriggerMethod = this.draggable.trigger;\n\n this[onInitialize] = this[onInitialize].bind(this);\n this[onDestroy] = this[onDestroy].bind(this);\n }\n\n /**\n * Attaches listeners to draggable\n */\n attach() {\n this.draggable.on('draggable:initialize', this[onInitialize]);\n }\n\n /**\n * Detaches listeners from draggable\n */\n detach() {\n this.draggable.off('draggable:destroy', this[onDestroy]);\n }\n\n /**\n * Returns passed in options\n */\n getOptions() {\n return this.draggable.options.announcements || {};\n }\n\n /**\n * Announces event\n * @private\n * @param {AbstractEvent} event\n */\n [announceEvent](event) {\n const message = this.options[event.type];\n\n if (message && typeof message === 'string') {\n this[announceMessage](message);\n }\n\n if (message && typeof message === 'function') {\n this[announceMessage](message(event));\n }\n }\n\n /**\n * Announces message to screen reader\n * @private\n * @param {String} message\n */\n [announceMessage](message) {\n announce(message, { expire: this.options.expire });\n }\n\n /**\n * Initialize hander\n * @private\n */\n [onInitialize]() {\n // Hack until there is an api for listening for all events\n this.draggable.trigger = event => {\n try {\n this[announceEvent](event);\n } finally {\n // Ensure that original trigger is called\n this.originalTriggerMethod.call(this.draggable, event);\n }\n };\n }\n\n /**\n * Destroy hander\n * @private\n */\n [onDestroy]() {\n this.draggable.trigger = this.originalTriggerMethod;\n }\n}\n\nexports.default = Announcement; /**\n * @const {HTMLElement} liveRegion\n */\n\nconst liveRegion = createRegion();\n\n/**\n * Announces message via live region\n * @param {String} message\n * @param {Object} options\n * @param {Number} options.expire\n */\nfunction announce(message, { expire }) {\n const element = document.createElement('div');\n\n element.textContent = message;\n liveRegion.appendChild(element);\n\n return setTimeout(() => {\n liveRegion.removeChild(element);\n }, expire);\n}\n\n/**\n * Creates region element\n * @return {HTMLElement}\n */\nfunction createRegion() {\n const element = document.createElement('div');\n\n element.setAttribute('id', 'draggable-live-region');\n element.setAttribute(ARIA_RELEVANT, 'additions');\n element.setAttribute(ARIA_ATOMIC, 'true');\n element.setAttribute(ARIA_LIVE, 'assertive');\n element.setAttribute(ROLE, 'log');\n\n element.style.position = 'fixed';\n element.style.width = '1px';\n element.style.height = '1px';\n element.style.top = '-1px';\n element.style.overflow = 'hidden';\n\n return element;\n}\n\n// Append live region element as early as possible\ndocument.addEventListener('DOMContentLoaded', () => {\n document.body.appendChild(liveRegion);\n});\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultOptions = undefined;\n\nvar _Announcement = __webpack_require__(61);\n\nvar _Announcement2 = _interopRequireDefault(_Announcement);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Announcement2.default;\nexports.defaultOptions = _Announcement.defaultOptions;\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DraggableDestroyEvent = exports.DraggableInitializedEvent = exports.DraggableEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base draggable event\n * @class DraggableEvent\n * @module DraggableEvent\n * @extends AbstractEvent\n */\nclass DraggableEvent extends _AbstractEvent2.default {\n\n /**\n * Draggable instance\n * @property draggable\n * @type {Draggable}\n * @readonly\n */\n get draggable() {\n return this.data.draggable;\n }\n}\n\nexports.DraggableEvent = DraggableEvent; /**\n * Draggable initialized event\n * @class DraggableInitializedEvent\n * @module DraggableInitializedEvent\n * @extends DraggableEvent\n */\n\nDraggableEvent.type = 'draggable';\nclass DraggableInitializedEvent extends DraggableEvent {}\n\nexports.DraggableInitializedEvent = DraggableInitializedEvent; /**\n * Draggable destory event\n * @class DraggableInitializedEvent\n * @module DraggableDestroyEvent\n * @extends DraggableDestroyEvent\n */\n\nDraggableInitializedEvent.type = 'draggable:initialize';\nclass DraggableDestroyEvent extends DraggableEvent {}\nexports.DraggableDestroyEvent = DraggableDestroyEvent;\nDraggableDestroyEvent.type = 'draggable:destroy';\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nconst canceled = Symbol('canceled');\n\n/**\n * All events fired by draggable inherit this class. You can call `cancel()` to\n * cancel a specific event or you can check if an event has been canceled by\n * calling `canceled()`.\n * @abstract\n * @class AbstractEvent\n * @module AbstractEvent\n */\nclass AbstractEvent {\n\n /**\n * AbstractEvent constructor.\n * @constructs AbstractEvent\n * @param {object} data - Event data\n */\n\n /**\n * Event type\n * @static\n * @abstract\n * @property type\n * @type {String}\n */\n constructor(data) {\n this[canceled] = false;\n this.data = data;\n }\n\n /**\n * Read-only type\n * @abstract\n * @return {String}\n */\n\n\n /**\n * Event cancelable\n * @static\n * @abstract\n * @property cancelable\n * @type {Boolean}\n */\n get type() {\n return this.constructor.type;\n }\n\n /**\n * Read-only cancelable\n * @abstract\n * @return {Boolean}\n */\n get cancelable() {\n return this.constructor.cancelable;\n }\n\n /**\n * Cancels the event instance\n * @abstract\n */\n cancel() {\n this[canceled] = true;\n }\n\n /**\n * Check if event has been canceled\n * @abstract\n * @return {Boolean}\n */\n canceled() {\n return Boolean(this[canceled]);\n }\n\n /**\n * Returns new event instance with existing event data.\n * This method allows for overriding of event data.\n * @param {Object} data\n * @return {AbstractEvent}\n */\n clone(data) {\n return new this.constructor(_extends({}, this.data, data));\n }\n}\nexports.default = AbstractEvent;\nAbstractEvent.type = 'event';\nAbstractEvent.cancelable = false;\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DragStopEvent = exports.DragPressureEvent = exports.DragOutContainerEvent = exports.DragOverContainerEvent = exports.DragOutEvent = exports.DragOverEvent = exports.DragMoveEvent = exports.DragStartEvent = exports.DragEvent = undefined;\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Base drag event\n * @class DragEvent\n * @module DragEvent\n * @extends AbstractEvent\n */\nclass DragEvent extends _AbstractEvent2.default {\n\n /**\n * Draggables source element\n * @property source\n * @type {HTMLElement}\n * @readonly\n */\n get source() {\n return this.data.source;\n }\n\n /**\n * Draggables original source element\n * @property originalSource\n * @type {HTMLElement}\n * @readonly\n */\n get originalSource() {\n return this.data.originalSource;\n }\n\n /**\n * Draggables mirror element\n * @property mirror\n * @type {HTMLElement}\n * @readonly\n */\n get mirror() {\n return this.data.mirror;\n }\n\n /**\n * Draggables source container element\n * @property sourceContainer\n * @type {HTMLElement}\n * @readonly\n */\n get sourceContainer() {\n return this.data.sourceContainer;\n }\n\n /**\n * Sensor event\n * @property sensorEvent\n * @type {SensorEvent}\n * @readonly\n */\n get sensorEvent() {\n return this.data.sensorEvent;\n }\n\n /**\n * Original event that triggered sensor event\n * @property originalEvent\n * @type {Event}\n * @readonly\n */\n get originalEvent() {\n if (this.sensorEvent) {\n return this.sensorEvent.originalEvent;\n }\n\n return null;\n }\n}\n\nexports.DragEvent = DragEvent; /**\n * Drag start event\n * @class DragStartEvent\n * @module DragStartEvent\n * @extends DragEvent\n */\n\nDragEvent.type = 'drag';\nclass DragStartEvent extends DragEvent {}\n\nexports.DragStartEvent = DragStartEvent; /**\n * Drag move event\n * @class DragMoveEvent\n * @module DragMoveEvent\n * @extends DragEvent\n */\n\nDragStartEvent.type = 'drag:start';\nDragStartEvent.cancelable = true;\nclass DragMoveEvent extends DragEvent {}\n\nexports.DragMoveEvent = DragMoveEvent; /**\n * Drag over event\n * @class DragOverEvent\n * @module DragOverEvent\n * @extends DragEvent\n */\n\nDragMoveEvent.type = 'drag:move';\nclass DragOverEvent extends DragEvent {\n\n /**\n * Draggable container you are over\n * @property overContainer\n * @type {HTMLElement}\n * @readonly\n */\n get overContainer() {\n return this.data.overContainer;\n }\n\n /**\n * Draggable element you are over\n * @property over\n * @type {HTMLElement}\n * @readonly\n */\n get over() {\n return this.data.over;\n }\n}\n\nexports.DragOverEvent = DragOverEvent; /**\n * Drag out event\n * @class DragOutEvent\n * @module DragOutEvent\n * @extends DragEvent\n */\n\nDragOverEvent.type = 'drag:over';\nDragOverEvent.cancelable = true;\nclass DragOutEvent extends DragEvent {\n\n /**\n * Draggable container you are over\n * @property overContainer\n * @type {HTMLElement}\n * @readonly\n */\n get overContainer() {\n return this.data.overContainer;\n }\n\n /**\n * Draggable element you left\n * @property over\n * @type {HTMLElement}\n * @readonly\n */\n get over() {\n return this.data.over;\n }\n}\n\nexports.DragOutEvent = DragOutEvent; /**\n * Drag over container event\n * @class DragOverContainerEvent\n * @module DragOverContainerEvent\n * @extends DragEvent\n */\n\nDragOutEvent.type = 'drag:out';\nclass DragOverContainerEvent extends DragEvent {\n\n /**\n * Draggable container you are over\n * @property overContainer\n * @type {HTMLElement}\n * @readonly\n */\n get overContainer() {\n return this.data.overContainer;\n }\n}\n\nexports.DragOverContainerEvent = DragOverContainerEvent; /**\n * Drag out container event\n * @class DragOutContainerEvent\n * @module DragOutContainerEvent\n * @extends DragEvent\n */\n\nDragOverContainerEvent.type = 'drag:over:container';\nclass DragOutContainerEvent extends DragEvent {\n\n /**\n * Draggable container you left\n * @property overContainer\n * @type {HTMLElement}\n * @readonly\n */\n get overContainer() {\n return this.data.overContainer;\n }\n}\n\nexports.DragOutContainerEvent = DragOutContainerEvent; /**\n * Drag pressure event\n * @class DragPressureEvent\n * @module DragPressureEvent\n * @extends DragEvent\n */\n\nDragOutContainerEvent.type = 'drag:out:container';\nclass DragPressureEvent extends DragEvent {\n\n /**\n * Pressure applied on draggable element\n * @property pressure\n * @type {Number}\n * @readonly\n */\n get pressure() {\n return this.data.pressure;\n }\n}\n\nexports.DragPressureEvent = DragPressureEvent; /**\n * Drag stop event\n * @class DragStopEvent\n * @module DragStopEvent\n * @extends DragEvent\n */\n\nDragPressureEvent.type = 'drag:pressure';\nclass DragStopEvent extends DragEvent {}\nexports.DragStopEvent = DragStopEvent;\nDragStopEvent.type = 'drag:stop';\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Plugins = exports.Sensors = exports.Sortable = exports.Swappable = exports.Droppable = exports.Draggable = exports.BasePlugin = exports.BaseEvent = undefined;\n\nvar _Draggable = __webpack_require__(5);\n\nObject.defineProperty(exports, 'Draggable', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Draggable).default;\n }\n});\n\nvar _Droppable = __webpack_require__(34);\n\nObject.defineProperty(exports, 'Droppable', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Droppable).default;\n }\n});\n\nvar _Swappable = __webpack_require__(31);\n\nObject.defineProperty(exports, 'Swappable', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Swappable).default;\n }\n});\n\nvar _Sortable = __webpack_require__(28);\n\nObject.defineProperty(exports, 'Sortable', {\n enumerable: true,\n get: function () {\n return _interopRequireDefault(_Sortable).default;\n }\n});\n\nvar _AbstractEvent = __webpack_require__(0);\n\nvar _AbstractEvent2 = _interopRequireDefault(_AbstractEvent);\n\nvar _AbstractPlugin = __webpack_require__(1);\n\nvar _AbstractPlugin2 = _interopRequireDefault(_AbstractPlugin);\n\nvar _Sensors = __webpack_require__(6);\n\nvar Sensors = _interopRequireWildcard(_Sensors);\n\nvar _Plugins = __webpack_require__(25);\n\nvar Plugins = _interopRequireWildcard(_Plugins);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.BaseEvent = _AbstractEvent2.default;\nexports.BasePlugin = _AbstractPlugin2.default;\nexports.Sensors = Sensors;\nexports.Plugins = Plugins;\n\n/***/ })\n/******/ ]);\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 3099:\n/***/ (function(module) {\n\nmodule.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n\n\n/***/ }),\n\n/***/ 6077:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(111);\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n\n\n/***/ }),\n\n/***/ 1223:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(5112);\nvar create = __webpack_require__(30);\nvar definePropertyModule = __webpack_require__(3070);\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n\n\n/***/ }),\n\n/***/ 1530:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar charAt = __webpack_require__(8710).charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n\n\n/***/ }),\n\n/***/ 5787:\n/***/ (function(module) {\n\nmodule.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n\n\n/***/ }),\n\n/***/ 9670:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(111);\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n\n\n/***/ }),\n\n/***/ 4019:\n/***/ (function(module) {\n\nmodule.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n\n\n/***/ }),\n\n/***/ 260:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar NATIVE_ARRAY_BUFFER = __webpack_require__(4019);\nvar DESCRIPTORS = __webpack_require__(9781);\nvar global = __webpack_require__(7854);\nvar isObject = __webpack_require__(111);\nvar has = __webpack_require__(6656);\nvar classof = __webpack_require__(648);\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar redefine = __webpack_require__(1320);\nvar defineProperty = __webpack_require__(3070).f;\nvar getPrototypeOf = __webpack_require__(9518);\nvar setPrototypeOf = __webpack_require__(7674);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar uid = __webpack_require__(9711);\n\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar isPrototypeOf = ObjectPrototype.isPrototypeOf;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQIRED = false;\nvar NAME;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (setPrototypeOf) {\n if (isPrototypeOf.call(TypedArray, C)) return C;\n } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {\n return C;\n }\n } throw TypeError('Target is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {\n delete TypedArrayConstructor.prototype[KEY];\n }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n redefine(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {\n delete TypedArrayConstructor[KEY];\n }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n redefine(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQIRED = true;\n defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n } });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n\n\n/***/ }),\n\n/***/ 3331:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar global = __webpack_require__(7854);\nvar DESCRIPTORS = __webpack_require__(9781);\nvar NATIVE_ARRAY_BUFFER = __webpack_require__(4019);\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar redefineAll = __webpack_require__(2248);\nvar fails = __webpack_require__(7293);\nvar anInstance = __webpack_require__(5787);\nvar toInteger = __webpack_require__(9958);\nvar toLength = __webpack_require__(7466);\nvar toIndex = __webpack_require__(7067);\nvar IEEE754 = __webpack_require__(1179);\nvar getPrototypeOf = __webpack_require__(9518);\nvar setPrototypeOf = __webpack_require__(7674);\nvar getOwnPropertyNames = __webpack_require__(8006).f;\nvar defineProperty = __webpack_require__(3070).f;\nvar arrayFill = __webpack_require__(1285);\nvar setToStringTag = __webpack_require__(8003);\nvar InternalStateModule = __webpack_require__(9909);\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return NativeArrayBuffer.name != ARRAY_BUFFER;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var nativeSetInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n nativeSetInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n nativeSetInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n\n\n/***/ }),\n\n/***/ 1048:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar toObject = __webpack_require__(7908);\nvar toAbsoluteIndex = __webpack_require__(1400);\nvar toLength = __webpack_require__(7466);\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n\n\n/***/ }),\n\n/***/ 1285:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar toObject = __webpack_require__(7908);\nvar toAbsoluteIndex = __webpack_require__(1400);\nvar toLength = __webpack_require__(7466);\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n\n\n/***/ }),\n\n/***/ 8533:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $forEach = __webpack_require__(2092).forEach;\nvar arrayMethodIsStrict = __webpack_require__(9341);\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n\n\n/***/ }),\n\n/***/ 8457:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar bind = __webpack_require__(9974);\nvar toObject = __webpack_require__(7908);\nvar callWithSafeIterationClosing = __webpack_require__(3411);\nvar isArrayIteratorMethod = __webpack_require__(7659);\nvar toLength = __webpack_require__(7466);\nvar createProperty = __webpack_require__(6135);\nvar getIteratorMethod = __webpack_require__(1246);\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n\n\n/***/ }),\n\n/***/ 1318:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toIndexedObject = __webpack_require__(5656);\nvar toLength = __webpack_require__(7466);\nvar toAbsoluteIndex = __webpack_require__(1400);\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n\n\n/***/ }),\n\n/***/ 2092:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar bind = __webpack_require__(9974);\nvar IndexedObject = __webpack_require__(8361);\nvar toObject = __webpack_require__(7908);\nvar toLength = __webpack_require__(7466);\nvar arraySpeciesCreate = __webpack_require__(5417);\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_OUT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterOut\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterOut` method\n // https://github.com/tc39/proposal-array-filtering\n filterOut: createMethod(7)\n};\n\n\n/***/ }),\n\n/***/ 6583:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar toIndexedObject = __webpack_require__(5656);\nvar toInteger = __webpack_require__(9958);\nvar toLength = __webpack_require__(7466);\nvar arrayMethodIsStrict = __webpack_require__(9341);\n\nvar min = Math.min;\nvar nativeLastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : nativeLastIndexOf;\n\n\n/***/ }),\n\n/***/ 1194:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar fails = __webpack_require__(7293);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar V8_VERSION = __webpack_require__(7392);\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n\n\n/***/ }),\n\n/***/ 9341:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar fails = __webpack_require__(7293);\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n\n\n/***/ }),\n\n/***/ 3671:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar aFunction = __webpack_require__(3099);\nvar toObject = __webpack_require__(7908);\nvar IndexedObject = __webpack_require__(8361);\nvar toLength = __webpack_require__(7466);\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n\n\n/***/ }),\n\n/***/ 5417:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(111);\nvar isArray = __webpack_require__(3157);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n\n\n/***/ }),\n\n/***/ 3411:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(9670);\nvar iteratorClose = __webpack_require__(9212);\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n};\n\n\n/***/ }),\n\n/***/ 7072:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n\n\n/***/ }),\n\n/***/ 4326:\n/***/ (function(module) {\n\nvar toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n/***/ }),\n\n/***/ 648:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(1694);\nvar classofRaw = __webpack_require__(4326);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n\n\n/***/ }),\n\n/***/ 9920:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar has = __webpack_require__(6656);\nvar ownKeys = __webpack_require__(3887);\nvar getOwnPropertyDescriptorModule = __webpack_require__(1236);\nvar definePropertyModule = __webpack_require__(3070);\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n\n\n/***/ }),\n\n/***/ 8544:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar fails = __webpack_require__(7293);\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\n\n/***/ }),\n\n/***/ 4994:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar IteratorPrototype = __webpack_require__(3383).IteratorPrototype;\nvar create = __webpack_require__(30);\nvar createPropertyDescriptor = __webpack_require__(9114);\nvar setToStringTag = __webpack_require__(8003);\nvar Iterators = __webpack_require__(7497);\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n\n\n/***/ }),\n\n/***/ 8880:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(9781);\nvar definePropertyModule = __webpack_require__(3070);\nvar createPropertyDescriptor = __webpack_require__(9114);\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n/***/ }),\n\n/***/ 9114:\n/***/ (function(module) {\n\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n/***/ }),\n\n/***/ 6135:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar toPrimitive = __webpack_require__(7593);\nvar definePropertyModule = __webpack_require__(3070);\nvar createPropertyDescriptor = __webpack_require__(9114);\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n\n\n/***/ }),\n\n/***/ 654:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar createIteratorConstructor = __webpack_require__(4994);\nvar getPrototypeOf = __webpack_require__(9518);\nvar setPrototypeOf = __webpack_require__(7674);\nvar setToStringTag = __webpack_require__(8003);\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar redefine = __webpack_require__(1320);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar IS_PURE = __webpack_require__(1913);\nvar Iterators = __webpack_require__(7497);\nvar IteratorsCore = __webpack_require__(3383);\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n\n\n/***/ }),\n\n/***/ 9781:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar fails = __webpack_require__(7293);\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n\n\n/***/ }),\n\n/***/ 317:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar isObject = __webpack_require__(111);\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n\n\n/***/ }),\n\n/***/ 8324:\n/***/ (function(module) {\n\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n\n\n/***/ }),\n\n/***/ 8113:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar getBuiltIn = __webpack_require__(5005);\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n\n\n/***/ }),\n\n/***/ 7392:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar userAgent = __webpack_require__(8113);\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n\n\n/***/ }),\n\n/***/ 748:\n/***/ (function(module) {\n\n// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n\n\n/***/ }),\n\n/***/ 2109:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar getOwnPropertyDescriptor = __webpack_require__(1236).f;\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar redefine = __webpack_require__(1320);\nvar setGlobal = __webpack_require__(3505);\nvar copyConstructorProperties = __webpack_require__(9920);\nvar isForced = __webpack_require__(4705);\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n\n\n/***/ }),\n\n/***/ 7293:\n/***/ (function(module) {\n\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n\n\n/***/ }),\n\n/***/ 7007:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n// TODO: Remove from `core-js@4` since it's moved to entry points\n__webpack_require__(4916);\nvar redefine = __webpack_require__(1320);\nvar fails = __webpack_require__(7293);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar regexpExec = __webpack_require__(2261);\nvar createNonEnumerableProperty = __webpack_require__(8880);\n\nvar SPECIES = wellKnownSymbol('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\nvar REPLACE = wellKnownSymbol('replace');\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !(\n REPLACE_SUPPORTS_NAMED_GROUPS &&\n REPLACE_KEEPS_$0 &&\n !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n )) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }, {\n REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,\n REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n }\n\n if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);\n};\n\n\n/***/ }),\n\n/***/ 9974:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar aFunction = __webpack_require__(3099);\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n/***/ }),\n\n/***/ 5005:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar path = __webpack_require__(857);\nvar global = __webpack_require__(7854);\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n\n\n/***/ }),\n\n/***/ 1246:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar classof = __webpack_require__(648);\nvar Iterators = __webpack_require__(7497);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n/***/ }),\n\n/***/ 8554:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(9670);\nvar getIteratorMethod = __webpack_require__(1246);\n\nmodule.exports = function (it) {\n var iteratorMethod = getIteratorMethod(it);\n if (typeof iteratorMethod != 'function') {\n throw TypeError(String(it) + ' is not iterable');\n } return anObject(iteratorMethod.call(it));\n};\n\n\n/***/ }),\n\n/***/ 647:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toObject = __webpack_require__(7908);\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n\n\n/***/ }),\n\n/***/ 7854:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n /* global globalThis -- safe */\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n\n\n/***/ }),\n\n/***/ 6656:\n/***/ (function(module) {\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n\n\n/***/ }),\n\n/***/ 3501:\n/***/ (function(module) {\n\nmodule.exports = {};\n\n\n/***/ }),\n\n/***/ 490:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar getBuiltIn = __webpack_require__(5005);\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n\n\n/***/ }),\n\n/***/ 4664:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(9781);\nvar fails = __webpack_require__(7293);\nvar createElement = __webpack_require__(317);\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n\n\n/***/ }),\n\n/***/ 1179:\n/***/ (function(module) {\n\n// IEEE754 conversions based on https://github.com/feross/ieee754\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n\n\n/***/ }),\n\n/***/ 8361:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar fails = __webpack_require__(7293);\nvar classof = __webpack_require__(4326);\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n\n\n/***/ }),\n\n/***/ 9587:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(111);\nvar setPrototypeOf = __webpack_require__(7674);\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n\n\n/***/ }),\n\n/***/ 2788:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar store = __webpack_require__(5465);\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n\n\n/***/ }),\n\n/***/ 9909:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar NATIVE_WEAK_MAP = __webpack_require__(8536);\nvar global = __webpack_require__(7854);\nvar isObject = __webpack_require__(111);\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar objectHas = __webpack_require__(6656);\nvar shared = __webpack_require__(5465);\nvar sharedKey = __webpack_require__(6200);\nvar hiddenKeys = __webpack_require__(3501);\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n\n\n/***/ }),\n\n/***/ 7659:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(5112);\nvar Iterators = __webpack_require__(7497);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n\n\n/***/ }),\n\n/***/ 3157:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar classof = __webpack_require__(4326);\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n\n\n/***/ }),\n\n/***/ 4705:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar fails = __webpack_require__(7293);\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n\n\n/***/ }),\n\n/***/ 111:\n/***/ (function(module) {\n\nmodule.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n/***/ }),\n\n/***/ 1913:\n/***/ (function(module) {\n\nmodule.exports = false;\n\n\n/***/ }),\n\n/***/ 7850:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(111);\nvar classof = __webpack_require__(4326);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n\n\n/***/ }),\n\n/***/ 9212:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(9670);\n\nmodule.exports = function (iterator) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) {\n return anObject(returnMethod.call(iterator)).value;\n }\n};\n\n\n/***/ }),\n\n/***/ 3383:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar fails = __webpack_require__(7293);\nvar getPrototypeOf = __webpack_require__(9518);\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar has = __webpack_require__(6656);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar IS_PURE = __webpack_require__(1913);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\n\n/***/ }),\n\n/***/ 7497:\n/***/ (function(module) {\n\nmodule.exports = {};\n\n\n/***/ }),\n\n/***/ 133:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar fails = __webpack_require__(7293);\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n /* global Symbol -- required for testing */\n return !String(Symbol());\n});\n\n\n/***/ }),\n\n/***/ 590:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar fails = __webpack_require__(7293);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar IS_PURE = __webpack_require__(1913);\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://\u0442\u0435\u0441\u0442').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#\u0431').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n\n\n/***/ }),\n\n/***/ 8536:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar inspectSource = __webpack_require__(2788);\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n\n\n/***/ }),\n\n/***/ 1574:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar DESCRIPTORS = __webpack_require__(9781);\nvar fails = __webpack_require__(7293);\nvar objectKeys = __webpack_require__(1956);\nvar getOwnPropertySymbolsModule = __webpack_require__(5181);\nvar propertyIsEnumerableModule = __webpack_require__(5296);\nvar toObject = __webpack_require__(7908);\nvar IndexedObject = __webpack_require__(8361);\n\nvar nativeAssign = Object.assign;\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !nativeAssign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n /* global Symbol -- required for testing */\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : nativeAssign;\n\n\n/***/ }),\n\n/***/ 30:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(9670);\nvar defineProperties = __webpack_require__(6048);\nvar enumBugKeys = __webpack_require__(748);\nvar hiddenKeys = __webpack_require__(3501);\nvar html = __webpack_require__(490);\nvar documentCreateElement = __webpack_require__(317);\nvar sharedKey = __webpack_require__(6200);\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject -- old IE */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n\n\n/***/ }),\n\n/***/ 6048:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(9781);\nvar definePropertyModule = __webpack_require__(3070);\nvar anObject = __webpack_require__(9670);\nvar objectKeys = __webpack_require__(1956);\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n\n\n/***/ }),\n\n/***/ 3070:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(9781);\nvar IE8_DOM_DEFINE = __webpack_require__(4664);\nvar anObject = __webpack_require__(9670);\nvar toPrimitive = __webpack_require__(7593);\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n/***/ }),\n\n/***/ 1236:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(9781);\nvar propertyIsEnumerableModule = __webpack_require__(5296);\nvar createPropertyDescriptor = __webpack_require__(9114);\nvar toIndexedObject = __webpack_require__(5656);\nvar toPrimitive = __webpack_require__(7593);\nvar has = __webpack_require__(6656);\nvar IE8_DOM_DEFINE = __webpack_require__(4664);\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n\n\n/***/ }),\n\n/***/ 8006:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\nvar internalObjectKeys = __webpack_require__(6324);\nvar enumBugKeys = __webpack_require__(748);\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n\n\n/***/ }),\n\n/***/ 5181:\n/***/ (function(__unused_webpack_module, exports) {\n\nexports.f = Object.getOwnPropertySymbols;\n\n\n/***/ }),\n\n/***/ 9518:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar has = __webpack_require__(6656);\nvar toObject = __webpack_require__(7908);\nvar sharedKey = __webpack_require__(6200);\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n\n\n/***/ }),\n\n/***/ 6324:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar has = __webpack_require__(6656);\nvar toIndexedObject = __webpack_require__(5656);\nvar indexOf = __webpack_require__(1318).indexOf;\nvar hiddenKeys = __webpack_require__(3501);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n\n\n/***/ }),\n\n/***/ 1956:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar internalObjectKeys = __webpack_require__(6324);\nvar enumBugKeys = __webpack_require__(748);\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n\n\n/***/ }),\n\n/***/ 5296:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n\n\n/***/ }),\n\n/***/ 7674:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/* eslint-disable no-proto -- safe */\nvar anObject = __webpack_require__(9670);\nvar aPossiblePrototype = __webpack_require__(6077);\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n\n\n/***/ }),\n\n/***/ 288:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(1694);\nvar classof = __webpack_require__(648);\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n\n\n/***/ }),\n\n/***/ 3887:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar getBuiltIn = __webpack_require__(5005);\nvar getOwnPropertyNamesModule = __webpack_require__(8006);\nvar getOwnPropertySymbolsModule = __webpack_require__(5181);\nvar anObject = __webpack_require__(9670);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n\n\n/***/ }),\n\n/***/ 857:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\n\nmodule.exports = global;\n\n\n/***/ }),\n\n/***/ 2248:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar redefine = __webpack_require__(1320);\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n\n\n/***/ }),\n\n/***/ 1320:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar has = __webpack_require__(6656);\nvar setGlobal = __webpack_require__(3505);\nvar inspectSource = __webpack_require__(2788);\nvar InternalStateModule = __webpack_require__(9909);\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n\n\n/***/ }),\n\n/***/ 7651:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar classof = __webpack_require__(4326);\nvar regexpExec = __webpack_require__(2261);\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n\n\n/***/ }),\n\n/***/ 2261:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar regexpFlags = __webpack_require__(7066);\nvar stickyHelpers = __webpack_require__(2999);\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\n// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = String(str).slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n\n\n/***/ }),\n\n/***/ 7066:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar anObject = __webpack_require__(9670);\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n\n\n/***/ }),\n\n/***/ 2999:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar fails = __webpack_require__(7293);\n\n// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,\n// so we use an intermediate function.\nfunction RE(s, f) {\n return RegExp(s, f);\n}\n\nexports.UNSUPPORTED_Y = fails(function () {\n // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\n var re = RE('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = RE('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n\n\n/***/ }),\n\n/***/ 4488:\n/***/ (function(module) {\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/***/ }),\n\n/***/ 3505:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar createNonEnumerableProperty = __webpack_require__(8880);\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n\n\n/***/ }),\n\n/***/ 6340:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar getBuiltIn = __webpack_require__(5005);\nvar definePropertyModule = __webpack_require__(3070);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar DESCRIPTORS = __webpack_require__(9781);\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n\n\n/***/ }),\n\n/***/ 8003:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar defineProperty = __webpack_require__(3070).f;\nvar has = __webpack_require__(6656);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n\n\n/***/ }),\n\n/***/ 6200:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar shared = __webpack_require__(2309);\nvar uid = __webpack_require__(9711);\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n\n\n/***/ }),\n\n/***/ 5465:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar setGlobal = __webpack_require__(3505);\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n\n\n/***/ }),\n\n/***/ 2309:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar IS_PURE = __webpack_require__(1913);\nvar store = __webpack_require__(5465);\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.9.0',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '\u00A9 2021 Denis Pushkarev (zloirock.ru)'\n});\n\n\n/***/ }),\n\n/***/ 6707:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar anObject = __webpack_require__(9670);\nvar aFunction = __webpack_require__(3099);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n\n\n/***/ }),\n\n/***/ 8710:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(9958);\nvar requireObjectCoercible = __webpack_require__(4488);\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n\n\n/***/ }),\n\n/***/ 3197:\n/***/ (function(module) {\n\n\"use strict\";\n\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements -- TODO\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to , but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n\n\n/***/ }),\n\n/***/ 6091:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar fails = __webpack_require__(7293);\nvar whitespaces = __webpack_require__(1361);\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n\n\n/***/ }),\n\n/***/ 3111:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar requireObjectCoercible = __webpack_require__(4488);\nvar whitespaces = __webpack_require__(1361);\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n\n\n/***/ }),\n\n/***/ 1400:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(9958);\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n\n\n/***/ }),\n\n/***/ 7067:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(9958);\nvar toLength = __webpack_require__(7466);\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length or index');\n return length;\n};\n\n\n/***/ }),\n\n/***/ 5656:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = __webpack_require__(8361);\nvar requireObjectCoercible = __webpack_require__(4488);\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n\n\n/***/ }),\n\n/***/ 9958:\n/***/ (function(module) {\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n\n\n/***/ }),\n\n/***/ 7466:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(9958);\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n\n\n/***/ }),\n\n/***/ 7908:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar requireObjectCoercible = __webpack_require__(4488);\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n\n\n/***/ }),\n\n/***/ 4590:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toPositiveInteger = __webpack_require__(3002);\n\nmodule.exports = function (it, BYTES) {\n var offset = toPositiveInteger(it);\n if (offset % BYTES) throw RangeError('Wrong offset');\n return offset;\n};\n\n\n/***/ }),\n\n/***/ 3002:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toInteger = __webpack_require__(9958);\n\nmodule.exports = function (it) {\n var result = toInteger(it);\n if (result < 0) throw RangeError(\"The argument can't be less than 0\");\n return result;\n};\n\n\n/***/ }),\n\n/***/ 7593:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar isObject = __webpack_require__(111);\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n/***/ }),\n\n/***/ 1694:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n\n\n/***/ }),\n\n/***/ 9843:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar global = __webpack_require__(7854);\nvar DESCRIPTORS = __webpack_require__(9781);\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832);\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar ArrayBufferModule = __webpack_require__(3331);\nvar anInstance = __webpack_require__(5787);\nvar createPropertyDescriptor = __webpack_require__(9114);\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar toLength = __webpack_require__(7466);\nvar toIndex = __webpack_require__(7067);\nvar toOffset = __webpack_require__(4590);\nvar toPrimitive = __webpack_require__(7593);\nvar has = __webpack_require__(6656);\nvar classof = __webpack_require__(648);\nvar isObject = __webpack_require__(111);\nvar create = __webpack_require__(30);\nvar setPrototypeOf = __webpack_require__(7674);\nvar getOwnPropertyNames = __webpack_require__(8006).f;\nvar typedArrayFrom = __webpack_require__(7321);\nvar forEach = __webpack_require__(2092).forEach;\nvar setSpecies = __webpack_require__(6340);\nvar definePropertyModule = __webpack_require__(3070);\nvar getOwnPropertyDescriptorModule = __webpack_require__(1236);\nvar InternalStateModule = __webpack_require__(9909);\nvar inheritIfRequired = __webpack_require__(9587);\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n return isTypedArrayIndex(target, key = toPrimitive(key, true))\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n if (isTypedArrayIndex(target, key = toPrimitive(key, true))\n && isObject(descriptor)\n && has(descriptor, 'value')\n && !has(descriptor, 'get')\n && !has(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!has(descriptor, 'writable') || descriptor.writable)\n && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n\n\n/***/ }),\n\n/***/ 3832:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/* eslint-disable no-new -- required for testing */\nvar global = __webpack_require__(7854);\nvar fails = __webpack_require__(7293);\nvar checkCorrectnessOfIteration = __webpack_require__(7072);\nvar NATIVE_ARRAY_BUFFER_VIEWS = __webpack_require__(260).NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n\n\n/***/ }),\n\n/***/ 3074:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor;\nvar speciesConstructor = __webpack_require__(6707);\n\nmodule.exports = function (instance, list) {\n var C = speciesConstructor(instance, instance.constructor);\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\n\n/***/ }),\n\n/***/ 7321:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toObject = __webpack_require__(7908);\nvar toLength = __webpack_require__(7466);\nvar getIteratorMethod = __webpack_require__(1246);\nvar isArrayIteratorMethod = __webpack_require__(7659);\nvar bind = __webpack_require__(9974);\nvar aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor;\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, step, iterator, next;\n if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n O = [];\n while (!(step = next.call(iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2], 2);\n }\n length = toLength(O.length);\n result = new (aTypedArrayConstructor(this))(length);\n for (i = 0; length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n};\n\n\n/***/ }),\n\n/***/ 9711:\n/***/ (function(module) {\n\nvar id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n\n\n/***/ }),\n\n/***/ 3307:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar NATIVE_SYMBOL = __webpack_require__(133);\n\nmodule.exports = NATIVE_SYMBOL\n /* global Symbol -- safe */\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n\n\n/***/ }),\n\n/***/ 5112:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar shared = __webpack_require__(2309);\nvar has = __webpack_require__(6656);\nvar uid = __webpack_require__(9711);\nvar NATIVE_SYMBOL = __webpack_require__(133);\nvar USE_SYMBOL_AS_UID = __webpack_require__(3307);\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n\n\n/***/ }),\n\n/***/ 1361:\n/***/ (function(module) {\n\n// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\n\n/***/ }),\n\n/***/ 8264:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar global = __webpack_require__(7854);\nvar arrayBufferModule = __webpack_require__(3331);\nvar setSpecies = __webpack_require__(6340);\n\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\n\n// `ArrayBuffer` constructor\n// https://tc39.es/ecma262/#sec-arraybuffer-constructor\n$({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, {\n ArrayBuffer: ArrayBuffer\n});\n\nsetSpecies(ARRAY_BUFFER);\n\n\n/***/ }),\n\n/***/ 2222:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar fails = __webpack_require__(7293);\nvar isArray = __webpack_require__(3157);\nvar isObject = __webpack_require__(111);\nvar toObject = __webpack_require__(7908);\nvar toLength = __webpack_require__(7466);\nvar createProperty = __webpack_require__(6135);\nvar arraySpeciesCreate = __webpack_require__(5417);\nvar arrayMethodHasSpeciesSupport = __webpack_require__(1194);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar V8_VERSION = __webpack_require__(7392);\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n\n\n/***/ }),\n\n/***/ 7327:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar $filter = __webpack_require__(2092).filter;\nvar arrayMethodHasSpeciesSupport = __webpack_require__(1194);\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n/***/ }),\n\n/***/ 2772:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar $indexOf = __webpack_require__(1318).indexOf;\nvar arrayMethodIsStrict = __webpack_require__(9341);\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n/***/ }),\n\n/***/ 6992:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar toIndexedObject = __webpack_require__(5656);\nvar addToUnscopables = __webpack_require__(1223);\nvar Iterators = __webpack_require__(7497);\nvar InternalStateModule = __webpack_require__(9909);\nvar defineIterator = __webpack_require__(654);\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n/***/ }),\n\n/***/ 1249:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar $map = __webpack_require__(2092).map;\nvar arrayMethodHasSpeciesSupport = __webpack_require__(1194);\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n/***/ }),\n\n/***/ 7042:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar isObject = __webpack_require__(111);\nvar isArray = __webpack_require__(3157);\nvar toAbsoluteIndex = __webpack_require__(1400);\nvar toLength = __webpack_require__(7466);\nvar toIndexedObject = __webpack_require__(5656);\nvar createProperty = __webpack_require__(6135);\nvar wellKnownSymbol = __webpack_require__(5112);\nvar arrayMethodHasSpeciesSupport = __webpack_require__(1194);\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n\n\n/***/ }),\n\n/***/ 561:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar toAbsoluteIndex = __webpack_require__(1400);\nvar toInteger = __webpack_require__(9958);\nvar toLength = __webpack_require__(7466);\nvar toObject = __webpack_require__(7908);\nvar arraySpeciesCreate = __webpack_require__(5417);\nvar createProperty = __webpack_require__(6135);\nvar arrayMethodHasSpeciesSupport = __webpack_require__(1194);\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n\n\n/***/ }),\n\n/***/ 8309:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\nvar DESCRIPTORS = __webpack_require__(9781);\nvar defineProperty = __webpack_require__(3070).f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n\n\n/***/ }),\n\n/***/ 489:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\nvar $ = __webpack_require__(2109);\nvar fails = __webpack_require__(7293);\nvar toObject = __webpack_require__(7908);\nvar nativeGetPrototypeOf = __webpack_require__(9518);\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n\n\n/***/ }),\n\n/***/ 1539:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(1694);\nvar redefine = __webpack_require__(1320);\nvar toString = __webpack_require__(288);\n\n// `Object.prototype.toString` method\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n redefine(Object.prototype, 'toString', toString, { unsafe: true });\n}\n\n\n/***/ }),\n\n/***/ 4916:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar exec = __webpack_require__(2261);\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n\n\n/***/ }),\n\n/***/ 9714:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar redefine = __webpack_require__(1320);\nvar anObject = __webpack_require__(9670);\nvar fails = __webpack_require__(7293);\nvar flags = __webpack_require__(7066);\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = String(R.source);\n var rf = R.flags;\n var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n\n\n/***/ }),\n\n/***/ 8783:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar charAt = __webpack_require__(8710).charAt;\nvar InternalStateModule = __webpack_require__(9909);\nvar defineIterator = __webpack_require__(654);\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n\n\n/***/ }),\n\n/***/ 4723:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);\nvar anObject = __webpack_require__(9670);\nvar toLength = __webpack_require__(7466);\nvar requireObjectCoercible = __webpack_require__(4488);\nvar advanceStringIndex = __webpack_require__(1530);\nvar regExpExec = __webpack_require__(7651);\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n\n\n/***/ }),\n\n/***/ 5306:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);\nvar anObject = __webpack_require__(9670);\nvar toLength = __webpack_require__(7466);\nvar toInteger = __webpack_require__(9958);\nvar requireObjectCoercible = __webpack_require__(4488);\nvar advanceStringIndex = __webpack_require__(1530);\nvar getSubstitution = __webpack_require__(647);\nvar regExpExec = __webpack_require__(7651);\n\nvar max = Math.max;\nvar min = Math.min;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {\n var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;\n var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n if (\n (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||\n (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)\n ) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n }\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n});\n\n\n/***/ }),\n\n/***/ 3123:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);\nvar isRegExp = __webpack_require__(7850);\nvar anObject = __webpack_require__(9670);\nvar requireObjectCoercible = __webpack_require__(4488);\nvar speciesConstructor = __webpack_require__(6707);\nvar advanceStringIndex = __webpack_require__(1530);\nvar toLength = __webpack_require__(7466);\nvar callRegExpExec = __webpack_require__(7651);\nvar regexpExec = __webpack_require__(2261);\nvar fails = __webpack_require__(7293);\n\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SUPPORTS_Y);\n\n\n/***/ }),\n\n/***/ 3210:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar $ = __webpack_require__(2109);\nvar $trim = __webpack_require__(3111).trim;\nvar forcedStringTrimMethod = __webpack_require__(6091);\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n\n\n/***/ }),\n\n/***/ 2990:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $copyWithin = __webpack_require__(1048);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.copyWithin` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin\nexportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {\n return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 8927:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $every = __webpack_require__(2092).every;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.every` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every\nexportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {\n return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 3105:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $fill = __webpack_require__(1285);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n return $fill.apply(aTypedArray(this), arguments);\n});\n\n\n/***/ }),\n\n/***/ 5035:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $filter = __webpack_require__(2092).filter;\nvar fromSpeciesAndList = __webpack_require__(3074);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return fromSpeciesAndList(this, list);\n});\n\n\n/***/ }),\n\n/***/ 7174:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $findIndex = __webpack_require__(2092).findIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex\nexportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {\n return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 4345:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $find = __webpack_require__(2092).find;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.find` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find\nexportTypedArrayMethod('find', function find(predicate /* , thisArg */) {\n return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 2846:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $forEach = __webpack_require__(2092).forEach;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach\nexportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {\n $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 4731:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $includes = __webpack_require__(1318).includes;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.includes` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes\nexportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {\n return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 7209:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $indexOf = __webpack_require__(1318).indexOf;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof\nexportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {\n return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 6319:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar global = __webpack_require__(7854);\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar ArrayIterators = __webpack_require__(6992);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = ArrayIterators.values;\nvar arrayKeys = ArrayIterators.keys;\nvar arrayEntries = ArrayIterators.entries;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];\n\nvar CORRECT_ITER_NAME = !!nativeTypedArrayIterator\n && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);\n\nvar typedArrayValues = function values() {\n return arrayValues.call(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);\n\n\n/***/ }),\n\n/***/ 8867:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = [].join;\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('join', function join(separator) {\n return $join.apply(aTypedArray(this), arguments);\n});\n\n\n/***/ }),\n\n/***/ 7789:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $lastIndexOf = __webpack_require__(6583);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.lastIndexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {\n return $lastIndexOf.apply(aTypedArray(this), arguments);\n});\n\n\n/***/ }),\n\n/***/ 3739:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $map = __webpack_require__(2092).map;\nvar speciesConstructor = __webpack_require__(6707);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);\n });\n});\n\n\n/***/ }),\n\n/***/ 4483:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $reduceRight = __webpack_require__(3671).right;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduceRicht` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright\nexportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {\n return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 9368:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $reduce = __webpack_require__(3671).left;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce\nexportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {\n return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 2056:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n\n\n/***/ }),\n\n/***/ 3462:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar toLength = __webpack_require__(7466);\nvar toOffset = __webpack_require__(4590);\nvar toObject = __webpack_require__(7908);\nvar fails = __webpack_require__(7293);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n /* global Int8Array -- safe */\n new Int8Array(1).set({});\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, FORCED);\n\n\n/***/ }),\n\n/***/ 678:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar speciesConstructor = __webpack_require__(6707);\nvar fails = __webpack_require__(7293);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $slice = [].slice;\n\nvar FORCED = fails(function () {\n /* global Int8Array -- safe */\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = $slice.call(aTypedArray(this), start, end);\n var C = speciesConstructor(this, this.constructor);\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n\n\n/***/ }),\n\n/***/ 7462:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar $some = __webpack_require__(2092).some;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.some` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some\nexportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {\n return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n\n\n/***/ }),\n\n/***/ 3824:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $sort = [].sort;\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n return $sort.call(aTypedArray(this), comparefn);\n});\n\n\n/***/ }),\n\n/***/ 5021:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar toLength = __webpack_require__(7466);\nvar toAbsoluteIndex = __webpack_require__(1400);\nvar speciesConstructor = __webpack_require__(6707);\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.subarray` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray\nexportTypedArrayMethod('subarray', function subarray(begin, end) {\n var O = aTypedArray(this);\n var length = O.length;\n var beginIndex = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O.constructor))(\n O.buffer,\n O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)\n );\n});\n\n\n/***/ }),\n\n/***/ 2974:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar global = __webpack_require__(7854);\nvar ArrayBufferViewCore = __webpack_require__(260);\nvar fails = __webpack_require__(7293);\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\nvar $slice = [].slice;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);\n}, FORCED);\n\n\n/***/ }),\n\n/***/ 5016:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\nvar exportTypedArrayMethod = __webpack_require__(260).exportTypedArrayMethod;\nvar fails = __webpack_require__(7293);\nvar global = __webpack_require__(7854);\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return arrayJoin.call(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n\n\n/***/ }),\n\n/***/ 2472:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\nvar createTypedArrayConstructor = __webpack_require__(9843);\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n\n\n/***/ }),\n\n/***/ 4747:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar DOMIterables = __webpack_require__(8324);\nvar forEach = __webpack_require__(8533);\nvar createNonEnumerableProperty = __webpack_require__(8880);\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}\n\n\n/***/ }),\n\n/***/ 3948:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\nvar global = __webpack_require__(7854);\nvar DOMIterables = __webpack_require__(8324);\nvar ArrayIteratorMethods = __webpack_require__(6992);\nvar createNonEnumerableProperty = __webpack_require__(8880);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n}\n\n\n/***/ }),\n\n/***/ 1637:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n__webpack_require__(6992);\nvar $ = __webpack_require__(2109);\nvar getBuiltIn = __webpack_require__(5005);\nvar USE_NATIVE_URL = __webpack_require__(590);\nvar redefine = __webpack_require__(1320);\nvar redefineAll = __webpack_require__(2248);\nvar setToStringTag = __webpack_require__(8003);\nvar createIteratorConstructor = __webpack_require__(4994);\nvar InternalStateModule = __webpack_require__(9909);\nvar anInstance = __webpack_require__(5787);\nvar hasOwn = __webpack_require__(6656);\nvar bind = __webpack_require__(9974);\nvar classof = __webpack_require__(648);\nvar anObject = __webpack_require__(9670);\nvar isObject = __webpack_require__(111);\nvar create = __webpack_require__(30);\nvar createPropertyDescriptor = __webpack_require__(9114);\nvar getIterator = __webpack_require__(8554);\nvar getIteratorMethod = __webpack_require__(1246);\nvar wellKnownSymbol = __webpack_require__(5112);\n\nvar $fetch = getBuiltIn('fetch');\nvar Headers = getBuiltIn('Headers');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (typeof iteratorMethod === 'function') {\n iterator = iteratorMethod.call(init);\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = entryNext.call(entryIterator)).done ||\n (second = entryNext.call(entryIterator)).done ||\n !entryNext.call(entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: first.value + '', value: second.value + '' });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });\n } else {\n parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: name + '', value: value + '' });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = name + '';\n var val = value + '';\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` for correct work with polyfilled `URLSearchParams`\n// https://github.com/zloirock/core-js/issues/674\nif (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {\n $({ global: true, enumerable: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n var args = [input];\n var init, body, headers;\n if (arguments.length > 1) {\n init = arguments[1];\n if (isObject(init)) {\n body = init.body;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headers.has('content-type')) {\n headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n init = create(init, {\n body: createPropertyDescriptor(0, String(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n }\n args.push(init);\n } return $fetch.apply(this, args);\n }\n });\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n\n\n/***/ }),\n\n/***/ 285:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n__webpack_require__(8783);\nvar $ = __webpack_require__(2109);\nvar DESCRIPTORS = __webpack_require__(9781);\nvar USE_NATIVE_URL = __webpack_require__(590);\nvar global = __webpack_require__(7854);\nvar defineProperties = __webpack_require__(6048);\nvar redefine = __webpack_require__(1320);\nvar anInstance = __webpack_require__(5787);\nvar has = __webpack_require__(6656);\nvar assign = __webpack_require__(1574);\nvar arrayFrom = __webpack_require__(8457);\nvar codeAt = __webpack_require__(8710).codeAt;\nvar toASCII = __webpack_require__(3197);\nvar setToStringTag = __webpack_require__(8003);\nvar URLSearchParamsModule = __webpack_require__(1637);\nvar InternalStateModule = __webpack_require__(9909);\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\nvar ALPHANUMERIC = /[\\d+-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^(0x|0X)/;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n/* eslint-disable no-control-regex -- safe */\nvar FORBIDDEN_HOST_CODE_POINT = /[\\u0000\\t\\u000A\\u000D #%/:?@[\\\\]]/;\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\u0000\\t\\u000A\\u000D #/:?@[\\\\]]/;\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u001F ]+|[\\u0000-\\u001F ]+$/g;\nvar TAB_AND_NEW_LINE = /[\\t\\u000A\\u000D]/g;\n/* eslint-enable no-control-regex -- safe */\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var char = function () {\n return input.charAt(pointer);\n };\n\n if (char() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (char()) {\n if (pieceIndex == 8) return;\n if (char() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(char())) {\n value = value * 16 + parseInt(char(), 16);\n pointer++;\n length++;\n }\n if (char() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (char()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (char() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(char())) return;\n while (DIGIT.test(char())) {\n number = parseInt(char(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (char() == ':') {\n pointer++;\n if (!char()) return;\n } else if (char()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (char, set) {\n var code = codeAt(char, 0);\n return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, char, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n char = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (char && ALPHA.test(char)) {\n buffer += char.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {\n buffer += char.toLowerCase();\n } else if (char == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && char == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (char == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (char == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (char == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '/' || (char == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (char == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (char == '/' || char == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (char == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (char != '/' && char != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (char == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += char;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (char == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (char == '[') seenBracket = true;\n else if (char == ']') seenBracket = false;\n buffer += char;\n } break;\n\n case PORT:\n if (DIGIT.test(char)) {\n buffer += char;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (char == '/' || char == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (char == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (char == '/' || char == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (char == EOF || char == '/' || char == '\\\\' || char == '?' || char == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += char;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (char != '/' && char != '\\\\') continue;\n } else if (!stateOverride && char == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n state = PATH;\n if (char != '/') continue;\n } break;\n\n case PATH:\n if (\n char == EOF || char == '/' ||\n (char == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (char == '?' || char == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(char, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n if (char == \"'\" && isSpecial(url)) url.query += '%27';\n else if (char == '#') url.query += '%23';\n else url.query += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = String(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, String(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URL(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = String(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, String(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = String(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, pathname + '', PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = String(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = String(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/global */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.g = (function() {\n/******/ \t\t\tif (typeof globalThis === 'object') return globalThis;\n/******/ \t\t\ttry {\n/******/ \t\t\t\treturn this || new Function('return this')();\n/******/ \t\t\t} catch (e) {\n/******/ \t\t\t\tif (typeof window === 'object') return window;\n/******/ \t\t\t}\n/******/ \t\t})();\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t!function() {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__webpack_require__.r = function(exports) {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n// This entry need to be wrapped in an IIFE because it need to be in strict mode.\n!function() {\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Dropzone\": function() { return /* reexport */ Dropzone; },\n \"default\": function() { return /* binding */ dropzone_dist; }\n});\n\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js\nvar es_array_concat = __webpack_require__(2222);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js\nvar es_array_filter = __webpack_require__(7327);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js\nvar es_array_index_of = __webpack_require__(2772);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js\nvar es_array_iterator = __webpack_require__(6992);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js\nvar es_array_map = __webpack_require__(1249);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js\nvar es_array_slice = __webpack_require__(7042);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js\nvar es_array_splice = __webpack_require__(561);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.constructor.js\nvar es_array_buffer_constructor = __webpack_require__(8264);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js\nvar es_function_name = __webpack_require__(8309);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js\nvar es_object_get_prototype_of = __webpack_require__(489);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js\nvar es_object_to_string = __webpack_require__(1539);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js\nvar es_regexp_exec = __webpack_require__(4916);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js\nvar es_regexp_to_string = __webpack_require__(9714);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js\nvar es_string_iterator = __webpack_require__(8783);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js\nvar es_string_match = __webpack_require__(4723);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js\nvar es_string_replace = __webpack_require__(5306);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js\nvar es_string_split = __webpack_require__(3123);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js\nvar es_string_trim = __webpack_require__(3210);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js\nvar es_typed_array_uint8_array = __webpack_require__(2472);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js\nvar es_typed_array_copy_within = __webpack_require__(2990);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js\nvar es_typed_array_every = __webpack_require__(8927);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js\nvar es_typed_array_fill = __webpack_require__(3105);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js\nvar es_typed_array_filter = __webpack_require__(5035);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js\nvar es_typed_array_find = __webpack_require__(4345);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js\nvar es_typed_array_find_index = __webpack_require__(7174);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js\nvar es_typed_array_for_each = __webpack_require__(2846);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js\nvar es_typed_array_includes = __webpack_require__(4731);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js\nvar es_typed_array_index_of = __webpack_require__(7209);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js\nvar es_typed_array_iterator = __webpack_require__(6319);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js\nvar es_typed_array_join = __webpack_require__(8867);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js\nvar es_typed_array_last_index_of = __webpack_require__(7789);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js\nvar es_typed_array_map = __webpack_require__(3739);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js\nvar es_typed_array_reduce = __webpack_require__(9368);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js\nvar es_typed_array_reduce_right = __webpack_require__(4483);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js\nvar es_typed_array_reverse = __webpack_require__(2056);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js\nvar es_typed_array_set = __webpack_require__(3462);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js\nvar es_typed_array_slice = __webpack_require__(678);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js\nvar es_typed_array_some = __webpack_require__(7462);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js\nvar es_typed_array_sort = __webpack_require__(3824);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js\nvar es_typed_array_subarray = __webpack_require__(5021);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js\nvar es_typed_array_to_locale_string = __webpack_require__(2974);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js\nvar es_typed_array_to_string = __webpack_require__(5016);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js\nvar web_dom_collections_for_each = __webpack_require__(4747);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js\nvar web_dom_collections_iterator = __webpack_require__(3948);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js\nvar web_url = __webpack_require__(285);\n;// CONCATENATED MODULE: ./src/emitter.js\n\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// The Emitter class provides the ability to call `.on()` on Dropzone to listen\n// to events.\n// It is strongly based on component's emitter class, and I removed the\n// functionality because of the dependency hell with different frameworks.\nvar Emitter = /*#__PURE__*/function () {\n function Emitter() {\n _classCallCheck(this, Emitter);\n }\n\n _createClass(Emitter, [{\n key: \"on\",\n value: // Add an event listener for given event\n function on(event, fn) {\n this._callbacks = this._callbacks || {}; // Create namespace for this event\n\n if (!this._callbacks[event]) {\n this._callbacks[event] = [];\n }\n\n this._callbacks[event].push(fn);\n\n return this;\n }\n }, {\n key: \"emit\",\n value: function emit(event) {\n this._callbacks = this._callbacks || {};\n var callbacks = this._callbacks[event];\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (callbacks) {\n var _iterator = _createForOfIteratorHelper(callbacks, true),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var callback = _step.value;\n callback.apply(this, args);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n } // trigger a corresponding DOM event\n\n\n if (this.element) {\n this.element.dispatchEvent(this.makeEvent(\"dropzone:\" + event, {\n args: args\n }));\n }\n\n return this;\n }\n }, {\n key: \"makeEvent\",\n value: function makeEvent(eventName, detail) {\n var params = {\n bubbles: true,\n cancelable: true,\n detail: detail\n };\n\n if (typeof window.CustomEvent === \"function\") {\n return new CustomEvent(eventName, params);\n } else {\n // IE 11 support\n // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent\n var evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n } // Remove event listener for given event. If fn is not provided, all event\n // listeners for that event will be removed. If neither is provided, all\n // event listeners will be removed.\n\n }, {\n key: \"off\",\n value: function off(event, fn) {\n if (!this._callbacks || arguments.length === 0) {\n this._callbacks = {};\n return this;\n } // specific event\n\n\n var callbacks = this._callbacks[event];\n\n if (!callbacks) {\n return this;\n } // remove all handlers\n\n\n if (arguments.length === 1) {\n delete this._callbacks[event];\n return this;\n } // remove specific handler\n\n\n for (var i = 0; i < callbacks.length; i++) {\n var callback = callbacks[i];\n\n if (callback === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n\n return this;\n }\n }]);\n\n return Emitter;\n}();\n\n\n;// CONCATENATED MODULE: ./src/preview-template.html\n// Module\nvar code = \"
Check
Error
\";\n// Exports\n/* harmony default export */ var preview_template = (code);\n;// CONCATENATED MODULE: ./src/options.js\n\n\n\n\n\nfunction options_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = options_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction options_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return options_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return options_arrayLikeToArray(o, minLen); }\n\nfunction options_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n\n\nvar defaultOptions = {\n /**\n * Has to be specified on elements other than form (or when the form\n * doesn't have an `action` attribute). You can also\n * provide a function that will be called with `files` and\n * must return the url (since `v3.12.0`)\n */\n url: null,\n\n /**\n * Can be changed to `\"put\"` if necessary. You can also provide a function\n * that will be called with `files` and must return the method (since `v3.12.0`).\n */\n method: \"post\",\n\n /**\n * Will be set on the XHRequest.\n */\n withCredentials: false,\n\n /**\n * The timeout for the XHR requests in milliseconds (since `v4.4.0`).\n * If set to null or 0, no timeout is going to be set.\n */\n timeout: null,\n\n /**\n * How many file uploads to process in parallel (See the\n * Enqueuing file uploads documentation section for more info)\n */\n parallelUploads: 2,\n\n /**\n * Whether to send multiple files in one request. If\n * this it set to true, then the fallback file input element will\n * have the `multiple` attribute as well. This option will\n * also trigger additional events (like `processingmultiple`). See the events\n * documentation section for more information.\n */\n uploadMultiple: false,\n\n /**\n * Whether you want files to be uploaded in chunks to your server. This can't be\n * used in combination with `uploadMultiple`.\n *\n * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.\n */\n chunking: false,\n\n /**\n * If `chunking` is enabled, this defines whether **every** file should be chunked,\n * even if the file size is below chunkSize. This means, that the additional chunk\n * form data will be submitted and the `chunksUploaded` callback will be invoked.\n */\n forceChunking: false,\n\n /**\n * If `chunking` is `true`, then this defines the chunk size in bytes.\n */\n chunkSize: 2000000,\n\n /**\n * If `true`, the individual chunks of a file are being uploaded simultaneously.\n */\n parallelChunkUploads: false,\n\n /**\n * Whether a chunk should be retried if it fails.\n */\n retryChunks: false,\n\n /**\n * If `retryChunks` is true, how many times should it be retried.\n */\n retryChunksLimit: 3,\n\n /**\n * The maximum filesize (in bytes) that is allowed to be uploaded.\n */\n maxFilesize: 256,\n\n /**\n * The name of the file param that gets transferred.\n * **NOTE**: If you have the option `uploadMultiple` set to `true`, then\n * Dropzone will append `[]` to the name.\n */\n paramName: \"file\",\n\n /**\n * Whether thumbnails for images should be generated\n */\n createImageThumbnails: true,\n\n /**\n * In MB. When the filename exceeds this limit, the thumbnail will not be generated.\n */\n maxThumbnailFilesize: 10,\n\n /**\n * If `null`, the ratio of the image will be used to calculate it.\n */\n thumbnailWidth: 120,\n\n /**\n * The same as `thumbnailWidth`. If both are null, images will not be resized.\n */\n thumbnailHeight: 120,\n\n /**\n * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.\n * Can be either `contain` or `crop`.\n */\n thumbnailMethod: \"crop\",\n\n /**\n * If set, images will be resized to these dimensions before being **uploaded**.\n * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect\n * ratio of the file will be preserved.\n *\n * The `options.transformFile` function uses these options, so if the `transformFile` function\n * is overridden, these options don't do anything.\n */\n resizeWidth: null,\n\n /**\n * See `resizeWidth`.\n */\n resizeHeight: null,\n\n /**\n * The mime type of the resized image (before it gets uploaded to the server).\n * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.\n * See `resizeWidth` for more information.\n */\n resizeMimeType: null,\n\n /**\n * The quality of the resized images. See `resizeWidth`.\n */\n resizeQuality: 0.8,\n\n /**\n * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.\n * Can be either `contain` or `crop`.\n */\n resizeMethod: \"contain\",\n\n /**\n * The base that is used to calculate the **displayed** filesize. You can\n * change this to 1024 if you would rather display kibibytes, mebibytes,\n * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`\n * not `1 kilobyte`. You can change this to `1024` if you don't care about\n * validity.\n */\n filesizeBase: 1000,\n\n /**\n * If not `null` defines how many files this Dropzone handles. If it exceeds,\n * the event `maxfilesexceeded` will be called. The dropzone element gets the\n * class `dz-max-files-reached` accordingly so you can provide visual\n * feedback.\n */\n maxFiles: null,\n\n /**\n * An optional object to send additional headers to the server. Eg:\n * `{ \"My-Awesome-Header\": \"header value\" }`\n */\n headers: null,\n\n /**\n * If `true`, the dropzone element itself will be clickable, if `false`\n * nothing will be clickable.\n *\n * You can also pass an HTML element, a CSS selector (for multiple elements)\n * or an array of those. In that case, all of those elements will trigger an\n * upload when clicked.\n */\n clickable: true,\n\n /**\n * Whether hidden files in directories should be ignored.\n */\n ignoreHiddenFiles: true,\n\n /**\n * The default implementation of `accept` checks the file's mime type or\n * extension against this list. This is a comma separated list of mime\n * types or file extensions.\n *\n * Eg.: `image/*,application/pdf,.psd`\n *\n * If the Dropzone is `clickable` this option will also be used as\n * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n * parameter on the hidden file input as well.\n */\n acceptedFiles: null,\n\n /**\n * **Deprecated!**\n * Use acceptedFiles instead.\n */\n acceptedMimeTypes: null,\n\n /**\n * If false, files will be added to the queue but the queue will not be\n * processed automatically.\n * This can be useful if you need some additional user input before sending\n * files (or if you want want all files sent at once).\n * If you're ready to send the file simply call `myDropzone.processQueue()`.\n *\n * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation\n * section for more information.\n */\n autoProcessQueue: true,\n\n /**\n * If false, files added to the dropzone will not be queued by default.\n * You'll have to call `enqueueFile(file)` manually.\n */\n autoQueue: true,\n\n /**\n * If `true`, this will add a link to every file preview to remove or cancel (if\n * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`\n * and `dictRemoveFile` options are used for the wording.\n */\n addRemoveLinks: false,\n\n /**\n * Defines where to display the file previews \u2013 if `null` the\n * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS\n * selector. The element should have the `dropzone-previews` class so\n * the previews are displayed properly.\n */\n previewsContainer: null,\n\n /**\n * Set this to `true` if you don't want previews to be shown.\n */\n disablePreviews: false,\n\n /**\n * This is the element the hidden input field (which is used when clicking on the\n * dropzone to trigger file selection) will be appended to. This might\n * be important in case you use frameworks to switch the content of your page.\n *\n * Can be a selector string, or an element directly.\n */\n hiddenInputContainer: \"body\",\n\n /**\n * If null, no capture type will be specified\n * If camera, mobile devices will skip the file selection and choose camera\n * If microphone, mobile devices will skip the file selection and choose the microphone\n * If camcorder, mobile devices will skip the file selection and choose the camera in video mode\n * On apple devices multiple must be set to false. AcceptedFiles may need to\n * be set to an appropriate mime type (e.g. \"image/*\", \"audio/*\", or \"video/*\").\n */\n capture: null,\n\n /**\n * **Deprecated**. Use `renameFile` instead.\n */\n renameFilename: null,\n\n /**\n * A function that is invoked before the file is uploaded to the server and renames the file.\n * This function gets the `File` as argument and can use the `file.name`. The actual name of the\n * file that gets used during the upload can be accessed through `file.upload.filename`.\n */\n renameFile: null,\n\n /**\n * If `true` the fallback will be forced. This is very useful to test your server\n * implementations first and make sure that everything works as\n * expected without dropzone if you experience problems, and to test\n * how your fallbacks will look.\n */\n forceFallback: false,\n\n /**\n * The text used before any files are dropped.\n */\n dictDefaultMessage: \"Drop files here to upload\",\n\n /**\n * The text that replaces the default message text it the browser is not supported.\n */\n dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\n\n /**\n * The text that will be added before the fallback form.\n * If you provide a fallback element yourself, or if this option is `null` this will\n * be ignored.\n */\n dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\n\n /**\n * If the filesize is too big.\n * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.\n */\n dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\n\n /**\n * If the file doesn't match the file type.\n */\n dictInvalidFileType: \"You can't upload files of this type.\",\n\n /**\n * If the server response was invalid.\n * `{{statusCode}}` will be replaced with the servers status code.\n */\n dictResponseError: \"Server responded with {{statusCode}} code.\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used for the cancel upload link.\n */\n dictCancelUpload: \"Cancel upload\",\n\n /**\n * The text that is displayed if an upload was manually canceled\n */\n dictUploadCanceled: \"Upload canceled.\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.\n */\n dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used to remove a file.\n */\n dictRemoveFile: \"Remove file\",\n\n /**\n * If this is not null, then the user will be prompted before removing a file.\n */\n dictRemoveFileConfirmation: null,\n\n /**\n * Displayed if `maxFiles` is st and exceeded.\n * The string `{{maxFiles}}` will be replaced by the configuration value.\n */\n dictMaxFilesExceeded: \"You can not upload any more files.\",\n\n /**\n * Allows you to translate the different units. Starting with `tb` for terabytes and going down to\n * `b` for bytes.\n */\n dictFileSizeUnits: {\n tb: \"TB\",\n gb: \"GB\",\n mb: \"MB\",\n kb: \"KB\",\n b: \"b\"\n },\n\n /**\n * Called when dropzone initialized\n * You can add event listeners here\n */\n init: function init() {},\n\n /**\n * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`\n * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case\n * of a function, this needs to return a map.\n *\n * The default implementation does nothing for normal uploads, but adds relevant information for\n * chunked uploads.\n *\n * This is the same as adding hidden input fields in the form element.\n */\n params: function params(files, xhr, chunk) {\n if (chunk) {\n return {\n dzuuid: chunk.file.upload.uuid,\n dzchunkindex: chunk.index,\n dztotalfilesize: chunk.file.size,\n dzchunksize: this.options.chunkSize,\n dztotalchunkcount: chunk.file.upload.totalChunkCount,\n dzchunkbyteoffset: chunk.index * this.options.chunkSize\n };\n }\n },\n\n /**\n * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n * and a `done` function as parameters.\n *\n * If the done function is invoked without arguments, the file is \"accepted\" and will\n * be processed. If you pass an error message, the file is rejected, and the error\n * message will be displayed.\n * This function will not be called if the file is too big or doesn't match the mime types.\n */\n accept: function accept(file, done) {\n return done();\n },\n\n /**\n * The callback that will be invoked when all chunks have been uploaded for a file.\n * It gets the file for which the chunks have been uploaded as the first parameter,\n * and the `done` function as second. `done()` needs to be invoked when everything\n * needed to finish the upload process is done.\n */\n chunksUploaded: function chunksUploaded(file, done) {\n done();\n },\n\n /**\n * Gets called when the browser is not supported.\n * The default implementation shows the fallback input field and adds\n * a text.\n */\n fallback: function fallback() {\n // This code should pass in IE7... :(\n var messageElement;\n this.element.className = \"\".concat(this.element.className, \" dz-browser-not-supported\");\n\n var _iterator = options_createForOfIteratorHelper(this.element.getElementsByTagName(\"div\"), true),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var child = _step.value;\n\n if (/(^| )dz-message($| )/.test(child.className)) {\n messageElement = child;\n child.className = \"dz-message\"; // Removes the 'dz-default' class\n\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (!messageElement) {\n messageElement = Dropzone.createElement('
');\n this.element.appendChild(messageElement);\n }\n\n var span = messageElement.getElementsByTagName(\"span\")[0];\n\n if (span) {\n if (span.textContent != null) {\n span.textContent = this.options.dictFallbackMessage;\n } else if (span.innerText != null) {\n span.innerText = this.options.dictFallbackMessage;\n }\n }\n\n return this.element.appendChild(this.getFallbackForm());\n },\n\n /**\n * Gets called to calculate the thumbnail dimensions.\n *\n * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:\n *\n * - `srcWidth` & `srcHeight` (required)\n * - `trgWidth` & `trgHeight` (required)\n * - `srcX` & `srcY` (optional, default `0`)\n * - `trgX` & `trgY` (optional, default `0`)\n *\n * Those values are going to be used by `ctx.drawImage()`.\n */\n resize: function resize(file, width, height, resizeMethod) {\n var info = {\n srcX: 0,\n srcY: 0,\n srcWidth: file.width,\n srcHeight: file.height\n };\n var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified\n\n if (width == null && height == null) {\n width = info.srcWidth;\n height = info.srcHeight;\n } else if (width == null) {\n width = height * srcRatio;\n } else if (height == null) {\n height = width / srcRatio;\n } // Make sure images aren't upscaled\n\n\n width = Math.min(width, info.srcWidth);\n height = Math.min(height, info.srcHeight);\n var trgRatio = width / height;\n\n if (info.srcWidth > width || info.srcHeight > height) {\n // Image is bigger and needs rescaling\n if (resizeMethod === \"crop\") {\n if (srcRatio > trgRatio) {\n info.srcHeight = file.height;\n info.srcWidth = info.srcHeight * trgRatio;\n } else {\n info.srcWidth = file.width;\n info.srcHeight = info.srcWidth / trgRatio;\n }\n } else if (resizeMethod === \"contain\") {\n // Method 'contain'\n if (srcRatio > trgRatio) {\n height = width / srcRatio;\n } else {\n width = height * srcRatio;\n }\n } else {\n throw new Error(\"Unknown resizeMethod '\".concat(resizeMethod, \"'\"));\n }\n }\n\n info.srcX = (file.width - info.srcWidth) / 2;\n info.srcY = (file.height - info.srcHeight) / 2;\n info.trgWidth = width;\n info.trgHeight = height;\n return info;\n },\n\n /**\n * Can be used to transform the file (for example, resize an image if necessary).\n *\n * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes\n * images according to those dimensions.\n *\n * Gets the `file` as the first parameter, and a `done()` function as the second, that needs\n * to be invoked with the file when the transformation is done.\n */\n transformFile: function transformFile(file, done) {\n if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {\n return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);\n } else {\n return done(file);\n }\n },\n\n /**\n * A string that contains the template used for each dropped\n * file. Change it to fulfill your needs but make sure to properly\n * provide all elements.\n *\n * If you want to use an actual HTML element instead of providing a String\n * as a config option, you could create a div with the id `tpl`,\n * put the template inside it and provide the element like this:\n *\n * document\n * .querySelector('#tpl')\n * .innerHTML\n *\n */\n previewTemplate: preview_template,\n\n /*\n Those functions register themselves to the events on init and handle all\n the user interface specific stuff. Overwriting them won't break the upload\n but can break the way it's displayed.\n You can overwrite them if you don't like the default behavior. If you just\n want to add an additional event handler, register it on the dropzone object\n and don't overwrite those options.\n */\n // Those are self explanatory and simply concern the DragnDrop.\n drop: function drop(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragstart: function dragstart(e) {},\n dragend: function dragend(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragenter: function dragenter(e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragover: function dragover(e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragleave: function dragleave(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n paste: function paste(e) {},\n // Called whenever there are no files left in the dropzone anymore, and the\n // dropzone should be displayed as if in the initial state.\n reset: function reset() {\n return this.element.classList.remove(\"dz-started\");\n },\n // Called when a file is added to the queue\n // Receives `file`\n addedfile: function addedfile(file) {\n var _this = this;\n\n if (this.element === this.previewsContainer) {\n this.element.classList.add(\"dz-started\");\n }\n\n if (this.previewsContainer && !this.options.disablePreviews) {\n file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());\n file.previewTemplate = file.previewElement; // Backwards compatibility\n\n this.previewsContainer.appendChild(file.previewElement);\n\n var _iterator2 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-name]\"), true),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var node = _step2.value;\n node.textContent = file.name;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n var _iterator3 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-size]\"), true),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n node = _step3.value;\n node.innerHTML = this.filesize(file.size);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n if (this.options.addRemoveLinks) {\n file._removeLink = Dropzone.createElement(\"
\".concat(this.options.dictRemoveFile, \"\"));\n file.previewElement.appendChild(file._removeLink);\n }\n\n var removeFileEvent = function removeFileEvent(e) {\n e.preventDefault();\n e.stopPropagation();\n\n if (file.status === Dropzone.UPLOADING) {\n return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function () {\n return _this.removeFile(file);\n });\n } else {\n if (_this.options.dictRemoveFileConfirmation) {\n return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function () {\n return _this.removeFile(file);\n });\n } else {\n return _this.removeFile(file);\n }\n }\n };\n\n var _iterator4 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-remove]\"), true),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var removeLink = _step4.value;\n removeLink.addEventListener(\"click\", removeFileEvent);\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n },\n // Called whenever a file is removed.\n removedfile: function removedfile(file) {\n if (file.previewElement != null && file.previewElement.parentNode != null) {\n file.previewElement.parentNode.removeChild(file.previewElement);\n }\n\n return this._updateMaxFilesReachedClass();\n },\n // Called when a thumbnail has been generated\n // Receives `file` and `dataUrl`\n thumbnail: function thumbnail(file, dataUrl) {\n if (file.previewElement) {\n file.previewElement.classList.remove(\"dz-file-preview\");\n\n var _iterator5 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-thumbnail]\"), true),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var thumbnailElement = _step5.value;\n thumbnailElement.alt = file.name;\n thumbnailElement.src = dataUrl;\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n return setTimeout(function () {\n return file.previewElement.classList.add(\"dz-image-preview\");\n }, 1);\n }\n },\n // Called whenever an error occurs\n // Receives `file` and `message`\n error: function error(file, message) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n\n if (typeof message !== \"string\" && message.error) {\n message = message.error;\n }\n\n var _iterator6 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-errormessage]\"), true),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var node = _step6.value;\n node.textContent = message;\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n }\n },\n errormultiple: function errormultiple() {},\n // Called when a file gets processed. Since there is a cue, not all added\n // files are processed immediately.\n // Receives `file`\n processing: function processing(file) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-processing\");\n\n if (file._removeLink) {\n return file._removeLink.innerHTML = this.options.dictCancelUpload;\n }\n }\n },\n processingmultiple: function processingmultiple() {},\n // Called whenever the upload progress gets updated.\n // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.\n // To get the total number of bytes of the file, use `file.size`\n uploadprogress: function uploadprogress(file, progress, bytesSent) {\n if (file.previewElement) {\n var _iterator7 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\"), true),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var node = _step7.value;\n node.nodeName === \"PROGRESS\" ? node.value = progress : node.style.width = \"\".concat(progress, \"%\");\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n }\n },\n // Called whenever the total upload progress gets updated.\n // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent\n totaluploadprogress: function totaluploadprogress() {},\n // Called just before the file is sent. Gets the `xhr` object as second\n // parameter, so you can modify it (for example to add a CSRF token) and a\n // `formData` object to add additional information.\n sending: function sending() {},\n sendingmultiple: function sendingmultiple() {},\n // When the complete upload is finished and successful\n // Receives `file`\n success: function success(file) {\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-success\");\n }\n },\n successmultiple: function successmultiple() {},\n // When the upload is canceled.\n canceled: function canceled(file) {\n return this.emit(\"error\", file, this.options.dictUploadCanceled);\n },\n canceledmultiple: function canceledmultiple() {},\n // When the upload is finished, either with success or an error.\n // Receives `file`\n complete: function complete(file) {\n if (file._removeLink) {\n file._removeLink.innerHTML = this.options.dictRemoveFile;\n }\n\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-complete\");\n }\n },\n completemultiple: function completemultiple() {},\n maxfilesexceeded: function maxfilesexceeded() {},\n maxfilesreached: function maxfilesreached() {},\n queuecomplete: function queuecomplete() {},\n addedfiles: function addedfiles() {}\n};\n/* harmony default export */ var src_options = (defaultOptions);\n;// CONCATENATED MODULE: ./src/dropzone.js\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction dropzone_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = dropzone_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction dropzone_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return dropzone_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return dropzone_arrayLikeToArray(o, minLen); }\n\nfunction dropzone_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction dropzone_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction dropzone_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction dropzone_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropzone_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropzone_defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar Dropzone = /*#__PURE__*/function (_Emitter) {\n _inherits(Dropzone, _Emitter);\n\n var _super = _createSuper(Dropzone);\n\n function Dropzone(el, options) {\n var _this;\n\n dropzone_classCallCheck(this, Dropzone);\n\n _this = _super.call(this);\n var fallback, left;\n _this.element = el; // For backwards compatibility since the version was in the prototype previously\n\n _this.version = Dropzone.version;\n _this.clickableElements = [];\n _this.listeners = [];\n _this.files = []; // All files\n\n if (typeof _this.element === \"string\") {\n _this.element = document.querySelector(_this.element);\n } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.\n\n\n if (!_this.element || _this.element.nodeType == null) {\n throw new Error(\"Invalid dropzone element.\");\n }\n\n if (_this.element.dropzone) {\n throw new Error(\"Dropzone already attached.\");\n } // Now add this dropzone to the instances.\n\n\n Dropzone.instances.push(_assertThisInitialized(_this)); // Put the dropzone inside the element itself.\n\n _this.element.dropzone = _assertThisInitialized(_this);\n var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {};\n _this.options = Dropzone.extend({}, src_options, elementOptions, options != null ? options : {});\n _this.options.previewTemplate = _this.options.previewTemplate.replace(/\\n*/g, \"\"); // If the browser failed, just call the fallback and leave\n\n if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) {\n return _possibleConstructorReturn(_this, _this.options.fallback.call(_assertThisInitialized(_this)));\n } // @options.url = @element.getAttribute \"action\" unless @options.url?\n\n\n if (_this.options.url == null) {\n _this.options.url = _this.element.getAttribute(\"action\");\n }\n\n if (!_this.options.url) {\n throw new Error(\"No URL provided.\");\n }\n\n if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) {\n throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\n }\n\n if (_this.options.uploadMultiple && _this.options.chunking) {\n throw new Error(\"You cannot set both: uploadMultiple and chunking.\");\n } // Backwards compatibility\n\n\n if (_this.options.acceptedMimeTypes) {\n _this.options.acceptedFiles = _this.options.acceptedMimeTypes;\n delete _this.options.acceptedMimeTypes;\n } // Backwards compatibility\n\n\n if (_this.options.renameFilename != null) {\n _this.options.renameFile = function (file) {\n return _this.options.renameFilename.call(_assertThisInitialized(_this), file.name, file);\n };\n }\n\n if (typeof _this.options.method === \"string\") {\n _this.options.method = _this.options.method.toUpperCase();\n }\n\n if ((fallback = _this.getExistingFallback()) && fallback.parentNode) {\n // Remove the fallback\n fallback.parentNode.removeChild(fallback);\n } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false\n\n\n if (_this.options.previewsContainer !== false) {\n if (_this.options.previewsContainer) {\n _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, \"previewsContainer\");\n } else {\n _this.previewsContainer = _this.element;\n }\n }\n\n if (_this.options.clickable) {\n if (_this.options.clickable === true) {\n _this.clickableElements = [_this.element];\n } else {\n _this.clickableElements = Dropzone.getElements(_this.options.clickable, \"clickable\");\n }\n }\n\n _this.init();\n\n return _this;\n } // Returns all files that have been accepted\n\n\n dropzone_createClass(Dropzone, [{\n key: \"getAcceptedFiles\",\n value: function getAcceptedFiles() {\n return this.files.filter(function (file) {\n return file.accepted;\n }).map(function (file) {\n return file;\n });\n } // Returns all files that have been rejected\n // Not sure when that's going to be useful, but added for completeness.\n\n }, {\n key: \"getRejectedFiles\",\n value: function getRejectedFiles() {\n return this.files.filter(function (file) {\n return !file.accepted;\n }).map(function (file) {\n return file;\n });\n }\n }, {\n key: \"getFilesWithStatus\",\n value: function getFilesWithStatus(status) {\n return this.files.filter(function (file) {\n return file.status === status;\n }).map(function (file) {\n return file;\n });\n } // Returns all files that are in the queue\n\n }, {\n key: \"getQueuedFiles\",\n value: function getQueuedFiles() {\n return this.getFilesWithStatus(Dropzone.QUEUED);\n }\n }, {\n key: \"getUploadingFiles\",\n value: function getUploadingFiles() {\n return this.getFilesWithStatus(Dropzone.UPLOADING);\n }\n }, {\n key: \"getAddedFiles\",\n value: function getAddedFiles() {\n return this.getFilesWithStatus(Dropzone.ADDED);\n } // Files that are either queued or uploading\n\n }, {\n key: \"getActiveFiles\",\n value: function getActiveFiles() {\n return this.files.filter(function (file) {\n return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED;\n }).map(function (file) {\n return file;\n });\n } // The function that gets called when Dropzone is initialized. You\n // can (and should) setup event listeners inside this function.\n\n }, {\n key: \"init\",\n value: function init() {\n var _this2 = this;\n\n // In case it isn't set already\n if (this.element.tagName === \"form\") {\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n }\n\n if (this.element.classList.contains(\"dropzone\") && !this.element.querySelector(\".dz-message\")) {\n this.element.appendChild(Dropzone.createElement(\"
\")));\n }\n\n if (this.clickableElements.length) {\n var setupHiddenFileInput = function setupHiddenFileInput() {\n if (_this2.hiddenFileInput) {\n _this2.hiddenFileInput.parentNode.removeChild(_this2.hiddenFileInput);\n }\n\n _this2.hiddenFileInput = document.createElement(\"input\");\n\n _this2.hiddenFileInput.setAttribute(\"type\", \"file\");\n\n if (_this2.options.maxFiles === null || _this2.options.maxFiles > 1) {\n _this2.hiddenFileInput.setAttribute(\"multiple\", \"multiple\");\n }\n\n _this2.hiddenFileInput.className = \"dz-hidden-input\";\n\n if (_this2.options.acceptedFiles !== null) {\n _this2.hiddenFileInput.setAttribute(\"accept\", _this2.options.acceptedFiles);\n }\n\n if (_this2.options.capture !== null) {\n _this2.hiddenFileInput.setAttribute(\"capture\", _this2.options.capture);\n } // Making sure that no one can \"tab\" into this field.\n\n\n _this2.hiddenFileInput.setAttribute(\"tabindex\", \"-1\"); // Not setting `display=\"none\"` because some browsers don't accept clicks\n // on elements that aren't displayed.\n\n\n _this2.hiddenFileInput.style.visibility = \"hidden\";\n _this2.hiddenFileInput.style.position = \"absolute\";\n _this2.hiddenFileInput.style.top = \"0\";\n _this2.hiddenFileInput.style.left = \"0\";\n _this2.hiddenFileInput.style.height = \"0\";\n _this2.hiddenFileInput.style.width = \"0\";\n Dropzone.getElement(_this2.options.hiddenInputContainer, \"hiddenInputContainer\").appendChild(_this2.hiddenFileInput);\n\n _this2.hiddenFileInput.addEventListener(\"change\", function () {\n var files = _this2.hiddenFileInput.files;\n\n if (files.length) {\n var _iterator = dropzone_createForOfIteratorHelper(files, true),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var file = _step.value;\n\n _this2.addFile(file);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n _this2.emit(\"addedfiles\", files);\n\n setupHiddenFileInput();\n });\n };\n\n setupHiddenFileInput();\n }\n\n this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself.\n // They're not in @setupEventListeners() because they shouldn't be removed\n // again when the dropzone gets disabled.\n\n var _iterator2 = dropzone_createForOfIteratorHelper(this.events, true),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var eventName = _step2.value;\n this.on(eventName, this.options[eventName]);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n this.on(\"uploadprogress\", function () {\n return _this2.updateTotalUploadProgress();\n });\n this.on(\"removedfile\", function () {\n return _this2.updateTotalUploadProgress();\n });\n this.on(\"canceled\", function (file) {\n return _this2.emit(\"complete\", file);\n }); // Emit a `queuecomplete` event if all files finished uploading.\n\n this.on(\"complete\", function (file) {\n if (_this2.getAddedFiles().length === 0 && _this2.getUploadingFiles().length === 0 && _this2.getQueuedFiles().length === 0) {\n // This needs to be deferred so that `queuecomplete` really triggers after `complete`\n return setTimeout(function () {\n return _this2.emit(\"queuecomplete\");\n }, 0);\n }\n });\n\n var containsFiles = function containsFiles(e) {\n if (e.dataTransfer.types) {\n // Because e.dataTransfer.types is an Object in\n // IE, we need to iterate like this instead of\n // using e.dataTransfer.types.some()\n for (var i = 0; i < e.dataTransfer.types.length; i++) {\n if (e.dataTransfer.types[i] === \"Files\") return true;\n }\n }\n\n return false;\n };\n\n var noPropagation = function noPropagation(e) {\n // If there are no files, we don't want to stop\n // propagation so we don't interfere with other\n // drag and drop behaviour.\n if (!containsFiles(e)) return;\n e.stopPropagation();\n\n if (e.preventDefault) {\n return e.preventDefault();\n } else {\n return e.returnValue = false;\n }\n }; // Create the listeners\n\n\n this.listeners = [{\n element: this.element,\n events: {\n dragstart: function dragstart(e) {\n return _this2.emit(\"dragstart\", e);\n },\n dragenter: function dragenter(e) {\n noPropagation(e);\n return _this2.emit(\"dragenter\", e);\n },\n dragover: function dragover(e) {\n // Makes it possible to drag files from chrome's download bar\n // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar\n // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)\n var efct;\n\n try {\n efct = e.dataTransfer.effectAllowed;\n } catch (error) {}\n\n e.dataTransfer.dropEffect = \"move\" === efct || \"linkMove\" === efct ? \"move\" : \"copy\";\n noPropagation(e);\n return _this2.emit(\"dragover\", e);\n },\n dragleave: function dragleave(e) {\n return _this2.emit(\"dragleave\", e);\n },\n drop: function drop(e) {\n noPropagation(e);\n return _this2.drop(e);\n },\n dragend: function dragend(e) {\n return _this2.emit(\"dragend\", e);\n }\n } // This is disabled right now, because the browsers don't implement it properly.\n // \"paste\": (e) =>\n // noPropagation e\n // @paste e\n\n }];\n this.clickableElements.forEach(function (clickableElement) {\n return _this2.listeners.push({\n element: clickableElement,\n events: {\n click: function click(evt) {\n // Only the actual dropzone or the message element should trigger file selection\n if (clickableElement !== _this2.element || evt.target === _this2.element || Dropzone.elementInside(evt.target, _this2.element.querySelector(\".dz-message\"))) {\n _this2.hiddenFileInput.click(); // Forward the click\n\n }\n\n return true;\n }\n }\n });\n });\n this.enable();\n return this.options.init.call(this);\n } // Not fully tested yet\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.disable();\n this.removeAllFiles(true);\n\n if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {\n this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\n this.hiddenFileInput = null;\n }\n\n delete this.element.dropzone;\n return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);\n }\n }, {\n key: \"updateTotalUploadProgress\",\n value: function updateTotalUploadProgress() {\n var totalUploadProgress;\n var totalBytesSent = 0;\n var totalBytes = 0;\n var activeFiles = this.getActiveFiles();\n\n if (activeFiles.length) {\n var _iterator3 = dropzone_createForOfIteratorHelper(this.getActiveFiles(), true),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var file = _step3.value;\n totalBytesSent += file.upload.bytesSent;\n totalBytes += file.upload.total;\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n totalUploadProgress = 100 * totalBytesSent / totalBytes;\n } else {\n totalUploadProgress = 100;\n }\n\n return this.emit(\"totaluploadprogress\", totalUploadProgress, totalBytes, totalBytesSent);\n } // @options.paramName can be a function taking one parameter rather than a string.\n // A parameter name for a file is obtained simply by calling this with an index number.\n\n }, {\n key: \"_getParamName\",\n value: function _getParamName(n) {\n if (typeof this.options.paramName === \"function\") {\n return this.options.paramName(n);\n } else {\n return \"\".concat(this.options.paramName).concat(this.options.uploadMultiple ? \"[\".concat(n, \"]\") : \"\");\n }\n } // If @options.renameFile is a function,\n // the function will be used to rename the file.name before appending it to the formData\n\n }, {\n key: \"_renameFile\",\n value: function _renameFile(file) {\n if (typeof this.options.renameFile !== \"function\") {\n return file.name;\n }\n\n return this.options.renameFile(file);\n } // Returns a form that can be used as fallback if the browser does not support DragnDrop\n //\n // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.\n // This code has to pass in IE7 :(\n\n }, {\n key: \"getFallbackForm\",\n value: function getFallbackForm() {\n var existingFallback, form;\n\n if (existingFallback = this.getExistingFallback()) {\n return existingFallback;\n }\n\n var fieldsString = '
';\n\n if (this.options.dictFallbackText) {\n fieldsString += \"

\".concat(this.options.dictFallbackText, \"

\");\n }\n\n fieldsString += \"
\");\n var fields = Dropzone.createElement(fieldsString);\n\n if (this.element.tagName !== \"FORM\") {\n form = Dropzone.createElement(\"
\"));\n form.appendChild(fields);\n } else {\n // Make sure that the enctype and method attributes are set properly\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n this.element.setAttribute(\"method\", this.options.method);\n }\n\n return form != null ? form : fields;\n } // Returns the fallback elements if they exist already\n //\n // This code has to pass in IE7 :(\n\n }, {\n key: \"getExistingFallback\",\n value: function getExistingFallback() {\n var getFallback = function getFallback(elements) {\n var _iterator4 = dropzone_createForOfIteratorHelper(elements, true),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var el = _step4.value;\n\n if (/(^| )fallback($| )/.test(el.className)) {\n return el;\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n };\n\n for (var _i = 0, _arr = [\"div\", \"form\"]; _i < _arr.length; _i++) {\n var tagName = _arr[_i];\n var fallback;\n\n if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {\n return fallback;\n }\n }\n } // Activates all listeners stored in @listeners\n\n }, {\n key: \"setupEventListeners\",\n value: function setupEventListeners() {\n return this.listeners.map(function (elementListeners) {\n return function () {\n var result = [];\n\n for (var event in elementListeners.events) {\n var listener = elementListeners.events[event];\n result.push(elementListeners.element.addEventListener(event, listener, false));\n }\n\n return result;\n }();\n });\n } // Deactivates all listeners stored in @listeners\n\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n return this.listeners.map(function (elementListeners) {\n return function () {\n var result = [];\n\n for (var event in elementListeners.events) {\n var listener = elementListeners.events[event];\n result.push(elementListeners.element.removeEventListener(event, listener, false));\n }\n\n return result;\n }();\n });\n } // Removes all event listeners and cancels all files in the queue or being processed.\n\n }, {\n key: \"disable\",\n value: function disable() {\n var _this3 = this;\n\n this.clickableElements.forEach(function (element) {\n return element.classList.remove(\"dz-clickable\");\n });\n this.removeEventListeners();\n this.disabled = true;\n return this.files.map(function (file) {\n return _this3.cancelUpload(file);\n });\n }\n }, {\n key: \"enable\",\n value: function enable() {\n delete this.disabled;\n this.clickableElements.forEach(function (element) {\n return element.classList.add(\"dz-clickable\");\n });\n return this.setupEventListeners();\n } // Returns a nicely formatted filesize\n\n }, {\n key: \"filesize\",\n value: function filesize(size) {\n var selectedSize = 0;\n var selectedUnit = \"b\";\n\n if (size > 0) {\n var units = [\"tb\", \"gb\", \"mb\", \"kb\", \"b\"];\n\n for (var i = 0; i < units.length; i++) {\n var unit = units[i];\n var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n\n selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits\n }\n\n return \"\".concat(selectedSize, \" \").concat(this.options.dictFileSizeUnits[selectedUnit]);\n } // Adds or removes the `dz-max-files-reached` class from the form.\n\n }, {\n key: \"_updateMaxFilesReachedClass\",\n value: function _updateMaxFilesReachedClass() {\n if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {\n if (this.getAcceptedFiles().length === this.options.maxFiles) {\n this.emit(\"maxfilesreached\", this.files);\n }\n\n return this.element.classList.add(\"dz-max-files-reached\");\n } else {\n return this.element.classList.remove(\"dz-max-files-reached\");\n }\n }\n }, {\n key: \"drop\",\n value: function drop(e) {\n if (!e.dataTransfer) {\n return;\n }\n\n this.emit(\"drop\", e); // Convert the FileList to an Array\n // This is necessary for IE11\n\n var files = [];\n\n for (var i = 0; i < e.dataTransfer.files.length; i++) {\n files[i] = e.dataTransfer.files[i];\n } // Even if it's a folder, files.length will contain the folders.\n\n\n if (files.length) {\n var items = e.dataTransfer.items;\n\n if (items && items.length && items[0].webkitGetAsEntry != null) {\n // The browser supports dropping of folders, so handle items instead of files\n this._addFilesFromItems(items);\n } else {\n this.handleFiles(files);\n }\n }\n\n this.emit(\"addedfiles\", files);\n }\n }, {\n key: \"paste\",\n value: function paste(e) {\n if (__guard__(e != null ? e.clipboardData : undefined, function (x) {\n return x.items;\n }) == null) {\n return;\n }\n\n this.emit(\"paste\", e);\n var items = e.clipboardData.items;\n\n if (items.length) {\n return this._addFilesFromItems(items);\n }\n }\n }, {\n key: \"handleFiles\",\n value: function handleFiles(files) {\n var _iterator5 = dropzone_createForOfIteratorHelper(files, true),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var file = _step5.value;\n this.addFile(file);\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n } // When a folder is dropped (or files are pasted), items must be handled\n // instead of files.\n\n }, {\n key: \"_addFilesFromItems\",\n value: function _addFilesFromItems(items) {\n var _this4 = this;\n\n return function () {\n var result = [];\n\n var _iterator6 = dropzone_createForOfIteratorHelper(items, true),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var item = _step6.value;\n var entry;\n\n if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {\n if (entry.isFile) {\n result.push(_this4.addFile(item.getAsFile()));\n } else if (entry.isDirectory) {\n // Append all files from that directory to files\n result.push(_this4._addFilesFromDirectory(entry, entry.name));\n } else {\n result.push(undefined);\n }\n } else if (item.getAsFile != null) {\n if (item.kind == null || item.kind === \"file\") {\n result.push(_this4.addFile(item.getAsFile()));\n } else {\n result.push(undefined);\n }\n } else {\n result.push(undefined);\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n return result;\n }();\n } // Goes through the directory, and adds each file it finds recursively\n\n }, {\n key: \"_addFilesFromDirectory\",\n value: function _addFilesFromDirectory(directory, path) {\n var _this5 = this;\n\n var dirReader = directory.createReader();\n\n var errorHandler = function errorHandler(error) {\n return __guardMethod__(console, \"log\", function (o) {\n return o.log(error);\n });\n };\n\n var readEntries = function readEntries() {\n return dirReader.readEntries(function (entries) {\n if (entries.length > 0) {\n var _iterator7 = dropzone_createForOfIteratorHelper(entries, true),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var entry = _step7.value;\n\n if (entry.isFile) {\n entry.file(function (file) {\n if (_this5.options.ignoreHiddenFiles && file.name.substring(0, 1) === \".\") {\n return;\n }\n\n file.fullPath = \"\".concat(path, \"/\").concat(file.name);\n return _this5.addFile(file);\n });\n } else if (entry.isDirectory) {\n _this5._addFilesFromDirectory(entry, \"\".concat(path, \"/\").concat(entry.name));\n }\n } // Recursively call readEntries() again, since browser only handle\n // the first 100 entries.\n // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries\n\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n\n readEntries();\n }\n\n return null;\n }, errorHandler);\n };\n\n return readEntries();\n } // If `done()` is called without argument the file is accepted\n // If you call it with an error message, the file is rejected\n // (This allows for asynchronous validation)\n //\n // This function checks the filesize, and if the file.type passes the\n // `acceptedFiles` check.\n\n }, {\n key: \"accept\",\n value: function accept(file, done) {\n if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) {\n done(this.options.dictFileTooBig.replace(\"{{filesize}}\", Math.round(file.size / 1024 / 10.24) / 100).replace(\"{{maxFilesize}}\", this.options.maxFilesize));\n } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {\n done(this.options.dictInvalidFileType);\n } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {\n done(this.options.dictMaxFilesExceeded.replace(\"{{maxFiles}}\", this.options.maxFiles));\n this.emit(\"maxfilesexceeded\", file);\n } else {\n this.options.accept.call(this, file, done);\n }\n }\n }, {\n key: \"addFile\",\n value: function addFile(file) {\n var _this6 = this;\n\n file.upload = {\n uuid: Dropzone.uuidv4(),\n progress: 0,\n // Setting the total upload size to file.size for the beginning\n // It's actual different than the size to be transmitted.\n total: file.size,\n bytesSent: 0,\n filename: this._renameFile(file) // Not setting chunking information here, because the acutal data \u2014 and\n // thus the chunks \u2014 might change if `options.transformFile` is set\n // and does something to the data.\n\n };\n this.files.push(file);\n file.status = Dropzone.ADDED;\n this.emit(\"addedfile\", file);\n\n this._enqueueThumbnail(file);\n\n this.accept(file, function (error) {\n if (error) {\n file.accepted = false;\n\n _this6._errorProcessing([file], error); // Will set the file.status\n\n } else {\n file.accepted = true;\n\n if (_this6.options.autoQueue) {\n _this6.enqueueFile(file);\n } // Will set .accepted = true\n\n }\n\n _this6._updateMaxFilesReachedClass();\n });\n } // Wrapper for enqueueFile\n\n }, {\n key: \"enqueueFiles\",\n value: function enqueueFiles(files) {\n var _iterator8 = dropzone_createForOfIteratorHelper(files, true),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var file = _step8.value;\n this.enqueueFile(file);\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n\n return null;\n }\n }, {\n key: \"enqueueFile\",\n value: function enqueueFile(file) {\n var _this7 = this;\n\n if (file.status === Dropzone.ADDED && file.accepted === true) {\n file.status = Dropzone.QUEUED;\n\n if (this.options.autoProcessQueue) {\n return setTimeout(function () {\n return _this7.processQueue();\n }, 0); // Deferring the call\n }\n } else {\n throw new Error(\"This file can't be queued because it has already been processed or was rejected.\");\n }\n }\n }, {\n key: \"_enqueueThumbnail\",\n value: function _enqueueThumbnail(file) {\n var _this8 = this;\n\n if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {\n this._thumbnailQueue.push(file);\n\n return setTimeout(function () {\n return _this8._processThumbnailQueue();\n }, 0); // Deferring the call\n }\n }\n }, {\n key: \"_processThumbnailQueue\",\n value: function _processThumbnailQueue() {\n var _this9 = this;\n\n if (this._processingThumbnail || this._thumbnailQueue.length === 0) {\n return;\n }\n\n this._processingThumbnail = true;\n\n var file = this._thumbnailQueue.shift();\n\n return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) {\n _this9.emit(\"thumbnail\", file, dataUrl);\n\n _this9._processingThumbnail = false;\n return _this9._processThumbnailQueue();\n });\n } // Can be called by the user to remove a file\n\n }, {\n key: \"removeFile\",\n value: function removeFile(file) {\n if (file.status === Dropzone.UPLOADING) {\n this.cancelUpload(file);\n }\n\n this.files = without(this.files, file);\n this.emit(\"removedfile\", file);\n\n if (this.files.length === 0) {\n return this.emit(\"reset\");\n }\n } // Removes all files that aren't currently processed from the list\n\n }, {\n key: \"removeAllFiles\",\n value: function removeAllFiles(cancelIfNecessary) {\n // Create a copy of files since removeFile() changes the @files array.\n if (cancelIfNecessary == null) {\n cancelIfNecessary = false;\n }\n\n var _iterator9 = dropzone_createForOfIteratorHelper(this.files.slice(), true),\n _step9;\n\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var file = _step9.value;\n\n if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {\n this.removeFile(file);\n }\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n\n return null;\n } // Resizes an image before it gets sent to the server. This function is the default behavior of\n // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with\n // the resized blob.\n\n }, {\n key: \"resizeImage\",\n value: function resizeImage(file, width, height, resizeMethod, callback) {\n var _this10 = this;\n\n return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) {\n if (canvas == null) {\n // The image has not been resized\n return callback(file);\n } else {\n var resizeMimeType = _this10.options.resizeMimeType;\n\n if (resizeMimeType == null) {\n resizeMimeType = file.type;\n }\n\n var resizedDataURL = canvas.toDataURL(resizeMimeType, _this10.options.resizeQuality);\n\n if (resizeMimeType === \"image/jpeg\" || resizeMimeType === \"image/jpg\") {\n // Now add the original EXIF information\n resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);\n }\n\n return callback(Dropzone.dataURItoBlob(resizedDataURL));\n }\n });\n }\n }, {\n key: \"createThumbnail\",\n value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {\n var _this11 = this;\n\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector\n\n if (file.type === \"image/svg+xml\") {\n if (callback != null) {\n callback(fileReader.result);\n }\n\n return;\n }\n\n _this11.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);\n };\n\n fileReader.readAsDataURL(file);\n } // `mockFile` needs to have these attributes:\n //\n // { name: 'name', size: 12345, imageUrl: '' }\n //\n // `callback` will be invoked when the image has been downloaded and displayed.\n // `crossOrigin` will be added to the `img` tag when accessing the file.\n\n }, {\n key: \"displayExistingFile\",\n value: function displayExistingFile(mockFile, imageUrl, callback, crossOrigin) {\n var _this12 = this;\n\n var resizeThumbnail = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n this.emit(\"addedfile\", mockFile);\n this.emit(\"complete\", mockFile);\n\n if (!resizeThumbnail) {\n this.emit(\"thumbnail\", mockFile, imageUrl);\n if (callback) callback();\n } else {\n var onDone = function onDone(thumbnail) {\n _this12.emit(\"thumbnail\", mockFile, thumbnail);\n\n if (callback) callback();\n };\n\n mockFile.dataURL = imageUrl;\n this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, this.options.fixOrientation, onDone, crossOrigin);\n }\n }\n }, {\n key: \"createThumbnailFromUrl\",\n value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {\n var _this13 = this;\n\n // Not using `new Image` here because of a bug in latest Chrome versions.\n // See https://github.com/enyo/dropzone/pull/226\n var img = document.createElement(\"img\");\n\n if (crossOrigin) {\n img.crossOrigin = crossOrigin;\n } // fixOrientation is not needed anymore with browsers handling imageOrientation\n\n\n fixOrientation = getComputedStyle(document.body)[\"imageOrientation\"] == \"from-image\" ? false : fixOrientation;\n\n img.onload = function () {\n var loadExif = function loadExif(callback) {\n return callback(1);\n };\n\n if (typeof EXIF !== \"undefined\" && EXIF !== null && fixOrientation) {\n loadExif = function loadExif(callback) {\n return EXIF.getData(img, function () {\n return callback(EXIF.getTag(this, \"Orientation\"));\n });\n };\n }\n\n return loadExif(function (orientation) {\n file.width = img.width;\n file.height = img.height;\n\n var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod);\n\n var canvas = document.createElement(\"canvas\");\n var ctx = canvas.getContext(\"2d\");\n canvas.width = resizeInfo.trgWidth;\n canvas.height = resizeInfo.trgHeight;\n\n if (orientation > 4) {\n canvas.width = resizeInfo.trgHeight;\n canvas.height = resizeInfo.trgWidth;\n }\n\n switch (orientation) {\n case 2:\n // horizontal flip\n ctx.translate(canvas.width, 0);\n ctx.scale(-1, 1);\n break;\n\n case 3:\n // 180\u00B0 rotate left\n ctx.translate(canvas.width, canvas.height);\n ctx.rotate(Math.PI);\n break;\n\n case 4:\n // vertical flip\n ctx.translate(0, canvas.height);\n ctx.scale(1, -1);\n break;\n\n case 5:\n // vertical flip + 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.scale(1, -1);\n break;\n\n case 6:\n // 90\u00B0 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.translate(0, -canvas.width);\n break;\n\n case 7:\n // horizontal flip + 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.translate(canvas.height, -canvas.width);\n ctx.scale(-1, 1);\n break;\n\n case 8:\n // 90\u00B0 rotate left\n ctx.rotate(-0.5 * Math.PI);\n ctx.translate(-canvas.height, 0);\n break;\n } // This is a bugfix for iOS' scaling bug.\n\n\n drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);\n var thumbnail = canvas.toDataURL(\"image/png\");\n\n if (callback != null) {\n return callback(thumbnail, canvas);\n }\n });\n };\n\n if (callback != null) {\n img.onerror = callback;\n }\n\n return img.src = file.dataURL;\n } // Goes through the queue and processes files if there aren't too many already.\n\n }, {\n key: \"processQueue\",\n value: function processQueue() {\n var parallelUploads = this.options.parallelUploads;\n var processingLength = this.getUploadingFiles().length;\n var i = processingLength; // There are already at least as many files uploading than should be\n\n if (processingLength >= parallelUploads) {\n return;\n }\n\n var queuedFiles = this.getQueuedFiles();\n\n if (!(queuedFiles.length > 0)) {\n return;\n }\n\n if (this.options.uploadMultiple) {\n // The files should be uploaded in one request\n return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));\n } else {\n while (i < parallelUploads) {\n if (!queuedFiles.length) {\n return;\n } // Nothing left to process\n\n\n this.processFile(queuedFiles.shift());\n i++;\n }\n }\n } // Wrapper for `processFiles`\n\n }, {\n key: \"processFile\",\n value: function processFile(file) {\n return this.processFiles([file]);\n } // Loads the file, then calls finishedLoading()\n\n }, {\n key: \"processFiles\",\n value: function processFiles(files) {\n var _iterator10 = dropzone_createForOfIteratorHelper(files, true),\n _step10;\n\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var file = _step10.value;\n file.processing = true; // Backwards compatibility\n\n file.status = Dropzone.UPLOADING;\n this.emit(\"processing\", file);\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n\n if (this.options.uploadMultiple) {\n this.emit(\"processingmultiple\", files);\n }\n\n return this.uploadFiles(files);\n }\n }, {\n key: \"_getFilesWithXhr\",\n value: function _getFilesWithXhr(xhr) {\n var files;\n return files = this.files.filter(function (file) {\n return file.xhr === xhr;\n }).map(function (file) {\n return file;\n });\n } // Cancels the file upload and sets the status to CANCELED\n // **if** the file is actually being uploaded.\n // If it's still in the queue, the file is being removed from it and the status\n // set to CANCELED.\n\n }, {\n key: \"cancelUpload\",\n value: function cancelUpload(file) {\n if (file.status === Dropzone.UPLOADING) {\n var groupedFiles = this._getFilesWithXhr(file.xhr);\n\n var _iterator11 = dropzone_createForOfIteratorHelper(groupedFiles, true),\n _step11;\n\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var groupedFile = _step11.value;\n groupedFile.status = Dropzone.CANCELED;\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n\n if (typeof file.xhr !== \"undefined\") {\n file.xhr.abort();\n }\n\n var _iterator12 = dropzone_createForOfIteratorHelper(groupedFiles, true),\n _step12;\n\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var _groupedFile = _step12.value;\n this.emit(\"canceled\", _groupedFile);\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n\n if (this.options.uploadMultiple) {\n this.emit(\"canceledmultiple\", groupedFiles);\n }\n } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) {\n file.status = Dropzone.CANCELED;\n this.emit(\"canceled\", file);\n\n if (this.options.uploadMultiple) {\n this.emit(\"canceledmultiple\", [file]);\n }\n }\n\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n }\n }, {\n key: \"resolveOption\",\n value: function resolveOption(option) {\n if (typeof option === \"function\") {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return option.apply(this, args);\n }\n\n return option;\n }\n }, {\n key: \"uploadFile\",\n value: function uploadFile(file) {\n return this.uploadFiles([file]);\n }\n }, {\n key: \"uploadFiles\",\n value: function uploadFiles(files) {\n var _this14 = this;\n\n this._transformFiles(files, function (transformedFiles) {\n if (_this14.options.chunking) {\n // Chunking is not allowed to be used with `uploadMultiple` so we know\n // that there is only __one__file.\n var transformedFile = transformedFiles[0];\n files[0].upload.chunked = _this14.options.chunking && (_this14.options.forceChunking || transformedFile.size > _this14.options.chunkSize);\n files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / _this14.options.chunkSize);\n }\n\n if (files[0].upload.chunked) {\n // This file should be sent in chunks!\n // If the chunking option is set, we **know** that there can only be **one** file, since\n // uploadMultiple is not allowed with this option.\n var file = files[0];\n var _transformedFile = transformedFiles[0];\n var startedChunkCount = 0;\n file.upload.chunks = [];\n\n var handleNextChunk = function handleNextChunk() {\n var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet.\n\n while (file.upload.chunks[chunkIndex] !== undefined) {\n chunkIndex++;\n } // This means, that all chunks have already been started.\n\n\n if (chunkIndex >= file.upload.totalChunkCount) return;\n startedChunkCount++;\n var start = chunkIndex * _this14.options.chunkSize;\n var end = Math.min(start + _this14.options.chunkSize, _transformedFile.size);\n var dataBlock = {\n name: _this14._getParamName(0),\n data: _transformedFile.webkitSlice ? _transformedFile.webkitSlice(start, end) : _transformedFile.slice(start, end),\n filename: file.upload.filename,\n chunkIndex: chunkIndex\n };\n file.upload.chunks[chunkIndex] = {\n file: file,\n index: chunkIndex,\n dataBlock: dataBlock,\n // In case we want to retry.\n status: Dropzone.UPLOADING,\n progress: 0,\n retries: 0 // The number of times this block has been retried.\n\n };\n\n _this14._uploadData(files, [dataBlock]);\n };\n\n file.upload.finishedChunkUpload = function (chunk, response) {\n var allFinished = true;\n chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk\n\n chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers\n\n chunk.xhr = null;\n\n for (var i = 0; i < file.upload.totalChunkCount; i++) {\n if (file.upload.chunks[i] === undefined) {\n return handleNextChunk();\n }\n\n if (file.upload.chunks[i].status !== Dropzone.SUCCESS) {\n allFinished = false;\n }\n }\n\n if (allFinished) {\n _this14.options.chunksUploaded(file, function () {\n _this14._finished(files, response, null);\n });\n }\n };\n\n if (_this14.options.parallelChunkUploads) {\n for (var i = 0; i < file.upload.totalChunkCount; i++) {\n handleNextChunk();\n }\n } else {\n handleNextChunk();\n }\n } else {\n var dataBlocks = [];\n\n for (var _i2 = 0; _i2 < files.length; _i2++) {\n dataBlocks[_i2] = {\n name: _this14._getParamName(_i2),\n data: transformedFiles[_i2],\n filename: files[_i2].upload.filename\n };\n }\n\n _this14._uploadData(files, dataBlocks);\n }\n });\n } /// Returns the right chunk for given file and xhr\n\n }, {\n key: \"_getChunk\",\n value: function _getChunk(file, xhr) {\n for (var i = 0; i < file.upload.totalChunkCount; i++) {\n if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) {\n return file.upload.chunks[i];\n }\n }\n } // This function actually uploads the file(s) to the server.\n // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed\n // files, or individual chunks for chunked upload).\n\n }, {\n key: \"_uploadData\",\n value: function _uploadData(files, dataBlocks) {\n var _this15 = this;\n\n var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later.\n\n var _iterator13 = dropzone_createForOfIteratorHelper(files, true),\n _step13;\n\n try {\n for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {\n var file = _step13.value;\n file.xhr = xhr;\n }\n } catch (err) {\n _iterator13.e(err);\n } finally {\n _iterator13.f();\n }\n\n if (files[0].upload.chunked) {\n // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk\n files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;\n }\n\n var method = this.resolveOption(this.options.method, files);\n var url = this.resolveOption(this.options.url, files);\n xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8\n\n var timeout = this.resolveOption(this.options.timeout, files);\n if (timeout) xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179\n\n xhr.withCredentials = !!this.options.withCredentials;\n\n xhr.onload = function (e) {\n _this15._finishedUploading(files, xhr, e);\n };\n\n xhr.ontimeout = function () {\n _this15._handleUploadError(files, xhr, \"Request timedout after \".concat(_this15.options.timeout / 1000, \" seconds\"));\n };\n\n xhr.onerror = function () {\n _this15._handleUploadError(files, xhr);\n }; // Some browsers do not have the .upload property\n\n\n var progressObj = xhr.upload != null ? xhr.upload : xhr;\n\n progressObj.onprogress = function (e) {\n return _this15._updateFilesUploadProgress(files, xhr, e);\n };\n\n var headers = {\n Accept: \"application/json\",\n \"Cache-Control\": \"no-cache\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n };\n\n if (this.options.headers) {\n Dropzone.extend(headers, this.options.headers);\n }\n\n for (var headerName in headers) {\n var headerValue = headers[headerName];\n\n if (headerValue) {\n xhr.setRequestHeader(headerName, headerValue);\n }\n }\n\n var formData = new FormData(); // Adding all @options parameters\n\n if (this.options.params) {\n var additionalParams = this.options.params;\n\n if (typeof additionalParams === \"function\") {\n additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);\n }\n\n for (var key in additionalParams) {\n var value = additionalParams[key];\n\n if (Array.isArray(value)) {\n // The additional parameter contains an array,\n // so lets iterate over it to attach each value\n // individually.\n for (var i = 0; i < value.length; i++) {\n formData.append(key, value[i]);\n }\n } else {\n formData.append(key, value);\n }\n }\n } // Let the user add additional data if necessary\n\n\n var _iterator14 = dropzone_createForOfIteratorHelper(files, true),\n _step14;\n\n try {\n for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {\n var _file = _step14.value;\n this.emit(\"sending\", _file, xhr, formData);\n }\n } catch (err) {\n _iterator14.e(err);\n } finally {\n _iterator14.f();\n }\n\n if (this.options.uploadMultiple) {\n this.emit(\"sendingmultiple\", files, xhr, formData);\n }\n\n this._addFormElementData(formData); // Finally add the files\n // Has to be last because some servers (eg: S3) expect the file to be the last parameter\n\n\n for (var _i3 = 0; _i3 < dataBlocks.length; _i3++) {\n var dataBlock = dataBlocks[_i3];\n formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);\n }\n\n this.submitRequest(xhr, formData, files);\n } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.\n\n }, {\n key: \"_transformFiles\",\n value: function _transformFiles(files, done) {\n var _this16 = this;\n\n var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.\n\n var doneCounter = 0;\n\n var _loop = function _loop(i) {\n _this16.options.transformFile.call(_this16, files[i], function (transformedFile) {\n transformedFiles[i] = transformedFile;\n\n if (++doneCounter === files.length) {\n done(transformedFiles);\n }\n });\n };\n\n for (var i = 0; i < files.length; i++) {\n _loop(i);\n }\n } // Takes care of adding other input elements of the form to the AJAX request\n\n }, {\n key: \"_addFormElementData\",\n value: function _addFormElementData(formData) {\n // Take care of other input elements\n if (this.element.tagName === \"FORM\") {\n var _iterator15 = dropzone_createForOfIteratorHelper(this.element.querySelectorAll(\"input, textarea, select, button\"), true),\n _step15;\n\n try {\n for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {\n var input = _step15.value;\n var inputName = input.getAttribute(\"name\");\n var inputType = input.getAttribute(\"type\");\n if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it.\n\n if (typeof inputName === \"undefined\" || inputName === null) continue;\n\n if (input.tagName === \"SELECT\" && input.hasAttribute(\"multiple\")) {\n // Possibly multiple values\n var _iterator16 = dropzone_createForOfIteratorHelper(input.options, true),\n _step16;\n\n try {\n for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {\n var option = _step16.value;\n\n if (option.selected) {\n formData.append(inputName, option.value);\n }\n }\n } catch (err) {\n _iterator16.e(err);\n } finally {\n _iterator16.f();\n }\n } else if (!inputType || inputType !== \"checkbox\" && inputType !== \"radio\" || input.checked) {\n formData.append(inputName, input.value);\n }\n }\n } catch (err) {\n _iterator15.e(err);\n } finally {\n _iterator15.f();\n }\n }\n } // Invoked when there is new progress information about given files.\n // If e is not provided, it is assumed that the upload is finished.\n\n }, {\n key: \"_updateFilesUploadProgress\",\n value: function _updateFilesUploadProgress(files, xhr, e) {\n if (!files[0].upload.chunked) {\n // Handle file uploads without chunking\n var _iterator17 = dropzone_createForOfIteratorHelper(files, true),\n _step17;\n\n try {\n for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {\n var file = _step17.value;\n\n if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) {\n // If both, the `total` and `bytesSent` have already been set, and\n // they are equal (meaning progress is at 100%), we can skip this\n // file, since an upload progress shouldn't go down.\n continue;\n }\n\n if (e) {\n file.upload.progress = 100 * e.loaded / e.total;\n file.upload.total = e.total;\n file.upload.bytesSent = e.loaded;\n } else {\n // No event, so we're at 100%\n file.upload.progress = 100;\n file.upload.bytesSent = file.upload.total;\n }\n\n this.emit(\"uploadprogress\", file, file.upload.progress, file.upload.bytesSent);\n }\n } catch (err) {\n _iterator17.e(err);\n } finally {\n _iterator17.f();\n }\n } else {\n // Handle chunked file uploads\n // Chunked upload is not compatible with uploading multiple files in one\n // request, so we know there's only one file.\n var _file2 = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk\n // progress.\n\n var chunk = this._getChunk(_file2, xhr);\n\n if (e) {\n chunk.progress = 100 * e.loaded / e.total;\n chunk.total = e.total;\n chunk.bytesSent = e.loaded;\n } else {\n // No event, so we're at 100%\n chunk.progress = 100;\n chunk.bytesSent = chunk.total;\n } // Now tally the *file* upload progress from its individual chunks\n\n\n _file2.upload.progress = 0;\n _file2.upload.total = 0;\n _file2.upload.bytesSent = 0;\n\n for (var i = 0; i < _file2.upload.totalChunkCount; i++) {\n if (_file2.upload.chunks[i] && typeof _file2.upload.chunks[i].progress !== \"undefined\") {\n _file2.upload.progress += _file2.upload.chunks[i].progress;\n _file2.upload.total += _file2.upload.chunks[i].total;\n _file2.upload.bytesSent += _file2.upload.chunks[i].bytesSent;\n }\n } // Since the process is a percentage, we need to divide by the amount of\n // chunks we've used.\n\n\n _file2.upload.progress = _file2.upload.progress / _file2.upload.totalChunkCount;\n this.emit(\"uploadprogress\", _file2, _file2.upload.progress, _file2.upload.bytesSent);\n }\n }\n }, {\n key: \"_finishedUploading\",\n value: function _finishedUploading(files, xhr, e) {\n var response;\n\n if (files[0].status === Dropzone.CANCELED) {\n return;\n }\n\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (xhr.responseType !== \"arraybuffer\" && xhr.responseType !== \"blob\") {\n response = xhr.responseText;\n\n if (xhr.getResponseHeader(\"content-type\") && ~xhr.getResponseHeader(\"content-type\").indexOf(\"application/json\")) {\n try {\n response = JSON.parse(response);\n } catch (error) {\n e = error;\n response = \"Invalid JSON response from server.\";\n }\n }\n }\n\n this._updateFilesUploadProgress(files, xhr);\n\n if (!(200 <= xhr.status && xhr.status < 300)) {\n this._handleUploadError(files, xhr, response);\n } else {\n if (files[0].upload.chunked) {\n files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr), response);\n } else {\n this._finished(files, response, e);\n }\n }\n }\n }, {\n key: \"_handleUploadError\",\n value: function _handleUploadError(files, xhr, response) {\n if (files[0].status === Dropzone.CANCELED) {\n return;\n }\n\n if (files[0].upload.chunked && this.options.retryChunks) {\n var chunk = this._getChunk(files[0], xhr);\n\n if (chunk.retries++ < this.options.retryChunksLimit) {\n this._uploadData(files, [chunk.dataBlock]);\n\n return;\n } else {\n console.warn(\"Retried this chunk too often. Giving up.\");\n }\n }\n\n this._errorProcessing(files, response || this.options.dictResponseError.replace(\"{{statusCode}}\", xhr.status), xhr);\n }\n }, {\n key: \"submitRequest\",\n value: function submitRequest(xhr, formData, files) {\n if (xhr.readyState != 1) {\n console.warn(\"Cannot send this request because the XMLHttpRequest.readyState is not OPENED.\");\n return;\n }\n\n xhr.send(formData);\n } // Called internally when processing is finished.\n // Individual callbacks have to be called in the appropriate sections.\n\n }, {\n key: \"_finished\",\n value: function _finished(files, responseText, e) {\n var _iterator18 = dropzone_createForOfIteratorHelper(files, true),\n _step18;\n\n try {\n for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {\n var file = _step18.value;\n file.status = Dropzone.SUCCESS;\n this.emit(\"success\", file, responseText, e);\n this.emit(\"complete\", file);\n }\n } catch (err) {\n _iterator18.e(err);\n } finally {\n _iterator18.f();\n }\n\n if (this.options.uploadMultiple) {\n this.emit(\"successmultiple\", files, responseText, e);\n this.emit(\"completemultiple\", files);\n }\n\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n } // Called internally when processing is finished.\n // Individual callbacks have to be called in the appropriate sections.\n\n }, {\n key: \"_errorProcessing\",\n value: function _errorProcessing(files, message, xhr) {\n var _iterator19 = dropzone_createForOfIteratorHelper(files, true),\n _step19;\n\n try {\n for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {\n var file = _step19.value;\n file.status = Dropzone.ERROR;\n this.emit(\"error\", file, message, xhr);\n this.emit(\"complete\", file);\n }\n } catch (err) {\n _iterator19.e(err);\n } finally {\n _iterator19.f();\n }\n\n if (this.options.uploadMultiple) {\n this.emit(\"errormultiple\", files, message, xhr);\n this.emit(\"completemultiple\", files);\n }\n\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n }\n }], [{\n key: \"initClass\",\n value: function initClass() {\n // Exposing the emitter class, mainly for tests\n this.prototype.Emitter = Emitter;\n /*\n This is a list of all available events you can register on a dropzone object.\n You can register an event handler like this:\n dropzone.on(\"dragEnter\", function() { });\n */\n\n this.prototype.events = [\"drop\", \"dragstart\", \"dragend\", \"dragenter\", \"dragover\", \"dragleave\", \"addedfile\", \"addedfiles\", \"removedfile\", \"thumbnail\", \"error\", \"errormultiple\", \"processing\", \"processingmultiple\", \"uploadprogress\", \"totaluploadprogress\", \"sending\", \"sendingmultiple\", \"success\", \"successmultiple\", \"canceled\", \"canceledmultiple\", \"complete\", \"completemultiple\", \"reset\", \"maxfilesexceeded\", \"maxfilesreached\", \"queuecomplete\"];\n this.prototype._thumbnailQueue = [];\n this.prototype._processingThumbnail = false;\n } // global utility\n\n }, {\n key: \"extend\",\n value: function extend(target) {\n for (var _len2 = arguments.length, objects = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n objects[_key2 - 1] = arguments[_key2];\n }\n\n for (var _i4 = 0, _objects = objects; _i4 < _objects.length; _i4++) {\n var object = _objects[_i4];\n\n for (var key in object) {\n var val = object[key];\n target[key] = val;\n }\n }\n\n return target;\n }\n }, {\n key: \"uuidv4\",\n value: function uuidv4() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0,\n v = c === \"x\" ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n }\n }]);\n\n return Dropzone;\n}(Emitter);\n\n\nDropzone.initClass();\nDropzone.version = \"5.9.3\"; // This is a map of options for your different dropzones. Add configurations\n// to this object for your different dropzone elemens.\n//\n// Example:\n//\n// Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };\n//\n// To disable autoDiscover for a specific element, you can set `false` as an option:\n//\n// Dropzone.options.myDisabledElementId = false;\n//\n// And in html:\n//\n//
\n\nDropzone.options = {}; // Returns the options for an element or undefined if none available.\n\nDropzone.optionsForElement = function (element) {\n // Get the `Dropzone.options.elementId` for this element if it exists\n if (element.getAttribute(\"id\")) {\n return Dropzone.options[camelize(element.getAttribute(\"id\"))];\n } else {\n return undefined;\n }\n}; // Holds a list of all dropzone instances\n\n\nDropzone.instances = []; // Returns the dropzone for given element if any\n\nDropzone.forElement = function (element) {\n if (typeof element === \"string\") {\n element = document.querySelector(element);\n }\n\n if ((element != null ? element.dropzone : undefined) == null) {\n throw new Error(\"No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.\");\n }\n\n return element.dropzone;\n}; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.\n\n\nDropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them\n\nDropzone.discover = function () {\n var dropzones;\n\n if (document.querySelectorAll) {\n dropzones = document.querySelectorAll(\".dropzone\");\n } else {\n dropzones = []; // IE :(\n\n var checkElements = function checkElements(elements) {\n return function () {\n var result = [];\n\n var _iterator20 = dropzone_createForOfIteratorHelper(elements, true),\n _step20;\n\n try {\n for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {\n var el = _step20.value;\n\n if (/(^| )dropzone($| )/.test(el.className)) {\n result.push(dropzones.push(el));\n } else {\n result.push(undefined);\n }\n }\n } catch (err) {\n _iterator20.e(err);\n } finally {\n _iterator20.f();\n }\n\n return result;\n }();\n };\n\n checkElements(document.getElementsByTagName(\"div\"));\n checkElements(document.getElementsByTagName(\"form\"));\n }\n\n return function () {\n var result = [];\n\n var _iterator21 = dropzone_createForOfIteratorHelper(dropzones, true),\n _step21;\n\n try {\n for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {\n var dropzone = _step21.value;\n\n // Create a dropzone unless auto discover has been disabled for specific element\n if (Dropzone.optionsForElement(dropzone) !== false) {\n result.push(new Dropzone(dropzone));\n } else {\n result.push(undefined);\n }\n }\n } catch (err) {\n _iterator21.e(err);\n } finally {\n _iterator21.f();\n }\n\n return result;\n }();\n}; // Some browsers support drag and drog functionality, but not correctly.\n//\n// So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know.\n// But what to do when browsers *theoretically* support an API, but crash\n// when using it.\n//\n// This is a list of regular expressions tested against navigator.userAgent\n//\n// ** It should only be used on browser that *do* support the API, but\n// incorrectly **\n\n\nDropzone.blockedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.\n/opera.*(Macintosh|Windows Phone).*version\\/12/i]; // Checks if the browser is supported\n\nDropzone.isBrowserSupported = function () {\n var capableBrowser = true;\n\n if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {\n if (!(\"classList\" in document.createElement(\"a\"))) {\n capableBrowser = false;\n } else {\n if (Dropzone.blacklistedBrowsers !== undefined) {\n // Since this has been renamed, this makes sure we don't break older\n // configuration.\n Dropzone.blockedBrowsers = Dropzone.blacklistedBrowsers;\n } // The browser supports the API, but may be blocked.\n\n\n var _iterator22 = dropzone_createForOfIteratorHelper(Dropzone.blockedBrowsers, true),\n _step22;\n\n try {\n for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {\n var regex = _step22.value;\n\n if (regex.test(navigator.userAgent)) {\n capableBrowser = false;\n continue;\n }\n }\n } catch (err) {\n _iterator22.e(err);\n } finally {\n _iterator22.f();\n }\n }\n } else {\n capableBrowser = false;\n }\n\n return capableBrowser;\n};\n\nDropzone.dataURItoBlob = function (dataURI) {\n // convert base64 to raw binary data held in a string\n // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this\n var byteString = atob(dataURI.split(\",\")[1]); // separate out the mime component\n\n var mimeString = dataURI.split(\",\")[0].split(\":\")[1].split(\";\")[0]; // write the bytes of the string to an ArrayBuffer\n\n var ab = new ArrayBuffer(byteString.length);\n var ia = new Uint8Array(ab);\n\n for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) {\n ia[i] = byteString.charCodeAt(i);\n } // write the ArrayBuffer to a blob\n\n\n return new Blob([ab], {\n type: mimeString\n });\n}; // Returns an array without the rejected item\n\n\nvar without = function without(list, rejectedItem) {\n return list.filter(function (item) {\n return item !== rejectedItem;\n }).map(function (item) {\n return item;\n });\n}; // abc-def_ghi -> abcDefGhi\n\n\nvar camelize = function camelize(str) {\n return str.replace(/[\\-_](\\w)/g, function (match) {\n return match.charAt(1).toUpperCase();\n });\n}; // Creates an element from string\n\n\nDropzone.createElement = function (string) {\n var div = document.createElement(\"div\");\n div.innerHTML = string;\n return div.childNodes[0];\n}; // Tests if given element is inside (or simply is) the container\n\n\nDropzone.elementInside = function (element, container) {\n if (element === container) {\n return true;\n } // Coffeescript doesn't support do/while loops\n\n\n while (element = element.parentNode) {\n if (element === container) {\n return true;\n }\n }\n\n return false;\n};\n\nDropzone.getElement = function (el, name) {\n var element;\n\n if (typeof el === \"string\") {\n element = document.querySelector(el);\n } else if (el.nodeType != null) {\n element = el;\n }\n\n if (element == null) {\n throw new Error(\"Invalid `\".concat(name, \"` option provided. Please provide a CSS selector or a plain HTML element.\"));\n }\n\n return element;\n};\n\nDropzone.getElements = function (els, name) {\n var el, elements;\n\n if (els instanceof Array) {\n elements = [];\n\n try {\n var _iterator23 = dropzone_createForOfIteratorHelper(els, true),\n _step23;\n\n try {\n for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {\n el = _step23.value;\n elements.push(this.getElement(el, name));\n }\n } catch (err) {\n _iterator23.e(err);\n } finally {\n _iterator23.f();\n }\n } catch (e) {\n elements = null;\n }\n } else if (typeof els === \"string\") {\n elements = [];\n\n var _iterator24 = dropzone_createForOfIteratorHelper(document.querySelectorAll(els), true),\n _step24;\n\n try {\n for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {\n el = _step24.value;\n elements.push(el);\n }\n } catch (err) {\n _iterator24.e(err);\n } finally {\n _iterator24.f();\n }\n } else if (els.nodeType != null) {\n elements = [els];\n }\n\n if (elements == null || !elements.length) {\n throw new Error(\"Invalid `\".concat(name, \"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.\"));\n }\n\n return elements;\n}; // Asks the user the question and calls accepted or rejected accordingly\n//\n// The default implementation just uses `window.confirm` and then calls the\n// appropriate callback.\n\n\nDropzone.confirm = function (question, accepted, rejected) {\n if (window.confirm(question)) {\n return accepted();\n } else if (rejected != null) {\n return rejected();\n }\n}; // Validates the mime type like this:\n//\n// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept\n\n\nDropzone.isValidFile = function (file, acceptedFiles) {\n if (!acceptedFiles) {\n return true;\n } // If there are no accepted mime types, it's OK\n\n\n acceptedFiles = acceptedFiles.split(\",\");\n var mimeType = file.type;\n var baseMimeType = mimeType.replace(/\\/.*$/, \"\");\n\n var _iterator25 = dropzone_createForOfIteratorHelper(acceptedFiles, true),\n _step25;\n\n try {\n for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {\n var validType = _step25.value;\n validType = validType.trim();\n\n if (validType.charAt(0) === \".\") {\n if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {\n return true;\n }\n } else if (/\\/\\*$/.test(validType)) {\n // This is something like a image/* mime type\n if (baseMimeType === validType.replace(/\\/.*$/, \"\")) {\n return true;\n }\n } else {\n if (mimeType === validType) {\n return true;\n }\n }\n }\n } catch (err) {\n _iterator25.e(err);\n } finally {\n _iterator25.f();\n }\n\n return false;\n}; // Augment jQuery\n\n\nif (typeof jQuery !== \"undefined\" && jQuery !== null) {\n jQuery.fn.dropzone = function (options) {\n return this.each(function () {\n return new Dropzone(this, options);\n });\n };\n} // Dropzone file status codes\n\n\nDropzone.ADDED = \"added\";\nDropzone.QUEUED = \"queued\"; // For backwards compatibility. Now, if a file is accepted, it's either queued\n// or uploading.\n\nDropzone.ACCEPTED = Dropzone.QUEUED;\nDropzone.UPLOADING = \"uploading\";\nDropzone.PROCESSING = Dropzone.UPLOADING; // alias\n\nDropzone.CANCELED = \"canceled\";\nDropzone.ERROR = \"error\";\nDropzone.SUCCESS = \"success\";\n/*\n\n Bugfix for iOS 6 and 7\n Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios\n based on the work of https://github.com/stomita/ios-imagefile-megapixel\n\n */\n// Detecting vertical squash in loaded image.\n// Fixes a bug which squash image vertically while drawing into canvas for some images.\n// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel\n\nvar detectVerticalSquash = function detectVerticalSquash(img) {\n var iw = img.naturalWidth;\n var ih = img.naturalHeight;\n var canvas = document.createElement(\"canvas\");\n canvas.width = 1;\n canvas.height = ih;\n var ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0);\n\n var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih),\n data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically.\n\n\n var sy = 0;\n var ey = ih;\n var py = ih;\n\n while (py > sy) {\n var alpha = data[(py - 1) * 4 + 3];\n\n if (alpha === 0) {\n ey = py;\n } else {\n sy = py;\n }\n\n py = ey + sy >> 1;\n }\n\n var ratio = py / ih;\n\n if (ratio === 0) {\n return 1;\n } else {\n return ratio;\n }\n}; // A replacement for context.drawImage\n// (args are for source and destination).\n\n\nvar drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {\n var vertSquashRatio = detectVerticalSquash(img);\n return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);\n}; // Based on MinifyJpeg\n// Source: http://www.perry.cz/files/ExifRestorer.js\n// http://elicon.blog57.fc2.com/blog-entry-206.html\n\n\nvar ExifRestore = /*#__PURE__*/function () {\n function ExifRestore() {\n dropzone_classCallCheck(this, ExifRestore);\n }\n\n dropzone_createClass(ExifRestore, null, [{\n key: \"initClass\",\n value: function initClass() {\n this.KEY_STR = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n }\n }, {\n key: \"encode64\",\n value: function encode64(input) {\n var output = \"\";\n var chr1 = undefined;\n var chr2 = undefined;\n var chr3 = \"\";\n var enc1 = undefined;\n var enc2 = undefined;\n var enc3 = undefined;\n var enc4 = \"\";\n var i = 0;\n\n while (true) {\n chr1 = input[i++];\n chr2 = input[i++];\n chr3 = input[i++];\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);\n chr1 = chr2 = chr3 = \"\";\n enc1 = enc2 = enc3 = enc4 = \"\";\n\n if (!(i < input.length)) {\n break;\n }\n }\n\n return output;\n }\n }, {\n key: \"restore\",\n value: function restore(origFileBase64, resizedFileBase64) {\n if (!origFileBase64.match(\"data:image/jpeg;base64,\")) {\n return resizedFileBase64;\n }\n\n var rawImage = this.decode64(origFileBase64.replace(\"data:image/jpeg;base64,\", \"\"));\n var segments = this.slice2Segments(rawImage);\n var image = this.exifManipulation(resizedFileBase64, segments);\n return \"data:image/jpeg;base64,\".concat(this.encode64(image));\n }\n }, {\n key: \"exifManipulation\",\n value: function exifManipulation(resizedFileBase64, segments) {\n var exifArray = this.getExifArray(segments);\n var newImageArray = this.insertExif(resizedFileBase64, exifArray);\n var aBuffer = new Uint8Array(newImageArray);\n return aBuffer;\n }\n }, {\n key: \"getExifArray\",\n value: function getExifArray(segments) {\n var seg = undefined;\n var x = 0;\n\n while (x < segments.length) {\n seg = segments[x];\n\n if (seg[0] === 255 & seg[1] === 225) {\n return seg;\n }\n\n x++;\n }\n\n return [];\n }\n }, {\n key: \"insertExif\",\n value: function insertExif(resizedFileBase64, exifArray) {\n var imageData = resizedFileBase64.replace(\"data:image/jpeg;base64,\", \"\");\n var buf = this.decode64(imageData);\n var separatePoint = buf.indexOf(255, 3);\n var mae = buf.slice(0, separatePoint);\n var ato = buf.slice(separatePoint);\n var array = mae;\n array = array.concat(exifArray);\n array = array.concat(ato);\n return array;\n }\n }, {\n key: \"slice2Segments\",\n value: function slice2Segments(rawImageArray) {\n var head = 0;\n var segments = [];\n\n while (true) {\n var length;\n\n if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {\n break;\n }\n\n if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {\n head += 2;\n } else {\n length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];\n var endPoint = head + length + 2;\n var seg = rawImageArray.slice(head, endPoint);\n segments.push(seg);\n head = endPoint;\n }\n\n if (head > rawImageArray.length) {\n break;\n }\n }\n\n return segments;\n }\n }, {\n key: \"decode64\",\n value: function decode64(input) {\n var output = \"\";\n var chr1 = undefined;\n var chr2 = undefined;\n var chr3 = \"\";\n var enc1 = undefined;\n var enc2 = undefined;\n var enc3 = undefined;\n var enc4 = \"\";\n var i = 0;\n var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or =\n\n var base64test = /[^A-Za-z0-9\\+\\/\\=]/g;\n\n if (base64test.exec(input)) {\n console.warn(\"There were invalid base64 characters in the input text.\\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\\nExpect errors in decoding.\");\n }\n\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n while (true) {\n enc1 = this.KEY_STR.indexOf(input.charAt(i++));\n enc2 = this.KEY_STR.indexOf(input.charAt(i++));\n enc3 = this.KEY_STR.indexOf(input.charAt(i++));\n enc4 = this.KEY_STR.indexOf(input.charAt(i++));\n chr1 = enc1 << 2 | enc2 >> 4;\n chr2 = (enc2 & 15) << 4 | enc3 >> 2;\n chr3 = (enc3 & 3) << 6 | enc4;\n buf.push(chr1);\n\n if (enc3 !== 64) {\n buf.push(chr2);\n }\n\n if (enc4 !== 64) {\n buf.push(chr3);\n }\n\n chr1 = chr2 = chr3 = \"\";\n enc1 = enc2 = enc3 = enc4 = \"\";\n\n if (!(i < input.length)) {\n break;\n }\n }\n\n return buf;\n }\n }]);\n\n return ExifRestore;\n}();\n\nExifRestore.initClass();\n/*\n * contentloaded.js\n *\n * Author: Diego Perini (diego.perini at gmail.com)\n * Summary: cross-browser wrapper for DOMContentLoaded\n * Updated: 20101020\n * License: MIT\n * Version: 1.2\n *\n * URL:\n * http://javascript.nwbox.com/ContentLoaded/\n * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE\n */\n// @win window reference\n// @fn function reference\n\nvar contentLoaded = function contentLoaded(win, fn) {\n var done = false;\n var top = true;\n var doc = win.document;\n var root = doc.documentElement;\n var add = doc.addEventListener ? \"addEventListener\" : \"attachEvent\";\n var rem = doc.addEventListener ? \"removeEventListener\" : \"detachEvent\";\n var pre = doc.addEventListener ? \"\" : \"on\";\n\n var init = function init(e) {\n if (e.type === \"readystatechange\" && doc.readyState !== \"complete\") {\n return;\n }\n\n (e.type === \"load\" ? win : doc)[rem](pre + e.type, init, false);\n\n if (!done && (done = true)) {\n return fn.call(win, e.type || e);\n }\n };\n\n var poll = function poll() {\n try {\n root.doScroll(\"left\");\n } catch (e) {\n setTimeout(poll, 50);\n return;\n }\n\n return init(\"poll\");\n };\n\n if (doc.readyState !== \"complete\") {\n if (doc.createEventObject && root.doScroll) {\n try {\n top = !win.frameElement;\n } catch (error) {}\n\n if (top) {\n poll();\n }\n }\n\n doc[add](pre + \"DOMContentLoaded\", init, false);\n doc[add](pre + \"readystatechange\", init, false);\n return win[add](pre + \"load\", init, false);\n }\n}; // As a single function to be able to write tests.\n\n\nDropzone._autoDiscoverFunction = function () {\n if (Dropzone.autoDiscover) {\n return Dropzone.discover();\n }\n};\n\ncontentLoaded(window, Dropzone._autoDiscoverFunction);\n\nfunction __guard__(value, transform) {\n return typeof value !== \"undefined\" && value !== null ? transform(value) : undefined;\n}\n\nfunction __guardMethod__(obj, methodName, transform) {\n if (typeof obj !== \"undefined\" && obj !== null && typeof obj[methodName] === \"function\") {\n return transform(obj, methodName);\n } else {\n return undefined;\n }\n}\n\n\n;// CONCATENATED MODULE: ./tool/dropzone.dist.js\n /// Make Dropzone a global variable.\n\nwindow.Dropzone = Dropzone;\n/* harmony default export */ var dropzone_dist = (Dropzone);\n\n}();\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});", "function deepFreeze(obj) {\n if (obj instanceof Map) {\n obj.clear = obj.delete = obj.set = function () {\n throw new Error('map is read-only');\n };\n } else if (obj instanceof Set) {\n obj.add = obj.clear = obj.delete = function () {\n throw new Error('set is read-only');\n };\n }\n\n // Freeze self\n Object.freeze(obj);\n\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n var prop = obj[name];\n\n // Freeze prop if it is an object\n if (typeof prop == 'object' && !Object.isFrozen(prop)) {\n deepFreeze(prop);\n }\n });\n\n return obj;\n}\n\nvar deepFreezeEs6 = deepFreeze;\nvar _default = deepFreeze;\ndeepFreezeEs6.default = _default;\n\n/** @implements CallbackResponse */\nclass Response {\n /**\n * @param {CompiledMode} mode\n */\n constructor(mode) {\n // eslint-disable-next-line no-undefined\n if (mode.data === undefined) mode.data = {};\n\n this.data = mode.data;\n this.isMatchIgnored = false;\n }\n\n ignoreMatch() {\n this.isMatchIgnored = true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {string}\n */\nfunction escapeHTML(value) {\n return value\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/**\n * performs a shallow merge of multiple objects into one\n *\n * @template T\n * @param {T} original\n * @param {Record[]} objects\n * @returns {T} a single new object\n */\nfunction inherit(original, ...objects) {\n /** @type Record */\n const result = Object.create(null);\n\n for (const key in original) {\n result[key] = original[key];\n }\n objects.forEach(function(obj) {\n for (const key in obj) {\n result[key] = obj[key];\n }\n });\n return /** @type {T} */ (result);\n}\n\n/**\n * @typedef {object} Renderer\n * @property {(text: string) => void} addText\n * @property {(node: Node) => void} openNode\n * @property {(node: Node) => void} closeNode\n * @property {() => string} value\n */\n\n/** @typedef {{kind?: string, sublanguage?: boolean}} Node */\n/** @typedef {{walk: (r: Renderer) => void}} Tree */\n/** */\n\nconst SPAN_CLOSE = '';\n\n/**\n * Determines if a node needs to be wrapped in \n *\n * @param {Node} node */\nconst emitsWrappingTags = (node) => {\n return !!node.kind;\n};\n\n/** @type {Renderer} */\nclass HTMLRenderer {\n /**\n * Creates a new HTMLRenderer\n *\n * @param {Tree} parseTree - the parse tree (must support `walk` API)\n * @param {{classPrefix: string}} options\n */\n constructor(parseTree, options) {\n this.buffer = \"\";\n this.classPrefix = options.classPrefix;\n parseTree.walk(this);\n }\n\n /**\n * Adds texts to the output stream\n *\n * @param {string} text */\n addText(text) {\n this.buffer += escapeHTML(text);\n }\n\n /**\n * Adds a node open to the output stream (if needed)\n *\n * @param {Node} node */\n openNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n let className = node.kind;\n if (!node.sublanguage) {\n className = `${this.classPrefix}${className}`;\n }\n this.span(className);\n }\n\n /**\n * Adds a node close to the output stream (if needed)\n *\n * @param {Node} node */\n closeNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n this.buffer += SPAN_CLOSE;\n }\n\n /**\n * returns the accumulated buffer\n */\n value() {\n return this.buffer;\n }\n\n // helpers\n\n /**\n * Builds a span element\n *\n * @param {string} className */\n span(className) {\n this.buffer += ``;\n }\n}\n\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */\n/** */\n\nclass TokenTree {\n constructor() {\n /** @type DataNode */\n this.rootNode = { children: [] };\n this.stack = [this.rootNode];\n }\n\n get top() {\n return this.stack[this.stack.length - 1];\n }\n\n get root() { return this.rootNode; }\n\n /** @param {Node} node */\n add(node) {\n this.top.children.push(node);\n }\n\n /** @param {string} kind */\n openNode(kind) {\n /** @type Node */\n const node = { kind, children: [] };\n this.add(node);\n this.stack.push(node);\n }\n\n closeNode() {\n if (this.stack.length > 1) {\n return this.stack.pop();\n }\n // eslint-disable-next-line no-undefined\n return undefined;\n }\n\n closeAllNodes() {\n while (this.closeNode());\n }\n\n toJSON() {\n return JSON.stringify(this.rootNode, null, 4);\n }\n\n /**\n * @typedef { import(\"./html_renderer\").Renderer } Renderer\n * @param {Renderer} builder\n */\n walk(builder) {\n // this does not\n return this.constructor._walk(builder, this.rootNode);\n // this works\n // return TokenTree._walk(builder, this.rootNode);\n }\n\n /**\n * @param {Renderer} builder\n * @param {Node} node\n */\n static _walk(builder, node) {\n if (typeof node === \"string\") {\n builder.addText(node);\n } else if (node.children) {\n builder.openNode(node);\n node.children.forEach((child) => this._walk(builder, child));\n builder.closeNode(node);\n }\n return builder;\n }\n\n /**\n * @param {Node} node\n */\n static _collapse(node) {\n if (typeof node === \"string\") return;\n if (!node.children) return;\n\n if (node.children.every(el => typeof el === \"string\")) {\n // node.text = node.children.join(\"\");\n // delete node.children;\n node.children = [node.children.join(\"\")];\n } else {\n node.children.forEach((child) => {\n TokenTree._collapse(child);\n });\n }\n }\n}\n\n/**\n Currently this is all private API, but this is the minimal API necessary\n that an Emitter must implement to fully support the parser.\n\n Minimal interface:\n\n - addKeyword(text, kind)\n - addText(text)\n - addSublanguage(emitter, subLanguageName)\n - finalize()\n - openNode(kind)\n - closeNode()\n - closeAllNodes()\n - toHTML()\n\n*/\n\n/**\n * @implements {Emitter}\n */\nclass TokenTreeEmitter extends TokenTree {\n /**\n * @param {*} options\n */\n constructor(options) {\n super();\n this.options = options;\n }\n\n /**\n * @param {string} text\n * @param {string} kind\n */\n addKeyword(text, kind) {\n if (text === \"\") { return; }\n\n this.openNode(kind);\n this.addText(text);\n this.closeNode();\n }\n\n /**\n * @param {string} text\n */\n addText(text) {\n if (text === \"\") { return; }\n\n this.add(text);\n }\n\n /**\n * @param {Emitter & {root: DataNode}} emitter\n * @param {string} name\n */\n addSublanguage(emitter, name) {\n /** @type DataNode */\n const node = emitter.root;\n node.kind = name;\n node.sublanguage = true;\n this.add(node);\n }\n\n toHTML() {\n const renderer = new HTMLRenderer(this, this.options);\n return renderer.value();\n }\n\n finalize() {\n return true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {RegExp}\n * */\nfunction escape(value) {\n return new RegExp(value.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'm');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/**\n * @param {RegExp} re\n * @returns {number}\n */\nfunction countMatchGroups(re) {\n return (new RegExp(re.toString() + '|')).exec('').length - 1;\n}\n\n/**\n * Does lexeme start with a regular expression match at the beginning\n * @param {RegExp} re\n * @param {string} lexeme\n */\nfunction startsWith(re, lexeme) {\n const match = re && re.exec(lexeme);\n return match && match.index === 0;\n}\n\n// BACKREF_RE matches an open parenthesis or backreference. To avoid\n// an incorrect parse, it additionally matches the following:\n// - [...] elements, where the meaning of parentheses and escapes change\n// - other escape sequences, so we do not misparse escape sequences as\n// interesting elements\n// - non-matching or lookahead parentheses, which do not capture. These\n// follow the '(' with a '?'.\nconst BACKREF_RE = /\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;\n\n// join logically computes regexps.join(separator), but fixes the\n// backreferences so they continue to match.\n// it also places each individual regular expression into it's own\n// match group, keeping track of the sequencing of those match groups\n// is currently an exercise for the caller. :-)\n/**\n * @param {(string | RegExp)[]} regexps\n * @param {string} separator\n * @returns {string}\n */\nfunction join(regexps, separator = \"|\") {\n let numCaptures = 0;\n\n return regexps.map((regex) => {\n numCaptures += 1;\n const offset = numCaptures;\n let re = source(regex);\n let out = '';\n\n while (re.length > 0) {\n const match = BACKREF_RE.exec(re);\n if (!match) {\n out += re;\n break;\n }\n out += re.substring(0, match.index);\n re = re.substring(match.index + match[0].length);\n if (match[0][0] === '\\\\' && match[1]) {\n // Adjust the backreference.\n out += '\\\\' + String(Number(match[1]) + offset);\n } else {\n out += match[0];\n if (match[0] === '(') {\n numCaptures++;\n }\n }\n }\n return out;\n }).map(re => `(${re})`).join(separator);\n}\n\n// Common regexps\nconst MATCH_NOTHING_RE = /\\b\\B/;\nconst IDENT_RE = '[a-zA-Z]\\\\w*';\nconst UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\\\w*';\nconst NUMBER_RE = '\\\\b\\\\d+(\\\\.\\\\d+)?';\nconst C_NUMBER_RE = '(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)'; // 0x..., 0..., decimal, float\nconst BINARY_NUMBER_RE = '\\\\b(0b[01]+)'; // 0b...\nconst RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~';\n\n/**\n* @param { Partial & {binary?: string | RegExp} } opts\n*/\nconst SHEBANG = (opts = {}) => {\n const beginShebang = /^#![ ]*\\//;\n if (opts.binary) {\n opts.begin = concat(\n beginShebang,\n /.*\\b/,\n opts.binary,\n /\\b.*/);\n }\n return inherit({\n className: 'meta',\n begin: beginShebang,\n end: /$/,\n relevance: 0,\n /** @type {ModeCallback} */\n \"on:begin\": (m, resp) => {\n if (m.index !== 0) resp.ignoreMatch();\n }\n }, opts);\n};\n\n// Common modes\nconst BACKSLASH_ESCAPE = {\n begin: '\\\\\\\\[\\\\s\\\\S]', relevance: 0\n};\nconst APOS_STRING_MODE = {\n className: 'string',\n begin: '\\'',\n end: '\\'',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst QUOTE_STRING_MODE = {\n className: 'string',\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst PHRASAL_WORDS_MODE = {\n begin: /\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/\n};\n/**\n * Creates a comment mode\n *\n * @param {string | RegExp} begin\n * @param {string | RegExp} end\n * @param {Mode | {}} [modeOptions]\n * @returns {Partial}\n */\nconst COMMENT = function(begin, end, modeOptions = {}) {\n const mode = inherit(\n {\n className: 'comment',\n begin,\n end,\n contains: []\n },\n modeOptions\n );\n mode.contains.push(PHRASAL_WORDS_MODE);\n mode.contains.push({\n className: 'doctag',\n begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):',\n relevance: 0\n });\n return mode;\n};\nconst C_LINE_COMMENT_MODE = COMMENT('//', '$');\nconst C_BLOCK_COMMENT_MODE = COMMENT('/\\\\*', '\\\\*/');\nconst HASH_COMMENT_MODE = COMMENT('#', '$');\nconst NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE,\n relevance: 0\n};\nconst C_NUMBER_MODE = {\n className: 'number',\n begin: C_NUMBER_RE,\n relevance: 0\n};\nconst BINARY_NUMBER_MODE = {\n className: 'number',\n begin: BINARY_NUMBER_RE,\n relevance: 0\n};\nconst CSS_NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE + '(' +\n '%|em|ex|ch|rem' +\n '|vw|vh|vmin|vmax' +\n '|cm|mm|in|pt|pc|px' +\n '|deg|grad|rad|turn' +\n '|s|ms' +\n '|Hz|kHz' +\n '|dpi|dpcm|dppx' +\n ')?',\n relevance: 0\n};\nconst REGEXP_MODE = {\n // this outer rule makes sure we actually have a WHOLE regex and not simply\n // an expression such as:\n //\n // 3 / something\n //\n // (which will then blow up when regex's `illegal` sees the newline)\n begin: /(?=\\/[^/\\n]*\\/)/,\n contains: [{\n className: 'regexp',\n begin: /\\//,\n end: /\\/[gimuy]*/,\n illegal: /\\n/,\n contains: [\n BACKSLASH_ESCAPE,\n {\n begin: /\\[/,\n end: /\\]/,\n relevance: 0,\n contains: [BACKSLASH_ESCAPE]\n }\n ]\n }]\n};\nconst TITLE_MODE = {\n className: 'title',\n begin: IDENT_RE,\n relevance: 0\n};\nconst UNDERSCORE_TITLE_MODE = {\n className: 'title',\n begin: UNDERSCORE_IDENT_RE,\n relevance: 0\n};\nconst METHOD_GUARD = {\n // excludes method names from keyword processing\n begin: '\\\\.\\\\s*' + UNDERSCORE_IDENT_RE,\n relevance: 0\n};\n\n/**\n * Adds end same as begin mechanics to a mode\n *\n * Your mode must include at least a single () match group as that first match\n * group is what is used for comparison\n * @param {Partial} mode\n */\nconst END_SAME_AS_BEGIN = function(mode) {\n return Object.assign(mode,\n {\n /** @type {ModeCallback} */\n 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },\n /** @type {ModeCallback} */\n 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }\n });\n};\n\nvar MODES = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MATCH_NOTHING_RE: MATCH_NOTHING_RE,\n IDENT_RE: IDENT_RE,\n UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,\n NUMBER_RE: NUMBER_RE,\n C_NUMBER_RE: C_NUMBER_RE,\n BINARY_NUMBER_RE: BINARY_NUMBER_RE,\n RE_STARTERS_RE: RE_STARTERS_RE,\n SHEBANG: SHEBANG,\n BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,\n APOS_STRING_MODE: APOS_STRING_MODE,\n QUOTE_STRING_MODE: QUOTE_STRING_MODE,\n PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,\n COMMENT: COMMENT,\n C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,\n C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,\n HASH_COMMENT_MODE: HASH_COMMENT_MODE,\n NUMBER_MODE: NUMBER_MODE,\n C_NUMBER_MODE: C_NUMBER_MODE,\n BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,\n CSS_NUMBER_MODE: CSS_NUMBER_MODE,\n REGEXP_MODE: REGEXP_MODE,\n TITLE_MODE: TITLE_MODE,\n UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE,\n METHOD_GUARD: METHOD_GUARD,\n END_SAME_AS_BEGIN: END_SAME_AS_BEGIN\n});\n\n// Grammar extensions / plugins\n// See: https://github.com/highlightjs/highlight.js/issues/2833\n\n// Grammar extensions allow \"syntactic sugar\" to be added to the grammar modes\n// without requiring any underlying changes to the compiler internals.\n\n// `compileMatch` being the perfect small example of now allowing a grammar\n// author to write `match` when they desire to match a single expression rather\n// than being forced to use `begin`. The extension then just moves `match` into\n// `begin` when it runs. Ie, no features have been added, but we've just made\n// the experience of writing (and reading grammars) a little bit nicer.\n\n// ------\n\n// TODO: We need negative look-behind support to do this properly\n/**\n * Skip a match if it has a preceding dot\n *\n * This is used for `beginKeywords` to prevent matching expressions such as\n * `bob.keyword.do()`. The mode compiler automatically wires this up as a\n * special _internal_ 'on:begin' callback for modes with `beginKeywords`\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\nfunction skipIfhasPrecedingDot(match, response) {\n const before = match.input[match.index - 1];\n if (before === \".\") {\n response.ignoreMatch();\n }\n}\n\n\n/**\n * `beginKeywords` syntactic sugar\n * @type {CompilerExt}\n */\nfunction beginKeywords(mode, parent) {\n if (!parent) return;\n if (!mode.beginKeywords) return;\n\n // for languages with keywords that include non-word characters checking for\n // a word boundary is not sufficient, so instead we check for a word boundary\n // or whitespace - this does no harm in any case since our keyword engine\n // doesn't allow spaces in keywords anyways and we still check for the boundary\n // first\n mode.begin = '\\\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\\\.)(?=\\\\b|\\\\s)';\n mode.__beforeBegin = skipIfhasPrecedingDot;\n mode.keywords = mode.keywords || mode.beginKeywords;\n delete mode.beginKeywords;\n\n // prevents double relevance, the keywords themselves provide\n // relevance, the mode doesn't need to double it\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 0;\n}\n\n/**\n * Allow `illegal` to contain an array of illegal values\n * @type {CompilerExt}\n */\nfunction compileIllegal(mode, _parent) {\n if (!Array.isArray(mode.illegal)) return;\n\n mode.illegal = either(...mode.illegal);\n}\n\n/**\n * `match` to match a single expression for readability\n * @type {CompilerExt}\n */\nfunction compileMatch(mode, _parent) {\n if (!mode.match) return;\n if (mode.begin || mode.end) throw new Error(\"begin & end are not supported with match\");\n\n mode.begin = mode.match;\n delete mode.match;\n}\n\n/**\n * provides the default 1 relevance to all modes\n * @type {CompilerExt}\n */\nfunction compileRelevance(mode, _parent) {\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 1;\n}\n\n// keywords that should have no default relevance value\nconst COMMON_KEYWORDS = [\n 'of',\n 'and',\n 'for',\n 'in',\n 'not',\n 'or',\n 'if',\n 'then',\n 'parent', // common variable name\n 'list', // common variable name\n 'value' // common variable name\n];\n\nconst DEFAULT_KEYWORD_CLASSNAME = \"keyword\";\n\n/**\n * Given raw keywords from a language definition, compile them.\n *\n * @param {string | Record | Array} rawKeywords\n * @param {boolean} caseInsensitive\n */\nfunction compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {\n /** @type KeywordDict */\n const compiledKeywords = {};\n\n // input can be a string of keywords, an array of keywords, or a object with\n // named keys representing className (which can then point to a string or array)\n if (typeof rawKeywords === 'string') {\n compileList(className, rawKeywords.split(\" \"));\n } else if (Array.isArray(rawKeywords)) {\n compileList(className, rawKeywords);\n } else {\n Object.keys(rawKeywords).forEach(function(className) {\n // collapse all our objects back into the parent object\n Object.assign(\n compiledKeywords,\n compileKeywords(rawKeywords[className], caseInsensitive, className)\n );\n });\n }\n return compiledKeywords;\n\n // ---\n\n /**\n * Compiles an individual list of keywords\n *\n * Ex: \"for if when while|5\"\n *\n * @param {string} className\n * @param {Array} keywordList\n */\n function compileList(className, keywordList) {\n if (caseInsensitive) {\n keywordList = keywordList.map(x => x.toLowerCase());\n }\n keywordList.forEach(function(keyword) {\n const pair = keyword.split('|');\n compiledKeywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])];\n });\n }\n}\n\n/**\n * Returns the proper score for a given keyword\n *\n * Also takes into account comment keywords, which will be scored 0 UNLESS\n * another score has been manually assigned.\n * @param {string} keyword\n * @param {string} [providedScore]\n */\nfunction scoreForKeyword(keyword, providedScore) {\n // manual scores always win over common keywords\n // so you can force a score of 1 if you really insist\n if (providedScore) {\n return Number(providedScore);\n }\n\n return commonKeyword(keyword) ? 0 : 1;\n}\n\n/**\n * Determines if a given keyword is common or not\n *\n * @param {string} keyword */\nfunction commonKeyword(keyword) {\n return COMMON_KEYWORDS.includes(keyword.toLowerCase());\n}\n\n// compilation\n\n/**\n * Compiles a language definition result\n *\n * Given the raw result of a language definition (Language), compiles this so\n * that it is ready for highlighting code.\n * @param {Language} language\n * @param {{plugins: HLJSPlugin[]}} opts\n * @returns {CompiledLanguage}\n */\nfunction compileLanguage(language, { plugins }) {\n /**\n * Builds a regex with the case sensativility of the current language\n *\n * @param {RegExp | string} value\n * @param {boolean} [global]\n */\n function langRe(value, global) {\n return new RegExp(\n source(value),\n 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')\n );\n }\n\n /**\n Stores multiple regular expressions and allows you to quickly search for\n them all in a string simultaneously - returning the first match. It does\n this by creating a huge (a|b|c) regex - each individual item wrapped with ()\n and joined by `|` - using match groups to track position. When a match is\n found checking which position in the array has content allows us to figure\n out which of the original regexes / match groups triggered the match.\n\n The match object itself (the result of `Regex.exec`) is returned but also\n enhanced by merging in any meta-data that was registered with the regex.\n This is how we keep track of which mode matched, and what type of rule\n (`illegal`, `begin`, end, etc).\n */\n class MultiRegex {\n constructor() {\n this.matchIndexes = {};\n // @ts-ignore\n this.regexes = [];\n this.matchAt = 1;\n this.position = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n opts.position = this.position++;\n // @ts-ignore\n this.matchIndexes[this.matchAt] = opts;\n this.regexes.push([opts, re]);\n this.matchAt += countMatchGroups(re) + 1;\n }\n\n compile() {\n if (this.regexes.length === 0) {\n // avoids the need to check length every time exec is called\n // @ts-ignore\n this.exec = () => null;\n }\n const terminators = this.regexes.map(el => el[1]);\n this.matcherRe = langRe(join(terminators), true);\n this.lastIndex = 0;\n }\n\n /** @param {string} s */\n exec(s) {\n this.matcherRe.lastIndex = this.lastIndex;\n const match = this.matcherRe.exec(s);\n if (!match) { return null; }\n\n // eslint-disable-next-line no-undefined\n const i = match.findIndex((el, i) => i > 0 && el !== undefined);\n // @ts-ignore\n const matchData = this.matchIndexes[i];\n // trim off any earlier non-relevant match groups (ie, the other regex\n // match groups that make up the multi-matcher)\n match.splice(0, i);\n\n return Object.assign(match, matchData);\n }\n }\n\n /*\n Created to solve the key deficiently with MultiRegex - there is no way to\n test for multiple matches at a single location. Why would we need to do\n that? In the future a more dynamic engine will allow certain matches to be\n ignored. An example: if we matched say the 3rd regex in a large group but\n decided to ignore it - we'd need to started testing again at the 4th\n regex... but MultiRegex itself gives us no real way to do that.\n\n So what this class creates MultiRegexs on the fly for whatever search\n position they are needed.\n\n NOTE: These additional MultiRegex objects are created dynamically. For most\n grammars most of the time we will never actually need anything more than the\n first MultiRegex - so this shouldn't have too much overhead.\n\n Say this is our search group, and we match regex3, but wish to ignore it.\n\n regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0\n\n What we need is a new MultiRegex that only includes the remaining\n possibilities:\n\n regex4 | regex5 ' ie, startAt = 3\n\n This class wraps all that complexity up in a simple API... `startAt` decides\n where in the array of expressions to start doing the matching. It\n auto-increments, so if a match is found at position 2, then startAt will be\n set to 3. If the end is reached startAt will return to 0.\n\n MOST of the time the parser will be setting startAt manually to 0.\n */\n class ResumableMultiRegex {\n constructor() {\n // @ts-ignore\n this.rules = [];\n // @ts-ignore\n this.multiRegexes = [];\n this.count = 0;\n\n this.lastIndex = 0;\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n getMatcher(index) {\n if (this.multiRegexes[index]) return this.multiRegexes[index];\n\n const matcher = new MultiRegex();\n this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));\n matcher.compile();\n this.multiRegexes[index] = matcher;\n return matcher;\n }\n\n resumingScanAtSamePosition() {\n return this.regexIndex !== 0;\n }\n\n considerAll() {\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n this.rules.push([re, opts]);\n if (opts.type === \"begin\") this.count++;\n }\n\n /** @param {string} s */\n exec(s) {\n const m = this.getMatcher(this.regexIndex);\n m.lastIndex = this.lastIndex;\n let result = m.exec(s);\n\n // The following is because we have no easy way to say \"resume scanning at the\n // existing position but also skip the current rule ONLY\". What happens is\n // all prior rules are also skipped which can result in matching the wrong\n // thing. Example of matching \"booger\":\n\n // our matcher is [string, \"booger\", number]\n //\n // ....booger....\n\n // if \"booger\" is ignored then we'd really need a regex to scan from the\n // SAME position for only: [string, number] but ignoring \"booger\" (if it\n // was the first match), a simple resume would scan ahead who knows how\n // far looking only for \"number\", ignoring potential string matches (or\n // future \"booger\" matches that might be valid.)\n\n // So what we do: We execute two matchers, one resuming at the same\n // position, but the second full matcher starting at the position after:\n\n // /--- resume first regex match here (for [number])\n // |/---- full match here for [string, \"booger\", number]\n // vv\n // ....booger....\n\n // Which ever results in a match first is then used. So this 3-4 step\n // process essentially allows us to say \"match at this position, excluding\n // a prior rule that was ignored\".\n //\n // 1. Match \"booger\" first, ignore. Also proves that [string] does non match.\n // 2. Resume matching for [number]\n // 3. Match at index + 1 for [string, \"booger\", number]\n // 4. If #2 and #3 result in matches, which came first?\n if (this.resumingScanAtSamePosition()) {\n if (result && result.index === this.lastIndex) ; else { // use the second matcher result\n const m2 = this.getMatcher(0);\n m2.lastIndex = this.lastIndex + 1;\n result = m2.exec(s);\n }\n }\n\n if (result) {\n this.regexIndex += result.position + 1;\n if (this.regexIndex === this.count) {\n // wrap-around to considering all matches again\n this.considerAll();\n }\n }\n\n return result;\n }\n }\n\n /**\n * Given a mode, builds a huge ResumableMultiRegex that can be used to walk\n * the content and find matches.\n *\n * @param {CompiledMode} mode\n * @returns {ResumableMultiRegex}\n */\n function buildModeRegex(mode) {\n const mm = new ResumableMultiRegex();\n\n mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: \"begin\" }));\n\n if (mode.terminatorEnd) {\n mm.addRule(mode.terminatorEnd, { type: \"end\" });\n }\n if (mode.illegal) {\n mm.addRule(mode.illegal, { type: \"illegal\" });\n }\n\n return mm;\n }\n\n /** skip vs abort vs ignore\n *\n * @skip - The mode is still entered and exited normally (and contains rules apply),\n * but all content is held and added to the parent buffer rather than being\n * output when the mode ends. Mostly used with `sublanguage` to build up\n * a single large buffer than can be parsed by sublanguage.\n *\n * - The mode begin ands ends normally.\n * - Content matched is added to the parent mode buffer.\n * - The parser cursor is moved forward normally.\n *\n * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it\n * never matched) but DOES NOT continue to match subsequent `contains`\n * modes. Abort is bad/suboptimal because it can result in modes\n * farther down not getting applied because an earlier rule eats the\n * content but then aborts.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is added to the mode buffer.\n * - The parser cursor is moved forward accordingly.\n *\n * @ignore - Ignores the mode (as if it never matched) and continues to match any\n * subsequent `contains` modes. Ignore isn't technically possible with\n * the current parser implementation.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is ignored.\n * - The parser cursor is not moved forward.\n */\n\n /**\n * Compiles an individual mode\n *\n * This can raise an error if the mode contains certain detectable known logic\n * issues.\n * @param {Mode} mode\n * @param {CompiledMode | null} [parent]\n * @returns {CompiledMode | never}\n */\n function compileMode(mode, parent) {\n const cmode = /** @type CompiledMode */ (mode);\n if (mode.isCompiled) return cmode;\n\n [\n // do this early so compiler extensions generally don't have to worry about\n // the distinction between match/begin\n compileMatch\n ].forEach(ext => ext(mode, parent));\n\n language.compilerExtensions.forEach(ext => ext(mode, parent));\n\n // __beforeBegin is considered private API, internal use only\n mode.__beforeBegin = null;\n\n [\n beginKeywords,\n // do this later so compiler extensions that come earlier have access to the\n // raw array if they wanted to perhaps manipulate it, etc.\n compileIllegal,\n // default to 1 relevance if not specified\n compileRelevance\n ].forEach(ext => ext(mode, parent));\n\n mode.isCompiled = true;\n\n let keywordPattern = null;\n if (typeof mode.keywords === \"object\") {\n keywordPattern = mode.keywords.$pattern;\n delete mode.keywords.$pattern;\n }\n\n if (mode.keywords) {\n mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);\n }\n\n // both are not allowed\n if (mode.lexemes && keywordPattern) {\n throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");\n }\n\n // `mode.lexemes` was the old standard before we added and now recommend\n // using `keywords.$pattern` to pass the keyword pattern\n keywordPattern = keywordPattern || mode.lexemes || /\\w+/;\n cmode.keywordPatternRe = langRe(keywordPattern, true);\n\n if (parent) {\n if (!mode.begin) mode.begin = /\\B|\\b/;\n cmode.beginRe = langRe(mode.begin);\n if (mode.endSameAsBegin) mode.end = mode.begin;\n if (!mode.end && !mode.endsWithParent) mode.end = /\\B|\\b/;\n if (mode.end) cmode.endRe = langRe(mode.end);\n cmode.terminatorEnd = source(mode.end) || '';\n if (mode.endsWithParent && parent.terminatorEnd) {\n cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;\n }\n }\n if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));\n if (!mode.contains) mode.contains = [];\n\n mode.contains = [].concat(...mode.contains.map(function(c) {\n return expandOrCloneMode(c === 'self' ? mode : c);\n }));\n mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });\n\n if (mode.starts) {\n compileMode(mode.starts, parent);\n }\n\n cmode.matcher = buildModeRegex(cmode);\n return cmode;\n }\n\n if (!language.compilerExtensions) language.compilerExtensions = [];\n\n // self is not valid at the top-level\n if (language.contains && language.contains.includes('self')) {\n throw new Error(\"ERR: contains `self` is not supported at the top-level of a language. See documentation.\");\n }\n\n // we need a null object, which inherit will guarantee\n language.classNameAliases = inherit(language.classNameAliases || {});\n\n return compileMode(/** @type Mode */ (language));\n}\n\n/**\n * Determines if a mode has a dependency on it's parent or not\n *\n * If a mode does have a parent dependency then often we need to clone it if\n * it's used in multiple places so that each copy points to the correct parent,\n * where-as modes without a parent can often safely be re-used at the bottom of\n * a mode chain.\n *\n * @param {Mode | null} mode\n * @returns {boolean} - is there a dependency on the parent?\n * */\nfunction dependencyOnParent(mode) {\n if (!mode) return false;\n\n return mode.endsWithParent || dependencyOnParent(mode.starts);\n}\n\n/**\n * Expands a mode or clones it if necessary\n *\n * This is necessary for modes with parental dependenceis (see notes on\n * `dependencyOnParent`) and for nodes that have `variants` - which must then be\n * exploded into their own individual modes at compile time.\n *\n * @param {Mode} mode\n * @returns {Mode | Mode[]}\n * */\nfunction expandOrCloneMode(mode) {\n if (mode.variants && !mode.cachedVariants) {\n mode.cachedVariants = mode.variants.map(function(variant) {\n return inherit(mode, { variants: null }, variant);\n });\n }\n\n // EXPAND\n // if we have variants then essentially \"replace\" the mode with the variants\n // this happens in compileMode, where this function is called from\n if (mode.cachedVariants) {\n return mode.cachedVariants;\n }\n\n // CLONE\n // if we have dependencies on parents then we need a unique\n // instance of ourselves, so we can be reused with many\n // different parents without issue\n if (dependencyOnParent(mode)) {\n return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null });\n }\n\n if (Object.isFrozen(mode)) {\n return inherit(mode);\n }\n\n // no special dependency issues, just return ourselves\n return mode;\n}\n\nvar version = \"10.7.3\";\n\n// @ts-nocheck\n\nfunction hasValueOrEmptyAttribute(value) {\n return Boolean(value || value === \"\");\n}\n\nfunction BuildVuePlugin(hljs) {\n const Component = {\n props: [\"language\", \"code\", \"autodetect\"],\n data: function() {\n return {\n detectedLanguage: \"\",\n unknownLanguage: false\n };\n },\n computed: {\n className() {\n if (this.unknownLanguage) return \"\";\n\n return \"hljs \" + this.detectedLanguage;\n },\n highlighted() {\n // no idea what language to use, return raw code\n if (!this.autoDetect && !hljs.getLanguage(this.language)) {\n console.warn(`The language \"${this.language}\" you specified could not be found.`);\n this.unknownLanguage = true;\n return escapeHTML(this.code);\n }\n\n let result = {};\n if (this.autoDetect) {\n result = hljs.highlightAuto(this.code);\n this.detectedLanguage = result.language;\n } else {\n result = hljs.highlight(this.language, this.code, this.ignoreIllegals);\n this.detectedLanguage = this.language;\n }\n return result.value;\n },\n autoDetect() {\n return !this.language || hasValueOrEmptyAttribute(this.autodetect);\n },\n ignoreIllegals() {\n return true;\n }\n },\n // this avoids needing to use a whole Vue compilation pipeline just\n // to build Highlight.js\n render(createElement) {\n return createElement(\"pre\", {}, [\n createElement(\"code\", {\n class: this.className,\n domProps: { innerHTML: this.highlighted }\n })\n ]);\n }\n // template: `
`\n };\n\n const VuePlugin = {\n install(Vue) {\n Vue.component('highlightjs', Component);\n }\n };\n\n return { Component, VuePlugin };\n}\n\n/* plugin itself */\n\n/** @type {HLJSPlugin} */\nconst mergeHTMLPlugin = {\n \"after:highlightElement\": ({ el, result, text }) => {\n const originalStream = nodeStream(el);\n if (!originalStream.length) return;\n\n const resultNode = document.createElement('div');\n resultNode.innerHTML = result.value;\n result.value = mergeStreams(originalStream, nodeStream(resultNode), text);\n }\n};\n\n/* Stream merging support functions */\n\n/**\n * @typedef Event\n * @property {'start'|'stop'} event\n * @property {number} offset\n * @property {Node} node\n */\n\n/**\n * @param {Node} node\n */\nfunction tag(node) {\n return node.nodeName.toLowerCase();\n}\n\n/**\n * @param {Node} node\n */\nfunction nodeStream(node) {\n /** @type Event[] */\n const result = [];\n (function _nodeStream(node, offset) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3) {\n offset += child.nodeValue.length;\n } else if (child.nodeType === 1) {\n result.push({\n event: 'start',\n offset: offset,\n node: child\n });\n offset = _nodeStream(child, offset);\n // Prevent void elements from having an end tag that would actually\n // double them in the output. There are more void elements in HTML\n // but we list only those realistically expected in code display.\n if (!tag(child).match(/br|hr|img|input/)) {\n result.push({\n event: 'stop',\n offset: offset,\n node: child\n });\n }\n }\n }\n return offset;\n })(node, 0);\n return result;\n}\n\n/**\n * @param {any} original - the original stream\n * @param {any} highlighted - stream of the highlighted source\n * @param {string} value - the original source itself\n */\nfunction mergeStreams(original, highlighted, value) {\n let processed = 0;\n let result = '';\n const nodeStack = [];\n\n function selectStream() {\n if (!original.length || !highlighted.length) {\n return original.length ? original : highlighted;\n }\n if (original[0].offset !== highlighted[0].offset) {\n return (original[0].offset < highlighted[0].offset) ? original : highlighted;\n }\n\n /*\n To avoid starting the stream just before it should stop the order is\n ensured that original always starts first and closes last:\n\n if (event1 == 'start' && event2 == 'start')\n return original;\n if (event1 == 'start' && event2 == 'stop')\n return highlighted;\n if (event1 == 'stop' && event2 == 'start')\n return original;\n if (event1 == 'stop' && event2 == 'stop')\n return highlighted;\n\n ... which is collapsed to:\n */\n return highlighted[0].event === 'start' ? original : highlighted;\n }\n\n /**\n * @param {Node} node\n */\n function open(node) {\n /** @param {Attr} attr */\n function attributeString(attr) {\n return ' ' + attr.nodeName + '=\"' + escapeHTML(attr.value) + '\"';\n }\n // @ts-ignore\n result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';\n }\n\n /**\n * @param {Node} node\n */\n function close(node) {\n result += '';\n }\n\n /**\n * @param {Event} event\n */\n function render(event) {\n (event.event === 'start' ? open : close)(event.node);\n }\n\n while (original.length || highlighted.length) {\n let stream = selectStream();\n result += escapeHTML(value.substring(processed, stream[0].offset));\n processed = stream[0].offset;\n if (stream === original) {\n /*\n On any opening or closing tag of the original markup we first close\n the entire highlighted node stack, then render the original tag along\n with all the following original tags at the same offset and then\n reopen all the tags on the highlighted stack.\n */\n nodeStack.reverse().forEach(close);\n do {\n render(stream.splice(0, 1)[0]);\n stream = selectStream();\n } while (stream === original && stream.length && stream[0].offset === processed);\n nodeStack.reverse().forEach(open);\n } else {\n if (stream[0].event === 'start') {\n nodeStack.push(stream[0].node);\n } else {\n nodeStack.pop();\n }\n render(stream.splice(0, 1)[0]);\n }\n }\n return result + escapeHTML(value.substr(processed));\n}\n\n/*\n\nFor the reasoning behind this please see:\nhttps://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419\n\n*/\n\n/**\n * @type {Record}\n */\nconst seenDeprecations = {};\n\n/**\n * @param {string} message\n */\nconst error = (message) => {\n console.error(message);\n};\n\n/**\n * @param {string} message\n * @param {any} args\n */\nconst warn = (message, ...args) => {\n console.log(`WARN: ${message}`, ...args);\n};\n\n/**\n * @param {string} version\n * @param {string} message\n */\nconst deprecated = (version, message) => {\n if (seenDeprecations[`${version}/${message}`]) return;\n\n console.log(`Deprecated as of ${version}. ${message}`);\n seenDeprecations[`${version}/${message}`] = true;\n};\n\n/*\nSyntax highlighting with language autodetection.\nhttps://highlightjs.org/\n*/\n\nconst escape$1 = escapeHTML;\nconst inherit$1 = inherit;\nconst NO_MATCH = Symbol(\"nomatch\");\n\n/**\n * @param {any} hljs - object that is extended (legacy)\n * @returns {HLJSApi}\n */\nconst HLJS = function(hljs) {\n // Global internal variables used within the highlight.js library.\n /** @type {Record} */\n const languages = Object.create(null);\n /** @type {Record} */\n const aliases = Object.create(null);\n /** @type {HLJSPlugin[]} */\n const plugins = [];\n\n // safe/production mode - swallows more errors, tries to keep running\n // even if a single syntax or parse hits a fatal error\n let SAFE_MODE = true;\n const fixMarkupRe = /(^(<[^>]+>|\\t|)+|\\n)/gm;\n const LANGUAGE_NOT_FOUND = \"Could not find the language '{}', did you forget to load/include a language module?\";\n /** @type {Language} */\n const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };\n\n // Global options used when within external APIs. This is modified when\n // calling the `hljs.configure` function.\n /** @type HLJSOptions */\n let options = {\n noHighlightRe: /^(no-?highlight)$/i,\n languageDetectRe: /\\blang(?:uage)?-([\\w-]+)\\b/i,\n classPrefix: 'hljs-',\n tabReplace: null,\n useBR: false,\n languages: null,\n // beta configuration options, subject to change, welcome to discuss\n // https://github.com/highlightjs/highlight.js/issues/1086\n __emitter: TokenTreeEmitter\n };\n\n /* Utility functions */\n\n /**\n * Tests a language name to see if highlighting should be skipped\n * @param {string} languageName\n */\n function shouldNotHighlight(languageName) {\n return options.noHighlightRe.test(languageName);\n }\n\n /**\n * @param {HighlightedHTMLElement} block - the HTML element to determine language for\n */\n function blockLanguage(block) {\n let classes = block.className + ' ';\n\n classes += block.parentNode ? block.parentNode.className : '';\n\n // language-* takes precedence over non-prefixed class names.\n const match = options.languageDetectRe.exec(classes);\n if (match) {\n const language = getLanguage(match[1]);\n if (!language) {\n warn(LANGUAGE_NOT_FOUND.replace(\"{}\", match[1]));\n warn(\"Falling back to no-highlight mode for this block.\", block);\n }\n return language ? match[1] : 'no-highlight';\n }\n\n return classes\n .split(/\\s+/)\n .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));\n }\n\n /**\n * Core highlighting function.\n *\n * OLD API\n * highlight(lang, code, ignoreIllegals, continuation)\n *\n * NEW API\n * highlight(code, {lang, ignoreIllegals})\n *\n * @param {string} codeOrlanguageName - the language to use for highlighting\n * @param {string | HighlightOptions} optionsOrCode - the code to highlight\n * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode} [continuation] - current continuation mode, if any\n *\n * @returns {HighlightResult} Result - an object that represents the result\n * @property {string} language - the language name\n * @property {number} relevance - the relevance score\n * @property {string} value - the highlighted HTML code\n * @property {string} code - the original raw code\n * @property {CompiledMode} top - top of the current mode stack\n * @property {boolean} illegal - indicates whether any illegal matches were found\n */\n function highlight(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {\n let code = \"\";\n let languageName = \"\";\n if (typeof optionsOrCode === \"object\") {\n code = codeOrlanguageName;\n ignoreIllegals = optionsOrCode.ignoreIllegals;\n languageName = optionsOrCode.language;\n // continuation not supported at all via the new API\n // eslint-disable-next-line no-undefined\n continuation = undefined;\n } else {\n // old API\n deprecated(\"10.7.0\", \"highlight(lang, code, ...args) has been deprecated.\");\n deprecated(\"10.7.0\", \"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\");\n languageName = codeOrlanguageName;\n code = optionsOrCode;\n }\n\n /** @type {BeforeHighlightContext} */\n const context = {\n code,\n language: languageName\n };\n // the plugin can change the desired language or the code to be highlighted\n // just be changing the object it was passed\n fire(\"before:highlight\", context);\n\n // a before plugin can usurp the result completely by providing it's own\n // in which case we don't even need to call highlight\n const result = context.result\n ? context.result\n : _highlight(context.language, context.code, ignoreIllegals, continuation);\n\n result.code = context.code;\n // the plugin can change anything in result to suite it\n fire(\"after:highlight\", result);\n\n return result;\n }\n\n /**\n * private highlight that's used internally and does not fire callbacks\n *\n * @param {string} languageName - the language to use for highlighting\n * @param {string} codeToHighlight - the code to highlight\n * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode?} [continuation] - current continuation mode, if any\n * @returns {HighlightResult} - result of the highlight operation\n */\n function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {\n /**\n * Return keyword data if a match is a keyword\n * @param {CompiledMode} mode - current mode\n * @param {RegExpMatchArray} match - regexp match data\n * @returns {KeywordData | false}\n */\n function keywordData(mode, match) {\n const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];\n return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];\n }\n\n function processKeywords() {\n if (!top.keywords) {\n emitter.addText(modeBuffer);\n return;\n }\n\n let lastIndex = 0;\n top.keywordPatternRe.lastIndex = 0;\n let match = top.keywordPatternRe.exec(modeBuffer);\n let buf = \"\";\n\n while (match) {\n buf += modeBuffer.substring(lastIndex, match.index);\n const data = keywordData(top, match);\n if (data) {\n const [kind, keywordRelevance] = data;\n emitter.addText(buf);\n buf = \"\";\n\n relevance += keywordRelevance;\n if (kind.startsWith(\"_\")) {\n // _ implied for relevance only, do not highlight\n // by applying a class name\n buf += match[0];\n } else {\n const cssClass = language.classNameAliases[kind] || kind;\n emitter.addKeyword(match[0], cssClass);\n }\n } else {\n buf += match[0];\n }\n lastIndex = top.keywordPatternRe.lastIndex;\n match = top.keywordPatternRe.exec(modeBuffer);\n }\n buf += modeBuffer.substr(lastIndex);\n emitter.addText(buf);\n }\n\n function processSubLanguage() {\n if (modeBuffer === \"\") return;\n /** @type HighlightResult */\n let result = null;\n\n if (typeof top.subLanguage === 'string') {\n if (!languages[top.subLanguage]) {\n emitter.addText(modeBuffer);\n return;\n }\n result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);\n continuations[top.subLanguage] = /** @type {CompiledMode} */ (result.top);\n } else {\n result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);\n }\n\n // Counting embedded language score towards the host language may be disabled\n // with zeroing the containing mode relevance. Use case in point is Markdown that\n // allows XML everywhere and makes every XML snippet to have a much larger Markdown\n // score.\n if (top.relevance > 0) {\n relevance += result.relevance;\n }\n emitter.addSublanguage(result.emitter, result.language);\n }\n\n function processBuffer() {\n if (top.subLanguage != null) {\n processSubLanguage();\n } else {\n processKeywords();\n }\n modeBuffer = '';\n }\n\n /**\n * @param {Mode} mode - new mode to start\n */\n function startNewMode(mode) {\n if (mode.className) {\n emitter.openNode(language.classNameAliases[mode.className] || mode.className);\n }\n top = Object.create(mode, { parent: { value: top } });\n return top;\n }\n\n /**\n * @param {CompiledMode } mode - the mode to potentially end\n * @param {RegExpMatchArray} match - the latest match\n * @param {string} matchPlusRemainder - match plus remainder of content\n * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode\n */\n function endOfMode(mode, match, matchPlusRemainder) {\n let matched = startsWith(mode.endRe, matchPlusRemainder);\n\n if (matched) {\n if (mode[\"on:end\"]) {\n const resp = new Response(mode);\n mode[\"on:end\"](match, resp);\n if (resp.isMatchIgnored) matched = false;\n }\n\n if (matched) {\n while (mode.endsParent && mode.parent) {\n mode = mode.parent;\n }\n return mode;\n }\n }\n // even if on:end fires an `ignore` it's still possible\n // that we might trigger the end node because of a parent mode\n if (mode.endsWithParent) {\n return endOfMode(mode.parent, match, matchPlusRemainder);\n }\n }\n\n /**\n * Handle matching but then ignoring a sequence of text\n *\n * @param {string} lexeme - string containing full match text\n */\n function doIgnore(lexeme) {\n if (top.matcher.regexIndex === 0) {\n // no more regexs to potentially match here, so we move the cursor forward one\n // space\n modeBuffer += lexeme[0];\n return 1;\n } else {\n // no need to move the cursor, we still have additional regexes to try and\n // match at this very spot\n resumeScanAtSamePosition = true;\n return 0;\n }\n }\n\n /**\n * Handle the start of a new potential mode match\n *\n * @param {EnhancedMatch} match - the current match\n * @returns {number} how far to advance the parse cursor\n */\n function doBeginMatch(match) {\n const lexeme = match[0];\n const newMode = match.rule;\n\n const resp = new Response(newMode);\n // first internal before callbacks, then the public ones\n const beforeCallbacks = [newMode.__beforeBegin, newMode[\"on:begin\"]];\n for (const cb of beforeCallbacks) {\n if (!cb) continue;\n cb(match, resp);\n if (resp.isMatchIgnored) return doIgnore(lexeme);\n }\n\n if (newMode && newMode.endSameAsBegin) {\n newMode.endRe = escape(lexeme);\n }\n\n if (newMode.skip) {\n modeBuffer += lexeme;\n } else {\n if (newMode.excludeBegin) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (!newMode.returnBegin && !newMode.excludeBegin) {\n modeBuffer = lexeme;\n }\n }\n startNewMode(newMode);\n // if (mode[\"after:begin\"]) {\n // let resp = new Response(mode);\n // mode[\"after:begin\"](match, resp);\n // }\n return newMode.returnBegin ? 0 : lexeme.length;\n }\n\n /**\n * Handle the potential end of mode\n *\n * @param {RegExpMatchArray} match - the current match\n */\n function doEndMatch(match) {\n const lexeme = match[0];\n const matchPlusRemainder = codeToHighlight.substr(match.index);\n\n const endMode = endOfMode(top, match, matchPlusRemainder);\n if (!endMode) { return NO_MATCH; }\n\n const origin = top;\n if (origin.skip) {\n modeBuffer += lexeme;\n } else {\n if (!(origin.returnEnd || origin.excludeEnd)) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (origin.excludeEnd) {\n modeBuffer = lexeme;\n }\n }\n do {\n if (top.className) {\n emitter.closeNode();\n }\n if (!top.skip && !top.subLanguage) {\n relevance += top.relevance;\n }\n top = top.parent;\n } while (top !== endMode.parent);\n if (endMode.starts) {\n if (endMode.endSameAsBegin) {\n endMode.starts.endRe = endMode.endRe;\n }\n startNewMode(endMode.starts);\n }\n return origin.returnEnd ? 0 : lexeme.length;\n }\n\n function processContinuations() {\n const list = [];\n for (let current = top; current !== language; current = current.parent) {\n if (current.className) {\n list.unshift(current.className);\n }\n }\n list.forEach(item => emitter.openNode(item));\n }\n\n /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */\n let lastMatch = {};\n\n /**\n * Process an individual match\n *\n * @param {string} textBeforeMatch - text preceeding the match (since the last match)\n * @param {EnhancedMatch} [match] - the match itself\n */\n function processLexeme(textBeforeMatch, match) {\n const lexeme = match && match[0];\n\n // add non-matched text to the current mode buffer\n modeBuffer += textBeforeMatch;\n\n if (lexeme == null) {\n processBuffer();\n return 0;\n }\n\n // we've found a 0 width match and we're stuck, so we need to advance\n // this happens when we have badly behaved rules that have optional matchers to the degree that\n // sometimes they can end up matching nothing at all\n // Ref: https://github.com/highlightjs/highlight.js/issues/2140\n if (lastMatch.type === \"begin\" && match.type === \"end\" && lastMatch.index === match.index && lexeme === \"\") {\n // spit the \"skipped\" character that our regex choked on back into the output sequence\n modeBuffer += codeToHighlight.slice(match.index, match.index + 1);\n if (!SAFE_MODE) {\n /** @type {AnnotatedError} */\n const err = new Error('0 width match regex');\n err.languageName = languageName;\n err.badRule = lastMatch.rule;\n throw err;\n }\n return 1;\n }\n lastMatch = match;\n\n if (match.type === \"begin\") {\n return doBeginMatch(match);\n } else if (match.type === \"illegal\" && !ignoreIllegals) {\n // illegal match, we do not continue processing\n /** @type {AnnotatedError} */\n const err = new Error('Illegal lexeme \"' + lexeme + '\" for mode \"' + (top.className || '') + '\"');\n err.mode = top;\n throw err;\n } else if (match.type === \"end\") {\n const processed = doEndMatch(match);\n if (processed !== NO_MATCH) {\n return processed;\n }\n }\n\n // edge case for when illegal matches $ (end of line) which is technically\n // a 0 width match but not a begin/end match so it's not caught by the\n // first handler (when ignoreIllegals is true)\n if (match.type === \"illegal\" && lexeme === \"\") {\n // advance so we aren't stuck in an infinite loop\n return 1;\n }\n\n // infinite loops are BAD, this is a last ditch catch all. if we have a\n // decent number of iterations yet our index (cursor position in our\n // parsing) still 3x behind our index then something is very wrong\n // so we bail\n if (iterations > 100000 && iterations > match.index * 3) {\n const err = new Error('potential infinite loop, way more iterations than matches');\n throw err;\n }\n\n /*\n Why might be find ourselves here? Only one occasion now. An end match that was\n triggered but could not be completed. When might this happen? When an `endSameasBegin`\n rule sets the end rule to a specific match. Since the overall mode termination rule that's\n being used to scan the text isn't recompiled that means that any match that LOOKS like\n the end (but is not, because it is not an exact match to the beginning) will\n end up here. A definite end match, but when `doEndMatch` tries to \"reapply\"\n the end rule and fails to match, we wind up here, and just silently ignore the end.\n\n This causes no real harm other than stopping a few times too many.\n */\n\n modeBuffer += lexeme;\n return lexeme.length;\n }\n\n const language = getLanguage(languageName);\n if (!language) {\n error(LANGUAGE_NOT_FOUND.replace(\"{}\", languageName));\n throw new Error('Unknown language: \"' + languageName + '\"');\n }\n\n const md = compileLanguage(language, { plugins });\n let result = '';\n /** @type {CompiledMode} */\n let top = continuation || md;\n /** @type Record */\n const continuations = {}; // keep continuations for sub-languages\n const emitter = new options.__emitter(options);\n processContinuations();\n let modeBuffer = '';\n let relevance = 0;\n let index = 0;\n let iterations = 0;\n let resumeScanAtSamePosition = false;\n\n try {\n top.matcher.considerAll();\n\n for (;;) {\n iterations++;\n if (resumeScanAtSamePosition) {\n // only regexes not matched previously will now be\n // considered for a potential match\n resumeScanAtSamePosition = false;\n } else {\n top.matcher.considerAll();\n }\n top.matcher.lastIndex = index;\n\n const match = top.matcher.exec(codeToHighlight);\n // console.log(\"match\", match[0], match.rule && match.rule.begin)\n\n if (!match) break;\n\n const beforeMatch = codeToHighlight.substring(index, match.index);\n const processedCount = processLexeme(beforeMatch, match);\n index = match.index + processedCount;\n }\n processLexeme(codeToHighlight.substr(index));\n emitter.closeAllNodes();\n emitter.finalize();\n result = emitter.toHTML();\n\n return {\n // avoid possible breakage with v10 clients expecting\n // this to always be an integer\n relevance: Math.floor(relevance),\n value: result,\n language: languageName,\n illegal: false,\n emitter: emitter,\n top: top\n };\n } catch (err) {\n if (err.message && err.message.includes('Illegal')) {\n return {\n illegal: true,\n illegalBy: {\n msg: err.message,\n context: codeToHighlight.slice(index - 100, index + 100),\n mode: err.mode\n },\n sofar: result,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter\n };\n } else if (SAFE_MODE) {\n return {\n illegal: false,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter,\n language: languageName,\n top: top,\n errorRaised: err\n };\n } else {\n throw err;\n }\n }\n }\n\n /**\n * returns a valid highlight result, without actually doing any actual work,\n * auto highlight starts with this and it's possible for small snippets that\n * auto-detection may not find a better match\n * @param {string} code\n * @returns {HighlightResult}\n */\n function justTextHighlightResult(code) {\n const result = {\n relevance: 0,\n emitter: new options.__emitter(options),\n value: escape$1(code),\n illegal: false,\n top: PLAINTEXT_LANGUAGE\n };\n result.emitter.addText(code);\n return result;\n }\n\n /**\n Highlighting with language detection. Accepts a string with the code to\n highlight. Returns an object with the following properties:\n\n - language (detected language)\n - relevance (int)\n - value (an HTML string with highlighting markup)\n - second_best (object with the same structure for second-best heuristically\n detected language, may be absent)\n\n @param {string} code\n @param {Array} [languageSubset]\n @returns {AutoHighlightResult}\n */\n function highlightAuto(code, languageSubset) {\n languageSubset = languageSubset || options.languages || Object.keys(languages);\n const plaintext = justTextHighlightResult(code);\n\n const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>\n _highlight(name, code, false)\n );\n results.unshift(plaintext); // plaintext is always an option\n\n const sorted = results.sort((a, b) => {\n // sort base on relevance\n if (a.relevance !== b.relevance) return b.relevance - a.relevance;\n\n // always award the tie to the base language\n // ie if C++ and Arduino are tied, it's more likely to be C++\n if (a.language && b.language) {\n if (getLanguage(a.language).supersetOf === b.language) {\n return 1;\n } else if (getLanguage(b.language).supersetOf === a.language) {\n return -1;\n }\n }\n\n // otherwise say they are equal, which has the effect of sorting on\n // relevance while preserving the original ordering - which is how ties\n // have historically been settled, ie the language that comes first always\n // wins in the case of a tie\n return 0;\n });\n\n const [best, secondBest] = sorted;\n\n /** @type {AutoHighlightResult} */\n const result = best;\n result.second_best = secondBest;\n\n return result;\n }\n\n /**\n Post-processing of the highlighted markup:\n\n - replace TABs with something more useful\n - replace real line-breaks with '
' for non-pre containers\n\n @param {string} html\n @returns {string}\n */\n function fixMarkup(html) {\n if (!(options.tabReplace || options.useBR)) {\n return html;\n }\n\n return html.replace(fixMarkupRe, match => {\n if (match === '\\n') {\n return options.useBR ? '
' : match;\n } else if (options.tabReplace) {\n return match.replace(/\\t/g, options.tabReplace);\n }\n return match;\n });\n }\n\n /**\n * Builds new class name for block given the language name\n *\n * @param {HTMLElement} element\n * @param {string} [currentLang]\n * @param {string} [resultLang]\n */\n function updateClassName(element, currentLang, resultLang) {\n const language = currentLang ? aliases[currentLang] : resultLang;\n\n element.classList.add(\"hljs\");\n if (language) element.classList.add(language);\n }\n\n /** @type {HLJSPlugin} */\n const brPlugin = {\n \"before:highlightElement\": ({ el }) => {\n if (options.useBR) {\n el.innerHTML = el.innerHTML.replace(/\\n/g, '').replace(//g, '\\n');\n }\n },\n \"after:highlightElement\": ({ result }) => {\n if (options.useBR) {\n result.value = result.value.replace(/\\n/g, \"
\");\n }\n }\n };\n\n const TAB_REPLACE_RE = /^(<[^>]+>|\\t)+/gm;\n /** @type {HLJSPlugin} */\n const tabReplacePlugin = {\n \"after:highlightElement\": ({ result }) => {\n if (options.tabReplace) {\n result.value = result.value.replace(TAB_REPLACE_RE, (m) =>\n m.replace(/\\t/g, options.tabReplace)\n );\n }\n }\n };\n\n /**\n * Applies highlighting to a DOM node containing code. Accepts a DOM node and\n * two optional parameters for fixMarkup.\n *\n * @param {HighlightedHTMLElement} element - the HTML element to highlight\n */\n function highlightElement(element) {\n /** @type HTMLElement */\n let node = null;\n const language = blockLanguage(element);\n\n if (shouldNotHighlight(language)) return;\n\n // support for v10 API\n fire(\"before:highlightElement\",\n { el: element, language: language });\n\n node = element;\n const text = node.textContent;\n const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);\n\n // support for v10 API\n fire(\"after:highlightElement\", { el: element, result, text });\n\n element.innerHTML = result.value;\n updateClassName(element, language, result.language);\n element.result = {\n language: result.language,\n // TODO: remove with version 11.0\n re: result.relevance,\n relavance: result.relevance\n };\n if (result.second_best) {\n element.second_best = {\n language: result.second_best.language,\n // TODO: remove with version 11.0\n re: result.second_best.relevance,\n relavance: result.second_best.relevance\n };\n }\n }\n\n /**\n * Updates highlight.js global options with the passed options\n *\n * @param {Partial} userOptions\n */\n function configure(userOptions) {\n if (userOptions.useBR) {\n deprecated(\"10.3.0\", \"'useBR' will be removed entirely in v11.0\");\n deprecated(\"10.3.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2559\");\n }\n options = inherit$1(options, userOptions);\n }\n\n /**\n * Highlights to all
 blocks on a page\n   *\n   * @type {Function & {called?: boolean}}\n   */\n  // TODO: remove v12, deprecated\n  const initHighlighting = () => {\n    if (initHighlighting.called) return;\n    initHighlighting.called = true;\n\n    deprecated(\"10.6.0\", \"initHighlighting() is deprecated.  Use highlightAll() instead.\");\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  };\n\n  // Higlights all when DOMContentLoaded fires\n  // TODO: remove v12, deprecated\n  function initHighlightingOnLoad() {\n    deprecated(\"10.6.0\", \"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\");\n    wantsHighlight = true;\n  }\n\n  let wantsHighlight = false;\n\n  /**\n   * auto-highlights all pre>code elements on the page\n   */\n  function highlightAll() {\n    // if we are called too early in the loading process\n    if (document.readyState === \"loading\") {\n      wantsHighlight = true;\n      return;\n    }\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  }\n\n  function boot() {\n    // if a highlight was requested before DOM was loaded, do now\n    if (wantsHighlight) highlightAll();\n  }\n\n  // make sure we are in the browser environment\n  if (typeof window !== 'undefined' && window.addEventListener) {\n    window.addEventListener('DOMContentLoaded', boot, false);\n  }\n\n  /**\n   * Register a language grammar module\n   *\n   * @param {string} languageName\n   * @param {LanguageFn} languageDefinition\n   */\n  function registerLanguage(languageName, languageDefinition) {\n    let lang = null;\n    try {\n      lang = languageDefinition(hljs);\n    } catch (error$1) {\n      error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", languageName));\n      // hard or soft error\n      if (!SAFE_MODE) { throw error$1; } else { error(error$1); }\n      // languages that have serious errors are replaced with essentially a\n      // \"plaintext\" stand-in so that the code blocks will still get normal\n      // css classes applied to them - and one bad language won't break the\n      // entire highlighter\n      lang = PLAINTEXT_LANGUAGE;\n    }\n    // give it a temporary name if it doesn't have one in the meta-data\n    if (!lang.name) lang.name = languageName;\n    languages[languageName] = lang;\n    lang.rawDefinition = languageDefinition.bind(null, hljs);\n\n    if (lang.aliases) {\n      registerAliases(lang.aliases, { languageName });\n    }\n  }\n\n  /**\n   * Remove a language grammar module\n   *\n   * @param {string} languageName\n   */\n  function unregisterLanguage(languageName) {\n    delete languages[languageName];\n    for (const alias of Object.keys(aliases)) {\n      if (aliases[alias] === languageName) {\n        delete aliases[alias];\n      }\n    }\n  }\n\n  /**\n   * @returns {string[]} List of language internal names\n   */\n  function listLanguages() {\n    return Object.keys(languages);\n  }\n\n  /**\n    intended usage: When one language truly requires another\n\n    Unlike `getLanguage`, this will throw when the requested language\n    is not available.\n\n    @param {string} name - name of the language to fetch/require\n    @returns {Language | never}\n  */\n  function requireLanguage(name) {\n    deprecated(\"10.4.0\", \"requireLanguage will be removed entirely in v11.\");\n    deprecated(\"10.4.0\", \"Please see https://github.com/highlightjs/highlight.js/pull/2844\");\n\n    const lang = getLanguage(name);\n    if (lang) { return lang; }\n\n    const err = new Error('The \\'{}\\' language is required, but not loaded.'.replace('{}', name));\n    throw err;\n  }\n\n  /**\n   * @param {string} name - name of the language to retrieve\n   * @returns {Language | undefined}\n   */\n  function getLanguage(name) {\n    name = (name || '').toLowerCase();\n    return languages[name] || languages[aliases[name]];\n  }\n\n  /**\n   *\n   * @param {string|string[]} aliasList - single alias or list of aliases\n   * @param {{languageName: string}} opts\n   */\n  function registerAliases(aliasList, { languageName }) {\n    if (typeof aliasList === 'string') {\n      aliasList = [aliasList];\n    }\n    aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });\n  }\n\n  /**\n   * Determines if a given language has auto-detection enabled\n   * @param {string} name - name of the language\n   */\n  function autoDetection(name) {\n    const lang = getLanguage(name);\n    return lang && !lang.disableAutodetect;\n  }\n\n  /**\n   * Upgrades the old highlightBlock plugins to the new\n   * highlightElement API\n   * @param {HLJSPlugin} plugin\n   */\n  function upgradePluginAPI(plugin) {\n    // TODO: remove with v12\n    if (plugin[\"before:highlightBlock\"] && !plugin[\"before:highlightElement\"]) {\n      plugin[\"before:highlightElement\"] = (data) => {\n        plugin[\"before:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n    if (plugin[\"after:highlightBlock\"] && !plugin[\"after:highlightElement\"]) {\n      plugin[\"after:highlightElement\"] = (data) => {\n        plugin[\"after:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n  }\n\n  /**\n   * @param {HLJSPlugin} plugin\n   */\n  function addPlugin(plugin) {\n    upgradePluginAPI(plugin);\n    plugins.push(plugin);\n  }\n\n  /**\n   *\n   * @param {PluginEvent} event\n   * @param {any} args\n   */\n  function fire(event, args) {\n    const cb = event;\n    plugins.forEach(function(plugin) {\n      if (plugin[cb]) {\n        plugin[cb](args);\n      }\n    });\n  }\n\n  /**\n  Note: fixMarkup is deprecated and will be removed entirely in v11\n\n  @param {string} arg\n  @returns {string}\n  */\n  function deprecateFixMarkup(arg) {\n    deprecated(\"10.2.0\", \"fixMarkup will be removed entirely in v11.0\");\n    deprecated(\"10.2.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2534\");\n\n    return fixMarkup(arg);\n  }\n\n  /**\n   *\n   * @param {HighlightedHTMLElement} el\n   */\n  function deprecateHighlightBlock(el) {\n    deprecated(\"10.7.0\", \"highlightBlock will be removed entirely in v12.0\");\n    deprecated(\"10.7.0\", \"Please use highlightElement now.\");\n\n    return highlightElement(el);\n  }\n\n  /* Interface definition */\n  Object.assign(hljs, {\n    highlight,\n    highlightAuto,\n    highlightAll,\n    fixMarkup: deprecateFixMarkup,\n    highlightElement,\n    // TODO: Remove with v12 API\n    highlightBlock: deprecateHighlightBlock,\n    configure,\n    initHighlighting,\n    initHighlightingOnLoad,\n    registerLanguage,\n    unregisterLanguage,\n    listLanguages,\n    getLanguage,\n    registerAliases,\n    requireLanguage,\n    autoDetection,\n    inherit: inherit$1,\n    addPlugin,\n    // plugins for frameworks\n    vuePlugin: BuildVuePlugin(hljs).VuePlugin\n  });\n\n  hljs.debugMode = function() { SAFE_MODE = false; };\n  hljs.safeMode = function() { SAFE_MODE = true; };\n  hljs.versionString = version;\n\n  for (const key in MODES) {\n    // @ts-ignore\n    if (typeof MODES[key] === \"object\") {\n      // @ts-ignore\n      deepFreezeEs6(MODES[key]);\n    }\n  }\n\n  // merge all the modes/regexs into our main object\n  Object.assign(hljs, MODES);\n\n  // built-in plugins, likely to be moved out of core in the future\n  hljs.addPlugin(brPlugin); // slated to be removed in v11\n  hljs.addPlugin(mergeHTMLPlugin);\n  hljs.addPlugin(tabReplacePlugin);\n  return hljs;\n};\n\n// export an \"instance\" of the highlighter\nvar highlight = HLJS({});\n\nmodule.exports = highlight;\n", "const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\nconst KEYWORDS = [\n  \"as\", // for exports\n  \"in\",\n  \"of\",\n  \"if\",\n  \"for\",\n  \"while\",\n  \"finally\",\n  \"var\",\n  \"new\",\n  \"function\",\n  \"do\",\n  \"return\",\n  \"void\",\n  \"else\",\n  \"break\",\n  \"catch\",\n  \"instanceof\",\n  \"with\",\n  \"throw\",\n  \"case\",\n  \"default\",\n  \"try\",\n  \"switch\",\n  \"continue\",\n  \"typeof\",\n  \"delete\",\n  \"let\",\n  \"yield\",\n  \"const\",\n  \"class\",\n  // JS handles these with a special rule\n  // \"get\",\n  // \"set\",\n  \"debugger\",\n  \"async\",\n  \"await\",\n  \"static\",\n  \"import\",\n  \"from\",\n  \"export\",\n  \"extends\"\n];\nconst LITERALS = [\n  \"true\",\n  \"false\",\n  \"null\",\n  \"undefined\",\n  \"NaN\",\n  \"Infinity\"\n];\n\nconst TYPES = [\n  \"Intl\",\n  \"DataView\",\n  \"Number\",\n  \"Math\",\n  \"Date\",\n  \"String\",\n  \"RegExp\",\n  \"Object\",\n  \"Function\",\n  \"Boolean\",\n  \"Error\",\n  \"Symbol\",\n  \"Set\",\n  \"Map\",\n  \"WeakSet\",\n  \"WeakMap\",\n  \"Proxy\",\n  \"Reflect\",\n  \"JSON\",\n  \"Promise\",\n  \"Float64Array\",\n  \"Int16Array\",\n  \"Int32Array\",\n  \"Int8Array\",\n  \"Uint16Array\",\n  \"Uint32Array\",\n  \"Float32Array\",\n  \"Array\",\n  \"Uint8Array\",\n  \"Uint8ClampedArray\",\n  \"ArrayBuffer\",\n  \"BigInt64Array\",\n  \"BigUint64Array\",\n  \"BigInt\"\n];\n\nconst ERROR_TYPES = [\n  \"EvalError\",\n  \"InternalError\",\n  \"RangeError\",\n  \"ReferenceError\",\n  \"SyntaxError\",\n  \"TypeError\",\n  \"URIError\"\n];\n\nconst BUILT_IN_GLOBALS = [\n  \"setInterval\",\n  \"setTimeout\",\n  \"clearInterval\",\n  \"clearTimeout\",\n\n  \"require\",\n  \"exports\",\n\n  \"eval\",\n  \"isFinite\",\n  \"isNaN\",\n  \"parseFloat\",\n  \"parseInt\",\n  \"decodeURI\",\n  \"decodeURIComponent\",\n  \"encodeURI\",\n  \"encodeURIComponent\",\n  \"escape\",\n  \"unescape\"\n];\n\nconst BUILT_IN_VARIABLES = [\n  \"arguments\",\n  \"this\",\n  \"super\",\n  \"console\",\n  \"window\",\n  \"document\",\n  \"localStorage\",\n  \"module\",\n  \"global\" // Node.js\n];\n\nconst BUILT_INS = [].concat(\n  BUILT_IN_GLOBALS,\n  BUILT_IN_VARIABLES,\n  TYPES,\n  ERROR_TYPES\n);\n\n/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n  if (!re) return null;\n  if (typeof re === \"string\") return re;\n\n  return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n  return concat('(?=', re, ')');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n  const joined = args.map((x) => source(x)).join(\"\");\n  return joined;\n}\n\n/*\nLanguage: JavaScript\nDescription: JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions.\nCategory: common, scripting\nWebsite: https://developer.mozilla.org/en-US/docs/Web/JavaScript\n*/\n\n/** @type LanguageFn */\nfunction javascript(hljs) {\n  /**\n   * Takes a string like \" {\n    const tag = \"',\n    end: ''\n  };\n  const XML_TAG = {\n    begin: /<[A-Za-z0-9\\\\._:-]+/,\n    end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n    /**\n     * @param {RegExpMatchArray} match\n     * @param {CallbackResponse} response\n     */\n    isTrulyOpeningTag: (match, response) => {\n      const afterMatchIndex = match[0].length + match.index;\n      const nextChar = match.input[afterMatchIndex];\n      // nested type?\n      // HTML should not include another raw `<` inside a tag\n      // But a type might: `>`, etc.\n      if (nextChar === \"<\") {\n        response.ignoreMatch();\n        return;\n      }\n      // \n      // This is now either a tag or a type.\n      if (nextChar === \">\") {\n        // if we cannot find a matching closing tag, then we\n        // will ignore it\n        if (!hasClosingTag(match, { after: afterMatchIndex })) {\n          response.ignoreMatch();\n        }\n      }\n    }\n  };\n  const KEYWORDS$1 = {\n    $pattern: IDENT_RE,\n    keyword: KEYWORDS,\n    literal: LITERALS,\n    built_in: BUILT_INS\n  };\n\n  // https://tc39.es/ecma262/#sec-literals-numeric-literals\n  const decimalDigits = '[0-9](_?[0-9])*';\n  const frac = `\\\\.(${decimalDigits})`;\n  // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n  // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n  const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n  const NUMBER = {\n    className: 'number',\n    variants: [\n      // DecimalLiteral\n      { begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` +\n        `[eE][+-]?(${decimalDigits})\\\\b` },\n      { begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b` },\n\n      // DecimalBigIntegerLiteral\n      { begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b` },\n\n      // NonDecimalIntegerLiteral\n      { begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\" },\n      { begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\" },\n      { begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\" },\n\n      // LegacyOctalIntegerLiteral (does not include underscore separators)\n      // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n      { begin: \"\\\\b0[0-7]+n?\\\\b\" },\n    ],\n    relevance: 0\n  };\n\n  const SUBST = {\n    className: 'subst',\n    begin: '\\\\$\\\\{',\n    end: '\\\\}',\n    keywords: KEYWORDS$1,\n    contains: [] // defined later\n  };\n  const HTML_TEMPLATE = {\n    begin: 'html`',\n    end: '',\n    starts: {\n      end: '`',\n      returnEnd: false,\n      contains: [\n        hljs.BACKSLASH_ESCAPE,\n        SUBST\n      ],\n      subLanguage: 'xml'\n    }\n  };\n  const CSS_TEMPLATE = {\n    begin: 'css`',\n    end: '',\n    starts: {\n      end: '`',\n      returnEnd: false,\n      contains: [\n        hljs.BACKSLASH_ESCAPE,\n        SUBST\n      ],\n      subLanguage: 'css'\n    }\n  };\n  const TEMPLATE_STRING = {\n    className: 'string',\n    begin: '`',\n    end: '`',\n    contains: [\n      hljs.BACKSLASH_ESCAPE,\n      SUBST\n    ]\n  };\n  const JSDOC_COMMENT = hljs.COMMENT(\n    /\\/\\*\\*(?!\\/)/,\n    '\\\\*/',\n    {\n      relevance: 0,\n      contains: [\n        {\n          className: 'doctag',\n          begin: '@[A-Za-z]+',\n          contains: [\n            {\n              className: 'type',\n              begin: '\\\\{',\n              end: '\\\\}',\n              relevance: 0\n            },\n            {\n              className: 'variable',\n              begin: IDENT_RE$1 + '(?=\\\\s*(-)|$)',\n              endsParent: true,\n              relevance: 0\n            },\n            // eat spaces (not newlines) so we can find\n            // types or variables\n            {\n              begin: /(?=[^\\n])\\s/,\n              relevance: 0\n            }\n          ]\n        }\n      ]\n    }\n  );\n  const COMMENT = {\n    className: \"comment\",\n    variants: [\n      JSDOC_COMMENT,\n      hljs.C_BLOCK_COMMENT_MODE,\n      hljs.C_LINE_COMMENT_MODE\n    ]\n  };\n  const SUBST_INTERNALS = [\n    hljs.APOS_STRING_MODE,\n    hljs.QUOTE_STRING_MODE,\n    HTML_TEMPLATE,\n    CSS_TEMPLATE,\n    TEMPLATE_STRING,\n    NUMBER,\n    hljs.REGEXP_MODE\n  ];\n  SUBST.contains = SUBST_INTERNALS\n    .concat({\n      // we need to pair up {} inside our subst to prevent\n      // it from ending too early by matching another }\n      begin: /\\{/,\n      end: /\\}/,\n      keywords: KEYWORDS$1,\n      contains: [\n        \"self\"\n      ].concat(SUBST_INTERNALS)\n    });\n  const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n  const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([\n    // eat recursive parens in sub expressions\n    {\n      begin: /\\(/,\n      end: /\\)/,\n      keywords: KEYWORDS$1,\n      contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n    }\n  ]);\n  const PARAMS = {\n    className: 'params',\n    begin: /\\(/,\n    end: /\\)/,\n    excludeBegin: true,\n    excludeEnd: true,\n    keywords: KEYWORDS$1,\n    contains: PARAMS_CONTAINS\n  };\n\n  return {\n    name: 'Javascript',\n    aliases: ['js', 'jsx', 'mjs', 'cjs'],\n    keywords: KEYWORDS$1,\n    // this will be extended by TypeScript\n    exports: { PARAMS_CONTAINS },\n    illegal: /#(?![$_A-z])/,\n    contains: [\n      hljs.SHEBANG({\n        label: \"shebang\",\n        binary: \"node\",\n        relevance: 5\n      }),\n      {\n        label: \"use_strict\",\n        className: 'meta',\n        relevance: 10,\n        begin: /^\\s*['\"]use (strict|asm)['\"]/\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE,\n      HTML_TEMPLATE,\n      CSS_TEMPLATE,\n      TEMPLATE_STRING,\n      COMMENT,\n      NUMBER,\n      { // object attr container\n        begin: concat(/[{,\\n]\\s*/,\n          // we need to look ahead to make sure that we actually have an\n          // attribute coming up so we don't steal a comma from a potential\n          // \"value\" container\n          //\n          // NOTE: this might not work how you think.  We don't actually always\n          // enter this mode and stay.  Instead it might merely match `,\n          // ` and then immediately end after the , because it\n          // fails to find any actual attrs. But this still does the job because\n          // it prevents the value contain rule from grabbing this instead and\n          // prevening this rule from firing when we actually DO have keys.\n          lookahead(concat(\n            // we also need to allow for multiple possible comments inbetween\n            // the first key:value pairing\n            /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,\n            IDENT_RE$1 + '\\\\s*:'))),\n        relevance: 0,\n        contains: [\n          {\n            className: 'attr',\n            begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n            relevance: 0\n          }\n        ]\n      },\n      { // \"value\" container\n        begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n        keywords: 'return throw case',\n        contains: [\n          COMMENT,\n          hljs.REGEXP_MODE,\n          {\n            className: 'function',\n            // we have to count the parens to make sure we actually have the\n            // correct bounding ( ) before the =>.  There could be any number of\n            // sub-expressions inside also surrounded by parens.\n            begin: '(\\\\(' +\n            '[^()]*(\\\\(' +\n            '[^()]*(\\\\(' +\n            '[^()]*' +\n            '\\\\)[^()]*)*' +\n            '\\\\)[^()]*)*' +\n            '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n            returnBegin: true,\n            end: '\\\\s*=>',\n            contains: [\n              {\n                className: 'params',\n                variants: [\n                  {\n                    begin: hljs.UNDERSCORE_IDENT_RE,\n                    relevance: 0\n                  },\n                  {\n                    className: null,\n                    begin: /\\(\\s*\\)/,\n                    skip: true\n                  },\n                  {\n                    begin: /\\(/,\n                    end: /\\)/,\n                    excludeBegin: true,\n                    excludeEnd: true,\n                    keywords: KEYWORDS$1,\n                    contains: PARAMS_CONTAINS\n                  }\n                ]\n              }\n            ]\n          },\n          { // could be a comma delimited list of params to a function call\n            begin: /,/, relevance: 0\n          },\n          {\n            className: '',\n            begin: /\\s/,\n            end: /\\s*/,\n            skip: true\n          },\n          { // JSX\n            variants: [\n              { begin: FRAGMENT.begin, end: FRAGMENT.end },\n              {\n                begin: XML_TAG.begin,\n                // we carefully check the opening tag to see if it truly\n                // is a tag and not a false positive\n                'on:begin': XML_TAG.isTrulyOpeningTag,\n                end: XML_TAG.end\n              }\n            ],\n            subLanguage: 'xml',\n            contains: [\n              {\n                begin: XML_TAG.begin,\n                end: XML_TAG.end,\n                skip: true,\n                contains: ['self']\n              }\n            ]\n          }\n        ],\n        relevance: 0\n      },\n      {\n        className: 'function',\n        beginKeywords: 'function',\n        end: /[{;]/,\n        excludeEnd: true,\n        keywords: KEYWORDS$1,\n        contains: [\n          'self',\n          hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n          PARAMS\n        ],\n        illegal: /%/\n      },\n      {\n        // prevent this from getting swallowed up by function\n        // since they appear \"function like\"\n        beginKeywords: \"while if switch catch for\"\n      },\n      {\n        className: 'function',\n        // we have to count the parens to make sure we actually have the correct\n        // bounding ( ).  There could be any number of sub-expressions inside\n        // also surrounded by parens.\n        begin: hljs.UNDERSCORE_IDENT_RE +\n          '\\\\(' + // first parens\n          '[^()]*(\\\\(' +\n            '[^()]*(\\\\(' +\n              '[^()]*' +\n            '\\\\)[^()]*)*' +\n          '\\\\)[^()]*)*' +\n          '\\\\)\\\\s*\\\\{', // end parens\n        returnBegin:true,\n        contains: [\n          PARAMS,\n          hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n        ]\n      },\n      // hack: prevents detection of keywords in some circumstances\n      // .keyword()\n      // $keyword = x\n      {\n        variants: [\n          { begin: '\\\\.' + IDENT_RE$1 },\n          { begin: '\\\\$' + IDENT_RE$1 }\n        ],\n        relevance: 0\n      },\n      { // ES6 class\n        className: 'class',\n        beginKeywords: 'class',\n        end: /[{;=]/,\n        excludeEnd: true,\n        illegal: /[:\"[\\]]/,\n        contains: [\n          { beginKeywords: 'extends' },\n          hljs.UNDERSCORE_TITLE_MODE\n        ]\n      },\n      {\n        begin: /\\b(?=constructor)/,\n        end: /[{;]/,\n        excludeEnd: true,\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n          'self',\n          PARAMS\n        ]\n      },\n      {\n        begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n        end: /\\{/,\n        keywords: \"get set\",\n        contains: [\n          hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n          { begin: /\\(\\)/ }, // eat to avoid empty params\n          PARAMS\n        ]\n      },\n      {\n        begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n      }\n    ]\n  };\n}\n\nmodule.exports = javascript;\n", "/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n  if (!re) return null;\n  if (typeof re === \"string\") return re;\n\n  return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n  return concat('(?=', re, ')');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction optional(re) {\n  return concat('(', re, ')?');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n  const joined = args.map((x) => source(x)).join(\"\");\n  return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n  const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n  return joined;\n}\n\n/*\nLanguage: HTML, XML\nWebsite: https://www.w3.org/XML/\nCategory: common\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction xml(hljs) {\n  // Element names can contain letters, digits, hyphens, underscores, and periods\n  const TAG_NAME_RE = concat(/[A-Z_]/, optional(/[A-Z0-9_.-]*:/), /[A-Z0-9_.-]*/);\n  const XML_IDENT_RE = /[A-Za-z0-9._:-]+/;\n  const XML_ENTITIES = {\n    className: 'symbol',\n    begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/\n  };\n  const XML_META_KEYWORDS = {\n    begin: /\\s/,\n    contains: [\n      {\n        className: 'meta-keyword',\n        begin: /#?[a-z_][a-z1-9_-]+/,\n        illegal: /\\n/\n      }\n    ]\n  };\n  const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {\n    begin: /\\(/,\n    end: /\\)/\n  });\n  const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, {\n    className: 'meta-string'\n  });\n  const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {\n    className: 'meta-string'\n  });\n  const TAG_INTERNALS = {\n    endsWithParent: true,\n    illegal: /`]+/\n              }\n            ]\n          }\n        ]\n      }\n    ]\n  };\n  return {\n    name: 'HTML, XML',\n    aliases: [\n      'html',\n      'xhtml',\n      'rss',\n      'atom',\n      'xjb',\n      'xsd',\n      'xsl',\n      'plist',\n      'wsf',\n      'svg'\n    ],\n    case_insensitive: true,\n    contains: [\n      {\n        className: 'meta',\n        begin: //,\n        relevance: 10,\n        contains: [\n          XML_META_KEYWORDS,\n          QUOTE_META_STRING_MODE,\n          APOS_META_STRING_MODE,\n          XML_META_PAR_KEYWORDS,\n          {\n            begin: /\\[/,\n            end: /\\]/,\n            contains: [\n              {\n                className: 'meta',\n                begin: //,\n                contains: [\n                  XML_META_KEYWORDS,\n                  XML_META_PAR_KEYWORDS,\n                  QUOTE_META_STRING_MODE,\n                  APOS_META_STRING_MODE\n                ]\n              }\n            ]\n          }\n        ]\n      },\n      hljs.COMMENT(\n        //,\n        {\n          relevance: 10\n        }\n      ),\n      {\n        begin: //,\n        relevance: 10\n      },\n      XML_ENTITIES,\n      {\n        className: 'meta',\n        begin: /<\\?xml/,\n        end: /\\?>/,\n        relevance: 10\n      },\n      {\n        className: 'tag',\n        /*\n        The lookahead pattern (?=...) ensures that 'begin' only matches\n        ')/,\n        end: />/,\n        keywords: {\n          name: 'style'\n        },\n        contains: [ TAG_INTERNALS ],\n        starts: {\n          end: /<\\/style>/,\n          returnEnd: true,\n          subLanguage: [\n            'css',\n            'xml'\n          ]\n        }\n      },\n      {\n        className: 'tag',\n        // See the comment in the