@limetech/lime-elements 40.5.2 → 40.5.4

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 (93) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{_baseEach-Bygi-un6.js → _baseForOwn-8jMPwf3X.js} +1 -43
  3. package/dist/cjs/{_baseIsEqual-CQZKiKbe.js → _baseIsEqual-zzV9DKMv.js} +0 -1
  4. package/dist/cjs/{_baseIteratee-DDklwtn9.js → _baseIteratee-BIMRm4nq.js} +1 -3
  5. package/dist/cjs/_baseSet-DykMx7uF.js +92 -0
  6. package/dist/cjs/_getPrototype-CCLHkBHj.js +8 -0
  7. package/dist/cjs/{cloneDeep-hE40Q8aw.js → cloneDeep-D2immmwT.js} +16 -160
  8. package/dist/cjs/{difference-B543MGsY.js → isArrayLikeObject-U2Ddbw4n.js} +5 -93
  9. package/dist/cjs/{isEqual-Cd9J8a5-.js → isEqual-D3eFkhqd.js} +1 -1
  10. package/dist/cjs/limel-action-bar_3.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-chip-set.cjs.entry.js +2 -2
  12. package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
  13. package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +45 -6
  14. package/dist/cjs/limel-file-viewer.cjs.entry.js +510 -70
  15. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +73 -11
  16. package/dist/cjs/limel-form.cjs.entry.js +1857 -1919
  17. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +326 -262
  18. package/dist/cjs/limel-tab-bar.cjs.entry.js +83 -4
  19. package/dist/cjs/limel-table.cjs.entry.js +598 -199
  20. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +1 -1
  21. package/dist/collection/components/form/fields/schema-field.js +8 -0
  22. package/dist/collection/components/form/form.js +1 -0
  23. package/dist/collection/components/form/form.test-schemas.js +47 -0
  24. package/dist/collection/components/form/templates/array-field-collapsible-item.js +38 -11
  25. package/dist/collection/components/table/table.css +1 -2
  26. package/dist/esm/{_baseEach-lvj-g1Zj.js → _baseForOwn-D5j7fHlv.js} +2 -42
  27. package/dist/esm/{_baseIsEqual-B6bIeexY.js → _baseIsEqual-CyF4P8uM.js} +2 -2
  28. package/dist/esm/{_baseIteratee-CEZRuq23.js → _baseIteratee-CpbczHY1.js} +3 -3
  29. package/dist/esm/_baseSet-Cw2IE6ZF.js +89 -0
  30. package/dist/esm/_getPrototype-B0kMNv1F.js +6 -0
  31. package/dist/esm/{_getTag-CMJL-6hk.js → _getTag-BiAaLWvH.js} +1 -1
  32. package/dist/esm/{cloneDeep-CL7UD3mR.js → cloneDeep-DAbOtbs8.js} +18 -154
  33. package/dist/esm/{difference-DND5tWiA.js → isArrayLikeObject-CJB8HbtH.js} +7 -91
  34. package/dist/esm/{isEmpty-DHgukT5k.js → isEmpty-BGVZ12Ea.js} +1 -1
  35. package/dist/esm/{isEqual-4tbMaaf_.js → isEqual-CE83yS8T.js} +1 -1
  36. package/dist/esm/limel-action-bar_3.entry.js +1 -1
  37. package/dist/esm/limel-chip-set.entry.js +3 -3
  38. package/dist/esm/limel-chip_2.entry.js +2 -2
  39. package/dist/esm/limel-dialog.entry.js +3 -3
  40. package/dist/esm/limel-file-dropzone_2.entry.js +45 -6
  41. package/dist/esm/limel-file-viewer.entry.js +510 -70
  42. package/dist/esm/limel-flatpickr-adapter.entry.js +69 -7
  43. package/dist/esm/limel-form.entry.js +1854 -1916
  44. package/dist/esm/limel-prosemirror-adapter.entry.js +327 -263
  45. package/dist/esm/limel-tab-bar.entry.js +83 -4
  46. package/dist/esm/limel-table.entry.js +595 -196
  47. package/dist/lime-elements/lime-elements.esm.js +1 -1
  48. package/dist/lime-elements/p-05afb316.entry.js +1 -0
  49. package/dist/lime-elements/p-0fba64eb.entry.js +16 -0
  50. package/dist/lime-elements/p-10594468.entry.js +1 -0
  51. package/dist/lime-elements/p-19344984.entry.js +13 -0
  52. package/dist/lime-elements/p-26c5c6b9.entry.js +1 -0
  53. package/dist/lime-elements/{p-11a96a8c.entry.js → p-36ce4fbc.entry.js} +1 -1
  54. package/dist/lime-elements/{p-955292eb.entry.js → p-4aae63bd.entry.js} +1 -1
  55. package/dist/lime-elements/{p-b8c76487.entry.js → p-5d974afa.entry.js} +1 -1
  56. package/dist/lime-elements/p-B6-3WXAv.js +1 -0
  57. package/dist/lime-elements/p-BQeIv4aA.js +1 -0
  58. package/dist/lime-elements/p-BY5NjPj8.js +1 -0
  59. package/dist/lime-elements/p-COdirXg1.js +1 -0
  60. package/dist/lime-elements/p-CW2-jhzP.js +1 -0
  61. package/dist/lime-elements/p-D2VFSWDU.js +1 -0
  62. package/dist/lime-elements/{p-D4RdItCq.js → p-DK0pjX-Y.js} +1 -1
  63. package/dist/lime-elements/p-ORUNaKm-.js +1 -0
  64. package/dist/lime-elements/{p-5b371d6b.entry.js → p-a71f6e87.entry.js} +4 -4
  65. package/dist/lime-elements/p-cef66e53.entry.js +1 -0
  66. package/dist/lime-elements/{p-02812dc8.entry.js → p-d3bd4b80.entry.js} +1 -1
  67. package/dist/lime-elements/p-nVemxylR.js +1 -0
  68. package/dist/lime-elements/p-pk5KIdKH.js +1 -0
  69. package/dist/types/components/form/form.test-schemas.d.ts +3 -0
  70. package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +0 -1
  71. package/package.json +11 -11
  72. package/dist/cjs/_getAllKeysIn-BJsgUTAt.js +0 -119
  73. package/dist/cjs/_isIterateeCall-BUGt9SrH.js +0 -73
  74. package/dist/cjs/pickBy-D-X6S5kg.js +0 -201
  75. package/dist/esm/_getAllKeysIn-kT3KizYN.js +0 -114
  76. package/dist/esm/_isIterateeCall-Bb4gUZLK.js +0 -70
  77. package/dist/esm/pickBy-C4C3CM4m.js +0 -195
  78. package/dist/lime-elements/p-1e085bbe.entry.js +0 -13
  79. package/dist/lime-elements/p-56bkn1D-.js +0 -1
  80. package/dist/lime-elements/p-67f02b69.entry.js +0 -1
  81. package/dist/lime-elements/p-867681aa.entry.js +0 -1
  82. package/dist/lime-elements/p-9d3437ac.entry.js +0 -16
  83. package/dist/lime-elements/p-B8yl2MCT.js +0 -1
  84. package/dist/lime-elements/p-BAR6am-7.js +0 -1
  85. package/dist/lime-elements/p-BE1Efiuj.js +0 -1
  86. package/dist/lime-elements/p-BsX7ma3n.js +0 -1
  87. package/dist/lime-elements/p-CR7u-m0b.js +0 -1
  88. package/dist/lime-elements/p-CVzgpz9P.js +0 -1
  89. package/dist/lime-elements/p-D8H5afYg.js +0 -1
  90. package/dist/lime-elements/p-DtrvybFR.js +0 -1
  91. package/dist/lime-elements/p-f309ceb8.entry.js +0 -1
  92. package/dist/lime-elements/p-f3c108c9.entry.js +0 -1
  93. package/dist/lime-elements/p-mmkVLOjW.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as t,c as e,h as r,a as n}from"./p-Bnc9lzk2.js";import{g as i,b as o}from"./p-CgNJbSP4.js";import{i as a}from"./p-CVzgpz9P.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-BAR6am-7.js";import"./p-mmkVLOjW.js";import"./p-CZ30nDJE.js";import"./p-D4RdItCq.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-BcJ-TDVt.js";import"./p-DbBZn7JO.js";import"./p-B8VKuhvH.js";import"./p-B--C3qwe.js";import"./p-CK4jS9_E.js";import"./p-9W8bTt2G.js";
