snice 4.10.0 → 4.12.0

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 (269) hide show
  1. package/adapters/react/carousel.d.ts +1 -0
  2. package/adapters/react/carousel.d.ts.map +1 -1
  3. package/adapters/react/carousel.js +1 -1
  4. package/adapters/react/carousel.js.map +1 -1
  5. package/adapters/react/carousel.tsx +2 -1
  6. package/bin/templates/CLAUDE.md +169 -113
  7. package/bin/templates/pwa/README.md +72 -94
  8. package/bin/templates/pwa/src/components/app-header.ts +218 -0
  9. package/bin/templates/pwa/src/components/notification-badge.ts +68 -0
  10. package/bin/templates/pwa/src/components/search-bar.ts +99 -0
  11. package/bin/templates/pwa/src/controllers/notification-controller.ts +42 -0
  12. package/bin/templates/pwa/src/guards/auth.ts +1 -1
  13. package/bin/templates/pwa/src/main.ts +19 -0
  14. package/bin/templates/pwa/src/pages/dashboard.ts +124 -23
  15. package/bin/templates/pwa/src/pages/data.ts +329 -0
  16. package/bin/templates/pwa/src/pages/notifications.ts +112 -30
  17. package/bin/templates/pwa/src/pages/profile.ts +86 -52
  18. package/bin/templates/pwa/src/pages/settings.ts +291 -0
  19. package/bin/templates/pwa/src/styles/global.css +12 -3
  20. package/dist/cdn/accordion/snice-accordion.js +1 -1
  21. package/dist/cdn/accordion/snice-accordion.min.js +1 -1
  22. package/dist/cdn/alert/snice-alert.js +1 -1
  23. package/dist/cdn/alert/snice-alert.min.js +1 -1
  24. package/dist/cdn/app-tiles/snice-app-tiles.js +1 -1
  25. package/dist/cdn/app-tiles/snice-app-tiles.min.js +1 -1
  26. package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
  27. package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
  28. package/dist/cdn/avatar/snice-avatar.js +1 -1
  29. package/dist/cdn/avatar/snice-avatar.min.js +1 -1
  30. package/dist/cdn/badge/snice-badge.js +1 -1
  31. package/dist/cdn/badge/snice-badge.min.js +1 -1
  32. package/dist/cdn/banner/snice-banner.js +1 -1
  33. package/dist/cdn/banner/snice-banner.min.js +1 -1
  34. package/dist/cdn/book/snice-book.js +1 -1
  35. package/dist/cdn/book/snice-book.min.js +1 -1
  36. package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +1 -1
  37. package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js +1 -1
  38. package/dist/cdn/button/snice-button.js +1 -1
  39. package/dist/cdn/button/snice-button.min.js +1 -1
  40. package/dist/cdn/calendar/snice-calendar.js +1 -1
  41. package/dist/cdn/calendar/snice-calendar.min.js +1 -1
  42. package/dist/cdn/camera/README.md +1 -1
  43. package/dist/cdn/camera/snice-camera.js +1 -1
  44. package/dist/cdn/camera/snice-camera.min.js +1 -1
  45. package/dist/cdn/camera-annotate/snice-camera-annotate.js +1 -1
  46. package/dist/cdn/camera-annotate/snice-camera-annotate.min.js +1 -1
  47. package/dist/cdn/candlestick/snice-candlestick.js +1 -1
  48. package/dist/cdn/candlestick/snice-candlestick.min.js +1 -1
  49. package/dist/cdn/card/snice-card.js +1 -1
  50. package/dist/cdn/card/snice-card.min.js +1 -1
  51. package/dist/cdn/carousel/README.md +2 -2
  52. package/dist/cdn/carousel/snice-carousel.js +9 -3
  53. package/dist/cdn/carousel/snice-carousel.js.map +1 -1
  54. package/dist/cdn/carousel/snice-carousel.min.js +3 -3
  55. package/dist/cdn/carousel/snice-carousel.min.js.map +1 -1
  56. package/dist/cdn/chart/snice-chart.js +1 -1
  57. package/dist/cdn/chart/snice-chart.min.js +1 -1
  58. package/dist/cdn/chat/snice-chat.js +1 -1
  59. package/dist/cdn/chat/snice-chat.min.js +1 -1
  60. package/dist/cdn/checkbox/snice-checkbox.js +1 -1
  61. package/dist/cdn/checkbox/snice-checkbox.min.js +1 -1
  62. package/dist/cdn/chip/snice-chip.js +1 -1
  63. package/dist/cdn/chip/snice-chip.min.js +1 -1
  64. package/dist/cdn/code-block/snice-code-block.js +1 -1
  65. package/dist/cdn/code-block/snice-code-block.min.js +1 -1
  66. package/dist/cdn/color-display/snice-color-display.js +1 -1
  67. package/dist/cdn/color-display/snice-color-display.min.js +1 -1
  68. package/dist/cdn/color-picker/snice-color-picker.js +1 -1
  69. package/dist/cdn/color-picker/snice-color-picker.min.js +1 -1
  70. package/dist/cdn/command-palette/snice-command-palette.js +1 -1
  71. package/dist/cdn/command-palette/snice-command-palette.min.js +1 -1
  72. package/dist/cdn/comments/snice-comments.js +1 -1
  73. package/dist/cdn/comments/snice-comments.min.js +1 -1
  74. package/dist/cdn/countdown/snice-countdown.js +1 -1
  75. package/dist/cdn/countdown/snice-countdown.min.js +1 -1
  76. package/dist/cdn/cropper/snice-cropper.js +1 -1
  77. package/dist/cdn/cropper/snice-cropper.min.js +1 -1
  78. package/dist/cdn/date-picker/snice-date-picker.js +1 -1
  79. package/dist/cdn/date-picker/snice-date-picker.min.js +1 -1
  80. package/dist/cdn/diff/snice-diff.js +1 -1
  81. package/dist/cdn/diff/snice-diff.min.js +1 -1
  82. package/dist/cdn/divider/snice-divider.js +1 -1
  83. package/dist/cdn/divider/snice-divider.min.js +1 -1
  84. package/dist/cdn/doc/snice-doc.js +1 -1
  85. package/dist/cdn/doc/snice-doc.min.js +1 -1
  86. package/dist/cdn/draw/snice-draw.js +1 -1
  87. package/dist/cdn/draw/snice-draw.min.js +1 -1
  88. package/dist/cdn/drawer/snice-drawer.js +1 -1
  89. package/dist/cdn/drawer/snice-drawer.min.js +1 -1
  90. package/dist/cdn/empty-state/snice-empty-state.js +1 -1
  91. package/dist/cdn/empty-state/snice-empty-state.min.js +1 -1
  92. package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
  93. package/dist/cdn/file-gallery/snice-file-gallery.min.js +1 -1
  94. package/dist/cdn/file-upload/snice-file-upload.js +1 -1
  95. package/dist/cdn/file-upload/snice-file-upload.min.js +1 -1
  96. package/dist/cdn/flip-card/snice-flip-card.js +1 -1
  97. package/dist/cdn/flip-card/snice-flip-card.min.js +1 -1
  98. package/dist/cdn/flow/snice-flow.js +1 -1
  99. package/dist/cdn/flow/snice-flow.min.js +1 -1
  100. package/dist/cdn/funnel/snice-funnel.js +1 -1
  101. package/dist/cdn/funnel/snice-funnel.min.js +1 -1
  102. package/dist/cdn/gantt/README.md +1 -1
  103. package/dist/cdn/gantt/snice-gantt.js +1 -1
  104. package/dist/cdn/gantt/snice-gantt.min.js +1 -1
  105. package/dist/cdn/gauge/snice-gauge.js +1 -1
  106. package/dist/cdn/gauge/snice-gauge.min.js +1 -1
  107. package/dist/cdn/heatmap/snice-heatmap.js +1 -1
  108. package/dist/cdn/heatmap/snice-heatmap.min.js +1 -1
  109. package/dist/cdn/image/snice-image.js +1 -1
  110. package/dist/cdn/image/snice-image.min.js +1 -1
  111. package/dist/cdn/input/snice-input.js +1 -1
  112. package/dist/cdn/input/snice-input.min.js +1 -1
  113. package/dist/cdn/kanban/snice-kanban.js +1 -1
  114. package/dist/cdn/kanban/snice-kanban.min.js +1 -1
  115. package/dist/cdn/kpi/snice-kpi.js +1 -1
  116. package/dist/cdn/kpi/snice-kpi.min.js +1 -1
  117. package/dist/cdn/layout/snice-layout.js +1 -1
  118. package/dist/cdn/layout/snice-layout.min.js +1 -1
  119. package/dist/cdn/link/snice-link.js +1 -1
  120. package/dist/cdn/link/snice-link.min.js +1 -1
  121. package/dist/cdn/link-preview/snice-link-preview.js +1 -1
  122. package/dist/cdn/link-preview/snice-link-preview.min.js +1 -1
  123. package/dist/cdn/list/snice-list.js +1 -1
  124. package/dist/cdn/list/snice-list.min.js +1 -1
  125. package/dist/cdn/location/snice-location.js +1 -1
  126. package/dist/cdn/location/snice-location.min.js +1 -1
  127. package/dist/cdn/login/snice-login.js +1 -1
  128. package/dist/cdn/login/snice-login.min.js +1 -1
  129. package/dist/cdn/map/snice-map.js +1 -1
  130. package/dist/cdn/map/snice-map.min.js +1 -1
  131. package/dist/cdn/markdown/README.md +1 -1
  132. package/dist/cdn/markdown/snice-markdown.js +2 -2
  133. package/dist/cdn/markdown/snice-markdown.js.map +1 -1
  134. package/dist/cdn/markdown/snice-markdown.min.js +2 -2
  135. package/dist/cdn/markdown/snice-markdown.min.js.map +1 -1
  136. package/dist/cdn/masonry/snice-masonry.js +1 -1
  137. package/dist/cdn/masonry/snice-masonry.min.js +1 -1
  138. package/dist/cdn/menu/snice-menu.js +1 -1
  139. package/dist/cdn/menu/snice-menu.min.js +1 -1
  140. package/dist/cdn/modal/snice-modal.js +1 -1
  141. package/dist/cdn/modal/snice-modal.min.js +1 -1
  142. package/dist/cdn/music-player/snice-music-player.js +1 -1
  143. package/dist/cdn/music-player/snice-music-player.min.js +1 -1
  144. package/dist/cdn/nav/snice-nav.js +1 -1
  145. package/dist/cdn/nav/snice-nav.min.js +1 -1
  146. package/dist/cdn/network-graph/snice-network-graph.js +1 -1
  147. package/dist/cdn/network-graph/snice-network-graph.min.js +1 -1
  148. package/dist/cdn/notification-center/snice-notification-center.js +1 -1
  149. package/dist/cdn/notification-center/snice-notification-center.min.js +1 -1
  150. package/dist/cdn/org-chart/snice-org-chart.js +1 -1
  151. package/dist/cdn/org-chart/snice-org-chart.min.js +1 -1
  152. package/dist/cdn/pagination/snice-pagination.js +1 -1
  153. package/dist/cdn/pagination/snice-pagination.min.js +1 -1
  154. package/dist/cdn/paint/snice-paint.js +1 -1
  155. package/dist/cdn/paint/snice-paint.min.js +1 -1
  156. package/dist/cdn/pdf-viewer/README.md +2 -2
  157. package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +72 -78
  158. package/dist/cdn/pdf-viewer/snice-pdf-viewer.js.map +1 -1
  159. package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js +3 -3
  160. package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js.map +1 -1
  161. package/dist/cdn/podcast-player/README.md +1 -1
  162. package/dist/cdn/podcast-player/snice-podcast-player.js +2 -2
  163. package/dist/cdn/podcast-player/snice-podcast-player.js.map +1 -1
  164. package/dist/cdn/podcast-player/snice-podcast-player.min.js +2 -2
  165. package/dist/cdn/podcast-player/snice-podcast-player.min.js.map +1 -1
  166. package/dist/cdn/pricing-table/snice-pricing-table.js +1 -1
  167. package/dist/cdn/pricing-table/snice-pricing-table.min.js +1 -1
  168. package/dist/cdn/progress/snice-progress.js +1 -1
  169. package/dist/cdn/progress/snice-progress.min.js +1 -1
  170. package/dist/cdn/qr-code/snice-qr-code.js +1 -1
  171. package/dist/cdn/qr-code/snice-qr-code.min.js +1 -1
  172. package/dist/cdn/qr-reader/snice-qr-reader.js +1 -1
  173. package/dist/cdn/qr-reader/snice-qr-reader.min.js +1 -1
  174. package/dist/cdn/radio/snice-radio.js +1 -1
  175. package/dist/cdn/radio/snice-radio.min.js +1 -1
  176. package/dist/cdn/rating/snice-rating.js +1 -1
  177. package/dist/cdn/rating/snice-rating.min.js +1 -1
  178. package/dist/cdn/recipe/snice-recipe.js +1 -1
  179. package/dist/cdn/recipe/snice-recipe.min.js +1 -1
  180. package/dist/cdn/runtime/README.md +1 -1
  181. package/dist/cdn/runtime/snice-runtime.esm.js +10 -3
  182. package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
  183. package/dist/cdn/runtime/snice-runtime.esm.min.js +4 -4
  184. package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
  185. package/dist/cdn/runtime/snice-runtime.js +10 -3
  186. package/dist/cdn/runtime/snice-runtime.js.map +1 -1
  187. package/dist/cdn/runtime/snice-runtime.min.js +4 -4
  188. package/dist/cdn/runtime/snice-runtime.min.js.map +1 -1
  189. package/dist/cdn/sankey/snice-sankey.js +1 -1
  190. package/dist/cdn/sankey/snice-sankey.min.js +1 -1
  191. package/dist/cdn/select/snice-select.js +1 -1
  192. package/dist/cdn/select/snice-select.min.js +1 -1
  193. package/dist/cdn/skeleton/snice-skeleton.js +1 -1
  194. package/dist/cdn/skeleton/snice-skeleton.min.js +1 -1
  195. package/dist/cdn/slider/snice-slider.js +1 -1
  196. package/dist/cdn/slider/snice-slider.min.js +1 -1
  197. package/dist/cdn/sortable/snice-sortable.js +1 -1
  198. package/dist/cdn/sortable/snice-sortable.min.js +1 -1
  199. package/dist/cdn/sparkline/snice-sparkline.js +1 -1
  200. package/dist/cdn/sparkline/snice-sparkline.min.js +1 -1
  201. package/dist/cdn/spinner/snice-spinner.js +1 -1
  202. package/dist/cdn/spinner/snice-spinner.min.js +1 -1
  203. package/dist/cdn/split-pane/snice-split-pane.js +1 -1
  204. package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
  205. package/dist/cdn/spotlight/snice-spotlight.js +1 -1
  206. package/dist/cdn/spotlight/snice-spotlight.min.js +1 -1
  207. package/dist/cdn/spreadsheet/snice-spreadsheet.js +1 -1
  208. package/dist/cdn/spreadsheet/snice-spreadsheet.min.js +1 -1
  209. package/dist/cdn/stepper/snice-stepper.js +1 -1
  210. package/dist/cdn/stepper/snice-stepper.min.js +1 -1
  211. package/dist/cdn/switch/snice-switch.js +1 -1
  212. package/dist/cdn/switch/snice-switch.min.js +1 -1
  213. package/dist/cdn/table/snice-table.js +1 -1
  214. package/dist/cdn/table/snice-table.min.js +1 -1
  215. package/dist/cdn/tabs/snice-tabs.js +1 -1
  216. package/dist/cdn/tabs/snice-tabs.min.js +1 -1
  217. package/dist/cdn/tag-input/snice-tag-input.js +1 -1
  218. package/dist/cdn/tag-input/snice-tag-input.min.js +1 -1
  219. package/dist/cdn/terminal/snice-terminal.js +1 -1
  220. package/dist/cdn/terminal/snice-terminal.min.js +1 -1
  221. package/dist/cdn/testimonial/snice-testimonial.js +1 -1
  222. package/dist/cdn/testimonial/snice-testimonial.min.js +1 -1
  223. package/dist/cdn/textarea/snice-textarea.js +1 -1
  224. package/dist/cdn/textarea/snice-textarea.min.js +1 -1
  225. package/dist/cdn/time-range-picker/snice-time-range-picker.js +1 -1
  226. package/dist/cdn/time-range-picker/snice-time-range-picker.min.js +1 -1
  227. package/dist/cdn/timeline/snice-timeline.js +1 -1
  228. package/dist/cdn/timeline/snice-timeline.min.js +1 -1
  229. package/dist/cdn/timer/snice-timer.js +1 -1
  230. package/dist/cdn/timer/snice-timer.min.js +1 -1
  231. package/dist/cdn/toast/snice-toast.js +1 -1
  232. package/dist/cdn/toast/snice-toast.min.js +1 -1
  233. package/dist/cdn/tooltip/snice-tooltip.js +1 -1
  234. package/dist/cdn/tooltip/snice-tooltip.min.js +1 -1
  235. package/dist/cdn/tree/snice-tree.js +1 -1
  236. package/dist/cdn/tree/snice-tree.min.js +1 -1
  237. package/dist/cdn/treemap/snice-treemap.js +1 -1
  238. package/dist/cdn/treemap/snice-treemap.min.js +1 -1
  239. package/dist/cdn/video-player/snice-video-player.js +1 -1
  240. package/dist/cdn/video-player/snice-video-player.min.js +1 -1
  241. package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +1 -1
  242. package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js +1 -1
  243. package/dist/cdn/waterfall/snice-waterfall.js +1 -1
  244. package/dist/cdn/waterfall/snice-waterfall.min.js +1 -1
  245. package/dist/cdn/weather/snice-weather.js +1 -1
  246. package/dist/cdn/weather/snice-weather.min.js +1 -1
  247. package/dist/components/carousel/snice-carousel.js +8 -2
  248. package/dist/components/carousel/snice-carousel.js.map +1 -1
  249. package/dist/components/code-block/grammars/html.json +48 -0
  250. package/dist/components/markdown/snice-markdown.js +1 -1
  251. package/dist/components/markdown/snice-markdown.js.map +1 -1
  252. package/dist/components/pdf-viewer/snice-pdf-viewer.d.ts +9 -8
  253. package/dist/components/pdf-viewer/snice-pdf-viewer.js +71 -77
  254. package/dist/components/pdf-viewer/snice-pdf-viewer.js.map +1 -1
  255. package/dist/components/podcast-player/snice-podcast-player.js +1 -1
  256. package/dist/components/podcast-player/snice-podcast-player.js.map +1 -1
  257. package/dist/index.cjs +8 -1
  258. package/dist/index.cjs.map +1 -1
  259. package/dist/index.esm.js +8 -1
  260. package/dist/index.esm.js.map +1 -1
  261. package/dist/index.iife.js +8 -1
  262. package/dist/index.iife.js.map +1 -1
  263. package/dist/symbols.cjs +1 -1
  264. package/dist/symbols.esm.js +1 -1
  265. package/dist/transitions.cjs +1 -1
  266. package/dist/transitions.esm.js +1 -1
  267. package/docs/ai/patterns.md +1 -1
  268. package/docs/routing.md +2 -2
  269. package/package.json +4 -2
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * snice v4.9.0
2
+ * snice v4.11.0
3
3
  * Imperative TypeScript framework for building vanilla web components with decorators, differential rendering, routing, and controllers. No virtual DOM, no build complexity.
