@moni-labs/moni-ui 0.4.1 → 0.4.2

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 (64) hide show
  1. package/README.md +28 -3
  2. package/custom-elements.json +6 -6
  3. package/dist/cdn/chunks/base-BIpe3L86.js +1 -0
  4. package/dist/cdn/chunks/class-map-DBljv-_e.js +1 -0
  5. package/dist/cdn/chunks/decorate-DxX3e27g.js +738 -0
  6. package/dist/cdn/chunks/directive-BSZPiF1A.js +1 -0
  7. package/dist/cdn/chunks/event-emitter-CGhsijUg.js +1 -0
  8. package/dist/cdn/chunks/gsap-DWxn8li7.js +1 -0
  9. package/dist/cdn/chunks/if-defined-CuEAJKpp.js +1 -0
  10. package/dist/cdn/chunks/live-B7Rjg1kt.js +1 -0
  11. package/dist/cdn/chunks/query-SWT-tzvq.js +1 -0
  12. package/dist/cdn/chunks/query-assigned-elements-BBHe1xEY.js +1 -0
  13. package/dist/cdn/components/moni-app-bar.js +118 -0
  14. package/dist/cdn/components/moni-badge.js +69 -0
  15. package/dist/cdn/components/moni-bottom-sheet.js +143 -0
  16. package/dist/cdn/components/moni-button-group.js +56 -0
  17. package/dist/cdn/components/moni-button-segment.js +272 -0
  18. package/dist/cdn/components/moni-button.js +602 -0
  19. package/dist/cdn/components/moni-card.js +143 -0
  20. package/dist/cdn/components/moni-carousel.js +311 -0
  21. package/dist/cdn/components/moni-checkbox.js +137 -0
  22. package/dist/cdn/components/moni-chip.js +218 -0
  23. package/dist/cdn/components/moni-color-field.js +54 -0
  24. package/dist/cdn/components/moni-context-menu.js +24 -0
  25. package/dist/cdn/components/moni-dialog.js +191 -0
  26. package/dist/cdn/components/moni-divider.js +32 -0
  27. package/dist/cdn/components/moni-expansion.js +50 -0
  28. package/dist/cdn/components/moni-fab-menu.js +57 -0
  29. package/dist/cdn/components/moni-fab.js +103 -0
  30. package/dist/cdn/components/moni-file-field.js +45 -0
  31. package/dist/cdn/components/moni-icon.js +55 -0
  32. package/dist/cdn/components/moni-list-item.js +144 -0
  33. package/dist/cdn/components/moni-list.js +16 -0
  34. package/dist/cdn/components/moni-loading-indicator.js +134 -0
  35. package/dist/cdn/components/moni-menu-item.js +45 -0
  36. package/dist/cdn/components/moni-menu.js +165 -0
  37. package/dist/cdn/components/moni-morph-modal.js +157 -0
  38. package/dist/cdn/components/moni-nav-item.js +153 -0
  39. package/dist/cdn/components/moni-nav.js +161 -0
  40. package/dist/cdn/components/moni-progress.js +420 -0
  41. package/dist/cdn/components/moni-radio.js +154 -0
  42. package/dist/cdn/components/moni-ripple.js +55 -0
  43. package/dist/cdn/components/moni-segmented-button.js +32 -0
  44. package/dist/cdn/components/moni-select-option.js +47 -0
  45. package/dist/cdn/components/moni-select.js +503 -0
  46. package/dist/cdn/components/moni-shape.js +99 -0
  47. package/dist/cdn/components/moni-side-sheet.js +234 -0
  48. package/dist/cdn/components/moni-slider.js +252 -0
  49. package/dist/cdn/components/moni-snackbar.js +91 -0
  50. package/dist/cdn/components/moni-split-button.js +110 -0
  51. package/dist/cdn/components/moni-step.js +111 -0
  52. package/dist/cdn/components/moni-stepper.js +25 -0
  53. package/dist/cdn/components/moni-switch.js +169 -0
  54. package/dist/cdn/components/moni-tab.js +93 -0
  55. package/dist/cdn/components/moni-tabs.js +38 -0
  56. package/dist/cdn/components/moni-text-field.js +83 -0
  57. package/dist/cdn/components/moni-textarea.js +46 -0
  58. package/dist/cdn/components/moni-time-picker.js +496 -0
  59. package/dist/cdn/components/moni-toolbar.js +71 -0
  60. package/dist/cdn/components/moni-tooltip.js +161 -0
  61. package/dist/cdn/components/moni-typography.js +117 -0
  62. package/dist/cdn/importmap.json +102 -0
  63. package/dist/cdn/moni-ui.min.css +1 -0
  64. package/package.json +3 -1
