@sankhyalabs/sankhyablocks 1.1.28 → 1.2.0
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/LICENSE +21 -21
- package/README.md +75 -75
- package/package.json +94 -52
- package/react/.keepfolder +1 -0
- package/dist/cjs/ApplicationUtils-05b74ee9.js +0 -39
- package/dist/cjs/AssetsUtils-7e3c38f9.js +0 -24
- package/dist/cjs/CSSVarsUtils-75ca9c64.js +0 -19
- package/dist/cjs/_commonjsHelpers-537d719a.js +0 -20
- package/dist/cjs/ez-action-chip.cjs.entry.js +0 -27
- package/dist/cjs/ez-application.cjs.entry.js +0 -26
- package/dist/cjs/ez-button_4.cjs.entry.js +0 -660
- package/dist/cjs/ez-calendar.cjs.entry.js +0 -223
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +0 -47
- package/dist/cjs/ez-combo-box.cjs.entry.js +0 -278
- package/dist/cjs/ez-date-input.cjs.entry.js +0 -102
- package/dist/cjs/ez-date-time-input.cjs.entry.js +0 -145
- package/dist/cjs/ez-dialog.cjs.entry.js +0 -89
- package/dist/cjs/ez-form.cjs.entry.js +0 -785
- package/dist/cjs/ez-grid.cjs.entry.js +0 -110485
- package/dist/cjs/ez-icon.cjs.entry.js +0 -41
- package/dist/cjs/ez-label-chip.cjs.entry.js +0 -104
- package/dist/cjs/ez-modal_2.cjs.entry.js +0 -316
- package/dist/cjs/ez-number-input.cjs.entry.js +0 -86
- package/dist/cjs/ez-popover.cjs.entry.js +0 -120
- package/dist/cjs/ez-popup.cjs.entry.js +0 -48
- package/dist/cjs/ez-search.cjs.entry.js +0 -64
- package/dist/cjs/ez-tabselector.cjs.entry.js +0 -198
- package/dist/cjs/ez-text-area.cjs.entry.js +0 -114
- package/dist/cjs/ez-text-input.cjs.entry.js +0 -201
- package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
- package/dist/cjs/ez-toast.cjs.entry.js +0 -44
- package/dist/cjs/ez-upload.cjs.entry.js +0 -356
- package/dist/cjs/index-682c98b2.js +0 -1771
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/sankhyablocks.cjs.js +0 -19
- package/dist/cjs/snk-application.cjs.entry.js +0 -7050
- package/dist/cjs/test-du.cjs.entry.js +0 -76
- package/dist/collection/collection-manifest.json +0 -47
- package/dist/collection/components/snk-application/snk-application.css +0 -5
- package/dist/collection/components/snk-application/snk-application.js +0 -492
- package/dist/collection/index.js +0 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +0 -158
- package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js +0 -23
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +0 -188
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +0 -25
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +0 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +0 -59
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +0 -30
- package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js +0 -66
- package/dist/collection/lib/utils/pesquisa.js +0 -16
- package/dist/collection/lib/utils/urlutils.js +0 -23
- package/dist/collection/lib/workspace/workspace.js +0 -7
- package/dist/components/ApplicationUtils.js +0 -37
- package/dist/components/AssetsUtils.js +0 -22
- package/dist/components/CSSVarsUtils.js +0 -17
- package/dist/components/_commonjsHelpers.js +0 -17
- package/dist/components/ez-action-chip.js +0 -44
- package/dist/components/ez-application.js +0 -39
- package/dist/components/ez-button.js +0 -6
- package/dist/components/ez-button2.js +0 -105
- package/dist/components/ez-calendar.js +0 -6
- package/dist/components/ez-calendar2.js +0 -242
- package/dist/components/ez-check.js +0 -6
- package/dist/components/ez-check2.js +0 -94
- package/dist/components/ez-collapsible-box.js +0 -67
- package/dist/components/ez-combo-box.js +0 -6
- package/dist/components/ez-combo-box2.js +0 -311
- package/dist/components/ez-date-input.js +0 -135
- package/dist/components/ez-date-time-input.js +0 -179
- package/dist/components/ez-dialog.js +0 -124
- package/dist/components/ez-form.js +0 -6
- package/dist/components/ez-form2.js +0 -807
- package/dist/components/ez-grid.js +0 -110576
- package/dist/components/ez-icon.js +0 -6
- package/dist/components/ez-icon2.js +0 -56
- package/dist/components/ez-label-chip.js +0 -125
- package/dist/components/ez-list.js +0 -6
- package/dist/components/ez-list2.js +0 -523
- package/dist/components/ez-modal.js +0 -6
- package/dist/components/ez-modal2.js +0 -82
- package/dist/components/ez-number-input.js +0 -115
- package/dist/components/ez-popover.js +0 -145
- package/dist/components/ez-popup.js +0 -67
- package/dist/components/ez-search.js +0 -100
- package/dist/components/ez-tabselector.js +0 -6
- package/dist/components/ez-tabselector2.js +0 -213
- package/dist/components/ez-text-area.js +0 -137
- package/dist/components/ez-text-input.js +0 -6
- package/dist/components/ez-text-input2.js +0 -223
- package/dist/components/ez-time-input.js +0 -153
- package/dist/components/ez-toast.js +0 -64
- package/dist/components/ez-upload.js +0 -382
- package/dist/components/grid-config.js +0 -6
- package/dist/components/grid-config2.js +0 -318
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/select-box.js +0 -6
- package/dist/components/select-box2.js +0 -47
- package/dist/components/snk-application.d.ts +0 -11
- package/dist/components/snk-application.js +0 -7079
- package/dist/components/test-du.js +0 -101
- package/dist/esm/ApplicationUtils-e0b6d857.js +0 -37
- package/dist/esm/AssetsUtils-6e6624dc.js +0 -22
- package/dist/esm/CSSVarsUtils-0787c3f3.js +0 -17
- package/dist/esm/_commonjsHelpers-9943807e.js +0 -17
- package/dist/esm/ez-action-chip.entry.js +0 -23
- package/dist/esm/ez-application.entry.js +0 -22
- package/dist/esm/ez-button_4.entry.js +0 -653
- package/dist/esm/ez-calendar.entry.js +0 -219
- package/dist/esm/ez-collapsible-box.entry.js +0 -43
- package/dist/esm/ez-combo-box.entry.js +0 -274
- package/dist/esm/ez-date-input.entry.js +0 -98
- package/dist/esm/ez-date-time-input.entry.js +0 -141
- package/dist/esm/ez-dialog.entry.js +0 -85
- package/dist/esm/ez-form.entry.js +0 -781
- package/dist/esm/ez-grid.entry.js +0 -110481
- package/dist/esm/ez-icon.entry.js +0 -37
- package/dist/esm/ez-label-chip.entry.js +0 -100
- package/dist/esm/ez-modal_2.entry.js +0 -311
- package/dist/esm/ez-number-input.entry.js +0 -82
- package/dist/esm/ez-popover.entry.js +0 -116
- package/dist/esm/ez-popup.entry.js +0 -44
- package/dist/esm/ez-search.entry.js +0 -60
- package/dist/esm/ez-tabselector.entry.js +0 -194
- package/dist/esm/ez-text-area.entry.js +0 -110
- package/dist/esm/ez-text-input.entry.js +0 -197
- package/dist/esm/ez-time-input.entry.js +0 -114
- package/dist/esm/ez-toast.entry.js +0 -40
- package/dist/esm/ez-upload.entry.js +0 -352
- package/dist/esm/index-35088a3f.js +0 -1740
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/sankhyablocks.js +0 -17
- package/dist/esm/snk-application.entry.js +0 -7046
- package/dist/esm/test-du.entry.js +0 -72
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +0 -67
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +0 -3
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +0 -180
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +0 -319
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +0 -327
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +0 -162
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -217
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +0 -49
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +0 -44
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +0 -527
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +0 -5
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +0 -31
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +0 -129
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +0 -10
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +0 -176
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +0 -139
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +0 -335
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +0 -358
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +0 -4
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +0 -44
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +0 -405
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +0 -3
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -138
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +0 -165
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +0 -196
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +0 -10
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +0 -127
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +0 -568
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +0 -3
- package/dist/sankhyablocks/index.esm.js +0 -0
- package/dist/sankhyablocks/p-0183d259.entry.js +0 -1
- package/dist/sankhyablocks/p-01f23a70.entry.js +0 -1
- package/dist/sankhyablocks/p-07c32f68.entry.js +0 -1
- package/dist/sankhyablocks/p-0f90499d.entry.js +0 -1
- package/dist/sankhyablocks/p-105724a3.entry.js +0 -1
- package/dist/sankhyablocks/p-112455b1.js +0 -1
- package/dist/sankhyablocks/p-2ac02d48.entry.js +0 -1
- package/dist/sankhyablocks/p-35364a97.entry.js +0 -1
- package/dist/sankhyablocks/p-3f6aa9a7.entry.js +0 -1
- package/dist/sankhyablocks/p-4811bc0a.entry.js +0 -369
- package/dist/sankhyablocks/p-5f9af495.entry.js +0 -1
- package/dist/sankhyablocks/p-60967cf0.js +0 -1
- package/dist/sankhyablocks/p-70ad6c16.entry.js +0 -1
- package/dist/sankhyablocks/p-710bfffe.entry.js +0 -1
- package/dist/sankhyablocks/p-73397a0f.entry.js +0 -57
- package/dist/sankhyablocks/p-811b4b9d.js +0 -1
- package/dist/sankhyablocks/p-813fe4f7.js +0 -1
- package/dist/sankhyablocks/p-85a9446b.js +0 -2
- package/dist/sankhyablocks/p-89a1100f.entry.js +0 -1
- package/dist/sankhyablocks/p-8b543003.entry.js +0 -1
- package/dist/sankhyablocks/p-9750632b.entry.js +0 -1
- package/dist/sankhyablocks/p-a96272f7.entry.js +0 -1
- package/dist/sankhyablocks/p-ac8842e5.entry.js +0 -1
- package/dist/sankhyablocks/p-ba64cc41.entry.js +0 -1
- package/dist/sankhyablocks/p-c1ede043.entry.js +0 -1
- package/dist/sankhyablocks/p-d90ebb85.entry.js +0 -1
- package/dist/sankhyablocks/p-e5355a29.entry.js +0 -1
- package/dist/sankhyablocks/p-ef04b633.entry.js +0 -1
- package/dist/sankhyablocks/p-f6db07fb.entry.js +0 -1
- package/dist/sankhyablocks/p-f80cabc7.entry.js +0 -1
- package/dist/sankhyablocks/p-fcd9bd92.entry.js +0 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +0 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -44
- package/dist/types/components.d.ts +0 -66
- package/dist/types/index.d.ts +0 -1
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +0 -15
- package/dist/types/lib/http/data-fetcher/fetchers/application-config-fetcher.d.ts +0 -6
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +0 -12
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +0 -5
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +0 -2
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +0 -13
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +0 -6
- package/dist/types/lib/http/data-fetcher/state/LoadStateManager.d.ts +0 -23
- package/dist/types/lib/utils/pesquisa.d.ts +0 -2
- package/dist/types/lib/utils/urlutils.d.ts +0 -4
- package/dist/types/lib/workspace/workspace.d.ts +0 -4
- package/dist/types/stencil-public-runtime.d.ts +0 -1565
- package/loader/cdn.js +0 -3
- package/loader/index.cjs.js +0 -3
- package/loader/index.d.ts +0 -12
- package/loader/index.es2017.js +0 -3
- package/loader/index.js +0 -4
- package/loader/package.json +0 -10
- package/react/components.d.ts +0 -32
- package/react/components.js +0 -35
- package/react/components.js.map +0 -1
- package/react/react-component-lib/createComponent.d.ts +0 -10
- package/react/react-component-lib/createComponent.js +0 -75
- package/react/react-component-lib/createComponent.js.map +0 -1
- package/react/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/react/react-component-lib/createOverlayComponent.js +0 -109
- package/react/react-component-lib/createOverlayComponent.js.map +0 -1
- package/react/react-component-lib/index.d.ts +0 -2
- package/react/react-component-lib/index.js +0 -3
- package/react/react-component-lib/index.js.map +0 -1
- package/react/react-component-lib/interfaces.d.ts +0 -29
- package/react/react-component-lib/interfaces.js +0 -1
- package/react/react-component-lib/interfaces.js.map +0 -1
- package/react/react-component-lib/utils/attachProps.d.ts +0 -12
- package/react/react-component-lib/utils/attachProps.js +0 -98
- package/react/react-component-lib/utils/attachProps.js.map +0 -1
- package/react/react-component-lib/utils/case.d.ts +0 -2
- package/react/react-component-lib/utils/case.js +0 -7
- package/react/react-component-lib/utils/case.js.map +0 -1
- package/react/react-component-lib/utils/dev.d.ts +0 -2
- package/react/react-component-lib/utils/dev.js +0 -13
- package/react/react-component-lib/utils/dev.js.map +0 -1
- package/react/react-component-lib/utils/index.d.ts +0 -10
- package/react/react-component-lib/utils/index.js +0 -34
- package/react/react-component-lib/utils/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,H as i,g as h}from"./p-85a9446b.js";import{MaskFormatter as e,TimeFormatter as r,NumberUtils as a}from"@sankhyalabs/core";import{C as o}from"./p-811b4b9d.js";import{g as n}from"./p-60967cf0.js";const l=class{constructor(s){t(this,s),this.enabled=!0,this.showSeconds=!1}prepareMask(){this.showSeconds?null==this._maskFormatter?this._maskFormatter=new e("##:##:##"):this._maskFormatter.mask="##:##:##":null==this._maskFormatter?this._maskFormatter=new e("##:##"):this._maskFormatter.mask="##:##"}onValueChanged(){NaN===this.value&&(this.value=void 0,this.handleFocusout())}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){this.errorMessage="",this.prepareValue(this.viewValue),r.validateTime(this.viewValue,this.showSeconds)||(this.clearField(),this.errorMessage="Favor inserir um horário válido.")}prepareValue(t){try{this.viewValue=r.prepareValue(t,this.showSeconds)}catch(t){this.clearField(),this.errorMessage=t.message}}clearField(){this.viewValue=this.value=void 0}handleChange(){this.viewValue=this._inputElem.value,this.value=a.stringToNumber(this.viewValue.replace(/\D/g,""))}componentDidLoad(){this.onValueChanged(),o.applyVarsTextInput(this._elem,this._inputElem)}componentWillLoad(){this.prepareMask(),this.value?this.prepareValue(this.value.toString()):this.viewValue&&this.prepareValue(this.viewValue)}render(){return s(i,null,s("ez-text-input",{ref:t=>this._inputElem=t,value:this.viewValue,enabled:this.enabled,label:this.label,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},errorMessage:this.errorMessage},s("ez-icon",{slot:"leftIcon",href:n("timer-outline")})))}static get assetsDirs(){return["../assets"]}get _elem(){return h(this)}static get watchers(){return{showSeconds:["prepareMask"],value:["onValueChanged"]}}};l.style=":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";export{l as ez_time_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s,s as t}from"./p-85a9446b.js";const a=a=>`${function(){if(!e){const s=document.querySelector("script[data-ezui-assets-url]");if(s){let a=s.dataset.ezuiAssetsUrl;a&&(a.startsWith("/")&&(a=window.location.origin+a),t(a))}e=!0}return s("../assets/actions-sprite.svg")}()}#${a}`;let e=!1;export{a as g}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as s,g as e}from"./p-85a9446b.js";import{FloatingManager as h}from"@sankhyalabs/core";const r=class{constructor(o){t(this,o),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,o=this.bottom,s=this.right){h.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,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,o=this.bottom,s=this.right){this._floatingID=h.float(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,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 o(s,null,o("section",{ref:t=>this._container=t},o("div",{class:"box "+("fit-content"===this.boxWidth?"box--fit-content":"box--full-width"),ref:t=>this._box=t},o("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["dispatchVisibilityChange"]}}};r.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";export{r as ez_popover}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,c as r,H as i}from"./p-85a9446b.js";const o=class{constructor(t){e(this,t),this.enabled=!0,this.mode="regular",this.size="medium"}async setFocus(){this._button.focus()}async setBlur(){this._button.blur()}getIconSize(){return this.size}handleSlotChange(e){const t=e.target,r=t.assignedElements()[0];"link"==this.mode?(r.style.display="inline","leftIcon"==t.name?r.style.paddingRight="var(--ez-button__inline__icon--padding)":"rightIcon"==t.name&&(r.style.paddingLeft="var(--ez-button__inline__icon--padding)")):r.style.setProperty("--ez-icon--color","var(--ez-icon--color)")}render(){return"icon"==this.mode?t("button",{class:"icon "+this.size,type:"button",disabled:!this.enabled,ref:e=>this._button=e},t("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize(),onClick:e=>{this.enabled||e.stopPropagation()}})):"label-icon"==this.mode?t("div",{class:"label-icon"},t("button",{class:"icon",type:"button",disabled:!this.enabled,ref:e=>this._button=e},t("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:"large",onClick:e=>{this.enabled||e.stopPropagation()}})),t("label",{title:this.label},this.label)):"link"==this.mode?t("a",{class:this.size,ref:e=>this._button=e},t("slot",{name:"leftIcon",onSlotchange:e=>{this.handleSlotChange(e)}}),this.label,t("slot",{name:"rightIcon",onSlotchange:e=>{this.handleSlotChange(e)}})):t("button",{type:"button",disabled:!this.enabled,ref:e=>this._button=e},t("slot",{name:"leftIcon",onSlotchange:e=>{this.handleSlotChange(e)}}),this.label,t("slot",{name:"rightIcon",onSlotchange:e=>{this.handleSlotChange(e)}}))}};o.style=":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--text--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover--background-color:var(--background--strong, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--ez-button--border);--ez-button--focus--box-shadow:none;--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}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(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:hover{background-color:var(--ez-button--hover--background-color)}button:focus{outline:none;border:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;cursor:no-drop}button.icon{padding:0px}button.small{width:32px;min-width:32px;height:32px}button.medium{width:42px;min-width:42px;height:42px}button.large{width:52px;min-width:52px;height:52px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight)}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";const a=class{constructor(t){e(this,t),this.ezChange=r(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.enabled&&(this.value=!this.value,this.ezChange.emit(this.value))}getLabelClasses(){let e="label";return this.enabled||(e+=" label--disabled"),e}render(){return t(i,null,t("input",{type:"checkbox",class:"regularMode",checked:!0===this.value,onChange:()=>{this.changeValue()},disabled:!this.enabled,ref:e=>this._inputElem=e}),this.label?t("label",{class:this.getLabelClasses(),onClick:()=>{this.changeValue()},title:this.label},this.label):void 0)}static get watchers(){return{mode:["adjustMode"]}}};a.style=':host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-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>\');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:20px;--ez-switch--pin--height:20px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--checked--background-color:var(--color--primary-300);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-secondary);--ez-switch--pin--checked--background-color:var(--color--primary);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-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(--ez-check--width);height:var(--ez-check--height)}input.regularMode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regularMode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regularMode:disabled{cursor:auto;background:none}input.regularMode::before{box-sizing:border-box;content:"";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regularMode:disabled::before{border:var(--ez-check--disabled--border)}input.regularMode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regularMode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regularMode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regularMode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regularMode:checked::after{display:flex;position:absolute;content:"";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regularMode:checked:disabled::after{background-color:var(--ez-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:var(--border--small, 1px solid) var(--text--secondary, #a2abb9);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switchMode:disabled{background-color:var(--ez-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:translateX(-2px) translateY(-3px);border-radius:50%;width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switchMode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color)}input.switchMode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switchMode::before{display:block;content:"";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width))/2);background-color:var(--ez-switch--pin--focus--background-color)}input.switchMode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switchMode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width)))}input.switchMode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-3px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color)}input.switchMode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);text-shadow:var(--text-shadow);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}';const s=class{constructor(t){e(this,t),this.ezChange=r(this,"ezChange",7),this._listItems=[],this._listGroupItems=[],this._listItemsHistory=[],this.dataSource=[],this.useGroups=!1,this.ezDraggable=!1,this.ezSelectable=!1}createList(){if(this.useGroups){let e=[...this.dataSource];e.forEach((e=>{this.sortGroup(e)})),this._listGroupItems=e}else this._listItems=this._listItemsHistory.length>0?this._listItemsHistory:[...this.dataSource]}sortGroup(e){e.sort&&(e.items.sort((function(e,t){return e.label<t.label?-1:e.label>t.label?1:0})),"DSC"===e.sort&&e.items.reverse())}async setSelection(e,t){if(e&&this.ezSelectable){if(this.useGroups){let t=[...this._listGroupItems];t.forEach((t=>{t.items.forEach((t=>{t.selected=t.label==e.label}))})),this._listGroupItems=t}else{let t=[...this._listItems];t.forEach((t=>{t.selected=t.label===e.label})),this._listItems=t}if(t){let t=this.useGroups?this._groupContainer.querySelector("li#item_"+this.getItemId(e.label)):this._itemContainer.querySelector("li#item_"+this.getItemId(e.label));t&&t.scrollIntoView()}}else this.removeSelection()}removeSelection(){if(this.useGroups){let e=[...this._listGroupItems];e.forEach((e=>{e.items.forEach((e=>{e.selected=!1}))})),this._listGroupItems=e}else{let e=[...this._listItems];e.forEach((e=>{e.selected=!1})),this._listItems=e}}async getSelection(){let e;return this.useGroups?this._listGroupItems.every((t=>{let r=t.items.find((e=>1==e.selected));return!r||(e=r,!1)})):e=this._listItems.find((e=>1==e.selected)),e}async getList(){return this.useGroups?this._listGroupItems:this._listItems}componentWillLoad(){this._listItemsHistory=[]}componentWillRender(){this.createList()}onDrop(e,t){if(this.removeOverClass(),this.setSelection(void 0),this._dragStartItem)if(this.useGroups){let e=[...this._listGroupItems],r=this._listGroupItems.find((e=>t.groupName==e.group));if(e.find((e=>e.group==this._dragStartItem.groupName)).items.splice(this._dragStartItem.index,1),r.sort)e.find((e=>e.group==t.groupName)).items.push(this._dragStartItem.item),e.find((e=>e.group==t.groupName)).items.sort((function(e,t){return e.label<t.label?-1:e.label>t.label?1:0})),"DSC"===r.sort&&e.find((e=>e.group==t.groupName)).items.reverse();else{let r=t.index>this._dragStartItem.index?t.index-1:t.index;e.find((e=>e.group==t.groupName)).items.splice(r,0,this._dragStartItem.item)}this._listGroupItems=e,this.ezChange.emit(this._listGroupItems)}else{let e=[...this._listItems];e.splice(this._dragStartItem.index,1),e.splice(t.index,0,this._dragStartItem.item),this._listItems=e,this._listItemsHistory=e,this.ezChange.emit(this._listItems)}e.stopPropagation()}onDropLastIndex(e,t){if(this.removeOverClass(),this.setSelection(void 0),this._dragStartItem)if(this.useGroups){let e=[...this._listGroupItems],r=this._listGroupItems.find((e=>t.group==e.group));e.find((e=>e.group==this._dragStartItem.groupName)).items.splice(this._dragStartItem.index,1),e.find((e=>e.group==t.group)).items.push(this._dragStartItem.item),r.sort&&(e.find((e=>e.group==t.group)).items.sort((function(e,t){return e.label<t.label?-1:e.label>t.label?1:0})),"DSC"===r.sort&&e.find((e=>e.group==t.group)).items.reverse()),this._listGroupItems=e,this.ezChange.emit(this._listGroupItems)}else{let e=[...this._listItems];e.splice(this._dragStartItem.index,1),e.push(this._dragStartItem.item),this._listItems=e,this._listItemsHistory=e,this.ezChange.emit(this._listItems)}e.stopPropagation()}onDropGroup(e){var t;let r=[...this._listGroupItems];this.setSelection(void 0);let i=r.find((t=>t.group===e.group));if(i){if((null===(t=i.items)||void 0===t?void 0:t.length)>0){let e;i.items.forEach(((t,r)=>{t.label===this._dragStartItem.item.label&&(e={item:t,index:r})})),e?(i.items.splice(e.index,1),i.items.unshift(e.item),this.sortGroup(i)):(i.items.unshift(this._dragStartItem.item),this.sortGroup(i),r.find((e=>e.group===this._dragStartItem.groupName)).items.splice(this._dragStartItem.index,1))}else r.find((e=>e.group===this._dragStartItem.groupName)).items.splice(this._dragStartItem.index,1),i.items=[this._dragStartItem.item];this._listGroupItems=r}}onDragEnd(){if(this._dragStartItem=void 0,this.useGroups&&this.hideOverlays(),this._draggingElement){try{this._element.shadowRoot.removeChild(this._draggingElement)}catch(e){}this._draggingElement=void 0}}addOverClass(e){(null==e?void 0:e.__proto__)==HTMLDivElement.prototype&&e.classList.contains("draggable")?e.classList.add("over"):(null==e?void 0:e.parentElement)&&!e.parentElement.classList.contains("draggable-list")&&this.addOverClass(e.parentElement)}addOverGroupClass(e,t){if(e.target){let e=this._groupContainer.querySelector("div#"+this.getDivGroupId(t.group)).getElementsByClassName("group-overlay")[0];t.items.length>0?e.setAttribute("style","display:grid"):(e.classList.add("presetedHeight"),e.setAttribute("style","display:grid"),e.scrollIntoView(!1))}}removeOverClass(){var e,t;let r,i;this.useGroups?(r=null===(e=this._groupContainer)||void 0===e?void 0:e.getElementsByClassName("over"),i=this._groupContainer.getElementsByClassName("last-droppable-space")):(r=null===(t=this._itemContainer)||void 0===t?void 0:t.getElementsByClassName("over"),i=this._itemContainer.getElementsByClassName("last-droppable-space")),r&&Array.from(r).forEach((function(e){e.classList.remove("over")})),i&&Array.from(i).forEach((function(e){e.classList.remove("over")}))}removeOverGroupClass(e,t){if(e.target){let e=this._groupContainer.querySelector("div#"+this.getDivGroupId(t.group)).getElementsByClassName("group-overlay")[0];e&&(e.classList.remove("presetedHeight"),e.setAttribute("style","display:none"))}}onDragStart(e,t,r){this._changeDeboucingTimeout&&window.clearTimeout(this._changeDeboucingTimeout),this.useGroups?(this._dragStartItem={groupName:t.group,item:e,index:r},this._changeDeboucingTimeout=window.setTimeout((()=>{this.showOverlays(t)}),10)):this._dragStartItem={item:e.item,index:e.index}}selectFirstItem(){this.useGroups&&this.setSelection(this._listGroupItems[0].items[0]),this.setSelection(this._listItems[0])}nextOption(e){let t;if(this.useGroups)this._listGroupItems.every(((r,i,o)=>{let a,s=r.items.findIndex((t=>t.label==e.label));return null!=s&&-1!=s&&(s===r.items.length-1?i+1<=o.length-1&&(a={label:o[i+1].items[0].label}):a={label:r.items[s+1].label}),null==a||(t=a,!1)}));else{let r=this._listItems.findIndex((t=>t.label===e.label));r>=0&&r<this._listItems.length&&(t=this._listItems[r+1])}this.setSelection(t,!0)}previousOption(e){let t;if(this.useGroups)this._listGroupItems.every(((r,i,o)=>{let a,s=r.items.findIndex((t=>t.label==e.label));return null!=s&&-1!=s&&(0===s?i-1>=0&&(a={label:o[i-1].items[o[i-1].items.length-1].label}):a={label:r.items[s-1].label}),null==a||(t=a,!1)}));else{let r=this._listItems.findIndex((t=>t.label===e.label));r>0&&r<this._listItems.length&&(t=this._listItems[r-1])}this.setSelection(t,!0)}keyDownHandler(e){e.preventDefault(),this.getSelection().then((t=>{if(t)switch(e.key){case"ArrowDown":this.nextOption(t);break;case"ArrowUp":this.previousOption(t)}else this.selectFirstItem()})),e.stopPropagation()}getItemId(e){if(e)return e.replace(/[^a-z0-9_]/gi,"_")}getDivGroupId(e){if(e)return"group-"+e.replace(/[^a-z0-9_]/gi,"_")}getGroupOverlayId(e){if(e)return"group-overlay-"+e.replace(/[^a-z0-9_]/gi,"_")}onDragOverGroup(e,t){this._dragStartItem&&this._dragStartItem.groupName!==t.group&&t.sort&&(e.preventDefault(),this.addOverGroupClass(e,t))}onDragOverItem(e){this._dragStartItem&&(e.preventDefault(),this.addOverClass(e.target),e.stopPropagation())}onDragOverLastIndex(e){e.preventDefault(),this._dragStartItem&&(e.target.classList.add("over"),e.stopPropagation())}showOverlays(e){let t=this._groupContainer.getElementsByClassName("group-overlay");Array.from(t).forEach((t=>{let r=this.getGroupOverlayId(e.group);r&&t.getAttribute("id")&&r!=t.getAttribute("id")&&(t.classList.add("presetedHeight"),t.setAttribute("style","display:grid"))}))}hideOverlays(){var e;let t=null===(e=this._groupContainer)||void 0===e?void 0:e.getElementsByClassName("group-overlay");Array.from(t).forEach((e=>{e.classList.remove("presetedHeight"),e.setAttribute("style","display:none")}))}render(){return t(i,{ref:e=>this._element=e},this.useGroups?t("div",{class:"group-container",ref:e=>this._groupContainer=e,tabIndex:0,onKeyDown:e=>{this.keyDownHandler(e)}},this._listGroupItems.map((e=>t("div",{id:this.getDivGroupId(e.group),class:"group",key:e.group+e.items.length,onDrop:()=>this.onDropGroup(e)},t("label",{draggable:!1,class:"group-name"},e.group),t("section",{class:"section-container",onDragOver:e=>e.preventDefault()},t("div",{class:"group-items-container"},t("div",{class:"draggable-list"},e.items.map(((r,i)=>t("li",{id:"item_"+this.getItemId(r.label),class:this.ezSelectable?"selectable-container":"",key:"item_"+this.getItemId(r.label)},t("div",{class:"draggable"+(1==r.selected?" selected-item ":"")+(1==this.ezSelectable?" selectable ":""),onClick:()=>{this.setSelection(r)},onDragLeave:()=>{e.sort||this.removeOverClass()},onDragEnd:()=>this.onDragEnd(),onDragStart:()=>this.onDragStart(r,e,i),onDragOver:t=>{e.sort||this.onDragOverItem(t)},onDrop:t=>this.onDrop(t,{groupName:e.group,item:r,index:i}),draggable:this.ezDraggable},t("div",{class:"item-content"},this.ezDraggable?t("span",{class:"draggable-icon"}):void 0,t("p",{title:r.label,class:"person-name text--ellipsis"},r.label)),this.itemSlotBuilder?t("div",{class:"slot-item"},this.itemSlotBuilder(r,e)):void 0))))),t("div",{class:"last-droppable-space",onDragLeave:()=>this.removeOverClass(),onDragOver:e=>{this.onDragOverLastIndex(e)},onDragEnd:()=>this.onDragEnd(),onDrop:t=>this.onDropLastIndex(t,e)})),e.sort?t("div",{id:this.getGroupOverlayId(e.group),class:"group-overlay"},"Mover para ",e.group):void 0))))):t("div",{class:"items-container",ref:e=>this._itemContainer=e,tabIndex:0,onKeyDown:e=>{this.keyDownHandler(e)}},t("div",{class:"draggable-list"},this._listItems.map(((e,r)=>t("li",{id:"item_"+this.getItemId(e.label),class:this.ezSelectable?"selectable-container":"",key:"item_"+this.getItemId(e.label)},t("div",{class:"draggable"+(1==e.selected?" selected-item ":"")+(1==this.ezSelectable?" selectable ":""),onDragStart:()=>this.onDragStart({item:e,index:r}),onClick:()=>{this.setSelection(e)},onDragLeave:()=>this.removeOverClass(),onDragOver:e=>this.onDragOverItem(e),onDragEnd:()=>this.onDragEnd(),onDrop:t=>this.onDrop(t,{item:e,index:r}),draggable:this.ezDraggable},t("div",{class:"item-content"},this.ezDraggable?t("span",{class:"draggable-icon"}):void 0,t("p",{title:e.label,class:"person-name text--ellipsis"},e.label)),this.itemSlotBuilder?t("div",null,this.itemSlotBuilder(e)):void 0)))),t("div",{class:"last-droppable-space",onDragLeave:()=>this.removeOverClass(),onDragOver:e=>{this.onDragOverLastIndex(e)},onDragEnd:()=>this.onDragEnd(),onDrop:e=>this.onDropLastIndex(e)}))))}};s.style=':host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon__padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item__margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, "Sora");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item__border-radius:var(--border--radius-small, 6px);--ez-list__selected-item__background:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, "Sora");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group__overlay--font-family:var(--font-pattern, "Sora");--ez-list__group__overlay--font-size:var(--text--medium, 14px);--ez-list__group-container__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__group-container__scrollbar--width:var(--space--medium, 12px);--ez-list__group-container__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__draggable__list--padding-bottom:var(--space--small, 6px);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__draggable__scrollbar--width:var(--space--medium, 12px);--ez-list__draggable__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__draggable__icon--image:url(\'data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z"/></svg>\');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{display:flex;align-items:center;border-top:1px dashed #fff;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:center;align-items:center}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%}.draggable-list li{background-color:#fff;display:flex;margin:var(--ez-list__item__margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);height:32px}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:#f0f2f5}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:\'\';display:flex;background-color:var(--ez-list__icon--color);width:18px;height:18px;-webkit-mask-image:var(--ez-list__draggable__icon--image);mask-image:var(--ez-list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%}.group-name{font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom);-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar-track{background-color:#f0f2f5}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__group-container__scrollbar--background-color);border-radius:var(--ez-list__group-container__scrollbar--border-radius)}.group-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__group-container__scrollbar--width);max-width:var(--ez-list__group-container__scrollbar--width);min-width:var(--ez-list__group-container__scrollbar--width)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar-track{background-color:#f0f2f5}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.items-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.group-overlay{font-family:var(--ez-list__group__overlay--font-family);font-size:var(--ez-list__group__overlay--font-size);background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item__background);border-radius:var(--ez-list__selected-item__border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}';const l=class{constructor(t){e(this,t),this.ezChange=r(this,"ezChange",7),this.selectedOption={value:"na",label:"N/A"}}render(){return t("ez-combo-box",{class:"grid-config-combo inverted",label:"",value:this.selectedOption,enabled:!0,canShowError:!1,suppressEmptyOption:!0},t("option",{value:"na"},"N/A"),t("option",{value:"asc"},"A-Z"),t("option",{value:"desc"},"Z-A"))}static get assetsDirs(){return["../assets"]}};l.style="ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";export{o as ez_button,a as ez_check,s as ez_list,l as select_box}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as n}from"./p-85a9446b.js";import{DataUnit as i,ChangeOperation as r,DateUtils as s,StringUtils as o,ApplicationContext as a}from"@sankhyalabs/core";import{c as u,a as c}from"./p-112455b1.js";import{ApplicationUtils as l}from"@sankhyalabs/ezui/dist/collection/utils";var h=u((function(e,t){var n="undefined"!=typeof self?self:c,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,i="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in e,o="ArrayBuffer"in e;if(o)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function v(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function p(e){var t=new FileReader,n=v(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e,t,n,i=d(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,n=v(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[c(e)]},f.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},f.prototype.set=function(e,t){this.map[c(e)]=l(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),h(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),h(e)},i&&(f.prototype[Symbol.iterator]=f.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){var n,i,r=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=(i=(n=t.method||this.method||"GET").toUpperCase(),b.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function g(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}})),t}function O(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},y.call(w.prototype),y.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},O.error=function(){var e=new O(null,{status:0,statusText:""});return e.type="error",e};var D=[301,302,303,307,308];O.redirect=function(e,t){if(-1===D.indexOf(t))throw new RangeError("Invalid status code");return new O(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function T(e,n){return new Promise((function(i,s){var o=new w(e,n);if(o.signal&&o.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();t.append(i,r)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL"),i(new O("response"in a?a.response:a.responseText,n))},a.onerror=function(){s(new TypeError("Network request failed"))},a.ontimeout=function(){s(new TypeError("Network request failed"))},a.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&r&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",u)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}T.polyfill=!0,e.fetch||(e.fetch=T,e.Headers=f,e.Request=w,e.Response=O),t.Headers=f,t.Request=w,t.Response=O,t.fetch=T,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t})),f=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isObjectLike=function(e){return"object"==typeof e&&null!==e}})),d=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.invariant=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}})),v=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){let i=0,r=1;for(const s of e.body.matchAll(n)){if("number"==typeof s.index||(0,d.invariant)(!1),s.index>=t)break;i=s.index+s[0].length,r+=1}return{line:r,column:t+1-i}};const n=/\r\n|[\n\r]/g})),p=u((function(e,t){function n(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,s=t.line-1,o=t.line+(e.locationOffset.line-1),a=t.column+(1===t.line?n:0),u=`${e.name}:${o}:${a}\n`,c=r.split(/\r\n|[\n\r]/g),l=c[s];if(l.length>120){const e=Math.floor(a/80),t=a%80,n=[];for(let e=0;e<l.length;e+=80)n.push(l.slice(e,e+80));return u+i([[`${o} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return u+i([[o-1+" |",c[s-1]],[`${o} |`,l],["|","^".padStart(a)],[`${o+1} |`,c[s+1]]])}function i(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}Object.defineProperty(t,"__esModule",{value:!0}),t.printLocation=function(e){return n(e.source,(0,v.getLocation)(e.source,e.start))},t.printSourceLocation=n})),m=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLError=void 0,t.formatError=function(e){return e.toJSON()},t.printError=function(e){return e.toString()};class n extends Error{constructor(e,...t){var r,s,o;const{nodes:a,source:u,positions:c,path:l,originalError:h,extensions:d}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=l?l:void 0,this.originalError=null!=h?h:void 0,this.nodes=i(Array.isArray(a)?a:a?[a]:void 0);const p=i(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=u?u:null==p||null===(s=p[0])||void 0===s?void 0:s.source,this.positions=null!=c?c:null==p?void 0:p.map((e=>e.start)),this.locations=c&&u?c.map((e=>(0,v.getLocation)(u,e))):null==p?void 0:p.map((e=>(0,v.getLocation)(e.source,e.start)));const m=(0,f.isObjectLike)(null==h?void 0:h.extensions)?null==h?void 0:h.extensions:void 0;this.extensions=null!==(o=null!=d?d:m)&&void 0!==o?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=h&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+(0,p.printLocation)(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+(0,p.printSourceLocation)(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function i(e){return void 0===e||0===e.length?void 0:e}t.GraphQLError=n})),y=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=function(e,t,n){return new m.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}})),b=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Token=t.QueryDocumentKeys=t.OperationTypeNode=t.Location=void 0,t.isNode=function(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&s.has(t)};class n{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}t.Location=n;class i{constructor(e,t,n,i,r,s){this.kind=e,this.start=t,this.end=n,this.line=i,this.column=r,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}t.Token=i;const r={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};t.QueryDocumentKeys=r;const s=new Set(Object.keys(r));let o;t.OperationTypeNode=o,function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(o||(t.OperationTypeNode=o={}))})),w=u((function(e,t){let n;Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0,t.DirectiveLocation=n,function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(n||(t.DirectiveLocation=n={}))})),g=u((function(e,t){let n;Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=void 0,t.Kind=n,function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(n||(t.Kind=n={}))})),O=u((function(e,t){function n(e){return e>=48&&e<=57}function i(e){return e>=97&&e<=122||e>=65&&e<=90}Object.defineProperty(t,"__esModule",{value:!0}),t.isDigit=n,t.isLetter=i,t.isNameContinue=function(e){return i(e)||n(e)||95===e},t.isNameStart=function(e){return i(e)||95===e},t.isWhiteSpace=function(e){return 9===e||32===e}})),D=u((function(e,t){function n(e){let t=0;for(;t<e.length&&(0,O.isWhiteSpace)(e.charCodeAt(t));)++t;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.dedentBlockStringLines=function(e){var t;let i=Number.MAX_SAFE_INTEGER,r=null,s=-1;for(let t=0;t<e.length;++t){var o;const a=e[t],u=n(a);u!==a.length&&(r=null!==(o=r)&&void 0!==o?o:t,s=t,0!==t&&u<i&&(i=u))}return e.map(((e,t)=>0===t?e:e.slice(i))).slice(null!==(t=r)&&void 0!==t?t:0,s+1)},t.isPrintableAsBlockString=function(e){if(""===e)return!0;let t=!0,n=!1,i=!0,r=!1;for(let s=0;s<e.length;++s)switch(e.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:case 13:return!1;case 10:if(t&&!r)return!1;r=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:i&&(i=n),t=!1}return!t&&(!i||!r)},t.printBlockString=function(e,t){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=1===i.length,s=i.length>1&&i.slice(1).every((e=>0===e.length||(0,O.isWhiteSpace)(e.charCodeAt(0)))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),c=a||u,l=!(null!=t&&t.minimize)&&(!r||e.length>70||c||s||o);let h="";const f=r&&(0,O.isWhiteSpace)(e.charCodeAt(0));return(l&&!f||s)&&(h+="\n"),h+=n,(l||c)&&(h+="\n"),'"""'+h+'"""'}})),T=u((function(e,t){let n;Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0,t.TokenKind=n,function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(n||(t.TokenKind=n={}))})),E=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Lexer=void 0,t.isPunctuatorTokenKind=function(e){return e===T.TokenKind.BANG||e===T.TokenKind.DOLLAR||e===T.TokenKind.AMP||e===T.TokenKind.PAREN_L||e===T.TokenKind.PAREN_R||e===T.TokenKind.SPREAD||e===T.TokenKind.COLON||e===T.TokenKind.EQUALS||e===T.TokenKind.AT||e===T.TokenKind.BRACKET_L||e===T.TokenKind.BRACKET_R||e===T.TokenKind.BRACE_L||e===T.TokenKind.PIPE||e===T.TokenKind.BRACE_R};class n{constructor(e){const t=new b.Token(T.TokenKind.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==T.TokenKind.EOF)do{if(e.next)e=e.next;else{const t=c(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===T.TokenKind.COMMENT);return e}}function i(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function r(e,t){return s(e.charCodeAt(t))&&o(e.charCodeAt(t+1))}function s(e){return e>=55296&&e<=56319}function o(e){return e>=56320&&e<=57343}function a(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return T.TokenKind.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function u(e,t,n,i,r){return new b.Token(t,n,i,e.line,1+n-e.lineStart,r)}function c(e,t){const n=e.source.body,s=n.length;let o=t;for(;o<s;){const t=n.charCodeAt(o);switch(t){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===n.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return l(e,o);case 33:return u(e,T.TokenKind.BANG,o,o+1);case 36:return u(e,T.TokenKind.DOLLAR,o,o+1);case 38:return u(e,T.TokenKind.AMP,o,o+1);case 40:return u(e,T.TokenKind.PAREN_L,o,o+1);case 41:return u(e,T.TokenKind.PAREN_R,o,o+1);case 46:if(46===n.charCodeAt(o+1)&&46===n.charCodeAt(o+2))return u(e,T.TokenKind.SPREAD,o,o+3);break;case 58:return u(e,T.TokenKind.COLON,o,o+1);case 61:return u(e,T.TokenKind.EQUALS,o,o+1);case 64:return u(e,T.TokenKind.AT,o,o+1);case 91:return u(e,T.TokenKind.BRACKET_L,o,o+1);case 93:return u(e,T.TokenKind.BRACKET_R,o,o+1);case 123:return u(e,T.TokenKind.BRACE_L,o,o+1);case 124:return u(e,T.TokenKind.PIPE,o,o+1);case 125:return u(e,T.TokenKind.BRACE_R,o,o+1);case 34:return 34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)?E(e,o):d(e,o)}if((0,O.isDigit)(t)||45===t)return h(e,o,t);if((0,O.isNameStart)(t))return S(e,o);throw(0,y.syntaxError)(e.source,o,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":i(t)||r(n,o)?`Unexpected character: ${a(e,o)}.`:`Invalid character: ${a(e,o)}.`)}return u(e,T.TokenKind.EOF,s,s)}function l(e,t){const n=e.source.body,s=n.length;let o=t+1;for(;o<s;){const e=n.charCodeAt(o);if(10===e||13===e)break;if(i(e))++o;else{if(!r(n,o))break;o+=2}}return u(e,T.TokenKind.COMMENT,t,o,n.slice(t+1,o))}function h(e,t,n){const i=e.source.body;let r=t,s=n,o=!1;if(45===s&&(s=i.charCodeAt(++r)),48===s){if(s=i.charCodeAt(++r),(0,O.isDigit)(s))throw(0,y.syntaxError)(e.source,r,`Invalid number, unexpected digit after 0: ${a(e,r)}.`)}else r=f(e,r,s),s=i.charCodeAt(r);if(46===s&&(o=!0,s=i.charCodeAt(++r),r=f(e,r,s),s=i.charCodeAt(r)),69!==s&&101!==s||(o=!0,s=i.charCodeAt(++r),43!==s&&45!==s||(s=i.charCodeAt(++r)),r=f(e,r,s),s=i.charCodeAt(r)),46===s||(0,O.isNameStart)(s))throw(0,y.syntaxError)(e.source,r,`Invalid number, expected digit but got: ${a(e,r)}.`);return u(e,o?T.TokenKind.FLOAT:T.TokenKind.INT,t,r,i.slice(t,r))}function f(e,t,n){if(!(0,O.isDigit)(n))throw(0,y.syntaxError)(e.source,t,`Invalid number, expected digit but got: ${a(e,t)}.`);const i=e.source.body;let r=t+1;for(;(0,O.isDigit)(i.charCodeAt(r));)++r;return r}function d(e,t){const n=e.source.body,s=n.length;let o=t+1,c=o,l="";for(;o<s;){const s=n.charCodeAt(o);if(34===s)return l+=n.slice(c,o),u(e,T.TokenKind.STRING,t,o+1,l);if(92!==s){if(10===s||13===s)break;if(i(s))++o;else{if(!r(n,o))throw(0,y.syntaxError)(e.source,o,`Invalid character within String: ${a(e,o)}.`);o+=2}}else{l+=n.slice(c,o);const t=117===n.charCodeAt(o+1)?123===n.charCodeAt(o+2)?v(e,o):p(e,o):g(e,o);l+=t.value,o+=t.size,c=o}}throw(0,y.syntaxError)(e.source,o,"Unterminated string.")}function v(e,t){const n=e.source.body;let r=0,s=3;for(;s<12;){const e=n.charCodeAt(t+s++);if(125===e){if(s<5||!i(r))break;return{value:String.fromCodePoint(r),size:s}}if(r=r<<4|w(e),r<0)break}throw(0,y.syntaxError)(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+s)}".`)}function p(e,t){const n=e.source.body,r=m(n,t+2);if(i(r))return{value:String.fromCodePoint(r),size:6};if(s(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=m(n,t+8);if(o(e))return{value:String.fromCodePoint(r,e),size:12}}throw(0,y.syntaxError)(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function m(e,t){return w(e.charCodeAt(t))<<12|w(e.charCodeAt(t+1))<<8|w(e.charCodeAt(t+2))<<4|w(e.charCodeAt(t+3))}function w(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function g(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw(0,y.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function E(e,t){const n=e.source.body,s=n.length;let o=e.lineStart,c=t+3,l=c,h="";const f=[];for(;c<s;){const s=n.charCodeAt(c);if(34===s&&34===n.charCodeAt(c+1)&&34===n.charCodeAt(c+2)){h+=n.slice(l,c),f.push(h);const i=u(e,T.TokenKind.BLOCK_STRING,t,c+3,(0,D.dedentBlockStringLines)(f).join("\n"));return e.line+=f.length-1,e.lineStart=o,i}if(92!==s||34!==n.charCodeAt(c+1)||34!==n.charCodeAt(c+2)||34!==n.charCodeAt(c+3))if(10!==s&&13!==s)if(i(s))++c;else{if(!r(n,c))throw(0,y.syntaxError)(e.source,c,`Invalid character within String: ${a(e,c)}.`);c+=2}else h+=n.slice(l,c),f.push(h),13===s&&10===n.charCodeAt(c+1)?c+=2:++c,h="",l=c,o=c;else h+=n.slice(l,c),l=c+1,c+=4}throw(0,y.syntaxError)(e.source,c,"Unterminated string.")}function S(e,t){const n=e.source.body,i=n.length;let r=t+1;for(;r<i;){const e=n.charCodeAt(r);if(!(0,O.isNameContinue)(e))break;++r}return u(e,T.TokenKind.NAME,t,r,n.slice(t,r))}t.Lexer=n})),S=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.devAssert=function(e,t){if(!Boolean(e))throw new Error(t)}})),j=u((function(e,t){function n(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const i=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:n(t,i)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const i=Math.min(10,e.length),r=e.length-i,s=[];for(let r=0;r<i;++r)s.push(n(e[r],t));return 1===r?s.push("... 1 more item"):r>1&&s.push(`... ${r} more items`),"["+s.join(", ")+"]"}(e,i);return function(e,t){const i=Object.entries(e);return 0===i.length?"{}":t.length>2?"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]":"{ "+i.map((([e,i])=>e+": "+n(i,t))).join(", ")+" }"}(e,i)}(e,t);default:return String(e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.inspect=function(e){return n(e,[])}})),I=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.instanceOf=void 0,t.instanceOf=function(e,t){return e instanceof t}})),x=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0,t.isSource=function(e){return(0,I.instanceOf)(e,n)};class n{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||(0,S.devAssert)(!1,`Body must be a string. Received: ${(0,j.inspect)(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||(0,S.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,S.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}t.Source=n})),_=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0,t.parse=function(e,t){return new n(e,t).parseDocument()},t.parseConstValue=function(e,t){const i=new n(e,t);i.expectToken(T.TokenKind.SOF);const r=i.parseConstValueLiteral();return i.expectToken(T.TokenKind.EOF),r},t.parseType=function(e,t){const i=new n(e,t);i.expectToken(T.TokenKind.SOF);const r=i.parseTypeReference();return i.expectToken(T.TokenKind.EOF),r},t.parseValue=function(e,t){const i=new n(e,t);i.expectToken(T.TokenKind.SOF);const r=i.parseValueLiteral(!1);return i.expectToken(T.TokenKind.EOF),r};class n{constructor(e,t){const n=(0,x.isSource)(e)?e:new x.Source(e);this._lexer=new E.Lexer(n),this._options=t}parseName(){const e=this.expectToken(T.TokenKind.NAME);return this.node(e,{kind:g.Kind.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:g.Kind.DOCUMENT,definitions:this.many(T.TokenKind.SOF,this.parseDefinition,T.TokenKind.EOF)})}parseDefinition(){if(this.peek(T.TokenKind.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===T.TokenKind.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw(0,y.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(T.TokenKind.BRACE_L))return this.node(e,{kind:g.Kind.OPERATION_DEFINITION,operation:b.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(T.TokenKind.NAME)&&(n=this.parseName()),this.node(e,{kind:g.Kind.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(T.TokenKind.NAME);switch(e.value){case"query":return b.OperationTypeNode.QUERY;case"mutation":return b.OperationTypeNode.MUTATION;case"subscription":return b.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(T.TokenKind.PAREN_L,this.parseVariableDefinition,T.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:g.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(T.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(T.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(T.TokenKind.DOLLAR),this.node(e,{kind:g.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:g.Kind.SELECTION_SET,selections:this.many(T.TokenKind.BRACE_L,this.parseSelection,T.TokenKind.BRACE_R)})}parseSelection(){return this.peek(T.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,i;return this.expectOptionalToken(T.TokenKind.COLON)?(n=t,i=this.parseName()):i=t,this.node(e,{kind:g.Kind.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(T.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){return this.optionalMany(T.TokenKind.PAREN_L,e?this.parseConstArgument:this.parseArgument,T.TokenKind.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(T.TokenKind.COLON),this.node(t,{kind:g.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(T.TokenKind.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(T.TokenKind.NAME)?this.node(e,{kind:g.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:g.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var e;const t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacyFragmentVariables)?this.node(t,{kind:g.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:g.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case T.TokenKind.BRACKET_L:return this.parseList(e);case T.TokenKind.BRACE_L:return this.parseObject(e);case T.TokenKind.INT:return this._lexer.advance(),this.node(t,{kind:g.Kind.INT,value:t.value});case T.TokenKind.FLOAT:return this._lexer.advance(),this.node(t,{kind:g.Kind.FLOAT,value:t.value});case T.TokenKind.STRING:case T.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case T.TokenKind.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:g.Kind.BOOLEAN,value:!0});case"false":return this.node(t,{kind:g.Kind.BOOLEAN,value:!1});case"null":return this.node(t,{kind:g.Kind.NULL});default:return this.node(t,{kind:g.Kind.ENUM,value:t.value})}case T.TokenKind.DOLLAR:if(e){if(this.expectToken(T.TokenKind.DOLLAR),this._lexer.token.kind===T.TokenKind.NAME)throw(0,y.syntaxError)(this._lexer.source,t.start,`Unexpected variable "$${this._lexer.token.value}" in constant value.`);throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this._lexer.advance(),this.node(e,{kind:g.Kind.STRING,value:e.value,block:e.kind===T.TokenKind.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:g.Kind.LIST,values:this.any(T.TokenKind.BRACKET_L,(()=>this.parseValueLiteral(e)),T.TokenKind.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:g.Kind.OBJECT,fields:this.any(T.TokenKind.BRACE_L,(()=>this.parseObjectField(e)),T.TokenKind.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(T.TokenKind.COLON),this.node(t,{kind:g.Kind.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(T.TokenKind.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(T.TokenKind.AT),this.node(t,{kind:g.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(T.TokenKind.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(T.TokenKind.BRACKET_R),t=this.node(e,{kind:g.Kind.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(T.TokenKind.BANG)?this.node(e,{kind:g.Kind.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:g.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(T.TokenKind.STRING)||this.peek(T.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(T.TokenKind.BRACE_L,this.parseOperationTypeDefinition,T.TokenKind.BRACE_R);return this.node(e,{kind:g.Kind.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(T.TokenKind.COLON);const n=this.parseNamedType();return this.node(e,{kind:g.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:g.Kind.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:g.Kind.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(T.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(T.TokenKind.BRACE_L,this.parseFieldDefinition,T.TokenKind.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(T.TokenKind.COLON);const r=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:g.Kind.FIELD_DEFINITION,description:t,name:n,arguments:i,type:r,directives:s})}parseArgumentDefs(){return this.optionalMany(T.TokenKind.PAREN_L,this.parseInputValueDef,T.TokenKind.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(T.TokenKind.COLON);const i=this.parseTypeReference();let r;this.expectOptionalToken(T.TokenKind.EQUALS)&&(r=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(e,{kind:g.Kind.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:s})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:g.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(e,{kind:g.Kind.UNION_TYPE_DEFINITION,description:t,name:n,directives:i,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(T.TokenKind.EQUALS)?this.delimitedMany(T.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(e,{kind:g.Kind.ENUM_TYPE_DEFINITION,description:t,name:n,directives:i,values:r})}parseEnumValuesDefinition(){return this.optionalMany(T.TokenKind.BRACE_L,this.parseEnumValueDefinition,T.TokenKind.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:g.Kind.ENUM_VALUE_DEFINITION,description:t,name:n,directives:i})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw(0,y.syntaxError)(this._lexer.source,this._lexer.token.start,`${i(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(e,{kind:g.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:i,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(T.TokenKind.BRACE_L,this.parseInputValueDef,T.TokenKind.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===T.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(T.TokenKind.BRACE_L,this.parseOperationTypeDefinition,T.TokenKind.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:g.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:g.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(0===n.length&&0===i.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:g.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(0===n.length&&0===i.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:g.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:g.Kind.UNION_TYPE_EXTENSION,name:t,directives:n,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:g.Kind.ENUM_TYPE_EXTENSION,name:t,directives:n,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:g.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(T.TokenKind.AT);const n=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(e,{kind:g.Kind.DIRECTIVE_DEFINITION,description:t,name:n,arguments:i,repeatable:r,locations:s})}parseDirectiveLocations(){return this.delimitedMany(T.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(w.DirectiveLocation,t.value))return t;throw this.unexpected(e)}node(e,t){var n;return!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation)&&(t.loc=new b.Location(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw(0,y.syntaxError)(this._lexer.source,t.start,`Expected ${r(e)}, found ${i(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==T.TokenKind.NAME||t.value!==e)throw(0,y.syntaxError)(this._lexer.source,t.start,`Expected "${e}", found ${i(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===T.TokenKind.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return(0,y.syntaxError)(this._lexer.source,t.start,`Unexpected ${i(t)}.`)}any(e,t,n){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(n);)i.push(t.call(this));return i}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const i=[];do{i.push(t.call(this))}while(!this.expectOptionalToken(n));return i}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}}function i(e){const t=e.value;return r(e.kind)+(null!=t?` "${t}"`:"")}function r(e){return(0,E.isPunctuatorTokenKind)(e)?`"${e}"`:e}t.Parser=n})),k=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.printString=function(e){return`"${e.replace(n,i)}"`};const n=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function i(e){return r[e.charCodeAt(0)]}const r=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]})),A=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BREAK=void 0,t.getEnterLeaveForKind=i,t.getVisitFn=function(e,t,n){const{enter:r,leave:s}=i(e,t);return n?s:r},t.visit=function(e,t,r=b.QueryDocumentKeys){const s=new Map;for(const e of Object.values(g.Kind))s.set(e,i(t,e));let o,a,u,c=Array.isArray(e),l=[e],h=-1,f=[],d=e;const v=[],p=[];do{h++;const e=h===l.length,i=e&&0!==f.length;if(e){if(a=0===p.length?void 0:v[v.length-1],d=u,u=p.pop(),i)if(c){d=d.slice();let e=0;for(const[t,n]of f){const i=t-e;null===n?(d.splice(i,1),e++):d[i]=n}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(const[e,t]of f)d[e]=t}h=o.index,l=o.keys,f=o.edits,c=o.inArray,o=o.prev}else if(u){if(a=c?h:l[h],d=u[a],null==d)continue;v.push(a)}let g;if(!Array.isArray(d)){var m,y;(0,b.isNode)(d)||(0,S.devAssert)(!1,`Invalid AST Node: ${(0,j.inspect)(d)}.`);const i=e?null===(m=s.get(d.kind))||void 0===m?void 0:m.leave:null===(y=s.get(d.kind))||void 0===y?void 0:y.enter;if(g=null==i?void 0:i.call(t,d,a,u,v,p),g===n)break;if(!1===g){if(!e){v.pop();continue}}else if(void 0!==g&&(f.push([a,g]),!e)){if(!(0,b.isNode)(g)){v.pop();continue}d=g}}var w;void 0===g&&i&&f.push([a,d]),e?v.pop():(o={inArray:c,index:h,keys:l,edits:f,prev:o},c=Array.isArray(d),l=c?d:null!==(w=r[d.kind])&&void 0!==w?w:[],h=-1,f=[],u&&p.push(u),u=d)}while(void 0!==o);return 0!==f.length?f[f.length-1][1]:e},t.visitInParallel=function(e){const t=new Array(e.length).fill(null),r=Object.create(null);for(const s of Object.values(g.Kind)){let o=!1;const a=new Array(e.length).fill(void 0),u=new Array(e.length).fill(void 0);for(let t=0;t<e.length;++t){const{enter:n,leave:r}=i(e[t],s);o||(o=null!=n||null!=r),a[t]=n,u[t]=r}o&&(r[s]={enter(...i){const r=i[0];for(let o=0;o<e.length;o++)if(null===t[o]){var s;const u=null===(s=a[o])||void 0===s?void 0:s.apply(e[o],i);if(!1===u)t[o]=r;else if(u===n)t[o]=n;else if(void 0!==u)return u}},leave(...i){const r=i[0];for(let o=0;o<e.length;o++)if(null===t[o]){var s;const r=null===(s=u[o])||void 0===s?void 0:s.apply(e[o],i);if(r===n)t[o]=n;else if(void 0!==r&&!1!==r)return r}else t[o]===r&&(t[o]=null)}})}return r};const n=Object.freeze({});function i(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}t.BREAK=n})),$=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,A.visit)(e,n)};const n={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>i(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=s("(",i(e.variableDefinitions,", "),")"),n=i([e.operation,i([e.name,t]),i(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+s(" = ",n)+s(" ",i(r," "))},SelectionSet:{leave:({selections:e})=>r(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:a}){const u=s("",e,": ")+t;let c=u+s("(",i(n,", "),")");return c.length>80&&(c=u+s("(\n",o(i(n,"\n")),"\n)")),i([c,i(r," "),a]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+s(" ",i(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>i(["...",s("on ",e),i(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:o})=>`fragment ${e}${s("(",i(n,", "),")")} on ${t} ${s("",i(r," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,D.printBlockString)(e):(0,k.printString)(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+i(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+i(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+s("(",i(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>s("",e,"\n")+i(["schema",i(t," "),r(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>s("",e,"\n")+i(["scalar",t,i(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:o,fields:a})=>s("",e,"\n")+i(["type",t,s("implements ",i(n," & ")),i(o," "),r(a)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:u})=>s("",e,"\n")+t+(a(n)?s("(\n",o(i(n,"\n")),"\n)"):s("(",i(n,", "),")"))+": "+r+s(" ",i(u," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:o})=>s("",e,"\n")+i([t+": "+n,s("= ",r),i(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:o,fields:a})=>s("",e,"\n")+i(["interface",t,s("implements ",i(n," & ")),i(o," "),r(a)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>s("",e,"\n")+i(["union",t,i(n," "),s("= ",i(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:o})=>s("",e,"\n")+i(["enum",t,i(n," "),r(o)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>s("",e,"\n")+i([t,i(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:o})=>s("",e,"\n")+i(["input",t,i(n," "),r(o)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:u})=>s("",e,"\n")+"directive @"+t+(a(n)?s("(\n",o(i(n,"\n")),"\n)"):s("(",i(n,", "),")"))+(r?" repeatable":"")+" on "+i(u," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>i(["extend schema",i(e," "),r(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>i(["extend scalar",e,i(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:o})=>i(["extend type",e,s("implements ",i(t," & ")),i(n," "),r(o)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:o})=>i(["extend interface",e,s("implements ",i(t," & ")),i(n," "),r(o)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>i(["extend union",e,i(t," "),s("= ",i(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>i(["extend enum",e,i(t," "),r(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>i(["extend input",e,i(t," "),r(n)]," ")}};function i(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function r(e){return s("{\n",o(i(e,"\n")),"\n}")}function s(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function o(e){return s(" ",e.replace(/\n/g,"\n "))}function a(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}})),F=function(e){var t=e.name,n=e.type;this.uri=e.uri,this.name=t,this.type=n},N=function(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||e instanceof F},q=function e(t,n,i){var r;void 0===n&&(n=""),void 0===i&&(i=N);var s=new Map;function o(e,t){var n=s.get(t);n?n.push.apply(n,e):s.set(t,e)}if(i(t))r=null,o([n],t);else{var a=n?n+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)r=Array.prototype.map.call(t,(function(e,t){return o([""+a+t],e),null}));else if(Array.isArray(t))r=t.map((function(t,n){var r=e(t,""+a+n,i);return r.files.forEach(o),r.clone}));else if(t&&t.constructor===Object)for(var u in r={},t){var c=e(t[u],""+a+u,i);c.files.forEach(o),r[u]=c.clone}else r=t}return{clone:r,files:s}},U=N,P="object"==typeof self?self.FormData:window.FormData,V=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultJsonSerializer=void 0,t.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify}})),C=u((function(e,t){var n=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(P),r=function(e){return U(e)||null!==e&&"object"==typeof e&&"function"==typeof e.pipe};t.default=function(e,t,n,s){void 0===s&&(s=V.defaultJsonSerializer);var o=q({query:e,variables:t,operationName:n},"",r),a=o.clone,u=o.files;if(0===u.size){if(!Array.isArray(e))return s.stringify(a);if(void 0!==t&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var c=e.reduce((function(e,n,i){return e.push({query:n,variables:t?t[i]:void 0}),e}),[]);return s.stringify(c)}var l=new("undefined"==typeof FormData?i.default:FormData);l.append("operations",s.stringify(a));var h={},f=0;return u.forEach((function(e){h[++f]=e})),l.append("map",s.stringify(h)),f=0,u.forEach((function(e,t){l.append(""+ ++f,t)})),l}})),M=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseBatchRequestsExtendedArgs=t.parseRawRequestExtendedArgs=t.parseRequestExtendedArgs=t.parseBatchRequestArgs=t.parseRawRequestArgs=t.parseRequestArgs=void 0,t.parseRequestArgs=function(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}},t.parseRawRequestArgs=function(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}},t.parseBatchRequestArgs=function(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}},t.parseRequestExtendedArgs=function(e,t,n,i){return e.document?e:{url:e,document:t,variables:n,requestHeaders:i,signal:void 0}},t.parseRawRequestExtendedArgs=function(e,t,n,i){return e.query?e:{url:e,query:t,variables:n,requestHeaders:i,signal:void 0}},t.parseBatchRequestsExtendedArgs=function(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}})),L=u((function(e,t){var n,i=c&&c.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0}),t.ClientError=void 0;var r=function(e){function t(n,i){var r=this,s=t.extractMessage(n)+": "+JSON.stringify({response:n,request:i});return r=e.call(this,s)||this,Object.setPrototypeOf(r,t.prototype),r.response=n,r.request=i,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(r,t),r}return i(t,e),t.extractMessage=function(e){try{return e.errors[0].message}catch(t){return"GraphQL Error (Code: "+e.status+")"}},t}(Error);t.ClientError=r})),R=u((function(e,t){var n=c&&c.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},i=c&&c.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))},r=c&&c.__generator||function(e,t){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLWebSocketClient=void 0;var s="ping",o="pong",a="complete",u=function(){function e(e,t,n){this._type=e,this._payload=t,this._id=n}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){var e={type:this.type};return null!=this.id&&null!=this.id&&(e.id=this.id),null!=this.payload&&null!=this.payload&&(e.payload=this.payload),JSON.stringify(e)},enumerable:!1,configurable:!0}),e.parse=function(t,n){var i=JSON.parse(t),r=i.id;return new e(i.type,n(i.payload),r)},e}(),l=function(){function e(e,t){var c=this,l=t.onInit,d=t.onAcknowledged,v=t.onPing,p=t.onPong;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=e,e.onopen=function(){return i(c,void 0,void 0,(function(){var t,n,i,s;return r(this,(function(r){switch(r.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},n=(t=e).send,i=h,l?[4,l()]:[3,2];case 1:return s=r.sent(),[3,3];case 2:s=null,r.label=3;case 3:return n.apply(t,[i.apply(void 0,[s]).text]),[2]}}))}))},e.onclose=function(){c.socketState.acknowledged=!1,c.socketState.subscriptions={}},e.onerror=function(e){console.error(e)},e.onmessage=function(t){try{var i=(void 0===y&&(y=function(e){return e}),u.parse(t.data,y));switch(i.type){case"connection_ack":return void(c.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(c.socketState.acknowledged=!0,d&&d(i.payload)));case s:return void(v?v(i.payload).then((function(t){return e.send(f(t).text)})):e.send(f(null).text));case o:return void(p&&p(i.payload))}if(!c.socketState.acknowledged)return;if(null==i.id||!c.socketState.subscriptions[i.id])return;var r=c.socketState.subscriptions[i.id],l=r.query,h=r.variables,m=r.subscriber;switch(i.type){case"next":return!i.payload.errors&&i.payload.data&&m.next&&m.next(i.payload.data),void(i.payload.errors&&m.error&&m.error(new L.ClientError(n(n({},i.payload),{status:200}),{query:l,variables:h})));case"error":return void(m.error&&m.error(new L.ClientError({errors:i.payload,status:200},{query:l,variables:h})));case a:return m.complete&&m.complete(),void delete c.socketState.subscriptions[i.id]}}catch(t){console.error(t),e.close(1006)}var y;e.close(4400,"Unknown graphql-ws message.")}}return e.prototype.makeSubscribe=function(e,t,n,i){var r,s,o=this,c=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[c]={query:e,variables:n,subscriber:i},this.socket.send((r=c,s={query:e,operationName:t,variables:n},new u("subscribe",s,r)).text),function(){o.socket.send(function(e){return new u(a,void 0,e)}(c).text),delete o.socketState.subscriptions[c]}},e.prototype.rawRequest=function(e,t){var n=this;return new Promise((function(i,r){var s;n.rawSubscribe(e,{next:function(e,t){return s={data:e,extensions:t}},error:r,complete:function(){return i(s)}},t)}))},e.prototype.request=function(e,t){var n=this;return new Promise((function(i,r){var s;n.subscribe(e,{next:function(e){return s=e},error:r,complete:function(){return i(s)}},t)}))},e.prototype.subscribe=function(e,t,n){var i=B.resolveRequestDocument(e);return this.makeSubscribe(i.query,i.operationName,n,t)},e.prototype.rawSubscribe=function(e,t,n){return this.makeSubscribe(e,void 0,n,t)},e.prototype.ping=function(e){this.socket.send(function(e){return new u(s,e,void 0)}(e).text)},e.prototype.close=function(){this.socket.close(1e3)},e.PROTOCOL="graphql-transport-ws",e}();function h(e){return new u("connection_init",e)}function f(e){return new u(o,e,void 0)}t.GraphQLWebSocketClient=l})),B=u((function(e,t){var n=c&&c.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},i=c&&c.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=c&&c.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=c&&c.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},o=c&&c.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{u(i.next(e))}catch(e){s(e)}}function a(e){try{u(i.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}u((i=i.apply(e,t||[])).next())}))},a=c&&c.__generator||function(e,t){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},u=c&&c.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},l=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLWebSocketClient=t.gql=t.resolveRequestDocument=t.batchRequests=t.request=t.rawRequest=t.GraphQLClient=t.ClientError=void 0;var f=s(h),d=f,v=l(C);Object.defineProperty(t,"ClientError",{enumerable:!0,get:function(){return L.ClientError}});var p=function(e){var t={};return e&&("undefined"!=typeof Headers&&e instanceof Headers||e instanceof d.Headers?t=function(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}(e):Array.isArray(e)?e.forEach((function(e){t[e[0]]=e[1]})):t=e),t},m=function(e){return e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},y=function(e){var t=e.url,i=e.query,r=e.variables,s=e.operationName,u=e.headers,c=e.fetch,l=e.fetchOptions;return o(void 0,void 0,void 0,(function(){var e;return a(this,(function(o){switch(o.label){case 0:return e=v.default(i,r,s,l.jsonSerializer),[4,c(t,n({method:"POST",headers:n(n({},"string"==typeof e?{"Content-Type":"application/json"}:{}),u),body:e},l))];case 1:return[2,o.sent()]}}))}))},b=function(e){var t=e.url,i=e.query,r=e.variables,s=e.operationName,u=e.headers,c=e.fetch,l=e.fetchOptions;return o(void 0,void 0,void 0,(function(){var e;return a(this,(function(o){switch(o.label){case 0:return e=function(e){var t=e.query,n=e.variables,i=e.operationName,r=e.jsonSerializer;if(!Array.isArray(t)){var s=["query="+encodeURIComponent(m(t))];return n&&s.push("variables="+encodeURIComponent(r.stringify(n))),i&&s.push("operationName="+encodeURIComponent(i)),s.join("&")}if(void 0!==n&&!Array.isArray(n))throw new Error("Cannot create query with given variable type, array expected");var o=t.reduce((function(e,t,i){return e.push({query:m(t),variables:n?r.stringify(n[i]):void 0}),e}),[]);return"query="+encodeURIComponent(r.stringify(o))}({query:i,variables:r,operationName:s,jsonSerializer:l.jsonSerializer}),[4,c(t+"?"+e,n({method:"GET",headers:u},l))];case 1:return[2,o.sent()]}}))}))},w=function(){function e(e,t){this.url=e,this.options=t||{}}return e.prototype.rawRequest=function(e,t,i){return o(this,void 0,void 0,(function(){var r,s,o,c,l,h,d,v,m,y;return a(this,(function(){return r=M.parseRawRequestArgs(e,t,i),o=(s=this.options).headers,l=void 0===(c=s.fetch)?f.default:c,d=void 0===(h=s.method)?"POST":h,v=u(s,["headers","fetch","method"]),m=this.url,void 0!==r.signal&&(v.signal=r.signal),y=E(r.query).operationName,[2,g({url:m,query:r.query,variables:r.variables,headers:n(n({},p(S(o))),p(r.requestHeaders)),operationName:y,fetch:l,method:d,fetchOptions:v})]}))}))},e.prototype.request=function(e,t,i){return o(this,void 0,void 0,(function(){var r,s,o,c,l,h,d,v,m,y,b;return a(this,(function(a){switch(a.label){case 0:return r=M.parseRequestArgs(e,t,i),o=(s=this.options).headers,l=void 0===(c=s.fetch)?f.default:c,d=void 0===(h=s.method)?"POST":h,v=u(s,["headers","fetch","method"]),m=this.url,void 0!==r.signal&&(v.signal=r.signal),y=E(r.document),b=y.operationName,[4,g({url:m,query:y.query,variables:r.variables,headers:n(n({},p(S(o))),p(r.requestHeaders)),operationName:b,fetch:l,method:d,fetchOptions:v})];case 1:return[2,a.sent().data]}}))}))},e.prototype.batchRequests=function(e,t){return o(this,void 0,void 0,(function(){var i,r,s,o,c,l,h,d,v,m,y;return a(this,(function(a){switch(a.label){case 0:return i=M.parseBatchRequestArgs(e,t),s=(r=this.options).headers,c=void 0===(o=r.fetch)?f.default:o,h=void 0===(l=r.method)?"POST":l,d=u(r,["headers","fetch","method"]),v=this.url,void 0!==i.signal&&(d.signal=i.signal),m=i.documents.map((function(e){return E(e.document).query})),y=i.documents.map((function(e){return e.variables})),[4,g({url:v,query:m,variables:y,headers:n(n({},p(S(s))),p(i.requestHeaders)),operationName:void 0,fetch:c,method:h,fetchOptions:d})];case 1:return[2,a.sent().data]}}))}))},e.prototype.setHeaders=function(e){return this.options.headers=e,this},e.prototype.setHeader=function(e,t){var n,i=this.options.headers;return i?i[e]=t:this.options.headers=((n={})[e]=t,n),this},e.prototype.setEndpoint=function(e){return this.url=e,this},e}();function g(e){var t=e.url,i=e.query,r=e.variables,s=e.headers,c=e.operationName,l=e.fetch,h=e.method,f=void 0===h?"POST":h,d=e.fetchOptions;return o(this,void 0,void 0,(function(){var e,o,h,v,p,m,w,g,O,T;return a(this,(function(a){switch(a.label){case 0:return e="POST"===f.toUpperCase()?y:b,o=Array.isArray(i),[4,e({url:t,query:i,variables:r,operationName:c,headers:s,fetch:l,fetchOptions:d})];case 1:return[4,D(h=a.sent(),d.jsonSerializer)];case 2:if(v=a.sent(),p=o&&Array.isArray(v)?!v.some((function(e){return!e.data})):!!v.data,m=!v.errors||"all"===d.errorPolicy||"ignore"===d.errorPolicy,h.ok&&m&&p)return w=h.headers,g=h.status,O=u(v,["errors"]),T="ignore"===d.errorPolicy?O:v,[2,n(n({},o?{data:T}:T),{headers:w,status:g})];throw new L.ClientError(n(n({},"string"==typeof v?{error:v}:v),{status:h.status,headers:h.headers}),{query:i,variables:r})}}))}))}function O(e,t,i,r){return o(this,void 0,void 0,(function(){var s;return a(this,(function(){return s=M.parseRequestExtendedArgs(e,t,i,r),[2,new w(s.url).request(n({},s))]}))}))}function D(e,t){return void 0===t&&(t=V.defaultJsonSerializer),o(this,void 0,void 0,(function(){var n,i,r;return a(this,(function(s){switch(s.label){case 0:return e.headers.forEach((function(e,t){"content-type"===t.toLowerCase()&&(n=e)})),n&&n.toLowerCase().startsWith("application/json")?(r=(i=t).parse,[4,e.text()]):[3,2];case 1:return[2,r.apply(i,[s.sent()])];case 2:return[2,e.text()]}}))}))}function T(e){var t,n=void 0,i=e.definitions.filter((function(e){return"OperationDefinition"===e.kind}));return 1===i.length&&(n=null===(t=i[0].name)||void 0===t?void 0:t.value),n}function E(e){if("string"==typeof e){var t=void 0;try{t=T(_.parse(e))}catch(e){}return{query:e,operationName:t}}var n=T(e);return{query:$.print(e),operationName:n}}function S(e){return"function"==typeof e?e():e}t.GraphQLClient=w,t.rawRequest=function(e,t,i,r){return o(this,void 0,void 0,(function(){var s;return a(this,(function(){return s=M.parseRawRequestExtendedArgs(e,t,i,r),[2,new w(s.url).rawRequest(n({},s))]}))}))},t.request=O,t.batchRequests=function(e,t,i){return o(this,void 0,void 0,(function(){var r;return a(this,(function(){return r=M.parseBatchRequestsExtendedArgs(e,t,i),[2,new w(r.url).batchRequests(n({},r))]}))}))},t.default=O,t.resolveRequestDocument=E,t.gql=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.reduce((function(e,n,i){return""+e+n+(i in t?t[i]:"")}),"")},Object.defineProperty(t,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return R.GraphQLWebSocketClient}})}));class G{constructor(){this.watingRequestsById=new Map}static get(){if(!G.instance){G.instance=new G;const e=document.querySelector(this.appTagName);null===e?G.instance.resume():(e.addEventListener("applicationLoading",(()=>G.instance.pause())),e.addEventListener("applicationLoaded",(()=>G.instance.resume())))}return this.instance}async callGraphQL(e){var t;const n=this.getReqKey(e);return e.queryID=n,e.values.queryID=n,this.ready?new Promise((async(t,i)=>{let r=this.getQueryTemplate(e);const s=await this.fecthGrapql([{document:r,variables:e.values}]);s.errors.length>0?i(s):t(s.data[0][n])})):(this.watingRequestsById.has(n)||this.watingRequestsById.set(n,new H(e)),null===(t=this.getWatingRequest(n))||void 0===t?void 0:t.promise)}getReqKey(e){return window.btoa(this.hashCode(`${e.query}${JSON.stringify(e.values||"")}`)).replace(/=/g,"")}getQueryTemplate(e){return(e.query||"").replaceAll("$queryAlias$",e.queryID)}getWatingRequest(e){return this.watingRequestsById.get(e)}pause(){this.ready=!1}async resume(){if(this.ready=!0,this.watingRequestsById.size>0){const e=[];let t;this.watingRequestsById.forEach((async t=>{let n=this.getQueryTemplate(t.request);e.push({document:n,variables:Object.assign({},t.request.values)})}));let n=[],i=[];t=await this.fecthGrapql(e),n=t.data,i=t.errors,i.forEach((e=>{Object.entries(e).forEach((([e,t])=>{var n;((null===(n=this.getWatingRequest(t.request.variables[t.index].queryID))||void 0===n?void 0:n.reject)||Promise.reject)(t)}))})),n.forEach((e=>{Object.entries(e).forEach((([e,t])=>{var n;((null===(n=this.getWatingRequest(e))||void 0===n?void 0:n.resolve)||Promise.resolve)(t)}))})),this.watingRequestsById.clear()}}async fecthGrapql(e){let t,n=[],i=[];try{t=await B.batchRequests("http://localhost:8082/",e),t.forEach((e=>{n.push(e.data)}))}catch(e){t=e.response;const r=e.request;Object.entries(t).forEach((([e,t])=>{t.errors?i.push(t.errors.map((t=>(t.request=r,t.index=Number(e),t)))):t.data&&n.push(t.data)}))}return{data:n,errors:i}}hashCode(e){var t,n=0;if(0===e.length)return n.toString();for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n.toString()}}G.appTagName="snk-application";class H{constructor(e){this._resolve=()=>{},this._reject=()=>{},this._request=void 0,this._request=e,this._promisse=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promisse}get request(){return this._request}}class J{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchDataUnit",B.gql`query($name: String!) {
|
|
2
|
-
$queryAlias$: fetchDataUnit(name: $name){
|
|
3
|
-
name
|
|
4
|
-
fields{
|
|
5
|
-
name
|
|
6
|
-
defaultValue
|
|
7
|
-
label
|
|
8
|
-
readOnly
|
|
9
|
-
required
|
|
10
|
-
dataType
|
|
11
|
-
userInterface
|
|
12
|
-
properties{
|
|
13
|
-
name
|
|
14
|
-
value
|
|
15
|
-
}
|
|
16
|
-
dependencies{
|
|
17
|
-
masterFields
|
|
18
|
-
type
|
|
19
|
-
expression
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}`),this.templateByQuery.set("fetchData",B.gql`query($dataunit: String! $first: Int $offset:Int $filter: [Filter!] $sort: [Sort!]) {
|
|
24
|
-
$queryAlias$: fetchDataUnit(name: $dataunit){
|
|
25
|
-
data(first: $first offset: $offset filters: $filter sort: $sort){
|
|
26
|
-
first
|
|
27
|
-
offset
|
|
28
|
-
total
|
|
29
|
-
hasMore
|
|
30
|
-
records{
|
|
31
|
-
id
|
|
32
|
-
fields {
|
|
33
|
-
name
|
|
34
|
-
value
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}`),this.templateByQuery.set("saveData",B.gql`mutation($changes: [Change!]!) {
|
|
40
|
-
$queryAlias$: saveDataUnitChanges(changes: $changes){
|
|
41
|
-
oldId
|
|
42
|
-
id
|
|
43
|
-
fields {
|
|
44
|
-
name
|
|
45
|
-
value
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}`)}getDataUnit(e,t){const n=new i(`dd://${e}/${t}`);return n.metadataLoader=e=>this.loadMetadata(e),n.dataLoader=(e,t,n)=>this.loadData(e,t,n),n.saveLoader=(e,t)=>this.saveData(e,t),n.removeLoader=(e,t)=>this.removeRecords(e,t),n}loadMetadata(e){return new Promise(((t,n)=>{G.get().callGraphQL({values:{name:e.name},query:this.templateByQuery.get("fetchDataUnit")}).then((e=>{var n;const i={name:e.name,label:e.name,fields:[]};null===(n=e.fields)||void 0===n||n.forEach((e=>{let t;Array.isArray(e.properties)&&(t={},e.properties.forEach((e=>t[e.name]=e.value))),i.fields.push(Object.assign(Object.assign({},e),{properties:t}))})),t(i)})).catch((e=>{n(e)}))}))}loadData(e,t,n){return new Promise(((i,r)=>{G.get().callGraphQL({values:{dataunit:e.name,sort:t,filters:n},query:this.templateByQuery.get("fetchData")}).then((t=>{const n=[];t.data.records.forEach((t=>{const i={__record__id__:t.id};t.fields.forEach((({name:t,value:n})=>{i[t]=e.valueFromString(t,n)})),n.push(i)})),i(n)})).catch((e=>{r(e)}))}))}saveData(e,t){const n=t.map((e=>{const{dataUnit:t,record:n,updatingFields:i,operation:r}=e;return{dataUnit:t,updatingFields:Object.entries(i).map((([e,t])=>({fieldName:e,value:this.formatValueToServer(t)}))),operation:r,recordId:n.__record__id__}}));return new Promise(((t,i)=>{G.get().callGraphQL({values:{changes:n},query:this.templateByQuery.get("saveData")}).then((n=>{const i=[];null==n||n.forEach((t=>{const n={__record__id__:t.id};t.oldId&&(n.__old__id__=t.oldId),t.fields.forEach((({name:t,value:i})=>{n[t]=e.valueFromString(t,i)})),i.push(n)})),t(i)})).catch((e=>{i(e)}))}))}formatValueToServer(e){if(void 0===e)return e;try{if(e instanceof Date)return e.toString();e=JSON.stringify(e)}catch(t){e=e.toString()}return e}removeRecords(e,t){const n=t.map((t=>({dataUnit:e.name,operation:r.DELETE,recordId:t})));return new Promise(((e,i)=>{G.get().callGraphQL({values:{changes:n},query:this.templateByQuery.get("saveData")}).then((()=>{e(t)})).catch((e=>{i(e)}))}))}}class z{static openAppActivity(e,t){var n;null===(n=window.workspace)||void 0===n||n.openAppActivity(e,t)}}z.resourceID=window.workspace.resourceID;class Q{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchParam",B.gql`query($name: String!) {
|
|
49
|
-
$queryAlias$: fetchResource(name: $name){
|
|
50
|
-
name
|
|
51
|
-
resource
|
|
52
|
-
}
|
|
53
|
-
}`)}async getParam(e,t){const n=`param://${t}?params=${window.btoa(e)}`;return G.get().callGraphQL({values:{name:n},query:this.templateByQuery.get("fetchParam")})}async asString(e,t){const n=await this.getParam(e,t);return this.getValue(n)}async asInteger(e,t){const n=await this.getParam(e,t);return parseInt(this.getValue(n))}async asFloat(e,t){const n=await this.getParam(e,t);return parseFloat(this.getValue(n))}async asBoolean(e,t){const n=await this.getParam(e,t);return"S"==this.getValue(n)}async asDate(e,t){const n=await this.getParam(e,t);return s.strToDate(this.getValue(n))}async getBatchParams(e,t){const n=await this.getParam(e.join(","),t),i={};return n.forEach((e=>i[e.name]=e.resource)),i}getValue(e={}){return Array.isArray(e)&&e.length>0&&(e=e[0]),o.isEmpty(e.resource)?"":e.resource}}class K extends class{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchResource",B.gql`query($name: String!) {
|
|
54
|
-
$queryAlias$: fetchResource(name: $name){
|
|
55
|
-
resource
|
|
56
|
-
}
|
|
57
|
-
}`)}loadResource(e){return new Promise(((t,n)=>{G.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchResource")}).then((e=>{t(null==e?void 0:e.resource)})).catch((e=>{n(e)}))}))}}{loadFormConfig(e,t){return new Promise(((n,i)=>{this.loadResource(`cfg://form/${t}/${e}`).then((t=>{if(t){const e=JSON.parse(t),{tabs:i,fields:r}=e;if(i){const e=new Map(i.map((e=>[e.label,e])));r.forEach((t=>t.tab=e.get(t.tab)))}n(r)}else i(`Sem configuração pro formulário "${e}".`)})).catch((e=>{i(e)}))}))}}const W={ImplantacaoSaldoConta:[{value:6,label:"Conta Financeiro"},{value:7,label:"Conta Banco do Brasil"}],HistoricoBancario:[{value:9,label:"Lanç. Origem"},{value:8,label:"Lanç. Origem 2"}],ContaDestino:[{value:10,label:"Conta BB"},{value:7,label:"Conta Santander"}],HistoricoBancarioDestino:[{value:11,label:"Contra Bradesco"},{value:13,label:"Contra Destino"}],Usuario:[{value:0,label:"SUP"}],ContaBancaria:[{value:10,label:"Conta 10"},{value:17,label:"Conta 17"}],TipoOperacao:[{value:4,label:"Entrada NFse"},{value:5,label:"Outra top"},{value:6,label:"Top 6"}]},X=(e,t,n)=>{var i;console.log(e);const r=null===(i=n.getField(t).properties)||void 0===i?void 0:i.ENTITYNAME;return W[r]||[]},Y=class{constructor(n){e(this,n),this.applicationLoaded=t(this,"applicationLoaded",7),this.applicationLoading=t(this,"applicationLoading",7)}get parameters(){return this._parameters||(this._parameters=new Q),this._parameters}get resourceID(){return this._resourceID||(this._resourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||z.resourceID||"unknown.resource.id"),this._resourceID}async getStringParam(e){return this.parameters.asString(e,this.resourceID)}async getIntParam(e){return this.parameters.asInteger(e,this.resourceID)}async getFloatParam(e){return this.parameters.asFloat(e,this.resourceID)}async getBooleanParam(e){return this.parameters.asBoolean(e,this.resourceID)}async getDateParam(e){return this.parameters.asDate(e,this.resourceID)}async temOpcional(e){const t=e.split(",");return new Promise(((e,n)=>{this.getAttributeFromHTMLWrapper("opc0009").then((i=>{"1"===i?e(!0):Promise.all(t.map((e=>this.getAttributeFromHTMLWrapper("opc"+e)))).then((t=>{e(t.includes("1"))})).catch((e=>{n(e)}))})).catch((e=>{n(e)}))}))}async getAttributeFromHTMLWrapper(e){return Promise.resolve(window[e])}async openApp(e,t){z.openAppActivity(e,t)}async createDataunit(e){return new Promise((t=>{const n=this.dataUnitFetcher.getDataUnit(e,this.resourceID);n.loadMetadata(),t(n)}))}async getResourceID(){return Promise.resolve(this.resourceID)}async alert(e,t,n){return l.alert(e,t,n)}async error(e,t,n){return l.error(e,t,n)}async confirm(e,t,n,i){return l.confirm(e,t,n,i)}async info(e,t){return l.info(e,t)}async loadFormConfig(e){return this.formConfigFetcher.loadFormConfig(e,this.resourceID)}get urlParams(){return this._urlParams||(this._urlParams=class{static getQueryParams(e){const t=new Map,n=/[?&]?([^=]+)=([^&]*)/g;let i;for(e=(e=window.unescape(e)).split("+").join(" ");i=n.exec(e);)t.set(window.decodeURIComponent(i[1]),i[2]);return t.set("urlBase",this.getUrlBase()),window.moduleID&&window.URIServiceBroker&&(t.set("moduleID",window.moduleID),t.set("URIServiceBroker",window.URIServiceBroker)),t}static getUrlBase(){return`${location.protocol}"//"${location.hostname}${location.port?":"+location.port:""}`}}.getQueryParams(location.search)),this._urlParams}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new J),this._dataUnitFetcher}get formConfigFetcher(){return this._formConfigFetcher||(this._formConfigFetcher=new K),this._formConfigFetcher}componentWillLoad(){a.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",X)}componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{this.applicationLoaded.emit(!0)}))}render(){return n("div",null)}};Y.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";export{Y as snk_application}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class t{static applyVarsTextInput(e,p){p&&(t.applyIfExists(e,p,"--ez-text-input__input--background-color"),t.applyIfExists(e,p,"--ez-text-input__input--border-color"),t.applyIfExists(e,p,"--ez-text-input--height"))}static applyIfExists(t,e,p){const i=getComputedStyle(t).getPropertyValue(p);i&&e.style.setProperty(p,i)}}export{t as C}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class t{static async showDialog(t,n,e=null,a,o=!1){return new Promise((s=>{let c=document.querySelector("ez-dialog");c||(c=document.createElement("ez-dialog"),window.document.body.appendChild(c)),c.show(t,n,o,a,e).then((t=>s(t)))}))}static async alert(n,e,a=null){return t.showDialog(n,e,a,!1,!1)}static async error(n,e,a=null){return t.showDialog(n,e,a,!1,!0)}static async confirm(n,e,a=null,o=!1){return t.showDialog(n,e,a,!0,o)}static async info(n,e=t.defaultMessageOptions){let a=document.querySelector("ez-toast");a||(a=document.createElement("ez-toast"),window.document.body.appendChild(a)),a.canClose=e.canClose,a.message=n,a.fadeTime=4e3,a.show()}}t.defaultMessageOptions={canClose:!0};export{t as A}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e,t,n,l=!1,o=!1,s=!1,r=!1,i=!1;const c="undefined"!=typeof window?window:{},f=c.document||{head:{}},a={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)},u=e=>Promise.resolve(e),$=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),d="http://www.w3.org/1999/xlink",h=new WeakMap,p=e=>"sc-"+e.o,m={},y=e=>"object"==(e=typeof e)||"function"===e,b=(e,t,...n)=>{let l=null,o=null,s=null,r=!1,i=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((r="function"!=typeof e&&!y(l))&&(l+=""),r&&i?c[c.length-1].i+=l:c.push(r?w(null,l):l),i=r)};if(f(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{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,c,v);const a=w(e,null);return a.u=t,c.length>0&&(a.$=c),a.h=o,a.p=s,a},w=(e,t)=>({t:0,m:e,i:t,g:null,$:null,u:null,h:null,p:null}),g={},v={forEach:(e,t)=>e.map(k).forEach(t),map:(e,t)=>e.map(k).map(t).map(j)},k=e=>({vattrs:e.u,vchildren:e.$,vkey:e.h,vname:e.p,vtag:e.m,vtext:e.i}),j=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),b(e.vtag,t,...e.vchildren||[])}const t=w(e.vtag,e.vtext);return t.u=e.vattrs,t.$=e.vchildren,t.h=e.vkey,t.p=e.vname,t},S=(e,t,n,l,o,s)=>{if(n!==l){let r=fe(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,o=M(n),s=M(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.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(r||"o"!==t[0]||"n"!==t[1]){const c=y(l);if((r||c&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let f=!1;i!==(i=i.replace(/^xlink\:?/,""))&&(t=i,f=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(f?e.removeAttributeNS(d,t):e.removeAttribute(t)):(!r||4&s||o)&&!c&&(l=!0===l?"":l,f?e.setAttributeNS(d,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):fe(c,i)?i.slice(2):i[2]+t.slice(3),n&&a.rel(e,t,n,!1),l&&a.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],R=(e,t,n,l)=>{const o=11===t.g.nodeType&&t.g.host?t.g.host:t.g,s=e&&e.u||m,r=t.u||m;for(l in s)l in r||S(o,l,s[l],void 0,n,t.t);for(l in r)S(o,l,s[l],r[l],n,t.t)},x=(o,i,c,a)=>{const u=i.$[c];let $,d,h,p=0;if(l||(s=!0,"slot"===u.m&&(e&&a.classList.add(e+"-s"),u.t|=u.$?2:1)),null!==u.i)$=u.g=f.createTextNode(u.i);else if(1&u.t)$=u.g=f.createTextNode("");else{if(r||(r="svg"===u.m),$=u.g=f.createElementNS(r?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&u.t?"slot-fb":u.m),r&&"foreignObject"===u.m&&(r=!1),R(null,u,r),null!=e&&$["s-si"]!==e&&$.classList.add($["s-si"]=e),u.$)for(p=0;p<u.$.length;++p)d=x(o,u,p,$),d&&$.appendChild(d);"svg"===u.m?r=!1:"foreignObject"===$.tagName&&(r=!0)}return $["s-hn"]=n,3&u.t&&($["s-sr"]=!0,$["s-cr"]=t,$["s-sn"]=u.p||"",h=o&&o.$&&o.$[c],h&&h.m===u.m&&o.g&&C(o.g,!1)),$},C=(e,t)=>{a.t|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(N(o).insertBefore(o,E(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&C(o,t)}a.t&=-2},L=(e,t,l,o,s,r)=>{let i,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=r;++s)o[s]&&(i=x(null,l,s,e),i&&(o[s].g=i,c.insertBefore(i,E(t))))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.g,H(l),o=!0,s["s-ol"]?s["s-ol"].remove():C(s,!0),s.remove())},T=(e,t)=>e.m===t.m&&("slot"===e.m?e.p===t.p:e.h===t.h),E=e=>e&&e["s-ol"]||e,N=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const n=t.g=e.g,l=e.$,o=t.$,s=t.m,i=t.i;let c;null===i?(r="svg"===s||"foreignObject"!==s&&r,"slot"===s||R(e,t,r),null!==l&&null!==o?((e,t,n,l)=>{let o,s,r=0,i=0,c=0,f=0,a=t.length-1,u=t[0],$=t[a],d=l.length-1,h=l[0],p=l[d];for(;r<=a&&i<=d;)if(null==u)u=t[++r];else if(null==$)$=t[--a];else if(null==h)h=l[++i];else if(null==p)p=l[--d];else if(T(u,h))W(u,h),u=t[++r],h=l[++i];else if(T($,p))W($,p),$=t[--a],p=l[--d];else if(T(u,p))"slot"!==u.m&&"slot"!==p.m||C(u.g.parentNode,!1),W(u,p),e.insertBefore(u.g,$.g.nextSibling),u=t[++r],p=l[--d];else if(T($,h))"slot"!==u.m&&"slot"!==p.m||C($.g.parentNode,!1),W($,h),e.insertBefore($.g,u.g),$=t[--a],h=l[++i];else{for(c=-1,f=r;f<=a;++f)if(t[f]&&null!==t[f].h&&t[f].h===h.h){c=f;break}c>=0?(s=t[c],s.m!==h.m?o=x(t&&t[i],n,c,e):(W(s,h),t[c]=void 0,o=s.g),h=l[++i]):(o=x(t&&t[i],n,i,e),h=l[++i]),o&&N(u.g).insertBefore(o,E(u.g))}r>a?L(e,null==l[d+1]?null:l[d+1].g,n,l,i,d):i>d&&P(t,r,a)})(n,l,t,o):null!==o?(null!==e.i&&(n.textContent=""),L(n,null,t,o,0,o.length-1)):null!==l&&P(l,0,l.length-1),r&&"svg"===s&&(r=!1)):(c=n["s-cr"])?c.parentNode.textContent=i:e.i!==i&&(n.data=i)},U=e=>{const t=e.childNodes;let n,l,o,s,r,i;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(r=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(i=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==r){if(1===i&&r===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===i||3===i&&""!==t[s].textContent.trim()){n.hidden=!0;break}U(n)}},A=[],D=e=>{let t,n,l,s,r,i,c=0;const f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],i=l.length-1;i>=0;i--)n=l[i],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(F(n,s)?(r=A.find((e=>e.v===n)),o=!0,n["s-sn"]=n["s-sn"]||s,r?r.k=t:A.push({k:t,v:n}),n["s-sr"]&&A.map((e=>{F(e.v,n["s-sn"])&&(r=A.find((e=>e.v===n)),r&&!e.k&&(e.k=r.k))}))):A.some((e=>e.v===n))||A.push({v:n}));1===t.nodeType&&D(t)}},F=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,H=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(H)},q=e=>re(e).j,V=(e,t,n)=>{const l=q(e);return{emit:e=>_(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},_=(e,t,n)=>{const l=a.ce(t,n);return e.dispatchEvent(l),l},z=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},B=(e,t)=>{if(e.t|=16,!(4&e.t))return z(e,e.O),ge((()=>G(e,t)));e.t|=512},G=(e,t)=>{const n=e.M;let l;return t&&(l=Y(n,"componentWillLoad")),l=Z(l,(()=>Y(n,"componentWillRender"))),Z(l,(()=>I(e,n,t)))},I=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.R,n=e.j,l=t.t,o=((e,t)=>{let n=p(t);const l=de.get(n);if(e=11===e.nodeType?e:f,l)if("string"==typeof l){let t,o=h.get(e=e.head||e);o||h.set(e,o=new Set),o.has(n)||(t=f.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.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"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(e);J(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>K(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},J=(r,i)=>{try{i=i.render(),r.t&=-17,r.t|=2,((r,i)=>{const c=r.j,u=r.R,$=r.C||w(null,null),d=(e=>e&&e.m===g)(i)?i:b(null,null,i);if(n=c.tagName,u.L&&(d.u=d.u||{},u.L.map((([e,t])=>d.u[t]=c[e]))),d.m=null,d.t|=4,r.C=d,d.g=$.g=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],l=0!=(1&u.t),o=!1,W($,d),a.t|=1,s){let e,t,n,l,o,s;D(d.g);let r=0;for(;r<A.length;r++)e=A[r],t=e.v,t["s-ol"]||(n=f.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(r=0;r<A.length;r++)if(e=A[r],t=e.v,e.k){for(l=e.k.parentNode,o=e.k.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&U(d.g),a.t&=-2,A.length=0})(r,i)}catch(e){ae(e,r.j)}return null},K=e=>{const t=e.j,n=e.M,l=e.O;Y(n,"componentDidRender"),64&e.t||(e.t|=64,ee(t),Y(n,"componentDidLoad"),e.P(t),l||X()),e.T(t),e.S&&(e.S(),e.S=void 0),512&e.t&&we((()=>B(e,!1))),e.t&=-517},Q=e=>{{const t=re(e),n=t.j.isConnected;return n&&2==(18&t.t)&&B(t,!1),n}},X=()=>{ee(f.documentElement),we((()=>_(c,"appload",{detail:{namespace:"sankhyablocks"}})))},Y=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ae(e)}},Z=(e,t)=>e&&e.then?e.then(t):t(),ee=e=>e.classList.add("hydrated"),te=(e,t,n)=>{if(t.N){e.watchers&&(t.W=e.watchers);const l=Object.entries(t.N),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>re(this).U.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=re(e),s=o.j,r=o.U.get(t),i=o.t,c=o.M;if(n=((e,t)=>null==e||y(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),(!(8&i)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(o.U.set(t,n),c)){if(l.W&&128&i){const e=l.W[t];e&&e.map((e=>{try{c[e](n,r,t)}catch(e){ae(e,s)}}))}2==(18&i)&&B(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=re(this);return n.A.then((()=>n.M[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){a.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.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 o=l[1]||e;return n.set(o,e),512&l[0]&&t.L.push([e,o]),o}))}}return e},ne=(e,t={})=>{const n=[],l=t.exclude||[],o=c.customElements,s=f.head,r=s.querySelector("meta[charset]"),i=f.createElement("style"),u=[];let d,h=!0;Object.assign(a,t),a.l=new URL(t.resourcesUrl||"./",f.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],N:t[2],D:t[3]};s.N=t[2],s.L=[],s.W={};const r=s.o,i=class extends HTMLElement{constructor(e){super(e),ce(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),h?u.push(this):a.jmp((()=>(e=>{if(0==(1&a.t)){const t=re(e),n=t.R,l=()=>{};if(!(1&t.t)){t.t|=1,12&n.t&&(e=>{const t=e["s-cr"]=f.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){z(t,t.O=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=$e(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.W=o.watchers,te(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){ae(e)}t.t&=-9,t.t|=128,e()}if(o.style){let e=o.style;const t=p(n);if(!de.has(t)){const l=()=>{};((e,t,n)=>{let l=de.get(e);$&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,de.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.O,r=()=>B(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){a.jmp((()=>{}))}componentOnReady(){return re(this).F}};s.H=e[0],l.includes(r)||o.get(r)||(n.push(r),o.define(r,te(i,s,1)))}))})),i.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),s.insertBefore(i,r?r.nextSibling:s.firstChild),h=!1,u.length?u.map((e=>e.connectedCallback())):a.jmp((()=>d=setTimeout(X,30)))},le=e=>{const t=new URL(e,a.l);return t.origin!==c.location.origin?t.href:t.pathname},oe=e=>a.l=e,se=new WeakMap,re=e=>se.get(e),ie=(e,t)=>se.set(t.M=e,t),ce=(e,t)=>{const n={t:0,j:e,R:t,U:new Map};return n.A=new Promise((e=>n.T=e)),n.F=new Promise((e=>n.P=e)),e["s-p"]=[],e["s-rc"]=[],se.set(e,n)},fe=(e,t)=>t in e,ae=(e,t)=>(0,console.error)(e,t),ue=new Map,$e=e=>{const t=e.o.replace(/-/g,"_"),n=e.H,l=ue.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(ue.set(n,e),e[t])),ae)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},de=new Map,he=[],pe=[],me=(e,t)=>n=>{e.push(n),i||(i=!0,t&&4&a.t?we(be):a.raf(be))},ye=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ae(e)}e.length=0},be=()=>{ye(he),ye(pe),(i=he.length>0)&&a.raf(be)},we=e=>u().then(e),ge=me(pe,!0);export{g as H,le as a,ne as b,V as c,Q as f,q as g,b as h,u as p,ie as r,oe as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as r,g as o}from"./p-85a9446b.js";import{MaskFormatter as n}from"@sankhyalabs/core";const a=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.enabled=!0,this.canShowError=!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 n(this.mask):this._maskFormatter.mask=this.mask)}updateInputValue(){this._inputElem&&(this._inputElem.value=this.value),this.handleChange(),this.errorMessage="",this.ezChange.emit(this.value),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,i=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?i||this._labelElem.classList.add("input__label--floated"):i&&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,i)=>t&&this.restrict.indexOf(i)>-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 i=t.target,e=i.assignedElements()[0];e&&(e.style.position="absolute",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.style.overflow="hidden",e.style.top="0px",e.style.width="var(--ez-text-input__icon--width)",e.style.height="var(--ez-text-input--height)","leftIcon"==i.name?(e.style.left="0px",e.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left")):"rightIcon"==i.name&&(e.style.right="0px",e.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-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 e(r,null,e("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label?e("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,e("input",{onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:"text",value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),e("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.canShowError&&e("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return o(this)}static get watchers(){return{errorMessage:["showError"],mask:["prepareMask"],value:["updateInputValue"]}}};a.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input.text--right{text-align:right}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-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(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}";export{a as ez_text_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as o,H as n}from"./p-85a9446b.js";import{StringUtils as t}from"@sankhyalabs/core";const c=class{constructor(o){e(this,o),this.size="medium"}isSprite(){return this.href&&this.href.indexOf("#")>-1}getIconClassName(){return`ez-icon-${this.iconName}`}getIconContent(){return this.isSprite()?o("svg",{class:this.size,role:"img"},o("use",{xlinkHref:this.href})):t.isEmpty(this.iconName)?o("img",{class:this.size,src:this.href}):o("span",{class:`icon-content ${this.getIconClassName()} ${this.size}--font`})}render(){return o(n,null,this.getIconContent())}};c.style=':host{display:flex;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}[class^="ez-icon-"],[class*=" ez-icon-"]{color:var(--ez-icon--color)}[class^="ez-icon-"],[class*=" ez-icon-"]{font-family:\'ez-icons\' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-account-outline:before{content:"\\ea01"}.ez-icon-account:before{content:"\\ea02"}.ez-icon-alert-circle-inverted:before{content:"\\ea03"}.ez-icon-alert-circle:before{content:"\\ea04"}.ez-icon-alert-mail:before{content:"\\ea05"}.ez-icon-alert-outline:before{content:"\\ea06"}.ez-icon-alert-popup:before{content:"\\ea07"}.ez-icon-apps:before{content:"\\ea08"}.ez-icon-arrow_back:before{content:"\\ea09"}.ez-icon-bell-inverted:before{content:"\\ea0a"}.ez-icon-bell:before{content:"\\ea0b"}.ez-icon-business-center:before{content:"\\ea0c"}.ez-icon-calendar-text:before{content:"\\ea0d"}.ez-icon-calendar:before{content:"\\ea0e"}.ez-icon-check-circle-inverted:before{content:"\\ea0f"}.ez-icon-check-circle:before{content:"\\ea10"}.ez-icon-check:before{content:"\\ea11"}.ez-icon-chevron-down:before{content:"\\ea12"}.ez-icon-chevron-left:before{content:"\\ea13"}.ez-icon-chevron-right:before{content:"\\ea14"}.ez-icon-chevron-up:before{content:"\\ea15"}.ez-icon-circle--medium:before{content:"\\ea16"}.ez-icon-circle:before{content:"\\ea17"}.ez-icon-clipboard:before{content:"\\ea18"}.ez-icon-close-circle-inverted:before{content:"\\ea19"}.ez-icon-close-circle:before{content:"\\ea1a"}.ez-icon-close:before{content:"\\ea1b"}.ez-icon-comment-inverted:before{content:"\\ea1c"}.ez-icon-comment:before{content:"\\ea1d"}.ez-icon-configuration:before{content:"\\ea1e"}.ez-icon-copy:before{content:"\\ea1f"}.ez-icon-crop:before{content:"\\ea20"}.ez-icon-delete:before{content:"\\ea21"}.ez-icon-description:before{content:"\\ea22"}.ez-icon-dot-notification:before{content:"\\ea23"}.ez-icon-dots-horizontal:before{content:"\\ea24"}.ez-icon-dots-vertical:before{content:"\\ea25"}.ez-icon-drag-indicator:before{content:"\\ea26"}.ez-icon-edit-file:before{content:"\\ea27"}.ez-icon-edit-table:before{content:"\\ea28"}.ez-icon-edit-time:before{content:"\\ea29"}.ez-icon-edit:before{content:"\\ea2a"}.ez-icon-email-inverted:before{content:"\\ea2b"}.ez-icon-email:before{content:"\\ea2c"}.ez-icon-error-octagon:before{content:"\\ea2d"}.ez-icon-expand:before{content:"\\ea2e"}.ez-icon-eye-off:before{content:"\\ea2f"}.ez-icon-eye:before{content:"\\ea30"}.ez-icon-favorite:before{content:"\\ea31"}.ez-icon-file-download:before{content:"\\ea32"}.ez-icon-file-upload:before{content:"\\ea33"}.ez-icon-filter:before{content:"\\ea34"}.ez-icon-find-file:before{content:"\\ea35"}.ez-icon-find-page:before{content:"\\ea36"}.ez-icon-format-color-fill:before{content:"\\ea37"}.ez-icon-help-circle-outline:before{content:"\\ea38"}.ez-icon-help-inverted:before{content:"\\ea39"}.ez-icon-help:before{content:"\\ea3a"}.ez-icon-home:before{content:"\\ea3b"}.ez-icon-language:before{content:"\\ea3c"}.ez-icon-launch:before{content:"\\ea3d"}.ez-icon-lightbulb:before{content:"\\ea3e"}.ez-icon-list:before{content:"\\ea3f"}.ez-icon-loading:before{content:"\\ea40"}.ez-icon-lock-outline:before{content:"\\ea41"}.ez-icon-lock:before{content:"\\ea42"}.ez-icon-menu:before{content:"\\ea43"}.ez-icon-minus-circle-inverted:before{content:"\\ea44"}.ez-icon-minus:before{content:"\\ea45"}.ez-icon-money-off:before{content:"\\ea46"}.ez-icon-money:before{content:"\\ea47"}.ez-icon-north-west:before{content:"\\ea48"}.ez-icon-pause:before{content:"\\ea49"}.ez-icon-payments:before{content:"\\ea4a"}.ez-icon-play:before{content:"\\ea4b"}.ez-icon-plus-circle-inverted:before{content:"\\ea4c"}.ez-icon-plus-circle:before{content:"\\ea4d"}.ez-icon-plus:before{content:"\\ea4e"}.ez-icon-power:before{content:"\\ea4f"}.ez-icon-push-pin:before{content:"\\ea50"}.ez-icon-restore:before{content:"\\ea51"}.ez-icon-return:before{content:"\\ea52"}.ez-icon-rotate:before{content:"\\ea53"}.ez-icon-save:before{content:"\\ea54"}.ez-icon-search:before{content:"\\ea55"}.ez-icon-settings-inverted:before{content:"\\ea56"}.ez-icon-settings:before{content:"\\ea57"}.ez-icon-share:before{content:"\\ea58"}.ez-icon-shield:before{content:"\\ea59"}.ez-icon-south-east:before{content:"\\ea5a"}.ez-icon-success-circle:before{content:"\\ea5b"}.ez-icon-sync:before{content:"\\ea5c"}.ez-icon-table:before{content:"\\ea5d"}.ez-icon-timer-outline:before{content:"\\ea5e"}.ez-icon-user-circle:before{content:"\\ea5f"}.ez-icon-warning-minus:before{content:"\\ea60"}.ez-icon-warning-triangle:before{content:"\\ea61"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}';export{c as ez_icon}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,H as o}from"./p-85a9446b.js";import{g as d}from"./p-60967cf0.js";import{StringUtils as l}from"@sankhyalabs/core";const a=class{constructor(e){i(this,e),this.ezCloseModal=t(this,"ezCloseModal",7),this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.handleKeyboardEvent=i=>{"Escape"===(null==i?void 0:i.key)&&this.closeEsc&&this.closeModal()}}handleopenedChange(){this.opened?document.addEventListener("keydown",this.handleKeyboardEvent):document.removeEventListener("keydown",this.handleKeyboardEvent)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}componentDidLoad(){this.handleopenedChange()}onMouseDownHandler(i){this.closeOutsideClick&&i.target===this._overlay&&this.closeModal()}render(){const i="left"===this.align?"left":"right";return e(o,null,this.opened?e("div",{class:"modal",onMouseDown:i=>this.onMouseDownHandler(i)},e("div",{class:`modal__container modal__container--${i}`,ref:i=>this._overlay=i},e("div",{class:`modal__content modal__content--${i} ${this.modalSize}`},e("slot",null)))):void 0)}static get watchers(){return{opened:["handleopenedChange"]}}};a.style=":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";const s=class{constructor(e){i(this,e),this.configFinish=t(this,"configFinish",7),this.configCancel=t(this,"configCancel",7),this._columnListHistory=[],this._orderListItems=[],this._columListItems=[],this.selectedTab="Colunas",this._selectedIndex=-1}createOrderList(){var i;let t=[];(null===(i=this._columnListHistory)||void 0===i?void 0:i.length)>0?this._columnListHistory.find((i=>"Visíveis"===i.group)).items.forEach((i=>{t.push({label:i.label})})):this.columns.forEach((i=>{i.hidden||t.push({name:i.name,label:i.label})})),this._orderListItems=t}createColumnList(){let i={group:"Visíveis",items:[]},t={group:"Ocultas",items:[],sort:"ASC"};this.columns.forEach((e=>{let o={label:e.label};e.hidden?t.items.push(o):i.items.push(o)})),this._columnListHistory.length<=0&&(this._columListItems=[i,t])}buildColumnListSlot(i,t){return e("div",null,e("ez-check",{mode:"switch",id:"switch"+i+t,value:"Visíveis"===t.group,onEzChange:t=>{this.switchColumnGroup(t,i)}}))}buildOrderListSlot(i){let t=this.columns.find((t=>t.label===i.label));return e("div",null,e("select-box",{selectedOption:null==t?void 0:t.sort,key:"select-box"+i,onEzChange:t=>{t.stopPropagation(),this.updateOrder(t.detail,i)}}))}updateOrder(i,t){let e=[...this.columns],o=e.find((i=>i.label===t.label));o&&(o.sort=i.value),this.columns=e}switchColumnGroup(i,t){i.stopPropagation();let e=[...this._columListItems];if(!0===i.detail){let i=e.find((i=>"Ocultas"===i.group)),o=i.items.findIndex((i=>i.label===t.label));o>=0&&i.items.splice(o,1),e.find((i=>"Visíveis"===i.group)).items.push(t),this._columListItems=e,this.createOrderList()}else if(!1===i.detail){let i=e.find((i=>"Visíveis"===i.group)),o=i.items.findIndex((i=>i.label===t.label));o>=0&&i.items.splice(o,1),e.find((i=>"Ocultas"===i.group)).items.push(t),this._columListItems=e,this.createOrderList()}}finish(){let i=[];this._columListItems.forEach((t=>{t.items.forEach((e=>{const o=this.columns.find((i=>i.label===e.label));let d=Object.assign({},o);d.hidden="Ocultas"===t.group,i.push(d)}))})),this._columnListHistory=[],this.columns=i,this.configFinish.emit(this.columns)}async locateColumn(i,t){var e;const o="Enter"===i.key;t||(t=null===(e=i.currentTarget)||void 0===e?void 0:e.value);let d=-1;if("Ordenação das linhas"===this.selectedTab)if(t){const i=[];let e,l;if(await this._orderList.getList().then((o=>{e=o,e.forEach(((e,o)=>{this.compareWords(e,t)&&i.push(o)}))})),i.length>0){if(o)for(let t=0;t<i.length;t++)if(i[t]>this._selectedIndex){d=i[t];break}-1===d&&(d=i[0])}this._selectedIndex=d,l=e[d],l?this._orderList.setSelection({label:l.label},!0):this._orderList.setSelection(void 0)}else this._orderList.setSelection(void 0);else if(t){const i=[];if(this.columns.forEach(((e,o)=>{this.compareWords(e,t)&&i.push(o)})),i.length>0){if(o)for(let t=0;t<i.length;t++)if(i[t]>this._selectedIndex){d=i[t];break}-1===d&&(d=i[0])}this._selectedIndex=d;let e=this.columns[d];e?this._columnList.setSelection({label:e.label},!0):this._columnList.setSelection(void 0)}else this._columnList.setSelection(void 0)}compareWords(i,t){return l.replaceAccentuatedChars(i.label).indexOf(l.replaceAccentuatedChars(t))>-1}closeConfig(){this._columnListHistory=[],this.configCancel.emit()}handleTabChange(i){var t;(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.selectedTab)&&("Ordenação das linhas"===i.target.selectedTab&&(this._columnListHistory=this._columnList.dataSource,this.createOrderList()),this.selectedTab=i.target.selectedTab)}handleColumnListChange(i){var t;if(i.detail){let e=null===(t=i.detail.find((i=>"Visíveis"===i.group)))||void 0===t?void 0:t.items;e&&(this._orderListItems=e)}}componentWillRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&(this.createColumnList(),this.createOrderList())}componentDidRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.locateColumn(new KeyboardEvent("arrow-right",{key:"ArrowRight"}),this._searchElement.value)}render(){return e(o,null,e("div",{class:"grid-config__header"},e("div",{class:"title-container"},e("div",{class:""},e("label",{class:"title"},"Configuração da Grade"),e("label",{class:"subtitle"},"Defina visibilidade e ordem das colunas.")),e("div",{class:"button-close"},e("ez-button",{mode:"icon",image:d("close"),size:"medium",onClick:()=>this.closeConfig()}))),e("div",{class:"tabselector-container"},e("ez-tabselector",{selectedTab:this.selectedTab,selectedIndex:0,onEzChange:i=>{this.handleTabChange(i)},tabs:"Colunas, Ordenação das linhas"})),e("div",null,e("ez-text-input",{ref:i=>this._searchElement=i,label:"Localizar coluna",onKeyUp:i=>this.locateColumn(i)},e("ez-icon",{slot:"leftIcon",size:"medium",href:d("search")})))),e("div",{class:"grid-config__main"},e("ez-list",{ref:i=>this._columnList=i,class:"Colunas"===this.selectedTab?"":"hidden",dataSource:this._columListItems,onEzChange:i=>this.handleColumnListChange(i),ezDraggable:!0,ezSelectable:!0,itemSlotBuilder:(i,t)=>this.buildColumnListSlot(i,t),useGroups:!0}),e("div",{class:"Ordenação das linhas"===this.selectedTab?"group-name":"hidden"},"Sequência da ordenação"),e("ez-list",{ref:i=>this._orderList=i,class:"Ordenação das linhas"===this.selectedTab?"heigth-calc":"hidden",dataSource:this._orderListItems,ezSelectable:!0,ezDraggable:!0,itemSlotBuilder:i=>this.buildOrderListSlot(i)})),e("div",{class:"grid-config__footer"},e("ez-button",{class:"padding-right--medium",label:"Cancelar",onClick:()=>this.closeConfig()}),e("ez-button",{label:"Concluir",class:"button--primary",onClick:()=>this.finish()})))}static get assetsDirs(){return["../assets"]}};s.style='.sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, "Sora");--ez-grid-config__title--font-family:var(--font-pattern, "Sora");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, "Sora");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}';export{a as ez_modal,s as grid_config}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,f as e,h as o,g as a}from"./p-85a9446b.js";import{A as s}from"./p-813fe4f7.js";class d{constructor(i){this.file=i,this.size=i.size,this.name=i.name}abortUpload(){this._uploadingXhr&&(this._aborted=!0,this._uploadingXhr.abort(),this._uploadingXhr=void 0)}isUploading(){return void 0!==this._uploadingXhr}async upload(i,t,e){return new Promise(((o,a)=>{const s=new XMLHttpRequest;this._uploadingXhr=s,this._aborted=!1,this.progress=0,s.upload.onprogress=i=>{const t=i.loaded,o=i.total;this.progress=~~(t/o*100),e(this,t,o)},s.onreadystatechange=()=>{if(4==s.readyState){this._uploadingXhr=void 0;const i=s.status;this._aborted||(0===i?a("Servidor indisponível"):i>=500?a("Erro inesperado no servidor"):i>=400&&a("Operação não permitida"));const t=s.response;t&&o(JSON.parse(t))}},s.ontimeout=()=>{a("Tempo limite de transferência atingido.")};const d=new FormData;d.append("ARQUIVO",this.file,this.file.name),s.open("POST",i,!0),t&&t.forEach(((i,t)=>s.setRequestHeader(t,i))),s.send(d)}))}async delete(i,t,e){return new Promise(((o,a)=>{const s=new XMLHttpRequest;s.onreadystatechange=()=>{4==s.readyState&&(0===s.status?a("Servidor indisponível"):s.status>=500?a("Erro inesperado no servidor"):s.status>=400&&a("Operação não permitida"),o(!0))},s.ontimeout=()=>{a("Tempo limite de remoção atingido.")},s.open("DELETE",t,!0),e&&e.forEach(((i,t)=>s.setRequestHeader(t,i))),s.send(JSON.stringify(i))}))}}const r=class{constructor(e){i(this,e),this.ezChange=t(this,"ezChange",7),this._filePointers=new Map,this.enabled=!0}changeValue(i){i!==this._updatingValue&&(this._filePointers.forEach((i=>{this.isRemoteFile(i)&&i.abortUpload()})),this._filePointers=new Map,this.updateFilePointers()),this._updatingValue=void 0}updateFilePointers(){this.value&&this.value.forEach((i=>this._filePointers.set(i.name,i)))}normalizeRequestHeaders(){if(this._requestHeaders=new Map,"string"==typeof this.requestHeaders)try{this.requestHeaders=JSON.parse(this.requestHeaders)}catch(i){this.requestHeaders=void 0}for(var i in this.requestHeaders)this._requestHeaders.set(i,this.requestHeaders[i])}async addFiles(i){if(this.maxFiles>0){let t=this._filePointers.size;if(i.forEach((i=>{this._filePointers.has(i.name)||t++})),t>this.maxFiles)return void this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`)}Array.prototype.forEach.call(i,this.addFile.bind(this))}async setFocus(){this._fileInput.focus()}async setBlur(){this._fileInput.blur()}async addFile(i){const t=this._filePointers.get(i.name);t?s.confirm("Substituir arquivo",`Já existe um arquivo chamado "${i.name}". Deseja substituí-lo?`).then((e=>{e&&(this.isRemoteFile(t)&&t.abortUpload(),this.doAddFile(i))})):this.doAddFile(i)}async doAddFile(i){if(this.validateFile(i)){const t=new d(i);this._filePointers.set(i.name,t),t.upload(this.urlUpload,this._requestHeaders,(i=>this.updateFeedback(i))).then((i=>i.forEach((i=>this.finishUpload(i))))).catch((i=>this.showError(i))),e(this)}}finishUpload(i){this._filePointers.set(i.name,i),this.updateValue()}updateValue(){this._updatingValue=[],this._filePointers.forEach((i=>{this.isRemoteFile(i)||this._updatingValue.push(i)})),this.value=this._updatingValue,this.ezChange.emit(this.value)}buildProgressId(i){return`PROGRESS_${i.name.replace(/[^a-z0-9_]/gi,"_")}_${i.file.lastModified}`}updateFeedback(i){window.requestAnimationFrame((()=>{if(this._host){const t=this._host.shadowRoot.querySelector("#"+this.buildProgressId(i));t&&(t.value=i.progress)}}))}validateFile(i){return!this._filePointers.has(i.name)&&this.maxFiles>0&&this._filePointers.size>=this.maxFiles?(this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`),!1):0===i.size?(this.showError(`Erro de permissão: O arquivo "${i.name}" não pode ser enviado.`),!1):this.urlUpload?!(this.maxFileSize>=0&&i.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(i){s.alert("Enviando arquivo",i)}formatBytes(i,t=1){if(0===i)return"0 Bytes";const e=t<0?0:t,o=Math.floor(Math.log(i)/Math.log(1024));return parseFloat((i/Math.pow(1024,o)).toFixed(e))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][o]}onFileInputChange(i){this.addFiles(Array.from(i.target.files)),this._fileInput.value=""}isRemoteFile(i){return"file"in i}removeFromList(i){this._filePointers.delete(i),this.updateValue()}removeFile(i){const t=this._filePointers.get(i);if(this.isRemoteFile(t))t.abortUpload(),this.removeFromList(i);else if(this.urlDelete){const e=new d(null);this._filePointers.set(t.name,e),e.delete(t,this.urlDelete,null).then((()=>this.removeFromList(i))).catch((i=>this.showError(i)))}else this.removeFromList(i)}openFilesDialog(){this.enabled&&this._fileInput.click()}componentDidLoad(){this.enabled&&this._dropZone&&window.FileList&&window.File&&(this._dropZone.addEventListener("dragover",(i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy",this._dropZone.style.background="#c2dbff"})),this._dropZone.addEventListener("drop",(i=>{i.stopPropagation(),i.preventDefault(),this.addFiles(Array.from(i.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 o("div",{ref:i=>this._dropZone=i,class:this.evalDisabledClass("iu","background--disabled")},o("div",{class:"iu__container",onClick:()=>this.openFilesDialog()},o("div",{class:"iu_header"},this.label?o("label",{class:this.evalDisabledClass("iu__label","text--disabled"),title:this.label},this.label):null,o("div",{class:this.evalDisabledClass("iu__icon-label","mouse-pointer--disabled")},o("button",{class:"iu__file-icon",disabled:!this.enabled}),o("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()),o("input",{ref:i=>this._fileInput=i,onChange:i=>this.onFileInputChange(i),type:"file",multiple:!0,class:"appearanceNone"}))}buildFooter(){if(0===this._filePointers.size)return null;const i=[];return this._filePointers.forEach((t=>i.push(this.buildFileItem(t)))),o("div",{class:"iu__footer"},i)}buildFileItem(i){const t=i.name,e=Number(i.progress),a=i.downloadURL,s=`${t} (${this.formatBytes(i.size)})`;return o("div",{class:"iu__item",key:t,onClick:i=>i.stopPropagation()},o("div",{class:"iu__item-label modificador"},o("div",{title:s,class:"col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle"},a?o("a",{href:a,download:!0},s):s)),isNaN(e)?null:o("div",{class:"col col--sd-4 col--stretch align--middle"},o("progress",{id:this.buildProgressId(i),value:e,max:"100"})),this.enabled?o("div",{class:"col col--stretch align--middle"},o("button",{class:"btn-cancel ",onClick:()=>this.removeFile(t)})):null)}evalDisabledClass(i,t){return this.enabled?i:`${i} ${t}`}get _host(){return a(this)}static get watchers(){return{value:["changeValue"],requestHeaders:["normalizeRequestHeaders"]}}};r.style=':host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__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>\');--ez-upload__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(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--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(--ez-upload__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(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--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(--ez-upload--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(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__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(--ez-upload__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(--ez-upload__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(--ez-upload--text--primary);text-shadow:var(--ez-upload--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(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__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(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--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(--ez-upload__file-icon-image);mask-image:var(--ez-upload__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(--ez-upload--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}.appearanceNone{width:0px;height:0px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{r as ez_upload}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as t,h as e,H as i,g as s}from"./p-85a9446b.js";import{FloatingManager as r}from"@sankhyalabs/core";import{C as a}from"./p-811b4b9d.js";const n=class{constructor(e){o(this,e),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressEmptyOption=!1,this.canShowError=!0}internalUpdate(){this._inputElement&&(this._inputElement.value=this.getText()),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}async setFocus(){this._inputElement.setFocus()}async setBlur(){this._inputElement.setBlur()}getText(){let o="";const t=this.getSelectedOption();return t&&(o=this.showSelectedValue?`${t.value} - ${t.label}`:t.label),o}getSelectedOption(){return"string"==typeof this.value||this.value instanceof String?this._visibleOptions.find((o=>o.value===this.value)):this.value}updateVisibleOptions(){let o=this._source||[];if(!this.searchMode&&this._criteria){const t=this._criteria.toUpperCase();o=o.filter((o=>o.label.toLocaleUpperCase().indexOf(t)>-1))}this._visibleOptions=this.suppressEmptyOption?o:[{value:void 0,label:""}].concat(o)}buildItem(o,t){return e("li",{class:t===this._preSelection?"item preselected":"item",id:`item_${o.value}`,onMouseDown:()=>this.selectOption(o),onMouseOver:()=>this._preSelection=void 0},e("span",{class:"item--label",title:o.label},o.label),this.showOptionValue?e("span",{class:"item--value",title:o.value},o.value):void 0)}showOptions(){this.enabled&&(this._floatingID=r.float(this._optionsList,this._listContainer,{autoClose:!0,top:this.errorMessage||!this.canShowError?"0px":"-17px"}),window.requestAnimationFrame((()=>{this._optionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&r.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&r.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(o,t){window.requestAnimationFrame((()=>{const e=this._optionsList.querySelector(`li#item_${o.value}`);if(e){const o=e.parentElement,i=o.getBoundingClientRect(),s=e.getBoundingClientRect();t&&s.bottom>i.bottom?o.scrollTop=s.top:!t&&s.top<i.top&&(o.scrollTop=0)}}))}selectCurrentOption(){void 0!==this._preSelection&&(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0)}selectOption(o){if(this.getSelectedOption()!==o){const t=(null==o?void 0:o.value)?o:void 0;this.value=t,this.errorMessage="",this.ezChange.emit(t)}else this.internalUpdate()}updateSource(o){o instanceof Promise?(o.then((o=>this.updateSource(o))),this.updateVisibleOptions()):(this._source=o,this.updateVisibleOptions())}loadOptions(o,t=""){this._criteria=t,this.updateSource(this.optionLoader?this.optionLoader({mode:o,argument:t}):this.options)}cancelPreselection(){!this._inputElement.value&&this.value?this.selectOption(void 0):this.internalUpdate()}componentWillLoad(){if(void 0===this.options){this.options=[];const o=this.el.querySelectorAll("option");o&&o.forEach((o=>{let t=o.innerText,e=o.getAttribute("value");e||(e=t),this.options.push({label:t,value:e}),o.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions("PRELOAD")}componentDidRender(){void 0===this._floatingID&&this._optionsList.remove()}componentDidLoad(){a.applyVarsTextInput(this.el,this._inputElement)}onTextInputChangeHandler(o){this._criteria||(this._inputElement.value=o.data);const t=o.target.value;this._criteria=t,this._criteria&&(this.searchMode?(this._changeDeboucingTimeout&&window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions("PREDICTIVE",t)}),200)):this.updateVisibleOptions(),this.showOptions())}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(o){switch(o.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection()}o.stopPropagation()}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){return e(i,null,e("ez-text-input",{ref:o=>this._inputElement=o,enabled:this.enabled,onInput:o=>this.onTextInputChangeHandler(o),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onEzChange:o=>o.stopPropagation(),onKeyDown:o=>this.keyDownHandler(o),label:this.label,value:this.getText(),canShowError:this.canShowError,errorMessage:this.errorMessage},e("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()})),e("section",{class:"list-container",ref:o=>this._listContainer=o},e("div",{class:"options-list",ref:o=>this._optionsList=o},this._visibleOptions.map(((o,t)=>this.buildItem(o,t))))))}get el(){return s(this)}static get watchers(){return{value:["internalUpdate"]}}};n.style=':host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn-search--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-search-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-search-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__btn-options--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-options-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-options-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-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>\');--ez-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>\');--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}.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(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-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(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--ez-combo-box--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(--ez-combo-box__btn-options--background-color);width:16px;height:16px;-webkit-mask-image:var(--ez-combo-box__drop-down-image);mask-image:var(--ez-combo-box__drop-down-image)}.btn-open-options:disabled:after{background-color:var(--ez-combo-box__btn-options-disabled--background-color)}.btn-open-options:enabled:hover::after{background-color:var(--ez-combo-box__btn-options-hover--background-color)}.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(--ez-combo-box__btn-search--background-color);width:22px;height:22px;-webkit-mask-image:var(--ez-combo-box__search-image);mask-image:var(--ez-combo-box__search-image)}.btn-open-search:disabled:after{background-color:var(--ez-combo-box__btn-search-disabled--background-color)}.btn-open-search:enabled:hover::after{background-color:var(--ez-combo-box__btn-search-hover--background-color)}';export{n as ez_combo_box}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as a,H as r,g as o}from"./p-85a9446b.js";const i=class{constructor(a){t(this,a),this.ezChange=e(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=void 0===this.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.errorMessage="",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 a(r,null,a("div",{class:"textarea",ref:t=>this._container=t},this.label?a("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,a("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})),a("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return o(this)}static get watchers(){return{errorMessage:["showError"],value:["updateInputValue"]}}};i.style=":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--large, 500);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--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(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__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(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}";export{i as ez_text_area}
|