@esri/calcite-components 5.1.0-next.40 → 5.1.0-next.42

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.
Files changed (158) hide show
  1. package/dist/cdn/{4FANAYQE.js → 24VCNUH5.js} +1 -1
  2. package/dist/cdn/{BU5VDSQP.js → 2DH3FWEI.js} +1 -1
  3. package/dist/cdn/{6BOT2RN6.js → 2ICOSO2N.js} +1 -1
  4. package/dist/cdn/{TL2LER4P.js → 2LIAGA6D.js} +1 -1
  5. package/dist/cdn/{U65LWUJT.js → 2SQTFFUH.js} +1 -1
  6. package/dist/cdn/{FJZ7BDLC.js → 2TLYQB3H.js} +1 -1
  7. package/dist/cdn/{CWVS4R4Z.js → 33U2YP4W.js} +1 -1
  8. package/dist/cdn/{JFU4VBGG.js → 36NKWNCT.js} +1 -1
  9. package/dist/cdn/{IZVSR6XT.js → 3F3D4BJ6.js} +1 -1
  10. package/dist/cdn/{ISHWK2D4.js → 3JZWLIUO.js} +1 -1
  11. package/dist/cdn/{WDFABHQO.js → 3LLRSOPX.js} +1 -1
  12. package/dist/cdn/{HAFLZK3H.js → 3RNGMZJL.js} +1 -1
  13. package/dist/cdn/{KXXIFRGT.js → 4J5GPFW4.js} +1 -1
  14. package/dist/cdn/{E4TRET3J.js → 4VA2M4Z6.js} +1 -1
  15. package/dist/cdn/{MMIUGDHC.js → 4XDDF7QJ.js} +1 -1
  16. package/dist/cdn/{QVTSIICY.js → 55SHOESH.js} +1 -1
  17. package/dist/cdn/{4BQKNTG6.js → 5F2MOSTC.js} +1 -1
  18. package/dist/cdn/{NP4XZYHH.js → 5F3HT5EX.js} +1 -1
  19. package/dist/cdn/{XXSWFYQB.js → 5ITO27ET.js} +1 -1
  20. package/dist/cdn/{EU7PE35Y.js → 6BM6TWQ2.js} +1 -1
  21. package/dist/cdn/{YHGIFWX4.js → 6CBC7O2L.js} +1 -1
  22. package/dist/cdn/{ESGEWPZJ.js → 6D52GNCZ.js} +1 -1
  23. package/dist/cdn/{ABK5HS52.js → 6I6KIIFZ.js} +1 -1
  24. package/dist/cdn/{FIPJYD6R.js → 6NMPQ7IK.js} +1 -1
  25. package/dist/cdn/{JRLAOTDU.js → 7ALGUDRK.js} +1 -1
  26. package/dist/cdn/{C3A2E5RX.js → 7BIMPQHS.js} +1 -1
  27. package/dist/cdn/{HAMDM2HW.js → 7N33UB6K.js} +1 -1
  28. package/dist/cdn/{ZPTH57OQ.js → 7PA7GRRE.js} +1 -1
  29. package/dist/cdn/{F2AZESRV.js → 7UIJGCNT.js} +1 -1
  30. package/dist/cdn/{XFBBTAFB.js → 7VQ2OKJE.js} +1 -1
  31. package/dist/cdn/{KNATDYHF.js → AUMIVOTT.js} +1 -1
  32. package/dist/cdn/{DVICI22P.js → AZ6SVWDM.js} +1 -1
  33. package/dist/cdn/{6WVMZURH.js → BEBCUZFX.js} +1 -1
  34. package/dist/cdn/{VDVTNGYM.js → C5YMLOZK.js} +1 -1
  35. package/dist/cdn/{4KMYRWTU.js → CBPLAPZD.js} +1 -1
  36. package/dist/cdn/{4TH5DLDN.js → CF4WXYS6.js} +1 -1
  37. package/dist/cdn/{EWMQCLAJ.js → CLH4YTVT.js} +1 -1
  38. package/dist/cdn/{IOHX3UTV.js → CN4KGWO7.js} +1 -1
  39. package/dist/cdn/{YOAB4Z22.js → CVWXK3WH.js} +1 -1
  40. package/dist/cdn/{6Z4AVLFZ.js → D7AS4CIT.js} +1 -1
  41. package/dist/cdn/{ZV2BUMQX.js → DDCJYR7L.js} +1 -1
  42. package/dist/cdn/{L6PNQBJN.js → DFEKS3S3.js} +1 -1
  43. package/dist/cdn/{M2UD3N2R.js → DLZLKA4T.js} +1 -1
  44. package/dist/cdn/{IVBPPCLT.js → DNJP6SCZ.js} +1 -1
  45. package/dist/cdn/{PCVC2F65.js → DU3DPRSW.js} +1 -1
  46. package/dist/cdn/{NDOJ7DMN.js → DVTWHLVS.js} +1 -1
  47. package/dist/cdn/{2YN42GGZ.js → EJNEFXBB.js} +1 -1
  48. package/dist/cdn/{4DUM6L7R.js → EKZ27R6P.js} +1 -1
  49. package/dist/cdn/{P46CRADL.js → EOILUVEC.js} +1 -1
  50. package/dist/cdn/{YX3WCLZI.js → EQWOSRJS.js} +1 -1
  51. package/dist/cdn/{WZH7XMRX.js → EUJZPMHT.js} +1 -1
  52. package/dist/cdn/{UNC2KJWX.js → F52J6R6Y.js} +1 -1
  53. package/dist/cdn/{N5YXMXKX.js → F74SA3H7.js} +1 -1
  54. package/dist/cdn/{XYC42R3U.js → FBU7VQQU.js} +1 -1
  55. package/dist/cdn/{JMUG7HPC.js → FKAW7VF2.js} +1 -1
  56. package/dist/cdn/{343TIEND.js → FQQVFFDC.js} +1 -1
  57. package/dist/cdn/{ZJFP46OV.js → FRNKX4RT.js} +1 -1
  58. package/dist/cdn/{GM5CRK4E.js → FS3FP3E7.js} +1 -1
  59. package/dist/cdn/{2SHDDQN7.js → G655RHCC.js} +1 -1
  60. package/dist/cdn/{RUIFQJAH.js → GCI4G5CC.js} +1 -1
  61. package/dist/cdn/{KE6N7N7U.js → GDO67NG3.js} +1 -1
  62. package/dist/cdn/{2APTJSPF.js → GPNRDGRG.js} +1 -1
  63. package/dist/cdn/{PLYNERNK.js → HBEKRRFA.js} +1 -1
  64. package/dist/cdn/{762BQO6H.js → HBFFSKHQ.js} +1 -1
  65. package/dist/cdn/{NNUWJV5Y.js → HCTMBHQC.js} +1 -1
  66. package/dist/cdn/{57VOL2FQ.js → HHRSNWVJ.js} +1 -1
  67. package/dist/cdn/{ZCKFY2WU.js → HJEIJ4CJ.js} +1 -1
  68. package/dist/cdn/{EU7A7BOE.js → HKBFAZAP.js} +1 -1
  69. package/dist/cdn/{WQLCQIZA.js → HONIHA7Y.js} +1 -1
  70. package/dist/cdn/HYLBJYLD.js +2 -0
  71. package/dist/cdn/{P3TQR6CW.js → IAIGNDF6.js} +1 -1
  72. package/dist/cdn/{PESN4GNZ.js → IELQCDZV.js} +1 -1
  73. package/dist/cdn/{KL26IYZY.js → IGBSJW7P.js} +1 -1
  74. package/dist/cdn/{5Y6YWMMA.js → IK5QGRIX.js} +1 -1
  75. package/dist/cdn/{RUDSYIF2.js → IROIUJI7.js} +1 -1
  76. package/dist/cdn/{M37TGGY7.js → J2S7JUOG.js} +1 -1
  77. package/dist/cdn/{6AMXTUET.js → JO67U7O6.js} +1 -1
  78. package/dist/cdn/{6YUU4XZI.js → JSY36PGK.js} +1 -1
  79. package/dist/cdn/{ADBOBCIS.js → KGCK5EOF.js} +1 -1
  80. package/dist/cdn/{ZFE7EHX7.js → KOTGZOPG.js} +1 -1
  81. package/dist/cdn/{RPKGQUKY.js → KTF3HRSC.js} +1 -1
  82. package/dist/cdn/{DWBLCWMS.js → KVNPKHJE.js} +1 -1
  83. package/dist/cdn/{SMYYAK7D.js → KWM5PO5E.js} +1 -1
  84. package/dist/cdn/{Q2AAAFVG.js → LLIVQLYI.js} +1 -1
  85. package/dist/cdn/{C5DLWVQD.js → M72OX2NI.js} +1 -1
  86. package/dist/cdn/{F2JKS4U3.js → M77PVNA5.js} +1 -1
  87. package/dist/cdn/{OUQWQCX4.js → MIW54I6U.js} +1 -1
  88. package/dist/cdn/{2J3GTLF3.js → MNWU4JG6.js} +1 -1
  89. package/dist/cdn/{6ILPIFKN.js → MWXXO2IF.js} +1 -1
  90. package/dist/cdn/{OTIHT3RJ.js → NUL2KWCK.js} +1 -1
  91. package/dist/cdn/{UDCTSF3X.js → OBDWNMT4.js} +1 -1
  92. package/dist/cdn/{7Q6P25FS.js → OD2OFTAW.js} +1 -1
  93. package/dist/cdn/{IXJWAGGO.js → ONGJTZME.js} +1 -1
  94. package/dist/cdn/{MQA7BZXA.js → OW4PP6H6.js} +1 -1
  95. package/dist/cdn/{72EGGY2Z.js → OY6ERUHE.js} +1 -1
  96. package/dist/cdn/{LC72CVO3.js → P5BNCDUR.js} +1 -1
  97. package/dist/cdn/{3TSVKHNF.js → PD7IE5T5.js} +1 -1
  98. package/dist/cdn/{V6L5RSXQ.js → PLB3J3MR.js} +1 -1
  99. package/dist/cdn/{MI7RF44J.js → PUEYOG5S.js} +1 -1
  100. package/dist/cdn/{SN2GM7VT.js → Q2QADI72.js} +1 -1
  101. package/dist/cdn/{O5NPN2NC.js → Q75NF4J3.js} +1 -1
  102. package/dist/cdn/{Y43XTIHW.js → QCRJVL4W.js} +1 -1
  103. package/dist/cdn/{CAQ4T2IG.js → QJ2KZL5V.js} +1 -1
  104. package/dist/cdn/{RYDGNOUH.js → RGKZUYDU.js} +1 -1
  105. package/dist/cdn/{U6HSTFHB.js → RNCI46OL.js} +1 -1
  106. package/dist/cdn/{W656KOHA.js → RP767HLZ.js} +1 -1
  107. package/dist/cdn/{S2Y2KBAC.js → S37UIKHR.js} +1 -1
  108. package/dist/cdn/{53IHUARV.js → SAITVIPI.js} +1 -1
  109. package/dist/cdn/{RIOREY3L.js → SWGJ5M7Q.js} +1 -1
  110. package/dist/cdn/{CZ4YVULR.js → SZUV2NPG.js} +1 -1
  111. package/dist/cdn/{WKBFZGMH.js → TC7GHL27.js} +1 -1
  112. package/dist/cdn/{R3SLMPTQ.js → TCECVX5W.js} +1 -1
  113. package/dist/cdn/{QM3SD3PA.js → TNDJCXNK.js} +1 -1
  114. package/dist/cdn/{5L3WL4VL.js → TPRQEKIG.js} +1 -1
  115. package/dist/cdn/{6JYCVM4M.js → UBKHHZJ4.js} +1 -1
  116. package/dist/cdn/{T77GTRQ2.js → UL4OE7TO.js} +1 -1
  117. package/dist/cdn/{TPSHW4M7.js → UTW3AV2W.js} +1 -1
  118. package/dist/cdn/{T67L4AXE.js → UU32DKVL.js} +1 -1
  119. package/dist/cdn/{UNAC5YGP.js → UWHVFXWB.js} +1 -1
  120. package/dist/cdn/{BH4ZCVJG.js → V6MIIYPL.js} +1 -1
  121. package/dist/cdn/{APORZ42E.js → VBECIGU3.js} +1 -1
  122. package/dist/cdn/{SUTEBG6F.js → VCRKEKZN.js} +1 -1
  123. package/dist/cdn/{MIERF3YB.js → VKNBO4H5.js} +1 -1
  124. package/dist/cdn/{W7TMDCFZ.js → VLOGLRQW.js} +1 -1
  125. package/dist/cdn/{3ENB4NB6.js → VO5MQPE6.js} +1 -1
  126. package/dist/cdn/{6DZA2UAF.js → W23ALSYA.js} +1 -1
  127. package/dist/cdn/{T2BDBNM5.js → WAPQVFTP.js} +1 -1
  128. package/dist/cdn/{VYQ37P65.js → WQUJEW2K.js} +1 -1
  129. package/dist/cdn/{MSYHAUDU.js → X5XG2XVZ.js} +1 -1
  130. package/dist/cdn/{V6VAGY4E.js → XA3UTTKM.js} +1 -1
  131. package/dist/cdn/{EP3Q5JF2.js → XF3M5MQV.js} +1 -1
  132. package/dist/cdn/{7QKULUQN.js → XHJ3URCF.js} +1 -1
  133. package/dist/cdn/{SL5CC77J.js → Y2SWMC2J.js} +1 -1
  134. package/dist/cdn/{IFZOUQOZ.js → Y74NH24P.js} +1 -1
  135. package/dist/cdn/{XU3JRXS5.js → YLSKIDPZ.js} +1 -1
  136. package/dist/cdn/{5NPVZG4Z.js → YRKWU5DH.js} +1 -1
  137. package/dist/cdn/{LELN5JPY.js → YT7UFIFK.js} +1 -1
  138. package/dist/cdn/{JSRN4WS4.js → YVTCTKMY.js} +1 -1
  139. package/dist/cdn/{K4CFRJTI.js → ZG55RM66.js} +1 -1
  140. package/dist/cdn/{L5HIKEWU.js → ZGMNMVE6.js} +1 -1
  141. package/dist/cdn/{VWTVHOIX.js → ZIPC4VCA.js} +1 -1
  142. package/dist/cdn/{BYU6QMLQ.js → ZQL5B4WP.js} +1 -1
  143. package/dist/cdn/{25HY22XA.js → ZX3OFVBE.js} +1 -1
  144. package/dist/cdn/index.js +2 -2
  145. package/dist/cdn/main.css +1 -1
  146. package/dist/chunks/runtime.js +4 -4
  147. package/dist/chunks/useFormTrigger.js +6 -6
  148. package/dist/components/calcite-card/customElement.d.ts +7 -1
  149. package/dist/docs/api.json +1 -1
  150. package/dist/docs/docs.json +1 -1
  151. package/dist/docs/vscode.html-custom-data.json +1 -1
  152. package/dist/docs/web-types.json +1 -1
  153. package/dist/types/lumina.d.ts +1 -1
  154. package/dist/types/preact.d.ts +1 -1
  155. package/dist/types/react.d.ts +1 -1
  156. package/dist/types/stencil.d.ts +1 -1
  157. package/package.json +6 -6
  158. package/dist/cdn/ENOS3GFQ.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as y}from"./YHGIFWX4.js";import{a as x}from"./ZJFP46OV.js";import{a as v}from"./57VOL2FQ.js";import{a as g}from"./Y43XTIHW.js";import"./RH6ZIP65.js";import"./3TSVKHNF.js";import"./GM5CRK4E.js";import"./TL2LER4P.js";import"./OAOQ5BXS.js";import{E as u,F as b,G as p,H as f,S as m,g as d,h,l as s,p as l}from"./5L3WL4VL.js";var S={handle:"handle",handleSelected:"handle--selected"},k={drag:"drag"},i={itemLabel:"{itemLabel}",position:"{position}",total:"{total}"},C=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.handle{display:flex;align-items:center;justify-content:center;align-self:stretch;border-style:none;outline-color:transparent;color:var(--calcite-handle-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-handle-background-color, transparent);padding-block:.75rem;padding-inline:.25rem;line-height:0}.handle calcite-icon{color:inherit}:host(:not([disabled])) .handle{cursor:move}:host(:not([disabled])) .handle:hover{color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-hover, var(--calcite-color-foreground-2))}:host(:not([disabled])) .handle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1))}:host(:not([disabled])) .handle--selected{color:var(--calcite-handle-icon-color-selected, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-selected, var(--calcite-color-foreground-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends p{constructor(){super(...arguments),this.handleButtonRef=u(),this.messages=v({blocking:!0}),this.focusSetter=g()(this),this.interactiveContainer=y(this),this.blurUnselectDisabled=!1,this.disabled=!1,this.selected=!1,this.calciteHandleChange=l({cancelable:!1}),this.calciteHandleNudge=l({cancelable:!1}),this.calciteInternalAssistiveTextChange=l({cancelable:!1})}static{this.properties={blurUnselectDisabled:[5,{},{type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],selected:[7,{},{reflect:!0,type:Boolean}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}]}}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>this.handleButtonRef.value,e)}willUpdate(e){(e.has("messages")||e.has("label")||e.has("selected")&&(this.hasUpdated||this.selected!==!1)||e.has("setPosition")||e.has("setSize"))&&this.handleAriaTextChange()}loaded(){x.deprecated("component",{component:this,name:"handle",removalVersion:5,suggested:"sort-handle"})}handleAriaTextChange(){let e=this.getAriaText("live");e&&this.calciteInternalAssistiveTextChange.emit({message:e})}getTooltip(){let{label:e,messages:t}=this;return t?e?t.dragHandle.replace(i.itemLabel,e):t.dragHandleUntitled:""}getAriaText(e){let{setPosition:t,setSize:r,label:c,messages:a,selected:n}=this;return!a||!c||typeof r!="number"||typeof t!="number"?null:(e==="label"?n?a.dragHandleChange:a.dragHandleIdle:n?a.dragHandleActive:a.dragHandleCommit).replace(i.position,t.toString()).replace(i.itemLabel,c).replace(i.total,r.toString())}handleKeyDown(e){if(!this.disabled)switch(e.key){case" ":this.selected=!this.selected,this.calciteHandleChange.emit(),e.preventDefault();break;case"ArrowUp":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"up"});break;case"ArrowDown":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"down"});break}}handleBlur(){this.blurUnselectDisabled||this.disabled||this.selected&&(this.selected=!1,this.calciteHandleChange.emit())}render(){return this.interactiveContainer({disabled:this.disabled,children:h`<span .ariaChecked=${this.disabled?null:this.selected} .ariaDisabled=${this.disabled?this.disabled:null} .ariaLabel=${this.disabled?null:this.getAriaText("label")} class=${f({[S.handle]:!0,[S.handleSelected]:!this.disabled&&this.selected})} @blur=${this.handleBlur} @keydown=${this.handleKeyDown} role=radio tabindex=${(this.disabled?null:0)??s} title=${this.getTooltip()??s} ${b(this.handleButtonRef)}><calcite-icon .icon=${k.drag} scale=s></calcite-icon></span>`})}};m("calcite-handle",o);export{o as Handle};