1
+ import{r as t,c as e,h as r,a as n}from"./p-Bnc9lzk2.js";import{g as i,b as o}from"./p-CgNJbSP4.js";import{i as a}from"./p-COdirXg1.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{S as g,c as v}from"./p-B6-3WXAv.js";import{a as _,b as y,i as w,c as x}from"./p-pk5KIdKH.js";import"./p-CZ30nDJE.js";import"./p-DK0pjX-Y.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-BcJ-TDVt.js";import"./p-DbBZn7JO.js";import"./p-B8VKuhvH.js";import"./p-B--C3qwe.js";import"./p-CK4jS9_E.js";import"./p-9W8bTt2G.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),j=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),I=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(j.strings.AREA_SELECTOR),this.content=this.root.querySelector(j.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 j({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}
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-Bnc9lzk2.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
- */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),E=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),T=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(E.strings.AREA_SELECTOR),this.content=this.root.querySelector(E.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 E({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}
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),Y=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),V={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"},H={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32},X=new Set;
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-Bnc9lzk2.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
- */(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),j=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),I=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 j(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 I(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},B=new Set;B.add(N.ARROW_LEFT_KEY),B.add(N.ARROW_RIGHT_KEY),B.add(N.END_KEY),B.add(N.HOME_KEY),B.add(N.ENTER_KEY),B.add(N.SPACE_KEY);var W=new Map;W.set(P.ARROW_LEFT_KEYCODE,N.ARROW_LEFT_KEY),W.set(P.ARROW_RIGHT_KEYCODE,N.ARROW_RIGHT_KEY),W.set(P.END_KEYCODE,N.END_KEY),W.set(P.HOME_KEYCODE,N.HOME_KEY),W.set(P.ENTER_KEYCODE,N.ENTER_KEY),W.set(P.SPACE_KEYCODE,N.SPACE_KEY);var V=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 B.has(t.key)?t.key:W.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=V.strings,K=0,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)},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 T(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 V({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-"+ ++K,t(e)}))},e.prototype.instantiatetabScroller=function(t){var e=this.root.querySelector(Y.TAB_SCROLLER_SELECTOR);return e?t(e):null},e}(u);
45
+ */X.add(V.ARROW_LEFT_KEY),X.add(V.ARROW_RIGHT_KEY),X.add(V.END_KEY),X.add(V.HOME_KEY),X.add(V.ENTER_KEY),X.add(V.SPACE_KEY);var F=new Map;F.set(H.ARROW_LEFT_KEYCODE,V.ARROW_LEFT_KEY),F.set(H.ARROW_RIGHT_KEYCODE,V.ARROW_RIGHT_KEY),F.set(H.END_KEYCODE,V.END_KEY),F.set(H.HOME_KEYCODE,V.HOME_KEY),F.set(H.ENTER_KEYCODE,V.ENTER_KEY),F.set(H.SPACE_KEYCODE,V.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 V},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return H},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===V.END_KEY?i=n:e===V.ARROW_LEFT_KEY&&!r||e===V.ARROW_RIGHT_KEY&&r?i-=1:e===V.ARROW_RIGHT_KEY&&!r||e===V.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+H.EXTRA_SCROLL_AMOUNT;return e<t?Math.min(i.contentRight-r-H.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-H.EXTRA_SCROLL_AMOUNT;return e>t?Math.max(i-o.contentRight-r-n+H.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 X.has(t.key)?t.key:F.get(t.keyCode)},e.prototype.isActivationKey=function(t){return t===V.SPACE_KEY||t===V.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,q=0,U=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 Y(t)}),void 0===e&&(e=function(t){return new I(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-"+ ++q,t(e)}))},e.prototype.instantiatetabScroller=function(t){var e=this.root.querySelector(J.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-Bnc9lzk2.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:F}=N,X=class{constructor(r){t(this,r),this.changeTab=e(this,"changeTab",7),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:"b0a62a521861357770e12bc6183b9590c49760e0",class:"mdc-tab-bar",role:"tablist"},r("div",{key:"97750d5ded531aee2fca5cd1f129fee4194b8f09",class:{"mdc-tab-scroller":!0,"can-scroll-left":this.canScrollLeft,"can-scroll-right":this.canScrollRight}},r("div",{key:"6547764cdcfc4f2f60e510863ede4d58d48b1b0e",class:"mdc-tab-scroller__scroll-area lime-hide-scrollbars"},r("div",{key:"b95453f5a1fe8b4aae7ebad439cfb795198623a8",class:"mdc-tab-scroller__scroll-content"},this.tabs.map(this.renderTab))),r("div",{key:"a4703fa681f371d69ab7a6994aa3457c803563bf",class:"scroll-fade left"}),r("div",{key:"6599c7035550249f81b5488deda63900363be953",class:"scroll-button left"},r("button",{key:"09a0a7f41a8f0dfe458af7bb719aef0fb0e1b9d7",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollLeft,onClick:this.handleLeftScrollClick},r("limel-icon",{key:"dd5f4cf8562fd74148778d5414f98d4c1c949bd0",name:"angle_left"}))),r("div",{key:"b380cf4e3679d35270453b6a8671e7de8d9a92a7",class:"scroll-fade right"}),r("div",{key:"3589c3bec4d29eee61da6bc0b293201412bd343f",class:"scroll-button right"},r("button",{key:"8af680e4abefcf6920a602c269f9a937270d70f2",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollRight,onClick:this.handleRightScrollClick},r("limel-icon",{key:"be2dcc0f1ba494cce96eab05450ce8c9619981e0",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 H(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{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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}
67
+ */const{TAB_ACTIVATED_EVENT:Q}=V,Z=class{constructor(r){t(this,r),this.changeTab=e(this,"changeTab",7),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:"b0a62a521861357770e12bc6183b9590c49760e0",class:"mdc-tab-bar",role:"tablist"},r("div",{key:"97750d5ded531aee2fca5cd1f129fee4194b8f09",class:{"mdc-tab-scroller":!0,"can-scroll-left":this.canScrollLeft,"can-scroll-right":this.canScrollRight}},r("div",{key:"6547764cdcfc4f2f60e510863ede4d58d48b1b0e",class:"mdc-tab-scroller__scroll-area lime-hide-scrollbars"},r("div",{key:"b95453f5a1fe8b4aae7ebad439cfb795198623a8",class:"mdc-tab-scroller__scroll-content"},this.tabs.map(this.renderTab))),r("div",{key:"a4703fa681f371d69ab7a6994aa3457c803563bf",class:"scroll-fade left"}),r("div",{key:"6599c7035550249f81b5488deda63900363be953",class:"scroll-button left"},r("button",{key:"09a0a7f41a8f0dfe458af7bb719aef0fb0e1b9d7",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollLeft,onClick:this.handleLeftScrollClick},r("limel-icon",{key:"dd5f4cf8562fd74148778d5414f98d4c1c949bd0",name:"angle_left"}))),r("div",{key:"b380cf4e3679d35270453b6a8671e7de8d9a92a7",class:"scroll-fade right"}),r("div",{key:"3589c3bec4d29eee61da6bc0b293201412bd343f",class:"scroll-button right"},r("button",{key:"8af680e4abefcf6920a602c269f9a937270d70f2",type:"button",tabindex:"-1","aria-hidden":"true",disabled:!this.canScrollRight,onClick:this.handleRightScrollClick},r("limel-icon",{key:"be2dcc0f1ba494cce96eab05450ce8c9619981e0",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 U(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{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e,a as r}from"./p-Bnc9lzk2.js";import{c as o,i as a}from"./p-CGVVDGcv.js";import{b as n}from"./p-BQeIv4aA.js";import{i as h}from"./p-BYfPV0O4.js";import{b as l}from"./p-BY5NjPj8.js";import{i as p}from"./p-B8VKuhvH.js";import{c}from"./p-JbKhhoXs.js";import"./p-BCq5M9TE.js";import"./p-Bu_YRgCL.js";import"./p-CgNJbSP4.js";import"./p-B6-3WXAv.js";import"./p-CZ30nDJE.js";import"./p-DK0pjX-Y.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-DbBZn7JO.js";import"./p-BcJ-TDVt.js";import"./p-B--C3qwe.js";import"./p-BOEi1C7r.js";import"./p-CK4jS9_E.js";function d(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}var f,m=(f=n,function(t,i){if(null==t)return t;if(!h(t))return f(t,i);for(var s=t.length,e=-1,r=Object(t);++e<s&&!1!==i(r[e],e,r););return t});function u(t,i,s,e){return m(t,(function(t,r,o){i(e,t,s(t),o)})),e}var b,j,v=(b=function(t,i,s){t[s?0:1].push(i)},j=function(){return[[],[]]},function(t,i){var s=p(t)?d:u,e=j?[[],[]]:{};return s(t,b,l(i),e)});const y=class{constructor(e){t(this,e),this.filesSelected=i(this,"filesSelected",7),this.filesRejected=i(this,"filesRejected",7),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]=v(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:"841fa3b9766a42bdf7ee7e5993aa69521f081272",onDrop:this.handleDrop,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave},s("slot",{key:"f1cd970b1555fa013cdc8391f627e6ad28a2f176"}),this.renderOnDragLayout())}};y.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 g=class{constructor(s){t(this,s),this.filesSelected=i(this,"filesSelected",7),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:"e802095d33209367010aca10267f66b924aba997",onClick:this.handleClick,onKeyUp:this.handleKeyUp,onKeyDown:this.handleKeyDown},s("input",{key:"a3a70866e1541303ad277dd3ec3d82a30e7b2c60",hidden:!0,id:this.fileInputId,onChange:this.handleFileChange,type:"file",accept:this.accept,disabled:this.disabled,multiple:this.multiple}),s("slot",{key:"8ad5e423a56d3b067b16f0cd208eac25989fa1e7"}))}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{y as limel_file_dropzone,g as limel_file_input}
@@ -1,4 +1,4 @@
1
- import{r as i,c as t,h as o,a as e}from"./p-Bnc9lzk2.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-CVzgpz9P.js";import"./p-mmkVLOjW.js";import"./p-CZ30nDJE.js";import"./p-D4RdItCq.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-BcJ-TDVt.js";import"./p-DbBZn7JO.js";import"./p-B8VKuhvH.js";import"./p-B--C3qwe.js";
1
+ import{r as i,c as t,h as o,a as e}from"./p-Bnc9lzk2.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-COdirXg1.js";import"./p-B6-3WXAv.js";import"./p-CZ30nDJE.js";import"./p-DK0pjX-Y.js";import"./p-BJQylLSL.js";import"./p-oiMYqRQ0.js";import"./p-BYfPV0O4.js";import"./p-BcJ-TDVt.js";import"./p-DbBZn7JO.js";import"./p-B8VKuhvH.js";import"./p-B--C3qwe.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2016 Google Inc.
@@ -0,0 +1 @@
1
+ import{a as r}from"./p-ByzvFNMm.js";import{c as t,a as o}from"./p-BY5NjPj8.js";import{i}from"./p-B--C3qwe.js";import{i as n}from"./p-BJQylLSL.js";function s(r){if("function"!=typeof r)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!r.call(this);case 1:return!r.call(this,t[0]);case 2:return!r.call(this,t[0],t[1]);case 3:return!r.call(this,t[0],t[1],t[2])}return!r.apply(this,t)}}function e(s,e,a){if(!n(s))return s;for(var u=-1,f=(e=t(e,s)).length,p=f-1,c=s;null!=c&&++u<f;){var m=o(e[u]),h=a;if("__proto__"===m||"constructor"===m||"prototype"===m)return s;if(u!=p){var v=c[m];void 0===(h=void 0)&&(h=n(v)?v:i(e[u+1])?[]:{})}r(c,m,h),c=c[m]}return s}export{e as b,s as n}
@@ -0,0 +1 @@
1
+ import{i as r}from"./p-CK4jS9_E.js";import{d as n}from"./p-9W8bTt2G.js";import{d as t}from"./p-B6-3WXAv.js";import{S as o}from"./p-BJQylLSL.js";import{i}from"./p-DK0pjX-Y.js";import{i as u}from"./p-B8VKuhvH.js";import{i as a}from"./p-BYfPV0O4.js";import{i as e}from"./p-oiMYqRQ0.js";var f,s,c,p=Date.now,m=n?function(r,t){return n(r,"toString",{configurable:!0,enumerable:!1,value:(o=t,function(){return o}),writable:!0});var o}:r,v=(f=m,s=0,c=0,function(){var r=p(),n=16-(r-c);if(c=r,n>0){if(++s>=800)return arguments[0]}else s=0;return f.apply(void 0,arguments)});function j(r){return r!=r}function l(r,n){return!(null==r||!r.length)&&function(r,n){return n==n?function(r,n){for(var t=-1,o=r.length;++t<o;)if(r[t]===n)return t;return-1}(r,n):function(r,n){for(var t=r.length,o=-1;++o<t;)if(n(r[o],o,r))return o;return-1}(r,j)}(r,n)>-1}var b=Math.max;function d(n,t){return v(function(r,n,t){return n=b(void 0===n?r.length-1:n,0),function(){for(var o=arguments,i=-1,u=b(o.length-n,0),a=Array(u);++i<u;)a[i]=o[n+i];i=-1;for(var e=Array(n+1);++i<n;)e[i]=o[i];return e[n]=t(a),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,e)}}(n,t,r),n+"")}var h=o?o.isConcatSpreadable:void 0;function B(r){return u(r)||i(r)||!!(h&&r&&r[h])}function S(r,n,o,i,u){var a=-1,e=r.length;for(o||(o=B),u||(u=[]);++a<e;){var f=r[a];o(f)&&t(u,f)}return u}function y(r){return e(r)&&a(r)}export{l as a,d as b,S as c,y as i}
@@ -40,4 +40,7 @@ export declare const arrayItemWithDependenciesAndCustomConfigSchema: FormSchema;
40
40
  export declare const nestedStringCustomComponentSchema: FormSchema;
41
41
  export declare const nestedSchemaPathSchema: FormSchema;
42
42
  export declare const nestedLayoutSchemaPathSchema: FormSchema;
43
+ export declare const getConditionalCustomComponentSchema: (value: Record<string, any>) => FormSchema;
44
+ export declare const arrayItemWithEnumAndDefaultSchema: FormSchema;
45
+ export declare const requiredCheckboxSchema: FormSchema;
43
46
  //# sourceMappingURL=form.test-schemas.d.ts.map
@@ -62,6 +62,5 @@ export declare class CollapsibleItemTemplate extends React.Component<PropsWithCh
62
62
  private setActions;
63
63
  private handleAction;
64
64
  private handleOpen;
65
- private isDeepEmpty;
66
65
  }
67
66
  //# sourceMappingURL=array-field-collapsible-item.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "40.5.2",
3
+ "version": "40.5.4",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -54,16 +54,16 @@
54
54
  "devDependencies": {
55
55
  "@commitlint/config-conventional": "^21.2.3",
56
56
  "@limetech/eslint-config": "^4.1.0",
57
- "@microsoft/api-extractor": "^7.59.0",
57
+ "@microsoft/api-extractor": "^7.59.2",
58
58
  "@playwright/test": "1.62.1",
59
59
  "@popperjs/core": "^2.11.8",
60
- "@rjsf/core": "6.7.0",
61
- "@rjsf/utils": "^6.8.0",
62
- "@rjsf/validator-ajv8": "^6.8.0",
60
+ "@rjsf/core": "^6.11.0",
61
+ "@rjsf/utils": "^6.11.0",
62
+ "@rjsf/validator-ajv8": "^6.11.0",
63
63
  "@rollup/plugin-node-resolve": "^13.3.0",
64
64
  "@stencil/core": "^4.43.5",
65
65
  "@stencil/sass": "^3.3.3",
66
- "@stencil/vitest": "^1.14.0",
66
+ "@stencil/vitest": "^1.15.1",
67
67
  "@types/codemirror": "^5.60.17",
68
68
  "@types/html-escaper": "^3.0.4",
69
69
  "@types/lodash-es": "^4.17.12",
@@ -90,12 +90,12 @@
90
90
  "morphdom": "^2.7.8",
91
91
  "number-abbreviate": "^2.0.0",
92
92
  "parse-css-color": "^0.2.1",
93
- "postal-mime": "^3.0.0",
93
+ "postal-mime": "^3.0.1",
94
94
  "prettier": "^3.8.3",
95
95
  "prosemirror-example-setup": "^1.2.3",
96
- "prosemirror-markdown": "^1.13.7",
97
- "prosemirror-model": ">=1.25.11",
98
- "prosemirror-schema-basic": "^1.2.4",
96
+ "prosemirror-markdown": "^1.13.8",
97
+ "prosemirror-model": ">=1.25.12",
98
+ "prosemirror-schema-basic": "^1.2.5",
99
99
  "prosemirror-tables": "^1.8.5",
100
100
  "prosemirror-test-builder": "^1.1.1",
101
101
  "react": "^19.3.0",
@@ -113,7 +113,7 @@
113
113
  "sirv": "^3.0.2",
114
114
  "sortablejs": "^1.15.7",
115
115
  "style-to-object": "^2.0.2",
116
- "tabulator-tables": "^6.5.2",
116
+ "tabulator-tables": "^6.5.3",
117
117
  "typescript": "^4.9.5",
118
118
  "unified": "^11.0.5",
119
119
  "unist-util-visit": "^5.0.0",
@@ -1,119 +0,0 @@
1
- 'use strict';
2
-
3
- var _baseIsEqual = require('./_baseIsEqual-CQZKiKbe.js');
4
- var _getTag = require('./_getTag-BC28Za7d.js');
5
- var isObject = require('./isObject-B6Osvvqp.js');
6
- var isArrayLike = require('./isArrayLike-C2RwZMG4.js');
7
-
8
- /**
9
- * This function is like
10
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
11
- * except that it includes inherited enumerable properties.
12
- *
13
- * @private
14
- * @param {Object} object The object to query.
15
- * @returns {Array} Returns the array of property names.
16
- */
17
- function nativeKeysIn(object) {
18
- var result = [];
19
- if (object != null) {
20
- for (var key in Object(object)) {
21
- result.push(key);
22
- }
23
- }
24
- return result;
25
- }
26
-
27
- /** Used for built-in method references. */
28
- var objectProto = Object.prototype;
29
-
30
- /** Used to check objects for own properties. */
31
- var hasOwnProperty = objectProto.hasOwnProperty;
32
-
33
- /**
34
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
35
- *
36
- * @private
37
- * @param {Object} object The object to query.
38
- * @returns {Array} Returns the array of property names.
39
- */
40
- function baseKeysIn(object) {
41
- if (!isObject.isObject(object)) {
42
- return nativeKeysIn(object);
43
- }
44
- var isProto = _getTag.isPrototype(object),
45
- result = [];
46
-
47
- for (var key in object) {
48
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
49
- result.push(key);
50
- }
51
- }
52
- return result;
53
- }
54
-
55
- /**
56
- * Creates an array of the own and inherited enumerable property names of `object`.
57
- *
58
- * **Note:** Non-object values are coerced to objects.
59
- *
60
- * @static
61
- * @memberOf _
62
- * @since 3.0.0
63
- * @category Object
64
- * @param {Object} object The object to query.
65
- * @returns {Array} Returns the array of property names.
66
- * @example
67
- *
68
- * function Foo() {
69
- * this.a = 1;
70
- * this.b = 2;
71
- * }
72
- *
73
- * Foo.prototype.c = 3;
74
- *
75
- * _.keysIn(new Foo);
76
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
77
- */
78
- function keysIn(object) {
79
- return isArrayLike.isArrayLike(object) ? _baseIsEqual.arrayLikeKeys(object, true) : baseKeysIn(object);
80
- }
81
-
82
- /** Built-in value references. */
83
- var getPrototype = _getTag.overArg(Object.getPrototypeOf, Object);
84
-
85
- /* Built-in method references for those with the same name as other `lodash` methods. */
86
- var nativeGetSymbols = Object.getOwnPropertySymbols;
87
-
88
- /**
89
- * Creates an array of the own and inherited enumerable symbols of `object`.
90
- *
91
- * @private
92
- * @param {Object} object The object to query.
93
- * @returns {Array} Returns the array of symbols.
94
- */
95
- var getSymbolsIn = !nativeGetSymbols ? _baseIsEqual.stubArray : function(object) {
96
- var result = [];
97
- while (object) {
98
- _baseIsEqual.arrayPush(result, _baseIsEqual.getSymbols(object));
99
- object = getPrototype(object);
100
- }
101
- return result;
102
- };
103
-
104
- /**
105
- * Creates an array of own and inherited enumerable property names and
106
- * symbols of `object`.
107
- *
108
- * @private
109
- * @param {Object} object The object to query.
110
- * @returns {Array} Returns the array of property names and symbols.
111
- */
112
- function getAllKeysIn(object) {
113
- return _baseIsEqual.baseGetAllKeys(object, keysIn, getSymbolsIn);
114
- }
115
-
116
- exports.getAllKeysIn = getAllKeysIn;
117
- exports.getPrototype = getPrototype;
118
- exports.getSymbolsIn = getSymbolsIn;
119
- exports.keysIn = keysIn;
@@ -1,73 +0,0 @@
1
- 'use strict';
2
-
3
- var toNumber = require('./toNumber-v-1DEwWD.js');
4
- var eq = require('./eq-DFcUoVzv.js');
5
- var isArrayLike = require('./isArrayLike-C2RwZMG4.js');
6
- var _isIndex = require('./_isIndex-Bu45fvR7.js');
7
- var isObject = require('./isObject-B6Osvvqp.js');
8
-
9
- /** Used as references for various `Number` constants. */
10
- var INFINITY = 1 / 0,
11
- MAX_INTEGER = 1.7976931348623157e+308;
12
-
13
- /**
14
- * Converts `value` to a finite number.
15
- *
16
- * @static
17
- * @memberOf _
18
- * @since 4.12.0
19
- * @category Lang
20
- * @param {*} value The value to convert.
21
- * @returns {number} Returns the converted number.
22
- * @example
23
- *
24
- * _.toFinite(3.2);
25
- * // => 3.2
26
- *
27
- * _.toFinite(Number.MIN_VALUE);
28
- * // => 5e-324
29
- *
30
- * _.toFinite(Infinity);
31
- * // => 1.7976931348623157e+308
32
- *
33
- * _.toFinite('3.2');
34
- * // => 3.2
35
- */
36
- function toFinite(value) {
37
- if (!value) {
38
- return value === 0 ? value : 0;
39
- }
40
- value = toNumber.toNumber(value);
41
- if (value === INFINITY || value === -INFINITY) {
42
- var sign = (value < 0 ? -1 : 1);
43
- return sign * MAX_INTEGER;
44
- }
45
- return value === value ? value : 0;
46
- }
47
-
48
- /**
49
- * Checks if the given arguments are from an iteratee call.
50
- *
51
- * @private
52
- * @param {*} value The potential iteratee value argument.
53
- * @param {*} index The potential iteratee index or key argument.
54
- * @param {*} object The potential iteratee object argument.
55
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
56
- * else `false`.
57
- */
58
- function isIterateeCall(value, index, object) {
59
- if (!isObject.isObject(object)) {
60
- return false;
61
- }
62
- var type = typeof index;
63
- if (type == 'number'
64
- ? (isArrayLike.isArrayLike(object) && _isIndex.isIndex(index, object.length))
65
- : (type == 'string' && index in object)
66
- ) {
67
- return eq.eq(object[index], value);
68
- }
69
- return false;
70
- }
71
-
72
- exports.isIterateeCall = isIterateeCall;
73
- exports.toFinite = toFinite;