lyco 1.2.9 → 1.3.5

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 (78) hide show
  1. package/dist/basic.cjs.js +2 -0
  2. package/dist/basic.cjs.js.map +1 -0
  3. package/dist/basic.es.js +2 -0
  4. package/dist/basic.es.js.map +1 -0
  5. package/dist/core-B-U2ZJO6.mjs +5 -0
  6. package/dist/core-B-U2ZJO6.mjs.map +1 -0
  7. package/dist/core-DkUSnSgK.js +5 -0
  8. package/dist/core-DkUSnSgK.js.map +1 -0
  9. package/dist/index.cjs.js +864 -351
  10. package/dist/index.cjs.js.map +1 -1
  11. package/dist/index.es.js +853 -340
  12. package/dist/index.es.js.map +1 -1
  13. package/dist/types/basic.d.ts +1 -0
  14. package/dist/types/{src/components → components}/AbsoluteBox.d.ts +1 -1
  15. package/dist/types/{src/components → components}/AcrylicBar.d.ts +1 -1
  16. package/dist/types/{src/components → components}/AspectRatio.d.ts +1 -1
  17. package/dist/types/{src/components → components}/AutoFitGrid.d.ts +1 -1
  18. package/dist/types/{src/components → components}/AvatarStack.d.ts +1 -1
  19. package/dist/types/{src/components → components}/Badge.d.ts +1 -1
  20. package/dist/types/components/Basic/mod.d.ts +10551 -0
  21. package/dist/types/{src/components → components}/Canvas.d.ts +1 -1
  22. package/dist/types/{src/components → components}/Card.d.ts +1 -1
  23. package/dist/types/{src/components → components}/Center.d.ts +1 -1
  24. package/dist/types/{src/components → components}/Column.d.ts +3 -1
  25. package/dist/types/{src/components → components}/ColumnSplit.d.ts +1 -1
  26. package/dist/types/components/Combobox.d.ts +23 -0
  27. package/dist/types/{src/components → components}/Container.d.ts +1 -1
  28. package/dist/types/components/Dialog/Dialog.d.ts +40 -0
  29. package/dist/types/components/Dialog/DialogActions.d.ts +10 -0
  30. package/dist/types/components/Dialog/DialogButton.d.ts +13 -0
  31. package/dist/types/components/Dialog/DialogContent.d.ts +10 -0
  32. package/dist/types/components/Dialog/DialogTitle.d.ts +12 -0
  33. package/dist/types/components/Dialog/index.d.ts +5 -0
  34. package/dist/types/{src/components → components}/Divider.d.ts +1 -1
  35. package/dist/types/{src/components → components}/Flex.d.ts +1 -1
  36. package/dist/types/{src/components → components}/FlowItem.d.ts +1 -1
  37. package/dist/types/{src/components → components}/FooterLayout.d.ts +1 -1
  38. package/dist/types/{src/components → components}/Grid.d.ts +1 -1
  39. package/dist/types/{src/components → components}/GridBreakpoint.d.ts +1 -1
  40. package/dist/types/{src/components → components}/GridCol.d.ts +1 -1
  41. package/dist/types/{src/components → components}/GridItem.d.ts +1 -1
  42. package/dist/types/{src/components → components}/GridRow.d.ts +1 -1
  43. package/dist/types/{src/components → components}/HeroSection.d.ts +1 -1
  44. package/dist/types/{src/components → components}/Hidden.d.ts +1 -1
  45. package/dist/types/{src/components → components}/LightboxContainer.d.ts +1 -1
  46. package/dist/types/{src/components → components}/List.d.ts +1 -1
  47. package/dist/types/{src/components → components}/ListGroup.d.ts +1 -1
  48. package/dist/types/{src/components → components}/Overlay.d.ts +1 -1
  49. package/dist/types/{src/components → components}/PositionContainer.d.ts +1 -1
  50. package/dist/types/components/Progress.d.ts +26 -0
  51. package/dist/types/{src/components → components}/Row.d.ts +3 -1
  52. package/dist/types/{src/components → components}/RowSplit.d.ts +1 -1
  53. package/dist/types/{src/components → components}/ScrollBar.d.ts +1 -1
  54. package/dist/types/{src/components → components}/SideBarContainer.d.ts +1 -1
  55. package/dist/types/{src/components → components}/SizedBox.d.ts +1 -1
  56. package/dist/types/components/SkeletonLoader.d.ts +19 -0
  57. package/dist/types/{src/components → components}/Spacer.d.ts +1 -1
  58. package/dist/types/components/Spinner.d.ts +21 -0
  59. package/dist/types/{src/components → components}/Sticky.d.ts +1 -1
  60. package/dist/types/{src/components → components}/Swiper.d.ts +1 -1
  61. package/dist/types/components/SwitchInput.d.ts +12 -0
  62. package/dist/types/{src/components → components}/Table.d.ts +1 -1
  63. package/dist/types/components/Tooltip.d.ts +48 -0
  64. package/dist/types/{src/components → components}/WaterFlow.d.ts +1 -1
  65. package/dist/types/{src/components → components}/Wrap.d.ts +1 -1
  66. package/dist/types/{src/components → components}/ZStack.d.ts +1 -1
  67. package/dist/types/{src/components/index.d.ts → components/mod.d.ts} +9 -0
  68. package/dist/types/{src/components/core.d.ts → core/index.d.ts} +19 -2
  69. package/dist/types/index.d.ts +1 -2
  70. package/dist/types/theme/md3.d.ts +35 -0
  71. package/package.json +22 -2
  72. package/dist/types/src/components/SkeletonLoader.d.ts +0 -10
  73. package/dist/types/src/index.d.ts +0 -1
  74. package/dist/types/stories/virtualizer-example.d.ts +0 -12
  75. package/dist/types/stories/virtualizer-example.stories.d.ts +0 -10
  76. /package/dist/types/{src/components → components}/ForEach.d.ts +0 -0
  77. /package/dist/types/{src/components → components}/Style.d.ts +0 -0
  78. /package/dist/types/{src/components → components}/Virtualizer.labs.d.ts +0 -0
