@sankhyalabs/ezui 1.1.71 → 1.1.72
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/assets/actions-sprite.svg +257 -0
- package/dist/cjs/CSSVarsUtils-f8827674.js +18 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-button_16.cjs.entry.js +7 -3
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.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-time-input.cjs.entry.js +7 -70
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/{index-0f668cc5.js → index-bb6cdd1a.js} +5 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/assets/actions-sprite.svg +257 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css +0 -9
- package/dist/collection/components/ez-date-input/ez-date-input.js +5 -1
- package/dist/collection/components/ez-time-input/ez-time-input.css +0 -168
- package/dist/collection/components/ez-time-input/ez-time-input.js +8 -75
- package/dist/collection/utils/CSSVarsUtils.js +14 -0
- package/dist/custom-elements/index.js +26 -72
- package/dist/esm/CSSVarsUtils-e0128b01.js +16 -0
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-button_16.entry.js +7 -3
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.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-time-input.entry.js +7 -70
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/{index-89fc9bfd.js → index-989e6e7d.js} +5 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-762ac7a0.js → p-384f89f7.js} +1 -1
- package/dist/ezui/{p-a88ee12f.entry.js → p-55003571.entry.js} +1 -1
- package/dist/ezui/p-5c5ba099.entry.js +1 -0
- package/dist/ezui/{p-1bc9ddad.entry.js → p-65ea9879.entry.js} +1 -1
- package/dist/ezui/{p-9702db61.entry.js → p-889030b3.entry.js} +1 -1
- package/dist/ezui/{p-8d547517.entry.js → p-8b945611.entry.js} +1 -1
- package/dist/ezui/{p-b692a0ab.entry.js → p-a6a87bc5.entry.js} +1 -1
- package/dist/ezui/p-d01bcce1.entry.js +1 -0
- package/dist/ezui/p-d1889704.js +1 -0
- package/dist/ezui/{p-74e4415e.entry.js → p-e2533df1.entry.js} +1 -1
- package/dist/ezui/{p-a7e23f65.entry.js → p-edcc9e6f.entry.js} +1 -1
- package/dist/ezui/{p-1c33a56d.entry.js → p-f8f92f68.entry.js} +1 -1
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -0
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +1 -8
- package/dist/types/utils/CSSVarsUtils.d.ts +4 -0
- package/package.json +1 -1
- package/dist/ezui/p-5aa8871e.entry.js +0 -1
- package/dist/ezui/p-f7d7fb7f.entry.js +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, a as getAssetPath, H as Host, g as getElement } from './index-989e6e7d.js';
|
|
2
2
|
import { M as MaskFormatter, T as TimeFormatter, N as NumberUtils } from './RequestMetadata-c265c9d5.js';
|
|
3
|
+
import { C as CSSVarsUtils } from './CSSVarsUtils-e0128b01.js';
|
|
3
4
|
|
|
4
|
-
const ezTimeInputCss = ":host{
|
|
5
|
+
const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";
|
|
5
6
|
|
|
6
7
|
let EzTimeInput = class {
|
|
7
8
|
constructor(hostRef) {
|
|
@@ -15,17 +16,6 @@ let EzTimeInput = class {
|
|
|
15
16
|
*/
|
|
16
17
|
this.showSeconds = false;
|
|
17
18
|
}
|
|
18
|
-
showError() {
|
|
19
|
-
const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
|
|
20
|
-
if (hasError) {
|
|
21
|
-
this._inputElem.classList.add('hasError');
|
|
22
|
-
this._messageBoxElem.classList.add('hasError');
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
this._inputElem.classList.remove('hasError');
|
|
26
|
-
this._messageBoxElem.classList.remove('hasError');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
19
|
prepareMask() {
|
|
30
20
|
if (this.showSeconds) {
|
|
31
21
|
if (this._maskFormatter == undefined) {
|
|
@@ -44,23 +34,6 @@ let EzTimeInput = class {
|
|
|
44
34
|
}
|
|
45
35
|
}
|
|
46
36
|
}
|
|
47
|
-
adjustFloatingLabel() {
|
|
48
|
-
if (this.label) {
|
|
49
|
-
if (!this._inputElem.classList.contains("input--with--label")) {
|
|
50
|
-
this._inputElem.classList.add("input--with--label");
|
|
51
|
-
}
|
|
52
|
-
if (this.viewValue && this.viewValue.toString().length > 0) {
|
|
53
|
-
if (!this._labelElem.classList.contains("input__label--floated")) {
|
|
54
|
-
this._labelElem.classList.add("input__label--floated");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
if (this._labelElem.classList.contains("input__label--floated")) {
|
|
59
|
-
this._labelElem.classList.remove("input__label--floated");
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
37
|
onValueChanged() {
|
|
65
38
|
if (this.value === NaN) {
|
|
66
39
|
this.value = undefined;
|
|
@@ -83,12 +56,6 @@ let EzTimeInput = class {
|
|
|
83
56
|
this._inputElem.blur();
|
|
84
57
|
}
|
|
85
58
|
//---------------------------------------------
|
|
86
|
-
// Test Methods
|
|
87
|
-
//---------------------------------------------
|
|
88
|
-
setInputElemnt(input) {
|
|
89
|
-
this._iconElement = input;
|
|
90
|
-
}
|
|
91
|
-
//---------------------------------------------
|
|
92
59
|
// Event handlers
|
|
93
60
|
//---------------------------------------------
|
|
94
61
|
handleFocusout() {
|
|
@@ -98,7 +65,6 @@ let EzTimeInput = class {
|
|
|
98
65
|
this.clearField();
|
|
99
66
|
this.errorMessage = "Favor inserir um horário válido.";
|
|
100
67
|
}
|
|
101
|
-
this.adjustFloatingLabel();
|
|
102
68
|
}
|
|
103
69
|
prepareValue(value) {
|
|
104
70
|
try {
|
|
@@ -116,40 +82,12 @@ let EzTimeInput = class {
|
|
|
116
82
|
this.viewValue = this._inputElem.value;
|
|
117
83
|
this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
118
84
|
}
|
|
119
|
-
adjustIconStyle() {
|
|
120
|
-
if (this._iconElement) {
|
|
121
|
-
this._iconElement.style.position = "absolute";
|
|
122
|
-
this._iconElement.style.display = "flex";
|
|
123
|
-
this._iconElement.style.alignItems = "center";
|
|
124
|
-
this._iconElement.style.justifyContent = "center";
|
|
125
|
-
this._iconElement.style.overflow = "hidden";
|
|
126
|
-
this._iconElement.style.top = "0px";
|
|
127
|
-
this._iconElement.style.width = "var(--eztime__icon--width)";
|
|
128
|
-
this._iconElement.style.height = "var(--eztime--height)";
|
|
129
|
-
this._iconElement.style.left = "0px";
|
|
130
|
-
this._iconElement.style.borderRadius = "var(--eztime--border-radius) 0 0 var(--eztime--border-radius)";
|
|
131
|
-
this._inputElem.classList.add('icon--left');
|
|
132
|
-
if (this._labelElem) {
|
|
133
|
-
this._labelElem.classList.add("input__label--left");
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
this.showError();
|
|
137
|
-
}
|
|
138
|
-
doFocus() {
|
|
139
|
-
if (this.label && this._labelElem) {
|
|
140
|
-
if (!this._labelElem.classList.contains("input__label--floated")) {
|
|
141
|
-
this._labelElem.classList.add("input__label--floated");
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
85
|
//---------------------------------------------
|
|
146
86
|
// Lifecycle web component
|
|
147
87
|
//---------------------------------------------
|
|
148
88
|
componentDidLoad() {
|
|
149
89
|
this.onValueChanged();
|
|
150
|
-
this.
|
|
151
|
-
this.adjustFloatingLabel();
|
|
152
|
-
this.showError();
|
|
90
|
+
CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
153
91
|
}
|
|
154
92
|
componentWillLoad() {
|
|
155
93
|
this.prepareMask();
|
|
@@ -161,12 +99,11 @@ let EzTimeInput = class {
|
|
|
161
99
|
}
|
|
162
100
|
}
|
|
163
101
|
render() {
|
|
164
|
-
return (h(Host, null, h("ez-
|
|
165
|
-
h("label", { onClick: () => this._inputElem.focus(), class: this.value ? "input__label input__label--floated" : "input__label", ref: (el) => this._labelElem = el, title: this.label }, this.label)
|
|
166
|
-
: null, h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.viewValue, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.errorMessage)));
|
|
102
|
+
return (h(Host, null, h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage }, h("ez-icon", { slot: "leftIcon", href: getAssetPath("./assets/actions-sprite.svg") + "#timer-outline" }))));
|
|
167
103
|
}
|
|
104
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
105
|
+
get _elem() { return getElement(this); }
|
|
168
106
|
static get watchers() { return {
|
|
169
|
-
"errorMessage": ["showError"],
|
|
170
107
|
"showSeconds": ["prepareMask"],
|
|
171
108
|
"value": ["onValueChanged"]
|
|
172
109
|
}; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-989e6e7d.js';
|
|
2
2
|
|
|
3
3
|
const ezToastCss = ":host{--toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--toast__container-z-index:var(--more-visible, 2);--toast__container--background-color:var(--color--secondary, #383c45);--toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;bottom:100px;z-index:var(--toast__container-z-index);left:100px;width:30%;box-sizing:border-box;background-color:var(--toast__container--background-color);border-radius:6px;align-items:center;padding:12px;visibility:hidden}.message__container{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.message__conteiner--icon{padding-left:var(--toast__icon--padding-left);width:80%}.btn-close{display:flex;justify-content:flex-end;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--toast__btn__close__image);mask-image:var(--toast__btn__close__image)}.toast__container--oppened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@-webkit-keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}";
|
|
4
4
|
|
package/dist/esm/ezui.js
CHANGED
|
@@ -1275,6 +1275,10 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1275
1275
|
// Fallback appLoad event
|
|
1276
1276
|
endBootstrap();
|
|
1277
1277
|
};
|
|
1278
|
+
const getAssetPath = (path) => {
|
|
1279
|
+
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
1280
|
+
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
1281
|
+
};
|
|
1278
1282
|
const hostRefs = new WeakMap();
|
|
1279
1283
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1280
1284
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1361,4 +1365,4 @@ const flush = () => {
|
|
|
1361
1365
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1362
1366
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1363
1367
|
|
|
1364
|
-
export { Host as H, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
1368
|
+
export { Host as H, getAssetPath as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
package/dist/ezui/ezui.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-
|
|
1
|
+
import{p as e,b as a}from"./p-384f89f7.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-a6a87bc5",[[1,"ez-dialog",{confirm:[1028],critical:[1028],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-d01bcce1",[[1,"ez-time-input",{label:[513],viewValue:[1537,"view-value"],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}]]],["p-f8f92f68",[[1,"ez-action-chip",{label:[513],enabled:[516]}]]],["p-889030b3",[[1,"ez-label-chip",{label:[513],enabled:[516],removable:[516],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-65ea9879",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[4],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-e2533df1",[[1,"ez-number-input",{strvalue:[1025],value:[1026],label:[513],enabled:[516],errorMessage:[1537,"error-message"],precision:[1538],prettyprecision:[1538],textleft:[516],formatnumber:[513],setFocus:[64],setBlur:[64],handleFocusout:[64]}]]],["p-55003571",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],updatePosition:[64],show:[64],hide:[64]}]]],["p-edcc9e6f",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],ezTitle:[1,"ez-title"]}]]],["p-8b945611",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],show:[64]}]]],["p-5c5ba099",[[0,"ez-form",{metadataexecutor:[1],loadexecutor:[1],saveexecutor:[1],removeexecutor:[1],fieldsearchexecutor:[1],ignoresavevalidation:[4],metadata:[16],slavemode:[4],enabled:[4],loading:[1540],validate:[64],getChanges:[64],changeFieldValue:[64]}],[1,"form-metadata",{name:[1],label:[1],dataunit:[1025],many:[4],autoload:[4],metadata:[1040]}],[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"]}],[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionloader:[16],showselectedvalue:[4],showoptionvalue:[4]}],[1,"ez-numeric-input",{label:[513],value:[1538],enabled:[516],errorMessage:[1537,"error-message"],precision:[8],prettyprecision:[8]}],[1,"ez-check",{label:[513],value:[1540],enabled:[516],mode:[513],getMode:[64],setFocus:[64]}],[1,"ez-collapsible-box",{value:[1540],label:[513],headersize:[513],iconplacement:[513],showHide:[64]}],[1,"ez-tabselector",{selectedIndex:[1537,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1]}],[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],setFocus:[64],setBlur:[64]}],[1,"ez-upload",{label:[1],enabled:[4],maxfilesize:[2],maxfiles:[2],requestheaders:[8],urlupload:[1],urldelete:[1],value:[1040],addFiles:[64]}],[1,"place-holder"],[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513]}],[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],optionLoader:[16],_preSelection:[32],_visibleOptions:[32]}],[1,"ez-calendar",{value:[1040],floating:[516],show:[64],fitVertical:[64],hide:[64]}],[1,"ez-icon",{size:[513],href:[513]}],[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],mask:[1],restrict:[1],setFocus:[64],setBlur:[64]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u="http://www.w3.org/1999/xlink",a=new WeakMap,f=e=>"sc-"+e.o,h={},p=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!p(l))&&(l+=""),o&&i?r[r.length-1].i+=l:r.push(o?y(null,l):l),i=o)};if(c(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,$);const u=y(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=s,u},y=(e,t)=>({t:0,m:e,i:t,$:null,h:null,u:null,p:null}),m={},$={forEach:(e,t)=>e.map(w).forEach(t),map:(e,t)=>e.map(w).map(t).map(b)},w=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.g,vtag:e.m,vtext:e.i}),b=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),d(e.vtag,t,...e.vchildren||[])}const t=y(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.g=e.vname,t},g=(e,t,n,l,o,r)=>{if(n!==l){let c=
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u="http://www.w3.org/1999/xlink",a=new WeakMap,f=e=>"sc-"+e.o,h={},p=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!p(l))&&(l+=""),o&&i?r[r.length-1].i+=l:r.push(o?y(null,l):l),i=o)};if(c(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,$);const u=y(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=s,u},y=(e,t)=>({t:0,m:e,i:t,$:null,h:null,u:null,p:null}),m={},$={forEach:(e,t)=>e.map(w).forEach(t),map:(e,t)=>e.map(w).map(t).map(b)},w=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.g,vtag:e.m,vtext:e.i}),b=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),d(e.vtag,t,...e.vchildren||[])}const t=y(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.g=e.vname,t},g=(e,t,n,l,o,r)=>{if(n!==l){let c=Y(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=j(n),o=j(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=p(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}let i=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,i=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(i?e.removeAttributeNS(u,t):e.removeAttribute(t)):(!c||4&r||o)&&!s&&(l=!0===l?"":l,i?e.setAttributeNS(u,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):Y(s,a)?a.slice(2):a[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},v=/\s/,j=e=>e?e.split(v):[],k=(e,t,n,l)=>{const s=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||h,i=t.u||h;for(l in o)l in i||g(s,l,o[l],void 0,n,t.t);for(l in i)g(s,l,o[l],i[l],n,t.t)},S=(t,l,s)=>{let i,r,c=l.h[s],u=0;if(null!==c.i)i=c.$=o.createTextNode(c.i);else{if(n||(n="svg"===c.m),i=c.$=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.m),n&&"foreignObject"===c.m&&(n=!1),k(null,c,n),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),c.h)for(u=0;u<c.h.length;++u)r=S(t,c,u),r&&i.appendChild(r);"svg"===c.m?n=!1:"foreignObject"===i.tagName&&(n=!0)}return i},O=(e,n,l,s,o,i)=>{let r,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=i;++o)s[o]&&(r=S(null,l,o),r&&(s[o].$=r,c.insertBefore(r,n)))},M=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.$,L(l),s.remove())},x=(e,t)=>e.m===t.m&&e.p===t.p,C=(e,t)=>{const l=t.$=e.$,s=e.h,o=t.h,i=t.m,r=t.i;null===r?(n="svg"===i||"foreignObject"!==i&&n,"slot"===i||k(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,r=0,c=0,u=0,a=t.length-1,f=t[0],h=t[a],p=l.length-1,d=l[0],y=l[p];for(;i<=a&&r<=p;)if(null==f)f=t[++i];else if(null==h)h=t[--a];else if(null==d)d=l[++r];else if(null==y)y=l[--p];else if(x(f,d))C(f,d),f=t[++i],d=l[++r];else if(x(h,y))C(h,y),h=t[--a],y=l[--p];else if(x(f,y))C(f,y),e.insertBefore(f.$,h.$.nextSibling),f=t[++i],y=l[--p];else if(x(h,d))C(h,d),e.insertBefore(h.$,f.$),h=t[--a],d=l[++r];else{for(c=-1,u=i;u<=a;++u)if(t[u]&&null!==t[u].p&&t[u].p===d.p){c=u;break}c>=0?(o=t[c],o.m!==d.m?s=S(t&&t[r],n,c):(C(o,d),t[c]=void 0,s=o.$),d=l[++r]):(s=S(t&&t[r],n,r),d=l[++r]),s&&f.$.parentNode.insertBefore(s,f.$)}i>a?O(e,null==l[p+1]?null:l[p+1].$,n,l,r,p):r>p&&M(t,i,a)})(l,s,t,o):null!==o?(null!==e.i&&(l.textContent=""),O(l,null,t,o,0,o.length-1)):null!==s&&M(s,0,s.length-1),n&&"svg"===i&&(n=!1)):e.i!==r&&(l.data=r)},L=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(L)},P=e=>K(e).v,R=(e,t,n)=>{const l=P(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},W=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},T=(e,t)=>{if(e.t|=16,!(4&e.t))return W(e,e.k),ue((()=>U(e,t)));e.t|=512},U=(e,t)=>{const n=e.S;let l;return t&&(l=z(n,"componentWillLoad")),l=N(l,(()=>z(n,"componentWillRender"))),N(l,(()=>A(e,n,t)))},A=async(e,t,n)=>{const l=e.v,s=l["s-rc"];n&&(e=>{const t=e.O,n=e.v,l=t.t,s=((e,t)=>{let n=f(t),l=ne.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=a.get(e=e.head||e);s||a.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);D(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>F(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},D=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.v,o=n.O,i=n.M||y(null,null),r=(e=>e&&e.m===m)(l)?l:d(null,null,l);t=s.tagName,o.C&&(r.u=r.u||{},o.C.map((([e,t])=>r.u[t]=s[e]))),r.m=null,r.t|=4,n.M=r,r.$=i.$=s.shadowRoot||s,e=s["s-sc"],C(i,r)})(n,l)}catch(e){Z(e,n.v)}return null},F=e=>{const t=e.v,n=e.S,l=e.k;z(n,"componentDidRender"),64&e.t||(e.t|=64,V(t),z(n,"componentDidLoad"),e.L(t),l||q()),e.P(t),e.j&&(e.j(),e.j=void 0),512&e.t&&ce((()=>T(e,!1))),e.t&=-517},H=e=>{{const t=K(e),n=t.v.isConnected;return n&&2==(18&t.t)&&T(t,!1),n}},q=()=>{V(o.documentElement),ce((()=>E(s,"appload",{detail:{namespace:"ezui"}})))},z=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){Z(e)}},N=(e,t)=>e&&e.then?e.then(t):t(),V=e=>e.classList.add("hydrated"),_=(e,t,n)=>{if(t.R){e.watchers&&(t.W=e.watchers);const l=Object.entries(t.R),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>K(this).T.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=K(e),o=s.v,i=s.T.get(t),r=s.t,c=s.S;if(n=((e,t)=>null==e||p(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.R[t][0]),!(8&r&&void 0!==i||n===i)&&(s.T.set(t,n),c)){if(l.W&&128&r){const e=l.W[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){Z(e,o)}}))}2==(18&r)&&T(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=K(this);return n.U.then((()=>n.S[e](...t)))}})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){i.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.C.push([e,s]),s}))}}return e},B=e=>{z(e,"connectedCallback")},G=(e,t={})=>{const n=[],l=t.exclude||[],r=s.customElements,u=o.head,a=u.querySelector("meta[charset]"),h=o.createElement("style"),p=[];let d,y=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],R:t[2],A:t[3]};s.R=t[2],s.C=[],s.W={};const o=s.o,u=class extends HTMLElement{constructor(e){super(e),X(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),y?p.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=K(e),n=t.O,l=()=>{};if(1&t.t)B(t.S);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){W(t,t.k=n);break}}n.R&&Object.entries(n.R).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=te(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.W=s.watchers,_(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){Z(e)}t.t&=-9,t.t|=128,e(),B(t.S)}if(s.style){let e=s.style;const t=f(n);if(!ne.has(t)){const l=()=>{};((e,t,n)=>{let l=ne.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ne.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.k,i=()=>T(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>{}))}componentOnReady(){return K(this).D}};s.F=e[0],l.includes(o)||r.get(o)||(n.push(o),r.define(o,_(u,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),u.insertBefore(h,a?a.nextSibling:u.firstChild),y=!1,p.length?p.map((e=>e.connectedCallback())):i.jmp((()=>d=setTimeout(q,30)))},I=e=>{const t=new URL(e,i.l);return t.origin!==s.location.origin?t.href:t.pathname},J=new WeakMap,K=e=>J.get(e),Q=(e,t)=>J.set(t.S=e,t),X=(e,t)=>{const n={t:0,v:e,O:t,T:new Map};return n.U=new Promise((e=>n.P=e)),n.D=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],J.set(e,n)},Y=(e,t)=>t in e,Z=(e,t)=>(0,console.error)(e,t),ee=new Map,te=e=>{const t=e.o.replace(/-/g,"_"),n=e.F,l=ee.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(ee.set(n,e),e[t])),Z)},ne=new Map,le=[],se=[],oe=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?ce(re):i.raf(re))},ie=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){Z(e)}e.length=0},re=()=>{ie(le),ie(se),(l=le.length>0)&&i.raf(re)},ce=e=>r().then(e),ue=oe(se,!0);export{m as H,I as a,G as b,R as c,H as f,P as g,d as h,r as p,Q as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as o,g as e}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as o,g as e}from"./p-384f89f7.js";import"./p-9dfccb16.js";import{F as h}from"./p-ddd0ef12.js";let r=class{constructor(s){t(this,s),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._firstRender=!0,this.autoClose=!0,this.top="0px",this.left="0px",this.bottom="0px",this.right="0px",this.boxWidth="fit-content"}dispatchVisibilityChange(t,i){t!=i&&this.ezVisibilityChange.emit(t)}async updatePosition(t=this.top,i=this.left,s=this.bottom,o=this.right){h.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:s,right:o,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))})}async show(t=this.top,i=this.left,s=this.bottom,o=this.right){this._floatingID=h.float(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:s,right:o,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))}),this.opened=!0}async hide(){void 0!==this._floatingID&&(h.close(this._floatingID),this._floatingID=void 0,this.opened=!1)}componentDidRender(){this._firstRender&&(this._box.remove(),this._firstRender=!1)}render(){return s(o,null,s("section",{ref:t=>this._container=t},s("div",{class:"box "+("fit-content"===this.boxWidth?"box--fit-content":"box--full-width"),ref:t=>this._box=t},s("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["dispatchVisibilityChange"]}}};r.style=":host{--popover__box--border-radius:var(--border--radius-medium, 12px);--popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--more-visible, 1);display:flex;flex-direction:column;height:fit-content;background-color:var(--background--xlight);border-radius:var(--popover__box--border-radius);box-shadow:var(--popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";export{r as ez_popover}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as registerInstance,h,c as createEvent,f as forceUpdate,H as Host,g as getElement}from"./p-384f89f7.js";import{N as NumberUtils,M as MaskFormatter}from"./p-9dfccb16.js";import{F as FloatingManager}from"./p-ddd0ef12.js";import{C as CSSVarsUtils}from"./p-d1889704.js";const ezButtonCss=":host{--button--min-width:100px;--button--height:42px;--button__icon--width:18px;--button__inline__icon--padding:12px;--button--padding-top:var(--space--medium, 12px);--button--padding-bottom:var(--space--medium, 12px);--button--padding-right:var(--space--large, 24px);--button--padding-left:var(--space--large, 24px);--button--color:var(--text--primary, #FFF);--button--font-size:var(--text--medium, 14px);--button--font-family:var(--font-pattern, Arial);--button--font-weight:var(--text-weight--large);--button--background-color:var(--background--medium, #c0c0c0);--button--border-radius:var(--border--radius-large, 12px);--button--border:none;--button--hover--background-color:var(--background--strong, var(--button--background-color));--button--disabled-color:var(--text--disable);--button--disabled--background-color:var(--color--disable-secondary);--button--focus--border:var(--button--border);--button--focus--box-shadow:none;--button--link-color:var(--title--primary, '#C0C0C0')}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--button--min-width);height:var(--button--height);font-family:var(--button--font-family);font-size:var(--button--font-size);font-weight:var(--button--font-weight);padding:var(--button--padding-top) var(--button--padding-right) var(--button--padding-bottom) var(--button--padding-left);border-radius:var(--button--border-radius);background-color:var(--button--background-color);color:var(--button--color);fill:var(--button--color);border:var(--button--border)}button:hover{background-color:var(--button--hover--background-color)}button:focus{outline:none;border:var(--button--focus--border);box-shadow:var(--button--focus--box-shadow)}button:disabled{background-color:var(--button--disabled--background-color);color:var(--button--disabled-color);fill:var(--button--disabled-color);border:none;cursor:no-drop}button.icon{width:42px;min-width:42px;height:42px;padding:0px}a{font-family:var(--button--font-family);font-size:var(--button--font-size);font-weight:var(--button--font-weight);color:var(--button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}";let EzButton=class{constructor(t){registerInstance(this,t),this.enabled=!0,this.mode="regular"}handleSlotChange(t){const e=t.target,i=e.assignedElements()[0];"link"==this.mode?(i.style.display="inline","leftIcon"==e.name?i.style.paddingRight="var(--button__inline__icon--padding)":"rightIcon"==e.name&&(i.style.paddingLeft="var(--button__inline__icon--padding)")):i.style.setProperty("--ez-icon--color","var(--ez-icon--color)")}render(){return"icon"==this.mode?h("button",{class:"icon",type:"button",disabled:!this.enabled},h("ez-icon",{class:"icon",href:this.image,size:"large",onClick:t=>{this.enabled||t.stopPropagation()}})):"link"==this.mode?h("a",null,h("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label,h("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}})):h("button",{type:"button",disabled:!this.enabled},h("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label,h("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}))}};EzButton.style=ezButtonCss;class DateUtils{static clearTime(t,e=!0){const i=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0);return e?DateUtils.adjustDLST(i):i}static strToDate(t,e=!0,i=!1){let r;if(r=i?/^(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(t):/^(3[01]|[1-2]\d|0[1-9]|[1-9])[^\d]?(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(t),!r)return;var o=i?1:Number(r[1]),a=Number(r[i?1:2]),n=Number(r[i?2:3]),s=Number(r[i?3:4]||0),l=Number(r[i?4:5]||0),c=Number(r[i?5:6]||0);n<100&&(n+=n<30?2e3:1900);let d=new Date(n,a-1,o,s,l,c,0);return!0!==e||i||0!=s||(d=DateUtils.adjustDLST(d)),d}static adjustDLST(t){return 23==t.getHours()?new Date(t.getFullYear(),t.getMonth(),t.getDate()+1,1,0,0,0):t}}const ezCalendarCss=':host{--cal--font-family:var(--font-pattern, Arial);--cal--color:var(--title--primary, #626e82);--cal--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--cal__body--background-color:var(--background--xlight, #FFF);--cal__body--padding:var(--space--medium, 12px);--cal__body--border-radius:var(--border--radius-medium, 12px);--cal__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--cal__header-line--stroke:2px;--cal__header-line--color:var(--color--strokes, #C0C0C0);--cal__nav-btn--fill:var(--text--primary, #008561);--cal__nav-btn--hover--fill:var(--color--primary, #350404);--cal__nav-btn--width:10px;--cal__nav-btn--height:16px;--cal__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>\');--cal__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>\');--cal__cell--margin:0px var(--space--small, 12px);--cal__cell--width:var(--space--large, 24px);--cal__cell--padding:var(--space--extra-small, 3px) 0px;--cal__cell--border-radius:var(--border--radius-small, 6px);--cal__cell--over--background-color:var(--color--strokes, #C0C0C0);--cal__cell--outset--color:var(--color--strokes, #C0C0C0);--cal__cell--selected--background-color:var(--color--primary, #008561);--cal__cell--selected--color:var(--color--inverted, #FFF);--cal__btn-today--color:var(--color--primary);--cal__btn-today--hover--background-color:var(--color--strokes, #C0C0C0);--cal__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--cal__body--background-color);padding:var(--cal__body--padding);border-radius:var(--cal__body--border-radius);box-shadow:var(--cal__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--medium, 12px);margin:var(--space--small, 6px) var(--space--, 12px);font-family:var(--cal--font-family);color:var(--cal--color);text-shadow:var(--cal--text-shadow);border-bottom:solid var(--cal__header-line--stroke) var(--cal__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(--cal__nav-btn--fill);width:var(--cal__nav-btn--width);height:var(--cal__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--cal__nav-btn--previous-image);mask-image:var(--cal__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--cal__nav-btn--next-image);mask-image:var(--cal__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--cal__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--large, 600);font-size:var(--title--medium, 16px);font-family:var(--cal--font-family);color:var(--cal--color);text-shadow:var(--cal--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--small, 12px);font-family:var(--cal--font-family);color:var(--cal--color);text-shadow:var(--cal--text-shadow);padding:var(--cal__cell--padding);margin:var(--cal__cell--margin);min-width:var(--cal__cell--width);border-radius:var(--cal__cell--border-radius)}.calendar__cell:hover{background-color:var(--cal__cell--over--background-color)}.calendar__cell--secondary{color:var(--cal__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--cal--font-family);color:var(--cal--color);text-shadow:var(--cal--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--cal__cell--selected--background-color);color:var(--cal__cell--selected--color)}.calendar__body{padding:var(--space--small, 6px) 0px}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--small);padding:var(--space--extra-small, 6px);font-family:var(--cal--font-family);text-shadow:var(--cal--text-shadow);color:var(--cal__btn-today--color);border-radius:var(--cal__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--cal__btn-today--hover--background-color)}';let EzCalendar=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this._firstRender=!0,this._todayLabel="Hoje",this._weekDayLabels=["D","S","T","Q","Q","S","S"],this._monthLabels=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this.value=new Date,this.floating=!1}async show(t,e,i,r){this.floating&&(this._floatingID=FloatingManager.float(this._box,this._container,{autoClose:!0,top:t,left:e,bottom:i,right:r}),window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}async fitVertical(t,e){const i=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>i?this.show(t+"px",void 0,"unset"):this.show("unset",void 0,e+"px")}async hide(){void 0!==this._floatingID&&(FloatingManager.close(this._floatingID),this._floatingID=void 0)}valueChanged(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}getMonthLabel(){return this._monthLabels[this._currentPosition.getMonth()]+" "+this._currentPosition.getFullYear()}isSelectedDate(t){return!!this.value&&this.value.getDate()==t.getDate()&&this.value.getMonth()==t.getMonth()&&this.value.getFullYear()==t.getFullYear()}changeMonth(t){this._currentPosition.setMonth(this._currentPosition.getMonth()+t),forceUpdate(this)}selectDate(t){this.value=t,this.ezChange.emit()}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._box.remove(),this._firstRender=!1)}render(){null==this._currentPosition&&(this._currentPosition=new Date,this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const t=new Date;return t.setTime(this._currentPosition.getTime()),t.setDate(1-t.getDay()),h("section",{ref:t=>this._container=t},h("div",{class:"calendar",ref:t=>this._box=t},h("div",{class:"calendar__header"},h("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),h("label",{class:"calendar__lbl-month"},this.getMonthLabel()),h("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),h("div",{class:"calendar__body"},h("div",{class:"calendar__line"},this._weekDayLabels.map((t=>h("div",{class:"calendar__cell calendar__cell--unselectable"},t)))),[0,7,14,21,28,35].map((e=>h("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((i=>{const r=new Date;r.setTime(t.getTime()),r.setDate(r.getDate()+e+i);let o="calendar__cell";return this._currentPosition.getMonth()!=r.getMonth()?o+=" calendar__cell--secondary":this.isSelectedDate(r)&&(o+=" calendar__cell--selected"),h("div",{class:o,onClick:()=>this.selectDate(r)},r.getDate())})))))),h("div",{class:"calendar__footer"},h("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this._todayLabel))))}static get watchers(){return{value:["valueChanged"]}}};EzCalendar.style=ezCalendarCss;const ezCheckCss=':host{--check--box--width:18px;--check--box--height:18px;--check--width:calc(var(--check--box--width) + 14px);--check--height:calc(var(--check--box--width) + 14px);--check--border-radius:var(--border--radius-small);--check--checked--background-color:var(--color--primary-200);--check--focus--background-color:var(--color--strokes, #FFFFFF);--check--hover--background-color:var(--background--medium);--check--checked--disabled--background-color:var(--color--disable-secondary);--check--border:var(--border--medium) var(--title--primary);--check--disabled--border:var(--border--medium) var(--color--strokes);--check--checked--border:var(--border--medium) var(--color--primary);--check--checked--hover--background-color:var(--color--primary-200);--check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--check--check--image:url(\'data:image/svg+xml;utf8,<svg width="8" height="7" viewBox="0 0 8 7" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z"/></svg>\');--check--check--background-color:var(--color--primary);--check--check--disabled--background-color:var(--color--strokes);--switch--slider--width:34px;--switch--slider--height:14px;--switch--pin--width:20px;--switch--pin--height:20px;--switch--focus--width:32px;--switch--focus--height:32px;--switch--background-color:var(--color--strokes);--switch--disabled--background-color:var(--color--disable-secondary);--switch--checked--background-color:var(--color--primary-300);--switch--pin--background-color:var(--background--xlight);--switch--pin--disabled--background-color:var(--color--disable-secondary);--switch--pin--checked--background-color:var(--color--primary);--switch--pin--checked--disabled--background-color:#E8F7F4;--switch--pin--focus--background-color:var(--text--disable);--switch--pin--checked--focus--background-color:var(--color--primary);--check--label--font-size:var(--text--medium, 14px);--check--label--font-family:var(--font-pattern, Arial);--check--label--color:var(--title--primary, #000);--check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regularMode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--check--width);height:var(--check--height)}input.regularMode:enabled:hover{background-color:var(--check--hover--background-color)}input.regularMode:enabled:focus{outline:none;background-color:var(--check--focus--background-color)}input.regularMode:disabled{cursor:auto;background:none}input.regularMode::before{box-sizing:border-box;content:"";display:block;width:var(--check--box--width);height:var(--check--box--height);border-radius:var(--check--border-radius);border:var(--check--border)}input.regularMode:disabled::before{border:var(--check--disabled--border)}input.regularMode:checked:enabled:hover{background-color:var(--check--checked--hover--background-color)}input.regularMode:checked:enabled:focus{background-color:var(--check--checked--focus--background-color)}input.regularMode:checked::before{border:var(--check--checked--border);background-color:var(--check--checked--background-color)}input.regularMode:checked:disabled:before{border:var(--check--disabled--border);background-color:var(--check--checked--disabled--background-color)}input.regularMode:checked::after{display:flex;position:absolute;content:"";background-color:var(--check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--check--check--image);mask-image:var(--check--check--image)}input.regularMode:checked:disabled::after{background-color:var(--check--check--disabled--background-color)}input.switchMode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:none;transition:background-color var(--transition);width:var(--switch--slider--width);height:var(--switch--slider--height);background-color:var(--switch--background-color)}input.switchMode:disabled{background-color:var(--switch--disabled--background-color)}input.switchMode::after{content:"";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transform:translateY(-3px);border-radius:50%;width:var(--switch--pin--width);height:var(--switch--pin--height);background-color:var(--switch--pin--background-color)}input.switchMode:disabled::after{background-color:var(--switch--pin--disabled--background-color)}input.switchMode:checked{transition:background-color var(--transition);background-color:var(--switch--checked--background-color)}input.switchMode::before{display:block;content:"";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--switch--focus--width);height:var(--switch--focus--height);top:calc((var(--switch--slider--height) - var(--switch--focus--height)) / 2);left:calc((var(--switch--pin--width) - var(--switch--focus--width))/2);background-color:var(--switch--pin--focus--background-color)}input.switchMode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switchMode:checked:focus::before{background-color:var(--switch--pin--checked--focus--background-color);transform:translateX(calc(var(--switch--slider--width) - var(--switch--pin--width)))}input.switchMode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(calc(var(--switch--slider--width) - var(--switch--pin--width))) translateY(-3px);box-shadow:var(--shadow);background-color:var(--switch--pin--checked--background-color)}input.switchMode:checked:disabled::after{background-color:var(--switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--check--label--color);text-shadow:var(--text-shadow);font-size:var(--check--label--font-size);font-family:var(--check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--check--label--disabled--color)}';let EzCheck=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.enabled=!0,this.mode="regular"}adjustMode(){"switch"===this.mode?(this._inputElem.classList.remove("regularMode"),this._inputElem.classList.add("switchMode")):(this._inputElem.classList.remove("switchMode"),this._inputElem.classList.add("regularMode"))}async getMode(){return this.mode}async setFocus(){this._inputElem.focus()}componentDidLoad(){this.adjustMode()}changeValue(){this.value=!this.value,this.ezChange.emit()}getLabelClasses(){let t="label";return this.enabled||(t+=" label--disabled"),t}render(){return h(Host,null,h("input",{type:"checkbox",class:"regularMode",checked:!0===this.value,onChange:()=>{this.changeValue()},disabled:!this.enabled,ref:t=>this._inputElem=t}),this.label?h("label",{class:this.getLabelClasses(),onClick:()=>{this.changeValue()},title:this.label},this.label):void 0)}static get watchers(){return{mode:["adjustMode"]}}};EzCheck.style=ezCheckCss;const ezCollapsibleBoxCss=':host{--collapsible-box--height:42px;--collapsible-box--font-size:var(--title--medium, 14px);--collapsible-box--font-family:var(--font-pattern, Arial);--collapsible-box--font-weight:var(--text-weight--large, 600);--collapsible-box--color:var(--title--primary);--collapsible-box__btn--image--xsmall:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="12px" width="7.5px"><path d="M 0,10.56 4.5967752,6.0000006 0,1.3800006 1.4516132,0 7.5,6.0000006 1.4516132,12 Z"/></svg>\');--collapsible-box__btn--image--small:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="14px" width="8.68px"><path d="M 0,12.32 5.3200012,7.0000007 0,1.6100007 1.6800004,0 8.68,7.0000007 1.6800004,14 Z"/></svg>\');--collapsible-box__btn--image--medium: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>\');--collapsible-box__btn--image--large:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="18px" width="11.25px"><path d="M 0,15.84 6.8951628,9.0000009 0,2.0700009 2.1774198,0 11.25,9.0000009 2.1774198,18 Z"/></svg>\');--collapsible-box__btn--image--xlarge:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="20px" width="12.5px"><path d="M 0,17.6 7.661292,10.000001 0,2.300001 2.4193553,0 12.5,10.000001 2.4193553,20 Z"/></svg>\');--collapsible-box__btn--fill:var(--collapsible-box--color);--collapsible-box__btn--width:10px;--collapsible-box__btn--height:16px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box__title{width:100%;align-self:center;display:flex;box-sizing:border-box}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;width:100%;font-family:var(--collapsible-box--font-family);font-size:var(--collapsible-box--font-size);font-weight:var(--collapsible-box--font-weight);color:var(--collapsible-box--color)}.collapsible-box__label--icon-right{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;font-family:var(--collapsible-box--font-family);font-size:var(--collapsible-box--font-size);font-weight:var(--collapsible-box--font-weight);color:var(--collapsible-box--color)}.collapsible-box__btn{outline:none;border:none;background-color:unset;cursor:pointer;padding:1px 6px}.collapsible-box__btn::after{content:\'\';display:flex;background-color:var(--collapsible-box__btn--fill);width:var(--collapsible-box__btn--width);height:var(--collapsible-box__btn--height);transition:transform var(--transition);transform:rotate(90deg)}.collapsible-box__btn--xsmall::after{width:7.5px;height:12px;-webkit-mask-image:var(--collapsible-box__btn--image--xsmall);mask-image:var(--collapsible-box__btn--image--xsmall)}.collapsible-box__btn--small::after{width:8.68px;height:14px;-webkit-mask-image:var(--collapsible-box__btn--image--small);mask-image:var(--collapsible-box__btn--image--small)}.collapsible-box__btn--medium::after{width:10px;height:16px;-webkit-mask-image:var(--collapsible-box__btn--image--medium);mask-image:var(--collapsible-box__btn--image--medium)}.collapsible-box__btn--large::after{width:11.25px;height:18px;-webkit-mask-image:var(--collapsible-box__btn--image--large);mask-image:var(--collapsible-box__btn--image--large)}.collapsible-box__btn--xlarge::after{width:12.5px;height:20px;-webkit-mask-image:var(--collapsible-box__btn--image--xlarge);mask-image:var(--collapsible-box__btn--image--xlarge)}.collapsible-box__btn--collapsed::after{transform:rotate(0deg)}.font--xsmall{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--xlarge{font-size:20px}';let EzCollapsibleBox=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.value=!1,this.headersize="small",this.iconplacement="left"}observeValue(){this.ezChange.emit()}async showHide(){this.value=!this.value}render(){return h(Host,null,"right"==this.iconplacement?h("div",{class:"collapsible-box__title"},h("label",{class:("right"==this.iconplacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headersize?"font--"+this.headersize:""),onClick:()=>this.showHide(),title:this.label},this.label),h("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headersize:"collapsible-box__btn collapsible-box__btn--"+this.headersize,onClick:()=>this.showHide()})):h("div",{class:"collapsible-box__title"},h("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headersize:"collapsible-box__btn collapsible-box__btn--"+this.headersize,onClick:()=>this.showHide()}),h("label",{class:("right"==this.iconplacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headersize?"font--"+this.headersize:""),onClick:()=>this.showHide(),title:this.label},this.label)),this.value?null:h("slot",null))}static get watchers(){return{value:["observeValue"]}}};EzCollapsibleBox.style=ezCollapsibleBoxCss;const ezComboBoxCss=':host{--combo-box--height:42px;--combo-box--width:100%;--combo-box__icon--width:48px;--combo-box--border-radius:var(--border--radius-medium, 12px);--combo-box--border-radius-small:var(--border--radius-small, 6px);--combo-box--font-size:var(--text--medium, 14px);--combo-box--font-family:var(--font-pattern, Arial);--combo-box--font-weight--large:var(--text-weight--large, 500);--combo-box--font-weight--medium:var(--text-weight--medium, 400);--combo-box--background-color--xlight:var(--background--xlight, #fff);--combo-box__input--background-color:var(--background--medium, #e0e0e0);--combo-box__input--border:var(--border--medium, 2px solid);--combo-box__input--border-color:var(--combo-box__input--background-color);--combo-box__input--focus--border-color:var(--color--primary, #008561);--combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--combo-box__input--error--border-color:#CC2936;--combo-box__label--color:var(--title--primary, #919191);--combo-box__list-text--primary:var(--text--primary, #626e82);--combo-box__list-height:calc(var(--combo-box--font-size) + var(--combo-box--space--medium));--combo-box--drop-down__image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="16px"><path d="M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z"/></svg>\');--combo-box--search__image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="22px" width="22px"><path d="m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z"/></svg>\');--combo-box--space--medium:var(--space--medium, 12px);--combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--combo-box--width)}ez-text-input{--it__input--background-color:var(--combo-box__input--background-color, #FFFFFF);--it__input--border-color:var(--combo-box__input--border-color, #DCE0E8)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--combo-box--background-color--xlight);padding:var(--combo-box--space--small);border-radius:var(--combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--combo-box__list-height) + 2*var(--combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--combo-box--border-radius-small);padding:0 var(--combo-box--space--small);list-style-type:none;min-height:var(--combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--combo-box__list-text--primary);font-weight:var(--combo-box--font-weight--large);font-family:var(--combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--combo-box__list-text--primary);font-weight:var(--combo-box--font-weight--large);font-family:var(--combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--background--medium)}.preselected{background-color:var(--background--medium)}.btn-open-options{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-options:disabled{cursor:unset}.btn-open-options::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:16px;height:16px;-webkit-mask-image:var(--combo-box--drop-down__image);mask-image:var(--combo-box--drop-down__image)}.btn-open-options:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-options:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}.btn-open-search{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-search:disabled{cursor:unset}.btn-open-search::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:22px;height:22px;-webkit-mask-image:var(--combo-box--search__image);mask-image:var(--combo-box--search__image)}.btn-open-search:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-search:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}';let EzComboBox=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.enabled=!0,this.showSelectedValue=!1,this.showOptionValue=!1}internalUpdate(){this._inputElement&&(this._inputElement.value=this.getText()),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}getText(){let t="";const e=this.getSelectedOption();return e&&(t=this.showSelectedValue?`${e.value} - ${e.label}`:e.label),t}getSelectedOption(){return"string"==typeof this.value||this.value instanceof String?this._visibleOptions.find((t=>t.value===this.value)):this.value}updateVisibleOptions(){let t=this._source||[];if(!this.searchMode&&this._criteria){const e=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(e)>-1))}this._visibleOptions=[{value:void 0,label:""}].concat(t)}buildItem(t,e){return h("li",{class:e===this._preSelection?"item preselected":"item",id:`item_${t.value}`,onMouseDown:()=>this.selectOption(t),onMouseOver:()=>this._preSelection=void 0},h("span",{class:"item--label",title:t.label},t.label),this.showOptionValue?h("span",{class:"item--value",title:t.value},t.value):void 0)}showOptions(){this.enabled&&(this._floatingID=FloatingManager.float(this._optionsList,this._listContainer,{autoClose:!0,top:this.errorMessage?"0px":"-17px"}),window.requestAnimationFrame((()=>{this._optionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&FloatingManager.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&FloatingManager.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(t,e){window.requestAnimationFrame((()=>{const i=this._optionsList.querySelector(`li#item_${t.value}`);if(i){const t=i.parentElement,r=t.getBoundingClientRect(),o=i.getBoundingClientRect();e&&o.bottom>r.bottom?t.scrollTop=o.top:!e&&o.top<r.top&&(t.scrollTop=0)}}))}selectCurrentOption(){void 0!==this._preSelection&&(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0)}selectOption(t){if(this.getSelectedOption()!==t){const e=(null==t?void 0:t.value)?t:void 0;this.value=e,this.ezChange.emit(e)}else this.internalUpdate()}updateSource(t){t instanceof Promise?(t.then((t=>this.updateSource(t))),this.updateVisibleOptions()):(this._source=t,this.updateVisibleOptions())}loadOptions(t,e=""){this._criteria=e,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:e}):this.options)}cancelPreselection(){!this._inputElement.value&&this.value?this.selectOption(void 0):this.internalUpdate()}componentWillLoad(){if(void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let e=t.innerText,i=t.getAttribute("value");i||(i=e),this.options.push({label:e,value:i}),t.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions("PRELOAD")}componentDidRender(){void 0===this._floatingID&&this._optionsList.remove()}onTextInputChangeHandler(t){this._criteria||(this._inputElement.value=t.data);const e=t.target.value;this._criteria=e,this._criteria&&(this.searchMode?(this._changeDeboucingTimeout&&window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions("PREDICTIVE",e)}),200)):this.updateVisibleOptions(),this.showOptions())}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(t){switch(t.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection()}t.stopPropagation()}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){return h(Host,null,h("ez-text-input",{ref:t=>this._inputElement=t,enabled:this.enabled,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onEzChange:t=>t.stopPropagation(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,value:this.getText(),errorMessage:this.errorMessage},h("button",this.searchMode?{disabled:!this.enabled,tabindex:-1,class:"btn-open-search",onClick:()=>{this.loadOptions("ADVANCED")},slot:"leftIcon"}:{disabled:!this.enabled,tabindex:-1,class:"btn-open-options",slot:"rightIcon",onClick:()=>this.showOptions()})),h("section",{class:"list-container",ref:t=>this._listContainer=t},h("div",{class:"options-list",ref:t=>this._optionsList=t},this._visibleOptions.map(((t,e)=>this.buildItem(t,e))))))}get el(){return getElement(this)}static get watchers(){return{value:["internalUpdate"]}}};EzComboBox.style=ezComboBoxCss;const ezDateInputCss=':host{display:block;width:100%;--di__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:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--di__calendar-image);mask-image:var(--di__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)}';let EzDateInput=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}changeValue(t){t=null==t?null:DateUtils.clearTime(t),this._textInput.errorMessage="",this.getTextValue(t)!==this.getTextValue(this.value)&&(this.value=t,this.ezChange.emit())}showCalendar(){this.parseDate(),this._calendar.value=this.value,this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight)}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}parseDate(){const t=this._textInput.value,e=DateUtils.strToDate(t);e||!t?this.changeValue(this.value===e?this.value:e):this._textInput.errorMessage="O valor digitado não é uma data válida"}getTextValue(t){return t?new Intl.DateTimeFormat("pt-BR").format(t):null}componentDidLoad(){CSSVarsUtils.applyVarsTextInput(this._elem,this._textInput)}render(){return h(Host,null,h("ez-text-input",{ref:t=>this._textInput=t,onBlur:()=>this.parseDate(),onKeyDown:t=>{"H"!==t.key&&"h"!==t.key||this.changeValue(new Date)},label:this.label,onEzChange:t=>t.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage},h("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),h("ez-calendar",{onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},floating:!0,ref:t=>this._calendar=t}))}get _elem(){return getElement(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};function _defineProperty(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ownKeys(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(i),!0).forEach((function(e){_defineProperty(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function formatProdErrorMessage(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}EzDateInput.style=ezDateInputCss;var $$observable="function"==typeof Symbol&&Symbol.observable||"@@observable",randomString=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString()}};function isPlainObject(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function createStore(t,e,i){var r;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(formatProdErrorMessage(1));return i(createStore)(t,e)}if("function"!=typeof t)throw new Error(formatProdErrorMessage(2));var o=t,a=e,n=[],s=n,l=!1;function c(){s===n&&(s=n.slice())}function d(){if(l)throw new Error(formatProdErrorMessage(3));return a}function h(t){if("function"!=typeof t)throw new Error(formatProdErrorMessage(4));if(l)throw new Error(formatProdErrorMessage(5));var e=!0;return c(),s.push(t),function(){if(e){if(l)throw new Error(formatProdErrorMessage(6));e=!1,c();var i=s.indexOf(t);s.splice(i,1),n=null}}}function u(t){if(!isPlainObject(t))throw new Error(formatProdErrorMessage(7));if(void 0===t.type)throw new Error(formatProdErrorMessage(8));if(l)throw new Error(formatProdErrorMessage(9));try{l=!0,a=o(a,t)}finally{l=!1}for(var e=n=s,i=0;i<e.length;i++)(0,e[i])();return t}function b(t){if("function"!=typeof t)throw new Error(formatProdErrorMessage(10));o=t,u({type:ActionTypes.REPLACE})}function p(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(formatProdErrorMessage(11));function i(){t.next&&t.next(d())}return i(),{unsubscribe:e(i)}}})[$$observable]=function(){return this},t}return u({type:ActionTypes.INIT}),(r={dispatch:u,subscribe:h,getState:d,replaceReducer:b})[$$observable]=p,r}function assertReducerShape(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:ActionTypes.INIT}))throw new Error(formatProdErrorMessage(12));if(void 0===i(void 0,{type:ActionTypes.PROBE_UNKNOWN_ACTION()}))throw new Error(formatProdErrorMessage(13))}))}function combineReducers(t){for(var e=Object.keys(t),i={},r=0;r<e.length;r++){var o=e[r];"function"==typeof t[o]&&(i[o]=t[o])}var a,n=Object.keys(i);try{assertReducerShape(i)}catch(t){a=t}return function(t,e){if(void 0===t&&(t={}),a)throw a;for(var r=!1,o={},s=0;s<n.length;s++){var l=n[s],c=t[l],d=(0,i[l])(c,e);if(void 0===d)throw new Error(formatProdErrorMessage(14));o[l]=d,r=r||d!==c}return(r=r||n.length!==Object.keys(t).length)?o:t}}function compose(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function applyMiddleware(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),r=function(){throw new Error(formatProdErrorMessage(15))},o={getState:i.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=e.map((function(t){return t(o)}));return r=compose.apply(void 0,a)(i.dispatch),_objectSpread2(_objectSpread2({},i),{},{dispatch:r})}}}function createThunkMiddleware(t){return function(e){var i=e.dispatch,r=e.getState;return function(e){return function(o){return"function"==typeof o?o(i,r,t):e(o)}}}}var thunk=createThunkMiddleware();function changeFieldValue$1(t,e,i,r){return{type:"FORM/CHANGEFIELD",payload:{dataUnit:t,recordId:e,fieldName:i,value:r}}}function changeTab$1(t,e){return{type:"FORM/CHANGETAB",payload:{formId:t,index:e}}}function clearEdition$1(t,e){return{type:"FORM/CLEAREDITION",payload:{dataUnit:t,recordsLimit:e}}}function collapseExpandGroup(t,e){return{type:"FORM/COLLAPSEGROUP",payload:{collapseId:t,collapsed:e}}}function previousRecord(t){return{type:"FORM/NAVIGATE",payload:{dataUnit:t,limit:0,backward:!0}}}function nextRecord(t,e){return{type:"FORM/NAVIGATE",payload:{dataUnit:t,limit:e,backward:!1}}}function insertRecord$1(t,e){return{type:"FORM/INSERT",payload:{dataUnit:t,insertionIndex:e}}}function formLoad(){return{type:"FORM/LOAD"}}function dataLoading$1(t){return{type:"FORM/DATALOADING",payload:{dataUnit:t}}}function savingChanges$1(t){return{type:"FORM/SAVINGCHANGES",payload:{dataUnit:t}}}function dataLoaded$1(t){return{type:"FORM/DATALOADED",payload:{dataUnit:t}}}function changesSaved$1(t){return{type:"FORM/CHANGESSAVED",payload:{dataUnit:t}}}function removingRecord$1(t){return{type:"FORM/REMOVINGRECORD",payload:{dataUnit:t}}}function recordRemoved$1(t){return{type:"FORM/RECORDREMOVED",payload:{dataUnit:t}}}function invalidField$1(t,e,i,r,o,a,n){return{type:"FORM/INVALIDFIELD",payload:{tabController:t,tabIndex:e,dataUnit:i,recordId:o,recordIndex:r,fieldName:a,errorMessage:n}}}function showHideNavigationButtons(t,e){return{type:"FORM/SHOWHIDENAVBTN",payload:{buttonName:t,status:e}}}function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function createCommonjsModule(t,e,i){return t(i={path:e,exports:{},require:function(){return commonjsRequire()}},i.exports),i.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}thunk.withExtraArgument=createThunkMiddleware;var actions=createCommonjsModule((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ActionCreators=e.ActionTypes=void 0;var i={UNDO:"@@redux-undo/UNDO",REDO:"@@redux-undo/REDO",JUMP_TO_FUTURE:"@@redux-undo/JUMP_TO_FUTURE",JUMP_TO_PAST:"@@redux-undo/JUMP_TO_PAST",JUMP:"@@redux-undo/JUMP",CLEAR_HISTORY:"@@redux-undo/CLEAR_HISTORY"};e.ActionTypes=i,e.ActionCreators={undo:function(){return{type:i.UNDO}},redo:function(){return{type:i.REDO}},jumpToFuture:function(t){return{type:i.JUMP_TO_FUTURE,index:t}},jumpToPast:function(t){return{type:i.JUMP_TO_PAST,index:t}},jump:function(t){return{type:i.JUMP,index:t}},clearHistory:function(){return{type:i.CLEAR_HISTORY}}}})),helpers=createCommonjsModule((function(t,e){function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(t)?t:"string"==typeof t?[t]:e}Object.defineProperty(e,"__esModule",{value:!0}),e.parseActions=i,e.isHistory=function(t){return void 0!==t.present&&void 0!==t.future&&void 0!==t.past&&Array.isArray(t.future)&&Array.isArray(t.past)},e.includeAction=function(t){var e=i(t);return function(t){return e.indexOf(t.type)>=0}},e.excludeAction=function(t){var e=i(t);return function(t){return e.indexOf(t.type)<0}},e.combineFilters=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.reduce((function(t,e){return function(i,r,o){return t(i,r,o)&&e(i,r,o)}}),(function(){return!0}))},e.groupByActionTypes=function(t){var e=i(t);return function(t){return e.indexOf(t.type)>=0?t.type:null}},e.newHistory=function(t,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{past:t,present:e,future:i,group:r,_latestUnfiltered:e,index:t.length,limit:t.length+i.length+1}}})),debug=createCommonjsModule((function(t,e){function i(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r,o;Object.defineProperty(e,"__esModule",{value:!0}),e.set=function(t){r=t},e.start=function(t,e){o={header:[],prev:[],action:[],next:[],msgs:[]},r&&(console.group?(o.header=["%credux-undo","font-style: italic","action",t.type],o.action=l("action",n,t),o.prev=l("prev history",a,e)):(o.header=["redux-undo action",t.type],o.action=["action",t],o.prev=["prev history",e]))},e.end=function(t){var e,a,n,c,d,h,u,b,p,g,v,f,m,x,_;r&&(o.next=console.group?l("next history",s,t):["next history",t],v=o.header,f=o.prev,m=o.next,x=o.action,_=o.msgs,console.group?((e=console).groupCollapsed.apply(e,i(v)),(a=console).log.apply(a,i(f)),(n=console).log.apply(n,i(x)),(c=console).log.apply(c,i(m)),(d=console).log.apply(d,i(_)),console.groupEnd()):((h=console).log.apply(h,i(v)),(u=console).log.apply(u,i(f)),(b=console).log.apply(b,i(x)),(p=console).log.apply(p,i(m)),(g=console).log.apply(g,i(_))))},e.log=function(){if(r){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];o.msgs=o.msgs.concat([].concat(e,["\n"]))}};var a="#9E9E9E",n="#03A9F4",s="#4CAF50";function l(t,e,i){return["%c".concat(t),"color: ".concat(e,"; font-weight: bold"),i]}})),reducer=createCommonjsModule((function(t,e){function i(t){return(i="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})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.set(e.debug);var i,o=n({limit:void 0,filter:function(){return!0},groupBy:function(){return null},undoType:actions.ActionTypes.UNDO,redoType:actions.ActionTypes.REDO,jumpToPastType:actions.ActionTypes.JUMP_TO_PAST,jumpToFutureType:actions.ActionTypes.JUMP_TO_FUTURE,jumpType:actions.ActionTypes.JUMP,neverSkipReducer:!1,ignoreInitialState:!1,syncFilter:!1},e,{initTypes:(0,helpers.parseActions)(e.initTypes,["@@redux-undo/INIT"]),clearHistoryType:(0,helpers.parseActions)(e.clearHistoryType,[actions.ActionTypes.CLEAR_HISTORY])}),a=o.neverSkipReducer?function(e,i){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];return n({},e,{present:t.apply(void 0,[e.present,i].concat(o))})}:function(t){return t};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.start(n,e);for(var s,l=e,g=arguments.length,v=new Array(g>2?g-2:0),f=2;f<g;f++)v[f-2]=arguments[f];if(!i){if(r.log("history is uninitialized"),void 0===e){var m={type:"@@redux-undo/CREATE_HISTORY"},x=t.apply(void 0,[e,m].concat(v));return l=c(x,o.ignoreInitialState),r.log("do not set initialState on probe actions"),r.end(l),l}(0,helpers.isHistory)(e)?(l=i=o.ignoreInitialState?e:(0,helpers.newHistory)(e.past,e.present,e.future),r.log("initialHistory initialized: initialState is a history",i)):(l=i=c(e,o.ignoreInitialState),r.log("initialHistory initialized: initialState is not a history",i))}switch(n.type){case void 0:return l;case o.undoType:return s=b(l,-1),r.log("perform undo"),r.end(s),a.apply(void 0,[s,n].concat(v));case o.redoType:return s=b(l,1),r.log("perform redo"),r.end(s),a.apply(void 0,[s,n].concat(v));case o.jumpToPastType:return s=u(l,n.index),r.log("perform jumpToPast to ".concat(n.index)),r.end(s),a.apply(void 0,[s,n].concat(v));case o.jumpToFutureType:return s=h(l,n.index),r.log("perform jumpToFuture to ".concat(n.index)),r.end(s),a.apply(void 0,[s,n].concat(v));case o.jumpType:return s=b(l,n.index),r.log("perform jump to ".concat(n.index)),r.end(s),a.apply(void 0,[s,n].concat(v));case p(n.type,o.clearHistoryType):return s=c(l.present,o.ignoreInitialState),r.log("perform clearHistory"),r.end(s),a.apply(void 0,[s,n].concat(v));default:if(s=t.apply(void 0,[l.present,n].concat(v)),o.initTypes.some((function(t){return t===n.type})))return r.log("reset history due to init action"),r.end(i),i;if(l._latestUnfiltered===s)return l;var _="function"==typeof o.filter&&!o.filter(n,s,l);if(_){var w=(0,helpers.newHistory)(l.past,s,l.future,l.group);return o.syncFilter||(w._latestUnfiltered=l._latestUnfiltered),r.log("filter ignored action, not storing it in past"),r.end(w),w}var y=o.groupBy(n,s,l);if(null!=y&&y===l.group){var k=(0,helpers.newHistory)(l.past,s,l.future,l.group);return r.log("groupBy grouped the action with the previous action"),r.end(k),k}return l=d(l,s,o.limit,y),r.log("inserted new state into history"),r.end(l),l}}};var r=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=a?Object.getOwnPropertyDescriptor(t,n):null;s&&(s.get||s.set)?Object.defineProperty(r,n,s):r[n]=t[n]}return r.default=t,e&&e.set(t,r),r}(debug);function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function n(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(t,e){var i=(0,helpers.newHistory)([],t,[]);return e&&(i._latestUnfiltered=null),i}function d(t,e,i,o){var a=t.past.length+1;r.log("inserting",e),r.log("new free: ",i-a);var n=t._latestUnfiltered,s=t.past.slice(i&&i<=a?1:0),c=null!=n?[].concat(l(s),[n]):s;return(0,helpers.newHistory)(c,e,[],o)}function h(t,e){if(e<0||e>=t.future.length)return t;var i=t.future,r=t._latestUnfiltered,o=[].concat(l(t.past),[r],l(i.slice(0,e))),a=i[e],n=i.slice(e+1);return(0,helpers.newHistory)(o,a,n)}function u(t,e){if(e<0||e>=t.past.length)return t;var i=t.past,r=t.future,o=t._latestUnfiltered,a=i.slice(0,e),n=[].concat(l(i.slice(e+1)),[o],l(r));return(0,helpers.newHistory)(a,i[e],n)}function b(t,e){return e>0?h(t,e-1):e<0?u(t,t.past.length+e):t}function p(t,e){return e.indexOf(t)>-1?t:!t}})),lib=createCommonjsModule((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ActionTypes",{enumerable:!0,get:function(){return actions.ActionTypes}}),Object.defineProperty(e,"ActionCreators",{enumerable:!0,get:function(){return actions.ActionCreators}}),Object.defineProperty(e,"parseActions",{enumerable:!0,get:function(){return helpers.parseActions}}),Object.defineProperty(e,"isHistory",{enumerable:!0,get:function(){return helpers.isHistory}}),Object.defineProperty(e,"includeAction",{enumerable:!0,get:function(){return helpers.includeAction}}),Object.defineProperty(e,"excludeAction",{enumerable:!0,get:function(){return helpers.excludeAction}}),Object.defineProperty(e,"combineFilters",{enumerable:!0,get:function(){return helpers.combineFilters}}),Object.defineProperty(e,"groupByActionTypes",{enumerable:!0,get:function(){return helpers.groupByActionTypes}}),Object.defineProperty(e,"newHistory",{enumerable:!0,get:function(){return helpers.newHistory}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r.default}});var i,r=(i=reducer)&&i.__esModule?i:{default:i}}));const undoable=getDefaultExportFromCjs(lib),inicialHistState={currentTabIndex:{},currentRecordIndex:{},changes:{},collapsedGroups:{},newRecordIndex:{}},inicialNonHistState={dataLoading:{},invalidFields:{},visibleButtons:{previousVisible:!0,nextVisible:!0,addVisible:!0,removeVisible:!0,saveVisible:!0,cancelVisible:!0,reloadVisible:!1}};function formReducer(t=inicialHistState,e){switch(e.type){case"FORM/COLLAPSEGROUP":return collapseGroup(t,e.payload);case"FORM/CHANGETAB":return changeTab(t,e.payload.formId,e.payload.index);case"FORM/NAVIGATE":return navigate(t,e.payload);case"FORM/INSERT":return insertRecord(t,e.payload);case"FORM/CHANGEFIELD":return changeFieldValue(t,e.payload);case"FORM/CLEAREDITION":return clearEdition(t,e.payload);case"FORM/INVALIDFIELD":return navigateToInvalid(t,e.payload);default:return t}}function formNonHistoricReducer(t=inicialNonHistState,e){switch(e.type){case"FORM/DATALOADING":return dataLoading(t,e.payload);case"FORM/DATALOADED":return dataLoaded(t,e.payload);case"FORM/SAVINGCHANGES":return savingChanges(t,e.payload);case"FORM/CHANGESSAVED":return changesSaved(t,e.payload);case"FORM/REMOVINGRECORD":return removingRecord(t,e.payload);case"FORM/RECORDREMOVED":return recordRemoved(t,e.payload);case"FORM/INVALIDFIELD":return invalidField(t,e.payload);case"FORM/CLEAREDITION":return clearAllInvalidFields(t,e.payload);case"FORM/CHANGEFIELD":return clearInvalidField(t,e.payload);case"FORM/SHOWHIDENAVBTN":return showHideNavBtn(t,e.payload);default:return t}}function collapseGroup(t,{collapseId:e,collapsed:i}){const r=Object.assign({},t.collapsedGroups);return i?r[e]=!0:delete r[e],Object.assign(Object.assign({},t),{collapsedGroups:r})}function changeTab(t,e,i){const r=Object.assign({},t.currentTabIndex);return r[e]=i,Object.assign(Object.assign({},t),{currentTabIndex:r})}function navigate(t,{dataUnit:e,limit:i,backward:r}){const o=Object.assign({},t.currentRecordIndex)[e]||0;return gotoIndex(t,e,r?Math.max(i,o-1):Math.min(i,o+1))}function gotoIndex(t,e,i){const r=Object.assign({},t.currentRecordIndex);return r[e]=i,Object.assign(Object.assign({},t),{currentRecordIndex:r})}function insertRecord(t,{dataUnit:e,insertionIndex:i}){const r=Object.assign({},t.currentRecordIndex),o=Object.assign({},t.newRecordIndex);return r[e]=i,o[e]=(t.newRecordIndex[e]||0)+1,Object.assign(Object.assign({},t),{currentRecordIndex:r,newRecordIndex:o})}function changeFieldValue(t,{dataUnit:e,recordId:i,fieldName:r,value:o}){const a=Object.assign({},t.changes),n=Object.assign({},a[e]),s=Object.assign({},n[i]);s[r]=o,n[i]=s,a[e]=n;const l=Object.assign({},t.invalidFields),c=Object.assign({},l[e]),d=Object.assign({},c[i]);return delete d[r],c[i]=d,l[e]=c,Object.assign(Object.assign({},t),{changes:a,invalidFields:l,invalidFieldSelected:void 0})}function clearEdition(t,{dataUnit:e,recordsLimit:i}){const r=Object.assign({},t.changes),o=Object.assign({},t.newRecordIndex),a=Object.assign({},t.currentRecordIndex);return delete r[e],delete o[e],a[e]=Math.min(i,a[e]||0),Object.assign(Object.assign({},t),{changes:r,newRecordIndex:o,currentRecordIndex:a})}function navigateToInvalid(t,e){let i=Object.assign({},t);return void 0===i.invalidFieldSelected&&(i.invalidFieldSelected=!0,i=gotoIndex(i,e.dataUnit,e.recordIndex),i=changeTab(i,e.tabController,e.tabIndex)),i}function dataLoading(t,{dataUnit:e}){const i=Object.assign({},t.dataLoading);return i[e]=!0,Object.assign(Object.assign({},t),{dataLoading:i})}function dataLoaded(t,{dataUnit:e}){const i=Object.assign({},t.dataLoading);return delete i[e],Object.assign(Object.assign({},t),{dataLoading:i})}function savingChanges(t,{dataUnit:e}){const i=Object.assign({},t.dataLoading);return i[e]=!0,Object.assign(Object.assign({},t),{dataLoading:i})}function changesSaved(t,{dataUnit:e}){const i=Object.assign({},t.dataLoading);return delete i[e],Object.assign(Object.assign({},t),{dataLoading:i})}function removingRecord(t,{dataUnit:e}){const i=Object.assign({},t.dataLoading);return i[e]=!0,Object.assign(Object.assign({},t),{dataLoading:i})}function recordRemoved(t,{dataUnit:e}){const i=Object.assign({},t.dataLoading);return delete i[e],Object.assign(Object.assign({},t),{dataLoading:i})}function invalidField(t,{dataUnit:e,recordId:i,fieldName:r,errorMessage:o}){const a=Object.assign({},t.invalidFields),n=Object.assign({},a[e]),s=Object.assign({},n[i]);return s[r]=o,n[i]=s,a[e]=n,Object.assign(Object.assign({},t),{invalidFields:a})}function clearAllInvalidFields(t,{dataUnit:e}){const i=Object.assign({},t.invalidFields);return delete i[e],Object.assign(Object.assign({},t),{invalidFields:i})}function clearInvalidField(t,{dataUnit:e,recordId:i,fieldName:r}){const o=Object.assign({},t.invalidFields),a=Object.assign({},o[e]),n=Object.assign({},a[i]);return delete n[r],a[i]=n,o[e]=a,Object.assign(Object.assign({},t),{invalidFields:o})}function showHideNavBtn(t,{buttonName:e,status:i}){const r=Object.assign({},t.visibleButtons);return r[e]=i,Object.assign(Object.assign({},t),{visibleButtons:r})}class Application{static async showDialog(t,e,i=null,r,o=!1){return new Promise((a=>{let n=document.querySelector("ez-dialog");n||(n=document.createElement("ez-dialog"),window.document.body.appendChild(n)),n.show(t,e,o,r,i).then((t=>a(t)))}))}static async alert(t,e,i=null){return Application.showDialog(t,e,i,!1,!1)}static async error(t,e,i=null){return Application.showDialog(t,e,i,!1,!0)}static async confirm(t,e,i=null,r=!1){return Application.showDialog(t,e,i,!0,r)}static async info(t){let e=document.querySelector("ez-toast");e||(e=document.createElement("ez-toast"),window.document.body.appendChild(e)),e.message=t,e.fadeTime=4e3,e.show()}}function removeHandler(t){Application.confirm("Exclusão de registro","Tem certeza que deseja Remover?",null,!0).then((e=>{e&&t.remove()}))}function saveHandler(t){setTimeout((()=>{t.save()}),50)}const NavigationBar=({dataUnit:t,buttonProps:e,enabled:i})=>e.previousVisible||e.nextVisible||e.addVisible||e.removeVisible||e.saveVisible||e.cancelVisible||e.reloadVisible?h("div",{class:"col col--sd-12 align--right"},e.previousVisible?h("ez-button",{key:t.name+"_previous",title:"Registro anterior",mode:"icon",enabled:i&&t.hasPrevious(),onClick:()=>t.previous(),image:"/themes/default/images/icons/actions-sprite.svg#previous-circle-inverted",class:"button--secondary margin-right--medium"}):null,e.nextVisible?h("ez-button",{key:t.name+"_next",title:"Próximo registro",mode:"icon",enabled:i&&t.hasNext(),onClick:()=>t.next(),image:"/themes/default/images/icons/actions-sprite.svg#next-circle-inverted",class:"button--secondary margin-right--medium"}):null,e.removeVisible?h("ez-button",{key:t.name+"_remove",label:"Remover",enabled:i&&t.hasCurrentRecord(),onClick:()=>removeHandler(t),image:"/themes/default/images/icons/actions-sprite.svg#minus-circle-inverted",class:"button--secondary margin-right--medium"}):null,e.addVisible?h("ez-button",{key:t.name+"_add",label:"Adicionar",enabled:i,onClick:()=>t.insert(),class:"button--secondary margin-right--medium"}):null,e.reloadVisible?h("ez-button",{key:t.name+"_reload",title:"Recarregar",enabled:i,mode:"icon",onClick:()=>t.load(),image:"/themes/default/images/icons/actions-sprite.svg#rotate",class:"button--secondary margin-right--medium"}):null,e.cancelVisible?h("ez-button",{key:t.name+"_cancel",label:"Cancelar",enabled:i&&t.hasChanges(),onClick:()=>t.cancel(),class:"button--secondary margin-right--medium"}):null,e.saveVisible?h("ez-button",{key:t.name+"_save",label:"Salvar",enabled:i&&t.hasChanges(),onClick:()=>saveHandler(t),class:"button--primary margin-right--medium"}):null):null,selectCurrentTab=(t,e)=>t.hist.present.currentTabIndex[e]||0,selectIsCollapsedFieldSet=(t,e)=>t.hist.present.collapsedGroups[e],selectRecordChanges=(t,e,i)=>{const r=selectDataUnitChanges(t,e);return r?r[i]:void 0},selectDataUnitChanges=(t,e)=>t.hist.present.changes[e],selectCurrentRecordIndex=(t,e)=>t.hist.present.currentRecordIndex[e]||0,selectNewRecordIndex=(t,e)=>t.hist.present.newRecordIndex[e]||0,selectLoadingData=(t,e)=>t.nonhist.dataLoading[e],selectErrorMessage=(t,e,i,r)=>((t.nonhist.invalidFields[e]||{})[i]||{})[r]||"",selectVisibleButtons=t=>t.nonhist.visibleButtons;class DataUnit{constructor(t,e,i="1",r=null){this.name=t,this.unitLabel=e,this.cardinality=i,this._children=[],this._fields=new Map,this._requiredFields=[],null!=r&&(r._children.push(this),this.parentDU=r,this.parentDUName=r.name)}set store(t){this._store=t}set fields(t){t&&t.forEach((t=>this.addFieldMetadata(t)))}addFieldMetadata(t){this._fields.set(t.name,t),t.required&&this._requiredFields.push(t)}getFieldMetadata(t){if(this._fields)return this._fields.get(t)}get requiredFields(){return this._requiredFields}isLoading(){return selectLoadingData(this._store.getState(),this.name)}hasChanges(){const t=this._store.getState();return void 0!==selectDataUnitChanges(t,this.name)||selectNewRecordIndex(t,this.name)>0}hasNext(){return selectCurrentRecordIndex(this._store.getState(),this.name)<this.records.length-1}hasPrevious(){return selectCurrentRecordIndex(this._store.getState(),this.name)>0}hasCurrentRecord(){return null!=this.getCurrentRecord()}previous(){this._store.dispatch(previousRecord(this.name))}next(){this._store.dispatch(nextRecord(this.name,this.records.length))}getValue(t){const e=this.getCurrentRecord();if(!e)return;const i=this.getRecordChanges(e);return i&&void 0!==i[t]?i[t]:e[t]||null}getErrorMessage(t){const e=this.getCurrentRecord();return selectErrorMessage(this._store.getState(),this.name,null==e?void 0:e.record__id,t)}changeValue(t,e){0==this.records.length&&this.insert(),this._changeDeboucing&&window.clearTimeout(this._changeDeboucing),this._changeDeboucing=window.setTimeout((()=>{const i=this.getCurrentRecord();this._store.dispatch(changeFieldValue$1(this.name,i.record__id,t,e))}),100)}cancel(){this.records=this.records.filter((t=>!t.record__id.startsWith("NEW_"))),this._store.dispatch(clearEdition$1(this.name,this.records.length-1))}insert(){const t=this.records.length,e={record__id:"NEW_"+(selectNewRecordIndex(this._store.getState(),this.name)+1)};this.bindToParent(e),this.records.push(e),this._store.dispatch(insertRecord$1(this.name,t))}buildChange(t){const e=selectDataUnitChanges(this._store.getState(),this.name);let i;e&&(i=e[t.record__id]);let r=[];if(this._children.forEach((e=>{r=r.concat(e.getSubChanges(t.record__id))})),i||r.length>0){const e={__data__unit:this.name,__record__id:t.record__id,__sub__changes:r};return i&&Object.keys(i).forEach((t=>{e[t]=i[t]})),e}}getSubChanges(t){const e=[];return this._records&&this._records.filter((e=>e.parent__record__id===t)).forEach((t=>{const i=this.buildChange(t);i&&e.push(i)})),e}getChangesToSave(){let t=[];return this._records&&this._records.forEach((e=>{const i=this.buildChange(e);i&&t.push(i)})),t}save(){if(!this.validateRecords("SAVE"))return;let t;this._store.dispatch(savingChanges$1(this.name)),this.saveExecutor&&(t=this.saveExecutor(this.getChangesToSave())),t instanceof Promise?t.then((t=>this.processSaveResult(t))).catch((t=>{this._store.dispatch(dataLoaded$1(this.name)),Application.error("Falha ao tentar salvar",t)})):this.processSaveResult(t)}load(){let t;this._store.dispatch(dataLoading$1(this.name)),this.loadExecutor&&(t=this.loadExecutor({dataUnit:this.name})),t instanceof Promise?t.then((t=>this.processLoadResult(t))):this.processLoadResult(t)}remove(){const t=selectCurrentRecordIndex(this._store.getState(),this.name);let e;if(this._store.dispatch(removingRecord$1(this.name)),this.removeExecutor){const t=this.getCurrentRecord();e=this.removeExecutor({dataUnit:this.name,recordId:t.record__id,record:t})}else e=!0;e&&(e instanceof Promise?e.then((e=>this.processRemoveResult(e,t))):this.processRemoveResult(e,t))}processSaveResult(t){t&&(t instanceof Array?t.forEach((t=>this.processSaveResult(t))):t.__data__unit===this.name&&"1"===this.cardinality&&(this.records=[this.buildRecordFromSaveResult(this.records[0],t)])),this._store.dispatch(clearEdition$1(this.name,this.records.length-1)),this._store.dispatch(changesSaved$1(this.name))}buildRecordFromSaveResult(t,e){const i=t?Object.assign({},t):{record__id:""};return Object.keys(e).forEach((t=>{t.startsWith("__")||(i[t]=e[t])})),i}processLoadResult(t){this.records=t,this._store.dispatch(clearEdition$1(this.name,this.records.length-1)),this._store.dispatch(dataLoaded$1(this.name))}processRemoveResult(t,e){t&&(this.records.splice(e,1),this._store.dispatch(clearEdition$1(this.name,this.records.length-1))),this._store.dispatch(recordRemoved$1(this.name))}set records(t){this._records=t,this.parentDU&&this._records.forEach((t=>this.bindToParent(t)))}bindToParent(t){if(this.parentDU){const e=this.parentDU.getCurrentRecord();e&&(t.parent__record__id=e.record__id)}}get records(){return this._records||(this._records=[]),this._records}getCurrentRecord(){const t=selectCurrentRecordIndex(this._store.getState(),this.name);return this.records[t]}getRecordChanges(t){return void 0===t&&(t=this.getCurrentRecord()),t?selectRecordChanges(this._store.getState(),this.name,t.record__id):void 0}validateRecords(t="UNKNOWN"){if(!this.recordsValidator)return!0;const e=selectDataUnitChanges(this._store.getState(),this.name),i=[];this.records.forEach(((t,r)=>{const o=e?e[t.record__id]:void 0;o&&i.push(Object.assign(Object.assign(Object.assign({},t),o),{record__index:r,record__changedfields:Object.keys(o)}))}));const r=this.recordsValidator.validateRecords(this,i,t);return r.message&&Application.info(r.message),r.isValid}}var DependencyType;function scrollToView(t,e){t&&window.requestAnimationFrame((()=>e.scrollIntoView()))}!function(t){t.SEARCHING="SEARCHING",t.REQUIREMENT="REQUIREMENT",t.VISIBILITY="REQUIREMENT"}(DependencyType||(DependencyType={}));const Field=({dataUnit:t,field:e,forceScroll:i,enabled:r})=>{const{name:o,form:a}=e,{label:n,userInterface:s,properties:l,required:c,dependencies:d,readOnly:u}=t.getFieldMetadata(o),b=t.getValue(o)||null,p=t.isLoading(),g=c?`* ${n} (obrigatório)`:n,v=t.getErrorMessage(o),f=`${t.name}-${o}`,m=r&&!u,x=e=>{t.changeValue(o,e)};switch(s){case"LONGTEXT":return h("div",{class:"col col--sd-12 padding--small"},p?h("place-holder",null):h("ez-text-area",{value:b||"",label:g,onEzChange:t=>x(t.target.value),errorMessage:v,ref:t=>scrollToView(i,t),key:f,enabled:m}));case"CHECKBOX":case"SWITCH":return h("div",{class:"col col--sd-12 col--tb-3 padding--small align--middle padding-bottom--large"},p?h("place-holder",null):h("ez-check",{value:b,label:n,enabled:m,mode:"CHECKBOX"===s?"regular":"switch",onEzChange:t=>x(t.target.value),ref:t=>scrollToView(i,t),key:f}));case"OPTIONSELECTOR":const e=l?JSON.parse(getProp(l,"options")):{},r=Object.keys(e).map((t=>({value:t,label:e[t]})));return h("div",{class:"col col--sd-12 col--tb-3 padding--small"},p?h("place-holder",null):h("ez-combo-box",{value:b,label:g,enabled:m,onEzChange:t=>x(t.target.value),errorMessage:v,ref:t=>scrollToView(i,t),key:f,options:r}));case"SEARCH":const c={__MAIN_FORM:a,__DATA_UNIT:t.name,__FIELD_NAME:o};l.forEach((({name:t,value:e})=>{c[t]=e}));let u=[];return null==d||d.forEach((e=>{var i;if(e.type===DependencyType.SEARCHING&&(null===(i=e.masterFields)||void 0===i?void 0:i.length)>0){let i={expression:e.expression,paramNames:[...e.masterFields],paramResolver:e=>t.getValue(e)};u.push(i)}})),u.length>0&&(c.CRITERIA=u),h("div",{class:"col col--sd-12 col--tb-3 padding--small"},p?h("place-holder",null):h("ez-search",{value:b,label:g,enabled:m,onEzChange:t=>x(t.target.value),errorMessage:v,optionloader:t=>{if(a)return a.loadSearch(t,c)},ref:t=>scrollToView(i,t),key:f}));case"FILE":const _=getProp(l,"URL"),w=getProp(l,"HEADERS"),y=w?JSON.parse(w):{},k=Number(getProp(l,"maxfiles")||0);return h("div",{class:"col col--sd-12 padding--small"},p?h("place-holder",null):h("ez-upload",{value:b,label:g,enabled:m,onEzChange:t=>x(t.detail),urlupload:_,requestheaders:y,maxfiles:k}));case"DATE":return h("div",{class:"col col--sd-12 col--tb-3 padding--small"},p?h("place-holder",null):h("ez-date-input",{value:b?DateUtils.clearTime(b):null,label:g,enabled:m,onEzChange:t=>x(t.target.value),errorMessage:v,ref:t=>scrollToView(i,t),key:f}));case"DECIMALNUMBER":case"INTEGERNUMBER":let E=0,C=0;return"DECIMALNUMBER"===s&&(E=Number(getProp(l,"precision")||2),C=Number(getProp(l,"prettyprecision")||E)),h("div",{class:"col col--sd-12 col--tb-3 padding--small"},p?h("place-holder",null):h("ez-numeric-input",{value:b||null,label:g,enabled:m,onEzChange:t=>x(t.target.value),errorMessage:v,precision:E,prettyprecision:C,ref:t=>scrollToView(i,t),key:f}));default:return h("div",{class:"col col--sd-12 col--tb-3 padding--small"},p?h("place-holder",null):h("ez-text-input",{value:b,label:g,enabled:m,loading:p,onInput:t=>x(t.target.value),errorMessage:v,ref:t=>scrollToView(i,t),key:f}))}};function getProp(t,e){var i;return t?null===(i=t.find((t=>t.name===e)))||void 0===i?void 0:i.value:null}const FieldSet=({store:t,formName:e,source:i,dataUnit:r,enabled:o})=>{const{label:a,fields:n}=i,s=e+a;let l,c=selectIsCollapsedFieldSet(t.getState(),e+a);return i.fields.forEach((t=>{if(void 0===l){const e=r.getErrorMessage(t.name);null!=e&&""!==e&&(l=t.name)}})),l&&(c=!1),h("div",{class:"col col--sd-12 padding--small"},h("div",{class:"row margin-top--large"},h("div",{class:"col col--sd-12 align--middle padding-horizontal--medium"},h("ez-collapsible-box",{value:c,label:a,onEzChange:()=>t.dispatch(collapseExpandGroup(s,!c))}),c?null:h("div",{class:"col col--sd-12"},n.map((t=>h(Field,{enabled:o,field:t,dataUnit:r,forceScroll:l===t.name})))))))};function buildFormItem(t,e,i,r,o){if("fields"in t)return h(FieldSet,{enabled:o,source:t,store:i,formName:e,dataUnit:r});const a=r.getErrorMessage(t.name);return h(Field,{enabled:o,field:t,dataUnit:r,forceScroll:null!=a&&""!==a})}const FormSheet=({store:t,parentName:e,source:i,parentDataUnit:r,dataUnitBuilder:o,enabled:a})=>{const n=selectCurrentTab(t.getState(),e),s=i.length>1?i.map((t=>h("ez-tab",{label:t.label,tabKey:t.name}))):null,{subForms:l,items:c,name:d}=i[n],u=o(i[n].dataUnit,r);i[n].dataUnit=u;const b=l&&l.length>0,p=u||r;let g=selectVisibleButtons(t.getState());return"1"===p.cardinality&&(g.addVisible=!1,g.removeVisible=!1,g.nextVisible=!1,g.previousVisible=!1),h("div",{class:"form-sheet"},s?h("ez-tabselector",{selectedIndex:n,selectedTab:d,onChange:i=>{t.dispatch(changeTab$1(e,i.target.selectedindex))}},s):null,u?h(NavigationBar,{enabled:a,dataUnit:u,buttonProps:g}):null,h("div",{class:"tab__container"},c?c.map((e=>buildFormItem(e,d,t,p,a))):null,b?h(FormSheet,{enabled:a,store:t,source:l,parentName:d,parentDataUnit:p,dataUnitBuilder:o}):null))},ezFormCss="ez-form{display:flex;flex-direction:column;width:100%}.form-sheet{display:flex;width:100%;flex-wrap:wrap;position:relative}.tab__container{display:flex;width:100%;flex-wrap:wrap;position:relative}";let EzForm=class{constructor(t){registerInstance(this,t),this.enabled=!0,this.loading=!1,this._dataUnits=new Map,this._duSources=new Map,this._tabPositionByField=new Map,this._duToLoad=[]}cleanPreparedMetadata(){this._preparedMetadata=void 0}async validate(){for(let t=0;t<this._duSources.size;t++){const e=Array.from(this._duSources.keys())[t];let i=this._dataUnits.get(e);if(void 0===i){const t=this._duSources.get(e);i=this.buildDataUnit(t,t.parentDUName)}if(!i.validateRecords())return!1}return!0}async getChanges(){let t=[];for(let e=0;e<this._dataUnits.size;e++){const i=Array.from(this._dataUnits.values())[e];if(!i.parentDU){const e=i.getChangesToSave();e&&(t=t.concat(e))}}return t}async changeFieldValue(t,e,i){const r=this._dataUnits.get(t);r&&r.changeValue(e,i)}validateRecords(t,e,i){const r={isValid:!0,message:""};if(this.ignoresavevalidation&&"SAVE"===i)return r;const o=e=>{t.requiredFields.forEach((i=>{if((t=>!t.readOnly&&"SWITCH"!==t.userInterface&&"CHECKBOX"!==t.userInterface)(i)){const o=e.record__index,a=e[i.name];if(null==a||""===a){const a=this._tabPositionByField.get(t.name+i.name);this._store.dispatch(invalidField$1(a.tabName,a.index,t.name,o,e.record__id,i.name,"Essa informação é obrigatória")),r.isValid=!1,r.message="Há pelo menos um campo obrigatório não preenchido."}}}))};if(0===t.records.length)o({});else{let i={};e.forEach((t=>{o(t),i[t.record__id]=!0})),t.records.forEach((t=>{i[t.record__id]||o(t)}))}return r}loadMDFromExecutor(t){const e=this.parseExecutor(this.metadataexecutor);if(e){const i=e();i&&(i instanceof Promise?i.then((e=>{t(e)})):t(i))}}loadMDFromElement(t){const e=[];Array.from(this._host.children).forEach((t=>{"FORM-METADATA"===t.tagName&&e.push(t.metadata)})),t(e.length>0?e:null)}updateMetadata(t){if(t){const e=(t,i,r,o)=>{var a;i.items.forEach((e=>{if("fields"in e)e.fields.forEach((e=>{e.form=this,this._tabPositionByField.set(t+e.name,{tabName:r,index:o})}));else{const i=e;i.form=this,this._tabPositionByField.set(t+i.name,{tabName:r,index:o})}})),null===(a=i.subForms)||void 0===a||a.forEach(((r,o)=>{const a=r.dataUnit;a&&(this._duSources.set(a.name,a),a.parentDUName=t),e(a?a.name:t,r,i.name,o)}))};this._preparedMetadata=t.map(((t,i)=>{const r=t.dataUnit;t.autoLoad&&this._duToLoad.push(r),this.decorateDU(r);const o=r.name;return this._duSources.set(o,r),e(o,t,"__MAIN__FORM__",i),t})),this._store.dispatch(formLoad())}}parseExecutor(executor){return executor?executor instanceof Function?executor:eval(executor):null}componentWillRender(){if(void 0===this._store){const t=combineReducers({hist:undoable(formReducer),nonhist:formNonHistoricReducer});this._store=createStore(t,applyMiddleware(thunk)),this._store.subscribe((()=>{forceUpdate(this)})),this.slavemode&&(this._store.dispatch(showHideNavigationButtons("saveVisible",!1)),this._store.dispatch(showHideNavigationButtons("cancelVisible",!1)),this._store.dispatch(showHideNavigationButtons("reloadVisible",!1)))}void 0===this._preparedMetadata&&(this.metadata?this.updateMetadata(this.metadata):(this.loadMDFromElement((t=>this.updateMetadata(t))),this._preparedMetadata||this.loadMDFromExecutor((t=>this.updateMetadata(t)))))}componentDidRender(){this._duToLoad.forEach((t=>t.load())),this._duToLoad=[]}loadSearch(t,e){const i=this.parseExecutor(this.fieldsearchexecutor);return i?i(t,e):[{value:0,label:"Sem resultados"}]}buildDataUnit(t,e){if(t){const{name:i,unitLabel:r,records:o,cardinality:a,fields:n}=t;if(!(t instanceof DataUnit)){let s;s=e instanceof DataUnit?e:this._dataUnits.get(e),(t=new DataUnit(i,r,a,s)).fields=n,this._dataUnits.set(t.name,t),o&&(t.records=o)}this.decorateDU(t)}return t}decorateDU(t){t.store=this._store,t.loadExecutor=this.parseExecutor(this.loadexecutor),t.saveExecutor=this.parseExecutor(this.saveexecutor),t.removeExecutor=this.parseExecutor(this.removeexecutor),t.recordsValidator=this}render(){return this.loading?h("place-holder",null):this._preparedMetadata?h(FormSheet,{enabled:this.enabled,store:this._store,source:this._preparedMetadata,parentName:"__MAIN__FORM__",dataUnitBuilder:(t,e)=>this.buildDataUnit(t,e)}):null}static get assetsDirs(){return["assets"]}get _host(){return getElement(this)}static get watchers(){return{metadata:["cleanPreparedMetadata"]}}};EzForm.style=ezFormCss;const ezIconCss=":host{display:block;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}";let EzIcon=class{constructor(t){registerInstance(this,t),this.size="medium"}isSprite(){return this.href&&this.href.indexOf("#")>-1}render(){return h(Host,null,this.isSprite()?h("svg",{class:this.size,role:"img"},h("use",{xlinkHref:this.href})):h("img",{class:this.size,src:this.href}))}};EzIcon.style=ezIconCss;const ezNumericInputCss=":host{display:block;width:100%;--it__input--background-color:var(--background--medium, #e0e0e0);--it__input--border-color:var(--it__input--background-color)}.text-input{--it__input--background-color:inherit;--it__input--border-color:inherit}";let EzNumericInput=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}changeValue(t){this._textInput.errorMessage="",t!==this.value&&(this.value=t,this.ezChange.emit())}parseNumber(){const t=this._textInput.value?NumberUtils.stringToNumber(this._textInput.value):null;null!=t&&isNaN(t)?this._textInput.errorMessage="O valor digitado não é um número válido":this.changeValue(t)}getTextValue(t){return t?this.precision>0?NumberUtils.format(t.toString(),Number(this.precision),Number(this.prettyprecision)):t.toString():null}render(){return h("ez-text-input",{class:"text-input",ref:t=>this._textInput=t,onBlur:()=>this.parseNumber(),label:this.label,onEzChange:t=>t.stopPropagation(),value:this.getTextValue(this.value),restrict:this.precision>0?"0123456789-,.":"0123456789-",enabled:this.enabled,errorMessage:this.errorMessage})}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};EzNumericInput.style=ezNumericInputCss;const ezSearchCss=":host{width:100%}";let EzSearch=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.showPopup=createEvent(this,"showPopup",7),this.enabled=!0,this.showselectedvalue=!0,this.showoptionvalue=!0}updateValue(){this._comboElement&&(this._comboElement.value=this.value)}onComboChange(t){t.stopPropagation(),this.value=t.detail,this.ezChange.emit(t.detail)}render(){return h("ez-combo-box",{ref:t=>this._comboElement=t,value:this.value,label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,optionLoader:this.optionloader,searchMode:!0,onEzChange:t=>this.onComboChange(t),showSelectedValue:this.showselectedvalue,showOptionValue:this.showoptionvalue})}static get watchers(){return{value:["updateValue"]}}};EzSearch.style=ezSearchCss;const ezTabselectorCss='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;margin-bottom:var(--space--large, 24px);--tabselector--backward-icon: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>\');--tabselector--forward-icon: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>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.midle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Sora, Algerian");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}';let EzTabselector=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key)this.selectedIndex=this.focusedIndex,this.focusedIndex=void 0,this.selectedTab=this._processedTabs[this.selectedIndex].tabKey,this.handleTabClick(this.selectedTab,parseInt(this.selectedIndex)),t.preventDefault(),this.setFocusedTab(this.selectedIndex);else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let e;if("ArrowLeft"===t.key)e=!1;else{if("ArrowRight"!==t.key)return;e=!0}this.focusedIndex=void 0===this.focusedIndex?!1===e?void 0!==this.selectedIndex?(parseInt(this.selectedIndex)-1).toString():void 0:void 0!==this.selectedIndex?(parseInt(this.selectedIndex)+1).toString():void 0:!1===e?(parseInt(this.focusedIndex)-1).toString():(parseInt(this.focusedIndex)+1).toString(),parseInt(this.focusedIndex)<0?this.focusedIndex="0":parseInt(this.focusedIndex)>this._processedTabs.length-1&&(this.focusedIndex=(this._processedTabs.length-1).toString()),this.setFocusedBtn(!0,this.focusedIndex),this.setFocusedTab(this.focusedIndex),this.ezChange.emit()}else"Tab"!==t.key&&"Escape"!==t.key||(this.focusedIndex=void 0,this.selectedTab=this._processedTabs[this.selectedIndex].tabKey,this.handleTabClick(this.selectedTab,parseInt(this.selectedIndex)),t.preventDefault(),this.setFocusedTab(this.selectedIndex))}}handleTabClick(t,e){this.selectedIndex=e.toString(),this.focusedIndex=void 0,this.selectedTab=t,this.ezChange.emit(),this.setFocusedBtn(!1,this.selectedIndex)}componentWillRender(){this._processedTabs||(this._processedTabs=[],this.tabs&&this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push(new Tab(t,t))})),this._hostElem.querySelectorAll("ez-tab").forEach((t=>{const e=t.getAttribute("tabKey"),i=t.getAttribute("label"),r=new Tab(i,e),o=t.firstChild;o&&(o.setAttribute("slot","tab"+this._processedTabs.length),this._hostElem.appendChild(o)),this._processedTabs.push(r)})))}handleSlotChange(t){const e=t.target.assignedElements()[0];e&&(e.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let e=null;t.querySelectorAll(".tab").forEach((i=>{i.getBoundingClientRect().right<t.clientWidth&&(e=i)})),t.scrollLeft=e.offsetLeft+e.offsetWidth}}componentDidRender(){this.updateScroll()}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:e,clientWidth:i,scrollLeft:r}=t,o=e-i-Math.ceil(r);this._startHidden=t.scrollLeft>0,this._endHidden=o>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const a=["","startHidden","endHidden","midle"],n=a[Number(this._startHidden)|Number(this._endHidden)<<1];a.forEach((e=>{e!==n&&t.classList.contains(e)&&t.classList.remove(e)})),n&&!t.classList.contains(n)&&t.classList.add(n)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}getTextWidth(t){void 0===this._textMesurement&&(this._textMesurement=this._hostElem.shadowRoot.ownerDocument.createElement("canvas"));const e=this._textMesurement.getContext("2d");return e.font="14px Sora, Algerian",Math.min(220,24+e.measureText(t).width)+"px"}setFocusedBtn(t,e){this._scrollContainer.querySelectorAll(".tab").forEach((i=>{i.classList.remove("is-focused"),i.id==="tab"+e&&t&&i.classList.add("is-focused")}))}render(){return h(Host,null,h("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),h("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,e)=>{const i={"min-width":this.getTextWidth(t.label)},r="tab"+e,o=e===parseInt(this.selectedIndex)||this.selectedTab&&t.tabKey===this.selectedTab;return o&&(this.selectedTab=t.tabKey,this.selectedIndex=e.toString()),h("button",{id:r,class:"tab"+(o?" is-active":""),onClick:()=>this.handleTabClick(t.tabKey,e),style:i},h("span",{class:"tab-label",title:t.label},t.label),h("slot",{name:r,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),h("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return getElement(this)}};class Tab{constructor(t,e){this.label=t,this.tabKey=e}}EzTabselector.style=ezTabselectorCss;const ezTextAreaCss=":host{--ta--width:100%;--ta--border-radius:var(--border--radius-medium, 12px);--ta--font-size:var(--text--medium, 14px);--ta--font-family:var(--font-pattern, Arial);--ta--font-weight:var(--text-weight--large, 500);--ta--color:var(--title--primary, #000);--ta__input--background-color:var(--background--medium, #e0e0e0);--ta__input--border:var(--border--medium, 2px solid);--ta__input--border-color:var(--ta__input--background-color);--ta__input--focus--border-color:var(--color--primary, #008561);--ta__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ta__input--disabled--color:var(--text--disable, #AFB6C0);--ta__input--error--border-color:#CC2936;--ta__message_box--font-size:var(--text--small, 12px);--ta__message_box--info--color:var(--color--success, #22085d);--ta__message_box--error--color:var(--color--error, #FF0000);--ta__label--floating--top:6px;--ta__label--padding-top:12px;--ta__label--padding-left:14px;--ta__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ta--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight--large, 600);font-family:var(--ta--font-family);font-size:var(--ta--font-size);color:var(--ta--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--ta__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--ta--border-radius);border:var(--ta__input--border);border-color:var(--ta__input--border-color);background-color:var(--ta__input--background-color)}.textarea--focus{border-color:var(--ta__input--focus--border-color)}.textarea.hasError{color:var(--ta--color);border-color:var(--ta__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ta--font-family);font-size:var(--ta__message_box--font-size);color:var(--ta__message_box--info--color)}.hasError{color:var(--ta__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ta__label--padding-right));left:var(--ta--space--medium);font-family:var(--ta--font-family);font-size:var(--ta--font-size);font-weight:var(--ta--font-weight);color:var(--ta--color);top:var(--ta__label--padding-top);left:var(--ta__label--padding-left);padding-right:var(--ta__label--padding-right)}.textarea__label--floated{font-family:var(--ta--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ta__label--floating--top)}.textarea__label--disabled{color:var(--ta__input--disabled--color)}";let EzTextArea=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.enabled=!0,this.rows=4}showError(){"string"==typeof this.errorMessage&&""!==this.errorMessage?(this._container.classList.add("hasError"),this._messageBoxElem.classList.add("hasError")):(this._container.classList.remove("hasError"),this._messageBoxElem.classList.remove("hasError"))}updateInputValue(){this._inputElem.value=this.value,this.handleChange(),this.adjustFloatingLabel(),this.ezChange.emit(this.value)}adjustFloatingLabel(){if(this.label){const t=this.value&&this.value.toString().length>0,e=this._labelElem.classList.contains("textarea__label--floated");t||this.isFocused()?e||this._labelElem.classList.add("textarea__label--floated"):e&&this._labelElem.classList.remove("textarea__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){this.adjustFloatingLabel(),this._container&&this._container.classList.contains("textarea--focus")&&this._container.classList.remove("textarea--focus")}handleChange(){this.value=this._inputElem.value}handleFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("textarea__label--floated")&&this._labelElem.classList.add("textarea__label--floated"),this._container&&!this._container.classList.contains("textarea--focus")&&this._container.classList.add("textarea--focus")}componentDidLoad(){this.showError(),this.adjustFloatingLabel()}render(){return h(Host,null,h("div",{class:"textarea",ref:t=>this._container=t},this.label?h("label",{ref:t=>this._labelElem=t,class:this.enabled?"textarea__label":"textarea__label textarea__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,h("textarea",{onFocus:()=>this.handleFocus(),ref:t=>this._inputElem=t,value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},onKeyDown:t=>t.stopPropagation(),rows:this.rows})),h("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return getElement(this)}static get watchers(){return{errorMessage:["showError"],value:["updateInputValue"]}}};EzTextArea.style=ezTextAreaCss;const ezTextInputCss=":host{--text-input--height:42px;--text-input--width:100%;--text-input__icon--width:48px;--text-input--border-radius:var(--border--radius-medium, 12px);--text-input--font-size:var(--text--medium, 14px);--text-input--font-family:var(--font-pattern, Arial);--text-input--font-weight:var(--text-weight--large, 500);--text-input--color:var(--title--primary, #000);--text-input__input--background-color:var(--background--medium, #e0e0e0);--text-input__input--border:var(--border--medium, 2px solid);--text-input__input--border-color:var(--text-input__input--background-color);--text-input__input--focus--border-color:var(--color--alert-cold-800, #042EFF);--text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-input__input--disabled--color:var(--text--disable, #AFB6C0);--text-input__input--error--border-color:#CC2936;--text-input__message_box--font-size:var(--text--small, 12px);--text-input__message_box--info--color:var(--color--success, #22085d);--text-input__message_box--error--color:var(--color--error, #FF0000);--text-input__label--floating--top:6px;--text-input__label--padding-top:12px;--text-input__label--padding-left:14px;--text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--text-input--height);border-radius:var(--text-input--border-radius);font-family:var(--text-input--font-family);font-size:var(--text-input--font-size);border:var(--text-input__input--border);border-color:var(--text-input__input--border-color);background-color:var(--text-input__input--background-color);color:var(--text-input--color)}input:disabled{background-color:var(--text-input__input--disabled--background-color);color:var(--text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--text-input__input--focus--border-color)}input.icon--left{padding-left:var(--text-input__icon--width)}input.icon--right{padding-right:var(--text-input__icon--width)}input.hasError{color:var(--text-input--color);border-color:var(--text-input__input--error--border-color)}input.text--right{text-align:right}.message-box{display:flex;min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-input--font-family);font-size:var(--text-input__message_box--font-size);color:var(--text-input__message_box--info--color)}.hasError{color:var(--text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-input__label--padding-right));left:var(--text-input--space--medium);font-family:var(--text-input--font-family);font-size:var(--text-input--font-size);font-weight:var(--text-input--font-weight);color:var(--text-input--color);top:var(--text-input__label--padding-top);left:var(--text-input__label--padding-left);padding-right:var(--text-input__label--padding-right)}.input__label--floated{font-family:var(--text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-input__label--floating--top)}.input__label--disabled{color:var(--text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--text-input__icon--width) + 2px);width:calc(100% - var(--text-input__icon--width))}.input__label--right{right:var(--text-input__icon--width);width:calc(100% - var(--text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--text-input__icon--width) + 2px);width:calc(100% - var(--text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}";let EzTextInput=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this.enabled=!0}showError(){"string"==typeof this.errorMessage&&""!==this.errorMessage?(this._inputElem.classList.add("hasError"),this._messageBoxElem.classList.add("hasError")):(this._inputElem.classList.remove("hasError"),this._messageBoxElem.classList.remove("hasError"))}prepareMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new MaskFormatter(this.mask):this._maskFormatter.mask=this.mask)}updateInputValue(){this._inputElem&&(this._inputElem.value=this.value),this.handleChange(),this.ezChange.emit(),this.adjustFloatingLabel()}adjustFloatingLabel(){if(this.label&&this._labelElem){this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label");const t=this.value&&this.value.toString().length>0,e=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?e||this._labelElem.classList.add("input__label--floated"):e&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){const t=this._inputElem.value;if(t&&this._maskFormatter)try{this._inputElem.value=this._maskFormatter.format(t)}catch(t){this.errorMessage=t.message}this.value=this._inputElem.value,this.adjustFloatingLabel()}isValidValue(t){return!this.restrict||Array.from(t).reduce(((t,e)=>t&&this.restrict.indexOf(e)>-1),!0)}handleChange(){if(!this._inputElem)return;const t=this._inputElem.value;this.isValidValue(t)?this._lastValidValue=t:this._inputElem.value=void 0===this._lastValidValue?"":this._lastValidValue,this.value=this._inputElem.value}handleSlotChange(t){const e=t.target,i=e.assignedElements()[0];i&&(i.style.position="absolute",i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.overflow="hidden",i.style.top="0px",i.style.width="var(--text-input__icon--width)",i.style.height="var(--text-input--height)","leftIcon"==e.name?(i.style.left="0px",i.style.borderRadius="var(--text-input--border-radius) 0 0 var(--text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left")):"rightIcon"==e.name&&(i.style.right="0px",i.style.borderRadius="0 var(--text-input--border-radius) var(--text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"))),this.showError()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated")}componentDidLoad(){this.showError(),this.prepareMask(),this.adjustFloatingLabel()}componentWillLoad(){if(this.prepareMask(),this.value){if(this._maskFormatter)try{this.value=this._maskFormatter.format(this.value)}catch(t){this.errorMessage=t.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}render(){return h(Host,null,h("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label?h("label",{ref:t=>this._labelElem=t,class:this.enabled?"input__label":"input__label input__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,h("input",{onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:"text",value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),h("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),h("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return getElement(this)}static get watchers(){return{errorMessage:["showError"],mask:["prepareMask"],value:["updateInputValue"]}}};EzTextInput.style=ezTextInputCss;class RemoteFile{constructor(t){this.file=t,this.size=t.size,this.name=t.name}abortUpload(){this._uploadingXhr&&(this._aborted=!0,this._uploadingXhr.abort(),this._uploadingXhr=void 0)}isUploading(){return void 0!==this._uploadingXhr}async upload(t,e,i){return new Promise(((r,o)=>{const a=new XMLHttpRequest;this._uploadingXhr=a,this._aborted=!1,this.progress=0,a.upload.onprogress=t=>{const e=t.loaded,r=t.total;this.progress=~~(e/r*100),i(this,e,r)},a.onreadystatechange=()=>{if(4==a.readyState){this._uploadingXhr=void 0;const t=a.status;this._aborted||(0===t?o("Servidor indisponível"):t>=500?o("Erro inesperado no servidor"):t>=400&&o("Operação não permitida"));const e=a.response;e&&r(JSON.parse(e))}},a.ontimeout=()=>{o("Tempo limite de transferência atingido.")};const n=new FormData;n.append("ARQUIVO",this.file,this.file.name),a.open("POST",t,!0),e&&e.forEach(((t,e)=>a.setRequestHeader(e,t))),a.send(n)}))}async delete(t,e,i){return new Promise(((r,o)=>{const a=new XMLHttpRequest;a.onreadystatechange=()=>{4==a.readyState&&(0===a.status?o("Servidor indisponível"):a.status>=500?o("Erro inesperado no servidor"):a.status>=400&&o("Operação não permitida"),r(!0))},a.ontimeout=()=>{o("Tempo limite de remoção atingido.")},a.open("DELETE",e,!0),i&&i.forEach(((t,e)=>a.setRequestHeader(e,t))),a.send(JSON.stringify(t))}))}}const ezUploadCss=':host{--iu--height:42px;--iu--width:100%;--iu__icon--width:48px;--iu__container--background-color:var(--background--medium, #d2dce9);--iu__color--primary:var(--color--primary, #008561);--iu--padding--extra-small:var(--space--extra-small, 3px);--iu--padding--small:var(--space--small, 6px);--iu--padding--medium:var(--space--medium, 12px);--iu--padding--large:var(--space--large, 24px);--iu__border--color:var(--color-strokes, #DCE0E8);--iu--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--iu--text--primary:var(--text-primary, #626e82);--iu--font-size:var(--text--medium, 14px);--iu--font-family:var(--font-pattern, Arial);--iu--font-weight:var(--text-weight--large, 500);--iu__btn__cancel-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8x" width="8px"><path d="M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z"/></svg>\');--iu__file-icon-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="11x" width="9px"><path d="M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z"/></svg>\');display:flex;flex-wrap:wrap;position:relative;font-family:var(--iu--font-family);font-size:var(--iu--font-size);width:var(--iu--width);font-weight:var(--iu--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--iu__container--background-color);padding:var(--iu--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--iu__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--iu--padding--medium) var(--iu--padding--medium) var(--iu--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--iu--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--iu__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--iu__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--iu__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--iu__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:"Sora", "Algerian";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--iu--text--primary);text-shadow:var(--iu--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--iu__btn__cancel-image);mask-image:var(--iu__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--iu--font-family);font-size:var(--text--extra-small);font-weight:var(--iu--font-weight);color:var(--iu--text--primary);text-shadow:var(--iu--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:\'\';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--iu__file-icon-image);mask-image:var(--iu__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--iu--padding--large) 0px;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.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%}}';let EzUpload=class{constructor(t){registerInstance(this,t),this.ezChange=createEvent(this,"ezChange",7),this._filePointers=new Map,this.enabled=!0}changeValue(t){t!==this._updatingValue&&(this._filePointers.forEach((t=>{this.isRemoteFile(t)&&t.abortUpload()})),this._filePointers=new Map,this.updateFilePointers()),this._updatingValue=void 0}updateFilePointers(){this.value&&this.value.forEach((t=>this._filePointers.set(t.name,t)))}normalizeRequestHeaders(){if(this._requestHeaders=new Map,"string"==typeof this.requestheaders)try{this.requestheaders=JSON.parse(this.requestheaders)}catch(t){this.requestheaders=void 0}for(var t in this.requestheaders)this._requestHeaders.set(t,this.requestheaders[t])}async addFiles(t){if(this.maxfiles>0){let e=this._filePointers.size;if(t.forEach((t=>{this._filePointers.has(t.name)||e++})),e>this.maxfiles)return void this.showError(`A quantidade máxima de arquivos é ${this.maxfiles}.`)}Array.prototype.forEach.call(t,this.addFile.bind(this))}async addFile(t){const e=this._filePointers.get(t.name);e?Application.confirm("Substituir arquivo",`Já existe um arquivo chamado "${t.name}". Deseja substituí-lo?`).then((i=>{i&&(this.isRemoteFile(e)&&e.abortUpload(),this.doAddFile(t))})):this.doAddFile(t)}async doAddFile(t){if(this.validateFile(t)){const e=new RemoteFile(t);this._filePointers.set(t.name,e),e.upload(this.urlupload,this._requestHeaders,(t=>this.updateFeedback(t))).then((t=>t.forEach((t=>this.finishUpload(t))))).catch((t=>this.showError(t))),forceUpdate(this)}}finishUpload(t){this._filePointers.set(t.name,t),this.updateValue()}updateValue(){this._updatingValue=[],this._filePointers.forEach((t=>{this.isRemoteFile(t)||this._updatingValue.push(t)})),this.value=this._updatingValue,this.ezChange.emit(this.value)}buildProgressId(t){return`PROGRESS_${t.name.replace(/[^a-z0-9_]/gi,"_")}_${t.file.lastModified}`}updateFeedback(t){window.requestAnimationFrame((()=>{if(this._host){const e=this._host.shadowRoot.querySelector("#"+this.buildProgressId(t));e&&(e.value=t.progress)}}))}validateFile(t){return!this._filePointers.has(t.name)&&this.maxfiles>0&&this._filePointers.size>=this.maxfiles?(this.showError(`A quantidade máxima de arquivos é ${this.maxfiles}.`),!1):0===t.size?(this.showError(`Erro de permissão: O arquivo "${t.name}" não pode ser enviado.`),!1):this.urlupload?!(this.maxfilesize>=0&&t.size>this.maxfilesize&&(this.showError("O tamanho máximo dos arquivos é de "+this.formatBytes(this.maxfilesize)),1)):(this.showError("Endereço de upload não informado"),!1)}showError(t){Application.alert("Enviando arquivo",t)}formatBytes(t,e=1){if(0===t)return"0 Bytes";const i=e<0?0:e,r=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,r)).toFixed(i))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}onFileInputChange(t){this.addFiles(Array.from(t.target.files)),this._fileInput.value=""}isRemoteFile(t){return"file"in t}removeFromList(t){this._filePointers.delete(t),this.updateValue()}removeFile(t){const e=this._filePointers.get(t);if(this.isRemoteFile(e))e.abortUpload(),this.removeFromList(t);else if(this.urldelete){const i=new RemoteFile(null);this._filePointers.set(e.name,i),i.delete(e,this.urldelete,null).then((()=>this.removeFromList(t))).catch((t=>this.showError(t)))}else this.removeFromList(t)}openFilesDialog(){this.enabled&&this._fileInput.click()}componentDidLoad(){this.enabled&&this._dropZone&&window.FileList&&window.File&&(this._dropZone.addEventListener("dragover",(t=>{t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy",this._dropZone.style.background="#c2dbff"})),this._dropZone.addEventListener("drop",(t=>{t.stopPropagation(),t.preventDefault(),this.addFiles(Array.from(t.dataTransfer.files)),this._dropZone.style.background=""})),this._dropZone.addEventListener("dragleave",(()=>{this._dropZone.style.background=""})))}componentWillRender(){this.value&&this._filePointers.size<this.value.length&&this.updateFilePointers()}render(){return h("div",{ref:t=>this._dropZone=t,class:this.evalDisabledClass("iu","background--disabled")},h("div",{class:"iu__container",onClick:()=>this.openFilesDialog()},h("div",{class:"iu_header"},this.label?h("label",{class:this.evalDisabledClass("iu__label","text--disabled"),title:this.label},this.label):null,h("div",{class:this.evalDisabledClass("iu__icon-label","mouse-pointer--disabled")},h("button",{class:"iu__file-icon",disabled:!this.enabled}),h("div",{class:this.evalDisabledClass("text text--center text--medium text--primary","text--disabled")},this.enabled?"Arraste e solte ou clique para adicionar arquivos":"Somente leitura"))),this.buildFooter()),h("input",{ref:t=>this._fileInput=t,onChange:t=>this.onFileInputChange(t),type:"file",multiple:!0,hidden:!0}))}buildFooter(){if(0===this._filePointers.size)return null;const t=[];return this._filePointers.forEach((e=>t.push(this.buildFileItem(e)))),h("div",{class:"iu__footer"},t)}buildFileItem(t){const e=t.name,i=Number(t.progress),r=t.downloadURL,o=`${e} (${this.formatBytes(t.size)})`;return h("div",{class:"iu__item",key:e,onClick:t=>t.stopPropagation()},h("div",{class:"iu__item-label modificador"},h("div",{title:o,class:"col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle"},r?h("a",{href:r,download:!0},o):o)),isNaN(i)?null:h("div",{class:"col col--sd-4 col--stretch align--middle"},h("progress",{id:this.buildProgressId(t),value:i,max:"100"})),this.enabled?h("div",{class:"col col--stretch align--middle"},h("button",{class:"btn-cancel ",onClick:()=>this.removeFile(e)})):null)}evalDisabledClass(t,e){return this.enabled?t:`${t} ${e}`}get _host(){return getElement(this)}static get watchers(){return{value:["changeValue"],requestheaders:["normalizeRequestHeaders"]}}};EzUpload.style=ezUploadCss;let FormMetadata=class{constructor(t){registerInstance(this,t)}buildField(t){let e=t.getAttribute("label"),i=t.getAttribute("name")||e,r=t.getAttribute("ui")||"SHORTTEXT",o=[];if("OPTIONSELECTOR"===r){e||(e="Selecione uma das opções:");const i={};Array.from(t.getElementsByTagName("OPTION")).forEach(((t,e)=>{const r=t.getAttribute("value")||e;i[r]=t.textContent})),o.push({name:"options",value:JSON.stringify(i)})}else if("FILE"===r){const e=t.querySelector("URL"),i=t.querySelectorAll("HEADERS>HEADER");if(e&&o.push({name:"URL",value:e.textContent}),i&&i.length>0){const t={};i.forEach((e=>{t[e.getAttribute("name")]=e.textContent})),o.push({name:"HEADERS",value:JSON.stringify(t)})}this.addPropertyIfExists(o,t,"maxfiles")}else e||(e=t.textContent),this.addPropertyIfExists(o,t,"precision"),this.addPropertyIfExists(o,t,"prettyprecision");return{name:i,userInterface:r,label:e,defaultValue:t.getAttribute("defaultValue"),required:"true"===t.getAttribute("required"),readOnly:"true"===t.getAttribute("readonly"),properties:o}}addPropertyIfExists(t,e,i){const r=e.getAttribute(i);r&&t.push({name:i,value:r})}buildFieldSet(t,e){return{label:e.getAttribute("label"),fields:Array.from(e.getElementsByTagName("FIELD")).map((e=>{const i=this.buildField(e);return t.addFieldMetadata(i),{name:i.name}}))}}fromElements(t,e,i,r,o){const a={name:i||e,dataUnit:r,label:e,autoLoad:o};return Array.from(t).forEach((t=>{switch(t.tagName.toUpperCase()){case"FIELD":a.items||(a.items=[]);const e=this.buildField(t);r.addFieldMetadata(e),a.items.push({name:e.name});break;case"FIELD-SET":a.items||(a.items=[]),a.items.push(this.buildFieldSet(r,t));break;case"SUB-FORM":a.subForms||(a.subForms=[]);const i=t.getAttribute("label")||"Subform "+(a.subForms.length+1),o=t.getAttribute("name")||i,n=t.getAttribute("dataunit");let s;s=n?new DataUnit(n,"noname",t.hasAttribute("many")?"N":"1"):r,a.subForms.push(this.fromElements(t.children,i,o,s,"true"===t.getAttribute("autoload")))}})),a}connectedCallback(){this.dataunit||(this.dataunit="dataunit_"+(this.name||this.label||(new Date).getTime()));const t=new DataUnit(this.dataunit,"noname",this.many?"N":"1");this.metadata=this.fromElements(this._host.children,this.label,this.name,t,this.autoload)}render(){return h(Host,null)}get _host(){return getElement(this)}};const placeHolderCss=":host{display:flex;width:100%;height:42px;border-radius:12px;background:var(--background--medium);background-image:linear-gradient(to right, var(--background--medium) 0%, var(--background--strong) 20%, var(--background--medium) 40%, var(--background--medium) 100%);background-repeat:no-repeat;background-size:800px 1000px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:placeholderShimmer;animation-timing-function:linear}@keyframes placeholderShimmer{0%{background-position:-800px 0}100%{background-position:800px 0}}";let PlaceHolder=class{constructor(t){registerInstance(this,t)}render(){return h(Host,null)}};PlaceHolder.style=placeHolderCss;export{EzButton as ez_button,EzCalendar as ez_calendar,EzCheck as ez_check,EzCollapsibleBox as ez_collapsible_box,EzComboBox as ez_combo_box,EzDateInput as ez_date_input,EzForm as ez_form,EzIcon as ez_icon,EzNumericInput as ez_numeric_input,EzSearch as ez_search,EzTabselector as ez_tabselector,EzTextArea as ez_text_area,EzTextInput as ez_text_input,EzUpload as ez_upload,FormMetadata as form_metadata,PlaceHolder as place_holder}
|