@@ -0,0 +1,143 @@
1
+ import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-DxX3e27g.js";var s=class extends t{constructor(...e){super(...e),this.variant=`elevated`,this.clickable=!1,this.draggable=!1,this.disabled=!1}static{this.styles=[i,n`
2
+ :host {
3
+ display: block;
4
+ font-family: var(--font);
5
+ /* M3 spec: 12dp corner, 16dp padding, 8dp max between cards. */
6
+ border-radius: 0.75rem;
7
+ color: var(--on-surface);
8
+ position: relative;
9
+ overflow: hidden;
10
+ transition:
11
+ box-shadow var(--speed2),
12
+ background-color var(--speed2),
13
+ border-color var(--speed2);
14
+ }
15
+
16
+ /* Elevated variant: surface-container-low + elevation 1. */
17
+ :host([variant='elevated']) {
18
+ background-color: var(--surface-container-low);
19
+ box-shadow: var(--elevate1);
20
+ }
21
+
22
+ /* Filled variant: surface-container-highest, no shadow. */
23
+ :host([variant='filled']) {
24
+ background-color: var(--surface-container-highest);
25
+ }
26
+
27
+ /* Outlined variant: surface + outline-variant 1dp. */
28
+ :host([variant='outlined']) {
29
+ background-color: var(--surface);
30
+ border: 0.0625rem solid var(--outline-variant);
31
+ }
32
+
33
+ /* Clickable cards expose hover/focus/pressed state layers. */
34
+ :host([clickable]) {
35
+ cursor: pointer;
36
+ }
37
+ :host([clickable]:hover) {
38
+ box-shadow: var(--elevate2);
39
+ }
40
+ :host([clickable]:focus-visible) {
41
+ outline: 0.125rem solid var(--primary);
42
+ outline-offset: 0.125rem;
43
+ }
44
+ :host([clickable]:active) {
45
+ box-shadow: var(--elevate1);
46
+ }
47
+
48
+ /* Draggable cards show elevation 3 when picked up. */
49
+ :host([draggable]) {
50
+ cursor: grab;
51
+ }
52
+ :host([draggable]:active) {
53
+ cursor: grabbing;
54
+ box-shadow: var(--elevate3);
55
+ }
56
+
57
+ /* Disabled state. */
58
+ :host([disabled]) {
59
+ opacity: 0.38;
60
+ pointer-events: none;
61
+ cursor: not-allowed;
62
+ }
63
+
64
+ /* ─── Card slots layout ─── */
65
+ .media {
66
+ display: block;
67
+ margin-block-end: 1rem;
68
+ }
69
+ .media[hidden] {
70
+ display: none;
71
+ }
72
+
73
+ .body {
74
+ padding: 0 1rem;
75
+ display: flex;
76
+ flex-direction: column;
77
+ gap: 0.5rem;
78
+ }
79
+
80
+ .headline {
81
+ font-size: 1.25rem;
82
+ line-height: 1.75rem;
83
+ font-weight: 400;
84
+ letter-spacing: 0;
85
+ color: var(--on-surface);
86
+ margin: 0;
87
+ padding: 0;
88
+ }
89
+ .subhead {
90
+ font-size: 0.875rem;
91
+ line-height: 1.25rem;
92
+ font-weight: 500;
93
+ letter-spacing: 0.007em;
94
+ color: var(--on-surface-variant);
95
+ margin: 0;
96
+ padding: 0;
97
+ }
98
+ .supporting {
99
+ font-size: 0.875rem;
100
+ line-height: 1.25rem;
101
+ font-weight: 400;
102
+ letter-spacing: 0.014em;
103
+ color: var(--on-surface-variant);
104
+ margin: 0;
105
+ padding: 0;
106
+ }
107
+
108
+ .actions {
109
+ display: flex;
110
+ gap: 0.5rem;
111
+ padding: 0.75rem 1rem 1rem;
112
+ }
113
+ .actions[hidden] {
114
+ display: none;
115
+ }
116
+
117
+ /* Ensure slotted headings inherit our typography reset
118
+ (margin/padding/font-size) so consumers can use semantic
119
+ h1..h6 without breaking the visual rhythm. */
120
+ ::slotted(:is(h1, h2, h3, h4, h5, h6)) {
121
+ margin: 0;
122
+ padding: 0;
123
+ font-size: inherit;
124
+ font-weight: inherit;
125
+ line-height: inherit;
126
+ letter-spacing: inherit;
127
+ color: inherit;
128
+ }
129
+ `]}render(){return e`
130
+ <div class="media" part="media">
131
+ <slot name="media"></slot>
132
+ </div>
133
+ <div class="body" part="body">
134
+ <slot name="headline">
135
+ <slot></slot>
136
+ </slot>
137
+ <slot name="subhead"></slot>
138
+ <slot name="supporting"></slot>
139
+ </div>
140
+ <div class="actions" part="actions">
141
+ <slot name="actions"></slot>
142
+ </div>
143
+ `}};o([r({reflect:!0})],s.prototype,`variant`,void 0),o([r({type:Boolean,reflect:!0})],s.prototype,`clickable`,void 0),o([r({type:Boolean,reflect:!0})],s.prototype,`draggable`,void 0),o([r({type:Boolean,reflect:!0})],s.prototype,`disabled`,void 0),s=o([a(`moni-card`)],s);
@@ -0,0 +1,311 @@
1
+ import{a as e,d as t,i as n,m as r,o as i,r as a,s as o,t as s}from"../chunks/decorate-DxX3e27g.js";import{t as c}from"../chunks/base-BIpe3L86.js";import{t as l}from"../chunks/query-SWT-tzvq.js";import{t as u}from"../chunks/event-emitter-CGhsijUg.js";import{t as d}from"../chunks/gsap-DWxn8li7.js";var f;function p(e){return(t,n)=>c(t,n,{get(){return(this.renderRoot??(f??=document.createDocumentFragment())).querySelectorAll(e)}})}var m=class extends n{constructor(...e){super(...e),this.items=[],this.layout=`multi-browse`,this.auto=!0,this.largeWidth=220,this.mediumWidth=96,this.smallWidth=48,this.gap=8,this.padding=16,this.borderRadius=28,this.showAll=!1,this.showAllText=`Show all`,this.headerText=``,this.hideNav=!1,this.infinite=!1,this.autoplay=!1,this.autoplayInterval=3e3,this._containerWidth=0,this._slottedItems=[],this._hasSlottedShowAll=!1,this._resizeObserver=null,this._logicalItemInViewport=[],this._isDragging=!1,this._dragStartX=0,this._scrollLeftAtDragStart=0,this._pointerVelocity=0,this._lastPointerTime=0,this._lastPointerX=0,this._totalDraggedDistance=0,this._animationFrameId=null,this._isMobile=!1,this._tickerTarget=0,this._tickerCurrent=0,this._isTicking=!1,this._infiniteInitialized=!1,this._autoplayTimer=null,this._cardSetX=[],this._cardSetWidth=[],this._imgSetX=[],this._titleSetOpacity=[],this._tick=()=>{let e=d.ticker.deltaRatio(),t=this._isMobile?.08:.15;this._tickerCurrent+=(this._tickerTarget-this._tickerCurrent)*t*e,Math.abs(this._tickerTarget-this._tickerCurrent)<5e-4&&(this._tickerCurrent=this._tickerTarget,d.ticker.remove(this._tick),this._isTicking=!1,this._checkInfiniteWrap()),this._applyLayout(this._tickerCurrent)},this._scheduleLayout=()=>{this._scrollContainer&&(this._tickerTarget=this._scrollContainer.scrollLeft/this.itemSize,this._isTicking||(this._isTicking=!0,d.ticker.add(this._tick)))},this.updateLayout=(e=!1)=>{if(!(!this._scrollContainer||!this._cards||this._cards.length===0)){if(this._cardSetX.length!==this._cards.length&&this._buildQuickSetters(),this.infinite&&!this._infiniteInitialized&&this.effectiveItems.length>0){let e=this.effectiveItems.length*this._visualCardsMultiplier,t=this._snapSetsCount,n=Math.floor(t/2);requestAnimationFrame(()=>{setTimeout(()=>{this._scrollContainer&&(this._scrollContainer.scrollWidth,this._scrollContainer.scrollLeft=n*e*this.itemSize,this._tickerTarget=this._scrollContainer.scrollLeft/this.itemSize,this._tickerCurrent=this._tickerTarget,this._applyLayout(this._tickerCurrent))},20)}),this._infiniteInitialized=!0}this._tickerTarget=this._scrollContainer.scrollLeft/this.itemSize,e||!this._isTicking&&this._tickerCurrent===0?(this._tickerCurrent=this._tickerTarget,this._applyLayout(this._tickerCurrent)):this._isTicking||(this._isTicking=!0,d.ticker.add(this._tick))}}}get effectiveItems(){return this.items&&this.items.length>0?this.items:this._slottedItems}static{this.styles=[a,r`
2
+ :host {
3
+ display: block;
4
+ width: 100%;
5
+ user-select: none;
6
+ -webkit-user-select: none;
7
+ }
8
+
9
+ .carousel-container {
10
+ position: relative;
11
+ width: 100%;
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: 12px;
15
+ }
16
+
17
+ .carousel-header {
18
+ display: flex;
19
+ justify-content: space-between;
20
+ align-items: flex-end;
21
+ padding: 0 var(--carousel-padding, 16px);
22
+ }
23
+
24
+ .carousel-header h3 {
25
+ margin: 0;
26
+ font-family: var(--font-title, serif);
27
+ font-size: 1.5rem;
28
+ font-weight: 500;
29
+ color: var(--on-surface);
30
+ }
31
+
32
+ .show-all-link {
33
+ color: var(--primary);
34
+ font-weight: 500;
35
+ font-size: 0.875rem;
36
+ text-decoration: none;
37
+ cursor: pointer;
38
+ transition: opacity var(--speed2);
39
+ }
40
+
41
+ .show-all-link:hover {
42
+ opacity: 0.8;
43
+ text-decoration: underline;
44
+ }
45
+
46
+ .carousel-viewport {
47
+ position: relative;
48
+ width: 100%;
49
+ overflow: hidden;
50
+ }
51
+
52
+ .scroll-container {
53
+ width: 100%;
54
+ height: 296px;
55
+ overflow-x: auto;
56
+ overflow-y: hidden;
57
+ scroll-snap-type: x mandatory;
58
+ scroll-padding-left: var(--carousel-padding, 16px);
59
+ scroll-padding-right: var(--carousel-padding, 16px);
60
+ scrollbar-width: none;
61
+ -webkit-overflow-scrolling: touch;
62
+ cursor: grab;
63
+ }
64
+
65
+ .scroll-container:active {
66
+ cursor: grabbing;
67
+ }
68
+
69
+ .scroll-container::-webkit-scrollbar {
70
+ display: none;
71
+ }
72
+
73
+ .snap-track {
74
+ display: flex;
75
+ width: calc(var(--carousel-track-width, 0px) + var(--carousel-right-padding, 128px));
76
+ gap: var(--carousel-gap, 8px);
77
+ padding: 8px 0 8px var(--carousel-padding, 16px);
78
+ height: 100%;
79
+ pointer-events: none;
80
+ }
81
+
82
+ .snap-item {
83
+ flex: 0 0 var(--carousel-snap-width, 220px);
84
+ height: 100%;
85
+ scroll-snap-align: start;
86
+ pointer-events: none;
87
+ }
88
+
89
+ .visual-track {
90
+ position: absolute;
91
+ left: 0;
92
+ top: 8px;
93
+ width: 0;
94
+ height: 280px;
95
+ overflow: visible;
96
+ pointer-events: none;
97
+ }
98
+
99
+ .card {
100
+ position: absolute;
101
+ top: 0;
102
+ height: 280px;
103
+ border-radius: var(--carousel-border-radius, 28px);
104
+ overflow: hidden;
105
+ background-color: var(--surface-container-high);
106
+ pointer-events: auto;
107
+ box-shadow: var(--elevate1);
108
+ will-change: transform;
109
+ cursor: pointer;
110
+ transition: box-shadow var(--speed2);
111
+ }
112
+
113
+ .card:hover {
114
+ box-shadow: var(--elevate2);
115
+ }
116
+
117
+ .card::after {
118
+ content: '';
119
+ position: absolute;
120
+ top: 0;
121
+ left: 0;
122
+ right: 0;
123
+ bottom: 0;
124
+ background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
125
+ pointer-events: none;
126
+ z-index: 1;
127
+ }
128
+
129
+ .img-parallax-container {
130
+ width: 100%;
131
+ height: 100%;
132
+ position: relative;
133
+ overflow: hidden;
134
+ }
135
+
136
+ .card img {
137
+ width: calc(100% + 50px);
138
+ height: 100%;
139
+ object-fit: cover;
140
+ position: absolute;
141
+ left: -25px;
142
+ pointer-events: none;
143
+ user-select: none;
144
+ -webkit-user-drag: none;
145
+ will-change: transform;
146
+ }
147
+
148
+ .card-title {
149
+ position: absolute;
150
+ bottom: 20px;
151
+ left: 20px;
152
+ right: 20px;
153
+ color: #ffffff;
154
+ margin: 0;
155
+ font-size: 1.1rem;
156
+ font-weight: 500;
157
+ pointer-events: none;
158
+ white-space: nowrap;
159
+ overflow: hidden;
160
+ text-overflow: ellipsis;
161
+ z-index: 2;
162
+ }
163
+
164
+ /* Arrow navigation overlays */
165
+ .nav-button {
166
+ position: absolute;
167
+ top: 50%;
168
+ transform: translateY(-50%);
169
+ z-index: 10;
170
+ width: 48px;
171
+ height: 48px;
172
+ border-radius: 50%;
173
+ background-color: var(--surface-container-highest);
174
+ color: var(--on-surface);
175
+ border: none;
176
+ box-shadow: var(--elevate2);
177
+ display: flex;
178
+ justify-content: center;
179
+ align-items: center;
180
+ cursor: pointer;
181
+ opacity: 0;
182
+ pointer-events: none;
183
+ transition: opacity var(--speed2), background-color var(--speed2);
184
+ }
185
+
186
+ .nav-button:hover {
187
+ background-color: var(--primary-container);
188
+ color: var(--on-primary-container);
189
+ }
190
+
191
+ .nav-button.prev {
192
+ left: 24px;
193
+ }
194
+
195
+ .nav-button.next {
196
+ right: 24px;
197
+ }
198
+
199
+ .carousel-viewport:hover .nav-button.visible {
200
+ opacity: 1;
201
+ pointer-events: auto;
202
+ }
203
+
204
+ @media (max-width: 600px) {
205
+ .nav-button {
206
+ display: none !important;
207
+ }
208
+ }
209
+
210
+ /* Utility icon style inside shadow dom */
211
+ .material-symbols {
212
+ font-family: var(--font-icon);
213
+ font-weight: normal;
214
+ font-style: normal;
215
+ font-size: 24px;
216
+ line-height: 1;
217
+ letter-spacing: normal;
218
+ text-transform: none;
219
+ display: inline-block;
220
+ white-space: nowrap;
221
+ word-wrap: normal;
222
+ direction: ltr;
223
+ -webkit-font-smoothing: antialiased;
224
+ }
225
+ `]}connectedCallback(){if(super.connectedCallback(),typeof ResizeObserver<`u`&&(this._resizeObserver=new ResizeObserver(e=>{for(let t of e)this._containerWidth=t.contentRect.width,this.updateLayout(!0),this.requestUpdate()}),this._resizeObserver.observe(this)),typeof window<`u`&&typeof window.matchMedia==`function`){let e=window.matchMedia(`(max-width: 600px)`);this._isMobile=e.matches;let t=e=>{this._isMobile=e.matches};e.addEventListener(`change`,t),this.__mqlCleanup=()=>e.removeEventListener(`change`,t)}}disconnectedCallback(){this._resizeObserver&&this._resizeObserver.disconnect(),this._animationFrameId!==null&&(cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),d.ticker.remove(this._tick),this._isTicking=!1,this.__mqlCleanup&&(this.__mqlCleanup(),delete this.__mqlCleanup),super.disconnectedCallback()}firstUpdated(){let e=this.shadowRoot?.querySelector(`slot:not([name])`);e&&this._handleSlotChange({target:e});let t=this.shadowRoot?.querySelector(`slot[name="show-all"]`);t&&this._handleShowAllSlotChange({target:t}),this._buildQuickSetters(),this.updateLayout(!0),this.autoplay&&this._startAutoplay()}updated(e){super.updated(e),(e.has(`layout`)||e.has(`largeWidth`)||e.has(`mediumWidth`)||e.has(`smallWidth`)||e.has(`gap`)||e.has(`padding`)||e.has(`items`)||e.has(`hideNav`)||e.has(`infinite`)||e.has(`autoplay`)||e.has(`autoplayInterval`)||e.has(`_containerWidth`)||e.has(`_slottedItems`)||e.has(`_hasSlottedShowAll`))&&((e.has(`infinite`)||e.has(`items`)||e.has(`_slottedItems`))&&(this._infiniteInitialized=!1),e.has(`layout`)&&this._scrollContainer&&(this._scrollContainer.scrollLeft=0,this._infiniteInitialized=!1,this._scrollContainer.style.scrollSnapType=this.layout===`uncontained`?`none`:`x mandatory`),this.updateLayout(!0),(e.has(`autoplay`)||e.has(`autoplayInterval`)||e.has(`items`)||e.has(`_slottedItems`))&&(this.autoplay?this._startAutoplay():this._stopAutoplay()))}get computedLayout(){let e=this._containerWidth||this.getBoundingClientRect().width||360,t=this.gap,n=e-2*this.padding,r=this.largeWidth,i=this.mediumWidth,a=this.smallWidth,o=1;if(this.auto){if(this.layout===`uncontained`)r=Math.min(n,260);else if(this.layout===`hero`)a=48,o=Math.max(1,Math.floor((n-a)/(250+t))),r=(n-a-o*t)/o,r<150&&(o=1,r=n-a-t);else{a=48;let e=1,s=220,c=1/0;for(let r=1;r<=10;r++){let i=(n-a-(r+1)*t)/(r+.45);if(i>=140&&i<=340){let t=Math.abs(i-220);t<c&&(c=t,e=r,s=i)}}c===1/0?(o=1,r=(n-a-2*t)/1.45):(o=e,r=s),i=.45*r}}else r=this.largeWidth,i=this.mediumWidth,a=this.smallWidth,o=this.layout===`hero`?1:this.layout===`uncontained`?Math.max(1,Math.floor(n/(r+t))):1;return{largeItemWidth:r,mediumItemWidth:i,smallItemWidth:a,largeItemCount:o}}get itemSize(){return this.computedLayout.largeItemWidth+this.gap}_getCardLayout(e){let{largeItemWidth:t,mediumItemWidth:n,smallItemWidth:r,largeItemCount:i}=this.computedLayout,a=this.gap,o=this.padding,s=t,c=o,l=1,u=!0;if(this.layout===`uncontained`){s=t,c=o+e*(t+a),l=1;let n=this._containerWidth||this.getBoundingClientRect().width||360;u=c+s>0&&c<n}else if(this.layout===`hero`){let n=o+i*(t+a),f=-r;if(e<=-1)s=r,c=f+(e- -1)*(r+Math.max(a,o)),l=0,u=!1;else if(e<=0)s=d.utils.interpolate(r,t,e+1),c=d.utils.interpolate(f,o,e+1),l=d.utils.interpolate(0,1,e+1),u=!0;else if(e<=i-1)s=t,c=o+e*(t+a),l=1,u=!0;else if(e<=i){let f=e-(i-1),p=o+(i-1)*(t+a);s=d.utils.interpolate(t,r,f),c=d.utils.interpolate(p,n,f),l=d.utils.interpolate(1,0,f),u=!0}else{let t=this._containerWidth||this.getBoundingClientRect().width||360;s=r;let a=Math.max(r+o,t-n);c=n+(e-i)*a,l=0,u=!1}}else{let f=o+i*(t+a),p=f+n+a,m=-r;if(e<=-1)s=r,c=m+(e- -1)*(r+Math.max(a,o)),l=0,u=!1;else if(e<=0)s=d.utils.interpolate(r,t,e+1),c=d.utils.interpolate(m,o,e+1),l=d.utils.interpolate(0,1,e+1),u=!0;else if(e<=i-1)s=t,c=o+e*(t+a),l=1,u=!0;else if(e<=i){let r=e-(i-1),p=o+(i-1)*(t+a);s=d.utils.interpolate(t,n,r),c=d.utils.interpolate(p,f,r),l=d.utils.interpolate(1,0,r),u=!0}else if(e<=i+1){let t=e-i;s=d.utils.interpolate(n,r,t),c=d.utils.interpolate(f,p,t),l=0,u=!0}else{let t=this._containerWidth||this.getBoundingClientRect().width||360;s=r;let n=Math.max(r+o,t-p);c=p+(e-(i+1))*n,l=0,u=!1}}return{width:s,x:c,opacity:l,visible:u}}_buildQuickSetters(){!this._cards||this._cards.length===0||(this._cardSetX=[],this._cardSetWidth=[],this._imgSetX=[],this._titleSetOpacity=[],this._logicalItemInViewport=Array(this.effectiveItems.length).fill(!1),this._cards.forEach(e=>{this._cardSetX.push(d.quickSetter(e,`x`,`px`)),this._cardSetWidth.push(d.quickSetter(e,`width`,`px`));let t=e.querySelector(`img`);this._imgSetX.push(t?d.quickSetter(t,`x`,`px`):(()=>{}));let n=e.querySelector(`.card-title`);this._titleSetOpacity.push(n?d.quickSetter(n,`opacity`):(()=>{}))}))}_applyLayout(e){let t=this._isMobile,n=this._cards.length,r=new Map,i=new Map;for(let a=0;a<n;a++){let o=a-e,s=this._cards[a],c=Number(s.dataset.index||0),l=this.infinite?c%this.effectiveItems.length:c;if(i.has(l)||i.set(l,s),this.infinite&&(o=a-e%n,o>n/2&&(o-=n),o<-n/2&&(o+=n)),o<-15||o>15){this._cardSetX[a](-9999),this._titleSetOpacity[a](0);continue}let u=this._getCardLayout(o);if(u.visible&&(r.has(l)||r.set(l,s)),this._cardSetX[a](u.x),this._cardSetWidth[a](u.width),!t){let e=Math.max(-1,Math.min(1,o));this._imgSetX[a](e*-25)}this._titleSetOpacity[a](u.opacity)}for(let e=0;e<this.effectiveItems.length;e++){let t=r.has(e);if(this._logicalItemInViewport[e]!==t){this._logicalItemInViewport[e]=t;let n=t?`moni-item-entered-viewport`:`moni-item-left-viewport`,a=r.get(e)||i.get(e)||null;u(this,n,{detail:{item:this.effectiveItems[e],index:e,card:a}})}}}get _visualCardsMultiplier(){if(!this.infinite||this.effectiveItems.length===0)return 1;let e=this.effectiveItems.length;return Math.max(1,Math.ceil(15/e))}get _snapSetsCount(){if(!this.infinite||this.effectiveItems.length===0)return 1;let e=this.effectiveItems.length*this._visualCardsMultiplier,t=Math.ceil(1e3/e);return t%2==0&&(t+=1),Math.max(3,t)}get _snapItemsCount(){if(this.infinite){let e=this.effectiveItems.length,t=this._visualCardsMultiplier;return this._snapSetsCount*(e*t)}return this.effectiveItems.length}_checkInfiniteWrap(){if(!this.infinite||this.effectiveItems.length===0||!this._scrollContainer)return;let e=this.effectiveItems.length*this._visualCardsMultiplier,t=this._snapSetsCount,n=Math.floor(t/2),r=e*this.itemSize,i=this._scrollContainer.scrollLeft,a=Math.floor(i/r);if(a!==n){let e=(n-a)*r,t=this._scrollContainer.style.scrollSnapType,i=this._scrollContainer.style.scrollBehavior;this._scrollContainer.style.scrollSnapType=`none`,this._scrollContainer.style.scrollBehavior=`auto`,this._scrollContainer.scrollLeft+=e,this._tickerTarget=this._scrollContainer.scrollLeft/this.itemSize,this._tickerCurrent=this._tickerTarget,this._applyLayout(this._tickerCurrent),this._scrollContainer.style.scrollBehavior=i,this._isDragging&&(this._scrollLeftAtDragStart+=e),t&&t!==`none`&&requestAnimationFrame(()=>{this._scrollContainer&&!this._isDragging&&(this._scrollContainer.style.scrollSnapType=t)})}}_startAutoplay(){this._stopAutoplay(),this.autoplay&&this.effectiveItems.length>0&&(this._autoplayTimer=setInterval(()=>{this._isDragging||this._scrollNext()},this.autoplayInterval))}_stopAutoplay(){this._autoplayTimer&&=(clearInterval(this._autoplayTimer),null)}_handleMouseEnter(){}_handleMouseLeave(){this._handleMouseUp()}_handleMouseDown(e){d.killTweensOf(this._scrollContainer),this._checkInfiniteWrap(),this._isDragging=!0,this._totalDraggedDistance=0,this._scrollContainer.style.scrollBehavior=`auto`,this._scrollContainer.style.scrollSnapType=`none`,this._dragStartX=e.pageX-this._scrollContainer.offsetLeft,this._scrollLeftAtDragStart=this._scrollContainer.scrollLeft,this._pointerVelocity=0,this._lastPointerX=e.pageX,this._lastPointerTime=performance.now()}_handleMouseMove(e){if(!this._isDragging)return;e.preventDefault();let t=e.pageX,n=t-this._scrollContainer.offsetLeft;this._scrollContainer.scrollLeft=this._scrollLeftAtDragStart+(this._dragStartX-n)*1.25;let r=performance.now(),i=r-this._lastPointerTime;i>0&&(this._pointerVelocity=(t-this._lastPointerX)/i),this._totalDraggedDistance+=Math.abs(t-this._lastPointerX),this._lastPointerX=t,this._lastPointerTime=r}_handleMouseUp(){if(!this._isDragging)return;this._isDragging=!1,performance.now()-this._lastPointerTime>100&&(this._pointerVelocity=0);let e=350+Math.abs(this._pointerVelocity)*300,t=this._scrollContainer.scrollLeft-this._pointerVelocity*e,n=15*this.itemSize;if(t<this._scrollContainer.scrollLeft-n?t=this._scrollContainer.scrollLeft-n:t>this._scrollContainer.scrollLeft+n&&(t=this._scrollContainer.scrollLeft+n),this.layout!==`uncontained`){this._scrollContainer.style.scrollSnapType=`none`;let e=Math.round(t/this.itemSize),n=this.effectiveItems.length>0?this._snapItemsCount-1:0;e=Math.max(0,Math.min(n,e));let r=e*this.itemSize,i=Math.round(this._scrollContainer.scrollLeft/this.itemSize),a=Math.abs(e-i),o=Math.min(.85,.25+a*.04);this._scrollContainer.style.scrollBehavior=`auto`,d.to(this._scrollContainer,{scrollLeft:r,duration:o,ease:`power3.out`,onComplete:()=>{!this._isDragging&&this._scrollContainer&&(this._scrollContainer.style.scrollSnapType=`x mandatory`)}})}}_handleTouchStart(e){d.killTweensOf(this._scrollContainer),this._checkInfiniteWrap(),this._isDragging=!0,this._totalDraggedDistance=0,this._scrollContainer.style.scrollBehavior=`auto`,this._scrollContainer.style.scrollSnapType=`none`;let t=e.touches[0];this._dragStartX=t.pageX-this._scrollContainer.offsetLeft,this._scrollLeftAtDragStart=this._scrollContainer.scrollLeft,this._pointerVelocity=0,this._lastPointerX=t.pageX,this._lastPointerTime=performance.now()}_handleTouchMove(e){if(!this._isDragging)return;let t=e.touches[0].pageX,n=t-this._scrollContainer.offsetLeft;this._scrollContainer.scrollLeft=this._scrollLeftAtDragStart+(this._dragStartX-n);let r=performance.now(),i=r-this._lastPointerTime;i>0&&(this._pointerVelocity=(t-this._lastPointerX)/i),this._totalDraggedDistance+=Math.abs(t-this._lastPointerX),this._lastPointerX=t,this._lastPointerTime=r}_handleTouchEnd(){this._handleMouseUp()}_handleWheel(e){if(Math.abs(e.deltaY)>Math.abs(e.deltaX)){let t=this._scrollContainer.scrollWidth-this._scrollContainer.clientWidth,n=this._scrollContainer.scrollLeft,r=n<=0,i=n>=t-1;if(e.deltaY<0&&r||e.deltaY>0&&i)return;e.preventDefault(),this._scrollContainer.style.scrollSnapType=`none`;let a=e.deltaY;e.deltaMode===1?a*=40:e.deltaMode===2&&(a*=800),this._scrollContainer.scrollLeft+=a,this._wheelTimeout&&clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(()=>{this.layout!==`uncontained`&&!this._isDragging&&(this._scrollContainer.style.scrollSnapType=`x mandatory`)},150)}}_handleCardClick(e,t,n){if(this._totalDraggedDistance>8){e.preventDefault(),e.stopPropagation();return}let r=n%this.effectiveItems.length;this.dispatchEvent(new CustomEvent(`item-click`,{bubbles:!0,composed:!0,detail:{item:t,index:r}})),u(this,`moni-item-click`,{detail:{item:t,index:r}})}_scrollPrevious(){let e=this._scrollContainer.scrollLeft-this.itemSize;this._scrollContainer.style.scrollBehavior=`smooth`,this._scrollContainer.scrollTo({left:e,behavior:`smooth`})}_scrollNext(){let e=this._scrollContainer.scrollLeft+this.itemSize;this._scrollContainer.style.scrollBehavior=`smooth`,this._scrollContainer.scrollTo({left:e,behavior:`smooth`})}_handleShowAllClick(e){let t=e.target;t.tagName.toLowerCase()===`a`&&t.getAttribute(`href`)===`#`&&e.preventDefault(),this.dispatchEvent(new CustomEvent(`show-all-click`,{bubbles:!0,composed:!0})),u(this,`moni-show-all-click`)}_handleShowAllSlotChange(e){let t=e.target,n=typeof t.assignedElements==`function`?t.assignedElements({flatten:!0}):[];n.length===0&&(n=t.assignedNodes().filter(e=>e.nodeType===1)),n.length===0&&(n=Array.from(this.querySelectorAll(`[slot="show-all"]`))),this._hasSlottedShowAll=n.length>0}_handleSlotChange(e){let t=e.target,n=typeof t.assignedElements==`function`?t.assignedElements({flatten:!0}):[];n.length===0&&(n=t.assignedNodes().filter(e=>e.nodeType===1)),n.length===0&&(n=Array.from(this.children).filter(e=>e.getAttribute(`slot`)!==`show-all`));let r=[];for(let e of n)if(e.tagName.toLowerCase()===`img`){let t=e;r.push({title:t.getAttribute(`title`)||t.getAttribute(`alt`)||``,img:t.src})}else if(e.tagName.toLowerCase()===`a`){let t=e,n=t.querySelector(`img`);n&&r.push({title:n.getAttribute(`title`)||n.getAttribute(`alt`)||t.getAttribute(`title`)||``,img:n.src,href:t.href,target:t.target})}this._slottedItems=r;let i=!!this.querySelector(`[slot="show-all"]`);i!==this._hasSlottedShowAll&&(this._hasSlottedShowAll=i),this.updateComplete.then(()=>{this.updateLayout(!0),u(this,`moni-slot-items-changed`,{detail:{items:this._slottedItems}})})}render(){let{largeItemWidth:e,mediumItemWidth:n,smallItemWidth:r}=this.computedLayout,i=this.effectiveItems&&this.effectiveItems.length>0,a=this._hasSlottedShowAll||!!this.querySelector(`[slot="show-all"]`),o=this.headerText||this.showAll||a,s=128;s=this.layout===`hero`?r+this.gap:this.layout===`uncontained`?16:n+r+2*this.gap;let c=(this._containerWidth||this.getBoundingClientRect().width||360)-e-this.padding+400;s<c&&(s=c);let l=i?this._snapItemsCount:0,u=this.effectiveItems;if(this.infinite&&i){let e=this._visualCardsMultiplier;u=[];for(let t=0;t<e;t++)u=u.concat(this.effectiveItems)}let d=i?l*e+(l-1)*this.gap:0,f=i&&this._scrollContainer&&this._scrollContainer.scrollWidth>this._scrollContainer.clientWidth,p=this.infinite||f&&this._scrollContainer.scrollLeft>5,m=this.infinite||f&&this._scrollContainer.scrollWidth-this._scrollContainer.scrollLeft-this._scrollContainer.clientWidth>5;return t`
226
+ <div class="carousel-container" style="
227
+ --carousel-snap-width: ${e}px;
228
+ --carousel-gap: ${this.gap}px;
229
+ --carousel-padding: ${this.padding}px;
230
+ --carousel-right-padding: ${s}px;
231
+ --carousel-border-radius: ${this.borderRadius}px;
232
+ --carousel-track-width: ${d}px;
233
+ ">
234
+ <slot @slotchange=${this._handleSlotChange} style="display: none;"></slot>
235
+ ${o?t`
236
+ <div class="carousel-header">
237
+ ${this.headerText?t`<h3>${this.headerText}</h3>`:``}
238
+ <slot name="show-all" @slotchange=${this._handleShowAllSlotChange} @click=${this._handleShowAllClick}>
239
+ ${this.showAll?t`
240
+ <a href="#" class="show-all-link">
241
+ ${this.showAllText}
242
+ </a>
243
+ `:``}
244
+ </slot>
245
+ </div>
246
+ `:``}
247
+
248
+ <div class="carousel-viewport">
249
+ ${this.hideNav?``:t`
250
+ <button
251
+ class="nav-button prev ${p?`visible`:``}"
252
+ @click=${this._scrollPrevious}
253
+ aria-label="Previous items"
254
+ >
255
+ <span class="material-symbols">chevron_left</span>
256
+ </button>
257
+ `}
258
+
259
+ <div
260
+ class="scroll-container"
261
+ @scroll=${this._scheduleLayout}
262
+ @mousedown=${this._handleMouseDown}
263
+ @mousemove=${this._handleMouseMove}
264
+ @mouseup=${this._handleMouseUp}
265
+ @mouseenter=${this._handleMouseEnter}
266
+ @mouseleave=${this._handleMouseLeave}
267
+ @touchstart=${this._handleTouchStart}
268
+ @touchmove=${this._handleTouchMove}
269
+ @touchend=${this._handleTouchEnd}
270
+ @wheel=${this._handleWheel}
271
+ >
272
+ <div class="snap-track">
273
+ ${i?Array.from({length:l}).map(()=>t`<div class="snap-item"></div>`):``}
274
+ </div>
275
+ <div class="visual-track">
276
+ ${i?u.map((e,n)=>t`
277
+ <div
278
+ class="card"
279
+ data-index="${n}"
280
+ @click=${t=>this._handleCardClick(t,e,n)}
281
+ >
282
+ ${e.href?t`
283
+ <a href="${e.href}" target="${e.target||`_self`}" style="text-decoration:none; color:inherit;" draggable="false">
284
+ <div class="img-parallax-container">
285
+ <img src="${e.img}" alt="${e.title}" draggable="false" loading="lazy" />
286
+ </div>
287
+ <h2 class="card-title">${e.title}</h2>
288
+ </a>
289
+ `:t`
290
+ <div class="img-parallax-container">
291
+ <img src="${e.img}" alt="${e.title}" draggable="false" loading="lazy" />
292
+ </div>
293
+ <h2 class="card-title">${e.title}</h2>
294
+ `}
295
+ </div>
296
+ `):``}
297
+ </div>
298
+ </div>
299
+
300
+ ${this.hideNav?``:t`
301
+ <button
302
+ class="nav-button next ${m?`visible`:``}"
303
+ @click=${this._scrollNext}
304
+ aria-label="Next items"
305
+ >
306
+ <span class="material-symbols">chevron_right</span>
307
+ </button>
308
+ `}
309
+ </div>
310
+ </div>
311
+ `}};s([i({type:Array})],m.prototype,`items`,void 0),s([i({reflect:!0})],m.prototype,`layout`,void 0),s([i({type:Boolean,reflect:!0})],m.prototype,`auto`,void 0),s([i({type:Number,attribute:`large-width`})],m.prototype,`largeWidth`,void 0),s([i({type:Number,attribute:`medium-width`})],m.prototype,`mediumWidth`,void 0),s([i({type:Number,attribute:`small-width`})],m.prototype,`smallWidth`,void 0),s([i({type:Number})],m.prototype,`gap`,void 0),s([i({type:Number})],m.prototype,`padding`,void 0),s([i({type:Number,attribute:`border-radius`})],m.prototype,`borderRadius`,void 0),s([i({type:Boolean,attribute:`show-all`})],m.prototype,`showAll`,void 0),s([i({attribute:`show-all-text`})],m.prototype,`showAllText`,void 0),s([i({attribute:`header-text`})],m.prototype,`headerText`,void 0),s([i({type:Boolean,attribute:`hide-nav`})],m.prototype,`hideNav`,void 0),s([i({type:Boolean,reflect:!0})],m.prototype,`infinite`,void 0),s([i({type:Boolean,reflect:!0})],m.prototype,`autoplay`,void 0),s([i({type:Number,attribute:`autoplay-interval`})],m.prototype,`autoplayInterval`,void 0),s([e()],m.prototype,`_containerWidth`,void 0),s([e()],m.prototype,`_slottedItems`,void 0),s([e()],m.prototype,`_hasSlottedShowAll`,void 0),s([l(`.scroll-container`)],m.prototype,`_scrollContainer`,void 0),s([p(`.card`)],m.prototype,`_cards`,void 0),m=s([o(`moni-carousel`)],m);
@@ -0,0 +1,137 @@
1
+ import{d as e,i as t,m as n,o as r,r as i,s as a,t as o}from"../chunks/decorate-DxX3e27g.js";import{t as s}from"../chunks/query-SWT-tzvq.js";import{t as c}from"../chunks/event-emitter-CGhsijUg.js";import{t as l}from"../chunks/if-defined-CuEAJKpp.js";import{t as u}from"../chunks/live-B7Rjg1kt.js";var d=class extends t{static{this.formAssociated=!0}constructor(){super(),this.label=``,this.checked=!1,this.disabled=!1,this.uncheckedIcon=``,this.checkedIcon=``,this.size=`medium`,this.name=``,this.value=``,this._internals=this.attachInternals()}updated(e){this._input&&(e.has(`checked`)&&(this._input.checked=this.checked,this._internals?.setFormValue?.(this.checked?this.value||`on`:null)),e.has(`disabled`)&&(this._input.disabled=this.disabled))}static{this.styles=[i,n`
2
+ :host {
3
+ --_size: 1.5rem;
4
+ display: inline-flex;
5
+ font-family: var(--font);
6
+ }
7
+ :host([size='small']) { --_size: 1rem; }
8
+ :host([size='large']) { --_size: 2rem; }
9
+ :host([size='extra']) { --_size: 2.5rem; }
10
+
11
+ /* BeerCSS .checkbox */
12
+ label {
13
+ inline-size: auto;
14
+ block-size: auto;
15
+ line-height: normal;
16
+ white-space: nowrap;
17
+ cursor: pointer;
18
+ display: inline-flex;
19
+ align-items: center;
20
+ }
21
+
22
+ /* BeerCSS: input has real size, opacity 0 — occupies real layout space */
23
+ input {
24
+ inline-size: var(--_size);
25
+ block-size: var(--_size);
26
+ opacity: 0;
27
+ cursor: pointer;
28
+ flex: none;
29
+ }
30
+
31
+ /* BeerCSS: span wraps the visible indicator + label text */
32
+ span {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ color: var(--on-surface);
36
+ font-size: 0.875rem;
37
+ position: relative;
38
+ }
39
+
40
+ /* Indicador visual, superpuesto al input nativo. */
41
+ span > i {
42
+ --_size: inherit;
43
+ inline-size: var(--_size);
44
+ block-size: var(--_size);
45
+ box-sizing: border-box;
46
+ margin: 0 auto;
47
+ outline: none;
48
+ color: var(--on-surface-variant);
49
+ position: absolute;
50
+ inset: auto auto auto calc(var(--_size) * -1);
51
+ border-radius: 50%;
52
+ user-select: none;
53
+ z-index: 1;
54
+ font-family: var(--font-icon);
55
+ font-size: var(--_size);
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ }
60
+
61
+ /* Checked: filled checkbox icon */
62
+ input:checked + span > i {
63
+ font-variation-settings: 'FILL' 1;
64
+ color: var(--primary);
65
+ }
66
+
67
+ /* Los iconos personalizados viven dentro de la forma del checkbox. */
68
+ span.custom-icons > i {
69
+ inline-size: calc(var(--_size) * 0.75);
70
+ block-size: calc(var(--_size) * 0.75);
71
+ inset-inline-start: calc(var(--_size) * -0.875);
72
+ border: 0.125rem solid var(--on-surface-variant);
73
+ border-radius: 0.125rem;
74
+ font-size: calc(var(--_size) * 0.55);
75
+ transition: background-color var(--speed1), border-color var(--speed1), color var(--speed1);
76
+ }
77
+
78
+ input:checked + span.custom-icons > i {
79
+ border-color: var(--primary);
80
+ background-color: var(--primary);
81
+ color: var(--on-primary);
82
+ }
83
+
84
+ /* BeerCSS: span::after = ripple/hover ring */
85
+ span::after {
86
+ --_size: inherit;
87
+ content: '';
88
+ inline-size: var(--_size);
89
+ block-size: var(--_size);
90
+ box-sizing: border-box;
91
+ margin: 0 auto;
92
+ position: absolute;
93
+ inset: auto auto auto calc(var(--_size) * -1);
94
+ border-radius: 50%;
95
+ user-select: none;
96
+ transition: all var(--speed1);
97
+ background-color: currentColor;
98
+ box-shadow: 0 0 0 0 currentColor;
99
+ opacity: 0;
100
+ }
101
+
102
+ label:hover > input:not(:disabled) + span::after,
103
+ input:not(:disabled):focus + span::after {
104
+ box-shadow: 0 0 0 0.5rem currentColor;
105
+ opacity: 0.1;
106
+ }
107
+
108
+ /* BeerCSS: span:not(:empty) gets a small inline-start padding for the label */
109
+ span.has-label {
110
+ padding-inline-start: 0.25rem;
111
+ }
112
+
113
+ /* Disabled */
114
+ input:disabled + span {
115
+ opacity: 0.5;
116
+ cursor: not-allowed;
117
+ }
118
+
119
+ /* Focus ring */
120
+ input:focus-visible + span > i {
121
+ outline: 0.125rem solid var(--primary);
122
+ outline-offset: 0.375rem;
123
+ }
124
+ `]}_onChange(e){this.checked=e.target.checked,c(this,`moni-change`,{detail:{value:this.checked,originalEvent:e}})}render(){let t=!!(this.uncheckedIcon||this.checkedIcon),n=t?this.uncheckedIcon:`check_box_outline_blank`,r=t?this.checkedIcon:`check_box`,i=this.checked?r:n;return e`<label part="checkbox">
125
+ <input
126
+ type="checkbox"
127
+ .checked=${u(this.checked)}
128
+ ?disabled=${this.disabled}
129
+ name=${l(this.name||void 0)}
130
+ value=${l(this.value||void 0)}
131
+ @change=${this._onChange}
132
+ />
133
+ <span class=${`${this.label?`has-label `:``}${t?`custom-icons`:``}`}>
134
+ <i aria-hidden="true">${i}</i>
135
+ ${this.label?e`${this.label}`:e`<slot></slot>`}
136
+ </span>
137
+ </label>`}};o([r({reflect:!0})],d.prototype,`label`,void 0),o([r({type:Boolean,reflect:!0})],d.prototype,`checked`,void 0),o([r({type:Boolean,reflect:!0})],d.prototype,`disabled`,void 0),o([r({reflect:!0,attribute:`unchecked-icon`})],d.prototype,`uncheckedIcon`,void 0),o([r({reflect:!0,attribute:`checked-icon`})],d.prototype,`checkedIcon`,void 0),o([r({reflect:!0})],d.prototype,`size`,void 0),o([r({reflect:!0})],d.prototype,`name`,void 0),o([r({reflect:!0})],d.prototype,`value`,void 0),o([s(`input`)],d.prototype,`_input`,void 0),d=o([a(`moni-checkbox`)],d);