2
+ import{a as y}from"./6CBC7O2L.js";import{a as x}from"./FRNKX4RT.js";import{a as v}from"./HHRSNWVJ.js";import{a as g}from"./QCRJVL4W.js";import"./RH6ZIP65.js";import"./PD7IE5T5.js";import"./FS3FP3E7.js";import"./2LIAGA6D.js";import"./OAOQ5BXS.js";import{E as u,F as b,G as p,H as f,S as m,g as d,h,l as s,p as l}from"./TPRQEKIG.js";var S={handle:"handle",handleSelected:"handle--selected"},k={drag:"drag"},i={itemLabel:"{itemLabel}",position:"{position}",total:"{total}"},C=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.handle{display:flex;align-items:center;justify-content:center;align-self:stretch;border-style:none;outline-color:transparent;color:var(--calcite-handle-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-handle-background-color, transparent);padding-block:.75rem;padding-inline:.25rem;line-height:0}.handle calcite-icon{color:inherit}:host(:not([disabled])) .handle{cursor:move}:host(:not([disabled])) .handle:hover{color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-hover, var(--calcite-color-foreground-2))}:host(:not([disabled])) .handle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1))}:host(:not([disabled])) .handle--selected{color:var(--calcite-handle-icon-color-selected, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-selected, var(--calcite-color-foreground-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends p{constructor(){super(...arguments),this.handleButtonRef=u(),this.messages=v({blocking:!0}),this.focusSetter=g()(this),this.interactiveContainer=y(this),this.blurUnselectDisabled=!1,this.disabled=!1,this.selected=!1,this.calciteHandleChange=l({cancelable:!1}),this.calciteHandleNudge=l({cancelable:!1}),this.calciteInternalAssistiveTextChange=l({cancelable:!1})}static{this.properties={blurUnselectDisabled:[5,{},{type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],selected:[7,{},{reflect:!0,type:Boolean}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}]}}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>this.handleButtonRef.value,e)}willUpdate(e){(e.has("messages")||e.has("label")||e.has("selected")&&(this.hasUpdated||this.selected!==!1)||e.has("setPosition")||e.has("setSize"))&&this.handleAriaTextChange()}loaded(){x.deprecated("component",{component:this,name:"handle",removalVersion:5,suggested:"sort-handle"})}handleAriaTextChange(){let e=this.getAriaText("live");e&&this.calciteInternalAssistiveTextChange.emit({message:e})}getTooltip(){let{label:e,messages:t}=this;return t?e?t.dragHandle.replace(i.itemLabel,e):t.dragHandleUntitled:""}getAriaText(e){let{setPosition:t,setSize:r,label:c,messages:a,selected:n}=this;return!a||!c||typeof r!="number"||typeof t!="number"?null:(e==="label"?n?a.dragHandleChange:a.dragHandleIdle:n?a.dragHandleActive:a.dragHandleCommit).replace(i.position,t.toString()).replace(i.itemLabel,c).replace(i.total,r.toString())}handleKeyDown(e){if(!this.disabled)switch(e.key){case" ":this.selected=!this.selected,this.calciteHandleChange.emit(),e.preventDefault();break;case"ArrowUp":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"up"});break;case"ArrowDown":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"down"});break}}handleBlur(){this.blurUnselectDisabled||this.disabled||this.selected&&(this.selected=!1,this.calciteHandleChange.emit())}render(){return this.interactiveContainer({disabled:this.disabled,children:h`<span .ariaChecked=${this.disabled?null:this.selected} .ariaDisabled=${this.disabled?this.disabled:null} .ariaLabel=${this.disabled?null:this.getAriaText("label")} class=${f({[S.handle]:!0,[S.handleSelected]:!this.disabled&&this.selected})} @blur=${this.handleBlur} @keydown=${this.handleKeyDown} role=radio tabindex=${(this.disabled?null:0)??s} title=${this.getTooltip()??s} ${b(this.handleButtonRef)}><calcite-icon .icon=${k.drag} scale=s></calcite-icon></span>`})}};m("calcite-handle",o);export{o as Handle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as fe}from"./3TSVKHNF.js";function ce(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,o)}return e}function L(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ce(Object(e),!0).forEach(function(o){Xe(n,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ce(Object(e)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))})}return n}function Mt(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mt=function(t){return typeof t}:Mt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(n)}function Xe(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function $(){return $=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},$.apply(this,arguments)}function Ye(n,t){if(n==null)return{};var e={},o=Object.keys(n),i,r;for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&(e[i]=n[i]);return e}function Ge(n,t){if(n==null)return{};var e=Ye(n,t),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(e[o]=n[o])}return e}var Be="1.15.6";function U(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var q=U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Tt=U(/Edge/i),de=U(/firefox/i),Et=U(/safari/i)&&!U(/chrome/i)&&!U(/android/i),ie=U(/iP(ad|od|hone)/i),ye=U(/chrome/i)&&U(/android/i),Ee={capture:!1,passive:!1};function v(n,t,e){n.addEventListener(t,e,!q&&Ee)}function m(n,t,e){n.removeEventListener(t,e,!q&&Ee)}function Yt(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function De(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function H(n,t,e,o){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Yt(n,t):Yt(n,t))||o&&n===e)return n;if(n===e)break}while(n=De(n))}return null}var he=/\s+/g;function R(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var o=(" "+n.className+" ").replace(he," ").replace(" "+t+" "," ");n.className=(o+(e?" "+t:"")).replace(he," ")}}function h(n,t,e){var o=n&&n.style;if(o){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=e+(typeof e=="string"?"":"px")}}function ct(n,t){var e="";if(typeof n=="string")e=n;else do{var o=h(n,"transform");o&&o!=="none"&&(e=o+" "+e)}while(!t&&(n=n.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(e)}function Se(n,t,e){if(n){var o=n.getElementsByTagName(t),i=0,r=o.length;if(e)for(;i<r;i++)e(o[i],i);return o}return[]}function K(){var n=document.scrollingElement;return n||document.documentElement}function T(n,t,e,o,i){if(!(!n.getBoundingClientRect&&n!==window)){var r,a,l,s,u,d,c;if(n!==window&&n.parentNode&&n!==K()?(r=n.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,u=r.right,d=r.height,c=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,d=window.innerHeight,c=window.innerWidth),(t||e)&&n!==window&&(i=i||n.parentNode,!q))do if(i&&i.getBoundingClientRect&&(h(i,"transform")!=="none"||e&&h(i,"position")!=="static")){var b=i.getBoundingClientRect();a-=b.top+parseInt(h(i,"border-top-width")),l-=b.left+parseInt(h(i,"border-left-width")),s=a+r.height,u=l+r.width;break}while(i=i.parentNode);if(o&&n!==window){var E=ct(i||n),w=E&&E.a,y=E&&E.d;E&&(a/=y,l/=w,c/=w,d/=y,s=a+d,u=l+c)}return{top:a,left:l,bottom:s,right:u,width:c,height:d}}}function pe(n,t,e){for(var o=tt(n,!0),i=T(n)[t];o;){var r=T(o)[e],a=void 0;if(e==="top"||e==="left"?a=i>=r:a=i<=r,!a)return o;if(o===K())break;o=tt(o,!1)}return!1}function dt(n,t,e,o){for(var i=0,r=0,a=n.children;r<a.length;){if(a[r].style.display!=="none"&&a[r]!==p.ghost&&(o||a[r]!==p.dragged)&&H(a[r],e.draggable,n,!1)){if(i===t)return a[r];i++}r++}return null}function re(n,t){for(var e=n.lastElementChild;e&&(e===p.ghost||h(e,"display")==="none"||t&&!Yt(e,t));)e=e.previousElementSibling;return e||null}function X(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==p.clone&&(!t||Yt(n,t))&&e++;return e}function ge(n){var t=0,e=0,o=K();if(n)do{var i=ct(n),r=i.a,a=i.d;t+=n.scrollLeft*r,e+=n.scrollTop*a}while(n!==o&&(n=n.parentNode));return[t,e]}function He(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var o in t)if(t.hasOwnProperty(o)&&t[o]===n[e][o])return Number(e)}return-1}function tt(n,t){if(!n||!n.getBoundingClientRect)return K();var e=n,o=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var i=h(e);if(e.clientWidth<e.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return K();if(o||t)return e;o=!0}}while(e=e.parentNode);return K()}function We(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function jt(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var Dt;function _e(n,t){return function(){if(!Dt){var e=arguments,o=this;e.length===1?n.call(o,e[0]):n.apply(o,e),Dt=setTimeout(function(){Dt=void 0},t)}}}function Ke(){clearTimeout(Dt),Dt=void 0}function Ce(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function Te(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}function Oe(n,t,e){var o={};return Array.from(n.children).forEach(function(i){var r,a,l,s;if(!(!H(i,t.draggable,n,!1)||i.animated||i===e)){var u=T(i);o.left=Math.min((r=o.left)!==null&&r!==void 0?r:1/0,u.left),o.top=Math.min((a=o.top)!==null&&a!==void 0?a:1/0,u.top),o.right=Math.max((l=o.right)!==null&&l!==void 0?l:-1/0,u.right),o.bottom=Math.max((s=o.bottom)!==null&&s!==void 0?s:-1/0,u.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var P="Sortable"+new Date().getTime();function Le(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(h(i,"display")==="none"||i===p.ghost)){n.push({target:i,rect:T(i)});var r=L({},n[n.length-1].rect);if(i.thisAnimationDuration){var a=ct(i,!0);a&&(r.top-=a.f,r.left-=a.e)}i.fromRect=r}})}},addAnimationState:function(o){n.push(o)},removeAnimationState:function(o){n.splice(He(n,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(t),typeof o=="function"&&o();return}var r=!1,a=0;n.forEach(function(l){var s=0,u=l.target,d=u.fromRect,c=T(u),b=u.prevFromRect,E=u.prevToRect,w=l.rect,y=ct(u,!0);y&&(c.top-=y.f,c.left-=y.e),u.toRect=c,u.thisAnimationDuration&&jt(b,c)&&!jt(d,c)&&(w.top-c.top)/(w.left-c.left)===(d.top-c.top)/(d.left-c.left)&&(s=ze(w,b,E,i.options)),jt(c,d)||(u.prevFromRect=d,u.prevToRect=c,s||(s=i.options.animation),i.animate(u,w,c,s)),s&&(r=!0,a=Math.max(a,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(t),r?t=setTimeout(function(){typeof o=="function"&&o()},a):typeof o=="function"&&o(),n=[]},animate:function(o,i,r,a){if(a){h(o,"transition",""),h(o,"transform","");var l=ct(this.el),s=l&&l.a,u=l&&l.d,d=(i.left-r.left)/(s||1),c=(i.top-r.top)/(u||1);o.animatingX=!!d,o.animatingY=!!c,h(o,"transform","translate3d("+d+"px,"+c+"px,0)"),this.forRepaintDummy=je(o),h(o,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),h(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){h(o,"transition",""),h(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},a)}}}}function je(n){return n.offsetWidth}function ze(n,t,e,o){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*o.animation}var lt=[],zt={initializeByDefault:!0},Ot={mount:function(t){for(var e in zt)zt.hasOwnProperty(e)&&!(e in t)&&(t[e]=zt[e]);lt.forEach(function(o){if(o.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),lt.push(t)},pluginEvent:function(t,e,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";lt.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][r]&&e[a.pluginName][r](L({sortable:e},o)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](L({sortable:e},o)))})},initializePlugins:function(t,e,o,i){lt.forEach(function(l){var s=l.pluginName;if(!(!t.options[s]&&!l.initializeByDefault)){var u=new l(t,e,t.options);u.sortable=t,u.options=t.options,t[s]=u,$(o,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);typeof a<"u"&&(t.options[r]=a)}},getEventProperties:function(t,e){var o={};return lt.forEach(function(i){typeof i.eventProperties=="function"&&$(o,i.eventProperties.call(e[i.pluginName],t))}),o},modifyOption:function(t,e,o){var i;return lt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(i=r.optionListeners[e].call(t[r.pluginName],o))}),i}};function Ue(n){var t=n.sortable,e=n.rootEl,o=n.name,i=n.targetEl,r=n.cloneEl,a=n.toEl,l=n.fromEl,s=n.oldIndex,u=n.newIndex,d=n.oldDraggableIndex,c=n.newDraggableIndex,b=n.originalEvent,E=n.putSortable,w=n.extraEventProperties;if(t=t||e&&e[P],!!t){var y,Y=t.options,j="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!q&&!Tt?y=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(o,!0,!0)),y.to=a||e,y.from=l||e,y.item=i||e,y.clone=r,y.oldIndex=s,y.newIndex=u,y.oldDraggableIndex=d,y.newDraggableIndex=c,y.originalEvent=b,y.pullMode=E?E.lastPutMode:void 0;var I=L(L({},w),Ot.getEventProperties(o,t));for(var G in I)y[G]=I[G];e&&e.dispatchEvent(y),Y[j]&&Y[j].call(t,y)}}var $e=["evt"],N=function(t,e){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=Ge(o,$e);Ot.pluginEvent.bind(p)(t,e,L({dragEl:f,parentEl:_,ghostEl:g,rootEl:D,nextEl:at,lastDownEl:Ft,cloneEl:S,cloneHidden:J,dragStarted:bt,putSortable:O,activeSortable:p.active,originalEvent:i,oldIndex:ft,oldDraggableIndex:St,newIndex:k,newDraggableIndex:Q,hideGhostForTarget:Ne,unhideGhostForTarget:Pe,cloneNowHidden:function(){J=!0},cloneNowShown:function(){J=!1},dispatchSortableEvent:function(l){x({sortable:e,name:l,originalEvent:i})}},r))};function x(n){Ue(L({putSortable:O,cloneEl:S,targetEl:f,rootEl:D,oldIndex:ft,oldDraggableIndex:St,newIndex:k,newDraggableIndex:Q},n))}var f,_,g,D,at,Ft,S,J,ft,k,St,Q,It,O,ut=!1,Gt=!1,Bt=[],it,B,Ut,$t,me,ve,bt,st,_t,Ct=!1,xt=!1,Rt,A,qt=[],te=!1,Ht=[],Kt=typeof document<"u",Nt=ie,be=Tt||q?"cssFloat":"float",qe=Kt&&!ye&&!ie&&"draggable"in document.createElement("div"),Ae=(function(){if(Kt){if(q)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}})(),Ie=function(t,e){var o=h(t),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=dt(t,0,e),a=dt(t,1,e),l=r&&h(r),s=a&&h(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(r).width,d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===c)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&o[be]==="none"||a&&o[be]==="none"&&u+d>i)?"vertical":"horizontal"},Ve=function(t,e,o){var i=o?t.left:t.top,r=o?t.right:t.bottom,a=o?t.width:t.height,l=o?e.left:e.top,s=o?e.right:e.bottom,u=o?e.width:e.height;return i===l||r===s||i+a/2===l+u/2},Ze=function(t,e){var o;return Bt.some(function(i){var r=i[P].options.emptyInsertThreshold;if(!(!r||re(i))){var a=T(i),l=t>=a.left-r&&t<=a.right+r,s=e>=a.top-r&&e<=a.bottom+r;if(l&&s)return o=i}}),o},xe=function(t){function e(r,a){return function(l,s,u,d){var c=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||c))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return e(r(l,s,u,d),a)(l,s,u,d);var b=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===b||r.join&&r.indexOf(b)>-1}}var o={},i=t.group;(!i||Mt(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Ne=function(){!Ae&&g&&h(g,"display","none")},Pe=function(){!Ae&&g&&h(g,"display","")};Kt&&!ye&&document.addEventListener("click",function(n){if(Gt)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Gt=!1,!1},!0);var rt=function(t){if(f){t=t.touches?t.touches[0]:t;var e=Ze(t.clientX,t.clientY);if(e){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[P]._onDragOver(o)}}},Qe=function(t){f&&f.parentNode[P]._isOutsideThisEl(t.target)};function p(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=$({},t),n[P]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ie(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:p.supportPointer!==!1&&"PointerEvent"in window&&(!Et||ie),emptyInsertThreshold:5};Ot.initializePlugins(this,n,e);for(var o in e)!(o in t)&&(t[o]=e[o]);xe(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:qe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(n,"pointerdown",this._onTapStart):(v(n,"mousedown",this._onTapStart),v(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(n,"dragover",this),v(n,"dragenter",this)),Bt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),$(this,Le())}p.prototype={constructor:p,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(st=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,f):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,o=this.el,i=this.options,r=i.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,d=i.filter;if(ln(o),!f&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Et&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=H(s,i.draggable,o,!1),!(s&&s.animated)&&Ft!==s)){if(ft=X(s),St=X(s,i.draggable),typeof d=="function"){if(d.call(this,t,s,this)){x({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:o,fromEl:o}),N("filter",e,{evt:t}),r&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(c){if(c=H(u,c.trim(),o,!1),c)return x({sortable:e,rootEl:c,name:"filter",targetEl:s,fromEl:o,toEl:o}),N("filter",e,{evt:t}),!0}),d)){r&&t.preventDefault();return}i.handle&&!H(u,i.handle,o,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,e,o){var i=this,r=i.el,a=i.options,l=r.ownerDocument,s;if(o&&!f&&o.parentNode===r){var u=T(o);if(D=r,f=o,_=f.parentNode,at=f.nextSibling,Ft=o,It=a.group,p.dragged=f,it={target:f,clientX:(e||t).clientX,clientY:(e||t).clientY},me=it.clientX-u.left,ve=it.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,f.style["will-change"]="all",s=function(){if(N("delayEnded",i,{evt:t}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!de&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(t,e),x({sortable:i,name:"choose",originalEvent:t}),R(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){Se(f,d.trim(),Vt)}),v(l,"dragover",rt),v(l,"mousemove",rt),v(l,"touchmove",rt),a.supportPointer?(v(l,"pointerup",i._onDrop),!this.nativeDraggable&&v(l,"pointercancel",i._onDrop)):(v(l,"mouseup",i._onDrop),v(l,"touchend",i._onDrop),v(l,"touchcancel",i._onDrop)),de&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),N("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Tt||q))){if(p.eventCanceled){this._onDrop();return}a.supportPointer?(v(l,"pointerup",i._disableDelayedDrag),v(l,"pointercancel",i._disableDelayedDrag)):(v(l,"mouseup",i._disableDelayedDrag),v(l,"touchend",i._disableDelayedDrag),v(l,"touchcancel",i._disableDelayedDrag)),v(l,"mousemove",i._delayedDragTouchMoveHandler),v(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&Vt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"pointerup",this._disableDelayedDrag),m(t,"pointercancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):e?v(document,"touchmove",this._onTouchMove):v(document,"mousemove",this._onTouchMove):(v(f,"dragend",this),v(D,"dragstart",this._onDragStart));try{document.selection?kt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(ut=!1,D&&f){N("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Qe);var o=this.options;!t&&R(f,o.dragClass,!1),R(f,o.ghostClass,!0),p.active=this,t&&this._appendGhost(),x({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(B){this._lastX=B.clientX,this._lastY=B.clientY,Ne();for(var t=document.elementFromPoint(B.clientX,B.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(B.clientX,B.clientY),t!==e);)e=t;if(f.parentNode[P]._isOutsideThisEl(t),e)do{if(e[P]){var o=void 0;if(o=e[P]._onDragOver({clientX:B.clientX,clientY:B.clientY,target:t,rootEl:e}),o&&!this.options.dragoverBubble)break}t=e}while(e=De(e));Pe()}},_onTouchMove:function(t){if(it){var e=this.options,o=e.fallbackTolerance,i=e.fallbackOffset,r=t.touches?t.touches[0]:t,a=g&&ct(g,!0),l=g&&a&&a.a,s=g&&a&&a.d,u=Nt&&A&&ge(A),d=(r.clientX-it.clientX+i.x)/(l||1)+(u?u[0]-qt[0]:0)/(l||1),c=(r.clientY-it.clientY+i.y)/(s||1)+(u?u[1]-qt[1]:0)/(s||1);if(!p.active&&!ut){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(g){a?(a.e+=d-(Ut||0),a.f+=c-($t||0)):a={a:1,b:0,c:0,d:1,e:d,f:c};var b="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");h(g,"webkitTransform",b),h(g,"mozTransform",b),h(g,"msTransform",b),h(g,"transform",b),Ut=d,$t=c,B=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!g){var t=this.options.fallbackOnBody?document.body:D,e=T(f,!0,Nt,!0,t),o=this.options;if(Nt){for(A=t;h(A,"position")==="static"&&h(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=K()),e.top+=A.scrollTop,e.left+=A.scrollLeft):A=K(),qt=ge(A)}g=f.cloneNode(!0),R(g,o.ghostClass,!1),R(g,o.fallbackClass,!0),R(g,o.dragClass,!0),h(g,"transition",""),h(g,"transform",""),h(g,"box-sizing","border-box"),h(g,"margin",0),h(g,"top",e.top),h(g,"left",e.left),h(g,"width",e.width),h(g,"height",e.height),h(g,"opacity","0.8"),h(g,"position",Nt?"absolute":"fixed"),h(g,"zIndex","100000"),h(g,"pointerEvents","none"),p.ghost=g,t.appendChild(g),h(g,"transform-origin",me/parseInt(g.style.width)*100+"% "+ve/parseInt(g.style.height)*100+"%")}},_onDragStart:function(t,e){var o=this,i=t.dataTransfer,r=o.options;if(N("dragStart",this,{evt:t}),p.eventCanceled){this._onDrop();return}N("setupClone",this),p.eventCanceled||(S=Te(f),S.removeAttribute("id"),S.draggable=!1,S.style["will-change"]="",this._hideClone(),R(S,this.options.chosenClass,!1),p.clone=S),o.cloneId=kt(function(){N("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||D.insertBefore(S,f),o._hideClone(),x({sortable:o,name:"clone"}))}),!e&&R(f,r.dragClass,!0),e?(Gt=!0,o._loopId=setInterval(o._emulateDragOver,50)):(m(document,"mouseup",o._onDrop),m(document,"touchend",o._onDrop),m(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(o,i,f)),v(document,"drop",o),h(f,"transform","translateZ(0)")),ut=!0,o._dragStartId=kt(o._dragStarted.bind(o,e,t)),v(document,"selectstart",o),bt=!0,window.getSelection().removeAllRanges(),Et&&h(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,o=t.target,i,r,a,l=this.options,s=l.group,u=p.active,d=It===s,c=l.sort,b=O||u,E,w=this,y=!1;if(te)return;function Y(vt,Re){N(vt,w,L({evt:t,isOwner:d,axis:E?"vertical":"horizontal",revert:a,dragRect:i,targetRect:r,canSort:c,fromSortable:b,target:o,completed:I,onMove:function(ue,ke){return Pt(D,e,f,i,ue,T(ue),t,ke)},changed:G},Re))}function j(){Y("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function I(vt){return Y("dragOverCompleted",{insertion:vt}),vt&&(d?u._hideClone():u._showClone(w),w!==b&&(R(f,O?O.options.ghostClass:u.options.ghostClass,!1),R(f,l.ghostClass,!0)),O!==w&&w!==p.active?O=w:w===p.active&&O&&(O=null),b===w&&(w._ignoreWhileAnimating=o),w.animateAll(function(){Y("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(o===f&&!f.animated||o===e&&!o.animated)&&(st=null),!l.dragoverBubble&&!t.rootEl&&o!==document&&(f.parentNode[P]._isOutsideThisEl(t.target),!vt&&rt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function G(){k=X(f),Q=X(f,l.draggable),x({sortable:w,name:"change",toEl:e,newIndex:k,newDraggableIndex:Q,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),o=H(o,l.draggable,e,!0),Y("dragOver"),p.eventCanceled)return y;if(f.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||w._ignoreWhileAnimating===o)return I(!1);if(Gt=!1,u&&!l.disabled&&(d?c||(a=_!==D):O===this||(this.lastPutMode=It.checkPull(this,u,f,t))&&s.checkPut(this,u,f,t))){if(E=this._getDirection(t,o)==="vertical",i=T(f),Y("dragOverValid"),p.eventCanceled)return y;if(a)return _=D,j(),this._hideClone(),Y("revert"),p.eventCanceled||(at?D.insertBefore(f,at):D.appendChild(f)),I(!0);var M=re(e,l.draggable);if(!M||nn(t,E,this)&&!M.animated){if(M===f)return I(!1);if(M&&e===t.target&&(o=M),o&&(r=T(o)),Pt(D,e,f,i,o,r,t,!!o)!==!1)return j(),M&&M.nextSibling?e.insertBefore(f,M.nextSibling):e.appendChild(f),_=e,G(),I(!0)}else if(M&&en(t,E,this)){var et=dt(e,0,l,!0);if(et===f)return I(!1);if(o=et,r=T(o),Pt(D,e,f,i,o,r,t,!1)!==!1)return j(),e.insertBefore(f,et),_=e,G(),I(!0)}else if(o.parentNode===e){r=T(o);var W=0,nt,ht=f.parentNode!==e,F=!Ve(f.animated&&f.toRect||i,o.animated&&o.toRect||r,E),pt=E?"top":"left",V=pe(o,"top","top")||pe(f,"top","top"),gt=V?V.scrollTop:void 0;st!==o&&(nt=r[pt],Ct=!1,xt=!F&&l.invertSwap||ht),W=on(t,o,r,E,F?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,xt,st===o);var z;if(W!==0){var ot=X(f);do ot-=W,z=_.children[ot];while(z&&(h(z,"display")==="none"||z===g))}if(W===0||z===o)return I(!1);st=o,_t=W;var mt=o.nextElementSibling,Z=!1;Z=W===1;var At=Pt(D,e,f,i,o,r,t,Z);if(At!==!1)return(At===1||At===-1)&&(Z=At===1),te=!0,setTimeout(tn,30),j(),Z&&!mt?e.appendChild(f):o.parentNode.insertBefore(f,Z?mt:o),V&&Ce(V,0,gt-V.scrollTop),_=f.parentNode,nt!==void 0&&!xt&&(Rt=Math.abs(nt-T(o)[pt])),G(),I(!0)}if(e.contains(f))return I(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",rt),m(document,"mousemove",rt),m(document,"touchmove",rt)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"pointercancel",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var e=this.el,o=this.options;if(k=X(f),Q=X(f,o.draggable),N("drop",this,{evt:t}),_=f&&f.parentNode,k=X(f),Q=X(f,o.draggable),p.eventCanceled){this._nulling();return}ut=!1,xt=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ee(this.cloneId),ee(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Et&&h(document.body,"user-select",""),h(f,"transform",""),t&&(bt&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),g&&g.parentNode&&g.parentNode.removeChild(g),(D===_||O&&O.lastPutMode!=="clone")&&S&&S.parentNode&&S.parentNode.removeChild(S),f&&(this.nativeDraggable&&m(f,"dragend",this),Vt(f),f.style["will-change"]="",bt&&!ut&&R(f,O?O.options.ghostClass:this.options.ghostClass,!1),R(f,this.options.chosenClass,!1),x({sortable:this,name:"unchoose",toEl:_,newIndex:null,newDraggableIndex:null,originalEvent:t}),D!==_?(k>=0&&(x({rootEl:_,name:"add",toEl:_,fromEl:D,originalEvent:t}),x({sortable:this,name:"remove",toEl:_,originalEvent:t}),x({rootEl:_,name:"sort",toEl:_,fromEl:D,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),O&&O.save()):k!==ft&&k>=0&&(x({sortable:this,name:"update",toEl:_,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),p.active&&((k==null||k===-1)&&(k=ft,Q=St),x({sortable:this,name:"end",toEl:_,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),D=f=_=g=at=S=Ft=J=it=B=bt=k=Q=ft=St=st=_t=O=It=p.dragged=p.ghost=p.clone=p.active=null,Ht.forEach(function(t){t.checked=!0}),Ht.length=Ut=$t=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":f&&(this._onDragOver(t),Je(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,o=this.el.children,i=0,r=o.length,a=this.options;i<r;i++)e=o[i],H(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||an(e));return t},sort:function(t,e){var o={},i=this.el;this.toArray().forEach(function(r,a){var l=i.children[a];H(l,this.options.draggable,i,!1)&&(o[r]=l)},this),e&&this.captureAnimationState(),t.forEach(function(r){o[r]&&(i.removeChild(o[r]),i.appendChild(o[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return H(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var o=this.options;if(e===void 0)return o[t];var i=Ot.modifyOption(this,t,e);typeof i<"u"?o[t]=i:o[t]=e,t==="group"&&xe(o)},destroy:function(){N("destroy",this);var t=this.el;t[P]=null,m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart),m(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Bt.splice(Bt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!J){if(N("hideClone",this),p.eventCanceled)return;h(S,"display","none"),this.options.removeCloneOnHide&&S.parentNode&&S.parentNode.removeChild(S),J=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(J){if(N("showClone",this),p.eventCanceled)return;f.parentNode==D&&!this.options.group.revertClone?D.insertBefore(S,f):at?D.insertBefore(S,at):D.appendChild(S),this.options.group.revertClone&&this.animate(f,S),h(S,"display",""),J=!1}}};function Je(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Pt(n,t,e,o,i,r,a,l){var s,u=n[P],d=u.options.onMove,c;return window.CustomEvent&&!q&&!Tt?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=n,s.dragged=e,s.draggedRect=o,s.related=i||t,s.relatedRect=r||T(t),s.willInsertAfter=l,s.originalEvent=a,n.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function Vt(n){n.draggable=!1}function tn(){te=!1}function en(n,t,e){var o=T(dt(e.el,0,e.options,!0)),i=Oe(e.el,e.options,g),r=10;return t?n.clientX<i.left-r||n.clientY<o.top&&n.clientX<o.right:n.clientY<i.top-r||n.clientY<o.bottom&&n.clientX<o.left}function nn(n,t,e){var o=T(re(e.el,e.options.draggable)),i=Oe(e.el,e.options,g),r=10;return t?n.clientX>i.right+r||n.clientY>o.bottom&&n.clientX>o.left:n.clientY>i.bottom+r||n.clientX>o.right&&n.clientY>o.top}function on(n,t,e,o,i,r,a,l){var s=o?n.clientY:n.clientX,u=o?e.height:e.width,d=o?e.top:e.left,c=o?e.bottom:e.right,b=!1;if(!a){if(l&&Rt<u*i){if(!Ct&&(_t===1?s>d+u*r/2:s<c-u*r/2)&&(Ct=!0),Ct)b=!0;else if(_t===1?s<d+Rt:s>c-Rt)return-_t}else if(s>d+u*(1-i)/2&&s<c-u*(1-i)/2)return rn(t)}return b=b||a,b&&(s<d+u*r/2||s>c-u*r/2)?s>d+u/2?1:-1:0}function rn(n){return X(f)<X(n)?1:-1}function an(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,o=0;e--;)o+=t.charCodeAt(e);return o.toString(36)}function ln(n){Ht.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var o=t[e];o.checked&&Ht.push(o)}}function kt(n){return setTimeout(n,0)}function ee(n){return clearTimeout(n)}Kt&&v(document,"touchmove",function(n){(p.active||ut)&&n.cancelable&&n.preventDefault()});p.utils={on:v,off:m,css:h,find:Se,is:function(t,e){return!!H(t,e,t,!1)},extend:We,throttle:_e,closest:H,toggleClass:R,clone:Te,index:X,nextTick:kt,cancelNextTick:ee,detectDirection:Ie,getChild:dt,expando:P};p.get=function(n){return n[P]};p.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(p.utils=L(L({},p.utils),o.utils)),Ot.mount(o)})};p.create=function(n,t){return new p(n,t)};p.version=Be;var C=[],wt,ne,oe=!1,Zt,Qt,Wt,yt;function sn(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(e){var o=e.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):o.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var o=e.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),we(),Xt(),Ke()},nulling:function(){Wt=ne=wt=oe=yt=Zt=Qt=null,C.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,o){var i=this,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(r,a);if(Wt=e,o||this.options.forceAutoScrollFallback||Tt||q||Et){Jt(e,this.options,l,o);var s=tt(l,!0);oe&&(!yt||r!==Zt||a!==Qt)&&(yt&&we(),yt=setInterval(function(){var u=tt(document.elementFromPoint(r,a),!0);u!==s&&(s=u,Xt()),Jt(e,i.options,u,o)},10),Zt=r,Qt=a)}else{if(!this.options.bubbleScroll||tt(l,!0)===K()){Xt();return}Jt(e,this.options,tt(l,!1),!1)}}},$(n,{pluginName:"scroll",initializeByDefault:!0})}function Xt(){C.forEach(function(n){clearInterval(n.pid)}),C=[]}function we(){clearInterval(yt)}var Jt=_e(function(n,t,e,o){if(t.scroll){var i=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,s=K(),u=!1,d;ne!==e&&(ne=e,Xt(),wt=t.scroll,d=t.scrollFn,wt===!0&&(wt=tt(e,!0)));var c=0,b=wt;do{var E=b,w=T(E),y=w.top,Y=w.bottom,j=w.left,I=w.right,G=w.width,M=w.height,et=void 0,W=void 0,nt=E.scrollWidth,ht=E.scrollHeight,F=h(E),pt=E.scrollLeft,V=E.scrollTop;E===s?(et=G<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"||F.overflowX==="visible"),W=M<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"||F.overflowY==="visible")):(et=G<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"),W=M<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"));var gt=et&&(Math.abs(I-i)<=a&&pt+G<nt)-(Math.abs(j-i)<=a&&!!pt),z=W&&(Math.abs(Y-r)<=a&&V+M<ht)-(Math.abs(y-r)<=a&&!!V);if(!C[c])for(var ot=0;ot<=c;ot++)C[ot]||(C[ot]={});(C[c].vx!=gt||C[c].vy!=z||C[c].el!==E)&&(C[c].el=E,C[c].vx=gt,C[c].vy=z,clearInterval(C[c].pid),(gt!=0||z!=0)&&(u=!0,C[c].pid=setInterval(function(){o&&this.layer===0&&p.active._onTouchMove(Wt);var mt=C[this.layer].vy?C[this.layer].vy*l:0,Z=C[this.layer].vx?C[this.layer].vx*l:0;typeof d=="function"&&d.call(p.dragged.parentNode[P],Z,mt,n,Wt,C[this.layer].el)!=="continue"||Ce(C[this.layer].el,Z,mt)}.bind({layer:c}),24))),c++}while(t.bubbleScroll&&b!==s&&(b=tt(b,!1)));oe=u}},30),Me=function(t){var e=t.originalEvent,o=t.putSortable,i=t.dragEl,r=t.activeSortable,a=t.dispatchSortableEvent,l=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var u=o||r;l();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(d.clientX,d.clientY);s(),u&&!u.el.contains(c)&&(a("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function ae(){}ae.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=dt(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(e,i):this.sortable.el.appendChild(e),this.sortable.animateAll(),o&&o.animateAll()},drop:Me};$(ae,{pluginName:"revertOnSpill"});function le(){}le.prototype={onSpill:function(t){var e=t.dragEl,o=t.putSortable,i=o||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:Me};$(le,{pluginName:"removeOnSpill"});p.mount(new sn);p.mount(le,ae);var Fe=p;var Lt=new Set,un={ghostClass:"calcite-sortable--ghost",chosenClass:"calcite-sortable--chosen",dragClass:"calcite-sortable--drag",fallbackClass:"calcite-sortable--fallback"};function fn(){Array.from(Lt).forEach(n=>n.onGlobalDragStart())}function cn(){Array.from(Lt).forEach(n=>n.onGlobalDragEnd())}var se={active:!1};function dn(n){let{el:e,group:o,handleSelector:i,dragSelector:r,sortDisabled:a}=n;return Fe.create(e,{dataIdAttr:"id",swapThreshold:.5,...un,...!!r&&{draggable:r},...!!o&&{sort:!a,group:{name:o,...!!n.canPull&&{pull:(l,s,u,{newDraggableIndex:d,oldDraggableIndex:c})=>n.canPull({toEl:l.el,fromEl:s.el,dragEl:u,newIndex:d,oldIndex:c})},...!!n.canPut&&{put:(l,s,u,{newDraggableIndex:d,oldDraggableIndex:c})=>n.canPut({toEl:l.el,fromEl:s.el,dragEl:u,newIndex:d,oldIndex:c})}}},onMove:({from:l,dragged:s,to:u,related:d})=>{n.onDragMove&&n.onDragMove({fromEl:l,dragEl:s,toEl:u,relatedEl:d})},handle:i,filter:`${i}[disabled]`,onStart:({from:l,item:s,to:u,newDraggableIndex:d,oldDraggableIndex:c})=>{se.active=!0,fn(),n.onDragStart({fromEl:l,dragEl:s,toEl:u,newIndex:d,oldIndex:c})},onEnd:({from:l,item:s,to:u,newDraggableIndex:d,oldDraggableIndex:c})=>{se.active=!1,cn(),n.onDragEnd({fromEl:l,dragEl:s,toEl:u,newIndex:d,oldIndex:c})},onSort:({from:l,item:s,to:u,newDraggableIndex:d,oldDraggableIndex:c})=>{n.onDragSort({fromEl:l,dragEl:s,toEl:u,newIndex:d,oldIndex:c})}})}var vn=()=>fe((n,t)=>{let e;function o(a){return a.dragEnabled&&se.active}function i(a){o(a)||(r(a),a.dragEnabled&&(Lt.add(a),e=dn(a)))}function r(a){o(a)||(Lt.delete(a),e?.destroy(),e=void 0)}return t.onConnected(()=>{i(n)}),t.onDisconnected(()=>{r(n)}),{reset:()=>{i(n)}}});export{vn as a};
2
+ import{b as fe}from"./PD7IE5T5.js";function ce(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,o)}return e}function L(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ce(Object(e),!0).forEach(function(o){Xe(n,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ce(Object(e)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))})}return n}function Mt(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mt=function(t){return typeof t}:Mt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(n)}function Xe(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function $(){return $=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},$.apply(this,arguments)}function Ye(n,t){if(n==null)return{};var e={},o=Object.keys(n),i,r;for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&(e[i]=n[i]);return e}function Ge(n,t){if(n==null)return{};var e=Ye(n,t),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(e[o]=n[o])}return e}var Be="1.15.6";function U(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var q=U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Tt=U(/Edge/i),de=U(/firefox/i),Et=U(/safari/i)&&!U(/chrome/i)&&!U(/android/i),ie=U(/iP(ad|od|hone)/i),ye=U(/chrome/i)&&U(/android/i),Ee={capture:!1,passive:!1};function v(n,t,e){n.addEventListener(t,e,!q&&Ee)}function m(n,t,e){n.removeEventListener(t,e,!q&&Ee)}function Yt(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function De(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function H(n,t,e,o){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Yt(n,t):Yt(n,t))||o&&n===e)return n;if(n===e)break}while(n=De(n))}return null}var he=/\s+/g;function R(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var o=(" "+n.className+" ").replace(he," ").replace(" "+t+" "," ");n.className=(o+(e?" "+t:"")).replace(he," ")}}function h(n,t,e){var o=n&&n.style;if(o){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=e+(typeof e=="string"?"":"px")}}function ct(n,t){var e="";if(typeof n=="string")e=n;else do{var o=h(n,"transform");o&&o!=="none"&&(e=o+" "+e)}while(!t&&(n=n.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(e)}function Se(n,t,e){if(n){var o=n.getElementsByTagName(t),i=0,r=o.length;if(e)for(;i<r;i++)e(o[i],i);return o}return[]}function K(){var n=document.scrollingElement;return n||document.documentElement}function T(n,t,e,o,i){if(!(!n.getBoundingClientRect&&n!==window)){var r,a,l,s,u,d,c;if(n!==window&&n.parentNode&&n!==K()?(r=n.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,u=r.right,d=r.height,c=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,d=window.innerHeight,c=window.innerWidth),(t||e)&&n!==window&&(i=i||n.parentNode,!q))do if(i&&i.getBoundingClientRect&&(h(i,"transform")!=="none"||e&&h(i,"position")!=="static")){var b=i.getBoundingClientRect();a-=b.top+parseInt(h(i,"border-top-width")),l-=b.left+parseInt(h(i,"border-left-width")),s=a+r.height,u=l+r.width;break}while(i=i.parentNode);if(o&&n!==window){var E=ct(i||n),w=E&&E.a,y=E&&E.d;E&&(a/=y,l/=w,c/=w,d/=y,s=a+d,u=l+c)}return{top:a,left:l,bottom:s,right:u,width:c,height:d}}}function pe(n,t,e){for(var o=tt(n,!0),i=T(n)[t];o;){var r=T(o)[e],a=void 0;if(e==="top"||e==="left"?a=i>=r:a=i<=r,!a)return o;if(o===K())break;o=tt(o,!1)}return!1}function dt(n,t,e,o){for(var i=0,r=0,a=n.children;r<a.length;){if(a[r].style.display!=="none"&&a[r]!==p.ghost&&(o||a[r]!==p.dragged)&&H(a[r],e.draggable,n,!1)){if(i===t)return a[r];i++}r++}return null}function re(n,t){for(var e=n.lastElementChild;e&&(e===p.ghost||h(e,"display")==="none"||t&&!Yt(e,t));)e=e.previousElementSibling;return e||null}function X(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==p.clone&&(!t||Yt(n,t))&&e++;return e}function ge(n){var t=0,e=0,o=K();if(n)do{var i=ct(n),r=i.a,a=i.d;t+=n.scrollLeft*r,e+=n.scrollTop*a}while(n!==o&&(n=n.parentNode));return[t,e]}function He(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var o in t)if(t.hasOwnProperty(o)&&t[o]===n[e][o])return Number(e)}return-1}function tt(n,t){if(!n||!n.getBoundingClientRect)return K();var e=n,o=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var i=h(e);if(e.clientWidth<e.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return K();if(o||t)return e;o=!0}}while(e=e.parentNode);return K()}function We(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function jt(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var Dt;function _e(n,t){return function(){if(!Dt){var e=arguments,o=this;e.length===1?n.call(o,e[0]):n.apply(o,e),Dt=setTimeout(function(){Dt=void 0},t)}}}function Ke(){clearTimeout(Dt),Dt=void 0}function Ce(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function Te(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}function Oe(n,t,e){var o={};return Array.from(n.children).forEach(function(i){var r,a,l,s;if(!(!H(i,t.draggable,n,!1)||i.animated||i===e)){var u=T(i);o.left=Math.min((r=o.left)!==null&&r!==void 0?r:1/0,u.left),o.top=Math.min((a=o.top)!==null&&a!==void 0?a:1/0,u.top),o.right=Math.max((l=o.right)!==null&&l!==void 0?l:-1/0,u.right),o.bottom=Math.max((s=o.bottom)!==null&&s!==void 0?s:-1/0,u.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var P="Sortable"+new Date().getTime();function Le(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(h(i,"display")==="none"||i===p.ghost)){n.push({target:i,rect:T(i)});var r=L({},n[n.length-1].rect);if(i.thisAnimationDuration){var a=ct(i,!0);a&&(r.top-=a.f,r.left-=a.e)}i.fromRect=r}})}},addAnimationState:function(o){n.push(o)},removeAnimationState:function(o){n.splice(He(n,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(t),typeof o=="function"&&o();return}var r=!1,a=0;n.forEach(function(l){var s=0,u=l.target,d=u.fromRect,c=T(u),b=u.prevFromRect,E=u.prevToRect,w=l.rect,y=ct(u,!0);y&&(c.top-=y.f,c.left-=y.e),u.toRect=c,u.thisAnimationDuration&&jt(b,c)&&!jt(d,c)&&(w.top-c.top)/(w.left-c.left)===(d.top-c.top)/(d.left-c.left)&&(s=ze(w,b,E,i.options)),jt(c,d)||(u.prevFromRect=d,u.prevToRect=c,s||(s=i.options.animation),i.animate(u,w,c,s)),s&&(r=!0,a=Math.max(a,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(t),r?t=setTimeout(function(){typeof o=="function"&&o()},a):typeof o=="function"&&o(),n=[]},animate:function(o,i,r,a){if(a){h(o,"transition",""),h(o,"transform","");var l=ct(this.el),s=l&&l.a,u=l&&l.d,d=(i.left-r.left)/(s||1),c=(i.top-r.top)/(u||1);o.animatingX=!!d,o.animatingY=!!c,h(o,"transform","translate3d("+d+"px,"+c+"px,0)"),this.forRepaintDummy=je(o),h(o,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),h(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){h(o,"transition",""),h(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},a)}}}}function je(n){return n.offsetWidth}function ze(n,t,e,o){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*o.animation}var lt=[],zt={initializeByDefault:!0},Ot={mount:function(t){for(var e in zt)zt.hasOwnProperty(e)&&!(e in t)&&(t[e]=zt[e]);lt.forEach(function(o){if(o.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),lt.push(t)},pluginEvent:function(t,e,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";lt.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][r]&&e[a.pluginName][r](L({sortable:e},o)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](L({sortable:e},o)))})},initializePlugins:function(t,e,o,i){lt.forEach(function(l){var s=l.pluginName;if(!(!t.options[s]&&!l.initializeByDefault)){var u=new l(t,e,t.options);u.sortable=t,u.options=t.options,t[s]=u,$(o,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);typeof a<"u"&&(t.options[r]=a)}},getEventProperties:function(t,e){var o={};return lt.forEach(function(i){typeof i.eventProperties=="function"&&$(o,i.eventProperties.call(e[i.pluginName],t))}),o},modifyOption:function(t,e,o){var i;return lt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(i=r.optionListeners[e].call(t[r.pluginName],o))}),i}};function Ue(n){var t=n.sortable,e=n.rootEl,o=n.name,i=n.targetEl,r=n.cloneEl,a=n.toEl,l=n.fromEl,s=n.oldIndex,u=n.newIndex,d=n.oldDraggableIndex,c=n.newDraggableIndex,b=n.originalEvent,E=n.putSortable,w=n.extraEventProperties;if(t=t||e&&e[P],!!t){var y,Y=t.options,j="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!q&&!Tt?y=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(o,!0,!0)),y.to=a||e,y.from=l||e,y.item=i||e,y.clone=r,y.oldIndex=s,y.newIndex=u,y.oldDraggableIndex=d,y.newDraggableIndex=c,y.originalEvent=b,y.pullMode=E?E.lastPutMode:void 0;var I=L(L({},w),Ot.getEventProperties(o,t));for(var G in I)y[G]=I[G];e&&e.dispatchEvent(y),Y[j]&&Y[j].call(t,y)}}var $e=["evt"],N=function(t,e){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=Ge(o,$e);Ot.pluginEvent.bind(p)(t,e,L({dragEl:f,parentEl:_,ghostEl:g,rootEl:D,nextEl:at,lastDownEl:Ft,cloneEl:S,cloneHidden:J,dragStarted:bt,putSortable:O,activeSortable:p.active,originalEvent:i,oldIndex:ft,oldDraggableIndex:St,newIndex:k,newDraggableIndex:Q,hideGhostForTarget:Ne,unhideGhostForTarget:Pe,cloneNowHidden:function(){J=!0},cloneNowShown:function(){J=!1},dispatchSortableEvent:function(l){x({sortable:e,name:l,originalEvent:i})}},r))};function x(n){Ue(L({putSortable:O,cloneEl:S,targetEl:f,rootEl:D,oldIndex:ft,oldDraggableIndex:St,newIndex:k,newDraggableIndex:Q},n))}var f,_,g,D,at,Ft,S,J,ft,k,St,Q,It,O,ut=!1,Gt=!1,Bt=[],it,B,Ut,$t,me,ve,bt,st,_t,Ct=!1,xt=!1,Rt,A,qt=[],te=!1,Ht=[],Kt=typeof document<"u",Nt=ie,be=Tt||q?"cssFloat":"float",qe=Kt&&!ye&&!ie&&"draggable"in document.createElement("div"),Ae=(function(){if(Kt){if(q)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}})(),Ie=function(t,e){var o=h(t),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=dt(t,0,e),a=dt(t,1,e),l=r&&h(r),s=a&&h(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(r).width,d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===c)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&o[be]==="none"||a&&o[be]==="none"&&u+d>i)?"vertical":"horizontal"},Ve=function(t,e,o){var i=o?t.left:t.top,r=o?t.right:t.bottom,a=o?t.width:t.height,l=o?e.left:e.top,s=o?e.right:e.bottom,u=o?e.width:e.height;return i===l||r===s||i+a/2===l+u/2},Ze=function(t,e){var o;return Bt.some(function(i){var r=i[P].options.emptyInsertThreshold;if(!(!r||re(i))){var a=T(i),l=t>=a.left-r&&t<=a.right+r,s=e>=a.top-r&&e<=a.bottom+r;if(l&&s)return o=i}}),o},xe=function(t){function e(r,a){return function(l,s,u,d){var c=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||c))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return e(r(l,s,u,d),a)(l,s,u,d);var b=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===b||r.join&&r.indexOf(b)>-1}}var o={},i=t.group;(!i||Mt(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Ne=function(){!Ae&&g&&h(g,"display","none")},Pe=function(){!Ae&&g&&h(g,"display","")};Kt&&!ye&&document.addEventListener("click",function(n){if(Gt)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Gt=!1,!1},!0);var rt=function(t){if(f){t=t.touches?t.touches[0]:t;var e=Ze(t.clientX,t.clientY);if(e){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[P]._onDragOver(o)}}},Qe=function(t){f&&f.parentNode[P]._isOutsideThisEl(t.target)};function p(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=$({},t),n[P]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ie(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:p.supportPointer!==!1&&"PointerEvent"in window&&(!Et||ie),emptyInsertThreshold:5};Ot.initializePlugins(this,n,e);for(var o in e)!(o in t)&&(t[o]=e[o]);xe(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:qe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(n,"pointerdown",this._onTapStart):(v(n,"mousedown",this._onTapStart),v(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(n,"dragover",this),v(n,"dragenter",this)),Bt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),$(this,Le())}p.prototype={constructor:p,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(st=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,f):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,o=this.el,i=this.options,r=i.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,d=i.filter;if(ln(o),!f&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Et&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=H(s,i.draggable,o,!1),!(s&&s.animated)&&Ft!==s)){if(ft=X(s),St=X(s,i.draggable),typeof d=="function"){if(d.call(this,t,s,this)){x({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:o,fromEl:o}),N("filter",e,{evt:t}),r&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(c){if(c=H(u,c.trim(),o,!1),c)return x({sortable:e,rootEl:c,name:"filter",targetEl:s,fromEl:o,toEl:o}),N("filter",e,{evt:t}),!0}),d)){r&&t.preventDefault();return}i.handle&&!H(u,i.handle,o,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,e,o){var i=this,r=i.el,a=i.options,l=r.ownerDocument,s;if(o&&!f&&o.parentNode===r){var u=T(o);if(D=r,f=o,_=f.parentNode,at=f.nextSibling,Ft=o,It=a.group,p.dragged=f,it={target:f,clientX:(e||t).clientX,clientY:(e||t).clientY},me=it.clientX-u.left,ve=it.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,f.style["will-change"]="all",s=function(){if(N("delayEnded",i,{evt:t}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!de&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(t,e),x({sortable:i,name:"choose",originalEvent:t}),R(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){Se(f,d.trim(),Vt)}),v(l,"dragover",rt),v(l,"mousemove",rt),v(l,"touchmove",rt),a.supportPointer?(v(l,"pointerup",i._onDrop),!this.nativeDraggable&&v(l,"pointercancel",i._onDrop)):(v(l,"mouseup",i._onDrop),v(l,"touchend",i._onDrop),v(l,"touchcancel",i._onDrop)),de&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),N("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Tt||q))){if(p.eventCanceled){this._onDrop();return}a.supportPointer?(v(l,"pointerup",i._disableDelayedDrag),v(l,"pointercancel",i._disableDelayedDrag)):(v(l,"mouseup",i._disableDelayedDrag),v(l,"touchend",i._disableDelayedDrag),v(l,"touchcancel",i._disableDelayedDrag)),v(l,"mousemove",i._delayedDragTouchMoveHandler),v(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&Vt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"pointerup",this._disableDelayedDrag),m(t,"pointercancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):e?v(document,"touchmove",this._onTouchMove):v(document,"mousemove",this._onTouchMove):(v(f,"dragend",this),v(D,"dragstart",this._onDragStart));try{document.selection?kt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(ut=!1,D&&f){N("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Qe);var o=this.options;!t&&R(f,o.dragClass,!1),R(f,o.ghostClass,!0),p.active=this,t&&this._appendGhost(),x({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(B){this._lastX=B.clientX,this._lastY=B.clientY,Ne();for(var t=document.elementFromPoint(B.clientX,B.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(B.clientX,B.clientY),t!==e);)e=t;if(f.parentNode[P]._isOutsideThisEl(t),e)do{if(e[P]){var o=void 0;if(o=e[P]._onDragOver({clientX:B.clientX,clientY:B.clientY,target:t,rootEl:e}),o&&!this.options.dragoverBubble)break}t=e}while(e=De(e));Pe()}},_onTouchMove:function(t){if(it){var e=this.options,o=e.fallbackTolerance,i=e.fallbackOffset,r=t.touches?t.touches[0]:t,a=g&&ct(g,!0),l=g&&a&&a.a,s=g&&a&&a.d,u=Nt&&A&&ge(A),d=(r.clientX-it.clientX+i.x)/(l||1)+(u?u[0]-qt[0]:0)/(l||1),c=(r.clientY-it.clientY+i.y)/(s||1)+(u?u[1]-qt[1]:0)/(s||1);if(!p.active&&!ut){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(g){a?(a.e+=d-(Ut||0),a.f+=c-($t||0)):a={a:1,b:0,c:0,d:1,e:d,f:c};var b="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");h(g,"webkitTransform",b),h(g,"mozTransform",b),h(g,"msTransform",b),h(g,"transform",b),Ut=d,$t=c,B=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!g){var t=this.options.fallbackOnBody?document.body:D,e=T(f,!0,Nt,!0,t),o=this.options;if(Nt){for(A=t;h(A,"position")==="static"&&h(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=K()),e.top+=A.scrollTop,e.left+=A.scrollLeft):A=K(),qt=ge(A)}g=f.cloneNode(!0),R(g,o.ghostClass,!1),R(g,o.fallbackClass,!0),R(g,o.dragClass,!0),h(g,"transition",""),h(g,"transform",""),h(g,"box-sizing","border-box"),h(g,"margin",0),h(g,"top",e.top),h(g,"left",e.left),h(g,"width",e.width),h(g,"height",e.height),h(g,"opacity","0.8"),h(g,"position",Nt?"absolute":"fixed"),h(g,"zIndex","100000"),h(g,"pointerEvents","none"),p.ghost=g,t.appendChild(g),h(g,"transform-origin",me/parseInt(g.style.width)*100+"% "+ve/parseInt(g.style.height)*100+"%")}},_onDragStart:function(t,e){var o=this,i=t.dataTransfer,r=o.options;if(N("dragStart",this,{evt:t}),p.eventCanceled){this._onDrop();return}N("setupClone",this),p.eventCanceled||(S=Te(f),S.removeAttribute("id"),S.draggable=!1,S.style["will-change"]="",this._hideClone(),R(S,this.options.chosenClass,!1),p.clone=S),o.cloneId=kt(function(){N("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||D.insertBefore(S,f),o._hideClone(),x({sortable:o,name:"clone"}))}),!e&&R(f,r.dragClass,!0),e?(Gt=!0,o._loopId=setInterval(o._emulateDragOver,50)):(m(document,"mouseup",o._onDrop),m(document,"touchend",o._onDrop),m(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(o,i,f)),v(document,"drop",o),h(f,"transform","translateZ(0)")),ut=!0,o._dragStartId=kt(o._dragStarted.bind(o,e,t)),v(document,"selectstart",o),bt=!0,window.getSelection().removeAllRanges(),Et&&h(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,o=t.target,i,r,a,l=this.options,s=l.group,u=p.active,d=It===s,c=l.sort,b=O||u,E,w=this,y=!1;if(te)return;function Y(vt,Re){N(vt,w,L({evt:t,isOwner:d,axis:E?"vertical":"horizontal",revert:a,dragRect:i,targetRect:r,canSort:c,fromSortable:b,target:o,completed:I,onMove:function(ue,ke){return Pt(D,e,f,i,ue,T(ue),t,ke)},changed:G},Re))}function j(){Y("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function I(vt){return Y("dragOverCompleted",{insertion:vt}),vt&&(d?u._hideClone():u._showClone(w),w!==b&&(R(f,O?O.options.ghostClass:u.options.ghostClass,!1),R(f,l.ghostClass,!0)),O!==w&&w!==p.active?O=w:w===p.active&&O&&(O=null),b===w&&(w._ignoreWhileAnimating=o),w.animateAll(function(){Y("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(o===f&&!f.animated||o===e&&!o.animated)&&(st=null),!l.dragoverBubble&&!t.rootEl&&o!==document&&(f.parentNode[P]._isOutsideThisEl(t.target),!vt&&rt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function G(){k=X(f),Q=X(f,l.draggable),x({sortable:w,name:"change",toEl:e,newIndex:k,newDraggableIndex:Q,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),o=H(o,l.draggable,e,!0),Y("dragOver"),p.eventCanceled)return y;if(f.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||w._ignoreWhileAnimating===o)return I(!1);if(Gt=!1,u&&!l.disabled&&(d?c||(a=_!==D):O===this||(this.lastPutMode=It.checkPull(this,u,f,t))&&s.checkPut(this,u,f,t))){if(E=this._getDirection(t,o)==="vertical",i=T(f),Y("dragOverValid"),p.eventCanceled)return y;if(a)return _=D,j(),this._hideClone(),Y("revert"),p.eventCanceled||(at?D.insertBefore(f,at):D.appendChild(f)),I(!0);var M=re(e,l.draggable);if(!M||nn(t,E,this)&&!M.animated){if(M===f)return I(!1);if(M&&e===t.target&&(o=M),o&&(r=T(o)),Pt(D,e,f,i,o,r,t,!!o)!==!1)return j(),M&&M.nextSibling?e.insertBefore(f,M.nextSibling):e.appendChild(f),_=e,G(),I(!0)}else if(M&&en(t,E,this)){var et=dt(e,0,l,!0);if(et===f)return I(!1);if(o=et,r=T(o),Pt(D,e,f,i,o,r,t,!1)!==!1)return j(),e.insertBefore(f,et),_=e,G(),I(!0)}else if(o.parentNode===e){r=T(o);var W=0,nt,ht=f.parentNode!==e,F=!Ve(f.animated&&f.toRect||i,o.animated&&o.toRect||r,E),pt=E?"top":"left",V=pe(o,"top","top")||pe(f,"top","top"),gt=V?V.scrollTop:void 0;st!==o&&(nt=r[pt],Ct=!1,xt=!F&&l.invertSwap||ht),W=on(t,o,r,E,F?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,xt,st===o);var z;if(W!==0){var ot=X(f);do ot-=W,z=_.children[ot];while(z&&(h(z,"display")==="none"||z===g))}if(W===0||z===o)return I(!1);st=o,_t=W;var mt=o.nextElementSibling,Z=!1;Z=W===1;var At=Pt(D,e,f,i,o,r,t,Z);if(At!==!1)return(At===1||At===-1)&&(Z=At===1),te=!0,setTimeout(tn,30),j(),Z&&!mt?e.appendChild(f):o.parentNode.insertBefore(f,Z?mt:o),V&&Ce(V,0,gt-V.scrollTop),_=f.parentNode,nt!==void 0&&!xt&&(Rt=Math.abs(nt-T(o)[pt])),G(),I(!0)}if(e.contains(f))return I(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",rt),m(document,"mousemove",rt),m(document,"touchmove",rt)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"pointercancel",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var e=this.el,o=this.options;if(k=X(f),Q=X(f,o.draggable),N("drop",this,{evt:t}),_=f&&f.parentNode,k=X(f),Q=X(f,o.draggable),p.eventCanceled){this._nulling();return}ut=!1,xt=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ee(this.cloneId),ee(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Et&&h(document.body,"user-select",""),h(f,"transform",""),t&&(bt&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),g&&g.parentNode&&g.parentNode.removeChild(g),(D===_||O&&O.lastPutMode!=="clone")&&S&&S.parentNode&&S.parentNode.removeChild(S),f&&(this.nativeDraggable&&m(f,"dragend",this),Vt(f),f.style["will-change"]="",bt&&!ut&&R(f,O?O.options.ghostClass:this.options.ghostClass,!1),R(f,this.options.chosenClass,!1),x({sortable:this,name:"unchoose",toEl:_,newIndex:null,newDraggableIndex:null,originalEvent:t}),D!==_?(k>=0&&(x({rootEl:_,name:"add",toEl:_,fromEl:D,originalEvent:t}),x({sortable:this,name:"remove",toEl:_,originalEvent:t}),x({rootEl:_,name:"sort",toEl:_,fromEl:D,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),O&&O.save()):k!==ft&&k>=0&&(x({sortable:this,name:"update",toEl:_,originalEvent:t}),x({sortable:this,name:"sort",toEl:_,originalEvent:t})),p.active&&((k==null||k===-1)&&(k=ft,Q=St),x({sortable:this,name:"end",toEl:_,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),D=f=_=g=at=S=Ft=J=it=B=bt=k=Q=ft=St=st=_t=O=It=p.dragged=p.ghost=p.clone=p.active=null,Ht.forEach(function(t){t.checked=!0}),Ht.length=Ut=$t=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":f&&(this._onDragOver(t),Je(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,o=this.el.children,i=0,r=o.length,a=this.options;i<r;i++)e=o[i],H(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||an(e));return t},sort:function(t,e){var o={},i=this.el;this.toArray().forEach(function(r,a){var l=i.children[a];H(l,this.options.draggable,i,!1)&&(o[r]=l)},this),e&&this.captureAnimationState(),t.forEach(function(r){o[r]&&(i.removeChild(o[r]),i.appendChild(o[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return H(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var o=this.options;if(e===void 0)return o[t];var i=Ot.modifyOption(this,t,e);typeof i<"u"?o[t]=i:o[t]=e,t==="group"&&xe(o)},destroy:function(){N("destroy",this);var t=this.el;t[P]=null,m(t,"mousedown",this._onTapStart),m(t,"touchstart",this._onTapStart),m(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(t,"dragover",this),m(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Bt.splice(Bt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!J){if(N("hideClone",this),p.eventCanceled)return;h(S,"display","none"),this.options.removeCloneOnHide&&S.parentNode&&S.parentNode.removeChild(S),J=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(J){if(N("showClone",this),p.eventCanceled)return;f.parentNode==D&&!this.options.group.revertClone?D.insertBefore(S,f):at?D.insertBefore(S,at):D.appendChild(S),this.options.group.revertClone&&this.animate(f,S),h(S,"display",""),J=!1}}};function Je(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Pt(n,t,e,o,i,r,a,l){var s,u=n[P],d=u.options.onMove,c;return window.CustomEvent&&!q&&!Tt?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=n,s.dragged=e,s.draggedRect=o,s.related=i||t,s.relatedRect=r||T(t),s.willInsertAfter=l,s.originalEvent=a,n.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function Vt(n){n.draggable=!1}function tn(){te=!1}function en(n,t,e){var o=T(dt(e.el,0,e.options,!0)),i=Oe(e.el,e.options,g),r=10;return t?n.clientX<i.left-r||n.clientY<o.top&&n.clientX<o.right:n.clientY<i.top-r||n.clientY<o.bottom&&n.clientX<o.left}function nn(n,t,e){var o=T(re(e.el,e.options.draggable)),i=Oe(e.el,e.options,g),r=10;return t?n.clientX>i.right+r||n.clientY>o.bottom&&n.clientX>o.left:n.clientY>i.bottom+r||n.clientX>o.right&&n.clientY>o.top}function on(n,t,e,o,i,r,a,l){var s=o?n.clientY:n.clientX,u=o?e.height:e.width,d=o?e.top:e.left,c=o?e.bottom:e.right,b=!1;if(!a){if(l&&Rt<u*i){if(!Ct&&(_t===1?s>d+u*r/2:s<c-u*r/2)&&(Ct=!0),Ct)b=!0;else if(_t===1?s<d+Rt:s>c-Rt)return-_t}else if(s>d+u*(1-i)/2&&s<c-u*(1-i)/2)return rn(t)}return b=b||a,b&&(s<d+u*r/2||s>c-u*r/2)?s>d+u/2?1:-1:0}function rn(n){return X(f)<X(n)?1:-1}function an(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,o=0;e--;)o+=t.charCodeAt(e);return o.toString(36)}function ln(n){Ht.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var o=t[e];o.checked&&Ht.push(o)}}function kt(n){return setTimeout(n,0)}function ee(n){return clearTimeout(n)}Kt&&v(document,"touchmove",function(n){(p.active||ut)&&n.cancelable&&n.preventDefault()});p.utils={on:v,off:m,css:h,find:Se,is:function(t,e){return!!H(t,e,t,!1)},extend:We,throttle:_e,closest:H,toggleClass:R,clone:Te,index:X,nextTick:kt,cancelNextTick:ee,detectDirection:Ie,getChild:dt,expando:P};p.get=function(n){return n[P]};p.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(p.utils=L(L({},p.utils),o.utils)),Ot.mount(o)})};p.create=function(n,t){return new p(n,t)};p.version=Be;var C=[],wt,ne,oe=!1,Zt,Qt,Wt,yt;function sn(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(e){var o=e.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):o.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var o=e.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),we(),Xt(),Ke()},nulling:function(){Wt=ne=wt=oe=yt=Zt=Qt=null,C.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,o){var i=this,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(r,a);if(Wt=e,o||this.options.forceAutoScrollFallback||Tt||q||Et){Jt(e,this.options,l,o);var s=tt(l,!0);oe&&(!yt||r!==Zt||a!==Qt)&&(yt&&we(),yt=setInterval(function(){var u=tt(document.elementFromPoint(r,a),!0);u!==s&&(s=u,Xt()),Jt(e,i.options,u,o)},10),Zt=r,Qt=a)}else{if(!this.options.bubbleScroll||tt(l,!0)===K()){Xt();return}Jt(e,this.options,tt(l,!1),!1)}}},$(n,{pluginName:"scroll",initializeByDefault:!0})}function Xt(){C.forEach(function(n){clearInterval(n.pid)}),C=[]}function we(){clearInterval(yt)}var Jt=_e(function(n,t,e,o){if(t.scroll){var i=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,s=K(),u=!1,d;ne!==e&&(ne=e,Xt(),wt=t.scroll,d=t.scrollFn,wt===!0&&(wt=tt(e,!0)));var c=0,b=wt;do{var E=b,w=T(E),y=w.top,Y=w.bottom,j=w.left,I=w.right,G=w.width,M=w.height,et=void 0,W=void 0,nt=E.scrollWidth,ht=E.scrollHeight,F=h(E),pt=E.scrollLeft,V=E.scrollTop;E===s?(et=G<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"||F.overflowX==="visible"),W=M<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"||F.overflowY==="visible")):(et=G<nt&&(F.overflowX==="auto"||F.overflowX==="scroll"),W=M<ht&&(F.overflowY==="auto"||F.overflowY==="scroll"));var gt=et&&(Math.abs(I-i)<=a&&pt+G<nt)-(Math.abs(j-i)<=a&&!!pt),z=W&&(Math.abs(Y-r)<=a&&V+M<ht)-(Math.abs(y-r)<=a&&!!V);if(!C[c])for(var ot=0;ot<=c;ot++)C[ot]||(C[ot]={});(C[c].vx!=gt||C[c].vy!=z||C[c].el!==E)&&(C[c].el=E,C[c].vx=gt,C[c].vy=z,clearInterval(C[c].pid),(gt!=0||z!=0)&&(u=!0,C[c].pid=setInterval(function(){o&&this.layer===0&&p.active._onTouchMove(Wt);var mt=C[this.layer].vy?C[this.layer].vy*l:0,Z=C[this.layer].vx?C[this.layer].vx*l:0;typeof d=="function"&&d.call(p.dragged.parentNode[P],Z,mt,n,Wt,C[this.layer].el)!=="continue"||Ce(C[this.layer].el,Z,mt)}.bind({layer:c}),24))),c++}while(t.bubbleScroll&&b!==s&&(b=tt(b,!1)));oe=u}},30),Me=function(t){var e=t.originalEvent,o=t.putSortable,i=t.dragEl,r=t.activeSortable,a=t.dispatchSortableEvent,l=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var u=o||r;l();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(d.clientX,d.clientY);s(),u&&!u.el.contains(c)&&(a("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function ae(){}ae.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=dt(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(e,i):this.sortable.el.appendChild(e),this.sortable.animateAll(),o&&o.animateAll()},drop:Me};$(ae,{pluginName:"revertOnSpill"});function le(){}le.prototype={onSpill:function(t){var e=t.dragEl,o=t.putSortable,i=o||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:Me};$(le,{pluginName:"removeOnSpill"});p.mount(new sn);p.mount(le,ae);var Fe=p;var Lt=new Set,un={ghostClass:"calcite-sortable--ghost",chosenClass:"calcite-sortable--chosen",dragClass:"calcite-sortable--drag",fallbackClass:"calcite-sortable--fallback"};function fn(){Array.from(Lt).forEach(n=>n.onGlobalDragStart())}function cn(){Array.from(Lt).forEach(n=>n.onGlobalDragEnd())}var se={active:!1};function dn(n){let{el:e,group:o,handleSelector:i,dragSelector:r,sortDisabled:a}=n;return Fe.create(e,{dataIdAttr:"id",swapThreshold:.5,...un,...!!r&&{draggable:r},...!!o&&{sort:!a,group:{name:o,...!!n.canPull&&{pull:(l,s,u,{newDraggableIndex:d,oldDraggableIndex:c})=>n.canPull({toEl:l.el,fromEl:s.el,dragEl:u,newIndex:d,oldIndex:c})},...!!n.canPut&&{put:(l,s,u,{newDraggableIndex:d,oldDraggableIndex:c})=>n.canPut({toEl:l.el,fromEl:s.el,dragEl:u,newIndex:d,oldIndex:c})}}},onMove:({from:l,dragged:s,to:u,related:d})=>{n.onDragMove&&n.onDragMove({fromEl:l,dragEl:s,toEl:u,relatedEl:d})},handle:i,filter:`${i}[disabled]`,onStart:({from:l,item:s,to:u,newDraggableIndex:d,oldDraggableIndex:c})=>{se.active=!0,fn(),n.onDragStart({fromEl:l,dragEl:s,toEl:u,newIndex:d,oldIndex:c})},onEnd:({from:l,item:s,to:u,newDraggableIndex:d,oldDraggableIndex:c})=>{se.active=!1,cn(),n.onDragEnd({fromEl:l,dragEl:s,toEl:u,newIndex:d,oldIndex:c})},onSort:({from:l,item:s,to:u,newDraggableIndex:d,oldDraggableIndex:c})=>{n.onDragSort({fromEl:l,dragEl:s,toEl:u,newIndex:d,oldIndex:c})}})}var vn=()=>fe((n,t)=>{let e;function o(a){return a.dragEnabled&&se.active}function i(a){o(a)||(r(a),a.dragEnabled&&(Lt.add(a),e=dn(a)))}function r(a){o(a)||(Lt.delete(a),e?.destroy(),e=void 0)}return t.onConnected(()=>{i(n)}),t.onDisconnected(()=>{r(n)}),{reset:()=>{i(n)}}});export{vn as a};
@@ -1,3 +1,3 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{h,i as p,j as S}from"./5L3WL4VL.js";var u=Symbol.for(""),d=t=>{if(t?.r===u)return t?._$litStatic$},_=t=>({_$litStatic$:t,r:u}),w=(t,...a)=>({_$litStatic$:a.reduce(((r,i,o)=>r+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but
2
+ import{h,i as p,j as S}from"./TPRQEKIG.js";var u=Symbol.for(""),d=t=>{if(t?.r===u)return t?._$litStatic$},_=t=>({_$litStatic$:t,r:u}),w=(t,...a)=>({_$litStatic$:a.reduce(((r,i,o)=>r+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but
3
3
  take care to ensure page security.`)})(i)+t[o+1]),t[0]),r:u}),v=new Map,c=t=>(a,...r)=>{let i=r.length,o,e,l=[],$=[],n,s=0,f=!1;for(;s<i;){for(n=a[s];s<i&&(e=r[s],(o=d(e))!==void 0);)n+=o+a[++s],f=!0;s!==i&&$.push(e),l.push(n),s++}if(s===i&&l.push(a[i]),f){let m=l.join("$$lit$$");(a=v.get(m))===void 0&&(l.raw=l,v.set(m,a=l)),r=$}return t(a,...r)},b=c(h),x=c(p),y=c(S);export{_ as a,w as b,b as c};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{Q as s}from"./5L3WL4VL.js";var d=new Set,f={trace:0,debug:1,info:2,warn:4,error:8,off:10};function m(e){return f[e]>=f[s().logLevel]}function o(e,...r){if(!m(e))return;console[e]("%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...r)}var g,w={debug:e=>o("debug",e),info:e=>o("info",e),warn:e=>o("warn",e),error:e=>o("error",e),trace:e=>o("trace",e),deprecated:$};function $(e,{component:r,name:t,suggested:n,removalVersion:i}){let l=`${e}:${e==="component"?"":r}${t}`,c=i==="future"?"a future version":`v${i}`;if(d.has(l))return;d.add(l);let a="";a=e==="component"?`This component is deprecated and will be removed in ${c}.`:`The [${t}] ${e} is deprecated and will be removed in ${c}.`,n&&(g=new Intl.ListFormat("en",{style:"long",type:"disjunction"}),a+=` Use ${g.format([n].flat().map(u=>`"${u}"`))} instead.`);let p=`[${r.el.tagName.toLocaleLowerCase().slice(8)}] - ${a}`;o("warn",p)}export{w as a};
2
+ import{Q as s}from"./TPRQEKIG.js";var d=new Set,f={trace:0,debug:1,info:2,warn:4,error:8,off:10};function m(e){return f[e]>=f[s().logLevel]}function o(e,...r){if(!m(e))return;console[e]("%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...r)}var g,w={debug:e=>o("debug",e),info:e=>o("info",e),warn:e=>o("warn",e),error:e=>o("error",e),trace:e=>o("trace",e),deprecated:$};function $(e,{component:r,name:t,suggested:n,removalVersion:i}){let l=`${e}:${e==="component"?"":r}${t}`,c=i==="future"?"a future version":`v${i}`;if(d.has(l))return;d.add(l);let a="";a=e==="component"?`This component is deprecated and will be removed in ${c}.`:`The [${t}] ${e} is deprecated and will be removed in ${c}.`,n&&(g=new Intl.ListFormat("en",{style:"long",type:"disjunction"}),a+=` Use ${g.format([n].flat().map(u=>`"${u}"`))} instead.`);let p=`[${r.el.tagName.toLocaleLowerCase().slice(8)}] - ${a}`;o("warn",p)}export{w as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{n as l}from"./5L3WL4VL.js";var p=(n,o)=>{let e=n;for(;e;){if(e===o)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},f=(n,o,e)=>{let r=E(o).subscribe;return r(t=>{t.some(s=>p(n,s.target))&&e()})},u={},E=n=>{let o=n.join(","),e=u[o];if(e!==void 0)return e;let r=new Set,t=new MutationObserver(s=>r.forEach(a=>a(s)));globalThis.document&&t.observe(document.documentElement,{attributes:!0,attributeFilter:n,subtree:!0});let i={subscribe:s=>(r.add(s),()=>{r.delete(s),r.size===0&&(t.disconnect(),u[o]=void 0)})};return u[o]=i,i},b=(n,o)=>{let e=n;for(;e;){let r=e.closest?.(o);if(r)return r;let t=e.getRootNode?.();if(t===globalThis.document)return;e=t?.host}};var g=(n,o,e)=>b(n,`[${o}]`)?.getAttribute(o)??e;var v="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),C=new Set(v),c="en",y={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},N=async(n,o,e="")=>{let r=`${o}/${e}`,t=`${r}${n}.json`;return d[t]??(d[t]=h(n,r)),await d[t]},d={},h=async(n,o)=>{let e=`${o}${n}.json`;try{let r=await fetch(e);if(r.ok)return await r.json()}catch(r){return l("error","intl",`An unknown error occurred while fetching localization strings at ${e}`,{detail:{error:r}}),{}}return n===c?{}:await h(c,o)},w=n=>{let o=g(n,"lang",globalThis.navigator?.language||c);return{lang:o,t9nLocale:m(o)}},m=n=>{let[o,e]=n.split("-"),r=o.toLowerCase(),t=r;return e&&(t=`${r}-${e.toUpperCase()}`),t=y[t]??t,C.has(t)?t:e?m(r):c},k=(n,o,e,r)=>{let t,i=()=>L(n,o(),r).then(s=>{(t?.lang!==s.lang||t.t9nLocale!==s.t9nLocale||t.t9nStrings!==s.t9nStrings)&&e(s),t=s}).catch(s=>{l("error","intl","Error updating component locale state",{detail:{error:s}})});return queueMicrotask(i),f(n,["lang"],i)},L=async(n,o,e=n.localName.split("-").slice(1).join("-"))=>{let{lang:r,t9nLocale:t}=w(n),i=`${o}/${e}/t9n`,a=e===null?{}:await N(t,i,"messages.");return{lang:r,t9nLocale:t,t9nStrings:a}};export{f as a,g as b,C as c,c as d,w as e,m as f,k as g};
2
+ import{n as l}from"./TPRQEKIG.js";var p=(n,o)=>{let e=n;for(;e;){if(e===o)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},f=(n,o,e)=>{let r=E(o).subscribe;return r(t=>{t.some(s=>p(n,s.target))&&e()})},u={},E=n=>{let o=n.join(","),e=u[o];if(e!==void 0)return e;let r=new Set,t=new MutationObserver(s=>r.forEach(a=>a(s)));globalThis.document&&t.observe(document.documentElement,{attributes:!0,attributeFilter:n,subtree:!0});let i={subscribe:s=>(r.add(s),()=>{r.delete(s),r.size===0&&(t.disconnect(),u[o]=void 0)})};return u[o]=i,i},b=(n,o)=>{let e=n;for(;e;){let r=e.closest?.(o);if(r)return r;let t=e.getRootNode?.();if(t===globalThis.document)return;e=t?.host}};var g=(n,o,e)=>b(n,`[${o}]`)?.getAttribute(o)??e;var v="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),C=new Set(v),c="en",y={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},N=async(n,o,e="")=>{let r=`${o}/${e}`,t=`${r}${n}.json`;return d[t]??(d[t]=h(n,r)),await d[t]},d={},h=async(n,o)=>{let e=`${o}${n}.json`;try{let r=await fetch(e);if(r.ok)return await r.json()}catch(r){return l("error","intl",`An unknown error occurred while fetching localization strings at ${e}`,{detail:{error:r}}),{}}return n===c?{}:await h(c,o)},w=n=>{let o=g(n,"lang",globalThis.navigator?.language||c);return{lang:o,t9nLocale:m(o)}},m=n=>{let[o,e]=n.split("-"),r=o.toLowerCase(),t=r;return e&&(t=`${r}-${e.toUpperCase()}`),t=y[t]??t,C.has(t)?t:e?m(r):c},k=(n,o,e,r)=>{let t,i=()=>L(n,o(),r).then(s=>{(t?.lang!==s.lang||t.t9nLocale!==s.t9nLocale||t.t9nStrings!==s.t9nStrings)&&e(s),t=s}).catch(s=>{l("error","intl","Error updating component locale state",{detail:{error:s}})});return queueMicrotask(i),f(n,["lang"],i)},L=async(n,o,e=n.localName.split("-").slice(1).join("-"))=>{let{lang:r,t9nLocale:t}=w(n),i=`${o}/${e}/t9n`,a=e===null?{}:await N(t,i,"messages.");return{lang:r,t9nLocale:t,t9nStrings:a}};export{f as a,g as b,C as c,c as d,w as e,m as f,k as g};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{d as t}from"./DCWL5FUH.js";import{a as y}from"./YHGIFWX4.js";import{a as v}from"./JFU4VBGG.js";import{a as B}from"./57VOL2FQ.js";import{a as k}from"./Y43XTIHW.js";import"./RH6ZIP65.js";import{e as w}from"./3TSVKHNF.js";import"./GM5CRK4E.js";import"./TL2LER4P.js";import"./OAOQ5BXS.js";import{E as d,F as h,G as m,H as g,S as $,g as u,h as r,l as b,p as a}from"./5L3WL4VL.js";var A={backButton:"back-button"},C={backLeft:"chevron-left",backRight:"chevron-right"},o={actionBar:"action-bar",alerts:"alerts",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start"},D=u`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:none;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([selected]){display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-panel{--calcite-panel-background-color: var(--calcite-flow-background-color);--calcite-panel-border-color: var(--calcite-flow-border-color, var(--calcite-flow-item-header-border-block-end));--calcite-panel-corner-radius: var(--calcite-flow-corner-radius);--calcite-panel-description-text-color: var(--calcite-flow-description-text-color);--calcite-panel-footer-background-color: var(--calcite-flow-footer-background-color);--calcite-panel-footer-space: var(--calcite-flow-footer-space, var(--calcite-flow-item-footer-padding));--calcite-panel-header-action-background-color-hover: var(--calcite-flow-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-flow-header-action-background-color-press);--calcite-panel-header-action-background-color: var(--calcite-flow-header-action-background-color);--calcite-panel-header-action-indicator-color: var(--calcite-flow-header-action-indicator-color);--calcite-panel-header-action-text-color-press: var(--calcite-flow-header-action-text-color-press);--calcite-panel-header-action-text-color: var(--calcite-flow-header-action-text-color);--calcite-panel-header-background-color: var(--calcite-flow-header-background-color);--calcite-panel-header-content-space: var(--calcite-flow-header-content-space);--calcite-panel-heading-text-color: var(--calcite-flow-heading-text-color);--calcite-panel-icon-color: var(--calcite-flow-icon-color);--calcite-panel-space: var(--calcite-flow-space);--calcite-panel-content-top-space: var(--calcite-flow-content-top-space);--calcite-panel-content-bottom-space: var(--calcite-flow-content-bottom-space)}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends m{constructor(){super(...arguments),this.backButtonRef=d(),this.containerRef=d(),this.direction=w(),this.messages=B(),this.focusSetter=k()(this),this.interactiveContainer=y(this),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.topLayerDisabled=!1,this.calciteFlowItemBack=a(),this.calciteFlowItemClose=a({cancelable:!1}),this.calciteFlowItemCollapse=a({cancelable:!1}),this.calciteFlowItemExpand=a({cancelable:!1}),this.calciteFlowItemScroll=a({cancelable:!1}),this.calciteFlowItemToggle=a({cancelable:!1}),this.calciteInternalFlowItemChange=a({cancelable:!1})}static{this.properties={beforeBack:[0,{},{attribute:!1}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],showBackButton:[5,{},{type:Boolean}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=D}async scrollContentTo(e){await this.containerRef.value?.scrollContentTo(e)}async setFocus(e){return this.focusSetter(()=>this.backButtonRef.value||this.containerRef.value,e)}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteFlowItemCollapse.emit():this.calciteFlowItemExpand.emit())}handleInternalPanelScroll(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}renderBackButton(){let e=this.direction==="rtl",{showBackButton:c,backButtonClick:i,messages:n}=this,l=n.back,s=e?C.backRight:C.backLeft;return c?v("flow-back-button",r`<calcite-action .ariaLabel=${l} class=${g(A.backButton)} .icon=${s} @click=${i} .scale=${this.scale} slot=${o.headerActionsStart} .text=${l} title=${l??b} ${h(this.backButtonRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:c,collapsible:i,closable:n,closed:l,description:s,disabled:f,heading:S,headingLevel:I,loading:x,menuOpen:F,messages:R,overlayPositioning:P,beforeClose:L,icon:T,iconFlipRtl:E}=this;return this.interactiveContainer({disabled:f,children:r`<calcite-panel .beforeClose=${L} .closable=${n} .closed=${l} .collapseDirection=${c} .collapsed=${e} .collapsible=${i} .description=${s} .disabled=${f} .heading=${S} .headingLevel=${I} .icon=${T} .iconFlipRtl=${E} .loading=${x} .menuOpen=${F} .messageOverrides=${R} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${P} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${h(this.containerRef)}>${this.renderBackButton()}<slot name=${o.actionBar} slot=${t.actionBar}></slot><slot name=${o.alerts} slot=${t.alerts}></slot><slot name=${o.headerActionsStart} slot=${t.headerActionsStart}></slot><slot name=${o.headerActionsEnd} slot=${t.headerActionsEnd}></slot><slot name=${o.description} slot=${t.description}></slot><slot name=${o.heading} slot=${t.heading}></slot><slot name=${o.headerContent} slot=${t.headerContent}></slot><slot name=${o.headerMenuActions} slot=${t.headerMenuActions}></slot><slot name=${o.fab} slot=${t.fab}></slot><slot name=${o.contentTop} slot=${t.contentTop}></slot><slot name=${o.contentBottom} slot=${t.contentBottom}></slot><slot name=${o.footerStart} slot=${t.footerStart}></slot><slot name=${o.footer} slot=${t.footer}></slot><slot name=${o.footerEnd} slot=${t.footerEnd}></slot><slot></slot></calcite-panel>`})}};$("calcite-flow-item",p);export{p as FlowItem};
2
+ import{d as t}from"./DCWL5FUH.js";import{a as y}from"./6CBC7O2L.js";import{a as v}from"./36NKWNCT.js";import{a as B}from"./HHRSNWVJ.js";import{a as k}from"./QCRJVL4W.js";import"./RH6ZIP65.js";import{e as w}from"./PD7IE5T5.js";import"./FS3FP3E7.js";import"./2LIAGA6D.js";import"./OAOQ5BXS.js";import{E as d,F as h,G as m,H as g,S as $,g as u,h as r,l as b,p as a}from"./TPRQEKIG.js";var A={backButton:"back-button"},C={backLeft:"chevron-left",backRight:"chevron-right"},o={actionBar:"action-bar",alerts:"alerts",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start"},D=u`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:none;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([selected]){display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-panel{--calcite-panel-background-color: var(--calcite-flow-background-color);--calcite-panel-border-color: var(--calcite-flow-border-color, var(--calcite-flow-item-header-border-block-end));--calcite-panel-corner-radius: var(--calcite-flow-corner-radius);--calcite-panel-description-text-color: var(--calcite-flow-description-text-color);--calcite-panel-footer-background-color: var(--calcite-flow-footer-background-color);--calcite-panel-footer-space: var(--calcite-flow-footer-space, var(--calcite-flow-item-footer-padding));--calcite-panel-header-action-background-color-hover: var(--calcite-flow-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-flow-header-action-background-color-press);--calcite-panel-header-action-background-color: var(--calcite-flow-header-action-background-color);--calcite-panel-header-action-indicator-color: var(--calcite-flow-header-action-indicator-color);--calcite-panel-header-action-text-color-press: var(--calcite-flow-header-action-text-color-press);--calcite-panel-header-action-text-color: var(--calcite-flow-header-action-text-color);--calcite-panel-header-background-color: var(--calcite-flow-header-background-color);--calcite-panel-header-content-space: var(--calcite-flow-header-content-space);--calcite-panel-heading-text-color: var(--calcite-flow-heading-text-color);--calcite-panel-icon-color: var(--calcite-flow-icon-color);--calcite-panel-space: var(--calcite-flow-space);--calcite-panel-content-top-space: var(--calcite-flow-content-top-space);--calcite-panel-content-bottom-space: var(--calcite-flow-content-bottom-space)}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends m{constructor(){super(...arguments),this.backButtonRef=d(),this.containerRef=d(),this.direction=w(),this.messages=B(),this.focusSetter=k()(this),this.interactiveContainer=y(this),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.topLayerDisabled=!1,this.calciteFlowItemBack=a(),this.calciteFlowItemClose=a({cancelable:!1}),this.calciteFlowItemCollapse=a({cancelable:!1}),this.calciteFlowItemExpand=a({cancelable:!1}),this.calciteFlowItemScroll=a({cancelable:!1}),this.calciteFlowItemToggle=a({cancelable:!1}),this.calciteInternalFlowItemChange=a({cancelable:!1})}static{this.properties={beforeBack:[0,{},{attribute:!1}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],showBackButton:[5,{},{type:Boolean}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=D}async scrollContentTo(e){await this.containerRef.value?.scrollContentTo(e)}async setFocus(e){return this.focusSetter(()=>this.backButtonRef.value||this.containerRef.value,e)}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteFlowItemCollapse.emit():this.calciteFlowItemExpand.emit())}handleInternalPanelScroll(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}renderBackButton(){let e=this.direction==="rtl",{showBackButton:c,backButtonClick:i,messages:n}=this,l=n.back,s=e?C.backRight:C.backLeft;return c?v("flow-back-button",r`<calcite-action .ariaLabel=${l} class=${g(A.backButton)} .icon=${s} @click=${i} .scale=${this.scale} slot=${o.headerActionsStart} .text=${l} title=${l??b} ${h(this.backButtonRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:c,collapsible:i,closable:n,closed:l,description:s,disabled:f,heading:S,headingLevel:I,loading:x,menuOpen:F,messages:R,overlayPositioning:P,beforeClose:L,icon:T,iconFlipRtl:E}=this;return this.interactiveContainer({disabled:f,children:r`<calcite-panel .beforeClose=${L} .closable=${n} .closed=${l} .collapseDirection=${c} .collapsed=${e} .collapsible=${i} .description=${s} .disabled=${f} .heading=${S} .headingLevel=${I} .icon=${T} .iconFlipRtl=${E} .loading=${x} .menuOpen=${F} .messageOverrides=${R} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${P} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${h(this.containerRef)}>${this.renderBackButton()}<slot name=${o.actionBar} slot=${t.actionBar}></slot><slot name=${o.alerts} slot=${t.alerts}></slot><slot name=${o.headerActionsStart} slot=${t.headerActionsStart}></slot><slot name=${o.headerActionsEnd} slot=${t.headerActionsEnd}></slot><slot name=${o.description} slot=${t.description}></slot><slot name=${o.heading} slot=${t.heading}></slot><slot name=${o.headerContent} slot=${t.headerContent}></slot><slot name=${o.headerMenuActions} slot=${t.headerMenuActions}></slot><slot name=${o.fab} slot=${t.fab}></slot><slot name=${o.contentTop} slot=${t.contentTop}></slot><slot name=${o.contentBottom} slot=${t.contentBottom}></slot><slot name=${o.footerStart} slot=${t.footerStart}></slot><slot name=${o.footer} slot=${t.footer}></slot><slot name=${o.footerEnd} slot=${t.footerEnd}></slot><slot></slot></calcite-panel>`})}};$("calcite-flow-item",p);export{p as FlowItem};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as m}from"./YHGIFWX4.js";import{a as p}from"./ENDXE7YY.js";import"./3TSVKHNF.js";import"./GM5CRK4E.js";import{y as i}from"./TL2LER4P.js";import"./OAOQ5BXS.js";import{F as r,G as n,H as d,S as h,g as l,h as c,p as o}from"./5L3WL4VL.js";var u={container:"container"},f=l`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{box-sizing:border-box;display:inline-block}:host ::slotted(calcite-tile){margin-block-end:var(--calcite-spacing-px);margin-inline-end:var(--calcite-spacing-px)}.container{display:grid;grid-auto-rows:minmax(auto,1fr);grid-auto-flow:column}:host([scale=s]) .container{grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}:host([scale=m]) .container{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}:host([scale=l]) .container{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}:host([layout=vertical]) .container{display:flex;flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(),this.items=[],this.mutationObserver=p("mutation",()=>this.updateTiles()),this.interactiveContainer=m(this),this.alignment="start",this.disabled=!1,this.layout="horizontal",this.scale="m",this.selectedItems=[],this.selectionAppearance="icon",this.selectionMode="none",this.calciteTileGroupSelect=o({cancelable:!1}),this.listen("calciteInternalTileKeyEvent",this.calciteInternalTileKeyEventListener),this.listen("calciteTileSelect",this.calciteTileSelectHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=f}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateTiles()}willUpdate(e){(e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="icon"))&&this.updateTiles()}loaded(){this.updateSelectedItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getSlottedTiles(){return this.slotEl?.assignedElements({flatten:!0}).filter(e=>e?.matches("calcite-tile"))}selectItem(e){e&&(this.items?.forEach(t=>{let s=e===t;switch(this.selectionMode){case"multiple":s&&(t.selected=!t.selected);break;case"single":t.selected=s&&!t.selected;break;case"single-persist":t.selected=!!s;break}}),this.updateSelectedItems(),this.calciteTileGroupSelect.emit())}setSlotEl(e){this.slotEl=e}updateSelectedItems(){let e=this.items?.filter(t=>t.selected);(this.selectionMode==="single"||this.selectionMode==="single-persist")&&e?.length>1?(this.selectedItems=[e.pop()],this.items?.forEach(t=>{this.selectedItems.indexOf(t)===-1&&(t.selected=!1)})):this.selectedItems=e??[]}updateTiles(){this.items=this.getSlottedTiles(),this.items?.forEach(e=>{e.alignment=this.alignment,e.interactive=!0,e.layout=this.layout,e.scale=this.scale,e.selectionAppearance=this.selectionAppearance,e.selectionMode=this.selectionMode}),this.updateSelectedItems()}calciteInternalTileKeyEventListener(e){if(e.composedPath().includes(this.el)){e.preventDefault(),e.stopPropagation();let t=this.items?.filter(s=>!s.disabled);switch(e.detail.key){case"ArrowDown":case"ArrowRight":i(t,e.detail.target,"next",!0,!1);break;case"ArrowUp":case"ArrowLeft":i(t,e.detail.target,"previous",!0,!1);break;case"Home":i(t,e.detail.target,"first",!0,!1);break;case"End":i(t,e.detail.target,"last",!0,!1);break}}}calciteTileSelectHandler(e){e.composedPath().includes(this.el)&&this.selectItem(e.target)}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup";return this.interactiveContainer({disabled:this.disabled,children:c`<div .ariaLabel=${this.label} class=${d(u.container)} .role=${e}><slot @slotchange=${this.updateTiles} ${r(this.setSlotEl)}></slot></div>`})}};h("calcite-tile-group",a);export{a as TileGroup};
2
+ import{a as m}from"./6CBC7O2L.js";import{a as p}from"./ENDXE7YY.js";import"./PD7IE5T5.js";import"./FS3FP3E7.js";import{y as i}from"./2LIAGA6D.js";import"./OAOQ5BXS.js";import{F as r,G as n,H as d,S as h,g as l,h as c,p as o}from"./TPRQEKIG.js";var u={container:"container"},f=l`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{box-sizing:border-box;display:inline-block}:host ::slotted(calcite-tile){margin-block-end:var(--calcite-spacing-px);margin-inline-end:var(--calcite-spacing-px)}.container{display:grid;grid-auto-rows:minmax(auto,1fr);grid-auto-flow:column}:host([scale=s]) .container{grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}:host([scale=m]) .container{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}:host([scale=l]) .container{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}:host([layout=vertical]) .container{display:flex;flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(),this.items=[],this.mutationObserver=p("mutation",()=>this.updateTiles()),this.interactiveContainer=m(this),this.alignment="start",this.disabled=!1,this.layout="horizontal",this.scale="m",this.selectedItems=[],this.selectionAppearance="icon",this.selectionMode="none",this.calciteTileGroupSelect=o({cancelable:!1}),this.listen("calciteInternalTileKeyEvent",this.calciteInternalTileKeyEventListener),this.listen("calciteTileSelect",this.calciteTileSelectHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=f}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateTiles()}willUpdate(e){(e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="icon"))&&this.updateTiles()}loaded(){this.updateSelectedItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getSlottedTiles(){return this.slotEl?.assignedElements({flatten:!0}).filter(e=>e?.matches("calcite-tile"))}selectItem(e){e&&(this.items?.forEach(t=>{let s=e===t;switch(this.selectionMode){case"multiple":s&&(t.selected=!t.selected);break;case"single":t.selected=s&&!t.selected;break;case"single-persist":t.selected=!!s;break}}),this.updateSelectedItems(),this.calciteTileGroupSelect.emit())}setSlotEl(e){this.slotEl=e}updateSelectedItems(){let e=this.items?.filter(t=>t.selected);(this.selectionMode==="single"||this.selectionMode==="single-persist")&&e?.length>1?(this.selectedItems=[e.pop()],this.items?.forEach(t=>{this.selectedItems.indexOf(t)===-1&&(t.selected=!1)})):this.selectedItems=e??[]}updateTiles(){this.items=this.getSlottedTiles(),this.items?.forEach(e=>{e.alignment=this.alignment,e.interactive=!0,e.layout=this.layout,e.scale=this.scale,e.selectionAppearance=this.selectionAppearance,e.selectionMode=this.selectionMode}),this.updateSelectedItems()}calciteInternalTileKeyEventListener(e){if(e.composedPath().includes(this.el)){e.preventDefault(),e.stopPropagation();let t=this.items?.filter(s=>!s.disabled);switch(e.detail.key){case"ArrowDown":case"ArrowRight":i(t,e.detail.target,"next",!0,!1);break;case"ArrowUp":case"ArrowLeft":i(t,e.detail.target,"previous",!0,!1);break;case"Home":i(t,e.detail.target,"first",!0,!1);break;case"End":i(t,e.detail.target,"last",!0,!1);break}}}calciteTileSelectHandler(e){e.composedPath().includes(this.el)&&this.selectItem(e.target)}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup";return this.interactiveContainer({disabled:this.disabled,children:c`<div .ariaLabel=${this.label} class=${d(u.container)} .role=${e}><slot @slotchange=${this.updateTiles} ${r(this.setSlotEl)}></slot></div>`})}};h("calcite-tile-group",a);export{a as TileGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as b,e as g}from"./NDOJ7DMN.js";import"./MYDCGCGV.js";import"./TL2LER4P.js";import{a as p}from"./OAOQ5BXS.js";import{G as r,H as t,I as a,J as c,S as m,g as s,h as e}from"./5L3WL4VL.js";var i={firstTitle:"first-title",list:"list",label:"label",separator:"separator",title:"title",scale:l=>`scale--${l}`},h=s`.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}:host,.list{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),.list:focus{outline:2px solid transparent;outline-offset:2px}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-combobox-item-group-border-color, var(--calcite-color-border-3))}.label{box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:0px;max-inline-size:100%}.title{--calcite-combobox-item-indent-value: calc( var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier) );border:0 solid;display:block;flex:1 1 0%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;padding-block:var(--calcite-combobox-item-vertical-spacing-unit);padding-inline-start:calc(var(--calcite-combobox-item-indent-value) + var(--calcite-combobox-item-horizontal-spacing-unit));padding-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit);color:var(--calcite-combobox-item-group-text-color, var(--calcite-color-text-1))}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,o=class extends r{constructor(){super(...arguments),this.guid=p(),this.afterEmptyGroup=!1,this.position=0,this.scale="m",this.itemHidden=!1}static{this.properties={afterEmptyGroup:[7,{},{reflect:!0,type:Boolean}],ancestors:[0,{},{attribute:!1}],label:1,position:[9,{},{type:Number}],scale:1,itemHidden:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=h}connectedCallback(){super.connectedCallback(),this.ancestors=b(this.el)}render(){let{el:d,scale:u}=this,n=g(d),v=this.position>0?e`<div class=${t(i.separator)} role=separator style=${a({"--calcite-combobox-item-spacing-indent-multiplier":`${n}`})}></div>`:null;return e`<ul aria-labelledby=${this.guid??c} class=${t({[i.list]:!0,[i.scale(u)]:!0})} role=group>${v}<li class=${t({[i.label]:!0})} id=${this.guid??c} role=presentation style=${a({"--calcite-combobox-item-spacing-indent-multiplier":`${n}`})}><span class=${t({[i.title]:!0,[i.firstTitle]:this.position===0})}>${this.label}</span></li><slot></slot></ul>`}};m("calcite-combobox-item-group",o);export{o as ComboboxItemGroup};
2
+ import{a as b,e as g}from"./DVTWHLVS.js";import"./MYDCGCGV.js";import"./2LIAGA6D.js";import{a as p}from"./OAOQ5BXS.js";import{G as r,H as t,I as a,J as c,S as m,g as s,h as e}from"./TPRQEKIG.js";var i={firstTitle:"first-title",list:"list",label:"label",separator:"separator",title:"title",scale:l=>`scale--${l}`},h=s`.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}:host,.list{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),.list:focus{outline:2px solid transparent;outline-offset:2px}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-combobox-item-group-border-color, var(--calcite-color-border-3))}.label{box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:0px;max-inline-size:100%}.title{--calcite-combobox-item-indent-value: calc( var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier) );border:0 solid;display:block;flex:1 1 0%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;padding-block:var(--calcite-combobox-item-vertical-spacing-unit);padding-inline-start:calc(var(--calcite-combobox-item-indent-value) + var(--calcite-combobox-item-horizontal-spacing-unit));padding-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit);color:var(--calcite-combobox-item-group-text-color, var(--calcite-color-text-1))}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,o=class extends r{constructor(){super(...arguments),this.guid=p(),this.afterEmptyGroup=!1,this.position=0,this.scale="m",this.itemHidden=!1}static{this.properties={afterEmptyGroup:[7,{},{reflect:!0,type:Boolean}],ancestors:[0,{},{attribute:!1}],label:1,position:[9,{},{type:Number}],scale:1,itemHidden:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=h}connectedCallback(){super.connectedCallback(),this.ancestors=b(this.el)}render(){let{el:d,scale:u}=this,n=g(d),v=this.position>0?e`<div class=${t(i.separator)} role=separator style=${a({"--calcite-combobox-item-spacing-indent-multiplier":`${n}`})}></div>`:null;return e`<ul aria-labelledby=${this.guid??c} class=${t({[i.list]:!0,[i.scale(u)]:!0})} role=group>${v}<li class=${t({[i.label]:!0})} id=${this.guid??c} role=presentation style=${a({"--calcite-combobox-item-spacing-indent-multiplier":`${n}`})}><span class=${t({[i.title]:!0,[i.firstTitle]:this.position===0})}>${this.label}</span></li><slot></slot></ul>`}};m("calcite-combobox-item-group",o);export{o as ComboboxItemGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{d as ge}from"./Y2OS6UOH.js";import{a as xe}from"./DVICI22P.js";import{a as ve}from"./ISATMK3J.js";import{b as W,c as Ie,d as I,f as w,g as A}from"./NDOJ7DMN.js";import{a as H,b as M,d as c,e as p,f as L}from"./MYDCGCGV.js";import{a as me}from"./YX3WCLZI.js";import{b as z}from"./6URRYJJC.js";import{a as ue}from"./KXXIFRGT.js";import{a as fe}from"./IOHX3UTV.js";import{c as he,d as de,e as pe}from"./JSRN4WS4.js";import{a as ae}from"./O5NPN2NC.js";import{b as be}from"./WZH7XMRX.js";import{a as P,c as B,d as ce,e as ne,f as oe,g as D,h as re}from"./MSYHAUDU.js";import{a as se}from"./2YN42GGZ.js";import{a as te}from"./YHGIFWX4.js";import{a as S}from"./JFU4VBGG.js";import{a as le}from"./BH4ZCVJG.js";import{a as ie}from"./AP2LDRUV.js";import{a as R,b as F}from"./ENDXE7YY.js";import{a as ee}from"./57VOL2FQ.js";import{a as Z}from"./Y43XTIHW.js";import{a as O,b as V}from"./RH6ZIP65.js";import{e as K}from"./3TSVKHNF.js";import"./GM5CRK4E.js";import{e as k,h as X,l as Y}from"./TL2LER4P.js";import{a as Q}from"./OAOQ5BXS.js";import{D as U,E as $,F as v,G,H as h,L as _,N as j,S as J,g as N,h as d,l as f,p as x}from"./5L3WL4VL.js";var Se=N`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-spacing-xxs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-spacing-sm-plus)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,q=class extends G{constructor(){super(),this.direction=K(),this.formSupport=fe({inputType:"text"})(this),this.selectAllComboboxItemRef=$(),this.allSelectedIndicatorChipRef=$(),this.cancelable=le()(this),this.filterItems=(()=>{let e=(t,l)=>t&&l.some(({el:i})=>t===i);return ie((t,l=!1,i=!0)=>{let s=ve([...this.data,...this.groupData],t,this.effectiveFilterProps),n=this.getItemsAndGroups(),a=t==="";n.forEach(o=>{if(a){o.itemHidden=!1;return}let r=!e(o,s);o.itemHidden=r;let[u,b]=o.ancestors;(e(u,s)||e(b,s))&&(o.itemHidden=!1),r||o.ancestors.forEach(g=>g.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${z(this.filterText)})`,"i"),this.keyboardNavItems.forEach(o=>{o.filterTextMatchPattern=this.filterTextMatchPattern}),l&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},j.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!I(e))).sort((e,t)=>{let l=this.selectedItems.indexOf(e),i=this.selectedItems.indexOf(t);return l>-1&&i>-1?l-i:i-l})},this.groupItems=[],this.guid=Q(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.mutationObserver=R("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=R("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=$(),this.clearButtonRef=$(),this._selectedItems=[],this.textInputRef=$(),this._value=null,this.messages=ee(),this.focusSetter=Z()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=te(this),this.topLayer=ae({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.allItems=[],this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=P,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=x({cancelable:!1}),this.calciteComboboxBeforeOpen=x({cancelable:!1}),this.calciteComboboxChange=x({cancelable:!1}),this.calciteComboboxChipClose=x({cancelable:!1}),this.calciteComboboxClose=x({cancelable:!1}),this.calciteComboboxFilterChange=x({cancelable:!1}),this.calciteComboboxOpen=x({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Se}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:l,open:i}=this,s=l[0],n=s?.icon,a=w(t);return!i&&s?!!n&&a:!!e&&(!s||a)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledItems(){return this.allItems.some(e=>e.disabled)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(l=>!l.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!V(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:l,placement:i,overlayPositioning:s,filteredFlipPlacements:n}=this;return ne(this,{direction:this.direction,floatingEl:t,referenceEl:l,overlayPositioning:s,placement:i,flipPlacements:n,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),he(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),D(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==P))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){D(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),de(this),re(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||se(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay()}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(t=>{let l=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);l&&this.hideChip(l)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,l=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(l);let i=this.keyboardNavItems.indexOf(l?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ce(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(e.target),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):!e.defaultPrevented&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit());break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip(e.target)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(!0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),oe(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:l}=this;if(!e||!t)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${l.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(l=>l===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(l=>l.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.includes(this.clearButtonRef.value)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(c.chipInvisible)}showChip(e){e.classList.remove(c.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:l}){e.forEach(i=>{if(!i.selected)this.hideChip(i);else{let s=k(i);if(s&&s<t){t-=s+l,this.showChip(i);return}}this.hideChip(i)})}async refreshSelectionDisplay(){if(this.componentOnReady(),w(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:l,placeholder:i,selectedIndicatorChipRef:s,textInputRef:n}=this,a=parseInt(getComputedStyle(t).gap.replace("px","")),o=k(t),{fontSize:r,fontFamily:u}=getComputedStyle(n.value),g=(X(i,`${r} ${u}`)||parseInt(ge))+a,E=k(e.value),T=k(s.value),m=Math.max(E,T);if(this.setCompactSelectionDisplay({chipContainerElGap:a,chipContainerElWidth:o,inputWidth:g,largestSelectedIndicatorChipWidth:m}),this.allSelected&&this.selectAllEnabled&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.hideChip(C)}),this.indeterminate&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.showChip(C)}),l==="fit"){let y=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ce=>Ce.closable),C=Math.round(o-((this.selectedHiddenChipsCount>0?T:0)+a+g+a));this.refreshChipDisplay({availableHorizontalChipElSpace:C,chipContainerElGap:a,chipEls:y}),this.setVisibleAndHiddenChips(y)}}setFloatingEl(e){this.floatingEl=e,D(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:l,largestSelectedIndicatorChipWidth:i}){let s=Math.round(i+e+l);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<s)&&(this.maxCompactBreakpoint=s),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){F(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){F(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,D(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(i=>{i.selected&&!i.classList.contains(c.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let l=Math.max(0,this.getSelectedItems().length-t);l!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=l)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(n=>!V(n)),{maxItems:l}=this,i=0,s=0;return t.length>=l&&t.forEach(n=>{if(i<l){let a=this.calculateScrollerHeight(n);s+=a,i+=1}}),s}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,l=`:scope > ${H}, :scope > ${M}`,i=Array.from(e.querySelectorAll(l)).reduce((s,n)=>s+n.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(e=!1){return e?Array.from(this.el.querySelectorAll(`${H}, ${M}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(l=>l.selected=l===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=A(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=W(e),l=Ie(e);e.selected?t.forEach(i=>{i.selected=!0}):(l.forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{I(i)||(i.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,l)=>{t===0&&(e.afterEmptyGroup=!1);let i=l[t+1];i&&(i.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(H)).filter(l=>e||!l.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(M))}addCustomChip(e,t){let l=this.items.find(i=>i.heading===e);if(l)this.toggleSelection(l,!0);else{let i=document.createElement("calcite-combobox-item");i.value=e,i.heading=e,this.el.prepend(i),this.updateItems(),this.toggleSelection(i,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&`${p.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,Y(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],l=this.listContainerEl;if(!t||!l)return;t.scrollIntoView({block:"nearest"});let s=this.selectAllComboboxItemRef.value?.offsetHeight||0,n=t.getBoundingClientRect(),a=l.getBoundingClientRect();n.top<a.top+s&&(l.scrollTop-=a.top+s-n.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,l=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(l),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((l,i)=>{i===e?(l.active=!0,t=`${p.item(l.guid)}`):l.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!w(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:l,textContent:i}){return d`<li aria-label=${e??f} aria-selected=${t??f} id=${l??f} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[...W(e)].reverse(),e].map(i=>A(i)).join(" / "):A(e)}renderChip({activeChipIndex:e,disabled:t,index:l,item:i,messages:s,readOnly:n,scale:a,isAncestors:o}){let r=this.getChipLabel(i,o);return S(i.guid||i.value||r,d`<calcite-chip .appearance=${n?"outline":"solid"} class=${h({[c.chip]:!0,[c.disabled]:t})} .closable=${!t&&!n} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${p.chip(i.guid)}`:null)??f} .label=${r} .messageOverrides=${t?null:{dismissLabel:s.removeTag}} @focusin=${t?null:()=>this.activeChipIndex=l} @calciteChipClose=${t?null:()=>this.calciteChipCloseHandler(i)} .scale=${a} .selected=${i.selected} .tabIndex=${!t&&e===l?0:-1} title=${r??f} .value=${i.value}>${r}</calcite-chip>`)}renderChipCount(e,t){let l=this.messages.disabledSelectedCount?.replace("{count}",`${e}`)??`+${e}`;return d`<calcite-chip appearance=solid class=${h({[c.chip]:!0})} .label=${l} .scale=${t} tabindex=-1 title=${l??f}>${l}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:l,selectionDisplay:i,selectionMode:s,messages:n}=this,a=[],o=s==="ancestors",r=this.allSelected&&!this.hasDisabledItems,u=this.allSelected&&this.hasDisabledSelected,b=this.allItems.filter(m=>m.disabled&&m.selected&&(!o||!I(m))),g=i==="all";if(i==="fit"&&(r||u)||i==="all"&&this.selectAllEnabled&&u||this.selectAllEnabled&&this.allSelected&&!this.hasDisabledItems)return null;let E=0,T=0;return g?this.allItems.forEach(m=>{if(m.disabled){m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!0,index:T++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}));return}(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}))}):(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&this.selectedItems.forEach(m=>{a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}))}),i==="fit"&&b.length&&a.push(this.renderChipCount(b.length,l)),a.length?a:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:l,selectedVisibleChipsCount:i}=this,s=t?this.messages.all:this.messages.allSelected,n=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="fit"&&this.hasDisabledSelected||this.selectionDisplay==="all"&&this.hasDisabledSelected);return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:!n,[c.allSelected]:!0})} .label=${s} .scale=${l} title=${s??f} value ${v(e)}>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i,selectedVisibleChipsCount:s,selectedIndicatorChipRef:n}=this,a=this.allSelected&&!this.hasDisabledItems,o=this.allSelected&&this.hasDisabledSelected,r,u;if(e)r=!0;else if(t==="single"){let b=this.allItems.filter(g=>g.selected&&(this.selectionMode!=="ancestors"||!I(g))).length;this.allSelected?r=!0:b>0?r=!1:r=!0,u=`${b} ${this.messages.selected}`}else t==="fit"&&(r=!!((a||o)&&s===0||i===0),u=s>0?`+${i}`:`${i} ${this.messages.selected}`);return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:r})} .label=${u} .scale=${l} title=${u??f} value ${v(n)}>${u}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i}=this,s=this.allSelected&&!this.hasDisabledItems,n=this.allSelected&&this.hasDisabledSelected,a,o;if(e){let r=this.allItems.filter(u=>u.selected&&(this.selectionMode!=="ancestors"||!I(u))).length;s||n||t==="single"&&this.allSelected?a=!0:t==="fit"?(a=!(i>0),o=`${i||0}`):t==="single"&&(a=!(r>0),o=`${r}`)}else a=!0;return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:a})} .label=${o} .scale=${l} title=${o??f} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:l,selectionMode:i,selectedItems:s,open:n}=this,a=w(i),o=s[0],r=!n&&a&&!!o&&!this.filterText;return d`<span class=${h({[c.inputWrap]:!0,[c.inputWrapSingle]:a})}>${r&&S("label",d`<span class=${h({[c.label]:!0,[c.labelIcon]:!!o?.icon})}>${A(o)}</span>`)||""}${S("input",d`<input aria-activedescendant=${this.activeDescendant??f} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${n} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${pe(this)} class=${h({[c.input]:!0,[c.inputSingle]:!0,[c.inputHidden]:r,[c.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${l??f} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${U(this.filterText??"")} ${v(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:l,open:i,scale:s}=this,n={[c.listContainer]:!0,[B.animation]:!0,[B.animationActive]:i},a=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${h(c.floatingUIContainer)} popover=manual ${v(t)}><div class=${h(n)} ${v(l)}><ul class=${h({[c.list]:!0,[c.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${h(c.selectAll)} .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${s} .selected=${this.allSelected} tabindex=-1 value=select-all ${v(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${a??f} class=${h(c.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${be({text:a,pattern:new RegExp(`(${z(this.filterText)})`,"i")})}</li>`:d`<li class=${h({[c.noMatchesPlaceholder]:!0,[c.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:l,selectedItems:i}=this,s=i[0],n=s?.icon,a=t&&(e||!s);return this.showingInlineIcon&&S("selected-placeholder-icon",d`<span class=${h(c.iconStart)}><calcite-icon class=${h({[c.selectedIcon]:!a,[c.placeholderIcon]:a})} .flipRtl=${a?l:s.iconFlipRtl} .icon=${a?t:n} .scale=${O(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return S("chevron",d`<span class=${h(c.iconEnd)}><calcite-icon class=${h(c.icon)} .icon=${e?L.chevronUp:L.chevronDown} .scale=${O(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:l,open:i,readOnly:s}=this,n=w(this.selectionMode),a=e==="all",o=e==="single",r=!n&&e==="fit",u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length,b=this.hasDisabledItems;return this.interactiveContainer({disabled:this.disabled,children:d`${this.labelText&&ue({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${h({[c.wrapper]:!0,[c.wrapperSingle]:n||!this.selectedItems.length,[c.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${v(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${S("grid",d`<div class=${h({[c.gridInput]:!0,[c.selectionDisplayFit]:r,[c.selectionDisplaySingle]:o})} ${v(this.setChipContainerEl)}>${!n&&!o&&this.renderChips()||""}${!n&&!o&&this.selectAllEnabled&&a&&(!b||this.hasDisabledSelected)&&this.renderAllSelectedIndicatorChip()||""}${!n&&!a&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${h(c.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${l}</label>${this.renderInput()}</div>`)}${!s&&u?xe({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!s&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${h(c.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?me({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};J("calcite-combobox",q);export{q as Combobox};
2
+ import{d as ge}from"./Y2OS6UOH.js";import{a as xe}from"./AZ6SVWDM.js";import{a as ve}from"./ISATMK3J.js";import{b as W,c as Ie,d as I,f as w,g as A}from"./DVTWHLVS.js";import{a as H,b as M,d as c,e as p,f as L}from"./MYDCGCGV.js";import{a as me}from"./EQWOSRJS.js";import{b as z}from"./6URRYJJC.js";import{a as ue}from"./4J5GPFW4.js";import{a as fe}from"./CN4KGWO7.js";import{c as he,d as de,e as pe}from"./YVTCTKMY.js";import{a as ae}from"./Q75NF4J3.js";import{b as be}from"./EUJZPMHT.js";import{a as P,c as B,d as ce,e as ne,f as oe,g as D,h as re}from"./X5XG2XVZ.js";import{a as se}from"./EJNEFXBB.js";import{a as te}from"./6CBC7O2L.js";import{a as S}from"./36NKWNCT.js";import{a as le}from"./V6MIIYPL.js";import{a as ie}from"./AP2LDRUV.js";import{a as R,b as F}from"./ENDXE7YY.js";import{a as ee}from"./HHRSNWVJ.js";import{a as Z}from"./QCRJVL4W.js";import{a as O,b as V}from"./RH6ZIP65.js";import{e as K}from"./PD7IE5T5.js";import"./FS3FP3E7.js";import{e as k,h as X,l as Y}from"./2LIAGA6D.js";import{a as Q}from"./OAOQ5BXS.js";import{D as U,E as $,F as v,G,H as h,L as _,N as j,S as J,g as N,h as d,l as f,p as x}from"./TPRQEKIG.js";var Se=N`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-spacing-xxs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-spacing-sm-plus)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,q=class extends G{constructor(){super(),this.direction=K(),this.formSupport=fe({inputType:"text"})(this),this.selectAllComboboxItemRef=$(),this.allSelectedIndicatorChipRef=$(),this.cancelable=le()(this),this.filterItems=(()=>{let e=(t,l)=>t&&l.some(({el:i})=>t===i);return ie((t,l=!1,i=!0)=>{let s=ve([...this.data,...this.groupData],t,this.effectiveFilterProps),n=this.getItemsAndGroups(),a=t==="";n.forEach(o=>{if(a){o.itemHidden=!1;return}let r=!e(o,s);o.itemHidden=r;let[u,b]=o.ancestors;(e(u,s)||e(b,s))&&(o.itemHidden=!1),r||o.ancestors.forEach(g=>g.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${z(this.filterText)})`,"i"),this.keyboardNavItems.forEach(o=>{o.filterTextMatchPattern=this.filterTextMatchPattern}),l&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},j.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!I(e))).sort((e,t)=>{let l=this.selectedItems.indexOf(e),i=this.selectedItems.indexOf(t);return l>-1&&i>-1?l-i:i-l})},this.groupItems=[],this.guid=Q(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.mutationObserver=R("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=R("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=$(),this.clearButtonRef=$(),this._selectedItems=[],this.textInputRef=$(),this._value=null,this.messages=ee(),this.focusSetter=Z()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=te(this),this.topLayer=ae({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.allItems=[],this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=P,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=x({cancelable:!1}),this.calciteComboboxBeforeOpen=x({cancelable:!1}),this.calciteComboboxChange=x({cancelable:!1}),this.calciteComboboxChipClose=x({cancelable:!1}),this.calciteComboboxClose=x({cancelable:!1}),this.calciteComboboxFilterChange=x({cancelable:!1}),this.calciteComboboxOpen=x({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_,type:String},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Se}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:l,open:i}=this,s=l[0],n=s?.icon,a=w(t);return!i&&s?!!n&&a:!!e&&(!s||a)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledItems(){return this.allItems.some(e=>e.disabled)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(l=>!l.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!V(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:l,placement:i,overlayPositioning:s,filteredFlipPlacements:n}=this;return ne(this,{direction:this.direction,floatingEl:t,referenceEl:l,overlayPositioning:s,placement:i,flipPlacements:n,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),he(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),D(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==P))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){D(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),de(this),re(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||se(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay()}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(t=>{let l=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);l&&this.hideChip(l)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,l=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(l);let i=this.keyboardNavItems.indexOf(l?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ce(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(e.target),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):!e.defaultPrevented&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit());break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip(e.target)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(!0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),oe(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:l}=this;if(!e||!t)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${l.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(l=>l===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(l=>l.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.includes(this.clearButtonRef.value)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(c.chipInvisible)}showChip(e){e.classList.remove(c.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:l}){e.forEach(i=>{if(!i.selected)this.hideChip(i);else{let s=k(i);if(s&&s<t){t-=s+l,this.showChip(i);return}}this.hideChip(i)})}async refreshSelectionDisplay(){if(this.componentOnReady(),w(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:l,placeholder:i,selectedIndicatorChipRef:s,textInputRef:n}=this,a=parseInt(getComputedStyle(t).gap.replace("px","")),o=k(t),{fontSize:r,fontFamily:u}=getComputedStyle(n.value),g=(X(i,`${r} ${u}`)||parseInt(ge))+a,E=k(e.value),T=k(s.value),m=Math.max(E,T);if(this.setCompactSelectionDisplay({chipContainerElGap:a,chipContainerElWidth:o,inputWidth:g,largestSelectedIndicatorChipWidth:m}),this.allSelected&&this.selectAllEnabled&&(!this.hasDisabledItems||this.hasDisabledSelected)&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.hideChip(C)}),this.indeterminate&&this.selectedItems.forEach(y=>{let C=this.referenceEl.querySelector(`#${p.chip(y.guid)}`);C&&this.showChip(C)}),l==="fit"){let y=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ce=>Ce.closable),C=Math.round(o-((this.selectedHiddenChipsCount>0?T:0)+a+g+a));this.refreshChipDisplay({availableHorizontalChipElSpace:C,chipContainerElGap:a,chipEls:y}),this.setVisibleAndHiddenChips(y)}}setFloatingEl(e){this.floatingEl=e,D(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:l,largestSelectedIndicatorChipWidth:i}){let s=Math.round(i+e+l);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<s)&&(this.maxCompactBreakpoint=s),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){F(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){F(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,D(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(i=>{i.selected&&!i.classList.contains(c.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let l=Math.max(0,this.getSelectedItems().length-t);l!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=l)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(n=>!V(n)),{maxItems:l}=this,i=0,s=0;return t.length>=l&&t.forEach(n=>{if(i<l){let a=this.calculateScrollerHeight(n);s+=a,i+=1}}),s}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,l=`:scope > ${H}, :scope > ${M}`,i=Array.from(e.querySelectorAll(l)).reduce((s,n)=>s+n.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(e=!1){return e?Array.from(this.el.querySelectorAll(`${H}, ${M}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(l=>l.selected=l===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=A(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=W(e),l=Ie(e);e.selected?t.forEach(i=>{i.selected=!0}):(l.forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{I(i)||(i.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,l)=>{t===0&&(e.afterEmptyGroup=!1);let i=l[t+1];i&&(i.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(H)).filter(l=>e||!l.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(M))}addCustomChip(e,t){let l=this.items.find(i=>i.heading===e);if(l)this.toggleSelection(l,!0);else{let i=document.createElement("calcite-combobox-item");i.value=e,i.heading=e,this.el.prepend(i),this.updateItems(),this.toggleSelection(i,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&`${p.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,Y(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],l=this.listContainerEl;if(!t||!l)return;t.scrollIntoView({block:"nearest"});let s=this.selectAllComboboxItemRef.value?.offsetHeight||0,n=t.getBoundingClientRect(),a=l.getBoundingClientRect();n.top<a.top+s&&(l.scrollTop-=a.top+s-n.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,l=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(l),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((l,i)=>{i===e?(l.active=!0,t=`${p.item(l.guid)}`):l.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!w(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:l,textContent:i}){return d`<li aria-label=${e??f} aria-selected=${t??f} id=${l??f} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[...W(e)].reverse(),e].map(i=>A(i)).join(" / "):A(e)}renderChip({activeChipIndex:e,disabled:t,index:l,item:i,messages:s,readOnly:n,scale:a,isAncestors:o}){let r=this.getChipLabel(i,o);return S(i.guid||i.value||r,d`<calcite-chip .appearance=${n?"outline":"solid"} class=${h({[c.chip]:!0,[c.disabled]:t})} .closable=${!t&&!n} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${p.chip(i.guid)}`:null)??f} .label=${r} .messageOverrides=${t?null:{dismissLabel:s.removeTag}} @focusin=${t?null:()=>this.activeChipIndex=l} @calciteChipClose=${t?null:()=>this.calciteChipCloseHandler(i)} .scale=${a} .selected=${i.selected} .tabIndex=${!t&&e===l?0:-1} title=${r??f} .value=${i.value}>${r}</calcite-chip>`)}renderChipCount(e,t){let l=this.messages.disabledSelectedCount?.replace("{count}",`${e}`)??`+${e}`;return d`<calcite-chip appearance=solid class=${h({[c.chip]:!0})} .label=${l} .scale=${t} tabindex=-1 title=${l??f}>${l}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:l,selectionDisplay:i,selectionMode:s,messages:n}=this,a=[],o=s==="ancestors",r=this.allSelected&&!this.hasDisabledItems,u=this.allSelected&&this.hasDisabledSelected,b=this.allItems.filter(m=>m.disabled&&m.selected&&(!o||!I(m))),g=i==="all";if(i==="fit"&&(r||u)||i==="all"&&this.selectAllEnabled&&u||this.selectAllEnabled&&this.allSelected&&!this.hasDisabledItems)return null;let E=0,T=0;return g?this.allItems.forEach(m=>{if(m.disabled){m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!0,index:T++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}));return}(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&m.selected&&(!o||!I(m))&&a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}))}):(!this.selectAllEnabled||!this.allSelected||this.hasDisabledItems)&&this.selectedItems.forEach(m=>{a.push(this.renderChip({activeChipIndex:e,disabled:!1,index:E++,item:m,messages:n,readOnly:t,scale:l,isAncestors:o}))}),i==="fit"&&b.length&&a.push(this.renderChipCount(b.length,l)),a.length?a:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:l,selectedVisibleChipsCount:i}=this,s=t?this.messages.all:this.messages.allSelected,n=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="fit"&&this.hasDisabledSelected||this.selectionDisplay==="all"&&this.hasDisabledSelected);return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:!n,[c.allSelected]:!0})} .label=${s} .scale=${l} title=${s??f} value ${v(e)}>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i,selectedVisibleChipsCount:s,selectedIndicatorChipRef:n}=this,a=this.allSelected&&!this.hasDisabledItems,o=this.allSelected&&this.hasDisabledSelected,r,u;if(e)r=!0;else if(t==="single"){let b=this.allItems.filter(g=>g.selected&&(this.selectionMode!=="ancestors"||!I(g))).length;this.allSelected?r=!0:b>0?r=!1:r=!0,u=`${b} ${this.messages.selected}`}else t==="fit"&&(r=!!((a||o)&&s===0||i===0),u=s>0?`+${i}`:`${i} ${this.messages.selected}`);return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:r})} .label=${u} .scale=${l} title=${u??f} value ${v(n)}>${u}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:l,selectedHiddenChipsCount:i}=this,s=this.allSelected&&!this.hasDisabledItems,n=this.allSelected&&this.hasDisabledSelected,a,o;if(e){let r=this.allItems.filter(u=>u.selected&&(this.selectionMode!=="ancestors"||!I(u))).length;s||n||t==="single"&&this.allSelected?a=!0:t==="fit"?(a=!(i>0),o=`${i||0}`):t==="single"&&(a=!(r>0),o=`${r}`)}else a=!0;return d`<calcite-chip class=${h({[c.chip]:!0,[c.chipInvisible]:a})} .label=${o} .scale=${l} title=${o??f} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:l,selectionMode:i,selectedItems:s,open:n}=this,a=w(i),o=s[0],r=!n&&a&&!!o&&!this.filterText;return d`<span class=${h({[c.inputWrap]:!0,[c.inputWrapSingle]:a})}>${r&&S("label",d`<span class=${h({[c.label]:!0,[c.labelIcon]:!!o?.icon})}>${A(o)}</span>`)||""}${S("input",d`<input aria-activedescendant=${this.activeDescendant??f} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${n} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${pe(this)} class=${h({[c.input]:!0,[c.inputSingle]:!0,[c.inputHidden]:r,[c.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${l??f} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${U(this.filterText??"")} ${v(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:l,open:i,scale:s}=this,n={[c.listContainer]:!0,[B.animation]:!0,[B.animationActive]:i},a=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${h(c.floatingUIContainer)} popover=manual ${v(t)}><div class=${h(n)} ${v(l)}><ul class=${h({[c.list]:!0,[c.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${h(c.selectAll)} .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${s} .selected=${this.allSelected} tabindex=-1 value=select-all ${v(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${a??f} class=${h(c.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${be({text:a,pattern:new RegExp(`(${z(this.filterText)})`,"i")})}</li>`:d`<li class=${h({[c.noMatchesPlaceholder]:!0,[c.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:l,selectedItems:i}=this,s=i[0],n=s?.icon,a=t&&(e||!s);return this.showingInlineIcon&&S("selected-placeholder-icon",d`<span class=${h(c.iconStart)}><calcite-icon class=${h({[c.selectedIcon]:!a,[c.placeholderIcon]:a})} .flipRtl=${a?l:s.iconFlipRtl} .icon=${a?t:n} .scale=${O(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return S("chevron",d`<span class=${h(c.iconEnd)}><calcite-icon class=${h(c.icon)} .icon=${e?L.chevronUp:L.chevronDown} .scale=${O(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:l,open:i,readOnly:s}=this,n=w(this.selectionMode),a=e==="all",o=e==="single",r=!n&&e==="fit",u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length,b=this.hasDisabledItems;return this.interactiveContainer({disabled:this.disabled,children:d`${this.labelText&&ue({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${h({[c.wrapper]:!0,[c.wrapperSingle]:n||!this.selectedItems.length,[c.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${v(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${S("grid",d`<div class=${h({[c.gridInput]:!0,[c.selectionDisplayFit]:r,[c.selectionDisplaySingle]:o})} ${v(this.setChipContainerEl)}>${!n&&!o&&this.renderChips()||""}${!n&&!o&&this.selectAllEnabled&&a&&(!b||this.hasDisabledSelected)&&this.renderAllSelectedIndicatorChip()||""}${!n&&!a&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${h(c.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${l}</label>${this.renderInput()}</div>`)}${!s&&u?xe({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!s&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${h(c.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?me({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};J("calcite-combobox",q);export{q as Combobox};