@sankhyalabs/ezui 7.2.0-dev.6 → 7.2.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/classic-search-list_7.cjs.entry.js +2 -2
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-search-plus.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-grid-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +2 -2
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
- package/dist/cjs/ez-list-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-record-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile-medium.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-underface.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +0 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{search-column-c0485015.js → search-column-cd0e44be.js} +1 -1
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.css +1 -1
- package/dist/custom-elements/index.js +1 -1
- package/dist/esm/classic-search-list_7.entry.js +2 -2
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-avatar.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-classic-combo-box.entry.js +1 -1
- package/dist/esm/ez-classic-date-input.entry.js +1 -1
- package/dist/esm/ez-classic-date-time-input.entry.js +1 -1
- package/dist/esm/ez-classic-input.entry.js +1 -1
- package/dist/esm/ez-classic-number-input.entry.js +1 -1
- package/dist/esm/ez-classic-search-plus.entry.js +1 -1
- package/dist/esm/ez-classic-search.entry.js +1 -1
- package/dist/esm/ez-classic-text-area.entry.js +1 -1
- package/dist/esm/ez-classic-time-input.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-double-list.entry.js +1 -1
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-empty-card.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-grid-pagination.entry.js +1 -1
- package/dist/esm/ez-grid-view.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +2 -2
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-link-builder_6.entry.js +1 -1
- package/dist/esm/ez-list-item.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-pagination.entry.js +1 -1
- package/dist/esm/ez-popover-core.entry.js +1 -1
- package/dist/esm/ez-popover-plus_3.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-progress-bar.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-record-navigation.entry.js +1 -1
- package/dist/esm/ez-rich-toolbar-item.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +1 -1
- package/dist/esm/ez-search-result-list.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-sortable-list.entry.js +2 -2
- package/dist/esm/ez-spinner.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +1 -1
- package/dist/esm/ez-split-item.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-tag-input.entry.js +1 -1
- package/dist/esm/ez-tag.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-tile-medium.entry.js +1 -1
- package/dist/esm/ez-tile.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-underface.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +2 -2
- package/dist/esm/filter-column.entry.js +1 -1
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +1 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{search-column-9aaf3738.js → search-column-33d72c20.js} +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-1ee006d6.entry.js → p-0bc16f75.entry.js} +1 -1
- package/dist/ezui/{p-49eb13ea.entry.js → p-0d80e3ec.entry.js} +1 -1
- package/dist/ezui/{p-7ca13a5f.entry.js → p-0fc981e9.entry.js} +1 -1
- package/dist/ezui/{p-47c5b2d8.entry.js → p-1244fac0.entry.js} +1 -1
- package/dist/ezui/{p-f9a7255c.entry.js → p-160a268d.entry.js} +1 -1
- package/dist/ezui/{p-c6021712.entry.js → p-178cb9df.entry.js} +1 -1
- package/dist/ezui/{p-aebfbcdd.entry.js → p-1ab5ba19.entry.js} +1 -1
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-cf33bc48.entry.js → p-20c024f7.entry.js} +1 -1
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/{p-169d460d.entry.js → p-2528e988.entry.js} +1 -1
- package/dist/ezui/{p-12c6b66f.entry.js → p-2887cbf9.entry.js} +1 -1
- package/dist/ezui/{p-14a932b7.entry.js → p-2b65728f.entry.js} +1 -1
- package/dist/ezui/{p-5b680898.entry.js → p-2e07f3d5.entry.js} +2 -2
- package/dist/ezui/{p-ddfd7ecf.entry.js → p-318d4dc9.entry.js} +1 -1
- package/dist/ezui/{p-1b30bb80.entry.js → p-32b8f057.entry.js} +1 -1
- package/dist/ezui/{p-08ccdf00.entry.js → p-3311e7ef.entry.js} +1 -1
- package/dist/ezui/{p-73042259.entry.js → p-39d2bce5.entry.js} +1 -1
- package/dist/ezui/{p-0913a517.entry.js → p-3d772561.entry.js} +1 -1
- package/dist/ezui/{p-f7ca8634.entry.js → p-411c0222.entry.js} +1 -1
- package/dist/ezui/{p-87739608.entry.js → p-44183c39.entry.js} +1 -1
- package/dist/ezui/{p-c719e15f.entry.js → p-473a397f.entry.js} +1 -1
- package/dist/ezui/{p-cdd18178.entry.js → p-4991931a.entry.js} +1 -1
- package/dist/ezui/{p-32201585.entry.js → p-4ca4e8d1.entry.js} +1 -1
- package/dist/ezui/{p-7808d0c0.entry.js → p-4f76dc28.entry.js} +1 -1
- package/dist/ezui/{p-712f059e.entry.js → p-510eccc7.entry.js} +1 -1
- package/dist/ezui/{p-a0080b19.entry.js → p-54975948.entry.js} +1 -1
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/{p-c754774e.entry.js → p-6020f3d5.entry.js} +1 -1
- package/dist/ezui/{p-51e34317.entry.js → p-6369a0cd.entry.js} +1 -1
- package/dist/ezui/{p-ba335c16.entry.js → p-6bb36afc.entry.js} +1 -1
- package/dist/ezui/{p-0b531233.entry.js → p-6d596a5a.entry.js} +1 -1
- package/dist/ezui/{p-1723f728.entry.js → p-6f77a359.entry.js} +1 -1
- package/dist/ezui/{p-f04a298d.entry.js → p-700af412.entry.js} +1 -1
- package/dist/ezui/{p-a6df6cdc.entry.js → p-7df45688.entry.js} +1 -1
- package/dist/ezui/{p-b6fcfa4f.entry.js → p-7f475884.entry.js} +1 -1
- package/dist/ezui/{p-e195eaad.entry.js → p-7f792043.entry.js} +1 -1
- package/dist/ezui/{p-707b073d.entry.js → p-84be1391.entry.js} +1 -1
- package/dist/ezui/{p-815716be.entry.js → p-879cee4d.entry.js} +1 -1
- package/dist/ezui/{p-f6c5078e.entry.js → p-8980b477.entry.js} +1 -1
- package/dist/ezui/{p-787c6496.entry.js → p-8a5efec5.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/{p-78e975b4.entry.js → p-91c9d50e.entry.js} +1 -1
- package/dist/ezui/{p-f80fb048.entry.js → p-91ff4511.entry.js} +1 -1
- package/dist/ezui/{p-39084308.entry.js → p-93097edc.entry.js} +1 -1
- package/dist/ezui/{p-05e68ab3.entry.js → p-93e1c917.entry.js} +1 -1
- package/dist/ezui/{p-fd1e22b8.entry.js → p-96e5eaa2.entry.js} +1 -1
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/{p-bc693db6.entry.js → p-a0bf1fc7.entry.js} +1 -1
- package/dist/ezui/{p-27421015.entry.js → p-a0f51b99.entry.js} +1 -1
- package/dist/ezui/{p-9bcfa689.entry.js → p-a3075f52.entry.js} +1 -1
- package/dist/ezui/{p-71e982ef.entry.js → p-a383fbc5.entry.js} +1 -1
- package/dist/ezui/{p-f26b97e9.entry.js → p-a3ada561.entry.js} +1 -1
- package/dist/ezui/{p-894392ca.entry.js → p-a4735a12.entry.js} +1 -1
- package/dist/ezui/{p-efa5e822.entry.js → p-a4911d89.entry.js} +1 -1
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/{p-d321c2b8.entry.js → p-a8f807ed.entry.js} +1 -1
- package/dist/ezui/{p-0ad696a3.entry.js → p-ab41edab.entry.js} +1 -1
- package/dist/ezui/{p-26b01fe6.entry.js → p-ab4da973.entry.js} +1 -1
- package/dist/ezui/{p-9fb33cd8.entry.js → p-adee66db.entry.js} +1 -1
- package/dist/ezui/{p-1d624aa7.entry.js → p-b5f45319.entry.js} +1 -1
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-b7c0368d.entry.js → p-c2d44132.entry.js} +1 -1
- package/dist/ezui/{p-91e7574c.entry.js → p-c33d46e0.entry.js} +1 -1
- package/dist/ezui/p-c8584e28.entry.js +1 -0
- package/dist/ezui/{p-efa7b5a1.entry.js → p-caf3cd8f.entry.js} +1 -1
- package/dist/ezui/{p-55d2be5c.entry.js → p-cf66ace0.entry.js} +1 -1
- package/dist/ezui/{p-a9432878.entry.js → p-d6742c1e.entry.js} +1 -1
- package/dist/ezui/{p-770cf2b8.entry.js → p-d6f50207.entry.js} +1 -1
- package/dist/ezui/p-d8cc640d.entry.js +1 -0
- package/dist/ezui/{p-1827fced.entry.js → p-d98dd01a.entry.js} +1 -1
- package/dist/ezui/{p-dc5fd882.entry.js → p-dd5326e6.entry.js} +1 -1
- package/dist/ezui/{p-76835bee.entry.js → p-ddc6432d.entry.js} +1 -1
- package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
- package/dist/ezui/{p-e9b409c1.entry.js → p-e7a7c594.entry.js} +1 -1
- package/dist/ezui/{p-b21efe83.entry.js → p-e8c57463.entry.js} +1 -1
- package/dist/ezui/{p-82a2b0bc.entry.js → p-ea0f78d1.entry.js} +1 -1
- package/dist/ezui/{p-d5565a0f.entry.js → p-ed6b6e0f.entry.js} +1 -1
- package/dist/ezui/{p-3286d016.entry.js → p-f1390be9.entry.js} +1 -1
- package/dist/ezui/{p-980f1f18.entry.js → p-f34ec732.entry.js} +1 -1
- package/dist/ezui/{p-73b578a3.js → p-f71a4d97.js} +1 -1
- package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
- package/dist/ezui/{p-1b7d0c1c.entry.js → p-fc72aeb8.entry.js} +1 -1
- package/dist/ezui/{p-810b81ad.entry.js → p-fcdd861e.entry.js} +1 -1
- package/package.json +1 -1
- package/dist/ezui/p-14d6aeb8.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-f1f083b6.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as n}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,g as n}from"./p-23a36bb6.js";import{ArrayUtils as r}from"@sankhyalabs/core";import{i as o}from"./p-69344c23.js";
|
|
2
2
|
/**!
|
|
3
3
|
* Sortable 1.15.7
|
|
4
4
|
* @author RubaXa <trash@rubaxa.org>
|
|
5
5
|
* @author owenm <owen23355@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function s(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(){return l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},l.apply(null,arguments)}function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?u(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function h(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;i[n]=t[n]}return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)-1===e.indexOf(i=o[n])&&{}.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function f(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var v=f(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),m=f(/Edge/i),b=f(/firefox/i),p=f(/safari/i)&&!f(/chrome/i)&&!f(/android/i),g=f(/iP(ad|od|hone)/i),w=f(/chrome/i)&&f(/android/i),y={capture:!1,passive:!1};function x(t,e,i){t.addEventListener(e,i,!v&&y)}function _(t,e,i){t.removeEventListener(e,i,!v&&y)}function E(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function z(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function k(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&E(t,e):E(t,e))||n&&t===i)return t;if(t===i)break}while(t=z(t))}return null}var S,I=/\s+/g;function D(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(I," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(I," ")}}function T(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function C(t,e){var i="";if("string"==typeof t)i=t;else do{var n=T(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(i)}function M(t,e,i){if(t){var n=t.getElementsByTagName(e),r=0,o=n.length;if(i)for(;r<o;r++)i(n[r],r);return n}return[]}function O(){return document.scrollingElement||document.documentElement}function A(t,e,i,n,r){if(t.getBoundingClientRect||t===window){var o,a,s,l,u,c,h;if(t!==window&&t.parentNode&&t!==O()?(a=(o=t.getBoundingClientRect()).top,s=o.left,l=o.bottom,u=o.right,c=o.height,h=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(e||i)&&t!==window&&(r=r||t.parentNode,!v))do{if(r&&r.getBoundingClientRect&&("none"!==T(r,"transform")||i&&"static"!==T(r,"position"))){var d=r.getBoundingClientRect();a-=d.top+parseInt(T(r,"border-top-width")),s-=d.left+parseInt(T(r,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(r=r.parentNode);if(n&&t!==window){var f=C(r||t),m=f&&f.a,b=f&&f.d;f&&(l=(a/=b)+(c/=b),u=(s/=m)+(h/=m))}return{top:a,left:s,bottom:l,right:u,width:h,height:c}}}function j(t,e,i){for(var n=L(t,!0),r=A(t)[e];n;){var o=A(n)[i];if(!("top"===i||"left"===i?r>=o:r<=o))return n;if(n===O())break;n=L(n,!1)}return!1}function F(t,e,i,n){for(var r=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Ut.ghost&&(n||a[o]!==Ut.dragged)&&k(a[o],i.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function $(t,e){for(var i=t.lastElementChild;i&&(i===Ut.ghost||"none"===T(i,"display")||e&&!E(i,e));)i=i.previousElementSibling;return i||null}function B(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ut.clone||e&&!E(t,e)||i++;return i}function N(t){var e=0,i=0,n=O();if(t)do{var r=C(t);e+=t.scrollLeft*r.a,i+=t.scrollTop*r.d}while(t!==n&&(t=t.parentNode));return[e,i]}function L(t,e){if(!t||!t.getBoundingClientRect)return O();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var r=T(i);if(i.clientWidth<i.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!i.getBoundingClientRect||i===document.body)return O();if(n||e)return i;n=!0}}}while(i=i.parentNode);return O()}function P(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function G(t,e){return function(){if(!S){var i=arguments,n=this;1===i.length?t.call(n,i[0]):t.apply(n,i),S=setTimeout((function(){S=void 0}),e)}}}function H(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function K(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function R(t,e){T(t,"position","absolute"),T(t,"top",e.top),T(t,"left",e.left),T(t,"width",e.width),T(t,"height",e.height)}function U(t){T(t,"position",""),T(t,"top",""),T(t,"left",""),T(t,"width",""),T(t,"height","")}function W(t,e,i){var n={};return Array.from(t.children).forEach((function(r){var o,a,s,l;if(k(r,e.draggable,t,!1)&&!r.animated&&r!==i){var u=A(r);n.left=Math.min(null!==(o=n.left)&&void 0!==o?o:1/0,u.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,u.top),n.right=Math.max(null!==(s=n.right)&&void 0!==s?s:-1/0,u.right),n.bottom=Math.max(null!==(l=n.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Y="Sortable"+(new Date).getTime();var X=[],V={initializeByDefault:!0},Z={mount:function(t){for(var e in V)V.hasOwnProperty(e)&&!(e in t)&&(t[e]=V[e]);X.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),X.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var r=t+"Global";X.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][r]&&e[n.pluginName][r](c({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](c({sortable:e},i)))}))},initializePlugins:function(t,e,i){for(var n in X.forEach((function(n){var r=n.pluginName;if(t.options[r]||n.initializeByDefault){var o=new n(t,e,t.options);o.sortable=t,o.options=t.options,t[r]=o,l(i,o.defaults)}})),t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);void 0!==r&&(t.options[n]=r)}},getEventProperties:function(t,e){var i={};return X.forEach((function(n){"function"==typeof n.eventProperties&&l(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return X.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(n=r.optionListeners[e].call(t[r.pluginName],i))})),n}};function q(t){var e=t.sortable,i=t.rootEl,n=t.name,r=t.targetEl,o=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,u=t.newIndex,h=t.oldDraggableIndex,d=t.newDraggableIndex,f=t.originalEvent,b=t.putSortable,p=t.extraEventProperties;if(e=e||i&&i[Y]){var g,w=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||v||m?(g=document.createEvent("Event")).initEvent(n,!0,!0):g=new CustomEvent(n,{bubbles:!0,cancelable:!0}),g.to=a||i,g.from=s||i,g.item=r||i,g.clone=o,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=h,g.newDraggableIndex=d,g.originalEvent=f,g.pullMode=b?b.lastPutMode:void 0;var x=c(c({},p),Z.getEventProperties(n,e));for(var _ in x)g[_]=x[_];i&&i.dispatchEvent(g),w[y]&&w[y].call(e,g)}}var J=["evt"],Q=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,r=h(i,J);Z.pluginEvent.bind(Ut)(t,e,c({dragEl:et,parentEl:it,ghostEl:nt,rootEl:rt,nextEl:ot,lastDownEl:at,cloneEl:st,cloneHidden:lt,dragStarted:xt,putSortable:vt,activeSortable:Ut.active,originalEvent:n,oldIndex:ut,oldDraggableIndex:ht,newIndex:ct,newDraggableIndex:dt,hideGhostForTarget:Gt,unhideGhostForTarget:Ht,cloneNowHidden:function(){lt=!0},cloneNowShown:function(){lt=!1},dispatchSortableEvent:function(t){tt({sortable:e,name:t,originalEvent:n})}},r))};function tt(t){q(c({putSortable:vt,cloneEl:st,targetEl:et,rootEl:rt,oldIndex:ut,oldDraggableIndex:ht,newIndex:ct,newDraggableIndex:dt},t))}var et,it,nt,rt,ot,at,st,lt,ut,ct,ht,dt,ft,vt,mt,bt,pt,gt,wt,yt,xt,_t,Et,zt,kt,St=!1,It=!1,Dt=[],Tt=!1,Ct=!1,Mt=[],Ot=!1,At=[],jt="undefined"!=typeof document,Ft=g,$t=m||v?"cssFloat":"float",Bt=jt&&!w&&!g&&"draggable"in document.createElement("div"),Nt=function(){if(jt){if(v)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Lt=function(t,e){var i=T(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=F(t,0,e),o=F(t,1,e),a=r&&T(r),s=o&&T(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(r).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(o).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&a.float&&"none"!==a.float?!o||"both"!==s.clear&&s.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=n&&"none"===i[$t]||o&&"none"===i[$t]&&l+u>n)?"vertical":"horizontal"},Pt=function(t){function e(t,i){return function(n,r,o,a){if(null==t&&(i||n.options.group.name&&r.options.group.name&&n.options.group.name===r.options.group.name))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,r,o,a),i)(n,r,o,a);var s=(i?n:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var i={},n=t.group;n&&"object"==d(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},Gt=function(){!Nt&&nt&&T(nt,"display","none")},Ht=function(){!Nt&&nt&&T(nt,"display","")};jt&&!w&&document.addEventListener("click",(function(t){if(It)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),It=!1,!1}),!0);var Kt=function(t){if(et){var e=(r=(t=t.touches?t.touches[0]:t).clientX,o=t.clientY,Dt.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!$(t)){var i=A(t);return r>=i.left-e&&r<=i.right+e&&o>=i.top-e&&o<=i.bottom+e?a=t:void 0}})),a);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var r,o,a},Rt=function(t){et&&et.parentNode[Y]._isOutsideThisEl(t.target)};function Ut(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=l({},e),t[Y]=this;var i,n,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Lt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ut.supportPointer&&"PointerEvent"in window&&(!p||g),emptyInsertThreshold:5};for(var o in Z.initializePlugins(this,t,r),r)!(o in e)&&(e[o]=r[o]);for(var a in Pt(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Bt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?x(t,"pointerdown",this._onTapStart):(x(t,"mousedown",this._onTapStart),x(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(x(t,"dragover",this),x(t,"dragenter",this)),Dt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),l(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==T(t,"display")&&t!==Ut.ghost){n.push({target:t,rect:A(t)});var e=c({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=C(t,!0);i&&(e.top-=i.f,e.left-=i.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(i),void("function"==typeof t&&t());var r=!1,o=0;n.forEach((function(t){var i=0,n=t.target,a=n.fromRect,s=A(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,h=C(n,!0);h&&(s.top-=h.f,s.left-=h.e),n.toRect=s,n.thisAnimationDuration&&P(l,s)&&!P(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(i=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(c,l,u,e.options)),P(s,a)||(n.prevFromRect=a,n.prevToRect=s,i||(i=e.options.animation),e.animate(n,c,s,i)),i&&(r=!0,o=Math.max(o,i),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),i),n.thisAnimationDuration=i)})),clearTimeout(i),r?i=setTimeout((function(){"function"==typeof t&&t()}),o):"function"==typeof t&&t(),n=[]},animate:function(t,e,i,n){if(n){T(t,"transition",""),T(t,"transform","");var r=C(this.el),o=(e.left-i.left)/(r&&r.a||1),a=(e.top-i.top)/(r&&r.d||1);t.animatingX=!!o,t.animatingY=!!a,T(t,"transform","translate3d("+o+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),T(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),T(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){T(t,"transition",""),T(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Wt(t,e,i,n,r,o,a,s){var l,u,c=t[Y],h=c.options.onMove;return!window.CustomEvent||v||m?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=n,l.related=r||e,l.relatedRect=o||A(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(u=h.call(c,l,a)),u}function Yt(t){t.draggable=!1}function Xt(){Ot=!1}function Vt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Zt(t){return setTimeout(t,0)}function qt(t){return clearTimeout(t)}Ut.prototype={constructor:Ut,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(_t=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,et):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,r=n.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=n.filter;if(function(t){At.length=0;for(var e=t.getElementsByTagName("input"),i=e.length;i--;){var n=e[i];n.checked&&At.push(n)}}(i),!et&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!p||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=k(s,n.draggable,i,!1))&&s.animated||at===s)){if(ut=B(s),ht=B(s,n.draggable),"function"==typeof u){if(u.call(this,t,s,this))return tt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:i,fromEl:i}),Q("filter",e,{evt:t}),void(r&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(n){if(n=k(l,n.trim(),i,!1))return tt({sortable:e,rootEl:n,name:"filter",targetEl:s,fromEl:i,toEl:i}),Q("filter",e,{evt:t}),!0}))))return void(r&&t.preventDefault());n.handle&&!k(l,n.handle,i,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,i){var n,r=this,o=r.el,a=r.options,s=o.ownerDocument;if(i&&!et&&i.parentNode===o){var l=A(i);if(rt=o,it=(et=i).parentNode,ot=et.nextSibling,at=i,ft=a.group,Ut.dragged=et,wt=(mt={target:et,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-l.left,yt=mt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,et.style["will-change"]="all",n=function(){Q("delayEnded",r,{evt:t}),Ut.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!b&&r.nativeDraggable&&(et.draggable=!0),r._triggerDragStart(t,e),tt({sortable:r,name:"choose",originalEvent:t}),D(et,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){M(et,t.trim(),Yt)})),x(s,"dragover",Kt),x(s,"mousemove",Kt),x(s,"touchmove",Kt),a.supportPointer?(x(s,"pointerup",r._onDrop),!this.nativeDraggable&&x(s,"pointercancel",r._onDrop)):(x(s,"mouseup",r._onDrop),x(s,"touchend",r._onDrop),x(s,"touchcancel",r._onDrop)),b&&this.nativeDraggable&&(this.options.touchStartThreshold=4,et.draggable=!0),Q("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(m||v))n();else{if(Ut.eventCanceled)return void this._onDrop();a.supportPointer?(x(s,"pointerup",r._disableDelayedDrag),x(s,"pointercancel",r._disableDelayedDrag)):(x(s,"mouseup",r._disableDelayedDrag),x(s,"touchend",r._disableDelayedDrag),x(s,"touchcancel",r._disableDelayedDrag)),x(s,"mousemove",r._delayedDragTouchMoveHandler),x(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&x(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){et&&Yt(et),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._disableDelayedDrag),_(t,"touchend",this._disableDelayedDrag),_(t,"touchcancel",this._disableDelayedDrag),_(t,"pointerup",this._disableDelayedDrag),_(t,"pointercancel",this._disableDelayedDrag),_(t,"mousemove",this._delayedDragTouchMoveHandler),_(t,"touchmove",this._delayedDragTouchMoveHandler),_(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?x(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(x(et,"dragend",this),x(rt,"dragstart",this._onDragStart));try{document.selection?Zt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(St=!1,rt&&et){Q("dragStarted",this,{evt:e}),this.nativeDraggable&&x(document,"dragover",Rt);var i=this.options;!t&&D(et,i.dragClass,!1),D(et,i.ghostClass,!0),Ut.active=this,t&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(bt){this._lastX=bt.clientX,this._lastY=bt.clientY,Gt();for(var t=document.elementFromPoint(bt.clientX,bt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(bt.clientX,bt.clientY))!==e;)e=t;if(et.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]&&e[Y]._onDragOver({clientX:bt.clientX,clientY:bt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=z(e));Ht()}},_onTouchMove:function(t){if(mt){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=nt&&C(nt,!0),a=nt&&o&&o.a,s=nt&&o&&o.d,l=Ft&&kt&&N(kt),u=(r.clientX-mt.clientX+n.x)/(a||1)+(l?l[0]-Mt[0]:0)/(a||1),c=(r.clientY-mt.clientY+n.y)/(s||1)+(l?l[1]-Mt[1]:0)/(s||1);if(!Ut.active&&!St){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(nt){o?(o.e+=u-(pt||0),o.f+=c-(gt||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");T(nt,"webkitTransform",h),T(nt,"mozTransform",h),T(nt,"msTransform",h),T(nt,"transform",h),pt=u,gt=c,bt=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!nt){var t=this.options.fallbackOnBody?document.body:rt,e=A(et,!0,Ft,!0,t),i=this.options;if(Ft){for(kt=t;"static"===T(kt,"position")&&"none"===T(kt,"transform")&&kt!==document;)kt=kt.parentNode;kt!==document.body&&kt!==document.documentElement?(kt===document&&(kt=O()),e.top+=kt.scrollTop,e.left+=kt.scrollLeft):kt=O(),Mt=N(kt)}D(nt=et.cloneNode(!0),i.ghostClass,!1),D(nt,i.fallbackClass,!0),D(nt,i.dragClass,!0),T(nt,"transition",""),T(nt,"transform",""),T(nt,"box-sizing","border-box"),T(nt,"margin",0),T(nt,"top",e.top),T(nt,"left",e.left),T(nt,"width",e.width),T(nt,"height",e.height),T(nt,"opacity","0.8"),T(nt,"position",Ft?"absolute":"fixed"),T(nt,"zIndex","100000"),T(nt,"pointerEvents","none"),Ut.ghost=nt,t.appendChild(nt),T(nt,"transform-origin",wt/parseInt(nt.style.width)*100+"% "+yt/parseInt(nt.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,r=i.options;Q("dragStart",this,{evt:t}),Ut.eventCanceled?this._onDrop():(Q("setupClone",this),Ut.eventCanceled||((st=K(et)).removeAttribute("id"),st.draggable=!1,st.style["will-change"]="",this._hideClone(),D(st,this.options.chosenClass,!1),Ut.clone=st),i.cloneId=Zt((function(){Q("clone",i),Ut.eventCanceled||(i.options.removeCloneOnHide||rt.insertBefore(st,et),i._hideClone(),tt({sortable:i,name:"clone"}))})),!e&&D(et,r.dragClass,!0),e?(It=!0,i._loopId=setInterval(i._emulateDragOver,50)):(_(document,"mouseup",i._onDrop),_(document,"touchend",i._onDrop),_(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(i,n,et)),x(document,"drop",i),T(et,"transform","translateZ(0)")),St=!0,i._dragStartId=Zt(i._dragStarted.bind(i,e,t)),x(document,"selectstart",i),xt=!0,window.getSelection().removeAllRanges(),p&&T(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,r,o=this.el,a=t.target,s=this.options,l=s.group,u=Ut.active,h=ft===l,d=s.sort,f=vt||u,v=this,m=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=k(a,s.draggable,o,!0),N("dragOver"),Ut.eventCanceled)return m;if(et.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||v._ignoreWhileAnimating===a)return P(!1);if(It=!1,u&&!s.disabled&&(h?d||(n=it!==rt):vt===this||(this.lastPutMode=ft.checkPull(this,u,et,t))&&l.checkPut(this,u,et,t))){if(r="vertical"===this._getDirection(t,a),e=A(et),N("dragOverValid"),Ut.eventCanceled)return m;if(n)return it=rt,L(),this._hideClone(),N("revert"),Ut.eventCanceled||(ot?rt.insertBefore(et,ot):rt.appendChild(et)),P(!0);var b=$(o,s.draggable);if(!b||function(t,e,i){var n=A($(i.el,i.options.draggable)),r=W(i.el,i.options,nt);return e?t.clientX>r.right+10||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>r.bottom+10||t.clientX>n.right&&t.clientY>n.top}(t,r,this)&&!b.animated){if(b===et)return P(!1);if(b&&o===t.target&&(a=b),a&&(i=A(a)),!1!==Wt(rt,o,et,e,a,i,t,!!a))return L(),b&&b.nextSibling?o.insertBefore(et,b.nextSibling):o.appendChild(et),it=o,G(),P(!0)}else if(b&&function(t,e,i){var n=A(F(i.el,0,i.options,!0)),r=W(i.el,i.options,nt);return e?t.clientX<r.left-10||t.clientY<n.top&&t.clientX<n.right:t.clientY<r.top-10||t.clientY<n.bottom&&t.clientX<n.left}(t,r,this)){var p=F(o,0,s,!0);if(p===et)return P(!1);if(i=A(a=p),!1!==Wt(rt,o,et,e,a,i,t,!1))return L(),o.insertBefore(et,p),it=o,G(),P(!0)}else if(a.parentNode===o){i=A(a);var g,w,y,x=et.parentNode!==o,_=!function(t,e,i){var n=i?t.left:t.top,r=i?e.left:e.top;return n===r||(i?t.right:t.bottom)===(i?e.right:e.bottom)||n+(i?t.width:t.height)/2===r+(i?e.width:e.height)/2}(et.animated&&et.toRect||e,a.animated&&a.toRect||i,r),E=r?"top":"left",z=j(a,"top","top")||j(et,"top","top"),S=z?z.scrollTop:void 0;if(_t!==a&&(w=i[E],Tt=!1,Ct=!_&&s.invertSwap||x),g=function(t,e,i,n,r,o,a,s){var l=n?t.clientY:t.clientX,u=n?i.height:i.width,c=n?i.top:i.left,h=n?i.bottom:i.right,d=!1;if(!a)if(s&&zt<u*r){if(!Tt&&(1===Et?l>c+u*o/2:l<h-u*o/2)&&(Tt=!0),Tt)d=!0;else if(1===Et?l<c+zt:l>h-zt)return-Et}else if(l>c+u*(1-r)/2&&l<h-u*(1-r)/2)return function(t){return B(et)<B(t)?1:-1}(e);return(d=d||a)&&(l<c+u*o/2||l>h-u*o/2)?l>c+u/2?1:-1:0}(t,a,i,r,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ct,_t===a),0!==g){var I=B(et);do{y=it.children[I-=g]}while(y&&("none"===T(y,"display")||y===nt))}if(0===g||y===a)return P(!1);_t=a,Et=g;var C=a.nextElementSibling,M=!1,O=Wt(rt,o,et,e,a,i,t,M=1===g);if(!1!==O)return 1!==O&&-1!==O||(M=1===O),Ot=!0,setTimeout(Xt,30),L(),M&&!C?o.appendChild(et):a.parentNode.insertBefore(et,M?C:a),z&&H(z,0,S-z.scrollTop),it=et.parentNode,void 0===w||Ct||(zt=Math.abs(w-A(a)[E])),G(),P(!0)}if(o.contains(et))return P(!1)}return!1}function N(s,l){Q(s,v,c({evt:t,isOwner:h,axis:r?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:d,fromSortable:f,target:a,completed:P,onMove:function(i,n){return Wt(rt,o,et,e,i,A(i),t,n)},changed:G},l))}function L(){N("dragOverAnimationCapture"),v.captureAnimationState(),v!==f&&f.captureAnimationState()}function P(e){return N("dragOverCompleted",{insertion:e}),e&&(h?u._hideClone():u._showClone(v),v!==f&&(D(et,vt?vt.options.ghostClass:u.options.ghostClass,!1),D(et,s.ghostClass,!0)),vt!==v&&v!==Ut.active?vt=v:v===Ut.active&&vt&&(vt=null),f===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){N("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===et&&!et.animated||a===o&&!a.animated)&&(_t=null),s.dragoverBubble||t.rootEl||a===document||(et.parentNode[Y]._isOutsideThisEl(t.target),!e&&Kt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function G(){ct=B(et),dt=B(et,s.draggable),tt({sortable:v,name:"change",toEl:o,newIndex:ct,newDraggableIndex:dt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",Kt),_(document,"mousemove",Kt),_(document,"touchmove",Kt)},_offUpEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._onDrop),_(t,"touchend",this._onDrop),_(t,"pointerup",this._onDrop),_(t,"pointercancel",this._onDrop),_(t,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;ct=B(et),dt=B(et,i.draggable),Q("drop",this,{evt:t}),it=et&&et.parentNode,ct=B(et),dt=B(et,i.draggable),Ut.eventCanceled||(St=!1,Ct=!1,Tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qt(this.cloneId),qt(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&T(document.body,"user-select",""),T(et,"transform",""),t&&(xt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),nt&&nt.parentNode&&nt.parentNode.removeChild(nt),(rt===it||vt&&"clone"!==vt.lastPutMode)&&st&&st.parentNode&&st.parentNode.removeChild(st),et&&(this.nativeDraggable&&_(et,"dragend",this),Yt(et),et.style["will-change"]="",xt&&!St&&D(et,vt?vt.options.ghostClass:this.options.ghostClass,!1),D(et,this.options.chosenClass,!1),tt({sortable:this,name:"unchoose",toEl:it,newIndex:null,newDraggableIndex:null,originalEvent:t}),rt!==it?(ct>=0&&(tt({rootEl:it,name:"add",toEl:it,fromEl:rt,originalEvent:t}),tt({sortable:this,name:"remove",toEl:it,originalEvent:t}),tt({rootEl:it,name:"sort",toEl:it,fromEl:rt,originalEvent:t}),tt({sortable:this,name:"sort",toEl:it,originalEvent:t})),vt&&vt.save()):ct!==ut&&ct>=0&&(tt({sortable:this,name:"update",toEl:it,originalEvent:t}),tt({sortable:this,name:"sort",toEl:it,originalEvent:t})),Ut.active&&(null!=ct&&-1!==ct||(ct=ut,dt=ht),tt({sortable:this,name:"end",toEl:it,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Q("nulling",this),rt=et=it=nt=ot=st=at=lt=mt=bt=xt=ct=dt=ut=ht=_t=Et=vt=ft=Ut.dragged=Ut.ghost=Ut.clone=Ut.active=null;var t=this.el;At.forEach((function(e){t.contains(e)&&(e.checked=!0)})),At.length=pt=gt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":et&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,r=i.length,o=this.options;n<r;n++)k(t=i[n],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Vt(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var r=n.children[e];k(r,this.options.draggable,n,!1)&&(i[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return k(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=Z.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&Pt(i)},destroy:function(){Q("destroy",this);var t=this.el;t[Y]=null,_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart),_(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Dt.splice(Dt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!lt){if(Q("hideClone",this),Ut.eventCanceled)return;T(st,"display","none"),this.options.removeCloneOnHide&&st.parentNode&&st.parentNode.removeChild(st),lt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(lt){if(Q("showClone",this),Ut.eventCanceled)return;et.parentNode!=rt||this.options.group.revertClone?ot?rt.insertBefore(st,ot):rt.appendChild(st):rt.insertBefore(st,et),this.options.group.revertClone&&this.animate(et,st),T(st,"display",""),lt=!1}}else this._hideClone()}},jt&&x(document,"touchmove",(function(t){(Ut.active||St)&&t.cancelable&&t.preventDefault()})),Ut.utils={on:x,off:_,css:T,find:M,is:function(t,e){return!!k(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:G,closest:k,toggleClass:D,clone:K,index:B,nextTick:Zt,cancelNextTick:qt,detectDirection:Lt,getChild:F,expando:Y},Ut.get=function(t){return t[Y]},Ut.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ut.utils=c(c({},Ut.utils),t.utils)),Z.mount(t)}))},Ut.create=function(t,e){return new Ut(t,e)},Ut.version="1.15.7";var Jt,Qt,te,ee,ie,ne,re=[],oe=!1;function ae(){re.forEach((function(t){clearInterval(t.pid)})),re=[]}function se(){clearInterval(ne)}var le=G((function(t,e,i,n){if(e.scroll){var r,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=O(),c=!1;Qt!==i&&(Qt=i,ae(),r=e.scrollFn,!0===(Jt=e.scroll)&&(Jt=L(i,!0)));var h=0,d=Jt;do{var f=d,v=A(f),m=v.top,b=v.bottom,p=v.left,g=v.right,w=v.width,y=v.height,x=void 0,_=void 0,E=f.scrollWidth,z=f.scrollHeight,k=T(f),S=f.scrollLeft,I=f.scrollTop;f===u?(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY));var D=x&&(Math.abs(g-o)<=s&&S+w<E)-(Math.abs(p-o)<=s&&!!S),C=_&&(Math.abs(b-a)<=s&&I+y<z)-(Math.abs(m-a)<=s&&!!I);if(!re[h])for(var M=0;M<=h;M++)re[M]||(re[M]={});re[h].vx==D&&re[h].vy==C&&re[h].el===f||(re[h].el=f,re[h].vx=D,re[h].vy=C,clearInterval(re[h].pid),0==D&&0==C||(c=!0,re[h].pid=setInterval(function(){n&&0===this.layer&&Ut.active._onTouchMove(ie);var e=re[this.layer].vy?re[this.layer].vy*l:0,i=re[this.layer].vx?re[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(Ut.dragged.parentNode[Y],i,e,t,ie,re[this.layer].el)||H(re[this.layer].el,i,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&d!==u&&(d=L(d,!1)));oe=c}}),30),ue=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,r=t.dispatchSortableEvent,o=t.unhideGhostForTarget;if(e){var a=i||t.activeSortable;(0,t.hideGhostForTarget)();var s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,l=document.elementFromPoint(s.clientX,s.clientY);o(),a&&!a.el.contains(l)&&(r("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function ce(){}function he(){}ce.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=F(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:ue},l(ce,{pluginName:"revertOnSpill"}),he.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:ue},l(he,{pluginName:"removeOnSpill"});var de,fe,ve,me,be,pe=[],ge=[],we=!1,ye=!1,xe=!1;function _e(t,e){ge.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}function Ee(){pe.forEach((function(t){t!==ve&&t.parentNode&&t.parentNode.removeChild(t)}))}Ut.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?x(document,"dragover",this._handleAutoScroll):x(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),se(),ae(),clearTimeout(S),S=void 0},nulling:function(){ie=Qt=Jt=oe=ne=te=ee=null,re.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(n,r);if(ie=t,e||this.options.forceAutoScrollFallback||m||v||p){le(t,this.options,o,e);var a=L(o,!0);!oe||ne&&n===te&&r===ee||(ne&&se(),ne=setInterval((function(){var o=L(document.elementFromPoint(n,r),!0);o!==a&&(a=o,ae()),le(t,i.options,o,e)}),10),te=n,ee=r)}else{if(!this.options.bubbleScroll||L(o,!0)===O())return void ae();le(t,this.options,L(o,!1),!1)}}},l(t,{pluginName:"scroll",initializeByDefault:!0})}),Ut.mount(he,ce),Ut.mount(new function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?x(document,"pointerup",this._deselectMultiDrag):(x(document,"mouseup",this._deselectMultiDrag),x(document,"touchend",this._deselectMultiDrag))),x(document,"keydown",this._checkKeyDown),x(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,i){var n="";pe.length&&fe===t?pe.forEach((function(t,e){n+=(e?", ":"")+t.textContent})):n=i.textContent,e.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){ve=t.dragEl},delayEnded:function(){this.isMultiDrag=~pe.indexOf(ve)},setupClone:function(t){var e=t.sortable,i=t.cancel;if(this.isMultiDrag){for(var n=0;n<pe.length;n++)ge.push(K(pe[n])),ge[n].sortableIndex=pe[n].sortableIndex,ge[n].draggable=!1,ge[n].style["will-change"]="",D(ge[n],this.options.selectedClass,!1),pe[n]===ve&&D(ge[n],this.options.chosenClass,!1);e._hideClone(),i()}},clone:function(t){var e=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pe.length&&fe===t.sortable&&(_e(!0,t.rootEl),e("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,i=t.cancel;this.isMultiDrag&&(_e(!1,t.rootEl),ge.forEach((function(t){T(t,"display","")})),e(),be=!1,i())},hideClone:function(t){var e=this,i=t.cloneNowHidden,n=t.cancel;this.isMultiDrag&&(ge.forEach((function(t){T(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),i(),be=!0,n())},dragStartGlobal:function(){!this.isMultiDrag&&fe&&fe.multiDrag._deselectMultiDrag(),pe.forEach((function(t){t.sortableIndex=B(t)})),pe=pe.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),xe=!0},dragStarted:function(t){var e=this,i=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){pe.forEach((function(t){t!==ve&&T(t,"position","absolute")}));var n=A(ve,!1,!0,!0);pe.forEach((function(t){t!==ve&&R(t,n)})),ye=!0,we=!0}i.animateAll((function(){ye=!1,we=!1,e.options.animation&&pe.forEach((function(t){U(t)})),e.options.sort&&Ee()}))}},dragOver:function(t){var e=t.completed,i=t.cancel;ye&&~pe.indexOf(t.target)&&(e(!1),i())},revert:function(t){var e=t.fromSortable,i=t.rootEl,n=t.sortable,r=t.dragRect;pe.length>1&&(pe.forEach((function(t){n.addAnimationState({target:t,rect:ye?A(t):r}),U(t),t.fromRect=r,e.removeAnimationState(t)})),ye=!1,function(t,e){pe.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var e=t.sortable,i=t.isOwner,n=t.activeSortable,r=t.parentEl,o=t.putSortable,a=this.options;if(t.insertion){if(i&&n._hideClone(),we=!1,a.animation&&pe.length>1&&(ye||!i&&!n.options.sort&&!o)){var s=A(ve,!1,!0,!0);pe.forEach((function(t){t!==ve&&(R(t,s),r.appendChild(t))})),ye=!0}if(!i)if(ye||Ee(),pe.length>1){var l=be;n._showClone(e),n.options.animation&&!be&&l&&ge.forEach((function(t){n.addAnimationState({target:t,rect:me}),t.fromRect=me,t.thisAnimationDuration=null}))}else n._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner,n=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){me=l({},e);var r=C(ve,!0);me.top-=r.f,me.left-=r.e}},dragOverAnimationComplete:function(){ye&&(ye=!1,Ee())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,r=t.sortable,o=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var u=this.options,c=n.children;if(!xe)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),D(ve,u.selectedClass,!~pe.indexOf(ve)),~pe.indexOf(ve))pe.splice(pe.indexOf(ve),1),de=null,q({sortable:r,rootEl:i,name:"deselect",targetEl:ve,originalEvent:e});else{if(pe.push(ve),q({sortable:r,rootEl:i,name:"select",targetEl:ve,originalEvent:e}),e.shiftKey&&de&&r.el.contains(de)){var h=B(de),d=B(ve);~h&&~d&&h!==d&&function(){var t,o;d>h?(o=h,t=d):(o=d,t=h+1);for(var a=u.filter;o<t;o++)~pe.indexOf(c[o])||k(c[o],u.draggable,n,!1)&&(a&&("function"==typeof a?a.call(r,e,c[o],r):a.split(",").some((function(t){return k(c[o],t.trim(),n,!1)})))||(D(c[o],u.selectedClass,!0),pe.push(c[o]),q({sortable:r,rootEl:i,name:"select",targetEl:c[o],originalEvent:e})))}()}else de=ve;fe=l}if(xe&&this.isMultiDrag){if(ye=!1,(n[Y].options.sort||n!==i)&&pe.length>1){var f=A(ve),v=B(ve,":not(."+this.options.selectedClass+")");if(!we&&u.animation&&(ve.thisAnimationDuration=null),l.captureAnimationState(),!we&&(u.animation&&(ve.fromRect=f,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==ve){var e=ye?A(t):f;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),Ee(),pe.forEach((function(t){c[v]?n.insertBefore(t,c[v]):n.appendChild(t),v++})),a===B(ve))){var m=!1;pe.forEach((function(t){t.sortableIndex===B(t)||(m=!0)})),m&&(o("update"),o("sort"))}pe.forEach((function(t){U(t)})),l.animateAll()}fe=l}(i===n||s&&"clone"!==s.lastPutMode)&&ge.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=xe=!1,ge.length=0},destroyGlobal:function(){this._deselectMultiDrag(),_(document,"pointerup",this._deselectMultiDrag),_(document,"mouseup",this._deselectMultiDrag),_(document,"touchend",this._deselectMultiDrag),_(document,"keydown",this._checkKeyDown),_(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==xe&&xe||fe!==this.sortable||t&&k(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];D(e,this.options.selectedClass,!1),pe.shift(),q({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Y];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(fe&&fe!==e&&(fe.multiDrag._deselectMultiDrag(),fe=e),D(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[Y],i=pe.indexOf(t);e&&e.options.multiDrag&&~i&&(D(t,e.options.selectedClass,!1),pe.splice(i,1))}},eventProperties:function(){var t,e=this,i=[],n=[];return pe.forEach((function(t){var r;i.push({multiDragElement:t,index:t.sortableIndex}),r=ye&&t!==ve?-1:ye?B(t,":not(."+e.options.selectedClass+")"):B(t),n.push({multiDragElement:t,index:r})})),{items:(t=pe,function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(ge),oldIndicies:i,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})});const ze=class{constructor(i){t(this,i),this.itemsReordered=e(this,"itemsReordered",7),this.ezSelectItens=e(this,"ezSelectItens",7),this.ezDoubleClick=e(this,"ezDoubleClick",7),this.ezChoose=e(this,"ezChoose",7),this.filterTerm="",this.title=void 0,this.hideHeader=!1,this.hideTotalizer=!1,this.group="default",this.dataSource=[],this.idSortableList="DEFAULT_LIST",this.entityLabel=void 0,this.entityLabelPlural=void 0,this.emptyMessage=void 0,this.hoverFeedback=!0,this.enableMultipleSelection=!1,this.removeItensMoved=!1,this.itemRightSlotBuilder=void 0,this.itemLeftSlotBuilder=void 0,this.selectedItems=new Set}async clearSelection(){this.selectedItems.clear(),this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(Ut.utils.deselect(i),t.selected=!1)})),this.ezSelectItens.emit([])}async componentWillLoad(){this.i18n=await o(),this.emptyMessage=this.i18n("ez-sortable-list.emptyMessage"),this.entityLabel=this.i18n("ez-sortable-list.entityLabel"),this.entityLabelPlural=this.i18n("ez-sortable-list.entityLabelPlural")}componentDidLoad(){this.initSortable()}componentDidRender(){this.selectPredefinedItens()}initSortable(){this._sortableInstance&&this._sortableInstance.destroy(),this._sortableInstance=new Ut(this.el.shadowRoot.querySelector(`#${this.idSortableList}`),{group:{name:this.group,pull:!0,put:!0},ghostClass:"ghost",dragClass:"dragging",animation:15,multiDrag:this.enableMultipleSelection,avoidImplicitDeselect:this.enableMultipleSelection,selectedClass:"selected",filter:".filtered",swapThreshold:.5,multiDragKey:"Control",removeCloneOnHide:!0,onEnd:t=>this.handleReorderEvent(t),onSelect:t=>this.handleSelect(t),onDeselect:t=>this.handleDeselect(t),onSort:t=>this.handleSortItem(t),onChoose:t=>this.ezChoose.emit(t)})}selectPredefinedItens(){this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(this.selectedItems.has(t.id)||!0===t.selected?Ut.utils.select(i):Ut.utils.deselect(i))}))}handleSortItem(t){var e;if(!this.removeItensMoved)return;const i=t.from.getAttribute("id");t.to.getAttribute("id")!==i?((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).forEach((t=>t.remove())):t.items=this.removeDuplicateElements(t.items)}removeDuplicateElements(t){const e=new Set;return t.filter((t=>{const i=t.getAttribute("data-key");if(i){if(e.has(i))return t.remove(),!1;e.add(i)}return!0}))}handleSelect(t){this.updateSelection(t.item,!0)}handleDeselect(t){this.updateSelection(t.item,!1)}updateSelection(t,e){const i=t.getAttribute("data-key");if(!i)return;const n=this.dataSource.find((t=>t.id===i));n&&(n.selected=e,e?this.selectedItems.add(i):this.selectedItems.delete(i),this.emitSelectedItems())}emitSelectedItems(){this.ezSelectItens.emit(Array.from(this.selectedItems).map((t=>this.dataSource.find((e=>e.id===t)))).filter(Boolean))}handleReorderEvent(t){var e;const i=((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).map((t=>t.getAttribute("data-key"))).filter(Boolean);this.itemsReordered.emit({dataSource:this.dataSource,selectItens:i,from:t.from,to:t.to,newIndex:t.newIndex,newIndicies:t.newIndicies})}handleDoubleClick(t){var e;const i=this.dataSource.find((e=>e.id===t));i&&(null===(e=this.ezDoubleClick)||void 0===e||e.emit(i))}getContainerItemBuilder(t,e,n){var r,o;const a="left"===t?null===(r=this.itemLeftSlotBuilder)||void 0===r?void 0:r.call(this,e):null===(o=this.itemRightSlotBuilder)||void 0===o?void 0:o.call(this,e);if(null!=a)return"string"!=typeof a?i("div",{class:n},a):i("div",{class:n,innerHTML:a})}disconnectedCallback(){this._sortableInstance&&(this._sortableInstance.destroy(),this._sortableInstance=null)}buildTotalizer(){return`${this.i18n("ez-sortable-list.total")} ${this.dataSource.length} ${1===this.dataSource.length?this.entityLabel:this.entityLabelPlural}`}renderItems(){return r.applyStringFilter(this.filterTerm,this.dataSource).map((t=>i("div",{id:`ID_${t.id}`,key:`KEY_${t.id}`,class:{"sortable-item":!0,"hover-feedback":this.hoverFeedback},"data-key":t.id,onDblClick:()=>this.handleDoubleClick(t.id)},!!this.itemLeftSlotBuilder&&this.getContainerItemBuilder("left",t),i("div",{class:"item-content"},i("span",{class:"draggable-icon"}),t.label),!!this.itemRightSlotBuilder&&this.getContainerItemBuilder("right",t))))}handleFilterChanged(t){t.stopPropagation(),t.preventDefault(),this.filterTerm=t.detail}renderTotalizer(){if(!this.hideTotalizer)return i("div",{class:"sortable-totalizer"},this.buildTotalizer())}renderHeader(){if(!this.hideHeader)return i("div",{class:"sortable-header"},i("span",{class:"sortable-label"},this.title),i("ez-filter-input",{label:`${this.i18n("ez-sortable-list.search")} ${this.entityLabel}`,mode:"slim",onEzChange:t=>this.handleFilterChanged(t)}))}render(){return i("div",{class:"sortable-content"},this.renderHeader(),i("div",{class:`sortable-list ${this.dataSource.length<1?"empty-content":""} list-scroller--fix`,"data-content":this.emptyMessage,style:{"--empty-content":`"${this.emptyMessage}"`},id:this.idSortableList,key:this.idSortableList},this.renderItems()),this.renderTotalizer())}get el(){return n(this)}};ze.style=':host{--ez-sortable-list__host--z-index:var(--visible, 1);--ez-sortable-list__host--border-radius:var(--border--radius-medium, 12px);--ez-sortable-list__host--padding:var(--space--medium, 12px);--ez-sortable-list__item--margin:0 var(--space--small, 6px);--ez-sortable-list__item--padding:var(--space--3xs, 6px);--ez-sortable-list__item--color:var(--title--primary, #2b3a54);--ez-sortable-list__item--font-family:var(--font-pattern, "Roboto");--ez-sortable-list__item--font-size:var(--text--medium, 14px);--ez-sortable-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-sortable-list__selectable--padding-right:var(--space--small, 6px);--ez-sortable-list__selectable--padding-left:var(--space--small, 6px);--ez-sortable-list__icon--color:#AFB6C0;--ez-sortable-list__draggable-icon--image:url(\'data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z"/></svg>\');--ez-sortable-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-sortable-list--color-background:var(--scrollbar--background, #E5EAF0);--ez-sortable-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-sortable-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-sortable-list--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__scrollbar--width:var(--space--small, 6px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-sortable-list__host--z-index)}.sortable-item{display:flex;justify-content:space-between;font-family:var(--ez-sortable-list__item--font-family);font-size:var(--ez-sortable-list__item--font-size);padding:var(--ez-sortable-list__item--padding) 0px;margin:var(--ez-sortable-list__item--margin)}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.sortable-item.dragging{background:#FFFFFF;border:1px solid #008561;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.sortable-list{padding:0;margin:0;width:100%;height:100%;max-height:100%;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;color:var(--text-color);scrollbar-color:var(--ez-sortable-list__scrollbar--color-clicked) var(--ez-sortable-list--color-background)}.sortable-list.empty-content::after{content:attr(data-content);display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.list-scroller--fix{scrollbar-width:thin}.list-scroller--hover{scrollbar-width:none}.item-content{display:flex;flex-grow:1;flex-direction:row}.empty-message{font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--secondary);margin:auto}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:\'\';display:flex;width:18px;height:18px;background-color:var(--ez-sortable-list__icon--color);-webkit-mask-image:var(--ez-sortable-list__draggable-icon--image);mask-image:var(--ez-sortable-list__draggable-icon--image)}.selectable{cursor:pointer;padding-right:var(--ez-sortable-list__selectable--padding-right);padding-left:var(--ez-sortable-list__selectable--padding-left)}.selected{background:var(--ez-sortable-list__selected-item--background-color);border-radius:var(--ez-sortable-list__selected-item--border-radius)}.list-fix::-webkit-scrollbar-thumb{background-color:var(--ez-sortable-list__scrollbar--color-default);border-radius:var(--ez-sortable-list--border-radius)}.list-fix::-webkit-scrollbar-thumb:active{background-color:var(--ez-sortable-list__scrollbar--color-clicked)}.list-fix::-webkit-scrollbar{width:var(--ez-sortable-list__scrollbar--width);display:none}.list-hover::-webkit-scrollbar-thumb:hover{background-color:var(--ez-sortable-list__scrollbar--color-hover)}.list-hover:hover{scrollbar-width:thin}.list-hover:hover::-webkit-scrollbar{display:block}.ghost{opacity:.5;background:#589f7b}.sortable-content{display:flex;justify-content:space-between;gap:10px;flex-direction:column;border:var(--border--small) var(--color--strokes);border-radius:var(--border--radius-medium);width:100%;height:400px;min-width:40%}@media (max-height: 630px){.sortable-content{height:290px}}.sortable-header{background:var(--background--body);padding:10px;border-radius:var(--border--radius-medium) var(--border--radius-medium) 0 0}.sortable-label{font-weight:var(--text-weight--large);font-size:var(--text--medium);color:var(--title--primary);margin-bottom:10px;display:block}.sortable-totalizer{padding:5px 10px;background:var(--background--body);font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--primary);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium)}';export{ze as ez_sortable_list}
|
|
7
|
+
*/function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function s(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(){return l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},l.apply(null,arguments)}function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?u(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function h(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;i[n]=t[n]}return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)-1===e.indexOf(i=o[n])&&{}.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function f(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var v=f(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),m=f(/Edge/i),b=f(/firefox/i),p=f(/safari/i)&&!f(/chrome/i)&&!f(/android/i),g=f(/iP(ad|od|hone)/i),w=f(/chrome/i)&&f(/android/i),y={capture:!1,passive:!1};function x(t,e,i){t.addEventListener(e,i,!v&&y)}function _(t,e,i){t.removeEventListener(e,i,!v&&y)}function E(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function z(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function k(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&E(t,e):E(t,e))||n&&t===i)return t;if(t===i)break}while(t=z(t))}return null}var S,I=/\s+/g;function D(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(I," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(I," ")}}function T(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function C(t,e){var i="";if("string"==typeof t)i=t;else do{var n=T(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(i)}function M(t,e,i){if(t){var n=t.getElementsByTagName(e),r=0,o=n.length;if(i)for(;r<o;r++)i(n[r],r);return n}return[]}function O(){return document.scrollingElement||document.documentElement}function A(t,e,i,n,r){if(t.getBoundingClientRect||t===window){var o,a,s,l,u,c,h;if(t!==window&&t.parentNode&&t!==O()?(a=(o=t.getBoundingClientRect()).top,s=o.left,l=o.bottom,u=o.right,c=o.height,h=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(e||i)&&t!==window&&(r=r||t.parentNode,!v))do{if(r&&r.getBoundingClientRect&&("none"!==T(r,"transform")||i&&"static"!==T(r,"position"))){var d=r.getBoundingClientRect();a-=d.top+parseInt(T(r,"border-top-width")),s-=d.left+parseInt(T(r,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(r=r.parentNode);if(n&&t!==window){var f=C(r||t),m=f&&f.a,b=f&&f.d;f&&(l=(a/=b)+(c/=b),u=(s/=m)+(h/=m))}return{top:a,left:s,bottom:l,right:u,width:h,height:c}}}function j(t,e,i){for(var n=L(t,!0),r=A(t)[e];n;){var o=A(n)[i];if(!("top"===i||"left"===i?r>=o:r<=o))return n;if(n===O())break;n=L(n,!1)}return!1}function F(t,e,i,n){for(var r=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Ut.ghost&&(n||a[o]!==Ut.dragged)&&k(a[o],i.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function $(t,e){for(var i=t.lastElementChild;i&&(i===Ut.ghost||"none"===T(i,"display")||e&&!E(i,e));)i=i.previousElementSibling;return i||null}function B(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ut.clone||e&&!E(t,e)||i++;return i}function N(t){var e=0,i=0,n=O();if(t)do{var r=C(t);e+=t.scrollLeft*r.a,i+=t.scrollTop*r.d}while(t!==n&&(t=t.parentNode));return[e,i]}function L(t,e){if(!t||!t.getBoundingClientRect)return O();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var r=T(i);if(i.clientWidth<i.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!i.getBoundingClientRect||i===document.body)return O();if(n||e)return i;n=!0}}}while(i=i.parentNode);return O()}function P(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function G(t,e){return function(){if(!S){var i=arguments,n=this;1===i.length?t.call(n,i[0]):t.apply(n,i),S=setTimeout((function(){S=void 0}),e)}}}function H(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function K(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function R(t,e){T(t,"position","absolute"),T(t,"top",e.top),T(t,"left",e.left),T(t,"width",e.width),T(t,"height",e.height)}function U(t){T(t,"position",""),T(t,"top",""),T(t,"left",""),T(t,"width",""),T(t,"height","")}function W(t,e,i){var n={};return Array.from(t.children).forEach((function(r){var o,a,s,l;if(k(r,e.draggable,t,!1)&&!r.animated&&r!==i){var u=A(r);n.left=Math.min(null!==(o=n.left)&&void 0!==o?o:1/0,u.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,u.top),n.right=Math.max(null!==(s=n.right)&&void 0!==s?s:-1/0,u.right),n.bottom=Math.max(null!==(l=n.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Y="Sortable"+(new Date).getTime();var X=[],V={initializeByDefault:!0},Z={mount:function(t){for(var e in V)V.hasOwnProperty(e)&&!(e in t)&&(t[e]=V[e]);X.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),X.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var r=t+"Global";X.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][r]&&e[n.pluginName][r](c({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](c({sortable:e},i)))}))},initializePlugins:function(t,e,i){for(var n in X.forEach((function(n){var r=n.pluginName;if(t.options[r]||n.initializeByDefault){var o=new n(t,e,t.options);o.sortable=t,o.options=t.options,t[r]=o,l(i,o.defaults)}})),t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);void 0!==r&&(t.options[n]=r)}},getEventProperties:function(t,e){var i={};return X.forEach((function(n){"function"==typeof n.eventProperties&&l(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return X.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(n=r.optionListeners[e].call(t[r.pluginName],i))})),n}};function q(t){var e=t.sortable,i=t.rootEl,n=t.name,r=t.targetEl,o=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,u=t.newIndex,h=t.oldDraggableIndex,d=t.newDraggableIndex,f=t.originalEvent,b=t.putSortable,p=t.extraEventProperties;if(e=e||i&&i[Y]){var g,w=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||v||m?(g=document.createEvent("Event")).initEvent(n,!0,!0):g=new CustomEvent(n,{bubbles:!0,cancelable:!0}),g.to=a||i,g.from=s||i,g.item=r||i,g.clone=o,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=h,g.newDraggableIndex=d,g.originalEvent=f,g.pullMode=b?b.lastPutMode:void 0;var x=c(c({},p),Z.getEventProperties(n,e));for(var _ in x)g[_]=x[_];i&&i.dispatchEvent(g),w[y]&&w[y].call(e,g)}}var J=["evt"],Q=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,r=h(i,J);Z.pluginEvent.bind(Ut)(t,e,c({dragEl:et,parentEl:it,ghostEl:nt,rootEl:rt,nextEl:ot,lastDownEl:at,cloneEl:st,cloneHidden:lt,dragStarted:xt,putSortable:vt,activeSortable:Ut.active,originalEvent:n,oldIndex:ut,oldDraggableIndex:ht,newIndex:ct,newDraggableIndex:dt,hideGhostForTarget:Gt,unhideGhostForTarget:Ht,cloneNowHidden:function(){lt=!0},cloneNowShown:function(){lt=!1},dispatchSortableEvent:function(t){tt({sortable:e,name:t,originalEvent:n})}},r))};function tt(t){q(c({putSortable:vt,cloneEl:st,targetEl:et,rootEl:rt,oldIndex:ut,oldDraggableIndex:ht,newIndex:ct,newDraggableIndex:dt},t))}var et,it,nt,rt,ot,at,st,lt,ut,ct,ht,dt,ft,vt,mt,bt,pt,gt,wt,yt,xt,_t,Et,zt,kt,St=!1,It=!1,Dt=[],Tt=!1,Ct=!1,Mt=[],Ot=!1,At=[],jt="undefined"!=typeof document,Ft=g,$t=m||v?"cssFloat":"float",Bt=jt&&!w&&!g&&"draggable"in document.createElement("div"),Nt=function(){if(jt){if(v)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Lt=function(t,e){var i=T(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=F(t,0,e),o=F(t,1,e),a=r&&T(r),s=o&&T(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(r).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(o).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&a.float&&"none"!==a.float?!o||"both"!==s.clear&&s.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=n&&"none"===i[$t]||o&&"none"===i[$t]&&l+u>n)?"vertical":"horizontal"},Pt=function(t){function e(t,i){return function(n,r,o,a){if(null==t&&(i||n.options.group.name&&r.options.group.name&&n.options.group.name===r.options.group.name))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,r,o,a),i)(n,r,o,a);var s=(i?n:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var i={},n=t.group;n&&"object"==d(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},Gt=function(){!Nt&&nt&&T(nt,"display","none")},Ht=function(){!Nt&&nt&&T(nt,"display","")};jt&&!w&&document.addEventListener("click",(function(t){if(It)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),It=!1,!1}),!0);var Kt=function(t){if(et){var e=(r=(t=t.touches?t.touches[0]:t).clientX,o=t.clientY,Dt.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!$(t)){var i=A(t);return r>=i.left-e&&r<=i.right+e&&o>=i.top-e&&o<=i.bottom+e?a=t:void 0}})),a);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var r,o,a},Rt=function(t){et&&et.parentNode[Y]._isOutsideThisEl(t.target)};function Ut(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=l({},e),t[Y]=this;var i,n,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Lt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ut.supportPointer&&"PointerEvent"in window&&(!p||g),emptyInsertThreshold:5};for(var o in Z.initializePlugins(this,t,r),r)!(o in e)&&(e[o]=r[o]);for(var a in Pt(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Bt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?x(t,"pointerdown",this._onTapStart):(x(t,"mousedown",this._onTapStart),x(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(x(t,"dragover",this),x(t,"dragenter",this)),Dt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),l(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==T(t,"display")&&t!==Ut.ghost){n.push({target:t,rect:A(t)});var e=c({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=C(t,!0);i&&(e.top-=i.f,e.left-=i.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(i),void("function"==typeof t&&t());var r=!1,o=0;n.forEach((function(t){var i=0,n=t.target,a=n.fromRect,s=A(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,h=C(n,!0);h&&(s.top-=h.f,s.left-=h.e),n.toRect=s,n.thisAnimationDuration&&P(l,s)&&!P(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(i=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(c,l,u,e.options)),P(s,a)||(n.prevFromRect=a,n.prevToRect=s,i||(i=e.options.animation),e.animate(n,c,s,i)),i&&(r=!0,o=Math.max(o,i),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),i),n.thisAnimationDuration=i)})),clearTimeout(i),r?i=setTimeout((function(){"function"==typeof t&&t()}),o):"function"==typeof t&&t(),n=[]},animate:function(t,e,i,n){if(n){T(t,"transition",""),T(t,"transform","");var r=C(this.el),o=(e.left-i.left)/(r&&r.a||1),a=(e.top-i.top)/(r&&r.d||1);t.animatingX=!!o,t.animatingY=!!a,T(t,"transform","translate3d("+o+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),T(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),T(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){T(t,"transition",""),T(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Wt(t,e,i,n,r,o,a,s){var l,u,c=t[Y],h=c.options.onMove;return!window.CustomEvent||v||m?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=n,l.related=r||e,l.relatedRect=o||A(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(u=h.call(c,l,a)),u}function Yt(t){t.draggable=!1}function Xt(){Ot=!1}function Vt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Zt(t){return setTimeout(t,0)}function qt(t){return clearTimeout(t)}Ut.prototype={constructor:Ut,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(_t=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,et):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,r=n.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=n.filter;if(function(t){At.length=0;for(var e=t.getElementsByTagName("input"),i=e.length;i--;){var n=e[i];n.checked&&At.push(n)}}(i),!et&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!p||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=k(s,n.draggable,i,!1))&&s.animated||at===s)){if(ut=B(s),ht=B(s,n.draggable),"function"==typeof u){if(u.call(this,t,s,this))return tt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:i,fromEl:i}),Q("filter",e,{evt:t}),void(r&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(n){if(n=k(l,n.trim(),i,!1))return tt({sortable:e,rootEl:n,name:"filter",targetEl:s,fromEl:i,toEl:i}),Q("filter",e,{evt:t}),!0}))))return void(r&&t.preventDefault());n.handle&&!k(l,n.handle,i,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,i){var n,r=this,o=r.el,a=r.options,s=o.ownerDocument;if(i&&!et&&i.parentNode===o){var l=A(i);if(rt=o,it=(et=i).parentNode,ot=et.nextSibling,at=i,ft=a.group,Ut.dragged=et,wt=(mt={target:et,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-l.left,yt=mt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,et.style["will-change"]="all",n=function(){Q("delayEnded",r,{evt:t}),Ut.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!b&&r.nativeDraggable&&(et.draggable=!0),r._triggerDragStart(t,e),tt({sortable:r,name:"choose",originalEvent:t}),D(et,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){M(et,t.trim(),Yt)})),x(s,"dragover",Kt),x(s,"mousemove",Kt),x(s,"touchmove",Kt),a.supportPointer?(x(s,"pointerup",r._onDrop),!this.nativeDraggable&&x(s,"pointercancel",r._onDrop)):(x(s,"mouseup",r._onDrop),x(s,"touchend",r._onDrop),x(s,"touchcancel",r._onDrop)),b&&this.nativeDraggable&&(this.options.touchStartThreshold=4,et.draggable=!0),Q("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(m||v))n();else{if(Ut.eventCanceled)return void this._onDrop();a.supportPointer?(x(s,"pointerup",r._disableDelayedDrag),x(s,"pointercancel",r._disableDelayedDrag)):(x(s,"mouseup",r._disableDelayedDrag),x(s,"touchend",r._disableDelayedDrag),x(s,"touchcancel",r._disableDelayedDrag)),x(s,"mousemove",r._delayedDragTouchMoveHandler),x(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&x(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){et&&Yt(et),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._disableDelayedDrag),_(t,"touchend",this._disableDelayedDrag),_(t,"touchcancel",this._disableDelayedDrag),_(t,"pointerup",this._disableDelayedDrag),_(t,"pointercancel",this._disableDelayedDrag),_(t,"mousemove",this._delayedDragTouchMoveHandler),_(t,"touchmove",this._delayedDragTouchMoveHandler),_(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?x(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(x(et,"dragend",this),x(rt,"dragstart",this._onDragStart));try{document.selection?Zt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(St=!1,rt&&et){Q("dragStarted",this,{evt:e}),this.nativeDraggable&&x(document,"dragover",Rt);var i=this.options;!t&&D(et,i.dragClass,!1),D(et,i.ghostClass,!0),Ut.active=this,t&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(bt){this._lastX=bt.clientX,this._lastY=bt.clientY,Gt();for(var t=document.elementFromPoint(bt.clientX,bt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(bt.clientX,bt.clientY))!==e;)e=t;if(et.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]&&e[Y]._onDragOver({clientX:bt.clientX,clientY:bt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=z(e));Ht()}},_onTouchMove:function(t){if(mt){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=nt&&C(nt,!0),a=nt&&o&&o.a,s=nt&&o&&o.d,l=Ft&&kt&&N(kt),u=(r.clientX-mt.clientX+n.x)/(a||1)+(l?l[0]-Mt[0]:0)/(a||1),c=(r.clientY-mt.clientY+n.y)/(s||1)+(l?l[1]-Mt[1]:0)/(s||1);if(!Ut.active&&!St){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(nt){o?(o.e+=u-(pt||0),o.f+=c-(gt||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");T(nt,"webkitTransform",h),T(nt,"mozTransform",h),T(nt,"msTransform",h),T(nt,"transform",h),pt=u,gt=c,bt=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!nt){var t=this.options.fallbackOnBody?document.body:rt,e=A(et,!0,Ft,!0,t),i=this.options;if(Ft){for(kt=t;"static"===T(kt,"position")&&"none"===T(kt,"transform")&&kt!==document;)kt=kt.parentNode;kt!==document.body&&kt!==document.documentElement?(kt===document&&(kt=O()),e.top+=kt.scrollTop,e.left+=kt.scrollLeft):kt=O(),Mt=N(kt)}D(nt=et.cloneNode(!0),i.ghostClass,!1),D(nt,i.fallbackClass,!0),D(nt,i.dragClass,!0),T(nt,"transition",""),T(nt,"transform",""),T(nt,"box-sizing","border-box"),T(nt,"margin",0),T(nt,"top",e.top),T(nt,"left",e.left),T(nt,"width",e.width),T(nt,"height",e.height),T(nt,"opacity","0.8"),T(nt,"position",Ft?"absolute":"fixed"),T(nt,"zIndex","100000"),T(nt,"pointerEvents","none"),Ut.ghost=nt,t.appendChild(nt),T(nt,"transform-origin",wt/parseInt(nt.style.width)*100+"% "+yt/parseInt(nt.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,r=i.options;Q("dragStart",this,{evt:t}),Ut.eventCanceled?this._onDrop():(Q("setupClone",this),Ut.eventCanceled||((st=K(et)).removeAttribute("id"),st.draggable=!1,st.style["will-change"]="",this._hideClone(),D(st,this.options.chosenClass,!1),Ut.clone=st),i.cloneId=Zt((function(){Q("clone",i),Ut.eventCanceled||(i.options.removeCloneOnHide||rt.insertBefore(st,et),i._hideClone(),tt({sortable:i,name:"clone"}))})),!e&&D(et,r.dragClass,!0),e?(It=!0,i._loopId=setInterval(i._emulateDragOver,50)):(_(document,"mouseup",i._onDrop),_(document,"touchend",i._onDrop),_(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(i,n,et)),x(document,"drop",i),T(et,"transform","translateZ(0)")),St=!0,i._dragStartId=Zt(i._dragStarted.bind(i,e,t)),x(document,"selectstart",i),xt=!0,window.getSelection().removeAllRanges(),p&&T(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,r,o=this.el,a=t.target,s=this.options,l=s.group,u=Ut.active,h=ft===l,d=s.sort,f=vt||u,v=this,m=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=k(a,s.draggable,o,!0),N("dragOver"),Ut.eventCanceled)return m;if(et.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||v._ignoreWhileAnimating===a)return P(!1);if(It=!1,u&&!s.disabled&&(h?d||(n=it!==rt):vt===this||(this.lastPutMode=ft.checkPull(this,u,et,t))&&l.checkPut(this,u,et,t))){if(r="vertical"===this._getDirection(t,a),e=A(et),N("dragOverValid"),Ut.eventCanceled)return m;if(n)return it=rt,L(),this._hideClone(),N("revert"),Ut.eventCanceled||(ot?rt.insertBefore(et,ot):rt.appendChild(et)),P(!0);var b=$(o,s.draggable);if(!b||function(t,e,i){var n=A($(i.el,i.options.draggable)),r=W(i.el,i.options,nt);return e?t.clientX>r.right+10||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>r.bottom+10||t.clientX>n.right&&t.clientY>n.top}(t,r,this)&&!b.animated){if(b===et)return P(!1);if(b&&o===t.target&&(a=b),a&&(i=A(a)),!1!==Wt(rt,o,et,e,a,i,t,!!a))return L(),b&&b.nextSibling?o.insertBefore(et,b.nextSibling):o.appendChild(et),it=o,G(),P(!0)}else if(b&&function(t,e,i){var n=A(F(i.el,0,i.options,!0)),r=W(i.el,i.options,nt);return e?t.clientX<r.left-10||t.clientY<n.top&&t.clientX<n.right:t.clientY<r.top-10||t.clientY<n.bottom&&t.clientX<n.left}(t,r,this)){var p=F(o,0,s,!0);if(p===et)return P(!1);if(i=A(a=p),!1!==Wt(rt,o,et,e,a,i,t,!1))return L(),o.insertBefore(et,p),it=o,G(),P(!0)}else if(a.parentNode===o){i=A(a);var g,w,y,x=et.parentNode!==o,_=!function(t,e,i){var n=i?t.left:t.top,r=i?e.left:e.top;return n===r||(i?t.right:t.bottom)===(i?e.right:e.bottom)||n+(i?t.width:t.height)/2===r+(i?e.width:e.height)/2}(et.animated&&et.toRect||e,a.animated&&a.toRect||i,r),E=r?"top":"left",z=j(a,"top","top")||j(et,"top","top"),S=z?z.scrollTop:void 0;if(_t!==a&&(w=i[E],Tt=!1,Ct=!_&&s.invertSwap||x),g=function(t,e,i,n,r,o,a,s){var l=n?t.clientY:t.clientX,u=n?i.height:i.width,c=n?i.top:i.left,h=n?i.bottom:i.right,d=!1;if(!a)if(s&&zt<u*r){if(!Tt&&(1===Et?l>c+u*o/2:l<h-u*o/2)&&(Tt=!0),Tt)d=!0;else if(1===Et?l<c+zt:l>h-zt)return-Et}else if(l>c+u*(1-r)/2&&l<h-u*(1-r)/2)return function(t){return B(et)<B(t)?1:-1}(e);return(d=d||a)&&(l<c+u*o/2||l>h-u*o/2)?l>c+u/2?1:-1:0}(t,a,i,r,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ct,_t===a),0!==g){var I=B(et);do{y=it.children[I-=g]}while(y&&("none"===T(y,"display")||y===nt))}if(0===g||y===a)return P(!1);_t=a,Et=g;var C=a.nextElementSibling,M=!1,O=Wt(rt,o,et,e,a,i,t,M=1===g);if(!1!==O)return 1!==O&&-1!==O||(M=1===O),Ot=!0,setTimeout(Xt,30),L(),M&&!C?o.appendChild(et):a.parentNode.insertBefore(et,M?C:a),z&&H(z,0,S-z.scrollTop),it=et.parentNode,void 0===w||Ct||(zt=Math.abs(w-A(a)[E])),G(),P(!0)}if(o.contains(et))return P(!1)}return!1}function N(s,l){Q(s,v,c({evt:t,isOwner:h,axis:r?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:d,fromSortable:f,target:a,completed:P,onMove:function(i,n){return Wt(rt,o,et,e,i,A(i),t,n)},changed:G},l))}function L(){N("dragOverAnimationCapture"),v.captureAnimationState(),v!==f&&f.captureAnimationState()}function P(e){return N("dragOverCompleted",{insertion:e}),e&&(h?u._hideClone():u._showClone(v),v!==f&&(D(et,vt?vt.options.ghostClass:u.options.ghostClass,!1),D(et,s.ghostClass,!0)),vt!==v&&v!==Ut.active?vt=v:v===Ut.active&&vt&&(vt=null),f===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){N("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===et&&!et.animated||a===o&&!a.animated)&&(_t=null),s.dragoverBubble||t.rootEl||a===document||(et.parentNode[Y]._isOutsideThisEl(t.target),!e&&Kt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function G(){ct=B(et),dt=B(et,s.draggable),tt({sortable:v,name:"change",toEl:o,newIndex:ct,newDraggableIndex:dt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",Kt),_(document,"mousemove",Kt),_(document,"touchmove",Kt)},_offUpEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._onDrop),_(t,"touchend",this._onDrop),_(t,"pointerup",this._onDrop),_(t,"pointercancel",this._onDrop),_(t,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;ct=B(et),dt=B(et,i.draggable),Q("drop",this,{evt:t}),it=et&&et.parentNode,ct=B(et),dt=B(et,i.draggable),Ut.eventCanceled||(St=!1,Ct=!1,Tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qt(this.cloneId),qt(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&T(document.body,"user-select",""),T(et,"transform",""),t&&(xt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),nt&&nt.parentNode&&nt.parentNode.removeChild(nt),(rt===it||vt&&"clone"!==vt.lastPutMode)&&st&&st.parentNode&&st.parentNode.removeChild(st),et&&(this.nativeDraggable&&_(et,"dragend",this),Yt(et),et.style["will-change"]="",xt&&!St&&D(et,vt?vt.options.ghostClass:this.options.ghostClass,!1),D(et,this.options.chosenClass,!1),tt({sortable:this,name:"unchoose",toEl:it,newIndex:null,newDraggableIndex:null,originalEvent:t}),rt!==it?(ct>=0&&(tt({rootEl:it,name:"add",toEl:it,fromEl:rt,originalEvent:t}),tt({sortable:this,name:"remove",toEl:it,originalEvent:t}),tt({rootEl:it,name:"sort",toEl:it,fromEl:rt,originalEvent:t}),tt({sortable:this,name:"sort",toEl:it,originalEvent:t})),vt&&vt.save()):ct!==ut&&ct>=0&&(tt({sortable:this,name:"update",toEl:it,originalEvent:t}),tt({sortable:this,name:"sort",toEl:it,originalEvent:t})),Ut.active&&(null!=ct&&-1!==ct||(ct=ut,dt=ht),tt({sortable:this,name:"end",toEl:it,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Q("nulling",this),rt=et=it=nt=ot=st=at=lt=mt=bt=xt=ct=dt=ut=ht=_t=Et=vt=ft=Ut.dragged=Ut.ghost=Ut.clone=Ut.active=null;var t=this.el;At.forEach((function(e){t.contains(e)&&(e.checked=!0)})),At.length=pt=gt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":et&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,r=i.length,o=this.options;n<r;n++)k(t=i[n],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Vt(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var r=n.children[e];k(r,this.options.draggable,n,!1)&&(i[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return k(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=Z.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&Pt(i)},destroy:function(){Q("destroy",this);var t=this.el;t[Y]=null,_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart),_(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Dt.splice(Dt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!lt){if(Q("hideClone",this),Ut.eventCanceled)return;T(st,"display","none"),this.options.removeCloneOnHide&&st.parentNode&&st.parentNode.removeChild(st),lt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(lt){if(Q("showClone",this),Ut.eventCanceled)return;et.parentNode!=rt||this.options.group.revertClone?ot?rt.insertBefore(st,ot):rt.appendChild(st):rt.insertBefore(st,et),this.options.group.revertClone&&this.animate(et,st),T(st,"display",""),lt=!1}}else this._hideClone()}},jt&&x(document,"touchmove",(function(t){(Ut.active||St)&&t.cancelable&&t.preventDefault()})),Ut.utils={on:x,off:_,css:T,find:M,is:function(t,e){return!!k(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:G,closest:k,toggleClass:D,clone:K,index:B,nextTick:Zt,cancelNextTick:qt,detectDirection:Lt,getChild:F,expando:Y},Ut.get=function(t){return t[Y]},Ut.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ut.utils=c(c({},Ut.utils),t.utils)),Z.mount(t)}))},Ut.create=function(t,e){return new Ut(t,e)},Ut.version="1.15.7";var Jt,Qt,te,ee,ie,ne,re=[],oe=!1;function ae(){re.forEach((function(t){clearInterval(t.pid)})),re=[]}function se(){clearInterval(ne)}var le=G((function(t,e,i,n){if(e.scroll){var r,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=O(),c=!1;Qt!==i&&(Qt=i,ae(),r=e.scrollFn,!0===(Jt=e.scroll)&&(Jt=L(i,!0)));var h=0,d=Jt;do{var f=d,v=A(f),m=v.top,b=v.bottom,p=v.left,g=v.right,w=v.width,y=v.height,x=void 0,_=void 0,E=f.scrollWidth,z=f.scrollHeight,k=T(f),S=f.scrollLeft,I=f.scrollTop;f===u?(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY));var D=x&&(Math.abs(g-o)<=s&&S+w<E)-(Math.abs(p-o)<=s&&!!S),C=_&&(Math.abs(b-a)<=s&&I+y<z)-(Math.abs(m-a)<=s&&!!I);if(!re[h])for(var M=0;M<=h;M++)re[M]||(re[M]={});re[h].vx==D&&re[h].vy==C&&re[h].el===f||(re[h].el=f,re[h].vx=D,re[h].vy=C,clearInterval(re[h].pid),0==D&&0==C||(c=!0,re[h].pid=setInterval(function(){n&&0===this.layer&&Ut.active._onTouchMove(ie);var e=re[this.layer].vy?re[this.layer].vy*l:0,i=re[this.layer].vx?re[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(Ut.dragged.parentNode[Y],i,e,t,ie,re[this.layer].el)||H(re[this.layer].el,i,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&d!==u&&(d=L(d,!1)));oe=c}}),30),ue=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,r=t.dispatchSortableEvent,o=t.unhideGhostForTarget;if(e){var a=i||t.activeSortable;(0,t.hideGhostForTarget)();var s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,l=document.elementFromPoint(s.clientX,s.clientY);o(),a&&!a.el.contains(l)&&(r("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function ce(){}function he(){}ce.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=F(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:ue},l(ce,{pluginName:"revertOnSpill"}),he.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:ue},l(he,{pluginName:"removeOnSpill"});var de,fe,ve,me,be,pe=[],ge=[],we=!1,ye=!1,xe=!1;function _e(t,e){ge.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}function Ee(){pe.forEach((function(t){t!==ve&&t.parentNode&&t.parentNode.removeChild(t)}))}Ut.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?x(document,"dragover",this._handleAutoScroll):x(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),se(),ae(),clearTimeout(S),S=void 0},nulling:function(){ie=Qt=Jt=oe=ne=te=ee=null,re.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(n,r);if(ie=t,e||this.options.forceAutoScrollFallback||m||v||p){le(t,this.options,o,e);var a=L(o,!0);!oe||ne&&n===te&&r===ee||(ne&&se(),ne=setInterval((function(){var o=L(document.elementFromPoint(n,r),!0);o!==a&&(a=o,ae()),le(t,i.options,o,e)}),10),te=n,ee=r)}else{if(!this.options.bubbleScroll||L(o,!0)===O())return void ae();le(t,this.options,L(o,!1),!1)}}},l(t,{pluginName:"scroll",initializeByDefault:!0})}),Ut.mount(he,ce),Ut.mount(new function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?x(document,"pointerup",this._deselectMultiDrag):(x(document,"mouseup",this._deselectMultiDrag),x(document,"touchend",this._deselectMultiDrag))),x(document,"keydown",this._checkKeyDown),x(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,i){var n="";pe.length&&fe===t?pe.forEach((function(t,e){n+=(e?", ":"")+t.textContent})):n=i.textContent,e.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){ve=t.dragEl},delayEnded:function(){this.isMultiDrag=~pe.indexOf(ve)},setupClone:function(t){var e=t.sortable,i=t.cancel;if(this.isMultiDrag){for(var n=0;n<pe.length;n++)ge.push(K(pe[n])),ge[n].sortableIndex=pe[n].sortableIndex,ge[n].draggable=!1,ge[n].style["will-change"]="",D(ge[n],this.options.selectedClass,!1),pe[n]===ve&&D(ge[n],this.options.chosenClass,!1);e._hideClone(),i()}},clone:function(t){var e=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pe.length&&fe===t.sortable&&(_e(!0,t.rootEl),e("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,i=t.cancel;this.isMultiDrag&&(_e(!1,t.rootEl),ge.forEach((function(t){T(t,"display","")})),e(),be=!1,i())},hideClone:function(t){var e=this,i=t.cloneNowHidden,n=t.cancel;this.isMultiDrag&&(ge.forEach((function(t){T(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),i(),be=!0,n())},dragStartGlobal:function(){!this.isMultiDrag&&fe&&fe.multiDrag._deselectMultiDrag(),pe.forEach((function(t){t.sortableIndex=B(t)})),pe=pe.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),xe=!0},dragStarted:function(t){var e=this,i=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){pe.forEach((function(t){t!==ve&&T(t,"position","absolute")}));var n=A(ve,!1,!0,!0);pe.forEach((function(t){t!==ve&&R(t,n)})),ye=!0,we=!0}i.animateAll((function(){ye=!1,we=!1,e.options.animation&&pe.forEach((function(t){U(t)})),e.options.sort&&Ee()}))}},dragOver:function(t){var e=t.completed,i=t.cancel;ye&&~pe.indexOf(t.target)&&(e(!1),i())},revert:function(t){var e=t.fromSortable,i=t.rootEl,n=t.sortable,r=t.dragRect;pe.length>1&&(pe.forEach((function(t){n.addAnimationState({target:t,rect:ye?A(t):r}),U(t),t.fromRect=r,e.removeAnimationState(t)})),ye=!1,function(t,e){pe.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var e=t.sortable,i=t.isOwner,n=t.activeSortable,r=t.parentEl,o=t.putSortable,a=this.options;if(t.insertion){if(i&&n._hideClone(),we=!1,a.animation&&pe.length>1&&(ye||!i&&!n.options.sort&&!o)){var s=A(ve,!1,!0,!0);pe.forEach((function(t){t!==ve&&(R(t,s),r.appendChild(t))})),ye=!0}if(!i)if(ye||Ee(),pe.length>1){var l=be;n._showClone(e),n.options.animation&&!be&&l&&ge.forEach((function(t){n.addAnimationState({target:t,rect:me}),t.fromRect=me,t.thisAnimationDuration=null}))}else n._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner,n=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){me=l({},e);var r=C(ve,!0);me.top-=r.f,me.left-=r.e}},dragOverAnimationComplete:function(){ye&&(ye=!1,Ee())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,r=t.sortable,o=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var u=this.options,c=n.children;if(!xe)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),D(ve,u.selectedClass,!~pe.indexOf(ve)),~pe.indexOf(ve))pe.splice(pe.indexOf(ve),1),de=null,q({sortable:r,rootEl:i,name:"deselect",targetEl:ve,originalEvent:e});else{if(pe.push(ve),q({sortable:r,rootEl:i,name:"select",targetEl:ve,originalEvent:e}),e.shiftKey&&de&&r.el.contains(de)){var h=B(de),d=B(ve);~h&&~d&&h!==d&&function(){var t,o;d>h?(o=h,t=d):(o=d,t=h+1);for(var a=u.filter;o<t;o++)~pe.indexOf(c[o])||k(c[o],u.draggable,n,!1)&&(a&&("function"==typeof a?a.call(r,e,c[o],r):a.split(",").some((function(t){return k(c[o],t.trim(),n,!1)})))||(D(c[o],u.selectedClass,!0),pe.push(c[o]),q({sortable:r,rootEl:i,name:"select",targetEl:c[o],originalEvent:e})))}()}else de=ve;fe=l}if(xe&&this.isMultiDrag){if(ye=!1,(n[Y].options.sort||n!==i)&&pe.length>1){var f=A(ve),v=B(ve,":not(."+this.options.selectedClass+")");if(!we&&u.animation&&(ve.thisAnimationDuration=null),l.captureAnimationState(),!we&&(u.animation&&(ve.fromRect=f,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==ve){var e=ye?A(t):f;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),Ee(),pe.forEach((function(t){c[v]?n.insertBefore(t,c[v]):n.appendChild(t),v++})),a===B(ve))){var m=!1;pe.forEach((function(t){t.sortableIndex===B(t)||(m=!0)})),m&&(o("update"),o("sort"))}pe.forEach((function(t){U(t)})),l.animateAll()}fe=l}(i===n||s&&"clone"!==s.lastPutMode)&&ge.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=xe=!1,ge.length=0},destroyGlobal:function(){this._deselectMultiDrag(),_(document,"pointerup",this._deselectMultiDrag),_(document,"mouseup",this._deselectMultiDrag),_(document,"touchend",this._deselectMultiDrag),_(document,"keydown",this._checkKeyDown),_(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==xe&&xe||fe!==this.sortable||t&&k(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];D(e,this.options.selectedClass,!1),pe.shift(),q({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Y];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(fe&&fe!==e&&(fe.multiDrag._deselectMultiDrag(),fe=e),D(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[Y],i=pe.indexOf(t);e&&e.options.multiDrag&&~i&&(D(t,e.options.selectedClass,!1),pe.splice(i,1))}},eventProperties:function(){var t,e=this,i=[],n=[];return pe.forEach((function(t){var r;i.push({multiDragElement:t,index:t.sortableIndex}),r=ye&&t!==ve?-1:ye?B(t,":not(."+e.options.selectedClass+")"):B(t),n.push({multiDragElement:t,index:r})})),{items:(t=pe,function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(ge),oldIndicies:i,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})});const ze=class{constructor(i){t(this,i),this.itemsReordered=e(this,"itemsReordered",7),this.ezSelectItens=e(this,"ezSelectItens",7),this.ezDoubleClick=e(this,"ezDoubleClick",7),this.ezChoose=e(this,"ezChoose",7),this.filterTerm="",this.title=void 0,this.hideHeader=!1,this.hideTotalizer=!1,this.group="default",this.dataSource=[],this.idSortableList="DEFAULT_LIST",this.entityLabel=void 0,this.entityLabelPlural=void 0,this.emptyMessage=void 0,this.hoverFeedback=!0,this.enableMultipleSelection=!1,this.removeItensMoved=!1,this.itemRightSlotBuilder=void 0,this.itemLeftSlotBuilder=void 0,this.selectedItems=new Set}async clearSelection(){this.selectedItems.clear(),this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(Ut.utils.deselect(i),t.selected=!1)})),this.ezSelectItens.emit([])}async componentWillLoad(){this.i18n=await o(),this.emptyMessage=this.i18n("ez-sortable-list.emptyMessage"),this.entityLabel=this.i18n("ez-sortable-list.entityLabel"),this.entityLabelPlural=this.i18n("ez-sortable-list.entityLabelPlural")}componentDidLoad(){this.initSortable()}componentDidRender(){this.selectPredefinedItens()}initSortable(){this._sortableInstance&&this._sortableInstance.destroy(),this._sortableInstance=new Ut(this.el.shadowRoot.querySelector(`#${this.idSortableList}`),{group:{name:this.group,pull:!0,put:!0},ghostClass:"ghost",dragClass:"dragging",animation:15,multiDrag:this.enableMultipleSelection,avoidImplicitDeselect:this.enableMultipleSelection,selectedClass:"selected",filter:".filtered",swapThreshold:.5,multiDragKey:"Control",removeCloneOnHide:!0,onEnd:t=>this.handleReorderEvent(t),onSelect:t=>this.handleSelect(t),onDeselect:t=>this.handleDeselect(t),onSort:t=>this.handleSortItem(t),onChoose:t=>this.ezChoose.emit(t)})}selectPredefinedItens(){this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(this.selectedItems.has(t.id)||!0===t.selected?Ut.utils.select(i):Ut.utils.deselect(i))}))}handleSortItem(t){var e;if(!this.removeItensMoved)return;const i=t.from.getAttribute("id");t.to.getAttribute("id")!==i?((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).forEach((t=>t.remove())):t.items=this.removeDuplicateElements(t.items)}removeDuplicateElements(t){const e=new Set;return t.filter((t=>{const i=t.getAttribute("data-key");if(i){if(e.has(i))return t.remove(),!1;e.add(i)}return!0}))}handleSelect(t){this.updateSelection(t.item,!0)}handleDeselect(t){this.updateSelection(t.item,!1)}updateSelection(t,e){const i=t.getAttribute("data-key");if(!i)return;const n=this.dataSource.find((t=>t.id===i));n&&(n.selected=e,e?this.selectedItems.add(i):this.selectedItems.delete(i),this.emitSelectedItems())}emitSelectedItems(){this.ezSelectItens.emit(Array.from(this.selectedItems).map((t=>this.dataSource.find((e=>e.id===t)))).filter(Boolean))}handleReorderEvent(t){var e;const i=((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).map((t=>t.getAttribute("data-key"))).filter(Boolean);this.itemsReordered.emit({dataSource:this.dataSource,selectItens:i,from:t.from,to:t.to,newIndex:t.newIndex,newIndicies:t.newIndicies})}handleDoubleClick(t){var e;const i=this.dataSource.find((e=>e.id===t));i&&(null===(e=this.ezDoubleClick)||void 0===e||e.emit(i))}getContainerItemBuilder(t,e,n){var r,o;const a="left"===t?null===(r=this.itemLeftSlotBuilder)||void 0===r?void 0:r.call(this,e):null===(o=this.itemRightSlotBuilder)||void 0===o?void 0:o.call(this,e);if(null!=a)return"string"!=typeof a?i("div",{class:n},a):i("div",{class:n,innerHTML:a})}disconnectedCallback(){this._sortableInstance&&(this._sortableInstance.destroy(),this._sortableInstance=null)}buildTotalizer(){return`${this.i18n("ez-sortable-list.total")} ${this.dataSource.length} ${1===this.dataSource.length?this.entityLabel:this.entityLabelPlural}`}renderItems(){return r.applyStringFilter(this.filterTerm,this.dataSource).map((t=>i("div",{id:`ID_${t.id}`,key:`KEY_${t.id}`,class:{"sortable-item":!0,"hover-feedback":this.hoverFeedback},"data-key":t.id,onDblClick:()=>this.handleDoubleClick(t.id)},!!this.itemLeftSlotBuilder&&this.getContainerItemBuilder("left",t),i("div",{class:"item-content"},i("span",{class:"draggable-icon"}),t.label),!!this.itemRightSlotBuilder&&this.getContainerItemBuilder("right",t))))}handleFilterChanged(t){t.stopPropagation(),t.preventDefault(),this.filterTerm=t.detail}renderTotalizer(){if(!this.hideTotalizer)return i("div",{class:"sortable-totalizer"},this.buildTotalizer())}renderHeader(){if(!this.hideHeader)return i("div",{class:"sortable-header"},i("span",{class:"sortable-label"},this.title),i("ez-filter-input",{label:`${this.i18n("ez-sortable-list.search")} ${this.entityLabel}`,mode:"slim",onEzChange:t=>this.handleFilterChanged(t)}))}render(){return i("div",{class:"sortable-content"},this.renderHeader(),i("div",{class:`sortable-list ${this.dataSource.length<1?"empty-content":""} list-scroller--fix`,"data-content":this.emptyMessage,style:{"--empty-content":`"${this.emptyMessage}"`},id:this.idSortableList,key:this.idSortableList},this.renderItems()),this.renderTotalizer())}get el(){return n(this)}};ze.style=':host{--ez-sortable-list__host--z-index:var(--visible, 1);--ez-sortable-list__host--border-radius:var(--border--radius-medium, 12px);--ez-sortable-list__host--padding:var(--space--medium, 12px);--ez-sortable-list__item--margin:0 var(--space--small, 6px);--ez-sortable-list__item--padding:var(--space--3xs, 6px);--ez-sortable-list__item--color:var(--title--primary, #2b3a54);--ez-sortable-list__item--font-family:var(--font-pattern, "Roboto");--ez-sortable-list__item--font-size:var(--text--medium, 14px);--ez-sortable-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-sortable-list__selectable--padding-right:var(--space--small, 6px);--ez-sortable-list__selectable--padding-left:var(--space--small, 6px);--ez-sortable-list__icon--color:#AFB6C0;--ez-sortable-list__draggable-icon--image:url(\'data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z"/></svg>\');--ez-sortable-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-sortable-list--color-background:var(--scrollbar--background, #E5EAF0);--ez-sortable-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-sortable-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-sortable-list--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__scrollbar--width:var(--space--small, 6px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-sortable-list__host--z-index)}.sortable-item{display:flex;justify-content:space-between;font-family:var(--ez-sortable-list__item--font-family);font-size:var(--ez-sortable-list__item--font-size);padding:var(--ez-sortable-list__item--padding) 0px;margin:var(--ez-sortable-list__item--margin)}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.sortable-item.dragging{background:#FFFFFF;border:1px solid #008561;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.sortable-list{padding:0;margin:0;width:100%;height:100%;max-height:100%;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;color:var(--text-color);scrollbar-color:var(--ez-sortable-list__scrollbar--color-clicked) var(--ez-sortable-list--color-background)}.sortable-list.empty-content::after{content:attr(data-content);display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.list-scroller--fix{scrollbar-width:thin}.list-scroller--hover{scrollbar-width:none}.item-content{display:flex;flex-grow:1;flex-direction:row}.empty-message{font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--secondary);margin:auto}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:\'\';display:flex;width:18px;height:18px;background-color:var(--ez-sortable-list__icon--color);-webkit-mask-image:var(--ez-sortable-list__draggable-icon--image);mask-image:var(--ez-sortable-list__draggable-icon--image)}.selectable{cursor:pointer;padding-right:var(--ez-sortable-list__selectable--padding-right);padding-left:var(--ez-sortable-list__selectable--padding-left)}.selected{background:var(--ez-sortable-list__selected-item--background-color);border-radius:var(--ez-sortable-list__selected-item--border-radius)}.list-fix::-webkit-scrollbar-thumb{background-color:var(--ez-sortable-list__scrollbar--color-default);border-radius:var(--ez-sortable-list--border-radius)}.list-fix::-webkit-scrollbar-thumb:active{background-color:var(--ez-sortable-list__scrollbar--color-clicked)}.list-fix::-webkit-scrollbar{width:var(--ez-sortable-list__scrollbar--width);display:none}.list-hover::-webkit-scrollbar-thumb:hover{background-color:var(--ez-sortable-list__scrollbar--color-hover)}.list-hover:hover{scrollbar-width:thin}.list-hover:hover::-webkit-scrollbar{display:block}.ghost{opacity:.5;background:#589f7b}.sortable-content{display:flex;justify-content:space-between;gap:10px;flex-direction:column;border:var(--border--small) var(--color--strokes);border-radius:var(--border--radius-medium);width:100%;height:400px;min-width:40%}@media (max-height: 630px){.sortable-content{height:270px}}.sortable-header{background:var(--background--body);padding:10px;border-radius:var(--border--radius-medium) var(--border--radius-medium) 0 0}.sortable-label{font-weight:var(--text-weight--large);font-size:var(--text--medium);color:var(--title--primary);margin-bottom:10px;display:block}.sortable-totalizer{padding:5px 10px;background:var(--background--body);font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--primary);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium)}';export{ze as ez_sortable_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as n}from"./p-e4c7eb39.js";import{DateUtils as o,TimeFormatter as a,ElementIDUtils as h}from"@sankhyalabs/core";import{C as r}from"./p-ec7db713.js";import{i as l}from"./p-69344c23.js";const c=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=o.validateDate(t,!0),s=o.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=o.validateDate(this.value,!0),e=o.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),n=s.length>0?s[0]:t,h=a.prepareValue(s[1]?s[1]:"",this.showSeconds);return o.strToDate(n+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=o.validateDate(this.value,!0),i=o.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-date-time-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return o.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=o.validateDate(this.value,!0),s=o.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}async componentWillLoad(){this.i18n=await l()}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),canShowError:this.canShowError,alternativePlaceholder:this.alternativePlaceholder},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},slot:"leftIcon"})),e("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none","data-element-id":this._elem.getAttribute("data-element-id")},e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},time:!0,showSeconds:this.showSeconds})))}get _elem(){return n(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};c.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{c as ez_date_time_input}
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as n}from"./p-23a36bb6.js";import{DateUtils as o,TimeFormatter as a,ElementIDUtils as h}from"@sankhyalabs/core";import{C as r}from"./p-ec7db713.js";import{i as l}from"./p-69344c23.js";const c=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=o.validateDate(t,!0),s=o.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=o.validateDate(this.value,!0),e=o.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),n=s.length>0?s[0]:t,h=a.prepareValue(s[1]?s[1]:"",this.showSeconds);return o.strToDate(n+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=o.validateDate(this.value,!0),i=o.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-date-time-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return o.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=o.validateDate(this.value,!0),s=o.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}async componentWillLoad(){this.i18n=await l()}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),canShowError:this.canShowError,alternativePlaceholder:this.alternativePlaceholder},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},slot:"leftIcon"})),e("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none","data-element-id":this._elem.getAttribute("data-element-id")},e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},time:!0,showSeconds:this.showSeconds})))}get _elem(){return n(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};c.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{c as ez_date_time_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as d,h as i,H as o,g as
|
|
1
|
+
import{r as t,c as d,h as i,H as o,g as l}from"./p-23a36bb6.js";import{FloatingManager as e,KeyboardManager as a}from"@sankhyalabs/core";import{i as n}from"./p-69344c23.js";const s=class{constructor(i){t(this,i),this.ezCloseModal=d(this,"ezCloseModal",7),this.ezOpenModal=d(this,"ezOpenModal",7),this.ezModalAction=d(this,"ezModalAction",7),this.modalSize=void 0,this.align=void 0,this.heightMode="regular",this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.closeOutsideLeave=!1,this.scrim="medium"}observeOpened(){this.opened?this._overlayId=e.subscribeOverlayControl(this._modalRef):e.unsubscribeOverlayControl(this._modalRef||this._overlayId)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}async componentWillLoad(){this.i18n=await n()}componentDidLoad(){this.observeOpened(),this._keyboardManager=new a({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezModalAction.emit.bind("OK")).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}componentDidRender(){this.modalFocus()}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}modalFocus(){this.opened&&requestAnimationFrame((()=>{const t=this._element.shadowRoot.querySelector("ez-modal-container");this._modalRef&&null===t&&this._modalRef.focus()}))}onMouseDownHandler(t){this.closeOutsideClick&&t.target===this._overlay&&this.closeModal()}onMouseLeaveHandler(){this.closeOutsideLeave&&this.closeModal()}render(){const t="left"===this.align?"left":"right",d="regular"===this.heightMode?`modal__content--${t}`:"";return i(o,null,this.opened?i("div",{ref:t=>this._modalRef=t,class:`modal modal__screen-${this.scrim} ${"regular"===this.heightMode?"modal__vertical-padding":""}`,onMouseDown:t=>this.onMouseDownHandler(t),tabIndex:-1,"aria-label":this.i18n("ez-modal.close")},i("div",{class:`modal__container modal__container--${t}`,ref:t=>this._overlay=t},i("div",{onMouseLeave:()=>this.onMouseLeaveHandler(),class:`modal__content ${d} ${this.modalSize}`},i("slot",null)))):void 0)}get _element(){return l(this)}static get watchers(){return{opened:["observeOpened"]}}};s.style=":host{--ez-modal-z-index:var(--elevation--22, 22);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block;--ez-modal-content-min-width:auto}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;outline:none}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-none{background:none}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;min-width:var(--ez-modal-content-min-width);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";export{s as ez_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,c as e,f as r,h as t,g as l}from"./p-e4c7eb39.js";import{FloatingManager as i}from"@sankhyalabs/core";import{i as s}from"./p-69344c23.js";const n=class{constructor(r){a(this,r),this.ezChange=e(this,"ezChange",7),this._firstRender=!0,this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(a,e,r,t){this.floating&&(this._floatingID=i.float(this._box,this._container,{isFixed:this.isFixed(),autoClose:!0,top:a,left:e,bottom:r,right:t}),this.isFixed()||(window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.scroll()))}async fitVertical(a,e){const r=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>r?this.show(a+"px",void 0,"unset"):this.show("unset",void 0,e+"px")}async fitHorizontal(a){const e=this._container.getBoundingClientRect().right+this._calendarWidth;(window.innerWidth||document.documentElement.clientWidth)>e||this.show(void 0,"unset",void 0,a+"px")}async hide(){void 0!==this._floatingID&&(i.close(this._floatingID),this._floatingID=void 0)}observeValue(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}scrollListener(){this.floating&&this.isFixed()&&this.hide()}isFixed(){return"true"===this._hostElem.dataset.isFixed}getMonthLabel(){return this.i18n(`ez-calendar.month.${this._currentPosition.getMonth()}`)+" "+this._currentPosition.getFullYear()}isSelectedDate(a){return!!this.value&&this.value.getDate()==a.getDate()&&this.value.getMonth()==a.getMonth()&&this.value.getFullYear()==a.getFullYear()}changeMonth(a){this._currentPosition.setMonth(this._currentPosition.getMonth()+a),r(this)}selectDate(a){let e=a;this.value&&(this.time||this.showSeconds)&&(e.setHours(this.value.getHours()),e.setMinutes(this.value.getMinutes()),e.setSeconds(this.showSeconds?this.value.getSeconds():0)),this.value=e,this.ezChange.emit(this.value)}selectHours(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),a,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit(this.value)}selectMinutes(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),a,this.value.getSeconds()),this.ezChange.emit(this.value)}selectSeconds(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),a),this.ezChange.emit(this.value)}updateScroll(a){if(a){const{scrollHeight:e,clientHeight:r,scrollTop:t}=a;e-r-Math.ceil(t)>0?a.classList.add("endHidden"):a.classList.remove("endHidden")}}async componentWillLoad(){this.i18n=await s()}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._calendarWidth=this._box.clientWidth,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){this.scroll()}scroll(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64,this.updateScroll(this._secondsScroll)))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const a=new Date;return a.setTime(this._currentPosition.getTime()),a.setDate(1-a.getDay()),t("section",{ref:a=>this._container=a},t("div",{ref:a=>this._box=a,class:"calendar__container"},t("div",{class:"calendar"},t("div",{class:"calendar__header"},t("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),t("label",{class:"calendar__lbl-month"},this.getMonthLabel()),t("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),t("div",{class:"calendar__body"},t("div",{class:"calendar__line"},[...Array(7).keys()].map((a=>t("div",{"data-day":this.i18n(`ez-calendar.weekDay.${a}`),class:"calendar__cell calendar__cell--unselectable"},this.i18n(`ez-calendar.weekDay.${a}`))))),[0,7,14,21,28,35].map((e=>t("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((r=>{const l=new Date;l.setTime(a.getTime()),l.setDate(l.getDate()+e+r);let i=`${l.getMonth()+1}-${l.getDate()}-${l.getFullYear()}`,s="calendar__cell";return this._currentPosition.getMonth()!=l.getMonth()?s+=" calendar__cell--secondary":this.isSelectedDate(l)&&(s+=" calendar__cell--selected"),t("div",{"data-day-month":i,class:s,onClick:()=>this.selectDate(l)},l.getDate())})))))),t("div",{class:"calendar__footer"},t("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this.i18n("ez-calendar.today")))),(this.time||this.showSeconds)&&t("div",{class:"calendar-time"},t("div",{class:"calendar-time__header"},t("div",null,"H"),t("div",{class:"separatorTime"},":"),t("div",null,"M"),this.showSeconds&&t("div",{class:"separatorTime"},":"),this.showSeconds&&t("div",null,"S")),t("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"12px",paddingRight:"12px"}},t("div",{class:"calendar__column",ref:a=>this._hoursScroll=a,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((a,e)=>e===this.value.getHours()?t("div",{style:{display:"flex"},ref:a=>this._hoursSelect=a},t("div",{"data-hour":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(e)},a),t("div",{class:"separatorTime"},":")):t("div",{style:{display:"flex"}},t("div",{"data-hour":a,class:"calendar__cell",onClick:()=>this.selectHours(e)},a),t("div",{class:"separatorTime"},":"))))),t("div",{class:"calendar__column",ref:a=>this._minutesScroll=a,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getMinutes()?t("div",{style:{display:"flex"},ref:a=>this._minutesSelect=a},t("div",{"data-minute":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&t("div",{class:"separatorTime"},":")):t("div",{style:{display:"flex"}},t("div",{"data-minute":a,class:"calendar__cell",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&t("div",{class:"separatorTime"},":"))))),this.showSeconds&&t("div",{class:"calendar__column",ref:a=>this._secondsScroll=a,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getSeconds()?t("div",{"data-second":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(e),ref:a=>this._secondsSelect=a},a):t("div",{"data-second":a,class:"calendar__cell",onClick:()=>this.selectSeconds(e)},a))))))))}get _hostElem(){return l(this)}static get watchers(){return{value:["observeValue"]}}};n.style=':host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--ez-calendar__nav-btn--next-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:\'\';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto;scrollbar-width:none}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}';export{n as ez_calendar}
|
|
1
|
+
import{r as a,c as e,f as r,h as t,g as l}from"./p-23a36bb6.js";import{FloatingManager as i}from"@sankhyalabs/core";import{i as s}from"./p-69344c23.js";const n=class{constructor(r){a(this,r),this.ezChange=e(this,"ezChange",7),this._firstRender=!0,this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(a,e,r,t){this.floating&&(this._floatingID=i.float(this._box,this._container,{isFixed:this.isFixed(),autoClose:!0,top:a,left:e,bottom:r,right:t}),this.isFixed()||(window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.scroll()))}async fitVertical(a,e){const r=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>r?this.show(a+"px",void 0,"unset"):this.show("unset",void 0,e+"px")}async fitHorizontal(a){const e=this._container.getBoundingClientRect().right+this._calendarWidth;(window.innerWidth||document.documentElement.clientWidth)>e||this.show(void 0,"unset",void 0,a+"px")}async hide(){void 0!==this._floatingID&&(i.close(this._floatingID),this._floatingID=void 0)}observeValue(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}scrollListener(){this.floating&&this.isFixed()&&this.hide()}isFixed(){return"true"===this._hostElem.dataset.isFixed}getMonthLabel(){return this.i18n(`ez-calendar.month.${this._currentPosition.getMonth()}`)+" "+this._currentPosition.getFullYear()}isSelectedDate(a){return!!this.value&&this.value.getDate()==a.getDate()&&this.value.getMonth()==a.getMonth()&&this.value.getFullYear()==a.getFullYear()}changeMonth(a){this._currentPosition.setMonth(this._currentPosition.getMonth()+a),r(this)}selectDate(a){let e=a;this.value&&(this.time||this.showSeconds)&&(e.setHours(this.value.getHours()),e.setMinutes(this.value.getMinutes()),e.setSeconds(this.showSeconds?this.value.getSeconds():0)),this.value=e,this.ezChange.emit(this.value)}selectHours(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),a,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit(this.value)}selectMinutes(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),a,this.value.getSeconds()),this.ezChange.emit(this.value)}selectSeconds(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),a),this.ezChange.emit(this.value)}updateScroll(a){if(a){const{scrollHeight:e,clientHeight:r,scrollTop:t}=a;e-r-Math.ceil(t)>0?a.classList.add("endHidden"):a.classList.remove("endHidden")}}async componentWillLoad(){this.i18n=await s()}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._calendarWidth=this._box.clientWidth,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){this.scroll()}scroll(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64,this.updateScroll(this._secondsScroll)))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const a=new Date;return a.setTime(this._currentPosition.getTime()),a.setDate(1-a.getDay()),t("section",{ref:a=>this._container=a},t("div",{ref:a=>this._box=a,class:"calendar__container"},t("div",{class:"calendar"},t("div",{class:"calendar__header"},t("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),t("label",{class:"calendar__lbl-month"},this.getMonthLabel()),t("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),t("div",{class:"calendar__body"},t("div",{class:"calendar__line"},[...Array(7).keys()].map((a=>t("div",{"data-day":this.i18n(`ez-calendar.weekDay.${a}`),class:"calendar__cell calendar__cell--unselectable"},this.i18n(`ez-calendar.weekDay.${a}`))))),[0,7,14,21,28,35].map((e=>t("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((r=>{const l=new Date;l.setTime(a.getTime()),l.setDate(l.getDate()+e+r);let i=`${l.getMonth()+1}-${l.getDate()}-${l.getFullYear()}`,s="calendar__cell";return this._currentPosition.getMonth()!=l.getMonth()?s+=" calendar__cell--secondary":this.isSelectedDate(l)&&(s+=" calendar__cell--selected"),t("div",{"data-day-month":i,class:s,onClick:()=>this.selectDate(l)},l.getDate())})))))),t("div",{class:"calendar__footer"},t("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this.i18n("ez-calendar.today")))),(this.time||this.showSeconds)&&t("div",{class:"calendar-time"},t("div",{class:"calendar-time__header"},t("div",null,"H"),t("div",{class:"separatorTime"},":"),t("div",null,"M"),this.showSeconds&&t("div",{class:"separatorTime"},":"),this.showSeconds&&t("div",null,"S")),t("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"12px",paddingRight:"12px"}},t("div",{class:"calendar__column",ref:a=>this._hoursScroll=a,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((a,e)=>e===this.value.getHours()?t("div",{style:{display:"flex"},ref:a=>this._hoursSelect=a},t("div",{"data-hour":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(e)},a),t("div",{class:"separatorTime"},":")):t("div",{style:{display:"flex"}},t("div",{"data-hour":a,class:"calendar__cell",onClick:()=>this.selectHours(e)},a),t("div",{class:"separatorTime"},":"))))),t("div",{class:"calendar__column",ref:a=>this._minutesScroll=a,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getMinutes()?t("div",{style:{display:"flex"},ref:a=>this._minutesSelect=a},t("div",{"data-minute":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&t("div",{class:"separatorTime"},":")):t("div",{style:{display:"flex"}},t("div",{"data-minute":a,class:"calendar__cell",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&t("div",{class:"separatorTime"},":"))))),this.showSeconds&&t("div",{class:"calendar__column",ref:a=>this._secondsScroll=a,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getSeconds()?t("div",{"data-second":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(e),ref:a=>this._secondsSelect=a},a):t("div",{"data-second":a,class:"calendar__cell",onClick:()=>this.selectSeconds(e)},a))))))))}get _hostElem(){return l(this)}static get watchers(){return{value:["observeValue"]}}};n.style=':host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--ez-calendar__nav-btn--next-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:\'\';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto;scrollbar-width:none}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}';export{n as ez_calendar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-e4c7eb39.js";import{DateUtils as n,TimeFormatter as o,ElementIDUtils as h}from"@sankhyalabs/core";import{C as l}from"./p-ec7db713.js";import{i as r}from"./p-69344c23.js";const c=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.size="default",this.required=!1,this.canShowError=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=n.validateDate(t,!0),s=n.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=n.validateDate(this.value,!0),e=n.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),a=s.length>0?s[0]:t,h=o.prepareValue(s[1]?s[1]:"",this.showSeconds);return n.strToDate(a+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=n.validateDate(this.value,!0),i=n.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-classic-date-time-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return n.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=n.validateDate(this.value,!0),s=n.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}async componentWillLoad(){this.i18n=await r()}componentDidLoad(){l.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-classic-input",{ref:t=>this._textInput=t,"data-element-id":h.getInternalIDInfo("textInput"),"data-slave-mode":"true",label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,size:this.size,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),required:this.required,leftIconName:"calendar",leftIconClickable:this.enabled,onIconClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},onEzChange:t=>t.stopPropagation()}),e("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none","data-element-id":this._elem.getAttribute("data-element-id")},e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},time:!0,showSeconds:this.showSeconds})))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};c.style=':host{display:block;width:100%;--ez-classic-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-classic-date-input__input--border-color:var(--ez-classic-date-input__input--background-color);--ez-classic-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-classic-date-input__calendar-image);mask-image:var(--ez-classic-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-classic-input{--text-input__input--background-color:var(--ez-classic-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-classic-date-input__input--border-color, #DCE0E8)}';export{c as ez_classic_date_time_input}
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as a}from"./p-23a36bb6.js";import{DateUtils as n,TimeFormatter as o,ElementIDUtils as h}from"@sankhyalabs/core";import{C as l}from"./p-ec7db713.js";import{i as r}from"./p-69344c23.js";const c=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.size="default",this.required=!1,this.canShowError=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=n.validateDate(t,!0),s=n.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=n.validateDate(this.value,!0),e=n.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),a=s.length>0?s[0]:t,h=o.prepareValue(s[1]?s[1]:"",this.showSeconds);return n.strToDate(a+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=n.validateDate(this.value,!0),i=n.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-classic-date-time-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return n.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=n.validateDate(this.value,!0),s=n.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}async componentWillLoad(){this.i18n=await r()}componentDidLoad(){l.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-classic-input",{ref:t=>this._textInput=t,"data-element-id":h.getInternalIDInfo("textInput"),"data-slave-mode":"true",label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,size:this.size,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),required:this.required,leftIconName:"calendar",leftIconClickable:this.enabled,onIconClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},onEzChange:t=>t.stopPropagation()}),e("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none","data-element-id":this._elem.getAttribute("data-element-id")},e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},time:!0,showSeconds:this.showSeconds})))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};c.style=':host{display:block;width:100%;--ez-classic-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-classic-date-input__input--border-color:var(--ez-classic-date-input__input--background-color);--ez-classic-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-classic-date-input__calendar-image);mask-image:var(--ez-classic-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-classic-input{--text-input__input--background-color:var(--ez-classic-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-classic-date-input__input--border-color, #DCE0E8)}';export{c as ez_classic_date_time_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as s,h as t,g as e}from"./p-
|
|
1
|
+
import{r as i,c as s,h as t,g as e}from"./p-23a36bb6.js";import{NumberUtils as h,StringUtils as r,ElementIDUtils as n}from"@sankhyalabs/core";import{C as a}from"./p-ec7db713.js";import{i as o}from"./p-69344c23.js";const l=class{constructor(t){i(this,t),this.ezChange=s(this,"ezChange",7),this.ezStartChange=s(this,"ezStartChange",7),this.ezCancelWaitingChange=s(this,"ezCancelWaitingChange",7),this._focused=!1,this._changePending=!1,this._valuePromiseCallbacks=[],this._value=void 0,this.label=void 0,this.value=void 0,this.enabled=!0,this.required=!1,this.canShowError=!0,this.errorMessage=void 0,this.allowNegative=!0,this.precision=void 0,this.prettyPrecision=void 0,this.mode="regular",this.size="default",this.autoFocus=!1,this.alternativePlaceholder=void 0}async setFocus(i){this._textInput.setFocus(i)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((i=>{this._valuePromiseCallbacks.push(i)})):Promise.resolve(this.value)}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var i;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(i=this.errorMessage)||void 0===i?void 0:i.trim())||this.setInputValue())}observeValue(i,s){this._textInput&&i!=s&&this.handleNewValue(i,s),this._changePending=!1}observePrecision(){this._textInput&&this.setInputValue()}handleNewValue(i,s){const t=this.validateValue(i),e=this.validateValue(s);if(null===t&&(this._value=""),t===e)return;const h=this.getTextValue(t)||"",r=this.getParsedNumber(h);(this._value||"")===h||void 0===r&&this._focused||(this._value=h,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===t?void 0:t)}validateValue(i){return isNaN(i)||void 0===i?null:i}getTextValue(i){if(null==i)return;let s=this.precision>=0?h.format(i.toString(),Number(this.precision),Number(this.prettyPrecision)):i.toString();return 0===this.precision?r.replaceAll(s,".",""):s}changeValue(i){this.errorMessage="",this.value!=i?this.value=void 0===i?null:i:(this.setInputValue(),this.ezCancelWaitingChange.emit())}setError(i){this.value=null,this.errorMessage=i,this.ezCancelWaitingChange.emit()}handleBlur(){if(this._changePending)try{const i=this.getParsedNumber();if(void 0!==i&&isNaN(i))this.setError(this.i18n("ez-classic-number-input.invalidNumber"));else try{this.changeValue(i)}catch(i){return void this.setError(i.message)}}finally{for(const i of this._valuePromiseCallbacks)i(this.value);this._valuePromiseCallbacks=[]}}handleInput(){this.getParsedNumber()!==this.value&&(this._focused=!0,this._changePending=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1}))}getParsedNumber(i=this._textInput.value){return(null==i?void 0:i.trim())?h.stringToNumber(i):void 0}setInputValue(){const i=this.getTextValue(this.value)||"";(this._value||"")!==i&&(this._value=i,this._textInput.value=this._value)}async componentWillLoad(){this.i18n=await o()}componentDidLoad(){a.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return n.addIDInfoIfNotExists(this._elem,"input"),t("ez-classic-input",{class:"number__input","data-element-id":n.getInternalIDInfo("textInput"),ref:i=>this._textInput=i,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),enabled:this.enabled,errorMessage:this.errorMessage,size:this.size,value:this._value,required:this.required,onEzChange:i=>i.stopPropagation()})}get _elem(){return e(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"],precision:["observePrecision"],prettyPrecision:["observePrecision"]}}};l.style=":host{--ez-classic-number-input__min-width:0px;--ez-classic-number-input__max-width:100%;display:block;width:100%}.number__input{height:100%;min-width:var(--ez-classic-number-input__min-width);max-width:var(--ez-classic-number-input__max-width)}";export{l as ez_classic_number_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-
|
|
1
|
+
import{r as t,h as i}from"./p-23a36bb6.js";import{RECORD_DATE_FORMAT as a,DataUnitInMemoryLoader as e}from"@sankhyalabs/core";const s=class{constructor(i){t(this,i),this.inMemoryLoader=void 0,this.metadata=void 0,this.records=void 0,this.columnsConfig=void 0,this.pageSize=150,this.recordDateFormat=a.DD_MM_YYYY,this.multipleSelection=!1,this.autoFocus=!0,this.paginationCounterMode="auto",this.suppressCheckboxColumn=!1,this.suppressFilterColumn=!1,this.outlineMode=!1,this.enableRowTableStriped=!0,this.compact=!1,this.useSearchColumn=!0,this.suppressHorizontalScroll=!1}async getDataUnit(){if(this.hasValidDependencies())return this.ensureInMemoryLoaderExists(),this.inMemoryLoader.dataUnit}async refresh(){await this.inMemoryLoader.dataUnit.loadData()}async getSelection(){var t;return null===(t=this._gridRef)||void 0===t?void 0:t.getSelection()}async quickFilter(t){var i;await(null===(i=this._gridRef)||void 0===i?void 0:i.quickFilter(t))}async locateColumn(t){var i;await(null===(i=this._gridRef)||void 0===i?void 0:i.locateColumn(t))}async filterColumns(t){var i;return null===(i=this._gridRef)||void 0===i?void 0:i.filterColumns(t)}async addColumnMenuItem(t,i,a,e){await this._gridRef.addColumnMenuItem(t,i,a,e)}async addCustomValueFormatter(t,i){var a;await(null===(a=this._gridRef)||void 0===a?void 0:a.addCustomValueFormatter(t,i))}async removeCustomValueFormatter(t){var i;await(null===(i=this._gridRef)||void 0===i?void 0:i.removeCustomValueFormatter(t))}async addGridCustomRender(t,i,a){var e;await(null===(e=this._gridRef)||void 0===e?void 0:e.addGridCustomRender(t,i,a))}async setFocus(){var t;await(null===(t=this._gridRef)||void 0===t?void 0:t.setFocus())}async handleMetadataChanged(){await this.configGrid()}async handleRecordsChanged(){await this.configGrid()}async handlePageSizeChanged(){await this.configGrid(!0)}async handleRecordDateFormatChanged(){await this.configGrid(!0)}async configGrid(t=!1){this.hasValidDependencies()&&(this.ensureInMemoryLoaderExists(t),this.updateDURecords(),this.refreshFilterColumnDataSource())}updateDURecords(){requestAnimationFrame((()=>{this.inMemoryLoader.records=this.records}))}refreshFilterColumnDataSource(){requestAnimationFrame((async()=>{var t;await(null===(t=this._gridRef)||void 0===t?void 0:t.refreshColumnFilterDataSource())}))}hasValidDependencies(){return this.metadata&&this.records}buildGridConfig(){if(this.columnsConfig)return{columns:this.columnsConfig.map(this.parseColumnConfig.bind(this))}}parseColumnConfig(t,i){return Object.assign(Object.assign({},t),{orderIndex:i})}ensureInMemoryLoaderExists(t=!1){t&&this.clearInMemoryLoader(),this.buildInMemoryLoader()}buildInMemoryLoader(){requestAnimationFrame((()=>{this.inMemoryLoader||(this.inMemoryLoader=new e(this.metadata,this.records,this.buildInMemoryLoaderConfig()))}))}clearInMemoryLoader(){this.inMemoryLoader=void 0}buildInMemoryLoaderConfig(){return{pageSize:this.pageSize,recordDateFormat:this.recordDateFormat}}async componentDidLoad(){await this.configGrid()}render(){var t;if((null===(t=this.inMemoryLoader)||void 0===t?void 0:t.dataUnit)&&this.records)return i("ez-grid",{ref:t=>this._gridRef=t,canEdit:!1,dataUnit:this.inMemoryLoader.dataUnit,config:this.buildGridConfig(),multipleSelection:this.multipleSelection,autoFocus:this.autoFocus,paginationCounterMode:this.paginationCounterMode,suppressCheckboxColumn:this.suppressCheckboxColumn,suppressFilterColumn:this.suppressFilterColumn,suppressHorizontalScroll:this.suppressHorizontalScroll,outlineMode:this.outlineMode,enableRowTableStriped:this.enableRowTableStriped,useSearchColumn:this.useSearchColumn,compact:this.compact,onEzPageChangedChanged:()=>this.refreshFilterColumnDataSource()},i("slot",{name:"leftButtons"}),i("slot",{name:"footer"}))}static get watchers(){return{metadata:["handleMetadataChanged"],records:["handleRecordsChanged"],pageSize:["handlePageSizeChanged"],recordDateFormat:["handleRecordDateFormatChanged"]}}};s.style="";export{s as ez_grid_view}
|