package/dist/index.cjs.js CHANGED
@@ -1,260 +1,286 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=s(require(`lit`)),l=s(require(`lit/directives/ref.js`)),u=Symbol(`___LYCO_NULL___`);function d(e){return e?typeof e==`function`?e():e:c.html``}function f(e,t){let n=t??(e=>e);if(e===void 0)return c.html``;if(Array.isArray(e))return e.map((e,t)=>n(d(e),t,!0,!1));if(typeof e!=`function`)return n(d(e),void 0,!1,!1);let r=e();return Array.isArray(r)?r.map((e,t)=>n(d(e),t,!0,!1)):n(d(r),void 0,!1,!0)}function p(e){let t=Math.random().toString(36).substring(2,15);return e?`lyco-${e}-${t}`:`lyco-${t}`}function m(e,t){let n=t??(e=>e),r=e=>n(d(e));return e?r(e):r}function h(e,t,n){let r=t??(e=>e),i=e=>r(f(e,n));return e?i(e):i}const g=e=>({init:!1,prefix:e,className:u}),_={"GridBreakpoint::grid-breakpoint":g(`grid-breakpoint`),"Hidden::hidden-container":g(`hidden-container`),"ListGroup::list-group":g(`list-group`),"ScrollBar::scrollbar-container":g(`scrollbar-container`),"SkeletonLoader::skeleton-shimmer":g(`skeleton-shimmer`),"Swiper::swiper":g(`swiper`),"Table::table":g(`table`),"WaterFlow::waterflow":g(`waterflow`),"AutoFitGrid::auto-fit-grid":g(`auto-fit-grid`),"GridCol::grid-col":g(`grid-col`),"GridRow::grid-row":g(`grid-row`),"List::list":g(`list`)};function v(e){let t=_[e];return t.init||(_[e].init=!0,_[e].className=p(t.prefix)),_[e].className===u?p(t.prefix):_[e].className}const y={all:{value:0}};function b(e){var t;return(t=y[e])?.value||(y[e]={value:0}),y[e].value}function x(e,t){return y.all={value:y.all.value+1},y[e]===void 0?y[e]={value:0}:y[e].value=y[e].value+1,c.html`
2
- <!-- ${e} - ${y[e].value} -->
3
- ${t}
4
- `}function S(e,t,n){t.forEach(([t,r])=>{n.has(t)&&e.removeEventListener(t,n.get(t));let i,a;typeof r==`function`?(i=r,a=void 0):(i=r.handler,a=r.options);let o=e=>i(e);e.addEventListener(t,o,a),n.set(t,o)})}function C(e){let t=new Map,n=Object.entries(e);return{bind(e){S(e,n,t)},unbindAll(){t.clear()}}}function w(e,t){if(t===void 0){let t=t=>w(e,t??c.html``);return t.html=(t,...n)=>w(e,(0,c.html)(t,...n)),t}let n=e?.fadeBg??`rgba(0,0,0,0.7)`,r=e?.zIndex??2e3,i=C(e?.on??{});return c.html`
1
+ const e=require(`./core-DkUSnSgK.js`),t=e.__toESM(require(`lit`)),n=e.__toESM(require(`lit/directives/ref.js`)),r=e.__toESM(require(`lit/directives/style-map.js`)),i=typeof window>`u`,a=100;var o=class{constructor(e){this._capacity=e,this.buffer=Array(e)}set(e,t){this.buffer[e%this._capacity]=t}get(e){return this.buffer[e%this._capacity]}clear(){this.buffer.fill(void 0)}get capacity(){return this._capacity}},s=class{constructor(){this.data=new Float64Array}set(e,t){let n=e*3;this.data[n]=t.start,this.data[n+1]=t.end,this.data[n+2]=t.total}get(e){let t=e*3;return t<0||t+2>=this.data.length?{start:0,end:0,total:0}:{start:this.data[t],end:this.data[t+1],total:this.data[t+2]}}initialize(e){this.data=new Float64Array(Math.ceil(e/a)*3),this.data.fill(0)}},c=class{constructor(e,r,c){this._items=[],this._itemSize=50,this._layout=`vertical`,this._preloadCount=5,this._cacheSize=200,this._renderItem=()=>t.html``,this._containerRef=(0,n.createRef)(),this._firstVisible=0,this._lastVisible=0,this._positionCache=new Float64Array,this._sizeCache=new Float32Array,this._cacheInitialized=!1,this._totalContentSize=0,this._blockStore=new s,this._recycledNodes=[],this.RECYCLE_POOL_SIZE=20,this._preRenderChunkSize=5,this.CHUNK_SIZE=1e3,this._chunks=new Map,this._visibleChunkIndexes=new Set,this._loadedChunks=new Set,this._estimatedItemHeight=0,this._isLoading=!1,this._hasMore=!1,this._pageSize=50,this._fetchMoreThreshold=.8,this._getItemSize=e=>typeof this._itemSize==`function`?this._itemSize(e):this._itemSize,this._calculateMetrics=()=>{if(this._items.length===0){this._positionCache=new Float64Array,this._sizeCache=new Float32Array,this._blockStore.initialize(0),this._totalContentSize=0,this._cacheInitialized=!0,this._templateBuffer.clear();return}this._positionCache=new Float64Array(this._items.length),this._sizeCache=new Float32Array(this._items.length),this._blockStore.initialize(this._items.length);let e=0,t=0,n=0;for(let r=0;r<this._items.length;r++){let i=this._getItemSize(r);if(this._positionCache[r]=e,this._sizeCache[r]=i,n+=i,(r+1)%a===0||r===this._items.length-1){let o=Math.floor(r/a);this._blockStore.set(o,{start:t,end:e+i,total:n}),t=e+i,n=0}e+=i}this._totalContentSize=e,this._cacheInitialized=!0,this._templateBuffer.clear()},this._findItemIndexByOffset=e=>{if(!this._cacheInitialized||this._items.length===0)return 0;let t=0,n=this._items.length-1,r=0;for(;t<=n;){let i=Math.floor((t+n)/2);this._positionCache[i]<=e?(r=i,t=i+1):n=i-1}return r},this._updateVisibleRange=()=>{if(!this._containerRef.value)return;let e=this._layout===`vertical`,t=e?this._containerRef.value.scrollTop:this._containerRef.value.scrollLeft,n=e?this._containerRef.value.clientHeight:this._containerRef.value.clientWidth;this._firstVisible=Math.floor(t/this._estimatedItemHeight),this._lastVisible=Math.ceil((t+n)/this._estimatedItemHeight),this._checkAndLoadMore(),this.host.requestUpdate()},this._ticking=!1,this._lastUpdate=0,this.FRAME_BUDGET=16,this._scheduleUpdate=async()=>{if(this._ticking)return;let e=performance.now(),t=e-this._lastUpdate;t>=this.FRAME_BUDGET&&(this._ticking=!0,requestAnimationFrame(()=>{this._updateVisibleRange(),this._ticking=!1,this._lastUpdate=performance.now()}))},this.host=e,e.addController(this),this.updateConfig(r,c),this._templateBuffer=new o(this._cacheSize),this._pageSize=r.pageSize??50,this._fetchMoreThreshold=r.fetchMoreThreshold??.8,i||(this._setupObservers(),this._setupResizeObserver(),this._initializeChunks())}_initializeItems(e){this._items=[...e],this._calculateMetrics(),this._initializeChunks(),this.host.requestUpdate()}_updateMetricsForRange(e,t){if(t>this._positionCache.length){let e=new Float64Array(Math.max(t*1.5,1e3));e.set(this._positionCache),this._positionCache=e;let n=new Float32Array(Math.max(t*1.5,1e3));n.set(this._sizeCache),this._sizeCache=n}let n=e===0?0:this._positionCache[e-1]+this._sizeCache[e-1];for(let r=e;r<t;r++){let e=this._getItemSize(r);this._positionCache[r]=n,this._sizeCache[r]=e,n+=e}this._totalContentSize=n,this._updateChunkMetrics()}_setupObservers(){this._intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&this._preRenderChunk()})},{rootMargin:`50%`}),this._mutationObserver=new MutationObserver(e=>{e.forEach(e=>{e.removedNodes.forEach(e=>{e instanceof HTMLElement&&this._recycledNodes.length<this.RECYCLE_POOL_SIZE&&this._recycledNodes.push(e)})})})}_setupResizeObserver(){this._resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target instanceof HTMLElement){let e=t.contentRect.height;e>0&&(this._estimatedItemHeight=e,this._updateChunkMetrics())}})}_initializeChunks(){this._chunks.clear();let e=Math.ceil(this._items.length/this.CHUNK_SIZE);for(let t=0;t<e;t++){let e=t*this.CHUNK_SIZE,n=Math.min(e+this.CHUNK_SIZE,this._items.length);this._chunks.set(t,this._items.slice(e,n))}}_updateChunkMetrics(){if(!this._containerRef.value)return;let e=this._containerRef.value.clientHeight,t=this._items.length*this._estimatedItemHeight;this._blockStore.initialize(Math.ceil(this._items.length/this.CHUNK_SIZE));let n=0;for(let e=0;e<this._chunks.size;e++){let t=Math.min(this.CHUNK_SIZE,this._items.length-e*this.CHUNK_SIZE),r=t*this._estimatedItemHeight;this._blockStore.set(e,{start:n,end:n+r,total:r}),n+=r}this._totalContentSize=t,this._calculateVisibleChunks()}_calculateVisibleChunks(){if(!this._containerRef.value)return;let e=this._containerRef.value.scrollTop,t=this._containerRef.value.clientHeight,n=Math.floor(e/(this.CHUNK_SIZE*this._estimatedItemHeight)),r=Math.ceil((e+t)/(this.CHUNK_SIZE*this._estimatedItemHeight));this._visibleChunkIndexes.clear();for(let e=n;e<=r;e++)this._chunks.has(e)&&this._visibleChunkIndexes.add(e);this._preloadAdjacentChunks(n-1,r+1)}_preloadAdjacentChunks(e,t){for(let n=e;n<=t;n++)n>=0&&n<this._chunks.size&&!this._loadedChunks.has(n)&&requestIdleCallback(()=>{this._loadChunk(n)})}_loadChunk(e){if(this._loadedChunks.has(e))return;let t=e*this.CHUNK_SIZE,n=Math.min(t+this.CHUNK_SIZE,this._items.length),r=this._items.slice(t,n);this._chunks.set(e,r),this._loadedChunks.add(e),this._calculateMetricsForChunk(e)}_calculateMetricsForChunk(e){let t=e*this.CHUNK_SIZE,n=this._chunks.get(e)||[],r=t*this._estimatedItemHeight;for(let e=0;e<n.length;e++){let n=t+e;this._positionCache[n]=r,this._sizeCache[n]=this._estimatedItemHeight,r+=this._estimatedItemHeight}}_preRenderChunk(){this._idleCallbackId&&cancelIdleCallback(this._idleCallbackId),this._idleCallbackId=requestIdleCallback(e=>{let t=this._lastVisible+1,n=0;for(;e.timeRemaining()>0&&n<this._preRenderChunkSize&&t<this._items.length;)this._prerenderItem(t),t++,n++;t<this._items.length&&this._preRenderChunk()})}_prerenderItem(e){let t=e%this._cacheSize;if(!this._templateBuffer.get(t)){let n=this._positionCache[e],r=this._sizeCache[e];if(n!==void 0&&r!==void 0){let i=this._getItemStyle(n,r),a=this._createItemTemplate(this._items[e],e,i);this._templateBuffer.set(t,a)}}}_getItemStyle(e,t){let n=this._layout===`vertical`;return{position:`absolute`,[n?`top`:`left`]:`${e}px`,[n?`height`:`width`]:`${t}px`,width:n?`100%`:`auto`,height:n?`auto`:`100%`,willChange:`transform`,contain:`content`,backfaceVisibility:`hidden`,WebkitFontSmoothing:`subpixel-antialiased`}}_createItemTemplate(e,n,i){let a=this._recycledNodes.pop(),o=`item-${n}`;return t.html`
2
+ ${a?t.html`<div
3
+ .key=${o}
4
+ style=${(0,r.styleMap)(i)}
5
+ data-index=${n}
6
+ .recycled=${a}
7
+ >
8
+ ${this._renderItem(e,n)}
9
+ </div>`:t.html`<div .key=${o} style=${(0,r.styleMap)(i)} data-index=${n}>
10
+ ${this._renderItem(e,n)}
11
+ </div>`}
12
+ `}hostConnected(){if(i||this.host.updateComplete.then(()=>{this._containerRef.value&&(this._containerRef.value.addEventListener(`scroll`,this._scheduleUpdate),this._calculateMetrics(),this._updateVisibleRange(),this.host.requestUpdate())}),!i&&this._containerRef.value){var e,t,n;(e=this._intersectionObserver)?.observe(this._containerRef.value),(t=this._mutationObserver)?.observe(this._containerRef.value,{childList:!0,subtree:!0,attributes:!0}),(n=this._resizeObserver)?.observe(this._containerRef.value)}}hostDisconnected(){var e,t,n;!i&&this._containerRef.value&&this._containerRef.value.removeEventListener(`scroll`,this._scheduleUpdate),(e=this._intersectionObserver)?.disconnect(),(t=this._mutationObserver)?.disconnect(),(n=this._resizeObserver)?.disconnect(),this._idleCallbackId&&cancelIdleCallback(this._idleCallbackId)}hostUpdated(){!i&&!this._cacheInitialized&&this._containerRef.value&&this._items.length>0&&(this._calculateMetrics(),this._updateVisibleRange(),this.host.requestUpdate())}async updateConfig(e,t){let n=this._itemSize,r=this._cacheSize;this._itemSize=e.itemSize??50,this._layout=e.layout??`vertical`,this._preloadCount=e.preloadCount??5,this._cacheSize=e.cacheSize??200,this._renderItem=t,this._onLoadMore=e.onLoadMore,`items`in e&&this._initializeItems(e.items),this._pageSize=e.pageSize??this._pageSize,this._fetchMoreThreshold=e.fetchMoreThreshold??this._fetchMoreThreshold,r!==this._cacheSize&&(this._templateBuffer=new o(this._cacheSize)),n!==this._itemSize&&(this._calculateMetrics(),this._initializeChunks()),i||this._updateVisibleRange(),this.host.requestUpdate()}async _checkAndLoadMore(){if(!this._onLoadMore||this._isLoading||!this._containerRef.value)return;let e=this._lastVisible,t=this._pageSize||1e3,n=(e+1)%t===0;if(n){console.log(`Reached end of page, loading more...`,{lastVisibleIndex:e,pageSize:t,totalItems:this._items.length}),this._isLoading=!0;try{await this._onLoadMore()}finally{this._isLoading=!1}}}getRenderedItems(){if(!this._renderItem)return[];let e=[],t=new Set;for(let e of this._visibleChunkIndexes){let n=this._chunks.get(e);if(!n)continue;let r=e*this.CHUNK_SIZE;n.forEach((e,n)=>{let i=r+n;i>=this._firstVisible&&i<=this._lastVisible&&t.add(i)})}return Array.from(t).sort((e,t)=>e-t).forEach(t=>{let n=this._getItemStyle(this._positionCache[t]||t*this._estimatedItemHeight,this._sizeCache[t]||this._estimatedItemHeight);e.push(this._createItemTemplate(this._items[t],t,n))}),e}getContainerRef(){return this._containerRef}getTotalContentSize(){return this._totalContentSize}getLayout(){return this._layout}};const l=new WeakMap,u=()=>{if(i)return null;try{let e=document.currentScript;if(e&&`_$litElement$`in e)return e._$litElement$;if(customElements&&window.customElements){let e=document.querySelector(`virtualizer-example`);if(e&&`_$litElement$`in e)return e._$litElement$}}catch(e){console.warn(`Failed to get Lit host:`,e)}return null};function d(e){return e!==null&&typeof e.addController==`function`}function f(e,a){let o=u();if(!d(o)){console.warn(`Virtualizer: Running in fallback mode`);let n=a||e.renderItem||(e=>t.html`${String(e)}`),r=e.items;return t.html`
13
+ <div style="overflow: auto; height: 100%; position: relative;">
14
+ <div style="position: relative;">
15
+ ${r.map((e,t)=>n(e,t))}
16
+ </div>
17
+ </div>
18
+ `}let s=l.get(o);if(!s){let n=a||e.renderItem||(e=>t.html`${e}`);s=new c(o,e,n),l.set(o,s)}let f=a=>{s.updateConfig(e,a);let o={position:`relative`,overflow:i?`visible`:`auto`,[s.getLayout()===`vertical`?`height`:`width`]:`100%`,[s.getLayout()===`vertical`?`minHeight`:`minWidth`]:`1px`},c={position:`relative`,[s.getLayout()===`vertical`?`height`:`width`]:`${s.getTotalContentSize()}px`,transform:s.getLayout()===`vertical`?`translateY(0)`:`translateX(0)`};return t.html`
19
+ <div
20
+ ${(0,n.ref)(s.getContainerRef())}
21
+ style=${(0,r.styleMap)(o)}
22
+ @scroll=${i?t.nothing:()=>s.host.requestUpdate()}
23
+ >
24
+ <div style=${(0,r.styleMap)(c)}>
25
+ ${s.getRenderedItems()}
26
+ </div>
27
+ </div>
28
+ `};return a===void 0?`renderItem`in e?f(e.renderItem):e=>f(e):f(a)}function p(r,i){if(i===void 0){let e=e=>p(r,e??t.html``);return e.html=(e,...n)=>p(r,(0,t.html)(e,...n)),e}let a=r?.fadeBg??`rgba(0,0,0,0.7)`,o=r?.zIndex??2e3,s=e.createEventBinder(r?.on??{});return t.html`
5
29
  <div
6
- ${(0,l.ref)(e=>{e?i.bind(e):i.unbindAll()})}
30
+ ${(0,n.ref)(e=>{e?s.bind(e):s.unbindAll()})}
7
31
  style="
8
32
  position: fixed;
9
33
  top: 0; left: 0; right: 0; bottom: 0;
10
- background: ${n};
11
- z-index: ${r};
34
+ background: ${a};
35
+ z-index: ${o};
12
36
  display: flex;
13
37
  justify-content: center;
14
38
  align-items: center;
15
39
  "
16
40
  >
17
- ${d(t)}
41
+ ${e.renderFn(i)}
18
42
  </div>
19
- `}function T(e,t){let n=C(e?.on??{});return t===void 0?t=>T(e,t??[c.html``]):c.html`
43
+ `}function m(r,i){let a=e.createEventBinder(r?.on??{});return i===void 0?e=>m(r,e??[t.html``]):t.html`
20
44
  <div
21
- ${(0,l.ref)(e=>{e?n.bind(e):n.unbindAll()})}
22
- .class="${e?.className}"
45
+ ${(0,n.ref)(e=>{e?a.bind(e):a.unbindAll()})}
46
+ .class="${r?.className}"
23
47
  style="
24
48
  display: flex;
25
49
  flex-direction: column;
26
- ${e?.space?`gap: ${e.space};`:``}
27
- ${e?.style??``}
50
+ ${r?.center?`align-items: center;`:``}
51
+ ${r?.space?`gap: ${r.space};`:``}
52
+ ${r?.style??``}
28
53
  "
29
54
  >
30
- ${f(t)}
55
+ ${e.renderFnOrArray(i)}
31
56
  </div>
32
- `}function E(e,t){if(t===void 0){let t=t=>E(e,t??c.html``);return t.html=(t,...n)=>E(e,(0,c.html)(t,...n)),t}let n=e?.direction??`row`,r=C(e?.on??{});return c.html`
57
+ `}function h(r,i){if(i===void 0){let e=e=>h(r,e??t.html``);return e.html=(e,...n)=>h(r,(0,t.html)(e,...n)),e}let a=r?.direction??`row`,o=e.createEventBinder(r?.on??{});return t.html`
33
58
  <div
34
- ${(0,l.ref)(e=>{e?r.bind(e):r.unbindAll()})}
59
+ ${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
35
60
  style="
36
61
  display: flex;
37
- flex-direction: ${n};
38
- ${e?.justify?`justify-content: ${e.justify};`:``}
39
- ${e?.align?`align-items: ${e.align};`:``}
40
- ${e?.gap?`gap: ${e.gap};`:``}
62
+ flex-direction: ${a};
63
+ ${r?.justify?`justify-content: ${r.justify};`:``}
64
+ ${r?.align?`align-items: ${r.align};`:``}
65
+ ${r?.gap?`gap: ${r.gap};`:``}
41
66
  "
42
67
  >
43
- ${d(t)}
68
+ ${e.renderFn(i)}
44
69
  </div>
45
- `}function D(e,t){if(t===void 0){let t=t=>D(e,t??c.html``);return t.html=(t,...n)=>D(e,(0,c.html)(t,...n)),t}let n=C(e?.on??{});return c.html`
70
+ `}function g(r,i){if(i===void 0){let e=e=>g(r,e??t.html``);return e.html=(e,...n)=>g(r,(0,t.html)(e,...n)),e}let a=e.createEventBinder(r?.on??{});return t.html`
46
71
  <div
47
- ${(0,l.ref)(e=>{e?n.bind(e):n.unbindAll()})}
72
+ ${(0,n.ref)(e=>{e?a.bind(e):a.unbindAll()})}
48
73
  style="break-inside: avoid; margin-bottom: 16px;"
49
74
  >
50
- ${d(t)}
75
+ ${e.renderFn(i)}
51
76
  </div>
52
- `}function O(e,t){if(t===void 0)return t=>O(e,t??[c.html``]);let n=e?.columns??1,r=C(e?.on??{});return c.html`
77
+ `}function _(r,i){if(i===void 0)return e=>_(r,e??[t.html``]);let a=r?.columns??1,o=e.createEventBinder(r?.on??{});return t.html`
53
78
  <div
54
- ${(0,l.ref)(e=>{e?r.bind(e):r.unbindAll()})}
79
+ ${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
55
80
  style="
56
81
  display: grid;
57
- grid-template-columns: repeat(${n}, 1fr);
58
- ${e?.gap?`gap: ${e.gap};`:``}
82
+ grid-template-columns: repeat(${a}, 1fr);
83
+ ${r?.gap?`gap: ${r.gap};`:``}
59
84
  "
60
85
  >
61
- ${f(t)}
86
+ ${e.renderFnOrArray(i)}
62
87
  </div>
63
- `}function k(e,t){if(t===void 0){let t=t=>k(e,t??c.html``);return t.html=(t,...n)=>k(e,(0,c.html)(t,...n)),t}let n=b(`GridCol`),r=v(`GridCol::grid-col`)+`-lyco-now-`+n,i=e?.gap?`column-gap: ${e.gap};`:``,a=`
64
- .${r} {
88
+ `}function v(r,i){if(i===void 0){let e=e=>v(r,e??t.html``);return e.html=(e,...n)=>v(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`GridCol`),o=e.getRandomClassName(`GridCol::grid-col`)+`-lyco-now-`+a,s=r?.gap?`column-gap: ${r.gap};`:``,c=`
89
+ .${o} {
65
90
  display: grid;
66
91
  grid-auto-flow: column;
67
- ${i}
92
+ ${s}
68
93
  }
69
- `,o=C(e?.on??{});return x(`GridCol`,c.html`
94
+ `,l=e.createEventBinder(r?.on??{});return e.LycoComponent(`GridCol`,t.html`
70
95
  <style>
71
- ${a}
96
+ ${c}
72
97
  </style>
73
98
  <div
74
- ${(0,l.ref)(e=>{e?o.bind(e):o.unbindAll()})}
75
- class="${r}"
99
+ ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
100
+ class="${o}"
76
101
  >
77
- ${d(t)}
102
+ ${e.renderFn(i)}
78
103
  </div>
79
- `)}function A(e,t){if(t===void 0){let t=t=>A(e,t??c.html``);return t.html=(t,...n)=>A(e,(0,c.html)(t,...n)),t}let n=C(e?.on??{});return c.html`
104
+ `)}function y(r,i){if(i===void 0){let e=e=>y(r,e??t.html``);return e.html=(e,...n)=>y(r,(0,t.html)(e,...n)),e}let a=e.createEventBinder(r?.on??{});return t.html`
80
105
  <div
81
- ${(0,l.ref)(e=>{e?n.bind(e):n.unbindAll()})}
82
- style="${e?.span?`grid-column: span ${e.span};`:``}"
106
+ ${(0,n.ref)(e=>{e?a.bind(e):a.unbindAll()})}
107
+ style="${r?.span?`grid-column: span ${r.span};`:``}"
83
108
  >
84
- ${d(t)}
109
+ ${e.renderFn(i)}
85
110
  </div>
86
- `}function j(e,t){if(t===void 0){let t=t=>j(e,t??c.html``);return t.html=(t,...n)=>j(e,(0,c.html)(t,...n)),t}let n=b(`GridRow`),r=v(`GridRow::grid-row`)+`-lyco-now-`+n,i=e?.gap?`row-gap: ${e.gap};`:``,a=`
87
- .${r} {
111
+ `}function b(r,i){if(i===void 0){let e=e=>b(r,e??t.html``);return e.html=(e,...n)=>b(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`GridRow`),o=e.getRandomClassName(`GridRow::grid-row`)+`-lyco-now-`+a,s=r?.gap?`row-gap: ${r.gap};`:``,c=`
112
+ .${o} {
88
113
  display: grid;
89
114
  grid-auto-flow: row;
90
- ${i}
115
+ ${s}
91
116
  }
92
- `,o=C(e?.on??{});return x(`GridRow`,c.html`
117
+ `,l=e.createEventBinder(r?.on??{});return e.LycoComponent(`GridRow`,t.html`
93
118
  <style>
94
- ${a}
119
+ ${c}
95
120
  </style>
96
121
  <div
97
- ${(0,l.ref)(e=>{e?o.bind(e):o.unbindAll()})}
98
- class="${r}"
122
+ ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
123
+ class="${o}"
99
124
  >
100
- ${d(t)}
125
+ ${e.renderFn(i)}
101
126
  </div>
102
- `)}function M(e,t){if(t===void 0)return t=>M(e,t??[c.html``]);let n=C(e?.on??{});return c.html`
127
+ `)}function x(r,i){if(i===void 0)return e=>x(r,e??[t.html``]);let a=e.createEventBinder(r?.on??{});return t.html`
103
128
  <div
104
- ${(0,l.ref)(e=>{e?n.bind(e):n.unbindAll()})}
129
+ ${(0,n.ref)(e=>{e?a.bind(e):a.unbindAll()})}
105
130
  style="
106
131
  display: flex;
107
132
  flex-direction: row;
108
- ${e?.space?`gap: ${e.space};`:``}
133
+ ${r?.center?`align-items: center;`:``}
134
+ ${r?.space?`gap: ${r.space};`:``}
109
135
  "
110
136
  >
111
- ${f(t)}
137
+ ${e.renderFnOrArray(i)}
112
138
  </div>
113
- `}function N(e,t){if(t===void 0){let t=t=>N(e,t??c.html``);return t.html=(t,...n)=>N(e,(0,c.html)(t,...n)),t}let n=e?.columnCount??3,r=e?.gap??`16px`,i=b(`WaterFlow`),a=v(`WaterFlow::waterflow`)+`-lyco-now-${i}`,o=`
139
+ `}function S(r,i){if(i===void 0){let e=e=>S(r,e??t.html``);return e.html=(e,...n)=>S(r,(0,t.html)(e,...n)),e}let a=r?.columnCount??3,o=r?.gap??`16px`,s=e.getComponentCount(`WaterFlow`),c=e.getRandomClassName(`WaterFlow::waterflow`)+`-lyco-now-${s}`,l=`
114
140
  /* 使用 CSS 类来控制多列布局 */
115
- .${a} {
116
- column-count: ${n};
117
- column-gap: ${typeof r==`number`?`${r}px`:r};
141
+ .${c} {
142
+ column-count: ${a};
143
+ column-gap: ${typeof o==`number`?`${o}px`:o};
118
144
  }
119
145
  /* 子元素如果是块级元素,需要让它们适应多列流式布局 */
120
- .${a} > * {
146
+ .${c} > * {
121
147
  display: inline-block;
122
148
  width: 100%;
123
149
  }
124
- `,s=C(e?.on??{});return x(`WaterFlow`,c.html`
150
+ `,u=e.createEventBinder(r?.on??{});return e.LycoComponent(`WaterFlow`,t.html`
125
151
  <style>
126
- ${o}
152
+ ${l}
127
153
  </style>
128
154
 
129
155
  <div
130
- ${(0,l.ref)(e=>{e?s.bind(e):s.unbindAll()})}
131
- class="${a}"
156
+ ${(0,n.ref)(e=>{e?u.bind(e):u.unbindAll()})}
157
+ class="${c}"
132
158
  >
133
- ${d(t)}
159
+ ${e.renderFn(i)}
134
160
  </div>
135
- `)}function P(e,t){if(t===void 0){let t=t=>P(e,t??c.html``);return t.html=(t,...n)=>P(e,(0,c.html)(t,...n)),t}let n=e?.gap??`0px`,r=e?.firstHeight??`50%`,i=c.html``,a=c.html``;if(typeof t==`function`){var o;let e=(o=t.call)?.call(t,null)??[];i=e[0]??c.html``,a=e[1]??c.html``}else i=d(t);let s=C(e?.on??{});return c.html`
161
+ `)}function C(r,i){if(i===void 0){let e=e=>C(r,e??t.html``);return e.html=(e,...n)=>C(r,(0,t.html)(e,...n)),e}let a=r?.gap??`0px`,o=r?.firstHeight??`50%`,s=t.html``,c=t.html``;if(typeof i==`function`){var l;let e=(l=i.call)?.call(i,null)??[];s=e[0]??t.html``,c=e[1]??t.html``}else s=e.renderFn(i);let u=e.createEventBinder(r?.on??{});return t.html`
136
162
  <div
137
- ${(0,l.ref)(e=>{e?s.bind(e):s.unbindAll()})}
163
+ ${(0,n.ref)(e=>{e?u.bind(e):u.unbindAll()})}
138
164
  style="
139
165
  display: flex;
140
166
  flex-direction: column;
141
167
  width: 100%;
142
168
  height: 100%;
143
- gap: ${n};
169
+ gap: ${a};
144
170
  "
145
171
  >
146
- <div style="flex: 0 0 ${r}; overflow: auto;">${i}</div>
147
- <div style="flex: 1 1 auto; overflow: auto;">${a}</div>
172
+ <div style="flex: 0 0 ${o}; overflow: auto;">${s}</div>
173
+ <div style="flex: 1 1 auto; overflow: auto;">${c}</div>
148
174
  </div>
149
- `}function F(e,t){if(t===void 0){let t=t=>F(e,t??c.html``);return t.html=(t,...n)=>F(e,(0,c.html)(t,...n)),t}let n=e?.gap??`0px`,r=e?.firstWidth??`50%`,i=c.html``,a=c.html``;if(typeof t==`function`){var o;let e=(o=t.call)?.call(t,null)??[];i=e[0]??c.html``,a=e[1]??c.html``}else i=d(t);let s=C(e?.on??{});return c.html`
175
+ `}function w(r,i){if(i===void 0){let e=e=>w(r,e??t.html``);return e.html=(e,...n)=>w(r,(0,t.html)(e,...n)),e}let a=r?.gap??`0px`,o=r?.firstWidth??`50%`,s=t.html``,c=t.html``;if(typeof i==`function`){var l;let e=(l=i.call)?.call(i,null)??[];s=e[0]??t.html``,c=e[1]??t.html``}else s=e.renderFn(i);let u=e.createEventBinder(r?.on??{});return t.html`
150
176
  <div
151
- ${(0,l.ref)(e=>{e?s.bind(e):s.unbindAll()})}
177
+ ${(0,n.ref)(e=>{e?u.bind(e):u.unbindAll()})}
152
178
  style="
153
179
  display: flex;
154
180
  flex-direction: row;
155
181
  width: 100%;
156
182
  height: 100%;
157
- gap: ${n};
183
+ gap: ${a};
158
184
  "
159
185
  >
160
- <div style="flex: 0 0 ${r}; overflow: auto;">${i}</div>
161
- <div style="flex: 1 1 auto; overflow: auto;">${a}</div>
186
+ <div style="flex: 0 0 ${o}; overflow: auto;">${s}</div>
187
+ <div style="flex: 1 1 auto; overflow: auto;">${c}</div>
162
188
  </div>
163
- `}function I(e,t){if(t===void 0){let t=t=>I(e,t??c.html``);return t.html=(t,...n)=>I(e,(0,c.html)(t,...n)),t}let n=e?.direction??`vertical`,r=e?.height??`100%`,i=e?.width??`100%`,a=e?.customCss??``,o=b(`ScrollBar`),s=e?.className??v(`ScrollBar::scrollbar-container`)+`-lyco-now-`+o,u=n===`horizontal`?`overflow-x: auto; overflow-y: hidden`:`overflow-y: auto; overflow-x: hidden`,f=`
164
- .${s} {
165
- ${u};
166
- width: ${i};
167
- height: ${r};
189
+ `}function T(r,i){if(i===void 0){let e=e=>T(r,e??t.html``);return e.html=(e,...n)=>T(r,(0,t.html)(e,...n)),e}let a=r?.direction??`vertical`,o=r?.height??`100%`,s=r?.width??`100%`,c=r?.customCss??``,l=e.getComponentCount(`ScrollBar`),u=r?.className??e.getRandomClassName(`ScrollBar::scrollbar-container`)+`-lyco-now-`+l,d=a===`horizontal`?`overflow-x: auto; overflow-y: hidden`:`overflow-y: auto; overflow-x: hidden`,f=`
190
+ .${u} {
191
+ ${d};
192
+ width: ${s};
193
+ height: ${o};
168
194
  }
169
- .${s}::-webkit-scrollbar {
195
+ .${u}::-webkit-scrollbar {
170
196
  width: 8px;
171
197
  height: 8px;
172
198
  }
173
- .${s}::-webkit-scrollbar-thumb {
199
+ .${u}::-webkit-scrollbar-thumb {
174
200
  background-color: rgba(0, 0, 0, 0.2);
175
201
  border-radius: 4px;
176
202
  }
177
- .${s}::-webkit-scrollbar-track {
203
+ .${u}::-webkit-scrollbar-track {
178
204
  background: rgba(0, 0, 0, 0.05);
179
205
  }
180
- ${a}
181
- `,p=C(e?.on??{});return x(`ScrollBar`,c.html`
206
+ ${c}
207
+ `,p=e.createEventBinder(r?.on??{});return e.LycoComponent(`ScrollBar`,t.html`
182
208
  <style>
183
209
  ${f}
184
210
  </style>
185
211
  <div
186
- ${(0,l.ref)(e=>{e?p.bind(e):p.unbindAll()})}
187
- class="${s}"
212
+ ${(0,n.ref)(e=>{e?p.bind(e):p.unbindAll()})}
213
+ class="${u}"
188
214
  >
189
- ${d(t)}
215
+ ${e.renderFn(i)}
190
216
  </div>
191
- `)}function L(e,t){if(t===void 0)return t=>L(e,t??[c.html``]);let n=e?.sidebarWidth??`240px`,r=e?.sidebarPosition??`left`,i=e?.gap??`0px`,a=c.html``,o=c.html``;if(typeof t==`function`){var s;let e=(s=t.call)?.call(t,null)??[];a=e[0]??c.html``,o=e[1]??c.html``}else o=f(t);let u=C(e?.on??{});return c.html`
217
+ `)}function E(r,i){if(i===void 0)return e=>E(r,e??[t.html``]);let a=r?.sidebarWidth??`240px`,o=r?.sidebarPosition??`left`,s=r?.gap??`0px`,c=t.html``,l=t.html``;if(typeof i==`function`){var u;let e=(u=i.call)?.call(i,null)??[];c=e[0]??t.html``,l=e[1]??t.html``}else l=e.renderFnOrArray(i);let d=e.createEventBinder(r?.on??{});return t.html`
192
218
  <div
193
- ${(0,l.ref)(e=>{e?u.bind(e):u.unbindAll()})}
219
+ ${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
194
220
  style="
195
221
  display: flex;
196
- flex-direction: ${r===`left`?`row`:`row-reverse`};
222
+ flex-direction: ${o===`left`?`row`:`row-reverse`};
197
223
  width: 100%;
198
224
  height: 100%;
199
- gap: ${i};
225
+ gap: ${s};
200
226
  "
201
227
  >
202
- <div style="flex: 0 0 ${n}; overflow: auto;">${a}</div>
203
- <div style="flex: 1 1 auto; overflow: auto;">${o}</div>
228
+ <div style="flex: 0 0 ${a}; overflow: auto;">${c}</div>
229
+ <div style="flex: 1 1 auto; overflow: auto;">${l}</div>
204
230
  </div>
205
- `}function ee(e={},t){if(t===void 0)return t=>ee(e,t??[c.html``]);let n=b(`Swiper`),{gap:r=`8px`,snapType:i=`mandatory`,height:a=`auto`,width:o=`100%`,className:s=v(`Swiper::swiper`)+`-lyco-now-${n}`,direction:u=`x`,scrollBehavior:d=`smooth`,align:f=`start`,showNavigation:p=!0,navigationPosition:m=`inside`,showPagination:h=!0,paginationType:g=`dots`,autoPlay:_=!1,interval:y=3e3,loop:S=!1,touchEnabled:w=!0,mouseWheel:T=!1,onSlideChange:E,on:D}=e,O=s,k=O+`-container`,A=O+`-slide`,j=O+`-navigation`,M=O+`-pagination`,N;N=t?typeof t==`function`?t():t:[];let P=N.length,[F,I]=(()=>{let e={value:0};return[()=>e.value,t=>{let n=Math.max(0,Math.min(t,P-1));e.value!==n&&(e.value=n,E?.(n))}]})(),L=e=>{let t=typeof document<`u`?document.querySelector(`.${k}`):null;if(!t)return;let n=t.querySelectorAll(`.${A}`);if(e<0||e>=n.length)return;let r=n[e],i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),o;u===`x`?(o=r.offsetLeft-t.offsetLeft,f===`center`?o-=(a.width-i.width)/2:f===`end`&&(o-=a.width-i.width),t.scrollTo({left:o,behavior:d})):(o=r.offsetTop-t.offsetTop,f===`center`?o-=(a.height-i.height)/2:f===`end`&&(o-=a.height-i.height),t.scrollTo({top:o,behavior:d})),I(e)},R=()=>{let e=F()+1>=P?S?0:F():F()+1;L(e)},z=()=>{let e=F()-1<0?S?P-1:F():F()-1;L(e)},B=()=>{let e=typeof document<`u`?document.querySelector(`.${k}`):null;if(!e)return;let t=e.querySelectorAll(`.${A}`),n=0,r=1/0;t.forEach((t,i)=>{let a=t.getBoundingClientRect(),o=e.getBoundingClientRect(),s;if(u===`x`){let e=a.left+a.width/2-(o.left+o.width/2);s=Math.abs(e)}else{let e=a.top+a.height/2-(o.top+o.height/2);s=Math.abs(e)}s<r&&(r=s,n=i)}),I(n)},V=e=>{if(!w)return;let t=e.touches[0],n=e.currentTarget;n.dataset.touchStartX=t.clientX.toString(),n.dataset.touchStartY=t.clientY.toString()},H=e=>{if(!w)return;let t=e.touches[0],n=e.currentTarget,r=parseFloat(n.dataset.touchStartX||`0`),i=parseFloat(n.dataset.touchStartY||`0`),a=t.clientX-r,o=t.clientY-i;(Math.abs(a)>Math.abs(o)||u===`x`)&&e.preventDefault()},U=e=>{if(!w)return;let t=e.currentTarget,n=parseFloat(t.dataset.touchStartX||`0`),r=parseFloat(t.dataset.touchStartY||`0`);if(!n&&!r)return;let i=e.changedTouches[0],a=i.clientX-n,o=i.clientY-r,s=Math.max(Math.abs(a),Math.abs(o))>30;s&&(u===`x`?a>0?z():R():o>0?z():R()),delete t.dataset.touchStartX,delete t.dataset.touchStartY},W=e=>{T&&(e.preventDefault(),e.deltaY>0?R():z())},G=e=>{if(!_||!e)return;let t,n=()=>{t=setInterval(R,y)},r=()=>{clearInterval(t)};return e.addEventListener(`mouseenter`,r),e.addEventListener(`mouseleave`,n),n(),()=>{clearInterval(t),e.removeEventListener(`mouseenter`,r),e.removeEventListener(`mouseleave`,n)}},K=()=>{let e=typeof document<`u`?document.querySelector(`.${k}`):null;if(!e)return;let t=[];e.addEventListener(`scroll`,B),t.push(()=>e.removeEventListener(`scroll`,B)),w&&(e.addEventListener(`touchstart`,V),e.addEventListener(`touchmove`,H,{passive:!1}),e.addEventListener(`touchend`,U),t.push(()=>e.removeEventListener(`touchstart`,V)),t.push(()=>e.removeEventListener(`touchmove`,H)),t.push(()=>e.removeEventListener(`touchend`,U))),T&&(e.addEventListener(`wheel`,W,{passive:!1}),t.push(()=>e.removeEventListener(`wheel`,W)));let n=G(e);return n&&t.push(n),L(0),()=>t.forEach(e=>e())};typeof window<`u`&&typeof document<`u`&&setTimeout(K,0);let q=c.html`
206
- <div class="${M}">
207
- ${Array.from({length:P},(e,t)=>c.html`
231
+ `}function D(r={},i){if(i===void 0)return e=>D(r,e??[t.html``]);let a=e.getComponentCount(`Swiper`),{gap:o=`8px`,snapType:s=`mandatory`,height:c=`auto`,width:l=`100%`,className:u=e.getRandomClassName(`Swiper::swiper`)+`-lyco-now-${a}`,direction:d=`x`,scrollBehavior:f=`smooth`,align:p=`start`,showNavigation:m=!0,navigationPosition:h=`inside`,showPagination:g=!0,paginationType:_=`dots`,autoPlay:v=!1,interval:y=3e3,loop:b=!1,touchEnabled:x=!0,mouseWheel:S=!1,onSlideChange:C,on:w}=r,T=u,E=T+`-container`,O=T+`-slide`,k=T+`-navigation`,A=T+`-pagination`,j;j=i?typeof i==`function`?i():i:[];let M=j.length,[N,P]=(()=>{let e={value:0};return[()=>e.value,t=>{let n=Math.max(0,Math.min(t,M-1));e.value!==n&&(e.value=n,C?.(n))}]})(),F=e=>{let t=typeof document<`u`?document.querySelector(`.${E}`):null;if(!t)return;let n=t.querySelectorAll(`.${O}`);if(e<0||e>=n.length)return;let r=n[e],i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),o;d===`x`?(o=r.offsetLeft-t.offsetLeft,p===`center`?o-=(a.width-i.width)/2:p===`end`&&(o-=a.width-i.width),t.scrollTo({left:o,behavior:f})):(o=r.offsetTop-t.offsetTop,p===`center`?o-=(a.height-i.height)/2:p===`end`&&(o-=a.height-i.height),t.scrollTo({top:o,behavior:f})),P(e)},I=()=>{let e=N()+1>=M?b?0:N():N()+1;F(e)},L=()=>{let e=N()-1<0?b?M-1:N():N()-1;F(e)},R=()=>{let e=typeof document<`u`?document.querySelector(`.${E}`):null;if(!e)return;let t=e.querySelectorAll(`.${O}`),n=0,r=1/0;t.forEach((t,i)=>{let a=t.getBoundingClientRect(),o=e.getBoundingClientRect(),s;if(d===`x`){let e=a.left+a.width/2-(o.left+o.width/2);s=Math.abs(e)}else{let e=a.top+a.height/2-(o.top+o.height/2);s=Math.abs(e)}s<r&&(r=s,n=i)}),P(n)},z=e=>{if(!x)return;let t=e.touches[0],n=e.currentTarget;n.dataset.touchStartX=t.clientX.toString(),n.dataset.touchStartY=t.clientY.toString()},B=e=>{if(!x)return;let t=e.touches[0],n=e.currentTarget,r=parseFloat(n.dataset.touchStartX||`0`),i=parseFloat(n.dataset.touchStartY||`0`),a=t.clientX-r,o=t.clientY-i;(Math.abs(a)>Math.abs(o)||d===`x`)&&e.preventDefault()},V=e=>{if(!x)return;let t=e.currentTarget,n=parseFloat(t.dataset.touchStartX||`0`),r=parseFloat(t.dataset.touchStartY||`0`);if(!n&&!r)return;let i=e.changedTouches[0],a=i.clientX-n,o=i.clientY-r,s=Math.max(Math.abs(a),Math.abs(o))>30;s&&(d===`x`?a>0?L():I():o>0?L():I()),delete t.dataset.touchStartX,delete t.dataset.touchStartY},H=e=>{S&&(e.preventDefault(),e.deltaY>0?I():L())},U=e=>{if(!v||!e)return;let t,n=()=>{t=setInterval(I,y)},r=()=>{clearInterval(t)};return e.addEventListener(`mouseenter`,r),e.addEventListener(`mouseleave`,n),n(),()=>{clearInterval(t),e.removeEventListener(`mouseenter`,r),e.removeEventListener(`mouseleave`,n)}},W=()=>{let e=typeof document<`u`?document.querySelector(`.${E}`):null;if(!e)return;let t=[];e.addEventListener(`scroll`,R),t.push(()=>e.removeEventListener(`scroll`,R)),x&&(e.addEventListener(`touchstart`,z),e.addEventListener(`touchmove`,B,{passive:!1}),e.addEventListener(`touchend`,V),t.push(()=>e.removeEventListener(`touchstart`,z)),t.push(()=>e.removeEventListener(`touchmove`,B)),t.push(()=>e.removeEventListener(`touchend`,V))),S&&(e.addEventListener(`wheel`,H,{passive:!1}),t.push(()=>e.removeEventListener(`wheel`,H)));let n=U(e);return n&&t.push(n),F(0),()=>t.forEach(e=>e())};typeof window<`u`&&typeof document<`u`&&setTimeout(W,0);let G=t.html`
232
+ <div class="${A}">
233
+ ${Array.from({length:M},(e,n)=>t.html`
208
234
  <button
209
- class="${t===F()?`active`:``}"
210
- @click=${()=>L(t)}
235
+ class="${n===N()?`active`:``}"
236
+ @click=${()=>F(n)}
211
237
  ></button>
212
238
  `)}
213
239
  </div>
214
- `,J=c.html`
215
- <div class="${M} fraction">
216
- <span class="current">${F()+1}</span>
240
+ `,K=t.html`
241
+ <div class="${A} fraction">
242
+ <span class="current">${N()+1}</span>
217
243
  <span class="separator">/</span>
218
- <span class="total">${P}</span>
244
+ <span class="total">${M}</span>
219
245
  </div>
220
- `,te=c.html`
221
- <div class="${M} progressbar">
246
+ `,ee=t.html`
247
+ <div class="${A} progressbar">
222
248
  <div
223
249
  class="progress"
224
- style="width: ${P>1?F()/(P-1)*100:0}%"
250
+ style="width: ${M>1?N()/(M-1)*100:0}%"
225
251
  ></div>
226
252
  </div>
227
- `,Y=c.html`
228
- <div class="${j}">
229
- <button class="prev" @click=${z}>◀</button>
230
- <button class="next" @click=${R}>▶</button>
253
+ `,q=t.html`
254
+ <div class="${k}">
255
+ <button class="prev" @click=${L}>◀</button>
256
+ <button class="next" @click=${I}>▶</button>
231
257
  </div>
232
- `,ne=`
233
- .${O} {
258
+ `,J=`
259
+ .${T} {
234
260
  position: relative;
235
261
  overflow: hidden;
236
- width: ${o};
237
- height: ${a};
262
+ width: ${l};
263
+ height: ${c};
238
264
  }
239
265
 
240
- .${k} {
266
+ .${E} {
241
267
  width: 100%;
242
268
  height: 100%;
243
269
  overflow: auto;
244
- scroll-snap-type: ${u+` `+i};
270
+ scroll-snap-type: ${d+` `+s};
245
271
  -webkit-overflow-scrolling: touch;
246
- scroll-behavior: ${d};
247
- gap: ${r};
272
+ scroll-behavior: ${f};
273
+ gap: ${o};
248
274
  display: flex;
249
- flex-direction: ${u===`x`?`row`:`column`};
275
+ flex-direction: ${d===`x`?`row`:`column`};
250
276
  }
251
277
 
252
- .${A} {
253
- scroll-snap-align: ${f};
278
+ .${O} {
279
+ scroll-snap-align: ${p};
254
280
  flex-shrink: 0;
255
281
  }
256
282
 
257
- .${j} {
283
+ .${k} {
258
284
  position: absolute;
259
285
  top: 50%;
260
286
  left: 0;
@@ -263,10 +289,10 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
263
289
  display: flex;
264
290
  justify-content: space-between;
265
291
  pointer-events: none;
266
- padding: ${m===`outside`?`0 1rem`:`0 0.5rem`};
292
+ padding: ${h===`outside`?`0 1rem`:`0 0.5rem`};
267
293
  }
268
294
 
269
- .${j} button {
295
+ .${k} button {
270
296
  width: 2.5rem;
271
297
  height: 2.5rem;
272
298
  border-radius: 50%;
@@ -281,11 +307,11 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
281
307
  transition: background-color 0.3s;
282
308
  }
283
309
 
284
- .${j} button:hover {
310
+ .${k} button:hover {
285
311
  background-color: rgba(0, 0, 0, 0.8);
286
312
  }
287
313
 
288
- .${M} {
314
+ .${A} {
289
315
  position: absolute;
290
316
  bottom: 1rem;
291
317
  left: 0;
@@ -295,7 +321,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
295
321
  gap: 0.5rem;
296
322
  align-items: center;
297
323
  }
298
- .${M} button {
324
+ .${A} button {
299
325
  width: 0.75rem;
300
326
  height: 0.75rem;
301
327
  border-radius: 50%;
@@ -304,12 +330,12 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
304
330
  cursor: pointer;
305
331
  transition: background-color 0.3s, transform 0.3s;
306
332
  }
307
- .${M} button.active {
333
+ .${A} button.active {
308
334
  background-color: white;
309
335
  transform: scale(1.2);
310
336
  }
311
337
 
312
- .${M}.fraction {
338
+ .${A}.fraction {
313
339
  position: absolute;
314
340
  bottom: 1rem;
315
341
  left: 50%;
@@ -321,7 +347,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
321
347
  gap: 0.25rem;
322
348
  }
323
349
 
324
- .${M}.progressbar {
350
+ .${A}.progressbar {
325
351
  position: absolute;
326
352
  bottom: 0.5rem;
327
353
  left: 0;
@@ -329,64 +355,138 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
329
355
  height: 0.25rem;
330
356
  background-color: rgba(255, 255, 255, 0.2);
331
357
  }
332
- .${M}.progressbar .progress {
358
+ .${A}.progressbar .progress {
333
359
  height: 100%;
334
360
  background-color: white;
335
361
  transition: width 0.3s;
336
362
  }
337
- `,X=C(D??{});return x(`Swiper`,c.html`
363
+ `,Y=e.createEventBinder(w??{});return e.LycoComponent(`Swiper`,t.html`
338
364
  <style>
339
- ${ne}
365
+ ${J}
340
366
  </style>
341
367
 
342
368
  <div
343
- ${(0,l.ref)(e=>{e?X.bind(e):X.unbindAll()})}
344
- class="${O}"
369
+ ${(0,n.ref)(e=>{e?Y.bind(e):Y.unbindAll()})}
370
+ class="${T}"
345
371
  >
346
- <div class="${k}">
347
- ${N.map((e,t)=>c.html`
348
- <div class="${A} --slide-${t}" key=${t}>
372
+ <div class="${E}">
373
+ ${j.map((e,n)=>t.html`
374
+ <div class="${O} --slide-${n}" key=${n}>
349
375
  ${e}
350
376
  </div>
351
377
  `)}
352
378
  </div>
353
379
 
354
- ${p?Y:null}
355
- ${h&&g===`dots`?q:null}
356
- ${h&&g===`fraction`?J:null}
357
- ${h&&g===`progressbar`?te:null}
380
+ ${m?q:null}
381
+ ${g&&_===`dots`?G:null}
382
+ ${g&&_===`fraction`?K:null}
383
+ ${g&&_===`progressbar`?ee:null}
358
384
  </div>
359
- `)}function R(e,t){let n=e?.top?`top: ${e.top};`:``,r=e?.right?`right: ${e.right};`:``,i=e?.bottom?`bottom: ${e.bottom};`:``,a=e?.left?`left: ${e.left};`:``,o=e?.width?`width: ${e.width};`:``,s=e?.height?`height: ${e.height};`:``,u=typeof e?.zIndex==`number`?`z-index: ${e.zIndex};`:``,f=e?.style?e.style:``,p=e?.className?e.className:``,h=C(e?.on??{}),g=e=>c.html`
385
+ `)}const O={borderRadius:{small:`4px`,medium:`8px`,large:`16px`,full:`9999px`},elevation:{level1:`0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14)`,level2:`0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12)`,level3:`0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10)`,level4:`0 15px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05)`,level5:`0 20px 40px rgba(0,0,0,0.2)`},animation:{standard:`0.2s cubic-bezier(0.4, 0, 0.2, 1)`,emphasized:`0.3s cubic-bezier(0.4, 0, 0.2, 1)`,decelerated:`0.4s cubic-bezier(0, 0, 0.2, 1)`},colors:{primary:`#6750A4`,onPrimary:`#FFFFFF`,primaryContainer:`#EADDFF`,onPrimaryContainer:`#21005E`,secondary:`#625B71`,onSecondary:`#FFFFFF`,secondaryContainer:`#E8DEF8`,onSecondaryContainer:`#1E192B`,surface:`#FEF7FF`,onSurface:`#1C1B1F`,surfaceVariant:`#E7E0EB`,onSurfaceVariant:`#49454E`,error:`#B00020`}};function k(r){let{checked:i=!1,disabled:a=!1,size:o=`medium`,color:s=O.colors.primary,onChange:c,className:l=``,on:u={}}=r??{},d=e.getComponentCount(`SwitchInput`),f=e.getRandomClassName(`SwitchInput::switch`)+`-lyco-now-${d}`,p={small:{width:32,height:16,thumbSize:12},medium:{width:44,height:24,thumbSize:18},large:{width:56,height:32,thumbSize:24}},{width:m,height:h,thumbSize:g}=p[o],_=`
386
+ .${f} {
387
+ display: inline-block;
388
+ position: relative;
389
+ width: ${m}px;
390
+ height: ${h}px;
391
+ cursor: ${a?`not-allowed`:`pointer`};
392
+ }
393
+
394
+ .${f} input {
395
+ opacity: 0;
396
+ width: 0;
397
+ height: 0;
398
+ }
399
+
400
+ .${f} .slider {
401
+ position: absolute;
402
+ top: 0;
403
+ left: 0;
404
+ right: 0;
405
+ bottom: 0;
406
+ background-color: ${a?O.colors.surfaceVariant:O.colors.onSurfaceVariant};
407
+ transition: ${O.animation.standard};
408
+ border-radius: ${h}px;
409
+ opacity: ${a?.38:.5};
410
+ }
411
+
412
+ .${f} .slider:before {
413
+ position: absolute;
414
+ content: "";
415
+ height: ${g}px;
416
+ width: ${g}px;
417
+ left: ${(h-g)/2}px;
418
+ bottom: ${(h-g)/2}px;
419
+ background-color: ${O.colors.surface};
420
+ transition: ${O.animation.emphasized};
421
+ border-radius: 50%;
422
+ box-shadow: ${O.elevation.level1};
423
+ }
424
+
425
+ .${f} input:checked + .slider {
426
+ background-color: ${a?O.colors.surfaceVariant:s};
427
+ opacity: ${a?.38:1};
428
+ }
429
+
430
+ .${f} input:checked + .slider:before {
431
+ transform: translateX(${m-h}px);
432
+ background-color: ${O.colors.onPrimary};
433
+ }
434
+
435
+ .${f}:hover .slider:before {
436
+ box-shadow: ${a?O.elevation.level1:O.elevation.level2};
437
+ }
438
+
439
+ .${f}:active .slider:before {
440
+ box-shadow: ${a?O.elevation.level1:O.elevation.level3};
441
+ width: ${g*1.2}px;
442
+ }
443
+ `,v=e.createEventBinder(u);return e.LycoComponent(`SwitchInput`,t.html`
444
+ <style>
445
+ ${_}
446
+ </style>
447
+ <label
448
+ class="${f} ${l}"
449
+ ${(0,n.ref)(e=>{e?v.bind(e):v.unbindAll()})}
450
+ >
451
+ <input
452
+ type="checkbox"
453
+ ?checked=${i}
454
+ ?disabled=${a}
455
+ @change=${e=>{!a&&c&&c(e.target.checked)}}
456
+ />
457
+ <span class="slider"></span>
458
+ </label>
459
+ `)}function A(r,i){let a=r?.top?`top: ${r.top};`:``,o=r?.right?`right: ${r.right};`:``,s=r?.bottom?`bottom: ${r.bottom};`:``,c=r?.left?`left: ${r.left};`:``,l=r?.width?`width: ${r.width};`:``,u=r?.height?`height: ${r.height};`:``,d=typeof r?.zIndex==`number`?`z-index: ${r.zIndex};`:``,f=r?.style?r.style:``,p=r?.className?r.className:``,m=e.createEventBinder(r?.on??{}),h=r=>t.html`
360
460
  <div
361
- ${(0,l.ref)(e=>{e?h.bind(e):h.unbindAll()})}
461
+ ${(0,n.ref)(e=>{e?m.bind(e):m.unbindAll()})}
362
462
  class="${p}"
363
463
  style="
364
464
  position: absolute;
365
- ${n} ${r} ${i} ${a}
366
- ${o} ${s}
367
- ${u}
465
+ ${a} ${o} ${s} ${c}
466
+ ${l} ${u}
467
+ ${d}
368
468
  ${f}
369
469
  "
370
470
  >
371
- ${d(e)}
471
+ ${e.renderFn(r)}
372
472
  </div>
373
- `;return m(t,g)}function z(e,t){let n=e?.width??`300px`,r=e?.height??`auto`,i=e?.top??`20%`,a=e?.bottom??`auto`,o=e?.left??`50%`,s=e?.right??`auto`,u=o===`auto`?``:`transform: translateX(-50%);`,d=e?.background??`rgba(255, 255, 255, 0.3)`,f=e?.blur??`10px`,p=e?.borderRadius??`12px`,m=e?.padding??`16px`,g=e?.zIndex??1e3,_=C(e?.on??{}),v=e=>c.html`
473
+ `;return e.renderFnOrCurry(i,h)}function j(r,i){let a=r?.width??`300px`,o=r?.height??`auto`,s=r?.top??`20%`,c=r?.bottom??`auto`,l=r?.left??`50%`,u=r?.right??`auto`,d=l===`auto`?``:`transform: translateX(-50%);`,f=r?.background??`rgba(255, 255, 255, 0.3)`,p=r?.blur??`10px`,m=r?.borderRadius??`12px`,h=r?.padding??`16px`,g=r?.zIndex??1e3,_=e.createEventBinder(r?.on??{}),v=e=>t.html`
374
474
  <div
375
- ${(0,l.ref)(e=>{e?_.bind(e):_.unbindAll()})}
475
+ ${(0,n.ref)(e=>{e?_.bind(e):_.unbindAll()})}
376
476
  style="
377
477
  position: fixed;
378
- top: ${i};
379
- bottom: ${a};
380
- left: ${o};
381
- right: ${s};
382
- ${u}
383
- width: ${n};
384
- height: ${r};
385
- background: ${d};
386
- backdrop-filter: blur(${f});
387
- -webkit-backdrop-filter: blur(${f});
388
- border-radius: ${p};
389
- padding: ${m};
478
+ top: ${s};
479
+ bottom: ${c};
480
+ left: ${l};
481
+ right: ${u};
482
+ ${d}
483
+ width: ${a};
484
+ height: ${o};
485
+ background: ${f};
486
+ backdrop-filter: blur(${p});
487
+ -webkit-backdrop-filter: blur(${p});
488
+ border-radius: ${m};
489
+ padding: ${h};
390
490
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
391
491
  z-index: ${g};
392
492
  display: flex;
@@ -395,18 +495,18 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
395
495
  >
396
496
  ${e}
397
497
  </div>
398
- `;return h(t,void 0,v)}function B(e,t){if(t===void 0)return t=>B(e,t??[c.html``]);let n=`${100/e.ratio}%`,r=e.maxWidth?`max-width: ${e.maxWidth};`:``,i=e.background?`background: ${e.background};`:``,a=e.overflow??`hidden`,o=C(e.on??{});return c.html`
498
+ `;return e.renderFnOrArrayOrCurry(i,void 0,v)}function M(r,i){if(i===void 0)return e=>M(r,e??[t.html``]);let a=`${100/r.ratio}%`,o=r.maxWidth?`max-width: ${r.maxWidth};`:``,s=r.background?`background: ${r.background};`:``,c=r.overflow??`hidden`,l=e.createEventBinder(r.on??{});return t.html`
399
499
  <div
400
- ${(0,l.ref)(e=>{e?o.bind(e):o.unbindAll()})}
500
+ ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
401
501
  style="
402
502
  position: relative;
403
503
  width: 100%;
404
- ${r}
405
- ${i}
406
- overflow: ${a};
504
+ ${o}
505
+ ${s}
506
+ overflow: ${c};
407
507
  "
408
508
  >
409
- <div style="width: 100%; padding-top: ${n};"></div>
509
+ <div style="width: 100%; padding-top: ${a};"></div>
410
510
  <div
411
511
  style="
412
512
  position: absolute;
@@ -416,172 +516,172 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
416
516
  height: 100%;
417
517
  "
418
518
  >
419
- ${f(t)}
519
+ ${e.renderFnOrArray(i)}
420
520
  </div>
421
521
  </div>
422
- `}function V(e,t){if(t===void 0){let t=t=>V(e,t);return t.html=(t,...n)=>V(e,(0,c.html)(t,...n)),t}let n=b(`AutoFitGrid`),r=v(`AutoFitGrid::auto-fit-grid`)+`-lyco-now-`+n,i=e?.gap??`16px`,a=`
423
- .${r} {
522
+ `}function N(r,i){if(i===void 0){let e=e=>N(r,e);return e.html=(e,...n)=>N(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`AutoFitGrid`),o=e.getRandomClassName(`AutoFitGrid::auto-fit-grid`)+`-lyco-now-`+a,s=r?.gap??`16px`,c=`
523
+ .${o} {
424
524
  display: grid;
425
- grid-template-columns: repeat(auto-fit, minmax(${e.minItemWidth}, 1fr));
426
- gap: ${i};
525
+ grid-template-columns: repeat(auto-fit, minmax(${r.minItemWidth}, 1fr));
526
+ gap: ${s};
427
527
  }
428
- `,o=C(e.on??{});return x(`AutoFitGrid`,c.html`
528
+ `,l=e.createEventBinder(r.on??{});return e.LycoComponent(`AutoFitGrid`,t.html`
429
529
  <style>
430
- ${a}
530
+ ${c}
431
531
  </style>
432
532
  <div
433
- class="${r}"
434
- ${(0,l.ref)(e=>{e?o.bind(e):o.unbindAll()})}
533
+ class="${o}"
534
+ ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
435
535
  >
436
- ${d(t)}
536
+ ${e.renderFn(i)}
437
537
  </div>
438
- `)}function H(e,t){if(t===void 0)return t=>H(e,t??[c.html``]);let n=e?.size??`32px`,r=e?.overlap??`-8px`,i=C(e?.on??{}),a=(e,t)=>c.html`
538
+ `)}function P(r,i){if(i===void 0)return e=>P(r,e??[t.html``]);let a=r?.size??`32px`,o=r?.overlap??`-8px`,s=e.createEventBinder(r?.on??{}),c=(e,n)=>t.html`
439
539
  <div
440
540
  style="
441
- width: ${n};
442
- height: ${n};
541
+ width: ${a};
542
+ height: ${a};
443
543
  border-radius: 50%;
444
544
  overflow: hidden;
445
545
  border: 2px solid #fff;
446
- margin-left: ${t===0?`0`:r};
546
+ margin-left: ${n===0?`0`:o};
447
547
  box-sizing: content-box;
448
548
  "
449
549
  >
450
550
  ${e}
451
551
  </div>
452
- `;return c.html`
552
+ `;return t.html`
453
553
  <div
454
- ${(0,l.ref)(e=>{e?i.bind(e):i.unbindAll()})}
554
+ ${(0,n.ref)(e=>{e?s.bind(e):s.unbindAll()})}
455
555
  style="display: flex; align-items: center;"
456
556
  >
457
- ${f(t,a)}
557
+ ${e.renderFnOrArray(i,c)}
458
558
  </div>
459
- `}function U(e,t){if(t===void 0){let t=t=>U(e,t??c.html``);return t.html=(t,...n)=>U(e,(0,c.html)(t,...n)),t}let n=e?.position??`top-right`,r=e?.size??`16px`,i=e?.background??`red`,a=e?.color??`#fff`,[o,s,u,f]=[n.includes(`top`)?`0`:`auto`,n.includes(`right`)?`0`:`auto`,n.includes(`bottom`)?`0`:`auto`,n.includes(`left`)?`0`:`auto`],p=C(e?.on??{});return c.html`
559
+ `}function F(r,i){if(i===void 0){let e=e=>F(r,e??t.html``);return e.html=(e,...n)=>F(r,(0,t.html)(e,...n)),e}let a=r?.position??`top-right`,o=r?.size??`16px`,s=r?.background??`red`,c=r?.color??`#fff`,[l,u,d,f]=[a.includes(`top`)?`0`:`auto`,a.includes(`right`)?`0`:`auto`,a.includes(`bottom`)?`0`:`auto`,a.includes(`left`)?`0`:`auto`],p=e.createEventBinder(r?.on??{});return t.html`
460
560
  <div style="position: relative; display: inline-block;">
461
- ${d(t)}
561
+ ${e.renderFn(i)}
462
562
  <div
463
- ${(0,l.ref)(e=>{e?p.bind(e):p.unbindAll()})}
563
+ ${(0,n.ref)(e=>{e?p.bind(e):p.unbindAll()})}
464
564
  style="
465
565
  position: absolute;
466
- top: ${o};
467
- right: ${s};
468
- bottom: ${u};
566
+ top: ${l};
567
+ right: ${u};
568
+ bottom: ${d};
469
569
  left: ${f};
470
- width: ${r};
471
- height: ${r};
472
- background: ${i};
473
- color: ${a};
474
- font-size: calc(${r} * 0.6);
570
+ width: ${o};
571
+ height: ${o};
572
+ background: ${s};
573
+ color: ${c};
574
+ font-size: calc(${o} * 0.6);
475
575
  border-radius: 50%;
476
576
  display: flex;
477
577
  justify-content: center;
478
578
  align-items: center;
479
- transform: translate(${f===`0`?`-50%`:`0`}, ${o===`0`?`-50%`:`0`});
579
+ transform: translate(${f===`0`?`-50%`:`0`}, ${l===`0`?`-50%`:`0`});
480
580
  "
481
581
  >
482
- ${e?.content??``}
582
+ ${r?.content??``}
483
583
  </div>
484
584
  </div>
485
- `}function W(e,t){return e?n=>{typeof e==`function`?e(n):e.current=n,typeof t==`function`?t(n):t.current=n}:t}function G(e,t){if(!t)return t=>G(e,t??(0,l.createRef)());let n=C(e?.on??{}),r=W(t,e=>{e?n.bind(e):n.unbindAll()});return c.html`
585
+ `}function I(e,t){return e?n=>{typeof e==`function`?e(n):e.current=n,typeof t==`function`?t(n):t.current=n}:t}function L(r,i){if(!i)return e=>L(r,e??(0,n.createRef)());let a=e.createEventBinder(r?.on??{}),o=I(i,e=>{e?a.bind(e):a.unbindAll()});return t.html`
486
586
  <canvas
487
- ${(0,l.ref)(r)}
488
- .class=${e?.className}
489
- style=${e?.style??``}
587
+ ${(0,n.ref)(o)}
588
+ .class=${r?.className}
589
+ style=${r?.style??``}
490
590
  ></canvas>
491
- `}function K(e,t){if(t===void 0)return t=>K(e,t??[c.html``]);let n=e?.padding??`16px`,r=e?.borderRadius??`8px`,i=e?.shadow??`0 2px 8px rgba(0,0,0,0.1)`,a=e?.background??`#fff`,o=C(e?.on??{});return c.html`
591
+ `}function R(r,i){if(i===void 0)return e=>R(r,e??[t.html``]);let a=r?.padding??`16px`,o=r?.borderRadius??`8px`,s=r?.shadow??`0 2px 8px rgba(0,0,0,0.1)`,c=r?.background??`#fff`,l=e.createEventBinder(r?.on??{});return t.html`
492
592
  <div
493
- ${(0,l.ref)(e=>{e?o.bind(e):o.unbindAll()})}
593
+ ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
494
594
  style="
495
- background: ${a};
496
- border-radius: ${r};
497
- box-shadow: ${i};
498
- padding: ${n};
595
+ background: ${c};
596
+ border-radius: ${o};
597
+ box-shadow: ${s};
598
+ padding: ${a};
499
599
  box-sizing: border-box;
500
600
  "
501
601
  >
502
- ${f(t)}
602
+ ${e.renderFnOrArray(i)}
503
603
  </div>
504
- `}function q(e,t){if(t===void 0){let t=t=>q(e,t??c.html``);return t.html=(t,...n)=>q(e,(0,c.html)(t,...n)),t}let n=e?.width?`width: ${e.width};`:``,r=e?.height?`height: ${e.height};`:``,i=e?.background?`background: ${e.background};`:``,a=C(e?.on??{});return c.html`
604
+ `}function z(r,i){if(i===void 0){let e=e=>z(r,e??t.html``);return e.html=(e,...n)=>z(r,(0,t.html)(e,...n)),e}let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});return t.html`
505
605
  <div
506
- ${(0,l.ref)(e=>{e?a.bind(e):a.unbindAll()})}
606
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
507
607
  style="
508
608
  display: flex;
509
609
  justify-content: center;
510
610
  align-items: center;
511
- ${n} ${r} ${i}
611
+ ${a} ${o} ${s}
512
612
  "
513
613
  >
514
- ${d(t)}
614
+ ${e.renderFn(i)}
515
615
  </div>
516
- `}function J(e,t){if(t===void 0)return t=>J(e,t??[c.html``]);let n=e?.maxWidth??`1024px`,r=e?.padding??`0 16px`,i=e?.background?`background: ${e.background};`:``,a=e?.fullHeight?`height: 100%;`:``,o=C(e?.on??{});return c.html`
616
+ `}function B(r,i){if(i===void 0)return e=>B(r,e??[t.html``]);let a=r?.maxWidth??`1024px`,o=r?.padding??`0 16px`,s=r?.background?`background: ${r.background};`:``,c=r?.fullHeight?`height: 100%;`:``,l=e.createEventBinder(r?.on??{});return t.html`
517
617
  <div
518
- ${(0,l.ref)(e=>{e?o.bind(e):o.unbindAll()})}
618
+ ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
519
619
  style="
520
620
  width: 100%;
521
- max-width: ${n};
621
+ max-width: ${a};
522
622
  margin-left: auto;
523
623
  margin-right: auto;
524
- padding: ${r};
525
- ${i}
526
- ${a}
624
+ padding: ${o};
625
+ ${s}
626
+ ${c}
527
627
  box-sizing: border-box;
528
628
  "
529
629
  >
530
- ${f(t)}
630
+ ${e.renderFnOrArray(i)}
531
631
  </div>
532
- `}function te(e){let t=e?.orientation??`horizontal`,n=e?.thickness??`1px`,r=e?.color??`#e0e0e0`,i=e?.margin??(t===`horizontal`?`8px 0`:`0 8px`),a=C(e?.on??{}),o=t===`horizontal`?`width: 100%; height: ${n}; background: ${r}; margin: ${i};`:`width: ${n}; height: 100%; background: ${r}; margin: ${i};`;return c.html`<div
533
- ${(0,l.ref)(e=>{e?a.bind(e):a.unbindAll()})}
534
- style="${o}"
535
- ></div>`}function Y(e,t){if(t===void 0){let t=t=>Y(e,t??c.html``);return t.html=(t,...n)=>Y(e,(0,c.html)(t,...n)),t}let n=e?.columns??4,r=e?.gap??`24px`,i=e?.background??`#f8f8f8`,a=e?.padding??`40px 16px`,o=C(e?.on??{});return c.html`
632
+ `}function V(r){let i=r?.orientation??`horizontal`,a=r?.thickness??`1px`,o=r?.color??`#e0e0e0`,s=r?.margin??(i===`horizontal`?`8px 0`:`0 8px`),c=e.createEventBinder(r?.on??{}),l=i===`horizontal`?`width: 100%; height: ${a}; background: ${o}; margin: ${s};`:`width: ${a}; height: 100%; background: ${o}; margin: ${s};`;return t.html`<div
633
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
634
+ style="${l}"
635
+ ></div>`}function H(r,i){if(i===void 0){let e=e=>H(r,e??t.html``);return e.html=(e,...n)=>H(r,(0,t.html)(e,...n)),e}let a=r?.columns??4,o=r?.gap??`24px`,s=r?.background??`#f8f8f8`,c=r?.padding??`40px 16px`,l=e.createEventBinder(r?.on??{});return t.html`
536
636
  <div
537
- ${(0,l.ref)(e=>{e?o.bind(e):o.unbindAll()})}
637
+ ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
538
638
  style="
539
639
  width: 100%;
540
- background: ${i};
541
- padding: ${a};
640
+ background: ${s};
641
+ padding: ${c};
542
642
  box-sizing: border-box;
543
643
  "
544
644
  >
545
645
  <div
546
646
  style="
547
647
  display: grid;
548
- grid-template-columns: repeat(${n}, 1fr);
549
- gap: ${r};
648
+ grid-template-columns: repeat(${a}, 1fr);
649
+ gap: ${o};
550
650
  "
551
651
  >
552
- ${d(t)}
652
+ ${e.renderFn(i)}
553
653
  </div>
554
654
  <div style="text-align: center; margin-top: 24px; color: #666;">
555
655
  © ${new Date().getFullYear()} Your Company. All rights reserved.
556
656
  </div>
557
657
  </div>
558
- `}function ne(e,t){return t?e.map((e,n)=>t(e,n)):t=>e.map((e,n)=>t(e,n))}function X(e,t){if(t===void 0){let t=t=>X(e,t??c.html``);return t.html=(t,...n)=>X(e,(0,c.html)(t,...n)),t}let n=e.defaultColumns??1,r=e.gap??`16px`,i=b(`GridBreakpoint`),a=e.className??v(`GridBreakpoint::grid-breakpoint`)+`-lyco-now-`+i,o=Object.entries(e.breakpoints).map(([e,t])=>`@media`+e+`{
559
- `+a+`{ grid-template-columns: repeat(`+t+`, 1fr); }
658
+ `}function U(e,t){return t?e.map((e,n)=>t(e,n)):t=>e.map((e,n)=>t(e,n))}function W(r,i){if(i===void 0){let e=e=>W(r,e??t.html``);return e.html=(e,...n)=>W(r,(0,t.html)(e,...n)),e}let a=r.defaultColumns??1,o=r.gap??`16px`,s=e.getComponentCount(`GridBreakpoint`),c=r.className??e.getRandomClassName(`GridBreakpoint::grid-breakpoint`)+`-lyco-now-`+s,l=Object.entries(r.breakpoints).map(([e,t])=>`@media`+e+`{
659
+ `+c+`{ grid-template-columns: repeat(`+t+`, 1fr); }
560
660
  }`).join(`
561
- `),s=`
562
- .${a} {
661
+ `),u=`
662
+ .${c} {
563
663
  display: grid;
564
- grid-template-columns: repeat(${n}, 1fr);
565
- gap: ${r};
664
+ grid-template-columns: repeat(${a}, 1fr);
665
+ gap: ${o};
566
666
  }
567
- ${o}`,u=C(e?.on??{});return x(`GridBreakpoint`,c.html`
667
+ ${l}`,d=e.createEventBinder(r?.on??{});return e.LycoComponent(`GridBreakpoint`,t.html`
568
668
  <style>
569
- ${s}
669
+ ${u}
570
670
  </style>
571
671
  <div
572
- ${(0,l.ref)(e=>{e?u.bind(e):u.unbindAll()})}
573
- class="${a}"
672
+ ${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
673
+ class="${c}"
574
674
  >
575
- ${d(t)}
675
+ ${e.renderFn(i)}
576
676
  </div>
577
- `)}function re(e,t){if(t===void 0)return t=>re(e,t??[c.html``]);let n=e?.backgroundImage?`background-image: url('${e.backgroundImage}');`:``,r=e?.height??`400px`,i=e?.overlayColor??`rgba(0, 0, 0, 0.3)`,a=C(e?.on??{});return c.html`
677
+ `)}function G(r,i){if(i===void 0)return e=>G(r,e??[t.html``]);let a=r?.backgroundImage?`background-image: url('${r.backgroundImage}');`:``,o=r?.height??`400px`,s=r?.overlayColor??`rgba(0, 0, 0, 0.3)`,c=e.createEventBinder(r?.on??{});return t.html`
578
678
  <div
579
- ${(0,l.ref)(e=>{e?a.bind(e):a.unbindAll()})}
679
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
580
680
  style="
581
681
  position: relative;
582
682
  width: 100%;
583
- height: ${r};
584
- ${n}
683
+ height: ${o};
684
+ ${a}
585
685
  background-size: cover;
586
686
  background-position: center;
587
687
  "
@@ -590,7 +690,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
590
690
  style="
591
691
  position: absolute;
592
692
  top: 0; left: 0; right: 0; bottom: 0;
593
- background: ${i};
693
+ background: ${s};
594
694
  "
595
695
  ></div>
596
696
  <div
@@ -609,194 +709,607 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
609
709
  box-sizing: border-box;
610
710
  "
611
711
  >
612
- ${f(t)}
712
+ ${e.renderFnOrArray(i)}
613
713
  </div>
614
714
  </div>
615
- `}function Z(e,t){if(t===void 0){let t=t=>Z(e,t??c.html``);return t.html=(t,...n)=>Z(e,(0,c.html)(t,...n)),t}let n=e?.breakpoint??`(max-width: 600px)`,r=e?.mode??`hide`,i=b(`Hidden`),a=e?.className??v(`Hidden::hidden-container`)+`-lyco-now-`+i,o=r===`hide`?`@media ${n} { .${a} { display: none !important; } }`:`@media ${n} { .${a} { display: block !important; } }
616
- @media not ${n} { .${a} { display: none !important; } }`,s=`
617
- .${a} {
715
+ `}function K(r,i){if(i===void 0){let e=e=>K(r,e??t.html``);return e.html=(e,...n)=>K(r,(0,t.html)(e,...n)),e}let a=r?.breakpoint??`(max-width: 600px)`,o=r?.mode??`hide`,s=e.getComponentCount(`Hidden`),c=r?.className??e.getRandomClassName(`Hidden::hidden-container`)+`-lyco-now-`+s,l=o===`hide`?`@media ${a} { .${c} { display: none !important; } }`:`@media ${a} { .${c} { display: block !important; } }
716
+ @media not ${a} { .${c} { display: none !important; } }`,u=`
717
+ .${c} {
618
718
  display: block;
619
719
  }
620
- ${o}`,u=C(e?.on??{});return x(`Hidden`,c.html`
720
+ ${l}`,d=e.createEventBinder(r?.on??{});return e.LycoComponent(`Hidden`,t.html`
621
721
  <style>
622
- ${s}
722
+ ${u}
623
723
  </style>
624
724
  <div
625
- ${(0,l.ref)(e=>{e?u.bind(e):u.unbindAll()})}
626
- class="${a}"
725
+ ${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
726
+ class="${c}"
627
727
  >
628
- ${d(t)}
728
+ ${e.renderFn(i)}
629
729
  </div>
630
- `)}function ie(e){return c.html` <li>${f(e)}</li> `}function ae(e,t){let n=e?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,r=e?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,i=e?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,a=b(`List`),o=e?.className??v(`List::list`)+`-lyco-now-${a}`,s=`
631
- ul.${o} {
730
+ `)}function ee(n){return t.html` <li>${e.renderFnOrArray(n)}</li> `}function q(n,r){let i=n?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,a=n?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,o=n?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,s=e.getComponentCount(`List`),c=n?.className??e.getRandomClassName(`List::list`)+`-lyco-now-${s}`,l=`
731
+ ul.${c} {
632
732
  list-style: none;
633
733
  margin: 0;
634
734
  padding: 0;
635
- ${n};
735
+ ${i};
636
736
  }
637
- ul.${o} li {
737
+ ul.${c} li {
638
738
  padding: 12px 16px;
639
- ${e?.bordered?`border-bottom: 1px solid #ddd`:``};
739
+ ${n?.bordered?`border-bottom: 1px solid #ddd`:``};
640
740
  }
641
- ul.${o} li:last-child {
642
- ${e?.bordered?`border-bottom: none`:``};
741
+ ul.${c} li:last-child {
742
+ ${n?.bordered?`border-bottom: none`:``};
643
743
  }
644
- ${r}
645
- ${i}
646
- `.toString(),l=e=>x(`List`,c.html`
744
+ ${a}
745
+ ${o}
746
+ `.toString(),u=n=>e.LycoComponent(`List`,t.html`
647
747
  <style>
648
- ${s}
748
+ ${l}
649
749
  </style>
650
- <ul class="${o}">
651
- ${f(e)}
750
+ <ul class="${c}">
751
+ ${e.renderFnOrArray(n)}
652
752
  </ul>
653
- `);return t===void 0?l:l(t)}function oe(e,t){let n=e?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,r=e?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,i=e?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,a=b(`ListGroup`),o=e?.className??v(`ListGroup::list-group`)+`-lyco-now-`+a,s=(e,t,n,r)=>n?c.html` <li>${e}</li> `:e,u=`
654
- ul.${o} {
753
+ `);return r===void 0?u:u(r)}function J(r,i){let a=r?.bordered?`border: 1px solid #ddd; border-radius: 4px`:``,o=r?.striped?`li:nth-child(even) { background: #f9f9f9; }`:``,s=r?.hover?`li:hover { background: #f1f1f1; cursor: pointer; }`:``,c=e.getComponentCount(`ListGroup`),l=r?.className??e.getRandomClassName(`ListGroup::list-group`)+`-lyco-now-`+c,u=(e,n,r,i)=>r?t.html` <li>${e}</li> `:e,d=`
754
+ ul.${l} {
655
755
  list-style: none;
656
756
  margin: 0;
657
757
  padding: 0;
658
- ${n};
758
+ ${a};
659
759
  }
660
- ul.${o} li {
760
+ ul.${l} li {
661
761
  padding: 12px 16px;
662
- ${e?.bordered?`border-bottom: 1px solid #ddd`:``};
762
+ ${r?.bordered?`border-bottom: 1px solid #ddd`:``};
663
763
  }
664
- ul.${o} li:last-child {
665
- ${e?.bordered?`border-bottom: none`:``};
764
+ ul.${l} li:last-child {
765
+ ${r?.bordered?`border-bottom: none`:``};
666
766
  }
667
- ${r}
668
- ${i}
669
- `,d=C(e?.on??{}),p=e=>x(`ListGroup`,c.html`
767
+ ${o}
768
+ ${s}
769
+ `,f=e.createEventBinder(r?.on??{}),p=r=>e.LycoComponent(`ListGroup`,t.html`
670
770
  <style>
671
- ${u}
771
+ ${d}
672
772
  </style>
673
773
  <ul
674
- ${(0,l.ref)(e=>{e?d.bind(e):d.unbindAll()})}
675
- class="${o}"
774
+ ${(0,n.ref)(e=>{e?f.bind(e):f.unbindAll()})}
775
+ class="${l}"
676
776
  >
677
- ${f(e,s)}
777
+ ${e.renderFnOrArray(r,u)}
678
778
  </ul>
679
- `);return h(t,p)}function se(e,t){if(t===void 0)return t=>se(e,t??[c.html``]);let n=e?.background??`rgba(0, 0, 0, 0.5)`,r=e?.zIndex??1e3,i=e?.fullScreen!==!1,a=C(e?.on??{});return c.html`
779
+ `);return e.renderFnOrArrayOrCurry(i,p)}function Y(r,i){if(i===void 0)return e=>Y(r,e??[t.html``]);let a=r?.background??`rgba(0, 0, 0, 0.5)`,o=r?.zIndex??1e3,s=r?.fullScreen!==!1,c=e.createEventBinder(r?.on??{});return t.html`
680
780
  <div
681
- ${(0,l.ref)(e=>{e?a.bind(e):a.unbindAll()})}
781
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
682
782
  style="
683
- position: ${i?`fixed`:`absolute`};
783
+ position: ${s?`fixed`:`absolute`};
684
784
  top: 0; left: 0; right: 0; bottom: 0;
685
- background: ${n};
686
- z-index: ${r};
785
+ background: ${a};
786
+ z-index: ${o};
687
787
  display: flex;
688
788
  justify-content: center;
689
789
  align-items: center;
690
790
  "
691
791
  >
692
- ${f(t)}
792
+ ${e.renderFnOrArray(i)}
693
793
  </div>
694
- `}function Q(e,t){if(t===void 0){let t=t=>Q(e,t??c.html``);return t.html=(t,...n)=>Q(e,(0,c.html)(t,...n)),t}let n=e?.width?`width: ${e.width};`:``,r=e?.height?`height: ${e.height};`:``,i=e?.background?`background: ${e.background};`:``,a=C(e?.on??{});return c.html`
794
+ `}function X(r,i){if(i===void 0){let e=e=>X(r,e??t.html``);return e.html=(e,...n)=>X(r,(0,t.html)(e,...n)),e}let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});return t.html`
695
795
  <div
696
- ${(0,l.ref)(e=>{e?a.bind(e):a.unbindAll()})}
796
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
697
797
  style="
698
798
  position: relative;
699
- ${n} ${r} ${i}
799
+ ${a} ${o} ${s}
700
800
  overflow: hidden;
701
801
  "
702
802
  >
703
- ${d(t)}
803
+ ${e.renderFn(i)}
704
804
  </div>
705
- `}function ce(e){let t=e?.width?`width: ${e.width};`:``,n=e?.height?`height: ${e.height};`:``,r=C(e?.on??{});return c.html`<div
706
- ${(0,l.ref)(e=>{e?r.bind(e):r.unbindAll()})}
707
- style="${t} ${n}"
708
- ></div>`}function le(e){let t=e?.type??`rect`,n=e?.width??`100%`,r=e?.height??`16px`,i=e?.borderRadius??`4px`,a=e?.animation!==!1,o=b(`SkeletonLoader`),s=e?.className??v(`SkeletonLoader::skeleton-shimmer`)+`-lyco-now-`+o,u=t===`circle`?`border-radius: 50%; width: ${n}; height: ${n}`:`border-radius: ${i}; width: ${n}; height: ${r}`,d=C(e?.on??{});return x(`SkeletonLoader`,c.html`
805
+ `}function te(r){let i=r?.width?`width: ${r.width};`:``,a=r?.height?`height: ${r.height};`:``,o=e.createEventBinder(r?.on??{});return t.html`<div
806
+ ${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
807
+ style="${i} ${a}"
808
+ ></div>`}function ne(r){let{type:i=`rect`,width:a=`100%`,height:o=`16px`,borderRadius:s=`4px`,animation:c=!0,animationType:l=`shimmer`,bgColor:u=`#eee`,highlightColor:d=`#ddd`,count:f=1,spacing:p=`8px`,direction:m=`vertical`,delay:h=0,autoHide:g=!1,duration:_=2e3,on:v={}}=r??{},y=e.getComponentCount(`SkeletonLoader`),b=e.getRandomClassName(`SkeletonLoader::skeleton`)+`-lyco-now-`+y,x=e.createEventBinder(v),S=i===`circle`?`border-radius:50%;width:${a};height:${a}`:`border-radius:${s};width:${a};height:${o}`,C=``,w=``;c&&(l===`shimmer`?(C=`@keyframes ${b}-shimmer { 0% { background-color: ${u}; } 50% { background-color: ${d}; } 100% { background-color: ${u}; } }`,w=`animation:${b}-shimmer 1.2s infinite ease-in-out;`):(C=`@keyframes ${b}-pulse { 0% { opacity:1; } 50% { opacity:0.4; } 100% { opacity:1; } }`,w=`animation:${b}-pulse 1.2s infinite ease-in-out;`));let T=m===`horizontal`?`display:flex;flex-direction:row;gap:${p}`:`display:flex;flex-direction:column;gap:${p}`,E=[];for(let e=0;e<f;e++)E.push(t.html`
809
+ <div
810
+ class="${b}"
811
+ style="${S};background-color:${u};${w};opacity:0;transition:opacity 0.3s"
812
+ ${(0,n.ref)(e=>{e&&x.bind(e)})}
813
+ ></div>
814
+ `);function D(e){let t=Array.from(e.querySelectorAll(`.${b}`));setTimeout(()=>{t.forEach(e=>e.style.opacity=`1`),g&&setTimeout(()=>{t.forEach(e=>e.style.opacity=`0`)},_)},h)}return e.LycoComponent(`SkeletonLoader`,t.html`
709
815
  <style>
710
- ${`
711
- @keyframes ${s+`-shimmer`} {
712
- 0% { background-color: #eee; }
713
- 50% { background-color: #ddd; }
714
- 100% { background-color: #eee; }
715
- }
716
- `}
717
- .${s} {
718
- ${u};
719
- background-color: #eee;
720
- ${a?`animation: ${s+`-shimmer`} 1.2s infinite ease-in-out`:``};
721
- }
816
+ ${C}
722
817
  </style>
723
818
  <div
724
- ${(0,l.ref)(e=>{e?d.bind(e):d.unbindAll()})}
725
- class="${s}"
726
- ></div>
727
- `)}function ue(e){let t=C(e?.on??{});return c.html`<div
728
- ${(0,l.ref)(e=>{e?t.bind(e):t.unbindAll()})}
819
+ style="${T}"
820
+ ${(0,n.ref)(e=>e&&D(e))}
821
+ >
822
+ ${E}
823
+ </div>
824
+ `)}function re(r){let i=e.createEventBinder(r?.on??{});return t.html`<div
825
+ ${(0,n.ref)(e=>{e?i.bind(e):i.unbindAll()})}
729
826
  style="flex: 1 1 auto;"
730
- ></div>`}function $(e,t){if(t===void 0){let t=t=>$(e,t??c.html``);return t.html=(t,...n)=>$(e,(0,c.html)(t,...n)),t}let n=e?.top?`top: ${e.top};`:``,r=e?.bottom?`bottom: ${e.bottom};`:``,i=typeof e?.zIndex==`number`?`z-index: ${e.zIndex};`:``,a=C(e?.on??{});return c.html`
827
+ ></div>`}function Z(r,i){if(i===void 0){let e=e=>Z(r,e??t.html``);return e.html=(e,...n)=>Z(r,(0,t.html)(e,...n)),e}let a=r?.top?`top: ${r.top};`:``,o=r?.bottom?`bottom: ${r.bottom};`:``,s=typeof r?.zIndex==`number`?`z-index: ${r.zIndex};`:``,c=e.createEventBinder(r?.on??{});return t.html`
731
828
  <div
732
- ${(0,l.ref)(e=>{e?a.bind(e):a.unbindAll()})}
829
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
733
830
  style="
734
831
  position: sticky;
735
- ${n} ${r}
736
- ${i}
832
+ ${a} ${o}
833
+ ${s}
737
834
  "
738
835
  >
739
- ${d(t)}
836
+ ${e.renderFn(i)}
740
837
  </div>
741
- `}function de(e,t){if(t===void 0){let t=t=>de(e,t??c.html``);return t.html=(t,...n)=>de(e,(0,c.html)(t,...n)),t}let n=b(`Table`),r=e?.className??v(`Table::table`)+`-lyco-now-${n}`,i=e?.striped?`
742
- .${r} tr:nth-child(even) { background: #f9f9f9; }
743
- `:``,a=e?.hover?`
744
- .${r} tr:hover { background: #f1f1f1; }
745
- `:``,o=e?.bordered?`
746
- .${r}, .${r} th, .${r} td { border: 1px solid #ddd; }
747
- `:``,s=`
748
- /* 将表格包裹在带有 _className 的 div 里,使后续 CSS 作用于该 div 下的 table */
749
- .${r} table {
838
+ `}function Q(r,i){if(i===void 0){let e=e=>Q(r,e??t.html``);return e.html=(e,...n)=>Q(r,(0,t.html)(e,...n)),e}let a=e.getComponentCount(`Table`),o=r?.className??e.getRandomClassName(`Table::table`)+`-lyco-now-${a}`,s=r?.striped?`
839
+ .${o} tr:nth-child(even) {
840
+ background: ${O.colors.surface};
841
+ }
842
+ `:``,c=r?.hover?`
843
+ .${o} tr:hover {
844
+ background: ${O.colors.primaryContainer};
845
+ cursor: pointer;
846
+ }
847
+ `:``,l=r?.bordered?`
848
+ .${o}, .${o} th, .${o} td {
849
+ border: 1px solid ${O.colors.surfaceVariant};
850
+ }
851
+ `:``,u=`
852
+ .${o} table {
750
853
  width: 100%;
751
- border-collapse: collapse;
854
+ border-collapse: separate;
855
+ border-spacing: 0;
856
+ border-radius: ${O.borderRadius.medium};
857
+ overflow: hidden;
858
+ box-shadow: ${O.elevation.level1};
752
859
  }
753
- .${r} th,
754
- .${r} td {
755
- padding: 8px 12px;
860
+ .${o} th,
861
+ .${o} td {
862
+ padding: 16px;
756
863
  text-align: left;
864
+ transition: background ${O.animation.standard};
757
865
  }
758
- ${i}
759
- ${a}
760
- ${o}
761
- `,u=C(e?.on??{});return x(`Table`,c.html`
866
+ .${o} th {
867
+ background: ${O.colors.surfaceVariant};
868
+ color: ${O.colors.onSurfaceVariant};
869
+ font-weight: 500;
870
+ }
871
+ .${o} td {
872
+ border-bottom: 1px solid ${O.colors.surfaceVariant};
873
+ }
874
+ ${s}
875
+ ${c}
876
+ ${l}
877
+ `,d=e.createEventBinder(r?.on??{});return e.LycoComponent(`Table`,t.html`
762
878
  <style>
763
- ${s}
879
+ ${u}
764
880
  </style>
765
881
 
766
882
  <div
767
- ${(0,l.ref)(e=>{e?u.bind(e):u.unbindAll()})}
768
- class="${r}"
883
+ ${(0,n.ref)(e=>{e?d.bind(e):d.unbindAll()})}
884
+ class="${o}"
769
885
  >
770
886
  <table>
771
- ${d(t)}
887
+ ${e.renderFn(i)}
772
888
  </table>
773
889
  </div>
774
- `)}function fe(e,t){let n=e?.direction??`row`,r=C(e?.on??{});return t===void 0?t=>fe(e,t??c.html``):c.html`
890
+ `)}function ie(r,i){let a=r?.direction??`row`,o=e.createEventBinder(r?.on??{});return i===void 0?e=>ie(r,e??t.html``):t.html`
775
891
  <div
776
- ${(0,l.ref)(e=>{e?r.bind(e):r.unbindAll()})}
892
+ ${(0,n.ref)(e=>{e?o.bind(e):o.unbindAll()})}
777
893
  style="
778
894
  display: flex;
779
- flex-direction: ${n};
895
+ flex-direction: ${a};
780
896
  flex-wrap: wrap;
781
- ${e?.gap?`gap: ${e.gap};`:``}
782
- ${e?.align?`align-items: ${e.align};`:``}
783
- ${e?.justify?`justify-content: ${e.justify};`:``}
897
+ ${r?.gap?`gap: ${r.gap};`:``}
898
+ ${r?.align?`align-items: ${r.align};`:``}
899
+ ${r?.justify?`justify-content: ${r.justify};`:``}
784
900
  "
785
901
  >
786
- ${f(t)}
902
+ ${e.renderFnOrArray(i)}
787
903
  </div>
788
- `}function pe(e,t){let n=e?.width?`width: ${e.width};`:``,r=e?.height?`height: ${e.height};`:``,i=e?.background?`background: ${e.background};`:``,a=C(e?.on??{});if(t===void 0)return t=>pe(e,t??[c.html``]);let o=`flex-start`,s=`flex-start`;switch(e?.align){case`top-right`:o=`flex-end`,s=`flex-start`;break;case`center`:o=`center`,s=`center`;break;case`bottom-left`:o=`flex-start`,s=`flex-end`;break;case`bottom-right`:o=`flex-end`,s=`flex-end`;break;default:o=`flex-start`,s=`flex-start`}return c.html`
904
+ `}function ae(r,i){let a=r?.width?`width: ${r.width};`:``,o=r?.height?`height: ${r.height};`:``,s=r?.background?`background: ${r.background};`:``,c=e.createEventBinder(r?.on??{});if(i===void 0)return e=>ae(r,e??[t.html``]);let l=`flex-start`,u=`flex-start`;switch(r?.align){case`top-right`:l=`flex-end`,u=`flex-start`;break;case`center`:l=`center`,u=`center`;break;case`bottom-left`:l=`flex-start`,u=`flex-end`;break;case`bottom-right`:l=`flex-end`,u=`flex-end`;break;default:l=`flex-start`,u=`flex-start`}return t.html`
789
905
  <div
790
- ${(0,l.ref)(e=>{e?a.bind(e):a.unbindAll()})}
906
+ ${(0,n.ref)(e=>{e?c.bind(e):c.unbindAll()})}
791
907
  style="
792
908
  position: relative;
793
909
  display: flex;
794
- justify-content: ${o};
795
- align-items: ${s};
796
- ${n} ${r} ${i}
910
+ justify-content: ${l};
911
+ align-items: ${u};
912
+ ${a} ${o} ${s}
797
913
  "
798
914
  >
799
- ${f(t)}
915
+ ${e.renderFnOrArray(i)}
916
+ </div>
917
+ `}function oe(r){let{value:i=``,options:a=[],placeholder:o=``,disabled:s=!1,error:c=!1,className:l=``,style:u=``,maxHeight:d=`300px`,onChange:f,onInput:p,onFocus:m,onBlur:h,on:g={},optionRender:_}=r??{},v=e.getComponentCount(`Combobox`),y=e.getRandomClassName(`Combobox::combobox`)+`-lyco-now-${v}`,b=!1,x=null,S=`
918
+ .${y} {
919
+ position: relative;
920
+ width: 100%;
921
+ }
922
+
923
+ .${y} input {
924
+ width: 100%;
925
+ padding: 12px 16px;
926
+ font-size: 16px;
927
+ border: 1px solid ${c?O.colors.error:O.colors.surfaceVariant};
928
+ border-radius: ${O.borderRadius.small};
929
+ color: ${O.colors.onSurface};
930
+ transition: all ${O.animation.standard};
931
+ outline: none;
932
+ box-sizing: border-box;
933
+ }
934
+
935
+ .${y} input:focus {
936
+ border-color: ${O.colors.primary};
937
+ box-shadow: 0 0 0 2px ${O.colors.primaryContainer};
938
+ }
939
+
940
+ .${y} input:disabled {
941
+ background: ${O.colors.surfaceVariant};
942
+ color: ${O.colors.onSurfaceVariant};
943
+ cursor: not-allowed;
944
+ }
945
+
946
+ .${y} .options {
947
+ position: absolute;
948
+ top: 100%;
949
+ left: 0;
950
+ right: 0;
951
+ max-height: ${d};
952
+ overflow-y: auto;
953
+ border: 1px solid ${O.colors.surfaceVariant};
954
+ border-radius: ${O.borderRadius.small};
955
+ box-shadow: ${O.elevation.level2};
956
+ z-index: 1000;
957
+ display: none;
958
+ }
959
+
960
+ .${y} .options.open {
961
+ display: block;
962
+ }
963
+
964
+ .${y} .option {
965
+ padding: 12px 16px;
966
+ cursor: pointer;
967
+ transition: background ${O.animation.standard};
968
+ }
969
+
970
+ .${y} .option:hover {
971
+ background: ${O.colors.primaryContainer};
972
+ }
973
+
974
+ .${y} .option.selected {
975
+ background: ${O.colors.primaryContainer};
976
+ color: ${O.colors.onPrimaryContainer};
977
+ }
978
+ `,C=e.createEventBinder(g),w=null,T=()=>{b?w?.classList.remove(`open`):w?.classList.add(`open`),b=!b},E=(e,t)=>{if(x){x.value=e.value;let n=t.currentTarget;Array.from(w?.querySelectorAll(`.selected`)??[]).forEach(e=>e.classList.remove(`selected`)),!n.classList.contains(`selected`)&&n.classList.add(`selected`),f?.(e.value)}T()},D=e=>{let t=e.target;t.closest(`.${y}`)||(b=!1,w?.classList.remove(`open`))};return typeof window<`u`&&document.addEventListener(`click`,D),e.LycoComponent(`Combobox`,t.html`
979
+ <style>
980
+ ${S}
981
+ </style>
982
+ <div class="${y} ${l}" style="${u}">
983
+ <input
984
+ ${(0,n.ref)(e=>{e?(x=e,C.bind(e)):C.unbindAll()})}
985
+ type="text"
986
+ .value=${i}
987
+ placeholder=${o}
988
+ ?disabled=${s}
989
+ @focus=${()=>{m?.(),T()}}
990
+ @input=${e=>{let t=e.target;p?.(t.value)}}
991
+ @change=${e=>{let t=e.target;f?.(t.value)}}
992
+ />
993
+ <div
994
+ ${(0,n.ref)(e=>{e&&(w=e)})}
995
+ class="options"
996
+ >
997
+ ${a.map(e=>t.html`
998
+ <div
999
+ class="option ${e.value===(x?.value??i)?`selected`:``}"
1000
+ @click=${t=>E(e,t)}
1001
+ >
1002
+ ${_?_(e):e.label}
1003
+ </div>
1004
+ `)}
1005
+ </div>
1006
+ </div>
1007
+ `)}function se(r){let i=Math.min(100,Math.max(0,r?.value??0)),a=Math.min(100,Math.max(0,r?.bufferValue??0)),o=r?.color??`#1976d2`,s=r?.secondaryColor??`#90caf9`,c=r?.backgroundColor??`#e0e0e0`,l=r?.height??`4px`,u=r?.radius??`4px`,d=r?.showLabel??!1,f=r?.labelPosition??`inside`,p=r?.labelColor??(i>50?`white`:o),m=r?.labelFontSize??`12px`,h=r?.striped??!1,g=r?.animated??!1,_=r?.paused??!1,v=r?.transitionDuration??`0.3s`,y=r?.className??``,b=r?.style??``,x=e.createEventBinder(r?.on??{}),S=h?`background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
1008
+ background-size: 1rem 1rem;
1009
+ animation: progress-stripes 1s linear infinite;
1010
+ animation-play-state: ${_?`paused`:`running`};`:``;return t.html`
1011
+ <style>
1012
+ ${t.css`
1013
+ @keyframes progress-stripes {
1014
+ from {
1015
+ background-position: 1rem 0;
1016
+ }
1017
+ to {
1018
+ background-position: 0 0;
1019
+ }
1020
+ }
1021
+ `.cssText}
1022
+ </style>
1023
+
1024
+ <div
1025
+ ${(0,n.ref)(e=>{e?x.bind(e):x.unbindAll()})}
1026
+ class="lyco-progress ${y}"
1027
+ role="progressbar"
1028
+ aria-valuemin="0"
1029
+ aria-valuemax="100"
1030
+ aria-valuenow="${i}"
1031
+ style="
1032
+ width: 100%;
1033
+ background: ${c};
1034
+ border-radius: ${u};
1035
+ height: ${l};
1036
+ position: relative;
1037
+ overflow: hidden;
1038
+ display: flex;
1039
+ align-items: center;
1040
+ ${b}
1041
+ "
1042
+ >
1043
+ ${r?.prefixIcon}
1044
+ <!-- 缓冲进度 -->
1045
+ <div
1046
+ style="
1047
+ position: absolute;
1048
+ width: ${a}%;
1049
+ height: 100%;
1050
+ background: ${s};
1051
+ transition: width ${v} ease;
1052
+ "
1053
+ ></div>
1054
+ <!-- 主进度 -->
1055
+ <div
1056
+ style="
1057
+ position: absolute;
1058
+ width: ${i}%;
1059
+ height: 100%;
1060
+ background: ${o};
1061
+ border-radius: ${u};
1062
+ transition: width ${v} ease;
1063
+ ${S}
1064
+ "
1065
+ ></div>
1066
+
1067
+ <!-- 文本标签 -->
1068
+ ${d?t.html`
1069
+ <div
1070
+ style="
1071
+ position: ${f===`inside`?`absolute`:`relative`};
1072
+ ${f===`inside`?`right: 8px; top: 50%; transform: translateY(-50%);`:`margin-left: auto; margin-right: 4px;`}
1073
+ font-size: ${m};
1074
+ color: ${p};
1075
+ z-index: 1;
1076
+ "
1077
+ >
1078
+ ${i}%
1079
+ </div>
1080
+ `:``}
1081
+ ${r?.suffixIcon}
800
1082
  </div>
801
- `}exports.AbsoluteBox=R,exports.AcrylicBar=z,exports.AspectRatio=B,exports.AutoFitGrid=V,exports.AvatarStack=H,exports.Badge=U,exports.Canvas=G,exports.Card=K,exports.Center=q,exports.Column=T,exports.ColumnSplit=P,exports.Container=J,exports.Divider=te,exports.Flex=E,exports.FlowItem=D,exports.FooterLayout=Y,exports.ForEach=ne,exports.Grid=O,exports.GridBreakpoint=X,exports.GridCol=k,exports.GridItem=A,exports.GridRow=j,exports.HeroSection=re,exports.Hidden=Z,exports.LightboxContainer=w,exports.List=ae,exports.ListGroup=oe,exports.ListItem=ie,exports.Overlay=se,exports.PositionContainer=Q,exports.Row=M,exports.RowSplit=F,exports.ScrollBar=I,exports.SideBarContainer=L,exports.SizedBox=ce,exports.SkeletonLoader=le,exports.Spacer=ue,exports.Sticky=$,exports.Swiper=ee,exports.Table=de,exports.WaterFlow=N,exports.Wrap=fe,exports.ZStack=pe;
1083
+ `}function ce(r){let{size:i=`24px`,color:a=O.colors.primary,thickness:o=`2px`,speed:s=`1.2s`,className:c=``,opacity:l=1,startAngle:u=0,easing:d=`linear`,reverse:f=!1,style:p=``,on:m={},children:h,svgMode:g=!1,strokeLinecap:_=`butt`,strokeDasharray:v=``}=r??{},y=e.createEventBinder(m),b=e.getComponentCount(`Spinner`),x=t.html`
1084
+ <div
1085
+ class="${c}"
1086
+ style="display: inline-flex; align-items: center; justify-content: center; width: ${i}; height: ${i}; ${p}"
1087
+ ${(0,n.ref)()}
1088
+ >
1089
+ <div
1090
+ style="
1091
+ width: 100%;
1092
+ height: 100%;
1093
+ border: ${o} solid ${a};
1094
+ border-right-color: transparent;
1095
+ border-radius: 50%;
1096
+ box-sizing: border-box;
1097
+ opacity: ${l};
1098
+ animation: lyco-spin-${b} ${s} ${d} infinite ${f?`reverse`:`normal`};
1099
+ "
1100
+ ></div>
1101
+ </div>
1102
+ <style>
1103
+ ${t.css`
1104
+ @keyframes lyco-spin-${b} {
1105
+ from {
1106
+ transform: rotate(${u}deg);
1107
+ }
1108
+ to {
1109
+ transform: rotate(${u+360}deg);
1110
+ }
1111
+ }
1112
+ `.cssText}
1113
+ </style>
1114
+ `,S=t.html`
1115
+ <div
1116
+ class="${c}"
1117
+ style="display: inline-flex; align-items: center; justify-content: center; width: ${i}; height: ${i}; ${p}"
1118
+ ${(0,n.ref)(e=>{e?y.bind(e):y.unbindAll()})}
1119
+ >
1120
+ <svg
1121
+ width="100%"
1122
+ height="100%"
1123
+ viewBox="0 0 100 100"
1124
+ style="opacity: ${l}; overflow: visible; filter: drop-shadow(${O.elevation.level1});"
1125
+ >
1126
+ <circle
1127
+ cx="50"
1128
+ cy="50"
1129
+ r="45"
1130
+ fill="none"
1131
+ stroke="${a}"
1132
+ style="
1133
+ stroke-width: ${o};
1134
+ stroke-linecap: ${_};
1135
+ stroke-dasharray: ${v};
1136
+ transform-origin: 50% 50%;
1137
+ animation: lyco-svg-spin-${b} ${s} ${d} infinite ${f?`reverse`:`normal`};
1138
+ "
1139
+ ></circle>
1140
+ </svg>
1141
+ </div>
1142
+ <style>
1143
+ ${t.css`
1144
+ @keyframes lyco-svg-spin-${b} {
1145
+ from {
1146
+ transform: rotate(${u}deg);
1147
+ }
1148
+ to {
1149
+ transform: rotate(${u+360}deg);
1150
+ }
1151
+ }
1152
+ `.cssText}
1153
+ </style>
1154
+ `;return e.LycoComponent(`Spinner`,g?S:x)}let $=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({});function le(r,i){let{content:a,placement:o=$.Top,delay:s={show:200,hide:100},offset:c=8,hideOnClick:l=!1,interactive:u=!1,maxWidth:d=`200px`,theme:f=`dark`,className:p=``,style:m=``,zIndex:h=1e3,on:g={},onShow:_,onHide:v}=r,y=e.createEventBinder(g),b,x;function S(e){clearTimeout(x),b=window.setTimeout(()=>{w.style.visibility=`visible`,w.style.opacity=`1`,_?.()},s.show)}function C(){clearTimeout(b),x=window.setTimeout(()=>{w.style.visibility=`hidden`,w.style.opacity=`0`,v?.()},s.hide)}let w,T=r=>t.html`
1155
+ <div
1156
+ ${(0,n.ref)(e=>{e?(y.bind(e),w=e.querySelector(`.lyco-tooltip-content`),e.addEventListener(`mouseenter`,()=>S(e)),e.addEventListener(`mouseleave`,()=>C()),l&&e.addEventListener(`click`,()=>C())):y.unbindAll()})}
1157
+ class="lyco-tooltip lyco-tooltip--${f} ${p}"
1158
+ style="position: relative; display: inline-block; ${m}"
1159
+ >
1160
+ ${e.renderFn(r)}
1161
+ <div
1162
+ class="lyco-tooltip-content"
1163
+ style="
1164
+ position: absolute;
1165
+ max-width: ${d};
1166
+ ${o===$.Top?`bottom: 100%; left: 50%; transform: translateX(-50%)`:``}
1167
+ ${o===$.Bottom?`top: 100%; left: 50%; transform: translateX(-50%)`:``}
1168
+ ${o===$.Left?`right: 100%; top: 50%; transform: translateY(-50%)`:``}
1169
+ ${o===$.Right?`left: 100%; top: 50%; transform: translateY(-50%)`:``}
1170
+ padding: 4px 8px;
1171
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
1172
+ background: ${f===`light`?`white; color: black`:`rgba(0,0,0,0.8); color: white`};
1173
+ border-radius: 4px;
1174
+ font-size: 12px;
1175
+ white-space: normal;
1176
+ width: ${o===$.Left||o===$.Right?d:`auto`};
1177
+ visibility: hidden;
1178
+ opacity: 0;
1179
+ transition: opacity ${s.show}ms;
1180
+ z-index: ${h};
1181
+ margin: ${typeof c==`number`?o===$.Top||o===$.Bottom?`${c}px 0`:`0 ${c}px`:`${c.y}px ${c.x}px`};
1182
+ ${u?`pointer-events: auto`:`pointer-events: none`};
1183
+ "
1184
+ >
1185
+ ${a}
1186
+ </div>
1187
+ </div>
1188
+ `;return e.renderFnOrCurry(i,T)}let ue=function(e){return e.Center=`center`,e.Left=`left`,e.Right=`right`,e.Top=`top`,e.Bottom=`bottom`,e.TopStart=`top-start`,e.TopEnd=`top-end`,e.BottomStart=`bottom-start`,e.BottomEnd=`bottom-end`,e.LeftStart=`left-start`,e.LeftEnd=`left-end`,e.RightStart=`right-start`,e.RightEnd=`right-end`,e}({});const de=typeof window>`u`,fe=!de&&`HTMLDialogElement`in window,pe=e=>`
1189
+ position: fixed;
1190
+ top: 0;
1191
+ left: 0;
1192
+ width: 100%;
1193
+ height: 100%;
1194
+ display: ${e?`flex`:`none`};
1195
+ align-items: center;
1196
+ justify-content: center;
1197
+ z-index: 1000;
1198
+ background: rgba(0,0,0,0.3);
1199
+ `;var me=class{constructor(e,t){this.isOpen=!1,this.returnValue=``,this.element=e,this.contentElement=t}show(){this.element.style.display=`flex`,this.isOpen=!0}showModal(){this.show()}close(){this.element.style.display=`none`,this.isOpen=!1,this.element.dispatchEvent(new Event(`close`))}get open(){return this.isOpen}getBoundingClientRect(){return this.contentElement.getBoundingClientRect()}get style(){return this.contentElement.style}};function he(r,i){let a=r?.open??!1,o=r?.onClose,s=r?.className??``,c=r?.style??``,l=e.createEventBinder(r?.on?r?.on:{}),u=r?.movable??!1,d=r?.placement??ue.Center,f=r?.proxyRef??{value:null},p=null,m=!1,h={x:0,y:0},g=null,_=r?.mask??!0,v=e.getComponentCount(`Dialog`),y=e.getRandomClassName(`Dialog::dialog`)+`-lyco-now-`+v;function b(e){return u?u===`self`?e:u&&`value`in u?u.value:null:null}function x(){if(typeof window>`u`)return``;let e=300,t=150,n=(window.innerWidth-e)/2,r=(window.innerHeight-t)/2;return`left: ${n}px; top: ${r}px;`}function S(){switch(d){case`left`:return`left: 32px; top: 50%;`;case`right`:return`right: 32px; top: 50%;`;case`top`:return`top: 32px; left: 50%;`;case`bottom`:return`bottom: 32px; left: 50%;`;case`top-start`:return`top: 32px; left: 32px;`;case`top-end`:return`top: 32px; right: 32px;`;case`bottom-start`:return`bottom: 32px; left: 32px;`;case`bottom-end`:return`bottom: 32px; right: 32px;`;case`left-start`:return`left: 32px; top: 32px;`;case`left-end`:return`left: 32px; bottom: 32px;`;case`right-start`:return`right: 32px; top: 32px;`;case`right-end`:return`right: 32px; bottom: 32px;`;default:return x()}}function C(){switch(d){case`top-start`:case`top-end`:case`bottom-start`:case`bottom-end`:case`left-start`:case`left-end`:case`right-start`:case`right-end`:return{txp:0,typ:0};case`left`:return{txp:0,typ:-50};case`right`:return{txp:0,typ:-50};case`top`:return{txp:-50,typ:0};case`bottom`:return{txp:-50,typ:0};default:return{txp:-50,typ:-50}}}function w(e,t){if(e.button!==0||(g=b(t),!g||!g.contains(e.target)))return;p=t,p.style.transform=`none`,e.preventDefault(),g.style.cursor=`grabbing`;let n=t.getBoundingClientRect(),{txp:r,typ:i}=C();h={x:e.clientX-(n.left+r/100*n.width),y:e.clientY-(n.top+i/100*n.height)},m=!0,document.addEventListener(`mousemove`,T),document.addEventListener(`mouseup`,E)}function T(e){if(!m||!g||!p)return;let t=p.getBoundingClientRect(),{txp:n,typ:r}=C(),i=e.clientX-h.x-n/100*t.width,a=e.clientY-h.y-r/100*t.height;p.style.left=`${i}px`,p.style.top=`${a}px`}function E(){m=!1,g=null,p=null,document.removeEventListener(`mousemove`,T),document.removeEventListener(`mouseup`,E)}function D(){let e=_?`rgba(0,0,0,0.5)`:`transparent`;return`
1200
+ ${y}::-webkit-backdrop,
1201
+ ${y}::backdrop {
1202
+ background: ${e};
1203
+ transition: opacity ${O.animation.standard};
1204
+ }
1205
+ `}function k(r){let i=null,d=null;return e.LycoComponent(`Dialog`,t.html`
1206
+ <div
1207
+ ${(0,n.ref)(e=>{if(e){if(i=e,d){let e=new me(i,d);f.value=e,l.bind(i),a?e.showModal():e.close()}}else l.unbindAll()})}
1208
+ @click=${e=>{e.target===e.currentTarget&&o?.()}}
1209
+ style=${pe(a)}
1210
+ >
1211
+ <div
1212
+ ${(0,n.ref)(e=>{if(e&&(d=e,i)){let e=new me(i,d);f.value=e}})}
1213
+ class="${y} ${s}"
1214
+ style="
1215
+ padding: 0;
1216
+ border: none;
1217
+ background: ${O.colors.surface};
1218
+ border-radius: ${O.borderRadius.large};
1219
+ min-width: 300px;
1220
+ ${S()}
1221
+ ${typeof u==`boolean`?``:`cursor: default;`}
1222
+ ${c}
1223
+ "
1224
+ >
1225
+ ${e.renderFnOrArray(r)}
1226
+ </div>
1227
+ </div>
1228
+ `)}function A(r){return de||!fe?k(r):e.LycoComponent(`Dialog`,t.html`
1229
+ <dialog
1230
+ ${(0,n.ref)(e=>{if(e){f.value=e;let t=e;l.bind(t),requestAnimationFrame(()=>{try{a?t.showModal():t.close()}catch(e){console.warn(`Dialog operation failed:`,e)}})}else l.unbindAll()})}
1231
+ @close=${o}
1232
+ @mousedown=${e=>w(e,e.currentTarget)}
1233
+ style="
1234
+ padding: 0;
1235
+ border: none;
1236
+ background: ${O.colors.surface};
1237
+ border-radius: ${O.borderRadius.large};
1238
+ min-width: 300px;
1239
+ margin: 0;
1240
+ position: fixed;
1241
+ box-shadow: ${O.elevation.level3};
1242
+ transition: transform ${O.animation.emphasized};
1243
+ ${S()}
1244
+ ${typeof u==`boolean`?``:`cursor: default;`}
1245
+ ${c}
1246
+ "
1247
+ >
1248
+ ${e.renderFnOrArray(r)}
1249
+ </dialog>
1250
+ <style>
1251
+ ${D()}
1252
+ </style>
1253
+ `)}return e.renderFnOrArrayOrCurry(i,A)}function ge(r,i){let a=r?.className??``,o=r?.style??``,s=e.createEventBinder(r?.on??{}),c=r=>t.html`
1254
+ <div
1255
+ ${(0,n.ref)(e=>{e?s.bind(e):s.unbindAll()})}
1256
+ class="lyco-dialog-actions ${a}"
1257
+ style="
1258
+ display: flex;
1259
+ align-items: center;
1260
+ justify-content: flex-end;
1261
+ padding: 8px 24px;
1262
+ ${o}
1263
+ "
1264
+ >
1265
+ ${e.renderFnOrArray(r)}
1266
+ </div>
1267
+ `;return e.renderFnOrArrayOrCurry(i,c)}function _e(r,i){let a=r?.variant??`text`,o=r?.color??`default`,s=r?.className??``,c=r?.style??``,l=e.createEventBinder({click:r?.onClick?e=>{var t;e.preventDefault(),(t=r.onClick)?.call(r,e)}:void 0,...r?.on}),u=r=>t.html`
1268
+ <button
1269
+ ${(0,n.ref)(e=>{e?l.bind(e):l.unbindAll()})}
1270
+ class="lyco-dialog-button ${a} ${o} ${s}"
1271
+ style="
1272
+ padding: 6px 16px;
1273
+ font-size: 14px;
1274
+ border-radius: 4px;
1275
+ cursor: pointer;
1276
+ border: none;
1277
+ outline: none;
1278
+ margin: 0 4px;
1279
+ ${a===`contained`?`background: #1976d2; color: white;`:`background: transparent;`}
1280
+ ${c}
1281
+ "
1282
+ >
1283
+ ${e.renderFn(r)}
1284
+ </button>
1285
+ `;return e.renderFnOrCurry(i,u)}function ve(n,r){let i=n?.className??``,a=n?.style??``,o=e.createEventBinder(n?.on??{}),s=n=>t.html`
1286
+ <div
1287
+ class="lyco-dialog-content ${i}"
1288
+ style="
1289
+ background: white;
1290
+ border-radius: 4px;
1291
+ padding: 20px;
1292
+ min-width: 300px;
1293
+ position: relative;
1294
+ ${a}
1295
+ "
1296
+ >
1297
+ ${e.renderFnOrArray(n)}
1298
+ </div>
1299
+ `;return e.renderFnOrArrayOrCurry(r,s)}function ye(r,i){let a=r?.className??``,o=r?.style??``,s=e.createEventBinder(r?.on??{}),c=r?.proxyRef??{value:null},l=r=>t.html`
1300
+ <div
1301
+ ${(0,n.ref)(e=>{e?(c.value=e,s.bind(e)):s.unbindAll()})}
1302
+ class="lyco-dialog-title ${a}"
1303
+ style="
1304
+ padding: 16px 24px;
1305
+ font-size: 20px;
1306
+ font-weight: 500;
1307
+ line-height: 1.6;
1308
+ letter-spacing: 0.0075em;
1309
+ ${o}
1310
+ "
1311
+ >
1312
+ ${e.renderFn(r)}
1313
+ </div>
1314
+ `;return e.renderFnOrCurry(i,l)}function be(t){return e.renderFnOrArray(t)}exports.$Html=be,exports.AbsoluteBox=A,exports.AcrylicBar=j,exports.AspectRatio=M,exports.AutoFitGrid=N,exports.AvatarStack=P,exports.Badge=F,exports.Canvas=L,exports.Card=R,exports.Center=z,exports.Column=m,exports.ColumnSplit=C,exports.Combobox=oe,exports.Container=B,exports.Dialog=he,exports.DialogActions=ge,exports.DialogButton=_e,exports.DialogContent=ve,exports.DialogPlacement=ue,exports.DialogTitle=ye,exports.Divider=V,exports.Flex=h,exports.FlowItem=g,exports.FooterLayout=H,exports.ForEach=U,exports.Grid=_,exports.GridBreakpoint=W,exports.GridCol=v,exports.GridItem=y,exports.GridRow=b,exports.HeroSection=G,exports.Hidden=K,exports.LightboxContainer=p,exports.List=q,exports.ListGroup=J,exports.ListItem=ee,exports.Overlay=Y,exports.PositionContainer=X,exports.Progress=se,exports.Row=x,exports.RowSplit=w,exports.ScrollBar=T,exports.SideBarContainer=E,exports.SizedBox=te,exports.SkeletonLoader=ne,exports.Spacer=re,exports.Spinner=ce,exports.Sticky=Z,exports.Swiper=D,exports.SwitchInput=k,exports.Table=Q,exports.Virtualizer=f,exports.VirtualizerController=c,exports.WaterFlow=S,exports.WithTooltip=le,exports.Wrap=ie,exports.ZStack=ae;
802
1315
  //# sourceMappingURL=index.cjs.js.map