@limetech/lime-elements 39.13.3 → 39.14.1

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 (184) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{_assignValue-D2D1zedG.js → _assignValue-DpsLUlF4.js} +25 -2
  3. package/dist/cjs/{_baseForOwn-QM0kHQT5.js → _baseEach-C570gT5Y.js} +43 -1
  4. package/dist/cjs/{_baseIsEqual-D6hrjmx4.js → _baseIsEqual-aOPReRWl.js} +1 -0
  5. package/dist/cjs/{_baseIteratee-iGEZ9pZY.js → _baseIteratee-DggA4e7a.js} +3 -1
  6. package/dist/cjs/_commonjsHelpers-CFO10eej.js +7 -0
  7. package/dist/cjs/_getAllKeysIn-BQIV8aw7.js +118 -0
  8. package/dist/cjs/_isIterateeCall-CPWXFS_s.js +72 -0
  9. package/dist/cjs/cloneDeep-CxFNKF1Y.js +619 -0
  10. package/dist/cjs/{isArrayLikeObject-CTP6Ak01.js → difference-Bfsq4sXB.js} +93 -5
  11. package/dist/cjs/{focus-trigger-element-NnpJ5nTp.js → focus-trigger-element-Brw8VubX.js} +1 -1
  12. package/dist/cjs/{format-D04vDIBj.js → format-D4jZb7Ls.js} +1 -1
  13. package/dist/cjs/{index-mbfaT7TB.js → index-BgFEL6FF.js} +1 -1
  14. package/dist/cjs/{isEmpty-DCC_l2Xp.js → isEmpty-EBCFxX1S.js} +1 -1
  15. package/dist/cjs/{isEqual-BsHLqE-x.js → isEqual-bXyw7kXo.js} +1 -1
  16. package/dist/cjs/lime-elements.cjs.js +1 -1
  17. package/dist/cjs/limel-badge.cjs.entry.js +2 -2
  18. package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +2 -3
  19. package/dist/cjs/limel-chip_2.cjs.entry.js +3 -3
  20. package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
  21. package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
  22. package/dist/cjs/limel-date-picker.cjs.entry.js +3 -3
  23. package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
  24. package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +5 -44
  25. package/dist/cjs/limel-file-viewer.cjs.entry.js +2 -2
  26. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +12 -74
  27. package/dist/cjs/limel-form.cjs.entry.js +38541 -50295
  28. package/dist/cjs/limel-markdown.cjs.entry.js +3 -3
  29. package/dist/cjs/limel-popover_2.cjs.entry.js +2 -3
  30. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +23 -481
  31. package/dist/cjs/limel-tab-bar.cjs.entry.js +4 -83
  32. package/dist/cjs/limel-table.cjs.entry.js +14 -269
  33. package/dist/cjs/loader.cjs.js +1 -1
  34. package/dist/cjs/{markdown-parser-DCnW9yak.js → markdown-parser-BIa99LAc.js} +2 -2
  35. package/dist/cjs/{moment-DCqC7BZP.js → moment-CqRdiK10.js} +1 -1
  36. package/dist/cjs/pickBy-kLjYLoam.js +201 -0
  37. package/dist/cjs/{sv-jO-ewmqh.js → sv-BSR4W58y.js} +1 -1
  38. package/dist/collection/components/form/adapters/widget-adapter.js +23 -30
  39. package/dist/collection/components/form/fields/array-field.js +39 -6
  40. package/dist/collection/components/form/fields/field-helpers.js +4 -4
  41. package/dist/collection/components/form/fields/object-field.js +4 -2
  42. package/dist/collection/components/form/fields/schema-field.js +33 -70
  43. package/dist/collection/components/form/form.css +19 -19
  44. package/dist/collection/components/form/form.js +40 -72
  45. package/dist/collection/components/form/form.test-schemas.js +308 -0
  46. package/dist/collection/components/form/row/row-context.js +2 -0
  47. package/dist/collection/components/form/row/row.js +2 -2
  48. package/dist/collection/components/form/templates/array-context.js +2 -0
  49. package/dist/collection/components/form/templates/array-field-collapsible-item.js +4 -4
  50. package/dist/collection/components/form/templates/array-field-item.js +47 -0
  51. package/dist/collection/components/form/templates/array-field-simple-item.js +6 -7
  52. package/dist/collection/components/form/templates/array-field.js +38 -94
  53. package/dist/collection/components/form/templates/index.js +1 -0
  54. package/dist/collection/components/form/templates/object-field.js +15 -11
  55. package/dist/collection/components/form/validation-display.js +75 -0
  56. package/dist/collection/components/form/validator.js +10 -0
  57. package/dist/collection/components/form/widgets/code-editor.js +1 -1
  58. package/dist/collection/components/form/widgets/select.js +2 -1
  59. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/create-html-inserter.js +2 -2
  60. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/factory-helpers/append-transaction-handler.js +7 -0
  61. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/trigger/inserter.js +1 -1
  62. package/dist/esm/{_assignValue-DkGAX8ec.js → _assignValue-DOEO9byf.js} +24 -2
  63. package/dist/esm/{_baseForOwn-CfpQNnvA.js → _baseEach-CL_-rBMy.js} +42 -2
  64. package/dist/esm/{_baseIsEqual-BvHnKRmD.js → _baseIsEqual-BfXMsuGh.js} +2 -2
  65. package/dist/esm/{_baseIteratee-DFBCJcMA.js → _baseIteratee-kS1-0_xD.js} +3 -3
  66. package/dist/esm/_commonjsHelpers-B85MJLTf.js +5 -0
  67. package/dist/esm/_getAllKeysIn-BKpeslPJ.js +113 -0
  68. package/dist/esm/_isIterateeCall-CTcCv8Mb.js +69 -0
  69. package/dist/esm/cloneDeep-BXAw5H-1.js +609 -0
  70. package/dist/esm/{isArrayLikeObject-D7yRwRv4.js → difference-DMAjHh-t.js} +91 -7
  71. package/dist/esm/{focus-trigger-element-6aEStEKM.js → focus-trigger-element-DubROLkE.js} +1 -1
  72. package/dist/esm/{format-BMPGHLQ8.js → format-hTrthuPP.js} +1 -1
  73. package/dist/esm/{index-DJJymEnS.js → index-t4DgGbWS.js} +1 -1
  74. package/dist/esm/{isArrayLike-bWHU4ebg.js → isArrayLike-D1QkaJU2.js} +1 -1
  75. package/dist/esm/{isEmpty-tfwtR2ai.js → isEmpty-DrFXbHWO.js} +2 -2
  76. package/dist/esm/{isEqual-BkQ4Z_9r.js → isEqual-CpaoJ_AF.js} +1 -1
  77. package/dist/esm/lime-elements.js +1 -1
  78. package/dist/esm/limel-badge.entry.js +2 -2
  79. package/dist/esm/limel-breadcrumbs_7.entry.js +2 -3
  80. package/dist/esm/limel-chip_2.entry.js +4 -4
  81. package/dist/esm/limel-circular-progress.entry.js +2 -2
  82. package/dist/esm/limel-code-editor.entry.js +1 -1
  83. package/dist/esm/limel-date-picker.entry.js +3 -3
  84. package/dist/esm/limel-dialog.entry.js +3 -3
  85. package/dist/esm/limel-file-dropzone_2.entry.js +4 -43
  86. package/dist/esm/limel-file-viewer.entry.js +2 -2
  87. package/dist/esm/limel-flatpickr-adapter.entry.js +8 -70
  88. package/dist/esm/limel-form.entry.js +38553 -50307
  89. package/dist/esm/limel-markdown.entry.js +3 -3
  90. package/dist/esm/limel-popover_2.entry.js +2 -3
  91. package/dist/esm/limel-prosemirror-adapter.entry.js +22 -480
  92. package/dist/esm/limel-tab-bar.entry.js +4 -83
  93. package/dist/esm/limel-table.entry.js +11 -266
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/esm/{markdown-parser-CXYHPPe2.js → markdown-parser-D7vLKElE.js} +2 -2
  96. package/dist/esm/{moment-DhvPC9Jt.js → moment-DQRNe8qq.js} +1 -1
  97. package/dist/esm/pickBy-BEA90LIZ.js +195 -0
  98. package/dist/esm/{sv-84mf7Xsv.js → sv-CY-6-yEp.js} +1 -1
  99. package/dist/lime-elements/lime-elements.esm.js +1 -1
  100. package/dist/lime-elements/p-1cb2d781.entry.js +13 -0
  101. package/dist/lime-elements/{p-00d6ccd6.entry.js → p-25ae3a55.entry.js} +5 -5
  102. package/dist/lime-elements/{p-be0cbddb.entry.js → p-374ec191.entry.js} +1 -1
  103. package/dist/lime-elements/p-3a662d7e.entry.js +1 -0
  104. package/dist/lime-elements/{p-f0f5eda1.entry.js → p-41be4893.entry.js} +1 -1
  105. package/dist/lime-elements/{p-c84911e6.entry.js → p-4ad193a2.entry.js} +1 -1
  106. package/dist/lime-elements/{p-dd7a2361.entry.js → p-4ce682cf.entry.js} +3 -3
  107. package/dist/lime-elements/{p-eeae0ef6.entry.js → p-5ee484a7.entry.js} +4 -4
  108. package/dist/lime-elements/{p-b1d6553c.entry.js → p-77abb595.entry.js} +1 -1
  109. package/dist/lime-elements/p-8065425a.entry.js +1 -0
  110. package/dist/lime-elements/{p-77ba0f66.entry.js → p-8299af78.entry.js} +1 -1
  111. package/dist/lime-elements/{p-87c5e951.entry.js → p-8c7a7003.entry.js} +1 -1
  112. package/dist/lime-elements/{p-ce20d720.entry.js → p-97c401f1.entry.js} +1 -1
  113. package/dist/lime-elements/p-9a378cf0.entry.js +1 -0
  114. package/dist/lime-elements/p-B3zCFNAw.js +1 -0
  115. package/dist/lime-elements/p-B6bNnxRu.js +1 -0
  116. package/dist/lime-elements/p-B85MJLTf.js +1 -0
  117. package/dist/lime-elements/p-BCMRfUKp.js +1 -0
  118. package/dist/lime-elements/p-BbU4FGNT.js +1 -0
  119. package/dist/lime-elements/p-Bp0tNo1s.js +1 -0
  120. package/dist/lime-elements/{p-DpyWBa_Z.js → p-Bt64o80S.js} +1 -1
  121. package/dist/lime-elements/{p-BqiDn_Sf.js → p-BvDmWgCs.js} +1 -1
  122. package/dist/lime-elements/p-CMjGNANG.js +1 -0
  123. package/dist/lime-elements/p-DFWcgJ_i.js +1 -0
  124. package/dist/lime-elements/{p-B4YDb6f3.js → p-DJvGLFul.js} +1 -1
  125. package/dist/lime-elements/p-DTXIk0fN.js +1 -0
  126. package/dist/lime-elements/{p-BgPHaiMH.js → p-D_uMnX5g.js} +1 -1
  127. package/dist/lime-elements/{p-g3InYy9F.js → p-DdYOzHlg.js} +1 -1
  128. package/dist/lime-elements/{p-ndpPJpml.js → p-DsDkl4Sy.js} +1 -1
  129. package/dist/lime-elements/p-UGKt6Ywx.js +1 -0
  130. package/dist/lime-elements/p-afcf580c.entry.js +16 -0
  131. package/dist/lime-elements/p-f6c3f49b.entry.js +1 -0
  132. package/dist/lime-elements/p-v6b303K5.js +1 -0
  133. package/dist/lime-elements/p-xQsJdKrq.js +1 -0
  134. package/dist/lime-elements/{p-BYx8mudw.js → p-zo6O9LC9.js} +2 -2
  135. package/dist/types/components/form/adapters/widget-adapter.d.ts +3 -2
  136. package/dist/types/components/form/fields/array-field.d.ts +11 -19
  137. package/dist/types/components/form/fields/object-field.d.ts +2 -2
  138. package/dist/types/components/form/fields/schema-field.d.ts +5 -18
  139. package/dist/types/components/form/form.d.ts +4 -8
  140. package/dist/types/components/form/form.test-schemas.d.ts +30 -0
  141. package/dist/types/components/form/row/row-context.d.ts +2 -0
  142. package/dist/types/components/form/templates/array-context.d.ts +7 -0
  143. package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +7 -11
  144. package/dist/types/components/form/templates/array-field-item.d.ts +6 -0
  145. package/dist/types/components/form/templates/array-field-simple-item.d.ts +7 -9
  146. package/dist/types/components/form/templates/array-field.d.ts +7 -8
  147. package/dist/types/components/form/templates/index.d.ts +1 -0
  148. package/dist/types/components/form/templates/object-field.d.ts +6 -1
  149. package/dist/types/components/form/templates/types.d.ts +2 -4
  150. package/dist/types/components/form/validation-display.d.ts +60 -0
  151. package/dist/types/components/form/validator.d.ts +6 -0
  152. package/dist/types/components/form/widgets/code-editor.d.ts +1 -1
  153. package/dist/types/components/form/widgets/types.d.ts +1 -1
  154. package/dist/types/components/text-editor/prosemirror-adapter/plugins/trigger/create-html-inserter.d.ts +2 -1
  155. package/package.json +4 -2
  156. package/dist/cjs/_baseAssignValue-BJgt6T7z.js +0 -27
  157. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
  158. package/dist/cjs/_getPrototype-BK9cL-57.js +0 -8
  159. package/dist/cjs/negate-Bg3SqQh6.js +0 -42
  160. package/dist/collection/components/form/fields/types.js +0 -1
  161. package/dist/collection/components/form/schema-cache.js +0 -66
  162. package/dist/esm/_baseAssignValue-C8Uwn8zr.js +0 -25
  163. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
  164. package/dist/esm/_getPrototype-jV9gkkJy.js +0 -6
  165. package/dist/esm/negate-ooVD-6_a.js +0 -40
  166. package/dist/lime-elements/p-45dfcaf3.entry.js +0 -1
  167. package/dist/lime-elements/p-5db2d069.entry.js +0 -1
  168. package/dist/lime-elements/p-9728aa4a.entry.js +0 -1
  169. package/dist/lime-elements/p-BFTU3MAI.js +0 -1
  170. package/dist/lime-elements/p-BlJd1RC5.js +0 -1
  171. package/dist/lime-elements/p-C6SEjICu.js +0 -1
  172. package/dist/lime-elements/p-CqEHNkif.js +0 -1
  173. package/dist/lime-elements/p-Cs5T63LB.js +0 -1
  174. package/dist/lime-elements/p-Cw1B5fXE.js +0 -1
  175. package/dist/lime-elements/p-DKxusNKT.js +0 -1
  176. package/dist/lime-elements/p-DrjUjEz3.js +0 -1
  177. package/dist/lime-elements/p-DzlmgobW.js +0 -1
  178. package/dist/lime-elements/p-ZcW3uvZL.js +0 -1
  179. package/dist/lime-elements/p-a4a09ce9.entry.js +0 -7
  180. package/dist/lime-elements/p-c4e2885d.entry.js +0 -16
  181. package/dist/lime-elements/p-ee80a6f2.entry.js +0 -1
  182. package/dist/lime-elements/p-ooVD-6_a.js +0 -1
  183. package/dist/types/components/form/fields/types.d.ts +0 -41
  184. package/dist/types/components/form/schema-cache.d.ts +0 -17
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,a as e}from"./p-DBTJNfo7.js";import{c as h}from"./p-JbKhhoXs.js";import{i as a,a as n}from"./p-B-tmXAXV.js";import"./p-ndpPJpml.js";import{m as r}from"./p-BYx8mudw.js";import{M as o}from"./p-DZkKQUDM.js";import"./p-BFTU3MAI.js";import"./p-ChRGk668.js";import"./p-BN1-aIOw.js";import"./p-C9yTLqR8.js";class l{constructor(t="en"){this.language=t}formatDate(t,i){return t?r(t).locale(this.getLanguage()).format(i):""}parseDate(t,i){return t?r(t,i).toDate():null}getLanguage(){return"no"===this.language?"nb":this.language}getDateFormat(t){return{date:"L",time:"LT",week:"[w] W GGGG",month:"MM/YYYY",quarter:"[Q]Q YYYY",year:"YYYY",datetime:"L - LT"}[t]||"L - LT"}}const d={date:"date",time:"time",week:a()?"date":"week",month:"month",quarter:"date",year:"date",datetime:"datetime-local",default:"datetime-local"},m={date:"Y-MM-DD",time:"HH:mm",week:"GGGG-[W]WW",month:"Y-MM","datetime-local":"Y-MM-DD[T]HH:mm"},p=class{constructor(s){t(this,s),this.change=i(this,"change"),this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.type="datetime",this.language="en",this.showPortal=!1,this.portalId=`date-picker-calendar-${h()}`,this.documentClickListener=t=>{t.composedPath().includes(this.textField)||document.querySelector(`#${this.portalId}`).contains(t.target)||this.hideCalendar()},this.formatValue=t=>this.dateFormatter.formatDate(t,this.internalFormat),this.handleCalendarChange=this.handleCalendarChange.bind(this),this.handleInputElementChange=this.handleInputElementChange.bind(this),this.showCalendar=this.showCalendar.bind(this),this.dateFormatter=new l(this.language),this.clearValue=this.clearValue.bind(this),this.hideCalendar=this.hideCalendar.bind(this),this.onInputClick=this.onInputClick.bind(this),this.nativeChangeHandler=this.nativeChangeHandler.bind(this),this.preventBlurFromCalendarContainer=this.preventBlurFromCalendarContainer.bind(this)}componentWillLoad(){this.useNative=!this.readonly&&(a()||n()),this.updateInternalFormatAndType()}componentWillUpdate(){this.updateInternalFormatAndType()}disconnectedCallback(){this.hideCalendar()}render(){const t={onAction:this.clearValue};!this.value||this.readonly||this.disabled||(t.trailingIcon="clear_symbol");const i=this.disabled||this.readonly?void 0:this.helperText;if(this.useNative)return s("limel-input-field",{disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,helperText:i,required:this.required,value:this.formatValue(this.value),type:this.nativeType,onChange:this.nativeChangeHandler});const e=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index"),h=this.formatter||this.formatValue;return[s("limel-input-field",Object.assign({disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,placeholder:this.placeholder,helperText:i,required:this.required,value:this.value?h(this.value):"",onFocus:this.showCalendar,onBlur:this.hideCalendar,onClick:this.onInputClick,onChange:this.handleInputElementChange,ref:t=>this.textField=t},t)),s("limel-portal",{containerId:this.portalId,visible:this.showPortal,containerStyle:{"z-index":e}},s("limel-flatpickr-adapter",{format:this.internalFormat,language:this.language,type:this.type,value:this.value,ref:t=>this.datePickerCalendar=t,isOpen:this.showPortal,formatter:h,onChange:this.handleCalendarChange}))]}updateInternalFormatAndType(){this.nativeType=d[this.type||"default"],this.nativeFormat=m[this.nativeType],this.internalFormat=this.useNative?this.nativeFormat:this.formatter||this.format?this.format:this.dateFormatter.getDateFormat(this.type)}nativeChangeHandler(t){t.stopPropagation();const i=this.dateFormatter.parseDate(t.detail,this.internalFormat);this.change.emit(i)}showCalendar(t){if(this.disabled||this.readonly)return void t.stopPropagation();this.showPortal=!0;const i=this.textField.shadowRoot.querySelector("input");setTimeout((()=>{this.datePickerCalendar.inputElement=i})),t.stopPropagation(),document.addEventListener("mousedown",this.documentClickListener,{passive:!0}),document.addEventListener("blur",this.preventBlurFromCalendarContainer,{capture:!0})}preventBlurFromCalendarContainer(t){t.relatedTarget===this.datePickerCalendar&&t.stopPropagation()}hideCalendar(){setTimeout((()=>{this.showPortal=!1})),document.removeEventListener("mousedown",this.documentClickListener),document.removeEventListener("blur",this.preventBlurFromCalendarContainer,{capture:!0}),this.pickerIsAutoClosing()||this.fixFlatpickrFocusBug()}fixFlatpickrFocusBug(){const t=new o(this.textField.shadowRoot.querySelector(".mdc-text-field"));t.getDefaultFoundation().deactivateFocus(),t.valid=!this.invalid}handleCalendarChange(t){const i=t.detail;t.stopPropagation(),this.pickerIsAutoClosing()&&this.hideCalendar(),this.change.emit(i)}onInputClick(t){this.disabled||this.readonly||this.showPortal||this.showCalendar(t)}handleInputElementChange(t){this.disabled||this.readonly||""===t.detail&&this.clearValue(),t.stopPropagation()}pickerIsAutoClosing(){return"datetime"!==this.type&&"time"!==this.type}clearValue(){this.change.emit(null)}get host(){return e(this)}};p.style=":host(limel-date-picker){position:relative}limel-input-field[disabled],limel-input-field[readonly]{pointer-events:none}";export{p as limel_date_picker}
1
+ import{r as t,c as i,h as s,a as e}from"./p-DBTJNfo7.js";import{c as h}from"./p-JbKhhoXs.js";import{i as a,a as n}from"./p-B-tmXAXV.js";import"./p-DsDkl4Sy.js";import{m as r}from"./p-zo6O9LC9.js";import{M as o}from"./p-DZkKQUDM.js";import"./p-B85MJLTf.js";import"./p-ChRGk668.js";import"./p-BN1-aIOw.js";import"./p-C9yTLqR8.js";class l{constructor(t="en"){this.language=t}formatDate(t,i){return t?r(t).locale(this.getLanguage()).format(i):""}parseDate(t,i){return t?r(t,i).toDate():null}getLanguage(){return"no"===this.language?"nb":this.language}getDateFormat(t){return{date:"L",time:"LT",week:"[w] W GGGG",month:"MM/YYYY",quarter:"[Q]Q YYYY",year:"YYYY",datetime:"L - LT"}[t]||"L - LT"}}const d={date:"date",time:"time",week:a()?"date":"week",month:"month",quarter:"date",year:"date",datetime:"datetime-local",default:"datetime-local"},m={date:"Y-MM-DD",time:"HH:mm",week:"GGGG-[W]WW",month:"Y-MM","datetime-local":"Y-MM-DD[T]HH:mm"},p=class{constructor(s){t(this,s),this.change=i(this,"change"),this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.type="datetime",this.language="en",this.showPortal=!1,this.portalId=`date-picker-calendar-${h()}`,this.documentClickListener=t=>{t.composedPath().includes(this.textField)||document.querySelector(`#${this.portalId}`).contains(t.target)||this.hideCalendar()},this.formatValue=t=>this.dateFormatter.formatDate(t,this.internalFormat),this.handleCalendarChange=this.handleCalendarChange.bind(this),this.handleInputElementChange=this.handleInputElementChange.bind(this),this.showCalendar=this.showCalendar.bind(this),this.dateFormatter=new l(this.language),this.clearValue=this.clearValue.bind(this),this.hideCalendar=this.hideCalendar.bind(this),this.onInputClick=this.onInputClick.bind(this),this.nativeChangeHandler=this.nativeChangeHandler.bind(this),this.preventBlurFromCalendarContainer=this.preventBlurFromCalendarContainer.bind(this)}componentWillLoad(){this.useNative=!this.readonly&&(a()||n()),this.updateInternalFormatAndType()}componentWillUpdate(){this.updateInternalFormatAndType()}disconnectedCallback(){this.hideCalendar()}render(){const t={onAction:this.clearValue};!this.value||this.readonly||this.disabled||(t.trailingIcon="clear_symbol");const i=this.disabled||this.readonly?void 0:this.helperText;if(this.useNative)return s("limel-input-field",{disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,helperText:i,required:this.required,value:this.formatValue(this.value),type:this.nativeType,onChange:this.nativeChangeHandler});const e=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index"),h=this.formatter||this.formatValue;return[s("limel-input-field",Object.assign({disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,placeholder:this.placeholder,helperText:i,required:this.required,value:this.value?h(this.value):"",onFocus:this.showCalendar,onBlur:this.hideCalendar,onClick:this.onInputClick,onChange:this.handleInputElementChange,ref:t=>this.textField=t},t)),s("limel-portal",{containerId:this.portalId,visible:this.showPortal,containerStyle:{"z-index":e}},s("limel-flatpickr-adapter",{format:this.internalFormat,language:this.language,type:this.type,value:this.value,ref:t=>this.datePickerCalendar=t,isOpen:this.showPortal,formatter:h,onChange:this.handleCalendarChange}))]}updateInternalFormatAndType(){this.nativeType=d[this.type||"default"],this.nativeFormat=m[this.nativeType],this.internalFormat=this.useNative?this.nativeFormat:this.formatter||this.format?this.format:this.dateFormatter.getDateFormat(this.type)}nativeChangeHandler(t){t.stopPropagation();const i=this.dateFormatter.parseDate(t.detail,this.internalFormat);this.change.emit(i)}showCalendar(t){if(this.disabled||this.readonly)return void t.stopPropagation();this.showPortal=!0;const i=this.textField.shadowRoot.querySelector("input");setTimeout((()=>{this.datePickerCalendar.inputElement=i})),t.stopPropagation(),document.addEventListener("mousedown",this.documentClickListener,{passive:!0}),document.addEventListener("blur",this.preventBlurFromCalendarContainer,{capture:!0})}preventBlurFromCalendarContainer(t){t.relatedTarget===this.datePickerCalendar&&t.stopPropagation()}hideCalendar(){setTimeout((()=>{this.showPortal=!1})),document.removeEventListener("mousedown",this.documentClickListener),document.removeEventListener("blur",this.preventBlurFromCalendarContainer,{capture:!0}),this.pickerIsAutoClosing()||this.fixFlatpickrFocusBug()}fixFlatpickrFocusBug(){const t=new o(this.textField.shadowRoot.querySelector(".mdc-text-field"));t.getDefaultFoundation().deactivateFocus(),t.valid=!this.invalid}handleCalendarChange(t){const i=t.detail;t.stopPropagation(),this.pickerIsAutoClosing()&&this.hideCalendar(),this.change.emit(i)}onInputClick(t){this.disabled||this.readonly||this.showPortal||this.showCalendar(t)}handleInputElementChange(t){this.disabled||this.readonly||""===t.detail&&this.clearValue(),t.stopPropagation()}pickerIsAutoClosing(){return"datetime"!==this.type&&"time"!==this.type}clearValue(){this.change.emit(null)}get host(){return e(this)}};p.style=":host(limel-date-picker){position:relative}limel-input-field[disabled],limel-input-field[readonly]{pointer-events:none}";export{p as limel_date_picker}
@@ -1,4 +1,4 @@
1
- import{r as i,c as t,h as o,a as e}from"./p-DBTJNfo7.js";import{d as a}from"./p-z_E3sq3p.js";import{c as d}from"./p-JbKhhoXs.js";import{_ as n,a as c,M as r,b as l,c as s,d as m,m as g}from"./p-ChRGk668.js";import{M as h}from"./p-BN1-aIOw.js";import{i as u}from"./p-DKxusNKT.js";import"./p-C6SEjICu.js";import"./p-DtS35Df5.js";import"./p-BJQylLSL.js";import"./p-efBXH4mj.js";import"./p-B8VKuhvH.js";import"./p-oiMYqRQ0.js";import"./p-BgPHaiMH.js";
1
+ import{r as i,c as t,h as o,a as e}from"./p-DBTJNfo7.js";import{d as a}from"./p-z_E3sq3p.js";import{c as d}from"./p-JbKhhoXs.js";import{_ as n,a as c,M as r,b as l,c as s,d as m,m as g}from"./p-ChRGk668.js";import{M as h}from"./p-BN1-aIOw.js";import{i as u}from"./p-DTXIk0fN.js";import"./p-DFWcgJ_i.js";import"./p-DtS35Df5.js";import"./p-BJQylLSL.js";import"./p-efBXH4mj.js";import"./p-B8VKuhvH.js";import"./p-oiMYqRQ0.js";import"./p-D_uMnX5g.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2016 Google Inc.
@@ -43,7 +43,7 @@ import{r as i,c as t,h as o,a as e}from"./p-DBTJNfo7.js";import{d as a}from"./p-
43
43
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44
44
  * THE SOFTWARE.
45
45
  */
46
- var f,p="mdc-dom-focus-sentinel",_=function(){function i(i,t){void 0===t&&(t={}),this.root=i,this.options=t,this.elFocusedBeforeTrapFocus=null}return i.prototype.trapFocus=function(){var i=this.getFocusableElements(this.root);if(0===i.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root),this.options.skipInitialFocus||this.focusInitialElement(i,this.options.initialFocusEl)},i.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+p)).forEach((function(i){i.parentElement.removeChild(i)})),!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},i.prototype.wrapTabFocus=function(i){var t=this,o=this.createSentinel(),e=this.createSentinel();o.addEventListener("focus",(function(){var o=t.getFocusableElements(i);o.length>0&&o[o.length-1].focus()})),e.addEventListener("focus",(function(){var o=t.getFocusableElements(i);o.length>0&&o[0].focus()})),i.insertBefore(o,i.children[0]),i.appendChild(e)},i.prototype.focusInitialElement=function(i,t){var o=0;t&&(o=Math.max(i.indexOf(t),0)),i[o].focus()},i.prototype.getFocusableElements=function(i){return[].slice.call(i.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter((function(i){var t="true"===i.getAttribute("aria-disabled")||null!=i.getAttribute("disabled")||null!=i.getAttribute("hidden")||"true"===i.getAttribute("aria-hidden"),o=i.tabIndex>=0&&i.getBoundingClientRect().width>0&&!i.classList.contains(p)&&!t,e=!1;if(o){var a=getComputedStyle(i);e="none"===a.display||"hidden"===a.visibility}return o&&!e}))},i.prototype.createSentinel=function(){var i=document.createElement("div");return i.setAttribute("tabindex","0"),i.setAttribute("aria-hidden","true"),i.classList.add(p),i},i}(),b=function(){function i(){this.rafIDs=new Map}return i.prototype.request=function(i,t){var o=this;this.cancel(i);var e=requestAnimationFrame((function(e){o.rafIDs.delete(i),t(e)}));this.rafIDs.set(i,e)},i.prototype.cancel=function(i){var t=this.rafIDs.get(i);t&&(cancelAnimationFrame(t),this.rafIDs.delete(i))},i.prototype.cancelAll=function(){var i=this;this.rafIDs.forEach((function(t,o){i.cancel(o)}))},i.prototype.getQueue=function(){var i=[];return this.rafIDs.forEach((function(t,o){i.push(o)})),i},i}(),x={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked",FULLSCREEN:"mdc-dialog--fullscreen",SCROLL_DIVIDER_HEADER:"mdc-dialog-scroll-divider-header",SCROLL_DIVIDER_FOOTER:"mdc-dialog-scroll-divider-footer",SURFACE_SCRIM_SHOWN:"mdc-dialog__surface-scrim--shown",SURFACE_SCRIM_SHOWING:"mdc-dialog__surface-scrim--showing",SURFACE_SCRIM_HIDING:"mdc-dialog__surface-scrim--hiding",SCRIM_HIDDEN:"mdc-dialog__scrim--hidden"},v={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item",".mdc-menu .mdc-deprecated-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},y={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150};!function(i){i.POLL_SCROLL_POS="poll_scroll_position",i.POLL_LAYOUT_CHANGE="poll_layout_change"}(f||(f={}));var w=function(i){function t(o){var e=i.call(this,c(c({},t.defaultAdapter),o))||this;return e.dialogOpen=!1,e.isFullscreen=!1,e.animationFrame=0,e.animationTimer=0,e.escapeKeyAction=v.CLOSE_ACTION,e.scrimClickAction=v.CLOSE_ACTION,e.autoStackButtons=!0,e.areButtonsStacked=!1,e.suppressDefaultPressSelector=v.SUPPRESS_DEFAULT_PRESS_SELECTOR,e.animFrame=new b,e.contentScrollHandler=function(){e.handleScrollEvent()},e.windowResizeHandler=function(){e.layout()},e.windowOrientationChangeHandler=function(){e.layout()},e}return n(t,i),Object.defineProperty(t,"cssClasses",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){},registerContentEventHandler:function(){},deregisterContentEventHandler:function(){},isScrollableContentAtTop:function(){return!1},isScrollableContentAtBottom:function(){return!1},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.hasClass(x.STACKED)&&this.setAutoStackButtons(!1),this.isFullscreen=this.adapter.hasClass(x.FULLSCREEN)},t.prototype.destroy=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.handleAnimationTimerEnd()),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.animFrame.cancelAll(),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)},t.prototype.open=function(i){var t=this;this.dialogOpen=!0,this.adapter.notifyOpening(),this.adapter.addClass(x.OPENING),this.isFullscreen&&this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler),i&&i.isAboveFullscreenDialog&&this.adapter.addClass(x.SCRIM_HIDDEN),this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler),this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),this.runNextAnimationFrame((function(){t.adapter.addClass(x.OPEN),t.adapter.addBodyClass(x.SCROLL_LOCK),t.layout(),t.animationTimer=setTimeout((function(){t.handleAnimationTimerEnd(),t.adapter.trapFocus(t.adapter.getInitialFocusEl()),t.adapter.notifyOpened()}),y.DIALOG_ANIMATION_OPEN_TIME_MS)}))},t.prototype.close=function(i){var t=this;void 0===i&&(i=""),this.dialogOpen&&(this.dialogOpen=!1,this.adapter.notifyClosing(i),this.adapter.addClass(x.CLOSING),this.adapter.removeClass(x.OPEN),this.adapter.removeBodyClass(x.SCROLL_LOCK),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=setTimeout((function(){t.adapter.releaseFocus(),t.handleAnimationTimerEnd(),t.adapter.notifyClosed(i)}),y.DIALOG_ANIMATION_CLOSE_TIME_MS))},t.prototype.showSurfaceScrim=function(){var i=this;this.adapter.addClass(x.SURFACE_SCRIM_SHOWING),this.runNextAnimationFrame((function(){i.adapter.addClass(x.SURFACE_SCRIM_SHOWN)}))},t.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(x.SURFACE_SCRIM_SHOWN),this.adapter.addClass(x.SURFACE_SCRIM_HIDING)},t.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(x.SURFACE_SCRIM_HIDING),this.adapter.removeClass(x.SURFACE_SCRIM_SHOWING)},t.prototype.isOpen=function(){return this.dialogOpen},t.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction},t.prototype.setEscapeKeyAction=function(i){this.escapeKeyAction=i},t.prototype.getScrimClickAction=function(){return this.scrimClickAction},t.prototype.setScrimClickAction=function(i){this.scrimClickAction=i},t.prototype.getAutoStackButtons=function(){return this.autoStackButtons},t.prototype.setAutoStackButtons=function(i){this.autoStackButtons=i},t.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},t.prototype.setSuppressDefaultPressSelector=function(i){this.suppressDefaultPressSelector=i},t.prototype.layout=function(){var i=this;this.animFrame.request(f.POLL_LAYOUT_CHANGE,(function(){i.layoutInternal()}))},t.prototype.handleClick=function(i){if(this.adapter.eventTargetMatches(i.target,v.SCRIM_SELECTOR)&&""!==this.scrimClickAction)this.close(this.scrimClickAction);else{var t=this.adapter.getActionFromEvent(i);t&&this.close(t)}},t.prototype.handleKeydown=function(i){var t="Enter"===i.key||13===i.keyCode;if(t&&!this.adapter.getActionFromEvent(i)){var o=i.composedPath?i.composedPath()[0]:i.target,e=!this.suppressDefaultPressSelector||!this.adapter.eventTargetMatches(o,this.suppressDefaultPressSelector);t&&e&&this.adapter.clickDefaultButton()}},t.prototype.handleDocumentKeydown=function(i){("Escape"===i.key||27===i.keyCode)&&""!==this.escapeKeyAction&&this.close(this.escapeKeyAction)},t.prototype.handleScrollEvent=function(){var i=this;this.animFrame.request(f.POLL_SCROLL_POS,(function(){i.toggleScrollDividerHeader(),i.toggleScrollDividerFooter()}))},t.prototype.layoutInternal=function(){this.autoStackButtons&&this.detectStackedButtons(),this.toggleScrollableClasses()},t.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(x.OPENING),this.adapter.removeClass(x.CLOSING)},t.prototype.runNextAnimationFrame=function(i){var t=this;cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame((function(){t.animationFrame=0,clearTimeout(t.animationTimer),t.animationTimer=setTimeout(i,0)}))},t.prototype.detectStackedButtons=function(){this.adapter.removeClass(x.STACKED);var i=this.adapter.areButtonsStacked();i&&this.adapter.addClass(x.STACKED),i!==this.areButtonsStacked&&(this.adapter.reverseButtons(),this.areButtonsStacked=i)},t.prototype.toggleScrollableClasses=function(){this.adapter.removeClass(x.SCROLLABLE),this.adapter.isContentScrollable()&&(this.adapter.addClass(x.SCROLLABLE),this.isFullscreen&&(this.toggleScrollDividerHeader(),this.toggleScrollDividerFooter()))},t.prototype.toggleScrollDividerHeader=function(){this.adapter.isScrollableContentAtTop()?this.adapter.hasClass(x.SCROLL_DIVIDER_HEADER)&&this.adapter.removeClass(x.SCROLL_DIVIDER_HEADER):this.adapter.addClass(x.SCROLL_DIVIDER_HEADER)},t.prototype.toggleScrollDividerFooter=function(){this.adapter.isScrollableContentAtBottom()?this.adapter.hasClass(x.SCROLL_DIVIDER_FOOTER)&&this.adapter.removeClass(x.SCROLL_DIVIDER_FOOTER):this.adapter.addClass(x.SCROLL_DIVIDER_FOOTER)},t}(r),C=w.strings,E=function(i){function t(){return null!==i&&i.apply(this,arguments)||this}return n(t,i),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(i){this.foundation.setEscapeKeyAction(i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(i){this.foundation.setScrimClickAction(i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(i){this.foundation.setAutoStackButtons(i)},enumerable:!1,configurable:!0}),t.attachTo=function(i){return new t(i)},t.prototype.initialize=function(i){var t,o;void 0===i&&(i=function(i,t){return new _(i,t)});var e=this.root.querySelector(C.CONTAINER_SELECTOR);if(!e)throw new Error("Dialog component requires a "+C.CONTAINER_SELECTOR+" container element");this.container=e,this.content=this.root.querySelector(C.CONTENT_SELECTOR),this.buttons=[].slice.call(this.root.querySelectorAll(C.BUTTON_SELECTOR)),this.defaultButton=this.root.querySelector("["+C.BUTTON_DEFAULT_ATTRIBUTE+"]"),this.focusTrapFactory=i,this.buttonRipples=[];try{for(var a=l(this.buttons),d=a.next();!d.done;d=a.next())this.buttonRipples.push(new h(d.value))}catch(i){t={error:i}}finally{try{d&&!d.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}},t.prototype.initialSyncWithDOM=function(){var i=this;this.focusTrap=(0,this.focusTrapFactory)(this.container,{initialFocusEl:this.getInitialFocusEl()||void 0}),this.handleClick=this.foundation.handleClick.bind(this.foundation),this.handleKeydown=this.foundation.handleKeydown.bind(this.foundation),this.handleDocumentKeydown=this.foundation.handleDocumentKeydown.bind(this.foundation),this.handleOpening=function(){document.addEventListener("keydown",i.handleDocumentKeydown)},this.handleClosing=function(){document.removeEventListener("keydown",i.handleDocumentKeydown)},this.listen("click",this.handleClick),this.listen("keydown",this.handleKeydown),this.listen(C.OPENING_EVENT,this.handleOpening),this.listen(C.CLOSING_EVENT,this.handleClosing)},t.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.unlisten("keydown",this.handleKeydown),this.unlisten(C.OPENING_EVENT,this.handleOpening),this.unlisten(C.CLOSING_EVENT,this.handleClosing),this.handleClosing(),this.buttonRipples.forEach((function(i){i.destroy()})),i.prototype.destroy.call(this)},t.prototype.layout=function(){this.foundation.layout()},t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(i){void 0===i&&(i=""),this.foundation.close(i)},t.prototype.getDefaultFoundation=function(){var i=this;return new w({addBodyClass:function(i){return document.body.classList.add(i)},addClass:function(t){return i.root.classList.add(t)},areButtonsStacked:function(){return t=i.buttons,o=new Set,[].forEach.call(t,(function(i){return o.add(i.offsetTop)})),o.size>1;var t,o},clickDefaultButton:function(){i.defaultButton&&!i.defaultButton.disabled&&i.defaultButton.click()},eventTargetMatches:function(i,t){return!!i&&g(i,t)},getActionFromEvent:function(i){if(!i.target)return"";var t=m(i.target,"["+C.ACTION_ATTRIBUTE+"]");return t&&t.getAttribute(C.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return i.getInitialFocusEl()},hasClass:function(t){return i.root.classList.contains(t)},isContentScrollable:function(){return!!(t=i.content)&&t.scrollHeight>t.offsetHeight;var t},notifyClosed:function(t){return i.emit(C.CLOSED_EVENT,t?{action:t}:{})},notifyClosing:function(t){return i.emit(C.CLOSING_EVENT,t?{action:t}:{})},notifyOpened:function(){return i.emit(C.OPENED_EVENT,{})},notifyOpening:function(){return i.emit(C.OPENING_EVENT,{})},releaseFocus:function(){i.focusTrap.releaseFocus()},removeBodyClass:function(i){return document.body.classList.remove(i)},removeClass:function(t){return i.root.classList.remove(t)},reverseButtons:function(){i.buttons.reverse(),i.buttons.forEach((function(i){i.parentElement.appendChild(i)}))},trapFocus:function(){i.focusTrap.trapFocus()},registerContentEventHandler:function(t,o){i.content instanceof HTMLElement&&i.content.addEventListener(t,o)},deregisterContentEventHandler:function(t,o){i.content instanceof HTMLElement&&i.content.removeEventListener(t,o)},isScrollableContentAtTop:function(){return!!(t=i.content)&&0===t.scrollTop;var t},isScrollableContentAtBottom:function(){return!!(t=i.content)&&Math.ceil(t.scrollHeight-t.scrollTop)===t.clientHeight;var t},registerWindowEventHandler:function(i,t){window.addEventListener(i,t)},deregisterWindowEventHandler:function(i,t){window.removeEventListener(i,t)}})},t.prototype.getInitialFocusEl=function(){return this.root.querySelector("["+C.INITIAL_FOCUS_ATTRIBUTE+"]")},t}(s);
46
+ var f,p="mdc-dom-focus-sentinel",_=function(){function i(i,t){void 0===t&&(t={}),this.root=i,this.options=t,this.elFocusedBeforeTrapFocus=null}return i.prototype.trapFocus=function(){var i=this.getFocusableElements(this.root);if(0===i.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root),this.options.skipInitialFocus||this.focusInitialElement(i,this.options.initialFocusEl)},i.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+p)).forEach((function(i){i.parentElement.removeChild(i)})),!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},i.prototype.wrapTabFocus=function(i){var t=this,o=this.createSentinel(),e=this.createSentinel();o.addEventListener("focus",(function(){var o=t.getFocusableElements(i);o.length>0&&o[o.length-1].focus()})),e.addEventListener("focus",(function(){var o=t.getFocusableElements(i);o.length>0&&o[0].focus()})),i.insertBefore(o,i.children[0]),i.appendChild(e)},i.prototype.focusInitialElement=function(i,t){var o=0;t&&(o=Math.max(i.indexOf(t),0)),i[o].focus()},i.prototype.getFocusableElements=function(i){return[].slice.call(i.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter((function(i){var t="true"===i.getAttribute("aria-disabled")||null!=i.getAttribute("disabled")||null!=i.getAttribute("hidden")||"true"===i.getAttribute("aria-hidden"),o=i.tabIndex>=0&&i.getBoundingClientRect().width>0&&!i.classList.contains(p)&&!t,e=!1;if(o){var a=getComputedStyle(i);e="none"===a.display||"hidden"===a.visibility}return o&&!e}))},i.prototype.createSentinel=function(){var i=document.createElement("div");return i.setAttribute("tabindex","0"),i.setAttribute("aria-hidden","true"),i.classList.add(p),i},i}(),b=function(){function i(){this.rafIDs=new Map}return i.prototype.request=function(i,t){var o=this;this.cancel(i);var e=requestAnimationFrame((function(e){o.rafIDs.delete(i),t(e)}));this.rafIDs.set(i,e)},i.prototype.cancel=function(i){var t=this.rafIDs.get(i);t&&(cancelAnimationFrame(t),this.rafIDs.delete(i))},i.prototype.cancelAll=function(){var i=this;this.rafIDs.forEach((function(t,o){i.cancel(o)}))},i.prototype.getQueue=function(){var i=[];return this.rafIDs.forEach((function(t,o){i.push(o)})),i},i}(),x={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked",FULLSCREEN:"mdc-dialog--fullscreen",SCROLL_DIVIDER_HEADER:"mdc-dialog-scroll-divider-header",SCROLL_DIVIDER_FOOTER:"mdc-dialog-scroll-divider-footer",SURFACE_SCRIM_SHOWN:"mdc-dialog__surface-scrim--shown",SURFACE_SCRIM_SHOWING:"mdc-dialog__surface-scrim--showing",SURFACE_SCRIM_HIDING:"mdc-dialog__surface-scrim--hiding",SCRIM_HIDDEN:"mdc-dialog__scrim--hidden"},v={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item",".mdc-menu .mdc-deprecated-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},y={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150};!function(i){i.POLL_SCROLL_POS="poll_scroll_position",i.POLL_LAYOUT_CHANGE="poll_layout_change"}(f||(f={}));var w=function(i){function t(o){var e=i.call(this,c(c({},t.defaultAdapter),o))||this;return e.dialogOpen=!1,e.isFullscreen=!1,e.animationFrame=0,e.animationTimer=0,e.escapeKeyAction=v.CLOSE_ACTION,e.scrimClickAction=v.CLOSE_ACTION,e.autoStackButtons=!0,e.areButtonsStacked=!1,e.suppressDefaultPressSelector=v.SUPPRESS_DEFAULT_PRESS_SELECTOR,e.animFrame=new b,e.contentScrollHandler=function(){e.handleScrollEvent()},e.windowResizeHandler=function(){e.layout()},e.windowOrientationChangeHandler=function(){e.layout()},e}return n(t,i),Object.defineProperty(t,"cssClasses",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){},registerContentEventHandler:function(){},deregisterContentEventHandler:function(){},isScrollableContentAtTop:function(){return!1},isScrollableContentAtBottom:function(){return!1},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.adapter.hasClass(x.STACKED)&&this.setAutoStackButtons(!1),this.isFullscreen=this.adapter.hasClass(x.FULLSCREEN)},t.prototype.destroy=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.handleAnimationTimerEnd()),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.animFrame.cancelAll(),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)},t.prototype.open=function(i){var t=this;this.dialogOpen=!0,this.adapter.notifyOpening(),this.adapter.addClass(x.OPENING),this.isFullscreen&&this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler),i&&i.isAboveFullscreenDialog&&this.adapter.addClass(x.SCRIM_HIDDEN),this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler),this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),this.runNextAnimationFrame((function(){t.adapter.addClass(x.OPEN),t.adapter.addBodyClass(x.SCROLL_LOCK),t.layout(),t.animationTimer=setTimeout((function(){t.handleAnimationTimerEnd(),t.adapter.trapFocus(t.adapter.getInitialFocusEl()),t.adapter.notifyOpened()}),y.DIALOG_ANIMATION_OPEN_TIME_MS)}))},t.prototype.close=function(i){var t=this;void 0===i&&(i=""),this.dialogOpen&&(this.dialogOpen=!1,this.adapter.notifyClosing(i),this.adapter.addClass(x.CLOSING),this.adapter.removeClass(x.OPEN),this.adapter.removeBodyClass(x.SCROLL_LOCK),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=setTimeout((function(){t.adapter.releaseFocus(),t.handleAnimationTimerEnd(),t.adapter.notifyClosed(i)}),y.DIALOG_ANIMATION_CLOSE_TIME_MS))},t.prototype.showSurfaceScrim=function(){var i=this;this.adapter.addClass(x.SURFACE_SCRIM_SHOWING),this.runNextAnimationFrame((function(){i.adapter.addClass(x.SURFACE_SCRIM_SHOWN)}))},t.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(x.SURFACE_SCRIM_SHOWN),this.adapter.addClass(x.SURFACE_SCRIM_HIDING)},t.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(x.SURFACE_SCRIM_HIDING),this.adapter.removeClass(x.SURFACE_SCRIM_SHOWING)},t.prototype.isOpen=function(){return this.dialogOpen},t.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction},t.prototype.setEscapeKeyAction=function(i){this.escapeKeyAction=i},t.prototype.getScrimClickAction=function(){return this.scrimClickAction},t.prototype.setScrimClickAction=function(i){this.scrimClickAction=i},t.prototype.getAutoStackButtons=function(){return this.autoStackButtons},t.prototype.setAutoStackButtons=function(i){this.autoStackButtons=i},t.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},t.prototype.setSuppressDefaultPressSelector=function(i){this.suppressDefaultPressSelector=i},t.prototype.layout=function(){var i=this;this.animFrame.request(f.POLL_LAYOUT_CHANGE,(function(){i.layoutInternal()}))},t.prototype.handleClick=function(i){if(this.adapter.eventTargetMatches(i.target,v.SCRIM_SELECTOR)&&""!==this.scrimClickAction)this.close(this.scrimClickAction);else{var t=this.adapter.getActionFromEvent(i);t&&this.close(t)}},t.prototype.handleKeydown=function(i){var t="Enter"===i.key||13===i.keyCode;if(t&&!this.adapter.getActionFromEvent(i)){var o=i.composedPath?i.composedPath()[0]:i.target,e=!this.suppressDefaultPressSelector||!this.adapter.eventTargetMatches(o,this.suppressDefaultPressSelector);t&&e&&this.adapter.clickDefaultButton()}},t.prototype.handleDocumentKeydown=function(i){("Escape"===i.key||27===i.keyCode)&&""!==this.escapeKeyAction&&this.close(this.escapeKeyAction)},t.prototype.handleScrollEvent=function(){var i=this;this.animFrame.request(f.POLL_SCROLL_POS,(function(){i.toggleScrollDividerHeader(),i.toggleScrollDividerFooter()}))},t.prototype.layoutInternal=function(){this.autoStackButtons&&this.detectStackedButtons(),this.toggleScrollableClasses()},t.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(x.OPENING),this.adapter.removeClass(x.CLOSING)},t.prototype.runNextAnimationFrame=function(i){var t=this;cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame((function(){t.animationFrame=0,clearTimeout(t.animationTimer),t.animationTimer=setTimeout(i,0)}))},t.prototype.detectStackedButtons=function(){this.adapter.removeClass(x.STACKED);var i=this.adapter.areButtonsStacked();i&&this.adapter.addClass(x.STACKED),i!==this.areButtonsStacked&&(this.adapter.reverseButtons(),this.areButtonsStacked=i)},t.prototype.toggleScrollableClasses=function(){this.adapter.removeClass(x.SCROLLABLE),this.adapter.isContentScrollable()&&(this.adapter.addClass(x.SCROLLABLE),this.isFullscreen&&(this.toggleScrollDividerHeader(),this.toggleScrollDividerFooter()))},t.prototype.toggleScrollDividerHeader=function(){this.adapter.isScrollableContentAtTop()?this.adapter.hasClass(x.SCROLL_DIVIDER_HEADER)&&this.adapter.removeClass(x.SCROLL_DIVIDER_HEADER):this.adapter.addClass(x.SCROLL_DIVIDER_HEADER)},t.prototype.toggleScrollDividerFooter=function(){this.adapter.isScrollableContentAtBottom()?this.adapter.hasClass(x.SCROLL_DIVIDER_FOOTER)&&this.adapter.removeClass(x.SCROLL_DIVIDER_FOOTER):this.adapter.addClass(x.SCROLL_DIVIDER_FOOTER)},t}(r),E=w.strings,C=function(i){function t(){return null!==i&&i.apply(this,arguments)||this}return n(t,i),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(i){this.foundation.setEscapeKeyAction(i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(i){this.foundation.setScrimClickAction(i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(i){this.foundation.setAutoStackButtons(i)},enumerable:!1,configurable:!0}),t.attachTo=function(i){return new t(i)},t.prototype.initialize=function(i){var t,o;void 0===i&&(i=function(i,t){return new _(i,t)});var e=this.root.querySelector(E.CONTAINER_SELECTOR);if(!e)throw new Error("Dialog component requires a "+E.CONTAINER_SELECTOR+" container element");this.container=e,this.content=this.root.querySelector(E.CONTENT_SELECTOR),this.buttons=[].slice.call(this.root.querySelectorAll(E.BUTTON_SELECTOR)),this.defaultButton=this.root.querySelector("["+E.BUTTON_DEFAULT_ATTRIBUTE+"]"),this.focusTrapFactory=i,this.buttonRipples=[];try{for(var a=l(this.buttons),d=a.next();!d.done;d=a.next())this.buttonRipples.push(new h(d.value))}catch(i){t={error:i}}finally{try{d&&!d.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}},t.prototype.initialSyncWithDOM=function(){var i=this;this.focusTrap=(0,this.focusTrapFactory)(this.container,{initialFocusEl:this.getInitialFocusEl()||void 0}),this.handleClick=this.foundation.handleClick.bind(this.foundation),this.handleKeydown=this.foundation.handleKeydown.bind(this.foundation),this.handleDocumentKeydown=this.foundation.handleDocumentKeydown.bind(this.foundation),this.handleOpening=function(){document.addEventListener("keydown",i.handleDocumentKeydown)},this.handleClosing=function(){document.removeEventListener("keydown",i.handleDocumentKeydown)},this.listen("click",this.handleClick),this.listen("keydown",this.handleKeydown),this.listen(E.OPENING_EVENT,this.handleOpening),this.listen(E.CLOSING_EVENT,this.handleClosing)},t.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.unlisten("keydown",this.handleKeydown),this.unlisten(E.OPENING_EVENT,this.handleOpening),this.unlisten(E.CLOSING_EVENT,this.handleClosing),this.handleClosing(),this.buttonRipples.forEach((function(i){i.destroy()})),i.prototype.destroy.call(this)},t.prototype.layout=function(){this.foundation.layout()},t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(i){void 0===i&&(i=""),this.foundation.close(i)},t.prototype.getDefaultFoundation=function(){var i=this;return new w({addBodyClass:function(i){return document.body.classList.add(i)},addClass:function(t){return i.root.classList.add(t)},areButtonsStacked:function(){return t=i.buttons,o=new Set,[].forEach.call(t,(function(i){return o.add(i.offsetTop)})),o.size>1;var t,o},clickDefaultButton:function(){i.defaultButton&&!i.defaultButton.disabled&&i.defaultButton.click()},eventTargetMatches:function(i,t){return!!i&&g(i,t)},getActionFromEvent:function(i){if(!i.target)return"";var t=m(i.target,"["+E.ACTION_ATTRIBUTE+"]");return t&&t.getAttribute(E.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return i.getInitialFocusEl()},hasClass:function(t){return i.root.classList.contains(t)},isContentScrollable:function(){return!!(t=i.content)&&t.scrollHeight>t.offsetHeight;var t},notifyClosed:function(t){return i.emit(E.CLOSED_EVENT,t?{action:t}:{})},notifyClosing:function(t){return i.emit(E.CLOSING_EVENT,t?{action:t}:{})},notifyOpened:function(){return i.emit(E.OPENED_EVENT,{})},notifyOpening:function(){return i.emit(E.OPENING_EVENT,{})},releaseFocus:function(){i.focusTrap.releaseFocus()},removeBodyClass:function(i){return document.body.classList.remove(i)},removeClass:function(t){return i.root.classList.remove(t)},reverseButtons:function(){i.buttons.reverse(),i.buttons.forEach((function(i){i.parentElement.appendChild(i)}))},trapFocus:function(){i.focusTrap.trapFocus()},registerContentEventHandler:function(t,o){i.content instanceof HTMLElement&&i.content.addEventListener(t,o)},deregisterContentEventHandler:function(t,o){i.content instanceof HTMLElement&&i.content.removeEventListener(t,o)},isScrollableContentAtTop:function(){return!!(t=i.content)&&0===t.scrollTop;var t},isScrollableContentAtBottom:function(){return!!(t=i.content)&&Math.ceil(t.scrollHeight-t.scrollTop)===t.clientHeight;var t},registerWindowEventHandler:function(i,t){window.addEventListener(i,t)},deregisterWindowEventHandler:function(i,t){window.removeEventListener(i,t)}})},t.prototype.getInitialFocusEl=function(){return this.root.querySelector("["+E.INITIAL_FOCUS_ATTRIBUTE+"]")},t}(s);
47
47
  /**
48
48
  * @license
49
49
  * Copyright 2017 Google Inc.
@@ -65,4 +65,4 @@ var f,p="mdc-dom-focus-sentinel",_=function(){function i(i,t){void 0===t&&(t={})
65
65
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
66
66
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
67
67
  * THE SOFTWARE.
68
- */const k=class{constructor(o){i(this,o),this.close=t(this,"close"),this.closing=t(this,"closing"),this.fullscreen=!1,this.open=!1,this.closingActions={escapeKey:!0,scrimClick:!0},this.handleMdcOpened=this.handleMdcOpened.bind(this),this.handleMdcClosed=this.handleMdcClosed.bind(this),this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentWillLoad(){this.id=d()}componentDidLoad(){this.initialize()}initialize(){const i=this.host.shadowRoot.querySelector(".mdc-dialog");i&&(this.mdcDialog=new E(i),this.open&&this.mdcDialog.open(),this.mdcDialog.listen("MDCDialog:opened",this.handleMdcOpened),this.mdcDialog.listen("MDCDialog:closed",this.handleMdcClosed),this.mdcDialog.listen("MDCDialog:closing",this.handleMdcClosing),this.setClosingActions())}disconnectedCallback(){this.mdcDialog.unlisten("MDCDialog:opened",this.handleMdcOpened),this.mdcDialog.unlisten("MDCDialog:closed",this.handleMdcClosed),this.mdcDialog.unlisten("MDCDialog:closing",this.handleMdcClosing),this.mdcDialog.destroy()}render(){return o("div",{key:"748566bd65db98ee75a743a7deedc7d0c9f80a90",class:{"mdc-dialog":!0,"full-screen":!!this.fullscreen},role:"alertdialog","aria-modal":"true","aria-labelledby":"limel-dialog-title-"+this.id,"aria-describedby":"limel-dialog-content-"+this.id},o("input",{key:"15d2c40108a2348f54066eab22d507c6a9b3eda9",hidden:!0,id:"initialFocusEl"}),o("div",{key:"f46ee440d02b257bde93273936ce1dfe8dc324ea",class:"mdc-dialog__container"},o("div",{key:"9ba9919b2b880039ede217c0608d9f780d6ca770",class:"mdc-dialog__surface"},o("input",{key:"07bb68ae4c7b8d91cb7f0fd02105738160bd9e8f",type:"button",id:"initialFocusElement"}),this.renderHeading(),o("div",{key:"1729cb0f7f442b3ee56272387de42b462926275c",class:"mdc-dialog__content",id:"limel-dialog-content-"+this.id},o("slot",{key:"a5554b316a4e57700a2902ae4499f594045f267d"})),this.renderFooter())),o("div",{key:"85ecb0922ece938a5de20b804b6a2590f98032df",class:"mdc-dialog__scrim"}))}watchHandler(i,t){t!==i&&this.mdcDialog&&(i?this.mdcDialog.open():this.mdcDialog.close())}closingActionsChanged(i,t){u(i,t)||this.setClosingActions()}handleMdcOpened(){setTimeout(a,100)}handleMdcClosed(){this.open&&this.close.emit(),this.open=!1}handleMdcClosing(){this.closing.emit()}isDialogHeadingObject(i){return"object"==typeof i&&!!i.title}renderHeading(){if(this.isDialogHeadingObject(this.heading)){const{title:i,subtitle:t,supportingText:e,icon:a}=this.heading;return o("limel-header",{icon:a,heading:i,subheading:t,supportingText:e},o("slot",{name:"header-actions",slot:"actions"}))}return"string"==typeof this.heading?o("limel-header",{heading:this.heading},o("slot",{name:"header-actions",slot:"actions"})):null}renderFooter(){return o("footer",{class:"mdc-dialog__actions"},o("slot",{name:"button"}))}setClosingActions(){this.mdcDialog.scrimClickAction="",this.closingActions.scrimClick&&(this.mdcDialog.scrimClickAction="close"),this.mdcDialog.escapeKeyAction="",this.closingActions.escapeKey&&(this.mdcDialog.escapeKeyAction="close")}get host(){return e(this)}static get watchers(){return{open:[{watchHandler:0}],closingActions:[{closingActionsChanged:0}]}}};k.style='@charset "UTF-8";:host{--dialog-background-color:var(--lime-elevated-surface-background-color);--header-heading-color:var(--dialog-heading-title-color);--header-subheading-color:var(--dialog-heading-subtitle-color);--header-supporting-text-color:var(--dialog-heading-supporting-text-color);--header-icon-color:var(--dialog-heading-icon-color);--header-icon-background-color:var(--dialog-heading-icon-background-color)}.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0, 0, 0, 0.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0, 0, 0, 0.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-dialog__title-icon{}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media (max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media (min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}@media all and (-ms-high-contrast: none), (-ms-high-contrast: active){.mdc-dialog .mdc-dialog__container{}}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media (max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media (max-width: 720px) and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media (max-width: 720px) and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media (max-width: 720px) and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media (max-width: 720px) and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media (max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media (max-width: 720px) and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{border-radius:0}}@media (max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{border-radius:0}}@media (min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-dialog__surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right;}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-dialog__title{margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right;}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;-webkit-overflow-scrolling:touch}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px;}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0;}.mdc-dialog__button{max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left;}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear, transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog__content{font-family:inherit;font-size:var(--limel-theme-default-font-size)}@media (max-width: 16032px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media (min-width: 16032px){.mdc-dialog .mdc-dialog__surface{max-width:16000px}}.mdc-dialog{z-index:var(--dialog-z-index, 7);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}@media (max-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__surface{max-height:calc(100% - 32px)}}@media (min-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__surface{max-height:16000px}}@media all and (-ms-high-contrast: none), (-ms-high-contrast: active){.mdc-dialog.full-screen .mdc-dialog__container{}}@media (-ms-high-contrast: none) and (min-height: 16032px), (-ms-high-contrast: active) and (min-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__container{align-items:stretch;height:auto}}.mdc-dialog.full-screen .mdc-dialog__container{height:100%;width:100%}.mdc-dialog.full-screen .mdc-dialog__container .mdc-dialog__surface{height:100%;width:100%}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(var(--color-black), 0.4)}.mdc-dialog .mdc-dialog__container{height:100%;width:var(--dialog-width, auto)}.mdc-dialog .mdc-dialog__surface{width:var(--dialog-width, auto);height:var(--dialog-height, auto);background-color:var(--dialog-background-color);box-shadow:var(--shadow-depth-64);max-width:var(--dialog-max-width, calc(100vw - 2rem));max-height:var(--dialog-max-height, calc(100% - 2rem));border-radius:0.75rem}.mdc-dialog .mdc-dialog__content{--limel-top-edge-fade-height:var(--dialog-padding-top-bottom, 1.5rem);--limel-bottom-edge-fade-height:var( --dialog-padding-top-bottom, 1.5rem );--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);color:var(--limel-theme-on-surface-color);padding-left:var(--dialog-padding-left-right, min(1.25rem, 3vw));padding-right:var(--dialog-padding-left-right, min(1.25rem, 3vw))}#initialFocusElement{position:absolute;opacity:0;pointer-events:none;z-index:-1}slot[name=header]{display:none}slot[name=button]{display:flex;gap:0.5rem;width:100%;justify-content:flex-end}footer.mdc-dialog__actions{min-height:unset;padding:0.375rem}@media screen and (max-width: 760px){slot[name=button]{flex-direction:column-reverse}.mdc-dialog__actions{padding:min(1.5rem, 3vw);padding-top:1rem}}';export{k as limel_dialog}
68
+ */const k=class{constructor(o){i(this,o),this.close=t(this,"close"),this.closing=t(this,"closing"),this.fullscreen=!1,this.open=!1,this.closingActions={escapeKey:!0,scrimClick:!0},this.handleMdcOpened=this.handleMdcOpened.bind(this),this.handleMdcClosed=this.handleMdcClosed.bind(this),this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentWillLoad(){this.id=d()}componentDidLoad(){this.initialize()}initialize(){const i=this.host.shadowRoot.querySelector(".mdc-dialog");i&&(this.mdcDialog=new C(i),this.open&&this.mdcDialog.open(),this.mdcDialog.listen("MDCDialog:opened",this.handleMdcOpened),this.mdcDialog.listen("MDCDialog:closed",this.handleMdcClosed),this.mdcDialog.listen("MDCDialog:closing",this.handleMdcClosing),this.setClosingActions())}disconnectedCallback(){this.mdcDialog.unlisten("MDCDialog:opened",this.handleMdcOpened),this.mdcDialog.unlisten("MDCDialog:closed",this.handleMdcClosed),this.mdcDialog.unlisten("MDCDialog:closing",this.handleMdcClosing),this.mdcDialog.destroy()}render(){return o("div",{key:"748566bd65db98ee75a743a7deedc7d0c9f80a90",class:{"mdc-dialog":!0,"full-screen":!!this.fullscreen},role:"alertdialog","aria-modal":"true","aria-labelledby":"limel-dialog-title-"+this.id,"aria-describedby":"limel-dialog-content-"+this.id},o("input",{key:"15d2c40108a2348f54066eab22d507c6a9b3eda9",hidden:!0,id:"initialFocusEl"}),o("div",{key:"f46ee440d02b257bde93273936ce1dfe8dc324ea",class:"mdc-dialog__container"},o("div",{key:"9ba9919b2b880039ede217c0608d9f780d6ca770",class:"mdc-dialog__surface"},o("input",{key:"07bb68ae4c7b8d91cb7f0fd02105738160bd9e8f",type:"button",id:"initialFocusElement"}),this.renderHeading(),o("div",{key:"1729cb0f7f442b3ee56272387de42b462926275c",class:"mdc-dialog__content",id:"limel-dialog-content-"+this.id},o("slot",{key:"a5554b316a4e57700a2902ae4499f594045f267d"})),this.renderFooter())),o("div",{key:"85ecb0922ece938a5de20b804b6a2590f98032df",class:"mdc-dialog__scrim"}))}watchHandler(i,t){t!==i&&this.mdcDialog&&(i?this.mdcDialog.open():this.mdcDialog.close())}closingActionsChanged(i,t){u(i,t)||this.setClosingActions()}handleMdcOpened(){setTimeout(a,100)}handleMdcClosed(){this.open&&this.close.emit(),this.open=!1}handleMdcClosing(){this.closing.emit()}isDialogHeadingObject(i){return"object"==typeof i&&!!i.title}renderHeading(){if(this.isDialogHeadingObject(this.heading)){const{title:i,subtitle:t,supportingText:e,icon:a}=this.heading;return o("limel-header",{icon:a,heading:i,subheading:t,supportingText:e},o("slot",{name:"header-actions",slot:"actions"}))}return"string"==typeof this.heading?o("limel-header",{heading:this.heading},o("slot",{name:"header-actions",slot:"actions"})):null}renderFooter(){return o("footer",{class:"mdc-dialog__actions"},o("slot",{name:"button"}))}setClosingActions(){this.mdcDialog.scrimClickAction="",this.closingActions.scrimClick&&(this.mdcDialog.scrimClickAction="close"),this.mdcDialog.escapeKeyAction="",this.closingActions.escapeKey&&(this.mdcDialog.escapeKeyAction="close")}get host(){return e(this)}static get watchers(){return{open:[{watchHandler:0}],closingActions:[{closingActionsChanged:0}]}}};k.style='@charset "UTF-8";:host{--dialog-background-color:var(--lime-elevated-surface-background-color);--header-heading-color:var(--dialog-heading-title-color);--header-subheading-color:var(--dialog-heading-subtitle-color);--header-supporting-text-color:var(--dialog-heading-supporting-text-color);--header-icon-color:var(--dialog-heading-icon-color);--header-icon-background-color:var(--dialog-heading-icon-background-color)}.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0, 0, 0, 0.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0, 0, 0, 0.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-dialog__title-icon{}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media (max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media (min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}@media all and (-ms-high-contrast: none), (-ms-high-contrast: active){.mdc-dialog .mdc-dialog__container{}}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media (max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media (max-width: 720px) and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media (max-width: 720px) and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media (max-width: 720px) and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media (max-width: 720px) and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media (max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media (max-width: 720px) and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{border-radius:0}}@media (max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{border-radius:0}}@media (min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-dialog__surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right;}@media screen and (forced-colors: active), (-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-dialog__title{margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right;}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;-webkit-overflow-scrolling:touch}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px;}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0;}.mdc-dialog__button{max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left;}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear, transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog__content{font-family:inherit;font-size:var(--limel-theme-default-font-size)}@media (max-width: 16032px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media (min-width: 16032px){.mdc-dialog .mdc-dialog__surface{max-width:16000px}}.mdc-dialog{z-index:var(--dialog-z-index, 7);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}@media (max-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__surface{max-height:calc(100% - 32px)}}@media (min-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__surface{max-height:16000px}}@media all and (-ms-high-contrast: none), (-ms-high-contrast: active){.mdc-dialog.full-screen .mdc-dialog__container{}}@media (-ms-high-contrast: none) and (min-height: 16032px), (-ms-high-contrast: active) and (min-height: 16032px){.mdc-dialog.full-screen .mdc-dialog__container{align-items:stretch;height:auto}}.mdc-dialog.full-screen .mdc-dialog__container{height:100%;width:100%}.mdc-dialog.full-screen .mdc-dialog__container .mdc-dialog__surface{height:100%;width:100%}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(var(--color-black), 0.4)}.mdc-dialog .mdc-dialog__container{height:100%;width:var(--dialog-width, auto)}.mdc-dialog .mdc-dialog__surface{width:var(--dialog-width, auto);height:var(--dialog-height, auto);background-color:var(--dialog-background-color);box-shadow:var(--shadow-depth-64);max-width:var(--dialog-max-width, calc(100vw - 2rem));max-height:var(--dialog-max-height, calc(100% - 2rem));border-radius:0.75rem}.mdc-dialog .mdc-dialog__content{--limel-top-edge-fade-height:var(--dialog-padding-top-bottom, 1.5rem);--limel-bottom-edge-fade-height:var( --dialog-padding-top-bottom, 1.5rem );--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);color:var(--limel-theme-on-surface-color);padding-left:var(--dialog-padding-left-right, min(1.25rem, 3vw));padding-right:var(--dialog-padding-left-right, min(1.25rem, 3vw))}#initialFocusElement{position:absolute;opacity:0;pointer-events:none;z-index:-1}slot[name=header]{display:none}slot[name=button]{display:flex;gap:0.5rem;width:100%;justify-content:flex-end}footer.mdc-dialog__actions{min-height:unset;padding:0.375rem}@media screen and (max-width: 760px){slot[name=button]{flex-direction:column-reverse}.mdc-dialog__actions{padding:min(1.5rem, 3vw);padding-top:1rem}}';export{k as limel_dialog}
@@ -1,4 +1,4 @@
1
- import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}from"./p-CgNJbSP4.js";import{i as a}from"./p-DKxusNKT.js";import{_ as c,a as s,f as l,M as d,c as u,m as f,b as h}from"./p-ChRGk668.js";import{a as b,b as m,M as p}from"./p-BN1-aIOw.js";import{a as g,c as v}from"./p-C6SEjICu.js";import{a as _,b as y,i as w,c as x}from"./p-BlJd1RC5.js";import"./p-DtS35Df5.js";import"./p-BJQylLSL.js";import"./p-efBXH4mj.js";import"./p-B8VKuhvH.js";import"./p-oiMYqRQ0.js";import"./p-BgPHaiMH.js";import"./p-CK4jS9_E.js";import"./p-f_1nwOC8.js";var C,k=y((function(t,e){return w(t)?function(t,e){var r=-1,n=_,i=!0,o=t.length,a=[],c=e.length;if(!o)return a;e.length>=200&&(n=v,i=!1,e=new g(e));t:for(;++r<o;){var s=t[r],l=s;if(s=0!==s?s:0,i&&l==l){for(var d=c;d--;)if(e[d]===l)continue t;a.push(s)}else n(e,l,undefined)||a.push(s)}return a}(t,x(e,1,w)):[]})),E={ANIMATING:"mdc-tab-scroller--animating",SCROLL_AREA_SCROLL:"mdc-tab-scroller__scroll-area--scroll",SCROLL_TEST:"mdc-tab-scroller__test"},T={AREA_SELECTOR:".mdc-tab-scroller__scroll-area",CONTENT_SELECTOR:".mdc-tab-scroller__scroll-content"},S=function(t){this.adapter=t},A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(){var t=this.adapter.getScrollAreaScrollLeft(),e=this.calculateScrollEdges().right;return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.calculateScrollEdges(),r=this.adapter.getScrollAreaScrollLeft(),n=this.clampScrollValue(e.right-t);return{finalScrollPosition:n,scrollDelta:n-r}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.getAnimatingScrollPosition=function(t){return t},e.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},e}(S),O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(t-e)},e.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.getAnimatingScrollPosition=function(t,e){return t-e},e.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();return{left:this.adapter.getScrollAreaOffsetWidth()-t,right:0}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.max(Math.min(e.right,t),e.left)},e}(S),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(t);return{finalScrollPosition:r,scrollDelta:e-r}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e+t);return{finalScrollPosition:r,scrollDelta:e-r}},e.prototype.getAnimatingScrollPosition=function(t,e){return t+e},e.prototype.calculateScrollEdges=function(){return{left:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth(),right:0}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.right,t),e.left)},e}(S),I=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.isAnimating=!1,n}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return E},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{eventTargetMatchesSelector:function(){return!1},addClass:function(){},removeClass:function(){},addScrollAreaClass:function(){},setScrollAreaStyleProperty:function(){},setScrollContentStyleProperty:function(){},getScrollContentStyleValue:function(){return""},setScrollAreaScrollLeft:function(){},getScrollAreaScrollLeft:function(){return 0},getScrollContentOffsetWidth:function(){return 0},getScrollAreaOffsetWidth:function(){return 0},computeScrollAreaClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeScrollContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeHorizontalScrollbarHeight:function(){return 0}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.adapter.computeHorizontalScrollbarHeight();this.adapter.setScrollAreaStyleProperty("margin-bottom",-t+"px"),this.adapter.addScrollAreaClass(e.cssClasses.SCROLL_AREA_SCROLL)},e.prototype.getScrollPosition=function(){if(this.isRTL())return this.computeCurrentScrollPositionRTL();var t=this.calculateCurrentTranslateX();return this.adapter.getScrollAreaScrollLeft()-t},e.prototype.handleInteraction=function(){this.isAnimating&&this.stopScrollAnimation()},e.prototype.handleTransitionEnd=function(t){this.isAnimating&&this.adapter.eventTargetMatchesSelector(t.target,e.strings.CONTENT_SELECTOR)&&(this.isAnimating=!1,this.adapter.removeClass(e.cssClasses.ANIMATING))},e.prototype.incrementScroll=function(t){0!==t&&this.animate(this.getIncrementScrollOperation(t))},e.prototype.incrementScrollImmediate=function(t){if(0!==t){var e=this.getIncrementScrollOperation(t);0!==e.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(e.finalScrollPosition))}},e.prototype.scrollTo=function(t){this.isRTL()?this.scrollToImplRTL(t):this.scrollToImpl(t)},e.prototype.getRTLScroller=function(){return this.rtlScrollerInstance||(this.rtlScrollerInstance=this.rtlScrollerFactory()),this.rtlScrollerInstance},e.prototype.calculateCurrentTranslateX=function(){var t=this.adapter.getScrollContentStyleValue("transform");if("none"===t)return 0;var e=/\((.+?)\)/.exec(t);if(!e)return 0;var r=l(e[1].split(","),6);return parseFloat(r[4])},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},e.prototype.computeCurrentScrollPositionRTL=function(){var t=this.calculateCurrentTranslateX();return this.getRTLScroller().getScrollPositionRTL(t)},e.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},e.prototype.scrollToImpl=function(t){var e=this.getScrollPosition(),r=this.clampScrollValue(t);this.animate({finalScrollPosition:r,scrollDelta:r-e})},e.prototype.scrollToImplRTL=function(t){var e=this.getRTLScroller().scrollToRTL(t);this.animate(e)},e.prototype.getIncrementScrollOperation=function(t){if(this.isRTL())return this.getRTLScroller().incrementScrollRTL(t);var e=this.getScrollPosition(),r=this.clampScrollValue(t+e);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.animate=function(t){var r=this;0!==t.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition),this.adapter.setScrollContentStyleProperty("transform","translateX("+t.scrollDelta+"px)"),this.adapter.computeScrollAreaClientRect(),requestAnimationFrame((function(){r.adapter.addClass(e.cssClasses.ANIMATING),r.adapter.setScrollContentStyleProperty("transform","none")})),this.isAnimating=!0)},e.prototype.stopScrollAnimation=function(){this.isAnimating=!1;var t=this.getAnimatingScrollPosition();this.adapter.removeClass(e.cssClasses.ANIMATING),this.adapter.setScrollContentStyleProperty("transform","translateX(0px)"),this.adapter.setScrollAreaScrollLeft(t)},e.prototype.getAnimatingScrollPosition=function(){var t=this.calculateCurrentTranslateX(),e=this.adapter.getScrollAreaScrollLeft();return this.isRTL()?this.getRTLScroller().getAnimatingScrollPosition(e,t):e-t},e.prototype.rtlScrollerFactory=function(){var t=this.adapter.getScrollAreaScrollLeft();this.adapter.setScrollAreaScrollLeft(t-1);var e=this.adapter.getScrollAreaScrollLeft();if(e<0)return this.adapter.setScrollAreaScrollLeft(t),new O(this.adapter);var r=this.adapter.computeScrollAreaClientRect(),n=this.adapter.computeScrollContentClientRect(),i=Math.round(n.right-r.right);return this.adapter.setScrollAreaScrollLeft(t),i===e?new R(this.adapter):new A(this.adapter)},e.prototype.isRTL=function(){return"rtl"===this.adapter.getScrollContentStyleValue("direction")},e}(d),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.area=this.root.querySelector(I.strings.AREA_SELECTOR),this.content=this.root.querySelector(I.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleInteraction=function(){t.foundation.handleInteraction()},this.handleTransitionEnd=function(e){t.foundation.handleTransitionEnd(e)},this.area.addEventListener("wheel",this.handleInteraction,b()),this.area.addEventListener("touchstart",this.handleInteraction,b()),this.area.addEventListener("pointerdown",this.handleInteraction,b()),this.area.addEventListener("mousedown",this.handleInteraction,b()),this.area.addEventListener("keydown",this.handleInteraction,b()),this.content.addEventListener("transitionend",this.handleTransitionEnd)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.area.removeEventListener("wheel",this.handleInteraction,b()),this.area.removeEventListener("touchstart",this.handleInteraction,b()),this.area.removeEventListener("pointerdown",this.handleInteraction,b()),this.area.removeEventListener("mousedown",this.handleInteraction,b()),this.area.removeEventListener("keydown",this.handleInteraction,b()),this.content.removeEventListener("transitionend",this.handleTransitionEnd)},e.prototype.getDefaultFoundation=function(){var t=this;return new I({eventTargetMatchesSelector:function(t,e){return f(t,e)},addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},addScrollAreaClass:function(e){t.area.classList.add(e)},setScrollAreaStyleProperty:function(e,r){t.area.style.setProperty(e,r)},setScrollContentStyleProperty:function(e,r){t.content.style.setProperty(e,r)},getScrollContentStyleValue:function(e){return window.getComputedStyle(t.content).getPropertyValue(e)},setScrollAreaScrollLeft:function(e){return t.area.scrollLeft=e},getScrollAreaScrollLeft:function(){return t.area.scrollLeft},getScrollContentOffsetWidth:function(){return t.content.offsetWidth},getScrollAreaOffsetWidth:function(){return t.area.offsetWidth},computeScrollAreaClientRect:function(){return t.area.getBoundingClientRect()},computeScrollContentClientRect:function(){return t.content.getBoundingClientRect()},computeHorizontalScrollbarHeight:function(){return function(t,e){if(void 0===e&&(e=!0),e&&void 0!==C)return C;var r=t.createElement("div");r.classList.add(E.SCROLL_TEST),t.body.appendChild(r);var n=r.offsetHeight-r.clientHeight;return t.body.removeChild(r),e&&(C=n),n}
1
+ import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}from"./p-CgNJbSP4.js";import{i as a}from"./p-DTXIk0fN.js";import{_ as c,a as s,f as l,M as d,c as u,m as f,b as h}from"./p-ChRGk668.js";import{a as b,b as m,M as p}from"./p-BN1-aIOw.js";import{e as g}from"./p-xQsJdKrq.js";import"./p-DFWcgJ_i.js";import"./p-DtS35Df5.js";import"./p-BJQylLSL.js";import"./p-efBXH4mj.js";import"./p-B8VKuhvH.js";import"./p-oiMYqRQ0.js";import"./p-D_uMnX5g.js";import"./p-CK4jS9_E.js";import"./p-f_1nwOC8.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2018 Google Inc.
@@ -20,7 +20,7 @@ import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}fr
20
20
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
  * THE SOFTWARE.
23
- */(document)}})},e.prototype.getScrollPosition=function(){return this.foundation.getScrollPosition()},e.prototype.getScrollContentWidth=function(){return this.content.offsetWidth},e.prototype.incrementScroll=function(t){this.foundation.incrementScroll(t)},e.prototype.scrollTo=function(t){this.foundation.scrollTo(t)},e}(u),L={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"},z={CONTENT_SELECTOR:".mdc-tab-indicator__content"},D=function(t){function e(r){return t.call(this,s(s({},e.defaultAdapter),r))||this}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return z},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.computeContentClientRect=function(){return this.adapter.computeContentClientRect()},e}(d),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.activate=function(){this.adapter.addClass(D.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(D.cssClasses.ACTIVE)},e}(D),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.activate=function(t){if(t){var e=this.computeContentClientRect(),r=t.width/e.width,n=t.left-e.left;this.adapter.addClass(D.cssClasses.NO_TRANSITION),this.adapter.setContentStyleProperty("transform","translateX("+n+"px) scaleX("+r+")"),this.computeContentClientRect(),this.adapter.removeClass(D.cssClasses.NO_TRANSITION),this.adapter.addClass(D.cssClasses.ACTIVE),this.adapter.setContentStyleProperty("transform","")}else this.adapter.addClass(D.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(D.cssClasses.ACTIVE)},e}(D),P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.content=this.root.querySelector(D.strings.CONTENT_SELECTOR)},e.prototype.computeContentClientRect=function(){return this.foundation.computeContentClientRect()},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},computeContentClientRect:function(){return t.content.getBoundingClientRect()},setContentStyleProperty:function(e,r){t.content.style.setProperty(e,r)}};return this.root.classList.contains(D.cssClasses.FADE)?new M(e):new N(e)},e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e}(u),B={ACTIVE:"mdc-tab--active"},W={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"},K=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.focusOnActivate=!0,n}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return W},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},activateIndicator:function(){},deactivateIndicator:function(){},notifyInteracted:function(){},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){}}},enumerable:!1,configurable:!0}),e.prototype.handleClick=function(){this.adapter.notifyInteracted()},e.prototype.isActive=function(){return this.adapter.hasClass(B.ACTIVE)},e.prototype.setFocusOnActivate=function(t){this.focusOnActivate=t},e.prototype.activate=function(t){this.adapter.addClass(B.ACTIVE),this.adapter.setAttr(W.ARIA_SELECTED,"true"),this.adapter.setAttr(W.TABINDEX,"0"),this.adapter.activateIndicator(t),this.focusOnActivate&&this.adapter.focus()},e.prototype.deactivate=function(){this.isActive()&&(this.adapter.removeClass(B.ACTIVE),this.adapter.setAttr(W.ARIA_SELECTED,"false"),this.adapter.setAttr(W.TABINDEX,"-1"),this.adapter.deactivateIndicator())},e.prototype.computeDimensions=function(){var t=this.adapter.getOffsetWidth(),e=this.adapter.getOffsetLeft(),r=this.adapter.getContentOffsetWidth(),n=this.adapter.getContentOffsetLeft();return{contentLeft:e+n,contentRight:e+n+r,rootLeft:e,rootRight:e+t}},e}(d),H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){void 0===t&&(t=function(t,e){return new p(t,e)}),void 0===e&&(e=function(t){return new P(t)}),this.id=this.root.id;var r=new m(p.createAdapter(this));this.ripple=t(this.root,r);var n=this.root.querySelector(K.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator=e(n),this.content=this.root.querySelector(K.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen("click",this.handleClick)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new K({setAttr:function(e,r){return t.root.setAttribute(e,r)},addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},activateIndicator:function(e){t.tabIndicator.activate(e)},deactivateIndicator:function(){t.tabIndicator.deactivate()},notifyInteracted:function(){return t.emit(K.strings.INTERACTED_EVENT,{tabId:t.id},!0)},getOffsetLeft:function(){return t.root.offsetLeft},getOffsetWidth:function(){return t.root.offsetWidth},getContentOffsetLeft:function(){return t.content.offsetLeft},getContentOffsetWidth:function(){return t.content.offsetWidth},focus:function(){return t.root.focus()}})},Object.defineProperty(e.prototype,"active",{get:function(){return this.foundation.isActive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){this.foundation.setFocusOnActivate(t)},enumerable:!1,configurable:!0}),e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.computeIndicatorClientRect=function(){return this.tabIndicator.computeContentClientRect()},e.prototype.computeDimensions=function(){return this.foundation.computeDimensions()},e.prototype.focus=function(){this.root.focus()},e}(u),Y={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"},V={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32},F=new Set;
23
+ */var v,_={ANIMATING:"mdc-tab-scroller--animating",SCROLL_AREA_SCROLL:"mdc-tab-scroller__scroll-area--scroll",SCROLL_TEST:"mdc-tab-scroller__test"},y={AREA_SELECTOR:".mdc-tab-scroller__scroll-area",CONTENT_SELECTOR:".mdc-tab-scroller__scroll-content"},w=function(t){this.adapter=t},x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(){var t=this.adapter.getScrollAreaScrollLeft(),e=this.calculateScrollEdges().right;return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.calculateScrollEdges(),r=this.adapter.getScrollAreaScrollLeft(),n=this.clampScrollValue(e.right-t);return{finalScrollPosition:n,scrollDelta:n-r}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.getAnimatingScrollPosition=function(t){return t},e.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},e}(w),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(t-e)},e.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.getAnimatingScrollPosition=function(t,e){return t-e},e.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();return{left:this.adapter.getScrollAreaOffsetWidth()-t,right:0}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.max(Math.min(e.right,t),e.left)},e}(w),k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(e-t)},e.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(t);return{finalScrollPosition:r,scrollDelta:e-r}},e.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e+t);return{finalScrollPosition:r,scrollDelta:e-r}},e.prototype.getAnimatingScrollPosition=function(t,e){return t+e},e.prototype.calculateScrollEdges=function(){return{left:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth(),right:0}},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.right,t),e.left)},e}(w),T=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.isAnimating=!1,n}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{eventTargetMatchesSelector:function(){return!1},addClass:function(){},removeClass:function(){},addScrollAreaClass:function(){},setScrollAreaStyleProperty:function(){},setScrollContentStyleProperty:function(){},getScrollContentStyleValue:function(){return""},setScrollAreaScrollLeft:function(){},getScrollAreaScrollLeft:function(){return 0},getScrollContentOffsetWidth:function(){return 0},getScrollAreaOffsetWidth:function(){return 0},computeScrollAreaClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeScrollContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeHorizontalScrollbarHeight:function(){return 0}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.adapter.computeHorizontalScrollbarHeight();this.adapter.setScrollAreaStyleProperty("margin-bottom",-t+"px"),this.adapter.addScrollAreaClass(e.cssClasses.SCROLL_AREA_SCROLL)},e.prototype.getScrollPosition=function(){if(this.isRTL())return this.computeCurrentScrollPositionRTL();var t=this.calculateCurrentTranslateX();return this.adapter.getScrollAreaScrollLeft()-t},e.prototype.handleInteraction=function(){this.isAnimating&&this.stopScrollAnimation()},e.prototype.handleTransitionEnd=function(t){this.isAnimating&&this.adapter.eventTargetMatchesSelector(t.target,e.strings.CONTENT_SELECTOR)&&(this.isAnimating=!1,this.adapter.removeClass(e.cssClasses.ANIMATING))},e.prototype.incrementScroll=function(t){0!==t&&this.animate(this.getIncrementScrollOperation(t))},e.prototype.incrementScrollImmediate=function(t){if(0!==t){var e=this.getIncrementScrollOperation(t);0!==e.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(e.finalScrollPosition))}},e.prototype.scrollTo=function(t){this.isRTL()?this.scrollToImplRTL(t):this.scrollToImpl(t)},e.prototype.getRTLScroller=function(){return this.rtlScrollerInstance||(this.rtlScrollerInstance=this.rtlScrollerFactory()),this.rtlScrollerInstance},e.prototype.calculateCurrentTranslateX=function(){var t=this.adapter.getScrollContentStyleValue("transform");if("none"===t)return 0;var e=/\((.+?)\)/.exec(t);if(!e)return 0;var r=l(e[1].split(","),6);return parseFloat(r[4])},e.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},e.prototype.computeCurrentScrollPositionRTL=function(){var t=this.calculateCurrentTranslateX();return this.getRTLScroller().getScrollPositionRTL(t)},e.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},e.prototype.scrollToImpl=function(t){var e=this.getScrollPosition(),r=this.clampScrollValue(t);this.animate({finalScrollPosition:r,scrollDelta:r-e})},e.prototype.scrollToImplRTL=function(t){var e=this.getRTLScroller().scrollToRTL(t);this.animate(e)},e.prototype.getIncrementScrollOperation=function(t){if(this.isRTL())return this.getRTLScroller().incrementScrollRTL(t);var e=this.getScrollPosition(),r=this.clampScrollValue(t+e);return{finalScrollPosition:r,scrollDelta:r-e}},e.prototype.animate=function(t){var r=this;0!==t.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition),this.adapter.setScrollContentStyleProperty("transform","translateX("+t.scrollDelta+"px)"),this.adapter.computeScrollAreaClientRect(),requestAnimationFrame((function(){r.adapter.addClass(e.cssClasses.ANIMATING),r.adapter.setScrollContentStyleProperty("transform","none")})),this.isAnimating=!0)},e.prototype.stopScrollAnimation=function(){this.isAnimating=!1;var t=this.getAnimatingScrollPosition();this.adapter.removeClass(e.cssClasses.ANIMATING),this.adapter.setScrollContentStyleProperty("transform","translateX(0px)"),this.adapter.setScrollAreaScrollLeft(t)},e.prototype.getAnimatingScrollPosition=function(){var t=this.calculateCurrentTranslateX(),e=this.adapter.getScrollAreaScrollLeft();return this.isRTL()?this.getRTLScroller().getAnimatingScrollPosition(e,t):e-t},e.prototype.rtlScrollerFactory=function(){var t=this.adapter.getScrollAreaScrollLeft();this.adapter.setScrollAreaScrollLeft(t-1);var e=this.adapter.getScrollAreaScrollLeft();if(e<0)return this.adapter.setScrollAreaScrollLeft(t),new C(this.adapter);var r=this.adapter.computeScrollAreaClientRect(),n=this.adapter.computeScrollContentClientRect(),i=Math.round(n.right-r.right);return this.adapter.setScrollAreaScrollLeft(t),i===e?new k(this.adapter):new x(this.adapter)},e.prototype.isRTL=function(){return"rtl"===this.adapter.getScrollContentStyleValue("direction")},e}(d),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.area=this.root.querySelector(T.strings.AREA_SELECTOR),this.content=this.root.querySelector(T.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleInteraction=function(){t.foundation.handleInteraction()},this.handleTransitionEnd=function(e){t.foundation.handleTransitionEnd(e)},this.area.addEventListener("wheel",this.handleInteraction,b()),this.area.addEventListener("touchstart",this.handleInteraction,b()),this.area.addEventListener("pointerdown",this.handleInteraction,b()),this.area.addEventListener("mousedown",this.handleInteraction,b()),this.area.addEventListener("keydown",this.handleInteraction,b()),this.content.addEventListener("transitionend",this.handleTransitionEnd)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.area.removeEventListener("wheel",this.handleInteraction,b()),this.area.removeEventListener("touchstart",this.handleInteraction,b()),this.area.removeEventListener("pointerdown",this.handleInteraction,b()),this.area.removeEventListener("mousedown",this.handleInteraction,b()),this.area.removeEventListener("keydown",this.handleInteraction,b()),this.content.removeEventListener("transitionend",this.handleTransitionEnd)},e.prototype.getDefaultFoundation=function(){var t=this;return new T({eventTargetMatchesSelector:function(t,e){return f(t,e)},addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},addScrollAreaClass:function(e){t.area.classList.add(e)},setScrollAreaStyleProperty:function(e,r){t.area.style.setProperty(e,r)},setScrollContentStyleProperty:function(e,r){t.content.style.setProperty(e,r)},getScrollContentStyleValue:function(e){return window.getComputedStyle(t.content).getPropertyValue(e)},setScrollAreaScrollLeft:function(e){return t.area.scrollLeft=e},getScrollAreaScrollLeft:function(){return t.area.scrollLeft},getScrollContentOffsetWidth:function(){return t.content.offsetWidth},getScrollAreaOffsetWidth:function(){return t.area.offsetWidth},computeScrollAreaClientRect:function(){return t.area.getBoundingClientRect()},computeScrollContentClientRect:function(){return t.content.getBoundingClientRect()},computeHorizontalScrollbarHeight:function(){return function(t,e){if(void 0===e&&(e=!0),e&&void 0!==v)return v;var r=t.createElement("div");r.classList.add(_.SCROLL_TEST),t.body.appendChild(r);var n=r.offsetHeight-r.clientHeight;return t.body.removeChild(r),e&&(v=n),n}
24
24
  /**
25
25
  * @license
26
26
  * Copyright 2018 Google Inc.
@@ -42,7 +42,7 @@ import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}fr
42
42
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
43
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
44
44
  * THE SOFTWARE.
45
- */F.add(Y.ARROW_LEFT_KEY),F.add(Y.ARROW_RIGHT_KEY),F.add(Y.END_KEY),F.add(Y.HOME_KEY),F.add(Y.ENTER_KEY),F.add(Y.SPACE_KEY);var X=new Map;X.set(V.ARROW_LEFT_KEYCODE,Y.ARROW_LEFT_KEY),X.set(V.ARROW_RIGHT_KEYCODE,Y.ARROW_RIGHT_KEY),X.set(V.END_KEYCODE,Y.END_KEY),X.set(V.HOME_KEYCODE,Y.HOME_KEY),X.set(V.ENTER_KEYCODE,Y.ENTER_KEY),X.set(V.SPACE_KEYCODE,Y.SPACE_KEY);var G=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.useAutomaticActivation=!1,n}return c(e,t),Object.defineProperty(e,"strings",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return V},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{scrollTo:function(){},incrementScroll:function(){},getScrollPosition:function(){return 0},getScrollContentWidth:function(){return 0},getOffsetWidth:function(){return 0},isRTL:function(){return!1},setActiveTab:function(){},activateTabAtIndex:function(){},deactivateTabAtIndex:function(){},focusTabAtIndex:function(){},getTabIndicatorClientRectAtIndex:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabDimensionsAtIndex:function(){return{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:function(){return-1},getFocusedTabIndex:function(){return-1},getIndexOfTabById:function(){return-1},getTabListLength:function(){return 0},notifyTabActivated:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setUseAutomaticActivation=function(t){this.useAutomaticActivation=t},e.prototype.activateTab=function(t){var e,r=this.adapter.getPreviousActiveTabIndex();this.indexIsInRange(t)&&t!==r&&(-1!==r&&(this.adapter.deactivateTabAtIndex(r),e=this.adapter.getTabIndicatorClientRectAtIndex(r)),this.adapter.activateTabAtIndex(t,e),this.scrollIntoView(t),this.adapter.notifyTabActivated(t))},e.prototype.handleKeyDown=function(t){var e=this.getKeyFromEvent(t);if(void 0!==e)if(this.isActivationKey(e)||t.preventDefault(),this.useAutomaticActivation){if(this.isActivationKey(e))return;var r=this.determineTargetFromKey(this.adapter.getPreviousActiveTabIndex(),e);this.adapter.setActiveTab(r),this.scrollIntoView(r)}else{var n=this.adapter.getFocusedTabIndex();this.isActivationKey(e)?this.adapter.setActiveTab(n):(r=this.determineTargetFromKey(n,e),this.adapter.focusTabAtIndex(r),this.scrollIntoView(r))}},e.prototype.handleTabInteraction=function(t){this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId))},e.prototype.scrollIntoView=function(t){this.indexIsInRange(t)&&(0!==t?t!==this.adapter.getTabListLength()-1?this.isRTL()?this.scrollIntoViewImplRTL(t):this.scrollIntoViewImpl(t):this.adapter.scrollTo(this.adapter.getScrollContentWidth()):this.adapter.scrollTo(0))},e.prototype.determineTargetFromKey=function(t,e){var r=this.isRTL(),n=this.adapter.getTabListLength()-1,i=t;return e===Y.END_KEY?i=n:e===Y.ARROW_LEFT_KEY&&!r||e===Y.ARROW_RIGHT_KEY&&r?i-=1:e===Y.ARROW_RIGHT_KEY&&!r||e===Y.ARROW_LEFT_KEY&&r?i+=1:i=0,i<0?i=n:i>n&&(i=0),i},e.prototype.calculateScrollIncrement=function(t,e,r,n){var i=this.adapter.getTabDimensionsAtIndex(e),o=i.contentLeft-r-n+V.EXTRA_SCROLL_AMOUNT;return e<t?Math.min(i.contentRight-r-V.EXTRA_SCROLL_AMOUNT,0):Math.max(o,0)},e.prototype.calculateScrollIncrementRTL=function(t,e,r,n,i){var o=this.adapter.getTabDimensionsAtIndex(e),a=i-o.contentLeft-r-V.EXTRA_SCROLL_AMOUNT;return e>t?Math.max(i-o.contentRight-r-n+V.EXTRA_SCROLL_AMOUNT,0):Math.min(a,0)},e.prototype.findAdjacentTabIndexClosestToEdge=function(t,e,r,n){var i=e.rootLeft-r,o=e.rootRight-r-n,a=i+o;return i<0||a<0?t-1:o>0||a>0?t+1:-1},e.prototype.findAdjacentTabIndexClosestToEdgeRTL=function(t,e,r,n,i){var o=i-e.rootLeft-n-r,a=i-e.rootRight-r,c=o+a;return o>0||c>0?t+1:a<0||c<0?t-1:-1},e.prototype.getKeyFromEvent=function(t){return F.has(t.key)?t.key:X.get(t.keyCode)},e.prototype.isActivationKey=function(t){return t===Y.SPACE_KEY||t===Y.ENTER_KEY},e.prototype.indexIsInRange=function(t){return t>=0&&t<this.adapter.getTabListLength()},e.prototype.isRTL=function(){return this.adapter.isRTL()},e.prototype.scrollIntoViewImpl=function(t){var e=this.adapter.getScrollPosition(),r=this.adapter.getOffsetWidth(),n=this.adapter.getTabDimensionsAtIndex(t),i=this.findAdjacentTabIndexClosestToEdge(t,n,e,r);if(this.indexIsInRange(i)){var o=this.calculateScrollIncrement(t,i,e,r);this.adapter.incrementScroll(o)}},e.prototype.scrollIntoViewImplRTL=function(t){var e=this.adapter.getScrollPosition(),r=this.adapter.getOffsetWidth(),n=this.adapter.getTabDimensionsAtIndex(t),i=this.adapter.getScrollContentWidth(),o=this.findAdjacentTabIndexClosestToEdgeRTL(t,n,e,r,i);if(this.indexIsInRange(o)){var a=this.calculateScrollIncrementRTL(t,o,e,r,i);this.adapter.incrementScroll(a)}},e}(d),J=G.strings,U=0,q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){var e,r;try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next())i.value.focusOnActivate=t}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useAutomaticActivation",{set:function(t){this.foundation.setUseAutomaticActivation(t)},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new H(t)}),void 0===e&&(e=function(t){return new j(t)}),this.tabList=this.instantiateTabs(t),this.tabScroller=this.instantiatetabScroller(e)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleTabInteraction=function(e){t.foundation.handleTabInteraction(e)},this.handleKeyDown=function(e){t.foundation.handleKeyDown(e)},this.listen(K.strings.INTERACTED_EVENT,this.handleTabInteraction),this.listen("keydown",this.handleKeyDown);for(var e=0;e<this.tabList.length;e++)if(this.tabList[e].active){this.scrollIntoView(e);break}},e.prototype.destroy=function(){var e,r;t.prototype.destroy.call(this),this.unlisten(K.strings.INTERACTED_EVENT,this.handleTabInteraction),this.unlisten("keydown",this.handleKeyDown);try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next())i.value.destroy()}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}this.tabScroller&&this.tabScroller.destroy()},e.prototype.getDefaultFoundation=function(){var t=this;return new G({scrollTo:function(e){t.tabScroller.scrollTo(e)},incrementScroll:function(e){t.tabScroller.incrementScroll(e)},getScrollPosition:function(){return t.tabScroller.getScrollPosition()},getScrollContentWidth:function(){return t.tabScroller.getScrollContentWidth()},getOffsetWidth:function(){return t.root.offsetWidth},isRTL:function(){return"rtl"===window.getComputedStyle(t.root).getPropertyValue("direction")},setActiveTab:function(e){t.foundation.activateTab(e)},activateTabAtIndex:function(e,r){t.tabList[e].activate(r)},deactivateTabAtIndex:function(e){t.tabList[e].deactivate()},focusTabAtIndex:function(e){t.tabList[e].focus()},getTabIndicatorClientRectAtIndex:function(e){return t.tabList[e].computeIndicatorClientRect()},getTabDimensionsAtIndex:function(e){return t.tabList[e].computeDimensions()},getPreviousActiveTabIndex:function(){for(var e=0;e<t.tabList.length;e++)if(t.tabList[e].active)return e;return-1},getFocusedTabIndex:function(){var e=t.getTabElements(),r=document.activeElement;return e.indexOf(r)},getIndexOfTabById:function(e){for(var r=0;r<t.tabList.length;r++)if(t.tabList[r].id===e)return r;return-1},getTabListLength:function(){return t.tabList.length},notifyTabActivated:function(e){return t.emit(J.TAB_ACTIVATED_EVENT,{index:e},!0)}})},e.prototype.activateTab=function(t){this.foundation.activateTab(t)},e.prototype.scrollIntoView=function(t){this.foundation.scrollIntoView(t)},e.prototype.getTabElements=function(){return[].slice.call(this.root.querySelectorAll(J.TAB_SELECTOR))},e.prototype.instantiateTabs=function(t){return this.getTabElements().map((function(e){return e.id=e.id||"mdc-tab-"+ ++U,t(e)}))},e.prototype.instantiatetabScroller=function(t){var e=this.root.querySelector(J.TAB_SCROLLER_SELECTOR);return e?t(e):null},e}(u);
45
+ */(document)}})},e.prototype.getScrollPosition=function(){return this.foundation.getScrollPosition()},e.prototype.getScrollContentWidth=function(){return this.content.offsetWidth},e.prototype.incrementScroll=function(t){this.foundation.incrementScroll(t)},e.prototype.scrollTo=function(t){this.foundation.scrollTo(t)},e}(u),S={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"},A={CONTENT_SELECTOR:".mdc-tab-indicator__content"},O=function(t){function e(r){return t.call(this,s(s({},e.defaultAdapter),r))||this}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return S},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return A},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.computeContentClientRect=function(){return this.adapter.computeContentClientRect()},e}(d),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.activate=function(){this.adapter.addClass(O.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(O.cssClasses.ACTIVE)},e}(O),I=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.activate=function(t){if(t){var e=this.computeContentClientRect(),r=t.width/e.width,n=t.left-e.left;this.adapter.addClass(O.cssClasses.NO_TRANSITION),this.adapter.setContentStyleProperty("transform","translateX("+n+"px) scaleX("+r+")"),this.computeContentClientRect(),this.adapter.removeClass(O.cssClasses.NO_TRANSITION),this.adapter.addClass(O.cssClasses.ACTIVE),this.adapter.setContentStyleProperty("transform","")}else this.adapter.addClass(O.cssClasses.ACTIVE)},e.prototype.deactivate=function(){this.adapter.removeClass(O.cssClasses.ACTIVE)},e}(O),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(){this.content=this.root.querySelector(O.strings.CONTENT_SELECTOR)},e.prototype.computeContentClientRect=function(){return this.foundation.computeContentClientRect()},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},computeContentClientRect:function(){return t.content.getBoundingClientRect()},setContentStyleProperty:function(e,r){t.content.style.setProperty(e,r)}};return this.root.classList.contains(O.cssClasses.FADE)?new R(e):new I(e)},e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e}(u),L={ACTIVE:"mdc-tab--active"},z={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"},D=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.focusOnActivate=!0,n}return c(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return z},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},activateIndicator:function(){},deactivateIndicator:function(){},notifyInteracted:function(){},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){}}},enumerable:!1,configurable:!0}),e.prototype.handleClick=function(){this.adapter.notifyInteracted()},e.prototype.isActive=function(){return this.adapter.hasClass(L.ACTIVE)},e.prototype.setFocusOnActivate=function(t){this.focusOnActivate=t},e.prototype.activate=function(t){this.adapter.addClass(L.ACTIVE),this.adapter.setAttr(z.ARIA_SELECTED,"true"),this.adapter.setAttr(z.TABINDEX,"0"),this.adapter.activateIndicator(t),this.focusOnActivate&&this.adapter.focus()},e.prototype.deactivate=function(){this.isActive()&&(this.adapter.removeClass(L.ACTIVE),this.adapter.setAttr(z.ARIA_SELECTED,"false"),this.adapter.setAttr(z.TABINDEX,"-1"),this.adapter.deactivateIndicator())},e.prototype.computeDimensions=function(){var t=this.adapter.getOffsetWidth(),e=this.adapter.getOffsetLeft(),r=this.adapter.getContentOffsetWidth(),n=this.adapter.getContentOffsetLeft();return{contentLeft:e+n,contentRight:e+n+r,rootLeft:e,rootRight:e+t}},e}(d),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){void 0===t&&(t=function(t,e){return new p(t,e)}),void 0===e&&(e=function(t){return new j(t)}),this.id=this.root.id;var r=new m(p.createAdapter(this));this.ripple=t(this.root,r);var n=this.root.querySelector(D.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator=e(n),this.content=this.root.querySelector(D.strings.CONTENT_SELECTOR)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen("click",this.handleClick)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new D({setAttr:function(e,r){return t.root.setAttribute(e,r)},addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},activateIndicator:function(e){t.tabIndicator.activate(e)},deactivateIndicator:function(){t.tabIndicator.deactivate()},notifyInteracted:function(){return t.emit(D.strings.INTERACTED_EVENT,{tabId:t.id},!0)},getOffsetLeft:function(){return t.root.offsetLeft},getOffsetWidth:function(){return t.root.offsetWidth},getContentOffsetLeft:function(){return t.content.offsetLeft},getContentOffsetWidth:function(){return t.content.offsetWidth},focus:function(){return t.root.focus()}})},Object.defineProperty(e.prototype,"active",{get:function(){return this.foundation.isActive()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){this.foundation.setFocusOnActivate(t)},enumerable:!1,configurable:!0}),e.prototype.activate=function(t){this.foundation.activate(t)},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.computeIndicatorClientRect=function(){return this.tabIndicator.computeContentClientRect()},e.prototype.computeDimensions=function(){return this.foundation.computeDimensions()},e.prototype.focus=function(){this.root.focus()},e}(u),N={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"},P={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32},W=new Set;W.add(N.ARROW_LEFT_KEY),W.add(N.ARROW_RIGHT_KEY),W.add(N.END_KEY),W.add(N.HOME_KEY),W.add(N.ENTER_KEY),W.add(N.SPACE_KEY);var B=new Map;B.set(P.ARROW_LEFT_KEYCODE,N.ARROW_LEFT_KEY),B.set(P.ARROW_RIGHT_KEYCODE,N.ARROW_RIGHT_KEY),B.set(P.END_KEYCODE,N.END_KEY),B.set(P.HOME_KEYCODE,N.HOME_KEY),B.set(P.ENTER_KEYCODE,N.ENTER_KEY),B.set(P.SPACE_KEYCODE,N.SPACE_KEY);var K=function(t){function e(r){var n=t.call(this,s(s({},e.defaultAdapter),r))||this;return n.useAutomaticActivation=!1,n}return c(e,t),Object.defineProperty(e,"strings",{get:function(){return N},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{scrollTo:function(){},incrementScroll:function(){},getScrollPosition:function(){return 0},getScrollContentWidth:function(){return 0},getOffsetWidth:function(){return 0},isRTL:function(){return!1},setActiveTab:function(){},activateTabAtIndex:function(){},deactivateTabAtIndex:function(){},focusTabAtIndex:function(){},getTabIndicatorClientRectAtIndex:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabDimensionsAtIndex:function(){return{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:function(){return-1},getFocusedTabIndex:function(){return-1},getIndexOfTabById:function(){return-1},getTabListLength:function(){return 0},notifyTabActivated:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setUseAutomaticActivation=function(t){this.useAutomaticActivation=t},e.prototype.activateTab=function(t){var e,r=this.adapter.getPreviousActiveTabIndex();this.indexIsInRange(t)&&t!==r&&(-1!==r&&(this.adapter.deactivateTabAtIndex(r),e=this.adapter.getTabIndicatorClientRectAtIndex(r)),this.adapter.activateTabAtIndex(t,e),this.scrollIntoView(t),this.adapter.notifyTabActivated(t))},e.prototype.handleKeyDown=function(t){var e=this.getKeyFromEvent(t);if(void 0!==e)if(this.isActivationKey(e)||t.preventDefault(),this.useAutomaticActivation){if(this.isActivationKey(e))return;var r=this.determineTargetFromKey(this.adapter.getPreviousActiveTabIndex(),e);this.adapter.setActiveTab(r),this.scrollIntoView(r)}else{var n=this.adapter.getFocusedTabIndex();this.isActivationKey(e)?this.adapter.setActiveTab(n):(r=this.determineTargetFromKey(n,e),this.adapter.focusTabAtIndex(r),this.scrollIntoView(r))}},e.prototype.handleTabInteraction=function(t){this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId))},e.prototype.scrollIntoView=function(t){this.indexIsInRange(t)&&(0!==t?t!==this.adapter.getTabListLength()-1?this.isRTL()?this.scrollIntoViewImplRTL(t):this.scrollIntoViewImpl(t):this.adapter.scrollTo(this.adapter.getScrollContentWidth()):this.adapter.scrollTo(0))},e.prototype.determineTargetFromKey=function(t,e){var r=this.isRTL(),n=this.adapter.getTabListLength()-1,i=t;return e===N.END_KEY?i=n:e===N.ARROW_LEFT_KEY&&!r||e===N.ARROW_RIGHT_KEY&&r?i-=1:e===N.ARROW_RIGHT_KEY&&!r||e===N.ARROW_LEFT_KEY&&r?i+=1:i=0,i<0?i=n:i>n&&(i=0),i},e.prototype.calculateScrollIncrement=function(t,e,r,n){var i=this.adapter.getTabDimensionsAtIndex(e),o=i.contentLeft-r-n+P.EXTRA_SCROLL_AMOUNT;return e<t?Math.min(i.contentRight-r-P.EXTRA_SCROLL_AMOUNT,0):Math.max(o,0)},e.prototype.calculateScrollIncrementRTL=function(t,e,r,n,i){var o=this.adapter.getTabDimensionsAtIndex(e),a=i-o.contentLeft-r-P.EXTRA_SCROLL_AMOUNT;return e>t?Math.max(i-o.contentRight-r-n+P.EXTRA_SCROLL_AMOUNT,0):Math.min(a,0)},e.prototype.findAdjacentTabIndexClosestToEdge=function(t,e,r,n){var i=e.rootLeft-r,o=e.rootRight-r-n,a=i+o;return i<0||a<0?t-1:o>0||a>0?t+1:-1},e.prototype.findAdjacentTabIndexClosestToEdgeRTL=function(t,e,r,n,i){var o=i-e.rootLeft-n-r,a=i-e.rootRight-r,c=o+a;return o>0||c>0?t+1:a<0||c<0?t-1:-1},e.prototype.getKeyFromEvent=function(t){return W.has(t.key)?t.key:B.get(t.keyCode)},e.prototype.isActivationKey=function(t){return t===N.SPACE_KEY||t===N.ENTER_KEY},e.prototype.indexIsInRange=function(t){return t>=0&&t<this.adapter.getTabListLength()},e.prototype.isRTL=function(){return this.adapter.isRTL()},e.prototype.scrollIntoViewImpl=function(t){var e=this.adapter.getScrollPosition(),r=this.adapter.getOffsetWidth(),n=this.adapter.getTabDimensionsAtIndex(t),i=this.findAdjacentTabIndexClosestToEdge(t,n,e,r);if(this.indexIsInRange(i)){var o=this.calculateScrollIncrement(t,i,e,r);this.adapter.incrementScroll(o)}},e.prototype.scrollIntoViewImplRTL=function(t){var e=this.adapter.getScrollPosition(),r=this.adapter.getOffsetWidth(),n=this.adapter.getTabDimensionsAtIndex(t),i=this.adapter.getScrollContentWidth(),o=this.findAdjacentTabIndexClosestToEdgeRTL(t,n,e,r,i);if(this.indexIsInRange(o)){var a=this.calculateScrollIncrementRTL(t,o,e,r,i);this.adapter.incrementScroll(a)}},e}(d),Y=K.strings,H=0,V=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"focusOnActivate",{set:function(t){var e,r;try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next())i.value.focusOnActivate=t}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useAutomaticActivation",{set:function(t){this.foundation.setUseAutomaticActivation(t)},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new M(t)}),void 0===e&&(e=function(t){return new E(t)}),this.tabList=this.instantiateTabs(t),this.tabScroller=this.instantiatetabScroller(e)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleTabInteraction=function(e){t.foundation.handleTabInteraction(e)},this.handleKeyDown=function(e){t.foundation.handleKeyDown(e)},this.listen(D.strings.INTERACTED_EVENT,this.handleTabInteraction),this.listen("keydown",this.handleKeyDown);for(var e=0;e<this.tabList.length;e++)if(this.tabList[e].active){this.scrollIntoView(e);break}},e.prototype.destroy=function(){var e,r;t.prototype.destroy.call(this),this.unlisten(D.strings.INTERACTED_EVENT,this.handleTabInteraction),this.unlisten("keydown",this.handleKeyDown);try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next())i.value.destroy()}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}this.tabScroller&&this.tabScroller.destroy()},e.prototype.getDefaultFoundation=function(){var t=this;return new K({scrollTo:function(e){t.tabScroller.scrollTo(e)},incrementScroll:function(e){t.tabScroller.incrementScroll(e)},getScrollPosition:function(){return t.tabScroller.getScrollPosition()},getScrollContentWidth:function(){return t.tabScroller.getScrollContentWidth()},getOffsetWidth:function(){return t.root.offsetWidth},isRTL:function(){return"rtl"===window.getComputedStyle(t.root).getPropertyValue("direction")},setActiveTab:function(e){t.foundation.activateTab(e)},activateTabAtIndex:function(e,r){t.tabList[e].activate(r)},deactivateTabAtIndex:function(e){t.tabList[e].deactivate()},focusTabAtIndex:function(e){t.tabList[e].focus()},getTabIndicatorClientRectAtIndex:function(e){return t.tabList[e].computeIndicatorClientRect()},getTabDimensionsAtIndex:function(e){return t.tabList[e].computeDimensions()},getPreviousActiveTabIndex:function(){for(var e=0;e<t.tabList.length;e++)if(t.tabList[e].active)return e;return-1},getFocusedTabIndex:function(){var e=t.getTabElements(),r=document.activeElement;return e.indexOf(r)},getIndexOfTabById:function(e){for(var r=0;r<t.tabList.length;r++)if(t.tabList[r].id===e)return r;return-1},getTabListLength:function(){return t.tabList.length},notifyTabActivated:function(e){return t.emit(Y.TAB_ACTIVATED_EVENT,{index:e},!0)}})},e.prototype.activateTab=function(t){this.foundation.activateTab(t)},e.prototype.scrollIntoView=function(t){this.foundation.scrollIntoView(t)},e.prototype.getTabElements=function(){return[].slice.call(this.root.querySelectorAll(Y.TAB_SELECTOR))},e.prototype.instantiateTabs=function(t){return this.getTabElements().map((function(e){return e.id=e.id||"mdc-tab-"+ ++H,t(e)}))},e.prototype.instantiatetabScroller=function(t){var e=this.root.querySelector(Y.TAB_SCROLLER_SELECTOR);return e?t(e):null},e}(u);
46
46
  /**
47
47
  * @license
48
48
  * Copyright 2018 Google Inc.
@@ -64,4 +64,4 @@ import{r as t,c as e,h as r,a as n}from"./p-DBTJNfo7.js";import{g as i,b as o}fr
64
64
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
65
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66
66
  * THE SOFTWARE.
67
- */const{TAB_ACTIVATED_EVENT:Q}=Y,Z=class{constructor(r){t(this,r),this.changeTab=e(this,"changeTab"),this.tabs=[],this.canScrollLeft=!1,this.canScrollRight=!1,this.setupMdc=!1,this.handleTabActivated=this.handleTabActivated.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleLeftScrollClick=this.handleLeftScrollClick.bind(this),this.handleRightScrollClick=this.handleRightScrollClick.bind(this),this.renderTab=this.renderTab.bind(this)}connectedCallback(){this.setup()}componentDidLoad(){this.setup(),this.triggerIconColorWarning()}componentDidUpdate(){this.setupMdc&&(this.setup(),this.setupMdc=!1)}disconnectedCallback(){this.tearDown()}render(){return r("div",{key:"5fcbc5f69907b3437a7c17d18d5356ac45f84ea4",class:"mdc-tab-bar",role:"tablist"},r("div",{key:"0ec7bac2105ac5a2620379a907fc660344387539",class:{"mdc-tab-scroller":!0,"can-scroll-left":this.canScrollLeft,"can-scroll-right":this.canScrollRight}},r("div",{key:"e4bd200335ff91ff6cb6476fef0c30ff90ee1c44",class:"mdc-tab-scroller__scroll-area lime-hide-scrollbars"},r("div",{key:"c3f774e3524131d4d42c34eb1884ac95a173422e",class:"mdc-tab-scroller__scroll-content"},this.tabs.map(this.renderTab))),r("div",{key:"babdaf65720c52c03cf4bfedee68993ead018e94",class:"scroll-fade left"}),r("div",{key:"fe06945559ccf14921f523776a15f68f62496804",class:"scroll-button left"},r("button",{key:"5a6098a7776d635f9aaa9a7f59b4e7024f270ee1",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollLeft,onClick:this.handleLeftScrollClick},r("limel-icon",{key:"89bdf714b634b0ec7d56d3b1b66961a74999e9e6",name:"angle_left"}))),r("div",{key:"e7c6d0adb6634015c3482a3787451ffcfa37ee90",class:"scroll-fade right"}),r("div",{key:"97d2229df3f45d495ec59f97ae92c53fa63a5cab",class:"scroll-button right"},r("button",{key:"1d4c1bf329e8739802faa4040d7438aa4c2056f0",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollRight,onClick:this.handleRightScrollClick},r("limel-icon",{key:"1bc8b53f7958170c51aac799e05d441e5d6666c7",name:"angle_right"})))))}tabsChanged(t=[],e=[]){const r=t.map((t=>t.id)),n=e.map((t=>t.id));a(r,n)||(this.setupMdc=!0,this.tearDown())}handleWindowResize(){this.scrollArea&&this.handleScroll()}setup(){const t=this.host.shadowRoot.querySelector(".mdc-tab-bar");t&&(this.mdcTabBar=new q(t),this.mdcTabBar.focusOnActivate=!0,this.mdcTabBar.useAutomaticActivation=!0,this.scrollArea=t.querySelector(".mdc-tab-scroller__scroll-area"),this.scrollContent=t.querySelector(".mdc-tab-scroller__scroll-content"),this.setupListeners(),setTimeout(this.handleScroll,0))}tearDown(){this.scrollArea&&this.scrollArea.removeEventListener("scroll",this.handleScroll),this.mdcTabBar&&(this.mdcTabBar.unlisten(Q,this.handleTabActivated),this.mdcTabBar.destroy())}setupListeners(){this.mdcTabBar.listen(Q,this.handleTabActivated),this.scrollArea.addEventListener("scroll",this.handleScroll,{passive:!0})}handleTabActivated(t){const e=function(t,e){const r=t.findIndex((t=>!0===t.active)),n=[...t];return-1!==r&&(n[r]=Object.assign(Object.assign({},t[r]),{active:!1})),n[e]=Object.assign(Object.assign({},t[e]),{active:!0}),n}(this.tabs,t.detail.index);k(e,this.tabs).sort(this.sortByInactive).forEach((t=>{this.changeTab.emit(t)})),this.tabs=e}sortByInactive(t,e){return Number(t.active)-Number(e.active)}handleScroll(){const t=this.scrollArea.scrollLeft,e=Math.floor(this.scrollContent.getBoundingClientRect().width-this.scrollArea.getBoundingClientRect().width-t);this.canScrollLeft=t>40,this.canScrollRight=e>40}handleLeftScrollClick(){const t=this.getScrollDistance();this.scrollArea.scroll({left:this.scrollArea.scrollLeft-t,behavior:"smooth"})}handleRightScrollClick(){const t=this.getScrollDistance();this.scrollArea.scroll({left:this.scrollArea.scrollLeft+t,behavior:"smooth"})}getScrollDistance(){if(!this.scrollArea)return 150;const t=this.scrollArea.getBoundingClientRect().width;return Math.max(.8*t,150)}renderIcon(t){if(!t.icon)return;const e=i(t.icon),n=o(t.icon,t.iconColor),a={color:""};return n&&(a.color=n),r("limel-icon",{class:"mdc-tab__icon",name:e,style:a,size:"small","aria-hidden":"true"})}renderTab(t){return r("button",{class:{"mdc-tab":!0,"mdc-tab--active":!!t.active},role:"tab","aria-selected":t.active?"true":"false",tabindex:t.active?0:-1},r("span",{class:"mdc-tab__content"},this.renderIcon(t),r("span",{class:"mdc-tab__text-label"},t.text),t.badge?r("limel-badge",{label:t.badge}):""),r("span",{class:{"mdc-tab-indicator":!0,"mdc-tab-indicator--active":!!t.active}},r("span",{class:"mdc-tab-indicator__content mdc-tab-indicator__content--underline"})),r("span",{class:"mdc-tab__ripple"}))}triggerIconColorWarning(){this.tabs.some((t=>t.iconColor))&&console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}get host(){return n(this)}static get watchers(){return{tabs:[{tabsChanged:0}]}}};Z.style="@charset \"UTF-8\";.scroll-fade,.scroll-button{position:absolute;transition-property:transform;transition-duration:0.3s;transition-timing-function:ease-out}.scroll-fade{top:0;height:100%;width:4rem;pointer-events:none}.scroll-fade.left{transform:translate3d(-4rem, 0, 0);left:0;background:linear-gradient(270deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%)}.scroll-fade.right{transform:translate3d(4rem, 0, 0);right:0;background:linear-gradient(90deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%)}.scroll-button{display:flex;align-items:center;top:0;bottom:0}.scroll-button.left{transform:translate3d(-4rem, 0, 0);left:0.25rem}.scroll-button.right{transform:translate3d(4rem, 0, 0);right:0.25rem}.scroll-button:hover{transform:translate3d(0, 0, 0)}.scroll-button button{all:unset;display:flex;align-items:center;justify-content:center;width:1.25rem;height:calc(100% - 0.25rem * 2);border-radius:0.25rem}.scroll-button button:not(:disabled){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):focus,.scroll-button button:not(:disabled):focus-visible{will-change:color, background-color, box-shadow, transform}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.scroll-button button:not(:disabled):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.scroll-button limel-icon{width:1rem}.mdc-tab-scroller{position:relative;overflow:hidden}.mdc-tab-scroller.can-scroll-left .scroll-fade.left,.mdc-tab-scroller.can-scroll-left .scroll-button.left,.mdc-tab-scroller.can-scroll-right .scroll-fade.right,.mdc-tab-scroller.can-scroll-right .scroll-button.right{transform:translate3d(0, 0, 0)}.mdc-tab-scroller.can-scroll-left:not(.can-scroll-right) .scroll-button.right,.mdc-tab-scroller.can-scroll-right:not(.can-scroll-left) .scroll-button.left{opacity:0.5;transition-delay:0.5s}.lime-hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.mdc-tab-scroller__scroll-content{padding:0.25rem var(--limel-tab-active-outer-edge-curve-size) 0 var(--limel-tab-active-outer-edge-curve-size);background-color:rgb(var(--limel-tab-background-color))}.mdc-tab-bar{width:100%}.mdc-tab{height:48px}.mdc-tab--stacked{height:72px}.mdc-tab-scroller.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-scroller{overflow-y:hidden}.mdc-tab-scroller__test{position:absolute;top:-9999px;width:100px;height:100px;overflow-x:scroll}.mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:touch;display:flex;overflow-x:hidden}.mdc-tab-scroller__scroll-area::-webkit-scrollbar,.mdc-tab-scroller__test::-webkit-scrollbar{display:none}.mdc-tab-scroller__scroll-area--scroll{overflow-x:scroll}.mdc-tab-scroller__scroll-content{position:relative;display:flex;flex:1 0 auto;transform:none;will-change:transform}.mdc-tab-scroller--align-start .mdc-tab-scroller__scroll-content{justify-content:flex-start}.mdc-tab-scroller--align-end .mdc-tab-scroller__scroll-content{justify-content:flex-end}.mdc-tab-scroller--align-center .mdc-tab-scroller__scroll-content{justify-content:center}.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:auto}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#018786;color:var(--mdc-theme-secondary, #018786)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase)}.mdc-tab .mdc-tab__text-label{color:rgba(0, 0, 0, 0.6)}.mdc-tab .mdc-tab__icon{color:rgba(0, 0, 0, 0.54);fill:currentColor}.mdc-tab{position:relative}.mdc-tab__content{position:relative}.mdc-tab__icon{width:24px;height:24px;font-size:24px}.mdc-tab--active .mdc-tab__text-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-tab--active .mdc-tab__icon{color:#6200ee;color:var(--mdc-theme-primary, #6200ee);fill:currentColor}.mdc-tab{background:none}.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px;}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-tab{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-tab .mdc-tab__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-tab .mdc-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-tab.mdc-ripple-upgraded--unbounded .mdc-tab__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-tab.mdc-ripple-upgraded--foreground-activation .mdc-tab__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-tab.mdc-ripple-upgraded--foreground-deactivation .mdc-tab__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-tab:hover .mdc-tab__ripple::before,.mdc-tab.mdc-ripple-surface--hover .mdc-tab__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__ripple::before,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-tab:not(.mdc-ripple-upgraded) .mdc-tab__ripple::after{transition:opacity 150ms linear}.mdc-tab:not(.mdc-ripple-upgraded):active .mdc-tab__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab__ripple{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;will-change:transform, opacity}:host(limel-tab-bar){--limel-tab-background-color:var(--contrast-300);--limel-tab-border-radius:0.625rem;--limel-active-tab-background-color:var( --tab-panel-background-color, rgb(var(--contrast-100)) );--limel-tab-active-outer-edge-curve-size:0.75rem;--limel-tab-separator-width:0.125rem;--limel-tab-separator-background-color:rgb(var(--contrast-600));isolation:isolate;display:block;position:relative}:host(.has-tabs-with-equal-width) .mdc-tab{flex:1 0 auto}.mdc-tab{font-family:inherit;font-weight:400;letter-spacing:normal;font-size:var(--limel-theme-default-font-size);text-transform:none}.mdc-tab-indicator .mdc-tab-indicator__content{border:none}.mdc-tab__ripple{box-sizing:border-box;border-radius:var(--limel-tab-border-radius);border-style:solid;border-color:transparent;border-width:0.25rem;opacity:0.7}.mdc-tab__ripple:before,.mdc-tab__ripple:after{transition:background-color 0.5s ease}.mdc-tab{border-radius:0;padding-right:1rem;padding-left:1rem;min-width:2.5rem;background-color:transparent;flex:0 0 auto;height:2.5rem}.mdc-tab:not(.mdc-tab--active):after{content:\"\";display:block;background-color:var(--limel-tab-separator-background-color);width:var(--limel-tab-separator-width);height:1rem;margin:auto;position:absolute;top:0;bottom:0;border-radius:1rem;right:calc(-1 * var(--limel-tab-separator-width))}.mdc-tab:not(.mdc-tab--active):last-of-type:after{display:none}.mdc-tab .mdc-tab__icon{color:rgb(var(--contrast-800));margin-left:-0.25rem}.mdc-tab limel-badge{margin-right:-0.25rem;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.mdc-tab--active{border-radius:var(--limel-tab-border-radius) var(--limel-tab-border-radius) 0 0;background-color:var(--limel-active-tab-background-color);z-index:2}.mdc-tab--active:before,.mdc-tab--active:after{content:\"\";display:block;width:var(--limel-tab-active-outer-edge-curve-size);height:var(--limel-tab-active-outer-edge-curve-size);position:absolute;bottom:0;background-color:var(--limel-active-tab-background-color);-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\")}.mdc-tab--active:before{left:calc(-1 * var(--limel-tab-active-outer-edge-curve-size));transform:rotateY(180deg)}.mdc-tab--active:after{right:calc(-1 * var(--limel-tab-active-outer-edge-curve-size))}.mdc-tab--active .mdc-ripple-upgraded--background-focused:before{background-color:transparent;transition:background-color 1s ease}.mdc-tab--active .mdc-tab__icon{color:var(--mdc-theme-primary)}.mdc-tab__content{gap:0.375rem}.mdc-tab .mdc-tab__text-label{transition:color 0.2s ease;padding-left:0 !important;color:var(--limel-theme-on-surface-color)}.mdc-tab:hover .mdc-tab__text-label{color:var(--limel-theme-text-primary-on-background-color)}.mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--lime-primary-color, var(--limel-theme-primary-color))}";export{Z as limel_tab_bar}
67
+ */const{TAB_ACTIVATED_EVENT:F}=N,X=class{constructor(r){t(this,r),this.changeTab=e(this,"changeTab"),this.tabs=[],this.canScrollLeft=!1,this.canScrollRight=!1,this.setupMdc=!1,this.handleTabActivated=this.handleTabActivated.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleLeftScrollClick=this.handleLeftScrollClick.bind(this),this.handleRightScrollClick=this.handleRightScrollClick.bind(this),this.renderTab=this.renderTab.bind(this)}connectedCallback(){this.setup()}componentDidLoad(){this.setup(),this.triggerIconColorWarning()}componentDidUpdate(){this.setupMdc&&(this.setup(),this.setupMdc=!1)}disconnectedCallback(){this.tearDown()}render(){return r("div",{key:"5fcbc5f69907b3437a7c17d18d5356ac45f84ea4",class:"mdc-tab-bar",role:"tablist"},r("div",{key:"0ec7bac2105ac5a2620379a907fc660344387539",class:{"mdc-tab-scroller":!0,"can-scroll-left":this.canScrollLeft,"can-scroll-right":this.canScrollRight}},r("div",{key:"e4bd200335ff91ff6cb6476fef0c30ff90ee1c44",class:"mdc-tab-scroller__scroll-area lime-hide-scrollbars"},r("div",{key:"c3f774e3524131d4d42c34eb1884ac95a173422e",class:"mdc-tab-scroller__scroll-content"},this.tabs.map(this.renderTab))),r("div",{key:"babdaf65720c52c03cf4bfedee68993ead018e94",class:"scroll-fade left"}),r("div",{key:"fe06945559ccf14921f523776a15f68f62496804",class:"scroll-button left"},r("button",{key:"5a6098a7776d635f9aaa9a7f59b4e7024f270ee1",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollLeft,onClick:this.handleLeftScrollClick},r("limel-icon",{key:"89bdf714b634b0ec7d56d3b1b66961a74999e9e6",name:"angle_left"}))),r("div",{key:"e7c6d0adb6634015c3482a3787451ffcfa37ee90",class:"scroll-fade right"}),r("div",{key:"97d2229df3f45d495ec59f97ae92c53fa63a5cab",class:"scroll-button right"},r("button",{key:"1d4c1bf329e8739802faa4040d7438aa4c2056f0",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollRight,onClick:this.handleRightScrollClick},r("limel-icon",{key:"1bc8b53f7958170c51aac799e05d441e5d6666c7",name:"angle_right"})))))}tabsChanged(t=[],e=[]){const r=t.map((t=>t.id)),n=e.map((t=>t.id));a(r,n)||(this.setupMdc=!0,this.tearDown())}handleWindowResize(){this.scrollArea&&this.handleScroll()}setup(){const t=this.host.shadowRoot.querySelector(".mdc-tab-bar");t&&(this.mdcTabBar=new V(t),this.mdcTabBar.focusOnActivate=!0,this.mdcTabBar.useAutomaticActivation=!0,this.scrollArea=t.querySelector(".mdc-tab-scroller__scroll-area"),this.scrollContent=t.querySelector(".mdc-tab-scroller__scroll-content"),this.setupListeners(),setTimeout(this.handleScroll,0))}tearDown(){this.scrollArea&&this.scrollArea.removeEventListener("scroll",this.handleScroll),this.mdcTabBar&&(this.mdcTabBar.unlisten(F,this.handleTabActivated),this.mdcTabBar.destroy())}setupListeners(){this.mdcTabBar.listen(F,this.handleTabActivated),this.scrollArea.addEventListener("scroll",this.handleScroll,{passive:!0})}handleTabActivated(t){const e=function(t,e){const r=t.findIndex((t=>!0===t.active)),n=[...t];return-1!==r&&(n[r]=Object.assign(Object.assign({},t[r]),{active:!1})),n[e]=Object.assign(Object.assign({},t[e]),{active:!0}),n}(this.tabs,t.detail.index);g(e,this.tabs).sort(this.sortByInactive).forEach((t=>{this.changeTab.emit(t)})),this.tabs=e}sortByInactive(t,e){return Number(t.active)-Number(e.active)}handleScroll(){const t=this.scrollArea.scrollLeft,e=Math.floor(this.scrollContent.getBoundingClientRect().width-this.scrollArea.getBoundingClientRect().width-t);this.canScrollLeft=t>40,this.canScrollRight=e>40}handleLeftScrollClick(){const t=this.getScrollDistance();this.scrollArea.scroll({left:this.scrollArea.scrollLeft-t,behavior:"smooth"})}handleRightScrollClick(){const t=this.getScrollDistance();this.scrollArea.scroll({left:this.scrollArea.scrollLeft+t,behavior:"smooth"})}getScrollDistance(){if(!this.scrollArea)return 150;const t=this.scrollArea.getBoundingClientRect().width;return Math.max(.8*t,150)}renderIcon(t){if(!t.icon)return;const e=i(t.icon),n=o(t.icon,t.iconColor),a={color:""};return n&&(a.color=n),r("limel-icon",{class:"mdc-tab__icon",name:e,style:a,size:"small","aria-hidden":"true"})}renderTab(t){return r("button",{class:{"mdc-tab":!0,"mdc-tab--active":!!t.active},role:"tab","aria-selected":t.active?"true":"false",tabindex:t.active?0:-1},r("span",{class:"mdc-tab__content"},this.renderIcon(t),r("span",{class:"mdc-tab__text-label"},t.text),t.badge?r("limel-badge",{label:t.badge}):""),r("span",{class:{"mdc-tab-indicator":!0,"mdc-tab-indicator--active":!!t.active}},r("span",{class:"mdc-tab-indicator__content mdc-tab-indicator__content--underline"})),r("span",{class:"mdc-tab__ripple"}))}triggerIconColorWarning(){this.tabs.some((t=>t.iconColor))&&console.warn("The `iconColor` prop is deprecated now! Use the new `Icon` interface and instead of `iconColor: 'color-name'` write `icon {name: 'icon-name', color: 'color-name'}`.")}get host(){return n(this)}static get watchers(){return{tabs:[{tabsChanged:0}]}}};X.style="@charset \"UTF-8\";.scroll-fade,.scroll-button{position:absolute;transition-property:transform;transition-duration:0.3s;transition-timing-function:ease-out}.scroll-fade{top:0;height:100%;width:4rem;pointer-events:none}.scroll-fade.left{transform:translate3d(-4rem, 0, 0);left:0;background:linear-gradient(270deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%)}.scroll-fade.right{transform:translate3d(4rem, 0, 0);right:0;background:linear-gradient(90deg, rgba(var(--limel-tab-background-color), 0) 0%, rgba(var(--limel-tab-background-color), 0.8) 40%, rgba(var(--limel-tab-background-color), 0.8) 100%)}.scroll-button{display:flex;align-items:center;top:0;bottom:0}.scroll-button.left{transform:translate3d(-4rem, 0, 0);left:0.25rem}.scroll-button.right{transform:translate3d(4rem, 0, 0);right:0.25rem}.scroll-button:hover{transform:translate3d(0, 0, 0)}.scroll-button button{all:unset;display:flex;align-items:center;justify-content:center;width:1.25rem;height:calc(100% - 0.25rem * 2);border-radius:0.25rem}.scroll-button button:not(:disabled){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):focus,.scroll-button button:not(:disabled):focus-visible{will-change:color, background-color, box-shadow, transform}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.scroll-button button:not(:disabled):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.scroll-button button:not(:disabled):hover,.scroll-button button:not(:disabled):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.scroll-button limel-icon{width:1rem}.mdc-tab-scroller{position:relative;overflow:hidden}.mdc-tab-scroller.can-scroll-left .scroll-fade.left,.mdc-tab-scroller.can-scroll-left .scroll-button.left,.mdc-tab-scroller.can-scroll-right .scroll-fade.right,.mdc-tab-scroller.can-scroll-right .scroll-button.right{transform:translate3d(0, 0, 0)}.mdc-tab-scroller.can-scroll-left:not(.can-scroll-right) .scroll-button.right,.mdc-tab-scroller.can-scroll-right:not(.can-scroll-left) .scroll-button.left{opacity:0.5;transition-delay:0.5s}.lime-hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.mdc-tab-scroller__scroll-content{padding:0.25rem var(--limel-tab-active-outer-edge-curve-size) 0 var(--limel-tab-active-outer-edge-curve-size);background-color:rgb(var(--limel-tab-background-color))}.mdc-tab-bar{width:100%}.mdc-tab{height:48px}.mdc-tab--stacked{height:72px}.mdc-tab-scroller.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-scroller{overflow-y:hidden}.mdc-tab-scroller__test{position:absolute;top:-9999px;width:100px;height:100px;overflow-x:scroll}.mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:touch;display:flex;overflow-x:hidden}.mdc-tab-scroller__scroll-area::-webkit-scrollbar,.mdc-tab-scroller__test::-webkit-scrollbar{display:none}.mdc-tab-scroller__scroll-area--scroll{overflow-x:scroll}.mdc-tab-scroller__scroll-content{position:relative;display:flex;flex:1 0 auto;transform:none;will-change:transform}.mdc-tab-scroller--align-start .mdc-tab-scroller__scroll-content{justify-content:flex-start}.mdc-tab-scroller--align-end .mdc-tab-scroller__scroll-content{justify-content:flex-end}.mdc-tab-scroller--align-center .mdc-tab-scroller__scroll-content{justify-content:center}.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:auto}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-tab-indicator .mdc-tab-indicator__content--icon{color:#018786;color:var(--mdc-theme-secondary, #018786)}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase)}.mdc-tab .mdc-tab__text-label{color:rgba(0, 0, 0, 0.6)}.mdc-tab .mdc-tab__icon{color:rgba(0, 0, 0, 0.54);fill:currentColor}.mdc-tab{position:relative}.mdc-tab__content{position:relative}.mdc-tab__icon{width:24px;height:24px;font-size:24px}.mdc-tab--active .mdc-tab__text-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-tab--active .mdc-tab__icon{color:#6200ee;color:var(--mdc-theme-primary, #6200ee);fill:currentColor}.mdc-tab{background:none}.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px;}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-tab{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-tab .mdc-tab__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-tab .mdc-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-tab.mdc-ripple-upgraded--unbounded .mdc-tab__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-tab.mdc-ripple-upgraded--foreground-activation .mdc-tab__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-tab.mdc-ripple-upgraded--foreground-deactivation .mdc-tab__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-tab:hover .mdc-tab__ripple::before,.mdc-tab.mdc-ripple-surface--hover .mdc-tab__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__ripple::before,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-tab:not(.mdc-ripple-upgraded) .mdc-tab__ripple::after{transition:opacity 150ms linear}.mdc-tab:not(.mdc-ripple-upgraded):active .mdc-tab__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab__ripple{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;will-change:transform, opacity}:host(limel-tab-bar){--limel-tab-background-color:var(--contrast-300);--limel-tab-border-radius:0.625rem;--limel-active-tab-background-color:var( --tab-panel-background-color, rgb(var(--contrast-100)) );--limel-tab-active-outer-edge-curve-size:0.75rem;--limel-tab-separator-width:0.125rem;--limel-tab-separator-background-color:rgb(var(--contrast-600));isolation:isolate;display:block;position:relative}:host(.has-tabs-with-equal-width) .mdc-tab{flex:1 0 auto}.mdc-tab{font-family:inherit;font-weight:400;letter-spacing:normal;font-size:var(--limel-theme-default-font-size);text-transform:none}.mdc-tab-indicator .mdc-tab-indicator__content{border:none}.mdc-tab__ripple{box-sizing:border-box;border-radius:var(--limel-tab-border-radius);border-style:solid;border-color:transparent;border-width:0.25rem;opacity:0.7}.mdc-tab__ripple:before,.mdc-tab__ripple:after{transition:background-color 0.5s ease}.mdc-tab{border-radius:0;padding-right:1rem;padding-left:1rem;min-width:2.5rem;background-color:transparent;flex:0 0 auto;height:2.5rem}.mdc-tab:not(.mdc-tab--active):after{content:\"\";display:block;background-color:var(--limel-tab-separator-background-color);width:var(--limel-tab-separator-width);height:1rem;margin:auto;position:absolute;top:0;bottom:0;border-radius:1rem;right:calc(-1 * var(--limel-tab-separator-width))}.mdc-tab:not(.mdc-tab--active):last-of-type:after{display:none}.mdc-tab .mdc-tab__icon{color:rgb(var(--contrast-800));margin-left:-0.25rem}.mdc-tab limel-badge{margin-right:-0.25rem;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.mdc-tab--active{border-radius:var(--limel-tab-border-radius) var(--limel-tab-border-radius) 0 0;background-color:var(--limel-active-tab-background-color);z-index:2}.mdc-tab--active:before,.mdc-tab--active:after{content:\"\";display:block;width:var(--limel-tab-active-outer-edge-curve-size);height:var(--limel-tab-active-outer-edge-curve-size);position:absolute;bottom:0;background-color:var(--limel-active-tab-background-color);-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20stroke-linejoin='round'%20stroke-miterlimit='2'%20clip-rule='evenodd'%20viewBox='0%200%2050%2050'%3E%3Cdefs/%3E%3Cpath%20d='M0%200c0%2027.594%2022.406%2050%2050%2050H0V0z'/%3E%3C/svg%3E\")}.mdc-tab--active:before{left:calc(-1 * var(--limel-tab-active-outer-edge-curve-size));transform:rotateY(180deg)}.mdc-tab--active:after{right:calc(-1 * var(--limel-tab-active-outer-edge-curve-size))}.mdc-tab--active .mdc-ripple-upgraded--background-focused:before{background-color:transparent;transition:background-color 1s ease}.mdc-tab--active .mdc-tab__icon{color:var(--mdc-theme-primary)}.mdc-tab__content{gap:0.375rem}.mdc-tab .mdc-tab__text-label{transition:color 0.2s ease;padding-left:0 !important;color:var(--limel-theme-on-surface-color)}.mdc-tab:hover .mdc-tab__text-label{color:var(--limel-theme-text-primary-on-background-color)}.mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--lime-primary-color, var(--limel-theme-primary-color))}";export{X as limel_tab_bar}
@@ -1 +1 @@
1
- import{r as e,h as t,H as r}from"./p-DBTJNfo7.js";import{m as o}from"./p-g3InYy9F.js";import{g as a}from"./p-Dnt5w_Bp.js";import{d as n}from"./p-B4YDb6f3.js";import"./p-BFTU3MAI.js";class l{constructor(e){this.handleIntersection=e=>{for(const t of e)if(t.isIntersecting){const e=t.target,r=e.dataset.src;r&&(e.setAttribute("src",r),delete e.dataset.src),this.observer.unobserve(e)}},this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t)this.observer.observe(e)}disconnect(){this.observer.disconnect()}}var i;const s=new Map(Object.entries(null!==(i=n.protocols)&&void 0!==i?i:{}).map((([e,t])=>[e,new Set(t)])));function d(e,t){for(const r of t){const t=e.getAttribute(r);if(!t)continue;const o=m(t);if(void 0!==o){const t=f(o);e[h(r)]=t}}}function m(e){const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch(e){try{const e=t.replaceAll("&#x22;",'"').replaceAll("&#34;",'"').replaceAll("&quot;",'"').replaceAll("&#x27;","'").replaceAll("&#39;","'").replaceAll("&apos;","'").replaceAll("&amp;","&");return JSON.parse(e)}catch(e){return}}}function c(e,t){const r=e.trim(),o=r.indexOf(":");if(-1===o||/[?#/]/.test(r.slice(0,o)))return!0;const a=r.slice(0,o).toLowerCase();return t.has(a)}function f(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(f);const t=Object.assign({},e);for(const e of Object.keys(t)){const r=s.get(e);r&&"string"==typeof t[e]&&!c(t[e],r)?(console.warn(`limel-markdown: Removed unsafe URL from "${e}" during sanitization.`),delete t[e]):"object"==typeof t[e]&&null!==t[e]&&(t[e]=f(t[e]))}return t}function h(e){return e.replaceAll(/-([a-z])/g,((e,t)=>t.toUpperCase()))}var b,u="undefined"==typeof document?void 0:document,g=!!u&&"content"in u.createElement("template"),p=!!u&&u.createRange&&"createContextualFragment"in u.createRange();function v(e,t){var r,o,a=e.nodeName,n=t.nodeName;return a===n||(r=a.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?a===n.toUpperCase():o<=90&&r>=97&&n===a.toUpperCase())}function w(e,t,r){e[r]!==t[r]&&(e[r]=t[r],e[r]?e.setAttribute(r,""):e.removeAttribute(r))}var k={OPTION:function(e,t){var r=e.parentNode;if(r){var o=r.nodeName.toUpperCase();"OPTGROUP"===o&&(o=(r=r.parentNode)&&r.nodeName.toUpperCase()),"SELECT"!==o||r.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),r.selectedIndex=-1)}w(e,t,"selected")},INPUT:function(e,t){w(e,t,"checked"),w(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var r=t.value;e.value!==r&&(e.value=r);var o=e.firstChild;if(o){var a=o.nodeValue;if(a==r||!r&&a==e.placeholder)return;o.nodeValue=r}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var r,o,a=-1,n=0,l=e.firstChild;l;)if("OPTGROUP"===(o=l.nodeName&&l.nodeName.toUpperCase()))(l=(r=l).firstChild)||(l=r.nextSibling,r=null);else{if("OPTION"===o){if(l.hasAttribute("selected")){a=n;break}n++}!(l=l.nextSibling)&&r&&(l=r.nextSibling,r=null)}e.selectedIndex=a}}};function y(){}function j(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var x=function(e,t,r){if(r||(r={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName){var o=t;(t=u.createElement("html")).innerHTML=o}else if("BODY"===e.nodeName){var a=t;(t=u.createElement("html")).innerHTML=a;var n=t.querySelector("body");n&&(t=n)}else l=(l=t).trim(),t=g?function(e){var t=u.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(l):p?function(e){return b||(b=u.createRange()).selectNode(u.body),b.createContextualFragment(e).childNodes[0]}(l):function(e){var t=u.createElement("body");return t.innerHTML=e,t.childNodes[0]}(l);else 11===t.nodeType&&(t=t.firstElementChild);var l,i=r.getNodeKey||j,s=r.onBeforeNodeAdded||y,d=r.onNodeAdded||y,m=r.onBeforeElUpdated||y,c=r.onElUpdated||y,f=r.onBeforeNodeDiscarded||y,h=r.onNodeDiscarded||y,w=r.onBeforeElChildrenUpdated||y,x=r.skipFromChildren||y,z=r.addChild||function(e,t){return e.appendChild(t)},O=!0===r.childrenOnly,C=Object.create(null),T=[];function N(e){T.push(e)}function q(e,t){if(1===e.nodeType)for(var r=e.firstChild;r;){var o=void 0;t&&(o=i(r))?N(o):(h(r),r.firstChild&&q(r,t)),r=r.nextSibling}}function E(e,t,r){!1!==f(e)&&(t&&t.removeChild(e),h(e),q(e,r))}function P(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var r=i(t);r&&(C[r]=t),P(t),t=t.nextSibling}}function H(e){d(e);for(var t=e.firstChild;t;){var r=t.nextSibling,o=i(t);if(o){var a=C[o];a&&v(t,a)?(t.parentNode.replaceChild(a,t),I(a,t)):H(t)}else H(t);t=r}}function I(e,t,r){var o=i(t);if(o&&delete C[o],!r){var a=m(e,t);if(!1===a)return;if(a instanceof HTMLElement&&P(e=a),function(e,t){var r,o,a,n,l=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var i=l.length-1;i>=0;i--)o=(r=l[i]).name,n=r.value,(a=r.namespaceURI)?e.getAttributeNS(a,o=r.localName||o)!==n&&("xmlns"===r.prefix&&(o=r.name),e.setAttributeNS(a,o,n)):e.getAttribute(o)!==n&&e.setAttribute(o,n);for(var s=e.attributes,d=s.length-1;d>=0;d--)o=(r=s[d]).name,(a=r.namespaceURI)?t.hasAttributeNS(a,o=r.localName||o)||e.removeAttributeNS(a,o):t.hasAttribute(o)||e.removeAttribute(o)}}(e,t),c(e),!1===w(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var r,o,a,n,l,d=x(e,t),m=t.firstChild,c=e.firstChild;e:for(;m;){for(n=m.nextSibling,r=i(m);!d&&c;){if(a=c.nextSibling,m.isSameNode&&m.isSameNode(c)){m=n,c=a;continue e}o=i(c);var f=c.nodeType,h=void 0;if(f===m.nodeType&&(1===f?(r?r!==o&&((l=C[r])?a===l?h=!1:(e.insertBefore(l,c),o?N(o):E(c,e,!0),o=i(c=l)):h=!1):o&&(h=!1),(h=!1!==h&&v(c,m))&&I(c,m)):3!==f&&8!=f||(h=!0,c.nodeValue!==m.nodeValue&&(c.nodeValue=m.nodeValue))),h){m=n,c=a;continue e}o?N(o):E(c,e,!0),c=a}if(r&&(l=C[r])&&v(l,m))d||z(e,l),I(l,m);else{var b=s(m);!1!==b&&(b&&(m=b),m.actualize&&(m=m.actualize(e.ownerDocument||u)),z(e,m),H(m))}m=n,c=a}!function(e,t,r){for(;t;){var o=t.nextSibling;(r=i(t))?N(r):E(t,e,!0),t=o}}(e,c,o);var g=k[e.nodeName];g&&g(e,t)}(e,t):k.TEXTAREA(e,t)}P(e);var M,S,L=e,R=L.nodeType,D=t.nodeType;if(!O)if(1===R)1===D?v(e,t)||(h(e),L=function(e,t){for(var r=e.firstChild;r;){var o=r.nextSibling;t.appendChild(r),r=o}return t}(e,(M=t.nodeName,(S=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==S?u.createElementNS(S,M):u.createElement(M)))):L=t;else if(3===R||8===R){if(D===R)return L.nodeValue!==t.nodeValue&&(L.nodeValue=t.nodeValue),L;L=t}if(L===t)h(e);else{if(t.isSameNode&&t.isSameNode(L))return;if(I(L,t,O),T)for(var A=0,B=T.length;A<B;A++){var U=C[T[A]];U&&E(U,U.parentNode,!1)}}return!O&&L!==e&&e.parentNode&&(L.actualize&&(L=L.actualize(e.ownerDocument||u)),e.parentNode.replaceChild(L,e)),L};const z=[{tagName:"limel-chip",attributes:["text","icon","link","badge","disabled","readonly","selected","type","size"]},{tagName:"limel-icon",attributes:["name","size","badge"]},{tagName:"limel-badge",attributes:["label"]},{tagName:"limel-callout",attributes:["heading","icon","type"]},{tagName:"limel-linear-progress",attributes:["value","indeterminate"]},{tagName:"limel-circular-progress",attributes:["value","max-value","prefix","suffix","size","display-percentage-colors"]},{tagName:"limel-spinner",attributes:["size"]},{tagName:"limel-info-tile",attributes:["value","icon","label","prefix","suffix","badge"]}],O=class{constructor(t){e(this,t),this.value="",this.whitelist=a.markdownWhitelist,this.lazyLoadImages=!1,this.removeEmptyParagraphs=!0,this.imageIntersectionObserver=null}async textChanged(){try{this.cleanupImageIntersectionObserver(),this.cachedCombinedWhitelist&&this.whitelist===this.cachedConsumerWhitelist||(this.cachedConsumerWhitelist=this.whitelist,this.cachedCombinedWhitelist=function(e,t){if(!(null==t?void 0:t.length))return e.map((e=>Object.assign(Object.assign({},e),{attributes:[...e.attributes]})));const r=new Map;for(const o of[...e,...t]){const e=r.get(o.tagName);if(e)for(const t of o.attributes)e.add(t);else r.set(o.tagName,new Set(o.attributes))}return[...r.entries()].map((([e,t])=>({tagName:e,attributes:[...t]})))}(z,this.whitelist));const e=this.cachedCombinedWhitelist,t=await o(this.value,{forceHardLineBreaks:!0,whitelist:e,lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});!function(e,t=""){try{x(e,`<div>${t}</div>`,{childrenOnly:!0})}catch(r){console.warn("morphdom failed, falling back to innerHTML:",r),e.innerHTML=t}}(this.rootElement,t),function(e,t){if(e&&(null==t?void 0:t.length))for(const r of t){const t=e.querySelectorAll(r.tagName);for(const e of t)d(e,r.attributes)}}(this.rootElement,e),this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleWhitelistChange(){return this.textChanged()}handleRemoveEmptyParagraphsChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return t(r,{key:"9d88a42e047b6701215699ab5459af3275e51693"},t("div",{key:"83a5801839318bf47eeacbf53e320e4628559bfa",id:"markdown",ref:e=>this.rootElement=e}))}setupImageIntersectionObserver(){this.lazyLoadImages&&(this.imageIntersectionObserver=new l(this.rootElement))}cleanupImageIntersectionObserver(){this.imageIntersectionObserver&&(this.imageIntersectionObserver.disconnect(),this.imageIntersectionObserver=null)}static get watchers(){return{value:[{textChanged:0}],whitelist:[{handleWhitelistChange:0}],removeEmptyParagraphs:[{handleRemoveEmptyParagraphsChange:0}]}}};O.style='@charset "UTF-8";pre,pre p,code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.75rem}pre{max-width:100%;white-space:pre-wrap;word-wrap:break-word}code{letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));tab-size:4;hyphens:none;display:inline;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:only-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}ul{list-style:none}ul li{position:relative;margin-left:0.75rem}ul li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{margin-bottom:0.25rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}img{max-width:100%;border-radius:0.25rem}kbd{display:inline-block;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;border-radius:0.125rem;border-style:solid;border-color:rgb(var(--contrast-500));border-width:0 1px 0.1875rem 1px;padding:0.0625rem 0.375rem;margin:0 0.25rem;background-color:rgb(var(--contrast-200));box-shadow:var(--button-shadow-normal), 0 0.625rem 0.375rem -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto}';export{O as limel_markdown}
1
+ import{r as e,h as t,H as r}from"./p-DBTJNfo7.js";import{m as o}from"./p-DdYOzHlg.js";import{g as a}from"./p-Dnt5w_Bp.js";import{d as n}from"./p-DJvGLFul.js";import"./p-B85MJLTf.js";class l{constructor(e){this.handleIntersection=e=>{for(const t of e)if(t.isIntersecting){const e=t.target,r=e.dataset.src;r&&(e.setAttribute("src",r),delete e.dataset.src),this.observer.unobserve(e)}},this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t)this.observer.observe(e)}disconnect(){this.observer.disconnect()}}var i;const s=new Map(Object.entries(null!==(i=n.protocols)&&void 0!==i?i:{}).map((([e,t])=>[e,new Set(t)])));function d(e,t){for(const r of t){const t=e.getAttribute(r);if(!t)continue;const o=m(t);if(void 0!==o){const t=f(o);e[h(r)]=t}}}function m(e){const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch(e){try{const e=t.replaceAll("&#x22;",'"').replaceAll("&#34;",'"').replaceAll("&quot;",'"').replaceAll("&#x27;","'").replaceAll("&#39;","'").replaceAll("&apos;","'").replaceAll("&amp;","&");return JSON.parse(e)}catch(e){return}}}function c(e,t){const r=e.trim(),o=r.indexOf(":");if(-1===o||/[?#/]/.test(r.slice(0,o)))return!0;const a=r.slice(0,o).toLowerCase();return t.has(a)}function f(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(f);const t=Object.assign({},e);for(const e of Object.keys(t)){const r=s.get(e);r&&"string"==typeof t[e]&&!c(t[e],r)?(console.warn(`limel-markdown: Removed unsafe URL from "${e}" during sanitization.`),delete t[e]):"object"==typeof t[e]&&null!==t[e]&&(t[e]=f(t[e]))}return t}function h(e){return e.replaceAll(/-([a-z])/g,((e,t)=>t.toUpperCase()))}var b,u="undefined"==typeof document?void 0:document,g=!!u&&"content"in u.createElement("template"),p=!!u&&u.createRange&&"createContextualFragment"in u.createRange();function v(e,t){var r,o,a=e.nodeName,n=t.nodeName;return a===n||(r=a.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?a===n.toUpperCase():o<=90&&r>=97&&n===a.toUpperCase())}function w(e,t,r){e[r]!==t[r]&&(e[r]=t[r],e[r]?e.setAttribute(r,""):e.removeAttribute(r))}var k={OPTION:function(e,t){var r=e.parentNode;if(r){var o=r.nodeName.toUpperCase();"OPTGROUP"===o&&(o=(r=r.parentNode)&&r.nodeName.toUpperCase()),"SELECT"!==o||r.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),r.selectedIndex=-1)}w(e,t,"selected")},INPUT:function(e,t){w(e,t,"checked"),w(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var r=t.value;e.value!==r&&(e.value=r);var o=e.firstChild;if(o){var a=o.nodeValue;if(a==r||!r&&a==e.placeholder)return;o.nodeValue=r}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var r,o,a=-1,n=0,l=e.firstChild;l;)if("OPTGROUP"===(o=l.nodeName&&l.nodeName.toUpperCase()))(l=(r=l).firstChild)||(l=r.nextSibling,r=null);else{if("OPTION"===o){if(l.hasAttribute("selected")){a=n;break}n++}!(l=l.nextSibling)&&r&&(l=r.nextSibling,r=null)}e.selectedIndex=a}}};function y(){}function j(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var x=function(e,t,r){if(r||(r={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName){var o=t;(t=u.createElement("html")).innerHTML=o}else if("BODY"===e.nodeName){var a=t;(t=u.createElement("html")).innerHTML=a;var n=t.querySelector("body");n&&(t=n)}else l=(l=t).trim(),t=g?function(e){var t=u.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(l):p?function(e){return b||(b=u.createRange()).selectNode(u.body),b.createContextualFragment(e).childNodes[0]}(l):function(e){var t=u.createElement("body");return t.innerHTML=e,t.childNodes[0]}(l);else 11===t.nodeType&&(t=t.firstElementChild);var l,i=r.getNodeKey||j,s=r.onBeforeNodeAdded||y,d=r.onNodeAdded||y,m=r.onBeforeElUpdated||y,c=r.onElUpdated||y,f=r.onBeforeNodeDiscarded||y,h=r.onNodeDiscarded||y,w=r.onBeforeElChildrenUpdated||y,x=r.skipFromChildren||y,z=r.addChild||function(e,t){return e.appendChild(t)},O=!0===r.childrenOnly,C=Object.create(null),T=[];function N(e){T.push(e)}function q(e,t){if(1===e.nodeType)for(var r=e.firstChild;r;){var o=void 0;t&&(o=i(r))?N(o):(h(r),r.firstChild&&q(r,t)),r=r.nextSibling}}function E(e,t,r){!1!==f(e)&&(t&&t.removeChild(e),h(e),q(e,r))}function P(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var r=i(t);r&&(C[r]=t),P(t),t=t.nextSibling}}function H(e){d(e);for(var t=e.firstChild;t;){var r=t.nextSibling,o=i(t);if(o){var a=C[o];a&&v(t,a)?(t.parentNode.replaceChild(a,t),L(a,t)):H(t)}else H(t);t=r}}function L(e,t,r){var o=i(t);if(o&&delete C[o],!r){var a=m(e,t);if(!1===a)return;if(a instanceof HTMLElement&&P(e=a),function(e,t){var r,o,a,n,l=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var i=l.length-1;i>=0;i--)o=(r=l[i]).name,n=r.value,(a=r.namespaceURI)?e.getAttributeNS(a,o=r.localName||o)!==n&&("xmlns"===r.prefix&&(o=r.name),e.setAttributeNS(a,o,n)):e.getAttribute(o)!==n&&e.setAttribute(o,n);for(var s=e.attributes,d=s.length-1;d>=0;d--)o=(r=s[d]).name,(a=r.namespaceURI)?t.hasAttributeNS(a,o=r.localName||o)||e.removeAttributeNS(a,o):t.hasAttribute(o)||e.removeAttribute(o)}}(e,t),c(e),!1===w(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var r,o,a,n,l,d=x(e,t),m=t.firstChild,c=e.firstChild;e:for(;m;){for(n=m.nextSibling,r=i(m);!d&&c;){if(a=c.nextSibling,m.isSameNode&&m.isSameNode(c)){m=n,c=a;continue e}o=i(c);var f=c.nodeType,h=void 0;if(f===m.nodeType&&(1===f?(r?r!==o&&((l=C[r])?a===l?h=!1:(e.insertBefore(l,c),o?N(o):E(c,e,!0),o=i(c=l)):h=!1):o&&(h=!1),(h=!1!==h&&v(c,m))&&L(c,m)):3!==f&&8!=f||(h=!0,c.nodeValue!==m.nodeValue&&(c.nodeValue=m.nodeValue))),h){m=n,c=a;continue e}o?N(o):E(c,e,!0),c=a}if(r&&(l=C[r])&&v(l,m))d||z(e,l),L(l,m);else{var b=s(m);!1!==b&&(b&&(m=b),m.actualize&&(m=m.actualize(e.ownerDocument||u)),z(e,m),H(m))}m=n,c=a}!function(e,t,r){for(;t;){var o=t.nextSibling;(r=i(t))?N(r):E(t,e,!0),t=o}}(e,c,o);var g=k[e.nodeName];g&&g(e,t)}(e,t):k.TEXTAREA(e,t)}P(e);var M,S,I=e,D=I.nodeType,R=t.nodeType;if(!O)if(1===D)1===R?v(e,t)||(h(e),I=function(e,t){for(var r=e.firstChild;r;){var o=r.nextSibling;t.appendChild(r),r=o}return t}(e,(M=t.nodeName,(S=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==S?u.createElementNS(S,M):u.createElement(M)))):I=t;else if(3===D||8===D){if(R===D)return I.nodeValue!==t.nodeValue&&(I.nodeValue=t.nodeValue),I;I=t}if(I===t)h(e);else{if(t.isSameNode&&t.isSameNode(I))return;if(L(I,t,O),T)for(var A=0,B=T.length;A<B;A++){var J=C[T[A]];J&&E(J,J.parentNode,!1)}}return!O&&I!==e&&e.parentNode&&(I.actualize&&(I=I.actualize(e.ownerDocument||u)),e.parentNode.replaceChild(I,e)),I};const z=[{tagName:"limel-chip",attributes:["text","icon","link","badge","disabled","readonly","selected","type","size"]},{tagName:"limel-icon",attributes:["name","size","badge"]},{tagName:"limel-badge",attributes:["label"]},{tagName:"limel-callout",attributes:["heading","icon","type"]},{tagName:"limel-linear-progress",attributes:["value","indeterminate"]},{tagName:"limel-circular-progress",attributes:["value","max-value","prefix","suffix","size","display-percentage-colors"]},{tagName:"limel-spinner",attributes:["size"]},{tagName:"limel-info-tile",attributes:["value","icon","label","prefix","suffix","badge"]}],O=class{constructor(t){e(this,t),this.value="",this.whitelist=a.markdownWhitelist,this.lazyLoadImages=!1,this.removeEmptyParagraphs=!0,this.imageIntersectionObserver=null}async textChanged(){try{this.cleanupImageIntersectionObserver(),this.cachedCombinedWhitelist&&this.whitelist===this.cachedConsumerWhitelist||(this.cachedConsumerWhitelist=this.whitelist,this.cachedCombinedWhitelist=function(e,t){if(!(null==t?void 0:t.length))return e.map((e=>Object.assign(Object.assign({},e),{attributes:[...e.attributes]})));const r=new Map;for(const o of[...e,...t]){const e=r.get(o.tagName);if(e)for(const t of o.attributes)e.add(t);else r.set(o.tagName,new Set(o.attributes))}return[...r.entries()].map((([e,t])=>({tagName:e,attributes:[...t]})))}(z,this.whitelist));const e=this.cachedCombinedWhitelist,t=await o(this.value,{forceHardLineBreaks:!0,whitelist:e,lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});!function(e,t=""){try{x(e,`<div>${t}</div>`,{childrenOnly:!0})}catch(r){console.warn("morphdom failed, falling back to innerHTML:",r),e.innerHTML=t}}(this.rootElement,t),function(e,t){if(e&&(null==t?void 0:t.length))for(const r of t){const t=e.querySelectorAll(r.tagName);for(const e of t)d(e,r.attributes)}}(this.rootElement,e),this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleWhitelistChange(){return this.textChanged()}handleRemoveEmptyParagraphsChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return t(r,{key:"9d88a42e047b6701215699ab5459af3275e51693"},t("div",{key:"83a5801839318bf47eeacbf53e320e4628559bfa",id:"markdown",ref:e=>this.rootElement=e}))}setupImageIntersectionObserver(){this.lazyLoadImages&&(this.imageIntersectionObserver=new l(this.rootElement))}cleanupImageIntersectionObserver(){this.imageIntersectionObserver&&(this.imageIntersectionObserver.disconnect(),this.imageIntersectionObserver=null)}static get watchers(){return{value:[{textChanged:0}],whitelist:[{handleWhitelistChange:0}],removeEmptyParagraphs:[{handleRemoveEmptyParagraphsChange:0}]}}};O.style='@charset "UTF-8";pre,pre p,code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.75rem}pre{max-width:100%;white-space:pre-wrap;word-wrap:break-word}code{letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));tab-size:4;hyphens:none;display:inline;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:only-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}ul{list-style:none}ul li{position:relative;margin-left:0.75rem}ul li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{margin-bottom:0.25rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}img{max-width:100%;border-radius:0.25rem}kbd{display:inline-block;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;border-radius:0.125rem;border-style:solid;border-color:rgb(var(--contrast-500));border-width:0 1px 0.1875rem 1px;padding:0.0625rem 0.375rem;margin:0 0.25rem;background-color:rgb(var(--contrast-200));box-shadow:var(--button-shadow-normal), 0 0.625rem 0.375rem -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto}';export{O as limel_markdown}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e,a as r}from"./p-DBTJNfo7.js";import{c as o,i as a}from"./p-CWuGCKo1.js";import{a as n}from"./p-B6bNnxRu.js";import{c as h}from"./p-CMjGNANG.js";import{i as l}from"./p-B8VKuhvH.js";import{c}from"./p-JbKhhoXs.js";import"./p-DlJXKdhK.js";import"./p-CgNJbSP4.js";import"./p-DFWcgJ_i.js";import"./p-DtS35Df5.js";import"./p-BJQylLSL.js";import"./p-efBXH4mj.js";import"./p-oiMYqRQ0.js";import"./p-D_uMnX5g.js";import"./p-BOEi1C7r.js";import"./p-CK4jS9_E.js";function p(t,i,s,e){for(var r=-1,o=null==t?0:t.length;++r<o;){var a=t[r];i(e,a,s(a),t)}return e}function f(t,i,s,e){return n(t,(function(t,r,o){i(e,t,s(t),o)})),e}var d,m,b=(d=function(t,i,s){t[s?0:1].push(i)},m=function(){return[[],[]]},function(t,i){var s=l(t)?p:f,e=m?[[],[]]:{};return s(t,d,h(i),e)});const u=class{constructor(e){t(this,e),this.filesSelected=i(this,"filesSelected"),this.filesRejected=i(this,"filesRejected"),this.accept="*",this.disabled=!1,this.helperText="",this.hasFileToDrop=!1,this.renderOnDragLayout=()=>{if(!this.disabled&&this.hasFileToDrop)return s("div",{class:"has-file-to-drop"},s("limel-icon",{class:"icon",name:"upload_2"}),s("div",{class:"text-helpertext"},this.renderText(),this.renderHelperText()))},this.renderText=()=>{if(this.text)return s("span",{class:"text"},this.text)},this.renderHelperText=()=>{if(this.helperText)return s("span",{class:"helper-text"},this.helperText)},this.handleDrop=t=>{if(t.stopPropagation(),t.preventDefault(),this.hasFileToDrop=!1,this.disabled)return;const i=[...t.dataTransfer.files].map(o),[s,e]=b(i,(t=>a(t,this.accept)));s.length>0&&this.filesSelected.emit(s),e.length>0&&this.filesRejected.emit(e)},this.handleDragOver=t=>{this.hasFileToDrop=!0,t.preventDefault()},this.handleDragLeave=t=>{this.hasFileToDrop=!1,t.preventDefault()}}render(){return s(e,{key:"a66ef9c3d9a005567749b61967a63caa4496135a",onDrop:this.handleDrop,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave},s("slot",{key:"7a770aa9f98365da4b83038662f04c0e9e5c20c6"}),this.renderOnDragLayout())}};u.style=":host(limel-file-dropzone){display:block;position:relative}.has-file-to-drop{animation:display-drop-zone 0.6s ease forwards;box-sizing:border-box;isolation:isolate;z-index:1;position:absolute;inset:0.25rem;overflow:hidden;display:flex;justify-content:center;align-items:center;gap:0.5rem;color:rgb(var(--contrast-700));border:0.125rem dashed rgb(var(--color-cyan-light));border-radius:0.75rem}.text-helpertext{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.icon{width:clamp(2rem, 5vh, 7rem)}.text{font-size:clamp(1rem, 2vh, 1.75rem)}.helper-text{font-size:clamp(0.75rem, 1.5vh, 1rem)}@keyframes display-drop-zone{0%{background-color:rgb(var(--contrast-1100), 0);backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0);scale:0.9;opacity:0}50%{scale:1;opacity:1}100%{background-color:rgb(var(--contrast-1100), 0.8);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem)}}";const j=class{constructor(s){t(this,s),this.filesSelected=i(this,"filesSelected"),this.accept="*",this.disabled=!1,this.multiple=!1,this.fileInputId=c(),this.handleClick=t=>{if(this.disabled)return t.stopPropagation(),void t.preventDefault();this.triggerFileDialog(),t.stopPropagation()},this.handleKeyUp=t=>{t.stopPropagation(),t.preventDefault(),"Enter"===t.code&&this.triggerFileDialog()},this.handleFileChange=t=>{const i=[...this.fileInput.files];i.length>0&&(t.stopPropagation(),this.filesSelected.emit(i.map(o)),this.fileInput.value="")}}componentDidLoad(){this.fileInput=this.element.shadowRoot.getElementById(this.fileInputId)}render(){return s(e,{key:"62d72f49b1a71bef9c5b91c36f34f763a04d78e2",onClick:this.handleClick,onKeyUp:this.handleKeyUp,onKeyDown:this.handleKeyDown},s("input",{key:"72272f710f8ffb09eec2ace7409ab516ec4f80bd",hidden:!0,id:this.fileInputId,onChange:this.handleFileChange,type:"file",accept:this.accept,disabled:this.disabled,multiple:this.multiple}),s("slot",{key:"7ecff23ba41d76a23a2b8a542f56044615cb8b24"}))}handleKeyDown(t){"Tab"!==t.code&&"Backspace"!==t.code&&"Enter"!==t.code&&(t.preventDefault(),t.stopPropagation())}triggerFileDialog(){this.fileInput.click()}get element(){return r(this)}};export{u as limel_file_dropzone,j as limel_file_input}