Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Use vendorized javascript
Damian Kaczmarczykfe156182f89e
diff --git a/admin/app/assets/config/spree_admin_manifest.js b/admin/app/assets/config/spree_admin_manifest.jsindex f9f1b65221..869b66b313 100644--- a/admin/app/assets/config/spree_admin_manifest.js+++ b/admin/app/assets/config/spree_admin_manifest.js@@ -1,9 +1,8 @@//= link spree/admin/actiontext.css//= link spree/admin/application.css-//= link_directory ../../javascript/spree/admin/controllers .js-//= link_directory ../../javascript/spree/admin/helpers .js-//= link_directory ../../javascript/spree/admin/helpers/flatfile .js-//= link_directory ../../javascript/spree/admin/helpers/address_autocomplete .js-//= link spree/admin/helpers/trix/video_embed.js+//= link_tree ../../javascript/spree/admin/controllers .js+//= link_tree ../../javascript/spree/admin/helpers .js+//= link_tree ../../../vendor/javascript .js//= link spree/admin/application.js+diff --git a/admin/app/javascript/spree/admin/application.js b/admin/app/javascript/spree/admin/application.jsindex cd48a73d85..c32e6c79c9 100644--- a/admin/app/javascript/spree/admin/application.js+++ b/admin/app/javascript/spree/admin/application.js@@ -53,7 +53,6 @@ import Clipboard from 'spree/admin/controllers/clipboard_controller'import ColorPaletteController from 'spree/admin/controllers/color_palette_controller'import ColorPickerController from 'spree/admin/controllers/color_picker_controller'import FiltersController from 'spree/admin/controllers/filters_controller'-import FlatfileUploaderController from 'spree/admin/controllers/flatfile_uploader_controller'import FontPickerController from 'spree/admin/controllers/font_picker_controller'import MediaFormController from 'spree/admin/controllers/media_form_controller'import MultiInputController from 'spree/admin/controllers/multi_input_controller'@@ -100,7 +99,6 @@ application.register('color-palette', ColorPaletteController)application.register('color-picker', ColorPickerController)application.register('enable-button', EnableButtonController)application.register('filters', FiltersController)-application.register('flatfile-uploader', FlatfileUploaderController)application.register('font-picker', FontPickerController)application.register('media-form', MediaFormController)application.register('multi-input', MultiInputController)diff --git a/admin/app/javascript/spree/admin/controllers/flatfile_uploader_controller.js b/admin/app/javascript/spree/admin/controllers/flatfile_uploader_controller.jsdeleted file mode 100644index 5cc8c3f718..0000000000--- a/admin/app/javascript/spree/admin/controllers/flatfile_uploader_controller.js+++ /dev/null@@ -1,46 +0,0 @@-import { Controller } from '@hotwired/stimulus'-import { initializeFlatfile } from '@flatfile/javascript'--// import createSubmitDataListener from 'spree/admin/helpers/flatfile/create_submit_data_listener'-import { productsWorkbook } from 'spree/admin/helpers/flatfile/products_workbook'-import { customersWorkbook } from 'spree/admin/helpers/flatfile/customers_workbook'-import { postsWorkbook } from 'spree/admin/helpers/flatfile/posts_workbook'--export default class extends Controller {- static values = {- publishableKey: { type: String },- environmentId: { type: String },- kind: { type: String, default: 'products' },- productsPropertiesCount: { type: Number, default: 10 }- }-- open(event) {- event.preventDefault()-- const flatfileOptions = {- name: `Import ${this.kindValue}`,- publishableKey: this.publishableKeyValue,- environmentId: this.environmentIdValue,- workbook: this.workbook,- listener: createSubmitDataListener(this.kindValue),- sidebarConfig: {- showSidebar: false- }- }-- initializeFlatfile(flatfileOptions)- }-- get workbook() {- switch (this.kindValue) {- case 'products':- return productsWorkbook(this.productsPropertiesCountValue)- case 'customers':- return customersWorkbook- case 'posts':- return postsWorkbook- default:- return productsWorkbook- }- }-}diff --git a/admin/app/javascript/spree/admin/helpers/flatfile/create_submit_data_listener.js b/admin/app/javascript/spree/admin/helpers/flatfile/create_submit_data_listener.jsdeleted file mode 100644index affbb6c52c..0000000000--- a/admin/app/javascript/spree/admin/helpers/flatfile/create_submit_data_listener.js+++ /dev/null@@ -1,57 +0,0 @@-import { FlatfileListener } from "@flatfile/listener"-import api from "@flatfile/api";-import { post } from '@rails/request.js'-import { DirectUpload } from "@rails/activestorage"--export default function createSubmitDataListener(kind) {- return FlatfileListener.create((listener) => {- listener.on(- "job:ready",- { job: "workbook:submitData" },- async (event) => {- const { jobId, workbookId } = event.context- const { data: workbookSheets } = await api.sheets.list({ workbookId })-- const sheet = workbookSheets[0]- const { data: recordsData } = await api.records.get(sheet.id);-- try {- await api.jobs.ack(jobId, { info: "Submitting data...", progress: 10 })-- const file = new File([JSON.stringify(recordsData)], 'products-file', { type: "application/json" })- const directUploadUrl = document.querySelector("meta[name='direct-upload-url']").getAttribute("content")-- const upload = new DirectUpload(file, directUploadUrl)-- upload.create(async (error, blob) => {- if (error) {- console.error(error)- await api.jobs.fail(jobId, { outcome: { message: error } })- } else {- const response = await post('/admin/imports', {- body: JSON.stringify({- kind: kind,- file: blob.signed_id- }),- contentType: 'application/json',- responseKind: 'json'- })-- const responseBody = await response.json-- if (response.ok) {- await api.jobs.complete(jobId, { outcome: { message: "Data submitted! Redirecting..." } })- setTimeout(() => window.location.href = responseBody.import_url, 3000)- } else {- throw new Error(`An error occurred: ${responseBody.errors}`)- }- }- })- } catch (error) {- console.error(error)- await api.jobs.fail(jobId, { outcome: { message: error.message } })- }- }- )- })-}diff --git a/admin/app/javascript/spree/admin/helpers/flatfile/customers_workbook.js b/admin/app/javascript/spree/admin/helpers/flatfile/customers_workbook.jsdeleted file mode 100644index 0c23e4fdb0..0000000000--- a/admin/app/javascript/spree/admin/helpers/flatfile/customers_workbook.js+++ /dev/null@@ -1,113 +0,0 @@-export const customersWorkbook = {- name: "Customers",- sheets: [- {- name: 'Customers',- slug: 'customers',- fields: [- {- key: "first_name",- label: "First name",- type: "string"- },- {- key: "last_name",- label: "Last name",- type: "string"- },- {- key: "email",- label: "Email",- type: "string",- constraints: [- { type: "required" }- ]- },- {- key: "phone",- label: "Phone",- type: "string"- },- {- key: "accepts_email_marketing",- label: "Accepts email marketing",- type: "boolean"- },- {- key: "accepts_sms_marketing",- label: "Accepts SMS marketing",- type: "boolean"- },- {- key: "company",- label: "Company",- type: "string"- },- {- key: "address1",- label: "Address 1",- type: "string"- },- {- key: "address2",- label: "Address 2",- type: "string"- },- {- key: "zip",- label: "Zip",- type: "string"- },- {- key: "city",- label: "City",- type: "string"- },- {- key: "province",- label: "Province",- type: "string"- },- {- key: "province_code",- label: "Province code",- type: "string"- },- {- key: "country",- label: "Country",- type: "string"- },- {- key: "country_code",- label: "Country code",- type: "string"- },- {- key: "note",- label: "Note",- type: "string"- },- {- key: "tax_exempt",- label: "Tax exempt",- type: "boolean"- }- ]- }- ],- actions: [- {- operation: "submitData",- mode: "foreground",- label: "Submit data",- primary: true,- constraints: [- { type: 'hasData' }- ]- },- ],- settings: {- track_changes: true- }-}diff --git a/admin/app/javascript/spree/admin/helpers/flatfile/posts_workbook.js b/admin/app/javascript/spree/admin/helpers/flatfile/posts_workbook.jsdeleted file mode 100644index 5e7d304bc0..0000000000--- a/admin/app/javascript/spree/admin/helpers/flatfile/posts_workbook.js+++ /dev/null@@ -1,81 +0,0 @@-export const postsWorkbook = {- name: "Posts",- sheets: [- {- name: 'Posts',- slug: 'posts',- fields: [- {- key: "slug",- label: "Slug",- type: "string",- constraints: [- { type: "required" }- ]- },- {- key: "title",- label: "Title",- type: "string",- constraints: [- { type: "required" }- ]- },- {- key: "excerpt",- label: "Excerpt",- type: "string"- },- {- key: "content",- label: "Content",- type: "string"- },- {- key: "image_url",- label: "Image URL",- type: "string"- },- {- key: "published_at",- label: "Published at",- type: "date"- },- {- key: "post_category_name",- label: "Category name",- type: "string"- },- {- key: "post_category_slug",- label: "Category slug",- type: "string"- },- {- key: "meta_title",- label: "Meta title",- type: "string"- },- {- key: "meta_description",- label: "Meta description",- type: "string"- }- ]- }- ],- actions: [- {- operation: "submitData",- mode: "foreground",- label: "Submit data",- primary: true,- constraints: [- { type: 'hasData' }- ]- },- ],- settings: {- track_changes: true- }-}diff --git a/admin/app/javascript/spree/admin/helpers/flatfile/products_workbook.js b/admin/app/javascript/spree/admin/helpers/flatfile/products_workbook.jsdeleted file mode 100644index 5ee31afc85..0000000000--- a/admin/app/javascript/spree/admin/helpers/flatfile/products_workbook.js+++ /dev/null@@ -1,247 +0,0 @@-export function productsWorkbook(storeProductPropertiesCount) {- const fields = [- {- key: "product_id",- label: "Product Identifier",- type: "number",- constraints: [- { type: "required" }- ]- },- {- key: "slug",- label: "Slug",- type: "string"- },- {- key: "sku",- label: "SKU",- type: "string",- constraints: [- { type: "unique" }- ]- },- {- key: "name",- label: "Name",- type: "string"- },- {- key: "description",- label: "Description",- type: "string"- },- {- key: "price",- label: "Price",- type: "number",- constraints: [- { type: "required" }- ]- },- {- key: "compare_at_price",- label: "Compare at price",- type: "number"- },- {- key: "status",- label: "Status",- type: "enum",- config: {- options: [- { value: "draft", label: "Draft" },- { value: "active", label: "Active" },- { value: "archived", label: "Archived" }- ]- }- },- {- key: "track_inventory",- label: "Track Inventory",- type: "boolean"- },- {- key: "inventory_count",- label: "Inventory count",- type: "number"- },- {- key: "inventory_backorderable",- label: "Inventory Backorderable",- type: "boolean"- },- {- key: "tax_category",- label: "Tax category",- type: "string"- },- {- key: "tax_code",- label: "Tax code",- type: "string"- },- {- key: "digital",- label: "Digital",- type: "boolean"- },- {- key: "width",- label: "Width",- type: "number"- },- {- key: "depth",- label: "Depth",- type: "number"- },- {- key: "height",- label: "Height",- type: "number"- },- {- key: "weight",- label: "Weight",- type: "number"- },- {- key: "available_on",- label: "Available on",- type: "date"- },- {- key: "discontinue_on",- label: "Discontinue on",- type: "date"- },- {- key: "meta_title",- label: "SEO Title",- type: "string"- },- {- key: "meta_description",- label: "SEO Description",- type: "string"- },- {- key: "meta_keywords",- label: "SEO Keywords",- type: "string"- },- {- key: "tags",- label: "Tags",- type: "string"- },- {- key: "labels",- label: "Labels",- type: "string"- },- {- key: "image1_src",- label: "Image URL",- type: "string"- },- {- key: "image2_src",- label: "Image URL #2",- type: "string"- },- {- key: "image3_src",- label: "Image URL #3",- type: "string"- },- {- key: "option1_name",- label: "Option #1 name",- type: "string"- },- {- key: "option1_value",- label: "Option #1 value",- type: "string"- },- {- key: "option2_name",- label: "Option #2 name",- type: "string"- },- {- key: "option2_value",- label: "Option #2 value",- type: "string"- },- {- key: "option3_name",- label: "Option #3 name",- type: "string"- },- {- key: "option3_value",- label: "Option #3 value",- type: "string"- },- {- key: "category1",- label: "Category #1",- type: "string"- },- {- key: "category2",- label: "Category #2",- type: "string"- },- {- key: "category3",- label: "Category #3",- type: "string"- }- ]-- const propertiesCount = storeProductPropertiesCount < 20 ? 20 : storeProductPropertiesCount-- for (let n = 1; n <= propertiesCount; n++) {- fields.push(- {- key: `property${n}_name`,- label: `Property #${n} name`,- type: "string"- },- {- key: `property${n}_value`,- label: `Property #${n} value`,- type: "string"- }- )- }-- return {- name: "Products",- sheets: [- {- name: 'Products',- slug: 'products',- fields: fields- }- ],- actions: [- {- operation: "submitData",- mode: "foreground",- label: "Submit data",- primary: true,- constraints: [- { type: 'hasData' }- ]- },- ],- settings: {- track_changes: true- }- }-}diff --git a/admin/bin/importmap b/admin/bin/importmapnew file mode 100755index 0000000000..635fa0d03d--- /dev/null+++ b/admin/bin/importmap@@ -0,0 +1,10 @@+#!/usr/bin/env ruby+++ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)+require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])++require "rails"++require "importmap-rails"+require "importmap/commands"diff --git a/admin/config/importmap.rb b/admin/config/importmap.rbindex e17248820b..20b70aec01 100644--- a/admin/config/importmap.rb+++ b/admin/config/importmap.rb@@ -2,39 +2,38 @@ pin "application-spree-admin", to: "spree/admin/application.js"pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: ["application-spree-admin"]pin "@rails/actioncable", to: "actioncable.esm.js", preload: ["application-spree-admin"]-pin "@hotwired/stimulus", to: "stimulus.min.js", preload: ["application-spree-admin"]+pin "@hotwired/stimulus", to: "@hotwired--stimulus.js" # @3.2.2pin "@rails/activestorage", to: "activestorage.esm.js", preload: ["application-spree-admin"]-pin "@rails/actiontext", to: "https://ga.jspm.io/npm:@rails/[email protected]/app/assets/javascripts/actiontext.js", preload: ["application-spree-admin"]-#https://github.com/rails/requestjs-rails/issues/5#issuecomment-1017936902-pin "@rails/request.js", to: "https://ga.jspm.io/npm:@rails/[email protected]/src/index.js", preload: ["application-spree-admin"]-pin "sortablejs", to: "https://ga.jspm.io/npm:[email protected]/modular/sortable.esm.js", preload: ["application-spree-admin"]+pin "@rails/actiontext", to: "@rails--actiontext--app--assets--javascripts--actiontext.js.js", preload: ["application-spree-admin"]++pin "@rails/request.js", to: "@rails--request.js.js" # @0.0.8+pin "sortablejs", preload: ["application-spree-admin"] # @1.15.6pin "chartkick", to: "chartkick.js", preload: ["application-spree-admin"]pin "Chart.bundle", to: "Chart.bundle.js", preload: ["application-spree-admin"]-pin "local-time", to: "https://ga.jspm.io/npm:[email protected]/app/assets/javascripts/local-time.es2017-esm.js", preload: ["application-spree-admin"]+pin "local-time", preload: ["application-spree-admin"] # @3.0.2pin "mapkick/bundle", to: "mapkick.bundle.js", preload: ["application-spree-admin"]pin 'jquery', to: 'jquery3.min.js', preload: ["application-spree-admin"]-# Bootstrap 4 does not want to work with importmaps, after long debugging I found this comment which helped https://github.com/twbs/bootstrap-rubygem/issues/257#issuecomment-1707196465. Bootstrap has to be imported from jsdelivr.-pin "bootstrap", to: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js', preload: ["application-spree-admin"]+pin "bootstrap", to: "bootstrap--dist--js--bootstrap.bundle.min.js.js", preload: ["application-spree-admin"] # @4.6.1pin "tinymce", to: 'tinymce/tinymce.js', preload: ["application-spree-admin"]-pin "dompurify", to: 'https://ga.jspm.io/npm:[email protected]/dist/purify.es.mjs', preload: ["application-spree-admin"]+pin "dompurify", preload: ["application-spree-admin"] # @3.2.3# Stimulus components-pin "@stimulus-components/auto-submit", to: "https://ga.jspm.io/npm:@stimulus-components/[email protected]/dist/stimulus-auto-submit.mjs", preload: false-pin "@stimulus-components/rails-nested-form", to: "https://ga.jspm.io/npm:@stimulus-components/[email protected]/dist/stimulus-rails-nested-form.mjs", preload: false-pin "stimulus-notification", to: "https://ga.jspm.io/npm:[email protected]/dist/stimulus-notification.mjs", preload: false-pin "stimulus-password-visibility", to: "https://ga.jspm.io/npm:[email protected]/dist/stimulus-password-visibility.mjs", preload: false-pin "stimulus-reveal-controller", to: "https://ga.jspm.io/npm:[email protected]/dist/stimulus-reveal-controller.mjs", preload: false-pin "stimulus-sortable", to: "https://ga.jspm.io/npm:[email protected]/dist/stimulus-sortable.mjs", preload: false-pin "stimulus-textarea-autogrow", to: "https://ga.jspm.io/npm:[email protected]/dist/stimulus-textarea-autogrow.mjs", preload: false-pin "tailwindcss-stimulus-components", to: "https://ga.jspm.io/npm:[email protected]/dist/tailwindcss-stimulus-components.module.js", preload: false-pin "hotkeys-js", to: "https://ga.jspm.io/npm:[email protected]/dist/hotkeys.esm.js", preload: false-pin "sortablejs", to: "https://ga.jspm.io/npm:[email protected]/modular/sortable.esm.js", preload: false-pin "stimulus-use", to: "https://ga.jspm.io/npm:[email protected]/dist/index.js", preload: false-pin "stimulus-checkbox-select-all", to: "https://ga.jspm.io/npm:[email protected]/dist/stimulus-checkbox-select-all.mjs", preload: false-pin "stimulus-clipboard", to: "https://ga.jspm.io/npm:[email protected]/dist/stimulus-clipboard.mjs", preload: false+pin "@stimulus-components/auto-submit", to: "@stimulus-components--auto-submit.js", preload: ["application-spree-admin"] # @6.0.0+pin "@stimulus-components/rails-nested-form", to: "@stimulus-components--rails-nested-form.js", preload: ["application-spree-admin"] # @5.0.0+pin "stimulus-notification", preload: ["application-spree-admin"] # @2.2.0+pin "stimulus-password-visibility", preload: ["application-spree-admin"] # @2.1.1+pin "stimulus-reveal-controller", preload: ["application-spree-admin"] # @4.1.0+pin "stimulus-sortable", preload: ["application-spree-admin"] # @4.1.1+pin "stimulus-textarea-autogrow", preload: ["application-spree-admin"] # @4.1.0+pin "tailwindcss-stimulus-components", preload: ["application-spree-admin"] # @6.1.3+pin "hotkeys-js", preload: ["application-spree-admin"] # @3.13.9+pin "stimulus-use", preload: ["application-spree-admin"] # @0.51.3+pin "stimulus-checkbox-select-all", preload: ["application-spree-admin"] # @5.3.0+pin "stimulus-clipboard", preload: ["application-spree-admin"] # @4.0.1#-#Uppy+# Uppy+# Uppy can't be downloaded, it has many relative imports in the code, and importmaps don't handle leaving us with a broken imports.pin "@uppy/core", to: "https://ga.jspm.io/npm:@uppy/[email protected]/lib/index.js",preload: falsepin "@uppy/dashboard", to: "https://ga.jspm.io/npm:@uppy/[email protected]/lib/index.js",preload: falsepin "@uppy/image-editor", to: "https://ga.jspm.io/npm:@uppy/[email protected]/lib/index.js",preload: false@@ -86,85 +85,22 @@ pin "@noble/hashes/crypto", to: "https://ga.jspm.io/npm:@noble/[email protected]/cryppin "@noble/hashes/sha3", to: "https://ga.jspm.io/npm:@noble/[email protected]/sha3.js", preload: false#-#Tom Select+# Tom Select+# Same as Uppy, Tom Select can't be downloaded, it has many relative imports in the code, and importmaps don't handle leaving us with a broken imports.pin "tom-select/dist/esm/tom-select.complete.js", to: "https://ga.jspm.io/npm:[email protected]/dist/esm/tom-select.complete.js",preload: falsepin "@orchidjs/sifter", to: "https://ga.jspm.io/npm:@orchidjs/[email protected]/dist/esm/sifter.js", preload: falsepin "@orchidjs/unicode-variants", to: "https://ga.jspm.io/npm:@orchidjs/[email protected]/dist/esm/index.js", preload: false## Easepick-pin "@easepick/core", to: "https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js", preload: false-pin "@easepick/preset-plugin", to: "https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js", preload: false-pin "@easepick/range-plugin", to: "https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js", preload: false-pin "@easepick/base-plugin", to: "https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js", preload: false-pin "@easepick/datetime", to: "https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js", preload: false-#--# Flatfile-pin "@flatfile/javascript", to: "https://ga.jspm.io/npm:@flatfile/[email protected]/dist/index.mjs", preload: false-pin "#util.inspect.js", to: "https://ga.jspm.io/npm:@jspm/[email protected]/nodelibs/@empty.js", preload: false-pin "@flatfile/api", to: "https://ga.jspm.io/npm:@flatfile/[email protected]/index.js", preload: false-pin "@flatfile/cross-env-config", to: "https://ga.jspm.io/npm:@flatfile/[email protected]/dist/index.mjs", preload: false-pin "@flatfile/embedded-utils", to: "https://ga.jspm.io/npm:@flatfile/[email protected]/dist/index.browser.mjs", preload: false-pin "@flatfile/hooks", to: "https://ga.jspm.io/npm:@flatfile/[email protected]/dist/index.mjs", preload: false-pin "@flatfile/listener", to: "https://ga.jspm.io/npm:@flatfile/[email protected]/dist/index.browser.mjs", preload: false-pin "@flatfile/plugin-record-hook", to: "https://ga.jspm.io/npm:@flatfile/[email protected]/dist/index.browser.js", preload: false-pin "@flatfile/util-common", to: "https://ga.jspm.io/npm:@flatfile/[email protected]/dist/index.browser.js", preload: false-pin "buffer", to: "https://ga.jspm.io/npm:@jspm/[email protected]/nodelibs/browser/buffer.js", preload: false-pin "call-bind", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "call-bind-apply-helpers", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "call-bind-apply-helpers/applyBind", to: "https://ga.jspm.io/npm:[email protected]/applyBind.js", preload: false-pin "call-bind-apply-helpers/functionApply", to: "https://ga.jspm.io/npm:[email protected]/functionApply.js", preload: false-pin "call-bind-apply-helpers/functionCall", to: "https://ga.jspm.io/npm:[email protected]/functionCall.js", preload: false-pin "call-bound", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "cross-fetch", to: "https://ga.jspm.io/npm:[email protected]/dist/browser-ponyfill.js", preload: false-pin "define-data-property", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "dunder-proto/get", to: "https://ga.jspm.io/npm:[email protected]/get.js", preload: false-pin "es-define-property", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "es-errors", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "es-errors/eval", to: "https://ga.jspm.io/npm:[email protected]/eval.js", preload: false-pin "es-errors/range", to: "https://ga.jspm.io/npm:[email protected]/range.js", preload: false-pin "es-errors/ref", to: "https://ga.jspm.io/npm:[email protected]/ref.js", preload: false-pin "es-errors/syntax", to: "https://ga.jspm.io/npm:[email protected]/syntax.js", preload: false-pin "es-errors/type", to: "https://ga.jspm.io/npm:[email protected]/type.js", preload: false-pin "es-errors/uri", to: "https://ga.jspm.io/npm:[email protected]/uri.js", preload: false-pin "es-object-atoms", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "flat", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "form-data", to: "https://ga.jspm.io/npm:[email protected]/lib/browser.js", preload: false-pin "function-bind", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "get-intrinsic", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "get-proto", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "get-proto/Object.getPrototypeOf", to: "https://ga.jspm.io/npm:[email protected]/Object.getPrototypeOf.js", preload: false-pin "get-proto/Reflect.getPrototypeOf", to: "https://ga.jspm.io/npm:[email protected]/Reflect.getPrototypeOf.js", preload: false-pin "gopd", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "has-property-descriptors", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "has-symbols", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "hasown", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "i18next", to: "https://ga.jspm.io/npm:[email protected]/dist/esm/i18next.js", preload: false-pin "i18next-browser-languagedetector", to: "https://ga.jspm.io/npm:[email protected]/dist/esm/i18nextBrowserLanguageDetector.js", preload: false-pin "js-base64", to: "https://ga.jspm.io/npm:[email protected]/base64.js", preload: false-pin "math-intrinsics/abs", to: "https://ga.jspm.io/npm:[email protected]/abs.js", preload: false-pin "math-intrinsics/floor", to: "https://ga.jspm.io/npm:[email protected]/floor.js", preload: false-pin "math-intrinsics/max", to: "https://ga.jspm.io/npm:[email protected]/max.js", preload: false-pin "math-intrinsics/min", to: "https://ga.jspm.io/npm:[email protected]/min.js", preload: false-pin "math-intrinsics/pow", to: "https://ga.jspm.io/npm:[email protected]/pow.js", preload: false-pin "math-intrinsics/round", to: "https://ga.jspm.io/npm:[email protected]/round.js", preload: false-pin "math-intrinsics/sign", to: "https://ga.jspm.io/npm:[email protected]/sign.js", preload: false-pin "node-fetch", to: "https://ga.jspm.io/npm:[email protected]/browser.js", preload: false-pin "object-inspect", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "pako", to: "https://ga.jspm.io/npm:[email protected]/dist/pako.esm.mjs", preload: false-pin "process", to: "https://ga.jspm.io/npm:@jspm/[email protected]/nodelibs/browser/process-production.js", preload: false-pin "qs", to: "https://ga.jspm.io/npm:[email protected]/lib/index.js", preload: false-pin "set-function-length", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "side-channel", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "side-channel-list", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "side-channel-map", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "side-channel-weakmap", to: "https://ga.jspm.io/npm:[email protected]/index.js", preload: false-pin "url-join", to: "https://ga.jspm.io/npm:[email protected]/lib/url-join.js", preload: false-pin "wildcard-match", to: "https://ga.jspm.io/npm:[email protected]/build/index.es.mjs", preload: false+pin "@easepick/core", to: "@easepick--core.js" # @1.2.1+pin "@easepick/preset-plugin", to: "@easepick--preset-plugin.js" # @1.2.1+pin "@easepick/range-plugin", to: "@easepick--range-plugin.js" # @1.2.1+pin "@easepick/base-plugin", to: "@easepick--base-plugin.js" # @1.2.1+pin "@easepick/datetime", to: "@easepick--datetime.js" # @1.2.1#-pin "@simonwep/pickr", to: "https://ga.jspm.io/npm:@simonwep/[email protected]/dist/pickr.min.js", preload: false+pin "@simonwep/pickr", to: "@simonwep--pickr.js" # @1.9.1pin_all_from Spree::Admin::Engine.root.join("app/javascript/spree/admin/controllers"), under: "spree/admin/controllers", to: "spree/admin/controllers", preload: ["application-spree-admin"]pin_all_from Spree::Admin::Engine.root.join("app/javascript/spree/admin/helpers"), under: "spree/admin/helpers", to: "spree/admin/helpers", preload: ["application-spree-admin"]diff --git a/admin/lib/spree/admin/engine.rb b/admin/lib/spree/admin/engine.rbindex dcf10494ed..b807b7e860 100644--- a/admin/lib/spree/admin/engine.rb+++ b/admin/lib/spree/admin/engine.rb@@ -16,6 +16,7 @@ module Spreeinitializer 'spree.admin.assets' do |app|app.config.assets.paths << root.join('app/javascript')+ app.config.assets.paths << root.join('vendor/javascript')app.config.assets.precompile += %w[ spree_admin_manifest bootstrap.bundle.min.js jquery3.min.js ]enddiff --git a/admin/vendor/javascript/@easepick--base-plugin.js b/admin/vendor/javascript/@easepick--base-plugin.jsnew file mode 100644index 0000000000..d4d480e876--- /dev/null+++ b/admin/vendor/javascript/@easepick--base-plugin.js@@ -0,0 +1,4 @@+// @easepick/[email protected] downloaded from https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js++class e{picker;options;priority=0;dependencies=[];attach(t){const s=this.getName(),i={...this.options};this.options={...this.options,...t.options[s]||{}};for(const n of Object.keys(i))if(null!==i[n]&&"object"==typeof i[n]&&Object.keys(i[n]).length&&s in t.options&&n in t.options[s]){const o={...t.options[s][n]};null!==o&&"object"==typeof o&&Object.keys(o).length&&Object.keys(o).every((t=>Object.keys(i[n]).includes(t)))&&(this.options[n]={...i[n],...o})}if(this.picker=t,this.dependenciesNotFound()){const t=this.dependencies.filter((t=>!this.pluginsAsStringArray().includes(t)));return void console.warn(`${this.getName()}: required dependencies (${t.join(", ")}).`)}const n=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.add(n),this.onAttach()}detach(){const t=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.remove(t),"function"==typeof this.onDetach&&this.onDetach()}dependenciesNotFound(){return this.dependencies.length&&!this.dependencies.every((t=>this.pluginsAsStringArray().includes(t)))}pluginsAsStringArray(){return this.picker.options.plugins.map((t=>"function"==typeof t?(new t).getName():t))}camelCaseToKebab(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}}export{e as BasePlugin};+diff --git a/admin/vendor/javascript/@easepick--core.js b/admin/vendor/javascript/@easepick--core.jsnew file mode 100644index 0000000000..025ae78676--- /dev/null+++ b/admin/vendor/javascript/@easepick--core.js@@ -0,0 +1,4 @@+// @easepick/[email protected] downloaded from https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js++import{DateTime as e}from"@easepick/datetime";class t{picker;constructor(e){this.picker=e}render(s,a){s||(s=new e),s.setDate(1),s.setHours(0,0,0,0),"function"==typeof this[`get${a}View`]&&this[`get${a}View`](s)}getContainerView(e){this.picker.ui.container.innerHTML="",this.picker.options.header&&this.picker.trigger("render",{date:e.clone(),view:"Header"}),this.picker.trigger("render",{date:e.clone(),view:"Main"}),this.picker.options.autoApply||this.picker.trigger("render",{date:e.clone(),view:"Footer"})}getHeaderView(e){const s=document.createElement("header");this.picker.options.header instanceof HTMLElement&&s.appendChild(this.picker.options.header),"string"==typeof this.picker.options.header&&(s.innerHTML=this.picker.options.header),this.picker.ui.container.appendChild(s),this.picker.trigger("view",{target:s,date:e.clone(),view:"Header"})}getMainView(e){const s=document.createElement("main");this.picker.ui.container.appendChild(s);const a=document.createElement("div");a.className=`calendars grid-${this.picker.options.grid}`;for(let s=0;s<this.picker.options.calendars;s++){const o=document.createElement("div");o.className="calendar",a.appendChild(o);const r=this.getCalendarHeaderView(e.clone());o.appendChild(r),this.picker.trigger("view",{date:e.clone(),view:"CalendarHeader",index:s,target:r});const c=this.getCalendarDayNamesView();o.appendChild(c),this.picker.trigger("view",{date:e.clone(),view:"CalendarDayNames",index:s,target:c});const l=this.getCalendarDaysView(e.clone());o.appendChild(l),this.picker.trigger("view",{date:e.clone(),view:"CalendarDays",index:s,target:l});const d=this.getCalendarFooterView(this.picker.options.lang,e.clone());o.appendChild(d),this.picker.trigger("view",{date:e.clone(),view:"CalendarFooter",index:s,target:d}),this.picker.trigger("view",{date:e.clone(),view:"CalendarItem",index:s,target:o}),e.add(1,"month")}s.appendChild(a),this.picker.trigger("view",{date:e.clone(),view:"Calendars",target:a}),this.picker.trigger("view",{date:e.clone(),view:"Main",target:s})}getFooterView(e){const s=document.createElement("footer"),a=document.createElement("div");a.className="footer-buttons";const o=document.createElement("button");o.className="cancel-button unit",o.innerHTML=this.picker.options.locale.cancel,a.appendChild(o);const r=document.createElement("button");r.className="apply-button unit",r.innerHTML=this.picker.options.locale.apply,r.disabled=!0,a.appendChild(r),s.appendChild(a),this.picker.ui.container.appendChild(s),this.picker.trigger("view",{date:e,target:s,view:"Footer"})}getCalendarHeaderView(e){const s=document.createElement("div");s.className="header";const a=document.createElement("div");a.className="month-name",a.innerHTML=`<span>${e.toLocaleString(this.picker.options.lang,{month:"long"})}</span> ${e.format("YYYY")}`,s.appendChild(a);const o=document.createElement("button");o.className="previous-button unit",o.innerHTML=this.picker.options.locale.previousMonth,s.appendChild(o);const r=document.createElement("button");return r.className="next-button unit",r.innerHTML=this.picker.options.locale.nextMonth,s.appendChild(r),s}getCalendarDayNamesView(){const e=document.createElement("div");e.className="daynames-row";for(let s=1;s<=7;s++){const a=3+this.picker.options.firstDay+s,o=document.createElement("div");o.className="dayname",o.innerHTML=new Date(1970,0,a,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"short"}),o.title=new Date(1970,0,a,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"long"}),e.appendChild(o),this.picker.trigger("view",{dayIdx:a,view:"CalendarDayName",target:o})}return e}getCalendarDaysView(e){const s=document.createElement("div");s.className="days-grid";const a=this.calcOffsetDays(e,this.picker.options.firstDay),o=32-new Date(e.getFullYear(),e.getMonth(),32).getDate();for(let e=0;e<a;e++){const e=document.createElement("div");e.className="offset",s.appendChild(e)}for(let a=1;a<=o;a++){e.setDate(a);const o=this.getCalendarDayView(e);s.appendChild(o),this.picker.trigger("view",{date:e,view:"CalendarDay",target:o})}return s}getCalendarDayView(s){const a=this.picker.options.date?new e(this.picker.options.date):null,o=new e,r=document.createElement("div");return r.className="day unit",r.innerHTML=s.format("D"),r.dataset.time=String(s.getTime()),s.isSame(o,"day")&&r.classList.add("today"),[0,6].includes(s.getDay())&&r.classList.add("weekend"),this.picker.datePicked.length?this.picker.datePicked[0].isSame(s,"day")&&r.classList.add("selected"):a&&s.isSame(a,"day")&&r.classList.add("selected"),this.picker.trigger("view",{date:s,view:"CalendarDay",target:r}),r}getCalendarFooterView(e,s){const a=document.createElement("div");return a.className="footer",a}calcOffsetDays(e,s){let a=e.getDay()-s;return a<0&&(a+=7),a}}class i{picker;instances={};constructor(e){this.picker=e}initialize(){const e=[];this.picker.options.plugins.forEach((s=>{"function"==typeof s?e.push(new s):"string"==typeof s&&"undefined"!=typeof easepick&&Object.prototype.hasOwnProperty.call(easepick,s)?e.push(new easepick[s]):console.warn(`easepick: ${s} not found.`)})),e.sort(((e,s)=>e.priority>s.priority?-1:e.priority<s.priority||e.dependencies.length>s.dependencies.length?1:e.dependencies.length<s.dependencies.length?-1:0)),e.forEach((e=>{e.attach(this.picker),this.instances[e.getName()]=e}))}getInstance(e){return this.instances[e]}addInstance(e){if(Object.prototype.hasOwnProperty.call(this.instances,e))console.warn(`easepick: ${e} already added.`);else{if("undefined"!=typeof easepick&&Object.prototype.hasOwnProperty.call(easepick,e)){const s=new easepick[e];return s.attach(this.picker),this.instances[s.getName()]=s,s}if("undefined"!==this.getPluginFn(e)){const s=new(this.getPluginFn(e));return s.attach(this.picker),this.instances[s.getName()]=s,s}console.warn(`easepick: ${e} not found.`)}return null}removeInstance(e){return e in this.instances&&this.instances[e].detach(),delete this.instances[e]}reloadInstance(e){return this.removeInstance(e),this.addInstance(e)}getPluginFn(e){return[...this.picker.options.plugins].filter((s=>"function"==typeof s&&(new s).getName()===e)).shift()}}class n{Calendar=new t(this);PluginManager=new i(this);calendars=[];datePicked=[];cssLoaded=0;binds={hidePicker:this.hidePicker.bind(this),show:this.show.bind(this)};options={doc:document,css:[],element:null,firstDay:1,grid:1,calendars:1,lang:"en-US",date:null,format:"YYYY-MM-DD",readonly:!0,autoApply:!0,header:!1,inline:!1,scrollToDate:!0,locale:{nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',cancel:"Cancel",apply:"Apply"},documentClick:this.binds.hidePicker,plugins:[]};ui={container:null,shadowRoot:null,wrapper:null};version="1.2.1";constructor(e){const s={...this.options.locale,...e.locale};this.options={...this.options,...e},this.options.locale=s,this.handleOptions(),this.ui.wrapper=document.createElement("span"),this.ui.wrapper.style.display="none",this.ui.wrapper.style.position="absolute",this.ui.wrapper.style.pointerEvents="none",this.ui.wrapper.className="easepick-wrapper",this.ui.wrapper.attachShadow({mode:"open"}),this.ui.shadowRoot=this.ui.wrapper.shadowRoot,this.ui.container=document.createElement("div"),this.ui.container.className="container",this.options.zIndex&&(this.ui.container.style.zIndex=String(this.options.zIndex)),this.options.inline&&(this.ui.wrapper.style.position="relative",this.ui.container.classList.add("inline")),this.ui.shadowRoot.appendChild(this.ui.container),this.options.element.after(this.ui.wrapper),this.handleCSS(),this.options.element.addEventListener("click",this.binds.show),this.on("view",this.onView.bind(this)),this.on("render",this.onRender.bind(this)),this.PluginManager.initialize(),this.parseValues(),"function"==typeof this.options.setup&&this.options.setup(this),this.on("click",this.onClick.bind(this));const a=this.options.scrollToDate?this.getDate():null;this.renderAll(a)}on(e,s,a={}){this.ui.container.addEventListener(e,s,a)}off(e,s,a={}){this.ui.container.removeEventListener(e,s,a)}trigger(e,s={}){return this.ui.container.dispatchEvent(new CustomEvent(e,{detail:s}))}destroy(){this.options.element.removeEventListener("click",this.binds.show),"function"==typeof this.options.documentClick&&document.removeEventListener("click",this.options.documentClick,!0),Object.keys(this.PluginManager.instances).forEach((e=>{this.PluginManager.removeInstance(e)})),this.ui.wrapper.remove()}onRender(e){const{view:s,date:a}=e.detail;this.Calendar.render(a,s)}onView(e){const{view:s,target:a}=e.detail;"Footer"===s&&this.datePicked.length&&(a.querySelector(".apply-button").disabled=!1)}onClickHeaderButton(e){this.isCalendarHeaderButton(e)&&(e.classList.contains("next-button")?this.calendars[0].add(1,"month"):this.calendars[0].subtract(1,"month"),this.renderAll(this.calendars[0]))}onClickCalendarDay(s){if(this.isCalendarDay(s)){const a=new e(s.dataset.time);this.options.autoApply?(this.setDate(a),this.trigger("select",{date:this.getDate()}),this.hide()):(this.datePicked[0]=a,this.trigger("preselect",{date:this.getDate()}),this.renderAll())}}onClickApplyButton(e){if(this.isApplyButton(e)){if(this.datePicked[0]instanceof Date){const e=this.datePicked[0].clone();this.setDate(e)}this.hide(),this.trigger("select",{date:this.getDate()})}}onClickCancelButton(e){this.isCancelButton(e)&&this.hide()}onClick(e){const s=e.target;if(s instanceof HTMLElement){const e=s.closest(".unit");if(!(e instanceof HTMLElement))return;this.onClickHeaderButton(e),this.onClickCalendarDay(e),this.onClickApplyButton(e),this.onClickCancelButton(e)}}isShown(){return this.ui.container.classList.contains("inline")||this.ui.container.classList.contains("show")}show(e){if(this.isShown())return;const s=e&&"target"in e?e.target:this.options.element,{top:a,left:o}=this.adjustPosition(s);this.ui.container.style.top=`${a}px`,this.ui.container.style.left=`${o}px`,this.ui.container.classList.add("show"),this.trigger("show",{target:s})}hide(){this.ui.container.classList.remove("show"),this.datePicked.length=0,this.renderAll(),this.trigger("hide")}setDate(s){const a=new e(s,this.options.format);this.options.date=a.clone(),this.updateValues(),this.calendars.length&&this.renderAll()}getDate(){return this.options.date instanceof e?this.options.date.clone():null}parseValues(){this.options.date?this.setDate(this.options.date):this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.setDate(this.options.element.value),this.options.date instanceof Date||(this.options.date=null)}updateValues(){const e=this.getDate(),s=e instanceof Date?e.format(this.options.format,this.options.lang):"",a=this.options.element;a instanceof HTMLInputElement?a.value=s:a instanceof HTMLElement&&(a.innerText=s)}hidePicker(e){let s=e.target,a=null;s.shadowRoot&&(s=e.composedPath()[0],a=s.getRootNode().host),this.isShown()&&a!==this.ui.wrapper&&s!==this.options.element&&this.hide()}renderAll(e){this.trigger("render",{view:"Container",date:(e||this.calendars[0]).clone()})}isCalendarHeaderButton(e){return["previous-button","next-button"].some((s=>e.classList.contains(s)))}isCalendarDay(e){return e.classList.contains("day")}isApplyButton(e){return e.classList.contains("apply-button")}isCancelButton(e){return e.classList.contains("cancel-button")}gotoDate(s){const a=new e(s,this.options.format);a.setDate(1),this.calendars[0]=a.clone(),this.renderAll()}clear(){this.options.date=null,this.datePicked.length=0,this.updateValues(),this.renderAll(),this.trigger("clear")}handleOptions(){this.options.element instanceof HTMLElement||(this.options.element=this.options.doc.querySelector(this.options.element)),"function"==typeof this.options.documentClick&&document.addEventListener("click",this.options.documentClick,!0),this.options.element instanceof HTMLInputElement&&(this.options.element.readOnly=this.options.readonly),this.options.date?this.calendars[0]=new e(this.options.date,this.options.format):this.calendars[0]=new e}handleCSS(){if(Array.isArray(this.options.css))this.options.css.forEach((e=>{const s=document.createElement("link");s.href=e,s.rel="stylesheet";const i=()=>{this.cssLoaded++,this.cssLoaded===this.options.css.length&&(this.ui.wrapper.style.display="")};s.addEventListener("load",i),s.addEventListener("error",i),this.ui.shadowRoot.append(s)}));else if("string"==typeof this.options.css){const e=document.createElement("style"),s=document.createTextNode(this.options.css);e.appendChild(s),this.ui.shadowRoot.append(e),this.ui.wrapper.style.display=""}else"function"==typeof this.options.css&&(this.options.css.call(this,this),this.ui.wrapper.style.display="")}adjustPosition(e){const s=e.getBoundingClientRect(),a=this.ui.wrapper.getBoundingClientRect();this.ui.container.classList.add("calc");const o=this.ui.container.getBoundingClientRect();this.ui.container.classList.remove("calc");let r=s.bottom-a.bottom,c=s.left-a.left;return"undefined"!=typeof window&&(window.innerHeight<r+o.height&&r-o.height>=0&&(r=s.top-a.top-o.height),window.innerWidth<c+o.width&&s.right-o.width>=0&&(c=s.right-a.right-o.width)),{left:c,top:r}}}var s=Object.freeze({__proto__:null,Core:n,create:n});export{n as Core,n as create,s as easepick};+diff --git a/admin/vendor/javascript/@easepick--datetime.js b/admin/vendor/javascript/@easepick--datetime.jsnew file mode 100644index 0000000000..a33457748a--- /dev/null+++ b/admin/vendor/javascript/@easepick--datetime.js@@ -0,0 +1,4 @@+// @easepick/[email protected] downloaded from https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js++class t extends Date{static parseDateTime(e,s="YYYY-MM-DD",n="en-US"){if(!e)return new Date((new Date).setHours(0,0,0,0));if(e instanceof t)return e.toJSDate();if(e instanceof Date)return e;if(/^-?\d{10,}$/.test(String(e)))return new Date(Number(e));if("string"==typeof e){const r=[];let a=null;for(;null!=(a=t.regex.exec(s));)"\\"!==a[1]&&r.push(a);if(r.length){const s={year:null,month:null,shortMonth:null,longMonth:null,day:null,hour:0,minute:0,second:0,ampm:null,value:""};r[0].index>0&&(s.value+=".*?");for(const[e,a]of Object.entries(r)){const r=Number(e),{group:i,pattern:h}=t.formatPatterns(a[0],n);s[i]=r+1,s.value+=h,s.value+=".*?"}const a=new RegExp(`^${s.value}$`);if(a.test(e)){const r=a.exec(e),i=Number(r[s.year]);let h=null;s.month?h=Number(r[s.month])-1:s.shortMonth?h=t.shortMonths(n).indexOf(r[s.shortMonth]):s.longMonth&&(h=t.longMonths(n).indexOf(r[s.longMonth]));const g=Number(r[s.day])||1,o=Number(r[s.hour]);let u=Number.isNaN(o)?0:o;const c=Number(r[s.minute]),l=Number.isNaN(c)?0:c,m=Number(r[s.second]),d=Number.isNaN(m)?0:m,M=r[s.ampm];return M&&"PM"===M&&(u+=12,24===u&&(u=0)),new Date(i,h,g,u,l,d,0)}}}return new Date((new Date).setHours(0,0,0,0))}static regex=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|A|a)/g;static MONTH_JS=[0,1,2,3,4,5,6,7,8,9,10,11];static shortMonths(e){return t.MONTH_JS.map((s=>new Date(2019,s).toLocaleString(e,{month:"short"})))}static longMonths(e){return t.MONTH_JS.map((s=>new Date(2019,s).toLocaleString(e,{month:"long"})))}static formatPatterns(e,s){switch(e){case"YY":case"YYYY":return{group:"year",pattern:`(\\d{${e.length}})`};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:`(${t.shortMonths(s).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${t.longMonths(s).join("|")})`};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"};case"h":case"H":return{group:"hour",pattern:"(\\d{1,2})"};case"hh":case"HH":return{group:"hour",pattern:"(\\d{2})"};case"m":return{group:"minute",pattern:"(\\d{1,2})"};case"mm":return{group:"minute",pattern:"(\\d{2})"};case"s":return{group:"second",pattern:"(\\d{1,2})"};case"ss":return{group:"second",pattern:"(\\d{2})"};case"a":case"A":return{group:"ampm",pattern:"(AM|PM|am|pm)"}}}lang;constructor(e=null,s="YYYY-MM-DD",n="en-US"){super(t.parseDateTime(e,s,n)),this.lang=n}getWeek(e){const s=new Date(this.midnight_ts(this)),n=(this.getDay()+(7-e))%7;s.setDate(s.getDate()-n);const r=s.getTime();return s.setMonth(0,1),s.getDay()!==e&&s.setMonth(0,1+(4-s.getDay()+7)%7),1+Math.ceil((r-s.getTime())/6048e5)}clone(){return new t(this)}toJSDate(){return new Date(this)}inArray(e,s="[]"){return e.some((e=>e instanceof Array?this.isBetween(e[0],e[1],s):this.isSame(e,"day")))}isBetween(e,s,n="()"){switch(n){default:case"()":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(s);case"[)":return this.midnight_ts(this)>=this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(s);case"(]":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<=this.midnight_ts(s);case"[]":return this.midnight_ts()>=this.midnight_ts(e)&&this.midnight_ts()<=this.midnight_ts(s)}}isBefore(e,s="days"){switch(s){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return e.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")}isSameOrBefore(e,s="days"){switch(s){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")}isAfter(e,s="days"){switch(s){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(e.getFullYear(),e.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>e.getFullYear()}throw new Error("isAfter: Invalid unit!")}isSameOrAfter(e,s="days"){switch(s){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")}isSame(e,s="days"){switch(s){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")}add(e,s="days"){switch(s){case"day":case"days":this.setDate(this.getDate()+e);break;case"month":case"months":this.setMonth(this.getMonth()+e)}return this}subtract(e,s="days"){switch(s){case"day":case"days":this.setDate(this.getDate()-e);break;case"month":case"months":this.setMonth(this.getMonth()-e)}return this}diff(e,s="days"){switch(s){default:case"day":case"days":return Math.round((this.midnight_ts()-this.midnight_ts(e))/864e5);case"month":case"months":let s=12*(e.getFullYear()-this.getFullYear());return s-=e.getMonth(),s+=this.getMonth(),s}}format(e,s="en-US"){let n="";const r=[];let a=null;for(;null!=(a=t.regex.exec(e));)"\\"!==a[1]&&r.push(a);if(r.length){r[0].index>0&&(n+=e.substring(0,r[0].index));for(const[a,i]of Object.entries(r)){const h=Number(a);n+=this.formatTokens(i[0],s),r[h+1]&&(n+=e.substring(i.index+i[0].length,r[h+1].index)),h===r.length-1&&(n+=e.substring(i.index+i[0].length))}}return n.replace(/\\/g,"")}midnight_ts(e){return e?new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0).getTime():new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()}formatTokens(e,s){switch(e){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return`0${this.getMonth()+1}`.slice(-2);case"MMM":return t.shortMonths(s)[this.getMonth()];case"MMMM":return t.longMonths(s)[this.getMonth()];case"D":return String(this.getDate());case"DD":return`0${this.getDate()}`.slice(-2);case"H":return String(this.getHours());case"HH":return`0${this.getHours()}`.slice(-2);case"h":return String(this.getHours()%12||12);case"hh":return`0${this.getHours()%12||12}`.slice(-2);case"m":return String(this.getMinutes());case"mm":return`0${this.getMinutes()}`.slice(-2);case"s":return String(this.getSeconds());case"ss":return`0${this.getSeconds()}`.slice(-2);case"a":return this.getHours()<12||24===this.getHours()?"am":"pm";case"A":return this.getHours()<12||24===this.getHours()?"AM":"PM";default:return""}}}export{t as DateTime};+diff --git a/admin/vendor/javascript/@easepick--preset-plugin.js b/admin/vendor/javascript/@easepick--preset-plugin.jsnew file mode 100644index 0000000000..aeaa615865--- /dev/null+++ b/admin/vendor/javascript/@easepick--preset-plugin.js@@ -0,0 +1,4 @@+// @easepick/[email protected] downloaded from https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js++import{DateTime as t}from"@easepick/datetime";import{BasePlugin as e}from"@easepick/base-plugin";class s extends e{dependencies=["RangePlugin"];binds={onView:this.onView.bind(this),onClick:this.onClick.bind(this)};options={customLabels:["Today","Yesterday","Last 7 Days","Last 30 Days","This Month","Last Month"],customPreset:{},position:"left"};getName(){return"PresetPlugin"}onAttach(){if(!Object.keys(this.options.customPreset).length){const e=new t,s=()=>{const n=e.clone();n.setDate(1);const o=new Date(e.getFullYear(),e.getMonth()+1,0);return[new t(n),new t(o)]},i=()=>{const n=e.clone();n.setMonth(n.getMonth()-1),n.setDate(1);const o=new Date(e.getFullYear(),e.getMonth(),0);return[new t(n),new t(o)]},n=[[e.clone(),e.clone()],[e.clone().subtract(1,"day"),e.clone().subtract(1,"day")],[e.clone().subtract(6,"day"),e.clone()],[e.clone().subtract(29,"day"),e.clone()],s(),i()];Object.values(this.options.customLabels).forEach(((t,e)=>{this.options.customPreset[t]=n[e]}))}this.picker.on("view",this.binds.onView),this.picker.on("click",this.binds.onClick)}onDetach(){this.picker.off("view",this.binds.onView),this.picker.off("click",this.binds.onClick)}onView(t){const{view:e,target:n}=t.detail;if("Main"===e){const t=document.createElement("div");t.className="preset-plugin-container",Object.keys(this.options.customPreset).forEach((e=>{if(Object.prototype.hasOwnProperty.call(this.options.customPreset,e)){const n=this.options.customPreset[e],o=document.createElement("button");o.className="preset-button unit",o.innerHTML=e,o.dataset.start=n[0].getTime(),o.dataset.end=n[1].getTime(),t.appendChild(o),this.picker.trigger("view",{view:"PresetPluginButton",target:o})}})),n.appendChild(t),n.classList.add(`preset-${this.options.position}`),this.picker.trigger("view",{view:"PresetPluginContainer",target:t})}}onClick(e){const n=e.target;if(n instanceof HTMLElement){const e=n.closest(".unit");if(!(e instanceof HTMLElement))return;if(this.isPresetButton(e)){const n=new t(Number(e.dataset.start)),o=new t(Number(e.dataset.end));this.picker.options.autoApply?(this.picker.setDateRange(n,o),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide()):(this.picker.datePicked=[n,o],this.picker.renderAll())}}}isPresetButton(t){return t.classList.contains("preset-button")}}export{s as PresetPlugin};+diff --git a/admin/vendor/javascript/@easepick--range-plugin.js b/admin/vendor/javascript/@easepick--range-plugin.jsnew file mode 100644index 0000000000..c52b9e789e--- /dev/null+++ b/admin/vendor/javascript/@easepick--range-plugin.js@@ -0,0 +1,4 @@+// @easepick/[email protected] downloaded from https://ga.jspm.io/npm:@easepick/[email protected]/dist/index.esm.js++import{DateTime as t}from"@easepick/datetime";import{BasePlugin as e}from"@easepick/base-plugin";class i extends e{tooltipElement;triggerElement;binds={setStartDate:this.setStartDate.bind(this),setEndDate:this.setEndDate.bind(this),setDateRange:this.setDateRange.bind(this),getStartDate:this.getStartDate.bind(this),getEndDate:this.getEndDate.bind(this),onView:this.onView.bind(this),onShow:this.onShow.bind(this),onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),onClickCalendarDay:this.onClickCalendarDay.bind(this),onClickApplyButton:this.onClickApplyButton.bind(this),parseValues:this.parseValues.bind(this),updateValues:this.updateValues.bind(this),clear:this.clear.bind(this)};options={elementEnd:null,startDate:null,endDate:null,repick:!1,strict:!0,delimiter:" - ",tooltip:!0,tooltipNumber:t=>t,locale:{zero:"",one:"day",two:"",few:"",many:"",other:"days"},documentClick:this.hidePicker.bind(this)};getName(){return"RangePlugin"}onAttach(){this.binds._setStartDate=this.picker.setStartDate,this.binds._setEndDate=this.picker.setEndDate,this.binds._setDateRange=this.picker.setDateRange,this.binds._getStartDate=this.picker.getStartDate,this.binds._getEndDate=this.picker.getEndDate,this.binds._parseValues=this.picker.parseValues,this.binds._updateValues=this.picker.updateValues,this.binds._clear=this.picker.clear,this.binds._onClickCalendarDay=this.picker.onClickCalendarDay,this.binds._onClickApplyButton=this.picker.onClickApplyButton,Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds.setStartDate},setEndDate:{configurable:!0,value:this.binds.setEndDate},setDateRange:{configurable:!0,value:this.binds.setDateRange},getStartDate:{configurable:!0,value:this.binds.getStartDate},getEndDate:{configurable:!0,value:this.binds.getEndDate},parseValues:{configurable:!0,value:this.binds.parseValues},updateValues:{configurable:!0,value:this.binds.updateValues},clear:{configurable:!0,value:this.binds.clear},onClickCalendarDay:{configurable:!0,value:this.binds.onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds.onClickApplyButton}}),this.options.elementEnd&&(this.options.elementEnd instanceof HTMLElement||(this.options.elementEnd=this.picker.options.doc.querySelector(this.options.elementEnd)),this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.readOnly=this.picker.options.readonly),"function"==typeof this.picker.options.documentClick&&(document.removeEventListener("click",this.picker.options.documentClick,!0),"function"==typeof this.options.documentClick&&document.addEventListener("click",this.options.documentClick,!0)),this.options.elementEnd.addEventListener("click",this.picker.show.bind(this.picker))),this.options.repick=this.options.repick&&this.options.elementEnd instanceof HTMLElement,this.picker.options.date=null,this.picker.on("view",this.binds.onView),this.picker.on("show",this.binds.onShow),this.picker.on("mouseenter",this.binds.onMouseEnter,!0),this.picker.on("mouseleave",this.binds.onMouseLeave,!0),this.checkIntlPluralLocales()}onDetach(){Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds._setStartDate},setEndDate:{configurable:!0,value:this.binds._setEndDate},setDateRange:{configurable:!0,value:this.binds._setDateRange},getStartDate:{configurable:!0,value:this.binds._getStartDate},getEndDate:{configurable:!0,value:this.binds._getEndDate},parseValues:{configurable:!0,value:this.binds._parseValues},updateValues:{configurable:!0,value:this.binds._updateValues},clear:{configurable:!0,value:this.binds._clear},onClickCalendarDay:{configurable:!0,value:this.binds._onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds._onClickApplyButton}}),this.picker.off("view",this.binds.onView),this.picker.off("show",this.binds.onShow),this.picker.off("mouseenter",this.binds.onMouseEnter,!0),this.picker.off("mouseleave",this.binds.onMouseLeave,!0)}parseValues(){if(this.options.startDate||this.options.endDate)this.options.strict?this.options.startDate&&this.options.endDate?this.setDateRange(this.options.startDate,this.options.endDate):(this.options.startDate=null,this.options.endDate=null):(this.options.startDate&&this.setStartDate(this.options.startDate),this.options.endDate&&this.setEndDate(this.options.endDate));else if(this.options.elementEnd)this.options.strict?this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setDateRange(this.picker.options.element.value,this.options.elementEnd.value):(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.setStartDate(this.picker.options.element.value),this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setEndDate(this.options.elementEnd.value));else if(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length){const[t,e]=this.picker.options.element.value.split(this.options.delimiter);this.options.strict?t&&e&&this.setDateRange(t,e):(t&&this.setStartDate(t),e&&this.setEndDate(e))}}updateValues(){const t=this.picker.options.element,e=this.options.elementEnd,s=this.picker.getStartDate(),n=this.picker.getEndDate(),a=s instanceof Date?s.format(this.picker.options.format,this.picker.options.lang):"",o=n instanceof Date?n.format(this.picker.options.format,this.picker.options.lang):"";if(e)t instanceof HTMLInputElement?t.value=a:t instanceof HTMLElement&&(t.innerText=a),e instanceof HTMLInputElement?e.value=o:e instanceof HTMLElement&&(e.innerText=o);else{const e=`${a}${a||o?this.options.delimiter:""}${o}`;t instanceof HTMLInputElement?t.value=e:t instanceof HTMLElement&&(t.innerText=e)}}clear(){this.options.startDate=null,this.options.endDate=null,this.picker.datePicked.length=0,this.updateValues(),this.picker.renderAll(),this.picker.trigger("clear")}onShow(t){const{target:e}=t.detail;this.triggerElement=e,this.picker.options.scrollToDate&&this.getStartDate()instanceof Date&&this.picker.gotoDate(this.getStartDate()),this.initializeRepick()}onView(e){const{view:s,target:n}=e.detail;if("Main"===s&&(this.tooltipElement=document.createElement("span"),this.tooltipElement.className="range-plugin-tooltip",n.appendChild(this.tooltipElement)),"CalendarDay"===s){const e=new t(n.dataset.time),s=this.picker.datePicked,a=s.length?this.picker.datePicked[0]:this.getStartDate(),o=s.length?this.picker.datePicked[1]:this.getEndDate();a&&a.isSame(e,"day")&&n.classList.add("start"),a&&o&&(o.isSame(e,"day")&&n.classList.add("end"),e.isBetween(a,o)&&n.classList.add("in-range"))}if("Footer"===s){const t=1===this.picker.datePicked.length&&!this.options.strict||2===this.picker.datePicked.length;n.querySelector(".apply-button").disabled=!t}}hidePicker(t){let e=t.target,s=null;e.shadowRoot&&(e=t.composedPath()[0],s=e.getRootNode().host),this.picker.isShown()&&s!==this.picker.ui.wrapper&&e!==this.picker.options.element&&e!==this.options.elementEnd&&this.picker.hide()}setStartDate(e){const s=new t(e,this.picker.options.format);this.options.startDate=s?s.clone():null,this.updateValues(),this.picker.renderAll()}setEndDate(e){const s=new t(e,this.picker.options.format);this.options.endDate=s?s.clone():null,this.updateValues(),this.picker.renderAll()}setDateRange(e,s){const n=new t(e,this.picker.options.format),a=new t(s,this.picker.options.format);this.options.startDate=n?n.clone():null,this.options.endDate=a?a.clone():null,this.updateValues(),this.picker.renderAll()}getStartDate(){return this.options.startDate instanceof Date?this.options.startDate.clone():null}getEndDate(){return this.options.endDate instanceof Date?this.options.endDate.clone():null}onMouseEnter(e){const s=e.target;if(s instanceof HTMLElement){this.isContainer(s)&&this.initializeRepick();const e=s.closest(".unit");if(!(e instanceof HTMLElement))return;if(this.picker.isCalendarDay(e)){if(1!==this.picker.datePicked.length)return;let s=this.picker.datePicked[0].clone(),n=new t(e.dataset.time),a=!1;if(s.isAfter(n,"day")){const t=s.clone();s=n.clone(),n=t.clone(),a=!0}if([...this.picker.ui.container.querySelectorAll(".day")].forEach((o=>{const l=new t(o.dataset.time),r=this.picker.Calendar.getCalendarDayView(l);l.isBetween(s,n)&&r.classList.add("in-range"),l.isSame(this.picker.datePicked[0],"day")&&(r.classList.add("start"),r.classList.toggle("flipped",a)),o===e&&(r.classList.add("end"),r.classList.toggle("flipped",a)),o.className=r.className})),this.options.tooltip){const t=this.options.tooltipNumber(n.diff(s,"day")+1);if(t>0){const s=new Intl.PluralRules(this.picker.options.lang).select(t),n=`${t} ${this.options.locale[s]}`;this.showTooltip(e,n)}else this.hideTooltip()}}}}onMouseLeave(t){if(this.isContainer(t.target)&&this.options.repick){const t=this.getStartDate(),e=this.getEndDate();t&&e&&(this.picker.datePicked.length=0,this.picker.renderAll())}}onClickCalendarDay(e){if(this.picker.isCalendarDay(e)){2===this.picker.datePicked.length&&(this.picker.datePicked.length=0);const s=new t(e.dataset.time);if(this.picker.datePicked[this.picker.datePicked.length]=s,2===this.picker.datePicked.length&&this.picker.datePicked[0].isAfter(this.picker.datePicked[1])){const t=this.picker.datePicked[1].clone();this.picker.datePicked[1]=this.picker.datePicked[0].clone(),this.picker.datePicked[0]=t.clone()}1!==this.picker.datePicked.length&&this.picker.options.autoApply||this.picker.trigger("preselect",{start:this.picker.datePicked[0]instanceof Date?this.picker.datePicked[0].clone():null,end:this.picker.datePicked[1]instanceof Date?this.picker.datePicked[1].clone():null}),1===this.picker.datePicked.length&&(!this.options.strict&&this.picker.options.autoApply&&(this.picker.options.element===this.triggerElement&&this.setStartDate(this.picker.datePicked[0]),this.options.elementEnd===this.triggerElement&&this.setEndDate(this.picker.datePicked[0]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()})),this.picker.renderAll()),2===this.picker.datePicked.length&&(this.picker.options.autoApply?(this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide()):(this.hideTooltip(),this.picker.renderAll()))}}onClickApplyButton(t){this.picker.isApplyButton(t)&&(1!==this.picker.datePicked.length||this.options.strict||(this.picker.options.element===this.triggerElement&&(this.options.endDate=null,this.setStartDate(this.picker.datePicked[0])),this.options.elementEnd===this.triggerElement&&(this.options.startDate=null,this.setEndDate(this.picker.datePicked[0]))),2===this.picker.datePicked.length&&this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide())}showTooltip(t,e){this.tooltipElement.style.visibility="visible",this.tooltipElement.innerHTML=e;const s=this.picker.ui.container.getBoundingClientRect(),n=this.tooltipElement.getBoundingClientRect(),a=t.getBoundingClientRect();let o=a.top,l=a.left;o-=s.top,l-=s.left,o-=n.height,l-=n.width/2,l+=a.width/2,this.tooltipElement.style.top=`${o}px`,this.tooltipElement.style.left=`${l}px`}hideTooltip(){this.tooltipElement.style.visibility="hidden"}checkIntlPluralLocales(){if(!this.options.tooltip)return;const t=[...new Set([new Intl.PluralRules(this.picker.options.lang).select(0),new Intl.PluralRules(this.picker.options.lang).select(1),new Intl.PluralRules(this.picker.options.lang).select(2),new Intl.PluralRules(this.picker.options.lang).select(6),new Intl.PluralRules(this.picker.options.lang).select(18)])],e=Object.keys(this.options.locale);t.every((t=>e.includes(t)))||console.warn(`${this.getName()}: provide locales (${t.join(", ")}) for correct tooltip text.`)}initializeRepick(){if(!this.options.repick)return;const t=this.getStartDate(),e=this.getEndDate();e&&this.triggerElement===this.picker.options.element&&(this.picker.datePicked[0]=e),t&&this.triggerElement===this.options.elementEnd&&(this.picker.datePicked[0]=t)}isContainer(t){return t===this.picker.ui.container}}export{i as RangePlugin};+diff --git a/admin/vendor/javascript/@hotwired--stimulus.js b/admin/vendor/javascript/@hotwired--stimulus.jsnew file mode 100644index 0000000000..07dd4a6cc3--- /dev/null+++ b/admin/vendor/javascript/@hotwired--stimulus.js@@ -0,0 +1,4 @@+// @hotwired/[email protected] downloaded from https://ga.jspm.io/npm:@hotwired/[email protected]/dist/stimulus.js++class EventListener{constructor(e,t,r){this.eventTarget=e;this.eventName=t;this.eventOptions=r;this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=extendEvent(e);for(const e of this.bindings){if(t.immediatePropagationStopped)break;e.handleEvent(t)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort(((e,t)=>{const r=e.index,s=t.index;return r<s?-1:r>s?1:0}))}}function extendEvent(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:false,stopImmediatePropagation(){this.immediatePropagationStopped=true;t.call(this)}})}}class Dispatcher{constructor(e){this.application=e;this.eventListenerMaps=new Map;this.started=false}start(){if(!this.started){this.started=true;this.eventListeners.forEach((e=>e.connect()))}}stop(){if(this.started){this.started=false;this.eventListeners.forEach((e=>e.disconnect()))}}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((e,t)=>e.concat(Array.from(t.values()))),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=false){this.fetchEventListenerForBinding(e).bindingDisconnected(e);t&&this.clearEventListenersForBinding(e)}handleError(e,t,r={}){this.application.handleError(e,`Error ${t}`,r)}clearEventListenersForBinding(e){const t=this.fetchEventListenerForBinding(e);if(!t.hasBindings()){t.disconnect();this.removeMappedEventListenerFor(e)}}removeMappedEventListenerFor(e){const{eventTarget:t,eventName:r,eventOptions:s}=e;const n=this.fetchEventListenerMapForEventTarget(t);const i=this.cacheKey(r,s);n.delete(i);0==n.size&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:r,eventOptions:s}=e;return this.fetchEventListener(t,r,s)}fetchEventListener(e,t,r){const s=this.fetchEventListenerMapForEventTarget(e);const n=this.cacheKey(t,r);let i=s.get(n);if(!i){i=this.createEventListener(e,t,r);s.set(n,i)}return i}createEventListener(e,t,r){const s=new EventListener(e,t,r);this.started&&s.connect();return s}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);if(!t){t=new Map;this.eventListenerMaps.set(e,t)}return t}cacheKey(e,t){const r=[e];Object.keys(t).sort().forEach((e=>{r.push(`${t[e]?"":"!"}${e}`)}));return r.join(":")}}const e={stop({event:e,value:t}){t&&e.stopPropagation();return true},prevent({event:e,value:t}){t&&e.preventDefault();return true},self({event:e,value:t,element:r}){return!t||r===e.target}};const t=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function parseActionDescriptorString(e){const r=e.trim();const s=r.match(t)||[];let n=s[2];let i=s[3];if(i&&!["keydown","keyup","keypress"].includes(n)){n+=`.${i}`;i=""}return{eventTarget:parseEventTarget(s[4]),eventName:n,eventOptions:s[7]?parseEventOptions(s[7]):{},identifier:s[5],methodName:s[6],keyFilter:s[1]||i}}function parseEventTarget(e){return"window"==e?window:"document"==e?document:void 0}function parseEventOptions(e){return e.split(":").reduce(((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)})),{})}function stringifyEventTarget(e){return e==window?"window":e==document?"document":void 0}function camelize(e){return e.replace(/(?:[_-])([a-z0-9])/g,((e,t)=>t.toUpperCase()))}function namespaceCamelize(e){return camelize(e.replace(/--/g,"-").replace(/__/g,"_"))}function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function dasherize(e){return e.replace(/([A-Z])/g,((e,t)=>`-${t.toLowerCase()}`))}function tokenize(e){return e.match(/[^\s]+/g)||[]}function isSomething(e){return null!==e&&void 0!==e}function hasProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const r=["meta","ctrl","alt","shift"];class Action{constructor(e,t,r,s){this.element=e;this.index=t;this.eventTarget=r.eventTarget||e;this.eventName=r.eventName||getDefaultEventNameForElement(e)||error("missing event name");this.eventOptions=r.eventOptions||{};this.identifier=r.identifier||error("missing identifier");this.methodName=r.methodName||error("missing method name");this.keyFilter=r.keyFilter||"";this.schema=s}static forToken(e,t){return new this(e.element,e.index,parseActionDescriptorString(e.content),t)}toString(){const e=this.keyFilter?`.${this.keyFilter}`:"";const t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return false;const t=this.keyFilter.split("+");if(this.keyFilterDissatisfied(e,t))return true;const s=t.filter((e=>!r.includes(e)))[0];if(!s)return false;hasProperty(this.keyMappings,s)||error(`contains unknown key filter: ${this.keyFilter}`);return this.keyMappings[s].toLowerCase()!==e.key.toLowerCase()}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return false;const t=[this.keyFilter];return!!this.keyFilterDissatisfied(e,t)}get params(){const e={};const t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:r,value:s}of Array.from(this.element.attributes)){const n=r.match(t);const i=n&&n[1];i&&(e[camelize(i)]=typecast(s))}return e}get eventTargetName(){return stringifyEventTarget(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,t){const[s,n,i,o]=r.map((e=>t.includes(e)));return e.metaKey!==s||e.ctrlKey!==n||e.altKey!==i||e.shiftKey!==o}}const s={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function getDefaultEventNameForElement(e){const t=e.tagName.toLowerCase();if(t in s)return s[t](e)}function error(e){throw new Error(e)}function typecast(e){try{return JSON.parse(e)}catch(t){return e}}class Binding{constructor(e,t){this.context=e;this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){const t=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){const{element:t}=this.action;const{actionDescriptorFilters:r}=this.context.application;const{controller:s}=this.context;let n=true;for(const[i,o]of Object.entries(this.eventOptions))if(i in r){const c=r[i];n=n&&c({name:i,value:o,event:e,element:t,controller:s})}return n}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){const{target:t,currentTarget:r}=e;try{this.method.call(this.controller,e);this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:r,action:this.methodName})}catch(t){const{identifier:r,controller:s,element:n,index:i}=this;const o={identifier:r,controller:s,element:n,index:i,event:e};this.context.handleError(t,`invoking action "${this.action}"`,o)}}willBeInvokedByEvent(e){const t=e.target;return!(e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e))&&(!(e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e))&&(this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class ElementObserver{constructor(e,t){this.mutationObserverInit={attributes:true,childList:true,subtree:true};this.element=e;this.started=false;this.delegate=t;this.elements=new Set;this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){if(!this.started){this.started=true;this.mutationObserver.observe(this.element,this.mutationObserverInit);this.refresh()}}pause(e){if(this.started){this.mutationObserver.disconnect();this.started=false}e();if(!this.started){this.mutationObserver.observe(this.element,this.mutationObserverInit);this.started=true}}stop(){if(this.started){this.mutationObserver.takeRecords();this.mutationObserver.disconnect();this.started=false}}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){if("attributes"==e.type)this.processAttributeChange(e.target,e.attributeName);else if("childList"==e.type){this.processRemovedNodes(e.removedNodes);this.processAddedNodes(e.addedNodes)}}processAttributeChange(e,t){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,t):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const r of this.matchElementsInTree(e))t.call(this,r)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){if(!this.elements.has(e)&&this.elementIsActive(e)){this.elements.add(e);this.delegate.elementMatched&&this.delegate.elementMatched(e)}}removeElement(e){if(this.elements.has(e)){this.elements.delete(e);this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e)}}}class AttributeObserver{constructor(e,t,r){this.attributeName=t;this.delegate=r;this.elementObserver=new ElementObserver(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[];const r=Array.from(e.querySelectorAll(this.selector));return t.concat(r)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}function add(e,t,r){fetch(e,t).add(r)}function del(e,t,r){fetch(e,t).delete(r);prune(e,t)}function fetch(e,t){let r=e.get(t);if(!r){r=new Set;e.set(t,r)}return r}function prune(e,t){const r=e.get(t);null!=r&&0==r.size&&e.delete(t)}class Multimap{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){const e=Array.from(this.valuesByKey.values());return e.reduce(((e,t)=>e.concat(Array.from(t))),[])}get size(){const e=Array.from(this.valuesByKey.values());return e.reduce(((e,t)=>e+t.size),0)}add(e,t){add(this.valuesByKey,e,t)}delete(e,t){del(this.valuesByKey,e,t)}has(e,t){const r=this.valuesByKey.get(e);return null!=r&&r.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){const t=Array.from(this.valuesByKey.values());return t.some((t=>t.has(e)))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter((([t,r])=>r.has(e))).map((([e,t])=>e))}}class IndexedMultimap extends Multimap{constructor(){super();this.keysByValue=new Map}get values(){return Array.from(this.keysByValue.keys())}add(e,t){super.add(e,t);add(this.keysByValue,t,e)}delete(e,t){super.delete(e,t);del(this.keysByValue,t,e)}hasValue(e){return this.keysByValue.has(e)}getKeysForValue(e){const t=this.keysByValue.get(e);return t?Array.from(t):[]}}class SelectorObserver{constructor(e,t,r,s){this._selector=t;this.details=s;this.elementObserver=new ElementObserver(e,this);this.delegate=r;this.matchesByElement=new Multimap}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e;this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){const{selector:t}=this;if(t){const r=e.matches(t);return this.delegate.selectorMatchElement?r&&this.delegate.selectorMatchElement(e,this.details):r}return false}matchElementsInTree(e){const{selector:t}=this;if(t){const r=this.matchElement(e)?[e]:[];const s=Array.from(e.querySelectorAll(t)).filter((e=>this.matchElement(e)));return r.concat(s)}return[]}elementMatched(e){const{selector:t}=this;t&&this.selectorMatched(e,t)}elementUnmatched(e){const t=this.matchesByElement.getKeysForValue(e);for(const r of t)this.selectorUnmatched(e,r)}elementAttributeChanged(e,t){const{selector:r}=this;if(r){const t=this.matchElement(e);const s=this.matchesByElement.has(r,e);t&&!s?this.selectorMatched(e,r):!t&&s&&this.selectorUnmatched(e,r)}}selectorMatched(e,t){this.delegate.selectorMatched(e,t,this.details);this.matchesByElement.add(t,e)}selectorUnmatched(e,t){this.delegate.selectorUnmatched(e,t,this.details);this.matchesByElement.delete(t,e)}}class StringMapObserver{constructor(e,t){this.element=e;this.delegate=t;this.started=false;this.stringMap=new Map;this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){if(!this.started){this.started=true;this.mutationObserver.observe(this.element,{attributes:true,attributeOldValue:true});this.refresh()}}stop(){if(this.started){this.mutationObserver.takeRecords();this.mutationObserver.disconnect();this.started=false}}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const r=this.delegate.getStringMapKeyForAttribute(e);if(null!=r){this.stringMap.has(e)||this.stringMapKeyAdded(r,e);const s=this.element.getAttribute(e);this.stringMap.get(e)!=s&&this.stringMapValueChanged(s,r,t);if(null==s){const t=this.stringMap.get(e);this.stringMap.delete(e);t&&this.stringMapKeyRemoved(r,e,t)}else this.stringMap.set(e,s)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,r){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,r)}stringMapKeyRemoved(e,t,r){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,r)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((e=>e.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class TokenListObserver{constructor(e,t,r){this.attributeObserver=new AttributeObserver(e,t,this);this.delegate=r;this.tokensByElement=new Multimap}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,r]=this.refreshTokensForElement(e);this.tokensUnmatched(t);this.tokensMatched(r)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach((e=>this.tokenMatched(e)))}tokensUnmatched(e){e.forEach((e=>this.tokenUnmatched(e)))}tokenMatched(e){this.delegate.tokenMatched(e);this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e);this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e);const r=this.readTokensForElement(e);const s=zip(t,r).findIndex((([e,t])=>!tokensAreEqual(e,t)));return-1==s?[[],[]]:[t.slice(s),r.slice(s)]}readTokensForElement(e){const t=this.attributeName;const r=e.getAttribute(t)||"";return parseTokenString(r,e,t)}}function parseTokenString(e,t,r){return e.trim().split(/\s+/).filter((e=>e.length)).map(((e,s)=>({element:t,attributeName:r,content:e,index:s})))}function zip(e,t){const r=Math.max(e.length,t.length);return Array.from({length:r},((r,s)=>[e[s],t[s]]))}function tokensAreEqual(e,t){return e&&t&&e.index==t.index&&e.content==t.content}class ValueListObserver{constructor(e,t,r){this.tokenListObserver=new TokenListObserver(e,t,this);this.delegate=r;this.parseResultsByToken=new WeakMap;this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e;const{value:r}=this.fetchParseResultForToken(e);if(r){this.fetchValuesByTokenForElement(t).set(e,r);this.delegate.elementMatchedValue(t,r)}}tokenUnmatched(e){const{element:t}=e;const{value:r}=this.fetchParseResultForToken(e);if(r){this.fetchValuesByTokenForElement(t).delete(e);this.delegate.elementUnmatchedValue(t,r)}}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);if(!t){t=this.parseToken(e);this.parseResultsByToken.set(e,t)}return t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);if(!t){t=new Map;this.valuesByTokenByElement.set(e,t)}return t}parseToken(e){try{const t=this.delegate.parseValueForToken(e);return{value:t}}catch(e){return{error:e}}}}class BindingObserver{constructor(e,t){this.context=e;this.delegate=t;this.bindingsByAction=new Map}start(){if(!this.valueListObserver){this.valueListObserver=new ValueListObserver(this.element,this.actionAttribute,this);this.valueListObserver.start()}}stop(){if(this.valueListObserver){this.valueListObserver.stop();delete this.valueListObserver;this.disconnectAllActions()}}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new Binding(this.context,e);this.bindingsByAction.set(e,t);this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);if(t){this.bindingsByAction.delete(e);this.delegate.bindingDisconnected(t)}}disconnectAllActions(){this.bindings.forEach((e=>this.delegate.bindingDisconnected(e,true)));this.bindingsByAction.clear()}parseValueForToken(e){const t=Action.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class ValueObserver{constructor(e,t){this.context=e;this.receiver=t;this.stringMapObserver=new StringMapObserver(this.element,this);this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start();this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const r=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,r.writer(this.receiver[e]),r.writer(r.defaultValue))}stringMapValueChanged(e,t,r){const s=this.valueDescriptorNameMap[t];if(null!==e){null===r&&(r=s.writer(s.defaultValue));this.invokeChangedCallback(t,e,r)}}stringMapKeyRemoved(e,t,r){const s=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,s.writer(this.receiver[e]),r):this.invokeChangedCallback(e,s.writer(s.defaultValue),r)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:r,writer:s}of this.valueDescriptors)void 0==r||this.controller.data.has(e)||this.invokeChangedCallback(t,s(r),void 0)}invokeChangedCallback(e,t,r){const s=`${e}Changed`;const n=this.receiver[s];if("function"==typeof n){const s=this.valueDescriptorNameMap[e];try{const e=s.reader(t);let i=r;r&&(i=s.reader(r));n.call(this.receiver,e,i)}catch(e){e instanceof TypeError&&(e.message=`Stimulus Value "${this.context.identifier}.${s.name}" - ${e.message}`);throw e}}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map((t=>e[t]))}get valueDescriptorNameMap(){const e={};Object.keys(this.valueDescriptorMap).forEach((t=>{const r=this.valueDescriptorMap[t];e[r.name]=r}));return e}hasValue(e){const t=this.valueDescriptorNameMap[e];const r=`has${capitalize(t.name)}`;return this.receiver[r]}}class TargetObserver{constructor(e,t){this.context=e;this.delegate=t;this.targetsByName=new Multimap}start(){if(!this.tokenListObserver){this.tokenListObserver=new TokenListObserver(this.element,this.attributeName,this);this.tokenListObserver.start()}}stop(){if(this.tokenListObserver){this.disconnectAllTargets();this.tokenListObserver.stop();delete this.tokenListObserver}}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var r;if(!this.targetsByName.has(t,e)){this.targetsByName.add(t,e);null===(r=this.tokenListObserver)||void 0===r?void 0:r.pause((()=>this.delegate.targetConnected(e,t)))}}disconnectTarget(e,t){var r;if(this.targetsByName.has(t,e)){this.targetsByName.delete(t,e);null===(r=this.tokenListObserver)||void 0===r?void 0:r.pause((()=>this.delegate.targetDisconnected(e,t)))}}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function readInheritableStaticArrayValues(e,t){const r=getAncestorsForConstructor(e);return Array.from(r.reduce(((e,r)=>{getOwnStaticArrayValues(r,t).forEach((t=>e.add(t)));return e}),new Set))}function readInheritableStaticObjectPairs(e,t){const r=getAncestorsForConstructor(e);return r.reduce(((e,r)=>{e.push(...getOwnStaticObjectPairs(r,t));return e}),[])}function getAncestorsForConstructor(e){const t=[];while(e){t.push(e);e=Object.getPrototypeOf(e)}return t.reverse()}function getOwnStaticArrayValues(e,t){const r=e[t];return Array.isArray(r)?r:[]}function getOwnStaticObjectPairs(e,t){const r=e[t];return r?Object.keys(r).map((e=>[e,r[e]])):[]}class OutletObserver{constructor(e,t){this.started=false;this.context=e;this.delegate=t;this.outletsByName=new Multimap;this.outletElementsByName=new Multimap;this.selectorObserverMap=new Map;this.attributeObserverMap=new Map}start(){if(!this.started){this.outletDefinitions.forEach((e=>{this.setupSelectorObserverForOutlet(e);this.setupAttributeObserverForOutlet(e)}));this.started=true;this.dependentContexts.forEach((e=>e.refresh()))}}refresh(){this.selectorObserverMap.forEach((e=>e.refresh()));this.attributeObserverMap.forEach((e=>e.refresh()))}stop(){if(this.started){this.started=false;this.disconnectAllOutlets();this.stopSelectorObservers();this.stopAttributeObservers()}}stopSelectorObservers(){if(this.selectorObserverMap.size>0){this.selectorObserverMap.forEach((e=>e.stop()));this.selectorObserverMap.clear()}}stopAttributeObservers(){if(this.attributeObserverMap.size>0){this.attributeObserverMap.forEach((e=>e.stop()));this.attributeObserverMap.clear()}}selectorMatched(e,t,{outletName:r}){const s=this.getOutlet(e,r);s&&this.connectOutlet(s,e,r)}selectorUnmatched(e,t,{outletName:r}){const s=this.getOutletFromMap(e,r);s&&this.disconnectOutlet(s,e,r)}selectorMatchElement(e,{outletName:t}){const r=this.selector(t);const s=this.hasOutlet(e,t);const n=e.matches(`[${this.schema.controllerAttribute}~=${t}]`);return!!r&&(s&&n&&e.matches(r))}elementMatchedAttribute(e,t){const r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}elementAttributeValueChanged(e,t){const r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}elementUnmatchedAttribute(e,t){const r=this.getOutletNameFromOutletAttributeName(t);r&&this.updateSelectorObserverForOutlet(r)}connectOutlet(e,t,r){var s;if(!this.outletElementsByName.has(r,t)){this.outletsByName.add(r,e);this.outletElementsByName.add(r,t);null===(s=this.selectorObserverMap.get(r))||void 0===s?void 0:s.pause((()=>this.delegate.outletConnected(e,t,r)))}}disconnectOutlet(e,t,r){var s;if(this.outletElementsByName.has(r,t)){this.outletsByName.delete(r,e);this.outletElementsByName.delete(r,t);null===(s=this.selectorObserverMap.get(r))||void 0===s?void 0:s.pause((()=>this.delegate.outletDisconnected(e,t,r)))}}disconnectAllOutlets(){for(const e of this.outletElementsByName.keys)for(const t of this.outletElementsByName.getValuesForKey(e))for(const r of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(r,t,e)}updateSelectorObserverForOutlet(e){const t=this.selectorObserverMap.get(e);t&&(t.selector=this.selector(e))}setupSelectorObserverForOutlet(e){const t=this.selector(e);const r=new SelectorObserver(document.body,t,this,{outletName:e});this.selectorObserverMap.set(e,r);r.start()}setupAttributeObserverForOutlet(e){const t=this.attributeNameForOutletName(e);const r=new AttributeObserver(this.scope.element,t,this);this.attributeObserverMap.set(e,r);r.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find((t=>this.attributeNameForOutletName(t)===e))}get outletDependencies(){const e=new Multimap;this.router.modules.forEach((t=>{const r=t.definition.controllerConstructor;const s=readInheritableStaticArrayValues(r,"outlets");s.forEach((r=>e.add(r,t.identifier)))}));return e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const e=this.dependentControllerIdentifiers;return this.router.contexts.filter((t=>e.includes(t.identifier)))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find((t=>t.element===e))}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class Context{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:r,controller:s,element:n}=this;t=Object.assign({identifier:r,controller:s,element:n},t);this.application.logDebugActivity(this.identifier,e,t)};this.module=e;this.scope=t;this.controller=new e.controllerConstructor(this);this.bindingObserver=new BindingObserver(this,this.dispatcher);this.valueObserver=new ValueObserver(this,this.controller);this.targetObserver=new TargetObserver(this,this);this.outletObserver=new OutletObserver(this,this);try{this.controller.initialize();this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start();this.valueObserver.start();this.targetObserver.start();this.outletObserver.start();try{this.controller.connect();this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect();this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop();this.targetObserver.stop();this.valueObserver.stop();this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,r={}){const{identifier:s,controller:n,element:i}=this;r=Object.assign({identifier:s,controller:n,element:i},r);this.application.handleError(e,`Error ${t}`,r)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,r){this.invokeControllerMethod(`${namespaceCamelize(r)}OutletConnected`,e,t)}outletDisconnected(e,t,r){this.invokeControllerMethod(`${namespaceCamelize(r)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){const r=this.controller;"function"==typeof r[e]&&r[e](...t)}}function bless(e){return shadow(e,getBlessedProperties(e))}function shadow(e,t){const r=i(e);const s=getShadowProperties(e.prototype,t);Object.defineProperties(r.prototype,s);return r}function getBlessedProperties(e){const t=readInheritableStaticArrayValues(e,"blessings");return t.reduce(((t,r)=>{const s=r(e);for(const e in s){const r=t[e]||{};t[e]=Object.assign(r,s[e])}return t}),{})}function getShadowProperties(e,t){return n(t).reduce(((r,s)=>{const n=getShadowedDescriptor(e,t,s);n&&Object.assign(r,{[s]:n});return r}),{})}function getShadowedDescriptor(e,t,r){const s=Object.getOwnPropertyDescriptor(e,r);const n=s&&"value"in s;if(!n){const e=Object.getOwnPropertyDescriptor(t,r).value;if(s){e.get=s.get||e.get;e.set=s.set||e.set}return e}}const n=(()=>"function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames)();const i=(()=>{function extendWithReflect(e){function extended(){return Reflect.construct(e,arguments,new.target)}extended.prototype=Object.create(e.prototype,{constructor:{value:extended}});Reflect.setPrototypeOf(extended,e);return extended}function testReflectExtension(){const a=function(){this.a.call(this)};const e=extendWithReflect(a);e.prototype.a=function(){};return new e}try{testReflectExtension();return extendWithReflect}catch(e){return e=>class extended extends e{}}})();function blessDefinition(e){return{identifier:e.identifier,controllerConstructor:bless(e.controllerConstructor)}}class Module{constructor(e,t){this.application=e;this.definition=blessDefinition(t);this.contextsByScope=new WeakMap;this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t);t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);if(t){this.connectedContexts.delete(t);t.disconnect()}}fetchContextForScope(e){let t=this.contextsByScope.get(e);if(!t){t=new Context(this,e);this.contextsByScope.set(e,t)}return t}}class ClassMap{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){const t=this.data.get(this.getDataKey(e))||"";return tokenize(t)}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class DataMap{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const r=this.getAttributeNameForKey(e);this.element.setAttribute(r,t);return this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);this.element.removeAttribute(t);return true}return false}getAttributeNameForKey(e){return`data-${this.identifier}-${dasherize(e)}`}}class Guide{constructor(e){this.warnedKeysByObject=new WeakMap;this.logger=e}warn(e,t,r){let s=this.warnedKeysByObject.get(e);if(!s){s=new Set;this.warnedKeysByObject.set(e,s)}if(!s.has(t)){s.add(t);this.logger.warn(r,e)}}}function attributeValueContainsToken(e,t){return`[${e}~="${t}"]`}class TargetSet{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)]),[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){const t=this.schema.targetAttributeForScope(this.identifier);return attributeValueContainsToken(t,e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map((t=>this.deprecate(t,e)))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return attributeValueContainsToken(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:r}=this;const s=this.schema.targetAttribute;const n=this.schema.targetAttributeForScope(r);this.guide.warn(e,`target:${t}`,`Please replace ${s}="${r}.${t}" with ${n}="${t}". The ${s} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class OutletSet{constructor(e,t){this.scope=e;this.controllerElement=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findOutlet(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllOutlets(t)]),[])}getSelectorForOutletName(e){const t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){const t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){const t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){const r=this.scope.queryElements(e);return r.filter((r=>this.matchesElement(r,e,t)))[0]}findAllElements(e,t){const r=this.scope.queryElements(e);return r.filter((r=>this.matchesElement(r,e,t)))}matchesElement(e,t,r){const s=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&s.split(" ").includes(r)}}class Scope{constructor(e,t,r,s){this.targets=new TargetSet(this);this.classes=new ClassMap(this);this.data=new DataMap(this);this.containsElement=e=>e.closest(this.controllerSelector)===this.element;this.schema=e;this.element=t;this.identifier=r;this.guide=new Guide(s);this.outlets=new OutletSet(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return attributeValueContainsToken(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new Scope(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class ScopeObserver{constructor(e,t,r){this.element=e;this.schema=t;this.delegate=r;this.valueListObserver=new ValueListObserver(this.element,this.controllerAttribute,this);this.scopesByIdentifierByElement=new WeakMap;this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:r}=e;return this.parseValueForElementAndIdentifier(t,r)}parseValueForElementAndIdentifier(e,t){const r=this.fetchScopesByIdentifierForElement(e);let s=r.get(t);if(!s){s=this.delegate.createScopeForElementAndIdentifier(e,t);r.set(t,s)}return s}elementMatchedValue(e,t){const r=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,r);1==r&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const r=this.scopeReferenceCounts.get(t);if(r){this.scopeReferenceCounts.set(t,r-1);1==r&&this.delegate.scopeDisconnected(t)}}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);if(!t){t=new Map;this.scopesByIdentifierByElement.set(e,t)}return t}}class Router{constructor(e){this.application=e;this.scopeObserver=new ScopeObserver(this.element,this.schema,this);this.scopesByIdentifier=new Multimap;this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((e,t)=>e.concat(t.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new Module(this.application,e);this.connectModule(t);const r=e.controllerConstructor.afterLoad;r&&r.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const r=this.modulesByIdentifier.get(t);if(r)return r.contexts.find((t=>t.element==e))}proposeToConnectScopeForElementAndIdentifier(e,t){const r=this.scopeObserver.parseValueForElementAndIdentifier(e,t);r?this.scopeObserver.elementMatchedValue(r.element,r):console.error(`Couldn't find or create scope for identifier: "${t}" and element:`,e)}handleError(e,t,r){this.application.handleError(e,t,r)}createScopeForElementAndIdentifier(e,t){return new Scope(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);const t=this.scopesByIdentifier.getValuesForKey(e.identifier);t.forEach((t=>e.connectContextForScope(t)))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);const t=this.scopesByIdentifier.getValuesForKey(e.identifier);t.forEach((t=>e.disconnectContextForScope(t)))}}const o={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`,outletAttributeForScope:(e,t)=>`data-${e}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},objectFromEntries("abcdefghijklmnopqrstuvwxyz".split("").map((e=>[e,e])))),objectFromEntries("0123456789".split("").map((e=>[e,e]))))};function objectFromEntries(e){return e.reduce(((e,[t,r])=>Object.assign(Object.assign({},e),{[t]:r})),{})}class Application{constructor(t=document.documentElement,r=o){this.logger=console;this.debug=false;this.logDebugActivity=(e,t,r={})=>{this.debug&&this.logFormattedMessage(e,t,r)};this.element=t;this.schema=r;this.dispatcher=new Dispatcher(this);this.router=new Router(this);this.actionDescriptorFilters=Object.assign({},e)}static start(e,t){const r=new this(e,t);r.start();return r}async start(){await domReady();this.logDebugActivity("application","starting");this.dispatcher.start();this.router.start();this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping");this.dispatcher.stop();this.router.stop();this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){const r=Array.isArray(e)?e:[e,...t];r.forEach((e=>{e.controllerConstructor.shouldLoad&&this.router.loadDefinition(e)}))}unload(e,...t){const r=Array.isArray(e)?e:[e,...t];r.forEach((e=>this.router.unloadIdentifier(e)))}get controllers(){return this.router.contexts.map((e=>e.controller))}getControllerForElementAndIdentifier(e,t){const r=this.router.getContextForElementAndIdentifier(e,t);return r?r.controller:null}handleError(e,t,r){var s;this.logger.error("%s\n\n%o\n\n%o",t,e,r);null===(s=window.onerror)||void 0===s?void 0:s.call(window,t,"",0,0,e)}logFormattedMessage(e,t,r={}){r=Object.assign({application:this},r);this.logger.groupCollapsed(`${e} #${t}`);this.logger.log("details:",Object.assign({},r));this.logger.groupEnd()}}function domReady(){return new Promise((e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>e())):e()}))}function ClassPropertiesBlessing(e){const t=readInheritableStaticArrayValues(e,"classes");return t.reduce(((e,t)=>Object.assign(e,propertiesForClassDefinition(t))),{})}function propertiesForClassDefinition(e){return{[`${e}Class`]:{get(){const{classes:t}=this;if(t.has(e))return t.get(e);{const r=t.getAttributeName(e);throw new Error(`Missing attribute "${r}"`)}}},[`${e}Classes`]:{get(){return this.classes.getAll(e)}},[`has${capitalize(e)}Class`]:{get(){return this.classes.has(e)}}}}function OutletPropertiesBlessing(e){const t=readInheritableStaticArrayValues(e,"outlets");return t.reduce(((e,t)=>Object.assign(e,propertiesForOutletDefinition(t))),{})}function getOutletController(e,t,r){return e.application.getControllerForElementAndIdentifier(t,r)}function getControllerAndEnsureConnectedScope(e,t,r){let s=getOutletController(e,t,r);if(s)return s;e.application.router.proposeToConnectScopeForElementAndIdentifier(t,r);s=getOutletController(e,t,r);return s||void 0}function propertiesForOutletDefinition(e){const t=namespaceCamelize(e);return{[`${t}Outlet`]:{get(){const t=this.outlets.find(e);const r=this.outlets.getSelectorForOutletName(e);if(t){const r=getControllerAndEnsureConnectedScope(this,t,e);if(r)return r;throw new Error(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${r}".`)}},[`${t}Outlets`]:{get(){const t=this.outlets.findAll(e);return t.length>0?t.map((t=>{const r=getControllerAndEnsureConnectedScope(this,t,e);if(r)return r;console.warn(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`,t)})).filter((e=>e)):[]}},[`${t}OutletElement`]:{get(){const t=this.outlets.find(e);const r=this.outlets.getSelectorForOutletName(e);if(t)return t;throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${r}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${capitalize(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}function TargetPropertiesBlessing(e){const t=readInheritableStaticArrayValues(e,"targets");return t.reduce(((e,t)=>Object.assign(e,propertiesForTargetDefinition(t))),{})}function propertiesForTargetDefinition(e){return{[`${e}Target`]:{get(){const t=this.targets.find(e);if(t)return t;throw new Error(`Missing target element "${e}" for "${this.identifier}" controller`)}},[`${e}Targets`]:{get(){return this.targets.findAll(e)}},[`has${capitalize(e)}Target`]:{get(){return this.targets.has(e)}}}}function ValuePropertiesBlessing(e){const t=readInheritableStaticObjectPairs(e,"values");const r={valueDescriptorMap:{get(){return t.reduce(((e,t)=>{const r=parseValueDefinitionPair(t,this.identifier);const s=this.data.getAttributeNameForKey(r.key);return Object.assign(e,{[s]:r})}),{})}}};return t.reduce(((e,t)=>Object.assign(e,propertiesForValueDefinitionPair(t))),r)}function propertiesForValueDefinitionPair(e,t){const r=parseValueDefinitionPair(e,t);const{key:s,name:n,reader:i,writer:o}=r;return{[n]:{get(){const e=this.data.get(s);return null!==e?i(e):r.defaultValue},set(e){void 0===e?this.data.delete(s):this.data.set(s,o(e))}},[`has${capitalize(n)}`]:{get(){return this.data.has(s)||r.hasCustomDefaultValue}}}}function parseValueDefinitionPair([e,t],r){return valueDescriptorForTokenAndTypeDefinition({controller:r,token:e,typeDefinition:t})}function parseValueTypeConstant(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function parseValueTypeDefault(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}function parseValueTypeObject(e){const{controller:t,token:r,typeObject:s}=e;const n=isSomething(s.type);const i=isSomething(s.default);const o=n&&i;const c=n&&!i;const l=!n&&i;const h=parseValueTypeConstant(s.type);const u=parseValueTypeDefault(e.typeObject.default);if(c)return h;if(l)return u;if(h!==u){const e=t?`${t}.${r}`:r;throw new Error(`The specified default value for the Stimulus Value "${e}" must match the defined type "${h}". The provided default value of "${s.default}" is of type "${u}".`)}return o?h:void 0}function parseValueTypeDefinition(e){const{controller:t,token:r,typeDefinition:s}=e;const n={controller:t,token:r,typeObject:s};const i=parseValueTypeObject(n);const o=parseValueTypeDefault(s);const c=parseValueTypeConstant(s);const l=i||o||c;if(l)return l;const h=t?`${t}.${s}`:r;throw new Error(`Unknown value type "${h}" for "${r}" value`)}function defaultValueForDefinition(e){const t=parseValueTypeConstant(e);if(t)return c[t];const r=hasProperty(e,"default");const s=hasProperty(e,"type");const n=e;if(r)return n.default;if(s){const{type:e}=n;const t=parseValueTypeConstant(e);if(t)return c[t]}return e}function valueDescriptorForTokenAndTypeDefinition(e){const{token:t,typeDefinition:r}=e;const s=`${dasherize(t)}-value`;const n=parseValueTypeDefinition(e);return{type:n,key:s,name:camelize(s),get defaultValue(){return defaultValueForDefinition(r)},get hasCustomDefaultValue(){return void 0!==parseValueTypeDefault(r)},reader:l[n],writer:h[n]||h.default}}const c={get array(){return[]},boolean:false,number:0,get object(){return{}},string:""};const l={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${e}" of type "${parseValueTypeDefault(t)}"`);return t},boolean(e){return!("0"==e||"false"==String(e).toLowerCase())},number(e){return Number(e.replace(/_/g,""))},object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${e}" of type "${parseValueTypeDefault(t)}"`);return t},string(e){return e}};const h={default:writeString,array:writeJSON,object:writeJSON};function writeJSON(e){return JSON.stringify(e)}function writeString(e){return`${e}`}class Controller{constructor(e){this.context=e}static get shouldLoad(){return true}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:r={},prefix:s=this.identifier,bubbles:n=true,cancelable:i=true}={}){const o=s?`${s}:${e}`:e;const c=new CustomEvent(o,{detail:r,bubbles:n,cancelable:i});t.dispatchEvent(c);return c}}Controller.blessings=[ClassPropertiesBlessing,TargetPropertiesBlessing,ValuePropertiesBlessing,OutletPropertiesBlessing];Controller.targets=[];Controller.outlets=[];Controller.values={};export{Application,AttributeObserver,Context,Controller,ElementObserver,IndexedMultimap,Multimap,SelectorObserver,StringMapObserver,TokenListObserver,ValueListObserver,add,o as defaultSchema,del,fetch,prune};+diff --git a/admin/vendor/javascript/@orchidjs--sifter.js b/admin/vendor/javascript/@orchidjs--sifter.jsnew file mode 100644index 0000000000..0fb4475ec3--- /dev/null+++ b/admin/vendor/javascript/@orchidjs--sifter.js@@ -0,0 +1,17 @@+// @orchidjs/[email protected] downloaded from https://ga.jspm.io/npm:@orchidjs/[email protected]/dist/esm/sifter.js++import{scoreValue as t,iterate as e,cmp as r,propToArray as i,getAttrNesting as n,getAttr as s}from"./utils.js";import{escape_regex as o,getPattern as c}from"@orchidjs/unicode-variants";export{getPattern}from"@orchidjs/unicode-variants";import"./types.js";class Sifter{items;settings;constructor(t,e){this.items=t;this.settings=e||{diacritics:true}}tokenize(t,e,r){if(!t||!t.length)return[];const i=[];const n=t.split(/\s+/);var s;r&&(s=new RegExp("^("+Object.keys(r).map(o).join("|")+"):(.*)$"));n.forEach((t=>{let r;let n=null;let u=null;if(s&&(r=t.match(s))){n=r[1];t=r[2]}if(t.length>0){u=this.settings.diacritics?c(t)||null:o(t);u&&e&&(u="\\b"+u)}i.push({string:t,regex:u?new RegExp(u,"iu"):null,field:n})}));return i}+/**+ * Returns a function to be used to score individual results.+ *+ * Good matches will have a higher score than poor matches.+ * If an item is not a match, 0 will be returned by the function.+ *+ * @returns {T.ScoreFn}+ */+getScoreFunction(t,e){var r=this.prepareSearch(t,e);return this._getScoreFunction(r)}+/**+ * @returns {T.ScoreFn}+ *+ */_getScoreFunction(r){const i=r.tokens,n=i.length;if(!n)return function(){return 0};const s=r.options.fields,o=r.weights,c=s.length,u=r.getAttrFn;if(!c)return function(){return 1};const f=function(){return c===1?function(e,r){const i=s[0].field;return t(u(r,i),e,o[i]||1)}:function(r,i){var n=0;if(r.field){const e=u(i,r.field);!r.regex&&e?n+=1/c:n+=t(e,r,1)}else e(o,((e,s)=>{n+=t(u(i,s),r,e)}));return n/c}}();return n===1?function(t){return f(i[0],t)}:r.options.conjunction==="and"?function(t){var e,r=0;for(let n of i){e=f(n,t);if(e<=0)return 0;r+=e}return r/n}:function(t){var r=0;e(i,(e=>{r+=f(e,t)}));return r/n}}getSortFunction(t,e){var r=this.prepareSearch(t,e);return this._getSortFunction(r)}_getSortFunction(t){var e,i=[];const n=this,s=t.options,o=!t.query&&s.sort_empty?s.sort_empty:s.sort;if(typeof o=="function")return o.bind(this);const get_field=function(e,r){return e==="$score"?r.score:t.getAttrFn(n.items[r.id],e)};if(o)for(let e of o)(t.query||e.field!=="$score")&&i.push(e);if(t.query){e=true;for(let t of i)if(t.field==="$score"){e=false;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter((t=>t.field!=="$score"));const c=i.length;return c?function(t,e){var n,s;for(let o of i){s=o.field;let i=o.direction==="desc"?-1:1;n=i*r(get_field(s,t),get_field(s,e));if(n)return n}return 0}:null}prepareSearch(t,e){const r={};var o=Object.assign({},e);i(o,"sort");i(o,"sort_empty");if(o.fields){i(o,"fields");const t=[];o.fields.forEach((e=>{typeof e=="string"&&(e={field:e,weight:1});t.push(e);r[e.field]="weight"in e?e.weight:1}));o.fields=t}return{options:o,query:t.toLowerCase().trim(),tokens:this.tokenize(t,o.respect_word_boundaries,r),total:0,items:[],weights:r,getAttrFn:o.nesting?n:s}}search(t,r){var i,n,s=this;n=this.prepareSearch(t,r);r=n.options;t=n.query;const o=r.score||s._getScoreFunction(n);t.length?e(s.items,((t,e)=>{i=o(t);(r.filter===false||i>0)&&n.items.push({score:i,id:e})})):e(s.items,((t,e)=>{n.items.push({score:1,id:e})}));const c=s._getSortFunction(n);c&&n.items.sort(c);n.total=n.items.length;typeof r.limit==="number"&&(n.items=n.items.slice(0,r.limit));return n}}export{Sifter,r as cmp,s as getAttr,n as getAttrNesting,e as iterate,i as propToArray,t as scoreValue};+diff --git a/admin/vendor/javascript/@orchidjs--unicode-variants.js b/admin/vendor/javascript/@orchidjs--unicode-variants.jsnew file mode 100644index 0000000000..9b14c64cf3--- /dev/null+++ b/admin/vendor/javascript/@orchidjs--unicode-variants.js@@ -0,0 +1,11 @@+// @orchidjs/[email protected] downloaded from https://ga.jspm.io/npm:@orchidjs/[email protected]/dist/esm/index.js++import{setToPattern as t,escape_regex as e,arrayToPattern as s,sequencePattern as n}from"./regex.js";import{allSubstrings as r}from"./strings.js";const o=[[0,65535]];const l="[̀-ͯ·ʾʼ]";let a;let u;const h=3;const c={};const i={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in i){let e=i[t]||"";for(let s=0;s<e.length;s++){let n=e.substring(s,s+1);c[n]=t}}const d=new RegExp(Object.keys(c).join("|")+"|"+l,"gu");const initialize=t=>{a===void 0&&(a=generateMap(t||o))};const normalize=(t,e="NFKD")=>t.normalize(e);const asciifold=t=>Array.from(t).reduce((+/**+ * @param {string} result+ * @param {string} char+ */+(t,e)=>t+_asciifold(e)),"");const _asciifold=t=>{t=normalize(t).toLowerCase().replace(d,(/** @type {string} */t=>c[t]||""));return normalize(t,"NFC")};function*generator(t){for(const[e,s]of t)for(let t=e;t<=s;t++){let e=String.fromCharCode(t);let s=asciifold(e);s!=e.toLowerCase()&&(s.length>h||s.length!=0&&(yield{folded:s,composed:e,code_point:t}))}}const generateSets=s=>{const n={};const addMatching=(s,r)=>{+/** @type {Set<string>} */+const o=n[s]||new Set;const l=new RegExp("^"+t(o)+"$","iu");if(!r.match(l)){o.add(e(r));n[s]=o}};for(let t of generator(s)){addMatching(t.folded,t.folded);addMatching(t.folded,t.composed)}return n};const generateMap=n=>{const r=generateSets(n);const o={};let l=[];for(let s in r){let n=r[s];n&&(o[s]=t(n));s.length>1&&l.push(e(s))}l.sort(((t,e)=>e.length-t.length));const a=s(l);u=new RegExp("^"+a,"u");return o};const mapSequence=(t,e=1)=>{let s=0;t=t.map((t=>{a[t]&&(s+=t.length);return a[t]||t}));return s>=e?n(t):""};const substringsToPattern=(t,e=1)=>{e=Math.max(e,t.length-1);return s(r(t).map((t=>mapSequence(t,e))))};const sequencesToPattern=(t,e=true)=>{let r=t.length>1?1:0;return s(t.map((t=>{let s=[];const o=e?t.length():t.length()-1;for(let e=0;e<o;e++)s.push(substringsToPattern(t.substrs[e]||"",r));return n(s)})))};const inSequences=(t,e)=>{for(const s of e){if(s.start!=t.start||s.end!=t.end)continue;if(s.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const filter=t=>{for(const s of e){if(s.start===t.start&&s.substr===t.substr)return false;if(t.length!=1&&s.length!=1){if(t.start<s.start&&t.end>s.start)return true;if(s.start<t.start&&s.end>t.start)return true}}return false};let n=s.parts.filter(filter);if(!(n.length>0))return true}return false};class Sequence{parts;substrs;start;end;constructor(){this.parts=[];this.substrs=[];this.start=0;this.end=0}add(t){if(t){this.parts.push(t);this.substrs.push(t.substr);this.start=Math.min(t.start,this.start);this.end=Math.max(t.end,this.end)}}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let s=new Sequence;let n=JSON.parse(JSON.stringify(this.parts));let r=n.pop();for(const t of n)s.add(t);let o=e.substr.substring(0,t-r.start);let l=o.length;s.add({start:r.start,end:r.start+l,length:l,substr:o});return s}}const getPattern=t=>{initialize();t=asciifold(t);let e="";let s=[new Sequence];for(let n=0;n<t.length;n++){let r=t.substring(n);let o=r.match(u);const l=t.substring(n,n+1);const a=o?o[0]:null;let h=[];let c=new Set;for(const t of s){const e=t.last();if(!e||e.length==1||e.end<=n)if(a){const e=a.length;t.add({start:n,end:n+e,length:e,substr:a});c.add("1")}else{t.add({start:n,end:n+1,length:1,substr:l});c.add("2")}else if(a){let s=t.clone(n,e);const r=a.length;s.add({start:n,end:n+r,length:r,substr:a});h.push(s)}else c.add("3")}if(h.length>0){h=h.sort(((t,e)=>t.length()-e.length()));for(let t of h)inSequences(t,s)||s.push(t)}else if(n>0&&c.size==1&&!c.has("3")){e+=sequencesToPattern(s,false);let t=new Sequence;const n=s[0];n&&t.add(n.last());s=[t]}}e+=sequencesToPattern(s,true);return e};export{_asciifold,asciifold,o as code_points,e as escape_regex,generateMap,generateSets,generator,getPattern,initialize,mapSequence,normalize,substringsToPattern,a as unicode_map};+diff --git a/admin/vendor/javascript/@rails--actiontext--app--assets--javascripts--actiontext.js.js b/admin/vendor/javascript/@rails--actiontext--app--assets--javascripts--actiontext.js.jsnew file mode 100644index 0000000000..2e35ea77ac--- /dev/null+++ b/admin/vendor/javascript/@rails--actiontext--app--assets--javascripts--actiontext.js.js@@ -0,0 +1,4 @@+// @rails/actiontext/app/assets/javascripts/[email protected] downloaded from https://ga.jspm.io/npm:@rails/[email protected]/app/assets/javascripts/actiontext.js++"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self&&self;var t={exports:{}};(function(t,e){(function(t,r){r(e)})(0,(function(t){var e={exports:{}};(function(t,e){(function(e){t.exports=e()})((function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function md5cycle(t,e){var r=t[0],i=t[1],s=t[2],n=t[3];r+=(i&s|~i&n)+e[0]-680876936|0;r=(r<<7|r>>>25)+i|0;n+=(r&i|~r&s)+e[1]-389564586|0;n=(n<<12|n>>>20)+r|0;s+=(n&r|~n&i)+e[2]+606105819|0;s=(s<<17|s>>>15)+n|0;i+=(s&n|~s&r)+e[3]-1044525330|0;i=(i<<22|i>>>10)+s|0;r+=(i&s|~i&n)+e[4]-176418897|0;r=(r<<7|r>>>25)+i|0;n+=(r&i|~r&s)+e[5]+1200080426|0;n=(n<<12|n>>>20)+r|0;s+=(n&r|~n&i)+e[6]-1473231341|0;s=(s<<17|s>>>15)+n|0;i+=(s&n|~s&r)+e[7]-45705983|0;i=(i<<22|i>>>10)+s|0;r+=(i&s|~i&n)+e[8]+1770035416|0;r=(r<<7|r>>>25)+i|0;n+=(r&i|~r&s)+e[9]-1958414417|0;n=(n<<12|n>>>20)+r|0;s+=(n&r|~n&i)+e[10]-42063|0;s=(s<<17|s>>>15)+n|0;i+=(s&n|~s&r)+e[11]-1990404162|0;i=(i<<22|i>>>10)+s|0;r+=(i&s|~i&n)+e[12]+1804603682|0;r=(r<<7|r>>>25)+i|0;n+=(r&i|~r&s)+e[13]-40341101|0;n=(n<<12|n>>>20)+r|0;s+=(n&r|~n&i)+e[14]-1502002290|0;s=(s<<17|s>>>15)+n|0;i+=(s&n|~s&r)+e[15]+1236535329|0;i=(i<<22|i>>>10)+s|0;r+=(i&n|s&~n)+e[1]-165796510|0;r=(r<<5|r>>>27)+i|0;n+=(r&s|i&~s)+e[6]-1069501632|0;n=(n<<9|n>>>23)+r|0;s+=(n&i|r&~i)+e[11]+643717713|0;s=(s<<14|s>>>18)+n|0;i+=(s&r|n&~r)+e[0]-373897302|0;i=(i<<20|i>>>12)+s|0;r+=(i&n|s&~n)+e[5]-701558691|0;r=(r<<5|r>>>27)+i|0;n+=(r&s|i&~s)+e[10]+38016083|0;n=(n<<9|n>>>23)+r|0;s+=(n&i|r&~i)+e[15]-660478335|0;s=(s<<14|s>>>18)+n|0;i+=(s&r|n&~r)+e[4]-405537848|0;i=(i<<20|i>>>12)+s|0;r+=(i&n|s&~n)+e[9]+568446438|0;r=(r<<5|r>>>27)+i|0;n+=(r&s|i&~s)+e[14]-1019803690|0;n=(n<<9|n>>>23)+r|0;s+=(n&i|r&~i)+e[3]-187363961|0;s=(s<<14|s>>>18)+n|0;i+=(s&r|n&~r)+e[8]+1163531501|0;i=(i<<20|i>>>12)+s|0;r+=(i&n|s&~n)+e[13]-1444681467|0;r=(r<<5|r>>>27)+i|0;n+=(r&s|i&~s)+e[2]-51403784|0;n=(n<<9|n>>>23)+r|0;s+=(n&i|r&~i)+e[7]+1735328473|0;s=(s<<14|s>>>18)+n|0;i+=(s&r|n&~r)+e[12]-1926607734|0;i=(i<<20|i>>>12)+s|0;r+=(i^s^n)+e[5]-378558|0;r=(r<<4|r>>>28)+i|0;n+=(r^i^s)+e[8]-2022574463|0;n=(n<<11|n>>>21)+r|0;s+=(n^r^i)+e[11]+1839030562|0;s=(s<<16|s>>>16)+n|0;i+=(s^n^r)+e[14]-35309556|0;i=(i<<23|i>>>9)+s|0;r+=(i^s^n)+e[1]-1530992060|0;r=(r<<4|r>>>28)+i|0;n+=(r^i^s)+e[4]+1272893353|0;n=(n<<11|n>>>21)+r|0;s+=(n^r^i)+e[7]-155497632|0;s=(s<<16|s>>>16)+n|0;i+=(s^n^r)+e[10]-1094730640|0;i=(i<<23|i>>>9)+s|0;r+=(i^s^n)+e[13]+681279174|0;r=(r<<4|r>>>28)+i|0;n+=(r^i^s)+e[0]-358537222|0;n=(n<<11|n>>>21)+r|0;s+=(n^r^i)+e[3]-722521979|0;s=(s<<16|s>>>16)+n|0;i+=(s^n^r)+e[6]+76029189|0;i=(i<<23|i>>>9)+s|0;r+=(i^s^n)+e[9]-640364487|0;r=(r<<4|r>>>28)+i|0;n+=(r^i^s)+e[12]-421815835|0;n=(n<<11|n>>>21)+r|0;s+=(n^r^i)+e[15]+530742520|0;s=(s<<16|s>>>16)+n|0;i+=(s^n^r)+e[2]-995338651|0;i=(i<<23|i>>>9)+s|0;r+=(s^(i|~n))+e[0]-198630844|0;r=(r<<6|r>>>26)+i|0;n+=(i^(r|~s))+e[7]+1126891415|0;n=(n<<10|n>>>22)+r|0;s+=(r^(n|~i))+e[14]-1416354905|0;s=(s<<15|s>>>17)+n|0;i+=(n^(s|~r))+e[5]-57434055|0;i=(i<<21|i>>>11)+s|0;r+=(s^(i|~n))+e[12]+1700485571|0;r=(r<<6|r>>>26)+i|0;n+=(i^(r|~s))+e[3]-1894986606|0;n=(n<<10|n>>>22)+r|0;s+=(r^(n|~i))+e[10]-1051523|0;s=(s<<15|s>>>17)+n|0;i+=(n^(s|~r))+e[1]-2054922799|0;i=(i<<21|i>>>11)+s|0;r+=(s^(i|~n))+e[8]+1873313359|0;r=(r<<6|r>>>26)+i|0;n+=(i^(r|~s))+e[15]-30611744|0;n=(n<<10|n>>>22)+r|0;s+=(r^(n|~i))+e[6]-1560198380|0;s=(s<<15|s>>>17)+n|0;i+=(n^(s|~r))+e[13]+1309151649|0;i=(i<<21|i>>>11)+s|0;r+=(s^(i|~n))+e[4]-145523070|0;r=(r<<6|r>>>26)+i|0;n+=(i^(r|~s))+e[11]-1120210379|0;n=(n<<10|n>>>22)+r|0;s+=(r^(n|~i))+e[2]+718787259|0;s=(s<<15|s>>>17)+n|0;i+=(n^(s|~r))+e[9]-343485551|0;i=(i<<21|i>>>11)+s|0;t[0]=r+t[0]|0;t[1]=i+t[1]|0;t[2]=s+t[2]|0;t[3]=n+t[3]|0}function md5blk(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}function md5blk_array(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return r}function md51(t){var e,r,i,s,n,a,o=t.length,h=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=o;e+=64)md5cycle(h,md5blk(t.substring(e-64,e)));t=t.substring(e-64);r=t.length;i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r;e+=1)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);i[e>>2]|=128<<(e%4<<3);if(e>55){md5cycle(h,i);for(e=0;e<16;e+=1)i[e]=0}s=8*o;s=s.toString(16).match(/(.*?)(.{0,8})$/);n=parseInt(s[2],16);a=parseInt(s[1],16)||0;i[14]=n;i[15]=a;md5cycle(h,i);return h}function md51_array(t){var e,r,i,s,n,a,o=t.length,h=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=o;e+=64)md5cycle(h,md5blk_array(t.subarray(e-64,e)));t=e-64<o?t.subarray(e-64):new Uint8Array(0);r=t.length;i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r;e+=1)i[e>>2]|=t[e]<<(e%4<<3);i[e>>2]|=128<<(e%4<<3);if(e>55){md5cycle(h,i);for(e=0;e<16;e+=1)i[e]=0}s=8*o;s=s.toString(16).match(/(.*?)(.{0,8})$/);n=parseInt(s[2],16);a=parseInt(s[1],16)||0;i[14]=n;i[15]=a;md5cycle(h,i);return h}function rhex(t){var r,i="";for(r=0;r<4;r+=1)i+=e[t>>8*r+4&15]+e[t>>8*r&15];return i}function hex(t){var e;for(e=0;e<t.length;e+=1)t[e]=rhex(t[e]);return t.join("")}"5d41402abc4b2a76b9719d911017c592"!==hex(md51("hello"));"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function clamp(t,e){t=0|t||0;return t<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(e,r){var i,s,n,a,o=this.byteLength,h=clamp(e,o),l=o;r!==t&&(l=clamp(r,o));if(h>l)return new ArrayBuffer(0);i=l-h;s=new ArrayBuffer(i);n=new Uint8Array(s);a=new Uint8Array(this,h,i);n.set(a);return s}}();function toUtf8(t){/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t)));return t}function utf8Str2ArrayBuffer(t,e){var r,i=t.length,s=new ArrayBuffer(i),n=new Uint8Array(s);for(r=0;r<i;r+=1)n[r]=t.charCodeAt(r);return e?n:s}function arrayBuffer2Utf8Str(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function concatenateArrayBuffers(t,e,r){var i=new Uint8Array(t.byteLength+e.byteLength);i.set(new Uint8Array(t));i.set(new Uint8Array(e),t.byteLength);return r?i:i.buffer}function hexToBinaryString(t){var e,r=[],i=t.length;for(e=0;e<i-1;e+=2)r.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,r)}function SparkMD5(){this.reset()}SparkMD5.prototype.append=function(t){this.appendBinary(toUtf8(t));return this};SparkMD5.prototype.appendBinary=function(t){this._buff+=t;this._length+=t.length;var e,r=this._buff.length;for(e=64;e<=r;e+=64)md5cycle(this._hash,md5blk(this._buff.substring(e-64,e)));this._buff=this._buff.substring(e-64);return this};SparkMD5.prototype.end=function(t){var e,r,i=this._buff,s=i.length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<s;e+=1)n[e>>2]|=i.charCodeAt(e)<<(e%4<<3);this._finish(n,s);r=hex(this._hash);t&&(r=hexToBinaryString(r));this.reset();return r};SparkMD5.prototype.reset=function(){this._buff="";this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}};SparkMD5.prototype.setState=function(t){this._buff=t.buff;this._length=t.length;this._hash=t.hash;return this};SparkMD5.prototype.destroy=function(){delete this._hash;delete this._buff;delete this._length};SparkMD5.prototype._finish=function(t,e){var r,i,s,n=e;t[n>>2]|=128<<(n%4<<3);if(n>55){md5cycle(this._hash,t);for(n=0;n<16;n+=1)t[n]=0}r=8*this._length;r=r.toString(16).match(/(.*?)(.{0,8})$/);i=parseInt(r[2],16);s=parseInt(r[1],16)||0;t[14]=i;t[15]=s;md5cycle(this._hash,t)};SparkMD5.hash=function(t,e){return SparkMD5.hashBinary(toUtf8(t),e)};SparkMD5.hashBinary=function(t,e){var r=md51(t),i=hex(r);return e?hexToBinaryString(i):i};SparkMD5.ArrayBuffer=function(){this.reset()};SparkMD5.ArrayBuffer.prototype.append=function(t){var e,r=concatenateArrayBuffers(this._buff.buffer,t,true),i=r.length;this._length+=t.byteLength;for(e=64;e<=i;e+=64)md5cycle(this._hash,md5blk_array(r.subarray(e-64,e)));this._buff=e-64<i?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0);return this};SparkMD5.ArrayBuffer.prototype.end=function(t){var e,r,i=this._buff,s=i.length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<s;e+=1)n[e>>2]|=i[e]<<(e%4<<3);this._finish(n,s);r=hex(this._hash);t&&(r=hexToBinaryString(r));this.reset();return r};SparkMD5.ArrayBuffer.prototype.reset=function(){this._buff=new Uint8Array(0);this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.ArrayBuffer.prototype.getState=function(){var t=SparkMD5.prototype.getState.call(this);t.buff=arrayBuffer2Utf8Str(t.buff);return t};SparkMD5.ArrayBuffer.prototype.setState=function(t){t.buff=utf8Str2ArrayBuffer(t.buff,true);return SparkMD5.prototype.setState.call(this,t)};SparkMD5.ArrayBuffer.prototype.destroy=SparkMD5.prototype.destroy;SparkMD5.ArrayBuffer.prototype._finish=SparkMD5.prototype._finish;SparkMD5.ArrayBuffer.hash=function(t,e){var r=md51_array(new Uint8Array(t)),i=hex(r);return e?hexToBinaryString(i):i};return SparkMD5}))})(e);var r=e.exports;const i=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice;class FileChecksum{static create(t,e){const r=new FileChecksum(t);r.create(e)}constructor(t){this.file=t;this.chunkSize=2097152;this.chunkCount=Math.ceil(this.file.size/this.chunkSize);this.chunkIndex=0}create(t){this.callback=t;this.md5Buffer=new r.ArrayBuffer;this.fileReader=new FileReader;this.fileReader.addEventListener("load",(t=>this.fileReaderDidLoad(t)));this.fileReader.addEventListener("error",(t=>this.fileReaderDidError(t)));this.readNextChunk()}fileReaderDidLoad(t){this.md5Buffer.append(t.target.result);if(!this.readNextChunk()){const t=this.md5Buffer.end(true);const e=btoa(t);this.callback(null,e)}}fileReaderDidError(t){this.callback(`Error reading ${this.file.name}`)}readNextChunk(){if(this.chunkIndex<this.chunkCount||0==this.chunkIndex&&0==this.chunkCount){const t=this.chunkIndex*this.chunkSize;const e=Math.min(t+this.chunkSize,this.file.size);const r=i.call(this.file,t,e);this.fileReader.readAsArrayBuffer(r);this.chunkIndex++;return true}return false}}function getMetaValue(t){const e=findElement(document.head,`meta[name="${t}"]`);if(e)return e.getAttribute("content")}function findElements(t,e){if("string"==typeof t){e=t;t=document}const r=t.querySelectorAll(e);return toArray(r)}function findElement(t,e){if("string"==typeof t){e=t;t=document}return t.querySelector(e)}function dispatchEvent(t,e,r={}){const{disabled:i}=t;const{bubbles:s,cancelable:n,detail:a}=r;const o=document.createEvent("Event");o.initEvent(e,s||true,n||true);o.detail=a||{};try{t.disabled=false;t.dispatchEvent(o)}finally{t.disabled=i}return o}function toArray(t){return Array.isArray(t)?t:Array.from?Array.from(t):[].slice.call(t)}class BlobRecord{constructor(t,e,r){this.file=t;this.attributes={filename:t.name,content_type:t.type||"application/octet-stream",byte_size:t.size,checksum:e};this.xhr=new XMLHttpRequest;this.xhr.open("POST",r,true);this.xhr.responseType="json";this.xhr.setRequestHeader("Content-Type","application/json");this.xhr.setRequestHeader("Accept","application/json");this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");const i=getMetaValue("csrf-token");void 0!=i&&this.xhr.setRequestHeader("X-CSRF-Token",i);this.xhr.addEventListener("load",(t=>this.requestDidLoad(t)));this.xhr.addEventListener("error",(t=>this.requestDidError(t)))}get status(){return this.xhr.status}get response(){const{responseType:t,response:e}=this.xhr;return"json"==t?e:JSON.parse(e)}create(t){this.callback=t;this.xhr.send(JSON.stringify({blob:this.attributes}))}requestDidLoad(t){if(this.status>=200&&this.status<300){const{response:t}=this;const{direct_upload:e}=t;delete t.direct_upload;this.attributes=t;this.directUploadData=e;this.callback(null,this.toJSON())}else this.requestDidError(t)}requestDidError(t){this.callback(`Error creating Blob for "${this.file.name}". Status: ${this.status}`)}toJSON(){const t={};for(const e in this.attributes)t[e]=this.attributes[e];return t}}class BlobUpload{constructor(t){this.blob=t;this.file=t.file;const{url:e,headers:r}=t.directUploadData;this.xhr=new XMLHttpRequest;this.xhr.open("PUT",e,true);this.xhr.responseType="text";for(const t in r)this.xhr.setRequestHeader(t,r[t]);this.xhr.addEventListener("load",(t=>this.requestDidLoad(t)));this.xhr.addEventListener("error",(t=>this.requestDidError(t)))}create(t){this.callback=t;this.xhr.send(this.file.slice())}requestDidLoad(t){const{status:e,response:r}=this.xhr;e>=200&&e<300?this.callback(null,r):this.requestDidError(t)}requestDidError(t){this.callback(`Error storing "${this.file.name}". Status: ${this.xhr.status}`)}}let s=0;class DirectUpload{constructor(t,e,r){this.id=++s;this.file=t;this.url=e;this.delegate=r}create(t){FileChecksum.create(this.file,((e,r)=>{if(e){t(e);return}const i=new BlobRecord(this.file,r,this.url);notify(this.delegate,"directUploadWillCreateBlobWithXHR",i.xhr);i.create((e=>{if(e)t(e);else{const e=new BlobUpload(i);notify(this.delegate,"directUploadWillStoreFileWithXHR",e.xhr);e.create((e=>{e?t(e):t(null,i.toJSON())}))}}))}))}}function notify(t,e,...r){if(t&&"function"==typeof t[e])return t[e](...r)}class DirectUploadController{constructor(t,e){this.input=t;this.file=e;this.directUpload=new DirectUpload(this.file,this.url,this);this.dispatch("initialize")}start(t){const e=document.createElement("input");e.type="hidden";e.name=this.input.name;this.input.insertAdjacentElement("beforebegin",e);this.dispatch("start");this.directUpload.create(((r,i)=>{if(r){e.parentNode.removeChild(e);this.dispatchError(r)}else e.value=i.signed_id;this.dispatch("end");t(r)}))}uploadRequestDidProgress(t){const e=t.loaded/t.total*100;e&&this.dispatch("progress",{progress:e})}get url(){return this.input.getAttribute("data-direct-upload-url")}dispatch(t,e={}){e.file=this.file;e.id=this.directUpload.id;return dispatchEvent(this.input,`direct-upload:${t}`,{detail:e})}dispatchError(t){const e=this.dispatch("error",{error:t});e.defaultPrevented||alert(t)}directUploadWillCreateBlobWithXHR(t){this.dispatch("before-blob-request",{xhr:t})}directUploadWillStoreFileWithXHR(t){this.dispatch("before-storage-request",{xhr:t});t.upload.addEventListener("progress",(t=>this.uploadRequestDidProgress(t)))}}const n="input[type=file][data-direct-upload-url]:not([disabled])";class DirectUploadsController{constructor(t){this.form=t;this.inputs=findElements(t,n).filter((t=>t.files.length))}start(t){const e=this.createDirectUploadControllers();const startNextController=()=>{const r=e.shift();if(r)r.start((e=>{if(e){t(e);this.dispatch("end")}else startNextController()}));else{t();this.dispatch("end")}};this.dispatch("start");startNextController()}createDirectUploadControllers(){const t=[];this.inputs.forEach((e=>{toArray(e.files).forEach((r=>{const i=new DirectUploadController(e,r);t.push(i)}))}));return t}dispatch(t,e={}){return dispatchEvent(this.form,`direct-uploads:${t}`,{detail:e})}}const a="data-direct-uploads-processing";const o=new WeakMap;let h=false;function start(){if(!h){h=true;document.addEventListener("click",didClick,true);document.addEventListener("submit",didSubmitForm,true);document.addEventListener("ajax:before",didSubmitRemoteElement)}}function didClick(t){const{target:e}=t;"INPUT"!=e.tagName&&"BUTTON"!=e.tagName||"submit"!=e.type||!e.form||o.set(e.form,e)}function didSubmitForm(t){handleFormSubmissionEvent(t)}function didSubmitRemoteElement(t){"FORM"==t.target.tagName&&handleFormSubmissionEvent(t)}function handleFormSubmissionEvent(t){const e=t.target;if(e.hasAttribute(a)){t.preventDefault();return}const r=new DirectUploadsController(e);const{inputs:i}=r;if(i.length){t.preventDefault();e.setAttribute(a,"");i.forEach(disable);r.start((t=>{e.removeAttribute(a);t?i.forEach(enable):submitForm(e)}))}}function submitForm(t){let e=o.get(t)||findElement(t,"input[type=submit], button[type=submit]");if(e){const{disabled:t}=e;e.disabled=false;e.focus();e.click();e.disabled=t}else{e=document.createElement("input");e.type="submit";e.style.display="none";t.appendChild(e);e.click();t.removeChild(e)}o.delete(t)}function disable(t){t.disabled=true}function enable(t){t.disabled=false}function autostart(){window.ActiveStorage&&start()}setTimeout(autostart,1);t.DirectUpload=DirectUpload;t.start=start;Object.defineProperty(t,"__esModule",{value:true})}))})(0,t.exports);class AttachmentUpload{constructor(e,r){this.attachment=e;this.element=r;this.directUpload=new t.exports.DirectUpload(e.file,this.directUploadUrl,this)}start(){this.directUpload.create(this.directUploadDidComplete.bind(this))}directUploadWillStoreFileWithXHR(t){t.upload.addEventListener("progress",(t=>{const e=t.loaded/t.total*100;this.attachment.setUploadProgress(e)}))}directUploadDidComplete(t,e){if(t)throw new Error(`Direct upload failed: ${t}`);this.attachment.setAttributes({sgid:e.attachable_sgid,url:this.createBlobUrl(e.signed_id,e.filename)})}createBlobUrl(t,e){return this.blobUrlTemplate.replace(":signed_id",t).replace(":filename",encodeURIComponent(e))}get directUploadUrl(){return this.element.dataset.directUploadUrl}get blobUrlTemplate(){return this.element.dataset.blobUrlTemplate}}addEventListener("trix-attachment-add",(t=>{const{attachment:e,target:r}=t;if(e.file){const t=new AttachmentUpload(e,r);t.start()}}));+diff --git a/admin/vendor/javascript/@rails--request.js.js b/admin/vendor/javascript/@rails--request.js.jsnew file mode 100644index 0000000000..257abd3c45--- /dev/null+++ b/admin/vendor/javascript/@rails--request.js.js@@ -0,0 +1,4 @@+// @rails/[email protected] downloaded from https://ga.jspm.io/npm:@rails/[email protected]/src/index.js++class FetchResponse{constructor(t){this.response=t}get statusCode(){return this.response.status}get redirected(){return this.response.redirected}get ok(){return this.response.ok}get unauthenticated(){return 401===this.statusCode}get unprocessableEntity(){return 422===this.statusCode}get authenticationURL(){return this.response.headers.get("WWW-Authenticate")}get contentType(){const t=this.response.headers.get("Content-Type")||"";return t.replace(/;.*$/,"")}get headers(){return this.response.headers}get html(){return this.contentType.match(/^(application|text)\/(html|xhtml\+xml)$/)?this.text:Promise.reject(new Error(`Expected an HTML response but got "${this.contentType}" instead`))}get json(){return this.contentType.match(/^application\/.*json$/)?this.responseJson||(this.responseJson=this.response.json()):Promise.reject(new Error(`Expected a JSON response but got "${this.contentType}" instead`))}get text(){return this.responseText||(this.responseText=this.response.text())}get isTurboStream(){return this.contentType.match(/^text\/vnd\.turbo-stream\.html/)}async renderTurboStream(){if(!this.isTurboStream)return Promise.reject(new Error(`Expected a Turbo Stream response but got "${this.contentType}" instead`));window.Turbo?await window.Turbo.renderStreamMessage(await this.text):console.warn("You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js")}}class RequestInterceptor{static register(t){this.interceptor=t}static get(){return this.interceptor}static reset(){this.interceptor=void 0}}function getCookie(t){const e=document.cookie?document.cookie.split("; "):[];const n=`${encodeURIComponent(t)}=`;const s=e.find((t=>t.startsWith(n)));if(s){const t=s.split("=").slice(1).join("=");if(t)return decodeURIComponent(t)}}function compact(t){const e={};for(const n in t){const s=t[n];void 0!==s&&(e[n]=s)}return e}function metaContent(t){const e=document.head.querySelector(`meta[name="${t}"]`);return e&&e.content}function stringEntriesFromFormData(t){return[...t].reduce(((t,[e,n])=>t.concat("string"===typeof n?[[e,n]]:[])),[])}function mergeEntries(t,e){for(const[n,s]of e)if(!(s instanceof window.File))if(t.has(n)&&!n.includes("[]")){t.delete(n);t.set(n,s)}else t.append(n,s)}class FetchRequest{constructor(t,e,n={}){this.method=t;this.options=n;this.originalUrl=e.toString()}async perform(){try{const t=RequestInterceptor.get();t&&await t(this)}catch(t){console.error(t)}const t=new FetchResponse(await window.fetch(this.url,this.fetchOptions));if(t.unauthenticated&&t.authenticationURL)return Promise.reject(window.location.href=t.authenticationURL);t.ok&&t.isTurboStream&&await t.renderTurboStream();return t}addHeader(t,e){const n=this.additionalHeaders;n[t]=e;this.options.headers=n}sameHostname(){if(!this.originalUrl.startsWith("http:"))return true;try{return new URL(this.originalUrl).hostname===window.location.hostname}catch(t){return true}}get fetchOptions(){return{method:this.method.toUpperCase(),headers:this.headers,body:this.formattedBody,signal:this.signal,credentials:"same-origin",redirect:this.redirect}}get headers(){const t={"X-Requested-With":"XMLHttpRequest","Content-Type":this.contentType,Accept:this.accept};this.sameHostname()&&(t["X-CSRF-Token"]=this.csrfToken);return compact(Object.assign(t,this.additionalHeaders))}get csrfToken(){return getCookie(metaContent("csrf-param"))||metaContent("csrf-token")}get contentType(){return this.options.contentType?this.options.contentType:null==this.body||this.body instanceof window.FormData?void 0:this.body instanceof window.File?this.body.type:"application/json"}get accept(){switch(this.responseKind){case"html":return"text/html, application/xhtml+xml";case"turbo-stream":return"text/vnd.turbo-stream.html, text/html, application/xhtml+xml";case"json":return"application/json, application/vnd.api+json";default:return"*/*"}}get body(){return this.options.body}get query(){const t=(this.originalUrl.split("?")[1]||"").split("#")[0];const e=new URLSearchParams(t);let n=this.options.query;n=n instanceof window.FormData?stringEntriesFromFormData(n):n instanceof window.URLSearchParams?n.entries():Object.entries(n||{});mergeEntries(e,n);const s=e.toString();return s.length>0?`?${s}`:""}get url(){return this.originalUrl.split("?")[0].split("#")[0]+this.query}get responseKind(){return this.options.responseKind||"html"}get signal(){return this.options.signal}get redirect(){return this.options.redirect||"follow"}get additionalHeaders(){return this.options.headers||{}}get formattedBody(){const t="[object String]"===Object.prototype.toString.call(this.body);const e="application/json"===this.headers["Content-Type"];return e&&!t?JSON.stringify(this.body):this.body}}async function get(t,e){const n=new FetchRequest("get",t,e);return n.perform()}async function post(t,e){const n=new FetchRequest("post",t,e);return n.perform()}async function put(t,e){const n=new FetchRequest("put",t,e);return n.perform()}async function patch(t,e){const n=new FetchRequest("patch",t,e);return n.perform()}async function destroy(t,e){const n=new FetchRequest("delete",t,e);return n.perform()}export{FetchRequest,FetchResponse,RequestInterceptor,destroy,get,patch,post,put};+diff --git a/admin/vendor/javascript/@simonwep--pickr.js b/admin/vendor/javascript/@simonwep--pickr.jsnew file mode 100644index 0000000000..f0f6e0d204--- /dev/null+++ b/admin/vendor/javascript/@simonwep--pickr.js@@ -0,0 +1,4 @@+// @simonwep/[email protected] downloaded from https://ga.jspm.io/npm:@simonwep/[email protected]/dist/pickr.min.js++var t={};!function(u,h){t=h()}(self,(()=>(()=>{var t={d:(u,h)=>{for(var d in h)t.o(h,d)&&!t.o(u,d)&&Object.defineProperty(u,d,{enumerable:!0,get:h[d]})},o:(t,u)=>Object.prototype.hasOwnProperty.call(t,u),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},u={};t.d(u,{default:()=>E});var h={};function n(t,u,h,d,m={}){u instanceof HTMLCollection||u instanceof NodeList?u=Array.from(u):Array.isArray(u)||(u=[u]),Array.isArray(h)||(h=[h]);for(const S of u)for(const u of h)S[t](u,d,{capture:!1,...m});return Array.prototype.slice.call(arguments,1)}t.r(h),t.d(h,{adjustableInputNumbers:()=>p,createElementFromString:()=>r,createFromTemplate:()=>a,eventPath:()=>l,off:()=>m,on:()=>d,resolveElement:()=>c});const d=n.bind(null,"addEventListener"),m=n.bind(null,"removeEventListener");function r(t){const u=document.createElement("div");return u.innerHTML=t.trim(),u.firstElementChild}function a(t){const e=(t,u)=>{const h=t.getAttribute(u);return t.removeAttribute(u),h},o=(t,u={})=>{const h=e(t,":obj"),d=e(t,":ref"),m=h?u[h]={}:u;d&&(u[d]=t);for(const u of Array.from(t.children)){const t=e(u,":arr"),h=o(u,t?{}:m);t&&(m[t]||(m[t]=[])).push(Object.keys(h).length?h:u)}return u};return o(r(t))}function l(t){let u=t.path||t.composedPath&&t.composedPath();if(u)return u;let h=t.target.parentElement;for(u=[t.target,h];h=h.parentElement;)u.push(h);return u.push(document,window),u}function c(t){return t instanceof Element?t:"string"==typeof t?t.split(/>>/g).reduce(((t,u,h,d)=>(t=t.querySelector(u),h<d.length-1?t.shadowRoot:t)),document):null}function p(t,u=(t=>t)){function o(h){const d=[.001,.01,.1][Number(h.shiftKey||2*h.ctrlKey)]*(h.deltaY<0?1:-1);let m=0,S=t.selectionStart;t.value=t.value.replace(/[\d.]+/g,((t,h)=>h<=S&&h+t.length>=S?(S=h,u(Number(t),d,m)):(m++,t))),t.focus(),t.setSelectionRange(S,S),h.preventDefault(),t.dispatchEvent(new Event("input"))}d(t,"focus",(()=>d(window,"wheel",o,{passive:!1}))),d(t,"blur",(()=>m(window,"wheel",o)))}const{min:S,max:L,floor:B,round:P}=Math;function f(t,u,h){u/=100,h/=100;const d=B(t=t/360*6),m=t-d,S=h*(1-u),L=h*(1-m*u),P=h*(1-(1-m)*u),x=d%6;return[255*[h,L,S,S,P,h][x],255*[P,h,h,L,S,S][x],255*[S,S,P,h,h,L][x]]}function v(t,u,h){const d=(2-(u/=100))*(h/=100)/2;return 0!==d&&(u=1===d?0:d<.5?u*h/(2*d):u*h/(2-2*d)),[t,100*u,100*d]}function b(t,u,h){const d=S(t/=255,u/=255,h/=255),m=L(t,u,h),B=m-d;let P,x;if(0===B)P=x=0;else{x=B/m;const d=((m-t)/6+B/2)/B,S=((m-u)/6+B/2)/B,L=((m-h)/6+B/2)/B;t===m?P=L-S:u===m?P=1/3+d-L:h===m&&(P=2/3+S-d),P<0?P+=1:P>1&&(P-=1)}return[360*P,100*x,100*m]}function y(t,u,h,d){u/=100,h/=100;return[...b(255*(1-S(1,(t/=100)*(1-(d/=100))+d)),255*(1-S(1,u*(1-d)+d)),255*(1-S(1,h*(1-d)+d)))]}function g(t,u,h){u/=100;const d=2*(u*=(h/=100)<.5?h:1-h)/(h+u)*100,m=100*(h+u);return[t,isNaN(d)?0:d,m]}function _(t){return b(...t.match(/.{2}/g).map((t=>parseInt(t,16))))}function w(t){t=t.match(/^[a-zA-Z]+$/)?function(t){if("black"===t.toLowerCase())return"#000";const u=document.createElement("canvas").getContext("2d");return u.fillStyle=t,"#000"===u.fillStyle?null:u.fillStyle}(t):t;const u={cmyk:/^cmyk\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)/i,rgba:/^rgba?\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D*?(([\d.]+)(%?)|$)/i,hsla:/^hsla?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hsva:/^hsva?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},o=t=>t.map((t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0));let h;t:for(const d in u)if(h=u[d].exec(t))switch(d){case"cmyk":{const[,t,u,m,S]=o(h);if(t>100||u>100||m>100||S>100)break t;return{values:y(t,u,m,S),type:d}}case"rgba":{let[,t,,u,,m,,,S]=o(h);if(t="%"===h[2]?t/100*255:t,u="%"===h[4]?u/100*255:u,m="%"===h[6]?m/100*255:m,S="%"===h[9]?S/100:S,t>255||u>255||m>255||S<0||S>1)break t;return{values:[...b(t,u,m),S],a:S,type:d}}case"hexa":{let[,t]=h;4!==t.length&&3!==t.length||(t=t.split("").map((t=>t+t)).join(""));const u=t.substring(0,6);let m=t.substring(6);return m=m?parseInt(m,16)/255:void 0,{values:[..._(u),m],a:m,type:d}}case"hsla":{let[,t,u,m,,S]=o(h);if(S="%"===h[6]?S/100:S,t>360||u>100||m>100||S<0||S>1)break t;return{values:[...g(t,u,m),S],a:S,type:d}}case"hsva":{let[,t,u,m,,S]=o(h);if(S="%"===h[6]?S/100:S,t>360||u>100||m>100||S<0||S>1)break t;return{values:[t,u,m,S],a:S,type:d}}}return{values:null,type:null}}function A(t=0,u=0,h=0,d=1){const i=(t,u)=>(h=-1)=>u(~h?t.map((t=>Number(t.toFixed(h)))):t),m={h:t,s:u,v:h,a:d,toHSVA(){const t=[m.h,m.s,m.v,m.a];return t.toString=i(t,(t=>`hsva(${t[0]}, ${t[1]}%, ${t[2]}%, ${m.a})`)),t},toHSLA(){const t=[...v(m.h,m.s,m.v),m.a];return t.toString=i(t,(t=>`hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${m.a})`)),t},toRGBA(){const t=[...f(m.h,m.s,m.v),m.a];return t.toString=i(t,(t=>`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${m.a})`)),t},toCMYK(){const t=function(t,u,h){const d=f(t,u,h),m=d[0]/255,L=d[1]/255,B=d[2]/255,P=S(1-m,1-L,1-B);return[100*(1===P?0:(1-m-P)/(1-P)),100*(1===P?0:(1-L-P)/(1-P)),100*(1===P?0:(1-B-P)/(1-P)),100*P]}(m.h,m.s,m.v);return t.toString=i(t,(t=>`cmyk(${t[0]}%, ${t[1]}%, ${t[2]}%, ${t[3]}%)`)),t},toHEXA(){const t=function(t,u,h){return f(t,u,h).map((t=>P(t).toString(16).padStart(2,"0")))}(m.h,m.s,m.v),u=m.a>=1?"":Number((255*m.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return u&&t.push(u),t.toString=()=>`#${t.join("").toUpperCase()}`,t},clone:()=>A(m.h,m.s,m.v,m.a)};return m}const $=t=>Math.max(Math.min(t,1),0);function C(t){const u={options:Object.assign({lock:null,onchange:()=>0,onstop:()=>0},t),_keyboard(t){const{options:h}=u,{type:d,key:m}=t;if(document.activeElement===h.wrapper){const{lock:h}=u.options,S="ArrowUp"===m,L="ArrowRight"===m,B="ArrowDown"===m,P="ArrowLeft"===m;if("keydown"===d&&(S||L||B||P)){let d=0,m=0;"v"===h?d=S||L?1:-1:"h"===h?d=S||L?-1:1:(m=S?-1:B?1:0,d=P?-1:L?1:0),u.update($(u.cache.x+.01*d),$(u.cache.y+.01*m)),t.preventDefault()}else m.startsWith("Arrow")&&(u.options.onstop(),t.preventDefault())}},_tapstart(t){d(document,["mouseup","touchend","touchcancel"],u._tapstop),d(document,["mousemove","touchmove"],u._tapmove),t.cancelable&&t.preventDefault(),u._tapmove(t)},_tapmove(t){const{options:h,cache:d}=u,{lock:m,element:S,wrapper:L}=h,B=L.getBoundingClientRect();let P=0,x=0;if(t){const u=t&&t.touches&&t.touches[0];P=t?(u||t).clientX:0,x=t?(u||t).clientY:0,P<B.left?P=B.left:P>B.left+B.width&&(P=B.left+B.width),x<B.top?x=B.top:x>B.top+B.height&&(x=B.top+B.height),P-=B.left,x-=B.top}else d&&(P=d.x*B.width,x=d.y*B.height);"h"!==m&&(S.style.left=`calc(${P/B.width*100}% - ${S.offsetWidth/2}px)`),"v"!==m&&(S.style.top=`calc(${x/B.height*100}% - ${S.offsetHeight/2}px)`),u.cache={x:P/B.width,y:x/B.height};const R=$(P/B.width),D=$(x/B.height);switch(m){case"v":return h.onchange(R);case"h":return h.onchange(D);default:return h.onchange(R,D)}},_tapstop(){u.options.onstop(),m(document,["mouseup","touchend","touchcancel"],u._tapstop),m(document,["mousemove","touchmove"],u._tapmove)},trigger(){u._tapmove()},update(t=0,h=0){const{left:d,top:m,width:S,height:L}=u.options.wrapper.getBoundingClientRect();"h"===u.options.lock&&(h=t),u._tapmove({clientX:d+S*t,clientY:m+L*h})},destroy(){const{options:t,_tapstart:h,_keyboard:d}=u;m(document,["keydown","keyup"],d),m([t.wrapper,t.element],"mousedown",h),m([t.wrapper,t.element],"touchstart",h,{passive:!1})}},{options:h,_tapstart:S,_keyboard:L}=u;return d([h.wrapper,h.element],"mousedown",S),d([h.wrapper,h.element],"touchstart",S,{passive:!1}),d(document,["keydown","keyup"],L),u}function k(t={}){t=Object.assign({onchange:()=>0,className:"",elements:[]},t);const u=d(t.elements,"click",(u=>{t.elements.forEach((h=>h.classList[u.target===h?"add":"remove"](t.className))),t.onchange(u),u.stopPropagation()}));return{destroy:()=>m(...u)}}const x={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0},O=(t,u,h)=>{const d="object"!=typeof t||t instanceof HTMLElement?{reference:t,popper:u,...h}:t;return{update(t=d){const{reference:u,popper:h}=Object.assign(d,t);if(!h||!u)throw new Error("Popper- or reference-element missing.");return((t,u,h)=>{const{container:d,arrow:m,margin:S,padding:L,position:B,variantFlipOrder:P,positionFlipOrder:R}={container:document.documentElement.getBoundingClientRect(),...x,...h},{left:D,top:H}=u.style;u.style.left="0",u.style.top="0";const j=t.getBoundingClientRect(),F=u.getBoundingClientRect(),N={t:j.top-F.height-S,b:j.bottom+S,r:j.right+S,l:j.left-F.width-S},T={vs:j.left,vm:j.left+j.width/2-F.width/2,ve:j.left+j.width-F.width,hs:j.top,hm:j.bottom-j.height/2-F.height/2,he:j.bottom-F.height},[M,U="middle"]=B.split("-"),V=R[M],z=P[U],{top:I,left:X,bottom:G,right:K}=d;for(const t of V){const h="t"===t||"b"===t;let d=N[t];const[S,B]=h?["top","left"]:["left","top"],[P,x]=h?[F.height,F.width]:[F.width,F.height],[R,D]=h?[G,K]:[K,G],[H,M]=h?[I,X]:[X,I];if(!(d<H||d+P+L>R))for(const R of z){let H=T[(h?"v":"h")+R];if(!(H<M||H+x+L>D)){if(H-=F[B],d-=F[S],u.style[B]=`${H}px`,u.style[S]=`${d}px`,m){const u=h?j.width/2:j.height/2,L=x/2,D=u>L,F=H+{s:D?L:u,m:L,e:D?L:x-u}[R],N=d+{t:P,b:0,r:0,l:P}[t];m.style[B]=`${F}px`,m.style[S]=`${N}px`}return t+R}}}return u.style.left=D,u.style.top=H,null})(u,h,d)}}};class E{static utils=h;static version="1.9.1";static I18N_DEFAULTS={"ui:dialog":"color picker dialog","btn:toggle":"toggle color picker dialog","btn:swatch":"color swatch","btn:last-color":"use previous color","btn:save":"Save","btn:cancel":"Cancel","btn:clear":"Clear","aria:btn:save":"save and close","aria:btn:cancel":"cancel and close","aria:btn:clear":"clear and close","aria:input":"color input field","aria:palette":"color selection area","aria:hue":"hue selection slider","aria:opacity":"selection slider"};static DEFAULT_OPTIONS={appClass:null,theme:"classic",useAsButton:!1,padding:8,disabled:!1,comparison:!0,closeOnScroll:!1,outputPrecision:0,lockOpacity:!1,autoReposition:!0,container:"body",components:{interaction:{}},i18n:{},swatches:null,inline:!1,sliders:null,default:"#42445a",defaultRepresentation:null,position:"bottom-middle",adjustableNumbers:!0,showAlways:!1,closeWithKey:"Escape"};_initializingActive=!0;_recalc=!0;_nanopop=null;_root=null;_color=A();_lastColor=A();_swatchColors=[];_setupAnimationFrame=null;_eventListener={init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]};constructor(t){this.options=t=Object.assign({...E.DEFAULT_OPTIONS},t);const{swatches:u,components:h,theme:d,sliders:m,lockOpacity:S,padding:L}=t;["nano","monolith"].includes(d)&&!m&&(t.sliders="h"),h.interaction||(h.interaction={});const{preview:B,opacity:P,hue:x,palette:R}=h;h.opacity=!S&&P,h.palette=R||B||P||x,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),u&&u.length&&u.forEach((t=>this.addSwatch(t)));const{button:D,app:H}=this._root;this._nanopop=O(D,H,{margin:L}),D.setAttribute("role","button"),D.setAttribute("aria-label",this._t("btn:toggle"));const j=this;this._setupAnimationFrame=requestAnimationFrame((function e(){if(!H.offsetWidth)return requestAnimationFrame(e);j.setColor(t.default),j._rePositioningPicker(),t.defaultRepresentation&&(j._representation=t.defaultRepresentation,j.setColorRepresentation(j._representation)),t.showAlways&&j.show(),j._initializingActive=!1,j._emit("init")}))}static create=t=>new E(t);_preBuild(){const{options:t}=this;for(const u of["el","container"])t[u]=c(t[u]);this._root=(t=>{const{components:u,useAsButton:h,inline:d,appClass:m,theme:S,lockOpacity:L}=t.options,l=t=>t?"":'style="display:none" hidden',c=u=>t._t(u),B=a(`\n <div :ref="root" class="pickr">\n\n ${h?"":'<button type="button" :ref="button" class="pcr-button"></button>'}\n\n <div :ref="app" class="pcr-app ${m||""}" data-theme="${S}" ${d?'style="position: unset"':""} aria-label="${c("ui:dialog")}" role="window">\n <div class="pcr-selection" ${l(u.palette)}>\n <div :obj="preview" class="pcr-color-preview" ${l(u.preview)}>\n <button type="button" :ref="lastColor" class="pcr-last-color" aria-label="${c("btn:last-color")}"></button>\n <div :ref="currentColor" class="pcr-current-color"></div>\n </div>\n\n <div :obj="palette" class="pcr-color-palette">\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="palette" class="pcr-palette" tabindex="0" aria-label="${c("aria:palette")}" role="listbox"></div>\n </div>\n\n <div :obj="hue" class="pcr-color-chooser" ${l(u.hue)}>\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="slider" class="pcr-hue pcr-slider" tabindex="0" aria-label="${c("aria:hue")}" role="slider"></div>\n </div>\n\n <div :obj="opacity" class="pcr-color-opacity" ${l(u.opacity)}>\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="slider" class="pcr-opacity pcr-slider" tabindex="0" aria-label="${c("aria:opacity")}" role="slider"></div>\n </div>\n </div>\n\n <div class="pcr-swatches ${u.palette?"":"pcr-last"}" :ref="swatches"></div>\n\n <div :obj="interaction" class="pcr-interaction" ${l(Object.keys(u.interaction).length)}>\n <input :ref="result" class="pcr-result" type="text" spellcheck="false" ${l(u.interaction.input)} aria-label="${c("aria:input")}">\n\n <input :arr="options" class="pcr-type" data-type="HEXA" value="${L?"HEX":"HEXA"}" type="button" ${l(u.interaction.hex)}>\n <input :arr="options" class="pcr-type" data-type="RGBA" value="${L?"RGB":"RGBA"}" type="button" ${l(u.interaction.rgba)}>\n <input :arr="options" class="pcr-type" data-type="HSLA" value="${L?"HSL":"HSLA"}" type="button" ${l(u.interaction.hsla)}>\n <input :arr="options" class="pcr-type" data-type="HSVA" value="${L?"HSV":"HSVA"}" type="button" ${l(u.interaction.hsva)}>\n <input :arr="options" class="pcr-type" data-type="CMYK" value="CMYK" type="button" ${l(u.interaction.cmyk)}>\n\n <input :ref="save" class="pcr-save" value="${c("btn:save")}" type="button" ${l(u.interaction.save)} aria-label="${c("aria:btn:save")}">\n <input :ref="cancel" class="pcr-cancel" value="${c("btn:cancel")}" type="button" ${l(u.interaction.cancel)} aria-label="${c("aria:btn:cancel")}">\n <input :ref="clear" class="pcr-clear" value="${c("btn:clear")}" type="button" ${l(u.interaction.clear)} aria-label="${c("aria:btn:clear")}">\n </div>\n </div>\n </div>\n `),P=B.interaction;return P.options.find((t=>!t.hidden&&!t.classList.add("active"))),P.type=()=>P.options.find((t=>t.classList.contains("active"))),B})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root)}_finalBuild(){const t=this.options,u=this._root;if(t.container.removeChild(u.root),t.inline){const h=t.el.parentElement;t.el.nextSibling?h.insertBefore(u.app,t.el.nextSibling):h.appendChild(u.app)}else t.container.appendChild(u.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(u.root,t.el),t.disabled&&this.disable(),t.comparison||(u.button.style.transition="none",t.useAsButton||(u.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const t=this,u=this.options.components,h=(t.options.sliders||"v").repeat(2),[d,m]=h.match(/^[vh]+$/g)?h:[],s=()=>this._color||(this._color=this._lastColor.clone()),S={palette:C({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(h,d){if(!u.palette)return;const m=s(),{_root:S,options:L}=t,{lastColor:B,currentColor:P}=S.preview;t._recalc&&(m.s=100*h,m.v=100-100*d,m.v<0&&(m.v=0),t._updateOutput("slider"));const x=m.toRGBA().toString(0);this.element.style.background=x,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${m.a}), transparent),\n linear-gradient(to left, hsla(${m.h}, 100%, 50%, ${m.a}), rgba(255, 255, 255, ${m.a}))\n `,L.comparison?L.useAsButton||t._lastColor||B.style.setProperty("--pcr-color",x):(S.button.style.setProperty("--pcr-color",x),S.button.classList.remove("clear"));const R=m.toHEXA().toString();for(const{el:u,color:h}of t._swatchColors)u.classList[R===h.toHEXA().toString()?"add":"remove"]("pcr-active");P.style.setProperty("--pcr-color",x)}}),hue:C({lock:"v"===m?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(h){if(!u.hue||!u.palette)return;const d=s();t._recalc&&(d.h=360*h),this.element.style.backgroundColor=`hsl(${d.h}, 100%, 50%)`,S.palette.trigger()}}),opacity:C({lock:"v"===d?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(h){if(!u.opacity||!u.palette)return;const d=s();t._recalc&&(d.a=Math.round(100*h)/100),this.element.style.background=`rgba(0, 0, 0, ${d.a})`,S.palette.trigger()}}),selectable:k({elements:t._root.interaction.options,className:"active",onchange(u){t._representation=u.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch")}})};this._components=S}_bindEvents(){const{_root:t,options:u}=this,h=[d(t.interaction.clear,"click",(()=>this._clearColor())),d([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")})),d(t.interaction.save,"click",(()=>{!this.applyColor()&&!u.showAlways&&this.hide()})),d(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation()})),d(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null)})),d([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!u.showAlways){const m=u.closeWithKey;h.push(d(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),d(document,"keyup",(t=>this.isOpen()&&(t.key===m||t.code===m)&&this.hide())),d(document,["touchstart","mousedown"],(u=>{this.isOpen()&&!l(u).some((u=>u===t.app||u===t.button))&&this.hide()}),{capture:!0}))}if(u.adjustableNumbers){const u={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,h,d)=>{const m=u[this.getColorRepresentation().toLowerCase()];if(m){const u=m[d],S=t+(u>=100?1e3*h:h);return S<=0?0:Number((S<u?S:u).toPrecision(3))}return t}))}if(u.autoReposition&&!u.inline){let t=null;const m=this;h.push(d(window,["scroll","resize"],(()=>{m.isOpen()&&(u.closeOnScroll&&m.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){m._rePositioningPicker(),null!==t&&requestAnimationFrame(e)}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)))}),{capture:!0}))}this._eventBindings=h}_rePositioningPicker(){const{options:t}=this;if(!t.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,u=t.getBoundingClientRect();t.style.top=(window.innerHeight-u.height)/2+"px",t.style.left=(window.innerWidth-u.width)/2+"px"}}_updateOutput(t){const{_root:u,_color:h,options:d}=this;if(u.interaction.type()){const t=`to${u.interaction.type().getAttribute("data-type")}`;u.interaction.result.value="function"==typeof h[t]?h[t]().toString(d.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",h,t,this)}_clearColor(t=!1){const{_root:u,options:h}=this;h.useAsButton||u.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),u.button.classList.add("clear"),h.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(t){const{values:u,type:h,a:d}=w(t),{lockOpacity:m}=this.options,S=void 0!==d&&1!==d;return u&&3===u.length&&(u[3]=void 0),{values:!u||m&&S?null:u,type:h}}_t(t){return this.options.i18n[t]||E.I18N_DEFAULTS[t]}_emit(t,...u){this._eventListener[t].forEach((t=>t(...u,this)))}on(t,u){return this._eventListener[t].push(u),this}off(t,u){const h=this._eventListener[t]||[],d=h.indexOf(u);return~d&&h.splice(d,1),this}addSwatch(t){const{values:u}=this._parseLocalColor(t);if(u){const{_swatchColors:t,_root:h}=this,m=A(...u),S=r(`<button type="button" style="--pcr-color: ${m.toRGBA().toString(0)}" aria-label="${this._t("btn:swatch")}"/>`);return h.swatches.appendChild(S),t.push({el:S,color:m}),this._eventBindings.push(d(S,"click",(()=>{this.setHSVA(...m.toHSVA(),!0),this._emit("swatchselect",m),this._emit("change",m,"swatch",this)}))),!0}return!1}removeSwatch(t){const u=this._swatchColors[t];if(u){const{el:h}=u;return this._root.swatches.removeChild(h),this._swatchColors.splice(t,1),!0}return!1}applyColor(t=!1){const{preview:u,button:h}=this._root,d=this._color.toRGBA().toString(0);return u.lastColor.style.setProperty("--pcr-color",d),this.options.useAsButton||h.style.setProperty("--pcr-color",d),h.classList.remove("clear"),this._lastColor=this._color.clone(),this._initializingActive||t||this._emit("save",this._color),this}destroy(){cancelAnimationFrame(this._setupAnimationFrame),this._eventBindings.forEach((t=>m(...t))),Object.keys(this._components).forEach((t=>this._components[t].destroy()))}destroyAndRemove(){this.destroy();const{root:t,app:u}=this._root;t.parentElement&&t.parentElement.removeChild(t),u.parentElement.removeChild(u),Object.keys(this).forEach((t=>this[t]=null))}hide(){return!!this.isOpen()&&(this._root.app.classList.remove("visible"),this._emit("hide"),!0)}show(){return!this.options.disabled&&!this.isOpen()&&(this._root.app.classList.add("visible"),this._rePositioningPicker(),this._emit("show",this._color),this)}isOpen(){return this._root.app.classList.contains("visible")}setHSVA(t=360,u=0,h=0,d=1,m=!1){const S=this._recalc;if(this._recalc=!1,t<0||t>360||u<0||u>100||h<0||h>100||d<0||d>1)return!1;this._color=A(t,u,h,d);const{hue:L,opacity:B,palette:P}=this._components;return L.update(t/360),B.update(d),P.update(u/100,1-h/100),m||this.applyColor(),S&&this._updateOutput(),this._recalc=S,!0}setColor(t,u=!1){if(null===t)return this._clearColor(u),!0;const{values:h,type:d}=this._parseLocalColor(t);if(h){const t=d.toUpperCase(),{options:m}=this._root.interaction,S=m.find((u=>u.getAttribute("data-type")===t));if(S&&!S.hidden)for(const t of m)t.classList[t===S?"add":"remove"]("active");return!!this.setHSVA(...h,u)&&this.setColorRepresentation(t)}return!1}setColorRepresentation(t){return t=t.toUpperCase(),!!this._root.interaction.options.find((u=>u.getAttribute("data-type").startsWith(t)&&!u.click()))}getColorRepresentation(){return this._representation}getColor(){return this._color}getSelectedColor(){return this._lastColor}getRoot(){return this._root}disable(){return this.hide(),this.options.disabled=!0,this._root.button.classList.add("disabled"),this}enable(){return this.options.disabled=!1,this._root.button.classList.remove("disabled"),this}}return u.default})()));var u=t;const h=t.Pickr;export{h as Pickr,u as default};+diff --git a/admin/vendor/javascript/@stimulus-components--auto-submit.js b/admin/vendor/javascript/@stimulus-components--auto-submit.jsnew file mode 100644index 0000000000..694fb79b77--- /dev/null+++ b/admin/vendor/javascript/@stimulus-components--auto-submit.js@@ -0,0 +1,4 @@+// @stimulus-components/[email protected] downloaded from https://ga.jspm.io/npm:@stimulus-components/[email protected]/dist/stimulus-auto-submit.mjs++import{Controller as t}from"@hotwired/stimulus";function debounce(t,e){let i;return(...s)=>{clearTimeout(i),i=setTimeout((()=>{t.apply(this,s)}),e)}}const e=class _AutoSubmit extends t{initialize(){this.submit=this.submit.bind(this)}connect(){this.delayValue>0&&(this.submit=debounce(this.submit,this.delayValue))}submit(){this.element.requestSubmit()}};e.values={delay:{type:Number,default:150}};let i=e;export{i as default};+diff --git a/admin/vendor/javascript/@stimulus-components--rails-nested-form.js b/admin/vendor/javascript/@stimulus-components--rails-nested-form.jsnew file mode 100644index 0000000000..8b2b4762d4--- /dev/null+++ b/admin/vendor/javascript/@stimulus-components--rails-nested-form.js@@ -0,0 +1,4 @@+// @stimulus-components/[email protected] downloaded from https://ga.jspm.io/npm:@stimulus-components/[email protected]/dist/stimulus-rails-nested-form.mjs++import{Controller as e}from"@hotwired/stimulus";const t=class _RailsNestedForm extends e{add(e){e.preventDefault();const t=this.templateTarget.innerHTML.replace(/NEW_RECORD/g,(new Date).getTime().toString());this.targetTarget.insertAdjacentHTML("beforebegin",t);const r=new CustomEvent("rails-nested-form:add",{bubbles:!0});this.element.dispatchEvent(r)}remove(e){e.preventDefault();const t=e.target.closest(this.wrapperSelectorValue);if(t.dataset.newRecord==="true")t.remove();else{t.style.display="none";const e=t.querySelector("input[name*='_destroy']");e.value="1"}const r=new CustomEvent("rails-nested-form:remove",{bubbles:!0});this.element.dispatchEvent(r)}};t.targets=["target","template"],t.values={wrapperSelector:{type:String,default:".nested-form-wrapper"}};let r=t;export{r as default};+diff --git a/admin/vendor/javascript/bootstrap--dist--js--bootstrap.bundle.min.js.js b/admin/vendor/javascript/bootstrap--dist--js--bootstrap.bundle.min.js.jsnew file mode 100644index 0000000000..b95619e491--- /dev/null+++ b/admin/vendor/javascript/bootstrap--dist--js--bootstrap.bundle.min.js.js@@ -0,0 +1,8 @@+// bootstrap/dist/js/[email protected] downloaded from https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js++/*!+ * Bootstrap v4.6.1 (https://getbootstrap.com/)+ * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)+ */+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(e);function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function a(){return a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},a.apply(this,arguments)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var l="transitionend";var u={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=i.default(t).css("transition-duration"),n=i.default(t).css("transition-delay"),o=parseFloat(e),r=parseFloat(n);return o||r?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){i.default(t).trigger(l)},supportsTransitionEnd:function(){return Boolean(l)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],a=r&&u.isElement(r)?"element":null===(s=r)||"undefined"==typeof s?""+s:{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(a))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+o+'".')}var s},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof i.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=i.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};u.jQueryDetection(),i.default.fn.emulateTransitionEnd=function(t){var e=this,n=!1;return i.default(this).one(u.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||u.triggerTransitionEnd(e)}),t),this},i.default.event.special[u.TRANSITION_END]={bindType:l,delegateType:l,handle:function(t){if(i.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var f="bs.alert",d=i.default.fn.alert,c=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){i.default.removeData(this._element,f),this._element=null},e._getRootElement=function(t){var e=u.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=i.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=i.default.Event("close.bs.alert");return i.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(i.default(t).removeClass("show"),i.default(t).hasClass("fade")){var n=u.getTransitionDurationFromElement(t);i.default(t).one(u.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){i.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(f);o||(o=new t(this),n.data(f,o)),"close"===e&&o[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',c._handleDismiss(new c)),i.default.fn.alert=c._jQueryInterface,i.default.fn.alert.Constructor=c,i.default.fn.alert.noConflict=function(){return i.default.fn.alert=d,c._jQueryInterface};var h="bs.button",p=i.default.fn.button,m="active",g='[data-toggle^="button"]',_='input:not([type="hidden"])',v=".btn",b=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=i.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var o=this._element.querySelector(_);if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains(m))t=!1;else{var r=n.querySelector(".active");r&&i.default(r).removeClass(m)}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains(m)),this.shouldAvoidTriggerChange||i.default(o).trigger("change")),o.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(m)),t&&i.default(this._element).toggleClass(m))},e.dispose=function(){i.default.removeData(this._element,h),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this),r=o.data(h);r||(r=new t(this),o.data(h,r)),r.shouldAvoidTriggerChange=n,"toggle"===e&&r[e]()}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.button.data-api",g,(function(t){var e=t.target,n=e;if(i.default(e).hasClass("btn")||(e=i.default(e).closest(v)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var o=e.querySelector(_);if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||b._jQueryInterface.call(i.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",g,(function(t){var e=i.default(t.target).closest(v)[0];i.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),i.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector(_);o.checked||o.hasAttribute("checked")?i.classList.add(m):i.classList.remove(m)}for(var r=0,a=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;r<a;r++){var s=t[r];"true"===s.getAttribute("aria-pressed")?s.classList.add(m):s.classList.remove(m)}})),i.default.fn.button=b._jQueryInterface,i.default.fn.button.Constructor=b,i.default.fn.button.noConflict=function(){return i.default.fn.button=p,b._jQueryInterface};var y="carousel",E="bs.carousel",w=i.default.fn[y],T="active",C="next",S="prev",N="slid.bs.carousel",D=".active.carousel-item",A={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},k={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},I={TOUCH:"touch",PEN:"pen"},O=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(C)},e.nextWhenVisible=function(){var t=i.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(S)},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(u.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(D);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)i.default(this._element).one(N,(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var o=t>n?C:S;this._slide(o,this._items[t])}},e.dispose=function(){i.default(this._element).off(".bs.carousel"),i.default.removeData(this._element,E),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=a({},A,t),u.typeCheckConfig(y,t,k),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&i.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&i.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&I[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&I[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};i.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(i.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(i.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),i.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n=t===C,i=t===S,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var a=(o+(t===S?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(D)),r=i.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:o,to:n});return i.default(this._element).trigger(r),r},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));i.default(e).removeClass(T);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&i.default(n).addClass(T)}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(D);if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,o,r,a=this,s=this._element.querySelector(D),l=this._getItemIndex(s),f=e||s&&this._getItemByDirection(t,s),d=this._getItemIndex(f),c=Boolean(this._interval);if(t===C?(n="carousel-item-left",o="carousel-item-next",r="left"):(n="carousel-item-right",o="carousel-item-prev",r="right"),f&&i.default(f).hasClass(T))this._isSliding=!1;else if(!this._triggerSlideEvent(f,r).isDefaultPrevented()&&s&&f){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(f),this._activeElement=f;var h=i.default.Event(N,{relatedTarget:f,direction:r,from:l,to:d});if(i.default(this._element).hasClass("slide")){i.default(f).addClass(o),u.reflow(f),i.default(s).addClass(n),i.default(f).addClass(n);var p=u.getTransitionDurationFromElement(s);i.default(s).one(u.TRANSITION_END,(function(){i.default(f).removeClass(n+" "+o).addClass(T),i.default(s).removeClass("active "+o+" "+n),a._isSliding=!1,setTimeout((function(){return i.default(a._element).trigger(h)}),0)})).emulateTransitionEnd(p)}else i.default(s).removeClass(T),i.default(f).addClass(T),this._isSliding=!1,i.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(E),o=a({},A,i.default(this).data());"object"==typeof e&&(o=a({},o,e));var r="string"==typeof e?e:o.slide;if(n||(n=new t(this,o),i.default(this).data(E,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if("undefined"==typeof n[r])throw new TypeError('No method named "'+r+'"');n[r]()}else o.interval&&o.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=u.getSelectorFromElement(this);if(n){var o=i.default(n)[0];if(o&&i.default(o).hasClass("carousel")){var r=a({},i.default(o).data(),i.default(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),t._jQueryInterface.call(i.default(o),r),s&&i.default(o).data(E).to(s),e.preventDefault()}}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return A}}]),t}();i.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",O._dataApiClickHandler),i.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e<n;e++){var o=i.default(t[e]);O._jQueryInterface.call(o,o.data())}})),i.default.fn[y]=O._jQueryInterface,i.default.fn[y].Constructor=O,i.default.fn[y].noConflict=function(){return i.default.fn[y]=w,O._jQueryInterface};var x="collapse",j="bs.collapse",L=i.default.fn[x],P="show",F="collapse",R="collapsing",H="collapsed",M="width",q='[data-toggle="collapse"]',B={toggle:!0,parent:""},Q={toggle:"boolean",parent:"(string|element)"},W=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(q)),i=0,o=n.length;i<o;i++){var r=n[i],a=u.getSelectorFromElement(r),s=[].slice.call(document.querySelectorAll(a)).filter((function(e){return e===t}));null!==a&&s.length>0&&(this._selector=a,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){i.default(this._element).hasClass(P)?this.hide():this.show()},e.show=function(){var e,n,o=this;if(!(this._isTransitioning||i.default(this._element).hasClass(P)||(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains(F)}))).length&&(e=null),e&&(n=i.default(e).not(this._selector).data(j))&&n._isTransitioning))){var r=i.default.Event("show.bs.collapse");if(i.default(this._element).trigger(r),!r.isDefaultPrevented()){e&&(t._jQueryInterface.call(i.default(e).not(this._selector),"hide"),n||i.default(e).data(j,null));var a=this._getDimension();i.default(this._element).removeClass(F).addClass(R),this._element.style[a]=0,this._triggerArray.length&&i.default(this._triggerArray).removeClass(H).attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(a[0].toUpperCase()+a.slice(1)),l=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(){i.default(o._element).removeClass(R).addClass("collapse show"),o._element.style[a]="",o.setTransitioning(!1),i.default(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(l),this._element.style[a]=this._element[s]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&i.default(this._element).hasClass(P)){var e=i.default.Event("hide.bs.collapse");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",u.reflow(this._element),i.default(this._element).addClass(R).removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r<o;r++){var a=this._triggerArray[r],s=u.getSelectorFromElement(a);null!==s&&(i.default([].slice.call(document.querySelectorAll(s))).hasClass(P)||i.default(a).addClass(H).attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[n]="";var l=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(){t.setTransitioning(!1),i.default(t._element).removeClass(R).addClass(F).trigger("hidden.bs.collapse")})).emulateTransitionEnd(l)}}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){i.default.removeData(this._element,j),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=a({},B,t)).toggle=Boolean(t.toggle),u.typeCheckConfig(x,t,Q),t},e._getDimension=function(){return i.default(this._element).hasClass(M)?M:"height"},e._getParent=function(){var e,n=this;u.isElement(this._config.parent)?(e=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(e=this._config.parent[0])):e=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(e.querySelectorAll(o));return i.default(r).each((function(e,i){n._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])})),e},e._addAriaAndCollapsedClass=function(t,e){var n=i.default(t).hasClass(P);e.length&&i.default(e).toggleClass(H,!n).attr("aria-expanded",n)},t._getTargetFromElement=function(t){var e=u.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(j),r=a({},B,n.data(),"object"==typeof e&&e?e:{});if(!o&&r.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new t(this,r),n.data(j,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return B}}]),t}();i.default(document).on("click.bs.collapse.data-api",q,(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=i.default(this),n=u.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(n));i.default(o).each((function(){var t=i.default(this),n=t.data(j)?"toggle":e.data();W._jQueryInterface.call(t,n)}))})),i.default.fn[x]=W._jQueryInterface,i.default.fn[x].Constructor=W,i.default.fn[x].noConflict=function(){return i.default.fn[x]=L,W._jQueryInterface};var U="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,V=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(U&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}(),Y=U&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),V))}};function z(t){return t&&"[object Function]"==={}.toString.call(t)}function K(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function X(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function G(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=K(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:G(X(t))}function $(t){return t&&t.referenceNode?t.referenceNode:t}var J=U&&!(!window.MSInputMethodContext||!document.documentMode),Z=U&&/MSIE 10/.test(navigator.userAgent);function tt(t){return 11===t?J:10===t?Z:J||Z}function et(t){if(!t)return document.documentElement;for(var e=tt(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===K(n,"position")?et(n):n:t?t.ownerDocument.documentElement:document.documentElement}function nt(t){return null!==t.parentNode?nt(t.parentNode):t}function it(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var a,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&et(a.firstElementChild)!==a?et(l):l;var u=nt(t);return u.host?it(u.host,e):it(t,nt(e).host)}function ot(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||o;return r[n]}return t[n]}function rt(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=ot(e,"top"),o=ot(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function at(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function st(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],tt(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function lt(t){var e=t.body,n=t.documentElement,i=tt(10)&&getComputedStyle(n);return{height:st("Height",e,n,i),width:st("Width",e,n,i)}}var ut=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ft=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),dt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},ct=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function ht(t){return ct({},t,{right:t.left+t.width,bottom:t.top+t.height})}function pt(t){var e={};try{if(tt(10)){e=t.getBoundingClientRect();var n=ot(t,"top"),i=ot(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?lt(t.ownerDocument):{},a=r.width||t.clientWidth||o.width,s=r.height||t.clientHeight||o.height,l=t.offsetWidth-a,u=t.offsetHeight-s;if(l||u){var f=K(t);l-=at(f,"x"),u-=at(f,"y"),o.width-=l,o.height-=u}return ht(o)}function mt(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=tt(10),o="HTML"===e.nodeName,r=pt(t),a=pt(e),s=G(t),l=K(e),u=parseFloat(l.borderTopWidth),f=parseFloat(l.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=ht({top:r.top-a.top-u,left:r.left-a.left-f,width:r.width,height:r.height});if(d.marginTop=0,d.marginLeft=0,!i&&o){var c=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);d.top-=u-c,d.bottom-=u-c,d.left-=f-h,d.right-=f-h,d.marginTop=c,d.marginLeft=h}return(i&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(d=rt(d,e)),d}function gt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=mt(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:ot(n),s=e?0:ot(n,"left"),l={top:a-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:r};return ht(l)}function _t(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===K(t,"position"))return!0;var n=X(t);return!!n&&_t(n)}function vt(t){if(!t||!t.parentElement||tt())return document.documentElement;for(var e=t.parentElement;e&&"none"===K(e,"transform");)e=e.parentElement;return e||document.documentElement}function bt(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},a=o?vt(t):it(t,$(e));if("viewport"===i)r=gt(a,o);else{var s=void 0;"scrollParent"===i?"BODY"===(s=G(X(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var l=mt(s,a,o);if("HTML"!==s.nodeName||_t(a))r=l;else{var u=lt(t.ownerDocument),f=u.height,d=u.width;r.top+=l.top-l.marginTop,r.bottom=f+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}var c="number"==typeof(n=n||0);return r.left+=c?n:n.left||0,r.top+=c?n:n.top||0,r.right-=c?n:n.right||0,r.bottom-=c?n:n.bottom||0,r}function yt(t){return t.width*t.height}function Et(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=bt(n,i,r,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map((function(t){return ct({key:t},s[t],{area:yt(s[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),f=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return f+(d?"-"+d:"")}function wt(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?vt(e):it(e,$(n));return mt(n,o,i)}function Tt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function Ct(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function St(t,e,n){n=n.split("-")[0];var i=Tt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),a=r?"top":"left",s=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return o[a]=e[a]+e[l]/2-i[l]/2,o[s]=n===s?e[s]-i[u]:e[Ct(s)],o}function Nt(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function Dt(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t.name===n}));var i=Nt(t,(function(t){return t.name===n}));return t.indexOf(i)}(t,0,n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&z(n)&&(e.offsets.popper=ht(e.offsets.popper),e.offsets.reference=ht(e.offsets.reference),e=n(e,t))})),e}function At(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=wt(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=Et(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=St(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=Dt(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function kt(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function It(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var o=e[i],r=o?""+o+n:t;if("undefined"!=typeof document.body.style[r])return r}return null}function Ot(){return this.state.isDestroyed=!0,kt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[It("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function xt(t){var e=t.ownerDocument;return e?e.defaultView:window}function jt(t,e,n,i){var o="BODY"===t.nodeName,r=o?t.ownerDocument.defaultView:t;r.addEventListener(e,n,{passive:!0}),o||jt(G(r.parentNode),e,n,i),i.push(r)}function Lt(t,e,n,i){n.updateBound=i,xt(t).addEventListener("resize",n.updateBound,{passive:!0});var o=G(t);return jt(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function Pt(){this.state.eventsEnabled||(this.state=Lt(this.reference,this.options,this.state,this.scheduleUpdate))}function Ft(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,xt(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function Rt(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function Ht(t,e){Object.keys(e).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Rt(e[n])&&(i="px"),t.style[n]=e[n]+i}))}var Mt=U&&/Firefox/i.test(navigator.userAgent);function qt(t,e,n){var i=Nt(t,(function(t){return t.name===e})),o=!!i&&t.some((function(t){return t.name===n&&t.enabled&&t.order<i.order}));if(!o){var r="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}var Bt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Qt=Bt.slice(3);function Wt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Qt.indexOf(t),i=Qt.slice(n+1).concat(Qt.slice(0,n));return e?i.reverse():i}var Ut={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",f={start:dt({},l,r[l]),end:dt({},l,r[l]+r[u]-a[u])};t.offsets.popper=ct({},a,f[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n,i=e.offset,o=t.placement,r=t.offsets,a=r.popper,s=r.reference,l=o.split("-")[0];return n=Rt(+i)?[+i,0]:function(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(Nt(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return u=u.map((function(t,i){var o=(1===i?!r:r)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],a=o[2];return r?0===a.indexOf("%")?ht("%p"===a?n:i)[e]/100*r:"vh"===a||"vw"===a?("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r:r:t}(t,o,e,n)}))})),u.forEach((function(t,e){t.forEach((function(n,i){Rt(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}(i,a,s,l),"left"===l?(a.top+=n[0],a.left-=n[1]):"right"===l?(a.top+=n[0],a.left+=n[1]):"top"===l?(a.left+=n[0],a.top-=n[1]):"bottom"===l&&(a.left+=n[0],a.top+=n[1]),t.popper=a,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||et(t.instance.popper);t.instance.reference===n&&(n=et(n));var i=It("transform"),o=t.instance.popper.style,r=o.top,a=o.left,s=o[i];o.top="",o.left="",o[i]="";var l=bt(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=a,o[i]=s,e.boundaries=l;var u=e.priority,f=t.offsets.popper,d={primary:function(t){var n=f[t];return f[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(f[t],l[t])),dt({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=f[n];return f[t]>l[t]&&!e.escapeWithReference&&(i=Math.min(f[n],l[t]-("right"===t?f.width:f.height))),dt({},n,i)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";f=ct({},f,d[e](t))})),t.offsets.popper=f,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[u]),n[l]>r(i[s])&&(t.offsets.popper[l]=r(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!qt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,a=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",f=l?"Top":"Left",d=f.toLowerCase(),c=l?"left":"top",h=l?"bottom":"right",p=Tt(i)[u];s[h]-p<a[d]&&(t.offsets.popper[d]-=a[d]-(s[h]-p)),s[d]+p>a[h]&&(t.offsets.popper[d]+=s[d]+p-a[h]),t.offsets.popper=ht(t.offsets.popper);var m=s[d]+s[u]/2-p/2,g=K(t.instance.popper),_=parseFloat(g["margin"+f]),v=parseFloat(g["border"+f+"Width"]),b=m-t.offsets.popper[d]-_-v;return b=Math.max(Math.min(a[u]-p,b),0),t.arrowElement=i,t.offsets.arrow=(dt(n={},d,Math.round(b)),dt(n,c,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(kt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=bt(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=Ct(i),r=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case"flip":a=[i,o];break;case"clockwise":a=Wt(i);break;case"counterclockwise":a=Wt(i,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],o=Ct(i);var u=t.offsets.popper,f=t.offsets.reference,d=Math.floor,c="left"===i&&d(u.right)>d(f.left)||"right"===i&&d(u.left)<d(f.right)||"top"===i&&d(u.bottom)>d(f.top)||"bottom"===i&&d(u.top)<d(f.bottom),h=d(u.left)<d(n.left),p=d(u.right)>d(n.right),m=d(u.top)<d(n.top),g=d(u.bottom)>d(n.bottom),_="left"===i&&h||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,v=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(v&&"start"===r&&h||v&&"end"===r&&p||!v&&"start"===r&&m||!v&&"end"===r&&g),y=!!e.flipVariationsByContent&&(v&&"start"===r&&p||v&&"end"===r&&h||!v&&"start"===r&&g||!v&&"end"===r&&m),E=b||y;(c||_||E)&&(t.flipped=!0,(c||_)&&(i=a[l+1]),E&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=ct({},t.offsets.popper,St(t.instance.popper,t.offsets.reference,t.placement)),t=Dt(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=r[n]-(s?o[a?"width":"height"]:0),t.placement=Ct(e),t.offsets.popper=ht(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!qt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=Nt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=Nt(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a,s,l=void 0!==r?r:e.gpuAcceleration,u=et(t.instance.popper),f=pt(u),d={position:o.position},c=function(t,e){var n=t.offsets,i=n.popper,o=n.reference,r=Math.round,a=Math.floor,s=function(t){return t},l=r(o.width),u=r(i.width),f=-1!==["left","right"].indexOf(t.placement),d=-1!==t.placement.indexOf("-"),c=e?f||d||l%2==u%2?r:a:s,h=e?r:s;return{left:c(l%2==1&&u%2==1&&!d&&e?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:c(i.right)}}(t,window.devicePixelRatio<2||!Mt),h="bottom"===n?"top":"bottom",p="right"===i?"left":"right",m=It("transform");if(s="bottom"===h?"HTML"===u.nodeName?-u.clientHeight+c.bottom:-f.height+c.bottom:c.top,a="right"===p?"HTML"===u.nodeName?-u.clientWidth+c.right:-f.width+c.right:c.left,l&&m)d[m]="translate3d("+a+"px, "+s+"px, 0)",d[h]=0,d[p]=0,d.willChange="transform";else{var g="bottom"===h?-1:1,_="right"===p?-1:1;d[h]=s*g,d[p]=a*_,d.willChange=h+", "+p}var v={"x-placement":t.placement};return t.attributes=ct({},v,t.attributes),t.styles=ct({},d,t.styles),t.arrowStyles=ct({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return Ht(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach((function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&Ht(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,o){var r=wt(o,e,t,n.positionFixed),a=Et(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),Ht(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},Vt=function(){function t(e,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ut(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=Y(this.update.bind(this)),this.options=ct({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(ct({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=ct({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return ct({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&z(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return ft(t,[{key:"update",value:function(){return At.call(this)}},{key:"destroy",value:function(){return Ot.call(this)}},{key:"enableEventListeners",value:function(){return Pt.call(this)}},{key:"disableEventListeners",value:function(){return Ft.call(this)}}]),t}();Vt.Utils=("undefined"!=typeof window?window:global).PopperUtils,Vt.placements=Bt,Vt.Defaults=Ut;var Yt=Vt,zt="dropdown",Kt="bs.dropdown",Xt=i.default.fn[zt],Gt=new RegExp("38|40|27"),$t="disabled",Jt="show",Zt="dropdown-menu-right",te="hide.bs.dropdown",ee="hidden.bs.dropdown",ne="click.bs.dropdown.data-api",ie="keydown.bs.dropdown.data-api",oe='[data-toggle="dropdown"]',re=".dropdown-menu",ae={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},se={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},le=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!i.default(this._element).hasClass($t)){var e=i.default(this._menu).hasClass(Jt);t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||i.default(this._element).hasClass($t)||i.default(this._menu).hasClass(Jt))){var n={relatedTarget:this._element},o=i.default.Event("show.bs.dropdown",n),r=t._getParentFromElement(this._element);if(i.default(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&e){if("undefined"==typeof Yt)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var a=this._element;"parent"===this._config.reference?a=r:u.isElement(this._config.reference)&&(a=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.default(r).addClass("position-static"),this._popper=new Yt(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===i.default(r).closest(".navbar-nav").length&&i.default(document.body).children().on("mouseover",null,i.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),i.default(this._menu).toggleClass(Jt),i.default(r).toggleClass(Jt).trigger(i.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!i.default(this._element).hasClass($t)&&i.default(this._menu).hasClass(Jt)){var e={relatedTarget:this._element},n=i.default.Event(te,e),o=t._getParentFromElement(this._element);i.default(o).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),i.default(this._menu).toggleClass(Jt),i.default(o).toggleClass(Jt).trigger(i.default.Event(ee,e)))}},e.dispose=function(){i.default.removeData(this._element,Kt),i.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;i.default(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=a({},this.constructor.Default,i.default(this._element).data(),t),u.typeCheckConfig(zt,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(re))}return this._menu},e._getPlacement=function(){var t=i.default(this._element.parentNode),e="bottom-start";return t.hasClass("dropup")?e=i.default(this._menu).hasClass(Zt)?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":i.default(this._menu).hasClass(Zt)&&(e="bottom-end"),e},e._detectNavbar=function(){return i.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(Kt);if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data(Kt,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll(oe)),o=0,r=n.length;o<r;o++){var a=t._getParentFromElement(n[o]),s=i.default(n[o]).data(Kt),l={relatedTarget:n[o]};if(e&&"click"===e.type&&(l.clickEvent=e),s){var u=s._menu;if(i.default(a).hasClass(Jt)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&i.default.contains(a,e.target))){var f=i.default.Event(te,l);i.default(a).trigger(f),f.isDefaultPrevented()||("ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),n[o].setAttribute("aria-expanded","false"),s._popper&&s._popper.destroy(),i.default(u).removeClass(Jt),i.default(a).removeClass(Jt).trigger(i.default.Event(ee,l)))}}}},t._getParentFromElement=function(t){var e,n=u.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(e){if(!(/input|textarea/i.test(e.target.tagName)?32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||i.default(e.target).closest(re).length):!Gt.test(e.which))&&!this.disabled&&!i.default(this).hasClass($t)){var n=t._getParentFromElement(this),o=i.default(n).hasClass(Jt);if(o||27!==e.which){if(e.preventDefault(),e.stopPropagation(),!o||27===e.which||32===e.which)return 27===e.which&&i.default(n.querySelector(oe)).trigger("focus"),void i.default(this).trigger("click");var r=[].slice.call(n.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return i.default(t).is(":visible")}));if(0!==r.length){var a=r.indexOf(e.target);38===e.which&&a>0&&a--,40===e.which&&a<r.length-1&&a++,a<0&&(a=0),r[a].focus()}}}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return ae}},{key:"DefaultType",get:function(){return se}}]),t}();i.default(document).on(ie,oe,le._dataApiKeydownHandler).on(ie,re,le._dataApiKeydownHandler).on(ne+" keyup.bs.dropdown.data-api",le._clearMenus).on(ne,oe,(function(t){t.preventDefault(),t.stopPropagation(),le._jQueryInterface.call(i.default(this),"toggle")})).on(ne,".dropdown form",(function(t){t.stopPropagation()})),i.default.fn[zt]=le._jQueryInterface,i.default.fn[zt].Constructor=le,i.default.fn[zt].noConflict=function(){return i.default.fn[zt]=Xt,le._jQueryInterface};var ue="bs.modal",fe=i.default.fn.modal,de="modal-open",ce="fade",he="show",pe="modal-static",me="hidden.bs.modal",ge="show.bs.modal",_e="focusin.bs.modal",ve="resize.bs.modal",be="click.dismiss.bs.modal",ye="keydown.dismiss.bs.modal",Ee="mousedown.dismiss.bs.modal",we=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Te={backdrop:!0,keyboard:!0,focus:!0,show:!0},Ce={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Se=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){var n=i.default.Event(ge,{relatedTarget:t});i.default(this._element).trigger(n),n.isDefaultPrevented()||(this._isShown=!0,i.default(this._element).hasClass(ce)&&(this._isTransitioning=!0),this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),i.default(this._element).on(be,'[data-dismiss="modal"]',(function(t){return e.hide(t)})),i.default(this._dialog).on(Ee,(function(){i.default(e._element).one("mouseup.dismiss.bs.modal",(function(t){i.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=i.default.Event("hide.bs.modal");if(i.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var o=i.default(this._element).hasClass(ce);if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),i.default(document).off(_e),i.default(this._element).removeClass(he),i.default(this._element).off(be),i.default(this._dialog).off(Ee),o){var r=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(t){return e._hideModal(t)})).emulateTransitionEnd(r)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return i.default(t).off(".bs.modal")})),i.default(document).off(_e),i.default.removeData(this._element,ue),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=a({},Te,t),u.typeCheckConfig("modal",t,Ce),t},e._triggerBackdropTransition=function(){var t=this,e=i.default.Event("hidePrevented.bs.modal");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(pe);var o=u.getTransitionDurationFromElement(this._dialog);i.default(this._element).off(u.TRANSITION_END),i.default(this._element).one(u.TRANSITION_END,(function(){t._element.classList.remove(pe),n||i.default(t._element).one(u.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}},e._showElement=function(t){var e=this,n=i.default(this._element).hasClass(ce),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),i.default(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,n&&u.reflow(this._element),i.default(this._element).addClass(he),this._config.focus&&this._enforceFocus();var r=i.default.Event("shown.bs.modal",{relatedTarget:t}),a=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,i.default(e._element).trigger(r)};if(n){var s=u.getTransitionDurationFromElement(this._dialog);i.default(this._dialog).one(u.TRANSITION_END,a).emulateTransitionEnd(s)}else a()},e._enforceFocus=function(){var t=this;i.default(document).off(_e).on(_e,(function(e){document!==e.target&&t._element!==e.target&&0===i.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?i.default(this._element).on(ye,(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||i.default(this._element).off(ye)},e._setResizeEvent=function(){var t=this;this._isShown?i.default(window).on(ve,(function(e){return t.handleUpdate(e)})):i.default(window).off(ve)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){i.default(document.body).removeClass(de),t._resetAdjustments(),t._resetScrollbar(),i.default(t._element).trigger(me)}))},e._removeBackdrop=function(){this._backdrop&&(i.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=i.default(this._element).hasClass(ce)?ce:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),i.default(this._backdrop).appendTo(document.body),i.default(this._element).on(be,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&u.reflow(this._backdrop),i.default(this._backdrop).addClass(he),!t)return;if(!n)return void t();var o=u.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(u.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){i.default(this._backdrop).removeClass(he);var r=function(){e._removeBackdrop(),t&&t()};if(i.default(this._element).hasClass(ce)){var a=u.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(u.TRANSITION_END,r).emulateTransitionEnd(a)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(we)),n=[].slice.call(document.querySelectorAll(".sticky-top"));i.default(e).each((function(e,n){var o=n.style.paddingRight,r=i.default(n).css("padding-right");i.default(n).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")})),i.default(n).each((function(e,n){var o=n.style.marginRight,r=i.default(n).css("margin-right");i.default(n).data("margin-right",o).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,r=i.default(document.body).css("padding-right");i.default(document.body).data("padding-right",o).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}i.default(document.body).addClass(de)},e._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(we));i.default(t).each((function(t,e){var n=i.default(e).data("padding-right");i.default(e).removeData("padding-right"),e.style.paddingRight=n||""}));var e=[].slice.call(document.querySelectorAll(".sticky-top"));i.default(e).each((function(t,e){var n=i.default(e).data("margin-right");"undefined"!=typeof n&&i.default(e).css("margin-right",n).removeData("margin-right")}));var n=i.default(document.body).data("padding-right");i.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this).data(ue),r=a({},Te,i.default(this).data(),"object"==typeof e&&e?e:{});if(o||(o=new t(this,r),i.default(this).data(ue,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e](n)}else r.show&&o.show(n)}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Te}}]),t}();i.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var e,n=this,o=u.getSelectorFromElement(this);o&&(e=document.querySelector(o));var r=i.default(e).data(ue)?"toggle":a({},i.default(e).data(),i.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=i.default(e).one(ge,(function(t){t.isDefaultPrevented()||s.one(me,(function(){i.default(n).is(":visible")&&n.focus()}))}));Se._jQueryInterface.call(i.default(e),r,this)})),i.default.fn.modal=Se._jQueryInterface,i.default.fn.modal.Constructor=Se,i.default.fn.modal.noConflict=function(){return i.default.fn.modal=fe,Se._jQueryInterface};var Ne=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],De=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ae=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function ke(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),r=[].slice.call(i.body.querySelectorAll("*")),a=function(t,n){var i=r[t],a=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var s=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[a]||[]);s.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===Ne.indexOf(n)||Boolean(De.test(t.nodeValue)||Ae.test(t.nodeValue));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,r=i.length;o<r;o++)if(i[o].test(n))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},s=0,l=r.length;s<l;s++)a(s);return i.body.innerHTML}var Ie="tooltip",Oe="bs.tooltip",xe=i.default.fn.tooltip,je=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Le=["sanitize","whiteList","sanitizeFn"],Pe="fade",Fe="show",Re="show",He="out",Me="hover",qe="focus",Be={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Qe={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},We={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Ue={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Ve=function(){function t(t,e){if("undefined"==typeof Yt)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=u.findShadowRoot(this.element),o=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!o)return;var r=this.getTipElement(),a=u.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&i.default(r).addClass(Pe);var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,l=this._getAttachment(s);this.addAttachmentClass(l);var f=this._getContainer();i.default(r).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(r).appendTo(f),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Yt(this.element,r,this._getPopperConfig(l)),i.default(r).addClass(Fe),i.default(r).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var d=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),e===He&&t._leave(null,t)};if(i.default(this.tip).hasClass(Pe)){var c=u.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(u.TRANSITION_END,d).emulateTransitionEnd(c)}else d()}},e.hide=function(t){var e=this,n=this.getTipElement(),o=i.default.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==Re&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(o),!o.isDefaultPrevented()){if(i.default(n).removeClass(Fe),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,i.default(this.tip).hasClass(Pe)){var a=u.getTransitionDurationFromElement(n);i.default(n).one(u.TRANSITION_END,r).emulateTransitionEnd(a)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),i.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=ke(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:u.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},e._getAttachment=function(t){return Be[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n=e===Me?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o=e===Me?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?qe:Me]=!0),i.default(e.getTipElement()).hasClass(Fe)||e._hoverState===Re?e._hoverState=Re:(clearTimeout(e._timeout),e._hoverState=Re,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===Re&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?qe:Me]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===He&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Le.indexOf(t)&&delete e[t]})),"number"==typeof(t=a({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),u.typeCheckConfig(Ie,t,this.constructor.DefaultType),t.sanitize&&(t.template=ke(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(je);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass(Pe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(Oe),r="object"==typeof e&&e;if((o||!/dispose|hide/.test(e))&&(o||(o=new t(this,r),n.data(Oe,o)),"string"==typeof e)){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Qe}},{key:"NAME",get:function(){return Ie}},{key:"DATA_KEY",get:function(){return Oe}},{key:"Event",get:function(){return Ue}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return We}}]),t}();i.default.fn.tooltip=Ve._jQueryInterface,i.default.fn.tooltip.Constructor=Ve,i.default.fn.tooltip.noConflict=function(){return i.default.fn.tooltip=xe,Ve._jQueryInterface};var Ye="bs.popover",ze=i.default.fn.popover,Ke=new RegExp("(^|\\s)bs-popover\\S+","g"),Xe=a({},Ve.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ge=a({},Ve.DefaultType,{content:"(string|element|function)"}),$e={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Je=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var a=o.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},a.setContent=function(){var t=i.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(Ke);null!==e&&e.length>0&&t.removeClass(e.join(""))},o._jQueryInterface=function(t){return this.each((function(){var e=i.default(this).data(Ye),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new o(this,n),i.default(this).data(Ye,e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},r(o,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Xe}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return Ye}},{key:"Event",get:function(){return $e}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Ge}}]),o}(Ve);i.default.fn.popover=Je._jQueryInterface,i.default.fn.popover.Constructor=Je,i.default.fn.popover.noConflict=function(){return i.default.fn.popover=ze,Je._jQueryInterface};var Ze="scrollspy",tn="bs.scrollspy",en=i.default.fn[Ze],nn="active",on="position",rn=".nav, .list-group",an={offset:10,method:"auto",target:""},sn={offset:"number",method:"string",target:"(string|element)"},ln=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,i.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":on,n="auto"===this._config.method?e:this._config.method,o=n===on?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=u.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[i.default(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){i.default.removeData(this._element,tn),i.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=a({},an,"object"==typeof t&&t?t:{})).target&&u.isElement(t.target)){var e=i.default(t.target).attr("id");e||(e=u.getUID(Ze),i.default(t.target).attr("id",e)),t.target="#"+e}return u.typeCheckConfig(Ze,t,sn),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=i.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass(nn),n.addClass(nn)):(n.addClass(nn),n.parents(rn).prev(".nav-link, .list-group-item").addClass(nn),n.parents(rn).prev(".nav-item").children(".nav-link").addClass(nn)),i.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(nn)})).forEach((function(t){return t.classList.remove(nn)}))},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(tn);if(n||(n=new t(this,"object"==typeof e&&e),i.default(this).data(tn,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return an}}]),t}();i.default(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=i.default(t[e]);ln._jQueryInterface.call(n,n.data())}})),i.default.fn[Ze]=ln._jQueryInterface,i.default.fn[Ze].Constructor=ln,i.default.fn[Ze].noConflict=function(){return i.default.fn[Ze]=en,ln._jQueryInterface};var un="bs.tab",fn=i.default.fn.tab,dn="active",cn="fade",hn="show",pn=".active",mn="> li > .active",gn=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&i.default(this._element).hasClass(dn)||i.default(this._element).hasClass("disabled"))){var e,n,o=i.default(this._element).closest(".nav, .list-group")[0],r=u.getSelectorFromElement(this._element);if(o){var a="UL"===o.nodeName||"OL"===o.nodeName?mn:pn;n=(n=i.default.makeArray(i.default(o).find(a)))[n.length-1]}var s=i.default.Event("hide.bs.tab",{relatedTarget:this._element}),l=i.default.Event("show.bs.tab",{relatedTarget:n});if(n&&i.default(n).trigger(s),i.default(this._element).trigger(l),!l.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,o);var f=function(){var e=i.default.Event("hidden.bs.tab",{relatedTarget:t._element}),o=i.default.Event("shown.bs.tab",{relatedTarget:n});i.default(n).trigger(e),i.default(t._element).trigger(o)};e?this._activate(e,e.parentNode,f):f()}}},e.dispose=function(){i.default.removeData(this._element,un),this._element=null},e._activate=function(t,e,n){var o=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.default(e).children(pn):i.default(e).find(mn))[0],a=n&&r&&i.default(r).hasClass(cn),s=function(){return o._transitionComplete(t,r,n)};if(r&&a){var l=u.getTransitionDurationFromElement(r);i.default(r).removeClass(hn).one(u.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._transitionComplete=function(t,e,n){if(e){i.default(e).removeClass(dn);var o=i.default(e.parentNode).find("> .dropdown-menu .active")[0];o&&i.default(o).removeClass(dn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}i.default(t).addClass(dn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),u.reflow(t),t.classList.contains(cn)&&t.classList.add(hn);var r=t.parentNode;if(r&&"LI"===r.nodeName&&(r=r.parentNode),r&&i.default(r).hasClass("dropdown-menu")){var a=i.default(t).closest(".dropdown")[0];if(a){var s=[].slice.call(a.querySelectorAll(".dropdown-toggle"));i.default(s).addClass(dn)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(un);if(o||(o=new t(this),n.data(un,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),gn._jQueryInterface.call(i.default(this),"show")})),i.default.fn.tab=gn._jQueryInterface,i.default.fn.tab.Constructor=gn,i.default.fn.tab.noConflict=function(){return i.default.fn.tab=fn,gn._jQueryInterface};var _n="bs.toast",vn=i.default.fn.toast,bn="hide",yn="show",En="showing",wn="click.dismiss.bs.toast",Tn={animation:!0,autohide:!0,delay:500},Cn={animation:"boolean",autohide:"boolean",delay:"number"},Sn=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=i.default.Event("show.bs.toast");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove(En),t._element.classList.add(yn),i.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove(bn),u.reflow(this._element),this._element.classList.add(En),this._config.animation){var o=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,n).emulateTransitionEnd(o)}else n()}},e.hide=function(){if(this._element.classList.contains(yn)){var t=i.default.Event("hide.bs.toast");i.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(yn)&&this._element.classList.remove(yn),i.default(this._element).off(wn),i.default.removeData(this._element,_n),this._element=null,this._config=null},e._getConfig=function(t){return t=a({},Tn,i.default(this._element).data(),"object"==typeof t&&t?t:{}),u.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;i.default(this._element).on(wn,'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add(bn),i.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove(yn),this._config.animation){var n=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(_n);if(o||(o=new t(this,"object"==typeof e&&e),n.data(_n,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e](this)}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"DefaultType",get:function(){return Cn}},{key:"Default",get:function(){return Tn}}]),t}();i.default.fn.toast=Sn._jQueryInterface,i.default.fn.toast.Constructor=Sn,i.default.fn.toast.noConflict=function(){return i.default.fn.toast=vn,Sn._jQueryInterface},t.Alert=c,t.Button=b,t.Carousel=O,t.Collapse=W,t.Dropdown=le,t.Modal=Se,t.Popover=Je,t.Scrollspy=ln,t.Tab=gn,t.Toast=Sn,t.Tooltip=Ve,t.Util=u,Object.defineProperty(t,"__esModule",{value:!0})}));diff --git a/admin/vendor/javascript/dompurify.js b/admin/vendor/javascript/dompurify.jsnew file mode 100644index 0000000000..c39c15188f--- /dev/null+++ b/admin/vendor/javascript/dompurify.js@@ -0,0 +1,139 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/purify.es.mjs++/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */+const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:a}=Object;let{freeze:r,seal:i,create:l}=Object;let{apply:c,construct:s}=typeof Reflect!=="undefined"&&Reflect;r||(r=function freeze(e){return e});i||(i=function seal(e){return e});c||(c=function apply(e,t,n){return e.apply(t,n)});s||(s=function construct(e,t){return new e(...t)});const u=unapply(Array.prototype.forEach);const d=unapply(Array.prototype.pop);const f=unapply(Array.prototype.push);const m=unapply(String.prototype.toLowerCase);const p=unapply(String.prototype.toString);const h=unapply(String.prototype.match);const T=unapply(String.prototype.replace);const g=unapply(String.prototype.indexOf);const y=unapply(String.prototype.trim);const _=unapply(Object.prototype.hasOwnProperty);const S=unapply(RegExp.prototype.test);const E=unconstruct(TypeError);+/**+ * Creates a new function that calls the given function with a specified thisArg and arguments.+ *+ * @param func - The function to be wrapped and called.+ * @returns A new function that calls the given function with a specified thisArg and arguments.+ */function unapply(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return c(e,t,o)}}+/**+ * Creates a new function that constructs an instance of the given constructor function with the provided arguments.+ *+ * @param func - The constructor function to be wrapped and called.+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.+ */function unconstruct(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return s(e,n)}}+/**+ * Add properties to a lookup table+ *+ * @param set - The set to which elements will be added.+ * @param array - The array containing elements to be added to the set.+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.+ * @returns The modified set with added elements.+ */function addToSet(e,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;t&&t(e,null);let r=o.length;while(r--){let t=o[r];if(typeof t==="string"){const e=a(t);if(e!==t){n(o)||(o[r]=e);t=e}}e[t]=true}return e}+/**+ * Clean up an array to harden against CSPP+ *+ * @param array - The array to be cleaned.+ * @returns The cleaned version of the array+ */function cleanArray(e){for(let t=0;t<e.length;t++){const n=_(e,t);n||(e[t]=null)}return e}+/**+ * Shallow clone an object+ *+ * @param object - The object to be cloned.+ * @returns A new object that copies the original.+ */function clone(t){const n=l(null);for(const[o,a]of e(t)){const e=_(t,o);e&&(Array.isArray(a)?n[o]=cleanArray(a):a&&typeof a==="object"&&a.constructor===Object?n[o]=clone(a):n[o]=a)}return n}+/**+ * This method automatically checks if the prop is function or getter and behaves accordingly.+ *+ * @param object - The object to look up the getter function in its prototype chain.+ * @param prop - The property name for which to find the getter function.+ * @returns The getter function found in the prototype chain or a fallback function.+ */function lookupGetter(e,t){while(e!==null){const n=a(e,t);if(n){if(n.get)return unapply(n.get);if(typeof n.value==="function")return unapply(n.value)}e=o(e)}function fallbackValue(){return null}return fallbackValue}const A=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]);const N=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]);const b=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]);const w=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]);const R=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]);const k=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]);const x=r(["#text"]);const O=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]);const D=r(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]);const C=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]);const L=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);const v=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm);const M=i(/<%[\w\W]*|[\w\W]*%>/gm);const I=i(/\$\{[\w\W]*}/gm);const P=i(/^data-[\-\w.\u00B7-\uFFFF]+$/);const U=i(/^aria-[\-\w]+$/);const H=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);const z=i(/^(?:\w+script|data):/i);const F=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);const G=i(/^html$/i);const B=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var W=Object.freeze({__proto__:null,ARIA_ATTR:U,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:B,DATA_ATTR:P,DOCTYPE_NAME:G,ERB_EXPR:M,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:z,MUSTACHE_EXPR:v,TMPLIT_EXPR:I});+/* eslint-disable @typescript-eslint/indent */const Y={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12};const j=function getGlobal(){return typeof window==="undefined"?null:window};+/**+ * Creates a no-op policy for internal use only.+ * Don't export this function outside this module!+ * @param trustedTypes The policy factory.+ * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).+ * @return The policy created (or null, if Trusted Types+ * are not supported or creating the policy failed).+ */const X=function _createTrustedTypesPolicy(e,t){if(typeof e!=="object"||typeof e.createPolicy!=="function")return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){console.warn("TrustedTypes policy "+a+" could not be created.");return null}};const q=function _createHooksMap(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function createDOMPurify(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j();const DOMPurify=e=>createDOMPurify(e);DOMPurify.version="3.2.3";DOMPurify.removed=[];if(!t||!t.document||t.document.nodeType!==Y.document){DOMPurify.isSupported=false;return DOMPurify}let{document:n}=t;const o=n;const a=o.currentScript;const{DocumentFragment:i,HTMLTemplateElement:c,Node:s,Element:v,NodeFilter:M,NamedNodeMap:I=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:P,DOMParser:U,trustedTypes:z}=t;const F=v.prototype;const B=lookupGetter(F,"cloneNode");const V=lookupGetter(F,"remove");const $=lookupGetter(F,"nextSibling");const K=lookupGetter(F,"childNodes");const Z=lookupGetter(F,"parentNode");if(typeof c==="function"){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let J;let Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=n;const{importNode:ae}=o;let re=q();DOMPurify.isSupported=typeof e==="function"&&typeof Z==="function"&&ee&&ee.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ie,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:me}=W;let{IS_ALLOWED_URI:pe}=W;let he=null;const Te=addToSet({},[...A,...N,...b,...R,...x]);let ge=null;const ye=addToSet({},[...O,...D,...C,...L]);let _e=Object.seal(l(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}}));let Se=null;let Ee=null;let Ae=true;let Ne=true;let be=false;let we=true;let Re=false;let ke=true;let xe=false;let Oe=false;let De=false;let Ce=false;let Le=false;let ve=false;let Me=true;let Ie=false;const Pe="user-content-";let Ue=true;let He=false;let ze={};let Fe=null;const Ge=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Be=null;const We=addToSet({},["audio","video","img","source","image","track"]);let Ye=null;const je=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);const Xe="http://www.w3.org/1998/Math/MathML";const qe="http://www.w3.org/2000/svg";const Ve="http://www.w3.org/1999/xhtml";let $e=Ve;let Ke=false;let Ze=null;const Je=addToSet({},[Xe,qe,Ve],p);let Qe=addToSet({},["mi","mo","mn","ms","mtext"]);let et=addToSet({},["annotation-xml"]);const tt=addToSet({},["title","style","font","a","script"]);let nt=null;const ot=["application/xhtml+xml","text/html"];const at="text/html";let rt=null;let it=null;const lt=n.createElement("form");const ct=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function};+/**+ * _parseConfig+ *+ * @param cfg optional config literal+ */const st=function _parseConfig(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!it||it!==e){e&&typeof e==="object"||(e={});e=clone(e);nt=ot.indexOf(e.PARSER_MEDIA_TYPE)===-1?at:e.PARSER_MEDIA_TYPE;rt=nt==="application/xhtml+xml"?p:m;he=_(e,"ALLOWED_TAGS")?addToSet({},e.ALLOWED_TAGS,rt):Te;ge=_(e,"ALLOWED_ATTR")?addToSet({},e.ALLOWED_ATTR,rt):ye;Ze=_(e,"ALLOWED_NAMESPACES")?addToSet({},e.ALLOWED_NAMESPACES,p):Je;Ye=_(e,"ADD_URI_SAFE_ATTR")?addToSet(clone(je),e.ADD_URI_SAFE_ATTR,rt):je;Be=_(e,"ADD_DATA_URI_TAGS")?addToSet(clone(We),e.ADD_DATA_URI_TAGS,rt):We;Fe=_(e,"FORBID_CONTENTS")?addToSet({},e.FORBID_CONTENTS,rt):Ge;Se=_(e,"FORBID_TAGS")?addToSet({},e.FORBID_TAGS,rt):{};Ee=_(e,"FORBID_ATTR")?addToSet({},e.FORBID_ATTR,rt):{};ze=!!_(e,"USE_PROFILES")&&e.USE_PROFILES;Ae=e.ALLOW_ARIA_ATTR!==false;Ne=e.ALLOW_DATA_ATTR!==false;be=e.ALLOW_UNKNOWN_PROTOCOLS||false;we=e.ALLOW_SELF_CLOSE_IN_ATTR!==false;Re=e.SAFE_FOR_TEMPLATES||false;ke=e.SAFE_FOR_XML!==false;xe=e.WHOLE_DOCUMENT||false;Ce=e.RETURN_DOM||false;Le=e.RETURN_DOM_FRAGMENT||false;ve=e.RETURN_TRUSTED_TYPE||false;De=e.FORCE_BODY||false;Me=e.SANITIZE_DOM!==false;Ie=e.SANITIZE_NAMED_PROPS||false;Ue=e.KEEP_CONTENT!==false;He=e.IN_PLACE||false;pe=e.ALLOWED_URI_REGEXP||H;$e=e.NAMESPACE||Ve;Qe=e.MATHML_TEXT_INTEGRATION_POINTS||Qe;et=e.HTML_INTEGRATION_POINTS||et;_e=e.CUSTOM_ELEMENT_HANDLING||{};e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck);e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck);e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean"&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements);Re&&(Ne=false);Le&&(Ce=true);if(ze){he=addToSet({},x);ge=[];if(ze.html===true){addToSet(he,A);addToSet(ge,O)}if(ze.svg===true){addToSet(he,N);addToSet(ge,D);addToSet(ge,L)}if(ze.svgFilters===true){addToSet(he,b);addToSet(ge,D);addToSet(ge,L)}if(ze.mathMl===true){addToSet(he,R);addToSet(ge,C);addToSet(ge,L)}}if(e.ADD_TAGS){he===Te&&(he=clone(he));addToSet(he,e.ADD_TAGS,rt)}if(e.ADD_ATTR){ge===ye&&(ge=clone(ge));addToSet(ge,e.ADD_ATTR,rt)}e.ADD_URI_SAFE_ATTR&&addToSet(Ye,e.ADD_URI_SAFE_ATTR,rt);if(e.FORBID_CONTENTS){Fe===Ge&&(Fe=clone(Fe));addToSet(Fe,e.FORBID_CONTENTS,rt)}Ue&&(he["#text"]=true);xe&&addToSet(he,["html","head","body"]);if(he.table){addToSet(he,["tbody"]);delete Se.tbody}if(e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY;Q=J.createHTML("")}else{J===void 0&&(J=X(z,a));J!==null&&typeof Q==="string"&&(Q=J.createHTML(""))}r&&r(e);it=e}};const ut=addToSet({},[...N,...b,...w]);const dt=addToSet({},[...R,...k]);+/**+ * @param element a DOM element whose namespace is being checked+ * @returns Return false if the element has a+ * namespace that a spec-compliant parser would never+ * return. Return true otherwise.+ */const ft=function _checkValidNamespace(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=m(e.tagName);const o=m(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Ve?n==="svg":t.namespaceURI===Xe?n==="svg"&&(o==="annotation-xml"||Qe[o]):Boolean(ut[n]):e.namespaceURI===Xe?t.namespaceURI===Ve?n==="math":t.namespaceURI===qe?n==="math"&&et[o]:Boolean(dt[n]):e.namespaceURI===Ve?!(t.namespaceURI===qe&&!et[o])&&(!(t.namespaceURI===Xe&&!Qe[o])&&(!dt[n]&&(tt[n]||!ut[n]))):!(nt!=="application/xhtml+xml"||!Ze[e.namespaceURI]))};+/**+ * _forceRemove+ *+ * @param node a DOM node+ */const mt=function _forceRemove(e){f(DOMPurify.removed,{element:e});try{Z(e).removeChild(e)}catch(t){V(e)}};+/**+ * _removeAttribute+ *+ * @param name an Attribute name+ * @param element a DOM node+ */const pt=function _removeAttribute(e,t){try{f(DOMPurify.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(DOMPurify.removed,{attribute:null,from:t})}t.removeAttribute(e);if(e==="is")if(Ce||Le)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}};+/**+ * _initDocument+ *+ * @param dirty - a string of dirty markup+ * @return a DOM, filled with the dirty markup+ */const ht=function _initDocument(e){let t=null;let o=null;if(De)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);o=t&&t[0]}nt==="application/xhtml+xml"&&$e===Ve&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=J?J.createHTML(e):e;if($e===Ve)try{t=(new U).parseFromString(a,nt)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ke?Q:a}catch(e){}}const r=t.body||t.documentElement;e&&o&&r.insertBefore(n.createTextNode(o),r.childNodes[0]||null);return $e===Ve?oe.call(t,xe?"html":"body")[0]:xe?t.documentElement:r};+/**+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.+ *+ * @param root The root element or node to start traversing on.+ * @return The created NodeIterator+ */const Tt=function _createNodeIterator(e){return te.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT|M.SHOW_PROCESSING_INSTRUCTION|M.SHOW_CDATA_SECTION,null)};+/**+ * _isClobbered+ *+ * @param element element to check for clobbering attacks+ * @return true if clobbered, false if safe+ */const gt=function _isClobbered(e){return e instanceof P&&(typeof e.nodeName!=="string"||typeof e.textContent!=="string"||typeof e.removeChild!=="function"||!(e.attributes instanceof I)||typeof e.removeAttribute!=="function"||typeof e.setAttribute!=="function"||typeof e.namespaceURI!=="string"||typeof e.insertBefore!=="function"||typeof e.hasChildNodes!=="function")};+/**+ * Checks whether the given object is a DOM node.+ *+ * @param value object to check whether it's a DOM node+ * @return true is object is a DOM node+ */const yt=function _isNode(e){return typeof s==="function"&&e instanceof s};function _executeHooks(e,t,n){u(e,(e=>{e.call(DOMPurify,t,n,it)}))}+/**+ * _sanitizeElements+ *+ * @protect nodeName+ * @protect textContent+ * @protect removeChild+ * @param currentNode to check for permission to exist+ * @return true if node was killed, false if left alive+ */const _t=function _sanitizeElements(e){let t=null;_executeHooks(re.beforeSanitizeElements,e,null);if(gt(e)){mt(e);return true}const n=rt(e.nodeName);_executeHooks(re.uponSanitizeElement,e,{tagName:n,allowedTags:he});if(e.hasChildNodes()&&!yt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent)){mt(e);return true}if(e.nodeType===Y.progressingInstruction){mt(e);return true}if(ke&&e.nodeType===Y.comment&&S(/<[/\w]/g,e.data)){mt(e);return true}if(!he[n]||Se[n]){if(!Se[n]&&Et(n)){if(_e.tagNameCheck instanceof RegExp&&S(_e.tagNameCheck,n))return false;if(_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))return false}if(Ue&&!Fe[n]){const t=Z(e)||e.parentNode;const n=K(e)||e.childNodes;if(n&&t){const o=n.length;for(let a=o-1;a>=0;--a){const o=B(n[a],true);o.__removalCount=(e.__removalCount||0)+1;t.insertBefore(o,$(e))}}}mt(e);return true}if(e instanceof v&&!ft(e)){mt(e);return true}if((n==="noscript"||n==="noembed"||n==="noframes")&&S(/<\/no(script|embed|frames)/i,e.innerHTML)){mt(e);return true}if(Re&&e.nodeType===Y.text){t=e.textContent;u([ie,le,ce],(e=>{t=T(t,e," ")}));if(e.textContent!==t){f(DOMPurify.removed,{element:e.cloneNode()});e.textContent=t}}_executeHooks(re.afterSanitizeElements,e,null);return false};+/**+ * _isValidAttribute+ *+ * @param lcTag Lowercase tag name of containing element.+ * @param lcName Lowercase attribute name.+ * @param value Attribute value.+ * @return Returns true if `value` is valid, otherwise false.+ */const St=function _isValidAttribute(e,t,o){if(Me&&(t==="id"||t==="name")&&(o in n||o in lt))return false;if(Ne&&!Ee[t]&&S(se,t));else if(Ae&&S(ue,t));else if(!ge[t]||Ee[t]){if(!(Et(e)&&(_e.tagNameCheck instanceof RegExp&&S(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&S(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t))||t==="is"&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&S(_e.tagNameCheck,o)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(o))))return false}else if(Ye[t]);else if(S(pe,T(o,fe,"")));else if(t!=="src"&&t!=="xlink:href"&&t!=="href"||e==="script"||g(o,"data:")!==0||!Be[e]){if(be&&!S(de,T(o,fe,"")));else if(o)return false}else;return true};+/**+ * _isBasicCustomElement+ * checks if at least one dash is included in tagName, and it's not the first char+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name+ *+ * @param tagName name of the tag of the node to sanitize+ * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.+ */const Et=function _isBasicCustomElement(e){return e!=="annotation-xml"&&h(e,me)};+/**+ * _sanitizeAttributes+ *+ * @protect attributes+ * @protect nodeName+ * @protect removeAttribute+ * @protect setAttribute+ *+ * @param currentNode to sanitize+ */const At=function _sanitizeAttributes(e){_executeHooks(re.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||gt(e))return;const n={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:ge,forceKeepAttr:void 0};let o=t.length;while(o--){const a=t[o];const{name:r,namespaceURI:i,value:l}=a;const c=rt(r);let s=r==="value"?l:y(l);n.attrName=c;n.attrValue=s;n.keepAttr=true;n.forceKeepAttr=void 0;_executeHooks(re.uponSanitizeAttribute,e,n);s=n.attrValue;if(Ie&&(c==="id"||c==="name")){pt(r,e);s=Pe+s}if(ke&&S(/((--!?|])>)|<\/(style|title)/i,s)){pt(r,e);continue}if(n.forceKeepAttr)continue;pt(r,e);if(!n.keepAttr)continue;if(!we&&S(/\/>/i,s)){pt(r,e);continue}Re&&u([ie,le,ce],(e=>{s=T(s,e," ")}));const f=rt(e.nodeName);if(St(f,c,s)){if(J&&typeof z==="object"&&typeof z.getAttributeType==="function")if(i);else switch(z.getAttributeType(f,c)){case"TrustedHTML":s=J.createHTML(s);break;case"TrustedScriptURL":s=J.createScriptURL(s);break}try{i?e.setAttributeNS(i,r,s):e.setAttribute(r,s);gt(e)?mt(e):d(DOMPurify.removed)}catch(e){}}}_executeHooks(re.afterSanitizeAttributes,e,null)};+/**+ * _sanitizeShadowDOM+ *+ * @param fragment to iterate over recursively+ */const Nt=function _sanitizeShadowDOM(e){let t=null;const n=Tt(e);_executeHooks(re.beforeSanitizeShadowDOM,e,null);while(t=n.nextNode()){_executeHooks(re.uponSanitizeShadowNode,t,null);_t(t);At(t);t.content instanceof i&&_sanitizeShadowDOM(t.content)}_executeHooks(re.afterSanitizeShadowDOM,e,null)};DOMPurify.sanitize=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};let n=null;let a=null;let r=null;let l=null;Ke=!e;Ke&&(e="\x3c!--\x3e");if(typeof e!=="string"&&!yt(e)){if(typeof e.toString!=="function")throw E("toString is not a function");e=e.toString();if(typeof e!=="string")throw E("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return e;Oe||st(t);DOMPurify.removed=[];typeof e==="string"&&(He=false);if(He){if(e.nodeName){const t=rt(e.nodeName);if(!he[t]||Se[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s){n=ht("\x3c!----\x3e");a=n.ownerDocument.importNode(e,true);a.nodeType===Y.element&&a.nodeName==="BODY"||a.nodeName==="HTML"?n=a:n.appendChild(a)}else{if(!Ce&&!Re&&!xe&&e.indexOf("<")===-1)return J&&ve?J.createHTML(e):e;n=ht(e);if(!n)return Ce?null:ve?Q:""}n&&De&&mt(n.firstChild);const c=Tt(He?e:n);while(r=c.nextNode()){_t(r);At(r);r.content instanceof i&&Nt(r.content)}if(He)return e;if(Ce){if(Le){l=ne.call(n.ownerDocument);while(n.firstChild)l.appendChild(n.firstChild)}else l=n;(ge.shadowroot||ge.shadowrootmode)&&(l=ae.call(o,l,true));return l}let d=xe?n.outerHTML:n.innerHTML;xe&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(G,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d);Re&&u([ie,le,ce],(e=>{d=T(d,e," ")}));return J&&ve?J.createHTML(d):d};DOMPurify.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};st(e);Oe=true};DOMPurify.clearConfig=function(){it=null;Oe=false};DOMPurify.isValidAttribute=function(e,t,n){it||st({});const o=rt(e);const a=rt(t);return St(o,a,n)};DOMPurify.addHook=function(e,t){typeof t==="function"&&f(re[e],t)};DOMPurify.removeHook=function(e){return d(re[e])};DOMPurify.removeHooks=function(e){re[e]=[]};DOMPurify.removeAllHooks=function(){re=q()};return DOMPurify}var V=createDOMPurify();export{V as default};+diff --git a/admin/vendor/javascript/hotkeys-js.js b/admin/vendor/javascript/hotkeys-js.jsnew file mode 100644index 0000000000..93506228bd--- /dev/null+++ b/admin/vendor/javascript/hotkeys-js.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/hotkeys.esm.js++const e=typeof navigator!=="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function addEvent(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o):e.attachEvent&&e.attachEvent("on".concat(t),n)}function removeEvent(e,t,n,o){e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent&&e.detachEvent("on".concat(t),n)}function getMods(e,t){const n=t.slice(0,t.length-1);for(let t=0;t<n.length;t++)n[t]=e[n[t].toLowerCase()];return n}function getKeys(e){typeof e!=="string"&&(e="");e=e.replace(/\s/g,"");const t=e.split(",");let n=t.lastIndexOf("");for(;n>=0;){t[n-1]+=",";t.splice(n,1);n=t.lastIndexOf("")}return t}function compareArray(e,t){const n=e.length>=t.length?e:t;const o=e.length>=t.length?t:e;let s=true;for(let e=0;e<n.length;e++)o.indexOf(n[e])===-1&&(s=false);return s}const t={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":e?173:189,"=":e?61:187,";":e?59:186,"'":222,"[":219,"]":221,"\\":220};const n={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91};const o={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91};const s={16:false,18:false,17:false,91:false};const r={};for(let e=1;e<20;e++)t["f".concat(e)]=111+e;let c=[];let i=null;let l="all";const f=new Map;const code=e=>t[e.toLowerCase()]||n[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);const getKey=e=>Object.keys(t).find((n=>t[n]===e));const getModifier=e=>Object.keys(n).find((t=>n[t]===e));function setScope(e){l=e||"all"}function getScope(){return l||"all"}function getPressedKeyCodes(){return c.slice(0)}function getPressedKeyString(){return c.map((e=>getKey(e)||getModifier(e)||String.fromCharCode(e)))}function getAllKeyCodes(){const e=[];Object.keys(r).forEach((t=>{r[t].forEach((t=>{let{key:n,scope:o,mods:s,shortcut:r}=t;e.push({scope:o,shortcut:r,mods:s,keys:n.split("+").map((e=>code(e)))})}))}));return e}function filter(e){const t=e.target||e.srcElement;const{tagName:n}=t;let o=true;const s=n==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);(t.isContentEditable||(s||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(o=false);return o}function isPressed(e){typeof e==="string"&&(e=code(e));return c.indexOf(e)!==-1}function deleteScope(e,t){let n;let o;e||(e=getScope());for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)){n=r[t];for(o=0;o<n.length;)if(n[o].scope===e){const e=n.splice(o,1);e.forEach((e=>{let{element:t}=e;return removeKeyEvent(t)}))}else o++}getScope()===e&&setScope(t||"all")}function clearModifier(e){let t=e.keyCode||e.which||e.charCode;const o=c.indexOf(t);o>=0&&c.splice(o,1);e.key&&e.key.toLowerCase()==="meta"&&c.splice(0,c.length);t!==93&&t!==224||(t=91);if(t in s){s[t]=false;for(const e in n)n[e]===t&&(hotkeys[e]=false)}}function unbind(e){if(typeof e==="undefined"){Object.keys(r).forEach((e=>{Array.isArray(r[e])&&r[e].forEach((e=>eachUnbind(e)));delete r[e]}));removeKeyEvent(null)}else if(Array.isArray(e))e.forEach((e=>{e.key&&eachUnbind(e)}));else if(typeof e==="object")e.key&&eachUnbind(e);else if(typeof e==="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];let[s,r]=n;if(typeof s==="function"){r=s;s=""}eachUnbind({key:e,scope:s,method:r,splitKey:"+"})}}const eachUnbind=e=>{let{key:t,scope:o,method:s,splitKey:c="+"}=e;const i=getKeys(t);i.forEach((e=>{const t=e.split(c);const i=t.length;const l=t[i-1];const f=l==="*"?"*":code(l);if(!r[f])return;o||(o=getScope());const a=i>1?getMods(n,t):[];const d=[];r[f]=r[f].filter((e=>{const t=!s||e.method===s;const n=t&&e.scope===o&&compareArray(e.mods,a);n&&d.push(e.element);return!n}));d.forEach((e=>removeKeyEvent(e)))}))};function eventHandler(e,t,n,o){if(t.element!==o)return;let r;if(t.scope===n||t.scope==="all"){r=t.mods.length>0;for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&(!s[e]&&t.mods.indexOf(+e)>-1||s[e]&&t.mods.indexOf(+e)===-1)&&(r=false);if(t.mods.length===0&&!s[16]&&!s[18]&&!s[17]&&!s[91]||r||t.shortcut==="*"){t.keys=[];t.keys=t.keys.concat(c);if(t.method(e,t)===false){e.preventDefault?e.preventDefault():e.returnValue=false;e.stopPropagation&&e.stopPropagation();e.cancelBubble&&(e.cancelBubble=true)}}}}function dispatch(e,t){const i=r["*"];let l=e.keyCode||e.which||e.charCode;if(!hotkeys.filter.call(this,e))return;l!==93&&l!==224||(l=91);c.indexOf(l)===-1&&l!==229&&c.push(l);["metaKey","ctrlKey","altKey","shiftKey"].forEach((t=>{const n=o[t];e[t]&&c.indexOf(n)===-1?c.push(n):!e[t]&&c.indexOf(n)>-1?c.splice(c.indexOf(n),1):t==="metaKey"&&e[t]&&(c=c.filter((e=>e in o||e===l)))}));if(l in s){s[l]=true;for(const e in n)n[e]===l&&(hotkeys[e]=true);if(!i)return}for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(s[t]=e[o[t]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")){c.indexOf(17)===-1&&c.push(17);c.indexOf(18)===-1&&c.push(18);s[17]=true;s[18]=true}const f=getScope();if(i)for(let n=0;n<i.length;n++)i[n].scope===f&&(e.type==="keydown"&&i[n].keydown||e.type==="keyup"&&i[n].keyup)&&eventHandler(e,i[n],f,t);if(!(l in r))return;const a=r[l];const d=a.length;for(let n=0;n<d;n++)if((e.type==="keydown"&&a[n].keydown||e.type==="keyup"&&a[n].keyup)&&a[n].key){const o=a[n];const{splitKey:s}=o;const r=o.key.split(s);const i=[];for(let e=0;e<r.length;e++)i.push(code(r[e]));i.sort().join("")===c.sort().join("")&&eventHandler(e,o,f,t)}}function hotkeys(e,t,o){c=[];const s=getKeys(e);let l=[];let a="all";let d=document;let y=0;let p=false;let u=true;let h="+";let g=false;let m=false;o===void 0&&typeof t==="function"&&(o=t);if(Object.prototype.toString.call(t)==="[object Object]"){t.scope&&(a=t.scope);t.element&&(d=t.element);t.keyup&&(p=t.keyup);t.keydown!==void 0&&(u=t.keydown);t.capture!==void 0&&(g=t.capture);typeof t.splitKey==="string"&&(h=t.splitKey);t.single===true&&(m=true)}typeof t==="string"&&(a=t);m&&unbind(e,a);for(;y<s.length;y++){e=s[y].split(h);l=[];e.length>1&&(l=getMods(n,e));e=e[e.length-1];e=e==="*"?"*":code(e);e in r||(r[e]=[]);r[e].push({keyup:p,keydown:u,scope:a,mods:l,shortcut:s[y],method:o,key:s[y],splitKey:h,element:d})}if(typeof d!=="undefined"&&window){if(!f.has(d)){const keydownListener=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return dispatch(e,d)};const keyupListenr=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;dispatch(e,d);clearModifier(e)};f.set(d,{keydownListener:keydownListener,keyupListenr:keyupListenr,capture:g});addEvent(d,"keydown",keydownListener,g);addEvent(d,"keyup",keyupListenr,g)}if(!i){const listener=()=>{c=[]};i={listener:listener,capture:g};addEvent(window,"focus",listener,g)}}}function trigger(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(r).forEach((n=>{const o=r[n].filter((n=>n.scope===t&&n.shortcut===e));o.forEach((e=>{e&&e.method&&e.method()}))}))}function removeKeyEvent(e){const t=Object.values(r).flat();const n=t.findIndex((t=>{let{element:n}=t;return n===e}));if(n<0){const{keydownListener:t,keyupListenr:n,capture:o}=f.get(e)||{};if(t&&n){removeEvent(e,"keyup",n,o);removeEvent(e,"keydown",t,o);f.delete(e)}}if(t.length<=0||f.size<=0){const e=Object.keys(f);e.forEach((e=>{const{keydownListener:t,keyupListenr:n,capture:o}=f.get(e)||{};if(t&&n){removeEvent(e,"keyup",n,o);removeEvent(e,"keydown",t,o);f.delete(e)}}));f.clear();Object.keys(r).forEach((e=>delete r[e]));if(i){const{listener:e,capture:t}=i;removeEvent(window,"focus",e,t);i=null}}}const a={getPressedKeyString:getPressedKeyString,setScope:setScope,getScope:getScope,deleteScope:deleteScope,getPressedKeyCodes:getPressedKeyCodes,getAllKeyCodes:getAllKeyCodes,isPressed:isPressed,filter:filter,trigger:trigger,unbind:unbind,keyMap:t,modifier:n,modifierMap:o};for(const e in a)Object.prototype.hasOwnProperty.call(a,e)&&(hotkeys[e]=a[e]);if(typeof window!=="undefined"){const e=window.hotkeys;hotkeys.noConflict=t=>{t&&window.hotkeys===hotkeys&&(window.hotkeys=e);return hotkeys};window.hotkeys=hotkeys}export{hotkeys as default};+diff --git a/admin/vendor/javascript/local-time.js b/admin/vendor/javascript/local-time.jsnew file mode 100644index 0000000000..64d6e79958--- /dev/null+++ b/admin/vendor/javascript/local-time.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/app/assets/javascripts/local-time.es2017-esm.js++var t;t={config:{},run:function(){return this.getController().processElements()},process:function(...t){var e,r,a;for(r=0,a=t.length;r<a;r++)e=t[r],this.getController().processElement(e);return t.length},getController:function(){return null!=this.controller?this.controller:this.controller=new t.Controller}};var e,r,a,n,s,i,o,u,l,c,d,m,h,f,g,p,S,v,y,T,b,M,D,w,E,I,C,N,A,O,$,F,Y,k,W,L=t;L.config.useFormat24=!1,L.config.i18n={en:{date:{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yesterday:"yesterday",today:"today",tomorrow:"tomorrow",on:"on {date}",formats:{default:"%b %e, %Y",thisYear:"%b %e"}},time:{am:"am",pm:"pm",singular:"a {time}",singularAn:"an {time}",elapsed:"{time} ago",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",formats:{default:"%l:%M%P",default_24h:"%H:%M"}},datetime:{at:"{date} at {time}",formats:{default:"%B %e, %Y at %l:%M%P %Z",default_24h:"%B %e, %Y at %H:%M %Z"}}}},L.config.locale="en",L.config.defaultLocale="en",L.config.timerInterval=6e4,a=!isNaN(Date.parse("2011-01-01T12:00:00-05:00")),L.parseDate=function(t){return t=t.toString(),a||(t=r(t)),new Date(Date.parse(t))},e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(Z|[-+]?[\d:]+)$/,r=function(t){var r,a,n,s,i,o,u,l,c,d;if(s=t.match(e))return[r,c,o,a,n,i,l,d]=s,"Z"!==d&&(u=d.replace(":","")),`${c}/${o}/${a} ${n}:${i}:${l} GMT${[u]}`},L.elementMatchesSelector=(n=document.documentElement,s=null!=(i=null!=(o=null!=(u=null!=(l=n.matches)?l:n.matchesSelector)?u:n.webkitMatchesSelector)?o:n.mozMatchesSelector)?i:n.msMatchesSelector,function(t,e){if((null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE)return s.call(t,e)}),({config:c}=L),({i18n:m}=c),L.getI18nValue=function(t="",{locale:e}={locale:c.locale}){var r;return null!=(r=d(m[e],t))?r:e!==c.defaultLocale?L.getI18nValue(t,{locale:c.defaultLocale}):void 0},L.translate=function(t,e={},r){var a,n,s;for(a in s=L.getI18nValue(t,r),e)n=e[a],s=s.replace(`{${a}}`,n);return s},d=function(t,e){var r,a,n,s,i;for(i=t,r=0,n=(s=e.split(".")).length;r<n;r++){if(null==i[a=s[r]])return null;i=i[a]}return i},({getI18nValue:f,translate:M}=L),b="function"==typeof("undefined"!=typeof Intl&&null!==Intl?Intl.DateTimeFormat:void 0),g={"Central European Standard Time":"CET","Central European Summer Time":"CEST","China Standard Time":"CST","Israel Daylight Time":"IDT","Israel Standard Time":"IST","Moscow Standard Time":"MSK","Philippine Standard Time":"PHT","Singapore Standard Time":"SGT","Western Indonesia Time":"WIB"},L.knownEdgeCaseTimeZones=g,L.strftime=T=function(t,e){var r,a,n,s,i,o,u;return a=t.getDay(),r=t.getDate(),i=t.getMonth(),u=t.getFullYear(),n=t.getHours(),s=t.getMinutes(),o=t.getSeconds(),e.replace(/%(-?)([%aAbBcdeHIlmMpPSwyYZ])/g,(function(e,l,c){switch(c){case"%":return"%";case"a":return f("date.abbrDayNames")[a];case"A":return f("date.dayNames")[a];case"b":return f("date.abbrMonthNames")[i];case"B":return f("date.monthNames")[i];case"c":return t.toString();case"d":return p(r,l);case"e":return r;case"H":return p(n,l);case"I":return p(T(t,"%l"),l);case"l":return 0===n||12===n?12:(n+12)%12;case"m":return p(i+1,l);case"M":return p(s,l);case"p":return M("time."+(n>11?"pm":"am")).toUpperCase();case"P":return M("time."+(n>11?"pm":"am"));case"S":return p(o,l);case"w":return a;case"y":return p(u%100,l);case"Y":return u;case"Z":return S(t)}}))},p=function(t,e){return"-"===e?t:`0${t}`.slice(-2)},S=function(t){var e,r,a;return(r=h(t))?g[r]:(a=y(t,{allowGMT:!1}))||(a=v(t))?a:(e=y(t,{allowGMT:!0}))?e:""},h=function(t){return Object.keys(g).find((function(e){return b?new Date(t).toLocaleString("en-US",{timeZoneName:"long"}).includes(e):t.toString().includes(e)}))},y=function(t,{allowGMT:e}){var r;if(b&&(r=new Date(t).toLocaleString("en-US",{timeZoneName:"short"}).split(" ").pop(),e||!r.includes("GMT")))return r},v=function(t){var e,r,a,n,s;return(e=null!=(r=(s=t.toString()).match(/\(([\w\s]+)\)$/))?r[1]:void 0)?/\s/.test(e)?e.match(/\b(\w)/g).join(""):e:(e=null!=(a=s.match(/(\w{3,4})\s\d{4}$/))?a[1]:void 0)||(e=null!=(n=s.match(/(UTC[\+\-]\d+)/))?n[1]:void 0)?e:void 0},L.CalendarDate=class{static fromDate(t){return new this(t.getFullYear(),t.getMonth()+1,t.getDate())}static today(){return this.fromDate(new Date)}constructor(t,e,r){this.date=new Date(Date.UTC(t,e-1)),this.date.setUTCDate(r),this.year=this.date.getUTCFullYear(),this.month=this.date.getUTCMonth()+1,this.day=this.date.getUTCDate(),this.value=this.date.getTime()}equals(t){return(null!=t?t.value:void 0)===this.value}is(t){return this.equals(t)}isToday(){return this.is(this.constructor.today())}occursOnSameYearAs(t){return this.year===(null!=t?t.year:void 0)}occursThisYear(){return this.occursOnSameYearAs(this.constructor.today())}daysSince(t){if(t)return(this.date-t.date)/864e5}daysPassed(){return this.constructor.today().daysSince(this)}},({strftime:E,translate:I,getI18nValue:w,config:D}=L),L.RelativeTime=class{constructor(t){this.date=t,this.calendarDate=L.CalendarDate.fromDate(this.date)}toString(){var t,e;return(e=this.toTimeElapsedString())?I("time.elapsed",{time:e}):(t=this.toWeekdayString())?(e=this.toTimeString(),I("datetime.at",{date:t,time:e})):I("date.on",{date:this.toDateString()})}toTimeOrDateString(){return this.calendarDate.isToday()?this.toTimeString():this.toDateString()}toTimeElapsedString(){var t,e,r,a,n;return r=(new Date).getTime()-this.date.getTime(),a=Math.round(r/1e3),e=Math.round(a/60),t=Math.round(e/60),r<0?null:a<10?(n=I("time.second"),I("time.singular",{time:n})):a<45?`${a} ${I("time.seconds")}`:a<90?(n=I("time.minute"),I("time.singular",{time:n})):e<45?`${e} ${I("time.minutes")}`:e<90?(n=I("time.hour"),I("time.singularAn",{time:n})):t<24?`${t} ${I("time.hours")}`:""}toWeekdayString(){switch(this.calendarDate.daysPassed()){case 0:return I("date.today");case 1:return I("date.yesterday");case-1:return I("date.tomorrow");case 2:case 3:case 4:case 5:case 6:return E(this.date,"%A");default:return""}}toDateString(){var t;return t=this.calendarDate.occursThisYear()?w("date.formats.thisYear"):w("date.formats.default"),E(this.date,t)}toTimeString(){var t;return t=D.useFormat24?"default_24h":"default",E(this.date,w(`time.formats.${t}`))}},({elementMatchesSelector:C}=L),L.PageObserver=class{constructor(t,e){this.processMutations=this.processMutations.bind(this),this.processInsertion=this.processInsertion.bind(this),this.selector=t,this.callback=e}start(){if(!this.started)return this.observeWithMutationObserver()||this.observeWithMutationEvent(),this.started=!0}observeWithMutationObserver(){if("undefined"!=typeof MutationObserver&&null!==MutationObserver)return new MutationObserver(this.processMutations).observe(document.documentElement,{childList:!0,subtree:!0}),!0}observeWithMutationEvent(){return addEventListener("DOMNodeInserted",this.processInsertion,!1),!0}findSignificantElements(t){var e;return e=[],(null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE&&(C(t,this.selector)&&e.push(t),e.push(...t.querySelectorAll(this.selector))),e}processMutations(t){var e,r,a,n,s,i,o,u;for(e=[],r=0,n=t.length;r<n;r++)if("childList"===(i=t[r]).type)for(a=0,s=(u=i.addedNodes).length;a<s;a++)o=u[a],e.push(...this.findSignificantElements(o));return this.notify(e)}processInsertion(t){var e;return e=this.findSignificantElements(t.target),this.notify(e)}notify(t){if(null!=t?t.length:void 0)return"function"==typeof this.callback?this.callback(t):void 0}},({parseDate:O,strftime:$,getI18nValue:A,config:N}=L),L.Controller=function(){var t,e,r,a;return t="time[data-local]:not([data-localized])",e=function(t){return t.setAttribute("data-localized","")},r=function(t){return t.setAttribute("data-processed-at",(new Date).toISOString())},a=function(t){return new L.RelativeTime(t)},class{constructor(){this.processElements=this.processElements.bind(this),this.pageObserver=new L.PageObserver(t,this.processElements)}start(){if(!this.started)return this.processElements(),this.startTimer(),this.pageObserver.start(),this.started=!0}startTimer(){var t;if(t=N.timerInterval)return null!=this.timer?this.timer:this.timer=setInterval(this.processElements,t)}processElements(e=document.querySelectorAll(t)){var r,a,n;for(a=0,n=e.length;a<n;a++)r=e[a],this.processElement(r);return e.length}processElement(t){var n,s,i,o,u,l;if(n=t.getAttribute("datetime"),i=t.getAttribute("data-local"),s=N.useFormat24&&t.getAttribute("data-format24")||t.getAttribute("data-format"),o=O(n),!isNaN(o))return t.hasAttribute("title")||(l=N.useFormat24?"default_24h":"default",u=$(o,A(`datetime.formats.${l}`)),t.setAttribute("title",u)),r(t),t.textContent=function(){switch(i){case"time":return e(t),$(o,s);case"date":return e(t),a(o).toDateString();case"time-ago":return a(o).toString();case"time-or-date":return a(o).toTimeOrDateString();case"weekday":return a(o).toWeekdayString();case"weekday-or-date":return a(o).toWeekdayString()||a(o).toDateString()}}()}}}.call(window),W=!1,F=function(){return document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState},Y=function(t){var e;return null!=(e="function"==typeof requestAnimationFrame?requestAnimationFrame(t):void 0)?e:setTimeout(t,17)},k=function(){return L.getController().start()},L.start=function(){return W?L.run():(W=!0,"undefined"!=typeof MutationObserver&&null!==MutationObserver||F()?k():Y(k))},L.processing=function(){return L.getController().started},window.LocalTime===L&&L.start();export{L as default};+diff --git a/admin/vendor/javascript/lodash--debounce.js.js b/admin/vendor/javascript/lodash--debounce.js.jsnew file mode 100644index 0000000000..af1bb7f828--- /dev/null+++ b/admin/vendor/javascript/lodash--debounce.js.js@@ -0,0 +1,58 @@+// lodash/[email protected] downloaded from https://ga.jspm.io/npm:[email protected]/debounce.js++import e from"./isObject.js";import i from"./now.js";import n from"./toNumber.js";import"./_/b15bba73.js";import"./_/83742462.js";import"./_/69d56582.js";import"./isSymbol.js";import"./_/052e9e66.js";import"./_/e65ed236.js";import"./isObjectLike.js";var r="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var t={};var o=e,u=i,a=n;var d="Expected a function";var f=Math.max,c=Math.min;+/**+ * Creates a debounced function that delays invoking `func` until after `wait`+ * milliseconds have elapsed since the last time the debounced function was+ * invoked. The debounced function comes with a `cancel` method to cancel+ * delayed `func` invocations and a `flush` method to immediately invoke them.+ * Provide `options` to indicate whether `func` should be invoked on the+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked+ * with the last arguments provided to the debounced function. Subsequent+ * calls to the debounced function return the result of the last `func`+ * invocation.+ *+ * **Note:** If `leading` and `trailing` options are `true`, `func` is+ * invoked on the trailing edge of the timeout only if the debounced function+ * is invoked more than once during the `wait` timeout.+ *+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.+ *+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)+ * for details over the differences between `_.debounce` and `_.throttle`.+ *+ * @static+ * @memberOf _+ * @since 0.1.0+ * @category Function+ * @param {Function} func The function to debounce.+ * @param {number} [wait=0] The number of milliseconds to delay.+ * @param {Object} [options={}] The options object.+ * @param {boolean} [options.leading=false]+ * Specify invoking on the leading edge of the timeout.+ * @param {number} [options.maxWait]+ * The maximum time `func` is allowed to be delayed before it's invoked.+ * @param {boolean} [options.trailing=true]+ * Specify invoking on the trailing edge of the timeout.+ * @returns {Function} Returns the new debounced function.+ * @example+ *+ * // Avoid costly calculations while the window size is in flux.+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));+ *+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.+ * jQuery(element).on('click', _.debounce(sendMail, 300, {+ * 'leading': true,+ * 'trailing': false+ * }));+ *+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });+ * var source = new EventSource('/stream');+ * jQuery(source).on('message', debounced);+ *+ * // Cancel the trailing debounced invocation.+ * jQuery(window).on('popstate', debounced.cancel);+ */function debounce(e,i,n){var t,l,m,s,v,p,g=0,b=false,h=false,j=true;if("function"!=typeof e)throw new TypeError(d);i=a(i)||0;if(o(n)){b=!!n.leading;h="maxWait"in n;m=h?f(a(n.maxWait)||0,i):m;j="trailing"in n?!!n.trailing:j}function invokeFunc(i){var n=t,r=l;t=l=void 0;g=i;s=e.apply(r,n);return s}function leadingEdge(e){g=e;v=setTimeout(timerExpired,i);return b?invokeFunc(e):s}function remainingWait(e){var n=e-p,r=e-g,t=i-n;return h?c(t,m-r):t}function shouldInvoke(e){var n=e-p,r=e-g;return void 0===p||n>=i||n<0||h&&r>=m}function timerExpired(){var e=u();if(shouldInvoke(e))return trailingEdge(e);v=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){v=void 0;if(j&&t)return invokeFunc(e);t=l=void 0;return s}function cancel(){void 0!==v&&clearTimeout(v);g=0;t=p=l=v=void 0}function flush(){return void 0===v?s:trailingEdge(u())}function debounced(){var e=u(),n=shouldInvoke(e);t=arguments;l=this||r;p=e;if(n){if(void 0===v)return leadingEdge(p);if(h){clearTimeout(v);v=setTimeout(timerExpired,i);return invokeFunc(p)}}void 0===v&&(v=setTimeout(timerExpired,i));return s}debounced.cancel=cancel;debounced.flush=flush;return debounced}t=debounce;var l=t;export{l as default};+diff --git a/admin/vendor/javascript/lodash--merge.js b/admin/vendor/javascript/lodash--merge.jsnew file mode 100644index 0000000000..34df99ccea--- /dev/null+++ b/admin/vendor/javascript/lodash--merge.js@@ -0,0 +1,35 @@+// lodash/[email protected] downloaded from https://ga.jspm.io/npm:[email protected]/merge.js++import{_ as s}from"./_/3a21c86a.js";import{_ as i}from"./_/d7952e2b.js";import"./_Stack.js";import"./_/9e9ce10f.js";import"./_/70a2d34d.js";import"./_/58273e1c.js";import"./isFunction.js";import"./_/052e9e66.js";import"./_/e65ed236.js";import"./_/b15bba73.js";import"./isObject.js";import"./eq.js";import"./_/38d0670d.js";import"./_/762679ff.js";import"./_/d35a7fd6.js";import"./_/d603d993.js";import"./_/ae1a03d5.js";import"./_cloneBuffer.js";import"./_/38f90d17.js";import"./_/8ae180c0.js";import"./_copyArray.js";import"./_initCloneObject.js";import"./_/79ae4a01.js";import"./_/ca1e037e.js";import"./_/d2b8ecf6.js";import"./_/1d469fdd.js";import"./isArguments.js";import"./isObjectLike.js";import"./isArray.js";import"./isArrayLikeObject.js";import"./isArrayLike.js";import"./isLength.js";import"./isBuffer.js";import"./stubFalse.js";import"./isPlainObject.js";import"./isTypedArray.js";import"./_/dcdb9fca.js";import"./_/9f64fdae.js";import"./toPlainObject.js";import"./_/b1449f65.js";import"./_assignValue.js";import"./keysIn.js";import"./_/d533f765.js";import"./_/c8441f51.js";import"./_isIndex.js";import"./_baseRest.js";import"./identity.js";import"./_overRest.js";import"./_apply.js";import"./_/ead8ed36.js";import"./constant.js";import"./_/7781ca7a.js";var t={};var r=s,o=i;+/**+ * This method is like `_.assign` except that it recursively merges own and+ * inherited enumerable string keyed properties of source objects into the+ * destination object. Source properties that resolve to `undefined` are+ * skipped if a destination value exists. Array and plain object properties+ * are merged recursively. Other objects and value types are overridden by+ * assignment. Source objects are applied from left to right. Subsequent+ * sources overwrite property assignments of previous sources.+ *+ * **Note:** This method mutates `object`.+ *+ * @static+ * @memberOf _+ * @since 0.5.0+ * @category Object+ * @param {Object} object The destination object.+ * @param {...Object} [sources] The source objects.+ * @returns {Object} Returns `object`.+ * @example+ *+ * var object = {+ * 'a': [{ 'b': 2 }, { 'd': 4 }]+ * };+ *+ * var other = {+ * 'a': [{ 'c': 3 }, { 'e': 5 }]+ * };+ *+ * _.merge(object, other);+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }+ */var j=o((function(s,i,t){r(s,i,t)}));t=j;var p=t;export{p as default};+diff --git a/admin/vendor/javascript/lodash--throttle.js b/admin/vendor/javascript/lodash--throttle.jsnew file mode 100644index 0000000000..12350ebec7--- /dev/null+++ b/admin/vendor/javascript/lodash--throttle.js@@ -0,0 +1,48 @@+// lodash/[email protected] downloaded from https://ga.jspm.io/npm:[email protected]/throttle.js++import t from"./debounce.js";import r from"./isObject.js";import"./now.js";import"./_/b15bba73.js";import"./toNumber.js";import"./_/83742462.js";import"./_/69d56582.js";import"./isSymbol.js";import"./_/052e9e66.js";import"./_/e65ed236.js";import"./isObjectLike.js";var i={};var o=t,e=r;var n="Expected a function";+/**+ * Creates a throttled function that only invokes `func` at most once per+ * every `wait` milliseconds. The throttled function comes with a `cancel`+ * method to cancel delayed `func` invocations and a `flush` method to+ * immediately invoke them. Provide `options` to indicate whether `func`+ * should be invoked on the leading and/or trailing edge of the `wait`+ * timeout. The `func` is invoked with the last arguments provided to the+ * throttled function. Subsequent calls to the throttled function return the+ * result of the last `func` invocation.+ *+ * **Note:** If `leading` and `trailing` options are `true`, `func` is+ * invoked on the trailing edge of the timeout only if the throttled function+ * is invoked more than once during the `wait` timeout.+ *+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.+ *+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)+ * for details over the differences between `_.throttle` and `_.debounce`.+ *+ * @static+ * @memberOf _+ * @since 0.1.0+ * @category Function+ * @param {Function} func The function to throttle.+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.+ * @param {Object} [options={}] The options object.+ * @param {boolean} [options.leading=true]+ * Specify invoking on the leading edge of the timeout.+ * @param {boolean} [options.trailing=true]+ * Specify invoking on the trailing edge of the timeout.+ * @returns {Function} Returns the new throttled function.+ * @example+ *+ * // Avoid excessively updating the position while scrolling.+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));+ *+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });+ * jQuery(element).on('click', throttled);+ *+ * // Cancel the trailing throttled invocation.+ * jQuery(window).on('popstate', throttled.cancel);+ */function throttle(t,r,i){var a=true,m=true;if("function"!=typeof t)throw new TypeError(n);if(e(i)){a="leading"in i?!!i.leading:a;m="trailing"in i?!!i.trailing:m}return o(t,r,{leading:a,maxWait:r,trailing:m})}i=throttle;var a=i;export{a as default};+diff --git a/admin/vendor/javascript/sortablejs.js b/admin/vendor/javascript/sortablejs.jsnew file mode 100644index 0000000000..9e859453e2--- /dev/null+++ b/admin/vendor/javascript/sortablejs.js@@ -0,0 +1,136 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/modular/sortable.esm.js++/**!+ * Sortable 1.15.6+ * @author RubaXa <[email protected]>+ * @author owenm <[email protected]>+ * @license MIT+ */+function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})));n.push.apply(n,o)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys(Object(n),true).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _typeof(e){_typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};return _typeof(e)}function _defineProperty(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n;return e}function _extends(){_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};return _extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var n={};var o=Object.keys(e);var r,i;for(i=0;i<o.length;i++){r=o[i];t.indexOf(r)>=0||(n[r]=e[r])}return n}function _objectWithoutProperties(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose(e,t);var o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++){o=i[r];t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}}return n}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if(typeof e==="string")return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);n==="Object"&&e.constructor&&(n=e.constructor.name);return n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e="1.15.6";function userAgent(e){if(typeof window!=="undefined"&&window.navigator)return!!navigator.userAgent.match(e)}var t=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);var n=userAgent(/Edge/i);var o=userAgent(/firefox/i);var r=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i);var i=userAgent(/iP(ad|od|hone)/i);var a=userAgent(/chrome/i)&&userAgent(/android/i);var l={capture:false,passive:false};function on(e,n,o){e.addEventListener(n,o,!t&&l)}function off(e,n,o){e.removeEventListener(n,o,!t&&l)}function matches(e,t){if(t){t[0]===">"&&(t=t.substring(1));if(e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return false}return false}}function getParentOrHost(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function closest(e,t,n,o){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&matches(e,t):matches(e,t))||o&&e===n)return e;if(e===n)break}while(e=getParentOrHost(e))}return null}var s=/\s+/g;function toggleClass(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(s," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(s," ")}}function css(e,t,n){var o=e&&e.style;if(o){if(n===void 0){document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle);return t===void 0?n:n[t]}t in o||t.indexOf("webkit")!==-1||(t="-webkit-"+t);o[t]=n+(typeof n==="string"?"":"px")}}function matrix(e,t){var n="";if(typeof e==="string")n=e;else do{var o=css(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function find(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function getWindowScrollingElement(){var e=document.scrollingElement;return e||document.documentElement}+/**+ * Returns the "bounding client rect" of given element+ * @param {HTMLElement} el The element whose boundingClientRect is wanted+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone+ * @param {[HTMLElement]} container The parent the element will be placed in+ * @return {Object} The boundingClientRect of el, with specified adjustments+ */function getRect(e,n,o,r,i){if(e.getBoundingClientRect||e===window){var a,l,s,c,u,d,f;if(e!==window&&e.parentNode&&e!==getWindowScrollingElement()){a=e.getBoundingClientRect();l=a.top;s=a.left;c=a.bottom;u=a.right;d=a.height;f=a.width}else{l=0;s=0;c=window.innerHeight;u=window.innerWidth;d=window.innerHeight;f=window.innerWidth}if((n||o)&&e!==window){i=i||e.parentNode;if(!t)do{if(i&&i.getBoundingClientRect&&(css(i,"transform")!=="none"||o&&css(i,"position")!=="static")){var h=i.getBoundingClientRect();l-=h.top+parseInt(css(i,"border-top-width"));s-=h.left+parseInt(css(i,"border-left-width"));c=l+a.height;u=s+a.width;break}}while(i=i.parentNode)}if(r&&e!==window){var g=matrix(i||e),p=g&&g.a,v=g&&g.d;if(g){l/=v;s/=p;f/=p;d/=v;c=l+d;u=s+f}}return{top:l,left:s,bottom:c,right:u,width:f,height:d}}}+/**+ * Checks if a side of an element is scrolled past a side of its parents+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element+ */function isScrolledPast(e,t,n){var o=getParentAutoScrollElement(e,true),r=getRect(e)[t];while(o){var i=getRect(o)[n],a=void 0;a=n==="top"||n==="left"?r>=i:r<=i;if(!a)return o;if(o===getWindowScrollingElement())break;o=getParentAutoScrollElement(o,false)}return false}+/**+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)+ * and non-draggable elements+ * @param {HTMLElement} el The parent element+ * @param {Number} childNum The index of the child+ * @param {Object} options Parent Sortable's options+ * @return {HTMLElement} The child at index childNum, or null if not found+ */function getChild(e,t,n,o){var r=0,i=0,a=e.children;while(i<a.length){if(a[i].style.display!=="none"&&a[i]!==Sortable.ghost&&(o||a[i]!==Sortable.dragged)&&closest(a[i],n.draggable,e,false)){if(r===t)return a[i];r++}i++}return null}+/**+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)+ * @param {HTMLElement} el Parent element+ * @param {selector} selector Any other elements that should be ignored+ * @return {HTMLElement} The last child, ignoring ghostEl+ */function lastChild(e,t){var n=e.lastElementChild;while(n&&(n===Sortable.ghost||css(n,"display")==="none"||t&&!matches(n,t)))n=n.previousElementSibling;return n||null}+/**+ * Returns the index of an element within its parent for a selected set of+ * elements+ * @param {HTMLElement} el+ * @param {selector} selector+ * @return {number}+ */function index(e,t){var n=0;if(!e||!e.parentNode)return-1;while(e=e.previousElementSibling)e.nodeName.toUpperCase()==="TEMPLATE"||e===Sortable.clone||t&&!matches(e,t)||n++;return n}+/**+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.+ * The value is returned in real pixels.+ * @param {HTMLElement} el+ * @return {Array} Offsets in the format of [left, top]+ */function getRelativeScrollOffset(e){var t=0,n=0,o=getWindowScrollingElement();if(e)do{var r=matrix(e),i=r.a,a=r.d;t+=e.scrollLeft*i;n+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[t,n]}+/**+ * Returns the index of the object within the given array+ * @param {Array} arr Array that may or may not hold the object+ * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find+ * @return {Number} The index of the object in the array, or -1+ */function indexOfObject(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}function getParentAutoScrollElement(e,t){if(!e||!e.getBoundingClientRect)return getWindowScrollingElement();var n=e;var o=false;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=css(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement();if(o||t)return n;o=true}}}while(n=n.parentNode);return getWindowScrollingElement()}function extend(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function isRectEqual(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var c;function throttle(e,t){return function(){if(!c){var n=arguments,o=this;n.length===1?e.call(o,n[0]):e.apply(o,n);c=setTimeout((function(){c=void 0}),t)}}}function cancelThrottle(){clearTimeout(c);c=void 0}function scrollBy(e,t,n){e.scrollLeft+=t;e.scrollTop+=n}function clone(e){var t=window.Polymer;var n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(true):n?n(e).clone(true)[0]:e.cloneNode(true)}function setRect(e,t){css(e,"position","absolute");css(e,"top",t.top);css(e,"left",t.left);css(e,"width",t.width);css(e,"height",t.height)}function unsetRect(e){css(e,"position","");css(e,"top","");css(e,"left","");css(e,"width","");css(e,"height","")}function getChildContainingRectFromElement(e,t,n){var o={};Array.from(e.children).forEach((function(r){var i,a,l,s;if(closest(r,t.draggable,e,false)&&!r.animated&&r!==n){var c=getRect(r);o.left=Math.min((i=o.left)!==null&&i!==void 0?i:Infinity,c.left);o.top=Math.min((a=o.top)!==null&&a!==void 0?a:Infinity,c.top);o.right=Math.max((l=o.right)!==null&&l!==void 0?l:-Infinity,c.right);o.bottom=Math.max((s=o.bottom)!==null&&s!==void 0?s:-Infinity,c.bottom)}}));o.width=o.right-o.left;o.height=o.bottom-o.top;o.x=o.left;o.y=o.top;return o}var u="Sortable"+(new Date).getTime();function AnimationStateManager(){var e,t=[];return{captureAnimationState:function captureAnimationState(){t=[];if(this.options.animation){var e=[].slice.call(this.el.children);e.forEach((function(e){if(css(e,"display")!=="none"&&e!==Sortable.ghost){t.push({target:e,rect:getRect(e)});var n=_objectSpread2({},t[t.length-1].rect);if(e.thisAnimationDuration){var o=matrix(e,true);if(o){n.top-=o.f;n.left-=o.e}}e.fromRect=n}}))}},addAnimationState:function addAnimationState(e){t.push(e)},removeAnimationState:function removeAnimationState(e){t.splice(indexOfObject(t,{target:e}),1)},animateAll:function animateAll(n){var o=this;if(this.options.animation){var r=false,i=0;t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,l=getRect(n),s=n.prevFromRect,c=n.prevToRect,u=e.rect,d=matrix(n,true);if(d){l.top-=d.f;l.left-=d.e}n.toRect=l;n.thisAnimationDuration&&isRectEqual(s,l)&&!isRectEqual(a,l)&&(u.top-l.top)/(u.left-l.left)===(a.top-l.top)/(a.left-l.left)&&(t=calculateRealTime(u,s,c,o.options));if(!isRectEqual(l,a)){n.prevFromRect=a;n.prevToRect=l;t||(t=o.options.animation);o.animate(n,u,l,t)}if(t){r=true;i=Math.max(i,t);clearTimeout(n.animationResetTimer);n.animationResetTimer=setTimeout((function(){n.animationTime=0;n.prevFromRect=null;n.fromRect=null;n.prevToRect=null;n.thisAnimationDuration=null}),t);n.thisAnimationDuration=t}}));clearTimeout(e);r?e=setTimeout((function(){typeof n==="function"&&n()}),i):typeof n==="function"&&n();t=[]}else{clearTimeout(e);typeof n==="function"&&n()}},animate:function animate(e,t,n,o){if(o){css(e,"transition","");css(e,"transform","");var r=matrix(this.el),i=r&&r.a,a=r&&r.d,l=(t.left-n.left)/(i||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l;e.animatingY=!!s;css(e,"transform","translate3d("+l+"px,"+s+"px,0)");this.forRepaintDummy=repaint(e);css(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:""));css(e,"transform","translate3d(0,0,0)");typeof e.animated==="number"&&clearTimeout(e.animated);e.animated=setTimeout((function(){css(e,"transition","");css(e,"transform","");e.animated=false;e.animatingX=false;e.animatingY=false}),o)}}}}function repaint(e){return e.offsetWidth}function calculateRealTime(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}var d=[];var f={initializeByDefault:true};var h={mount:function mount(e){for(var t in f)f.hasOwnProperty(t)&&!(t in e)&&(e[t]=f[t]);d.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}));d.push(e)},pluginEvent:function pluginEvent(e,t,n){var o=this;this.eventCanceled=false;n.cancel=function(){o.eventCanceled=true};var r=e+"Global";d.forEach((function(o){if(t[o.pluginName]){t[o.pluginName][r]&&t[o.pluginName][r](_objectSpread2({sortable:t},n));t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](_objectSpread2({sortable:t},n))}}))},initializePlugins:function initializePlugins(e,t,n,o){d.forEach((function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var i=new o(e,t,e.options);i.sortable=e;i.options=e.options;e[r]=i;_extends(n,i.defaults)}}));for(var r in e.options)if(e.options.hasOwnProperty(r)){var i=this.modifyOption(e,r,e.options[r]);typeof i!=="undefined"&&(e.options[r]=i)}},getEventProperties:function getEventProperties(e,t){var n={};d.forEach((function(o){typeof o.eventProperties==="function"&&_extends(n,o.eventProperties.call(t[o.pluginName],e))}));return n},modifyOption:function modifyOption(e,t,n){var o;d.forEach((function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[t]==="function"&&(o=r.optionListeners[t].call(e[r.pluginName],n))}));return o}};function dispatchEvent(e){var o=e.sortable,r=e.rootEl,i=e.name,a=e.targetEl,l=e.cloneEl,s=e.toEl,c=e.fromEl,d=e.oldIndex,f=e.newIndex,g=e.oldDraggableIndex,p=e.newDraggableIndex,v=e.originalEvent,m=e.putSortable,b=e.extraEventProperties;o=o||r&&r[u];if(o){var S,_=o.options,y="on"+i.charAt(0).toUpperCase()+i.substr(1);if(!window.CustomEvent||t||n){S=document.createEvent("Event");S.initEvent(i,true,true)}else S=new CustomEvent(i,{bubbles:true,cancelable:true});S.to=s||r;S.from=c||r;S.item=a||r;S.clone=l;S.oldIndex=d;S.newIndex=f;S.oldDraggableIndex=g;S.newDraggableIndex=p;S.originalEvent=v;S.pullMode=m?m.lastPutMode:void 0;var E=_objectSpread2(_objectSpread2({},b),h.getEventProperties(i,o));for(var w in E)S[w]=E[w];r&&r.dispatchEvent(S);_[y]&&_[y].call(o,S)}}var g=["evt"];var p=function pluginEvent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,r=_objectWithoutProperties(n,g);h.pluginEvent.bind(Sortable)(e,t,_objectSpread2({dragEl:v,parentEl:m,ghostEl:b,rootEl:S,nextEl:_,lastDownEl:y,cloneEl:E,cloneHidden:w,dragStarted:j,putSortable:O,activeSortable:Sortable.active,originalEvent:o,oldIndex:D,oldDraggableIndex:x,newIndex:C,newDraggableIndex:A,hideGhostForTarget:re,unhideGhostForTarget:ie,cloneNowHidden:function cloneNowHidden(){w=true},cloneNowShown:function cloneNowShown(){w=false},dispatchSortableEvent:function dispatchSortableEvent(e){_dispatchEvent({sortable:t,name:e,originalEvent:o})}},r))};function _dispatchEvent(e){dispatchEvent(_objectSpread2({putSortable:O,cloneEl:E,targetEl:v,rootEl:S,oldIndex:D,oldDraggableIndex:x,newIndex:C,newDraggableIndex:A},e))}var v,m,b,S,_,y,E,w,D,C,x,A,T,O,M,I,P,R,N,k,j,F,X,Y,B,W=false,H=false,L=[],K=false,G=false,z=[],U=false,q=[];var V=typeof document!=="undefined",$=i,Z=n||t?"cssFloat":"float",Q=V&&!a&&!i&&"draggable"in document.createElement("div"),J=function(){if(V){if(t)return false;var e=document.createElement("x");e.style.cssText="pointer-events:auto";return e.style.pointerEvents==="auto"}}(),ee=function _detectDirection(e,t){var n=css(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=getChild(e,0,t),i=getChild(e,1,t),a=r&&css(r),l=i&&css(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+getRect(i).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return!i||l.clear!=="both"&&l.clear!==u?"horizontal":"vertical"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||s>=o&&n[Z]==="none"||i&&n[Z]==="none"&&s+c>o)?"vertical":"horizontal"},te=function _dragElInRowColumn(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return o===a||r===l||o+i/2===a+s/2},+/**+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.+ * @param {Number} x X position+ * @param {Number} y Y position+ * @return {HTMLElement} Element of the first found nearest Sortable+ */+ne=function _detectNearestEmptySortable(e,t){var n;L.some((function(o){var r=o[u].options.emptyInsertThreshold;if(r&&!lastChild(o)){var i=getRect(o),a=e>=i.left-r&&e<=i.right+r,l=t>=i.top-r&&t<=i.bottom+r;return a&&l?n=o:void 0}}));return n},oe=function _prepareGroup(e){function toFn(e,t){return function(n,o,r,i){var a=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(e==null&&(t||a))return true;if(e==null||e===false)return false;if(t&&e==="clone")return e;if(typeof e==="function")return toFn(e(n,o,r,i),t)(n,o,r,i);var l=(t?n:o).options.group.name;return e===true||typeof e==="string"&&e===l||e.join&&e.indexOf(l)>-1}}var t={};var n=e.group;n&&_typeof(n)=="object"||(n={name:n});t.name=n.name;t.checkPull=toFn(n.pull,true);t.checkPut=toFn(n.put);t.revertClone=n.revertClone;e.group=t},re=function _hideGhostForTarget(){!J&&b&&css(b,"display","none")},ie=function _unhideGhostForTarget(){!J&&b&&css(b,"display","")};V&&!a&&document.addEventListener("click",(function(e){if(H){e.preventDefault();e.stopPropagation&&e.stopPropagation();e.stopImmediatePropagation&&e.stopImmediatePropagation();H=false;return false}}),true);var ae=function nearestEmptyInsertDetectEvent(e){if(v){e=e.touches?e.touches[0]:e;var t=ne(e.clientX,e.clientY);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t;n.preventDefault=void 0;n.stopPropagation=void 0;t[u]._onDragOver(n)}}};var le=function _checkOutsideTargetEl(e){v&&v.parentNode[u]._isOutsideThisEl(e.target)};+/**+ * @class Sortable+ * @param {HTMLElement} el+ * @param {Object} [options]+ */function Sortable(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e;this.options=t=_extends({},t);e[u]=this;var n={group:null,sort:true,disabled:false,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:false,invertedSwapThreshold:null,removeCloneOnHide:true,direction:function direction(){return ee(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:true,animation:0,easing:null,setData:function setData(e,t){e.setData("Text",t.textContent)},dropBubble:false,dragoverBubble:false,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:false,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:false,fallbackClass:"sortable-fallback",fallbackOnBody:false,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==false&&"PointerEvent"in window&&(!r||i),emptyInsertThreshold:5};h.initializePlugins(this,e,n);for(var o in n)!(o in t)&&(t[o]=n[o]);oe(t);for(var a in this)a.charAt(0)==="_"&&typeof this[a]==="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=!t.forceFallback&&Q;this.nativeDraggable&&(this.options.touchStartThreshold=1);if(t.supportPointer)on(e,"pointerdown",this._onTapStart);else{on(e,"mousedown",this._onTapStart);on(e,"touchstart",this._onTapStart)}if(this.nativeDraggable){on(e,"dragover",this);on(e,"dragenter",this)}L.push(this.el);t.store&&t.store.get&&this.sort(t.store.get(this)||[]);_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function _isOutsideThisEl(e){this.el.contains(e)||e===this.el||(F=null)},_getDirection:function _getDirection(e,t){return typeof this.options.direction==="function"?this.options.direction.call(this,e,t,v):this.options.direction},_onTapStart:function _onTapStart(e){if(e.cancelable){var t=this,n=this.el,o=this.options,i=o.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(l||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,u=o.filter;_saveInputCheckedState(n);if(!v&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||o.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!r||!s||s.tagName.toUpperCase()!=="SELECT")){s=closest(s,o.draggable,n,false);if((!s||!s.animated)&&y!==s){D=index(s);x=index(s,o.draggable);if(typeof u==="function"){if(u.call(this,e,s,this)){_dispatchEvent({sortable:t,rootEl:c,name:"filter",targetEl:s,toEl:n,fromEl:n});p("filter",t,{evt:e});i&&e.preventDefault();return}}else if(u){u=u.split(",").some((function(o){o=closest(c,o.trim(),n,false);if(o){_dispatchEvent({sortable:t,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n});p("filter",t,{evt:e});return true}}));if(u){i&&e.preventDefault();return}}o.handle&&!closest(c,o.handle,n,false)||this._prepareDragStart(e,l,s)}}}},_prepareDragStart:function _prepareDragStart(e,r,i){var a,l=this,s=l.el,c=l.options,u=s.ownerDocument;if(i&&!v&&i.parentNode===s){var d=getRect(i);S=s;v=i;m=v.parentNode;_=v.nextSibling;y=i;T=c.group;Sortable.dragged=v;M={target:v,clientX:(r||e).clientX,clientY:(r||e).clientY};N=M.clientX-d.left;k=M.clientY-d.top;this._lastX=(r||e).clientX;this._lastY=(r||e).clientY;v.style["will-change"]="all";a=function dragStartFn(){p("delayEnded",l,{evt:e});if(Sortable.eventCanceled)l._onDrop();else{l._disableDelayedDragEvents();!o&&l.nativeDraggable&&(v.draggable=true);l._triggerDragStart(e,r);_dispatchEvent({sortable:l,name:"choose",originalEvent:e});toggleClass(v,c.chosenClass,true)}};c.ignore.split(",").forEach((function(e){find(v,e.trim(),_disableDraggable)}));on(u,"dragover",ae);on(u,"mousemove",ae);on(u,"touchmove",ae);if(c.supportPointer){on(u,"pointerup",l._onDrop);!this.nativeDraggable&&on(u,"pointercancel",l._onDrop)}else{on(u,"mouseup",l._onDrop);on(u,"touchend",l._onDrop);on(u,"touchcancel",l._onDrop)}if(o&&this.nativeDraggable){this.options.touchStartThreshold=4;v.draggable=true}p("delayStart",this,{evt:e});if(!c.delay||c.delayOnTouchOnly&&!r||this.nativeDraggable&&(n||t))a();else{if(Sortable.eventCanceled){this._onDrop();return}if(c.supportPointer){on(u,"pointerup",l._disableDelayedDrag);on(u,"pointercancel",l._disableDelayedDrag)}else{on(u,"mouseup",l._disableDelayedDrag);on(u,"touchend",l._disableDelayedDrag);on(u,"touchcancel",l._disableDelayedDrag)}on(u,"mousemove",l._delayedDragTouchMoveHandler);on(u,"touchmove",l._delayedDragTouchMoveHandler);c.supportPointer&&on(u,"pointermove",l._delayedDragTouchMoveHandler);l._dragStartTimer=setTimeout(a,c.delay)}}},_delayedDragTouchMoveHandler:function _delayedDragTouchMoveHandler(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function _disableDelayedDrag(){v&&_disableDraggable(v);clearTimeout(this._dragStartTimer);this._disableDelayedDragEvents()},_disableDelayedDragEvents:function _disableDelayedDragEvents(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag);off(e,"touchend",this._disableDelayedDrag);off(e,"touchcancel",this._disableDelayedDrag);off(e,"pointerup",this._disableDelayedDrag);off(e,"pointercancel",this._disableDelayedDrag);off(e,"mousemove",this._delayedDragTouchMoveHandler);off(e,"touchmove",this._delayedDragTouchMoveHandler);off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function _triggerDragStart(e,t){t=t||e.pointerType=="touch"&&e;if(!this.nativeDraggable||t)this.options.supportPointer?on(document,"pointermove",this._onTouchMove):on(document,t?"touchmove":"mousemove",this._onTouchMove);else{on(v,"dragend",this);on(S,"dragstart",this._onDragStart)}try{document.selection?_nextTick((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function _dragStarted(e,t){W=false;if(S&&v){p("dragStarted",this,{evt:t});this.nativeDraggable&&on(document,"dragover",le);var n=this.options;!e&&toggleClass(v,n.dragClass,false);toggleClass(v,n.ghostClass,true);Sortable.active=this;e&&this._appendGhost();_dispatchEvent({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function _emulateDragOver(){if(I){this._lastX=I.clientX;this._lastY=I.clientY;re();var e=document.elementFromPoint(I.clientX,I.clientY);var t=e;while(e&&e.shadowRoot){e=e.shadowRoot.elementFromPoint(I.clientX,I.clientY);if(e===t)break;t=e}v.parentNode[u]._isOutsideThisEl(e);if(t)do{if(t[u]){var n=void 0;n=t[u]._onDragOver({clientX:I.clientX,clientY:I.clientY,target:e,rootEl:t});if(n&&!this.options.dragoverBubble)break}e=t}while(t=getParentOrHost(t));ie()}},_onTouchMove:function _onTouchMove(e){if(M){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,i=b&&matrix(b,true),a=b&&i&&i.a,l=b&&i&&i.d,s=$&&B&&getRelativeScrollOffset(B),c=(r.clientX-M.clientX+o.x)/(a||1)+(s?s[0]-z[0]:0)/(a||1),u=(r.clientY-M.clientY+o.y)/(l||1)+(s?s[1]-z[1]:0)/(l||1);if(!Sortable.active&&!W){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,true)}if(b){if(i){i.e+=c-(P||0);i.f+=u-(R||0)}else i={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");css(b,"webkitTransform",d);css(b,"mozTransform",d);css(b,"msTransform",d);css(b,"transform",d);P=c;R=u;I=r}e.cancelable&&e.preventDefault()}},_appendGhost:function _appendGhost(){if(!b){var e=this.options.fallbackOnBody?document.body:S,t=getRect(v,true,$,true,e),n=this.options;if($){B=e;while(css(B,"position")==="static"&&css(B,"transform")==="none"&&B!==document)B=B.parentNode;if(B!==document.body&&B!==document.documentElement){B===document&&(B=getWindowScrollingElement());t.top+=B.scrollTop;t.left+=B.scrollLeft}else B=getWindowScrollingElement();z=getRelativeScrollOffset(B)}b=v.cloneNode(true);toggleClass(b,n.ghostClass,false);toggleClass(b,n.fallbackClass,true);toggleClass(b,n.dragClass,true);css(b,"transition","");css(b,"transform","");css(b,"box-sizing","border-box");css(b,"margin",0);css(b,"top",t.top);css(b,"left",t.left);css(b,"width",t.width);css(b,"height",t.height);css(b,"opacity","0.8");css(b,"position",$?"absolute":"fixed");css(b,"zIndex","100000");css(b,"pointerEvents","none");Sortable.ghost=b;e.appendChild(b);css(b,"transform-origin",N/parseInt(b.style.width)*100+"% "+k/parseInt(b.style.height)*100+"%")}},_onDragStart:function _onDragStart(e,t){var n=this;var o=e.dataTransfer;var i=n.options;p("dragStart",this,{evt:e});if(Sortable.eventCanceled)this._onDrop();else{p("setupClone",this);if(!Sortable.eventCanceled){E=clone(v);E.removeAttribute("id");E.draggable=false;E.style["will-change"]="";this._hideClone();toggleClass(E,this.options.chosenClass,false);Sortable.clone=E}n.cloneId=_nextTick((function(){p("clone",n);if(!Sortable.eventCanceled){n.options.removeCloneOnHide||S.insertBefore(E,v);n._hideClone();_dispatchEvent({sortable:n,name:"clone"})}}));!t&&toggleClass(v,i.dragClass,true);if(t){H=true;n._loopId=setInterval(n._emulateDragOver,50)}else{off(document,"mouseup",n._onDrop);off(document,"touchend",n._onDrop);off(document,"touchcancel",n._onDrop);if(o){o.effectAllowed="move";i.setData&&i.setData.call(n,o,v)}on(document,"drop",n);css(v,"transform","translateZ(0)")}W=true;n._dragStartId=_nextTick(n._dragStarted.bind(n,t,e));on(document,"selectstart",n);j=true;window.getSelection().removeAllRanges();r&&css(document.body,"user-select","none")}},_onDragOver:function _onDragOver(e){var t,n,o,r,i=this.el,a=e.target,l=this.options,s=l.group,c=Sortable.active,d=T===s,f=l.sort,h=O||c,g=this,y=false;if(!U){e.preventDefault!==void 0&&e.cancelable&&e.preventDefault();a=closest(a,l.draggable,i,true);dragOverEvent("dragOver");if(Sortable.eventCanceled)return y;if(v.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||g._ignoreWhileAnimating===a)return completed(false);H=false;if(c&&!l.disabled&&(d?f||(o=m!==S):O===this||(this.lastPutMode=T.checkPull(this,c,v,e))&&s.checkPut(this,c,v,e))){r=this._getDirection(e,a)==="vertical";t=getRect(v);dragOverEvent("dragOverValid");if(Sortable.eventCanceled)return y;if(o){m=S;capture();this._hideClone();dragOverEvent("revert");Sortable.eventCanceled||(_?S.insertBefore(v,_):S.appendChild(v));return completed(true)}var E=lastChild(i,l.draggable);if(!E||_ghostIsLast(e,r,this)&&!E.animated){if(E===v)return completed(false);E&&i===e.target&&(a=E);a&&(n=getRect(a));if(_onMove(S,i,v,t,a,n,e,!!a)!==false){capture();E&&E.nextSibling?i.insertBefore(v,E.nextSibling):i.appendChild(v);m=i;changed();return completed(true)}}else if(E&&_ghostIsFirst(e,r,this)){var w=getChild(i,0,l,true);if(w===v)return completed(false);a=w;n=getRect(a);if(_onMove(S,i,v,t,a,n,e,false)!==false){capture();i.insertBefore(v,w);m=i;changed();return completed(true)}}else if(a.parentNode===i){n=getRect(a);var D,x=0,M=v.parentNode!==i,I=!te(v.animated&&v.toRect||t,a.animated&&a.toRect||n,r),P=r?"top":"left",R=isScrolledPast(a,"top","top")||isScrolledPast(v,"top","top"),N=R?R.scrollTop:void 0;if(F!==a){D=n[P];K=false;G=!I&&l.invertSwap||M}x=_getSwapDirection(e,a,n,r,I?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,G,F===a);var k;if(x!==0){var j=index(v);do{j-=x;k=m.children[j]}while(k&&(css(k,"display")==="none"||k===b))}if(x===0||k===a)return completed(false);F=a;X=x;var B=a.nextElementSibling,W=false;W=x===1;var L=_onMove(S,i,v,t,a,n,e,W);if(L!==false){L!==1&&L!==-1||(W=L===1);U=true;setTimeout(_unsilent,30);capture();W&&!B?i.appendChild(v):a.parentNode.insertBefore(v,W?B:a);R&&scrollBy(R,0,N-R.scrollTop);m=v.parentNode;D===void 0||G||(Y=Math.abs(D-getRect(a)[P]));changed();return completed(true)}}if(i.contains(v))return completed(false)}return false}function dragOverEvent(l,s){p(l,g,_objectSpread2({evt:e,isOwner:d,axis:r?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:f,fromSortable:h,target:a,completed:completed,onMove:function onMove(n,o){return _onMove(S,i,v,t,n,getRect(n),e,o)},changed:changed},s))}function capture(){dragOverEvent("dragOverAnimationCapture");g.captureAnimationState();g!==h&&h.captureAnimationState()}function completed(t){dragOverEvent("dragOverCompleted",{insertion:t});if(t){d?c._hideClone():c._showClone(g);if(g!==h){toggleClass(v,O?O.options.ghostClass:c.options.ghostClass,false);toggleClass(v,l.ghostClass,true)}O!==g&&g!==Sortable.active?O=g:g===Sortable.active&&O&&(O=null);h===g&&(g._ignoreWhileAnimating=a);g.animateAll((function(){dragOverEvent("dragOverAnimationComplete");g._ignoreWhileAnimating=null}));if(g!==h){h.animateAll();h._ignoreWhileAnimating=null}}(a===v&&!v.animated||a===i&&!a.animated)&&(F=null);if(!l.dragoverBubble&&!e.rootEl&&a!==document){v.parentNode[u]._isOutsideThisEl(e.target);!t&&ae(e)}!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation();return y=true}function changed(){C=index(v);A=index(v,l.draggable);_dispatchEvent({sortable:g,name:"change",toEl:i,newIndex:C,newDraggableIndex:A,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function _offMoveEvents(){off(document,"mousemove",this._onTouchMove);off(document,"touchmove",this._onTouchMove);off(document,"pointermove",this._onTouchMove);off(document,"dragover",ae);off(document,"mousemove",ae);off(document,"touchmove",ae)},_offUpEvents:function _offUpEvents(){var e=this.el.ownerDocument;off(e,"mouseup",this._onDrop);off(e,"touchend",this._onDrop);off(e,"pointerup",this._onDrop);off(e,"pointercancel",this._onDrop);off(e,"touchcancel",this._onDrop);off(document,"selectstart",this)},_onDrop:function _onDrop(e){var t=this.el,n=this.options;C=index(v);A=index(v,n.draggable);p("drop",this,{evt:e});m=v&&v.parentNode;C=index(v);A=index(v,n.draggable);if(Sortable.eventCanceled)this._nulling();else{W=false;G=false;K=false;clearInterval(this._loopId);clearTimeout(this._dragStartTimer);_cancelNextTick(this.cloneId);_cancelNextTick(this._dragStartId);if(this.nativeDraggable){off(document,"drop",this);off(t,"dragstart",this._onDragStart)}this._offMoveEvents();this._offUpEvents();r&&css(document.body,"user-select","");css(v,"transform","");if(e){if(j){e.cancelable&&e.preventDefault();!n.dropBubble&&e.stopPropagation()}b&&b.parentNode&&b.parentNode.removeChild(b);(S===m||O&&O.lastPutMode!=="clone")&&E&&E.parentNode&&E.parentNode.removeChild(E);if(v){this.nativeDraggable&&off(v,"dragend",this);_disableDraggable(v);v.style["will-change"]="";j&&!W&&toggleClass(v,O?O.options.ghostClass:this.options.ghostClass,false);toggleClass(v,this.options.chosenClass,false);_dispatchEvent({sortable:this,name:"unchoose",toEl:m,newIndex:null,newDraggableIndex:null,originalEvent:e});if(S!==m){if(C>=0){_dispatchEvent({rootEl:m,name:"add",toEl:m,fromEl:S,originalEvent:e});_dispatchEvent({sortable:this,name:"remove",toEl:m,originalEvent:e});_dispatchEvent({rootEl:m,name:"sort",toEl:m,fromEl:S,originalEvent:e});_dispatchEvent({sortable:this,name:"sort",toEl:m,originalEvent:e})}O&&O.save()}else if(C!==D&&C>=0){_dispatchEvent({sortable:this,name:"update",toEl:m,originalEvent:e});_dispatchEvent({sortable:this,name:"sort",toEl:m,originalEvent:e})}if(Sortable.active){if(C==null||C===-1){C=D;A=x}_dispatchEvent({sortable:this,name:"end",toEl:m,originalEvent:e});this.save()}}}this._nulling()}},_nulling:function _nulling(){p("nulling",this);S=v=m=b=_=E=y=w=M=I=j=C=A=D=x=F=X=O=T=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null;q.forEach((function(e){e.checked=true}));q.length=P=R=0},handleEvent:function handleEvent(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":if(v){this._onDragOver(e);_globalDragOver(e)}break;case"selectstart":e.preventDefault();break}},+/**+ * Serializes the item into an array of string.+ * @returns {String[]}+ */+toArray:function toArray(){var e,t=[],n=this.el.children,o=0,r=n.length,i=this.options;for(;o<r;o++){e=n[o];closest(e,i.draggable,this.el,false)&&t.push(e.getAttribute(i.dataIdAttr)||_generateId(e))}return t},+/**+ * Sorts the elements according to the array.+ * @param {String[]} order order of the items+ */+sort:function sort(e,t){var n={},o=this.el;this.toArray().forEach((function(e,t){var r=o.children[t];closest(r,this.options.draggable,o,false)&&(n[e]=r)}),this);t&&this.captureAnimationState();e.forEach((function(e){if(n[e]){o.removeChild(n[e]);o.appendChild(n[e])}}));t&&this.animateAll()},save:function save(){var e=this.options.store;e&&e.set&&e.set(this)},+/**+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.+ * @param {HTMLElement} el+ * @param {String} [selector] default: `options.draggable`+ * @returns {HTMLElement|null}+ */+closest:function closest$1(e,t){return closest(e,t||this.options.draggable,this.el,false)},+/**+ * Set/get option+ * @param {string} name+ * @param {*} [value]+ * @returns {*}+ */+option:function option(e,t){var n=this.options;if(t===void 0)return n[e];var o=h.modifyOption(this,e,t);n[e]=typeof o!=="undefined"?o:t;e==="group"&&oe(n)},destroy:function destroy(){p("destroy",this);var e=this.el;e[u]=null;off(e,"mousedown",this._onTapStart);off(e,"touchstart",this._onTapStart);off(e,"pointerdown",this._onTapStart);if(this.nativeDraggable){off(e,"dragover",this);off(e,"dragenter",this)}Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")}));this._onDrop();this._disableDelayedDragEvents();L.splice(L.indexOf(this.el),1);this.el=e=null},_hideClone:function _hideClone(){if(!w){p("hideClone",this);if(Sortable.eventCanceled)return;css(E,"display","none");this.options.removeCloneOnHide&&E.parentNode&&E.parentNode.removeChild(E);w=true}},_showClone:function _showClone(e){if(e.lastPutMode==="clone"){if(w){p("showClone",this);if(Sortable.eventCanceled)return;v.parentNode!=S||this.options.group.revertClone?_?S.insertBefore(E,_):S.appendChild(E):S.insertBefore(E,v);this.options.group.revertClone&&this.animate(v,E);css(E,"display","");w=false}}else this._hideClone()}};function _globalDragOver(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}function _onMove(e,o,r,i,a,l,s,c){var d,f,h=e[u],g=h.options.onMove;if(!window.CustomEvent||t||n){d=document.createEvent("Event");d.initEvent("move",true,true)}else d=new CustomEvent("move",{bubbles:true,cancelable:true});d.to=o;d.from=e;d.dragged=r;d.draggedRect=i;d.related=a||o;d.relatedRect=l||getRect(o);d.willInsertAfter=c;d.originalEvent=s;e.dispatchEvent(d);g&&(f=g.call(h,d,s));return f}function _disableDraggable(e){e.draggable=false}function _unsilent(){U=false}function _ghostIsFirst(e,t,n){var o=getRect(getChild(n.el,0,n.options,true));var r=getChildContainingRectFromElement(n.el,n.options,b);var i=10;return t?e.clientX<r.left-i||e.clientY<o.top&&e.clientX<o.right:e.clientY<r.top-i||e.clientY<o.bottom&&e.clientX<o.left}function _ghostIsLast(e,t,n){var o=getRect(lastChild(n.el,n.options.draggable));var r=getChildContainingRectFromElement(n.el,n.options,b);var i=10;return t?e.clientX>r.right+i||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>r.bottom+i||e.clientX>o.right&&e.clientY>o.top}function _getSwapDirection(e,t,n,o,r,i,a,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,f=false;if(!a)if(l&&Y<c*r){!K&&(X===1?s>u+c*i/2:s<d-c*i/2)&&(K=true);if(K)f=true;else if(X===1?s<u+Y:s>d-Y)return-X}else if(s>u+c*(1-r)/2&&s<d-c*(1-r)/2)return _getInsertDirection(t);f=f||a;return f&&(s<u+c*i/2||s>d-c*i/2)?s>u+c/2?1:-1:0}+/**+ * Gets the direction dragEl must be swapped relative to target in order to make it+ * seem that dragEl has been "inserted" into that element's position+ * @param {HTMLElement} target The target whose position dragEl is being inserted at+ * @return {Number} Direction dragEl must be swapped+ */function _getInsertDirection(e){return index(v)<index(e)?1:-1}+/**+ * Generate id+ * @param {HTMLElement} el+ * @returns {String}+ * @private+ */function _generateId(e){var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;while(n--)o+=t.charCodeAt(n);return o.toString(36)}function _saveInputCheckedState(e){q.length=0;var t=e.getElementsByTagName("input");var n=t.length;while(n--){var o=t[n];o.checked&&q.push(o)}}function _nextTick(e){return setTimeout(e,0)}function _cancelNextTick(e){return clearTimeout(e)}V&&on(document,"touchmove",(function(e){(Sortable.active||W)&&e.cancelable&&e.preventDefault()}));Sortable.utils={on:on,off:off,css:css,find:find,is:function is(e,t){return!!closest(e,t,e,false)},extend:extend,throttle:throttle,closest:closest,toggleClass:toggleClass,clone:clone,index:index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:ee,getChild:getChild,expando:u};+/**+ * Get the Sortable instance of an element+ * @param {HTMLElement} element The element+ * @return {Sortable|undefined} The instance of Sortable+ */Sortable.get=function(e){return e[u]};+/**+ * Mount a plugin to Sortable+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted+ */Sortable.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]);t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),e.utils));h.mount(e)}))};+/**+ * Create sortable instance+ * @param {HTMLElement} el+ * @param {Object} [options]+ */Sortable.create=function(e,t){return new Sortable(e,t)};Sortable.version=e;var se,ce,ue,de,fe,he,ge=[],pe=false;function AutoScrollPlugin(){function AutoScroll(){this.defaults={scroll:true,forceAutoScrollFallback:false,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:true};for(var e in this)e.charAt(0)==="_"&&typeof this[e]==="function"&&(this[e]=this[e].bind(this))}AutoScroll.prototype={dragStarted:function dragStarted(e){var t=e.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):t.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function dragOverCompleted(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function drop(){if(this.sortable.nativeDraggable)off(document,"dragover",this._handleAutoScroll);else{off(document,"pointermove",this._handleFallbackAutoScroll);off(document,"touchmove",this._handleFallbackAutoScroll);off(document,"mousemove",this._handleFallbackAutoScroll)}clearPointerElemChangedInterval();clearAutoScrolls();cancelThrottle()},nulling:function nulling(){fe=ce=se=pe=he=ue=de=null;ge.length=0},_handleFallbackAutoScroll:function _handleFallbackAutoScroll(e){this._handleAutoScroll(e,true)},_handleAutoScroll:function _handleAutoScroll(e,o){var i=this;var a=(e.touches?e.touches[0]:e).clientX,l=(e.touches?e.touches[0]:e).clientY,s=document.elementFromPoint(a,l);fe=e;if(o||this.options.forceAutoScrollFallback||n||t||r){ve(e,this.options,s,o);var c=getParentAutoScrollElement(s,true);if(pe&&(!he||a!==ue||l!==de)){he&&clearPointerElemChangedInterval();he=setInterval((function(){var t=getParentAutoScrollElement(document.elementFromPoint(a,l),true);if(t!==c){c=t;clearAutoScrolls()}ve(e,i.options,t,o)}),10);ue=a;de=l}}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(s,true)===getWindowScrollingElement()){clearAutoScrolls();return}ve(e,this.options,getParentAutoScrollElement(s,false),false)}}};return _extends(AutoScroll,{pluginName:"scroll",initializeByDefault:true})}function clearAutoScrolls(){ge.forEach((function(e){clearInterval(e.pid)}));ge=[]}function clearPointerElemChangedInterval(){clearInterval(he)}var ve=throttle((function(e,t,n,o){if(t.scroll){var r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,s=getWindowScrollingElement();var c,d=false;if(ce!==n){ce=n;clearAutoScrolls();se=t.scroll;c=t.scrollFn;se===true&&(se=getParentAutoScrollElement(n,true))}var f=0;var h=se;do{var g=h,p=getRect(g),v=p.top,m=p.bottom,b=p.left,S=p.right,_=p.width,y=p.height,E=void 0,w=void 0,D=g.scrollWidth,C=g.scrollHeight,x=css(g),A=g.scrollLeft,T=g.scrollTop;if(g===s){E=_<D&&(x.overflowX==="auto"||x.overflowX==="scroll"||x.overflowX==="visible");w=y<C&&(x.overflowY==="auto"||x.overflowY==="scroll"||x.overflowY==="visible")}else{E=_<D&&(x.overflowX==="auto"||x.overflowX==="scroll");w=y<C&&(x.overflowY==="auto"||x.overflowY==="scroll")}var O=E&&(Math.abs(S-r)<=a&&A+_<D)-(Math.abs(b-r)<=a&&!!A);var M=w&&(Math.abs(m-i)<=a&&T+y<C)-(Math.abs(v-i)<=a&&!!T);if(!ge[f])for(var I=0;I<=f;I++)ge[I]||(ge[I]={});if(ge[f].vx!=O||ge[f].vy!=M||ge[f].el!==g){ge[f].el=g;ge[f].vx=O;ge[f].vy=M;clearInterval(ge[f].pid);if(O!=0||M!=0){d=true;ge[f].pid=setInterval(function(){o&&this.layer===0&&Sortable.active._onTouchMove(fe);var t=ge[this.layer].vy?ge[this.layer].vy*l:0;var n=ge[this.layer].vx?ge[this.layer].vx*l:0;typeof c==="function"&&c.call(Sortable.dragged.parentNode[u],n,t,e,fe,ge[this.layer].el)!=="continue"||scrollBy(ge[this.layer].el,n,t)}.bind({layer:f}),24)}}f++}while(t.bubbleScroll&&h!==s&&(h=getParentAutoScrollElement(h,false)));pe=d}}),30);var me=function drop(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||r;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t;var u=document.elementFromPoint(c.clientX,c.clientY);l();if(s&&!s.el.contains(u)){i("spill");this.onSpill({dragEl:o,putSortable:n})}}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function dragStart(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function onSpill(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState();n&&n.captureAnimationState();var o=getChild(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t);this.sortable.animateAll();n&&n.animateAll()},drop:me};_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function onSpill(e){var t=e.dragEl,n=e.putSortable;var o=n||this.sortable;o.captureAnimationState();t.parentNode&&t.parentNode.removeChild(t);o.animateAll()},drop:me};_extends(Remove,{pluginName:"removeOnSpill"});var be;function SwapPlugin(){function Swap(){this.defaults={swapClass:"sortable-swap-highlight"}}Swap.prototype={dragStart:function dragStart(e){var t=e.dragEl;be=t},dragOverValid:function dragOverValid(e){var t=e.completed,n=e.target,o=e.onMove,r=e.activeSortable,i=e.changed,a=e.cancel;if(r.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=be;if(o(n)!==false){toggleClass(n,s.swapClass,true);be=n}else be=null;c&&c!==be&&toggleClass(c,s.swapClass,false)}i();t(true);a()}},drop:function drop(e){var t=e.activeSortable,n=e.putSortable,o=e.dragEl;var r=n||this.sortable;var i=this.options;be&&toggleClass(be,i.swapClass,false);if(be&&(i.swap||n&&n.options.swap)&&o!==be){r.captureAnimationState();r!==t&&t.captureAnimationState();swapNodes(o,be);r.animateAll();r!==t&&t.animateAll()}},nulling:function nulling(){be=null}};return _extends(Swap,{pluginName:"swap",eventProperties:function eventProperties(){return{swapItem:be}}})}function swapNodes(e,t){var n,o,r=e.parentNode,i=t.parentNode;if(r&&i&&!r.isEqualNode(t)&&!i.isEqualNode(e)){n=index(e);o=index(t);r.isEqualNode(i)&&n<o&&o++;r.insertBefore(t,r.children[n]);i.insertBefore(e,i.children[o])}}var Se,_e,ye,Ee,we,De=[],Ce=[],xe=false,Ae=false,Te=false;function MultiDragPlugin(){function MultiDrag(e){for(var t in this)t.charAt(0)==="_"&&typeof this[t]==="function"&&(this[t]=this[t].bind(this));if(!e.options.avoidImplicitDeselect)if(e.options.supportPointer)on(document,"pointerup",this._deselectMultiDrag);else{on(document,"mouseup",this._deselectMultiDrag);on(document,"touchend",this._deselectMultiDrag)}on(document,"keydown",this._checkKeyDown);on(document,"keyup",this._checkKeyUp);this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:false,setData:function setData(t,n){var o="";De.length&&_e===e?De.forEach((function(e,t){o+=(t?", ":"")+e.textContent})):o=n.textContent;t.setData("Text",o)}}}MultiDrag.prototype={multiDragKeyDown:false,isMultiDrag:false,delayStartGlobal:function delayStartGlobal(e){var t=e.dragEl;ye=t},delayEnded:function delayEnded(){this.isMultiDrag=~De.indexOf(ye)},setupClone:function setupClone(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var o=0;o<De.length;o++){Ce.push(clone(De[o]));Ce[o].sortableIndex=De[o].sortableIndex;Ce[o].draggable=false;Ce[o].style["will-change"]="";toggleClass(Ce[o],this.options.selectedClass,false);De[o]===ye&&toggleClass(Ce[o],this.options.chosenClass,false)}t._hideClone();n()}},clone:function clone(e){var t=e.sortable,n=e.rootEl,o=e.dispatchSortableEvent,r=e.cancel;if(this.isMultiDrag&&!this.options.removeCloneOnHide&&De.length&&_e===t){insertMultiDragClones(true,n);o("clone");r()}},showClone:function showClone(e){var t=e.cloneNowShown,n=e.rootEl,o=e.cancel;if(this.isMultiDrag){insertMultiDragClones(false,n);Ce.forEach((function(e){css(e,"display","")}));t();we=false;o()}},hideClone:function hideClone(e){var t=this;e.sortable;var n=e.cloneNowHidden,o=e.cancel;if(this.isMultiDrag){Ce.forEach((function(e){css(e,"display","none");t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}));n();we=true;o()}},dragStartGlobal:function dragStartGlobal(e){e.sortable;!this.isMultiDrag&&_e&&_e.multiDrag._deselectMultiDrag();De.forEach((function(e){e.sortableIndex=index(e)}));De=De.sort((function(e,t){return e.sortableIndex-t.sortableIndex}));Te=true},dragStarted:function dragStarted(e){var t=this;var n=e.sortable;if(this.isMultiDrag){if(this.options.sort){n.captureAnimationState();if(this.options.animation){De.forEach((function(e){e!==ye&&css(e,"position","absolute")}));var o=getRect(ye,false,true,true);De.forEach((function(e){e!==ye&&setRect(e,o)}));Ae=true;xe=true}}n.animateAll((function(){Ae=false;xe=false;t.options.animation&&De.forEach((function(e){unsetRect(e)}));t.options.sort&&removeMultiDragElements()}))}},dragOver:function dragOver(e){var t=e.target,n=e.completed,o=e.cancel;if(Ae&&~De.indexOf(t)){n(false);o()}},revert:function revert(e){var t=e.fromSortable,n=e.rootEl,o=e.sortable,r=e.dragRect;if(De.length>1){De.forEach((function(e){o.addAnimationState({target:e,rect:Ae?getRect(e):r});unsetRect(e);e.fromRect=r;t.removeAnimationState(e)}));Ae=false;insertMultiDragElements(!this.options.removeCloneOnHide,n)}},dragOverCompleted:function dragOverCompleted(e){var t=e.sortable,n=e.isOwner,o=e.insertion,r=e.activeSortable,i=e.parentEl,a=e.putSortable;var l=this.options;if(o){n&&r._hideClone();xe=false;if(l.animation&&De.length>1&&(Ae||!n&&!r.options.sort&&!a)){var s=getRect(ye,false,true,true);De.forEach((function(e){if(e!==ye){setRect(e,s);i.appendChild(e)}}));Ae=true}if(!n){Ae||removeMultiDragElements();if(De.length>1){var c=we;r._showClone(t);r.options.animation&&!we&&c&&Ce.forEach((function(e){r.addAnimationState({target:e,rect:Ee});e.fromRect=Ee;e.thisAnimationDuration=null}))}else r._showClone(t)}}},dragOverAnimationCapture:function dragOverAnimationCapture(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;De.forEach((function(e){e.thisAnimationDuration=null}));if(o.options.animation&&!n&&o.multiDrag.isMultiDrag){Ee=_extends({},t);var r=matrix(ye,true);Ee.top-=r.f;Ee.left-=r.e}},dragOverAnimationComplete:function dragOverAnimationComplete(){if(Ae){Ae=false;removeMultiDragElements()}},drop:function drop(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,r=e.sortable,i=e.dispatchSortableEvent,a=e.oldIndex,l=e.putSortable;var s=l||this.sortable;if(t){var c=this.options,d=o.children;if(!Te){c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag();toggleClass(ye,c.selectedClass,!~De.indexOf(ye));if(~De.indexOf(ye)){De.splice(De.indexOf(ye),1);Se=null;dispatchEvent({sortable:r,rootEl:n,name:"deselect",targetEl:ye,originalEvent:t})}else{De.push(ye);dispatchEvent({sortable:r,rootEl:n,name:"select",targetEl:ye,originalEvent:t});if(t.shiftKey&&Se&&r.el.contains(Se)){var f=index(Se),h=index(ye);~f&&~h&&f!==h&&function(){var e,i;if(h>f){i=f;e=h}else{i=h;e=f+1}var a=c.filter;for(;i<e;i++)if(!~De.indexOf(d[i])&&closest(d[i],c.draggable,o,false)){var l=a&&(typeof a==="function"?a.call(r,t,d[i],r):a.split(",").some((function(e){return closest(d[i],e.trim(),o,false)})));if(!l){toggleClass(d[i],c.selectedClass,true);De.push(d[i]);dispatchEvent({sortable:r,rootEl:n,name:"select",targetEl:d[i],originalEvent:t})}}}()}else Se=ye;_e=s}}if(Te&&this.isMultiDrag){Ae=false;if((o[u].options.sort||o!==n)&&De.length>1){var g=getRect(ye),p=index(ye,":not(."+this.options.selectedClass+")");!xe&&c.animation&&(ye.thisAnimationDuration=null);s.captureAnimationState();if(!xe){if(c.animation){ye.fromRect=g;De.forEach((function(e){e.thisAnimationDuration=null;if(e!==ye){var t=Ae?getRect(e):g;e.fromRect=t;s.addAnimationState({target:e,rect:t})}}))}removeMultiDragElements();De.forEach((function(e){d[p]?o.insertBefore(e,d[p]):o.appendChild(e);p++}));if(a===index(ye)){var v=false;De.forEach((function(e){e.sortableIndex===index(e)||(v=true)}));if(v){i("update");i("sort")}}}De.forEach((function(e){unsetRect(e)}));s.animateAll()}_e=s}(n===o||l&&l.lastPutMode!=="clone")&&Ce.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function nullingGlobal(){this.isMultiDrag=Te=false;Ce.length=0},destroyGlobal:function destroyGlobal(){this._deselectMultiDrag();off(document,"pointerup",this._deselectMultiDrag);off(document,"mouseup",this._deselectMultiDrag);off(document,"touchend",this._deselectMultiDrag);off(document,"keydown",this._checkKeyDown);off(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function _deselectMultiDrag(e){if((typeof Te==="undefined"||!Te)&&_e===this.sortable&&(!e||!closest(e.target,this.options.draggable,this.sortable.el,false))&&(!e||e.button===0))while(De.length){var t=De[0];toggleClass(t,this.options.selectedClass,false);De.shift();dispatchEvent({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function _checkKeyDown(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=true)},_checkKeyUp:function _checkKeyUp(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=false)}};return _extends(MultiDrag,{pluginName:"multiDrag",utils:{+/**+ * Selects the provided multi-drag item+ * @param {HTMLElement} el The element to be selected+ */+select:function select(e){var t=e.parentNode[u];if(t&&t.options.multiDrag&&!~De.indexOf(e)){if(_e&&_e!==t){_e.multiDrag._deselectMultiDrag();_e=t}toggleClass(e,t.options.selectedClass,true);De.push(e)}},+/**+ * Deselects the provided multi-drag item+ * @param {HTMLElement} el The element to be deselected+ */+deselect:function deselect(e){var t=e.parentNode[u],n=De.indexOf(e);if(t&&t.options.multiDrag&&~n){toggleClass(e,t.options.selectedClass,false);De.splice(n,1)}}},eventProperties:function eventProperties(){var e=this;var t=[],n=[];De.forEach((function(o){t.push({multiDragElement:o,index:o.sortableIndex});var r;r=Ae&&o!==ye?-1:Ae?index(o,":not(."+e.options.selectedClass+")"):index(o);n.push({multiDragElement:o,index:r})}));return{items:_toConsumableArray(De),clones:[].concat(Ce),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function multiDragKey(e){e=e.toLowerCase();e==="ctrl"?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1));return e}}})}function insertMultiDragElements(e,t){De.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}+/**+ * Insert multi-drag clones+ * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted+ * @param {HTMLElement} rootEl+ */function insertMultiDragClones(e,t){Ce.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}function removeMultiDragElements(){De.forEach((function(e){e!==ye&&e.parentNode&&e.parentNode.removeChild(e)}))}Sortable.mount(new AutoScrollPlugin);Sortable.mount(Remove,Revert);export{MultiDragPlugin as MultiDrag,Sortable,SwapPlugin as Swap,Sortable as default};+diff --git a/admin/vendor/javascript/stimulus-checkbox-select-all.js b/admin/vendor/javascript/stimulus-checkbox-select-all.jsnew file mode 100644index 0000000000..cf8ce0636f--- /dev/null+++ b/admin/vendor/javascript/stimulus-checkbox-select-all.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/stimulus-checkbox-select-all.mjs++import{Controller as e}from"@hotwired/stimulus";const t=class c extends e{initialize(){this.toggle=this.toggle.bind(this),this.refresh=this.refresh.bind(this)}checkboxAllTargetConnected(e){e.addEventListener("change",this.toggle),this.refresh()}checkboxTargetConnected(e){e.addEventListener("change",this.refresh),this.refresh()}checkboxAllTargetDisconnected(e){e.removeEventListener("change",this.toggle),this.refresh()}checkboxTargetDisconnected(e){e.removeEventListener("change",this.refresh),this.refresh()}toggle(e){e.preventDefault(),this.checkboxTargets.forEach((t=>{t.checked=e.target.checked,this.triggerInputEvent(t)}))}refresh(){const e=this.checkboxTargets.length,t=this.checked.length;this.checkboxAllTarget.checked=t>0,this.checkboxAllTarget.indeterminate=t>0&&t<e}triggerInputEvent(e){const t=new Event("input",{bubbles:!1,cancelable:!0});e.dispatchEvent(t)}get checked(){return this.checkboxTargets.filter((e=>e.checked))}get unchecked(){return this.checkboxTargets.filter((e=>!e.checked))}};t.targets=["checkboxAll","checkbox"];let h=t;export{h as default};+diff --git a/admin/vendor/javascript/stimulus-clipboard.js b/admin/vendor/javascript/stimulus-clipboard.jsnew file mode 100644index 0000000000..1b0ff77de2--- /dev/null+++ b/admin/vendor/javascript/stimulus-clipboard.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/stimulus-clipboard.mjs++import{Controller as e}from"@hotwired/stimulus";class t extends e{connect(){this.hasButtonTarget&&(this.originalContent=this.buttonTarget.innerHTML)}copy(e){e.preventDefault();const s=this.sourceTarget.innerHTML||this.sourceTarget.value;navigator.clipboard.writeText(s).then((()=>this.copied()))}copied(){this.hasButtonTarget&&(this.timeout&&clearTimeout(this.timeout),this.buttonTarget.innerHTML=this.successContentValue,this.timeout=setTimeout((()=>{this.buttonTarget.innerHTML=this.originalContent}),this.successDurationValue))}}t.targets=["button","source"];t.values={successContent:String,successDuration:{type:Number,default:2e3}};export{t as default};+diff --git a/admin/vendor/javascript/stimulus-notification.js b/admin/vendor/javascript/stimulus-notification.jsnew file mode 100644index 0000000000..7f8d142204--- /dev/null+++ b/admin/vendor/javascript/stimulus-notification.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/stimulus-notification.mjs++import{Controller as e}from"@hotwired/stimulus";import{useTransition as t}from"stimulus-use";class i extends e{initialize(){this.hide=this.hide.bind(this)}connect(){t(this),!1===this.hiddenValue&&this.show()}show(){this.enter(),this.timeout=setTimeout(this.hide,this.delayValue)}async hide(){this.timeout&&clearTimeout(this.timeout),await this.leave(),this.element.remove()}}i.values={delay:{type:Number,default:3e3},hidden:{type:Boolean,default:!1}};export{i as default};+diff --git a/admin/vendor/javascript/stimulus-password-visibility.js b/admin/vendor/javascript/stimulus-password-visibility.jsnew file mode 100644index 0000000000..4659c8956b--- /dev/null+++ b/admin/vendor/javascript/stimulus-password-visibility.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/stimulus-password-visibility.mjs++import{Controller as t}from"@hotwired/stimulus";class s extends t{connect(){this.hidden="password"===this.inputTarget.type,this.class=this.hasHiddenClass?this.hiddenClass:"hidden"}toggle(t){t.preventDefault(),this.inputTarget.type=this.hidden?"text":"password",this.hidden=!this.hidden,this.iconTargets.forEach((t=>t.classList.toggle(this.class)))}}s.targets=["input","icon"];s.classes=["hidden"];export{s as default};+diff --git a/admin/vendor/javascript/stimulus-reveal-controller.js b/admin/vendor/javascript/stimulus-reveal-controller.jsnew file mode 100644index 0000000000..2020209f41--- /dev/null+++ b/admin/vendor/javascript/stimulus-reveal-controller.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/stimulus-reveal-controller.mjs++import{Controller as s}from"@hotwired/stimulus";class t extends s{connect(){this.class=this.hasHiddenClass?this.hiddenClass:"hidden"}toggle(){this.itemTargets.forEach((s=>{s.classList.toggle(this.class)}))}show(){this.itemTargets.forEach((s=>{s.classList.remove(this.class)}))}hide(){this.itemTargets.forEach((s=>{s.classList.add(this.class)}))}}t.targets=["item"];t.classes=["hidden"];export{t as default};+diff --git a/admin/vendor/javascript/stimulus-sortable.js b/admin/vendor/javascript/stimulus-sortable.jsnew file mode 100644index 0000000000..f47adb155a--- /dev/null+++ b/admin/vendor/javascript/stimulus-sortable.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/stimulus-sortable.mjs++import{Controller as t}from"@hotwired/stimulus";import e from"sortablejs";import{patch as a}from"@rails/request.js";class r extends t{initialize(){this.onUpdate=this.onUpdate.bind(this)}connect(){this.sortable=new e(this.element,{...this.defaultOptions,...this.options})}disconnect(){this.sortable.destroy(),this.sortable=void 0}async onUpdate({item:t,newIndex:e}){if(!t.dataset.sortableUpdateUrl)return;const i=this.resourceNameValue?`${this.resourceNameValue}[${this.paramNameValue}]`:this.paramNameValue,s=new FormData;return s.append(i,e+1),await a(t.dataset.sortableUpdateUrl,{body:s,responseKind:this.responseKindValue})}get options(){return{animation:this.animationValue||this.defaultOptions.animation||150,handle:this.handleValue||this.defaultOptions.handle||void 0,onUpdate:this.onUpdate}}get defaultOptions(){return{}}}r.values={resourceName:String,paramName:{type:String,default:"position"},responseKind:{type:String,default:"html"},animation:Number,handle:String};export{r as default};+diff --git a/admin/vendor/javascript/stimulus-textarea-autogrow.js b/admin/vendor/javascript/stimulus-textarea-autogrow.jsnew file mode 100644index 0000000000..41676ebe8f--- /dev/null+++ b/admin/vendor/javascript/stimulus-textarea-autogrow.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/stimulus-textarea-autogrow.mjs++import{Controller as e}from"@hotwired/stimulus";function r(e,t){let i;return(...s)=>{const o=this;clearTimeout(i),i=setTimeout((()=>e.apply(o,s)),t)}}class l extends e{initialize(){this.autogrow=this.autogrow.bind(this)}connect(){this.element.style.overflow="hidden";const e=this.resizeDebounceDelayValue;this.onResize=e>0?r(this.autogrow,e):this.autogrow,this.autogrow(),this.element.addEventListener("input",this.autogrow),window.addEventListener("resize",this.onResize)}disconnect(){window.removeEventListener("resize",this.onResize)}autogrow(){this.element.style.height="auto",this.element.style.height=`${this.element.scrollHeight}px`}}l.values={resizeDebounceDelay:{type:Number,default:100}};export{l as default};+diff --git a/admin/vendor/javascript/stimulus-use.js b/admin/vendor/javascript/stimulus-use.jsnew file mode 100644index 0000000000..a5f19a4d04--- /dev/null+++ b/admin/vendor/javascript/stimulus-use.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/index.js++import{Controller as e}from"@hotwired/stimulus";import t from"hotkeys-js";const method=(e,t)=>{const s=e[t];return"function"==typeof s?s:(...e)=>{}};const composeEventName=(e,t,s)=>{let n=e;true===s?n=`${t.identifier}:${e}`:"string"===typeof s&&(n=`${s}:${e}`);return n};const extendedEvent=(e,t,s)=>{const{bubbles:n,cancelable:o,composed:i}=t||{bubbles:true,cancelable:true,composed:true};t&&Object.assign(s,{originalEvent:t});const r=new CustomEvent(e,{bubbles:n,cancelable:o,composed:i,detail:s});return r};function isElementInViewport(e){const t=e.getBoundingClientRect();const s=window.innerHeight||document.documentElement.clientHeight;const n=window.innerWidth||document.documentElement.clientWidth;const o=t.top<=s&&t.top+t.height>0;const i=t.left<=n&&t.left+t.width>0;return o&&i}function camelize(e){return e.replace(/(?:[_-])([a-z0-9])/g,((e,t)=>t.toUpperCase()))}const s={dispatchEvent:true,eventPrefix:true,visibleAttribute:"isVisible"};const useIntersection=(e,t={})=>{const n=e;const{dispatchEvent:o,eventPrefix:i,visibleAttribute:r}=Object.assign({},s,t);const l=(null===t||void 0===t?void 0:t.element)||n.element;n.intersectionElements||(n.intersectionElements=[]);n.intersectionElements.push(l);const callback=e=>{const[t]=e;t.isIntersecting?dispatchAppear(t):l.hasAttribute(r)&&dispatchDisappear(t)};const dispatchAppear=e=>{l.setAttribute(r,"true");method(n,"appear").call(n,e);if(o){const t=composeEventName("appear",n,i);const s=extendedEvent(t,null,{controller:n,entry:e});l.dispatchEvent(s)}};const dispatchDisappear=e=>{l.removeAttribute(r);method(n,"disappear").call(n,e);if(o){const t=composeEventName("disappear",n,i);const s=extendedEvent(t,null,{controller:n,entry:e});l.dispatchEvent(s)}};const c=n.disconnect.bind(n);const a=new IntersectionObserver(callback,t);const observe=()=>{a.observe(l)};const unobserve=()=>{a.unobserve(l)};const noneVisible=()=>0===n.intersectionElements.filter((e=>e.hasAttribute(r))).length;const oneVisible=()=>1===n.intersectionElements.filter((e=>e.hasAttribute(r))).length;const atLeastOneVisible=()=>n.intersectionElements.some((e=>e.hasAttribute(r)));const allVisible=()=>n.intersectionElements.every((e=>e.hasAttribute(r)));const h=allVisible;Object.assign(n,{isVisible:h,noneVisible:noneVisible,oneVisible:oneVisible,atLeastOneVisible:atLeastOneVisible,allVisible:allVisible,disconnect(){unobserve();c()}});observe();return[observe,unobserve]};class IntersectionComposableController extends e{}class IntersectionController extends IntersectionComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useIntersection(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const useLazyLoad=(e,t)=>{const callback=t=>{const[s]=t;s.isIntersecting&&!e.isLoaded&&handleAppear()};const handleAppear=t=>{const s=e.data.get("src");if(!s)return;const n=e.element;e.isLoading=true;method(e,"loading").call(e,s);n.onload=()=>{handleLoaded(s)};n.src=s};const handleLoaded=t=>{e.isLoading=false;e.isLoaded=true;method(e,"loaded").call(e,t)};const s=e.disconnect.bind(e);const n=new IntersectionObserver(callback,t);const observe=()=>{n.observe(e.element)};const unobserve=()=>{n.unobserve(e.element)};Object.assign(e,{isVisible:false,disconnect(){unobserve();s()}});observe();return[observe,unobserve]};class LazyLoadComposableController extends e{constructor(){super(...arguments);this.isLoading=false;this.isLoaded=false}}class LazyLoadController extends LazyLoadComposableController{constructor(e){super(e);this.options={rootMargin:"10%"};requestAnimationFrame((()=>{const[e,t]=useLazyLoad(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const n={dispatchEvent:true,eventPrefix:true};const useResize=(e,t={})=>{const s=e;const{dispatchEvent:o,eventPrefix:i}=Object.assign({},n,t);const r=(null===t||void 0===t?void 0:t.element)||s.element;const callback=e=>{const[t]=e;method(s,"resize").call(s,t.contentRect);if(o){const e=composeEventName("resize",s,i);const n=extendedEvent(e,null,{controller:s,entry:t});r.dispatchEvent(n)}};const l=s.disconnect.bind(s);const c=new ResizeObserver(callback);const observe=()=>{c.observe(r)};const unobserve=()=>{c.unobserve(r)};Object.assign(s,{disconnect(){unobserve();l()}});observe();return[observe,unobserve]};class ResizeComposableController extends e{}class ResizeController extends ResizeComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useResize(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const o={events:["click","touchend"],onlyVisible:true,dispatchEvent:true,eventPrefix:true};const useClickOutside=(e,t={})=>{const s=e;const{onlyVisible:n,dispatchEvent:i,events:r,eventPrefix:l}=Object.assign({},o,t);const onEvent=e=>{const o=(null===t||void 0===t?void 0:t.element)||s.element;if(!(o.contains(e.target)||!isElementInViewport(o)&&n)){s.clickOutside&&s.clickOutside(e);if(i){const t=composeEventName("click:outside",s,l);const n=extendedEvent(t,e,{controller:s});o.dispatchEvent(n)}}};const observe=()=>{null===r||void 0===r?void 0:r.forEach((e=>{window.addEventListener(e,onEvent,false)}))};const unobserve=()=>{null===r||void 0===r?void 0:r.forEach((e=>{window.removeEventListener(e,onEvent,false)}))};const c=s.disconnect.bind(s);Object.assign(s,{disconnect(){unobserve();c()}});observe();return[observe,unobserve]};class ClickOutsideComposableController extends e{}class ClickOutsideController extends ClickOutsideComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useClickOutside(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}function __rest(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}const i={debug:false,logger:console,dispatchEvent:true,eventPrefix:true};class StimulusUse{constructor(e,t={}){var s,n,o;this.log=(e,t)=>{if(this.debug){this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${e}`,"color: #3B82F6","color: unset");this.logger.log(Object.assign({controllerId:this.controllerId},t));this.logger.groupEnd()}};this.warn=e=>{this.logger.warn(`%c${this.controller.identifier} %c${e}`,"color: #3B82F6; font-weight: bold","color: unset")};this.dispatch=(e,t={})=>{if(this.dispatchEvent){const{event:s}=t,n=__rest(t,["event"]);const o=this.extendedEvent(e,s||null,n);this.targetElement.dispatchEvent(o);this.log("dispatchEvent",Object.assign({eventName:o.type},n))}};this.call=(e,t={})=>{const s=this.controller[e];if("function"==typeof s)return s.call(this.controller,t)};this.extendedEvent=(e,t,s)=>{const{bubbles:n,cancelable:o,composed:i}=t||{bubbles:true,cancelable:true,composed:true};t&&Object.assign(s,{originalEvent:t});const r=new CustomEvent(this.composeEventName(e),{bubbles:n,cancelable:o,composed:i,detail:s});return r};this.composeEventName=e=>{let t=e;true===this.eventPrefix?t=`${this.controller.identifier}:${e}`:"string"===typeof this.eventPrefix&&(t=`${this.eventPrefix}:${e}`);return t};this.debug=null!==(n=null!==(s=null===t||void 0===t?void 0:t.debug)&&void 0!==s?s:e.application.stimulusUseDebug)&&void 0!==n?n:i.debug;this.logger=null!==(o=null===t||void 0===t?void 0:t.logger)&&void 0!==o?o:i.logger;this.controller=e;this.controllerId=e.element.id||e.element.dataset.id;this.targetElement=(null===t||void 0===t?void 0:t.element)||e.element;const{dispatchEvent:r,eventPrefix:l}=Object.assign({},i,t);Object.assign(this,{dispatchEvent:r,eventPrefix:l});this.controllerInitialize=e.initialize.bind(e);this.controllerConnect=e.connect.bind(e);this.controllerDisconnect=e.disconnect.bind(e)}}const r={eventPrefix:true,bubbles:true,cancelable:true};class UseDispatch extends StimulusUse{constructor(e,t={}){var s,n,o,i;super(e,t);this.dispatch=(e,t={})=>{const{controller:s,targetElement:n,eventPrefix:o,bubbles:i,cancelable:r,log:l,warn:c}=this;Object.assign(t,{controller:s});const a=composeEventName(e,this.controller,o);const h=new CustomEvent(a,{detail:t,bubbles:i,cancelable:r});n.dispatchEvent(h);c("`useDispatch()` is deprecated. Please use the built-in `this.dispatch()` function from Stimulus. You can find more information on how to upgrade at: https://stimulus-use.github.io/stimulus-use/#/use-dispatch");l("dispatch",{eventName:a,detail:t,bubbles:i,cancelable:r});return h};this.targetElement=null!==(s=t.element)&&void 0!==s?s:e.element;this.eventPrefix=null!==(n=t.eventPrefix)&&void 0!==n?n:r.eventPrefix;this.bubbles=null!==(o=t.bubbles)&&void 0!==o?o:r.bubbles;this.cancelable=null!==(i=t.cancelable)&&void 0!==i?i:r.cancelable;this.enhanceController()}enhanceController(){Object.assign(this.controller,{dispatch:this.dispatch})}}const useDispatch=(e,t={})=>new UseDispatch(e,t);const l={overwriteDispatch:true};const useApplication=(e,t={})=>{const{overwriteDispatch:s}=Object.assign({},l,t);Object.defineProperty(e,"isPreview",{get(){return document.documentElement.hasAttribute("data-turbolinks-preview")||document.documentElement.hasAttribute("data-turbo-preview")}});Object.defineProperty(e,"isConnected",{get(){return!!Array.from(this.context.module.connectedContexts).find((e=>e===this.context))}});Object.defineProperty(e,"csrfToken",{get(){return this.metaValue("csrf-token")}});s&&useDispatch(e,t);Object.assign(e,{metaValue(e){const t=document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")}})};class ApplicationController extends e{constructor(e){super(e);this.isPreview=false;this.isConnected=false;this.csrfToken="";useApplication(this,this.options)}}const c=["mousemove","mousedown","resize","keydown","touchstart","wheel"];const a=6e4;const h={ms:a,initialState:false,events:c,dispatchEvent:true,eventPrefix:true};const useIdle=(e,t={})=>{const s=e;const{ms:n,initialState:o,events:i,dispatchEvent:r,eventPrefix:l}=Object.assign({},h,t);let c=o;let a=setTimeout((()=>{c=true;dispatchAway()}),n);const dispatchAway=e=>{const t=composeEventName("away",s,l);s.isIdle=true;method(s,"away").call(s,e);if(r){const n=extendedEvent(t,e||null,{controller:s});s.element.dispatchEvent(n)}};const dispatchBack=e=>{const t=composeEventName("back",s,l);s.isIdle=false;method(s,"back").call(s,e);if(r){const n=extendedEvent(t,e||null,{controller:s});s.element.dispatchEvent(n)}};const onEvent=e=>{c&&dispatchBack(e);c=false;clearTimeout(a);a=setTimeout((()=>{c=true;dispatchAway(e)}),n)};const onVisibility=e=>{document.hidden||onEvent(e)};c?dispatchAway():dispatchBack();const u=s.disconnect.bind(s);const observe=()=>{i.forEach((e=>{window.addEventListener(e,onEvent)}));document.addEventListener("visibilitychange",onVisibility)};const unobserve=()=>{clearTimeout(a);i.forEach((e=>{window.removeEventListener(e,onEvent)}));document.removeEventListener("visibilitychange",onVisibility)};Object.assign(s,{disconnect(){unobserve();u()}});observe();return[observe,unobserve]};class IdleComposableController extends e{constructor(){super(...arguments);this.isIdle=false}}class IdleController extends IdleComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useIdle(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}class UseVisibility extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{this.controller.isVisible=!document.hidden;document.addEventListener("visibilitychange",this.handleVisibilityChange);this.handleVisibilityChange()};this.unobserve=()=>{document.removeEventListener("visibilitychange",this.handleVisibilityChange)};this.becomesInvisible=e=>{this.controller.isVisible=false;this.call("invisible",e);this.log("invisible",{isVisible:false});this.dispatch("invisible",{event:e,isVisible:false})};this.becomesVisible=e=>{this.controller.isVisible=true;this.call("visible",e);this.log("visible",{isVisible:true});this.dispatch("visible",{event:e,isVisible:true})};this.handleVisibilityChange=e=>{document.hidden?this.becomesInvisible(e):this.becomesVisible(e)};this.controller=e;this.enhanceController();this.observe()}enhanceController(){const e=this.controllerDisconnect;const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useVisibility=(e,t={})=>{const s=e;const n=new UseVisibility(s,t);return[n.observe,n.unobserve]};class VisibilityComposableController extends e{constructor(){super(...arguments);this.isVisible=false}}class VisibilityController extends VisibilityComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useVisibility(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}class UseHover extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{this.targetElement.addEventListener("mouseenter",this.onEnter);this.targetElement.addEventListener("mouseleave",this.onLeave)};this.unobserve=()=>{this.targetElement.removeEventListener("mouseenter",this.onEnter);this.targetElement.removeEventListener("mouseleave",this.onLeave)};this.onEnter=e=>{this.call("mouseEnter",e);this.log("mouseEnter",{hover:true});this.dispatch("mouseEnter",{hover:false})};this.onLeave=e=>{this.call("mouseLeave",e);this.log("mouseLeave",{hover:false});this.dispatch("mouseLeave",{hover:false})};this.controller=e;this.enhanceController();this.observe()}enhanceController(){const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useHover=(e,t={})=>{const s=e;const n=new UseHover(s,t);return[n.observe,n.unobserve]};class HoverComposableController extends e{}class HoverController extends HoverComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useHover(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}class UseMutation extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{try{this.observer.observe(this.targetElement,this.options)}catch(e){this.controller.application.handleError(e,"At a minimum, one of childList, attributes, and/or characterData must be true",{})}};this.unobserve=()=>{this.observer.disconnect()};this.mutation=e=>{this.call("mutate",e);this.log("mutate",{entries:e});this.dispatch("mutate",{entries:e})};this.targetElement=(null===t||void 0===t?void 0:t.element)||e.element;this.controller=e;this.options=t;this.observer=new MutationObserver(this.mutation);this.enhanceController();this.observe()}enhanceController(){const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useMutation=(e,t={})=>{const s=new UseMutation(e,t);return[s.observe,s.unobserve]};class MutationComposableController extends e{}class MutationController extends MutationComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useMutation(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}class UseTargetMutation extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{this.observer.observe(this.targetElement,{subtree:true,characterData:true,childList:true,attributes:true,attributeOldValue:true,attributeFilter:[this.targetSelector,this.scopedTargetSelector]})};this.unobserve=()=>{this.observer.disconnect()};this.mutation=e=>{for(const t of e)switch(t.type){case"attributes":let e=t.target.getAttribute(t.attributeName);let s=t.oldValue;if(t.attributeName===this.targetSelector||t.attributeName===this.scopedTargetSelector){let n=this.targetsUsedByThisController(s);let o=this.targetsUsedByThisController(e);let i=n.filter((e=>!o.includes(e)));let r=o.filter((e=>!n.includes(e)));i.forEach((e=>this.targetRemoved(this.stripIdentifierPrefix(e),t.target,"attributeChange")));r.forEach((e=>this.targetAdded(this.stripIdentifierPrefix(e),t.target,"attributeChange")))}break;case"characterData":let n=this.findTargetInAncestry(t.target);if(null==n)return;{let e=this.targetsUsedByThisControllerFromNode(n);e.forEach((e=>{this.targetChanged(this.stripIdentifierPrefix(e),n,"domMutation")}))}break;case"childList":let{addedNodes:o,removedNodes:i}=t;o.forEach((e=>this.processNodeDOMMutation(e,this.targetAdded)));i.forEach((e=>this.processNodeDOMMutation(e,this.targetRemoved)));break}};this.controller=e;this.options=t;this.targetElement=e.element;this.identifier=e.scope.identifier;this.identifierPrefix=`${this.identifier}.`;this.targetSelector=e.scope.schema.targetAttribute;this.scopedTargetSelector=`data-${this.identifier}-target`;this.targets=t.targets||e.constructor.targets;this.prefixedTargets=this.targets.map((e=>`${this.identifierPrefix}${e}`));this.observer=new MutationObserver(this.mutation);this.enhanceController();this.observe()}processNodeDOMMutation(e,t){let s=e;let n=t;let o=[];if("#text"==s.nodeName||0==this.targetsUsedByThisControllerFromNode(s).length){n=this.targetChanged;s=this.findTargetInAncestry(e)}else o=this.targetsUsedByThisControllerFromNode(s);if(null!=s){0==o.length&&(o=this.targetsUsedByThisControllerFromNode(s));o.forEach((e=>{n.call(this,this.stripIdentifierPrefix(e),s,"domMutation")}))}}findTargetInAncestry(e){let t=e;let s=[];"#text"!=t.nodeName&&(s=this.targetsUsedByThisControllerFromNode(t));while(null!==t.parentNode&&t.parentNode!=this.targetElement&&0==s.length){t=t.parentNode;if("#text"!==t.nodeName){let e=this.targetsUsedByThisControllerFromNode(t);if(e.length>0)return t}}return"#text"==t.nodeName||null==t.parentNode?null:t.parentNode==this.targetElement&&this.targetsUsedByThisControllerFromNode(t).length>0?t:null}targetAdded(e,t,s){let n=`${e}TargetAdded`;this.controller[n]&&method(this.controller,n).call(this.controller,t);this.log("targetAdded",{target:e,node:t,trigger:s})}targetRemoved(e,t,s){let n=`${e}TargetRemoved`;this.controller[n]&&method(this.controller,n).call(this.controller,t);this.log("targetRemoved",{target:e,node:t,trigger:s})}targetChanged(e,t,s){let n=`${e}TargetChanged`;this.controller[n]&&method(this.controller,n).call(this.controller,t);this.log("targetChanged",{target:e,node:t,trigger:s})}targetsUsedByThisControllerFromNode(e){if("#text"==e.nodeName||"#comment"==e.nodeName)return[];let t=e;return this.targetsUsedByThisController(t.getAttribute(this.scopedTargetSelector)||t.getAttribute(this.targetSelector))}targetsUsedByThisController(e){e=e||"";let t=this.stripIdentifierPrefix(e).split(" ");return this.targets.filter((e=>-1!==t.indexOf(e)))}stripIdentifierPrefix(e){return e.replace(new RegExp(this.identifierPrefix,"g"),"")}enhanceController(){const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useTargetMutation=(e,t={})=>{const s=e;const n=new UseTargetMutation(s,t);return[n.observe,n.unobserve]};class TargetMutationComposableController extends e{}class TargetMutationController extends TargetMutationComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useTargetMutation(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}const useWindowResize=e=>{const t=e;const callback=e=>{const{innerWidth:s,innerHeight:n}=window;const o={height:n||Infinity,width:s||Infinity,event:e};method(t,"windowResize").call(t,o)};const s=t.disconnect.bind(t);const observe=()=>{window.addEventListener("resize",callback);callback()};const unobserve=()=>{window.removeEventListener("resize",callback)};Object.assign(t,{disconnect(){unobserve();s()}});observe();return[observe,unobserve]};class WindowResizeComposableController extends e{}class WindowResizeController extends WindowResizeComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useWindowResize(this);Object.assign(this,{observe:e,unobserve:t})}))}}const memoize=(e,t,s)=>{Object.defineProperty(e,t,{value:s});return s};const useMemo=e=>{var t;null===(t=e.constructor.memos)||void 0===t?void 0:t.forEach((t=>{memoize(e,t,e[t])}))};class DebounceController extends e{}DebounceController.debounces=[];const u=200;const debounce=(e,t=u)=>{let s=null;return function(){const n=Array.from(arguments);const o=this;const i=n.map((e=>e.params));const callback=()=>{n.forEach(((e,t)=>e.params=i[t]));return e.apply(o,n)};s&&clearTimeout(s);s=setTimeout(callback,t)}};const useDebounce=(e,t)=>{const s=e;const n=s.constructor;n.debounces.forEach((e=>{"string"===typeof e&&(s[e]=debounce(s[e],null===t||void 0===t?void 0:t.wait));if("object"===typeof e){const{name:n,wait:o}=e;if(!n)return;s[n]=debounce(s[n],o||(null===t||void 0===t?void 0:t.wait))}}))};class ThrottleController extends e{}ThrottleController.throttles=[];const d=200;function throttle(e,t=d){let s;return function(){const n=arguments;const o=this;if(!s){s=true;e.apply(o,n);setTimeout((()=>s=false),t)}}}const useThrottle=(e,t={})=>{var s;const n=e;const o=n.constructor;null===(s=o.throttles)||void 0===s?void 0:s.forEach((e=>{"string"===typeof e&&(n[e]=throttle(n[e],null===t||void 0===t?void 0:t.wait));if("object"===typeof e){const{name:s,wait:o}=e;if(!s)return;n[s]=throttle(n[s],o||(null===t||void 0===t?void 0:t.wait))}}))};const defineMetaGetter=(e,t,s)=>{const n=s?`${camelize(t)}Meta`:camelize(t);Object.defineProperty(e,n,{get(){return typeCast(metaValue(t))}})};function metaValue(e){const t=document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")}function typeCast(e){try{return JSON.parse(e)}catch(t){return e}}const useMeta=(e,t={suffix:true})=>{const s=e.constructor.metaNames;const n=t.suffix;null===s||void 0===s?void 0:s.forEach((t=>{defineMetaGetter(e,t,n)}));Object.defineProperty(e,"metas",{get(){const e={};null===s||void 0===s?void 0:s.forEach((t=>{const s=typeCast(metaValue(t));void 0!==s&&null!==s&&(e[camelize(t)]=s)}));return e}})};const b={enterFromClass:"enter",enterActiveClass:"enterStart",enterToClass:"enterEnd",leaveFromClass:"leave",leaveActiveClass:"leaveStart",leaveToClass:"leaveEnd"};const m={transitioned:false,hiddenClass:"hidden",preserveOriginalClass:true,removeToClasses:true};const useTransition=(e,t={})=>{var s,n,o;const i=e;const r=i.element.dataset.transitionTarget;let l;r&&(l=i[`${r}Target`]);const c=(null===t||void 0===t?void 0:t.element)||l||i.element;if(!(c instanceof HTMLElement||c instanceof SVGElement))return;const a=c.dataset;const h=parseInt(a.leaveAfter||"")||t.leaveAfter||0;const{transitioned:u,hiddenClass:d,preserveOriginalClass:b,removeToClasses:v}=Object.assign({},m,t);const g=null===(s=i.enter)||void 0===s?void 0:s.bind(i);const p=null===(n=i.leave)||void 0===n?void 0:n.bind(i);const f=null===(o=i.toggleTransition)||void 0===o?void 0:o.bind(i);async function enter(e){if(i.transitioned)return;i.transitioned=true;g&&g(e);const s=getAttribute("enterFrom",t,a);const n=getAttribute("enterActive",t,a);const o=getAttribute("enterTo",t,a);const r=getAttribute("leaveTo",t,a);!d||c.classList.remove(d);v||removeClasses(c,r);await transition(c,s,n,o,d,b,v);h>0&&setTimeout((()=>{leave(e)}),h)}async function leave(e){if(!i.transitioned)return;i.transitioned=false;p&&p(e);const s=getAttribute("leaveFrom",t,a);const n=getAttribute("leaveActive",t,a);const o=getAttribute("leaveTo",t,a);const r=getAttribute("enterTo",t,a);v||removeClasses(c,r);await transition(c,s,n,o,d,b,v);!d||c.classList.add(d)}function toggleTransition(e){f&&f(e);i.transitioned?leave():enter()}async function transition(e,t,s,n,o,i,r){const l=[];if(i){t.forEach((t=>e.classList.contains(t)&&t!==o&&l.push(t)));s.forEach((t=>e.classList.contains(t)&&t!==o&&l.push(t)));n.forEach((t=>e.classList.contains(t)&&t!==o&&l.push(t)))}addClasses(e,t);removeClasses(e,l);addClasses(e,s);await nextAnimationFrame();removeClasses(e,t);addClasses(e,n);await afterTransition(e);removeClasses(e,s);r&&removeClasses(e,n);addClasses(e,l)}function initialState(){i.transitioned=u;if(u){!d||c.classList.remove(d);enter()}else{!d||c.classList.add(d);leave()}}function addClasses(e,t){t.length>0&&e.classList.add(...t)}function removeClasses(e,t){t.length>0&&e.classList.remove(...t)}initialState();Object.assign(i,{enter:enter,leave:leave,toggleTransition:toggleTransition});return[enter,leave,toggleTransition]};function getAttribute(e,t,s){const n=`transition${e[0].toUpperCase()}${e.substr(1)}`;const o=b[e];const i=t[e]||s[n]||s[o]||" ";return isEmpty(i)?[]:i.split(" ")}async function afterTransition(e){return new Promise((t=>{const s=1e3*Number(getComputedStyle(e).transitionDuration.split(",")[0].replace("s",""));setTimeout((()=>{t(s)}),s)}))}async function nextAnimationFrame(){return new Promise((e=>{requestAnimationFrame((()=>{requestAnimationFrame(e)}))}))}function isEmpty(e){return 0===e.length||!e.trim()}class TransitionComposableController extends e{constructor(){super(...arguments);this.transitioned=false}}class TransitionController extends TransitionComposableController{constructor(e){super(e);requestAnimationFrame((()=>{useTransition(this,this.options)}))}}class UseHotkeys extends StimulusUse{constructor(e,s){super(e,s);this.bind=()=>{for(const[e,s]of Object.entries(this.hotkeysOptions.hotkeys)){const n=s.handler.bind(this.controller);t(e,s.options,(e=>n(e,e)))}};this.unbind=()=>{for(const e in this.hotkeysOptions.hotkeys)t.unbind(e)};this.controller=e;this.hotkeysOptions=s;this.enhanceController();this.bind()}enhanceController(){this.hotkeysOptions.filter&&(t.filter=this.hotkeysOptions.filter);const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unbind();e()};Object.assign(this.controller,{disconnect:disconnect})}}const convertSimpleHotkeyDefinition=e=>({handler:e[0],options:{element:e[1]}});const coerceOptions=e=>{if(!e.hotkeys){const t={};Object.entries(e).forEach((([e,s])=>{Object.defineProperty(t,e,{value:convertSimpleHotkeyDefinition(s),writable:false,enumerable:true})}));e={hotkeys:t}}return e};const useHotkeys=(e,t)=>new UseHotkeys(e,coerceOptions(t));const v={mediaQueries:{},dispatchEvent:true,eventPrefix:true,debug:false};class UseMatchMedia extends StimulusUse{constructor(e,t={}){var s,n,o,i;super(e,t);this.matches=[];this.callback=e=>{const t=Object.keys(this.mediaQueries).find((t=>this.mediaQueries[t]===e.media));if(!t)return;const{media:s,matches:n}=e;this.changed({name:t,media:s,matches:n,event:e})};this.changed=e=>{const{name:t}=e;if(e.event){this.call(camelize(`${t}_changed`),e);this.dispatch(`${t}:changed`,e);this.log(`media query "${t}" changed`,e)}if(e.matches){this.call(camelize(`is_${t}`),e);this.dispatch(`is:${t}`,e)}else{this.call(camelize(`not_${t}`),e);this.dispatch(`not:${t}`,e)}};this.observe=()=>{Object.keys(this.mediaQueries).forEach((e=>{const t=this.mediaQueries[e];const s=window.matchMedia(t);s.addListener(this.callback);this.matches.push(s);this.changed({name:e,media:t,matches:s.matches})}))};this.unobserve=()=>{this.matches.forEach((e=>e.removeListener(this.callback)))};this.controller=e;this.mediaQueries=null!==(s=t.mediaQueries)&&void 0!==s?s:v.mediaQueries;this.dispatchEvent=null!==(n=t.dispatchEvent)&&void 0!==n?n:v.dispatchEvent;this.eventPrefix=null!==(o=t.eventPrefix)&&void 0!==o?o:v.eventPrefix;this.debug=null!==(i=t.debug)&&void 0!==i?i:v.debug;if(window.matchMedia){this.enhanceController();this.observe()}else console.error("window.matchMedia() is not available")}enhanceController(){const e=this.controller.disconnect.bind(this.controller);const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useMatchMedia=(e,t={})=>{const s=new UseMatchMedia(e,t);return[s.observe,s.unobserve]};class UseWindowFocus extends StimulusUse{constructor(e,t={}){super(e,t);this.observe=()=>{document.hasFocus()?this.becomesFocused():this.becomesUnfocused();this.interval=setInterval((()=>{this.handleWindowFocusChange()}),this.intervalDuration)};this.unobserve=()=>{clearInterval(this.interval)};this.becomesUnfocused=e=>{this.controller.hasFocus=false;this.call("unfocus",e);this.log("unfocus",{hasFocus:false});this.dispatch("unfocus",{event:e,hasFocus:false})};this.becomesFocused=e=>{this.controller.hasFocus=true;this.call("focus",e);this.log("focus",{hasFocus:true});this.dispatch("focus",{event:e,hasFocus:true})};this.handleWindowFocusChange=e=>{document.hasFocus()&&!this.controller.hasFocus?this.becomesFocused(e):!document.hasFocus()&&this.controller.hasFocus&&this.becomesUnfocused(e)};this.controller=e;this.intervalDuration=t.interval||200;this.enhanceController();this.observe()}enhanceController(){const e=this.controllerDisconnect;const disconnect=()=>{this.unobserve();e()};Object.assign(this.controller,{disconnect:disconnect})}}const useWindowFocus=(e,t={})=>{const s=e;const n=new UseWindowFocus(s,t);return[n.observe,n.unobserve]};class WindowFocusComposableController extends e{constructor(){super(...arguments);this.hasFocus=false}}class WindowFocusController extends WindowFocusComposableController{constructor(e){super(e);requestAnimationFrame((()=>{const[e,t]=useWindowFocus(this,this.options);Object.assign(this,{observe:e,unobserve:t})}))}}export{ApplicationController,ClickOutsideController,HoverController,IdleController,IntersectionController,LazyLoadController,MutationController,ResizeController,TargetMutationController,TransitionController,UseHover,UseMutation,UseTargetMutation,UseVisibility,VisibilityController,WindowFocusController,WindowResizeController,useApplication,useClickOutside,useDebounce,useDispatch,useHotkeys,useHover,useIdle,useIntersection,useLazyLoad,useMatchMedia,useMemo,useMeta,useMutation,useResize,useTargetMutation,useThrottle,useTransition,useVisibility,useWindowFocus,useWindowResize};+diff --git a/admin/vendor/javascript/tailwindcss-stimulus-components.js b/admin/vendor/javascript/tailwindcss-stimulus-components.jsnew file mode 100644index 0000000000..586a803fef--- /dev/null+++ b/admin/vendor/javascript/tailwindcss-stimulus-components.js@@ -0,0 +1,4 @@+// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/tailwindcss-stimulus-components.module.js++import{Controller as e}from"@hotwired/stimulus";var t=Object.defineProperty;var V=(e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a;var i=(e,t,s)=>V(e,typeof t!="symbol"?t+"":t,s);async function n(e,t,s={}){t?await T(e,s):await b(e,s)}async function T(e,t={}){let{transitionClasses:s,fromClasses:a,toClasses:o,toggleClass:l}=C("Enter",e,t);return v(e,{firstFrame(){e.classList.add(...s.split(" ")),e.classList.add(...a.split(" ")),e.classList.remove(...o.split(" ")),e.classList.remove(...l.split(" "))},secondFrame(){e.classList.remove(...a.split(" ")),e.classList.add(...o.split(" "))},ending(){e.classList.remove(...s.split(" "))}})}async function b(e,t={}){let{transitionClasses:s,fromClasses:a,toClasses:o,toggleClass:l}=C("Leave",e,t);return v(e,{firstFrame(){e.classList.add(...a.split(" ")),e.classList.remove(...o.split(" ")),e.classList.add(...s.split(" "))},secondFrame(){e.classList.remove(...a.split(" ")),e.classList.add(...o.split(" "))},ending(){e.classList.remove(...s.split(" ")),e.classList.add(...l.split(" "))}})}function C(e,t,s){return{transitionClasses:t.dataset[`transition${e}`]||s[e.toLowerCase()]||e.toLowerCase(),fromClasses:t.dataset[`transition${e}From`]||s[`${e.toLowerCase()}From`]||`${e.toLowerCase()}-from`,toClasses:t.dataset[`transition${e}To`]||s[`${e.toLowerCase()}To`]||`${e.toLowerCase()}-to`,toggleClass:t.dataset.toggleClass||s.toggleClass||s.toggle||"hidden"}}function L(e){e._stimulus_transition={timeout:null,interrupted:!1}}function I(e){e._stimulus_transition&&e._stimulus_transition.interrupt&&e._stimulus_transition.interrupt()}function v(e,t){e._stimulus_transition&&I(e);let s,a,o;return L(e),e._stimulus_transition.cleanup=()=>{a||t.firstFrame(),o||t.secondFrame(),t.ending(),e._stimulus_transition=null},e._stimulus_transition.interrupt=()=>{s=!0,e._stimulus_transition.timeout&&clearTimeout(e._stimulus_transition.timeout),e._stimulus_transition.cleanup()},new Promise((l=>{s||requestAnimationFrame((()=>{s||(t.firstFrame(),a=!0,requestAnimationFrame((()=>{s||(t.secondFrame(),o=!0,e._stimulus_transition&&(e._stimulus_transition.timeout=setTimeout((()=>{s||e._stimulus_transition.cleanup(),l()}),w(e))))})))}))}))}function w(e){let t=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,s=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;return t===0&&(t=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),t+s}var s=class extends e{connect(){setTimeout((()=>{T(this.element)}),this.showDelayValue),this.hasDismissAfterValue&&setTimeout((()=>{this.close()}),this.dismissAfterValue)}close(){b(this.element).then((()=>{this.element.remove()}))}};i(s,"values",{dismissAfter:Number,showDelay:{type:Number,default:0}});var a=class extends e{connect(){this.timeout=null}save(){clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.statusTarget.textContent=this.submittingTextValue,this.formTarget.requestSubmit()}),this.submitDurationValue)}success(){this.setStatus(this.successTextValue)}error(){this.setStatus(this.errorTextValue)}setStatus(e){this.statusTarget.textContent=e,this.timeout=setTimeout((()=>{this.statusTarget.textContent=""}),this.statusDurationValue)}};i(a,"targets",["form","status"]),i(a,"values",{submitDuration:{type:Number,default:1e3},statusDuration:{type:Number,default:2e3},submittingText:{type:String,default:"Saving..."},successText:{type:String,default:"Saved!"},errorText:{type:String,default:"Unable to save."}});var o=class extends e{update(){this.preview=this.colorTarget.value}set preview(e){this.previewTarget.style[this.styleValue]=e;let t=this._getContrastYIQ(e);this.styleValue==="color"?this.previewTarget.style.backgroundColor=t:this.previewTarget.style.color=t}_getContrastYIQ(e){e=e.replace("#","");let t=128,s=parseInt(e.substr(0,2),16),a=parseInt(e.substr(2,2),16),o=parseInt(e.substr(4,2),16);return(s*299+a*587+o*114)/1e3>=t?"#000":"#fff"}};i(o,"targets",["preview","color"]),i(o,"values",{style:{type:String,default:"backgroundColor"}});var l=class extends e{connect(){this.boundBeforeCache=this.beforeCache.bind(this),document.addEventListener("turbo:before-cache",this.boundBeforeCache)}disconnect(){document.removeEventListener("turbo:before-cache",this.boundBeforeCache)}openValueChanged(){n(this.menuTarget,this.openValue,this.transitionOptions),this.openValue===!0&&this.hasMenuItemTarget&&this.menuItemTargets[0].focus()}show(){this.openValue=!0}close(){this.openValue=!1}hide(e){this.closeOnClickOutsideValue&&e.target.nodeType&&this.element.contains(e.target)===!1&&this.openValue&&(this.openValue=!1),this.closeOnEscapeValue&&e.key==="Escape"&&this.openValue&&(this.openValue=!1)}toggle(){this.openValue=!this.openValue}nextItem(e){e.preventDefault(),this.menuItemTargets[this.nextIndex].focus()}previousItem(e){e.preventDefault(),this.menuItemTargets[this.previousIndex].focus()}get currentItemIndex(){return this.menuItemTargets.indexOf(document.activeElement)}get nextIndex(){return Math.min(this.currentItemIndex+1,this.menuItemTargets.length-1)}get previousIndex(){return Math.max(this.currentItemIndex-1,0)}get transitionOptions(){return{enter:this.hasEnterClass?this.enterClasses.join(" "):"transition ease-out duration-100",enterFrom:this.hasEnterFromClass?this.enterFromClasses.join(" "):"transform opacity-0 scale-95",enterTo:this.hasEnterToClass?this.enterToClasses.join(" "):"transform opacity-100 scale-100",leave:this.hasLeaveClass?this.leaveClasses.join(" "):"transition ease-in duration-75",leaveFrom:this.hasLeaveFromClass?this.leaveFromClasses.join(" "):"transform opacity-100 scale-100",leaveTo:this.hasLeaveToClass?this.leaveToClasses.join(" "):"transform opacity-0 scale-95",toggleClass:this.hasToggleClass?this.toggleClasses.join(" "):"hidden"}}beforeCache(){this.openValue=!1,this.menuTarget.classList.add(this.transitionOptions.toggleClass)}};i(l,"targets",["menu","button","menuItem"]),i(l,"values",{open:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0}}),i(l,"classes",["enter","enterFrom","enterTo","leave","leaveFrom","leaveTo","toggle"]);var r=class extends e{connect(){this.openValue&&this.open(),this.boundBeforeCache=this.beforeCache.bind(this),document.addEventListener("turbo:before-cache",this.boundBeforeCache)}disconnect(){document.removeEventListener("turbo:before-cache",this.boundBeforeCache)}open(){this.dialogTarget.showModal()}close(){this.dialogTarget.setAttribute("closing",""),Promise.all(this.dialogTarget.getAnimations().map((e=>e.finished))).then((()=>{this.dialogTarget.removeAttribute("closing"),this.dialogTarget.close()}))}backdropClose(e){e.target.nodeName=="DIALOG"&&this.close()}show(){this.dialogTarget.show()}hide(){this.close()}beforeCache(){this.close()}};i(r,"targets",["dialog"]),i(r,"values",{open:Boolean});var u=class extends e{openValueChanged(){n(this.contentTarget,this.openValue),this.shouldAutoDismiss&&this.scheduleDismissal()}show(e){this.shouldAutoDismiss&&this.scheduleDismissal(),this.openValue=!0}hide(){this.openValue=!1}toggle(){this.openValue=!this.openValue}get shouldAutoDismiss(){return this.openValue&&this.hasDismissAfterValue}scheduleDismissal(){this.hasDismissAfterValue&&(this.cancelDismissal(),this.timeoutId=setTimeout((()=>{this.hide(),this.timeoutId=void 0}),this.dismissAfterValue))}cancelDismissal(){typeof this.timeoutId=="number"&&(clearTimeout(this.timeoutId),this.timeoutId=void 0)}};i(u,"targets",["content"]),i(u,"values",{dismissAfter:Number,open:{type:Boolean,default:!1}});var h=class extends e{connect(){this.openValue&&this.open(),this.boundBeforeCache=this.beforeCache,document.addEventListener("turbo:before-cache",this.boundBeforeCache)}disconnect(){document.removeEventListener("turbo:before-cache",this.boundBeforeCache)}open(){this.dialogTarget.showModal()}close(){this.dialogTarget.setAttribute("closing",""),Promise.all(this.dialogTarget.getAnimations().map((e=>e.finished))).then((()=>{this.dialogTarget.removeAttribute("closing"),this.dialogTarget.close()}))}backdropClose(e){e.target.nodeName=="DIALOG"&&this.close()}show(){this.open()}hide(){this.close()}beforeCache(){this.close()}};i(h,"targets",["dialog"]),i(h,"values",{open:Boolean});var c=class extends e{initialize(){this.updateAnchorValue&&this.anchor&&(this.indexValue=this.tabTargets.findIndex((e=>e.id===this.anchor)))}connect(){this.showTab()}change(e){e.currentTarget.tagName==="SELECT"?this.indexValue=e.currentTarget.selectedIndex:e.currentTarget.dataset.index?this.indexValue=e.currentTarget.dataset.index:e.currentTarget.dataset.id?this.indexValue=this.tabTargets.findIndex((t=>t.id==e.currentTarget.dataset.id)):this.indexValue=this.tabTargets.indexOf(e.currentTarget)}nextTab(){this.indexValue=Math.min(this.indexValue+1,this.tabsCount-1)}previousTab(){this.indexValue=Math.max(this.indexValue-1,0)}firstTab(){this.indexValue=0}lastTab(){this.indexValue=this.tabsCount-1}indexValueChanged(){if(this.showTab(),this.dispatch("tab-change",{target:this.tabTargets[this.indexValue],detail:{activeIndex:this.indexValue}}),this.updateAnchorValue){let e=this.tabTargets[this.indexValue].id;if(this.scrollToAnchorValue)location.hash=e;else{let t=window.location.href.split("#")[0]+"#"+e;typeof Turbo<"u"?Turbo.navigator.history.replace(new URL(t)):history.replaceState({},document.title,t)}}}showTab(){this.panelTargets.forEach(((e,t)=>{let s=this.tabTargets[t];t===this.indexValue?(e.classList.remove("hidden"),s.ariaSelected="true",s.dataset.active=!0,this.hasInactiveTabClass&&s?.classList?.remove(...this.inactiveTabClasses),this.hasActiveTabClass&&s?.classList?.add(...this.activeTabClasses)):(e.classList.add("hidden"),s.ariaSelected=null,delete s.dataset.active,this.hasActiveTabClass&&s?.classList?.remove(...this.activeTabClasses),this.hasInactiveTabClass&&s?.classList?.add(...this.inactiveTabClasses))})),this.hasSelectTarget&&(this.selectTarget.selectedIndex=this.indexValue),this.scrollActiveTabIntoViewValue&&this.scrollToActiveTab()}scrollToActiveTab(){let e=this.element.querySelector("[aria-selected]");e&&e.scrollIntoView({inline:"center"})}get tabsCount(){return this.tabTargets.length}get anchor(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}};i(c,"classes",["activeTab","inactiveTab"]),i(c,"targets",["tab","panel","select"]),i(c,"values",{index:0,updateAnchor:Boolean,scrollToAnchor:Boolean,scrollActiveTabIntoView:Boolean});var d=class extends e{toggle(e){this.openValue=!this.openValue,this.animate()}toggleInput(e){this.openValue=e.target.checked,this.animate()}hide(){this.openValue=!1,this.animate()}show(){this.openValue=!0,this.animate()}animate(){this.toggleableTargets.forEach((e=>{n(e,this.openValue)}))}};i(d,"targets",["toggleable"]),i(d,"values",{open:{type:Boolean,default:!1}});export{s as Alert,a as Autosave,o as ColorPreview,l as Dropdown,r as Modal,u as Popover,h as Slideover,c as Tabs,d as Toggle,n as transition};+diff --git a/admin/vendor/javascript/tom-select--dist--esm--tom-select.complete.js.js b/admin/vendor/javascript/tom-select--dist--esm--tom-select.complete.js.jsnew file mode 100644index 0000000000..89a98d27e2--- /dev/null+++ b/admin/vendor/javascript/tom-select--dist--esm--tom-select.complete.js.js@@ -0,0 +1,32 @@+// tom-select/dist/esm/[email protected] downloaded from https://cdn.jsdelivr.net/npm/[email protected]/dist/esm/tom-select.complete.js++import TomSelect from "./tom-select.js";+import change_listener from "./plugins/change_listener/plugin.js";+import checkbox_options from "./plugins/checkbox_options/plugin.js";+import clear_button from "./plugins/clear_button/plugin.js";+import drag_drop from "./plugins/drag_drop/plugin.js";+import dropdown_header from "./plugins/dropdown_header/plugin.js";+import caret_position from "./plugins/caret_position/plugin.js";+import dropdown_input from "./plugins/dropdown_input/plugin.js";+import input_autogrow from "./plugins/input_autogrow/plugin.js";+import no_backspace_delete from "./plugins/no_backspace_delete/plugin.js";+import no_active_items from "./plugins/no_active_items/plugin.js";+import optgroup_columns from "./plugins/optgroup_columns/plugin.js";+import remove_button from "./plugins/remove_button/plugin.js";+import restore_on_backspace from "./plugins/restore_on_backspace/plugin.js";+import virtual_scroll from "./plugins/virtual_scroll/plugin.js";+TomSelect.define('change_listener', change_listener);+TomSelect.define('checkbox_options', checkbox_options);+TomSelect.define('clear_button', clear_button);+TomSelect.define('drag_drop', drag_drop);+TomSelect.define('dropdown_header', dropdown_header);+TomSelect.define('caret_position', caret_position);+TomSelect.define('dropdown_input', dropdown_input);+TomSelect.define('input_autogrow', input_autogrow);+TomSelect.define('no_backspace_delete', no_backspace_delete);+TomSelect.define('no_active_items', no_active_items);+TomSelect.define('optgroup_columns', optgroup_columns);+TomSelect.define('remove_button', remove_button);+TomSelect.define('restore_on_backspace', restore_on_backspace);+TomSelect.define('virtual_scroll', virtual_scroll);+export default TomSelect;