- ${displayConfig.show_slider !== false ? this._renderFrameSlider() : ''}
- ${displayConfig.show_nav_buttons !== false ? this._renderNavButtons() : ''}
- ${displayConfig.show_play_pause !== false ? this._renderPlayPause() : ''}
- ${displayConfig.show_prev_next !== false ? this._renderPrevNext() : ''}
- ${displayConfig.show_frame_info !== false ? this._renderFrameInfo() : ''}
+ `:H``}};St.styles=[Ct,At],t([ht({attribute:!1})],St.prototype,"radarData",void 0),t([ht({attribute:!1})],St.prototype,"config",void 0),t([ht({attribute:!1})],St.prototype,"position",void 0),t([ht({attribute:!1})],St.prototype,"locale",void 0),t([ht({attribute:!1})],St.prototype,"timeZone",void 0),t([ht({attribute:!1})],St.prototype,"overlayOpacity",void 0),t([ht({attribute:!1})],St.prototype,"overlayPosition",void 0),St=t([lt("bom-metadata-section")],St);let Rt=class extends st{constructor(){super(...arguments),this.frames=[],this.currentFrameIndex=0,this.isPlaying=!1,this.isExtendedMode=!1,this.locale="en-AU"}_getDisplayConfig(){return!this.config||"boolean"==typeof this.config&&!this.config?null:"object"==typeof this.config?this.config:{}}render(){var t;const e=this._getDisplayConfig();if(!e)return H``;const a=null!==(t=e.position)&&void 0!==t?t:"below";return void 0!==this.position&&a!==this.position?H``:"overlay"===a?this._renderOverlay(e):H`
+
+ ${!1!==e.show_slider?this._renderFrameSlider():""}
+ ${!1!==e.show_nav_buttons?this._renderNavButtons():""}
+ ${!1!==e.show_play_pause?this._renderPlayPause():""}
+ ${!1!==e.show_prev_next?this._renderPrevNext():""}
+ ${!1!==e.show_frame_info?this._renderFrameInfo():""}
- `;
- }
- _renderOverlay(displayConfig) {
- var _a, _b;
- const opacity = (_a = this.overlayOpacity) !== null && _a !== void 0 ? _a : 0.9;
- const position = (_b = this.overlayPosition) !== null && _b !== void 0 ? _b : 'bottom';
- return x `
-
- ${displayConfig.show_slider !== false ? this._renderFrameSlider() : ''}
- ${displayConfig.show_play_pause !== false ? this._renderPlayPause() : ''}
- ${displayConfig.show_prev_next !== false ? this._renderPrevNext() : ''}
- ${displayConfig.show_frame_info !== false ? this._renderFrameInfo() : ''}
+ `}_renderOverlay(t){var e,a;const i=null!==(e=this.overlayOpacity)&&void 0!==e?e:.9,o=null!==(a=this.overlayPosition)&&void 0!==a?a:"bottom";return H`
+
+ ${!1!==t.show_slider?this._renderFrameSlider():""}
+ ${!1!==t.show_play_pause?this._renderPlayPause():""}
+ ${!1!==t.show_prev_next?this._renderPrevNext():""}
+ ${!1!==t.show_frame_info?this._renderFrameInfo():""}
- `;
- }
- _renderFrameSlider() {
- if (this.frames.length === 0)
- return x ``;
- return x `
+ `}_renderFrameSlider(){return 0===this.frames.length?H``:H`
- `;
- }
- _renderNavButtons() {
- if (this.frames.length === 0)
- return x ``;
- // Calculate dynamic skip amount based on total frames (1/3 of total, min 1, max 50)
- const skipAmount = this.isExtendedMode
- ? Math.max(1, Math.min(50, Math.round(this.frames.length / 3)))
- : 0;
- return x `
+ `}_renderNavButtons(){if(0===this.frames.length)return H``;const t=this.isExtendedMode?Math.max(1,Math.min(50,Math.round(this.frames.length/3))):0;return H`
- ${this.isExtendedMode ? x `
+ ${this.isExtendedMode?H`
+ @click="${()=>this.onJumpFrame&&this.onJumpFrame(-t)}"
+ ?disabled="${0===this.currentFrameIndex}"
+ title="Go back ${t} frames"
+ aria-label="Go back ${t} frames"
+ >-${t}
+ @click="${()=>this.onJumpFrame&&this.onJumpFrame(t)}"
+ ?disabled="${this.currentFrameIndex>=this.frames.length-1}"
+ title="Go forward ${t} frames"
+ aria-label="Go forward ${t} frames"
+ >+${t}
- ` : x `
+ `:H`
`}
- `;
- }
- _renderPlayPause() {
- return x `
+ `}_renderPlayPause(){return H`
- `;
- }
- _renderPrevNext() {
- return x `
+ `}_renderPrevNext(){return H`
- `;
- }
- _renderFrameInfo() {
- var _a, _b;
- const currentFrame = this.frames[this.currentFrameIndex];
- if (!currentFrame)
- return x ``;
- const showFrameTimes = this.showFrameTimes !== false;
- // Format frame info
- let frameInfoText = '';
- if (this.isExtendedMode && currentFrame.absoluteObservationTime) {
- frameInfoText = `Frame ${((_a = currentFrame.sequentialIndex) !== null && _a !== void 0 ? _a : this.currentFrameIndex) + 1} of ${this.frames.length}`;
- }
- else {
- frameInfoText = `Frame ${currentFrame.frameIndex + 1} of ${this.frames.length}`;
- }
- const progress = this.frames.length > 0
- ? Math.round(((this.currentFrameIndex + 1) / this.frames.length) * 100)
- : 0;
- return x `
+ `}_renderFrameInfo(){var t,e;const a=this.frames[this.currentFrameIndex];if(!a)return H``;const i=!1!==this.showFrameTimes;let o="";o=this.isExtendedMode&&a.absoluteObservationTime?`Frame ${(null!==(t=a.sequentialIndex)&&void 0!==t?t:this.currentFrameIndex)+1} of ${this.frames.length}`:`Frame ${a.frameIndex+1} of ${this.frames.length}`;const r=this.frames.length>0?Math.round((this.currentFrameIndex+1)/this.frames.length*100):0;return H`
- ${frameInfoText}
- ${showFrameTimes && currentFrame.absoluteObservationTime ? x `
+ ${o}
+ ${i&&a.absoluteObservationTime?H`
- ${formatTimestamp(currentFrame.absoluteObservationTime, this.locale, this.timeZone)}
+ ${kt(a.absoluteObservationTime,this.locale,this.timeZone)}
- ` : showFrameTimes && currentFrame.minutesAgo !== undefined ? x `
+ `:i&&void 0!==a.minutesAgo?H`
- ${currentFrame.minutesAgo} min ago
+ ${a.minutesAgo} min ago
- ` : ''}
- ${((_b = this.radarData) === null || _b === void 0 ? void 0 : _b.observationTime) && showFrameTimes ? x `
+ `:""}
+ ${(null===(e=this.radarData)||void 0===e?void 0:e.observationTime)&&i?H`
- Obs: ${formatTimestamp(this.radarData.observationTime, this.locale, this.timeZone)}
+ Obs: ${kt(this.radarData.observationTime,this.locale,this.timeZone)}
- ` : ''}
- ${progress}%
+ `:""}
+ ${r}%
- `;
- }
-};
-BomControlsSection.styles = [controlsStyles, overlayStyles];
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "frames", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "currentFrameIndex", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "isPlaying", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "isExtendedMode", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "radarData", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "config", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "position", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "locale", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "timeZone", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "overlayOpacity", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "overlayPosition", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "showFrameTimes", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "onFrameChange", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "onPrevious", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "onNext", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "onJumpFrame", void 0);
-__decorate([
- n({ attribute: false })
-], BomControlsSection.prototype, "onToggleAnimation", void 0);
-BomControlsSection = __decorate([
- t$1('bom-controls-section')
-], BomControlsSection);
-
-var _a;
-console.info(`%c BOM-LOCAL-RADAR-CARD \n%c Version ${CARD_VERSION} `, 'color: orange; font-weight: bold; background: black', 'color: white; font-weight: bold; background: dimgray');
-window.customCards = (_a = window.customCards) !== null && _a !== void 0 ? _a : [];
-window.customCards.push({
- type: 'bom-local-card',
- name: 'BOM Local Card',
- description: 'A rain radar card using the local BOM service',
-});
-let BomLocalRadarCard = class BomLocalRadarCard extends i {
- constructor() {
- super(...arguments);
- this.currentFrameIndex = 0;
- this.isLoading = false;
- this.isPlaying = false;
- this.frames = [];
- this.isExtendedMode = false;
- this.preloadedImages = [];
- this.apiService = new RadarApiService();
- /**
- * Handle keyboard navigation
- */
- this._handleKeyDown = (e) => {
- var _a;
- // Only handle if card is focused or contains focused element
- if (!((_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) && document.activeElement !== this) {
- return;
- }
- switch (e.key) {
- case 'ArrowLeft':
- e.preventDefault();
- this.previousFrame();
- break;
- case 'ArrowRight':
- e.preventDefault();
- this.nextFrame();
- break;
- case ' ':
- e.preventDefault();
- this.toggleAnimation();
- break;
- case 'Home':
- e.preventDefault();
- this.showFrame(0);
- break;
- case 'End':
- e.preventDefault();
- this.showFrame(this.frames.length - 1);
- break;
- }
- };
- }
- static async getConfigElement() {
- return document.createElement('bom-local-card-editor');
- }
- static getStubConfig() {
- return {
- type: 'custom:bom-local-card',
- suburb: 'Pomona',
- state: 'QLD',
- };
- }
- setConfig(config) {
- if (!config.suburb || !config.state) {
- throw new Error('suburb and state are required');
- }
- this._config = config;
- }
- /**
- * Dynamic card size based on configuration
- * Returns height in units (1 unit = 50px)
- */
- getCardSize() {
- let size = 4; // Base size for image (200px)
- // Add space for metadata if shown above/below
- const metadataConfig = this._getMetadataConfig();
- if (metadataConfig && typeof metadataConfig !== 'boolean') {
- if (metadataConfig.position !== 'overlay') {
- size += 1; // +50px for metadata section
- }
- }
- else if (metadataConfig === true) {
- size += 1;
- }
- // Add space for controls if shown below (not overlay)
- const controlsConfig = this._getControlsConfig();
- if (controlsConfig && typeof controlsConfig !== 'boolean') {
- if (controlsConfig.position !== 'overlay') {
- size += 2; // +100px for controls
- }
- }
- else if (controlsConfig === true) {
- // Default position is 'below', so add space
- size += 2;
- }
- return size;
- }
- /**
- * Define grid options for HA's sections view
- *
- * The radar image and its metadata load asynchronously and have responsive
- * minimum heights. Supplying rows here would make Home Assistant reserve a
- * fixed, much smaller grid area, then let the completed card paint over the
- * following section. Deliberately provide width guidance only and let the
- * Sections view measure the card's natural height.
- */
- getGridOptions() {
- return {
- columns: 6, // Default: half width
- min_columns: 3, // Minimum: quarter width
- max_columns: 12, // Can span full width
- };
- }
- /**
- * Fetches radar data from the local service via HA integration
- * Supports both latest frames and historical timeseries
- */
- async fetchRadarData() {
- const suburb = encodeURIComponent(this._config.suburb);
- const state = encodeURIComponent(this._config.state);
- const timespan = this._config.timespan || 'latest';
- this.isLoading = true;
- const options = {
- hass: this.hass,
- suburb,
- state,
- timespan: timespan !== 'latest' ? timespan : undefined,
- customStartTime: this._config.custom_start_time,
- customEndTime: this._config.custom_end_time,
- onError: (error) => {
- this.error = error;
- this.isLoading = false;
- // Auto-retry if applicable
- if (error.retryable && error.retryAfter) {
- if (this.retryTimer) {
- window.clearTimeout(this.retryTimer);
- }
- this.retryTimer = window.setTimeout(() => {
- this.retryTimer = undefined;
- this.fetchRadarData();
- }, error.retryAfter * 1000);
- }
- },
- };
- let data = null;
- if (timespan !== 'latest') {
- data = await this.apiService.fetchHistoricalFrames(options);
- }
- else {
- data = await this.apiService.fetchLatestFrames(options);
- }
- if (data) {
- this.error = undefined;
- this.radarData = data;
- this.frames = data.frames.sort((a, b) => a.frameIndex - b.frameIndex);
- this.isExtendedMode = timespan !== 'latest';
- this.isLoading = false;
- this.preloadImages(this.frames);
- if (this._config.auto_play !== false && !this.isPlaying) {
- this.startAnimation();
- }
- }
- return data;
- }
- /**
- * Gets the current frame image URL
- */
- getCurrentFrameUrl() {
- if (!this.frames || this.frames.length === 0) {
- return null;
- }
- const frame = this.frames[this.currentFrameIndex];
- return (frame === null || frame === void 0 ? void 0 : frame.imageUrl) || null;
- }
- /**
- * Helper to get metadata config
- */
- _getMetadataConfig() {
- const showMetadata = this._config.show_metadata;
- if (showMetadata === undefined) {
- return true; // Default: show all metadata
- }
- return showMetadata;
- }
- /**
- * Helper to get controls config
- */
- _getControlsConfig() {
- const showControls = this._config.show_controls;
- if (showControls === undefined) {
- return true; // Default: show all controls
- }
- return showControls;
- }
- /**
- * Check if metadata should be shown
- */
- _shouldShowMetadata() {
- const config = this._getMetadataConfig();
- return config !== false;
- }
- /**
- * Check if controls should be shown
- */
- _shouldShowControls() {
- const config = this._getControlsConfig();
- return config !== false;
- }
- /**
- * Get locale for formatting
- */
- _getLocale() {
- var _a, _b;
- return this._config.locale || ((_b = (_a = this.hass) === null || _a === void 0 ? void 0 : _a.locale) === null || _b === void 0 ? void 0 : _b.language) || 'en-AU';
- }
- /**
- * Check if frame should be preloaded (only nearby frames)
- */
- _shouldPreloadFrame(index) {
- const currentIndex = this.currentFrameIndex;
- // Preload current, next, and previous frames
- return Math.abs(index - currentIndex) <= 1;
- }
- /**
- * Preloads nearby frame images to prevent jiggle when switching
- * Cleans up old preloaded images to prevent memory leaks
- * Only preloads frames near the current frame for performance
- */
- preloadImages(frames) {
- // Clean up old preloaded images
- this.preloadedImages.forEach(img => {
- img.src = '';
- img.onload = null;
- img.onerror = null;
- });
- this.preloadedImages = [];
- // Only preload nearby frames
- frames.forEach((frame, index) => {
- if (this._shouldPreloadFrame(index)) {
- const img = new Image();
- img.src = frame.imageUrl;
- this.preloadedImages.push(img);
- }
- });
- }
- /**
- * Debounce helper
- */
- _debounce(func, wait) {
- let timeout;
- return (...args) => {
- window.clearTimeout(timeout);
- timeout = window.setTimeout(() => func(...args), wait);
- };
- }
- /**
- * Starts the frame animation loop using requestAnimationFrame
- * Ensures only one animation timer is active at a time
- */
- startAnimation() {
- // Always stop existing animation first to prevent accumulation
- this.stopAnimation();
- if (this.frames.length === 0) {
- return;
- }
- this.isPlaying = true;
- const frameInterval = (this._config.frame_interval || DEFAULT_FRAME_INTERVAL) * 1000;
- const restartDelay = DEFAULT_RESTART_DELAY;
- const maxFrame = this.frames.length - 1;
- let lastFrameTime = performance.now();
- const animate = (currentTime) => {
- // Check if we're still playing (might have been stopped)
- if (!this.isPlaying) {
- return;
- }
- // Check if animation was cleared (component disconnected)
- if (!this.animationTimer) {
- return;
- }
- const elapsed = currentTime - lastFrameTime;
- if (this.currentFrameIndex >= maxFrame) {
- // Check if we've waited long enough before restarting
- if (elapsed >= restartDelay) {
- this.currentFrameIndex = 0;
- this.requestUpdate();
- lastFrameTime = currentTime;
- }
- }
- else {
- // Check if it's time to advance to next frame
- if (elapsed >= frameInterval) {
- this.currentFrameIndex++;
- this.requestUpdate();
- lastFrameTime = currentTime;
- }
- }
- // Continue animation
- this.animationTimer = requestAnimationFrame(animate);
- };
- // Start animation
- this.animationTimer = requestAnimationFrame(animate);
- }
- /**
- * Stops the animation
- */
- stopAnimation() {
- if (this.animationTimer) {
- cancelAnimationFrame(this.animationTimer);
- this.animationTimer = undefined;
- }
- this.isPlaying = false;
- }
- /**
- * Toggles play/pause
- */
- toggleAnimation() {
- if (this.isPlaying) {
- this.stopAnimation();
- }
- else {
- this.startAnimation();
- }
- }
- /**
- * Shows a specific frame
- */
- showFrame(index) {
- if (index < 0 || index >= this.frames.length) {
- return;
- }
- this.currentFrameIndex = index;
- this.requestUpdate();
- }
- /**
- * Navigate to previous frame
- */
- previousFrame() {
- this.stopAnimation();
- const newIndex = this.currentFrameIndex > 0 ? this.currentFrameIndex - 1 : this.frames.length - 1;
- this.showFrame(newIndex);
- }
- /**
- * Navigate to next frame
- */
- nextFrame() {
- this.stopAnimation();
- const newIndex = (this.currentFrameIndex + 1) % this.frames.length;
- this.showFrame(newIndex);
- }
- /**
- * Jump forward/backward by N frames
- */
- jumpFrame(offset) {
- const newIndex = Math.max(0, Math.min(this.frames.length - 1, this.currentFrameIndex + offset));
- this.showFrame(newIndex);
- }
- /**
- * Auto-refresh data
- */
- startAutoRefresh() {
- if (this.refreshTimer) {
- window.clearInterval(this.refreshTimer);
- }
- const refreshInterval = (this._config.refresh_interval || DEFAULT_REFRESH_INTERVAL) * 1000;
- this.refreshTimer = window.setInterval(() => {
- this.fetchRadarData();
- }, refreshInterval);
- }
- /**
- * Stops auto-refresh
- */
- stopAutoRefresh() {
- if (this.refreshTimer) {
- window.clearInterval(this.refreshTimer);
- this.refreshTimer = undefined;
- }
- }
- async firstUpdated() {
- await this.fetchRadarData();
- this.startAutoRefresh();
- }
- connectedCallback() {
- super.connectedCallback();
- this.addEventListener('keydown', this._handleKeyDown);
- }
- disconnectedCallback() {
- super.disconnectedCallback();
- this.removeEventListener('keydown', this._handleKeyDown);
- this.stopAnimation();
- this.stopAutoRefresh();
- // Clean up retry timer
- if (this.retryTimer) {
- window.clearTimeout(this.retryTimer);
- this.retryTimer = undefined;
- }
- // Clean up preloaded images
- this.preloadedImages.forEach(img => {
- img.src = '';
- img.onload = null;
- img.onerror = null;
- });
- this.preloadedImages = [];
- }
- updated(changedProperties) {
- super.updated(changedProperties);
- // Handle config changes
- if (changedProperties.has('_config')) {
- const oldConfig = changedProperties.get('_config');
- if (oldConfig && this._config) {
- // If location or timespan changed, refetch data
- if (oldConfig.suburb !== this._config.suburb ||
- oldConfig.state !== this._config.state ||
- oldConfig.timespan !== this._config.timespan ||
- oldConfig.custom_start_time !== this._config.custom_start_time ||
- oldConfig.custom_end_time !== this._config.custom_end_time) {
- this.fetchRadarData();
- }
- // If refresh interval changed, restart auto-refresh
- if (oldConfig.refresh_interval !== this._config.refresh_interval) {
- this.startAutoRefresh();
- }
- // If frame interval changed and playing, restart animation
- if (oldConfig.frame_interval !== this._config.frame_interval && this.isPlaying) {
- this.stopAnimation();
- this.startAnimation();
- }
- }
- }
- }
- /**
- * Render metadata section
- */
- _renderMetadata(position) {
- var _a, _b, _c;
- const config = this._getMetadataConfig();
- if (!config || (typeof config === 'boolean' && !config)) {
- return '';
- }
- const displayConfig = typeof config === 'object' ? config : {};
- // Default position is 'above' if not specified
- const configPosition = (_a = displayConfig.position) !== null && _a !== void 0 ? _a : 'above';
- // Only render if position matches
- if (configPosition !== position) {
- return '';
- }
- return x `
+ `}};var Ft;Rt.styles=[$t,At],t([ht({attribute:!1})],Rt.prototype,"frames",void 0),t([ht({attribute:!1})],Rt.prototype,"currentFrameIndex",void 0),t([ht({attribute:!1})],Rt.prototype,"isPlaying",void 0),t([ht({attribute:!1})],Rt.prototype,"isExtendedMode",void 0),t([ht({attribute:!1})],Rt.prototype,"radarData",void 0),t([ht({attribute:!1})],Rt.prototype,"config",void 0),t([ht({attribute:!1})],Rt.prototype,"position",void 0),t([ht({attribute:!1})],Rt.prototype,"locale",void 0),t([ht({attribute:!1})],Rt.prototype,"timeZone",void 0),t([ht({attribute:!1})],Rt.prototype,"overlayOpacity",void 0),t([ht({attribute:!1})],Rt.prototype,"overlayPosition",void 0),t([ht({attribute:!1})],Rt.prototype,"showFrameTimes",void 0),t([ht({attribute:!1})],Rt.prototype,"onFrameChange",void 0),t([ht({attribute:!1})],Rt.prototype,"onPrevious",void 0),t([ht({attribute:!1})],Rt.prototype,"onNext",void 0),t([ht({attribute:!1})],Rt.prototype,"onJumpFrame",void 0),t([ht({attribute:!1})],Rt.prototype,"onToggleAnimation",void 0),Rt=t([lt("bom-controls-section")],Rt),console.info("%c BOM-LOCAL-RADAR-CARD \n%c Version 0.3.1 ","color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),window.customCards=null!==(Ft=window.customCards)&&void 0!==Ft?Ft:[],window.customCards.push({type:"bom-local-card",name:"BOM Local Card",description:"A rain radar card using the local BOM service"});let Mt=class extends st{constructor(){super(...arguments),this.currentFrameIndex=0,this.isLoading=!1,this.isPlaying=!1,this.frames=[],this.isExtendedMode=!1,this.preloadedImages=[],this.apiService=new yt,this._handleKeyDown=t=>{var e;if((null===(e=this.shadowRoot)||void 0===e?void 0:e.activeElement)||document.activeElement===this)switch(t.key){case"ArrowLeft":t.preventDefault(),this.previousFrame();break;case"ArrowRight":t.preventDefault(),this.nextFrame();break;case" ":t.preventDefault(),this.toggleAnimation();break;case"Home":t.preventDefault(),this.showFrame(0);break;case"End":t.preventDefault(),this.showFrame(this.frames.length-1)}}}static async getConfigElement(){return document.createElement("bom-local-card-editor")}static getStubConfig(){return{type:"custom:bom-local-card",suburb:"Pomona",state:"QLD"}}setConfig(t){if(!t.suburb||!t.state)throw new Error("suburb and state are required");this._config=t}getCardSize(){let t=4;const e=this._getMetadataConfig();e&&"boolean"!=typeof e?"overlay"!==e.position&&(t+=1):!0===e&&(t+=1);const a=this._getControlsConfig();return a&&"boolean"!=typeof a?"overlay"!==a.position&&(t+=2):!0===a&&(t+=2),t}getGridOptions(){return{columns:6,min_columns:3,max_columns:12}}async fetchRadarData(){const t=encodeURIComponent(this._config.suburb),e=encodeURIComponent(this._config.state),a=this._config.timespan||"latest";this.isLoading=!0;const i={hass:this.hass,suburb:t,state:e,timespan:"latest"!==a?a:void 0,customStartTime:this._config.custom_start_time,customEndTime:this._config.custom_end_time,onError:t=>{this.error=t,this.isLoading=!1,t.retryable&&t.retryAfter&&(this.retryTimer&&window.clearTimeout(this.retryTimer),this.retryTimer=window.setTimeout(()=>{this.retryTimer=void 0,this.fetchRadarData()},1e3*t.retryAfter))}};let o=null;return o="latest"!==a?await this.apiService.fetchHistoricalFrames(i):await this.apiService.fetchLatestFrames(i),o&&(this.error=void 0,this.radarData=o,this.frames=o.frames.sort((t,e)=>t.frameIndex-e.frameIndex),this.isExtendedMode="latest"!==a,this.isLoading=!1,this.preloadImages(this.frames),!1===this._config.auto_play||this.isPlaying||this.startAnimation()),o}getCurrentFrameUrl(){if(!this.frames||0===this.frames.length)return null;const t=this.frames[this.currentFrameIndex];return(null==t?void 0:t.imageUrl)||null}_getMetadataConfig(){const t=this._config.show_metadata;return void 0===t||t}_getControlsConfig(){const t=this._config.show_controls;return void 0===t||t}_shouldShowMetadata(){return!1!==this._getMetadataConfig()}_shouldShowControls(){return!1!==this._getControlsConfig()}_getLocale(){var t,e;return this._config.locale||(null===(e=null===(t=this.hass)||void 0===t?void 0:t.locale)||void 0===e?void 0:e.language)||"en-AU"}_shouldPreloadFrame(t){const e=this.currentFrameIndex;return Math.abs(t-e)<=1}preloadImages(t){this.preloadedImages.forEach(t=>{t.src="",t.onload=null,t.onerror=null}),this.preloadedImages=[],t.forEach((t,e)=>{if(this._shouldPreloadFrame(e)){const e=new Image;e.src=t.imageUrl,this.preloadedImages.push(e)}})}_debounce(t,e){let a;return(...i)=>{window.clearTimeout(a),a=window.setTimeout(()=>t(...i),e)}}startAnimation(){if(this.stopAnimation(),0===this.frames.length)return;this.isPlaying=!0;const t=1e3*(this._config.frame_interval||2),e=this.frames.length-1;let a=performance.now();const i=o=>{if(!this.isPlaying)return;if(!this.animationTimer)return;const r=o-a;this.currentFrameIndex>=e?r>=2e3&&(this.currentFrameIndex=0,this.requestUpdate(),a=o):r>=t&&(this.currentFrameIndex++,this.requestUpdate(),a=o),this.animationTimer=requestAnimationFrame(i)};this.animationTimer=requestAnimationFrame(i)}stopAnimation(){this.animationTimer&&(cancelAnimationFrame(this.animationTimer),this.animationTimer=void 0),this.isPlaying=!1}toggleAnimation(){this.isPlaying?this.stopAnimation():this.startAnimation()}showFrame(t){t<0||t>=this.frames.length||(this.currentFrameIndex=t,this.requestUpdate())}previousFrame(){this.stopAnimation();const t=this.currentFrameIndex>0?this.currentFrameIndex-1:this.frames.length-1;this.showFrame(t)}nextFrame(){this.stopAnimation();const t=(this.currentFrameIndex+1)%this.frames.length;this.showFrame(t)}jumpFrame(t){const e=Math.max(0,Math.min(this.frames.length-1,this.currentFrameIndex+t));this.showFrame(e)}startAutoRefresh(){this.refreshTimer&&window.clearInterval(this.refreshTimer);const t=1e3*(this._config.refresh_interval||30);this.refreshTimer=window.setInterval(()=>{this.fetchRadarData()},t)}stopAutoRefresh(){this.refreshTimer&&(window.clearInterval(this.refreshTimer),this.refreshTimer=void 0)}async firstUpdated(){await this.fetchRadarData(),this.startAutoRefresh()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown),this.stopAnimation(),this.stopAutoRefresh(),this.retryTimer&&(window.clearTimeout(this.retryTimer),this.retryTimer=void 0),this.preloadedImages.forEach(t=>{t.src="",t.onload=null,t.onerror=null}),this.preloadedImages=[]}updated(t){if(super.updated(t),t.has("_config")){const e=t.get("_config");e&&this._config&&(e.suburb===this._config.suburb&&e.state===this._config.state&&e.timespan===this._config.timespan&&e.custom_start_time===this._config.custom_start_time&&e.custom_end_time===this._config.custom_end_time||this.fetchRadarData(),e.refresh_interval!==this._config.refresh_interval&&this.startAutoRefresh(),e.frame_interval!==this._config.frame_interval&&this.isPlaying&&(this.stopAnimation(),this.startAnimation()))}}_renderMetadata(t){var e,a,i;const o=this._getMetadataConfig();if(!o||"boolean"==typeof o&&!o)return"";return(null!==(e=("object"==typeof o?o:{}).position)&&void 0!==e?e:"above")!==t?"":H`
- `;
- }
- /**
- * Render radar image with zoom and overlay support
- */
- _renderRadarImage() {
- const zoom = this._config.image_zoom || 1.0;
- const fit = this._config.image_fit || 'contain';
- const controlsConfig = this._getControlsConfig();
- const controlsPosition = typeof controlsConfig === 'object' && controlsConfig.position === 'overlay';
- const metadataConfig = this._getMetadataConfig();
- const metadataPosition = typeof metadataConfig === 'object' && metadataConfig.position === 'overlay';
- const currentFrameUrl = this.getCurrentFrameUrl();
- return x `
-
- ${this.isLoading
- ? x `
+ `}_renderRadarImage(){const t=this._config.image_zoom||1,e=this._config.image_fit||"contain",a=this._getControlsConfig(),i="object"==typeof a&&"overlay"===a.position,o=this._getMetadataConfig(),r="object"==typeof o&&"overlay"===o.position,s=this.getCurrentFrameUrl();return H`
+
+ ${this.isLoading?H`
Loading radar data...
- `
- : currentFrameUrl
- ? x `
+ `:s?H`

{
- this.error = {
- message: 'Failed to load radar image',
- type: 'unknown',
- retryable: true,
- retryAction: () => this.fetchRadarData(),
- };
- }}"
+ style="transform: scale(${t}); transform-origin: center center;"
+ @error="${()=>{this.error={message:"Failed to load radar image",type:"unknown",retryable:!0,retryAction:()=>this.fetchRadarData()}}}"
/>
- ${controlsPosition ? this._renderControls('overlay') : ''}
- ${metadataPosition ? this._renderMetadata('overlay') : ''}
- `
- : ''}
+ ${i?this._renderControls("overlay"):""}
+ ${r?this._renderMetadata("overlay"):""}
+ `:""}
- `;
- }
- /**
- * Render controls section
- */
- _renderControls(position) {
- var _a, _b;
- const config = this._getControlsConfig();
- if (!config || (typeof config === 'boolean' && !config)) {
- return x ``;
- }
- const metadataConfig = this._getMetadataConfig();
- const showFrameTimes = metadataConfig && typeof metadataConfig === 'object' && metadataConfig.show_frame_times !== false;
- return x `
+ `}_renderControls(t){var e,a;const i=this._getControlsConfig();if(!i||"boolean"==typeof i&&!i)return H``;const o=this._getMetadataConfig(),r=o&&"object"==typeof o&&!1!==o.show_frame_times;return H`
this.showFrame(index)}
- .onPrevious=${() => this.previousFrame()}
- .onNext=${() => this.nextFrame()}
- .onJumpFrame=${(offset) => this.jumpFrame(offset)}
- .onToggleAnimation=${() => this.toggleAnimation()}
+ .showFrameTimes=${r}
+ .onFrameChange=${t=>this.showFrame(t)}
+ .onPrevious=${()=>this.previousFrame()}
+ .onNext=${()=>this.nextFrame()}
+ .onJumpFrame=${t=>this.jumpFrame(t)}
+ .onToggleAnimation=${()=>this.toggleAnimation()}
>
- `;
- }
- render() {
- var _a, _b;
- if (!this._config) {
- return x `
Configuration error`;
- }
- // Use HA card header if title is configured
- const cardTitle = this._config.show_card_title !== false && this._config.card_title
- ? this._config.card_title
- : undefined;
- // Render error state
- if (this.error) {
- return x `
-
+ `}render(){var t,e;if(!this._config)return H`Configuration error`;const a=!1!==this._config.show_card_title&&this._config.card_title?this._config.card_title:void 0;return this.error?H`
+
{
- var _a;
- if ((_a = this.error) === null || _a === void 0 ? void 0 : _a.retryAction) {
- this.error.retryAction();
- }
- }}
+ .timeZone=${null===(e=null===(t=this.hass)||void 0===t?void 0:t.config)||void 0===e?void 0:e.time_zone}
+ .onRetry=${()=>{var t;(null===(t=this.error)||void 0===t?void 0:t.retryAction)&&this.error.retryAction()}}
>
- `;
- }
- return x `
+ `:H`
- ${this._renderMetadata('above')}
- ${this._renderControls('above')}
+ ${this._renderMetadata("above")}
+ ${this._renderControls("above")}
${this._renderRadarImage()}
- ${this._renderMetadata('below')}
- ${this._renderControls('below')}
+ ${this._renderMetadata("below")}
+ ${this._renderControls("below")}
- `;
- }
- /**
- * Get CSS classes for root element
- */
- _getRootClasses() {
- const classes = [];
- const controlsConfig = this._getControlsConfig();
- const controlsPosition = typeof controlsConfig === 'object' && controlsConfig.position === 'overlay';
- const metadataConfig = this._getMetadataConfig();
- const metadataPosition = typeof metadataConfig === 'object' && metadataConfig.position === 'overlay';
- if (controlsPosition || metadataPosition) {
- classes.push('overlay-enabled');
- }
- return classes.join(' ');
- }
-};
-BomLocalRadarCard.styles = [
- cardStyles,
- imageStyles,
- controlsStyles,
- metadataStyles,
- overlayStyles,
- errorStyles,
-];
-__decorate([
- n({ attribute: false })
-], BomLocalRadarCard.prototype, "hass", void 0);
-__decorate([
- n({ attribute: false })
-], BomLocalRadarCard.prototype, "_config", void 0);
-__decorate([
- n({ attribute: false })
-], BomLocalRadarCard.prototype, "editMode", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "radarData", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "currentFrameIndex", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "isLoading", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "error", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "animationTimer", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "refreshTimer", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "retryTimer", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "isPlaying", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "frames", void 0);
-__decorate([
- r$1()
-], BomLocalRadarCard.prototype, "isExtendedMode", void 0);
-BomLocalRadarCard = __decorate([
- t$1('bom-local-card')
-], BomLocalRadarCard);
-if (!customElements.get('bom-local-card')) {
- customElements.define('bom-local-card', BomLocalRadarCard);
-}
-
-export { BomLocalRadarCard };
-//# sourceMappingURL=bom-local-card.js.map
+ `}_getRootClasses(){const t=[],e=this._getControlsConfig(),a="object"==typeof e&&"overlay"===e.position,i=this._getMetadataConfig(),o="object"==typeof i&&"overlay"===i.position;return(a||o)&&t.push("overlay-enabled"),t.join(" ")}};Mt.styles=[xt,wt,$t,Ct,At,Et],t([ht({attribute:!1})],Mt.prototype,"hass",void 0),t([ht({attribute:!1})],Mt.prototype,"_config",void 0),t([ht({attribute:!1})],Mt.prototype,"editMode",void 0),t([pt()],Mt.prototype,"radarData",void 0),t([pt()],Mt.prototype,"currentFrameIndex",void 0),t([pt()],Mt.prototype,"isLoading",void 0),t([pt()],Mt.prototype,"error",void 0),t([pt()],Mt.prototype,"animationTimer",void 0),t([pt()],Mt.prototype,"refreshTimer",void 0),t([pt()],Mt.prototype,"retryTimer",void 0),t([pt()],Mt.prototype,"isPlaying",void 0),t([pt()],Mt.prototype,"frames",void 0),t([pt()],Mt.prototype,"isExtendedMode",void 0),Mt=t([lt("bom-local-card")],Mt),customElements.get("bom-local-card")||customElements.define("bom-local-card",Mt);export{Mt as BomLocalRadarCard};
diff --git a/package-lock.json b/package-lock.json
index e6ef183..653b2db 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,39 +13,15 @@
"lit": "^3.1.2"
},
"devDependencies": {
- "@rollup/plugin-commonjs": "^24.1.0",
- "@rollup/plugin-node-resolve": "^15.2.3",
- "@rollup/plugin-typescript": "^11.1.6",
- "rollup": "^2.79.1",
- "rollup-plugin-terser": "^7.0.2",
+ "@rollup/plugin-commonjs": "^29.0.3",
+ "@rollup/plugin-node-resolve": "^16.0.3",
+ "@rollup/plugin-terser": "^1.0.0",
+ "@rollup/plugin-typescript": "^12.3.0",
+ "rollup": "^4.63.1",
+ "tslib": "^2.8.1",
"typescript": "~5.3.3"
}
},
- "node_modules/@babel/code-frame": {
- "version": "7.29.7",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
- "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@babel/helper-validator-identifier": "^7.29.7",
- "js-tokens": "^4.0.0",
- "picocolors": "^1.1.1"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-validator-identifier": {
- "version": "7.29.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
- "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.9.0"
- }
- },
"node_modules/@formatjs/ecma402-abstract": {
"version": "1.11.4",
"resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz",
@@ -170,25 +146,43 @@
"@lit-labs/ssr-dom-shim": "^1.4.0"
}
},
+ "node_modules/@napi-rs/lzma-linux-x64-gnu": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz",
+ "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^22.20 || ^24.12 || >=25"
+ }
+ },
"node_modules/@rollup/plugin-commonjs": {
- "version": "24.1.0",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz",
- "integrity": "sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==",
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz",
+ "integrity": "sha512-ZaOxZceP7SOUW7Lqw5IRVweSQYWaeIPnXIGLiB690EBA3FGJTO40EEr2L5yZplJWsgTCogILRSpcAe7+U0Otdg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@rollup/pluginutils": "^5.0.1",
"commondir": "^1.0.1",
"estree-walker": "^2.0.2",
- "glob": "^8.0.3",
+ "fdir": "^6.2.0",
"is-reference": "1.2.1",
- "magic-string": "^0.27.0"
+ "magic-string": "^0.30.3",
+ "picomatch": "^4.0.2"
},
"engines": {
- "node": ">=14.0.0"
+ "node": ">=16.0.0 || 14 >= 14.17"
},
"peerDependencies": {
- "rollup": "^2.68.0||^3.0.0"
+ "rollup": "^2.68.0||^3.0.0||^4.0.0"
},
"peerDependenciesMeta": {
"rollup": {
@@ -197,9 +191,9 @@
}
},
"node_modules/@rollup/plugin-node-resolve": {
- "version": "15.3.1",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz",
- "integrity": "sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA==",
+ "version": "16.0.3",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz",
+ "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -221,10 +215,43 @@
}
}
},
+ "node_modules/@rollup/plugin-terser": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-1.0.0.tgz",
+ "integrity": "sha512-FnCxhTBx6bMOYQrar6C8h3scPt8/JwIzw3+AJ2K++6guogH5fYaIFia+zZuhqv0eo1RN7W1Pz630SyvLbDjhtQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "serialize-javascript": "^7.0.3",
+ "smob": "^1.0.0",
+ "terser": "^5.17.4"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/plugin-terser/node_modules/serialize-javascript": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.1.tgz",
+ "integrity": "sha512-k3CMsaIvvdSwm8oLB4MXSl0wH2/cwlH7xGcnRd2DaeRmBkbzYmyT8j0tsX60DwD1eRwHTpNpH8ljKu9oUT1MeQ==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
"node_modules/@rollup/plugin-typescript": {
- "version": "11.1.6",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz",
- "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==",
+ "version": "12.3.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz",
+ "integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -271,22 +298,362 @@
}
}
},
- "node_modules/@types/estree": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
- "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@types/node": {
- "version": "26.4.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-26.4.0.tgz",
- "integrity": "sha512-faiGnoIrLH/V8cibOMEAZ8pMw6oXqSukl29ra4mN8GdaB2ZewzeaLj+INpV5N+Z1eKWzY+IzaIZH2EIR6YZRNQ==",
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.1.tgz",
+ "integrity": "sha512-UZ8sUxPTiHWYX9QNdJedb1kDZSpS1t/VPWBWGSgqHNi9w3Cu6IXvu2mzbhiTiPvtrqgTQJ+zqiAq2iPIPilpaQ==",
+ "cpu": [
+ "arm"
+ ],
"dev": true,
"license": "MIT",
- "dependencies": {
- "undici-types": "~8.3.0"
- }
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.1.tgz",
+ "integrity": "sha512-cQ4nFQABN5cDvDpbvJ7bMStCpnaVxynZrRMfUJYgxcIk9Sh54FIO1vtfkg0B69REjER77ioZ/ov+eAApx/KmLQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz",
+ "integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.1.tgz",
+ "integrity": "sha512-pvD16V939D3CloK0+qikpGaxiPrDUXTe7Y5cWOMkMSy7m1cawa8EGy/kXYi/G/cKAC4HDAbSnzCIk1WmsoOKXg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.1.tgz",
+ "integrity": "sha512-pcFGeL2345VwdTnJhA6zLbew+YgWB0qBG2+dMtXjCicf6+rm6kO6cOoh5VnTe0ZMrMRgRyuHmCJxZWrIdzYuOw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.1.tgz",
+ "integrity": "sha512-mRJlqSRulVzcKq/LKA6ICSIc3K/l4fzlVn/gePn2nXIHy8seRi5z/eeRE0d/XMBxcMldiXtQTSpRj0tkkC3g8Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.1.tgz",
+ "integrity": "sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.1.tgz",
+ "integrity": "sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.1.tgz",
+ "integrity": "sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.1.tgz",
+ "integrity": "sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.1.tgz",
+ "integrity": "sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.1.tgz",
+ "integrity": "sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.1.tgz",
+ "integrity": "sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.1.tgz",
+ "integrity": "sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.1.tgz",
+ "integrity": "sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.1.tgz",
+ "integrity": "sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.1.tgz",
+ "integrity": "sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.1.tgz",
+ "integrity": "sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.1.tgz",
+ "integrity": "sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openbsd-x64": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.1.tgz",
+ "integrity": "sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.1.tgz",
+ "integrity": "sha512-cjkLbOlfcm3QGhMM1J5zaZjsw1GggbN6rw9UTSSRrPrR1KkcXnN7Uq9rPw34xImQ9VOY9GN+6u2Zj80B9ptkcw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.1.tgz",
+ "integrity": "sha512-Li1KdUnWGE4N3e1F/B4RTB1ms+nG4WBgjByO46pkeBVX/2UBsY53xf5vK9WygVmnH3RwncIST7lkSdLSY6P9lg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.1.tgz",
+ "integrity": "sha512-t4ZYOSoLTgwhuFMrmTMLx/+i1DQVK7HYqMc6kY46EApwi8X0nIVphzdNoThU3xt6n+N5urG1/gxBdCaKDLavfg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.1.tgz",
+ "integrity": "sha512-RgroPfMmKlD1RzSDxvwgcPiy2HNQKoYV7OmwIXDsk73uKW5t6B/V8KIy27SMv/FNXFo/oSBtWc9J0X7t91ezZg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.1.tgz",
+ "integrity": "sha512-at8QVep6S3h5Y6gSbdGU06bRY5WJkf6WUduM9YtvYMbYhB1MOFfUgc6kehitQXzOtMSaT70q7f9ydPhpqu821w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@types/resolve": {
"version": "1.20.2",
@@ -314,23 +681,6 @@
"node": ">=0.4.0"
}
},
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/brace-expansion": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
@@ -407,6 +757,21 @@
"@types/trusted-types": "^2.0.2"
}
},
+ "node_modules/custom-card-helpers/node_modules/rollup": {
+ "version": "2.80.0",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.80.0.tgz",
+ "integrity": "sha512-cIFJOD1DESzpjOBl763Kp1AH7UE/0fcdHe6rZXUdQ9c50uvgigvW97u3IcSeBwOkgqL/PXPBktBCh0KEu5L8XQ==",
+ "license": "MIT",
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
"node_modules/custom-card-helpers/node_modules/typescript": {
"version": "4.9.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
@@ -446,12 +811,23 @@
"dev": true,
"license": "MIT"
},
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
"dev": true,
- "license": "ISC"
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
},
"node_modules/fsevents": {
"version": "2.3.3",
@@ -477,37 +853,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/glob": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
- "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
- "deprecated": "Glob versions prior to v9 are no longer supported",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^5.0.1",
- "once": "^1.3.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
@@ -527,25 +872,6 @@
"integrity": "sha512-TnZFzF4mn5F/v0XKUTK2GMQXrn/+eQpgaSDSELl6U0HSwSbFwRhGWLz330YT+hiKMspDflamsye//RPL+zwhDw==",
"license": "Apache-2.0"
},
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true,
- "license": "ISC"
- },
"node_modules/intl-messageformat": {
"version": "9.13.0",
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz",
@@ -591,28 +917,6 @@
"@types/estree": "*"
}
},
- "node_modules/jest-worker": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz",
- "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*",
- "merge-stream": "^2.0.0",
- "supports-color": "^7.0.0"
- },
- "engines": {
- "node": ">= 10.13.0"
- }
- },
- "node_modules/js-tokens": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/lit": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/lit/-/lit-3.3.1.tgz",
@@ -645,46 +949,13 @@
}
},
"node_modules/magic-string": {
- "version": "0.27.0",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz",
- "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==",
+ "version": "0.30.21",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@jridgewell/sourcemap-codec": "^1.4.13"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/merge-stream": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
- "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/minimatch": {
- "version": "5.1.6",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
- "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "wrappy": "1"
+ "@jridgewell/sourcemap-codec": "^1.5.5"
}
},
"node_modules/path-parse": {
@@ -694,19 +965,13 @@
"dev": true,
"license": "MIT"
},
- "node_modules/picocolors": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
- "dev": true,
- "license": "ISC"
- },
"node_modules/picomatch": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=12"
},
@@ -714,16 +979,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/randombytes": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
- "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "safe-buffer": "^5.1.0"
- }
- },
"node_modules/resolve": {
"version": "1.22.11",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
@@ -746,67 +1001,60 @@
}
},
"node_modules/rollup": {
- "version": "2.79.2",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz",
- "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==",
+ "version": "4.63.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.1.tgz",
+ "integrity": "sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==",
+ "dev": true,
"license": "MIT",
"peer": true,
+ "dependencies": {
+ "@types/estree": "1.0.9"
+ },
"bin": {
"rollup": "dist/bin/rollup"
},
"engines": {
- "node": ">=10.0.0"
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
},
"optionalDependencies": {
+ "@napi-rs/lzma-linux-x64-gnu": "1.5.1",
+ "@rollup/rollup-android-arm-eabi": "4.63.1",
+ "@rollup/rollup-android-arm64": "4.63.1",
+ "@rollup/rollup-darwin-arm64": "4.63.1",
+ "@rollup/rollup-darwin-x64": "4.63.1",
+ "@rollup/rollup-freebsd-arm64": "4.63.1",
+ "@rollup/rollup-freebsd-x64": "4.63.1",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.63.1",
+ "@rollup/rollup-linux-arm-musleabihf": "4.63.1",
+ "@rollup/rollup-linux-arm64-gnu": "4.63.1",
+ "@rollup/rollup-linux-arm64-musl": "4.63.1",
+ "@rollup/rollup-linux-loong64-gnu": "4.63.1",
+ "@rollup/rollup-linux-loong64-musl": "4.63.1",
+ "@rollup/rollup-linux-ppc64-gnu": "4.63.1",
+ "@rollup/rollup-linux-ppc64-musl": "4.63.1",
+ "@rollup/rollup-linux-riscv64-gnu": "4.63.1",
+ "@rollup/rollup-linux-riscv64-musl": "4.63.1",
+ "@rollup/rollup-linux-s390x-gnu": "4.63.1",
+ "@rollup/rollup-linux-x64-gnu": "4.63.1",
+ "@rollup/rollup-linux-x64-musl": "4.63.1",
+ "@rollup/rollup-openbsd-x64": "4.63.1",
+ "@rollup/rollup-openharmony-arm64": "4.63.1",
+ "@rollup/rollup-win32-arm64-msvc": "4.63.1",
+ "@rollup/rollup-win32-ia32-msvc": "4.63.1",
+ "@rollup/rollup-win32-x64-gnu": "4.63.1",
+ "@rollup/rollup-win32-x64-msvc": "4.63.1",
"fsevents": "~2.3.2"
}
},
- "node_modules/rollup-plugin-terser": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz",
- "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==",
- "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser",
+ "node_modules/smob": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/smob/-/smob-1.6.2.tgz",
+ "integrity": "sha512-RQsvleCbF8cVHEv+xuDGaA4pOizFqJ0GgjtMSRo6oP8pnN7WsigHgVGey6aILRBKv4W2YOMHLqbKdnB6hpB9fw==",
"dev": true,
"license": "MIT",
- "dependencies": {
- "@babel/code-frame": "^7.10.4",
- "jest-worker": "^26.2.1",
- "serialize-javascript": "^4.0.0",
- "terser": "^5.0.0"
- },
- "peerDependencies": {
- "rollup": "^2.0.0"
- }
- },
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/serialize-javascript": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
- "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
- "dev": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "randombytes": "^2.1.0"
+ "engines": {
+ "node": ">=20.0.0"
}
},
"node_modules/source-map": {
@@ -836,19 +1084,6 @@
"integrity": "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==",
"license": "MIT"
},
- "node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
@@ -901,20 +1136,6 @@
"engines": {
"node": ">=14.17"
}
- },
- "node_modules/undici-types": {
- "version": "8.3.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
- "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true,
- "license": "ISC"
}
}
}
diff --git a/package.json b/package.json
index ab74784..1527ab0 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "bom-local-card",
"version": "0.3.1",
"description": "Home Assistant custom card for displaying Australian Bureau of Meteorology (BOM) rain radar data with animated slideshow and historical data support",
+ "type": "module",
"module": "bom-local-card.js",
"keywords": [
"home-assistant",
@@ -31,13 +32,17 @@
"lit": "^3.1.2"
},
"devDependencies": {
- "@rollup/plugin-commonjs": "^24.1.0",
- "@rollup/plugin-node-resolve": "^15.2.3",
- "@rollup/plugin-typescript": "^11.1.6",
- "rollup": "^2.79.1",
- "rollup-plugin-terser": "^7.0.2",
+ "@rollup/plugin-commonjs": "^29.0.3",
+ "@rollup/plugin-node-resolve": "^16.0.3",
+ "@rollup/plugin-terser": "^1.0.0",
+ "@rollup/plugin-typescript": "^12.3.0",
+ "rollup": "^4.63.1",
+ "tslib": "^2.8.1",
"typescript": "~5.3.3"
},
+ "overrides": {
+ "picomatch": "^4.0.4"
+ },
"scripts": {
"build": "rollup -c",
"build:docker": "bash scripts/build-docker.sh",
@@ -49,9 +54,3 @@
},
"_comment": "Note: All commands can be run without npm using: ./run.sh [build|test|clean]"
}
-
-
-
-
-
-
diff --git a/rollup.config.js b/rollup.config.js
index 9fed80e..c9eb0e1 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,7 +1,7 @@
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
-import { terser } from 'rollup-plugin-terser';
+import terser from '@rollup/plugin-terser';
const isProd = process.env.NODE_ENV === 'production';
@@ -28,7 +28,7 @@ export default {
declaration: false,
}),
isProd && terser({
- output: {
+ format: {
comments: false,
},
}),
@@ -42,4 +42,3 @@ export default {
-
diff --git a/run.sh b/run.sh
index 516d345..6a56c21 100755
--- a/run.sh
+++ b/run.sh
@@ -60,7 +60,7 @@ build_card() {
echo "📦 Installing dependencies..."
# Ensure devDependencies are installed even if we're building for prod
# because we need rollup/plugins to build.
- npm install
+ npm ci
fi
NODE_ENV="$target_env" npm run build
@@ -241,4 +241,3 @@ case "$COMMAND" in
exit 1
;;
esac
-
diff --git a/src/bom-local-card.ts b/src/bom-local-card.ts
index 0a3fea5..7eae947 100644
--- a/src/bom-local-card.ts
+++ b/src/bom-local-card.ts
@@ -593,7 +593,7 @@ export class BomLocalRadarCard extends LitElement implements LovelaceCard {
? html`
{
@@ -679,7 +679,7 @@ export class BomLocalRadarCard extends LitElement implements LovelaceCard {
return html`
{
const index = parseInt((e.target as HTMLInputElement).value);
@@ -241,4 +241,3 @@ declare global {
'bom-controls-section': BomControlsSection;
}
}
-