4
4
  * (c) 2024
5
5
  * Released under the MIT License.
6
6
  */
7
- void 0===globalThis.Snice&&console.warn("[snice] snice-runtime.min.js must be loaded before snice-podcast-player.min.js");var SnicePodcastPlayer=function(e,t){"use strict";function i(e,t,i,s,a,r){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var n,c=s.kind,d="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?s.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,s.name):{}),h=!1,m=i.length-1;m>=0;m--){var u={};for(var g in s)u[g]="access"===g?{}:s[g];for(var g in s.access)u.access[g]=s.access[g];u.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");r.push(o(e||null))};var v=(0,i[m])("accessor"===c?{get:p.get,set:p.set}:p[d],u);if("accessor"===c){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(n=o(v.get))&&(p.get=n),(n=o(v.set))&&(p.set=n),(n=o(v.init))&&a.unshift(n)}else(n=o(v))&&("field"===c?a.unshift(n):p[d]=n)}l&&Object.defineProperty(l,s.name,p),h=!0}function s(e,t,i){for(var s=arguments.length>2,a=0;a<t.length;a++)i=s?t[a].call(e,i):t[a].call(e);return s?i:void 0}"function"==typeof SuppressedError&&SuppressedError;const a=[.5,.75,1,1.25,1.5,1.75,2],r=[0,5,10,15,30,45,60];let o=(()=>{let e,o,n,c,d,l,p,h,m,u,g,v,b,f,w,y,k,x,E,S,T,$,C,R,z,P,M,I,B,F,L,N,V,j,D,q=[t.element("snice-podcast-player")],A=[],O=HTMLElement,U=[],H=[],K=[],X=[],G=[],J=[],Q=[],W=[],Y=[],Z=[],_=[],ee=[],te=[],ie=[],se=[],ae=[],re=[],oe=[],ne=[],ce=[],de=[],le=[],pe=[],he=[],me=[],ue=[],ge=[],ve=[],be=[],fe=[],we=[],ye=[],ke=[],xe=[],Ee=[];return class extends O{static{o=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(O[Symbol.metadata]??null):void 0;n=[t.property()],c=[t.property({attribute:"from-rss"})],d=[t.property()],l=[t.property()],p=[t.property()],h=[t.property()],m=[t.property({type:Number,attribute:"playback-rate"})],u=[t.property({type:Number,attribute:"skip-forward"})],g=[t.property({type:Number,attribute:"skip-back"})],v=[t.property({type:Number,attribute:"current-time"})],b=[t.property({type:Number})],f=[t.property({type:Number})],w=[t.property({type:Boolean})],y=[t.property({type:Array})],k=[t.property({type:Number,attribute:"current-episode-index"})],x=[t.property({type:Number,attribute:"sleep-timer"})],E=[t.query(".podcast-progress")],S=[t.styles()],T=[t.ready()],$=[t.dispose()],C=[t.watch("src")],R=[t.watch("fromRss")],z=[t.watch("volume")],P=[t.watch("muted")],M=[t.watch("playbackRate")],I=[t.render()],B=[t.dispatch("podcast-play",{bubbles:!0,composed:!0})],F=[t.dispatch("podcast-pause",{bubbles:!0,composed:!0})],L=[t.dispatch("podcast-ended",{bubbles:!0,composed:!0})],N=[t.dispatch("podcast-time-update",{bubbles:!0,composed:!0})],V=[t.dispatch("podcast-rate-change",{bubbles:!0,composed:!0})],j=[t.dispatch("podcast-episode-change",{bubbles:!0,composed:!0})],D=[t.dispatch("podcast-feed-loaded",{bubbles:!0,composed:!0})],i(this,null,S,{kind:"method",name:"componentStyles",static:!1,private:!1,access:{has:e=>"componentStyles"in e,get:e=>e.componentStyles},metadata:a},null,U),i(this,null,T,{kind:"method",name:"init",static:!1,private:!1,access:{has:e=>"init"in e,get:e=>e.init},metadata:a},null,U),i(this,null,$,{kind:"method",name:"cleanup",static:!1,private:!1,access:{has:e=>"cleanup"in e,get:e=>e.cleanup},metadata:a},null,U),i(this,null,C,{kind:"method",name:"handleSrcChange",static:!1,private:!1,access:{has:e=>"handleSrcChange"in e,get:e=>e.handleSrcChange},metadata:a},null,U),i(this,null,R,{kind:"method",name:"handleRssChange",static:!1,private:!1,access:{has:e=>"handleRssChange"in e,get:e=>e.handleRssChange},metadata:a},null,U),i(this,null,z,{kind:"method",name:"handleVolumeChange",static:!1,private:!1,access:{has:e=>"handleVolumeChange"in e,get:e=>e.handleVolumeChange},metadata:a},null,U),i(this,null,P,{kind:"method",name:"handleMutedChange",static:!1,private:!1,access:{has:e=>"handleMutedChange"in e,get:e=>e.handleMutedChange},metadata:a},null,U),i(this,null,M,{kind:"method",name:"handlePlaybackRateChange",static:!1,private:!1,access:{has:e=>"handlePlaybackRateChange"in e,get:e=>e.handlePlaybackRateChange},metadata:a},null,U),i(this,null,I,{kind:"method",name:"renderPlayer",static:!1,private:!1,access:{has:e=>"renderPlayer"in e,get:e=>e.renderPlayer},metadata:a},null,U),i(this,null,B,{kind:"method",name:"emitPlay",static:!1,private:!1,access:{has:e=>"emitPlay"in e,get:e=>e.emitPlay},metadata:a},null,U),i(this,null,F,{kind:"method",name:"emitPause",static:!1,private:!1,access:{has:e=>"emitPause"in e,get:e=>e.emitPause},metadata:a},null,U),i(this,null,L,{kind:"method",name:"emitEnded",static:!1,private:!1,access:{has:e=>"emitEnded"in e,get:e=>e.emitEnded},metadata:a},null,U),i(this,null,N,{kind:"method",name:"emitTimeUpdate",static:!1,private:!1,access:{has:e=>"emitTimeUpdate"in e,get:e=>e.emitTimeUpdate},metadata:a},null,U),i(this,null,V,{kind:"method",name:"emitRateChange",static:!1,private:!1,access:{has:e=>"emitRateChange"in e,get:e=>e.emitRateChange},metadata:a},null,U),i(this,null,j,{kind:"method",name:"emitEpisodeChange",static:!1,private:!1,access:{has:e=>"emitEpisodeChange"in e,get:e=>e.emitEpisodeChange},metadata:a},null,U),i(this,null,D,{kind:"method",name:"emitFeedLoaded",static:!1,private:!1,access:{has:e=>"emitFeedLoaded"in e,get:e=>e.emitFeedLoaded},metadata:a},null,U),i(null,null,n,{kind:"field",name:"src",static:!1,private:!1,access:{has:e=>"src"in e,get:e=>e.src,set:(e,t)=>{e.src=t}},metadata:a},H,K),i(null,null,c,{kind:"field",name:"fromRss",static:!1,private:!1,access:{has:e=>"fromRss"in e,get:e=>e.fromRss,set:(e,t)=>{e.fromRss=t}},metadata:a},X,G),i(null,null,d,{kind:"field",name:"title",static:!1,private:!1,access:{has:e=>"title"in e,get:e=>e.title,set:(e,t)=>{e.title=t}},metadata:a},J,Q),i(null,null,l,{kind:"field",name:"show",static:!1,private:!1,access:{has:e=>"show"in e,get:e=>e.show,set:(e,t)=>{e.show=t}},metadata:a},W,Y),i(null,null,p,{kind:"field",name:"artwork",static:!1,private:!1,access:{has:e=>"artwork"in e,get:e=>e.artwork,set:(e,t)=>{e.artwork=t}},metadata:a},Z,_),i(null,null,h,{kind:"field",name:"description",static:!1,private:!1,access:{has:e=>"description"in e,get:e=>e.description,set:(e,t)=>{e.description=t}},metadata:a},ee,te),i(null,null,m,{kind:"field",name:"playbackRate",static:!1,private:!1,access:{has:e=>"playbackRate"in e,get:e=>e.playbackRate,set:(e,t)=>{e.playbackRate=t}},metadata:a},ie,se),i(null,null,u,{kind:"field",name:"skipForward",static:!1,private:!1,access:{has:e=>"skipForward"in e,get:e=>e.skipForward,set:(e,t)=>{e.skipForward=t}},metadata:a},ae,re),i(null,null,g,{kind:"field",name:"skipBack",static:!1,private:!1,access:{has:e=>"skipBack"in e,get:e=>e.skipBack,set:(e,t)=>{e.skipBack=t}},metadata:a},oe,ne),i(null,null,v,{kind:"field",name:"currentTime",static:!1,private:!1,access:{has:e=>"currentTime"in e,get:e=>e.currentTime,set:(e,t)=>{e.currentTime=t}},metadata:a},ce,de),i(null,null,b,{kind:"field",name:"duration",static:!1,private:!1,access:{has:e=>"duration"in e,get:e=>e.duration,set:(e,t)=>{e.duration=t}},metadata:a},le,pe),i(null,null,f,{kind:"field",name:"volume",static:!1,private:!1,access:{has:e=>"volume"in e,get:e=>e.volume,set:(e,t)=>{e.volume=t}},metadata:a},he,me),i(null,null,w,{kind:"field",name:"muted",static:!1,private:!1,access:{has:e=>"muted"in e,get:e=>e.muted,set:(e,t)=>{e.muted=t}},metadata:a},ue,ge),i(null,null,y,{kind:"field",name:"episodes",static:!1,private:!1,access:{has:e=>"episodes"in e,get:e=>e.episodes,set:(e,t)=>{e.episodes=t}},metadata:a},ve,be),i(null,null,k,{kind:"field",name:"currentEpisodeIndex",static:!1,private:!1,access:{has:e=>"currentEpisodeIndex"in e,get:e=>e.currentEpisodeIndex,set:(e,t)=>{e.currentEpisodeIndex=t}},metadata:a},fe,we),i(null,null,x,{kind:"field",name:"sleepTimer",static:!1,private:!1,access:{has:e=>"sleepTimer"in e,get:e=>e.sleepTimer,set:(e,t)=>{e.sleepTimer=t}},metadata:a},ye,ke),i(null,null,E,{kind:"field",name:"progressElement",static:!1,private:!1,access:{has:e=>"progressElement"in e,get:e=>e.progressElement,set:(e,t)=>{e.progressElement=t}},metadata:a},xe,Ee),i(null,e={value:o},q,{kind:"class",name:o.name,metadata:a},null,A),o=e.value,a&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),s(o,A)}componentStyles(){return t.css`${":host{display:block;font-family:var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);contain:layout style paint}.podcast-container{background:var(--snice-color-background,rgb(255 255 255));border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-lg,.5rem);padding:var(--snice-spacing-lg,1.5rem);box-shadow:var(--snice-shadow-md,0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1))}.podcast-info{display:flex;gap:var(--snice-spacing-md,1rem);margin-bottom:var(--snice-spacing-lg,1.5rem)}.podcast-artwork{flex-shrink:0;width:7.5rem;height:7.5rem;border-radius:var(--snice-border-radius-lg,.5rem);overflow:hidden;background:var(--snice-color-background-element,rgb(252 251 249));display:flex;align-items:center;justify-content:center}.podcast-artwork img{width:100%;height:100%;object-fit:cover}.podcast-artwork-placeholder{color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-meta{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}.podcast-show{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-primary,rgb(37 99 235));margin-bottom:var(--snice-spacing-3xs,.125rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:uppercase;letter-spacing:.05em}.podcast-title{font-size:var(--snice-font-size-lg, 1.125rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-xs,.5rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-description{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text-secondary,rgb(82 82 82));line-height:var(--snice-line-height-normal, 1.5);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.podcast-controls{margin-bottom:var(--snice-spacing-md,1rem)}.podcast-control-buttons{display:flex;align-items:center;justify-content:center;gap:var(--snice-spacing-md,1rem);margin-bottom:var(--snice-spacing-md,1rem)}.podcast-btn{background:0 0;border:none;cursor:pointer;padding:var(--snice-spacing-xs,.5rem);border-radius:var(--snice-border-radius-md,.25rem);color:var(--snice-color-text,rgb(23 23 23));display:inline-flex;align-items:center;justify-content:center;transition:background-color var(--snice-transition-fast, 150ms) ease;position:relative}.podcast-btn:hover:not(:disabled){background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-btn:active:not(:disabled){background:var(--snice-color-background-active,rgb(226 226 226))}.podcast-btn:disabled{opacity:.5;cursor:not-allowed}.podcast-btn-skip-label{position:absolute;font-size:.5rem;font-weight:var(--snice-font-weight-bold,700);color:var(--snice-color-text,rgb(23 23 23));bottom:.25rem}.podcast-btn-play{background:var(--snice-color-primary,rgb(37 99 235));color:var(--snice-color-text-inverse,rgb(250 250 250));padding:var(--snice-spacing-md,1rem);border-radius:50%}.podcast-btn-play:hover:not(:disabled){background:var(--snice-color-primary-hover,rgb(29 78 216))}.podcast-btn-speed{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);min-width:2.75rem;padding:var(--snice-spacing-2xs,.25rem) var(--snice-spacing-xs,.5rem);border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-md,.25rem)}.podcast-btn-speed.active{color:var(--snice-color-primary,rgb(37 99 235));border-color:var(--snice-color-primary,rgb(37 99 235))}.podcast-progress-container{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem)}.podcast-time{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-secondary,rgb(82 82 82));min-width:2.75rem}.podcast-time-current{text-align:right}.podcast-time-remaining{text-align:left}.podcast-progress{flex:1;height:.375rem;background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px;cursor:pointer;position:relative;overflow:hidden}.podcast-progress:hover{height:.5rem}.podcast-progress-bar{height:100%;background:var(--snice-color-primary,rgb(37 99 235));border-radius:9999px;transition:width .1s linear}.podcast-volume{display:flex;align-items:center;gap:var(--snice-spacing-xs,.5rem)}.podcast-volume-slider-container{display:flex;align-items:center}.podcast-volume-slider{-webkit-appearance:none;appearance:none;width:5rem;height:.375rem;background:linear-gradient(to right,var(--snice-color-primary,rgb(37 99 235)) 0,var(--snice-color-primary,rgb(37 99 235)) var(--volume-percent,100%),var(--snice-color-background-element,rgb(252 251 249)) var(--volume-percent,100%),var(--snice-color-background-element,rgb(252 251 249)) 100%);border-radius:9999px;outline:0;cursor:pointer}.podcast-volume-slider::-webkit-slider-runnable-track{width:100%;height:.375rem;background:0 0;border-radius:9999px}.podcast-volume-slider::-moz-range-track{width:100%;height:.375rem;background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px}.podcast-volume-slider::-moz-range-progress{height:.375rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:9999px}.podcast-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:.875rem;height:.875rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:50%;cursor:pointer;margin-top:-.25rem}.podcast-volume-slider::-moz-range-thumb{width:.875rem;height:.875rem;background:var(--snice-color-primary,rgb(37 99 235));border:none;border-radius:50%;cursor:pointer}.podcast-bottom-bar{display:flex;align-items:center;justify-content:space-between;margin-top:var(--snice-spacing-sm,.75rem)}.podcast-sleep{display:flex;align-items:center;gap:var(--snice-spacing-2xs,.25rem)}.podcast-sleep-label{font-size:var(--snice-font-size-xs, .75rem);color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-sleep-time{font-size:var(--snice-font-size-xs, .75rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-primary,rgb(37 99 235));font-variant-numeric:tabular-nums}.podcast-btn-sleep{font-size:var(--snice-font-size-xs, .75rem);padding:var(--snice-spacing-3xs,.125rem) var(--snice-spacing-xs,.5rem);border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-md,.25rem)}.podcast-btn-sleep.active{color:var(--snice-color-primary,rgb(37 99 235));border-color:var(--snice-color-primary,rgb(37 99 235))}.podcast-chapters{border-top:1px solid var(--snice-color-border,rgb(226 226 226));padding-top:var(--snice-spacing-md,1rem);margin-top:var(--snice-spacing-md,1rem)}.podcast-chapters-header{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-sm,.75rem)}.podcast-chapter-item{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem);padding:var(--snice-spacing-xs,.5rem) var(--snice-spacing-sm,.75rem);border-radius:var(--snice-border-radius-md,.25rem);cursor:pointer;transition:background-color var(--snice-transition-fast, 150ms) ease}.podcast-chapter-item:hover{background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-chapter-item.active{background:var(--snice-color-primary-subtle,rgb(239 246 255))}.podcast-chapter-time{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-tertiary,rgb(115 115 115));min-width:2.5rem;flex-shrink:0}.podcast-chapter-title{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text,rgb(23 23 23));flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-chapter-item.active .podcast-chapter-title{color:var(--snice-color-primary,rgb(37 99 235));font-weight:var(--snice-font-weight-medium,500)}.podcast-episodes{border-top:1px solid var(--snice-color-border,rgb(226 226 226));padding-top:var(--snice-spacing-md,1rem);margin-top:var(--snice-spacing-md,1rem)}.podcast-episodes-header{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-sm,.75rem)}.podcast-episode-list{display:flex;flex-direction:column;gap:var(--snice-spacing-2xs,.25rem);max-height:18.75rem;overflow-y:auto}.podcast-episode-item{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem);padding:var(--snice-spacing-sm,.75rem);border-radius:var(--snice-border-radius-md,.25rem);cursor:pointer;transition:background-color var(--snice-transition-fast, 150ms) ease}.podcast-episode-item:hover{background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-episode-item.active{background:var(--snice-color-primary-subtle,rgb(239 246 255))}.podcast-episode-artwork{width:3rem;height:3rem;border-radius:var(--snice-border-radius-md,.25rem);object-fit:cover;flex-shrink:0}.podcast-episode-info{flex:1;min-width:0}.podcast-episode-title{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-3xs,.125rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-episode-item.active .podcast-episode-title{color:var(--snice-color-primary,rgb(37 99 235));font-weight:var(--snice-font-weight-medium,500)}.podcast-episode-date{font-size:var(--snice-font-size-xs, .75rem);color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-episode-duration{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-tertiary,rgb(115 115 115));flex-shrink:0}.podcast-episode-playing-icon{display:flex;align-items:center;gap:2px;flex-shrink:0}.podcast-episode-playing-icon span{display:inline-block;width:3px;height:.75rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:1px;animation:.8s ease-in-out infinite podcast-bar-bounce}.podcast-episode-playing-icon span:nth-child(2){animation-delay:.15s}.podcast-episode-playing-icon span:nth-child(3){animation-delay:.3s}@keyframes podcast-bar-bounce{0%,100%{height:.25rem}50%{height:.75rem}}.podcast-episode-list::-webkit-scrollbar{width:.5rem}.podcast-episode-list::-webkit-scrollbar-track{background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px}.podcast-episode-list::-webkit-scrollbar-thumb{background:var(--snice-color-border,rgb(226 226 226));border-radius:9999px}.podcast-episode-list::-webkit-scrollbar-thumb:hover{background:var(--snice-color-border-hover,rgb(204 204 204))}"}`}init(){this.audioElement=new Audio,this.audioElement.volume=this.volume,this.audioElement.muted=this.muted,this.audioElement.playbackRate=this.playbackRate,this.audioElement.addEventListener("loadedmetadata",()=>{this.duration=this.audioElement.duration,"loading"===this.state&&(this.state="paused")}),this.audioElement.addEventListener("play",()=>{this.state="playing",this.emitPlay()}),this.audioElement.addEventListener("pause",()=>{this.audioElement.ended||(this.state="paused",this.savePosition()),this.emitPause()}),this.audioElement.addEventListener("ended",()=>{this.state="stopped",this.clearSavedPosition(),this.emitEnded()}),this.audioElement.addEventListener("timeupdate",()=>{this.currentTime=this.audioElement.currentTime,this.emitTimeUpdate()}),this.audioElement.addEventListener("error",()=>{this.state="error"}),this.src&&this.loadSrc(this.src),this.fromRss&&this.fetchRSS(this.fromRss)}cleanup(){this.savePosition(),this.clearSleepTimer(),this.audioElement&&(this.audioElement.pause(),this.audioElement.src="",this.audioElement=null)}handleSrcChange(e,t){t&&this.loadSrc(t)}handleRssChange(e,t){t&&this.fetchRSS(t)}handleVolumeChange(e,t){this.audioElement&&t>=0&&t<=1&&(this.audioElement.volume=t)}handleMutedChange(e,t){this.audioElement&&(this.audioElement.muted=t)}handlePlaybackRateChange(e,t){this.audioElement&&t>=.5&&t<=2&&(this.audioElement.playbackRate=t,this.emitRateChange())}renderPlayer(){const e=this.getCurrentEpisode(),i=e?.title||this.title||"No episode loaded",s=this.show,a=e?.artwork||this.artwork,r=e?.description||this.description,o=e?.chapters||[],n=this.duration>0?this.currentTime/this.duration*100:0,c="playing"===this.state,d=!!this.src||this.currentEpisodeIndex>=0,l=1!==this.playbackRate,p=this.sleepTimerRemaining>0,h=o.length>0,m=this.episodes.length>0,u=this.showVolumeSlider,g=this.muted||0===this.volume,v=!this.muted&&this.volume>.5;return t.html`
7
+ void 0===globalThis.Snice&&console.warn("[snice] snice-runtime.min.js must be loaded before snice-podcast-player.min.js");var SnicePodcastPlayer=function(e,t){"use strict";function i(e,t,i,s,a,r){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var n,c=s.kind,d="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?s.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,s.name):{}),h=!1,m=i.length-1;m>=0;m--){var u={};for(var g in s)u[g]="access"===g?{}:s[g];for(var g in s.access)u.access[g]=s.access[g];u.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");r.push(o(e||null))};var v=(0,i[m])("accessor"===c?{get:p.get,set:p.set}:p[d],u);if("accessor"===c){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(n=o(v.get))&&(p.get=n),(n=o(v.set))&&(p.set=n),(n=o(v.init))&&a.unshift(n)}else(n=o(v))&&("field"===c?a.unshift(n):p[d]=n)}l&&Object.defineProperty(l,s.name,p),h=!0}function s(e,t,i){for(var s=arguments.length>2,a=0;a<t.length;a++)i=s?t[a].call(e,i):t[a].call(e);return s?i:void 0}"function"==typeof SuppressedError&&SuppressedError;const a=[.5,.75,1,1.25,1.5,1.75,2],r=[0,5,10,15,30,45,60];let o=(()=>{let e,o,n,c,d,l,p,h,m,u,g,v,b,f,w,y,k,x,E,S,T,$,C,R,z,P,M,I,B,F,L,N,V,j,D,q=[t.element("snice-podcast-player")],A=[],O=HTMLElement,U=[],H=[],K=[],X=[],G=[],J=[],Q=[],W=[],Y=[],Z=[],_=[],ee=[],te=[],ie=[],se=[],ae=[],re=[],oe=[],ne=[],ce=[],de=[],le=[],pe=[],he=[],me=[],ue=[],ge=[],ve=[],be=[],fe=[],we=[],ye=[],ke=[],xe=[],Ee=[];return class extends O{static{o=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(O[Symbol.metadata]??null):void 0;n=[t.property()],c=[t.property({attribute:"from-rss"})],d=[t.property()],l=[t.property()],p=[t.property()],h=[t.property()],m=[t.property({type:Number,attribute:"playback-rate"})],u=[t.property({type:Number,attribute:"skip-forward"})],g=[t.property({type:Number,attribute:"skip-back"})],v=[t.property({type:Number,attribute:"current-time"})],b=[t.property({type:Number})],f=[t.property({type:Number})],w=[t.property({type:Boolean})],y=[t.property({type:Array})],k=[t.property({type:Number,attribute:"current-episode-index"})],x=[t.property({type:Number,attribute:"sleep-timer"})],E=[t.query(".podcast-progress")],S=[t.styles()],T=[t.ready()],$=[t.dispose()],C=[t.watch("src")],R=[t.watch("fromRss")],z=[t.watch("volume")],P=[t.watch("muted")],M=[t.watch("playbackRate")],I=[t.render()],B=[t.dispatch("podcast-play",{bubbles:!0,composed:!0})],F=[t.dispatch("podcast-pause",{bubbles:!0,composed:!0})],L=[t.dispatch("podcast-ended",{bubbles:!0,composed:!0})],N=[t.dispatch("podcast-time-update",{bubbles:!0,composed:!0})],V=[t.dispatch("podcast-rate-change",{bubbles:!0,composed:!0})],j=[t.dispatch("podcast-episode-change",{bubbles:!0,composed:!0})],D=[t.dispatch("podcast-feed-loaded",{bubbles:!0,composed:!0})],i(this,null,S,{kind:"method",name:"componentStyles",static:!1,private:!1,access:{has:e=>"componentStyles"in e,get:e=>e.componentStyles},metadata:a},null,U),i(this,null,T,{kind:"method",name:"init",static:!1,private:!1,access:{has:e=>"init"in e,get:e=>e.init},metadata:a},null,U),i(this,null,$,{kind:"method",name:"cleanup",static:!1,private:!1,access:{has:e=>"cleanup"in e,get:e=>e.cleanup},metadata:a},null,U),i(this,null,C,{kind:"method",name:"handleSrcChange",static:!1,private:!1,access:{has:e=>"handleSrcChange"in e,get:e=>e.handleSrcChange},metadata:a},null,U),i(this,null,R,{kind:"method",name:"handleRssChange",static:!1,private:!1,access:{has:e=>"handleRssChange"in e,get:e=>e.handleRssChange},metadata:a},null,U),i(this,null,z,{kind:"method",name:"handleVolumeChange",static:!1,private:!1,access:{has:e=>"handleVolumeChange"in e,get:e=>e.handleVolumeChange},metadata:a},null,U),i(this,null,P,{kind:"method",name:"handleMutedChange",static:!1,private:!1,access:{has:e=>"handleMutedChange"in e,get:e=>e.handleMutedChange},metadata:a},null,U),i(this,null,M,{kind:"method",name:"handlePlaybackRateChange",static:!1,private:!1,access:{has:e=>"handlePlaybackRateChange"in e,get:e=>e.handlePlaybackRateChange},metadata:a},null,U),i(this,null,I,{kind:"method",name:"renderPlayer",static:!1,private:!1,access:{has:e=>"renderPlayer"in e,get:e=>e.renderPlayer},metadata:a},null,U),i(this,null,B,{kind:"method",name:"emitPlay",static:!1,private:!1,access:{has:e=>"emitPlay"in e,get:e=>e.emitPlay},metadata:a},null,U),i(this,null,F,{kind:"method",name:"emitPause",static:!1,private:!1,access:{has:e=>"emitPause"in e,get:e=>e.emitPause},metadata:a},null,U),i(this,null,L,{kind:"method",name:"emitEnded",static:!1,private:!1,access:{has:e=>"emitEnded"in e,get:e=>e.emitEnded},metadata:a},null,U),i(this,null,N,{kind:"method",name:"emitTimeUpdate",static:!1,private:!1,access:{has:e=>"emitTimeUpdate"in e,get:e=>e.emitTimeUpdate},metadata:a},null,U),i(this,null,V,{kind:"method",name:"emitRateChange",static:!1,private:!1,access:{has:e=>"emitRateChange"in e,get:e=>e.emitRateChange},metadata:a},null,U),i(this,null,j,{kind:"method",name:"emitEpisodeChange",static:!1,private:!1,access:{has:e=>"emitEpisodeChange"in e,get:e=>e.emitEpisodeChange},metadata:a},null,U),i(this,null,D,{kind:"method",name:"emitFeedLoaded",static:!1,private:!1,access:{has:e=>"emitFeedLoaded"in e,get:e=>e.emitFeedLoaded},metadata:a},null,U),i(null,null,n,{kind:"field",name:"src",static:!1,private:!1,access:{has:e=>"src"in e,get:e=>e.src,set:(e,t)=>{e.src=t}},metadata:a},H,K),i(null,null,c,{kind:"field",name:"fromRss",static:!1,private:!1,access:{has:e=>"fromRss"in e,get:e=>e.fromRss,set:(e,t)=>{e.fromRss=t}},metadata:a},X,G),i(null,null,d,{kind:"field",name:"title",static:!1,private:!1,access:{has:e=>"title"in e,get:e=>e.title,set:(e,t)=>{e.title=t}},metadata:a},J,Q),i(null,null,l,{kind:"field",name:"show",static:!1,private:!1,access:{has:e=>"show"in e,get:e=>e.show,set:(e,t)=>{e.show=t}},metadata:a},W,Y),i(null,null,p,{kind:"field",name:"artwork",static:!1,private:!1,access:{has:e=>"artwork"in e,get:e=>e.artwork,set:(e,t)=>{e.artwork=t}},metadata:a},Z,_),i(null,null,h,{kind:"field",name:"description",static:!1,private:!1,access:{has:e=>"description"in e,get:e=>e.description,set:(e,t)=>{e.description=t}},metadata:a},ee,te),i(null,null,m,{kind:"field",name:"playbackRate",static:!1,private:!1,access:{has:e=>"playbackRate"in e,get:e=>e.playbackRate,set:(e,t)=>{e.playbackRate=t}},metadata:a},ie,se),i(null,null,u,{kind:"field",name:"skipForward",static:!1,private:!1,access:{has:e=>"skipForward"in e,get:e=>e.skipForward,set:(e,t)=>{e.skipForward=t}},metadata:a},ae,re),i(null,null,g,{kind:"field",name:"skipBack",static:!1,private:!1,access:{has:e=>"skipBack"in e,get:e=>e.skipBack,set:(e,t)=>{e.skipBack=t}},metadata:a},oe,ne),i(null,null,v,{kind:"field",name:"currentTime",static:!1,private:!1,access:{has:e=>"currentTime"in e,get:e=>e.currentTime,set:(e,t)=>{e.currentTime=t}},metadata:a},ce,de),i(null,null,b,{kind:"field",name:"duration",static:!1,private:!1,access:{has:e=>"duration"in e,get:e=>e.duration,set:(e,t)=>{e.duration=t}},metadata:a},le,pe),i(null,null,f,{kind:"field",name:"volume",static:!1,private:!1,access:{has:e=>"volume"in e,get:e=>e.volume,set:(e,t)=>{e.volume=t}},metadata:a},he,me),i(null,null,w,{kind:"field",name:"muted",static:!1,private:!1,access:{has:e=>"muted"in e,get:e=>e.muted,set:(e,t)=>{e.muted=t}},metadata:a},ue,ge),i(null,null,y,{kind:"field",name:"episodes",static:!1,private:!1,access:{has:e=>"episodes"in e,get:e=>e.episodes,set:(e,t)=>{e.episodes=t}},metadata:a},ve,be),i(null,null,k,{kind:"field",name:"currentEpisodeIndex",static:!1,private:!1,access:{has:e=>"currentEpisodeIndex"in e,get:e=>e.currentEpisodeIndex,set:(e,t)=>{e.currentEpisodeIndex=t}},metadata:a},fe,we),i(null,null,x,{kind:"field",name:"sleepTimer",static:!1,private:!1,access:{has:e=>"sleepTimer"in e,get:e=>e.sleepTimer,set:(e,t)=>{e.sleepTimer=t}},metadata:a},ye,ke),i(null,null,E,{kind:"field",name:"progressElement",static:!1,private:!1,access:{has:e=>"progressElement"in e,get:e=>e.progressElement,set:(e,t)=>{e.progressElement=t}},metadata:a},xe,Ee),i(null,e={value:o},q,{kind:"class",name:o.name,metadata:a},null,A),o=e.value,a&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),s(o,A)}componentStyles(){return t.css`${":host{display:block;font-family:var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);contain:layout style paint}.podcast-container{background:var(--snice-color-background,rgb(255 255 255));border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-lg,.5rem);padding:var(--snice-spacing-lg,1.5rem);box-shadow:var(--snice-shadow-md,0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1))}.podcast-info{display:flex;gap:var(--snice-spacing-md,1rem);margin-bottom:var(--snice-spacing-lg,1.5rem)}.podcast-artwork{flex-shrink:0;width:7.5rem;height:7.5rem;border-radius:var(--snice-border-radius-lg,.5rem);overflow:hidden;background:var(--snice-color-background-element,rgb(252 251 249));display:flex;align-items:center;justify-content:center}.podcast-artwork img{width:100%;height:100%;object-fit:cover}.podcast-artwork-placeholder{color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-meta{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}.podcast-show{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-primary,rgb(37 99 235));margin-bottom:var(--snice-spacing-3xs,.125rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:uppercase;letter-spacing:.05em}.podcast-title{font-size:var(--snice-font-size-lg, 1.125rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-xs,.5rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-description{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text-secondary,rgb(82 82 82));line-height:var(--snice-line-height-normal, 1.5);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.podcast-controls{margin-bottom:var(--snice-spacing-md,1rem)}.podcast-control-buttons{display:flex;align-items:center;justify-content:center;gap:var(--snice-spacing-md,1rem);margin-bottom:var(--snice-spacing-md,1rem)}.podcast-btn{background:0 0;border:none;cursor:pointer;padding:var(--snice-spacing-xs,.5rem);border-radius:var(--snice-border-radius-md,.25rem);color:var(--snice-color-text,rgb(23 23 23));display:inline-flex;align-items:center;justify-content:center;transition:background-color var(--snice-transition-fast, 150ms) ease;position:relative}.podcast-btn:hover:not(:disabled){background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-btn:active:not(:disabled){background:var(--snice-color-background-active,rgb(226 226 226))}.podcast-btn:disabled{opacity:.5;cursor:not-allowed}.podcast-btn-skip-label{position:absolute;font-size:.5rem;font-weight:var(--snice-font-weight-bold,700);color:var(--snice-color-text,rgb(23 23 23));top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none}.podcast-btn-play{background:var(--snice-color-primary,rgb(37 99 235));color:var(--snice-color-text-inverse,rgb(250 250 250));padding:var(--snice-spacing-md,1rem);border-radius:50%}.podcast-btn-play:hover:not(:disabled){background:var(--snice-color-primary-hover,rgb(29 78 216))}.podcast-btn-speed{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);min-width:2.75rem;padding:var(--snice-spacing-2xs,.25rem) var(--snice-spacing-xs,.5rem);border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-md,.25rem)}.podcast-btn-speed.active{color:var(--snice-color-primary,rgb(37 99 235));border-color:var(--snice-color-primary,rgb(37 99 235))}.podcast-progress-container{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem)}.podcast-time{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-secondary,rgb(82 82 82));min-width:2.75rem}.podcast-time-current{text-align:right}.podcast-time-remaining{text-align:left}.podcast-progress{flex:1;height:.375rem;background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px;cursor:pointer;position:relative;overflow:hidden}.podcast-progress:hover{height:.5rem}.podcast-progress-bar{height:100%;background:var(--snice-color-primary,rgb(37 99 235));border-radius:9999px;transition:width .1s linear}.podcast-volume{display:flex;align-items:center;gap:var(--snice-spacing-xs,.5rem)}.podcast-volume-slider-container{display:flex;align-items:center}.podcast-volume-slider{-webkit-appearance:none;appearance:none;width:5rem;height:.375rem;background:linear-gradient(to right,var(--snice-color-primary,rgb(37 99 235)) 0,var(--snice-color-primary,rgb(37 99 235)) var(--volume-percent,100%),var(--snice-color-background-element,rgb(252 251 249)) var(--volume-percent,100%),var(--snice-color-background-element,rgb(252 251 249)) 100%);border-radius:9999px;outline:0;cursor:pointer}.podcast-volume-slider::-webkit-slider-runnable-track{width:100%;height:.375rem;background:0 0;border-radius:9999px}.podcast-volume-slider::-moz-range-track{width:100%;height:.375rem;background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px}.podcast-volume-slider::-moz-range-progress{height:.375rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:9999px}.podcast-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:.875rem;height:.875rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:50%;cursor:pointer;margin-top:-.25rem}.podcast-volume-slider::-moz-range-thumb{width:.875rem;height:.875rem;background:var(--snice-color-primary,rgb(37 99 235));border:none;border-radius:50%;cursor:pointer}.podcast-bottom-bar{display:flex;align-items:center;justify-content:space-between;margin-top:var(--snice-spacing-sm,.75rem)}.podcast-sleep{display:flex;align-items:center;gap:var(--snice-spacing-2xs,.25rem)}.podcast-sleep-label{font-size:var(--snice-font-size-xs, .75rem);color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-sleep-time{font-size:var(--snice-font-size-xs, .75rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-primary,rgb(37 99 235));font-variant-numeric:tabular-nums}.podcast-btn-sleep{font-size:var(--snice-font-size-xs, .75rem);padding:var(--snice-spacing-3xs,.125rem) var(--snice-spacing-xs,.5rem);border:1px solid var(--snice-color-border,rgb(226 226 226));border-radius:var(--snice-border-radius-md,.25rem)}.podcast-btn-sleep.active{color:var(--snice-color-primary,rgb(37 99 235));border-color:var(--snice-color-primary,rgb(37 99 235))}.podcast-chapters{border-top:1px solid var(--snice-color-border,rgb(226 226 226));padding-top:var(--snice-spacing-md,1rem);margin-top:var(--snice-spacing-md,1rem)}.podcast-chapters-header{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-sm,.75rem)}.podcast-chapter-item{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem);padding:var(--snice-spacing-xs,.5rem) var(--snice-spacing-sm,.75rem);border-radius:var(--snice-border-radius-md,.25rem);cursor:pointer;transition:background-color var(--snice-transition-fast, 150ms) ease}.podcast-chapter-item:hover{background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-chapter-item.active{background:var(--snice-color-primary-subtle,rgb(239 246 255))}.podcast-chapter-time{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-tertiary,rgb(115 115 115));min-width:2.5rem;flex-shrink:0}.podcast-chapter-title{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text,rgb(23 23 23));flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-chapter-item.active .podcast-chapter-title{color:var(--snice-color-primary,rgb(37 99 235));font-weight:var(--snice-font-weight-medium,500)}.podcast-episodes{border-top:1px solid var(--snice-color-border,rgb(226 226 226));padding-top:var(--snice-spacing-md,1rem);margin-top:var(--snice-spacing-md,1rem)}.podcast-episodes-header{font-size:var(--snice-font-size-sm, .875rem);font-weight:var(--snice-font-weight-semibold,600);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-sm,.75rem)}.podcast-episode-list{display:flex;flex-direction:column;gap:var(--snice-spacing-2xs,.25rem);max-height:18.75rem;overflow-y:auto}.podcast-episode-item{display:flex;align-items:center;gap:var(--snice-spacing-sm,.75rem);padding:var(--snice-spacing-sm,.75rem);border-radius:var(--snice-border-radius-md,.25rem);cursor:pointer;transition:background-color var(--snice-transition-fast, 150ms) ease}.podcast-episode-item:hover{background:var(--snice-color-background-hover,rgb(241 241 241))}.podcast-episode-item.active{background:var(--snice-color-primary-subtle,rgb(239 246 255))}.podcast-episode-artwork{width:3rem;height:3rem;border-radius:var(--snice-border-radius-md,.25rem);object-fit:cover;flex-shrink:0}.podcast-episode-info{flex:1;min-width:0}.podcast-episode-title{font-size:var(--snice-font-size-sm, .875rem);color:var(--snice-color-text,rgb(23 23 23));margin-bottom:var(--snice-spacing-3xs,.125rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.podcast-episode-item.active .podcast-episode-title{color:var(--snice-color-primary,rgb(37 99 235));font-weight:var(--snice-font-weight-medium,500)}.podcast-episode-date{font-size:var(--snice-font-size-xs, .75rem);color:var(--snice-color-text-tertiary,rgb(115 115 115))}.podcast-episode-duration{font-size:var(--snice-font-size-xs, .75rem);font-variant-numeric:tabular-nums;color:var(--snice-color-text-tertiary,rgb(115 115 115));flex-shrink:0}.podcast-episode-playing-icon{display:flex;align-items:center;gap:2px;flex-shrink:0}.podcast-episode-playing-icon span{display:inline-block;width:3px;height:.75rem;background:var(--snice-color-primary,rgb(37 99 235));border-radius:1px;animation:.8s ease-in-out infinite podcast-bar-bounce}.podcast-episode-playing-icon span:nth-child(2){animation-delay:.15s}.podcast-episode-playing-icon span:nth-child(3){animation-delay:.3s}@keyframes podcast-bar-bounce{0%,100%{height:.25rem}50%{height:.75rem}}.podcast-episode-list::-webkit-scrollbar{width:.5rem}.podcast-episode-list::-webkit-scrollbar-track{background:var(--snice-color-background-element,rgb(252 251 249));border-radius:9999px}.podcast-episode-list::-webkit-scrollbar-thumb{background:var(--snice-color-border,rgb(226 226 226));border-radius:9999px}.podcast-episode-list::-webkit-scrollbar-thumb:hover{background:var(--snice-color-border-hover,rgb(204 204 204))}"}`}init(){this.audioElement=new Audio,this.audioElement.volume=this.volume,this.audioElement.muted=this.muted,this.audioElement.playbackRate=this.playbackRate,this.audioElement.addEventListener("loadedmetadata",()=>{this.duration=this.audioElement.duration,"loading"===this.state&&(this.state="paused")}),this.audioElement.addEventListener("play",()=>{this.state="playing",this.emitPlay()}),this.audioElement.addEventListener("pause",()=>{this.audioElement.ended||(this.state="paused",this.savePosition()),this.emitPause()}),this.audioElement.addEventListener("ended",()=>{this.state="stopped",this.clearSavedPosition(),this.emitEnded()}),this.audioElement.addEventListener("timeupdate",()=>{this.currentTime=this.audioElement.currentTime,this.emitTimeUpdate()}),this.audioElement.addEventListener("error",()=>{this.state="error"}),this.src&&this.loadSrc(this.src),this.fromRss&&this.fetchRSS(this.fromRss)}cleanup(){this.savePosition(),this.clearSleepTimer(),this.audioElement&&(this.audioElement.pause(),this.audioElement.src="",this.audioElement=null)}handleSrcChange(e,t){t&&this.loadSrc(t)}handleRssChange(e,t){t&&this.fetchRSS(t)}handleVolumeChange(e,t){this.audioElement&&t>=0&&t<=1&&(this.audioElement.volume=t)}handleMutedChange(e,t){this.audioElement&&(this.audioElement.muted=t)}handlePlaybackRateChange(e,t){this.audioElement&&t>=.5&&t<=2&&(this.audioElement.playbackRate=t,this.emitRateChange())}renderPlayer(){const e=this.getCurrentEpisode(),i=e?.title||this.title||"No episode loaded",s=this.show,a=e?.artwork||this.artwork,r=e?.description||this.description,o=e?.chapters||[],n=this.duration>0?this.currentTime/this.duration*100:0,c="playing"===this.state,d=!!this.src||this.currentEpisodeIndex>=0,l=1!==this.playbackRate,p=this.sleepTimerRemaining>0,h=o.length>0,m=this.episodes.length>0,u=this.showVolumeSlider,g=this.muted||0===this.volume,v=!this.muted&&this.volume>.5;return t.html`
8
8
  <div class="podcast-container">
9
9
  <div class="podcast-info">
10
10
  <div class="podcast-artwork">