@tylertech/forge 3.0.0-next.22 → 3.0.0-next.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chunks/{chunk.5ADUSMC7.js → chunk.2W23MOPP.js} +2 -2
- package/dist/esm/chunks/{chunk.XATVDHDW.js → chunk.32APLNN2.js} +2 -2
- package/dist/esm/chunks/{chunk.ISLJNJEE.js → chunk.3II7OT2I.js} +2 -2
- package/dist/esm/chunks/{chunk.ISLJNJEE.js.map → chunk.3II7OT2I.js.map} +1 -1
- package/dist/esm/chunks/{chunk.24SQJBSQ.js → chunk.5QIWLZG3.js} +2 -2
- package/dist/esm/chunks/{chunk.6E5WHIPF.js → chunk.7RLY2O3H.js} +2 -2
- package/dist/esm/chunks/{chunk.6E5WHIPF.js.map → chunk.7RLY2O3H.js.map} +2 -2
- package/dist/esm/chunks/{chunk.Q7TBWGKN.js → chunk.AIJK3CTV.js} +2 -2
- package/dist/esm/chunks/{chunk.3IUQ4C47.js → chunk.CLYGTLXN.js} +2 -2
- package/dist/esm/chunks/chunk.GRYO5XP2.js +7 -0
- package/dist/esm/chunks/{chunk.PFIIBXTS.js.map → chunk.GRYO5XP2.js.map} +2 -2
- package/dist/esm/chunks/{chunk.LSMHIVX2.js → chunk.HD2SLIL2.js} +2 -2
- package/dist/esm/chunks/{chunk.EUJBIOGT.js → chunk.KCCW4AMU.js} +2 -2
- package/dist/esm/chunks/{chunk.JE5LSPXG.js → chunk.LY2Z2Z7S.js} +2 -2
- package/dist/esm/chunks/{chunk.RFT3BAJ2.js → chunk.MFS7AVW6.js} +2 -2
- package/dist/esm/chunks/{chunk.5A665C5E.js → chunk.OJ7JO4O6.js} +2 -2
- package/dist/esm/chunks/{chunk.DZJ6HBAG.js → chunk.OQHDHS2C.js} +2 -2
- package/dist/esm/chunks/{chunk.E2BE52ME.js → chunk.OREDK5MJ.js} +2 -2
- package/dist/esm/chunks/{chunk.RONMNRSH.js → chunk.SZOZIJZI.js} +2 -2
- package/dist/esm/chunks/{chunk.KTPEFU7V.js → chunk.TSSZQPLE.js} +2 -2
- package/dist/esm/chunks/chunk.V6KUOCAR.js +7 -0
- package/dist/esm/chunks/chunk.V6KUOCAR.js.map +7 -0
- package/dist/esm/chunks/{chunk.XTJGWT5F.js → chunk.VJZ7VDG5.js} +2 -2
- package/dist/esm/chunks/{chunk.EHVCEEV2.js → chunk.VL5RWSAV.js} +2 -2
- package/dist/esm/chunks/{chunk.W6FT6MKN.js → chunk.X77NKT6Z.js} +2 -2
- package/dist/esm/chunks/{chunk.A2NB7CIK.js → chunk.XZ23XHFE.js} +2 -2
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/field/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/label/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/radio/radio/index.js +1 -1
- package/dist/esm/radio/radio-group/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/esm/checkbox/checkbox.js +1 -1
- package/esm/radio/radio/radio.js +1 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/switch/switch.js +1 -1
- package/package.json +1 -1
- package/styles/core/styles/tokens/checkbox/_tokens.scss +1 -1
- package/styles/core/styles/tokens/radio/_tokens.scss +1 -1
- package/styles/core/styles/tokens/switch/_tokens.scss +1 -1
- package/dist/esm/chunks/chunk.LGSCBWNR.js +0 -7
- package/dist/esm/chunks/chunk.LGSCBWNR.js.map +0 -7
- package/dist/esm/chunks/chunk.PFIIBXTS.js +0 -7
- /package/dist/esm/chunks/{chunk.5ADUSMC7.js.map → chunk.2W23MOPP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XATVDHDW.js.map → chunk.32APLNN2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.24SQJBSQ.js.map → chunk.5QIWLZG3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q7TBWGKN.js.map → chunk.AIJK3CTV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3IUQ4C47.js.map → chunk.CLYGTLXN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LSMHIVX2.js.map → chunk.HD2SLIL2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EUJBIOGT.js.map → chunk.KCCW4AMU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JE5LSPXG.js.map → chunk.LY2Z2Z7S.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RFT3BAJ2.js.map → chunk.MFS7AVW6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5A665C5E.js.map → chunk.OJ7JO4O6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DZJ6HBAG.js.map → chunk.OQHDHS2C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.E2BE52ME.js.map → chunk.OREDK5MJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RONMNRSH.js.map → chunk.SZOZIJZI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KTPEFU7V.js.map → chunk.TSSZQPLE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XTJGWT5F.js.map → chunk.VJZ7VDG5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EHVCEEV2.js.map → chunk.VL5RWSAV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W6FT6MKN.js.map → chunk.X77NKT6Z.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.A2NB7CIK.js.map → chunk.XZ23XHFE.js.map} +0 -0
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"../chunks/chunk.
|
|
6
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"../chunks/chunk.OJ7JO4O6.js";import"../chunks/chunk.XZ23XHFE.js";import"../chunks/chunk.CKS5A4YN.js";import"../chunks/chunk.WMJSYYXQ.js";import"../chunks/chunk.W4HANHUO.js";import"../chunks/chunk.NWVQ5HK2.js";import"../chunks/chunk.QUXMLWBJ.js";import"../chunks/chunk.AGLI4WR4.js";import"../chunks/chunk.FZQCBRPK.js";import"../chunks/chunk.7AAICE77.js";import"../chunks/chunk.6YPD6CQM.js";import"../chunks/chunk.2GUWHBUU.js";import"../chunks/chunk.O5WAQQNR.js";import"../chunks/chunk.GG7IQL46.js";import"../chunks/chunk.77C7S7ZS.js";import"../chunks/chunk.USTVZ6MZ.js";import"../chunks/chunk.WXVVOFNK.js";import"../chunks/chunk.5MB6CTBA.js";import"../chunks/chunk.OQHDHS2C.js";import"../chunks/chunk.MFS7AVW6.js";import"../chunks/chunk.72BKSMAZ.js";import"../chunks/chunk.SZOZIJZI.js";import"../chunks/chunk.CLYGTLXN.js";import"../chunks/chunk.7RLY2O3H.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.UV3WIHCM.js";import"../chunks/chunk.GRYO5XP2.js";import"../chunks/chunk.V6KUOCAR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.LEVFMI2Q.js";import"../chunks/chunk.GBAVJILM.js";import"../chunks/chunk.H5RW3A4M.js";import"../chunks/chunk.ZA7JY3AY.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.H4VQXV2H.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{a as AUTOCOMPLETE_CONSTANTS,c as AutocompleteAdapter,i as AutocompleteComponent,j as AutocompleteComponentDelegate,h as AutocompleteFoundation,b as AutocompleteMode,d as OptionType,k as defineAutocompleteComponent,f as getSelectedOption,e as isOptionType,g as optionEqualPredicate};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a,b,c,d,e}from"../chunks/chunk.
|
|
6
|
+
import{a,b,c,d,e}from"../chunks/chunk.X77NKT6Z.js";import"../chunks/chunk.CLYGTLXN.js";import"../chunks/chunk.7RLY2O3H.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.GRYO5XP2.js";import"../chunks/chunk.V6KUOCAR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.LEVFMI2Q.js";import"../chunks/chunk.PC6TW5XE.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{a as BOTTOM_SHEET_CONSTANTS,b as BottomSheetAdapter,d as BottomSheetComponent,c as BottomSheetFoundation,e as defineBottomSheetComponent};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a,b,c,d,e,f}from"../chunks/chunk.
|
|
6
|
+
import{a,b,c,d,e,f}from"../chunks/chunk.GRYO5XP2.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{a as CHECKBOX_CONSTANTS,b as CheckboxAdapter,d as CheckboxComponent,e as CheckboxComponentDelegate,c as CheckboxFoundation,f as defineCheckboxComponent};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a,b,c,d,e,f}from"../chunks/chunk.
|
|
6
|
+
import{a,b,c,d,e,f}from"../chunks/chunk.XZ23XHFE.js";import"../chunks/chunk.CKS5A4YN.js";import"../chunks/chunk.WMJSYYXQ.js";import"../chunks/chunk.W4HANHUO.js";import"../chunks/chunk.NWVQ5HK2.js";import"../chunks/chunk.MFS7AVW6.js";import"../chunks/chunk.72BKSMAZ.js";import"../chunks/chunk.CLYGTLXN.js";import"../chunks/chunk.7RLY2O3H.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.UV3WIHCM.js";import"../chunks/chunk.GRYO5XP2.js";import"../chunks/chunk.V6KUOCAR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{a as CHIP_FIELD_CONSTANTS,b as ChipFieldAdapter,d as ChipFieldComponent,e as ChipFieldComponentDelegate,c as ChipFieldFoundation,f as defineChipFieldComponent};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as H,f as R,g as z,h as q}from"./chunk.AFWWND2C.js";import{b as k}from"./chunk.ENUKGA2U.js";import{d as w}from"./chunk.AOVXNX7P.js";import{d as M}from"./chunk.U6J4VHU6.js";import{b as W}from"./chunk.EO3GP6DP.js";import{b as B}from"./chunk.SROEDYPL.js";import{c as P}from"./chunk.2GUWHBUU.js";import{f as D}from"./chunk.O5WAQQNR.js";import{c as O}from"./chunk.USTVZ6MZ.js";import{a as i,d as N}from"./chunk.RFT3BAJ2.js";import{a as o}from"./chunk.72BKSMAZ.js";import{d as y}from"./chunk.GIENHEMN.js";import{c as S,g as F,h as I}from"./chunk.RLQB7224.js";import{d as x,l as C}from"./chunk.T7NWP7DB.js";import{a as _}from"./chunk.NVUMRW44.js";import{a as A,b as T}from"./chunk.VRSPT7WX.js";import{a as L,e as g,f as p}from"./chunk.LNTTU2GL.js";import{r as m}from"./chunk.L4QSPQDE.js";import{k as r}from"./chunk.J2M2MXP2.js";import{a as v,d as u}from"./chunk.M3QDAYD2.js";var j=`${T}select`,X={FIELD:"#field",SELECTED_TEXT:"#selected-text",LABEL:"#select-label"},U={OPEN:"open",TYPE:"type",VALUE:"value",LABEL:"label",MULTIPLE:"multiple",DISABLED:"disabled",PLACEHOLDER:"placeholder",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},G=v({},U),Y={SCROLLED_BOTTOM:`${j}-scrolled-bottom`},n={elementName:j,observedAttributes:U,attributes:G,selectors:X,events:Y};var h=class extends q{constructor(e){super(e);this._fieldElement=p(e,n.selectors.FIELD),this._labelElement=p(e,n.selectors.LABEL),this._selectedTextElement=p(e,n.selectors.SELECTED_TEXT),this._fieldElement.setAttribute("exportparts",Object.values(i.parts).join(", ")),this._fieldElement.focusIndicatorTargetElement=this._component}get fieldElement(){return this._fieldElement}initializeAccessibility(){this._component.setAttribute("role","combobox"),this._component.setAttribute("aria-haspopup","true"),this._component.setAttribute("aria-expanded","false"),this.fieldElement.required&&this.setHostAttribute("aria-required","true"),this.fieldElement.disabled&&this.setHostAttribute("aria-disabled","true"),this.fieldElement.invalid&&this.setHostAttribute("aria-invalid","true"),this._component.hasAttribute("tabindex")||(this._component.tabIndex=this._component.disabled?-1:0)}setLabel(e){let t=!(this._fieldElement.labelPosition==="inset"&&(this._fieldElement.density==="extra-small"||this._fieldElement.dense))&&!!(e!=null&&e.trim());(!this._component.hasAttribute("aria-label")||this._component.getAttribute("aria-label")===this._labelElement.textContent)&&this._component.setAttribute("aria-label",e),t?(this._labelElement.isConnected||this._fieldElement.insertAdjacentElement("afterbegin",this._labelElement),this._labelElement.textContent=e):this._labelElement.remove()}setPlaceholderText(e){m(this._selectedTextElement,!!(e!=null&&e.trim()),"placeholder",e)}open(e){this._targetElement||(this._targetElement=p(this._fieldElement,i.selectors.POPOVER_TARGET)),super.open(e),this._component.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`),this._component.setAttribute("aria-expanded","true"),this._fieldElement.popoverExpanded=!0}close(){return this._component.setAttribute("aria-expanded","false"),this._component.removeAttribute("aria-activedescendant"),this._component.removeAttribute("aria-controls"),this._fieldElement.popoverExpanded=!1,super.close()}floatLabel(e){this._fieldElement.floatLabel=e}updateActiveDescendant(e){m(this._component,!!e,"aria-activedescendant",e)}setSelectedText(e){this._selectedTextElement.textContent=e}setMultiple(e){this.toggleHostAttribute("aria-multiselectable",e,"true")}setDisabled(e){this._component.tabIndex=e?-1:0,m(this._component,e,"aria-disabled","true")}addClickListener(e){this._component.addEventListener("click",e)}removeClickListener(e){this._component.removeEventListener("click",e)}addTargetListener(e,l){this._component.addEventListener(e,l)}removeTargetListener(e,l){this._component.removeEventListener(e,l)}};var f=class extends R{constructor(e){super(e);this._label="";this._permanentlyFloatLabel=!1;this._mousedownListener=this._onMouseDown.bind(this)}initialize(){super.initialize(),super.initializeTarget(),this._initializeLabel(),this._initializeAccessibility(),this._adapter.addTargetListener("mousedown",this._mousedownListener)}disconnect(){super.disconnect(),this._adapter.removeTargetListener("mousedown",this._mousedownListener)}syncFloatingLabelState({force:e}={}){e!==void 0&&(this._permanentlyFloatLabel=e),this._updateLabel(),this._tryFloatLabel()}setDisabled(e){this._adapter.setDisabled(e)}_initializeLabel(){this._updateLabel(),this._tryFloatLabel()}_initializeValue(){super._initializeValue(),this._tryFloatLabel()}_initializeAccessibility(){this._adapter.setMultiple(this._multiple),this._adapter.initializeAccessibility()}_onMouseDown(e){e.preventDefault()}_onClick(e){this._adapter.fieldElement.disabled||e.composedPath().find(t=>{var d;return(d=t.matches)==null?void 0:d.call(t,"slot[name=accessory]")})||(this._adapter.focusHost(),super._onClick(e))}_openDropdown(){super._openDropdown(),this._open&&this._adapter.toggleHostAttribute(n.attributes.OPEN,!0)}_closeDropdown(){super._closeDropdown(),this._open||this._adapter.toggleHostAttribute(n.attributes.OPEN,!1)}_onDismiss(){super._onDismiss()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(n.events.SCROLLED_BOTTOM)}async _onSelect(e,l,t=!0){let d=await super._onSelect(e,l,t);return d&&(this._adapter.setSelectedText(this._getSelectedText()),t&&!this._multiple&&this._adapter.focusHost()),this._tryFloatLabel(),d}_reset(){super._reset(),this._adapter.setSelectedText(""),this._tryFloatLabel()}_tryFloatLabel(){if(this._permanentlyFloatLabel){this._adapter.floatLabel(!0);return}let e=!!this._getSelectedText()||!!this._selectedValues.length,l=!!this._placeholder;this._adapter.floatLabel(e||l)}_updateLabel(){this._adapter.setLabel(this._label)}_applyValue(e){super._applyValue(e);let l=this._getSelectedText();this._adapter.setSelectedText(l),this._open||this._tryFloatLabel()}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._updateLabel(),this._label&&this._initializeLabel(),this._adapter.toggleHostAttribute(n.attributes.LABEL,!!this._label,this._label))}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder!==e&&(this._placeholder=e,this._adapter.setPlaceholderText(this._placeholder),this._initializeLabel())}};function V(b){class c extends b{constructor(...t){super(...t)}initializeFieldInstance(t){this._fieldElement=t,this._fieldElement.shadowRoot||window.customElements.upgrade(this._fieldElement)}attributeChangedCallback(t,d,s){var E;switch(t){case o.observedAttributes.LABEL_POSITION:this.labelPosition=s;return;case o.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=s;return;case o.observedAttributes.INVALID:this.invalid=r(s);return;case o.observedAttributes.REQUIRED:this.required=r(s);return;case o.observedAttributes.OPTIONAL:this.optional=r(s);return;case o.observedAttributes.DISABLED:this.disabled=r(s);return;case o.observedAttributes.FLOAT_LABEL:this.floatLabel=r(s);return;case o.observedAttributes.VARIANT:this.variant=s;return;case o.observedAttributes.THEME:this.theme=s;return;case o.observedAttributes.SHAPE:this.shape=s;return;case o.observedAttributes.DENSITY:this.density=s;return;case o.observedAttributes.DENSE:this.dense=r(s);return;case o.observedAttributes.POPOVER_ICON:this.popoverIcon=r(s);return;case o.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=s;return}(E=super.attributeChangedCallback)==null||E.call(this,t,d,s)}get labelPosition(){return this._fieldElement.labelPosition}set labelPosition(t){this._fieldElement.labelPosition!==t&&(this._fieldElement.labelPosition=t,this.setAttribute(i.attributes.LABEL_POSITION,t))}get labelAlignment(){return this._fieldElement.labelAlignment}set labelAlignment(t){this._fieldElement.labelAlignment!==t&&(this._fieldElement.labelAlignment=t,this.setAttribute(i.attributes.LABEL_ALIGNMENT,t))}get invalid(){return this._fieldElement.invalid}set invalid(t){this._fieldElement.invalid!==t&&(this._fieldElement.invalid=t,this.toggleAttribute(i.attributes.INVALID,t))}get required(){return this._fieldElement.required}set required(t){this._fieldElement.required!==t&&(this._fieldElement.required=t,this.toggleAttribute(i.attributes.REQUIRED,t))}get optional(){return this._fieldElement.optional}set optional(t){this._fieldElement.optional!==t&&(this._fieldElement.optional=t,this.toggleAttribute(i.attributes.OPTIONAL,t))}get disabled(){return this._fieldElement.disabled}set disabled(t){this._fieldElement.disabled!==t&&(this._fieldElement.disabled=t,this.toggleAttribute(i.attributes.DISABLED,t))}get floatLabel(){return this._fieldElement.floatLabel}set floatLabel(t){this._fieldElement.floatLabel!==t&&(this._fieldElement.floatLabel=t,this.toggleAttribute(i.attributes.FLOAT_LABEL,t))}get variant(){return this._fieldElement.variant}set variant(t){this._fieldElement.variant!==t&&(this._fieldElement.variant=t,this.setAttribute(i.attributes.VARIANT,t))}get theme(){return this._fieldElement.theme}set theme(t){this._fieldElement.theme!==t&&(this._fieldElement.theme=t,this.setAttribute(i.attributes.THEME,t))}get shape(){return this._fieldElement.shape}set shape(t){this._fieldElement.shape!==t&&(this._fieldElement.shape=t,this.setAttribute(i.attributes.SHAPE,t))}get density(){return this._fieldElement.density}set density(t){this._fieldElement.density!==t&&(this._fieldElement.density=t,this.setAttribute(i.attributes.DENSITY,t))}get dense(){return this._fieldElement.dense}set dense(t){this._fieldElement.dense!==t&&(this._fieldElement.dense=t,this.toggleAttribute(i.attributes.DENSE,t))}get popoverIcon(){return this._fieldElement.popoverIcon}set popoverIcon(t){this._fieldElement.popoverIcon!==t&&(this._fieldElement.popoverIcon=t,this.toggleAttribute(i.attributes.POPOVER_ICON,t))}get supportTextInset(){return this._fieldElement.supportTextInset}set supportTextInset(t){this._fieldElement.supportTextInset!==t&&(this._fieldElement.supportTextInset=t,this.setAttribute(i.attributes.SUPPORT_TEXT_INSET,t))}floatLabelWithoutAnimation(t){this._fieldElement.floatLabelWithoutAnimation(t)}}return c}var $='<template><forge-field id="field" popover-icon focus-indicator-allow-focus focus-indicator-focus-mode="focus"><label id="select-label" aria-hidden="true" part="label"></label><slot slot="start" name="start"></slot><div data-forge-field-input class="selected-text-container" part="text-container" aria-live="assertive" aria-atomic="true"><slot name="value"><span id="selected-text" class="selected-text" part="text"></span></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text-start" name="support-text-start"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text-start" name="helper-text"></slot></forge-field></template>',Q=":host{display:block;outline:0}:host([hidden]){display:none}forge-field{--_select-placeholder-color:var(--forge-select-placeholder-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_select-dense-font-size:var(--forge-select-dense-font-size, calc(var(--forge-typography-font-size, 1rem) * 0.875))}.selected-text-container{display:grid;-webkit-box-align:center;align-items:center;cursor:pointer}.selected-text,::slotted([slot=value]){white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.selected-text:empty::before{content:attr(placeholder);color:var(--_select-placeholder-color);font-size:.875rem}:host([disabled]) .selected-text-container{cursor:not-allowed}forge-field{display:contents}forge-field:is([dense],[density=extra-small]) .selected-text{font-size:var(--_select-dense-font-size)}",J=V(z),a=class extends J{constructor(){var l;super();x.define([S,I,F]),g(this,$,Q);let e=(l=this.shadowRoot)==null?void 0:l.querySelector(i.elementName);this.initializeFieldInstance(e),this._foundation=new f(new h(this))}static get observedAttributes(){return[...Object.values(o.observedAttributes),...Object.values(n.observedAttributes),...Object.values(H.observedAttributes)]}attributeChangedCallback(e,l,t){switch(e){case n.observedAttributes.OPEN:this.open=r(t);return;case n.observedAttributes.LABEL:this.label=t;return;case n.observedAttributes.PLACEHOLDER:this.placeholder=t;return}super.attributeChangedCallback(e,l,t)}get floatLabel(){return super.floatLabel}set floatLabel(e){this._foundation.syncFloatingLabelState({force:e})}get density(){return super.density}set density(e){super.density=e,this._foundation.syncFloatingLabelState()}get dense(){return super.dense}set dense(e){super.dense=e,this._foundation.syncFloatingLabelState()}get disabled(){return super.disabled}set disabled(e){super.disabled=e,this._foundation.setDisabled(e)}get labelPosition(){return super.labelPosition}set labelPosition(e){super.labelPosition=e,this._foundation.syncFloatingLabelState()}};u([_()],a.prototype,"label",2),u([_()],a.prototype,"placeholder",2),a=u([A({name:n.elementName,dependencies:[N,w,k,O,P,D,M,C,W,B,y]})],a);function Je(){L(a)}export{n as a,h as b,f as c,a as d,Je as e};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as H,f as R,g as z,h as q}from"./chunk.AFWWND2C.js";import{b as k}from"./chunk.ENUKGA2U.js";import{d as w}from"./chunk.AOVXNX7P.js";import{d as M}from"./chunk.U6J4VHU6.js";import{b as W}from"./chunk.EO3GP6DP.js";import{b as B}from"./chunk.SROEDYPL.js";import{c as P}from"./chunk.2GUWHBUU.js";import{f as D}from"./chunk.O5WAQQNR.js";import{c as O}from"./chunk.USTVZ6MZ.js";import{a as i,d as N}from"./chunk.MFS7AVW6.js";import{a as o}from"./chunk.72BKSMAZ.js";import{d as y}from"./chunk.GIENHEMN.js";import{c as S,g as F,h as I}from"./chunk.RLQB7224.js";import{d as x,l as C}from"./chunk.T7NWP7DB.js";import{a as _}from"./chunk.NVUMRW44.js";import{a as A,b as T}from"./chunk.VRSPT7WX.js";import{a as L,e as g,f as p}from"./chunk.LNTTU2GL.js";import{r as m}from"./chunk.L4QSPQDE.js";import{k as r}from"./chunk.J2M2MXP2.js";import{a as v,d as u}from"./chunk.M3QDAYD2.js";var j=`${T}select`,X={FIELD:"#field",SELECTED_TEXT:"#selected-text",LABEL:"#select-label"},U={OPEN:"open",TYPE:"type",VALUE:"value",LABEL:"label",MULTIPLE:"multiple",DISABLED:"disabled",PLACEHOLDER:"placeholder",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},G=v({},U),Y={SCROLLED_BOTTOM:`${j}-scrolled-bottom`},n={elementName:j,observedAttributes:U,attributes:G,selectors:X,events:Y};var h=class extends q{constructor(e){super(e);this._fieldElement=p(e,n.selectors.FIELD),this._labelElement=p(e,n.selectors.LABEL),this._selectedTextElement=p(e,n.selectors.SELECTED_TEXT),this._fieldElement.setAttribute("exportparts",Object.values(i.parts).join(", ")),this._fieldElement.focusIndicatorTargetElement=this._component}get fieldElement(){return this._fieldElement}initializeAccessibility(){this._component.setAttribute("role","combobox"),this._component.setAttribute("aria-haspopup","true"),this._component.setAttribute("aria-expanded","false"),this.fieldElement.required&&this.setHostAttribute("aria-required","true"),this.fieldElement.disabled&&this.setHostAttribute("aria-disabled","true"),this.fieldElement.invalid&&this.setHostAttribute("aria-invalid","true"),this._component.hasAttribute("tabindex")||(this._component.tabIndex=this._component.disabled?-1:0)}setLabel(e){let t=!(this._fieldElement.labelPosition==="inset"&&(this._fieldElement.density==="extra-small"||this._fieldElement.dense))&&!!(e!=null&&e.trim());(!this._component.hasAttribute("aria-label")||this._component.getAttribute("aria-label")===this._labelElement.textContent)&&this._component.setAttribute("aria-label",e),t?(this._labelElement.isConnected||this._fieldElement.insertAdjacentElement("afterbegin",this._labelElement),this._labelElement.textContent=e):this._labelElement.remove()}setPlaceholderText(e){m(this._selectedTextElement,!!(e!=null&&e.trim()),"placeholder",e)}open(e){this._targetElement||(this._targetElement=p(this._fieldElement,i.selectors.POPOVER_TARGET)),super.open(e),this._component.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`),this._component.setAttribute("aria-expanded","true"),this._fieldElement.popoverExpanded=!0}close(){return this._component.setAttribute("aria-expanded","false"),this._component.removeAttribute("aria-activedescendant"),this._component.removeAttribute("aria-controls"),this._fieldElement.popoverExpanded=!1,super.close()}floatLabel(e){this._fieldElement.floatLabel=e}updateActiveDescendant(e){m(this._component,!!e,"aria-activedescendant",e)}setSelectedText(e){this._selectedTextElement.textContent=e}setMultiple(e){this.toggleHostAttribute("aria-multiselectable",e,"true")}setDisabled(e){this._component.tabIndex=e?-1:0,m(this._component,e,"aria-disabled","true")}addClickListener(e){this._component.addEventListener("click",e)}removeClickListener(e){this._component.removeEventListener("click",e)}addTargetListener(e,l){this._component.addEventListener(e,l)}removeTargetListener(e,l){this._component.removeEventListener(e,l)}};var f=class extends R{constructor(e){super(e);this._label="";this._permanentlyFloatLabel=!1;this._mousedownListener=this._onMouseDown.bind(this)}initialize(){super.initialize(),super.initializeTarget(),this._initializeLabel(),this._initializeAccessibility(),this._adapter.addTargetListener("mousedown",this._mousedownListener)}disconnect(){super.disconnect(),this._adapter.removeTargetListener("mousedown",this._mousedownListener)}syncFloatingLabelState({force:e}={}){e!==void 0&&(this._permanentlyFloatLabel=e),this._updateLabel(),this._tryFloatLabel()}setDisabled(e){this._adapter.setDisabled(e)}_initializeLabel(){this._updateLabel(),this._tryFloatLabel()}_initializeValue(){super._initializeValue(),this._tryFloatLabel()}_initializeAccessibility(){this._adapter.setMultiple(this._multiple),this._adapter.initializeAccessibility()}_onMouseDown(e){e.preventDefault()}_onClick(e){this._adapter.fieldElement.disabled||e.composedPath().find(t=>{var d;return(d=t.matches)==null?void 0:d.call(t,"slot[name=accessory]")})||(this._adapter.focusHost(),super._onClick(e))}_openDropdown(){super._openDropdown(),this._open&&this._adapter.toggleHostAttribute(n.attributes.OPEN,!0)}_closeDropdown(){super._closeDropdown(),this._open||this._adapter.toggleHostAttribute(n.attributes.OPEN,!1)}_onDismiss(){super._onDismiss()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(n.events.SCROLLED_BOTTOM)}async _onSelect(e,l,t=!0){let d=await super._onSelect(e,l,t);return d&&(this._adapter.setSelectedText(this._getSelectedText()),t&&!this._multiple&&this._adapter.focusHost()),this._tryFloatLabel(),d}_reset(){super._reset(),this._adapter.setSelectedText(""),this._tryFloatLabel()}_tryFloatLabel(){if(this._permanentlyFloatLabel){this._adapter.floatLabel(!0);return}let e=!!this._getSelectedText()||!!this._selectedValues.length,l=!!this._placeholder;this._adapter.floatLabel(e||l)}_updateLabel(){this._adapter.setLabel(this._label)}_applyValue(e){super._applyValue(e);let l=this._getSelectedText();this._adapter.setSelectedText(l),this._open||this._tryFloatLabel()}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._updateLabel(),this._label&&this._initializeLabel(),this._adapter.toggleHostAttribute(n.attributes.LABEL,!!this._label,this._label))}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder!==e&&(this._placeholder=e,this._adapter.setPlaceholderText(this._placeholder),this._initializeLabel())}};function V(b){class c extends b{constructor(...t){super(...t)}initializeFieldInstance(t){this._fieldElement=t,this._fieldElement.shadowRoot||window.customElements.upgrade(this._fieldElement)}attributeChangedCallback(t,d,s){var E;switch(t){case o.observedAttributes.LABEL_POSITION:this.labelPosition=s;return;case o.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=s;return;case o.observedAttributes.INVALID:this.invalid=r(s);return;case o.observedAttributes.REQUIRED:this.required=r(s);return;case o.observedAttributes.OPTIONAL:this.optional=r(s);return;case o.observedAttributes.DISABLED:this.disabled=r(s);return;case o.observedAttributes.FLOAT_LABEL:this.floatLabel=r(s);return;case o.observedAttributes.VARIANT:this.variant=s;return;case o.observedAttributes.THEME:this.theme=s;return;case o.observedAttributes.SHAPE:this.shape=s;return;case o.observedAttributes.DENSITY:this.density=s;return;case o.observedAttributes.DENSE:this.dense=r(s);return;case o.observedAttributes.POPOVER_ICON:this.popoverIcon=r(s);return;case o.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=s;return}(E=super.attributeChangedCallback)==null||E.call(this,t,d,s)}get labelPosition(){return this._fieldElement.labelPosition}set labelPosition(t){this._fieldElement.labelPosition!==t&&(this._fieldElement.labelPosition=t,this.setAttribute(i.attributes.LABEL_POSITION,t))}get labelAlignment(){return this._fieldElement.labelAlignment}set labelAlignment(t){this._fieldElement.labelAlignment!==t&&(this._fieldElement.labelAlignment=t,this.setAttribute(i.attributes.LABEL_ALIGNMENT,t))}get invalid(){return this._fieldElement.invalid}set invalid(t){this._fieldElement.invalid!==t&&(this._fieldElement.invalid=t,this.toggleAttribute(i.attributes.INVALID,t))}get required(){return this._fieldElement.required}set required(t){this._fieldElement.required!==t&&(this._fieldElement.required=t,this.toggleAttribute(i.attributes.REQUIRED,t))}get optional(){return this._fieldElement.optional}set optional(t){this._fieldElement.optional!==t&&(this._fieldElement.optional=t,this.toggleAttribute(i.attributes.OPTIONAL,t))}get disabled(){return this._fieldElement.disabled}set disabled(t){this._fieldElement.disabled!==t&&(this._fieldElement.disabled=t,this.toggleAttribute(i.attributes.DISABLED,t))}get floatLabel(){return this._fieldElement.floatLabel}set floatLabel(t){this._fieldElement.floatLabel!==t&&(this._fieldElement.floatLabel=t,this.toggleAttribute(i.attributes.FLOAT_LABEL,t))}get variant(){return this._fieldElement.variant}set variant(t){this._fieldElement.variant!==t&&(this._fieldElement.variant=t,this.setAttribute(i.attributes.VARIANT,t))}get theme(){return this._fieldElement.theme}set theme(t){this._fieldElement.theme!==t&&(this._fieldElement.theme=t,this.setAttribute(i.attributes.THEME,t))}get shape(){return this._fieldElement.shape}set shape(t){this._fieldElement.shape!==t&&(this._fieldElement.shape=t,this.setAttribute(i.attributes.SHAPE,t))}get density(){return this._fieldElement.density}set density(t){this._fieldElement.density!==t&&(this._fieldElement.density=t,this.setAttribute(i.attributes.DENSITY,t))}get dense(){return this._fieldElement.dense}set dense(t){this._fieldElement.dense!==t&&(this._fieldElement.dense=t,this.toggleAttribute(i.attributes.DENSE,t))}get popoverIcon(){return this._fieldElement.popoverIcon}set popoverIcon(t){this._fieldElement.popoverIcon!==t&&(this._fieldElement.popoverIcon=t,this.toggleAttribute(i.attributes.POPOVER_ICON,t))}get supportTextInset(){return this._fieldElement.supportTextInset}set supportTextInset(t){this._fieldElement.supportTextInset!==t&&(this._fieldElement.supportTextInset=t,this.setAttribute(i.attributes.SUPPORT_TEXT_INSET,t))}floatLabelWithoutAnimation(t){this._fieldElement.floatLabelWithoutAnimation(t)}}return c}var $='<template><forge-field id="field" popover-icon focus-indicator-allow-focus focus-indicator-focus-mode="focus"><label id="select-label" aria-hidden="true" part="label"></label><slot slot="start" name="start"></slot><div data-forge-field-input class="selected-text-container" part="text-container" aria-live="assertive" aria-atomic="true"><slot name="value"><span id="selected-text" class="selected-text" part="text"></span></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text-start" name="support-text-start"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text-start" name="helper-text"></slot></forge-field></template>',Q=":host{display:block;outline:0}:host([hidden]){display:none}forge-field{--_select-placeholder-color:var(--forge-select-placeholder-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_select-dense-font-size:var(--forge-select-dense-font-size, calc(var(--forge-typography-font-size, 1rem) * 0.875))}.selected-text-container{display:grid;-webkit-box-align:center;align-items:center;cursor:pointer}.selected-text,::slotted([slot=value]){white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.selected-text:empty::before{content:attr(placeholder);color:var(--_select-placeholder-color);font-size:.875rem}:host([disabled]) .selected-text-container{cursor:not-allowed}forge-field{display:contents}forge-field:is([dense],[density=extra-small]) .selected-text{font-size:var(--_select-dense-font-size)}",J=V(z),a=class extends J{constructor(){var l;super();x.define([S,I,F]),g(this,$,Q);let e=(l=this.shadowRoot)==null?void 0:l.querySelector(i.elementName);this.initializeFieldInstance(e),this._foundation=new f(new h(this))}static get observedAttributes(){return[...Object.values(o.observedAttributes),...Object.values(n.observedAttributes),...Object.values(H.observedAttributes)]}attributeChangedCallback(e,l,t){switch(e){case n.observedAttributes.OPEN:this.open=r(t);return;case n.observedAttributes.LABEL:this.label=t;return;case n.observedAttributes.PLACEHOLDER:this.placeholder=t;return}super.attributeChangedCallback(e,l,t)}get floatLabel(){return super.floatLabel}set floatLabel(e){this._foundation.syncFloatingLabelState({force:e})}get density(){return super.density}set density(e){super.density=e,this._foundation.syncFloatingLabelState()}get dense(){return super.dense}set dense(e){super.dense=e,this._foundation.syncFloatingLabelState()}get disabled(){return super.disabled}set disabled(e){super.disabled=e,this._foundation.setDisabled(e)}get labelPosition(){return super.labelPosition}set labelPosition(e){super.labelPosition=e,this._foundation.syncFloatingLabelState()}};u([_()],a.prototype,"label",2),u([_()],a.prototype,"placeholder",2),a=u([A({name:n.elementName,dependencies:[N,w,k,O,P,D,M,C,W,B,y]})],a);function Je(){L(a)}export{n as a,h as b,f as c,a as d,Je as e};
|
|
7
|
+
//# sourceMappingURL=chunk.2W23MOPP.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as H,b as K,c as U,d as q,e as G}from"./chunk.XTJGWT5F.js";import{E as z}from"./chunk.UPSXYWPD.js";import{a}from"./chunk.44IUAOBP.js";import{F as B}from"./chunk.BV7EAQST.js";import{c as S}from"./chunk.USTVZ6MZ.js";import{a as N}from"./chunk.RFT3BAJ2.js";import{a as O}from"./chunk.RONMNRSH.js";import{e as g}from"./chunk.UV3WIHCM.js";import{d as w}from"./chunk.GIENHEMN.js";import{m as A}from"./chunk.RLQB7224.js";import{d as R,l as x}from"./chunk.T7NWP7DB.js";import{a as L}from"./chunk.SQ3AZAHF.js";import{e as l}from"./chunk.J2Y5KPON.js";import{b as E}from"./chunk.XIQFHO5R.js";import{a as D}from"./chunk.NVUMRW44.js";import{a as F,b as M}from"./chunk.VRSPT7WX.js";import{a as y,e as P,h as v}from"./chunk.LNTTU2GL.js";import{p as b,r as k}from"./chunk.L4QSPQDE.js";import{a as V}from"./chunk.DJSHVUEM.js";import{f as I,g as C}from"./chunk.J2M2MXP2.js";import{d as h}from"./chunk.M3QDAYD2.js";var d=`${M}date-range-picker`,_=class u{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new u(this)}},W={FROM:"from",TO:"to",END_VALUE:"end-value"},j={INPUT:"input"},X={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},n={elementName:d,selectors:j,events:X,observedAttributes:W};var m=class extends q{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(n.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(n.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${n.elementName} requires two inputs`);let t=this._createInputSeparator();this._fromInputElement.insertAdjacentElement("afterend",t)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new B(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new E(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new E(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,i){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:i})}addToInputListener(t,e,i){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:i})}removeInputListener(t,e){var i;(i=this._fromInputElement)==null||i.removeEventListener(t,e)}removeToInputListener(t,e){var i;(i=this._toInputElement)==null||i.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let i=g(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(i)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=g(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=b(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){v(this._fromInputElement,t,e)}emitToInputEvent(t,e){v(this._toInputElement,t,e)}_createToggleElement(){return U("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}_createInputSeparator(){let t=document.createElement("span");return k(t,!0,N.attributes.MULTI_INPUT_SEPARATOR),t.setAttribute("aria-hidden","true"),t.textContent="-",t}};var c=class extends G{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let i=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),p=new _({from:i,to:o});return this._adapter.emitHostEvent(n.events.CHANGE,p,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});this._isDateRangeAcceptable(e)&&(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(C(e)&&this._isDateValueAcceptable(e)){let i=this._formatDate(e);i&&this._adapter.setToInputValue(i,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),i=()=>this._isDateValueAcceptable(t.to),o=()=>t!=null&&t.from&&(t!=null&&t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&i()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let i=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,i,o,p)=>this._prepareMaskCallback.call(null,e,i,o,p)),this._adapter.initializeToMask(t)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,e),!l(i,this._from)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(n.events.INPUT,e),!l(i,this._to)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(t){this._masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(t){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(t.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);l(i,this._from)||(this.from=i,this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);l(i,this._to)||(this.to=i,this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){t||(t={from:null,to:null}),t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to}}get from(){let t=this._getTypedValue(this._from);return t?I(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?I(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var J="<template><slot></slot></template>",Q=":host{display:block}:host([hidden]){display:none}",s=class extends K{constructor(){super();R.define(A),P(this,J,Q),this._foundation=new c(new m(this))}static get observedAttributes(){return[...Object.values(H.observedAttributes),n.observedAttributes.FROM,n.observedAttributes.TO]}attributeChangedCallback(t,e,i){switch(t){case n.observedAttributes.FROM:this.from=i;return;case n.observedAttributes.TO:this.to=i;return}super.attributeChangedCallback(t,e,i)}};h([D()],s.prototype,"from",2),h([D()],s.prototype,"to",2),s=h([F({name:n.elementName,dependencies:[S,z,w,x]})],s);var $=class extends L{constructor(t){super(t)}_build(){let t=document.createElement(n.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector("input:first-of-type")}get toInput(){return this._textField.querySelector("input:last-of-type")}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(n.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var i,o,p,f,T;this._textField=document.createElement(O.elementName),(i=this._config.options)!=null&&i.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((p=this._config.options)==null?void 0:p.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((f=this._config.options)==null?void 0:f.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((T=this._config.options)==null?void 0:T.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function jt(){y(s)}export{_ as a,n as b,m as c,c as d,s as e,$ as f,jt as g};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as H,b as K,c as U,d as q,e as G}from"./chunk.VJZ7VDG5.js";import{E as z}from"./chunk.UPSXYWPD.js";import{a}from"./chunk.44IUAOBP.js";import{F as B}from"./chunk.BV7EAQST.js";import{c as S}from"./chunk.USTVZ6MZ.js";import{a as N}from"./chunk.MFS7AVW6.js";import{a as O}from"./chunk.SZOZIJZI.js";import{e as g}from"./chunk.UV3WIHCM.js";import{d as w}from"./chunk.GIENHEMN.js";import{m as A}from"./chunk.RLQB7224.js";import{d as R,l as x}from"./chunk.T7NWP7DB.js";import{a as L}from"./chunk.SQ3AZAHF.js";import{e as l}from"./chunk.J2Y5KPON.js";import{b as E}from"./chunk.XIQFHO5R.js";import{a as D}from"./chunk.NVUMRW44.js";import{a as F,b as M}from"./chunk.VRSPT7WX.js";import{a as y,e as P,h as v}from"./chunk.LNTTU2GL.js";import{p as b,r as k}from"./chunk.L4QSPQDE.js";import{a as V}from"./chunk.DJSHVUEM.js";import{f as I,g as C}from"./chunk.J2M2MXP2.js";import{d as h}from"./chunk.M3QDAYD2.js";var d=`${M}date-range-picker`,_=class u{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new u(this)}},W={FROM:"from",TO:"to",END_VALUE:"end-value"},j={INPUT:"input"},X={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},n={elementName:d,selectors:j,events:X,observedAttributes:W};var m=class extends q{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(n.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(n.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${n.elementName} requires two inputs`);let t=this._createInputSeparator();this._fromInputElement.insertAdjacentElement("afterend",t)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new B(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new E(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new E(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,i){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:i})}addToInputListener(t,e,i){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:i})}removeInputListener(t,e){var i;(i=this._fromInputElement)==null||i.removeEventListener(t,e)}removeToInputListener(t,e){var i;(i=this._toInputElement)==null||i.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let i=g(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(i)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=g(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=b(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){v(this._fromInputElement,t,e)}emitToInputEvent(t,e){v(this._toInputElement,t,e)}_createToggleElement(){return U("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}_createInputSeparator(){let t=document.createElement("span");return k(t,!0,N.attributes.MULTI_INPUT_SEPARATOR),t.setAttribute("aria-hidden","true"),t.textContent="-",t}};var c=class extends G{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let i=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),p=new _({from:i,to:o});return this._adapter.emitHostEvent(n.events.CHANGE,p,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});this._isDateRangeAcceptable(e)&&(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(C(e)&&this._isDateValueAcceptable(e)){let i=this._formatDate(e);i&&this._adapter.setToInputValue(i,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),i=()=>this._isDateValueAcceptable(t.to),o=()=>t!=null&&t.from&&(t!=null&&t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&i()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let i=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,i,o,p)=>this._prepareMaskCallback.call(null,e,i,o,p)),this._adapter.initializeToMask(t)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,e),!l(i,this._from)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(n.events.INPUT,e),!l(i,this._to)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(t){this._masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(t){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(t.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);l(i,this._from)||(this.from=i,this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);l(i,this._to)||(this.to=i,this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){t||(t={from:null,to:null}),t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to}}get from(){let t=this._getTypedValue(this._from);return t?I(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?I(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var J="<template><slot></slot></template>",Q=":host{display:block}:host([hidden]){display:none}",s=class extends K{constructor(){super();R.define(A),P(this,J,Q),this._foundation=new c(new m(this))}static get observedAttributes(){return[...Object.values(H.observedAttributes),n.observedAttributes.FROM,n.observedAttributes.TO]}attributeChangedCallback(t,e,i){switch(t){case n.observedAttributes.FROM:this.from=i;return;case n.observedAttributes.TO:this.to=i;return}super.attributeChangedCallback(t,e,i)}};h([D()],s.prototype,"from",2),h([D()],s.prototype,"to",2),s=h([F({name:n.elementName,dependencies:[S,z,w,x]})],s);var $=class extends L{constructor(t){super(t)}_build(){let t=document.createElement(n.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector("input:first-of-type")}get toInput(){return this._textField.querySelector("input:last-of-type")}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(n.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var i,o,p,f,T;this._textField=document.createElement(O.elementName),(i=this._config.options)!=null&&i.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((p=this._config.options)==null?void 0:p.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((f=this._config.options)==null?void 0:f.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((T=this._config.options)==null?void 0:T.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function jt(){y(s)}export{_ as a,n as b,m as c,c as d,s as e,$ as f,jt as g};
|
|
7
|
+
//# sourceMappingURL=chunk.32APLNN2.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{b as $}from"./chunk.LIKJD4SK.js";import{n as B}from"./chunk.RLQB7224.js";import{d as Y,l as W}from"./chunk.T7NWP7DB.js";import{d as Z}from"./chunk.FLF5RTYO.js";import{p as X}from"./chunk.ASLHRT3N.js";import{b as O}from"./chunk.BX4AQRHB.js";import{c as U,e as C,f as h}from"./chunk.SB2LOK2R.js";import{a as d}from"./chunk.NVUMRW44.js";import{a as K}from"./chunk.OLFOVKQG.js";import{a as H,b as z}from"./chunk.VRSPT7WX.js";import{a as N,e as D,f,k as M}from"./chunk.LNTTU2GL.js";import{g as x,r as g}from"./chunk.L4QSPQDE.js";import{b as p,k as S,l as R}from"./chunk.J2M2MXP2.js";import{a as _,b as c,d as l}from"./chunk.M3QDAYD2.js";var b=`${z}split-view-panel`,se={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},le={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled",OVERLAY:"forge-split-view-panel-overlay"},v={ROOT:"root",HANDLE:"handle",ICON:"icon",STATE_LAYER:"state-layer",CONTENT:"content"},pe={ROOT:`#${v.ROOT}`,HANDLE:`#${v.HANDLE}`,ICON:`#${v.ICON}`,STATE_LAYER:`#${v.STATE_LAYER}`,CONTENT:`#${v.CONTENT}`},de={WILL_RESIZE:`${b}-will-resize`,RESIZE_START:`${b}-resize-start`,RESIZE_END:`${b}-resize-end`,RESIZE:`${b}-resize`,DID_OPEN:`${b}-did-open`,DID_CLOSE:`${b}-did-close`,WILL_OPEN:`${b}-will-open`,WILL_CLOSE:`${b}-will-close`},ue={STATE_LAYER_ACTIVATION_WAIT:200},be={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:b,attributes:se,classes:le,ids:v,selectors:pe,events:de,numbers:ue,customCssProperties:be},he=(r=>(r[r.Under=1]="Under",r[r.Active=2]="Active",r[r.Above=3]="Above",r))(he||{});function F(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function G(n,t){let e=n.getContentSize(t.orientation);return c(_({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function j(n){return c(_({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function q(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let r=e.currentSize,o=e.orientation==="horizontal"?t.clientX:t.clientY,a=e.startPoint-o;e.resizable==="start"&&(a*=-1);let u=e.startSize-a;e.currentSize=E(u,e),n.setContentSize(e.currentSize),y(n,e,"pointer"),n.setValuenow(P(e.currentSize,e));let w=u-e.currentSize+a;return te(n,w,e),r!==e.currentSize}function J(n,t,e){if(e.startSize===void 0)return!1;let r=e.currentSize;e.keyboardDelta+=t;let o=e.startSize+e.keyboardDelta;e.currentSize=E(o,e),n.setContentSize(e.currentSize),y(n,e,"keyboard"),n.setValuenow(P(e.currentSize,e));let a=o-e.currentSize+e.keyboardDelta*-1;return te(n,a,e),r!==e.currentSize}function Q(n,t){return n.setContentSize(t.min),t.min}function ee(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),r=h(t.max,e);return n.setContentSize(r),r}function te(n,t,e){if(e.siblingSize!==void 0){let r=e.siblingSize+t;n.setSiblingContentSize(r)}}function E(n,t){return n=Math.max(n,t.min),n=h(n,t.max,t.availableSpace),n}function y(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.animateStateLayer(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let r=h(t.max,t.availableSpace);return t.currentSize>=r?(t.isAtMax||(n.animateStateLayer(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function ie(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let r=h(e.max,e.availableSpace);return t>=r?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function P(n,t){if(!t.availableSpace&&!t.max)return 100;let e=h(t.max,t.availableSpace);return C(n,t.min,e)}function k(n,t){if(n==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function ne(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function me(n){var a,u;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),r=e!=null&&e[1]?+e[1]:-1,o=(u=(a=e==null?void 0:e[2])==null?void 0:a.toLowerCase())!=null?u:"";return{amount:r,unit:o}}function m(n,t){let e=me(n);return e.unit==="%"?U(e.amount,t):e.amount}function re(){let n=document.createElement("div");return n.classList.add(i.classes.OVERLAY),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.zIndex="9999",n}var L=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=F();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}disconnect(){this._adapter.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):O(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){O(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){this._appliedAllowClose&&(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=Q(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=ee(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){J(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,y(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._endResize()}_handlePointermove(t){q(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(i.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=G(this._adapter,this._state),this._adapter.emitHostEvent(i.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(i.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=j(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,r=!1){let o=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,a={auto:e,userInitiated:r};this._adapter.emitHostEvent(o,a,!0,!0)&&(this._open=t,this._applyOpen(a))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let r=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=r,this._applyParentAutoClose();let o=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=o,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(i.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=m(this._size,t);this._adapter.setHostAttribute(i.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let r=this._adapter.getAvailableSpace(this._orientation,this._resizable),o=h(this._pixelMax,r),a=C(e,this._pixelMin,o);this._adapter.setValuenow(a),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(i.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=m(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var r;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(r=this._max)==null?void 0:r.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=m(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(i.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(i.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(i.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!p(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!p(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,p(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!p(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=m(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=E(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(i.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(p(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),p(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),p(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,p(this._autoClose)||this._applyAutoClose()),p(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,p(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let o=this._adapter.getParentSize(this._orientation);this._pixelMin=m(this._min,o),this._pixelMax=p(this._max)?m(this._max,o):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),r=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let o=P(e,c(_({},this._state),{availableSpace:r}));this._adapter.setValuenow(o)}t.cursor&&ie(this._adapter,e,c(_({},this._state),{availableSpace:r}))}};var _e=`${z}split-view`,ce={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},fe={ROOT:"forge-split-view"},oe={ROOT:"root"},ve={ROOT:`#${oe.ROOT}`,PANEL:i.elementName},Se={RESIZE_THROTTLE_THRESHOLD:200},we={ANIMATING_LAYER:"--forge-split-view-animating-layer"},ae={elementName:_e,attributes:ce,classes:fe,ids:oe,selectors:ve,numbers:Se,customCssProperties:we};var A=class extends K{constructor(e){super(e);this._root=f(e,i.selectors.ROOT),this._handle=f(e,i.selectors.HANDLE),this._icon=f(e,i.selectors.ICON),this._stateLayer=f(e,i.selectors.STATE_LAYER),this._content=f(e,i.selectors.CONTENT)}initialize(){let e=this._component.parentElement;(e==null?void 0:e.tagName.toLowerCase())===ae.elementName&&(this._parent=e)}tryRemoveOverlay(){var e;(e=this._overlay)==null||e.remove(),this._overlay=void 0}setPointerdownListener(e){this._handle.addEventListener("pointerdown",e)}setPointerupListener(e){document.addEventListener("pointerup",e)}removePointerupListener(e){document.removeEventListener("pointerup",e)}setPointermoveListener(e){document.addEventListener("pointermove",e)}removePointermoveListener(e){document.removeEventListener("pointermove",e)}setKeydownListener(e){this._handle.addEventListener("keydown",e)}setKeyupListener(e){this._handle.addEventListener("keyup",e)}removeKeyupListener(e){this._handle.removeEventListener("keyup",e)}getParentProperty(e){var r;return(r=this._parent)==null?void 0:r[e]}setAccessibleLabel(e){this._handle.setAttribute("aria-label",e)}setDisabled(e){this._root.classList.toggle(i.classes.DISABLED,e),this._handle&&(this._handle.setAttribute("tabindex",e?"-1":"0"),g(this._handle,e,"aria-disabled","true"))}setResizable(e){this._root.setAttribute(i.attributes.RESIZABLE,e.toString()),g(this._handle,e!=="off","aria-valuemin","0"),g(this._handle,e!=="off","aria-valuemax","100"),e!=="off"&&(this._handle.remove(),e==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(e){this._root.setAttribute(i.attributes.ORIENTATION,e),this._handle.setAttribute("aria-orientation",e==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",ne(e))}setOpen(e,r=!0,o){var u,w;let a=()=>{var T,V;e||this._root.classList.add(i.classes.CLOSED),o&&this.emitHostEvent(e?i.events.DID_OPEN:i.events.DID_CLOSE,o),(T=this._parent)==null||T.unlayerSlottedPanels(),(V=this._parent)==null||V.update({accessibility:!0,cursor:!0})};if(e&&this._root.classList.contains(i.classes.CLOSED)){if(this._root.classList.remove(i.classes.CLOSED),!r){a();return}(u=this._parent)==null||u.layerSlottedPanels(this._component),x(this._root,i.classes.OPENING,!0).then(()=>{a()})}else if(!e&&!this._root.classList.contains(i.classes.CLOSED)){if(!r){a();return}(w=this._parent)==null||w.layerSlottedPanels(this._component),x(this._root,i.classes.CLOSING,!0).then(()=>{a()})}}setGrabbed(e){var r;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),e?(this._overlay||(this._overlay=re()),document.body.append(this._overlay)):(r=this._overlay)==null||r.remove()}setHandleCursor(e,r){e?this._root.style.setProperty(i.customCssProperties.CURSOR,k(e,r)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,r){var o;(o=this._overlay)==null||o.style.setProperty("cursor",k(e,r))}getContentSize(e){return e==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(e){this._component.style.setProperty(i.customCssProperties.SIZE,`${e}px`)}setValuenow(e){this._handle.setAttribute("aria-valuenow",e.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(e,r){if(r==="off")return-1;let o=I(this._component);return o?o.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var r;let e=I(this._component);return(r=e==null?void 0:e.getContentSize())!=null?r:0}setSiblingContentSize(e){let r=I(this._component);r==null||r.setContentSize(e)}animateStateLayer(e){e?window.setTimeout(()=>{this._stateLayer.playAnimation()},i.numbers.STATE_LAYER_ACTIVATION_WAIT):this._stateLayer.playAnimation()}getParentSize(e){var o,a;let r=e==="horizontal"?(o=this._parent)==null?void 0:o.clientWidth:(a=this._parent)==null?void 0:a.clientHeight;return r!=null?r:0}updateParent(e){var r;(r=this._parent)==null||r.update(e)}};var ge='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-state-layer target="handle" id="state-layer" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator inward target="handle" part="focus-indicator"></forge-focus-indicator></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',ze=".forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);position:relative;display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:up9pg91;animation-name:up9pg91;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes up9pg91{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes up9pg91{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:up9pga1;animation-name:up9pga1;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes up9pga1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes up9pga1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:up9pga8;animation-name:up9pga8;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes up9pga8{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes up9pga8{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:up9pgat;animation-name:up9pgat;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes up9pgat{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes up9pgat{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:up9pgbj;animation-name:up9pgbj;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes up9pgbj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes up9pgbj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:up9pgca;animation-name:up9pgca;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes up9pgca{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes up9pgca{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:up9pgcg;animation-name:up9pgcg;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes up9pgcg{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes up9pgcg{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:up9pgco;animation-name:up9pgco;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes up9pgco{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes up9pgco{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}",s=class extends M{constructor(){super();Y.define([$,B]),D(this,ge,ze),this._foundation=new L(new A(this))}static get observedAttributes(){return[i.attributes.RESIZABLE,i.attributes.SIZE,i.attributes.MIN,i.attributes.MAX,i.attributes.ACCESSIBLE_LABEL,i.attributes.OPEN,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,o){switch(e){case i.attributes.RESIZABLE:this.resizable=o;break;case i.attributes.SIZE:this.size=o;break;case i.attributes.MIN:this.min=o;break;case i.attributes.MAX:o?this.max=o:this.max=void 0;break;case i.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=o;break;case i.attributes.OPEN:this.open=S(o);break;case i.attributes.DISABLED:this.hasAttribute(e)?this.disabled=S(o):this.disabled=void 0;break;case i.attributes.ALLOW_CLOSE:this.hasAttribute(e)?this.allowClose=S(o):this.allowClose=void 0;break;case i.attributes.AUTO_CLOSE:this.hasAttribute(e)?this.autoClose=S(o):this.autoClose=void 0;break;case i.attributes.AUTO_CLOSE_THRESHOLD:o?this.autoCloseThreshold=R(o):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._foundation.getContentSize()}getCollapsibleSize(){return this._foundation.getCollapsibleSize()}setContentSize(e){this._foundation.setContentSize(e)}update(e){this._foundation.update(e)}};l([d()],s.prototype,"resizable",2),l([d()],s.prototype,"size",2),l([d()],s.prototype,"min",2),l([d()],s.prototype,"max",2),l([d()],s.prototype,"accessibleLabel",2),l([d()],s.prototype,"open",2),l([d()],s.prototype,"disabled",2),l([d()],s.prototype,"allowClose",2),l([d()],s.prototype,"autoClose",2),l([d()],s.prototype,"autoCloseThreshold",2),s=l([H({name:i.elementName,dependencies:[W,X,Z]})],s);function yt(){N(s)}export{i as a,he as b,F as c,G as d,j as e,q as f,J as g,Q as h,ee as i,te as j,E as k,y as l,ie as m,P as n,k as o,ne as p,I as q,me as r,m as s,re as t,L as u,ae as v,A as w,s as x,yt as y};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{b as Z}from"./chunk.LIKJD4SK.js";import{n as B}from"./chunk.RLQB7224.js";import{d as U,l as Y}from"./chunk.T7NWP7DB.js";import{d as X}from"./chunk.FLF5RTYO.js";import{p as W}from"./chunk.ASLHRT3N.js";import{b as O}from"./chunk.BX4AQRHB.js";import{c as q,e as C,f as h}from"./chunk.SB2LOK2R.js";import{a as d}from"./chunk.NVUMRW44.js";import{a as K}from"./chunk.OLFOVKQG.js";import{a as H,b as g}from"./chunk.VRSPT7WX.js";import{a as N,e as D,f,k as M}from"./chunk.LNTTU2GL.js";import{g as A,r as z}from"./chunk.L4QSPQDE.js";import{b as p,k as S,l as R}from"./chunk.J2M2MXP2.js";import{a as _,b as c,d as l}from"./chunk.M3QDAYD2.js";var b=`${g}split-view-panel`,se={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},le={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled",OVERLAY:"forge-split-view-panel-overlay"},v={ROOT:"root",HANDLE:"handle",ICON:"icon",STATE_LAYER:"state-layer",CONTENT:"content"},pe={ROOT:`#${v.ROOT}`,HANDLE:`#${v.HANDLE}`,ICON:`#${v.ICON}`,STATE_LAYER:`#${v.STATE_LAYER}`,CONTENT:`#${v.CONTENT}`},de={WILL_RESIZE:`${b}-will-resize`,RESIZE_START:`${b}-resize-start`,RESIZE_END:`${b}-resize-end`,RESIZE:`${b}-resize`,DID_OPEN:`${b}-did-open`,DID_CLOSE:`${b}-did-close`,WILL_OPEN:`${b}-will-open`,WILL_CLOSE:`${b}-will-close`},ue={STATE_LAYER_ACTIVATION_WAIT:200},be={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:b,attributes:se,classes:le,ids:v,selectors:pe,events:de,numbers:ue,customCssProperties:be},he=(r=>(r[r.Under=1]="Under",r[r.Active=2]="Active",r[r.Above=3]="Above",r))(he||{});function $(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function F(n,t){let e=n.getContentSize(t.orientation);return c(_({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function G(n){return c(_({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function j(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let r=e.currentSize,o=e.orientation==="horizontal"?t.clientX:t.clientY,a=e.startPoint-o;e.resizable==="start"&&(a*=-1);let u=e.startSize-a;e.currentSize=E(u,e),n.setContentSize(e.currentSize),y(n,e,"pointer"),n.setValuenow(P(e.currentSize,e));let w=u-e.currentSize+a;return te(n,w,e),r!==e.currentSize}function J(n,t,e){if(e.startSize===void 0)return!1;let r=e.currentSize;e.keyboardDelta+=t;let o=e.startSize+e.keyboardDelta;e.currentSize=E(o,e),n.setContentSize(e.currentSize),y(n,e,"keyboard"),n.setValuenow(P(e.currentSize,e));let a=o-e.currentSize+e.keyboardDelta*-1;return te(n,a,e),r!==e.currentSize}function Q(n,t){return n.setContentSize(t.min),t.min}function ee(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),r=h(t.max,e);return n.setContentSize(r),r}function te(n,t,e){if(e.siblingSize!==void 0){let r=e.siblingSize+t;n.setSiblingContentSize(r)}}function E(n,t){return n=Math.max(n,t.min),n=h(n,t.max,t.availableSpace),n}function y(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.animateStateLayer(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let r=h(t.max,t.availableSpace);return t.currentSize>=r?(t.isAtMax||(n.animateStateLayer(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function ie(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let r=h(e.max,e.availableSpace);return t>=r?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function P(n,t){if(!t.availableSpace&&!t.max)return 100;let e=h(t.max,t.availableSpace);return C(n,t.min,e)}function k(n,t){if(n==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function ne(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function me(n){var a,u;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),r=e!=null&&e[1]?+e[1]:-1,o=(u=(a=e==null?void 0:e[2])==null?void 0:a.toLowerCase())!=null?u:"";return{amount:r,unit:o}}function m(n,t){let e=me(n);return e.unit==="%"?q(e.amount,t):e.amount}function re(){let n=document.createElement("div");return n.classList.add(i.classes.OVERLAY),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.zIndex="9999",n}var L=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=$();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}disconnect(){this._adapter.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):O(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){O(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){this._appliedAllowClose&&(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=Q(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=ee(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){J(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,y(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._endResize()}_handlePointermove(t){j(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(i.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=F(this._adapter,this._state),this._adapter.emitHostEvent(i.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(i.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=G(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,r=!1){let o=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,a={auto:e,userInitiated:r};this._adapter.emitHostEvent(o,a,!0,!0)&&(this._open=t,this._applyOpen(a))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let r=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=r,this._applyParentAutoClose();let o=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=o,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(i.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=m(this._size,t);this._adapter.setHostAttribute(i.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let r=this._adapter.getAvailableSpace(this._orientation,this._resizable),o=h(this._pixelMax,r),a=C(e,this._pixelMin,o);this._adapter.setValuenow(a),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(i.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=m(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var r;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(r=this._max)==null?void 0:r.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=m(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(i.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(i.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(i.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!p(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!p(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,p(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!p(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=m(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=E(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(i.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(p(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),p(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),p(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,p(this._autoClose)||this._applyAutoClose()),p(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,p(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let o=this._adapter.getParentSize(this._orientation);this._pixelMin=m(this._min,o),this._pixelMax=p(this._max)?m(this._max,o):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),r=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let o=P(e,c(_({},this._state),{availableSpace:r}));this._adapter.setValuenow(o)}t.cursor&&ie(this._adapter,e,c(_({},this._state),{availableSpace:r}))}};var _e=`${g}split-view`,ce={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},fe={ROOT:"forge-split-view"},oe={ROOT:"root"},ve={ROOT:`#${oe.ROOT}`,PANEL:i.elementName},Se={RESIZE_THROTTLE_THRESHOLD:200},we={ANIMATING_LAYER:"--forge-split-view-animating-layer"},ae={elementName:_e,attributes:ce,classes:fe,ids:oe,selectors:ve,numbers:Se,customCssProperties:we};var x=class extends K{constructor(e){super(e);this._root=f(e,i.selectors.ROOT),this._handle=f(e,i.selectors.HANDLE),this._icon=f(e,i.selectors.ICON),this._stateLayer=f(e,i.selectors.STATE_LAYER),this._content=f(e,i.selectors.CONTENT)}initialize(){let e=this._component.parentElement;(e==null?void 0:e.tagName.toLowerCase())===ae.elementName&&(this._parent=e)}tryRemoveOverlay(){var e;(e=this._overlay)==null||e.remove(),this._overlay=void 0}setPointerdownListener(e){this._handle.addEventListener("pointerdown",e)}setPointerupListener(e){document.addEventListener("pointerup",e)}removePointerupListener(e){document.removeEventListener("pointerup",e)}setPointermoveListener(e){document.addEventListener("pointermove",e)}removePointermoveListener(e){document.removeEventListener("pointermove",e)}setKeydownListener(e){this._handle.addEventListener("keydown",e)}setKeyupListener(e){this._handle.addEventListener("keyup",e)}removeKeyupListener(e){this._handle.removeEventListener("keyup",e)}getParentProperty(e){var r;return(r=this._parent)==null?void 0:r[e]}setAccessibleLabel(e){this._handle.setAttribute("aria-label",e)}setDisabled(e){this._root.classList.toggle(i.classes.DISABLED,e),this._handle&&(this._handle.setAttribute("tabindex",e?"-1":"0"),z(this._handle,e,"aria-disabled","true"))}setResizable(e){this._root.setAttribute(i.attributes.RESIZABLE,e.toString()),z(this._handle,e!=="off","aria-valuemin","0"),z(this._handle,e!=="off","aria-valuemax","100"),e!=="off"&&(this._handle.remove(),e==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(e){this._root.setAttribute(i.attributes.ORIENTATION,e),this._handle.setAttribute("aria-orientation",e==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",ne(e))}setOpen(e,r=!0,o){var u,w;let a=()=>{var T,V;e||this._root.classList.add(i.classes.CLOSED),o&&this.emitHostEvent(e?i.events.DID_OPEN:i.events.DID_CLOSE,o),(T=this._parent)==null||T.unlayerSlottedPanels(),(V=this._parent)==null||V.update({accessibility:!0,cursor:!0})};if(e&&this._root.classList.contains(i.classes.CLOSED)){if(this._root.classList.remove(i.classes.CLOSED),!r){a();return}(u=this._parent)==null||u.layerSlottedPanels(this._component),A(this._root,i.classes.OPENING,!0).then(()=>{a()})}else if(!e&&!this._root.classList.contains(i.classes.CLOSED)){if(!r){a();return}(w=this._parent)==null||w.layerSlottedPanels(this._component),A(this._root,i.classes.CLOSING,!0).then(()=>{a()})}}setGrabbed(e){var r;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),e?(this._overlay||(this._overlay=re()),document.body.append(this._overlay)):(r=this._overlay)==null||r.remove()}setHandleCursor(e,r){e?this._root.style.setProperty(i.customCssProperties.CURSOR,k(e,r)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,r){var o;(o=this._overlay)==null||o.style.setProperty("cursor",k(e,r))}getContentSize(e){return e==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(e){this._component.style.setProperty(i.customCssProperties.SIZE,`${e}px`)}setValuenow(e){this._handle.setAttribute("aria-valuenow",e.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(e,r){if(r==="off")return-1;let o=I(this._component);return o?o.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var r;let e=I(this._component);return(r=e==null?void 0:e.getContentSize())!=null?r:0}setSiblingContentSize(e){let r=I(this._component);r==null||r.setContentSize(e)}animateStateLayer(e){e?window.setTimeout(()=>{this._stateLayer.playAnimation()},i.numbers.STATE_LAYER_ACTIVATION_WAIT):this._stateLayer.playAnimation()}getParentSize(e){var o,a;let r=e==="horizontal"?(o=this._parent)==null?void 0:o.clientWidth:(a=this._parent)==null?void 0:a.clientHeight;return r!=null?r:0}updateParent(e){var r;(r=this._parent)==null||r.update(e)}};var ze='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-state-layer target="handle" id="state-layer" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator inward target="handle" part="focus-indicator"></forge-focus-indicator></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',ge=".forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);position:relative;display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:usq5xpd;animation-name:usq5xpd;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes usq5xpd{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes usq5xpd{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:usq5xq6;animation-name:usq5xq6;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes usq5xq6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes usq5xq6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:usq5xqn;animation-name:usq5xqn;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes usq5xqn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes usq5xqn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:usq5xra;animation-name:usq5xra;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes usq5xra{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes usq5xra{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:usq5xrk;animation-name:usq5xrk;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes usq5xrk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes usq5xrk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:usq5xs7;animation-name:usq5xs7;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes usq5xs7{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes usq5xs7{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:usq5xsx;animation-name:usq5xsx;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes usq5xsx{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes usq5xsx{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:usq5xt0;animation-name:usq5xt0;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes usq5xt0{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes usq5xt0{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}",s=class extends M{constructor(){super();U.define([Z,B]),D(this,ze,ge),this._foundation=new L(new x(this))}static get observedAttributes(){return[i.attributes.RESIZABLE,i.attributes.SIZE,i.attributes.MIN,i.attributes.MAX,i.attributes.ACCESSIBLE_LABEL,i.attributes.OPEN,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,o){switch(e){case i.attributes.RESIZABLE:this.resizable=o;break;case i.attributes.SIZE:this.size=o;break;case i.attributes.MIN:this.min=o;break;case i.attributes.MAX:o?this.max=o:this.max=void 0;break;case i.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=o;break;case i.attributes.OPEN:this.open=S(o);break;case i.attributes.DISABLED:this.hasAttribute(e)?this.disabled=S(o):this.disabled=void 0;break;case i.attributes.ALLOW_CLOSE:this.hasAttribute(e)?this.allowClose=S(o):this.allowClose=void 0;break;case i.attributes.AUTO_CLOSE:this.hasAttribute(e)?this.autoClose=S(o):this.autoClose=void 0;break;case i.attributes.AUTO_CLOSE_THRESHOLD:o?this.autoCloseThreshold=R(o):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._foundation.getContentSize()}getCollapsibleSize(){return this._foundation.getCollapsibleSize()}setContentSize(e){this._foundation.setContentSize(e)}update(e){this._foundation.update(e)}};l([d()],s.prototype,"resizable",2),l([d()],s.prototype,"size",2),l([d()],s.prototype,"min",2),l([d()],s.prototype,"max",2),l([d()],s.prototype,"accessibleLabel",2),l([d()],s.prototype,"open",2),l([d()],s.prototype,"disabled",2),l([d()],s.prototype,"allowClose",2),l([d()],s.prototype,"autoClose",2),l([d()],s.prototype,"autoCloseThreshold",2),s=l([H({name:i.elementName,dependencies:[Y,W,X]})],s);function yt(){N(s)}export{i as a,he as b,$ as c,F as d,G as e,j as f,J as g,Q as h,ee as i,te as j,E as k,y as l,ie as m,P as n,k as o,ne as p,I as q,me as r,m as s,re as t,L as u,ae as v,x as w,s as x,yt as y};
|
|
7
|
+
//# sourceMappingURL=chunk.3II7OT2I.js.map
|