lyco 1.3.0 → 1.3.6

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