vanilla-breeze 0.5.0 → 0.6.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 (263) hide show
  1. package/custom-elements.json +22381 -13213
  2. package/dist/cdn/components/accordion-wc.js +1 -1
  3. package/dist/cdn/components/activity-feed.js +1 -1
  4. package/dist/cdn/components/ai-chat.js +5 -5
  5. package/dist/cdn/components/ai-summary.js +2 -2
  6. package/dist/cdn/components/analytics-panel.js +2 -2
  7. package/dist/cdn/components/audio-player.js +4 -4
  8. package/dist/cdn/components/audio-visualizer.js +2 -2
  9. package/dist/cdn/components/author-index.js +2 -2
  10. package/dist/cdn/components/brand-mark.js +1 -1
  11. package/dist/cdn/components/bread-crumb.js +1 -1
  12. package/dist/cdn/components/calendar-wc.js +2 -2
  13. package/dist/cdn/components/card-list.js +1 -1
  14. package/dist/cdn/components/carousel-wc.js +1 -1
  15. package/dist/cdn/components/change-set.js +1 -1
  16. package/dist/cdn/components/chart-wc.js +6 -6
  17. package/dist/cdn/components/chat-input.js +1 -1
  18. package/dist/cdn/components/chat-window.js +1 -1
  19. package/dist/cdn/components/color-picker.js +1 -1
  20. package/dist/cdn/components/combo-box.js +1 -1
  21. package/dist/cdn/components/command-palette.js +1 -1
  22. package/dist/cdn/components/comment-box.js +51 -50
  23. package/dist/cdn/components/comment-thread.js +50 -49
  24. package/dist/cdn/components/comment-wc.js +1 -1
  25. package/dist/cdn/components/compare-surface.js +1 -1
  26. package/dist/cdn/components/consent-banner.js +1 -1
  27. package/dist/cdn/components/content-lens.js +1 -1
  28. package/dist/cdn/components/content-swap.js +1 -1
  29. package/dist/cdn/components/context-menu.js +1 -1
  30. package/dist/cdn/components/data-table.js +1 -1
  31. package/dist/cdn/components/date-picker.js +1 -1
  32. package/dist/cdn/components/day-view.js +1 -1
  33. package/dist/cdn/components/diagram-wc.js +2 -2
  34. package/dist/cdn/components/drag-surface.js +1 -1
  35. package/dist/cdn/components/drop-down.js +1 -1
  36. package/dist/cdn/components/emoji-picker.js +1 -1
  37. package/dist/cdn/components/flow-diagram.js +1 -1
  38. package/dist/cdn/components/foot-notes.js +1 -1
  39. package/dist/cdn/components/form-field.js +1 -1
  40. package/dist/cdn/components/geo-map.js +170 -54
  41. package/dist/cdn/components/glossary-index.js +1 -1
  42. package/dist/cdn/components/glossary-wc.js +1 -1
  43. package/dist/cdn/components/heading-links.js +1 -1
  44. package/dist/cdn/components/highlight-wc.js +6 -2
  45. package/dist/cdn/components/icon-wc.js +11 -10
  46. package/dist/cdn/components/image-gallery.js +1 -1
  47. package/dist/cdn/components/image-map.js +1 -1
  48. package/dist/cdn/components/include-file.js +1 -1
  49. package/dist/cdn/components/manifest.json +101 -101
  50. package/dist/cdn/components/markdown-editor.js +60 -1
  51. package/dist/cdn/components/markdown-viewer.js +50 -49
  52. package/dist/cdn/components/nav-bar.js +1 -1
  53. package/dist/cdn/components/note-wc.js +6 -2
  54. package/dist/cdn/components/notification-wc.js +33 -32
  55. package/dist/cdn/components/page-info.js +6 -72
  56. package/dist/cdn/components/page-stats.js +1 -1
  57. package/dist/cdn/components/page-toc.js +1 -1
  58. package/dist/cdn/components/page-tools.js +1 -1
  59. package/dist/cdn/components/page-tour.js +1 -38
  60. package/dist/cdn/components/pager-wc.js +1 -1
  61. package/dist/cdn/components/poll-wc.js +1 -1
  62. package/dist/cdn/components/pop-over.js +1 -1
  63. package/dist/cdn/components/popularity-index.js +1 -8
  64. package/dist/cdn/components/print-page.js +1 -1
  65. package/dist/cdn/components/progress-tracker.js +1 -1
  66. package/dist/cdn/components/qr-code.js +1 -1
  67. package/dist/cdn/components/reaction-bar.js +1 -1
  68. package/dist/cdn/components/reader-view.js +25 -25
  69. package/dist/cdn/components/reading-progress.js +1 -1
  70. package/dist/cdn/components/recently-visited.js +1 -26
  71. package/dist/cdn/components/score-card.js +21 -5
  72. package/dist/cdn/components/selection-menu.js +1 -1
  73. package/dist/cdn/components/settings-panel.js +88 -142
  74. package/dist/cdn/components/share-wc.js +2 -2
  75. package/dist/cdn/components/short-cuts.js +1 -1
  76. package/dist/cdn/components/site-index.js +1 -10
  77. package/dist/cdn/components/site-map.js +1 -1
  78. package/dist/cdn/components/site-search.js +1 -51
  79. package/dist/cdn/components/slide-accept.js +1 -1
  80. package/dist/cdn/components/social-embed.js +1 -1
  81. package/dist/cdn/components/split-surface.js +1 -1
  82. package/dist/cdn/components/star-rating.js +1 -1
  83. package/dist/cdn/components/status-wc.js +1 -1
  84. package/dist/cdn/components/stepper-wc.js +1 -1
  85. package/dist/cdn/components/tab-set.js +1 -1
  86. package/dist/cdn/components/text-reader.js +2 -2
  87. package/dist/cdn/components/theme-picker.js +86 -83
  88. package/dist/cdn/components/time-index.js +1 -11
  89. package/dist/cdn/components/time-picker.js +1 -1
  90. package/dist/cdn/components/toast-msg.js +6 -6
  91. package/dist/cdn/components/tool-tip.js +1 -1
  92. package/dist/cdn/components/topic-map.js +6 -3
  93. package/dist/cdn/components/trust-filter.js +1 -3
  94. package/dist/cdn/components/version-switcher.js +5 -5
  95. package/dist/cdn/components/video-player.js +67 -9
  96. package/dist/cdn/components/watch-wc.js +6 -2
  97. package/dist/cdn/components/week-view.js +1 -1
  98. package/dist/cdn/components/youtube-player.js +1 -1
  99. package/dist/cdn/emoji-extended.js +2 -0
  100. package/dist/cdn/fonts/atkinson-hyperlegible-OFL.txt +93 -0
  101. package/dist/cdn/fonts/atkinson-hyperlegible-latin-400-italic.woff2 +0 -0
  102. package/dist/cdn/fonts/atkinson-hyperlegible-latin-400-normal.woff2 +0 -0
  103. package/dist/cdn/fonts/atkinson-hyperlegible-latin-700-italic.woff2 +0 -0
  104. package/dist/cdn/fonts/atkinson-hyperlegible-latin-700-normal.woff2 +0 -0
  105. package/dist/cdn/fonts/atkinson-hyperlegible-latin-ext-400-italic.woff2 +0 -0
  106. package/dist/cdn/fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2 +0 -0
  107. package/dist/cdn/fonts/atkinson-hyperlegible-latin-ext-700-italic.woff2 +0 -0
  108. package/dist/cdn/fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2 +0 -0
  109. package/dist/cdn/fonts/latinmodern-math-GUST-LICENSE.txt +30 -0
  110. package/dist/cdn/fonts/latinmodern-math.woff2 +0 -0
  111. package/dist/cdn/fonts/math-fonts.css +14 -0
  112. package/dist/cdn/packs/effects.full.css +1 -1
  113. package/dist/cdn/packs/effects.full.js +1 -1
  114. package/dist/cdn/packs/fonts-display.full.css +1 -1
  115. package/dist/cdn/packs/fonts-display.theme.css +1 -1
  116. package/dist/cdn/packs/icons.bundle.js +1 -1
  117. package/dist/cdn/packs/icons.full.css +1 -1
  118. package/dist/cdn/packs/icons.theme.css +1 -1
  119. package/dist/cdn/packs/journal.effects.css +1 -1
  120. package/dist/cdn/packs/journal.full.css +1 -1
  121. package/dist/cdn/packs/kawaii.effects.css +1 -1
  122. package/dist/cdn/packs/kawaii.full.css +2 -2
  123. package/dist/cdn/packs/kawaii.full.js +4 -4
  124. package/dist/cdn/packs/kawaii.theme.css +1 -1
  125. package/dist/cdn/packs/manifest.json +17 -17
  126. package/dist/cdn/packs/memphis.full.css +1 -1
  127. package/dist/cdn/packs/memphis.theme.css +1 -1
  128. package/dist/cdn/packs/ui.full.css +1 -1
  129. package/dist/cdn/packs/ui.full.js +89 -86
  130. package/dist/cdn/themes/8bit.css +1 -1
  131. package/dist/cdn/themes/8bit.tokens.json +1 -1
  132. package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
  133. package/dist/cdn/themes/alpha1999.css +1 -1
  134. package/dist/cdn/themes/alpha1999.tokens.json +1 -1
  135. package/dist/cdn/themes/art-deco-dark.tokens.json +1 -1
  136. package/dist/cdn/themes/art-deco.css +1 -1
  137. package/dist/cdn/themes/art-deco.tokens.json +1 -1
  138. package/dist/cdn/themes/bauhaus-dark.tokens.json +1 -1
  139. package/dist/cdn/themes/bauhaus.css +1 -1
  140. package/dist/cdn/themes/bauhaus.tokens.json +1 -1
  141. package/dist/cdn/themes/brutalist-dark.tokens.json +1 -1
  142. package/dist/cdn/themes/brutalist.css +1 -1
  143. package/dist/cdn/themes/brutalist.tokens.json +1 -1
  144. package/dist/cdn/themes/catppuccin-frappe.css +1 -1
  145. package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
  146. package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
  147. package/dist/cdn/themes/catppuccin-latte.css +1 -1
  148. package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
  149. package/dist/cdn/themes/catppuccin-macchiato.css +1 -1
  150. package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
  151. package/dist/cdn/themes/catppuccin-mocha.css +1 -1
  152. package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
  153. package/dist/cdn/themes/classic-dark.tokens.json +1 -1
  154. package/dist/cdn/themes/classic.css +1 -1
  155. package/dist/cdn/themes/classic.tokens.json +1 -1
  156. package/dist/cdn/themes/claymorphism-dark.tokens.json +1 -1
  157. package/dist/cdn/themes/claymorphism.css +1 -1
  158. package/dist/cdn/themes/claymorphism.tokens.json +2 -1
  159. package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
  160. package/dist/cdn/themes/clinical.css +1 -1
  161. package/dist/cdn/themes/clinical.tokens.json +1 -1
  162. package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
  163. package/dist/cdn/themes/cottagecore.css +1 -1
  164. package/dist/cdn/themes/cottagecore.tokens.json +1 -1
  165. package/dist/cdn/themes/cyber.css +1 -1
  166. package/dist/cdn/themes/cyber.tokens.json +1 -1
  167. package/dist/cdn/themes/dawn-dark.tokens.json +1 -1
  168. package/dist/cdn/themes/dawn.css +1 -1
  169. package/dist/cdn/themes/dawn.tokens.json +1 -1
  170. package/dist/cdn/themes/dracula.css +1 -1
  171. package/dist/cdn/themes/dracula.tokens.json +1 -1
  172. package/dist/cdn/themes/dusk.css +1 -1
  173. package/dist/cdn/themes/dusk.tokens.json +1 -1
  174. package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
  175. package/dist/cdn/themes/editorial.css +1 -1
  176. package/dist/cdn/themes/editorial.tokens.json +1 -1
  177. package/dist/cdn/themes/financial-dark.tokens.json +1 -1
  178. package/dist/cdn/themes/financial.css +1 -1
  179. package/dist/cdn/themes/financial.tokens.json +1 -1
  180. package/dist/cdn/themes/genai.css +1 -1
  181. package/dist/cdn/themes/genai.tokens.json +1 -1
  182. package/dist/cdn/themes/glassmorphism-dark.tokens.json +1 -1
  183. package/dist/cdn/themes/glassmorphism.css +1 -1
  184. package/dist/cdn/themes/glassmorphism.tokens.json +1 -1
  185. package/dist/cdn/themes/government-dark.tokens.json +1 -1
  186. package/dist/cdn/themes/government.css +1 -1
  187. package/dist/cdn/themes/government.tokens.json +1 -1
  188. package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
  189. package/dist/cdn/themes/gruvbox.css +1 -1
  190. package/dist/cdn/themes/gruvbox.tokens.json +1 -1
  191. package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
  192. package/dist/cdn/themes/high-noon.css +1 -1
  193. package/dist/cdn/themes/high-noon.tokens.json +1 -1
  194. package/dist/cdn/themes/journal-dark.tokens.json +4 -2
  195. package/dist/cdn/themes/journal.css +1 -1
  196. package/dist/cdn/themes/journal.tokens.json +4 -2
  197. package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
  198. package/dist/cdn/themes/kawaii.css +1 -1
  199. package/dist/cdn/themes/kawaii.tokens.json +1 -1
  200. package/dist/cdn/themes/magna-dark.tokens.json +1 -1
  201. package/dist/cdn/themes/magna.css +1 -1
  202. package/dist/cdn/themes/magna.tokens.json +1 -1
  203. package/dist/cdn/themes/manifest.json +44 -44
  204. package/dist/cdn/themes/midnight.css +1 -1
  205. package/dist/cdn/themes/midnight.tokens.json +1 -1
  206. package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
  207. package/dist/cdn/themes/minimal.css +1 -1
  208. package/dist/cdn/themes/minimal.tokens.json +1 -1
  209. package/dist/cdn/themes/modern-dark.tokens.json +1 -1
  210. package/dist/cdn/themes/modern.css +1 -1
  211. package/dist/cdn/themes/modern.tokens.json +1 -1
  212. package/dist/cdn/themes/nes-dark.tokens.json +7 -2
  213. package/dist/cdn/themes/nes.css +1 -1
  214. package/dist/cdn/themes/nes.tokens.json +1 -1
  215. package/dist/cdn/themes/neumorphism-dark.tokens.json +1 -1
  216. package/dist/cdn/themes/neumorphism.css +1 -1
  217. package/dist/cdn/themes/neumorphism.tokens.json +1 -1
  218. package/dist/cdn/themes/nord-dark.tokens.json +1 -1
  219. package/dist/cdn/themes/nord.css +1 -1
  220. package/dist/cdn/themes/nord.tokens.json +1 -1
  221. package/dist/cdn/themes/organic-dark.tokens.json +1 -1
  222. package/dist/cdn/themes/organic.css +1 -1
  223. package/dist/cdn/themes/organic.tokens.json +1 -1
  224. package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
  225. package/dist/cdn/themes/rose-pine.css +1 -1
  226. package/dist/cdn/themes/rose-pine.tokens.json +1 -1
  227. package/dist/cdn/themes/rough-dark.tokens.json +1 -1
  228. package/dist/cdn/themes/rough.css +1 -1
  229. package/dist/cdn/themes/rough.tokens.json +1 -1
  230. package/dist/cdn/themes/solarized-dark.tokens.json +1 -1
  231. package/dist/cdn/themes/solarized.css +1 -1
  232. package/dist/cdn/themes/solarized.tokens.json +1 -1
  233. package/dist/cdn/themes/startup-dark.tokens.json +1 -1
  234. package/dist/cdn/themes/startup.css +1 -1
  235. package/dist/cdn/themes/startup.tokens.json +1 -1
  236. package/dist/cdn/themes/super2026-dark.tokens.json +1 -1
  237. package/dist/cdn/themes/super2026.css +1 -1
  238. package/dist/cdn/themes/super2026.tokens.json +1 -1
  239. package/dist/cdn/themes/swiss-dark.tokens.json +1 -1
  240. package/dist/cdn/themes/swiss.css +1 -1
  241. package/dist/cdn/themes/swiss.tokens.json +1 -1
  242. package/dist/cdn/themes/terminal.css +1 -1
  243. package/dist/cdn/themes/terminal.tokens.json +1 -1
  244. package/dist/cdn/themes/tokyo-night-dark.tokens.json +1 -1
  245. package/dist/cdn/themes/tokyo-night.css +1 -1
  246. package/dist/cdn/themes/tokyo-night.tokens.json +1 -1
  247. package/dist/cdn/themes/vaporwave-dark.tokens.json +1 -1
  248. package/dist/cdn/themes/vaporwave.css +1 -1
  249. package/dist/cdn/themes/vaporwave.tokens.json +1 -1
  250. package/dist/cdn/themes/win9x-dark.tokens.json +6 -2
  251. package/dist/cdn/themes/win9x.css +1 -1
  252. package/dist/cdn/themes/win9x.tokens.json +3 -1
  253. package/dist/cdn/vanilla-breeze-autoload.js +187 -297
  254. package/dist/cdn/vanilla-breeze-charts.css +1 -1
  255. package/dist/cdn/vanilla-breeze-charts.js +6 -6
  256. package/dist/cdn/vanilla-breeze-core.css +1 -1
  257. package/dist/cdn/vanilla-breeze-core.js +166 -262
  258. package/dist/cdn/vanilla-breeze-dev.js +1 -1
  259. package/dist/cdn/vanilla-breeze-extras.js +272 -130
  260. package/dist/cdn/vanilla-breeze.css +1 -1
  261. package/dist/cdn/vanilla-breeze.js +536 -621
  262. package/dist/cdn/view-transitions.css +2 -0
  263. package/package.json +15 -7
@@ -1,4 +1,4 @@
1
- var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{for(var e in t)ps(r,e,{get:t[e],enumerable:!0})};function li(r,t,e){let i=Math.pow(2,e),s=r*Math.PI/180,n=(t+180)/360*i,o=(1-Math.log(Math.tan(s)+1/Math.cos(s))/Math.PI)/2*i,a=Math.floor(n),l=Math.floor(o),c=Math.round((n-a)*256),h=Math.round((o-l)*256);return{tileX:a,tileY:l,pixelX:c,pixelY:h}}function ci(r,t,e){let i=256*Math.pow(2,e),s=r/i*360-180;return{lat:Math.atan(Math.sinh(Math.PI*(1-2*t/i)))*180/Math.PI,lng:s}}function ot(r,t,e,i,s){if(s)return s.replace("{z}",String(t)).replace("{x}",String(e)).replace("{y}",String(i));switch(r){case"carto-light":return`https://basemaps.cartocdn.com/light_all/${t}/${e}/${i}.png`;case"carto-dark":return`https://basemaps.cartocdn.com/dark_all/${t}/${e}/${i}.png`;default:return`https://tile.openstreetmap.org/${t}/${e}/${i}.png`}}var Pt=Lt(()=>{});var hi={};Ye(hi,{MapInteraction:()=>Bt});var Bt,ui=Lt(()=>{Pt();Bt=class{#t;#e;#i;#s;#n;#r;#o=0;#a=0;#h=15;#c=1;#l=19;#m=0;#d=0;#p=new Map;#u=null;#g=0;#v=0;#f=!1;#w=0;#y=0;constructor({shadow:t,host:e,lat:i,lng:s,zoom:n,provider:o,tileUrl:a,onDeactivate:l}){this.#t=t,this.#e=e,this.#s=o,this.#n=a||"",this.#r=l,this.#h=n,this.#i=t.querySelector('[part="tiles"]'),this.#u=t.querySelector('[part="marker"]');let c=256*Math.pow(2,n),h=i*Math.PI/180;this.#o=(s+180)/360*c,this.#a=(1-Math.log(Math.tan(h)+1/Math.cos(h))/Math.PI)/2*c,this.#g=this.#o,this.#v=this.#a,this.#m=this.#e.offsetWidth||400,this.#d=this.#e.offsetHeight||300,this.#i.innerHTML="",this.#i.style.transform="",this.#u&&(this.#u.style.position="absolute",this.#u.style.top="",this.#u.style.left="",this.#i.appendChild(this.#u)),this.#b(),this.#S()}#b(){this.#i.addEventListener("pointerdown",this.#k),this.#i.addEventListener("wheel",this.#A,{passive:!1}),this.#e.addEventListener("keydown",this.#R)}#k=t=>{t.button===0&&(t.preventDefault(),this.#f=!0,this.#w=t.clientX,this.#y=t.clientY,this.#i.setPointerCapture(t.pointerId),this.#i.setAttribute("data-dragging",""),this.#i.addEventListener("pointermove",this.#L),this.#i.addEventListener("pointerup",this.#x))};#L=t=>{if(!this.#f)return;let e=t.clientX-this.#w,i=t.clientY-this.#y;this.#w=t.clientX,this.#y=t.clientY,this.#o-=e,this.#a-=i,this.#E(),this.#S()};#x=t=>{this.#f=!1,this.#i.releasePointerCapture(t.pointerId),this.#i.removeAttribute("data-dragging"),this.#i.removeEventListener("pointermove",this.#L),this.#i.removeEventListener("pointerup",this.#x),this.#_()};#A=t=>{t.preventDefault();let e=t.ctrlKey?-t.deltaY*.01:-Math.sign(t.deltaY),i=Math.round(Math.max(this.#c,Math.min(this.#l,this.#h+e)));if(i===this.#h)return;let s=this.#e.getBoundingClientRect(),n=t.clientX-s.left,o=t.clientY-s.top;this.#C(i,n,o)};#R=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.#o-=80,this.#E(),this.#S(),this.#_();break;case"ArrowRight":t.preventDefault(),this.#o+=80,this.#E(),this.#S(),this.#_();break;case"ArrowUp":t.preventDefault(),this.#a-=80,this.#E(),this.#S(),this.#_();break;case"ArrowDown":t.preventDefault(),this.#a+=80,this.#E(),this.#S(),this.#_();break;case"+":case"=":t.preventDefault(),this.#C(this.#h+1,this.#m/2,this.#d/2);break;case"-":t.preventDefault(),this.#C(this.#h-1,this.#m/2,this.#d/2);break;case"Escape":t.preventDefault(),this.#r();break}};#C(t,e,i){if(t=Math.max(this.#c,Math.min(this.#l,t)),t===this.#h)return;let s=this.#o-this.#m/2,n=this.#a-this.#d/2,o=s+e,a=n+i,l=Math.pow(2,t-this.#h);this.#o=o*l-e+this.#m/2,this.#a=a*l-i+this.#d/2,this.#g*=l,this.#v*=l,this.#h=t,this.#j(),this.#E(),this.#S(),this.#_()}#E(){let t=256*Math.pow(2,this.#h);this.#o=(this.#o%t+t)%t,this.#a=Math.max(this.#d/2,Math.min(t-this.#d/2,this.#a))}#S(){let t=-(this.#o-this.#m/2),e=-(this.#a-this.#d/2);this.#i.style.transform=`translate(${Math.round(t)}px, ${Math.round(e)}px)`,this.#M(),this.#N(),this.#$()}#M(){let t=this.#h,e=Math.pow(2,t),i=this.#o-this.#m/2,s=this.#a-this.#d/2,n=i+this.#m,o=s+this.#d,a=Math.floor(i/256)-1,l=Math.max(0,Math.floor(s/256)-1),c=Math.ceil(n/256)+1,h=Math.min(e,Math.ceil(o/256)+1);for(let u=l;u<h;u++)for(let d=a;d<c;d++){let f=(d%e+e)%e,g=`${t}/${f}/${u}`;this.#p.has(g)||this.#T(t,d,u,f)}}#T(t,e,i,s){let n=`${t}/${s}/${i}`;if(this.#p.has(n))return;let o=e*256,a=i*256,l=document.createElement("img");l.src=ot(this.#s,t,s,i,this.#n),l.alt="",l.draggable=!1,l.style.left=o+"px",l.style.top=a+"px",l.style.width="256px",l.style.height="256px",l._wx=o,l._wy=a,this.#p.set(n,l),this.#i.appendChild(l)}#N(){let t=this.#o-this.#m/2,e=this.#a-this.#d/2,i=512;for(let[s,n]of this.#p){let o=n._wx,a=n._wy;(o+256<t-i||o>t+this.#m+i||a+256<e-i||a>e+this.#d+i)&&(n.remove(),this.#p.delete(s))}}#$(){if(!this.#u)return;let t=this.#u.offsetWidth||32;this.#u.style.left=`${Math.round(this.#g-t/2)}px`,this.#u.style.top=`${Math.round(this.#v-t)}px`,this.#u.style.transform=""}#_(){let{lat:t,lng:e}=ci(this.#o,this.#a,this.#h);this.#e.dispatchEvent(new CustomEvent("geo-map:move",{bubbles:!0,detail:{lat:+t.toFixed(6),lng:+e.toFixed(6),zoom:this.#h}}))}#j(){for(let t of this.#p.values())t.remove();this.#p.clear()}destroy(){if(this.#i.removeEventListener("pointerdown",this.#k),this.#i.removeEventListener("wheel",this.#A),this.#e.removeEventListener("keydown",this.#R),this.#i.removeEventListener("pointermove",this.#L),this.#i.removeEventListener("pointerup",this.#x),this.#u&&this.#u.parentNode===this.#i){let t=this.#t.querySelector('[part="container"]');t&&(t.insertBefore(this.#u,this.#i.nextSibling),this.#u.style.position="",this.#u.style.left="",this.#u.style.top="",this.#u.style.transform="")}this.#j(),this.#e.removeAttribute("data-interactive-active")}}});var qt={};Ye(qt,{EMOJI_ALIASES:()=>di,EMOJI_GROUPS:()=>As,EMOJI_GROUP_ICONS:()=>Ss,EMOJI_GROUP_LABELS:()=>Es,EMOJI_MAP:()=>X,getByGroup:()=>Ts,resolveEmoji:()=>Cs,searchEmoji:()=>_s});function pi(r){for(let[t,e,i,s]of r){if(X.has(t))continue;let n={shortcode:t,emoji:e,name:i,keywords:[],group:s};X.set(t,n),lt.push(n)}}function Cs(r){let t=X.get(r);if(t)return t;let e=di.get(r);return e&&X.get(e)||null}function Ts(r){let t=at.filter(i=>i.group===r),e=lt.filter(i=>i.group===r);return e.length>0?t.concat(e):t}function _s(r){let t=r.toLowerCase().trim(),e=lt.length>0?at.concat(lt):at;return t?e.filter(i=>i.shortcode.includes(t)||i.name.toLowerCase().includes(t)||i.keywords&&i.keywords.some(s=>s.includes(t))):e}var at,X,di,As,Es,Ss,lt,Dt=Lt(()=>{at=[{shortcode:"smile",emoji:"\u{1F604}",name:"Smiling Face with Open Mouth",keywords:["happy","joy","laugh"],group:"smileys"},{shortcode:"grinning",emoji:"\u{1F600}",name:"Grinning Face",keywords:["happy","smile"],group:"smileys"},{shortcode:"laughing",emoji:"\u{1F606}",name:"Grinning Squinting Face",keywords:["happy","laugh"],group:"smileys"},{shortcode:"sweat_smile",emoji:"\u{1F605}",name:"Grinning Face with Sweat",keywords:["hot","relief"],group:"smileys"},{shortcode:"rofl",emoji:"\u{1F923}",name:"Rolling on the Floor Laughing",keywords:["lol","funny"],group:"smileys"},{shortcode:"joy",emoji:"\u{1F602}",name:"Face with Tears of Joy",keywords:["happy","cry","laugh"],group:"smileys"},{shortcode:"slightly_smiling_face",emoji:"\u{1F642}",name:"Slightly Smiling Face",keywords:["smile"],group:"smileys"},{shortcode:"upside_down_face",emoji:"\u{1F643}",name:"Upside-Down Face",keywords:["sarcasm","silly"],group:"smileys"},{shortcode:"wink",emoji:"\u{1F609}",name:"Winking Face",keywords:["flirt","joke"],group:"smileys"},{shortcode:"blush",emoji:"\u{1F60A}",name:"Smiling Face with Smiling Eyes",keywords:["happy","shy"],group:"smileys"},{shortcode:"innocent",emoji:"\u{1F607}",name:"Smiling Face with Halo",keywords:["angel","good"],group:"smileys"},{shortcode:"heart_eyes",emoji:"\u{1F60D}",name:"Smiling Face with Heart-Eyes",keywords:["love","crush"],group:"smileys"},{shortcode:"star_struck",emoji:"\u{1F929}",name:"Star-Struck",keywords:["wow","amazing"],group:"smileys"},{shortcode:"kissing_heart",emoji:"\u{1F618}",name:"Face Blowing a Kiss",keywords:["love","kiss"],group:"smileys"},{shortcode:"yum",emoji:"\u{1F60B}",name:"Face Savoring Food",keywords:["delicious","tasty"],group:"smileys"},{shortcode:"stuck_out_tongue",emoji:"\u{1F61B}",name:"Face with Tongue",keywords:["playful","silly"],group:"smileys"},{shortcode:"stuck_out_tongue_winking_eye",emoji:"\u{1F61C}",name:"Winking Face with Tongue",keywords:["silly","playful"],group:"smileys"},{shortcode:"zany_face",emoji:"\u{1F92A}",name:"Zany Face",keywords:["crazy","wild"],group:"smileys"},{shortcode:"hugs",emoji:"\u{1F917}",name:"Hugging Face",keywords:["hug","warm"],group:"smileys"},{shortcode:"thinking",emoji:"\u{1F914}",name:"Thinking Face",keywords:["hmm","consider"],group:"smileys"},{shortcode:"shushing_face",emoji:"\u{1F92B}",name:"Shushing Face",keywords:["quiet","secret"],group:"smileys"},{shortcode:"smirk",emoji:"\u{1F60F}",name:"Smirking Face",keywords:["sly","suggestive"],group:"smileys"},{shortcode:"unamused",emoji:"\u{1F612}",name:"Unamused Face",keywords:["bored","unimpressed"],group:"smileys"},{shortcode:"roll_eyes",emoji:"\u{1F644}",name:"Face with Rolling Eyes",keywords:["annoyed","whatever"],group:"smileys"},{shortcode:"grimacing",emoji:"\u{1F62C}",name:"Grimacing Face",keywords:["awkward","nervous"],group:"smileys"},{shortcode:"relieved",emoji:"\u{1F60C}",name:"Relieved Face",keywords:["calm","peaceful"],group:"smileys"},{shortcode:"pensive",emoji:"\u{1F614}",name:"Pensive Face",keywords:["sad","thoughtful"],group:"smileys"},{shortcode:"sleepy",emoji:"\u{1F62A}",name:"Sleepy Face",keywords:["tired","sleep"],group:"smileys"},{shortcode:"sleeping",emoji:"\u{1F634}",name:"Sleeping Face",keywords:["zzz","sleep"],group:"smileys"},{shortcode:"mask",emoji:"\u{1F637}",name:"Face with Medical Mask",keywords:["sick","health"],group:"smileys"},{shortcode:"nerd_face",emoji:"\u{1F913}",name:"Nerd Face",keywords:["geek","smart"],group:"smileys"},{shortcode:"sunglasses",emoji:"\u{1F60E}",name:"Smiling Face with Sunglasses",keywords:["cool","chill"],group:"smileys"},{shortcode:"confused",emoji:"\u{1F615}",name:"Confused Face",keywords:["puzzled","unsure"],group:"smileys"},{shortcode:"worried",emoji:"\u{1F61F}",name:"Worried Face",keywords:["anxious","concern"],group:"smileys"},{shortcode:"cry",emoji:"\u{1F622}",name:"Crying Face",keywords:["sad","tear"],group:"smileys"},{shortcode:"sob",emoji:"\u{1F62D}",name:"Loudly Crying Face",keywords:["sad","cry"],group:"smileys"},{shortcode:"angry",emoji:"\u{1F620}",name:"Angry Face",keywords:["mad","annoyed"],group:"smileys"},{shortcode:"rage",emoji:"\u{1F92C}",name:"Face with Symbols on Mouth",keywords:["angry","swear"],group:"smileys"},{shortcode:"exploding_head",emoji:"\u{1F92F}",name:"Exploding Head",keywords:["mind blown","shocked"],group:"smileys"},{shortcode:"flushed",emoji:"\u{1F633}",name:"Flushed Face",keywords:["embarrassed","shocked"],group:"smileys"},{shortcode:"scream",emoji:"\u{1F631}",name:"Face Screaming in Fear",keywords:["scared","horror"],group:"smileys"},{shortcode:"skull",emoji:"\u{1F480}",name:"Skull",keywords:["dead","death"],group:"smileys"},{shortcode:"clown_face",emoji:"\u{1F921}",name:"Clown Face",keywords:["joke","funny"],group:"smileys"},{shortcode:"ghost",emoji:"\u{1F47B}",name:"Ghost",keywords:["halloween","spooky"],group:"smileys"},{shortcode:"wave",emoji:"\u{1F44B}",name:"Waving Hand",keywords:["hello","goodbye"],group:"people"},{shortcode:"raised_hand",emoji:"\u270B",name:"Raised Hand",keywords:["stop","high five"],group:"people"},{shortcode:"ok_hand",emoji:"\u{1F44C}",name:"OK Hand",keywords:["perfect","nice"],group:"people"},{shortcode:"thumbsup",emoji:"\u{1F44D}",name:"Thumbs Up",keywords:["approve","good","yes"],group:"people"},{shortcode:"thumbsdown",emoji:"\u{1F44E}",name:"Thumbs Down",keywords:["disapprove","bad","no"],group:"people"},{shortcode:"clap",emoji:"\u{1F44F}",name:"Clapping Hands",keywords:["applause","bravo"],group:"people"},{shortcode:"raised_hands",emoji:"\u{1F64C}",name:"Raising Hands",keywords:["celebration","hooray"],group:"people"},{shortcode:"pray",emoji:"\u{1F64F}",name:"Folded Hands",keywords:["thanks","please","hope"],group:"people"},{shortcode:"handshake",emoji:"\u{1F91D}",name:"Handshake",keywords:["deal","agreement"],group:"people"},{shortcode:"point_up",emoji:"\u261D\uFE0F",name:"Index Pointing Up",keywords:["attention","important"],group:"people"},{shortcode:"point_right",emoji:"\u{1F449}",name:"Backhand Index Pointing Right",keywords:["direction","this"],group:"people"},{shortcode:"point_left",emoji:"\u{1F448}",name:"Backhand Index Pointing Left",keywords:["direction","that"],group:"people"},{shortcode:"point_down",emoji:"\u{1F447}",name:"Backhand Index Pointing Down",keywords:["direction","below"],group:"people"},{shortcode:"v",emoji:"\u270C\uFE0F",name:"Victory Hand",keywords:["peace","two"],group:"people"},{shortcode:"crossed_fingers",emoji:"\u{1F91E}",name:"Crossed Fingers",keywords:["luck","hope"],group:"people"},{shortcode:"muscle",emoji:"\u{1F4AA}",name:"Flexed Biceps",keywords:["strong","power"],group:"people"},{shortcode:"writing_hand",emoji:"\u270D\uFE0F",name:"Writing Hand",keywords:["write","note"],group:"people"},{shortcode:"eyes",emoji:"\u{1F440}",name:"Eyes",keywords:["look","see","watch"],group:"people"},{shortcode:"brain",emoji:"\u{1F9E0}",name:"Brain",keywords:["smart","think","mind"],group:"people"},{shortcode:"speaking_head",emoji:"\u{1F5E3}\uFE0F",name:"Speaking Head",keywords:["talk","announce"],group:"people"},{shortcode:"baby",emoji:"\u{1F476}",name:"Baby",keywords:["child","newborn"],group:"people"},{shortcode:"person_shrugging",emoji:"\u{1F937}",name:"Person Shrugging",keywords:["dunno","whatever"],group:"people"},{shortcode:"person_facepalming",emoji:"\u{1F926}",name:"Person Facepalming",keywords:["frustration","disbelief"],group:"people"},{shortcode:"person_raising_hand",emoji:"\u{1F64B}",name:"Person Raising Hand",keywords:["question","volunteer"],group:"people"},{shortcode:"ninja",emoji:"\u{1F977}",name:"Ninja",keywords:["stealth","hidden"],group:"people"},{shortcode:"dog",emoji:"\u{1F436}",name:"Dog Face",keywords:["puppy","pet"],group:"animals"},{shortcode:"cat",emoji:"\u{1F431}",name:"Cat Face",keywords:["kitten","pet"],group:"animals"},{shortcode:"mouse",emoji:"\u{1F42D}",name:"Mouse Face",keywords:["rodent"],group:"animals"},{shortcode:"rabbit",emoji:"\u{1F430}",name:"Rabbit Face",keywords:["bunny","easter"],group:"animals"},{shortcode:"fox",emoji:"\u{1F98A}",name:"Fox",keywords:["clever","sly"],group:"animals"},{shortcode:"bear",emoji:"\u{1F43B}",name:"Bear",keywords:["teddy","nature"],group:"animals"},{shortcode:"unicorn",emoji:"\u{1F984}",name:"Unicorn",keywords:["magic","fantasy"],group:"animals"},{shortcode:"bee",emoji:"\u{1F41D}",name:"Honeybee",keywords:["honey","buzz"],group:"animals"},{shortcode:"butterfly",emoji:"\u{1F98B}",name:"Butterfly",keywords:["pretty","nature"],group:"animals"},{shortcode:"turtle",emoji:"\u{1F422}",name:"Turtle",keywords:["slow","shell"],group:"animals"},{shortcode:"snake",emoji:"\u{1F40D}",name:"Snake",keywords:["reptile"],group:"animals"},{shortcode:"whale",emoji:"\u{1F433}",name:"Spouting Whale",keywords:["ocean","sea"],group:"animals"},{shortcode:"dolphin",emoji:"\u{1F42C}",name:"Dolphin",keywords:["ocean","smart"],group:"animals"},{shortcode:"eagle",emoji:"\u{1F985}",name:"Eagle",keywords:["bird","freedom"],group:"animals"},{shortcode:"owl",emoji:"\u{1F989}",name:"Owl",keywords:["wise","night"],group:"animals"},{shortcode:"penguin",emoji:"\u{1F427}",name:"Penguin",keywords:["cold","linux"],group:"animals"},{shortcode:"octopus",emoji:"\u{1F419}",name:"Octopus",keywords:["ocean","tentacle"],group:"animals"},{shortcode:"seedling",emoji:"\u{1F331}",name:"Seedling",keywords:["plant","grow"],group:"animals"},{shortcode:"evergreen_tree",emoji:"\u{1F332}",name:"Evergreen Tree",keywords:["nature","pine"],group:"animals"},{shortcode:"sunflower",emoji:"\u{1F33B}",name:"Sunflower",keywords:["flower","yellow"],group:"animals"},{shortcode:"rose",emoji:"\u{1F339}",name:"Rose",keywords:["flower","love"],group:"animals"},{shortcode:"apple",emoji:"\u{1F34E}",name:"Red Apple",keywords:["fruit","healthy"],group:"food"},{shortcode:"banana",emoji:"\u{1F34C}",name:"Banana",keywords:["fruit","yellow"],group:"food"},{shortcode:"grapes",emoji:"\u{1F347}",name:"Grapes",keywords:["fruit","wine"],group:"food"},{shortcode:"watermelon",emoji:"\u{1F349}",name:"Watermelon",keywords:["fruit","summer"],group:"food"},{shortcode:"avocado",emoji:"\u{1F951}",name:"Avocado",keywords:["guacamole","healthy"],group:"food"},{shortcode:"pizza",emoji:"\u{1F355}",name:"Pizza",keywords:["food","italian"],group:"food"},{shortcode:"hamburger",emoji:"\u{1F354}",name:"Hamburger",keywords:["burger","fast food"],group:"food"},{shortcode:"taco",emoji:"\u{1F32E}",name:"Taco",keywords:["mexican","food"],group:"food"},{shortcode:"sushi",emoji:"\u{1F363}",name:"Sushi",keywords:["japanese","fish"],group:"food"},{shortcode:"cookie",emoji:"\u{1F36A}",name:"Cookie",keywords:["sweet","biscuit"],group:"food"},{shortcode:"cake",emoji:"\u{1F382}",name:"Birthday Cake",keywords:["birthday","celebration"],group:"food"},{shortcode:"ice_cream",emoji:"\u{1F366}",name:"Soft Ice Cream",keywords:["dessert","cold"],group:"food"},{shortcode:"chocolate_bar",emoji:"\u{1F36B}",name:"Chocolate Bar",keywords:["sweet","candy"],group:"food"},{shortcode:"popcorn",emoji:"\u{1F37F}",name:"Popcorn",keywords:["movie","snack"],group:"food"},{shortcode:"coffee",emoji:"\u2615",name:"Hot Beverage",keywords:["tea","drink","morning"],group:"food"},{shortcode:"beer",emoji:"\u{1F37A}",name:"Beer Mug",keywords:["drink","bar"],group:"food"},{shortcode:"wine_glass",emoji:"\u{1F377}",name:"Wine Glass",keywords:["drink","alcohol"],group:"food"},{shortcode:"cocktail",emoji:"\u{1F378}",name:"Cocktail Glass",keywords:["drink","martini"],group:"food"},{shortcode:"hot_pepper",emoji:"\u{1F336}\uFE0F",name:"Hot Pepper",keywords:["spicy","chili"],group:"food"},{shortcode:"egg",emoji:"\u{1F95A}",name:"Egg",keywords:["breakfast","food"],group:"food"},{shortcode:"earth_americas",emoji:"\u{1F30E}",name:"Globe Americas",keywords:["world","planet"],group:"travel"},{shortcode:"earth_europe",emoji:"\u{1F30D}",name:"Globe Europe-Africa",keywords:["world","planet"],group:"travel"},{shortcode:"sun",emoji:"\u2600\uFE0F",name:"Sun",keywords:["weather","bright","warm"],group:"travel"},{shortcode:"moon",emoji:"\u{1F319}",name:"Crescent Moon",keywords:["night","sleep"],group:"travel"},{shortcode:"star",emoji:"\u2B50",name:"Star",keywords:["favorite","rating"],group:"travel"},{shortcode:"star2",emoji:"\u{1F31F}",name:"Glowing Star",keywords:["sparkle","shine"],group:"travel"},{shortcode:"cloud",emoji:"\u2601\uFE0F",name:"Cloud",keywords:["weather","sky"],group:"travel"},{shortcode:"rainbow",emoji:"\u{1F308}",name:"Rainbow",keywords:["colorful","weather"],group:"travel"},{shortcode:"snowflake",emoji:"\u2744\uFE0F",name:"Snowflake",keywords:["cold","winter"],group:"travel"},{shortcode:"zap",emoji:"\u26A1",name:"High Voltage",keywords:["lightning","electric","fast"],group:"travel"},{shortcode:"fire",emoji:"\u{1F525}",name:"Fire",keywords:["hot","flame","lit"],group:"travel"},{shortcode:"ocean",emoji:"\u{1F30A}",name:"Water Wave",keywords:["sea","wave","surf"],group:"travel"},{shortcode:"airplane",emoji:"\u2708\uFE0F",name:"Airplane",keywords:["travel","flight"],group:"travel"},{shortcode:"rocket",emoji:"\u{1F680}",name:"Rocket",keywords:["launch","space","fast"],group:"travel"},{shortcode:"car",emoji:"\u{1F697}",name:"Automobile",keywords:["drive","vehicle"],group:"travel"},{shortcode:"house",emoji:"\u{1F3E0}",name:"House",keywords:["home","building"],group:"travel"},{shortcode:"tent",emoji:"\u26FA",name:"Tent",keywords:["camping","outdoor"],group:"travel"},{shortcode:"mountain",emoji:"\u26F0\uFE0F",name:"Mountain",keywords:["nature","hike"],group:"travel"},{shortcode:"desert_island",emoji:"\u{1F3DD}\uFE0F",name:"Desert Island",keywords:["beach","vacation"],group:"travel"},{shortcode:"volcano",emoji:"\u{1F30B}",name:"Volcano",keywords:["eruption","nature"],group:"travel"},{shortcode:"soccer",emoji:"\u26BD",name:"Soccer Ball",keywords:["football","sport"],group:"activities"},{shortcode:"basketball",emoji:"\u{1F3C0}",name:"Basketball",keywords:["sport","hoop"],group:"activities"},{shortcode:"tennis",emoji:"\u{1F3BE}",name:"Tennis",keywords:["sport","ball"],group:"activities"},{shortcode:"video_game",emoji:"\u{1F3AE}",name:"Video Game",keywords:["gaming","controller"],group:"activities"},{shortcode:"dart",emoji:"\u{1F3AF}",name:"Bullseye",keywords:["target","goal"],group:"activities"},{shortcode:"trophy",emoji:"\u{1F3C6}",name:"Trophy",keywords:["winner","champion"],group:"activities"},{shortcode:"medal",emoji:"\u{1F947}",name:"Gold Medal",keywords:["first","winner"],group:"activities"},{shortcode:"tada",emoji:"\u{1F389}",name:"Party Popper",keywords:["celebration","party"],group:"activities"},{shortcode:"confetti_ball",emoji:"\u{1F38A}",name:"Confetti Ball",keywords:["party","celebration"],group:"activities"},{shortcode:"balloon",emoji:"\u{1F388}",name:"Balloon",keywords:["party","birthday"],group:"activities"},{shortcode:"art",emoji:"\u{1F3A8}",name:"Artist Palette",keywords:["paint","creative"],group:"activities"},{shortcode:"musical_note",emoji:"\u{1F3B5}",name:"Musical Note",keywords:["music","song"],group:"activities"},{shortcode:"microphone",emoji:"\u{1F3A4}",name:"Microphone",keywords:["sing","karaoke"],group:"activities"},{shortcode:"guitar",emoji:"\u{1F3B8}",name:"Guitar",keywords:["music","rock"],group:"activities"},{shortcode:"dice",emoji:"\u{1F3B2}",name:"Game Die",keywords:["chance","random"],group:"activities"},{shortcode:"bulb",emoji:"\u{1F4A1}",name:"Light Bulb",keywords:["idea","bright"],group:"objects"},{shortcode:"computer",emoji:"\u{1F4BB}",name:"Laptop",keywords:["tech","work"],group:"objects"},{shortcode:"keyboard",emoji:"\u2328\uFE0F",name:"Keyboard",keywords:["type","computer"],group:"objects"},{shortcode:"phone",emoji:"\u{1F4F1}",name:"Mobile Phone",keywords:["cell","call"],group:"objects"},{shortcode:"camera",emoji:"\u{1F4F7}",name:"Camera",keywords:["photo","picture"],group:"objects"},{shortcode:"tv",emoji:"\u{1F4FA}",name:"Television",keywords:["watch","screen"],group:"objects"},{shortcode:"battery",emoji:"\u{1F50B}",name:"Battery",keywords:["charge","power"],group:"objects"},{shortcode:"electric_plug",emoji:"\u{1F50C}",name:"Electric Plug",keywords:["power","connect"],group:"objects"},{shortcode:"mag",emoji:"\u{1F50D}",name:"Magnifying Glass Left",keywords:["search","find"],group:"objects"},{shortcode:"lock",emoji:"\u{1F512}",name:"Locked",keywords:["security","private"],group:"objects"},{shortcode:"unlock",emoji:"\u{1F513}",name:"Unlocked",keywords:["open","access"],group:"objects"},{shortcode:"key",emoji:"\u{1F511}",name:"Key",keywords:["access","password"],group:"objects"},{shortcode:"hammer",emoji:"\u{1F528}",name:"Hammer",keywords:["tool","build"],group:"objects"},{shortcode:"wrench",emoji:"\u{1F527}",name:"Wrench",keywords:["tool","fix"],group:"objects"},{shortcode:"gear",emoji:"\u2699\uFE0F",name:"Gear",keywords:["settings","config"],group:"objects"},{shortcode:"link",emoji:"\u{1F517}",name:"Link",keywords:["chain","url"],group:"objects"},{shortcode:"paperclip",emoji:"\u{1F4CE}",name:"Paperclip",keywords:["attach","clip"],group:"objects"},{shortcode:"scissors",emoji:"\u2702\uFE0F",name:"Scissors",keywords:["cut","snip"],group:"objects"},{shortcode:"pen",emoji:"\u{1F58A}\uFE0F",name:"Pen",keywords:["write","sign"],group:"objects"},{shortcode:"pencil",emoji:"\u270F\uFE0F",name:"Pencil",keywords:["write","draw"],group:"objects"},{shortcode:"book",emoji:"\u{1F4D6}",name:"Open Book",keywords:["read","study"],group:"objects"},{shortcode:"memo",emoji:"\u{1F4DD}",name:"Memo",keywords:["note","write"],group:"objects"},{shortcode:"package",emoji:"\u{1F4E6}",name:"Package",keywords:["box","delivery"],group:"objects"},{shortcode:"mailbox",emoji:"\u{1F4EC}",name:"Open Mailbox with Raised Flag",keywords:["mail","letter"],group:"objects"},{shortcode:"bell",emoji:"\u{1F514}",name:"Bell",keywords:["notification","alert"],group:"objects"},{shortcode:"red_heart",emoji:"\u2764\uFE0F",name:"Red Heart",keywords:["love","valentine"],group:"symbols"},{shortcode:"orange_heart",emoji:"\u{1F9E1}",name:"Orange Heart",keywords:["love"],group:"symbols"},{shortcode:"yellow_heart",emoji:"\u{1F49B}",name:"Yellow Heart",keywords:["love","friendship"],group:"symbols"},{shortcode:"green_heart",emoji:"\u{1F49A}",name:"Green Heart",keywords:["love","nature"],group:"symbols"},{shortcode:"blue_heart",emoji:"\u{1F499}",name:"Blue Heart",keywords:["love","trust"],group:"symbols"},{shortcode:"purple_heart",emoji:"\u{1F49C}",name:"Purple Heart",keywords:["love"],group:"symbols"},{shortcode:"broken_heart",emoji:"\u{1F494}",name:"Broken Heart",keywords:["sad","breakup"],group:"symbols"},{shortcode:"sparkles",emoji:"\u2728",name:"Sparkles",keywords:["shine","magic","new"],group:"symbols"},{shortcode:"hundred",emoji:"\u{1F4AF}",name:"Hundred Points",keywords:["perfect","score"],group:"symbols"},{shortcode:"boom",emoji:"\u{1F4A5}",name:"Collision",keywords:["explosion","impact"],group:"symbols"},{shortcode:"speech_balloon",emoji:"\u{1F4AC}",name:"Speech Balloon",keywords:["talk","chat","message"],group:"symbols"},{shortcode:"thought_balloon",emoji:"\u{1F4AD}",name:"Thought Balloon",keywords:["think","dream"],group:"symbols"},{shortcode:"check_mark",emoji:"\u2705",name:"Check Mark Button",keywords:["done","yes","complete"],group:"symbols"},{shortcode:"x",emoji:"\u274C",name:"Cross Mark",keywords:["no","wrong","delete"],group:"symbols"},{shortcode:"warning",emoji:"\u26A0\uFE0F",name:"Warning",keywords:["caution","alert"],group:"symbols"},{shortcode:"no_entry",emoji:"\u26D4",name:"No Entry",keywords:["stop","forbidden"],group:"symbols"},{shortcode:"question",emoji:"\u2753",name:"Question Mark",keywords:["help","what"],group:"symbols"},{shortcode:"exclamation",emoji:"\u2757",name:"Exclamation Mark",keywords:["important","attention"],group:"symbols"},{shortcode:"arrow_right",emoji:"\u27A1\uFE0F",name:"Right Arrow",keywords:["next","forward"],group:"symbols"},{shortcode:"arrow_left",emoji:"\u2B05\uFE0F",name:"Left Arrow",keywords:["back","previous"],group:"symbols"},{shortcode:"arrow_up",emoji:"\u2B06\uFE0F",name:"Up Arrow",keywords:["above"],group:"symbols"},{shortcode:"arrow_down",emoji:"\u2B07\uFE0F",name:"Down Arrow",keywords:["below"],group:"symbols"},{shortcode:"recycle",emoji:"\u267B\uFE0F",name:"Recycling Symbol",keywords:["environment","green"],group:"symbols"},{shortcode:"infinity",emoji:"\u267E\uFE0F",name:"Infinity",keywords:["forever","loop"],group:"symbols"},{shortcode:"checkered_flag",emoji:"\u{1F3C1}",name:"Chequered Flag",keywords:["finish","race"],group:"flags"},{shortcode:"triangular_flag",emoji:"\u{1F6A9}",name:"Triangular Flag",keywords:["red flag","warning"],group:"flags"},{shortcode:"white_flag",emoji:"\u{1F3F3}\uFE0F",name:"White Flag",keywords:["surrender","peace"],group:"flags"},{shortcode:"rainbow_flag",emoji:"\u{1F3F3}\uFE0F\u200D\u{1F308}",name:"Rainbow Flag",keywords:["pride","lgbtq"],group:"flags"},{shortcode:"pirate_flag",emoji:"\u{1F3F4}\u200D\u2620\uFE0F",name:"Pirate Flag",keywords:["jolly roger","skull"],group:"flags"},{shortcode:"flag_us",emoji:"\u{1F1FA}\u{1F1F8}",name:"Flag: United States",keywords:["usa","america"],group:"flags"},{shortcode:"flag_gb",emoji:"\u{1F1EC}\u{1F1E7}",name:"Flag: United Kingdom",keywords:["uk","britain"],group:"flags"},{shortcode:"flag_fr",emoji:"\u{1F1EB}\u{1F1F7}",name:"Flag: France",keywords:["french"],group:"flags"},{shortcode:"flag_de",emoji:"\u{1F1E9}\u{1F1EA}",name:"Flag: Germany",keywords:["german"],group:"flags"},{shortcode:"flag_jp",emoji:"\u{1F1EF}\u{1F1F5}",name:"Flag: Japan",keywords:["japanese"],group:"flags"},{shortcode:"flag_kr",emoji:"\u{1F1F0}\u{1F1F7}",name:"Flag: South Korea",keywords:["korean"],group:"flags"},{shortcode:"flag_br",emoji:"\u{1F1E7}\u{1F1F7}",name:"Flag: Brazil",keywords:["brazilian"],group:"flags"},{shortcode:"flag_in",emoji:"\u{1F1EE}\u{1F1F3}",name:"Flag: India",keywords:["indian"],group:"flags"},{shortcode:"flag_ca",emoji:"\u{1F1E8}\u{1F1E6}",name:"Flag: Canada",keywords:["canadian","maple"],group:"flags"},{shortcode:"flag_au",emoji:"\u{1F1E6}\u{1F1FA}",name:"Flag: Australia",keywords:["australian"],group:"flags"}],X=new Map(at.map(r=>[r.shortcode,r])),di=new Map([["+1","thumbsup"],["-1","thumbsdown"],["heart","red_heart"],["thumbs_up","thumbsup"],["thumbs_down","thumbsdown"],["grin","grinning"],["laughing_crying","joy"],["lol","rofl"],["smiley","smile"],["cool","sunglasses"],["nerd","nerd_face"],["kiss","kissing_heart"],["hug","hugs"],["think","thinking"],["sad","cry"],["mad","angry"],["shrug","person_shrugging"],["facepalm","person_facepalming"],["raised_fist","muscle"],["pray_hands","pray"],["hi","wave"],["bye","wave"],["lightning","zap"],["flame","fire"],["hot","fire"],["bomb","boom"],["idea","bulb"],["laptop","computer"],["search","mag"],["party","tada"],["celebrate","tada"],["congrats","tada"],["check","check_mark"],["done","check_mark"],["yes","check_mark"],["no","x"],["wrong","x"],["love","red_heart"],["star_eyes","star_struck"],["mindblown","exploding_head"],["poop","skull"],["memo_pad","memo"],["notes","memo"],["coffee_cup","coffee"],["tea","coffee"]]),As=["smileys","people","animals","food","travel","activities","objects","symbols","flags"],Es={smileys:"Smileys & Emotion",people:"People & Body",animals:"Animals & Nature",food:"Food & Drink",travel:"Travel & Places",activities:"Activities",objects:"Objects",symbols:"Symbols",flags:"Flags"},Ss={smileys:"\u{1F600}",people:"\u{1F44B}",animals:"\u{1F436}",food:"\u{1F355}",travel:"\u{1F30D}",activities:"\u{1F389}",objects:"\u{1F4A1}",symbols:"\u2764\uFE0F",flags:"\u{1F3C1}"},lt=[];globalThis.__vbEmojiRegister=pi;globalThis.__vbEmojiExtended&&(pi(globalThis.__vbEmojiExtended),delete globalThis.__vbEmojiExtended)});var Kn=window.matchMedia("(prefers-reduced-motion: reduce)");var Ze=new Map;function p(r,t,e={}){let i=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:i},n=Ze.get(r);if(customElements.get(r)){if(!n||n.priority>=i){n&&n.priority===i&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=i){n.priority===i&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}Ze.set(r,s),customElements.define(r,t)}var m=class extends HTMLElement{#t=[];#e;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,s){t.addEventListener(e,i,s),this.#t.push(()=>t.removeEventListener(e,i,s))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#e||(this.#e=this.attachInternals());let i=this.#e.states;try{e?i.add(t):i.delete(t)}catch{let s=`--${t}`;e?i.add(s):i.delete(s)}}_adoptInternals(t){this.#e||(this.#e=t)}};function rt(r){return[...r.querySelectorAll("li")].filter(t=>t.querySelector("a[href]"))}function Qe(r){return r.querySelector("li[data-audio-active]")}function ti(r,t,e){let i=e.querySelector("a[href]");return i?(t.querySelectorAll("li[data-audio-active]").forEach(s=>{s!==e&&s.removeAttribute("data-audio-active")}),e.setAttribute("data-audio-active",""),r.src=i.href,r.play()?.catch(()=>{}),{src:i.href,title:i.textContent?.trim()??""}):null}function ei(r){let t=Qe(r);return t?.setAttribute("data-audio-played",""),t}function ii(r,{loop:t=!1}={}){let e=rt(r);if(!e.length)return null;let i=Qe(r),s=i?e.indexOf(i):-1;return s+1<e.length?e[s+1]:t?e[0]:null}var ms='input, button, a[href], summary, select, textarea, audio, [contenteditable]:not([contenteditable="false"])',Mt=class extends m{static get observedAttributes(){return["loop","shuffle"]}#t=null;#e=null;#i=!1;#s=null;#n=null;#r=null;#o=null;#a=null;#h=null;#c=null;#l=null;#m=null;#d=null;#p=!1;#u=new Set;#g=null;#v=!1;setup(){if(this.#t=this.querySelector("audio"),!this.#t)return!1;this.#e=this.querySelector(".track-list"),this.#t.removeAttribute("controls");let t=!this.shadowRoot;this.#w(),t&&(this.#b(),this.#A(),this.#C()),this.#_(),this.#f(),this.#x();let e=this.#t;return(e.error||e.networkState===HTMLMediaElement.NETWORK_NO_SOURCE&&(e.hasAttribute("src")||e.querySelector("source")))&&this.#k(),e.readyState>=HTMLMediaElement.HAVE_METADATA&&(this.#$(),this.#T()),this.hasAttribute("autoplay")&&this.#t.play().catch(()=>{}),this.#g=()=>{let i=this.shadowRoot?.querySelector(".player");i&&(i.style.display="none",i.offsetHeight,i.style.display="")},this.listen(window,"vb:theme-change",this.#g),!0}teardown(){this.#t&&this.#t.setAttribute("controls","")}attributeChangedCallback(t){t==="loop"?this.#f():t==="shuffle"&&this.#u.clear()}#f(){this.#t&&(this.hasAttribute("loop")&&!this.#e?(this.#t.loop=!0,this.#v=!0):this.#v&&(this.#t.loop=!1,this.#v=!1))}get src(){return this.#t?.getAttribute("src")||this.#t?.currentSrc||""}set src(t){if(!this.#t)return;let e=t==null?"":String(t);this.#t.getAttribute("src")!==e&&(this.#t.setAttribute("src",e),this.#t.load?.(),this.#S(),this.#_(),this.dispatchEvent(new CustomEvent("audio-player:src-changed",{detail:{src:e,source:"property"},bubbles:!0})))}get currentTime(){return this.#t?.currentTime??0}set currentTime(t){this.#t&&(this.#t.currentTime=Number(t)||0)}#w(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
1
+ var Kr=Object.defineProperty;var ae=(r,t)=>()=>(r&&(t=r(r=0)),t);var Hi=(r,t)=>{for(var e in t)Kr(r,e,{get:t[e],enumerable:!0})};function is(r,t,e){let i=256*Math.pow(2,e),s=r/i*360-180;return{lat:Math.atan(Math.sinh(Math.PI*(1-2*t/i)))*180/Math.PI,lng:s}}function st(r,t,e){let i=256*Math.pow(2,e),s=r*Math.PI/180;return{x:(t+180)/360*i,y:(1-Math.log(Math.tan(s)+1/Math.cos(s))/Math.PI)/2*i}}function on(r,t,e,i,s){let n=s??(typeof devicePixelRatio=="number"?devicePixelRatio:1),o="abc"[Math.abs(e+i)%3];return r.replaceAll("{z}",String(t)).replaceAll("{x}",String(e)).replaceAll("{y}",String(i)).replaceAll("{s}",o).replaceAll("{r}",n>1?"@2x":"")}function Nt(r,t,e,i,s){let n=s||(U[r]??U.osm).template;return on(n,t,e,i)}var U,fe=ae(()=>{U={osm:{template:"https://tile.openstreetmap.org/{z}/{x}/{y}.png",origin:"https://tile.openstreetmap.org",credits:[{text:"\xA9 OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright"}]},"carto-light":{template:"https://basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",origin:"https://basemaps.cartocdn.com",credits:[{text:"\xA9 OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright"},{text:"\xA9 CARTO",href:"https://carto.com/attributions"}]},"carto-dark":{template:"https://basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",origin:"https://basemaps.cartocdn.com",credits:[{text:"\xA9 OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright"},{text:"\xA9 CARTO",href:"https://carto.com/attributions"}]}}});var ss={};Hi(ss,{MapInteraction:()=>me});var me,rs=ae(()=>{fe();me=class{#t;#e;#i;#s;#r;#n;#a;#c;#h=0;#l=0;#o=15;#u=1;#p=19;#d=0;#f=0;#k=0;#w=0;#m=15;#v=0;#y=0;#g=new Map;#b=0;#T=0;#A=new Map;#x=0;#S=0;constructor({host:t,viewport:e,tiles:i,marker:s,lat:n,lng:o,zoom:a,provider:l,tileUrl:c,width:h,height:u,onDeactivate:p,onMove:d}){this.#c=t,this.#t=e,this.#e=i,this.#i=s,this.#s=l,this.#r=c||"",this.#n=p,this.#a=d||(()=>{}),this.#o=a,this.#k=this.#b=n,this.#w=this.#T=o,this.#m=a,this.#v=h,this.#y=u;let f=st(n,o,a);this.#h=f.x,this.#l=f.y,this.#E(),this.#e.replaceChildren(),this.#e.style.transform="",this.#i&&this.#e.appendChild(this.#i),this.#t.addEventListener("pointerdown",this.#L),this.#t.addEventListener("pointermove",this.#C),this.#t.addEventListener("pointerup",this.#$),this.#t.addEventListener("pointercancel",this.#$),this.#t.addEventListener("wheel",this.#I,{passive:!1}),this.#t.addEventListener("keydown",this.#M),this.#D()}get zoom(){return this.#o}get minZoom(){return this.#u}get maxZoom(){return this.#p}get center(){let{lat:t,lng:e}=is(this.#h,this.#l,this.#o);return{lat:+t.toFixed(6),lng:+e.toFixed(6),zoom:this.#o}}zoomBy(t){this.#R(this.#o+t,this.#v/2,this.#y/2)}recenter(){this.#o=this.#m;let t=st(this.#k,this.#w,this.#o);this.#h=t.x,this.#l=t.y,this.#j(),this.#E(),this.#z(),this.#D(),this.#_()}panBy(t,e){this.#h+=t,this.#l+=e,this.#z(),this.#D()}resize(t,e){!t||!e||t===this.#v&&e===this.#y||(this.#v=t,this.#y=e,this.#z(),this.#D())}#E(){this.#d=Math.floor(this.#h/256)*256,this.#f=Math.floor(this.#l/256)*256}#L=t=>{if(!(t.pointerType==="mouse"&&t.button!==0)&&!t.target.closest?.("a, button")){t.preventDefault(),this.#t.focus({preventScroll:!0}),this.#A.set(t.pointerId,{x:t.clientX,y:t.clientY});try{this.#t.setPointerCapture(t.pointerId)}catch{}this.#A.size===1?(this.#x=0,this.#t.setAttribute("data-dragging","")):this.#A.size===2&&(this.#S=this.#P(),this.#x=1/0)}};#C=t=>{let e=this.#A.get(t.pointerId);if(!e)return;let i=t.clientX-e.x,s=t.clientY-e.y;if(e.x=t.clientX,e.y=t.clientY,this.#A.size===1){this.#x+=Math.abs(i)+Math.abs(s),this.panBy(-i,-s);return}if(this.#A.size===2){this.panBy(-i/2,-s/2);let n=this.#P();if(!this.#S){this.#S=n;return}let o=n/this.#S;if(o>=1.5||o<=1/1.5){let a=this.#N();this.#R(this.#o+(o>1?1:-1),a.x,a.y),this.#S=n}}};#$=t=>{if(!this.#A.has(t.pointerId))return;let e=this.#A.size===1;this.#A.delete(t.pointerId);try{this.#t.releasePointerCapture(t.pointerId)}catch{}if(this.#A.size<2&&(this.#S=0),!(this.#A.size>0)){if(this.#t.removeAttribute("data-dragging"),e&&t.type==="pointerup"&&this.#x<5){let i=this.#t.getBoundingClientRect();this.panBy(t.clientX-i.left-this.#v/2,t.clientY-i.top-this.#y/2)}this.#_()}};#P(){let[t,e]=[...this.#A.values()];return t&&e?Math.hypot(t.x-e.x,t.y-e.y):0}#N(){let[t,e]=[...this.#A.values()],i=this.#t.getBoundingClientRect();return{x:(t.x+e.x)/2-i.left,y:(t.y+e.y)/2-i.top}}#I=t=>{t.preventDefault();let e=t.ctrlKey?-t.deltaY*.01:-Math.sign(t.deltaY),i=Math.round(Math.max(this.#u,Math.min(this.#p,this.#o+e)));if(i===this.#o)return;let s=this.#t.getBoundingClientRect();this.#R(i,t.clientX-s.left,t.clientY-s.top)};#M=t=>{if(t.target!==this.#t)return;let e=80,i=null;switch(t.key){case"ArrowLeft":i=[-e,0];break;case"ArrowRight":i=[e,0];break;case"ArrowUp":i=[0,-e];break;case"ArrowDown":i=[0,e];break;case"+":case"=":t.preventDefault(),this.zoomBy(1);return;case"-":case"_":t.preventDefault(),this.zoomBy(-1);return;case"Home":case"0":t.preventDefault(),this.recenter();return;case"Escape":t.preventDefault(),this.#n();return;default:return}t.preventDefault(),this.panBy(i[0],i[1]),this.#_()};#R(t,e,i){if(t=Math.max(this.#u,Math.min(this.#p,t)),t===this.#o)return;let s=this.#h-this.#v/2+e,n=this.#l-this.#y/2+i,o=Math.pow(2,t-this.#o);this.#h=s*o-e+this.#v/2,this.#l=n*o-i+this.#y/2,this.#o=t,this.#j(),this.#z(),this.#E(),this.#D(),this.#_()}#z(){let t=256*Math.pow(2,this.#o),e=(this.#h%t+t)%t;e!==this.#h&&(this.#h=e,this.#j(),this.#E());let i=Math.min(this.#y/2,t/2);this.#l=Math.max(i,Math.min(t-i,this.#l))}#D(){let t=-(this.#h-this.#v/2-this.#d),e=-(this.#l-this.#y/2-this.#f);this.#e.style.transform=`translate(${Math.round(t)}px, ${Math.round(e)}px)`,this.#F(),this.#B(),this.#O()}#F(){let t=this.#o,e=Math.pow(2,t),i=this.#h-this.#v/2,s=this.#l-this.#y/2,n=Math.floor(i/256)-1,o=Math.max(0,Math.floor(s/256)-1),a=Math.ceil((i+this.#v)/256)+1,l=Math.min(e,Math.ceil((s+this.#y)/256)+1);for(let c=o;c<l;c++)for(let h=n;h<a;h++){let u=(h%e+e)%e,p=`${t}/${h}/${c}`;if(this.#g.has(p))continue;let d=document.createElement("img");d.src=Nt(this.#s,t,u,c,this.#r),d.alt="",d.draggable=!1,d.style.left=`${h*256-this.#d}px`,d.style.top=`${c*256-this.#f}px`,d._wx=h*256,d._wy=c*256,this.#g.set(p,d),this.#e.insertBefore(d,this.#i?.parentNode===this.#e?this.#i:null)}}#B(){let t=this.#h-this.#v/2,e=this.#l-this.#y/2,i=512;for(let[s,n]of this.#g){let o=n._wx??0,a=n._wy??0;(o+256<t-i||o>t+this.#v+i||a+256<e-i||a>e+this.#y+i)&&(n.remove(),this.#g.delete(s))}}#O(){if(!this.#i)return;let t=st(this.#b,this.#T,this.#o),e=this.#i.offsetWidth||32,i=256*Math.pow(2,this.#o),s=t.x;for(;s-this.#h>i/2;)s-=i;for(;this.#h-s>i/2;)s+=i;this.#i.style.top=`${Math.round(t.y-this.#f-e)}px`,this.#i.style.left=`${Math.round(s-this.#d-e/2)}px`,this.#i.style.transform="none"}#_(){let t=this.center;this.#c.dispatchEvent(new CustomEvent("geo-map:move",{bubbles:!0,detail:t})),this.#a(t)}#j(){for(let t of this.#g.values())t.remove();this.#g.clear()}destroy(){this.#t.removeEventListener("pointerdown",this.#L),this.#t.removeEventListener("pointermove",this.#C),this.#t.removeEventListener("pointerup",this.#$),this.#t.removeEventListener("pointercancel",this.#$),this.#t.removeEventListener("wheel",this.#I),this.#t.removeEventListener("keydown",this.#M),this.#t.removeAttribute("data-dragging"),this.#A.clear(),this.#j()}}});var ve={};Hi(ve,{EMOJI_ALIASES:()=>cs,EMOJI_GROUPS:()=>hn,EMOJI_GROUP_ICONS:()=>dn,EMOJI_GROUP_LABELS:()=>un,EMOJI_MAP:()=>gt,EXTENDED_EVENT:()=>pn,EXTENDED_REGISTRY:()=>hs,extendedCount:()=>fn,getByGroup:()=>gn,resolveEmoji:()=>mn,searchEmoji:()=>bn});function It(){for(;ls<as.length;){let r=as[ls++];for(let[t,e,i,s]of r){if(gt.has(t))continue;let n={shortcode:t,emoji:e,name:i,keywords:[],group:s};gt.set(t,n),bt.push(n)}}}function fn(){return It(),bt.length}function mn(r){It();let t=gt.get(r);if(t)return t;let e=cs.get(r);return e&&gt.get(e)||null}function gn(r){It();let t=Pt.filter(i=>i.group===r),e=bt.filter(i=>i.group===r);return e.length>0?t.concat(e):t}function bn(r){It();let t=r.toLowerCase().trim(),e=bt.length>0?Pt.concat(bt):Pt;return t?e.filter(i=>i.shortcode.includes(t)||i.name.toLowerCase().includes(t)||i.keywords&&i.keywords.some(s=>s.includes(t))):e}var Pt,gt,cs,hn,un,dn,hs,pn,as,ls,bt,ye=ae(()=>{Pt=[{shortcode:"smile",emoji:"\u{1F604}",name:"Smiling Face with Open Mouth",keywords:["happy","joy","laugh"],group:"smileys"},{shortcode:"grinning",emoji:"\u{1F600}",name:"Grinning Face",keywords:["happy","smile"],group:"smileys"},{shortcode:"laughing",emoji:"\u{1F606}",name:"Grinning Squinting Face",keywords:["happy","laugh"],group:"smileys"},{shortcode:"sweat_smile",emoji:"\u{1F605}",name:"Grinning Face with Sweat",keywords:["hot","relief"],group:"smileys"},{shortcode:"rofl",emoji:"\u{1F923}",name:"Rolling on the Floor Laughing",keywords:["lol","funny"],group:"smileys"},{shortcode:"joy",emoji:"\u{1F602}",name:"Face with Tears of Joy",keywords:["happy","cry","laugh"],group:"smileys"},{shortcode:"slightly_smiling_face",emoji:"\u{1F642}",name:"Slightly Smiling Face",keywords:["smile"],group:"smileys"},{shortcode:"upside_down_face",emoji:"\u{1F643}",name:"Upside-Down Face",keywords:["sarcasm","silly"],group:"smileys"},{shortcode:"wink",emoji:"\u{1F609}",name:"Winking Face",keywords:["flirt","joke"],group:"smileys"},{shortcode:"blush",emoji:"\u{1F60A}",name:"Smiling Face with Smiling Eyes",keywords:["happy","shy"],group:"smileys"},{shortcode:"innocent",emoji:"\u{1F607}",name:"Smiling Face with Halo",keywords:["angel","good"],group:"smileys"},{shortcode:"heart_eyes",emoji:"\u{1F60D}",name:"Smiling Face with Heart-Eyes",keywords:["love","crush"],group:"smileys"},{shortcode:"star_struck",emoji:"\u{1F929}",name:"Star-Struck",keywords:["wow","amazing"],group:"smileys"},{shortcode:"kissing_heart",emoji:"\u{1F618}",name:"Face Blowing a Kiss",keywords:["love","kiss"],group:"smileys"},{shortcode:"yum",emoji:"\u{1F60B}",name:"Face Savoring Food",keywords:["delicious","tasty"],group:"smileys"},{shortcode:"stuck_out_tongue",emoji:"\u{1F61B}",name:"Face with Tongue",keywords:["playful","silly"],group:"smileys"},{shortcode:"stuck_out_tongue_winking_eye",emoji:"\u{1F61C}",name:"Winking Face with Tongue",keywords:["silly","playful"],group:"smileys"},{shortcode:"zany_face",emoji:"\u{1F92A}",name:"Zany Face",keywords:["crazy","wild"],group:"smileys"},{shortcode:"hugs",emoji:"\u{1F917}",name:"Hugging Face",keywords:["hug","warm"],group:"smileys"},{shortcode:"thinking",emoji:"\u{1F914}",name:"Thinking Face",keywords:["hmm","consider"],group:"smileys"},{shortcode:"shushing_face",emoji:"\u{1F92B}",name:"Shushing Face",keywords:["quiet","secret"],group:"smileys"},{shortcode:"smirk",emoji:"\u{1F60F}",name:"Smirking Face",keywords:["sly","suggestive"],group:"smileys"},{shortcode:"unamused",emoji:"\u{1F612}",name:"Unamused Face",keywords:["bored","unimpressed"],group:"smileys"},{shortcode:"roll_eyes",emoji:"\u{1F644}",name:"Face with Rolling Eyes",keywords:["annoyed","whatever"],group:"smileys"},{shortcode:"grimacing",emoji:"\u{1F62C}",name:"Grimacing Face",keywords:["awkward","nervous"],group:"smileys"},{shortcode:"relieved",emoji:"\u{1F60C}",name:"Relieved Face",keywords:["calm","peaceful"],group:"smileys"},{shortcode:"pensive",emoji:"\u{1F614}",name:"Pensive Face",keywords:["sad","thoughtful"],group:"smileys"},{shortcode:"sleepy",emoji:"\u{1F62A}",name:"Sleepy Face",keywords:["tired","sleep"],group:"smileys"},{shortcode:"sleeping",emoji:"\u{1F634}",name:"Sleeping Face",keywords:["zzz","sleep"],group:"smileys"},{shortcode:"mask",emoji:"\u{1F637}",name:"Face with Medical Mask",keywords:["sick","health"],group:"smileys"},{shortcode:"nerd_face",emoji:"\u{1F913}",name:"Nerd Face",keywords:["geek","smart"],group:"smileys"},{shortcode:"sunglasses",emoji:"\u{1F60E}",name:"Smiling Face with Sunglasses",keywords:["cool","chill"],group:"smileys"},{shortcode:"confused",emoji:"\u{1F615}",name:"Confused Face",keywords:["puzzled","unsure"],group:"smileys"},{shortcode:"worried",emoji:"\u{1F61F}",name:"Worried Face",keywords:["anxious","concern"],group:"smileys"},{shortcode:"cry",emoji:"\u{1F622}",name:"Crying Face",keywords:["sad","tear"],group:"smileys"},{shortcode:"sob",emoji:"\u{1F62D}",name:"Loudly Crying Face",keywords:["sad","cry"],group:"smileys"},{shortcode:"angry",emoji:"\u{1F620}",name:"Angry Face",keywords:["mad","annoyed"],group:"smileys"},{shortcode:"rage",emoji:"\u{1F92C}",name:"Face with Symbols on Mouth",keywords:["angry","swear"],group:"smileys"},{shortcode:"exploding_head",emoji:"\u{1F92F}",name:"Exploding Head",keywords:["mind blown","shocked"],group:"smileys"},{shortcode:"flushed",emoji:"\u{1F633}",name:"Flushed Face",keywords:["embarrassed","shocked"],group:"smileys"},{shortcode:"scream",emoji:"\u{1F631}",name:"Face Screaming in Fear",keywords:["scared","horror"],group:"smileys"},{shortcode:"skull",emoji:"\u{1F480}",name:"Skull",keywords:["dead","death"],group:"smileys"},{shortcode:"clown_face",emoji:"\u{1F921}",name:"Clown Face",keywords:["joke","funny"],group:"smileys"},{shortcode:"ghost",emoji:"\u{1F47B}",name:"Ghost",keywords:["halloween","spooky"],group:"smileys"},{shortcode:"wave",emoji:"\u{1F44B}",name:"Waving Hand",keywords:["hello","goodbye"],group:"people"},{shortcode:"raised_hand",emoji:"\u270B",name:"Raised Hand",keywords:["stop","high five"],group:"people"},{shortcode:"ok_hand",emoji:"\u{1F44C}",name:"OK Hand",keywords:["perfect","nice"],group:"people"},{shortcode:"thumbsup",emoji:"\u{1F44D}",name:"Thumbs Up",keywords:["approve","good","yes"],group:"people"},{shortcode:"thumbsdown",emoji:"\u{1F44E}",name:"Thumbs Down",keywords:["disapprove","bad","no"],group:"people"},{shortcode:"clap",emoji:"\u{1F44F}",name:"Clapping Hands",keywords:["applause","bravo"],group:"people"},{shortcode:"raised_hands",emoji:"\u{1F64C}",name:"Raising Hands",keywords:["celebration","hooray"],group:"people"},{shortcode:"pray",emoji:"\u{1F64F}",name:"Folded Hands",keywords:["thanks","please","hope"],group:"people"},{shortcode:"handshake",emoji:"\u{1F91D}",name:"Handshake",keywords:["deal","agreement"],group:"people"},{shortcode:"point_up",emoji:"\u261D\uFE0F",name:"Index Pointing Up",keywords:["attention","important"],group:"people"},{shortcode:"point_right",emoji:"\u{1F449}",name:"Backhand Index Pointing Right",keywords:["direction","this"],group:"people"},{shortcode:"point_left",emoji:"\u{1F448}",name:"Backhand Index Pointing Left",keywords:["direction","that"],group:"people"},{shortcode:"point_down",emoji:"\u{1F447}",name:"Backhand Index Pointing Down",keywords:["direction","below"],group:"people"},{shortcode:"v",emoji:"\u270C\uFE0F",name:"Victory Hand",keywords:["peace","two"],group:"people"},{shortcode:"crossed_fingers",emoji:"\u{1F91E}",name:"Crossed Fingers",keywords:["luck","hope"],group:"people"},{shortcode:"muscle",emoji:"\u{1F4AA}",name:"Flexed Biceps",keywords:["strong","power"],group:"people"},{shortcode:"writing_hand",emoji:"\u270D\uFE0F",name:"Writing Hand",keywords:["write","note"],group:"people"},{shortcode:"eyes",emoji:"\u{1F440}",name:"Eyes",keywords:["look","see","watch"],group:"people"},{shortcode:"brain",emoji:"\u{1F9E0}",name:"Brain",keywords:["smart","think","mind"],group:"people"},{shortcode:"speaking_head",emoji:"\u{1F5E3}\uFE0F",name:"Speaking Head",keywords:["talk","announce"],group:"people"},{shortcode:"baby",emoji:"\u{1F476}",name:"Baby",keywords:["child","newborn"],group:"people"},{shortcode:"person_shrugging",emoji:"\u{1F937}",name:"Person Shrugging",keywords:["dunno","whatever"],group:"people"},{shortcode:"person_facepalming",emoji:"\u{1F926}",name:"Person Facepalming",keywords:["frustration","disbelief"],group:"people"},{shortcode:"person_raising_hand",emoji:"\u{1F64B}",name:"Person Raising Hand",keywords:["question","volunteer"],group:"people"},{shortcode:"ninja",emoji:"\u{1F977}",name:"Ninja",keywords:["stealth","hidden"],group:"people"},{shortcode:"dog",emoji:"\u{1F436}",name:"Dog Face",keywords:["puppy","pet"],group:"animals"},{shortcode:"cat",emoji:"\u{1F431}",name:"Cat Face",keywords:["kitten","pet"],group:"animals"},{shortcode:"mouse",emoji:"\u{1F42D}",name:"Mouse Face",keywords:["rodent"],group:"animals"},{shortcode:"rabbit",emoji:"\u{1F430}",name:"Rabbit Face",keywords:["bunny","easter"],group:"animals"},{shortcode:"fox",emoji:"\u{1F98A}",name:"Fox",keywords:["clever","sly"],group:"animals"},{shortcode:"bear",emoji:"\u{1F43B}",name:"Bear",keywords:["teddy","nature"],group:"animals"},{shortcode:"unicorn",emoji:"\u{1F984}",name:"Unicorn",keywords:["magic","fantasy"],group:"animals"},{shortcode:"bee",emoji:"\u{1F41D}",name:"Honeybee",keywords:["honey","buzz"],group:"animals"},{shortcode:"butterfly",emoji:"\u{1F98B}",name:"Butterfly",keywords:["pretty","nature"],group:"animals"},{shortcode:"turtle",emoji:"\u{1F422}",name:"Turtle",keywords:["slow","shell"],group:"animals"},{shortcode:"snake",emoji:"\u{1F40D}",name:"Snake",keywords:["reptile"],group:"animals"},{shortcode:"whale",emoji:"\u{1F433}",name:"Spouting Whale",keywords:["ocean","sea"],group:"animals"},{shortcode:"dolphin",emoji:"\u{1F42C}",name:"Dolphin",keywords:["ocean","smart"],group:"animals"},{shortcode:"eagle",emoji:"\u{1F985}",name:"Eagle",keywords:["bird","freedom"],group:"animals"},{shortcode:"owl",emoji:"\u{1F989}",name:"Owl",keywords:["wise","night"],group:"animals"},{shortcode:"penguin",emoji:"\u{1F427}",name:"Penguin",keywords:["cold","linux"],group:"animals"},{shortcode:"octopus",emoji:"\u{1F419}",name:"Octopus",keywords:["ocean","tentacle"],group:"animals"},{shortcode:"seedling",emoji:"\u{1F331}",name:"Seedling",keywords:["plant","grow"],group:"animals"},{shortcode:"evergreen_tree",emoji:"\u{1F332}",name:"Evergreen Tree",keywords:["nature","pine"],group:"animals"},{shortcode:"sunflower",emoji:"\u{1F33B}",name:"Sunflower",keywords:["flower","yellow"],group:"animals"},{shortcode:"rose",emoji:"\u{1F339}",name:"Rose",keywords:["flower","love"],group:"animals"},{shortcode:"apple",emoji:"\u{1F34E}",name:"Red Apple",keywords:["fruit","healthy"],group:"food"},{shortcode:"banana",emoji:"\u{1F34C}",name:"Banana",keywords:["fruit","yellow"],group:"food"},{shortcode:"grapes",emoji:"\u{1F347}",name:"Grapes",keywords:["fruit","wine"],group:"food"},{shortcode:"watermelon",emoji:"\u{1F349}",name:"Watermelon",keywords:["fruit","summer"],group:"food"},{shortcode:"avocado",emoji:"\u{1F951}",name:"Avocado",keywords:["guacamole","healthy"],group:"food"},{shortcode:"pizza",emoji:"\u{1F355}",name:"Pizza",keywords:["food","italian"],group:"food"},{shortcode:"hamburger",emoji:"\u{1F354}",name:"Hamburger",keywords:["burger","fast food"],group:"food"},{shortcode:"taco",emoji:"\u{1F32E}",name:"Taco",keywords:["mexican","food"],group:"food"},{shortcode:"sushi",emoji:"\u{1F363}",name:"Sushi",keywords:["japanese","fish"],group:"food"},{shortcode:"cookie",emoji:"\u{1F36A}",name:"Cookie",keywords:["sweet","biscuit"],group:"food"},{shortcode:"cake",emoji:"\u{1F382}",name:"Birthday Cake",keywords:["birthday","celebration"],group:"food"},{shortcode:"ice_cream",emoji:"\u{1F366}",name:"Soft Ice Cream",keywords:["dessert","cold"],group:"food"},{shortcode:"chocolate_bar",emoji:"\u{1F36B}",name:"Chocolate Bar",keywords:["sweet","candy"],group:"food"},{shortcode:"popcorn",emoji:"\u{1F37F}",name:"Popcorn",keywords:["movie","snack"],group:"food"},{shortcode:"coffee",emoji:"\u2615",name:"Hot Beverage",keywords:["tea","drink","morning"],group:"food"},{shortcode:"beer",emoji:"\u{1F37A}",name:"Beer Mug",keywords:["drink","bar"],group:"food"},{shortcode:"wine_glass",emoji:"\u{1F377}",name:"Wine Glass",keywords:["drink","alcohol"],group:"food"},{shortcode:"cocktail",emoji:"\u{1F378}",name:"Cocktail Glass",keywords:["drink","martini"],group:"food"},{shortcode:"hot_pepper",emoji:"\u{1F336}\uFE0F",name:"Hot Pepper",keywords:["spicy","chili"],group:"food"},{shortcode:"egg",emoji:"\u{1F95A}",name:"Egg",keywords:["breakfast","food"],group:"food"},{shortcode:"earth_americas",emoji:"\u{1F30E}",name:"Globe Americas",keywords:["world","planet"],group:"travel"},{shortcode:"earth_europe",emoji:"\u{1F30D}",name:"Globe Europe-Africa",keywords:["world","planet"],group:"travel"},{shortcode:"sun",emoji:"\u2600\uFE0F",name:"Sun",keywords:["weather","bright","warm"],group:"travel"},{shortcode:"moon",emoji:"\u{1F319}",name:"Crescent Moon",keywords:["night","sleep"],group:"travel"},{shortcode:"star",emoji:"\u2B50",name:"Star",keywords:["favorite","rating"],group:"travel"},{shortcode:"star2",emoji:"\u{1F31F}",name:"Glowing Star",keywords:["sparkle","shine"],group:"travel"},{shortcode:"cloud",emoji:"\u2601\uFE0F",name:"Cloud",keywords:["weather","sky"],group:"travel"},{shortcode:"rainbow",emoji:"\u{1F308}",name:"Rainbow",keywords:["colorful","weather"],group:"travel"},{shortcode:"snowflake",emoji:"\u2744\uFE0F",name:"Snowflake",keywords:["cold","winter"],group:"travel"},{shortcode:"zap",emoji:"\u26A1",name:"High Voltage",keywords:["lightning","electric","fast"],group:"travel"},{shortcode:"fire",emoji:"\u{1F525}",name:"Fire",keywords:["hot","flame","lit"],group:"travel"},{shortcode:"ocean",emoji:"\u{1F30A}",name:"Water Wave",keywords:["sea","wave","surf"],group:"travel"},{shortcode:"airplane",emoji:"\u2708\uFE0F",name:"Airplane",keywords:["travel","flight"],group:"travel"},{shortcode:"rocket",emoji:"\u{1F680}",name:"Rocket",keywords:["launch","space","fast"],group:"travel"},{shortcode:"car",emoji:"\u{1F697}",name:"Automobile",keywords:["drive","vehicle"],group:"travel"},{shortcode:"house",emoji:"\u{1F3E0}",name:"House",keywords:["home","building"],group:"travel"},{shortcode:"tent",emoji:"\u26FA",name:"Tent",keywords:["camping","outdoor"],group:"travel"},{shortcode:"mountain",emoji:"\u26F0\uFE0F",name:"Mountain",keywords:["nature","hike"],group:"travel"},{shortcode:"desert_island",emoji:"\u{1F3DD}\uFE0F",name:"Desert Island",keywords:["beach","vacation"],group:"travel"},{shortcode:"volcano",emoji:"\u{1F30B}",name:"Volcano",keywords:["eruption","nature"],group:"travel"},{shortcode:"soccer",emoji:"\u26BD",name:"Soccer Ball",keywords:["football","sport"],group:"activities"},{shortcode:"basketball",emoji:"\u{1F3C0}",name:"Basketball",keywords:["sport","hoop"],group:"activities"},{shortcode:"tennis",emoji:"\u{1F3BE}",name:"Tennis",keywords:["sport","ball"],group:"activities"},{shortcode:"video_game",emoji:"\u{1F3AE}",name:"Video Game",keywords:["gaming","controller"],group:"activities"},{shortcode:"dart",emoji:"\u{1F3AF}",name:"Bullseye",keywords:["target","goal"],group:"activities"},{shortcode:"trophy",emoji:"\u{1F3C6}",name:"Trophy",keywords:["winner","champion"],group:"activities"},{shortcode:"medal",emoji:"\u{1F947}",name:"Gold Medal",keywords:["first","winner"],group:"activities"},{shortcode:"tada",emoji:"\u{1F389}",name:"Party Popper",keywords:["celebration","party"],group:"activities"},{shortcode:"confetti_ball",emoji:"\u{1F38A}",name:"Confetti Ball",keywords:["party","celebration"],group:"activities"},{shortcode:"balloon",emoji:"\u{1F388}",name:"Balloon",keywords:["party","birthday"],group:"activities"},{shortcode:"art",emoji:"\u{1F3A8}",name:"Artist Palette",keywords:["paint","creative"],group:"activities"},{shortcode:"musical_note",emoji:"\u{1F3B5}",name:"Musical Note",keywords:["music","song"],group:"activities"},{shortcode:"microphone",emoji:"\u{1F3A4}",name:"Microphone",keywords:["sing","karaoke"],group:"activities"},{shortcode:"guitar",emoji:"\u{1F3B8}",name:"Guitar",keywords:["music","rock"],group:"activities"},{shortcode:"dice",emoji:"\u{1F3B2}",name:"Game Die",keywords:["chance","random"],group:"activities"},{shortcode:"bulb",emoji:"\u{1F4A1}",name:"Light Bulb",keywords:["idea","bright"],group:"objects"},{shortcode:"computer",emoji:"\u{1F4BB}",name:"Laptop",keywords:["tech","work"],group:"objects"},{shortcode:"keyboard",emoji:"\u2328\uFE0F",name:"Keyboard",keywords:["type","computer"],group:"objects"},{shortcode:"phone",emoji:"\u{1F4F1}",name:"Mobile Phone",keywords:["cell","call"],group:"objects"},{shortcode:"camera",emoji:"\u{1F4F7}",name:"Camera",keywords:["photo","picture"],group:"objects"},{shortcode:"tv",emoji:"\u{1F4FA}",name:"Television",keywords:["watch","screen"],group:"objects"},{shortcode:"battery",emoji:"\u{1F50B}",name:"Battery",keywords:["charge","power"],group:"objects"},{shortcode:"electric_plug",emoji:"\u{1F50C}",name:"Electric Plug",keywords:["power","connect"],group:"objects"},{shortcode:"mag",emoji:"\u{1F50D}",name:"Magnifying Glass Left",keywords:["search","find"],group:"objects"},{shortcode:"lock",emoji:"\u{1F512}",name:"Locked",keywords:["security","private"],group:"objects"},{shortcode:"unlock",emoji:"\u{1F513}",name:"Unlocked",keywords:["open","access"],group:"objects"},{shortcode:"key",emoji:"\u{1F511}",name:"Key",keywords:["access","password"],group:"objects"},{shortcode:"hammer",emoji:"\u{1F528}",name:"Hammer",keywords:["tool","build"],group:"objects"},{shortcode:"wrench",emoji:"\u{1F527}",name:"Wrench",keywords:["tool","fix"],group:"objects"},{shortcode:"gear",emoji:"\u2699\uFE0F",name:"Gear",keywords:["settings","config"],group:"objects"},{shortcode:"link",emoji:"\u{1F517}",name:"Link",keywords:["chain","url"],group:"objects"},{shortcode:"paperclip",emoji:"\u{1F4CE}",name:"Paperclip",keywords:["attach","clip"],group:"objects"},{shortcode:"scissors",emoji:"\u2702\uFE0F",name:"Scissors",keywords:["cut","snip"],group:"objects"},{shortcode:"pen",emoji:"\u{1F58A}\uFE0F",name:"Pen",keywords:["write","sign"],group:"objects"},{shortcode:"pencil",emoji:"\u270F\uFE0F",name:"Pencil",keywords:["write","draw"],group:"objects"},{shortcode:"book",emoji:"\u{1F4D6}",name:"Open Book",keywords:["read","study"],group:"objects"},{shortcode:"memo",emoji:"\u{1F4DD}",name:"Memo",keywords:["note","write"],group:"objects"},{shortcode:"package",emoji:"\u{1F4E6}",name:"Package",keywords:["box","delivery"],group:"objects"},{shortcode:"mailbox",emoji:"\u{1F4EC}",name:"Open Mailbox with Raised Flag",keywords:["mail","letter"],group:"objects"},{shortcode:"bell",emoji:"\u{1F514}",name:"Bell",keywords:["notification","alert"],group:"objects"},{shortcode:"red_heart",emoji:"\u2764\uFE0F",name:"Red Heart",keywords:["love","valentine"],group:"symbols"},{shortcode:"orange_heart",emoji:"\u{1F9E1}",name:"Orange Heart",keywords:["love"],group:"symbols"},{shortcode:"yellow_heart",emoji:"\u{1F49B}",name:"Yellow Heart",keywords:["love","friendship"],group:"symbols"},{shortcode:"green_heart",emoji:"\u{1F49A}",name:"Green Heart",keywords:["love","nature"],group:"symbols"},{shortcode:"blue_heart",emoji:"\u{1F499}",name:"Blue Heart",keywords:["love","trust"],group:"symbols"},{shortcode:"purple_heart",emoji:"\u{1F49C}",name:"Purple Heart",keywords:["love"],group:"symbols"},{shortcode:"broken_heart",emoji:"\u{1F494}",name:"Broken Heart",keywords:["sad","breakup"],group:"symbols"},{shortcode:"sparkles",emoji:"\u2728",name:"Sparkles",keywords:["shine","magic","new"],group:"symbols"},{shortcode:"hundred",emoji:"\u{1F4AF}",name:"Hundred Points",keywords:["perfect","score"],group:"symbols"},{shortcode:"boom",emoji:"\u{1F4A5}",name:"Collision",keywords:["explosion","impact"],group:"symbols"},{shortcode:"speech_balloon",emoji:"\u{1F4AC}",name:"Speech Balloon",keywords:["talk","chat","message"],group:"symbols"},{shortcode:"thought_balloon",emoji:"\u{1F4AD}",name:"Thought Balloon",keywords:["think","dream"],group:"symbols"},{shortcode:"check_mark",emoji:"\u2705",name:"Check Mark Button",keywords:["done","yes","complete"],group:"symbols"},{shortcode:"x",emoji:"\u274C",name:"Cross Mark",keywords:["no","wrong","delete"],group:"symbols"},{shortcode:"warning",emoji:"\u26A0\uFE0F",name:"Warning",keywords:["caution","alert"],group:"symbols"},{shortcode:"no_entry",emoji:"\u26D4",name:"No Entry",keywords:["stop","forbidden"],group:"symbols"},{shortcode:"question",emoji:"\u2753",name:"Question Mark",keywords:["help","what"],group:"symbols"},{shortcode:"exclamation",emoji:"\u2757",name:"Exclamation Mark",keywords:["important","attention"],group:"symbols"},{shortcode:"arrow_right",emoji:"\u27A1\uFE0F",name:"Right Arrow",keywords:["next","forward"],group:"symbols"},{shortcode:"arrow_left",emoji:"\u2B05\uFE0F",name:"Left Arrow",keywords:["back","previous"],group:"symbols"},{shortcode:"arrow_up",emoji:"\u2B06\uFE0F",name:"Up Arrow",keywords:["above"],group:"symbols"},{shortcode:"arrow_down",emoji:"\u2B07\uFE0F",name:"Down Arrow",keywords:["below"],group:"symbols"},{shortcode:"recycle",emoji:"\u267B\uFE0F",name:"Recycling Symbol",keywords:["environment","green"],group:"symbols"},{shortcode:"infinity",emoji:"\u267E\uFE0F",name:"Infinity",keywords:["forever","loop"],group:"symbols"},{shortcode:"checkered_flag",emoji:"\u{1F3C1}",name:"Chequered Flag",keywords:["finish","race"],group:"flags"},{shortcode:"triangular_flag",emoji:"\u{1F6A9}",name:"Triangular Flag",keywords:["red flag","warning"],group:"flags"},{shortcode:"white_flag",emoji:"\u{1F3F3}\uFE0F",name:"White Flag",keywords:["surrender","peace"],group:"flags"},{shortcode:"rainbow_flag",emoji:"\u{1F3F3}\uFE0F\u200D\u{1F308}",name:"Rainbow Flag",keywords:["pride","lgbtq"],group:"flags"},{shortcode:"pirate_flag",emoji:"\u{1F3F4}\u200D\u2620\uFE0F",name:"Pirate Flag",keywords:["jolly roger","skull"],group:"flags"},{shortcode:"flag_us",emoji:"\u{1F1FA}\u{1F1F8}",name:"Flag: United States",keywords:["usa","america"],group:"flags"},{shortcode:"flag_gb",emoji:"\u{1F1EC}\u{1F1E7}",name:"Flag: United Kingdom",keywords:["uk","britain"],group:"flags"},{shortcode:"flag_fr",emoji:"\u{1F1EB}\u{1F1F7}",name:"Flag: France",keywords:["french"],group:"flags"},{shortcode:"flag_de",emoji:"\u{1F1E9}\u{1F1EA}",name:"Flag: Germany",keywords:["german"],group:"flags"},{shortcode:"flag_jp",emoji:"\u{1F1EF}\u{1F1F5}",name:"Flag: Japan",keywords:["japanese"],group:"flags"},{shortcode:"flag_kr",emoji:"\u{1F1F0}\u{1F1F7}",name:"Flag: South Korea",keywords:["korean"],group:"flags"},{shortcode:"flag_br",emoji:"\u{1F1E7}\u{1F1F7}",name:"Flag: Brazil",keywords:["brazilian"],group:"flags"},{shortcode:"flag_in",emoji:"\u{1F1EE}\u{1F1F3}",name:"Flag: India",keywords:["indian"],group:"flags"},{shortcode:"flag_ca",emoji:"\u{1F1E8}\u{1F1E6}",name:"Flag: Canada",keywords:["canadian","maple"],group:"flags"},{shortcode:"flag_au",emoji:"\u{1F1E6}\u{1F1FA}",name:"Flag: Australia",keywords:["australian"],group:"flags"}],gt=new Map(Pt.map(r=>[r.shortcode,r])),cs=new Map([["+1","thumbsup"],["-1","thumbsdown"],["heart","red_heart"],["thumbs_up","thumbsup"],["thumbs_down","thumbsdown"],["grin","grinning"],["laughing_crying","joy"],["lol","rofl"],["smiley","smile"],["cool","sunglasses"],["nerd","nerd_face"],["kiss","kissing_heart"],["hug","hugs"],["think","thinking"],["sad","cry"],["mad","angry"],["shrug","person_shrugging"],["facepalm","person_facepalming"],["pray_hands","pray"],["hi","wave"],["bye","wave"],["lightning","zap"],["flame","fire"],["hot","fire"],["bomb","boom"],["idea","bulb"],["laptop","computer"],["search","mag"],["party","tada"],["celebrate","tada"],["congrats","tada"],["check","check_mark"],["done","check_mark"],["yes","check_mark"],["no","x"],["wrong","x"],["love","red_heart"],["star_eyes","star_struck"],["mindblown","exploding_head"],["memo_pad","memo"],["notes","memo"],["coffee_cup","coffee"],["tea","coffee"]]),hn=["smileys","people","animals","food","travel","activities","objects","symbols","flags"],un={smileys:"Smileys & Emotion",people:"People & Body",animals:"Animals & Nature",food:"Food & Drink",travel:"Travel & Places",activities:"Activities",objects:"Objects",symbols:"Symbols",flags:"Flags"},dn={smileys:"\u{1F600}",people:"\u{1F44B}",animals:"\u{1F436}",food:"\u{1F355}",travel:"\u{1F30D}",activities:"\u{1F389}",objects:"\u{1F4A1}",symbols:"\u2764\uFE0F",flags:"\u{1F3C1}"},hs=Symbol.for("vanilla-breeze.emoji-extended"),pn="vb:emoji-extended",as=globalThis[hs]??=[],ls=0,bt=[]});var mc=window.matchMedia("(prefers-reduced-motion: reduce)");var Ui=new Map;function g(r,t,e={}){let i=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:i},n=Ui.get(r);if(customElements.get(r)){if(!n||n.priority>=i){n&&n.priority===i&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=i){n.priority===i&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}Ui.set(r,s),customElements.define(r,t)}var b=class extends HTMLElement{#t=[];#e;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,s){t.addEventListener(e,i,s),this.#t.push(()=>t.removeEventListener(e,i,s))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#e||(this.#e=this.attachInternals());let i=this.#e.states;try{e?i.add(t):i.delete(t)}catch{let s=`--${t}`;e?i.add(s):i.delete(s)}}_adoptInternals(t){this.#e||(this.#e=t)}#i(){return this.constructor.formAssociated&&this.#e?this.#e:null}get validity(){return this.#i()?.validity}get validationMessage(){return this.#i()?.validationMessage??""}get willValidate(){return this.#i()?.willValidate??!1}get form(){return this.#i()?.form??null}checkValidity(){return this.#i()?.checkValidity()??!0}reportValidity(){return this.#i()?.reportValidity()??!0}};function Mt(r){return[...r.querySelectorAll("li")].filter(t=>t.querySelector("a[href]"))}function Vi(r){return r.querySelector("li[data-audio-active]")}function Wi(r,t,e){let i=e.querySelector("a[href]");return i?(t.querySelectorAll("li[data-audio-active]").forEach(s=>{s!==e&&s.removeAttribute("data-audio-active")}),e.setAttribute("data-audio-active",""),r.src=i.href,r.play()?.catch(()=>{}),{src:i.href,title:i.textContent?.trim()??""}):null}function Ki(r){let t=Vi(r);return t?.setAttribute("data-audio-played",""),t}function Gi(r,{loop:t=!1}={}){let e=Mt(r);if(!e.length)return null;let i=Vi(r),s=i?e.indexOf(i):-1;return s+1<e.length?e[s+1]:t?e[0]:null}var Gr='input, button, a[href], summary, select, textarea, audio, [contenteditable]:not([contenteditable="false"])',le=class extends b{static get observedAttributes(){return["loop","shuffle"]}#t=null;#e=null;#i=!1;#s=null;#r=null;#n=null;#a=null;#c=null;#h=null;#l=null;#o=null;#u=null;#p=null;#d=!1;#f=new Set;#k=null;#w=!1;setup(){if(this.#t=this.querySelector("audio"),!this.#t)return!1;this.#e=this.querySelector(".track-list"),this.#t.removeAttribute("controls");let t=!this.shadowRoot;this.#v(),t&&(this.#g(),this.#x(),this.#E()),this.#M(),this.#m(),this.#A();let e=this.#t;return(e.error||e.networkState===HTMLMediaElement.NETWORK_NO_SOURCE&&(e.hasAttribute("src")||e.querySelector("source")))&&this.#b(),e.readyState>=HTMLMediaElement.HAVE_METADATA&&(this.#I(),this.#P()),this.hasAttribute("autoplay")&&this.#t.play().catch(()=>{}),this.#k=()=>{let i=this.shadowRoot?.querySelector(".player");i&&(i.style.display="none",i.offsetHeight,i.style.display="")},this.listen(window,"vb:theme-change",this.#k),!0}teardown(){this.#t&&this.#t.setAttribute("controls","")}attributeChangedCallback(t){t==="loop"?this.#m():t==="shuffle"&&this.#f.clear()}#m(){this.#t&&(this.hasAttribute("loop")&&!this.#e?(this.#t.loop=!0,this.#w=!0):this.#w&&(this.#t.loop=!1,this.#w=!1))}get src(){return this.#t?.getAttribute("src")||this.#t?.currentSrc||""}set src(t){if(!this.#t)return;let e=t==null?"":String(t);this.#t.getAttribute("src")!==e&&(this.#t.setAttribute("src",e),this.#t.load?.(),this.#C(),this.#M(),this.dispatchEvent(new CustomEvent("audio-player:src-changed",{detail:{src:e,source:"property"},bubbles:!0})))}get currentTime(){return this.#t?.currentTime??0}set currentTime(t){this.#t&&(this.#t.currentTime=Number(t)||0)}#v(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
2
2
  <style>${this.#y()}</style>
3
3
  <div part="player" class="player">
4
4
  <div part="controls" class="controls">
@@ -43,7 +43,7 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
43
43
  <p part="error" class="error" role="status" hidden></p>
44
44
  <slot></slot>
45
45
  </div>
46
- `,this.#s=t.querySelector(".controls"),this.#n=t.querySelector(".play-btn"),this.#r=t.querySelector(".timeline"),this.#o=t.querySelector(".timeline-fill"),this.#a=t.querySelector(".volume"),this.#h=t.querySelector(".current-time"),this.#c=t.querySelector(".duration"),this.#l=t.querySelector(".track-title"),this.#m=t.querySelector(".mute-btn"),this.#d=t.querySelector(".error")}#y(){return`
46
+ `,this.#s=t.querySelector(".controls"),this.#r=t.querySelector(".play-btn"),this.#n=t.querySelector(".timeline"),this.#a=t.querySelector(".timeline-fill"),this.#c=t.querySelector(".volume"),this.#h=t.querySelector(".current-time"),this.#l=t.querySelector(".duration"),this.#o=t.querySelector(".track-title"),this.#u=t.querySelector(".mute-btn"),this.#p=t.querySelector(".error")}#y(){return`
47
47
  :host {
48
48
  display: block;
49
49
  --_accent: var(--audio-player-accent, var(--color-primary, oklch(55% 0.2 260)));
@@ -346,11 +346,11 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
346
346
  transform: none;
347
347
  }
348
348
  }
349
- `}#b(){this.#t.addEventListener("timeupdate",()=>this.#T()),this.#t.addEventListener("loadedmetadata",()=>{this.#L(),this.#$(),this.#T()}),this.#t.addEventListener("emptied",()=>{this.#$(),this.#T()}),this.#t.addEventListener("volumechange",()=>this.#x()),this.#t.addEventListener("error",t=>{let e=t.target;if(e!==this.#t){if(e.localName!=="source"||this.#t.hasAttribute("src"))return;let i=e.nextElementSibling;for(;i&&i.localName!=="source";)i=i.nextElementSibling;if(i)return}this.#k()},!0),this.#t.addEventListener("play",()=>{this.#i=!0,this.setAttribute("state","playing"),this.#n.setAttribute("aria-label","Pause"),this.#P("audio-player:play",{currentTime:this.#t.currentTime,src:this.#t.currentSrc})}),this.#t.addEventListener("pause",()=>{this.#i=!1,this.setAttribute("state","paused"),this.#n.setAttribute("aria-label","Play"),this.#P("audio-player:pause",{currentTime:this.#t.currentTime})}),this.#t.addEventListener("ended",()=>{this.#i=!1,this.setAttribute("state","ended"),this.#n.setAttribute("aria-label","Play"),this.#e&&(ei(this.#e),this.#M()),this.#P("audio-player:ended",{src:this.#t.currentSrc})})}#k(){this.setAttribute("data-state","error"),this.#d.textContent=`Audio could not be loaded${this.#l.textContent?`: ${this.#l.textContent}`:""}.`,this.#d.hidden=!1}#L(){this.getAttribute("data-state")==="error"&&this.removeAttribute("data-state"),this.#d.hidden=!0,this.#d.textContent=""}#x(){if(!this.#t||!this.#m)return;let t=this.#t.muted;t?this.setAttribute("muted",""):this.removeAttribute("muted"),this.#m.setAttribute("aria-pressed",String(t)),this.#a.style.setProperty("--_vol",t?"0":this.#a.value)}#A(){this.#n.addEventListener("click",()=>{this.#i?this.#t.pause():this.#t.play().catch(()=>{})}),this.#r.addEventListener("input",()=>{let e=Number(this.#r.value);this.#o.style.width=`${e}%`,this.#t.duration&&(this.#t.currentTime=e/100*this.#t.duration,this.#N(this.#t.currentTime,this.#t.duration))}),this.#r.addEventListener("pointerdown",()=>{this.#p=!0,this.setState("scrub-active",!0)});let t=()=>{this.#p&&(this.#p=!1,this.setState("scrub-active",!1))};this.#r.addEventListener("pointerup",t),this.#r.addEventListener("pointercancel",t),this.#r.addEventListener("change",t),this.#a.addEventListener("input",()=>{this.#t.volume=Number(this.#a.value),this.#t.muted=!1,this.#x()}),this.#m.addEventListener("click",()=>{this.#t.muted=!this.#t.muted,this.#x()}),this.addEventListener("keydown",e=>{if(!(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)&&!this.#R(e))switch(e.key){case" ":e.preventDefault(),this.#i?this.#t.pause():this.#t.play().catch(()=>{});break;case"ArrowLeft":e.preventDefault(),this.#t.currentTime=Math.max(0,this.#t.currentTime-10);break;case"ArrowRight":e.preventDefault(),this.#t.currentTime=Math.min(this.#t.duration||0,this.#t.currentTime+10);break;case"m":case"M":this.#t.muted=!this.#t.muted,this.#x();break}}),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","group"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label","Audio player"),this.hasAttribute("aria-keyshortcuts")||this.setAttribute("aria-keyshortcuts","Space ArrowLeft ArrowRight M")}#R(t){for(let e of t.composedPath()){if(e===this)return!1;if(e instanceof Element&&e.matches(ms))return!0}return!1}#C(){this.#e&&this.#e.addEventListener("click",t=>{let i=t.target?.closest("a[href]"),s=i?.closest("li");!i||!s||(t.preventDefault(),this.#E(s))})}#E(t){if(!this.#e)return;let e=ti(this.#t,this.#e,t);e&&(this.#u.add(t),this.#_(),this.#P("audio-player:track-change",e))}#S(){if(!this.#e)return;let t=this.#t.src,e=rt(this.#e).find(i=>i.querySelector("a[href]").href===t);this.#e.querySelectorAll("li[data-audio-active]").forEach(i=>{i!==e&&i.removeAttribute("data-audio-active")}),e?.setAttribute("data-audio-active","")}#M(){if(!this.#e)return;let t=this.hasAttribute("loop");if(!this.hasAttribute("shuffle")){let o=ii(this.#e,{loop:t});o&&this.#E(o);return}let e=rt(this.#e),i=this.#e.querySelector("li[data-audio-active]");i&&this.#u.add(i);let s=e.filter(o=>!this.#u.has(o));if(!s.length){if(this.#u.clear(),!t)return;s=e.length>1?e.filter(o=>o!==i):e}let n=s[Math.floor(Math.random()*s.length)];n&&this.#E(n)}#T(){let t=this.#t.currentTime,e=this.#t.duration||0,i=e?t/e*100:0;this.#h.textContent=this.#j(t),this.#N(t,e),!this.#p&&(this.#r.value=String(i),this.#o.style.width=`${i}%`)}#N(t,e){this.#r.setAttribute("aria-valuetext",`${this.#j(t)} of ${this.#j(e)}`)}#$(){let t=this.#t.duration||0;this.#c.textContent=this.#j(t)}#_(){if(!this.#l)return;if(this.#e){let i=this.#e.querySelector("li[data-audio-active] a");if(i){this.#l.textContent=i.textContent;return}}let t=this.#t.src||this.#t.currentSrc||this.#t.querySelector("source")?.src||"",e=t?t.split("/").pop().split(/[?#]/)[0]:"";this.#l.textContent=e.replace(/\.[^.]+$/,"").replace(/[-_]/g," ")}#j(t){if(!Number.isFinite(t))return"0:00";let e=Math.floor(t/60),i=Math.floor(t%60).toString().padStart(2,"0");return`${e}:${i}`}#P(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}};p("audio-player",Mt);var Nt=new Map;function fs(){if(!Nt.has("default"))try{Nt.set("default",new AudioContext)}catch{return null}return Nt.get("default")}var nt=new WeakMap;function gs(r,t){if(nt.has(r))return nt.get(r);let e=t.createMediaElementSource(r);return e.connect(t.destination),nt.set(r,e),e}function si(r){let t=Number.parseInt(r??"",10);if(!Number.isFinite(t)||t<=0)return 256;let e=2**Math.round(Math.log2(t));return Math.min(32768,Math.max(32,e))}function bs(r){if(r.crossOrigin!=null)return!1;let t=r.currentSrc||r.src||r.querySelector("source[src]")?.src||"";if(!t)return!1;try{let e=new URL(t,location.href);return e.protocol==="data:"||e.protocol==="blob:"?!1:e.origin!==location.origin}catch{return!1}}var ri=new WeakSet,vs=new Set(["bars","waveform","circle"]);function ni(r){return r&&vs.has(r)?r:"bars"}var Rt="oklch(55% 0.2 260)",ys=new Uint8Array(256).fill(128),ws=new Uint8Array(128),$t=class extends m{#t=null;#e=null;#i=null;#s=null;#n=null;#r=new Uint8Array(0);#o=new Uint8Array(0);#a=Rt;#h="";#c="bars";#l=null;#m=null;#d=null;#p=!0;#u=!1;#g=!1;#v=null;#f=()=>this.#L();static get observedAttributes(){return["for","data-mode","data-fft-size"]}setup(){if(this.#g=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#c=ni(this.getAttribute("data-mode")),this.#w(),this.#y(),this.#b(),this.#N(),this.#$(),this.#_(),this.#u&&this.#n&&this.#s){try{this.#n.connect(this.#s)}catch{}this.#A()}let t=()=>requestAnimationFrame(()=>{this.#y(),this.#l||this.#E()});this.listen(window,"vb:theme-change",t),this.listen(window.matchMedia("(prefers-color-scheme: dark)"),"change",t)}teardown(){this.#R(),this.#m?.disconnect(),this.#d?.disconnect(),this.#v?.removeEventListener("play",this.#f),this.#v=null,this.#k()}attributeChangedCallback(t,e,i){if(e!==i){if(t==="data-mode"){this.#c=ni(i),this.isConnected&&!this.#l&&this.#E();return}this.isConnected&&(t==="for"?this.#b():t==="data-fft-size"&&this.#s&&(this.#s.fftSize=si(i),this.#x(),this.#l||this.#E()))}}#w(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
349
+ `}#g(){this.#t.addEventListener("timeupdate",()=>this.#P()),this.#t.addEventListener("loadedmetadata",()=>{this.#T(),this.#I(),this.#P()}),this.#t.addEventListener("emptied",()=>{this.#I(),this.#P()}),this.#t.addEventListener("volumechange",()=>this.#A()),this.#t.addEventListener("error",t=>{let e=t.target;if(e!==this.#t){if(e.localName!=="source"||this.#t.hasAttribute("src"))return;let i=e.nextElementSibling;for(;i&&i.localName!=="source";)i=i.nextElementSibling;if(i)return}this.#b()},!0),this.#t.addEventListener("play",()=>{this.#i=!0,this.setAttribute("state","playing"),this.#r.setAttribute("aria-label","Pause"),this.#z("audio-player:play",{currentTime:this.#t.currentTime,src:this.#t.currentSrc})}),this.#t.addEventListener("pause",()=>{this.#i=!1,this.setAttribute("state","paused"),this.#r.setAttribute("aria-label","Play"),this.#z("audio-player:pause",{currentTime:this.#t.currentTime})}),this.#t.addEventListener("ended",()=>{this.#i=!1,this.setAttribute("state","ended"),this.#r.setAttribute("aria-label","Play"),this.#e&&(Ki(this.#e),this.#$()),this.#z("audio-player:ended",{src:this.#t.currentSrc})})}#b(){this.setAttribute("data-state","error"),this.#p.textContent=`Audio could not be loaded${this.#o.textContent?`: ${this.#o.textContent}`:""}.`,this.#p.hidden=!1}#T(){this.getAttribute("data-state")==="error"&&this.removeAttribute("data-state"),this.#p.hidden=!0,this.#p.textContent=""}#A(){if(!this.#t||!this.#u)return;let t=this.#t.muted;t?this.setAttribute("muted",""):this.removeAttribute("muted"),this.#u.setAttribute("aria-pressed",String(t)),this.#c.style.setProperty("--_vol",t?"0":this.#c.value)}#x(){this.#r.addEventListener("click",()=>{this.#i?this.#t.pause():this.#t.play().catch(()=>{})}),this.#n.addEventListener("input",()=>{let e=Number(this.#n.value);this.#a.style.width=`${e}%`,this.#t.duration&&(this.#t.currentTime=e/100*this.#t.duration,this.#N(this.#t.currentTime,this.#t.duration))}),this.#n.addEventListener("pointerdown",()=>{this.#d=!0,this.setState("scrub-active",!0)});let t=()=>{this.#d&&(this.#d=!1,this.setState("scrub-active",!1))};this.#n.addEventListener("pointerup",t),this.#n.addEventListener("pointercancel",t),this.#n.addEventListener("change",t),this.#c.addEventListener("input",()=>{this.#t.volume=Number(this.#c.value),this.#t.muted=!1,this.#A()}),this.#u.addEventListener("click",()=>{this.#t.muted=!this.#t.muted,this.#A()}),this.addEventListener("keydown",e=>{if(!(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)&&!this.#S(e))switch(e.key){case" ":e.preventDefault(),this.#i?this.#t.pause():this.#t.play().catch(()=>{});break;case"ArrowLeft":e.preventDefault(),this.#t.currentTime=Math.max(0,this.#t.currentTime-10);break;case"ArrowRight":e.preventDefault(),this.#t.currentTime=Math.min(this.#t.duration||0,this.#t.currentTime+10);break;case"m":case"M":this.#t.muted=!this.#t.muted,this.#A();break}}),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","group"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label","Audio player"),this.hasAttribute("aria-keyshortcuts")||this.setAttribute("aria-keyshortcuts","Space ArrowLeft ArrowRight M")}#S(t){for(let e of t.composedPath()){if(e===this)return!1;if(e instanceof Element&&e.matches(Gr))return!0}return!1}#E(){this.#e&&this.#e.addEventListener("click",t=>{let i=t.target?.closest("a[href]"),s=i?.closest("li");!i||!s||(t.preventDefault(),this.#L(s))})}#L(t){if(!this.#e)return;let e=Wi(this.#t,this.#e,t);e&&(this.#f.add(t),this.#M(),this.#z("audio-player:track-change",e))}#C(){if(!this.#e)return;let t=this.#t.src,e=Mt(this.#e).find(i=>i.querySelector("a[href]").href===t);this.#e.querySelectorAll("li[data-audio-active]").forEach(i=>{i!==e&&i.removeAttribute("data-audio-active")}),e?.setAttribute("data-audio-active","")}#$(){if(!this.#e)return;let t=this.hasAttribute("loop");if(!this.hasAttribute("shuffle")){let o=Gi(this.#e,{loop:t});o&&this.#L(o);return}let e=Mt(this.#e),i=this.#e.querySelector("li[data-audio-active]");i&&this.#f.add(i);let s=e.filter(o=>!this.#f.has(o));if(!s.length){if(this.#f.clear(),!t)return;s=e.length>1?e.filter(o=>o!==i):e}let n=s[Math.floor(Math.random()*s.length)];n&&this.#L(n)}#P(){let t=this.#t.currentTime,e=this.#t.duration||0,i=e?t/e*100:0;this.#h.textContent=this.#R(t),this.#N(t,e),!this.#d&&(this.#n.value=String(i),this.#a.style.width=`${i}%`)}#N(t,e){this.#n.setAttribute("aria-valuetext",`${this.#R(t)} of ${this.#R(e)}`)}#I(){let t=this.#t.duration||0;this.#l.textContent=this.#R(t)}#M(){if(!this.#o)return;if(this.#e){let i=this.#e.querySelector("li[data-audio-active] a");if(i){this.#o.textContent=i.textContent;return}}let t=this.#t.src||this.#t.currentSrc||this.#t.querySelector("source")?.src||"",e=t?t.split("/").pop().split(/[?#]/)[0]:"";this.#o.textContent=e.replace(/\.[^.]+$/,"").replace(/[-_]/g," ")}#R(t){if(!Number.isFinite(t))return"0:00";let e=Math.floor(t/60),i=Math.floor(t%60).toString().padStart(2,"0");return`${e}:${i}`}#z(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}};g("audio-player",le);var ce=new Map;function Yr(){if(!ce.has("default"))try{ce.set("default",new AudioContext)}catch{return null}return ce.get("default")}var Rt=new WeakMap;function Xr(r,t){if(Rt.has(r))return Rt.get(r);let e=t.createMediaElementSource(r);return e.connect(t.destination),Rt.set(r,e),e}function Yi(r){let t=Number.parseInt(r??"",10);if(!Number.isFinite(t)||t<=0)return 256;let e=2**Math.round(Math.log2(t));return Math.min(32768,Math.max(32,e))}function Jr(r){if(r.crossOrigin!=null)return!1;let t=r.currentSrc||r.src||r.querySelector("source[src]")?.src||"";if(!t)return!1;try{let e=new URL(t,location.href);return e.protocol==="data:"||e.protocol==="blob:"?!1:e.origin!==location.origin}catch{return!1}}var Xi=new WeakSet,Zr=new Set(["bars","waveform","circle"]);function Ji(r){return r&&Zr.has(r)?r:"bars"}var he="oklch(55% 0.2 260)",Qr=new Uint8Array(256).fill(128),tn=new Uint8Array(128),ue=class extends b{#t=null;#e=null;#i=null;#s=null;#r=null;#n=new Uint8Array(0);#a=new Uint8Array(0);#c=he;#h="";#l="bars";#o=null;#u=null;#p=null;#d=!0;#f=!1;#k=!1;#w=null;#m=()=>this.#T();static get observedAttributes(){return["for","data-mode","data-fft-size"]}setup(){if(this.#k=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#l=Ji(this.getAttribute("data-mode")),this.#v(),this.#y(),this.#g(),this.#N(),this.#I(),this.#M(),this.#f&&this.#r&&this.#s){try{this.#r.connect(this.#s)}catch{}this.#x()}let t=()=>requestAnimationFrame(()=>{this.#y(),this.#o||this.#L()});this.listen(window,"vb:theme-change",t),this.listen(window.matchMedia("(prefers-color-scheme: dark)"),"change",t)}teardown(){this.#S(),this.#u?.disconnect(),this.#p?.disconnect(),this.#w?.removeEventListener("play",this.#m),this.#w=null,this.#b()}attributeChangedCallback(t,e,i){if(e!==i){if(t==="data-mode"){this.#l=Ji(i),this.isConnected&&!this.#o&&this.#L();return}this.isConnected&&(t==="for"?this.#g():t==="data-fft-size"&&this.#s&&(this.#s.fftSize=Yi(i),this.#A(),this.#o||this.#L()))}}#v(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
350
350
  <style>
351
351
  :host {
352
352
  display: block;
353
- --_color: var(--audio-visualizer-color, var(--color-primary, ${Rt}));
353
+ --_color: var(--audio-visualizer-color, var(--color-primary, ${he}));
354
354
  --_bg: var(--audio-visualizer-bg, var(--color-surface-sunken, transparent));
355
355
  --_height: var(--audio-visualizer-height, 80px);
356
356
  --_radius: var(--audio-visualizer-radius, var(--radius-m, 0.5rem));
@@ -364,8 +364,8 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
364
364
  }
365
365
  </style>
366
366
  <canvas aria-hidden="true"></canvas>
367
- `,this.#t=t.querySelector("canvas"),this.#e=this.#t.getContext("2d")}#y(){let t=getComputedStyle(this);this.#a=t.getPropertyValue("--_color").trim()||Rt,this.#h=t.getPropertyValue("--_bg").trim()}#b(){let t=this.getAttribute("for"),e=t?document.getElementById(t):null,i=e?.tagName==="AUDIO"?e:null;if(this.#i&&this.#i!==i&&(this.#R(),this.#k(),this.#s=null,this.#n=null,this.#u=!1,this.getAttribute("data-state")!==null&&this.removeAttribute("data-state"),this.#E()),this.#i=i,!i){this.#v?.removeEventListener("play",this.#f),this.#v=null;return}this.#u||(this.#v!==i&&(this.#v?.removeEventListener("play",this.#f),i.addEventListener("play",this.#f),this.#v=i),i.paused||this.#L())}#k(){if(this.#n&&this.#s)try{this.#n.disconnect(this.#s)}catch{}}#L(){if(this.#u||!this.#i)return;let t=this.#i;if(!nt.has(t)&&bs(t)){this.setAttribute("data-state","cross-origin"),ri.has(t)||(ri.add(t),console.warn('<audio-visualizer>: not visualising a cross-origin <audio> without crossorigin="anonymous" and CORS headers \u2014 hooking it would mute playback.',t));return}let e=fs();if(!e)return;let i,s;try{i=e.createAnalyser(),i.fftSize=si(this.getAttribute("data-fft-size")),i.smoothingTimeConstant=.8,s=gs(t,e),s.connect(i)}catch(n){this.setAttribute("data-state","error"),console.warn("<audio-visualizer>: could not connect to the audio element.",n);return}this.#s=i,this.#n=s,this.#x(),this.#u=!0,this.getAttribute("data-state")!==null&&this.removeAttribute("data-state"),this.#v?.removeEventListener("play",this.#f),this.#v=null,e.state==="suspended"&&e.resume().catch(()=>{}),this.#A()}#x(){this.#s&&(this.#r.length!==this.#s.frequencyBinCount&&(this.#r=new Uint8Array(this.#s.frequencyBinCount)),this.#o.length!==this.#s.fftSize&&(this.#o=new Uint8Array(this.#s.fftSize)))}#A(){if(this.#l)return;if(this.#g){this.#E();return}let t=()=>{if(!this.#p||this.#g){this.#l=null;return}this.#l=requestAnimationFrame(t),this.#E()};this.#l=requestAnimationFrame(t)}#R(){this.#l&&(cancelAnimationFrame(this.#l),this.#l=null)}#C(){let t=window.devicePixelRatio||1,e=Math.round(this.#t.clientWidth*t),i=Math.round(this.#t.clientHeight*t);this.#t.width!==e&&(this.#t.width=e),this.#t.height!==i&&(this.#t.height=i)}#E(){let t=this.#e;if(!t)return;let e=this.#t.width,i=this.#t.height;if(!e||!i)return;t.clearRect(0,0,e,i),this.#h&&this.#h!=="transparent"&&(t.fillStyle=this.#h,t.fillRect(0,0,e,i));let s=this.#u?this.#s:null,n=this.#c;if(n==="waveform"){s&&s.getByteTimeDomainData(this.#o),this.#M(t,e,i,this.#a,s?this.#o:ys);return}s&&s.getByteFrequencyData(this.#r);let o=s?this.#r:ws;n==="circle"?this.#T(t,e,i,this.#a,o):this.#S(t,e,i,this.#a,o)}#S(t,e,i,s,n){let o=Math.min(n.length,64),a=e/o,l=Math.max(1,a-1),c=Math.max(1,Math.round(i*.03));t.fillStyle=s;for(let h=0;h<o;h++){let u=Math.max(c,n[h]/255*i);t.fillRect(h*a,i-u,l,u)}}#M(t,e,i,s,n){let o=e/Math.max(1,n.length-1);t.strokeStyle=s,t.lineWidth=2*(window.devicePixelRatio||1),t.beginPath();for(let a=0;a<n.length;a++){let l=n[a]/255*i;a===0?t.moveTo(0,l):t.lineTo(a*o,l)}t.stroke()}#T(t,e,i,s,n){let o=e/2,a=i/2,l=Math.min(e,i)*.25,c=n.length;t.strokeStyle=s,t.lineWidth=2*(window.devicePixelRatio||1),t.beginPath();for(let h=0;h<c;h++){let u=h/c*Math.PI*2,d=n[h]/255*(l*.8),f=l+d,g=o+f*Math.cos(u),k=a+f*Math.sin(u);h===0?t.moveTo(g,k):t.lineTo(g,k)}t.closePath(),t.stroke()}#N(){this.#m??=new IntersectionObserver(([t])=>{this.#p=t.isIntersecting,this.#p&&this.#u&&!this.#l&&!this.#g&&this.#A()}),this.#m.observe(this)}#$(){this.#d??=new ResizeObserver(()=>{this.#C(),this.#l||this.#E()}),this.#d.observe(this.#t)}#_(){let t=window.matchMedia("(prefers-reduced-motion: reduce)");this.listen(t,"change",e=>{this.#g=e.matches,this.#g?(this.#R(),this.#E()):this.#u&&this.#p&&!this.#l&&this.#A()})}};p("audio-visualizer",$t);var oi=[.5,.75,1,1.25,1.5,2],ks=3e3,jt=class extends m{#t=null;#e=null;#i=!1;#s=null;#n=null;#r=null;#o=null;#a=null;#h=null;#c=null;#l=null;#m=null;#d=null;#p=null;#u=null;#g=null;#v=null;#f=null;#w=2;#y=null;#b=null;setup(){if(this.#t=this.querySelector("video"),!this.#t)return!1;this.#e=this.querySelector(".track-list"),this.#t.removeAttribute("controls");let t=!this.shadowRoot;return this.#k(),t&&(this.#x(),this.#A(),this.#S(),this.#R()),this.hasAttribute("muted")&&(this.#t.muted=!0,this.setAttribute("muted","")),this.hasAttribute("autoplay")&&this.#t.play().catch(()=>{}),this.#C(),this.#y=()=>{let e=this.shadowRoot?.querySelector(".player");e&&(e.style.display="none",e.offsetHeight,e.style.display="")},this.listen(window,"vb:theme-change",this.#y),this.#b=()=>{let e=!!document.fullscreenElement;this.toggleAttribute("data-fullscreen",e),this.#u.setAttribute("aria-label",e?"Exit fullscreen":"Fullscreen"),this.#B("video-player:fullscreen",{active:e})},this.listen(document,"fullscreenchange",this.#b),this.setAttribute("state","idle"),!0}teardown(){this.#t&&this.#t.setAttribute("controls",""),this.#f!=null&&clearTimeout(this.#f)}get src(){return this.#t?.getAttribute("src")||this.#t?.currentSrc||""}set src(t){if(!this.#t)return;let e=t==null?"":String(t);this.#t.getAttribute("src")!==e&&(this.#t.setAttribute("src",e),this.#t.load?.(),this.dispatchEvent(new CustomEvent("video-player:src-changed",{detail:{src:e,source:"property"},bubbles:!0})))}get currentTime(){return this.#t?.currentTime??0}set currentTime(t){this.#t&&(this.#t.currentTime=Number(t)||0)}#k(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
368
- <style>${this.#L()}</style>
367
+ `,this.#t=t.querySelector("canvas"),this.#e=this.#t.getContext("2d")}#y(){let t=getComputedStyle(this);this.#c=t.getPropertyValue("--_color").trim()||he,this.#h=t.getPropertyValue("--_bg").trim()}#g(){let t=this.getAttribute("for"),e=t?document.getElementById(t):null,i=e?.tagName==="AUDIO"?e:null;if(this.#i&&this.#i!==i&&(this.#S(),this.#b(),this.#s=null,this.#r=null,this.#f=!1,this.getAttribute("data-state")!==null&&this.removeAttribute("data-state"),this.#L()),this.#i=i,!i){this.#w?.removeEventListener("play",this.#m),this.#w=null;return}this.#f||(this.#w!==i&&(this.#w?.removeEventListener("play",this.#m),i.addEventListener("play",this.#m),this.#w=i),i.paused||this.#T())}#b(){if(this.#r&&this.#s)try{this.#r.disconnect(this.#s)}catch{}}#T(){if(this.#f||!this.#i)return;let t=this.#i;if(!Rt.has(t)&&Jr(t)){this.setAttribute("data-state","cross-origin"),Xi.has(t)||(Xi.add(t),console.warn('<audio-visualizer>: not visualising a cross-origin <audio> without crossorigin="anonymous" and CORS headers \u2014 hooking it would mute playback.',t));return}let e=Yr();if(!e)return;let i,s;try{i=e.createAnalyser(),i.fftSize=Yi(this.getAttribute("data-fft-size")),i.smoothingTimeConstant=.8,s=Xr(t,e),s.connect(i)}catch(n){this.setAttribute("data-state","error"),console.warn("<audio-visualizer>: could not connect to the audio element.",n);return}this.#s=i,this.#r=s,this.#A(),this.#f=!0,this.getAttribute("data-state")!==null&&this.removeAttribute("data-state"),this.#w?.removeEventListener("play",this.#m),this.#w=null,e.state==="suspended"&&e.resume().catch(()=>{}),this.#x()}#A(){this.#s&&(this.#n.length!==this.#s.frequencyBinCount&&(this.#n=new Uint8Array(this.#s.frequencyBinCount)),this.#a.length!==this.#s.fftSize&&(this.#a=new Uint8Array(this.#s.fftSize)))}#x(){if(this.#o)return;if(this.#k){this.#L();return}let t=()=>{if(!this.#d||this.#k){this.#o=null;return}this.#o=requestAnimationFrame(t),this.#L()};this.#o=requestAnimationFrame(t)}#S(){this.#o&&(cancelAnimationFrame(this.#o),this.#o=null)}#E(){let t=window.devicePixelRatio||1,e=Math.round(this.#t.clientWidth*t),i=Math.round(this.#t.clientHeight*t);this.#t.width!==e&&(this.#t.width=e),this.#t.height!==i&&(this.#t.height=i)}#L(){let t=this.#e;if(!t)return;let e=this.#t.width,i=this.#t.height;if(!e||!i)return;t.clearRect(0,0,e,i),this.#h&&this.#h!=="transparent"&&(t.fillStyle=this.#h,t.fillRect(0,0,e,i));let s=this.#f?this.#s:null,n=this.#l;if(n==="waveform"){s&&s.getByteTimeDomainData(this.#a),this.#$(t,e,i,this.#c,s?this.#a:Qr);return}s&&s.getByteFrequencyData(this.#n);let o=s?this.#n:tn;n==="circle"?this.#P(t,e,i,this.#c,o):this.#C(t,e,i,this.#c,o)}#C(t,e,i,s,n){let o=Math.min(n.length,64),a=e/o,l=Math.max(1,a-1),c=Math.max(1,Math.round(i*.03));t.fillStyle=s;for(let h=0;h<o;h++){let u=Math.max(c,n[h]/255*i);t.fillRect(h*a,i-u,l,u)}}#$(t,e,i,s,n){let o=e/Math.max(1,n.length-1);t.strokeStyle=s,t.lineWidth=2*(window.devicePixelRatio||1),t.beginPath();for(let a=0;a<n.length;a++){let l=n[a]/255*i;a===0?t.moveTo(0,l):t.lineTo(a*o,l)}t.stroke()}#P(t,e,i,s,n){let o=e/2,a=i/2,l=Math.min(e,i)*.25,c=n.length;t.strokeStyle=s,t.lineWidth=2*(window.devicePixelRatio||1),t.beginPath();for(let h=0;h<c;h++){let u=h/c*Math.PI*2,p=n[h]/255*(l*.8),d=l+p,f=o+d*Math.cos(u),m=a+d*Math.sin(u);h===0?t.moveTo(f,m):t.lineTo(f,m)}t.closePath(),t.stroke()}#N(){this.#u??=new IntersectionObserver(([t])=>{this.#d=t.isIntersecting,this.#d&&this.#f&&!this.#o&&!this.#k&&this.#x()}),this.#u.observe(this)}#I(){this.#p??=new ResizeObserver(()=>{this.#E(),this.#o||this.#L()}),this.#p.observe(this.#t)}#M(){let t=window.matchMedia("(prefers-reduced-motion: reduce)");this.listen(t,"change",e=>{this.#k=e.matches,this.#k?(this.#S(),this.#L()):this.#f&&this.#d&&!this.#o&&this.#x()})}};g("audio-visualizer",ue);function Zi(r){return en(r&&r.closest("[lang]")?.lang||document.documentElement.lang||navigator.language||"en")}function en(r,t="en-US"){try{if(r)return Intl.getCanonicalLocales(r),r}catch{}try{return Intl.getCanonicalLocales(t),t}catch{return"en-US"}}var de=[.5,.75,1,1.25,1.5,2],Qi=3e3,_t=10,sn=5,rn='input, button, a[href], summary, select, textarea, video[controls], [contenteditable]:not([contenteditable="false"])',nn={player:"Video player",controls:"Video controls","play-video":"Play video",play:"Play",pause:"Pause",seek:"Seek","skip-back":"Skip back 10 seconds","skip-forward":"Skip forward 10 seconds",mute:"Mute",volume:"Volume",speed:"Playback speed {rate}",captions:"Captions",fullscreen:"Fullscreen","exit-fullscreen":"Exit fullscreen",playing:"Playing",paused:"Paused",ended:"Ended",buffering:"Buffering","time-of":"{current} of {duration}"},pe=class extends b{#t=null;#e=null;#i=!1;#s=null;#r=null;#n=null;#a=null;#c=null;#h=null;#l=null;#o=null;#u=null;#p=null;#d=null;#f=null;#k=null;#w=null;#m=null;#v=2;#y=null;#g=null;#b=null;#T=!1;#A="en";#x=null;#S=null;setup(){if(this.#t=this.querySelector("video"),!this.#t)return!1;this.#e=this.querySelector(".track-list"),this.#t.removeAttribute("controls"),this.#E(),this.#$(),this.#M(),this.#z(),this.#K(),this.#B(),this.#P(),this.#L(),this.hasAttribute("muted")&&(this.#t.muted=!0),this.#G(),!this.#e&&this.hasAttribute("loop")&&(this.#t.loop=!0),this.#T||(this.#T=!0,globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches?this.#t.autoplay&&(this.#t.autoplay=!1,this.#t.pause()):this.hasAttribute("autoplay")&&this.#t.play().catch(()=>{})),this.#_(),this.#y=()=>{let e=this.shadowRoot?.querySelector(".player");e&&(e.style.display="none",e.offsetHeight,e.style.display="")},this.listen(window,"vb:theme-change",this.#y),this.#g=()=>{let e=this.#Q();e!==this.hasAttribute("data-fullscreen")&&(this.#rt(e),this.#f.setAttribute("aria-label",this.#C(e?"exit-fullscreen":"fullscreen")),this.#V("video-player:fullscreen",{active:e}))},this.listen(document,"fullscreenchange",this.#g),this.#rt(this.#Q());let t=this.#tt();return t&&this.hasAttribute("captions")&&(t.mode="showing"),this.#st(),this.listen(this.#t.textTracks,"change",()=>this.#st()),this.#i=!this.#t.paused&&!this.#t.ended,this.#R(this.#t.ended?"ended":this.#i?"playing":this.#t.currentTime>0?"paused":"idle"),this.#r.setAttribute("aria-label",this.#C(this.#i?"pause":"play")),this.#Z(),this.#q(),!0}teardown(){this.#t&&this.#t.setAttribute("controls",""),this.#m!=null&&clearTimeout(this.#m),this.#m=null}get src(){return this.#t?.getAttribute("src")||this.#t?.currentSrc||""}set src(t){if(!this.#t)return;let e=t==null?"":String(t);this.#t.getAttribute("src")!==e&&(this.#t.setAttribute("src",e),this.#t.load?.(),this.#V("video-player:src-changed",{src:e,source:"property"}))}get currentTime(){return this.#t?.currentTime??0}set currentTime(t){this.#t&&(this.#t.currentTime=Number(t)||0)}#E(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
368
+ <style>${this.#I()}</style>
369
369
  <div part="player" class="player">
370
370
  <slot></slot>
371
371
  <button part="play-overlay" class="play-overlay" type="button" aria-label="Play video">
@@ -384,7 +384,7 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
384
384
  <div class="timeline-wrap">
385
385
  <input part="timeline" type="range" class="timeline"
386
386
  min="0" max="100" value="0" step="0.1"
387
- aria-label="Seek">
387
+ aria-label="Seek" aria-valuetext="0:00 of 0:00">
388
388
  <div class="timeline-buffer"></div>
389
389
  <div class="timeline-fill"></div>
390
390
  </div>
@@ -410,7 +410,7 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
410
410
  </svg>
411
411
  </button>
412
412
  <div class="volume-wrap">
413
- <button class="mute-btn" type="button" aria-label="Mute">
413
+ <button part="mute-button" class="mute-btn" type="button" aria-label="Mute" aria-pressed="false">
414
414
  <svg class="icon-vol" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" width="18" height="18">
415
415
  <path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/>
416
416
  </svg>
@@ -419,8 +419,8 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
419
419
  </svg>
420
420
  </button>
421
421
  <input part="volume" type="range" class="volume"
422
- min="0" max="1" value="1" step="0.01"
423
- aria-label="Volume">
422
+ min="0" max="1" value="1" step="0.05"
423
+ aria-label="Volume" aria-valuetext="100%">
424
424
  </div>
425
425
  <span part="time-display" class="time-display">
426
426
  <time class="current-time">0:00</time>
@@ -448,11 +448,10 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
448
448
  </div>
449
449
  <div class="sr-status" role="status" aria-live="polite"></div>
450
450
  </div>
451
- `,this.#s=t.querySelector(".controls"),this.#n=t.querySelector(".play-btn"),this.#r=t.querySelector(".play-overlay"),this.#o=t.querySelector(".timeline"),this.#a=t.querySelector(".timeline-fill"),this.#h=t.querySelector(".timeline-buffer"),this.#c=t.querySelector(".volume"),this.#l=t.querySelector(".current-time"),this.#m=t.querySelector(".duration"),this.#d=t.querySelector(".speed-btn"),this.#p=t.querySelector(".captions-btn"),this.#u=t.querySelector(".fullscreen-btn"),this.#g=t.querySelector(".buffer-indicator"),this.#v=t.querySelector(".sr-status"),this.#t.querySelector('track[kind="captions"], track[kind="subtitles"]')||(this.#p.hidden=!0)}#L(){return`
451
+ `,this.#s=t.querySelector(".controls"),this.#r=t.querySelector(".play-btn"),this.#n=t.querySelector(".play-overlay"),this.#a=t.querySelector(".timeline"),this.#c=t.querySelector(".timeline-fill"),this.#h=t.querySelector(".timeline-buffer"),this.#l=t.querySelector(".volume"),this.#o=t.querySelector(".current-time"),this.#u=t.querySelector(".duration"),this.#p=t.querySelector(".speed-btn"),this.#d=t.querySelector(".captions-btn"),this.#f=t.querySelector(".fullscreen-btn"),this.#k=t.querySelector(".buffer-indicator"),this.#w=t.querySelector(".sr-status"),this.#b=t.querySelector(".mute-btn")}#L(){let t=this.#t.querySelector('track[kind="captions"], track[kind="subtitles"]');this.#d.hidden=!t}#C(t,e={}){let i=this.getAttribute(`data-label-${t}`)??nn[t]??t;for(let[s,n]of Object.entries(e))i=i.replaceAll(`{${s}}`,n);return i}#$(){this.#A=Zi(this);try{this.#x=new Intl.NumberFormat(this.#A,{useGrouping:!1})}catch{this.#x=new Intl.NumberFormat("en",{useGrouping:!1})}let t=Intl.DurationFormat;try{this.#S=t?new t(this.#A,{style:"digital",hoursDisplay:"auto"}):null}catch{this.#S=null}}#P(){let t=this.shadowRoot,e=(i,s)=>t.querySelector(i)?.setAttribute("aria-label",this.#C(s));e(".controls","controls"),e(".play-overlay","play-video"),e(".timeline","seek"),e(".skip-back-btn","skip-back"),e(".skip-forward-btn","skip-forward"),e(".mute-btn","mute"),e(".volume","volume"),e(".captions-btn","captions"),this.#f.setAttribute("aria-label",this.#C(this.#Q()?"exit-fullscreen":"fullscreen")),this.#N(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","group"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label",this.#C("player")),this.hasAttribute("aria-keyshortcuts")||this.setAttribute("aria-keyshortcuts","Space K ArrowLeft ArrowRight ArrowUp ArrowDown M F C")}#N(){let t=de[this.#v],e=`${this.#x?.format(t)??t}x`,i=this.#p.querySelector("span");i.textContent=e,this.#p.setAttribute("aria-label",this.#C("speed",{rate:e}))}#I(){return`
452
452
  :host {
453
453
  display: block;
454
454
  --_accent: var(--video-player-accent, var(--color-primary, oklch(55% 0.2 260)));
455
- --_controls-bg: var(--video-player-controls-bg, oklch(0% 0 0 / 0.75));
456
455
  --_controls-text: var(--video-player-controls-text, #fff);
457
456
  --_radius: var(--video-player-radius, var(--radius-m, 0.5rem));
458
457
  --_border: var(--video-player-border, none);
@@ -574,7 +573,11 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
574
573
  }
575
574
 
576
575
  /* \u2500\u2500 Controls overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
576
+ /* Media transport controls stay left-to-right in RTL pages (the
577
+ timeline runs start\u2192end of the media, like every platform player);
578
+ the fill/buffer bars and the volume gradient rely on this. */
577
579
  .controls {
580
+ direction: ltr;
578
581
  position: absolute;
579
582
  bottom: 0;
580
583
  left: 0;
@@ -840,6 +843,61 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
840
843
  border: 0;
841
844
  }
842
845
 
846
+ /* \u2500\u2500 Forced colors \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
847
+ /* Background-only bars vanish under forced colors (backgrounds become
848
+ Canvas). Paint progress with system colours and outline the tracks. */
849
+ @media (forced-colors: active) {
850
+ .timeline-fill {
851
+ forced-color-adjust: none;
852
+ background: Highlight;
853
+ }
854
+
855
+ .timeline-buffer {
856
+ forced-color-adjust: none;
857
+ background: GrayText;
858
+ }
859
+
860
+ .timeline::-webkit-slider-runnable-track {
861
+ border: 1px solid CanvasText;
862
+ }
863
+
864
+ .timeline::-moz-range-track {
865
+ border: 1px solid CanvasText;
866
+ }
867
+
868
+ .volume {
869
+ forced-color-adjust: none;
870
+ }
871
+
872
+ .volume::-webkit-slider-runnable-track {
873
+ border: 1px solid CanvasText;
874
+ background: linear-gradient(to right,
875
+ Highlight calc(var(--_vol, 1) * 100%),
876
+ Canvas calc(var(--_vol, 1) * 100%));
877
+ }
878
+
879
+ .volume::-moz-range-track {
880
+ border: 1px solid CanvasText;
881
+ background: Canvas;
882
+ }
883
+
884
+ .volume::-moz-range-progress {
885
+ background: Highlight;
886
+ }
887
+
888
+ .volume::-webkit-slider-thumb {
889
+ background: CanvasText;
890
+ }
891
+
892
+ .volume::-moz-range-thumb {
893
+ background: CanvasText;
894
+ }
895
+
896
+ .play-overlay svg {
897
+ border: 1px solid CanvasText;
898
+ }
899
+ }
900
+
843
901
  /* \u2500\u2500 Reduced motion \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
844
902
  @media (prefers-reduced-motion: reduce) {
845
903
  .play-overlay svg,
@@ -874,7 +932,7 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
874
932
  cursor: auto;
875
933
  }
876
934
  }
877
- `}#x(){this.#t.addEventListener("timeupdate",()=>this.#$()),this.#t.addEventListener("loadedmetadata",()=>this.#_()),this.#t.addEventListener("progress",()=>this.#j()),this.#t.addEventListener("play",()=>{this.#i=!0,this.setAttribute("state","playing"),this.#n.setAttribute("aria-label","Pause"),this.#q("Playing"),this.#B("video-player:play",{currentTime:this.#t.currentTime,src:this.#t.currentSrc})}),this.#t.addEventListener("pause",()=>{this.#i=!1,this.setAttribute("state","paused"),this.#n.setAttribute("aria-label","Play"),this.#C(),this.#q("Paused"),this.#B("video-player:pause",{currentTime:this.#t.currentTime})}),this.#t.addEventListener("ended",()=>{this.#i=!1,this.setAttribute("state","ended"),this.#n.setAttribute("aria-label","Play"),this.#C();let t=this.#e?.querySelector("li[data-video-active]");t&&t.setAttribute("data-video-played",""),this.#e&&this.#N(),this.#q("Ended"),this.#B("video-player:ended",{src:this.#t.currentSrc})}),this.#t.addEventListener("waiting",()=>{this.#i&&(this.setAttribute("state","buffering"),this.#q("Buffering"))}),this.#t.addEventListener("playing",()=>{this.getAttribute("state")==="buffering"&&this.setAttribute("state","playing")})}#A(){this.#r.addEventListener("click",n=>{n.stopPropagation(),this.#t.play().catch(()=>{})}),(this.shadowRoot?.querySelector(".player")).addEventListener("click",n=>{n.target.closest(".controls")||n.target.closest(".play-overlay")||(this.#i?this.#t.pause():this.#t.play().catch(()=>{}))}),this.#n.addEventListener("click",()=>{this.#i?this.#t.pause():this.#t.play().catch(()=>{})}),this.#o.addEventListener("input",()=>{this.#t.duration&&(this.#t.currentTime=Number(this.#o.value)/100*this.#t.duration)}),(this.shadowRoot?.querySelector(".skip-back-btn")).addEventListener("click",()=>{this.#t.currentTime=Math.max(0,this.#t.currentTime-10)}),(this.shadowRoot?.querySelector(".skip-forward-btn")).addEventListener("click",()=>{this.#t.currentTime=Math.min(this.#t.duration||0,this.#t.currentTime+10)}),this.#c.addEventListener("input",()=>{this.#t.volume=Number(this.#c.value),this.#t.muted=!1,this.removeAttribute("muted"),this.#c.style.setProperty("--_vol",this.#c.value)}),(this.shadowRoot?.querySelector(".mute-btn")).addEventListener("click",()=>{this.#t.muted=!this.#t.muted,this.toggleAttribute("muted",this.#t.muted),this.#c.style.setProperty("--_vol",this.#t.muted?"0":this.#c.value)}),this.#d.addEventListener("click",()=>{this.#w=(this.#w+1)%oi.length;let n=oi[this.#w];this.#t.playbackRate=n;let o=this.#d.querySelector("span");o.textContent=`${n}x`,this.#d.setAttribute("aria-label",`Playback speed ${n}x`),this.#B("video-player:speed",{rate:n})}),this.#p.addEventListener("click",()=>{let n=this.#F();if(!n)return;let o=n.mode==="showing";n.mode=o?"hidden":"showing";let a=!o;this.toggleAttribute("captions",a),this.#p.setAttribute("aria-pressed",String(a)),this.#B("video-player:captions",{active:a,label:n.label})}),this.#u.addEventListener("click",()=>this.#P()),this.addEventListener("keydown",n=>this.#H(n)),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}#R(){let t=this.shadowRoot?.querySelector(".player"),e=()=>{this.#C(),this.#f!=null&&clearTimeout(this.#f),this.#i&&(this.#f=setTimeout(()=>this.#E(),ks))};t.addEventListener("mousemove",e),t.addEventListener("mouseenter",e),t.addEventListener("mouseleave",()=>{this.#i&&(this.#f!=null&&clearTimeout(this.#f),this.#f=setTimeout(()=>this.#E(),500))}),t.addEventListener("touchstart",()=>{this.hasAttribute("controls")?this.#E():e()},{passive:!0}),this.#s.addEventListener("mouseenter",()=>{this.#f!=null&&clearTimeout(this.#f),this.#C()}),this.#s.addEventListener("focusin",()=>{this.#f!=null&&clearTimeout(this.#f),this.#C()})}#C(){this.setAttribute("controls","")}#E(){this.removeAttribute("controls")}#S(){this.#e&&this.#e.addEventListener("click",t=>{let e=t.target.closest("a[href]");e&&(t.preventDefault(),this.#M(e.href,e.closest("li"),e))})}#M(t,e,i){this.#e.querySelectorAll("li").forEach(a=>a.removeAttribute("data-video-active")),e&&e.setAttribute("data-video-active",""),this.#t.src=t;let n=i?.getAttribute("data-poster");n&&(this.#t.poster=n);let o=i?.getAttribute("data-captions");this.#T(o),this.#t.play().catch(()=>{}),this.#B("video-player:track-change",{src:t,title:i?.textContent??""})}#T(t){if(this.#t.querySelectorAll("track[data-dynamic]").forEach(s=>s.remove()),t){let s=document.createElement("track");s.kind="captions",s.src=t,s.default=!0,s.setAttribute("data-dynamic",""),this.#t.appendChild(s),this.hasAttribute("captions")&&(s.track.mode="showing")}let i=this.#t.querySelector('track[kind="captions"], track[kind="subtitles"]');this.#p.hidden=!i}#N(){if(!this.#e)return;let t=[...this.#e.querySelectorAll("li")],e=t.findIndex(s=>s.hasAttribute("data-video-active"));if(this.hasAttribute("shuffle")){let s=t.filter((n,o)=>o!==e);if(s.length){let n=s[Math.floor(Math.random()*s.length)],o=n.querySelector("a[href]");o&&this.#M(o.href,n,o)}return}let i=e+1;if(i<t.length){let s=t[i].querySelector("a[href]");s&&this.#M(s.href,t[i],s)}else if(this.hasAttribute("loop")){let s=t[0]?.querySelector("a[href]");s&&this.#M(s.href,t[0],s)}}#$(){let t=this.#t.currentTime,e=this.#t.duration||0,i=e?t/e*100:0;this.#l.textContent=this.#D(t),this.#o.value=String(i),this.#o.setAttribute("aria-valuetext",this.#O(t)),this.#a.style.width=`${i}%`}#_(){let t=this.#t.duration||0;this.#m.textContent=this.#D(t)}#j(){let t=this.#t.buffered,e=this.#t.duration||0;if(t.length>0&&e){let i=t.end(t.length-1);this.#h.style.width=`${i/e*100}%`}}#P(){document.fullscreenElement?document.exitFullscreen():this.requestFullscreen().catch(()=>{this.#t.requestFullscreen?.().catch(()=>{})})}#F(){let t=this.#t.textTracks;for(let e=0;e<t.length;e++)if(t[e].kind==="captions"||t[e].kind==="subtitles")return t[e];return null}#H(t){if(!(t.target.tagName==="INPUT"||t.target.tagName==="TEXTAREA"))switch(t.key){case" ":case"k":case"K":t.preventDefault(),this.#i?this.#t.pause():this.#t.play().catch(()=>{});break;case"ArrowLeft":t.preventDefault(),this.#t.currentTime=Math.max(0,this.#t.currentTime-10),this.#C();break;case"ArrowRight":t.preventDefault(),this.#t.currentTime=Math.min(this.#t.duration||0,this.#t.currentTime+10),this.#C();break;case"ArrowUp":t.preventDefault(),this.#t.volume=Math.min(1,this.#t.volume+.05),this.#c.value=String(this.#t.volume),this.#c.style.setProperty("--_vol",String(this.#t.volume)),this.#C();break;case"ArrowDown":t.preventDefault(),this.#t.volume=Math.max(0,this.#t.volume-.05),this.#c.value=String(this.#t.volume),this.#c.style.setProperty("--_vol",String(this.#t.volume)),this.#C();break;case"m":case"M":this.#t.muted=!this.#t.muted,this.toggleAttribute("muted",this.#t.muted),this.#c.style.setProperty("--_vol",this.#t.muted?"0":this.#c.value);break;case"f":case"F":this.#P();break;case"c":case"C":this.#p.click();break;case"Escape":document.fullscreenElement&&document.exitFullscreen();break}}#D(t){if(!Number.isFinite(t))return"0:00";let e=Math.floor(t/3600),i=Math.floor(t%3600/60),s=Math.floor(t%60);return e>0?`${e}:${String(i).padStart(2,"0")}:${String(s).padStart(2,"0")}`:`${i}:${String(s).padStart(2,"0")}`}#O(t){if(!Number.isFinite(t))return"0 seconds";let e=Math.floor(t/3600),i=Math.floor(t%3600/60),s=Math.floor(t%60),n=[];return e>0&&n.push(`${e} hour${e!==1?"s":""}`),i>0&&n.push(`${i} minute${i!==1?"s":""}`),n.push(`${s} second${s!==1?"s":""}`),n.join(" ")}#q(t){this.#v&&(this.#v.textContent=t)}#B(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}};p("video-player",jt);var ai=`
935
+ `}#M(){let t=this.#t;this.listen(t,"timeupdate",()=>this.#q()),this.listen(t,"loadedmetadata",()=>{this.#Z(),this.#q()}),this.listen(t,"durationchange",()=>this.#Z()),this.listen(t,"progress",()=>this.#et()),this.listen(t,"volumechange",()=>this.#G()),this.listen(t,"play",()=>{this.#i=!0,this.#R("playing"),this.#r.setAttribute("aria-label",this.#C("pause")),this.#Y(this.#C("playing")),this.#V("video-player:play",{currentTime:t.currentTime,src:t.currentSrc})}),this.listen(t,"pause",()=>{this.#i=!1,t.ended||this.#R("paused"),this.#r.setAttribute("aria-label",this.#C("play")),this.#_(),this.#Y(this.#C("paused")),this.#V("video-player:pause",{currentTime:t.currentTime})}),this.listen(t,"ended",()=>{this.#i=!1,this.#R("ended"),this.#r.setAttribute("aria-label",this.#C("play")),this.#_();let e=this.#e?.querySelector("li[data-video-active]");e&&e.setAttribute("data-video-played",""),this.#e&&this.#H(),this.#Y(this.#C("ended")),this.#V("video-player:ended",{src:t.currentSrc})}),this.listen(t,"waiting",()=>{this.#i&&(this.#R("buffering"),this.#Y(this.#C("buffering")))}),this.listen(t,"playing",()=>{this.getAttribute("state")==="buffering"&&this.#R("playing")})}#R(t){this.setAttribute("state",t),this.#n&&(this.#n.inert=!(t==="idle"||t==="ended"))}#z(){let t=this.shadowRoot,e=()=>{this.#i?this.#t.pause():this.#t.play().catch(()=>{})};this.listen(this.#n,"click",s=>{s.stopPropagation(),this.#t.play().catch(()=>{})});let i=t.querySelector(".player");this.listen(i,"click",s=>{let n=s.target;n.closest(".controls")||n.closest(".play-overlay")||n!==this.#t&&n!==i||e()}),this.listen(this.#r,"click",e),this.listen(this.#a,"input",()=>{this.#t.duration&&(this.#t.currentTime=Number(this.#a.value)/100*this.#t.duration,this.#J())}),this.listen(this.#a,"keydown",s=>{let n=s;if(n.altKey||n.ctrlKey||n.metaKey)return;let o={ArrowLeft:-1,ArrowDown:-1,ArrowRight:1,ArrowUp:1}[n.key];o&&(n.preventDefault(),this.#F(o*sn))}),this.listen(t.querySelector(".skip-back-btn"),"click",()=>this.#F(-_t)),this.listen(t.querySelector(".skip-forward-btn"),"click",()=>this.#F(_t)),this.listen(this.#l,"input",()=>{this.#t.volume=Number(this.#l.value),this.#t.muted=!1,this.#G()}),this.listen(this.#b,"click",()=>{this.#t.muted=!this.#t.muted,this.#G()}),this.listen(this.#p,"click",()=>{this.#v=(this.#v+1)%de.length;let s=de[this.#v];this.#t.playbackRate=s,this.#N(),this.#V("video-player:speed",{rate:s})}),this.listen(this.#d,"click",()=>{let s=this.#tt();if(!s)return;let n=s.mode==="showing";s.mode=n?"hidden":"showing";let o=!n;this.toggleAttribute("captions",o),this.#d.setAttribute("aria-pressed",String(o)),this.#V("video-player:captions",{active:o,label:s.label})}),this.listen(this.#f,"click",()=>this.#it()),this.listen(this,"keydown",s=>this.#nt(s))}#D(t){for(let e of t.composedPath()){if(e===this)return!1;if(e instanceof Element&&e.matches(rn))return!0}return!1}#F(t){let e=this.#t.duration||0;this.#t.currentTime=Math.min(e,Math.max(0,this.#t.currentTime+t)),this.#_(),this.#q()}#B(){let t=this.shadowRoot?.querySelector(".player"),e=()=>{this.#_(),this.#O(Qi)};this.listen(t,"mousemove",e),this.listen(t,"mouseenter",e),this.listen(t,"mouseleave",()=>this.#O(500)),this.listen(t,"touchstart",()=>{this.hasAttribute("controls")?this.#j():e()},{passive:!0}),this.listen(this.#s,"mouseenter",()=>{this.#m!=null&&clearTimeout(this.#m),this.#_()}),this.listen(this.#s,"focusin",()=>{this.#m!=null&&clearTimeout(this.#m),this.#_()}),this.listen(this.#s,"focusout",()=>this.#O(Qi))}#O(t){this.#m!=null&&clearTimeout(this.#m),this.#m=null,this.#i&&(this.#m=setTimeout(()=>this.#j(),t))}#_(){this.setAttribute("controls","")}#j(){let t=this.shadowRoot?.activeElement;t&&this.#s?.contains(t)||this.removeAttribute("controls")}#K(){this.#e&&this.listen(this.#e,"click",t=>{let e=t.target.closest("a[href]");e&&(t.preventDefault(),this.#U(e.href,e.closest("li"),e))})}#U(t,e,i){this.#e.querySelectorAll("li").forEach(a=>a.removeAttribute("data-video-active")),e&&e.setAttribute("data-video-active",""),this.#t.src=t;let n=i?.getAttribute("data-poster");n&&(this.#t.poster=n);let o=i?.getAttribute("data-captions");this.#W(o),this.#t.play().catch(()=>{}),this.#V("video-player:track-change",{src:t,title:i?.textContent??""})}#W(t){if(this.#t.querySelectorAll("track[data-dynamic]").forEach(i=>i.remove()),t){let i=document.createElement("track");i.kind="captions",i.src=t,i.default=!0,i.setAttribute("data-dynamic",""),this.#t.appendChild(i),this.hasAttribute("captions")&&(i.track.mode="showing")}this.#L()}#H(){if(!this.#e)return;let t=[...this.#e.querySelectorAll("li")],e=t.findIndex(s=>s.hasAttribute("data-video-active"));if(this.hasAttribute("shuffle")){let s=t.filter((n,o)=>o!==e);if(s.length){let n=s[Math.floor(Math.random()*s.length)],o=n.querySelector("a[href]");o&&this.#U(o.href,n,o)}return}let i=e+1;if(i<t.length){let s=t[i].querySelector("a[href]");s&&this.#U(s.href,t[i],s)}else if(this.hasAttribute("loop")){let s=t[0]?.querySelector("a[href]");s&&this.#U(s.href,t[0],s)}}#q(){let t=this.#t.currentTime,e=this.#t.duration||0,i=e?t/e*100:0;this.#o.textContent=this.#X(t),this.#a.value=String(i),this.#J(),this.#c.style.width=`${i}%`}#J(){this.#a.setAttribute("aria-valuetext",this.#C("time-of",{current:this.#X(this.#t.currentTime),duration:this.#X(this.#t.duration||0)}))}#Z(){let t=this.#t.duration||0;this.#u.textContent=this.#X(t),this.#J()}#et(){let t=this.#t.buffered,e=this.#t.duration||0;if(t.length>0&&e){let i=t.end(t.length-1);this.#h.style.width=`${i/e*100}%`}}#Q(){let t=document.fullscreenElement;return!!t&&(t===this||t===this.#t)}#rt(t){t?this.setAttribute("data-fullscreen",""):this.removeAttribute("data-fullscreen")}#it(){this.#Q()?document.exitFullscreen().catch(()=>{}):this.requestFullscreen().catch(()=>{this.#t.requestFullscreen?.().catch(()=>{})})}#st(){let t=this.#tt();if(!t||!this.#d)return;let e=t.mode==="showing";this.toggleAttribute("captions",e),this.#d.setAttribute("aria-pressed",String(e))}#tt(){let t=this.#t.textTracks;for(let e=0;e<t.length;e++)if(t[e].kind==="captions"||t[e].kind==="subtitles")return t[e];return null}#nt(t){if(!(t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey)&&!this.#D(t))switch(t.key){case" ":case"k":case"K":t.preventDefault(),this.#i?this.#t.pause():this.#t.play().catch(()=>{});break;case"ArrowLeft":t.preventDefault(),this.#F(-_t);break;case"ArrowRight":t.preventDefault(),this.#F(_t);break;case"ArrowUp":t.preventDefault(),this.#t.volume=Math.min(1,this.#t.volume+.05),this.#G(),this.#_();break;case"ArrowDown":t.preventDefault(),this.#t.volume=Math.max(0,this.#t.volume-.05),this.#G(),this.#_();break;case"m":case"M":this.#t.muted=!this.#t.muted,this.#G();break;case"f":case"F":this.#it();break;case"c":case"C":this.#d.click();break}}#G(){if(!this.#t||!this.#b)return;let t=this.#t.muted;this.toggleAttribute("muted",t),this.#b.setAttribute("aria-pressed",String(t));let e=this.#t.volume;this.#l.value=String(e),this.#l.style.setProperty("--_vol",t?"0":String(e));let i;try{i=new Intl.NumberFormat(this.#A,{style:"percent"}).format(e)}catch{i=`${Math.round(e*100)}%`}this.#l.setAttribute("aria-valuetext",i)}#X(t){let e=Number.isFinite(t)&&t>0?Math.floor(t):0,i=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60,o=this.#x??new Intl.NumberFormat("en",{useGrouping:!1});if(this.#S)try{let l=this.#S.formatToParts({hours:i,minutes:s,seconds:n}),c=!0;return l.map(h=>c&&h.type==="integer"?(c=!1,o.format(h.unit==="hour"?i:s)):h.value).join("")}catch{}let a=l=>o.format(l).padStart(2,o.format(0));return i>0?`${o.format(i)}:${a(s)}:${a(n)}`:`${o.format(s)}:${a(n)}`}#Y(t){this.#w&&(this.#w.textContent=t)}#V(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}};g("video-player",pe);var ts=`
878
936
  :host {
879
937
  display: block;
880
938
  position: relative;
@@ -898,23 +956,39 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
898
956
  overflow: hidden;
899
957
  }
900
958
 
901
- /* Tile grid */
959
+ /* Stationary viewport (focus target in interactive mode); the tiles layer
960
+ inside it is translated. Tiles are always physically laid out (a map
961
+ is not mirrored in RTL). */
962
+ [part="viewport"] {
963
+ position: absolute;
964
+ inset: 0;
965
+ overflow: hidden;
966
+ direction: ltr;
967
+ }
968
+
969
+ [part="viewport"]:focus-visible {
970
+ outline: 2px solid var(--color-interactive, var(--color-primary, Highlight));
971
+ outline-offset: -4px;
972
+ }
973
+
902
974
  [part="tiles"] {
903
975
  position: absolute;
904
- display: grid;
905
- grid-template-columns: repeat(3, 256px);
906
- grid-template-rows: repeat(3, 256px);
976
+ top: 0;
977
+ left: 0;
907
978
  }
908
979
 
909
980
  [part="tiles"] img {
981
+ position: absolute;
910
982
  display: block;
911
983
  width: 256px;
912
984
  height: 256px;
985
+ max-width: none;
913
986
  -webkit-user-drag: none;
914
987
  user-select: none;
915
988
  }
916
989
 
917
- /* Marker */
990
+ /* Marker \u2014 fill follows marker-color (validated, set as --_marker-color),
991
+ then --geo-map-marker-color, then the theme's error/danger token. */
918
992
  [part="marker"] {
919
993
  position: absolute;
920
994
  top: 50%;
@@ -922,82 +996,117 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
922
996
  width: var(--geo-map-marker-size, 32px);
923
997
  height: var(--geo-map-marker-size, 32px);
924
998
  transform: translate(-50%, -100%);
925
- filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
999
+ filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.3));
926
1000
  pointer-events: none;
927
1001
  z-index: 2;
928
1002
  }
929
1003
 
1004
+ [part="marker"] svg {
1005
+ display: block;
1006
+ width: 100%;
1007
+ height: 100%;
1008
+ }
1009
+
1010
+ [part="marker"] .pin {
1011
+ fill: var(--_marker-color, var(--geo-map-marker-color, var(--color-error, #c0392b)));
1012
+ }
1013
+
1014
+ [part="marker"] .dot {
1015
+ fill: var(--geo-map-marker-dot-color, #fff);
1016
+ opacity: 0.9;
1017
+ }
1018
+
930
1019
  /* Caption (slot projection). Translucent surface over the map; uses
931
1020
  light-dark() so the pair switches automatically with the page's
932
1021
  resolved color-scheme (driven by VB tokens). */
933
1022
  [part="caption"] {
934
1023
  position: absolute;
935
- bottom: 0;
936
- left: 0;
937
- right: 0;
938
- background: var(--geo-map-caption-bg, light-dark(rgba(255, 255, 255, 0.9), rgba(0, 0, 0, 0.75)));
1024
+ inset-block-end: 0;
1025
+ inset-inline: 0;
1026
+ background: var(--geo-map-caption-bg, light-dark(rgb(255 255 255 / 0.9), rgb(0 0 0 / 0.75)));
939
1027
  color: var(--geo-map-caption-color, var(--color-text, light-dark(#1a1a1a, #e0e0e0)));
940
1028
  padding: var(--geo-map-caption-padding, 0.5rem 0.75rem);
941
1029
  font-size: 0.875rem;
942
- z-index: 3;
1030
+ /* Above the activation overlay so links in the caption stay usable */
1031
+ z-index: 6;
943
1032
  }
944
1033
 
945
- [part="caption"]:empty,
946
- [part="caption"]:not(:has(*)) {
1034
+ [part="container"]:not([data-caption]) [part="caption"] {
947
1035
  display: none;
948
1036
  }
949
1037
 
950
1038
  /* Attribution \u2014 translucent surface over the map; same pattern as caption */
951
1039
  [part="attribution"] {
952
1040
  position: absolute;
953
- bottom: 0;
954
- right: 0;
1041
+ inset-block-end: 0;
1042
+ inset-inline-end: 0;
955
1043
  padding: 2px 5px;
956
1044
  font-size: var(--geo-map-attribution-font-size, 0.625rem);
957
- background: var(--geo-map-attribution-bg, light-dark(rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0.6)));
1045
+ background: var(--geo-map-attribution-bg, light-dark(rgb(255 255 255 / 0.7), rgb(0 0 0 / 0.6)));
958
1046
  color: var(--geo-map-attribution-color, var(--color-text, light-dark(#333, #ddd)));
959
- z-index: 4;
1047
+ z-index: 7;
960
1048
  line-height: 1.4;
961
1049
  }
962
1050
 
1051
+ [part="attribution"][hidden] {
1052
+ display: none;
1053
+ }
1054
+
963
1055
  [part="attribution"] a {
964
1056
  color: inherit;
965
1057
  text-decoration: none;
966
1058
  }
967
1059
 
968
- [part="attribution"] a:hover {
1060
+ [part="attribution"] a:hover,
1061
+ [part="attribution"] a:focus-visible {
969
1062
  text-decoration: underline;
970
1063
  }
971
1064
 
972
1065
  /* When caption is present, shift attribution above it */
973
- :host([data-has-caption]) [part="attribution"] {
974
- bottom: auto;
975
- top: 0;
1066
+ [part="container"][data-caption] [part="attribution"] {
1067
+ inset-block-end: auto;
1068
+ inset-block-start: 0;
976
1069
  }
977
1070
 
978
- /* Overlay \u2014 full surface, appears on hover/focus */
1071
+ /* Overlay \u2014 the whole surface is the activation target; faded in on
1072
+ hover/focus for mouse users, always visible on touch (no hover). */
979
1073
  [part="overlay"] {
980
1074
  position: absolute;
981
1075
  inset: 0;
982
1076
  z-index: 5;
983
1077
  display: flex;
1078
+ flex-direction: column;
1079
+ gap: 0.5rem;
984
1080
  align-items: center;
985
1081
  justify-content: center;
986
- background: var(--geo-map-overlay-bg, rgba(0, 0, 0, 0.35));
1082
+ padding: 3rem 1rem 1rem;
1083
+ text-align: center;
1084
+ background: var(--geo-map-overlay-bg, rgb(0 0 0 / 0.35));
987
1085
  color: var(--geo-map-overlay-color, var(--color-text-inverted, #fff));
1086
+ cursor: pointer;
988
1087
  opacity: 0;
989
1088
  transition: opacity 0.2s ease;
990
1089
  }
991
1090
 
992
1091
  [part="overlay"]:hover,
993
- [part="overlay"]:focus-within {
1092
+ [part="overlay"]:focus-within,
1093
+ [part="container"][data-consent] [part="overlay"] {
994
1094
  opacity: 1;
995
1095
  }
996
1096
 
997
- /* Activate button inside overlay */
1097
+ @media (hover: none) {
1098
+ [part="overlay"] {
1099
+ opacity: 1;
1100
+ background: transparent;
1101
+ }
1102
+
1103
+ }
1104
+
998
1105
  [part="activate"] {
999
- background: none;
1106
+ background: var(--geo-map-activate-bg, rgb(0 0 0 / 0.6));
1000
1107
  border: none;
1108
+ border-radius: 999px;
1109
+ padding: 0.5rem 1rem;
1001
1110
  color: inherit;
1002
1111
  font: inherit;
1003
1112
  font-size: 0.875rem;
@@ -1006,32 +1115,104 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
1006
1115
  }
1007
1116
 
1008
1117
  [part="activate"]:focus-visible {
1009
- outline: 2px solid var(--color-text-inverted, #fff);
1118
+ outline: 2px solid currentColor;
1010
1119
  outline-offset: 4px;
1011
1120
  }
1012
1121
 
1013
- /* Interactive mode \u2014 tiles become absolutely positioned for panning */
1014
- :host([data-interactive-active]) [part="tiles"] {
1015
- display: block;
1016
- cursor: grab;
1017
- touch-action: none;
1122
+ [part="consent-note"] {
1123
+ margin: 0;
1124
+ font-size: 0.75rem;
1125
+ }
1126
+
1127
+ /* Consent placeholder \u2014 no tiles yet; keep the overlay readable */
1128
+ [part="container"][data-consent] [part="overlay"] {
1129
+ background: var(--geo-map-consent-bg, light-dark(rgb(255 255 255 / 0.6), rgb(0 0 0 / 0.5)));
1130
+ color: var(--geo-map-consent-color, var(--color-text, light-dark(#1a1a1a, #e0e0e0)));
1018
1131
  }
1019
1132
 
1020
- :host([data-interactive-active]) [part="tiles"] img {
1133
+ [part="container"][data-consent] [part="activate"] {
1134
+ background: var(--color-interactive, var(--color-primary, #1a5fb4));
1135
+ color: var(--color-text-on-primary, var(--color-text-inverted, #fff));
1136
+ }
1137
+
1138
+ [part="container"][data-consent] [part="marker"] {
1139
+ display: none;
1140
+ }
1141
+
1142
+ [part="container"][data-consent][data-caption] [part="overlay"] {
1143
+ padding-block-end: 4rem;
1144
+ }
1145
+
1146
+ /* On-screen controls (interactive mode) */
1147
+ [part="controls"] {
1021
1148
  position: absolute;
1149
+ inset-block-start: 0.5rem;
1150
+ inset-inline-start: 0.5rem;
1151
+ z-index: 6;
1152
+ display: none;
1153
+ flex-direction: column;
1154
+ gap: 2px;
1155
+ }
1156
+
1157
+ [part="container"][data-active] [part="controls"] {
1158
+ display: flex;
1022
1159
  }
1023
1160
 
1024
- :host([data-interactive-active]) [part="tiles"][data-dragging] {
1161
+ [part~="control"] {
1162
+ min-inline-size: 2.75rem;
1163
+ min-block-size: 2.75rem;
1164
+ display: grid;
1165
+ place-items: center;
1166
+ padding: 0 0.5rem;
1167
+ border: 1px solid var(--color-border, rgb(0 0 0 / 0.2));
1168
+ border-radius: var(--radius-s, 0.25rem);
1169
+ background: var(--color-surface, light-dark(#fff, #1e1e1e));
1170
+ color: var(--color-text, light-dark(#1a1a1a, #e0e0e0));
1171
+ font: inherit;
1172
+ font-size: 1rem;
1173
+ line-height: 1;
1174
+ cursor: pointer;
1175
+ }
1176
+
1177
+ [part~="control"]:hover {
1178
+ background: var(--color-surface-raised, light-dark(#f2f2f2, #2a2a2a));
1179
+ }
1180
+
1181
+ [part~="control"]:focus-visible {
1182
+ outline: 2px solid var(--color-interactive, var(--color-primary, Highlight));
1183
+ outline-offset: 1px;
1184
+ }
1185
+
1186
+ [part~="control"]:disabled {
1187
+ opacity: 0.5;
1188
+ cursor: default;
1189
+ }
1190
+
1191
+ /* Interactive mode */
1192
+ [part="container"][data-active] [part="viewport"] {
1193
+ cursor: grab;
1194
+ touch-action: none;
1195
+ }
1196
+
1197
+ [part="container"][data-active] [part="viewport"][data-dragging] {
1025
1198
  cursor: grabbing;
1026
1199
  }
1027
1200
 
1028
- :host([data-interactive-active]) [part="overlay"] {
1201
+ [part="container"][data-active] [part="overlay"] {
1029
1202
  display: none;
1030
1203
  }
1031
1204
 
1032
- /* Static-only \u2014 hide overlay entirely */
1033
- :host([static-only]) [part="overlay"] {
1034
- display: none;
1205
+ /* Visually hidden live region */
1206
+ [part="status"] {
1207
+ position: absolute;
1208
+ inline-size: 1px;
1209
+ block-size: 1px;
1210
+ margin: -1px;
1211
+ padding: 0;
1212
+ overflow: hidden;
1213
+ clip-path: inset(50%);
1214
+ white-space: nowrap;
1215
+ border: 0;
1035
1216
  }
1036
1217
 
1037
1218
  /* Reduced motion \u2014 disable transitions */
@@ -1058,89 +1239,45 @@ var ps=Object.defineProperty;var Lt=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ye=(r,t)=>{
1058
1239
  text-align: center;
1059
1240
  padding: 1rem;
1060
1241
  }
1061
- `;Pt();function xs(r){return`<svg viewBox="0 0 24 36" fill="none" xmlns="http://www.w3.org/2000/svg">
1062
- <path d="M12 0C5.373 0 0 5.373 0 12c0 9 12 24 12 24s12-15 12-24C24 5.373 18.627 0 12 0z" fill="${r}"/>
1063
- <circle cx="12" cy="12" r="5" fill="white" opacity="0.9"/>
1064
- </svg>`}var It=class extends m{static get observedAttributes(){return["lat","lng","zoom","marker","marker-color","provider","tile-url","interactive","static-only","src","place"]}#t=null;#e=!1;constructor(){super(),this.attachShadow({mode:"open"})}get lat(){return parseFloat(this.getAttribute("lat")??"")}get lng(){return parseFloat(this.getAttribute("lng")??"")}get zoom(){let t=parseInt(this.getAttribute("zoom")??"",10);return t>=1&&t<=19?t:15}get showMarker(){return this.getAttribute("marker")!=="false"}get markerColor(){return this.getAttribute("marker-color")||"#e74c3c"}get provider(){return this.getAttribute("provider")||"osm"}get tileUrl(){return this.getAttribute("tile-url")||""}get interactive(){let t=this.getAttribute("interactive");return t==="eager"||t==="none"?t:"click"}get staticOnly(){return this.hasAttribute("static-only")}#i(){let t=parseFloat(this.getAttribute("lat")??""),e=parseFloat(this.getAttribute("lng")??"");if(!isNaN(t)&&!isNaN(e))return{lat:t,lng:e};let i=this.getAttribute("src");if(i){let a=this.#s(i);if(a)return a}let s=this.querySelector("address[data-lat][data-lng]");if(s){let a=parseFloat(s.dataset.lat??""),l=parseFloat(s.dataset.lng??"");if(!isNaN(a)&&!isNaN(l))return{lat:a,lng:l}}let n=this.getAttribute("place");if(n){let a=this.#n(n);if(a)return a}let o=document.querySelector('meta[name="geo.position"]');if(o){let l=(o.getAttribute("content")||"").split(";");if(l.length===2){let c=parseFloat(l[0]),h=parseFloat(l[1]);if(!isNaN(c)&&!isNaN(h))return{lat:c,lng:h}}}return null}#s(t){let e=document.getElementById(t);if(!e)return null;if(e.tagName==="ADDRESS"&&e.dataset.lat&&e.dataset.lng){let i=parseFloat(e.dataset.lat),s=parseFloat(e.dataset.lng);if(!isNaN(i)&&!isNaN(s))return{lat:i,lng:s}}return e.tagName==="SCRIPT"&&e.type==="application/ld+json"?this.#r(e):null}#n(t){let e=document.querySelectorAll('script[type="application/ld+json"]');for(let i of e)try{let s=JSON.parse(i.textContent);if(s.name===t){let n=s.geo;if(n){let o=parseFloat(n.latitude),a=parseFloat(n.longitude);if(!isNaN(o)&&!isNaN(a))return{lat:o,lng:a}}}}catch{}return null}#r(t){try{let i=JSON.parse(t.textContent).geo;if(i){let s=parseFloat(i.latitude),n=parseFloat(i.longitude);if(!isNaN(s)&&!isNaN(n))return{lat:s,lng:n}}}catch{}return null}setup(){this.render(),this.loadTiles(),this.#o()}attributeChangedCallback(t,e,i){e!==i&&this.isConnected&&(this.#t&&this.#c(),this.render(),this.loadTiles(),this.#o())}teardown(){this.#t&&(this.#t.destroy(),this.#t=null)}get data(){return{lat:isNaN(this.lat)?void 0:this.lat,lng:isNaN(this.lng)?void 0:this.lng,zoom:this.zoom,marker:this.showMarker,markerColor:this.markerColor}}set data(t){if(!t||typeof t!="object")return;let e=this.data;e.lat===t.lat&&e.lng===t.lng&&e.zoom===t.zoom||(t.lat!=null&&this.setAttribute("lat",String(t.lat)),t.lng!=null&&this.setAttribute("lng",String(t.lng)),t.zoom!=null&&this.setAttribute("zoom",String(t.zoom)),t.marker!=null&&this.setAttribute("marker",t.marker?"true":"false"),t.markerColor&&this.setAttribute("marker-color",t.markerColor),this.dispatchEvent(new CustomEvent("geo-map:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0,composed:!0})))}get markers(){let t=this.#i();return t?[{lat:t.lat,lng:t.lng,color:this.markerColor}]:[]}render(){let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN,s=!isNaN(e)&&!isNaN(i);this.children.length>0?this.setAttribute("data-has-caption",""):this.removeAttribute("data-has-caption");let o=s?`Map of ${e.toFixed(4)}, ${i.toFixed(4)}`:"Map",a=this.showMarker&&s?`<div part="marker" aria-hidden="true">${xs(this.markerColor)}</div>`:"",c=s&&this.interactive!=="none"&&!this.staticOnly?'<div part="overlay"><button part="activate" aria-label="Activate interactive map" tabindex="0">Click to interact</button></div>':"";this.shadowRoot.innerHTML=`
1065
- <style>${ai}</style>
1066
- <div part="container">
1067
- <div part="tiles" role="img" aria-label="${o}"></div>
1068
- ${a}
1069
- ${c}
1070
- <div part="caption"><slot></slot></div>
1071
- <div part="attribution">
1072
- <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">&copy; OpenStreetMap</a>
1073
- </div>
1074
- </div>
1075
- `}loadTiles(){let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i)){this.handleError("Missing or invalid lat/lng coordinates");return}let s=this.zoom,n=this.provider,{tileX:o,tileY:a,pixelX:l,pixelY:c}=li(e,i,s),h=this.shadowRoot.querySelector('[part="tiles"]');if(!h)return;h.innerHTML="";let u=this,d=u.offsetWidth||400,f=u.offsetHeight||300,g=Math.round(d/2-256-l),k=Math.round(f/2-256-c);h.style.transform=`translate(${g}px, ${k}px)`;let w=0,_=0,F=9;for(let G=-1;G<=1;G++)for(let W=-1;W<=1;W++){let K=o+W,j=a+G,ds=ot(n,s,K,j,this.tileUrl),P=document.createElement("img");P.src=ds,P.alt="",P.loading="lazy",P.draggable=!1,P.addEventListener("load",()=>{w++,w+_===F&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:s}}))}),P.addEventListener("error",()=>{_++,_===F?this.handleError("Failed to load map tiles"):w+_===F&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:s}}))}),h.appendChild(P)}}#o(){let t=this.shadowRoot.querySelector('[part="overlay"]');if(!t)return;let e=t.querySelector('[part="activate"]');t.addEventListener("mouseenter",()=>this.#a(),{once:!0}),e&&e.addEventListener("focus",()=>this.#a(),{once:!0}),e&&e.addEventListener("click",()=>this.#h()),this.interactive==="eager"&&requestAnimationFrame(()=>this.#h())}#a(){if(this.#e)return;let t=this.tileUrl;if(t)try{let n=new URL(t,location.origin);if(n.origin===location.origin){this.#e=!0;return}this.#e=!0;let o=document.createElement("link");o.rel="preconnect",o.href=n.origin,o.crossOrigin="",document.head.appendChild(o);return}catch{}this.#e=!0;let e=this.provider,i;e==="carto-light"||e==="carto-dark"?i="https://basemaps.cartocdn.com":i="https://tile.openstreetmap.org";let s=document.createElement("link");s.rel="preconnect",s.href=i,s.crossOrigin="",document.head.appendChild(s)}async#h(){if(this.#t)return;let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i))return;let{MapInteraction:s}=await Promise.resolve().then(()=>(ui(),hi));this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.focus(),this.setAttribute("data-interactive-active",""),this.#t=new s({shadow:this.shadowRoot,host:this,lat:e,lng:i,zoom:this.zoom,provider:this.provider,tileUrl:this.tileUrl,onDeactivate:()=>this.#c()}),this.dispatchEvent(new CustomEvent("geo-map:activate",{bubbles:!0,detail:{lat:e,lng:i,zoom:this.zoom}}))}#c(){this.#t&&(this.#t.destroy(),this.#t=null,this.removeAttribute("data-interactive-active"),this.render(),this.loadTiles(),this.#o())}handleError(t){let e=this.shadowRoot.querySelector('[part="container"]');e&&(e.setAttribute("data-state","error"),e.setAttribute("data-error",t)),this.dispatchEvent(new CustomEvent("geo-map:error",{bubbles:!0,detail:{message:t}}))}};p("geo-map",It);var ct=null;async function Ls(){return ct||(ct=await Promise.resolve().then(()=>(Dt(),qt)),ct)}var Ot=8,Ms=150,mi="vb-emoji-recent",zt=class extends m{#t;#e;#i;#s;#n;#r=!1;#o=[];#a=-1;#h=null;#c="";#l=null;#m=!1;#d=null;#p=null;setup(){return this.#u(),!0}async#u(){this.#l=await Ls(),this.#m||(this.#g(),this.#m=!0),this.#t&&this.listen(this.#t,"click",this.#b),this.listen(document,"click",this.#k),this.listen(document,"keydown",this.#L)}teardown(){this.#h&&(clearTimeout(this.#h),this.setState("search-pending",!1))}#g(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.type="button",this.#t.textContent="\u{1F600}",this.#t.setAttribute("data-trigger",""),this.prepend(this.#t)),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-label",this.#t.getAttribute("aria-label")||"Open emoji picker"),this.#v()}#v(){this.#e=document.createElement("div"),this.#e.classList.add("picker"),this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label","Emoji picker"),this.#e.hidden=!0,this.#i=document.createElement("input"),this.#i.type="search",this.#i.placeholder="Search emoji\u2026",this.#i.setAttribute("aria-label","Search emoji"),this.#i.addEventListener("input",this.#x),this.#i.addEventListener("keydown",this.#A),this.#e.appendChild(this.#i),this.#n=document.createElement("nav"),this.#n.classList.add("categories"),this.#n.setAttribute("role","tablist"),this.#n.setAttribute("aria-label","Emoji categories");for(let t of this.#l.EMOJI_GROUPS){let e=document.createElement("button");e.type="button",e.setAttribute("role","tab"),e.setAttribute("aria-selected",t===this.#l.EMOJI_GROUPS[0]?"true":"false"),e.setAttribute("data-group",t),e.setAttribute("aria-label",this.#l.EMOJI_GROUP_LABELS[t]),e.title=this.#l.EMOJI_GROUP_LABELS[t],e.textContent=this.#l.EMOJI_GROUP_ICONS[t],e.addEventListener("click",this.#R),this.#n.appendChild(e)}this.#e.appendChild(this.#n),this.#s=document.createElement("div"),this.#s.classList.add("grid"),this.#s.setAttribute("role","grid"),this.#s.setAttribute("aria-label","Emoji"),this.#s.addEventListener("keydown",this.#C),this.#e.appendChild(this.#s),this.appendChild(this.#e),this.#f()}#f(t=null){this.#s.innerHTML="",this.#o=[],this.#a=-1;let e=this.#N();if(!this.#c&&e.length>0){let s=document.createElement("div");s.classList.add("group-label"),s.textContent="Recently Used",s.setAttribute("data-group-heading","recent"),this.#s.appendChild(s);for(let n of e){let o=this.#l.EMOJI_MAP.get(n);o&&this.#w(o)}}let i=t||null;if(i)if(i.length===0){let s=document.createElement("div");s.classList.add("no-results"),s.textContent="No emoji found",this.#s.appendChild(s)}else for(let s of i)this.#w(s);else for(let s of this.#l.EMOJI_GROUPS){let n=document.createElement("div");n.classList.add("group-label"),n.textContent=this.#l.EMOJI_GROUP_LABELS[s],n.setAttribute("data-group-heading",s),this.#s.appendChild(n);let o=this.#l.getByGroup(s);for(let a of o)this.#w(a)}}#w(t){let e=document.createElement("button");e.type="button",e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e.setAttribute("data-shortcode",t.shortcode),e.title=`${t.name} :${t.shortcode}:`,e.textContent=t.emoji,e.addEventListener("click",this.#E),this.#s.appendChild(e),this.#o.push(e)}#y(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);if(e){if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"){let i=e;this.#d={start:i.selectionStart??i.value.length,end:i.selectionEnd??i.value.length},this.#p=null}else if(e.isContentEditable){let i=window.getSelection();i&&i.rangeCount>0&&(this.#p=i.getRangeAt(0).cloneRange()),this.#d=null}}}#b=t=>{t.stopPropagation(),this.toggle()};#k=t=>{this.#r&&!this.contains(t.target)&&this.close()};#L=t=>{t.key==="Escape"&&this.#r&&(t.preventDefault(),this.close(),this.#t?.focus())};#x=()=>{this.#h&&clearTimeout(this.#h),this.setState("search-pending",!0),this.#h=setTimeout(()=>{if(this.setState("search-pending",!1),this.#c=this.#i.value.trim(),this.#c){let t=this.#l.searchEmoji(this.#c);this.#f(t)}else this.#f()},Ms)};#A=t=>{t.key==="ArrowDown"&&(t.preventDefault(),this.#o.length>0&&this.#S(0))};#R=t=>{let e=t.currentTarget.getAttribute("data-group");for(let s of this.#n.querySelectorAll('[role="tab"]'))s.setAttribute("aria-selected",s===t.currentTarget?"true":"false");this.#c&&(this.#i.value="",this.#c="",this.#f());let i=this.#s.querySelector(`[data-group-heading="${e}"]`);i&&i.scrollIntoView({block:"start",behavior:"smooth"})};#C=t=>{let e=this.#o.length;if(e!==0)switch(t.key){case"ArrowRight":t.preventDefault(),this.#S(this.#a+1);break;case"ArrowLeft":t.preventDefault(),this.#S(this.#a-1);break;case"ArrowDown":t.preventDefault(),this.#S(this.#a+Ot);break;case"ArrowUp":t.preventDefault(),this.#a<Ot?(this.#i.focus(),this.#a=-1):this.#S(this.#a-Ot);break;case"Home":t.preventDefault(),this.#S(0);break;case"End":t.preventDefault(),this.#S(e-1);break;case"Enter":case" ":t.preventDefault(),this.#a>=0&&this.#o[this.#a].click();break;case"Tab":this.close();break}};#E=t=>{let e=t.currentTarget.getAttribute("data-shortcode"),i=this.#l.EMOJI_MAP.get(e);i&&(this.#$(e),this.#M(i),this.dispatchEvent(new CustomEvent("emoji-picker:select",{bubbles:!0,detail:{shortcode:i.shortcode,emoji:i.emoji,name:i.name,keywords:i.keywords}})),this.close(),this.#T())};#S(t){let e=this.#o.length;e!==0&&(t<0&&(t=0),t>=e&&(t=e-1),this.#a=t,this.#o[t].focus())}#M(t){let e=this.getAttribute("for");if(!e)return;let i=document.getElementById(e);if(i){if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"){let s=i,n=this.#d?.start??s.value.length,o=this.#d?.end??n,a=s.value.slice(0,n),l=s.value.slice(o);s.value=a+t.emoji+l;let c=n+t.emoji.length;s.setSelectionRange(c,c),this.#d={start:c,end:c},i.dispatchEvent(new Event("input",{bubbles:!0}))}else if(i.isContentEditable){i.focus();let s=window.getSelection();if(s&&this.#p){s.removeAllRanges(),s.addRange(this.#p);let n=s.getRangeAt(0);n.deleteContents();let o=document.createTextNode(t.emoji);n.insertNode(o),n.setStartAfter(o),n.collapse(!0),s.removeAllRanges(),s.addRange(n),this.#p=n.cloneRange()}else if(s){let n=document.createRange();n.selectNodeContents(i),n.collapse(!1);let o=document.createTextNode(t.emoji);n.insertNode(o),n.setStartAfter(o),n.collapse(!0),s.removeAllRanges(),s.addRange(n)}}}}#T(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);e&&e.focus()}#N(){try{return JSON.parse(localStorage.getItem(mi)||"[]")}catch{return[]}}#$(t){let e=parseInt(this.getAttribute("recent-limit")??"24",10)||24,i=this.#N();i=i.filter(s=>s!==t),i.unshift(t),i.length>e&&(i.length=e);try{localStorage.setItem(mi,JSON.stringify(i))}catch{}}open(){this.#r||(this.#y(),this.#r=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#e.hidden=!1,this.#i.value="",this.#c="",this.#f(),requestAnimationFrame(()=>{this.#i.focus()}),this.dispatchEvent(new CustomEvent("emoji-picker:open",{bubbles:!0})))}close(){this.#r&&(this.#r=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#e.hidden=!0,this.dispatchEvent(new CustomEvent("emoji-picker:close",{bubbles:!0})))}toggle(){this.#r?this.close():this.open()}get isOpen(){return this.#r}};p("emoji-picker",zt);var Ft=class r extends m{#t=null;#e=null;#i=!1;#s=null;setup(){this.setAttribute("role","list"),this.#i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#r(),this.#a(),this.#p(),this.#n()}teardown(){this.#t&&(this.#t.remove(),this.#t=null),r.#A?.source===this&&(r.#A=null)}get draggableChildren(){return[...this.querySelectorAll(':scope > [draggable="true"]')]}get group(){return this.getAttribute("group")||null}get orientation(){return this.getAttribute("orientation")||"vertical"}get sortedOrder(){return this.draggableChildren.map(t=>t.dataset.id)}#n(){for(let t of this.draggableChildren)t.getAttribute("role")||t.setAttribute("role","listitem"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("aria-grabbed")||t.setAttribute("aria-grabbed","false")}#r(){this.#t=document.createElement("div"),this.#t.setAttribute("role","status"),this.#t.setAttribute("aria-live","polite"),this.#t.setAttribute("aria-atomic","true"),this.#t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",this.prepend(this.#t)}#o(t){let e=this.#t;e&&(e.textContent="",requestAnimationFrame(()=>{e.textContent=t}))}#a(){this.listen(this,"pointerdown",t=>{this.#s=t.target}),this.listen(this,"dragstart",this.#h.bind(this)),this.listen(this,"dragover",this.#c.bind(this)),this.listen(this,"dragleave",this.#l.bind(this)),this.listen(this,"drop",this.#m.bind(this)),this.listen(this,"dragend",this.#d.bind(this))}#h(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let i=e.querySelector("[data-drag-handle]");if(i&&!i.contains(this.#s)){t.preventDefault();return}e.setAttribute("data-dragging",""),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.dataset.id||""),t.dataTransfer.setData("application/x-drag-surface-group",this.group||"");let s=this.#w(e);r.#A={item:e,source:this,originalIndex:s},this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}#c(t){let e=r.#A;if(!e||(this.group||e.source.group)&&this.group!==e.source.group)return;t.preventDefault(),t.dataTransfer.dropEffect="move",this.setAttribute("data-drag-over","");let i=this.orientation==="horizontal"?t.clientX:t.clientY;this.#L(i)}#l(t){t.relatedTarget&&!this.contains(t.relatedTarget)&&(this.removeAttribute("data-drag-over"),this.#x())}#m(t){t.preventDefault(),this.removeAttribute("data-drag-over"),this.#x();let e=r.#A;if(!e)return;let{item:i,source:s,originalIndex:n}=e,o=this.orientation==="horizontal"?t.clientX:t.clientY,a=this.#k(o);if(s===this){this.#y(i,a),this.#b();let l=this.#w(i);this.#g(i),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:i,itemId:i.dataset.id,oldIndex:n,newIndex:l,order:this.sortedOrder}}))}else this.#y(i,a),this.#b(),s.#b(),this.#g(i),this.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:i,itemId:i.dataset.id,fromSurface:s,toSurface:this,newIndex:this.#w(i),fromOrder:s.sortedOrder,toOrder:this.sortedOrder}}))}#d(){let t=r.#A;t?.item&&t.item.removeAttribute("data-dragging"),this.removeAttribute("data-drag-over"),this.#x(),r.#A=null,this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0}))}#p(){this.listen(this,"keydown",this.#u.bind(this))}#u(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let i=e.getAttribute("aria-grabbed")==="true",s=this.orientation==="horizontal",n=s?"ArrowLeft":"ArrowUp",o=s?"ArrowRight":"ArrowDown";if(t.key===" "||t.key==="Enter"){if(t.preventDefault(),i){e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#b(),this.#g(e);let c=this.#w(e),h=this.draggableChildren;this.#o(`${this.#f(e)}, dropped at position ${c+1} of ${h.length}`),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,oldIndex:this.#e,newIndex:c,order:this.sortedOrder}})),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null}else{this.#e=this.#w(e),e.setAttribute("aria-grabbed","true"),this.setAttribute("data-reorder-mode","");let c=this.draggableChildren;this.#o(`${this.#f(e)}, grabbed. Position ${this.#e+1} of ${c.length}. Use arrow keys to move, Enter to drop, Escape to cancel.`),this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}return}if(!i&&(t.key===n||t.key===o)){t.preventDefault();let c=this.draggableChildren,h=c.indexOf(e),u=t.key===n?Math.max(0,h-1):Math.min(c.length-1,h+1);u!==h&&c[u].focus();return}if(i&&(t.key===n||t.key===o)){t.preventDefault();let c=this.draggableChildren,h=c.indexOf(e),u=t.key===n?Math.max(0,h-1):Math.min(c.length-1,h+1);u!==h&&(this.#y(e,u),e.focus(),this.#o(`Position ${u+1} of ${c.length}`));return}let a=s?"ArrowUp":"ArrowLeft",l=s?"ArrowDown":"ArrowRight";if(i&&(t.key===a||t.key===l)){if(t.preventDefault(),!this.group)return;let c=t.key===l?1:-1,h=this.#v(c);if(!h)return;h.appendChild(e),h.#b(),this.#b(),h.#g(e),e.focus();let u=h.getAttribute("aria-label")||"next surface";h.#o(`Moved to ${u}`),h.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,fromSurface:this,toSurface:h,newIndex:h.draggableChildren.indexOf(e),fromOrder:this.sortedOrder,toOrder:h.sortedOrder}})),this.removeAttribute("data-reorder-mode"),h.setAttribute("data-reorder-mode",""),this.#e=null;return}if(i&&t.key==="Escape"){t.preventDefault(),e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#e!=null&&(this.#y(e,this.#e),e.focus()),this.#o("Reorder cancelled"),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null;return}!i&&t.key==="Escape"&&(t.preventDefault(),e.blur())}#g(t){t.setAttribute("data-just-dropped",""),t.addEventListener("animationend",()=>{t.removeAttribute("data-just-dropped")},{once:!0}),setTimeout(()=>t.removeAttribute("data-just-dropped"),500)}#v(t){if(!this.group)return null;let e=[...document.querySelectorAll(`drag-surface[group="${this.group}"]`)];if(e.length<2)return null;e.sort((n,o)=>{let a=n.getBoundingClientRect(),l=o.getBoundingClientRect();return a.left-l.left||a.top-l.top});let i=e.indexOf(this);return e[i+t]||null}#f(t){return t.dataset.id||t.textContent.trim().slice(0,40)}#w(t){return this.draggableChildren.indexOf(t)}#y(t,e){let s=this.draggableChildren.filter(n=>n!==t)[e]||null;s?this.insertBefore(t,s):this.appendChild(t)}#b(){this.draggableChildren.forEach((t,e)=>{t.dataset.sortOrder=String(e+1)})}#k(t){let e=this.orientation==="horizontal",i=this.draggableChildren.filter(s=>!s.hasAttribute("data-dragging"));for(let s=0;s<i.length;s++){let n=i[s].getBoundingClientRect(),o=e?n.left+n.width/2:n.top+n.height/2;if(t<o)return s}return i.length}#L(t){this.#x();let e=this.orientation==="horizontal",i=this.draggableChildren.filter(s=>!s.hasAttribute("data-dragging"));for(let s=0;s<i.length;s++){let n=i[s].getBoundingClientRect(),o=e?n.left+n.width/2:n.top+n.height/2;if(t<o){i[s].setAttribute("data-drop-target","before");return}}i.length>0&&i[i.length-1].setAttribute("data-drop-target","after")}#x(){for(let t of this.querySelectorAll("[data-drop-target]"))t.removeAttribute("data-drop-target")}static#A=null};p("drag-surface",Ft);var Ht=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),fi={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}};function ht(r){let t=Ht?fi.mac:fi.other;return r.split("+").map(e=>{let i=e.trim().toLowerCase();return t[i]??i.toUpperCase()}).join(Ht?"":"+")}function gi(r){let t=r.toLowerCase().split("+").map(i=>i.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function bi(r,t){if(r.key.toLowerCase()!==t.key)return!1;let e,i;return Ht?(e=t.meta,i=t.ctrl):(e=!1,i=t.meta||t.ctrl),!(e!==r.metaKey||i!==r.ctrlKey||t.shift!==r.shiftKey||t.alt!==r.altKey)}var Ns=new Set(["INPUT","TEXTAREA","SELECT"]),J=[],vi=!1;function Rs(r){let t=Ns.has(r.target.tagName)||r.target.isContentEditable;for(let e of J)if(!(t&&!e.global)&&bi(r,e.descriptor)){r.preventDefault(),e.callback(r);return}}function $s(){vi||(document.addEventListener("keydown",Rs),vi=!0)}function B(r,t,e={}){$s();let i=gi(r),s={combo:r,descriptor:i,callback:t,global:e.global===!0};return J.find(o=>o.combo===r)&&console.warn(`[hotkey-bind] Shortcut "${r}" already bound. Last-connected-wins.`),J.unshift(s),function(){let a=J.indexOf(s);a!==-1&&J.splice(a,1)}}var js=0,Ut=class extends m{#t=null;#e;#i;#s=[];#n=-1;#r=[];#o=[];#a=[];#h="";#c=0;setup(){this.#h=`cmdp-${++js}`,this.#c=0,this.#l(),this.#d(),this.hasAttribute("discover")&&this.#w()}teardown(){this.#o.forEach(t=>t()),this.#o=[],this.#t?.remove(),this.#t=null,this.#s=[],this.#r=[],this.#a=[],this.#n=-1}get commands(){let t=[];for(let e of this.querySelectorAll("command-group")){let i=e.getAttribute("label")||"";for(let s of e.querySelectorAll("command-item"))t.push({value:s.getAttribute("value")||"",label:s.textContent.trim(),hotkey:s.getAttribute("data-hotkey")||void 0,group:i||void 0})}return t}set commands(t){let e=Array.isArray(t)?t:[],i=new Map;for(let s of e){let n=s.group||"";i.has(n)||i.set(n,[]),i.get(n).push(s)}for(let s of[...this.children])(s.tagName==="COMMAND-GROUP"||s.tagName==="COMMAND-ITEM")&&s.remove();for(let[s,n]of i){let o=document.createElement("command-group");s&&o.setAttribute("label",s);for(let a of n){let l=document.createElement("command-item");if(a.value&&l.setAttribute("value",a.value),a.hotkey&&l.setAttribute("data-hotkey",a.hotkey),a.icon){let c=document.createElement("span");c.setAttribute("slot","icon"),c.innerHTML=a.icon,l.appendChild(c)}l.appendChild(document.createTextNode(a.label||a.value||"")),o.appendChild(l)}this.appendChild(o)}this._reinit(),this.dispatchEvent(new CustomEvent("command-palette:commands-changed",{detail:{commands:e,source:"property"},bubbles:!0}))}#l(){this.#t=document.createElement("dialog"),this.#t.className="command-dialog",this.#t.setAttribute("aria-label",this.getAttribute("label")||"Command palette"),this.#t.addEventListener("click",i=>{i.target===this.#t&&this.close()}),this.#t.addEventListener("close",()=>{this.#e?.setAttribute("aria-expanded","false"),this.#e?.removeAttribute("aria-activedescendant"),this.dispatchEvent(new CustomEvent("command-palette:close",{bubbles:!0}))});let t=document.createElement("div");t.className="command-search",this.#i=document.createElement("div"),this.#i.className="command-list",this.#i.id=`${this.#h}-list`,this.#i.setAttribute("role","listbox"),this.#i.setAttribute("aria-label","Commands"),this.#e=document.createElement("input"),this.#e.type="search",this.#e.placeholder=this.getAttribute("placeholder")||"Type a command...",this.#e.setAttribute("aria-label","Search commands"),this.#e.autocomplete="off",this.#e.setAttribute("role","combobox"),this.#e.setAttribute("aria-autocomplete","list"),this.#e.setAttribute("aria-controls",this.#i.id),this.#e.setAttribute("aria-expanded","false"),this.#e.addEventListener("input",this.#p),this.#e.addEventListener("keydown",this.#u),t.appendChild(this.#e),this.#r=Array.from(this.querySelectorAll("command-group")),this.#r.forEach(i=>{let s=this.#m(i.getAttribute("label")||"");this.#i.appendChild(s),i.querySelectorAll("command-item").forEach(n=>{let o=n.querySelector('[slot="icon"]'),a=this.#k(n.textContent.trim(),o?o.cloneNode(!0):null,n.getAttribute("data-hotkey"));a.dataset.value=n.getAttribute("value")||"",a.addEventListener("click",()=>{this.#f(a.dataset.value)}),s.appendChild(a),this.#s.push({btn:a,group:s,source:n})})});let e=document.createElement("div");e.className="command-empty",e.textContent="No results found.",e.hidden=!0,this.#i.appendChild(e),this.#t.appendChild(t),this.#t.appendChild(this.#i),this.appendChild(this.#t)}#m(t){let e=document.createElement("div");e.className="command-group",e.setAttribute("role","group");let i=document.createElement("div");return i.className="command-group-header",i.id=`${this.#h}-g${++this.#c}`,i.setAttribute("aria-hidden","true"),i.textContent=t,t?e.setAttribute("aria-labelledby",i.id):i.hidden=!0,e.appendChild(i),e}#d(){let t=this.getAttribute("hotkey")||"meta+k";this.#o.push(B(t,()=>{this.#t?.open?this.close():this.open()},{global:!0}));for(let{btn:e,source:i}of this.#s){let s=i?.getAttribute("data-hotkey");if(!s||s.toLowerCase()===t.toLowerCase())continue;let n=e.dataset.value;this.#o.push(B(s,()=>this.#f(n)))}}#p=()=>{let t=this.#e.value.toLowerCase().trim(),e=0,i=new Set;this.#s.forEach(({btn:n,group:o})=>{let a=!t||(n.dataset.searchText??"").includes(t);n.hidden=!a,a&&(e++,i.add(o))}),this.#i.querySelectorAll(":scope > .command-group").forEach(n=>{n.hidden=!i.has(n)});let s=this.#i.querySelector(".command-empty");s&&(s.hidden=e>0),this.#n=-1,this.#s.forEach(({btn:n})=>{n.removeAttribute("data-active"),n.setAttribute("aria-selected","false")}),this.#e.removeAttribute("aria-activedescendant"),e>0&&this.#v(0)};#u=t=>{let e=this.#g();switch(t.key){case"ArrowDown":t.preventDefault(),this.#v(this.#n+1);break;case"ArrowUp":t.preventDefault(),this.#v(this.#n-1);break;case"Enter":t.preventDefault(),this.#n>=0&&e[this.#n]&&e[this.#n].btn.click();break;case"Escape":t.preventDefault(),this.close();break}};#g(){return this.#s.filter(({btn:t})=>!t.hidden)}#v(t){let e=this.#g();if(e.length===0)return;e.forEach(({btn:s})=>{s.removeAttribute("data-active"),s.setAttribute("aria-selected","false")}),t<0&&(t=e.length-1),t>=e.length&&(t=0),this.#n=t;let{btn:i}=e[t];i.setAttribute("data-active",""),i.setAttribute("aria-selected","true"),this.#e.setAttribute("aria-activedescendant",i.id),i.scrollIntoView({block:"nearest"})}#f(t){this.close(),this.dispatchEvent(new CustomEvent("command-palette:select",{bubbles:!0,detail:{value:t}}))}#w(){this.listen(document,"vb:command-registry-change",this.#y)}#y=()=>{this.#t?.open&&(this.#b(),this.#p())};#b(){if(!this.hasAttribute("discover"))return;let{getRegisteredCommands:t,scanAutoDiscoverable:e}=window.__commandRegistry||{};if(!t)return;this.#s=this.#s.filter(n=>!n.discovered),this.#a.forEach(n=>n.remove()),this.#a=[];let i=this.#i.querySelector(".command-empty"),s=t();for(let[n,o]of s){let a=this.#m(n);this.#i.insertBefore(a,i),this.#a.push(a);for(let l of o){if(this.contains(l.element))continue;let c=this.#k(l.label,l.icon,l.shortcut);c.dataset.value=`__discovered:${l.label}`,c.addEventListener("click",()=>{this.close(),l.element.click()}),a.appendChild(c),this.#s.push({btn:c,group:a,source:null,discovered:!0})}}if(this.getAttribute("discover")==="auto"&&e){let n=e(),o=new Map;for(let a of n){let l=o.get(a.group)||[];l.push(a),o.set(a.group,l)}for(let[a,l]of o){let c=this.#m(a);this.#i.insertBefore(c,i),this.#a.push(c);for(let h of l){if(this.contains(h.element))continue;let u=this.#k(h.label,h.icon,h.shortcut);u.dataset.value=`__auto:${h.label}`,u.dataset.auto="",u.addEventListener("click",()=>{this.close(),h.action?h.action():h.element.click()}),c.appendChild(u),this.#s.push({btn:u,group:c,source:null,discovered:!0})}}}}#k(t,e,i){let s=document.createElement("button");if(s.type="button",s.className="command-option",s.id=`${this.#h}-opt-${++this.#c}`,s.setAttribute("role","option"),s.setAttribute("aria-selected","false"),s.tabIndex=-1,s.dataset.searchText=t.toLowerCase(),e){let o=document.createElement("span");if(o.className="command-icon",typeof e=="string"){let a=document.createElement("icon-wc");a.setAttribute("name",e),o.appendChild(a)}else o.appendChild(e);s.appendChild(o)}let n=document.createElement("span");if(n.className="command-label",n.textContent=t,s.appendChild(n),i){let o=document.createElement("kbd");o.className="command-kbd",o.setAttribute("aria-hidden","true"),o.textContent=ht(i),s.appendChild(o),s.setAttribute("aria-keyshortcuts",i)}return s}open(){!this.#t||this.#t.open||(this.#b(),this.#t.showModal(),this.#e.setAttribute("aria-expanded","true"),this.#e.value="",this.#p(),this.#e.focus(),this.dispatchEvent(new CustomEvent("command-palette:open",{bubbles:!0})))}close(){this.#t?.open&&this.#t.close()}get isOpen(){return this.#t?.open??!1}},Vt=class extends HTMLElement{},Gt=class extends HTMLElement{};p("command-palette",Ut);p("command-group",Vt);p("command-item",Gt);var Wt=class extends m{#t;#e=null;setup(){this.#i(),this.#e=B("shift+?",()=>{this.#t.open?this.#t.close():this.#s()})}teardown(){this.#e?.(),this.#e=null,this.#t?.remove(),this.#t=null}get shortcuts(){return this.__shortcuts||null}set shortcuts(t){this.__shortcuts=t&&typeof t=="object"?t:null,this.dispatchEvent(new CustomEvent("short-cuts:shortcuts-changed",{detail:{shortcuts:this.__shortcuts,source:"property"},bubbles:!0}))}#i(){this.#t=document.createElement("dialog"),this.#t.className="shortcut-dialog",this.#t.addEventListener("click",t=>{t.target===this.#t&&this.#t.close()}),this.appendChild(this.#t)}#s(){this.#t.innerHTML="";let t=document.createElement("div");t.className="shortcut-header",t.innerHTML="<h2>Keyboard Shortcuts</h2>",this.#t.appendChild(t);let e=document.createElement("div");e.className="shortcut-body";let{getRegisteredCommands:i}=window.__commandRegistry||{},s=new Map;if(s.set("General",[{label:"Show keyboard shortcuts",shortcut:"shift+?"}]),i)for(let[o,a]of i())for(let l of a){if(!l.shortcut)continue;let c=s.get(o)||[];c.push({label:l.label,shortcut:l.shortcut}),s.set(o,c)}let{getHotkeyActions:n}=window.__hotkeyActionRegistry||{};if(n)for(let[o,a]of n()){let l=s.get(o)||[];for(let c of a)l.push({label:c.label,shortcut:c.shortcut});s.set(o,l)}for(let[o,a]of s){let l=document.createElement("div");l.className="shortcut-group";let c=document.createElement("div");c.className="shortcut-group-header",c.textContent=o,l.appendChild(c);for(let h of a){let u=document.createElement("div");u.className="shortcut-row";let d=document.createElement("span");d.className="shortcut-label",d.textContent=h.label;let f=document.createElement("kbd");f.className="shortcut-kbd",f.textContent=ht(h.shortcut),u.appendChild(d),u.appendChild(f),l.appendChild(u)}e.appendChild(l)}this.#t.appendChild(e),this.#t.showModal()}};p("short-cuts",Wt);var Ps="Comparison slider";function Kt(r){if(r===null||r.trim()==="")return 50;let t=Number(r);return Number.isNaN(t)?50:Math.min(100,Math.max(0,t))}var Xt=class extends m{static observedAttributes=["position","label","aria-label"];#t=null;#e=!1;#i=!1;#s=50;setup(){let t=[...this.children].filter(e=>!e.classList.contains("comparison-divider"));return t.length<2?!1:(t.length>2&&console.warn("[compare-surface] Expected exactly 2 children; extra children are hidden."),this.#t=document.createElement("div"),this.#t.className="comparison-divider",this.#t.setAttribute("role","slider"),this.#t.setAttribute("aria-valuemin","0"),this.#t.setAttribute("aria-valuemax","100"),this.#t.setAttribute("aria-orientation","horizontal"),this.#t.setAttribute("tabindex","0"),this.#n(),this.appendChild(this.#t),this.#m(Kt(this.getAttribute("position"))),this.listen(this.#t,"pointerdown",this.#o),this.listen(this.#t,"pointermove",this.#a),this.listen(this.#t,"pointerup",this.#h),this.listen(this.#t,"pointercancel",this.#h),this.listen(this.#t,"lostpointercapture",this.#h),this.listen(this.#t,"keydown",this.#c),!0)}teardown(){this.#t?.remove(),this.#t=null,this.#e=!1}attributeChangedCallback(t,e,i){if(!(!this.#t||e===i))if(t==="position"){if(this.#i)return;this.#m(Kt(i))}else this.#n()}#n(){if(!this.#t)return;let t=this.getAttribute("label")||this.getAttribute("aria-label")||Ps;this.#t.setAttribute("aria-label",t)}get#r(){return getComputedStyle(this).direction==="rtl"}#o=t=>{t.preventDefault(),this.#e=!0,this.#t?.setPointerCapture(t.pointerId)};#a=t=>{if(!this.#e)return;let e=this.getBoundingClientRect();if(!e.width)return;let i=this.#r?e.right-t.clientX:t.clientX-e.left;this.#l(i/e.width*100)};#h=t=>{this.#e&&(this.#e=!1,this.#t?.hasPointerCapture(t.pointerId)&&this.#t.releasePointerCapture(t.pointerId))};#c=t=>{let e=t.shiftKey?10:1,i=this.#r?-1:1,s=this.#s,n;switch(t.key){case"ArrowRight":n=s+e*i;break;case"ArrowLeft":n=s-e*i;break;case"ArrowUp":n=s+e;break;case"ArrowDown":n=s-e;break;case"PageUp":n=s+10;break;case"PageDown":n=s-10;break;case"Home":n=0;break;case"End":n=100;break;default:return}t.preventDefault(),this.#l(n)};#l(t){let e=this.#s;if(this.#m(Math.min(100,Math.max(0,t))),this.#s!==e){this.#i=!0;try{this.setAttribute("position",String(this.#s))}finally{this.#i=!1}this.dispatchEvent(new CustomEvent("compare-surface:change",{detail:{position:this.#s},bubbles:!0}))}}#m(t){this.#s=Math.round(t),this.style.setProperty("--_position",`${t}%`),this.#t&&(this.#t.setAttribute("aria-valuenow",String(this.#s)),this.#t.setAttribute("aria-valuetext",`${this.#s}%`))}get position(){return this.#t?this.#s:Math.round(Kt(this.getAttribute("position")))}set position(t){let e=Number(t),i=Math.round(Math.min(100,Math.max(0,Number.isNaN(e)?0:e)));this.setAttribute("position",String(i))}};p("compare-surface",Xt);function Bs(){let r=globalThis.localStorage;if(!r)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return r.getItem(t)},async setRaw(t,e){r.setItem(t,e)},async removeRaw(t){r.removeItem(t)},async keys(t){let e=[];for(let i=0;i<r.length;i++){let s=r.key(i);s&&s.startsWith(t)&&e.push(s)}return e}}}var ut="__vbStoreBackend",dt=globalThis;function N(){return dt[ut]||(dt[ut]=Bs()),dt[ut]}function Jt(r,t){if(typeof r!="string"||!r)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${r}:${t}`}function yi(r){if(typeof r!="string"||!r)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${r}:`}function wi(r){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var A={configure(r={}){dt[ut]=r.backend??null},async set(r,t,e){let i={data:e,timestamp:Date.now()};await N().setRaw(Jt(r,t),JSON.stringify(i))},async get(r,t,e){let i=await N().getRaw(Jt(r,t));if(i==null)return null;let s=wi(i);return!s||e?.maxAge!=null&&Date.now()-s.timestamp>e.maxAge?null:s.data},async remove(r,t){await N().removeRaw(Jt(r,t))},async list(r){let t=yi(r),e=await N().keys(t),i=[];for(let s of e){let n=await N().getRaw(s);if(n==null)continue;let o=wi(n);o&&i.push({key:s.slice(t.length),data:o.data,timestamp:o.timestamp})}return i},async clear(r){let t=yi(r),e=await N().keys(t);for(let i of e)await N().removeRaw(i)},async clearAll(){let r=await N().keys("vb:");for(let t of r)await N().removeRaw(t)},async setMany(r,t){for(let[e,i]of t)await A.set(r,e,i)}};if(typeof window<"u"){let r=window.VB??(window.VB={});r.store??=A}var Yt=class extends m{#t;#e;#i;#s=50;#n=!1;#r=50;get#o(){return this.getAttribute("direction")==="vertical"}get#a(){let t=this.getAttribute("min"),e=Number(t);return t!==null&&!isNaN(e)?e:10}get#h(){let t=this.getAttribute("max"),e=Number(t);return t!==null&&!isNaN(e)?e:90}get position(){return this.#s}set position(t){this.#f(Number(t))}get collapsed(){return this.#n}set collapsed(t){t?this.#g():this.#v()}reset(){let t=this.getAttribute("position"),e=Number(t),i=t!==null&&!isNaN(e)?e:50;this.#n=!1,this.#f(i),this.#b()}setup(){let t=[...this.children].filter(e=>!e.classList.contains("split-divider"));return t.length<2?!1:(this.#e=t[0],this.#i=t[1],this.#c(),!0)}async#c(){let t=this.getAttribute("position"),e=Number(t),i=t!==null&&!isNaN(e)?e:null,s=await this.#w(),n=i??s??50;return this.#t=document.createElement("div"),this.#t.className="split-divider",this.#t.setAttribute("role","separator"),this.#t.setAttribute("aria-orientation",this.#o?"vertical":"horizontal"),this.#t.setAttribute("aria-valuenow",String(Math.round(n))),this.#t.setAttribute("aria-valuemin",String(this.#a)),this.#t.setAttribute("aria-valuemax",String(this.#h)),this.#t.setAttribute("aria-label","Resize panels"),this.#t.setAttribute("tabindex","0"),this.insertBefore(this.#t,this.#i),this.#f(n),this.listen(this.#t,"pointerdown",this.#l),this.listen(this.#t,"keydown",this.#p),this.hasAttribute("collapsible")&&this.listen(this.#t,"dblclick",this.#u),!0}teardown(){this.#t&&(this.#t.remove(),this.#t=null)}#l=t=>{t.preventDefault(),this.setState("divider-dragging",!0),this.#t.setPointerCapture(t.pointerId),this.#t.addEventListener("pointermove",this.#m),this.#t.addEventListener("pointerup",this.#d)};#m=t=>{if(!this.matches(":state(divider-dragging)"))return;let e=this.getBoundingClientRect(),i;this.#o?i=(t.clientY-e.top)/e.height*100:i=(t.clientX-e.left)/e.width*100,this.#n&&(this.#n=!1),this.#f(i)};#d=t=>{this.setState("divider-dragging",!1),this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#m),this.#t.removeEventListener("pointerup",this.#d),this.#y()};#p=t=>{let e=t.shiftKey?10:1,i=this.#s,s=this.#o?["ArrowUp"]:["ArrowLeft"],n=this.#o?["ArrowDown"]:["ArrowRight"];s.includes(t.key)?(t.preventDefault(),this.#f(i-e),this.#y()):n.includes(t.key)?(t.preventDefault(),this.#f(i+e),this.#y()):t.key==="Home"?(t.preventDefault(),this.#f(this.#a),this.#y()):t.key==="End"&&(t.preventDefault(),this.#f(this.#h),this.#y())};#u=()=>{this.#n?this.#v():this.#g(),this.#y()};#g(){this.#r=this.#s,this.#n=!0,this.#e.style.flexBasis="0%",this.#e.style.overflow="hidden",this.#t.setAttribute("aria-valuenow","0"),this.#s=0,this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!0},bubbles:!0}))}#v(){this.#n=!1,this.#e.style.overflow="auto",this.#f(this.#r),this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!1},bubbles:!0}))}#f(t){let e=this.#n?0:Math.min(this.#h,Math.max(this.#a,t));this.#s=e,this.#e.style.flexBasis=`${e}%`,this.#e.style.flexGrow="0",this.#e.style.flexShrink="0",this.#e.style.overflow="auto",this.#i.style.flexGrow="1",this.#i.style.overflow="auto",this.#t.setAttribute("aria-valuenow",String(Math.round(e))),this.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:e},bubbles:!0}))}async#w(){let t=this.getAttribute("persist");if(!t)return null;let e=await A.get("layout",`split:${t}`);return typeof e=="number"?e:null}#y(){let t=this.getAttribute("persist");t&&A.set("layout",`split:${t}`,Math.round(this.#s)).catch(()=>{})}#b(){let t=this.getAttribute("persist");t&&A.remove("layout",`split:${t}`).catch(()=>{})}};p("split-surface",Yt);var Qt="[data-copy], [data-copy-target], [data-paste-target]",xi="Copied to clipboard",Is="Pasted from clipboard",Zt=new WeakMap;async function Y(r,t={}){if(r==null||r==="")return!1;let{button:e,announceMessage:i=xi,duration:s=1500}=t;try{await navigator.clipboard.writeText(r)}catch{return!1}return ee({button:e,duration:s,announceMessage:i,eventDetail:{text:r}}),!0}async function Ai(r,t={}){let{text:e,html:i,blob:s}=r??{};if(!e&&!i&&!s)return!1;let{button:n,announceMessage:o=xi,duration:a=1500}=t;if(typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"){let c={};e&&(c["text/plain"]=new Blob([e],{type:"text/plain"})),i&&(c["text/html"]=new Blob([i],{type:"text/html"})),s&&(c[s.type]=s);try{return await navigator.clipboard.write([new ClipboardItem(c)]),ee({button:n,duration:a,announceMessage:o,eventDetail:{payload:r}}),!0}catch{}}return e?Y(e,t):!1}function ee({button:r,duration:t,announceMessage:e,eventDetail:i,state:s="copied",eventName:n="copy"}){if(r){r.dataset.state=s;let o=Zt.get(r);o&&clearTimeout(o),Zt.set(r,setTimeout(()=>{delete r.dataset.state,Zt.delete(r)},t)),r.dispatchEvent(new CustomEvent(n,{bubbles:!0,detail:i}))}Os(e,r??document.body)}async function qs(r,t={}){let{button:e,announceMessage:i=Is,duration:s=1500}=t,n;try{n=await navigator.clipboard.readText()}catch{return null}return r&&("value"in r&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)?r.value=n:r.textContent=n,r.dispatchEvent(new Event("input",{bubbles:!0}))),ee({button:e,duration:s,announceMessage:i,eventDetail:{text:n},state:"pasted",eventName:"paste"}),n}function ki(r=document){r.querySelectorAll(Qt).forEach(te)}function te(r){r.hasAttribute("data-copy-init")||(r.setAttribute("data-copy-init",""),r.addEventListener("click",()=>{if(r.dataset.pasteTarget){let e=document.querySelector(r.dataset.pasteTarget);if(!e)return;qs(e,{button:r});return}let t=Ds(r);t&&Y(t,{button:r})}))}function Ds(r){if(r.dataset.copy)return r.dataset.copy;if(r.dataset.copyTarget){let t=document.querySelector(r.dataset.copyTarget);if(!t)return"";let e=r.dataset.copyAttr;return e?t.getAttribute(e)??"":t.textContent??""}return""}function Os(r,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="visually-hidden",e.textContent=r,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ki()):ki();var zs=new MutationObserver(r=>{for(let t of r)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Qt)&&te(i),i.querySelectorAll(Qt).forEach(s=>te(s))}});zs.observe(document.documentElement,{childList:!0,subtree:!0});var ie=class extends m{#t;#e=null;setup(){this.#e===null&&(this.#e=this.getAttribute("value")||this.textContent.trim());let t=this.#e;if(!t)return!1;let e=parseInt(this.getAttribute("size")??"200",10)||200,i=parseInt(this.getAttribute("error-correction")??"1",10)||1;return this.#t=document.createElement("canvas"),this.#t.width=e,this.#t.height=e,this.#t.setAttribute("role","img"),this.#t.setAttribute("aria-label",`QR code: ${t}`),this.#i(t,e,i),!0}static get observedAttributes(){return["value","size"]}attributeChangedCallback(t,e,i){if(!this.#t||!this.isConnected)return;t==="value"&&i&&(this.#e=i);let s=this.#e||this.getAttribute("value")||"";if(!s)return;let n=parseInt(this.getAttribute("size")??"200",10)||200,o=parseInt(this.getAttribute("error-correction")??"1",10)||1;this.#t.width=n,this.#t.height=n,this.#t.setAttribute("aria-label",`QR code: ${s}`),this.#i(s,n,o)}#i(t,e,i){let s=Hs(t,i),n=this.#t.getContext("2d"),o=s.length,a=e/o,l=getComputedStyle(this),c=this.getAttribute("color")||l.color||"#000",h=this.getAttribute("background")||"transparent";n.clearRect(0,0,e,e),h!=="transparent"&&(n.fillStyle=h,n.fillRect(0,0,e,e)),n.fillStyle=c;for(let d=0;d<o;d++)for(let f=0;f<o;f++)s[d][f]&&n.fillRect(Math.round(f*a),Math.round(d*a),Math.ceil(a),Math.ceil(a));this.textContent="",this.appendChild(this.#t);let u=document.createElement("span");u.className="visually-hidden",u.textContent=t,this.appendChild(u)}toDataURL(t="image/png"){return this.#t?.toDataURL(t)??""}async copy({button:t}={}){if(!this.#t)return!1;let e=this.#e||this.getAttribute("value")||"",i=await new Promise(s=>this.#t.toBlob(s,"image/png"));return Ai({text:e,blob:i||void 0},{button:t,announceMessage:"QR code copied"})}},pt=[[[26,7],[44,10],[70,15],[100,20],[134,26],[172,18],[196,20],[242,24],[292,30],[346,18]],[[26,10],[44,16],[70,26],[100,18],[134,24],[172,16],[196,18],[242,22],[292,22],[346,26]],[[26,13],[44,22],[70,18],[100,26],[134,18],[172,24],[196,18],[242,22],[292,20],[346,28]],[[26,17],[44,28],[70,22],[100,16],[134,22],[172,28],[196,26],[242,26],[292,24],[346,28]]],Fs=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,52]];function Hs(r,t=1){let e=new TextEncoder().encode(r),i=Us(e.length,t),s=pt[t][i-1][0],n=pt[t][i-1][1],o=s-n,a=Vs(e,i,o),l=Gs(a,o,n),c=i*4+17,h=Array.from({length:c},()=>new Uint8Array(c)),u=Array.from({length:c},()=>new Uint8Array(c));return Ks(h,u,c),Xs(h,u,i),Js(h,u,c),Ys(u,c),Zs(h,u,l,c),nr(h,u,c,t)}function Us(r,t){for(let e=1;e<=10;e++){let i=pt[t][e-1][0],s=pt[t][e-1][1],n=i-s,o=e<=9?8:16,a=Math.ceil((4+o)/8);if(r<=n-a)return e}return 10}function Vs(r,t,e){let i=[],s=(u,d)=>{for(let f=d-1;f>=0;f--)i.push(u>>f&1)};s(4,4);let n=t<=9?8:16;s(r.length,n);for(let u of r)s(u,8);let o=e*8,a=Math.min(4,o-i.length);for(s(0,a);i.length%8!==0;)i.push(0);let l=[236,17],c=0;for(;i.length<o;)s(l[c%2],8),c++;let h=[];for(let u=0;u<i.length;u+=8){let d=0;for(let f=0;f<8;f++)d=d<<1|(i[u+f]||0);h.push(d)}return h}function Gs(r,t,e){let i=Ws(e),s=new Uint8Array(t+e);for(let o=0;o<t;o++)s[o]=r[o];for(let o=0;o<t;o++){let a=s[o];if(a===0)continue;let l=mt[a];for(let c=0;c<i.length;c++)s[o+c]^=Z[(l+mt[i[c]])%255]}let n=[...r.slice(0,t)];for(let o=0;o<e;o++)n.push(s[t+o]);return n}var Z=new Uint8Array(512),mt=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)Z[e]=t,mt[t]=e,t<<=1,t>=256&&(t^=285);for(let e=255;e<512;e++)Z[e]=Z[e-255]})();function Ws(r){let t=new Uint8Array([1]);for(let e=0;e<r;e++){let i=new Uint8Array(t.length+1),s=e;for(let n=0;n<t.length;n++)i[n]^=t[n],i[n+1]^=Z[(mt[t[n]]+s)%255];t=i}return t}function Ks(r,t,e){let i=[[0,0],[e-7,0],[0,e-7]];for(let[s,n]of i){for(let o=0;o<7;o++)for(let a=0;a<7;a++){let l=o===0||o===6||a===0||a===6||o>=2&&o<=4&&a>=2&&a<=4;r[s+o][n+a]=l?1:0,t[s+o][n+a]=1}for(let o=-1;o<=7;o++)for(let[a,l]of[[o,-1],[o,7],[-1,o],[7,o]]){let c=s+a,h=n+l;c>=0&&c<e&&h>=0&&h<e&&(r[c][h]=0,t[c][h]=1)}}}function Xs(r,t,e){if(e<2)return;let i=Fs[e-1];for(let s of i)for(let n of i)if(!t[s][n])for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++){let l=Math.abs(o)===2||Math.abs(a)===2||o===0&&a===0;r[s+o][n+a]=l?1:0,t[s+o][n+a]=1}}function Js(r,t,e){for(let i=8;i<e-8;i++){let s=i%2===0?1:0;t[6][i]||(r[6][i]=s,t[6][i]=1),t[i][6]||(r[i][6]=s,t[i][6]=1)}}function Ys(r,t){for(let e=0;e<=8;e++)e<t&&(r[8][e]=1),e<t&&(r[e][8]=1);for(let e=0;e<=7;e++)r[8][t-1-e]=1,r[t-1-e][8]=1;r[t-8][8]=1}function Zs(r,t,e,i){let s=[];for(let a of e)for(let l=7;l>=0;l--)s.push(a>>l&1);let n=0,o=!0;for(let a=i-1;a>=1;a-=2){a===6&&(a=5);let l=o?Array.from({length:i},(c,h)=>i-1-h):Array.from({length:i},(c,h)=>h);for(let c of l)for(let h of[a,a-1])h<0||h>=i||t[c][h]||(r[c][h]=n<s.length?s[n]:0,n++);o=!o}}var Qs=[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107];function tr(r,t){let i=[1,0,3,2][r]*8+t;return Qs[i]}var er=[(r,t)=>(r+t)%2===0,r=>r%2===0,(r,t)=>t%3===0,(r,t)=>(r+t)%3===0,(r,t)=>(Math.floor(r/2)+Math.floor(t/3))%2===0,(r,t)=>r*t%2+r*t%3===0,(r,t)=>(r*t%2+r*t%3)%2===0,(r,t)=>((r+t)%2+r*t%3)%2===0];function ir(r,t,e,i){let s=r.map(o=>new Uint8Array(o)),n=er[i];for(let o=0;o<e;o++)for(let a=0;a<e;a++)!t[o][a]&&n(o,a)&&(s[o][a]^=1);return s}function sr(r,t,e,i){let s=tr(e,i),n=[[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[7,8],[8,8],[8,7],[8,5],[8,4],[8,3],[8,2],[8,1],[8,0]];for(let a=0;a<15;a++){let[l,c]=n[a];r[l][c]=s>>14-a&1}let o=[[8,t-1],[8,t-2],[8,t-3],[8,t-4],[8,t-5],[8,t-6],[8,t-7],[8,t-8],[t-7,8],[t-6,8],[t-5,8],[t-4,8],[t-3,8],[t-2,8],[t-1,8]];for(let a=0;a<15;a++){let[l,c]=o[a];r[l][c]=s>>14-a&1}r[t-8][8]=1}function rr(r,t){let e=0;for(let i=0;i<t;i++){let s=1;for(let n=1;n<t;n++)r[i][n]===r[i][n-1]?(s++,s===5?e+=3:s>5&&(e+=1)):s=1}for(let i=0;i<t;i++){let s=1;for(let n=1;n<t;n++)r[n][i]===r[n-1][i]?(s++,s===5?e+=3:s>5&&(e+=1)):s=1}for(let i=0;i<t-1;i++)for(let s=0;s<t-1;s++){let n=r[i][s];n===r[i][s+1]&&n===r[i+1][s]&&n===r[i+1][s+1]&&(e+=3)}return e}function nr(r,t,e,i){let s=1/0,n=null;for(let o=0;o<8;o++){let a=ir(r,t,e,o);sr(a,e,i,o);let l=rr(a,e);l<s&&(s=l,n=a)}return n}p("qr-code",ie);var se=class extends m{#t;#e;#i;#s=!1;#n=0;#r=0;#o=0;#a=!1;#h=!1;get activated(){return this.#a}get#c(){let t=this.getAttribute("threshold"),e=Number(t);return t!==null&&!isNaN(e)?Math.min(100,Math.max(0,e)):90}setup(){this.#h||(this.#l(),this.#h=!0),this.listen(this.#t,"pointerdown",this.#m),this.listen(this.#t,"keydown",this.#u),this.listen(this.#t,"transitionend",this.#g)}#l(){this.#i=document.createElement("div"),this.#i.className="slide-track",this.#e=document.createElement("span"),this.#e.className="slide-label",this.#e.textContent=this.getAttribute("label")||"Slide to confirm",this.#t=document.createElement("div"),this.#t.className="slide-handle",this.#t.setAttribute("role","slider"),this.#t.setAttribute("aria-valuemin","0"),this.#t.setAttribute("aria-valuemax","100"),this.#t.setAttribute("aria-valuenow","0"),this.#t.setAttribute("aria-label",this.getAttribute("label")||"Slide to confirm"),this.#t.setAttribute("tabindex","0"),this.#t.innerHTML='<icon-wc name="chevrons-right" size="sm"></icon-wc>',this.#i.append(this.#e,this.#t),this.textContent="",this.appendChild(this.#i),this.#w(0)}reset(){this.#a=!1,this.removeAttribute("data-activated"),this.#e.textContent=this.getAttribute("label")||"Slide to confirm",this.#t.removeAttribute("aria-disabled"),this.#t.setAttribute("tabindex","0"),this.#w(0),this.dispatchEvent(new CustomEvent("slide-accept:reset",{bubbles:!0}))}#m=t=>{if(!this.#a){if(t.preventDefault(),this.hasAttribute("transitioning")){let e=this.#t.getBoundingClientRect(),i=this.#i.getBoundingClientRect(),s=parseFloat(getComputedStyle(this.#i).getPropertyValue("--_handle-inset")||"0"),n=this.#t.offsetWidth,o=i.width-n-s*2,a=e.left-i.left-s;this.removeAttribute("transitioning"),this.#n=o>0?Math.max(0,Math.min(100,a/o*100)):0,this.#w(this.#n)}this.#s=!0,this.#r=t.clientX,this.#o=this.#n,this.#t.setPointerCapture(t.pointerId),this.setAttribute("data-dragging",""),this.#t.addEventListener("pointermove",this.#d),this.#t.addEventListener("pointerup",this.#p),this.#t.addEventListener("pointercancel",this.#p)}};#d=t=>{if(!this.#s)return;let e=this.#i.getBoundingClientRect().width-this.#t.offsetWidth;if(e<=0)return;let s=(t.clientX-this.#r)/e*100,n=Math.min(100,Math.max(0,this.#o+s));this.#w(n)};#p=t=>{this.#s&&(this.#s=!1,this.removeAttribute("data-dragging"),this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#d),this.#t.removeEventListener("pointerup",this.#p),this.#t.removeEventListener("pointercancel",this.#p),this.#n>=this.#c?this.#v():this.#f())};#u=t=>{if(this.#a)return;let e=t.shiftKey?20:5;t.key==="ArrowRight"?(t.preventDefault(),this.#w(Math.min(100,this.#n+e))):t.key==="ArrowLeft"?(t.preventDefault(),this.#w(Math.max(0,this.#n-e))):t.key==="End"?(t.preventDefault(),this.#v()):t.key==="Home"&&(t.preventDefault(),this.#w(0)),t.key==="ArrowRight"&&this.#n>=this.#c&&this.#v()};#g=()=>{this.removeAttribute("transitioning")};#v(){this.#a=!0,this.#w(100),this.setAttribute("data-activated",""),this.#e.textContent=this.getAttribute("activated-label")||"Confirmed!",this.#t.setAttribute("aria-disabled","true"),this.#t.removeAttribute("tabindex"),this.dispatchEvent(new CustomEvent("slide-accept:accept",{bubbles:!0}))}#f(){this.setAttribute("transitioning",""),this.#w(0),setTimeout(()=>{this.hasAttribute("transitioning")&&this.removeAttribute("transitioning")},500)}#w(t){this.#n=t,this.style.setProperty("--_slide-position",String(t)),this.#t.setAttribute("aria-valuenow",String(Math.round(t)))}};p("slide-accept",se);var ft="banner",Ei=365,Si=864e5;function Ci(r){if(r===0||r==="0"||r==="never")return;let t=r==null||r===""?Ei:Number.parseFloat(String(r));return Number.isFinite(t)?t>0?t*Si:void 0:Ei*Si}var or=0,re=class extends m{#t=null;static get observedAttributes(){return["position"]}get#e(){return this.getAttribute("persist")||ft}get#i(){return Ci(this.getAttribute("expires"))}get#s(){return this.getAttribute("position")==="center"}setup(){return this.#t=this.querySelector("dialog"),this.#t?(this.#n(),this.getAttribute("trigger")&&this.listen(document,"click",this.#m),this.listen(this,"click",this.#l),this.listen(this.#t,"cancel",this.#c),this.#r(),!0):!1}attributeChangedCallback(t,e,i){e===i||!this.#t?.open||(this.#t.close(),this.#o())}#n(){let t=this.#t;if(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby"))return;let e=t.querySelector("h1, h2, h3, h4, h5, h6");e?(e.id||(e.id=`consent-banner-title-${++or}`),t.setAttribute("aria-labelledby",e.id)):t.setAttribute("aria-label","Cookie consent")}async#r(){if(await this.#d()){this.getAttribute("trigger")?this.hidden=!0:this.remove();return}this.#a()}#o(){this.#s?this.#t.showModal():this.#t.show()}#a(){!this.isConnected||this.#t.open||this.#o()}#h(){this.#t.close(),this.getAttribute("trigger")?this.hidden=!0:this.remove()}#c=t=>{this.#s&&t.preventDefault()};#l=async t=>{if(!this.#t.open)return;let e=t.target.closest("button[value]");if(!e||!this.#t.contains(e))return;let i=e.value;if(!["accept","reject","save"].includes(i))return;let s=[...this.querySelectorAll('input[type="checkbox"]')],n={};i==="accept"?s.forEach(o=>{n[o.name]=!0}):i==="reject"?s.forEach(o=>{n[o.name]=!!o.disabled}):s.forEach(o=>{n[o.name]=o.checked}),await this.#p({preferences:n,action:i}),this.dispatchEvent(new CustomEvent("consent-banner:change",{bubbles:!0,detail:{preferences:n,action:i}})),this.#h()};#m=async t=>{let e=this.getAttribute("trigger");if(!e||!t.target.closest(e))return;t.preventDefault();let s=await this.#d();if(s?.preferences)for(let[n,o]of Object.entries(s.preferences)){let a=this.querySelector(`input[type="checkbox"][name="${CSS.escape(n)}"]`);a&&!a.disabled&&(a.checked=o)}this.hidden=!1,this.#a()};async#d(){let t=this.#i;try{return await A.get("consent",this.#e,t?{maxAge:t}:void 0)}catch{return null}}async#p(t){try{await A.set("consent",this.#e,t)}catch{}}static async reset(t=ft){try{await A.remove("consent",t)}catch{}}static async getConsent(t=ft,e={}){let i=e.expires;i===void 0&&typeof document<"u"&&(i=[...document.querySelectorAll("consent-banner")].find(o=>(o.getAttribute("persist")||ft)===t)?.getAttribute("expires")??void 0);let s=Ci(i);try{return await A.get("consent",t,s?{maxAge:s}:void 0)}catch{return null}}};p("consent-banner",re);var ne=class extends m{#t=null;#e=null;#i=[];#s="";#n=0;#r=null;#o=null;#a=null;#h=null;#c=!1;#l=!1;#m=0;#d=null;#p=null;#u=null;#g=null;#v=null;#f=null;#w=null;#y=!1;#b=null;#k=null;static get observedAttributes(){return["speed","voice","for"]}attributeChangedCallback(t,e,i){if(e!==i&&(t==="for"&&(this.stop(),this.#j()),(t==="speed"||t==="voice")&&this.#c&&this.#O(),t==="speed")){let s=this.#z(parseFloat(i)||1);this.#v&&(this.#v.value=String(s)),this.#f&&(this.#f.textContent=`${s}\xD7`)}}setup(){return"speechSynthesis"in window?(this.getAttribute("variant")==="icon"?this.#R():this.#L(),this.#j(),this.#J(),this.#h=this.#W(),this.#h.then(t=>this.#tt(t)),this.listen(window,"beforeunload",this.#et),!0):(this.style.display="none",!1)}teardown(){this.stop(),this.#Y(),this.#k&&(this.#k.remove(),this.#k=null),this.#b&&(this.#b.remove(),this.#b=null)}play(){if(this.#l){this.resume();return}this.#c||this.#D(0)}pause(){!this.#c||this.#l||(speechSynthesis.pause(),this.#l=!0,this.#X(!0),this.#I("text-reader:pause"))}resume(){this.#l&&(speechSynthesis.resume(),this.#l=!1,this.#X(!1),this.#I("text-reader:resume"))}stop(){speechSynthesis.cancel(),this.#U(),this.#I("text-reader:stop")}get voices(){return this.#h||this.#W()}get speaking(){return this.#c}get paused(){return this.#l}get progress(){return this.#s.length?Math.min(this.#n/this.#s.length,1):0}#L(){let t=document.createElement("div");t.setAttribute("part","controls"),t.setAttribute("role","group"),t.setAttribute("aria-label","Article reader");let e=this.#x("play",this.getAttribute("label-play")||"Play","\u25B6");e.addEventListener("click",()=>this.play());let i=this.#x("pause",this.getAttribute("label-pause")||"Pause","\u23F8");i.hidden=!0,i.addEventListener("click",()=>this.pause());let s=this.#x("stop",this.getAttribute("label-stop")||"Stop","\u23F9");s.disabled=!0,s.addEventListener("click",()=>this.stop());let n=document.createElement("select");n.setAttribute("aria-label","Voice");let o=document.createElement("option");o.textContent="Loading voices\u2026",n.append(o),n.addEventListener("change",()=>{this.#c&&this.#O()});let a=document.createElement("label");a.setAttribute("data-speed-group","");let l=document.createElement("span");l.setAttribute("data-speed-value","");let c=this.#z(parseFloat(this.getAttribute("speed")??"1")||1);l.textContent=`${c}\xD7`;let h=document.createElement("input");h.type="range",h.min="0.5",h.max="2",h.step="0.1",h.value=String(c),h.setAttribute("aria-label","Speed"),h.addEventListener("input",()=>{let u=parseFloat(h.value);l.textContent=`${u}\xD7`,this.#c&&this.#O()}),a.append(l,h),this.#A("icon-play",e),this.#A("icon-pause",i),this.#A("icon-stop",s),t.append(e,i,s,n,a),this.prepend(t),this.#w=t,this.#d=e,this.#p=i,this.#u=s,this.#g=n,this.#v=h,this.#f=l}#x(t,e,i){let s=document.createElement("button");return s.type="button",s.setAttribute("part",`button ${t}`),s.setAttribute("aria-label",e),s.textContent=i,s}#A(t,e){let i=this.querySelector(`[slot="${t}"]`);i&&(i.removeAttribute("slot"),e.textContent="",e.append(i))}#R(){this.#y=!0;for(let i of this.querySelectorAll(':scope > [part="trigger"]'))i.remove();let t=document.createElement("button");t.type="button",t.setAttribute("part","trigger"),t.setAttribute("aria-label","Article reader"),t.setAttribute("aria-pressed","false");let e=this.querySelector('[slot="icon-trigger"]');if(e)e.removeAttribute("slot"),t.append(e);else{let i=document.createElement("icon-wc");i.setAttribute("name","volume-2"),i.setAttribute("aria-hidden","true"),t.append(i)}t.addEventListener("click",()=>this.#E()),this.append(t),this.#b=t,this.#C()}#C(){let t=document.createElement("div");t.setAttribute("data-text-reader-toolbar",""),t.setAttribute("role","group"),t.setAttribute("aria-label","Reader controls"),t.hidden=!0;let e=this.#x("play",this.getAttribute("label-play")||"Play","\u25B6");e.addEventListener("click",()=>this.play());let i=this.#x("pause",this.getAttribute("label-pause")||"Pause","\u23F8");i.hidden=!0,i.addEventListener("click",()=>this.pause());let s=this.#x("stop",this.getAttribute("label-stop")||"Stop","\u23F9");s.addEventListener("click",()=>this.stop());let n=this.#x("speed-down","Slower","\u2212");n.addEventListener("click",()=>this.#N(-.1));let o=document.createElement("span");o.setAttribute("data-speed-value","");let a=this.#z(parseFloat(this.getAttribute("speed")??"1")||1);o.textContent=`${a}\xD7`;let l=this.#x("speed-up","Faster","+");l.addEventListener("click",()=>this.#N(.1)),this.#A("icon-play",e),this.#A("icon-pause",i),this.#A("icon-stop",s),t.append(e,i,s,n,o,l),document.body.append(t),this.#d=e,this.#p=i,this.#u=s,this.#f=o,this.#k=t,this.listen(document,"pointerdown",this.#$),this.listen(document,"keydown",this.#_)}#E(){if(!this.#c){this.play();return}this.#k?.hidden&&this.#S(),this.#l?this.resume():this.pause()}#S(){if(!this.#k||!this.#b)return;let t=this.#k;t.hidden=!1,t.style.visibility="hidden",requestAnimationFrame(()=>{this.#T(),t.style.visibility=""})}#M(){this.#k&&(this.#k.hidden=!0)}#T(){let t=this.#k,e=this.#b;if(!t||!e)return;let i=e.getBoundingClientRect(),s=t.offsetWidth,n=t.offsetHeight,o=8,a=8,l=i.top-n-o;l<a&&(l=i.bottom+o);let c=i.left+i.width/2-s/2,h=window.innerWidth-s-a;c=Math.max(a,Math.min(c,h)),t.style.top=`${l}px`,t.style.left=`${c}px`}#N(t){let e=parseFloat(this.getAttribute("speed")??"1")||1,i=this.#z(e+t);this.setAttribute("speed",String(i))}#$=t=>{!this.#k||this.#k.hidden||this.#k.contains(t.target)||this.#b?.contains(t.target)||this.#M()};#_=t=>{t.key==="Escape"&&this.#k&&!this.#k.hidden&&this.#M()};#j(){let t=this.getAttribute("for");if(!t){console.warn('<text-reader>: missing "for" attribute'),this.#P();return}if(this.#t=document.getElementById(t),!this.#t){console.warn(`<text-reader>: no element found with id="${t}"`),this.#P();return}this.#H(),this.#F()}#P(){this.#d&&(this.#d.disabled=!0),this.#u&&(this.#u.disabled=!0)}#F(){this.#d&&(this.#d.disabled=!1)}#H(){let t=this.#t;if(!t)return;let e=this.getAttribute("selectors")||"p,li",i=[...t.querySelectorAll(e)],s=o=>o.closest("pre")||o.closest("code")||o.closest('[aria-hidden="true"]');this.#i=[];let n=0;for(let o of i){if(s(o))continue;let a=o.textContent.trim();a&&(this.#i.push({element:o,text:a,speechStart:n,speechEnd:n+a.length}),n+=a.length+1)}this.#s=this.#i.map(o=>o.text).join(" ")}#D(t){if(!this.#s)return;let e=t>0?this.#s.slice(t):this.#s;if(!e.trim())return;let i=e.replace(/[<>]/g," "),s=new SpeechSynthesisUtterance(i);s.rate=this.#z(parseFloat(this.#v?.value??this.getAttribute("speed")??"1")||1);let n=this.#g?.selectedOptions[0];if(n?.dataset.voiceUri){let o=speechSynthesis.getVoices().find(a=>a.voiceURI===n.dataset.voiceUri);o&&(s.voice=o)}s.onboundary=o=>{if(o.name!=="word")return;let a=t+o.charIndex;this.#n=a;let l=o.charLength;if(!l){let h=this.#s.slice(a).match(/^\S+/);l=h?h[0].length:1}this.#Z(a,l),this.#I("text-reader:word",{word:this.#s.slice(a,a+l),charIndex:a,element:this.#G(a)?.element})},s.onend=()=>{let o=Date.now()-this.#m;this.#U(),this.#I("text-reader:end",{duration:o})},s.onerror=o=>{o.error==="interrupted"||o.error==="canceled"||(console.warn("<text-reader>: SpeechSynthesisUtterance error:",o.error),this.#U(),this.#I("text-reader:error",{error:o.error}))},this.#e=s,this.#c=!0,this.#l=!1,this.#m=Date.now(),this.#n=t,this.#K(!0),speechSynthesis.cancel(),speechSynthesis.speak(s),this.#q(),this.#I("text-reader:play",{voice:s.voice?.name,speed:s.rate})}#O(){let t=this.#n;speechSynthesis.cancel(),this.#B(),requestAnimationFrame(()=>this.#D(t))}#q(){this.#B(),this.#r=setInterval(()=>{if(!speechSynthesis.speaking){this.#B();return}speechSynthesis.pause(),speechSynthesis.resume()},1e4)}#B(){this.#r&&clearInterval(this.#r),this.#r=null}#J(){if(!CSS.highlights)return;let t=new CSSStyleSheet;t.replaceSync(`
1242
+
1243
+ @media (forced-colors: active) {
1244
+ [part~="control"],
1245
+ [part="activate"] {
1246
+ border: 1px solid ButtonText;
1247
+ }
1248
+ }
1249
+ `,mt=null;function es(r){if("adoptedStyleSheets"in r&&typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype)return mt||(mt=new CSSStyleSheet,mt.replaceSync(ts)),r.adoptedStyleSheets.includes(mt)||(r.adoptedStyleSheets=[...r.adoptedStyleSheets,mt]),null;let t=document.createElement("style");return t.textContent=ts,t}fe();var ge="http://www.w3.org/2000/svg",an={map:"Map","map-of":"Map of {name}",activate:"Activate interactive map",consent:"Load map","consent-note":"Loads map images from {host}","zoom-in":"Zoom in","zoom-out":"Zoom out",recenter:"Recenter map",exit:"Exit map",controls:"Map controls",instructions:"Drag or use the arrow keys to pan. Click a point to centre on it. Pinch, scroll, or press plus and minus to zoom. Home recentres. Escape exits.",moved:"Map centred on {lat}, {lng}, zoom {zoom}","error-coords":"Map location unavailable","error-tiles":"Map images failed to load"},ln=0;function cn(){let r=document.createElement("div");r.setAttribute("part","marker"),r.setAttribute("aria-hidden","true");let t=document.createElementNS(ge,"svg");t.setAttribute("viewBox","0 0 24 36"),t.setAttribute("focusable","false");let e=document.createElementNS(ge,"path");e.setAttribute("class","pin"),e.setAttribute("d","M12 0C5.373 0 0 5.373 0 12c0 9 12 24 12 24s12-15 12-24C24 5.373 18.627 0 12 0z");let i=document.createElementNS(ge,"circle");return i.setAttribute("class","dot"),i.setAttribute("cx","12"),i.setAttribute("cy","12"),i.setAttribute("r","5"),t.append(e,i),r.append(t),r}function S(r,t={},e){let i=document.createElement(r);for(let[s,n]of Object.entries(t))i.setAttribute(s,n);return e!=null&&(i.textContent=e),i}function ns(r){return!r||typeof r!="string"?!1:typeof CSS<"u"&&CSS.supports("color",r)}var be=class extends b{static get observedAttributes(){return["lat","lng","zoom","marker","marker-color","provider","tile-url","interactive","static-only","src","place","label","attribution","attribution-href","loading"]}#t=null;#e=null;#i=0;#s=!1;#r=!1;#n=!1;#a=!1;#c=!1;#h=`geo-map-${++ln}`;#l=null;#o="";#u=new Map;#p="";#d=null;#f=0;#k=null;#w=null;#m=()=>this.#I();#v=0;#y="osm";constructor(){super(),this.attachShadow({mode:"open"})}get lat(){return parseFloat(this.getAttribute("lat")??"")}get lng(){return parseFloat(this.getAttribute("lng")??"")}get zoom(){let t=parseInt(this.getAttribute("zoom")??"",10);return t>=1&&t<=19?t:15}get showMarker(){return this.getAttribute("marker")!=="false"}get markerColor(){let t=this.getAttribute("marker-color");return ns(t)?t:""}get provider(){let t=this.getAttribute("provider");return t&&(t in U||t==="carto-auto")?t:"osm"}get tileUrl(){return this.getAttribute("tile-url")||""}get interactive(){let t=this.getAttribute("interactive");return t==="eager"||t==="none"?t:"click"}get staticOnly(){return this.hasAttribute("static-only")}get loading(){let t=this.getAttribute("loading");return t==="eager"||t==="consent"?t:"lazy"}get active(){return this.#t!==null}#g(t,e={}){return(this.getAttribute(`data-label-${t}`)??an[t]??"").replace(/\{(\w+)\}/g,(s,n)=>n in e?String(e[n]):s)}get#b(){return this.interactive!=="none"&&!this.staticOnly}get#T(){return this.loading==="consent"&&!this.#r}#A(){let t=this.provider;if(t!=="carto-auto")return t;let e=this.closest("[data-mode]")?.getAttribute("data-mode");return e==="dark"?"carto-dark":e==="light"?"carto-light":window.matchMedia?.("(prefers-color-scheme: dark)").matches?"carto-dark":"carto-light"}#x(){if(this.tileUrl)try{return new URL(this.tileUrl.replace(/\{s\}/g,"a"),location.href).origin}catch{return""}return(U[this.#y]??U.osm).origin}#S(){let t=parseFloat(this.getAttribute("lat")??""),e=parseFloat(this.getAttribute("lng")??"");if(!isNaN(t)&&!isNaN(e))return{lat:t,lng:e};let i=this.getAttribute("src");if(i){let a=this.#E(i);if(a)return a}let s=this.querySelector("address[data-lat][data-lng]");if(s){let a=parseFloat(s.dataset.lat??""),l=parseFloat(s.dataset.lng??"");if(!isNaN(a)&&!isNaN(l))return{lat:a,lng:l}}let n=this.getAttribute("place");if(n){let a=this.#L(n);if(a)return a}let o=document.querySelector('meta[name="geo.position"]');if(o){let l=(o.getAttribute("content")||"").split(";");if(l.length===2){let c=parseFloat(l[0]),h=parseFloat(l[1]);if(!isNaN(c)&&!isNaN(h))return{lat:c,lng:h}}}return null}#E(t){let e=document.getElementById(t);if(!e)return null;if(e.tagName==="ADDRESS"&&e.dataset.lat&&e.dataset.lng){let i=parseFloat(e.dataset.lat),s=parseFloat(e.dataset.lng);if(!isNaN(i)&&!isNaN(s))return{lat:i,lng:s}}return e.tagName==="SCRIPT"&&e.type==="application/ld+json"?this.#C(e):null}#L(t){let e=document.querySelectorAll('script[type="application/ld+json"]');for(let i of e)try{let s=JSON.parse(i.textContent);if(s.name===t){let n=s.geo;if(n){let o=parseFloat(n.latitude),a=parseFloat(n.longitude);if(!isNaN(o)&&!isNaN(a))return{lat:o,lng:a}}}}catch{}return null}#C(t){try{let i=JSON.parse(t.textContent).geo;if(i){let s=parseFloat(i.latitude),n=parseFloat(i.longitude);if(!isNaN(s)&&!isNaN(n))return{lat:s,lng:n}}}catch{}return null}#$(){let t=n=>(n||"").replace(/\s+/g," ").trim(),e=t(this.getAttribute("label"));if(e)return e;let i=t(this.querySelector("address")?.textContent),s=this.getAttribute("src");if(!i&&s){let n=document.getElementById(s);if(n?.tagName==="ADDRESS")i=t(n.textContent);else if(n?.tagName==="SCRIPT")try{i=t(JSON.parse(n.textContent||"").name)}catch{}}return i||(i=t(this.getAttribute("place"))),i?this.#g("map-of",{name:i}):this.#g("map")}setup(){if(this.#i++,this.#y=this.#A(),this.render(),this.#P(),this.#N(),this.#z(),this.interactive==="eager"&&!this.#n&&this.#b&&!this.#T&&this.#l){let t=this.#i;requestAnimationFrame(()=>{t===this.#i&&this.#O({focus:!1})})}}attributeChangedCallback(t,e,i){e===i||this.#s||!this.isConnected||!this.hasAttribute("data-upgraded")||this._reinit()}teardown(){this.#i++,this.#e=null,this.#t&&(this.#t.destroy(),this.#t=null,this.setState("active",!1)),this.#d?.disconnect(),this.#d=null,cancelAnimationFrame(this.#f),this.#k?.disconnect(),this.#k=null,this.#w?.removeEventListener("change",this.#m),this.#w=null,clearTimeout(this.#v)}#P(){typeof ResizeObserver=="function"&&(this.#d=new ResizeObserver(()=>{cancelAnimationFrame(this.#f),this.#f=requestAnimationFrame(()=>this.#z())}),this.#d.observe(this))}#N(){this.provider!=="carto-auto"||this.tileUrl||(this.#k=new MutationObserver(()=>this.#I()),this.#k.observe(document.documentElement,{attributes:!0,attributeFilter:["data-mode"]}),this.#w=window.matchMedia?.("(prefers-color-scheme: dark)")??null,this.#w?.addEventListener("change",this.#m))}#I(){this.#A()!==this.#y&&this._reinit()}get data(){return{lat:isNaN(this.lat)?void 0:this.lat,lng:isNaN(this.lng)?void 0:this.lng,zoom:this.zoom,marker:this.showMarker,markerColor:this.markerColor}}set data(t){if(!t||typeof t!="object")return;let e=this.data,i={...e};if(t.lat!=null&&!isNaN(Number(t.lat))&&(i.lat=Number(t.lat)),t.lng!=null&&!isNaN(Number(t.lng))&&(i.lng=Number(t.lng)),t.zoom!=null&&!isNaN(Number(t.zoom))&&(i.zoom=Number(t.zoom)),t.marker!=null&&(i.marker=!!t.marker),"markerColor"in t&&(ns(t.markerColor)?i.markerColor=t.markerColor:t.markerColor||(i.markerColor="")),!(i.lat===e.lat&&i.lng===e.lng&&i.zoom===e.zoom&&i.marker===e.marker&&i.markerColor===e.markerColor)){this.#s=!0;try{i.lat!==e.lat&&this.setAttribute("lat",String(i.lat)),i.lng!==e.lng&&this.setAttribute("lng",String(i.lng)),i.zoom!==e.zoom&&this.setAttribute("zoom",String(i.zoom)),i.marker!==e.marker&&this.setAttribute("marker",i.marker?"true":"false"),i.markerColor!==e.markerColor&&(i.markerColor?this.setAttribute("marker-color",i.markerColor):this.removeAttribute("marker-color"))}finally{this.#s=!1}this.hasAttribute("data-upgraded")&&this._reinit(),this.dispatchEvent(new CustomEvent("geo-map:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0,composed:!0}))}}get markers(){let t=this.#S();return t?[{lat:t.lat,lng:t.lng,color:this.markerColor}]:[]}render(){let t=this.shadowRoot,e=es(t);this.removeAttribute("data-ready"),this.#c=!1,this.#u=new Map,this.#p="",this.#l=this.#S(),this.#o=this.#$();let i=this.#l!==null,s=i&&this.#T,n=S("div",{part:"container"}),o=S("div",{part:"viewport",role:"img","aria-label":this.#o});if(o.append(S("div",{part:"tiles"})),this.showMarker&&i){let h=cn();this.markerColor&&h.style.setProperty("--_marker-color",this.markerColor),o.append(h)}if(n.append(o),s){n.setAttribute("data-consent","");let h=S("div",{part:"overlay"}),u=S("button",{part:"activate",type:"button"},this.#g("consent")),p=this.#x().replace(/^https?:\/\//,""),d=S("p",{part:"consent-note"},this.#g("consent-note",{host:p}));h.append(u,d),h.addEventListener("click",()=>this.#F());let f=()=>this.#B();h.addEventListener("pointerenter",f,{once:!0}),u.addEventListener("focus",f,{once:!0}),n.append(h)}else if(i&&this.#b){let h=S("div",{part:"overlay"});h.append(S("button",{part:"activate",type:"button"},this.#g("activate"))),h.addEventListener("click",()=>this.#O({focus:!0})),n.append(h)}if(i&&this.#b){let h=S("div",{part:"controls",role:"group","aria-label":this.#g("controls")}),u=[["zoom-in","+",this.#g("zoom-in"),()=>this.#t?.zoomBy(1)],["zoom-out","\u2212",this.#g("zoom-out"),()=>this.#t?.zoomBy(-1)],["recenter","\u2316",this.#g("recenter"),()=>this.#t?.recenter()],["exit","\u2715",this.#g("exit"),()=>this.#j()]];for(let[p,d,f,m]of u){let y=S("button",{part:`control ${p}`,type:"button","aria-label":f,title:f},d);y.addEventListener("click",m),h.append(y)}n.append(h)}let a=S("div",{part:"caption"}),l=S("slot");a.append(l),n.append(a);let c=()=>{let h=l.assignedNodes().some(u=>u.nodeType===1||(u.textContent||"").trim());n.toggleAttribute("data-caption",h)};l.addEventListener("slotchange",c),n.toggleAttribute("data-caption",[...this.childNodes].some(h=>h.nodeType===1&&!h.hasAttribute("slot")||h.nodeType===3&&(h.textContent||"").trim())),n.append(this.#M()),n.append(S("p",{part:"instructions",id:`${this.#h}-help`,hidden:""},this.#g("instructions"))),n.append(S("p",{part:"status",role:"status","aria-live":"polite"})),t.replaceChildren(...e?[e]:[],n),i||this.handleError("Missing or invalid lat/lng coordinates",this.#g("error-coords"))}#M(){let t=S("div",{part:"attribution"}),e=S("slot",{name:"attribution"}),i;if(this.tileUrl){let n=(this.getAttribute("attribution")||"").trim(),o=this.getAttribute("attribution-href")||"";i=n?[{text:n,href:o}]:[]}else i=(U[this.#y]??U.osm).credits;i.forEach((n,o)=>{o&&e.append(document.createTextNode(" "));let a="";if(n.href)try{let l=new URL(n.href,location.href);(l.protocol==="https:"||l.protocol==="http:")&&(a=l.href)}catch{}e.append(a?S("a",{href:a,target:"_blank",rel:"noopener noreferrer"},n.text):S("span",{},n.text))});let s=()=>{t.hidden=i.length===0&&e.assignedNodes().length===0};return e.addEventListener("slotchange",s),t.hidden=i.length===0&&!this.querySelector(':scope > [slot="attribution"]'),t.append(e),t}#R(){let t=this.shadowRoot;return{container:t.querySelector('[part="container"]'),viewport:t.querySelector('[part="viewport"]'),tiles:t.querySelector('[part="tiles"]'),marker:t.querySelector('[part="marker"]'),status:t.querySelector('[part="status"]')}}#z(){let t=this.clientWidth,e=this.clientHeight;if(this.#t){this.#t.resize(t,e);return}if(!this.#l||this.#T||!t||!e)return;let i=`${t}x${e}`;i!==this.#p&&(this.#p=i,this.loadTiles(t,e))}loadTiles(t=this.clientWidth,e=this.clientHeight){let{tiles:i}=this.#R();if(!i||!this.#l||!t||!e)return;let s=this.zoom,{lat:n,lng:o}=this.#l,a=st(n,o,s),l=Math.pow(2,s),c=a.x-t/2,h=a.y-e/2,u=Math.floor(c/256),p=Math.floor((c+t-1)/256),d=Math.max(0,Math.floor(h/256)),f=Math.min(l-1,Math.floor((h+e-1)/256));i.style.transform=`translate(${Math.round(u*256-c)}px, ${Math.round(d*256-h)}px)`;let m=new Set;for(let y=d;y<=f;y++)for(let w=u;w<=p;w++){let k=`${w}/${y}`;m.add(k);let A=this.#u.get(k);if(!A){let T=(w%l+l)%l;A=document.createElement("img"),A.alt="",A.loading=this.loading==="eager"?"eager":"lazy",A.decoding="async",A.draggable=!1,A.addEventListener("load",()=>this.#D()),A.addEventListener("error",()=>this.#D()),A.src=Nt(this.#y,s,T,y,this.tileUrl),this.#u.set(k,A),i.append(A)}A.style.left=`${(w-u)*256}px`,A.style.top=`${(y-d)*256}px`}for(let[y,w]of this.#u)m.has(y)||(w.remove(),this.#u.delete(y));this.#D()}#D(){if(this.#c||this.#t||!this.#l||this.#u.size===0)return;let t=[...this.#u.values()];if(t.every(e=>e.complete)){if(this.#c=!0,t.every(e=>e.naturalWidth===0)){this.handleError("Failed to load map tiles",this.#g("error-tiles"));return}this.setAttribute("data-ready",""),this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:this.#l.lat,lng:this.#l.lng,zoom:this.zoom}}))}}#F(){this.#r=!0,this._reinit(),this.#b&&this.#O({focus:!0})}#B(){if(this.#a)return;this.#a=!0;let t=this.#x();if(!t||t===location.origin||document.head.querySelector(`link[rel~="preconnect" i][href="${CSS.escape(t)}"]`))return;let e=document.createElement("link");e.rel="preconnect",e.href=t,document.head.appendChild(e)}#O({focus:t=!0}={}){if(this.#t)return Promise.resolve();if(this.#e)return this.#e;if(!this.#l||!this.#b||this.#T)return Promise.resolve();let e=this.#i,i=(async()=>{let{MapInteraction:s}=await Promise.resolve().then(()=>(rs(),ss));if(!this.isConnected||e!==this.#i||this.#t||!this.#l)return;let{container:n,viewport:o,tiles:a,marker:l}=this.#R();if(!n||!o||!a)return;for(let u of this.#u.values())u.remove();this.#u.clear(),n.setAttribute("data-active",""),o.setAttribute("role","region"),o.setAttribute("aria-roledescription","map"),o.setAttribute("aria-describedby",`${this.#h}-help`),o.setAttribute("tabindex","0"),this.setState("active",!0);let{lat:c,lng:h}=this.#l;this.#t=new s({host:this,viewport:o,tiles:a,marker:l,lat:c,lng:h,zoom:this.zoom,provider:this.#y,tileUrl:this.tileUrl,width:this.clientWidth,height:this.clientHeight,onDeactivate:()=>this.#j(),onMove:u=>this.#_(u)}),t&&o.focus({preventScroll:!0}),this.dispatchEvent(new CustomEvent("geo-map:activate",{bubbles:!0,detail:{lat:c,lng:h,zoom:this.zoom}}))})();return this.#e=i,i.finally(()=>{this.#e===i&&(this.#e=null)}),i}#_(t){clearTimeout(this.#v),this.#v=window.setTimeout(()=>{let{status:e}=this.#R();e&&(e.textContent=this.#g("moved",{lat:t.lat.toFixed(4),lng:t.lng.toFixed(4),zoom:t.zoom}))},400)}#j(){if(!this.#t)return;let t=!!this.shadowRoot?.activeElement;this.#n=!0,this._reinit(),t&&this.shadowRoot?.querySelector('[part="activate"]')?.focus()}handleError(t,e=t){let{container:i}=this.#R();i&&(i.setAttribute("data-state","error"),i.setAttribute("data-error",e)),this.dispatchEvent(new CustomEvent("geo-map:error",{bubbles:!0,detail:{message:t}}))}};g("geo-map",be);var os="popover"in HTMLElement.prototype;var us=null;function vn(){return us??=Promise.resolve().then(()=>(ye(),ve)),us}var yn=150,ds="vb-emoji-recent",rt=8,ps=4,wn=0,kn={Trigger:"Open emoji picker",Dialog:"Emoji picker",Search:"Search emoji",Placeholder:"Search emoji\u2026",Categories:"Emoji categories",Emoji:"Emoji",Recent:"Recently used",Empty:"No emoji found",Results:"{count} emoji found"},we=class extends b{#t=null;#e;#i;#s;#r;#n;#a;#c;#h=new Map;#l=new WeakMap;#o=null;#u=!1;#p=!1;#d=!1;#f=!1;#k=-1;#w=0;#m=null;#v;#y=()=>{};#g=null;#b="";#T=null;#A=null;#x=new Set;#S=!1;#E=null;#L=null;constructor(){super(),this.#v=new Promise(t=>{this.#y=t})}get ready(){return this.#v}get isOpen(){return this.#u}setup(){if(this.#d)return!1;this.#d=!0,this.#P(),this.listen(this,"click",this.#rt),this.listen(this,"keydown",this.#nt),this.listen(this,"focusout",this.#st),this.listen(this,"focusin",this.#tt);let t=++this.#w;return vn().then(e=>{if(t!==this.#w||!this.isConnected)return;this.#T=e,this.#p||this.#N(),this.listen(document,"click",this.#it),this.listen(document,e.EXTENDED_EVENT,this.#X),this.setAttribute("data-upgraded",""),this.#y(),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent("emoji-picker:upgraded",{bubbles:!0}))});let i=this.#m;this.#m=null,i==="open"&&this.open()}).catch(e=>{console.error("[emoji-picker] failed to load emoji data",e)}),!1}teardown(){this.#w++,this.#d=!1,this.#m=null,this.#g&&(clearTimeout(this.#g),this.#g=null,this.setState("search-pending",!1)),this.#u&&this.close()}#C(t,e){return this.dataset[`label${t}`]||e||kn[t]||""}#$(t){if(t==="recent")return this.#C("Recent");let e=t.charAt(0).toUpperCase()+t.slice(1);return this.#C(e,this.#T.EMOJI_GROUP_LABELS[t]||t)}#P(){let t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button");t||(t=document.createElement("button"),t.type="button",t.textContent="\u{1F600}",t.setAttribute("data-trigger",""),this.prepend(t)),this.#t=t,t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",String(this.#u)),!t.hasAttribute("aria-label")&&!/\p{L}/u.test(t.textContent||"")&&t.setAttribute("aria-label",this.#C("Trigger"))}#N(){let t=`emoji-picker-${++wn}`;this.#e=document.createElement("div"),this.#e.className="picker",this.#e.id=`${t}-panel`,this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label",this.#C("Dialog")),this.#e.hidden=!0,this.#S=os,this.#S&&this.#e.setAttribute("popover","manual"),this.#t?.setAttribute("aria-controls",this.#e.id),this.#i=document.createElement("input"),this.#i.type="search",this.#i.placeholder=this.#C("Placeholder"),this.#i.autocomplete="off",this.#i.spellcheck=!1,this.#i.setAttribute("aria-label",this.#C("Search")),this.#i.setAttribute("aria-controls",`${t}-listbox`),this.#i.addEventListener("input",this.#G),this.#s=document.createElement("div"),this.#s.className="categories",this.#s.setAttribute("role","toolbar"),this.#s.setAttribute("aria-label",this.#C("Categories")),this.#T.EMOJI_GROUPS.forEach((e,i)=>{let s=document.createElement("button");s.type="button",s.dataset.group=e,s.tabIndex=i===0?0:-1,s.setAttribute("aria-label",this.#$(e)),s.title=this.#$(e),s.textContent=this.#T.EMOJI_GROUP_ICONS[e],this.#s.appendChild(s)}),this.#r=document.createElement("div"),this.#r.className="grid",this.#r.id=`${t}-listbox`,this.#r.setAttribute("role","listbox"),this.#r.setAttribute("aria-label",this.#C("Emoji")),this.#c=this.#I("recent"),this.#r.appendChild(this.#c);for(let e of this.#T.EMOJI_GROUPS){let i=this.#I(e);this.#h.set(e,i),this.#r.appendChild(i)}this.#n=document.createElement("p"),this.#n.className="no-results",this.#n.textContent=this.#C("Empty"),this.#n.hidden=!0,this.#a=document.createElement("p"),this.#a.className="status",this.#a.setAttribute("role","status"),this.#e.append(this.#i,this.#s,this.#r,this.#n,this.#a),this.appendChild(this.#e),this.#z(),this.#p=!0}#I(t){let e=document.createElement("div");return e.className="group",e.dataset.group=t,e.setAttribute("role","group"),e.setAttribute("aria-label",this.#$(t)),e}#M(t){let e=document.createElement("span");return e.className="group-label",e.setAttribute("aria-hidden","true"),e.textContent=this.#$(t),e}#R(t){let e=document.createElement("button");return e.type="button",e.setAttribute("role","option"),e.tabIndex=-1,e.dataset.shortcode=t.shortcode,e.setAttribute("aria-label",t.name),e.title=`:${t.shortcode}:`,e.textContent=t.emoji,e}#z(){let t=new Map;for(let e of this.#T.EMOJI_GROUPS){let i=this.#h.get(e),s=[this.#M(e)];for(let n of this.#T.getByGroup(e)){let o=t.get(n.emoji);if(o){o.aliases.push(n.shortcode);continue}let a=this.#R(n),l={entry:n,aliases:[]};t.set(n.emoji,l),this.#l.set(a,l),s.push(a)}i.replaceChildren(...s)}this.#k=this.#T.extendedCount(),this.#o=null}#D(){let t=[];for(let e of this.#ct()){let i=this.#T.resolveEmoji(e);if(!i)continue;let s=this.#R(i);this.#l.set(s,{entry:i,aliases:[]}),t.push(s)}t.length&&t.unshift(this.#M("recent")),this.#c.replaceChildren(...t),this.#o=null}#F(t,e){let{entry:i,aliases:s}=t;return i.shortcode.includes(e)||i.name.toLowerCase().includes(e)||(i.keywords?.some(n=>n.includes(e))??!1)||s.some(n=>n.includes(e))}#B(){let t=this.#b.toLowerCase(),e=0;this.#c.hidden=!!t||this.#c.childElementCount===0;for(let i of this.#h.values()){let s=!1;for(let n of i.querySelectorAll('[role="option"]')){let o=this.#l.get(n),a=!t||(o?this.#F(o,t):!1);n.hidden=!a,a&&(s=!0,e++)}i.hidden=!s}this.#n.hidden=e>0,this.#a.textContent=t?e>0?this.#C("Results").replace("{count}",String(e)):this.#C("Empty"):"",(!this.#o||!this.#O(this.#o))&&this.#j(this.#_()[0]??null,!1)}#O(t){return t.isConnected&&!t.hidden&&!t.parentElement.hidden}#_(){return[...this.#r.querySelectorAll('[role="option"]')].filter(t=>this.#O(t))}#j(t,e){this.#o&&this.#o!==t&&(this.#o.tabIndex=-1),this.#o=t,t&&(t.tabIndex=0,e&&(t.focus({preventScroll:!0}),t.scrollIntoView({block:"nearest"})))}#K(t,e){if(t){for(let i of this.#s.querySelectorAll("button"))i.tabIndex=i===t?0:-1;e&&t.focus()}}#U(t){let e;for(let i of this.#s.querySelectorAll("button"))i.dataset.group===t?(i.setAttribute("aria-current","true"),e=i):i.removeAttribute("aria-current");e&&!this.#s.contains(document.activeElement)&&this.#K(e,!1)}#W(){if(this.#A?.disconnect(),this.#x.clear(),!(typeof IntersectionObserver>"u")){this.#A=new IntersectionObserver(t=>{for(let i of t)i.isIntersecting?this.#x.add(i.target):this.#x.delete(i.target);let e=[...this.#r.children].find(i=>this.#x.has(i));this.#U(e?.dataset.group)},{root:this.#r,rootMargin:"-2px 0px -75% 0px"});for(let t of this.#r.children)this.#A.observe(t)}}#H(){return getComputedStyle(this).direction==="rtl"}#q(t,e,i){let s=t[e].getBoundingClientRect(),n=s.left+s.width/2,o=null,a=null,l=1/0;for(let c=e+i;c>=0&&c<t.length;c+=i){let h=t[c].getBoundingClientRect();if(o===null){if(Math.abs(h.top-s.top)<=ps)continue;o=h.top}else if(Math.abs(h.top-o)>ps)break;let u=Math.abs(h.left+h.width/2-n);u<l&&(l=u,a=t[c])}return a}#J(t,e){let i=this.#_(),s=i.indexOf(t);if(s<0)return!1;let n=this.#H(),o=null;switch(e){case"ArrowRight":o=i[n?s-1:s+1];break;case"ArrowLeft":o=i[n?s+1:s-1];break;case"ArrowDown":o=this.#q(i,s,1);break;case"ArrowUp":if(o=this.#q(i,s,-1),!o)return this.#i.focus(),!0;break;case"Home":o=i[0];break;case"End":o=i[i.length-1];break;case"PageDown":{o=i.slice(s+1).find(l=>l.parentElement!==t.parentElement)??i[i.length-1];break}case"PageUp":{let a=i.find(l=>l.parentElement===t.parentElement);if(a&&a!==t)o=a;else{let l=i[s-1]?.parentElement;o=l?i.find(c=>c.parentElement===l):i[0]}break}default:return!1}return o&&this.#j(o,!0),!0}#Z(t,e){let i=[...this.#s.querySelectorAll("button")],s=i.indexOf(t),n=this.#H(),o=-1;if(e==="ArrowRight")o=n?s-1:s+1;else if(e==="ArrowLeft")o=n?s+1:s-1;else if(e==="Home")o=0;else if(e==="End")o=i.length-1;else return!1;return o=(o+i.length)%i.length,this.#K(i[o],!0),!0}#et(){let t=this.getAttribute("for");return t?document.getElementById(t):null}#Q(){let t=this.#et();if(this.#E=null,this.#L=null,!!t){if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=null,i=null;try{e=t.selectionStart,i=t.selectionEnd}catch{}e!==null&&i!==null&&(this.#E={start:e,end:i})}else if(t.isContentEditable){let e=window.getSelection();if(e&&e.rangeCount>0){let i=e.getRangeAt(0);t.contains(i.commonAncestorContainer)&&(this.#L=i.cloneRange())}}}}#rt=t=>{let e=t.target.closest?.("button");if(!(!e||!this.contains(e))){if(e===this.#t){this.toggle();return}this.#p&&(e.parentElement===this.#s?this.#Y(e):e.getAttribute("role")==="option"&&this.#V(e))}};#it=t=>{this.#u&&!this.contains(t.target)&&this.close()};#st=t=>{if(!this.#u||this.#f)return;let e=t.relatedTarget;e&&!this.contains(e)&&this.close()};#tt=t=>{let e=t.target;e.getAttribute?.("role")==="option"&&e!==this.#o&&this.#j(e,!1)};#nt=t=>{if(!this.#u)return;if(t.key==="Escape"){t.preventDefault(),t.stopPropagation(),this.close(),this.#t?.focus();return}let e=t.target;if(t.altKey||t.metaKey)return;let i=!1;if(e===this.#i){if(t.key==="ArrowDown"){let s=this.#o&&this.#O(this.#o)?this.#o:this.#_()[0];s&&this.#j(s,!0),i=!0}}else e.parentElement===this.#s?i=this.#Z(e,t.key):e.getAttribute("role")==="option"&&(i=this.#J(e,t.key));i&&t.preventDefault()};#G=()=>{this.#g&&clearTimeout(this.#g),this.setState("search-pending",!0),this.#g=setTimeout(()=>{this.#g=null,this.setState("search-pending",!1),this.#b=this.#i.value.trim(),this.#B(),this.#r.scrollTop=0},yn)};#X=()=>{this.#u&&(this.#z(),this.#B(),this.#W())};#Y(t){let e=t.dataset.group||"";this.#b&&(this.#g&&(clearTimeout(this.#g),this.#g=null),this.setState("search-pending",!1),this.#i.value="",this.#b="",this.#B()),this.#K(t,!1),this.#U(e);let i=this.#h.get(e);if(!i)return;let s=matchMedia("(prefers-reduced-motion: reduce)").matches;this.#r.scrollTo({top:i.offsetTop,behavior:s?"auto":"smooth"});let n=i.querySelector('[role="option"]:not([hidden])');n&&this.#j(n,!1)}#V(t){let e=this.#l.get(t);if(!e)return;let{entry:i}=e;this.#j(t,!1),this.#f=!0;try{this.#ut(i.shortcode);let s=this.#at(i.emoji);this.dispatchEvent(new CustomEvent("emoji-picker:select",{bubbles:!0,detail:{shortcode:i.shortcode,emoji:i.emoji,name:i.name,keywords:i.keywords}})),this.close(),s||this.#t?.focus()}finally{this.#f=!1}}#at(t){let e=this.#et();if(!e)return!1;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){e.focus();let i=this.#E;if(i)try{e.setSelectionRange(i.start,i.end)}catch{}if(!this.#lt(t)){let s=e.value.length;try{e.setRangeText(t,i?.start??s,i?.end??s,"end")}catch{e.value+=t}e.dispatchEvent(new InputEvent("input",{bubbles:!0,inputType:"insertText",data:t}))}try{let s=e.selectionEnd;this.#E=s===null?null:{start:s,end:s}}catch{this.#E=null}return!0}if(e.isContentEditable){e.focus();let i=window.getSelection();if(!i)return!0;let s=this.#L;if((!s||!e.contains(s.commonAncestorContainer))&&(s=document.createRange(),s.selectNodeContents(e),s.collapse(!1)),i.removeAllRanges(),i.addRange(s),!this.#lt(t)){let n=i.getRangeAt(0);n.deleteContents();let o=document.createTextNode(t);n.insertNode(o),n.setStartAfter(o),n.collapse(!0),i.removeAllRanges(),i.addRange(n),e.dispatchEvent(new InputEvent("input",{bubbles:!0,inputType:"insertText",data:t}))}return this.#L=i.rangeCount?i.getRangeAt(0).cloneRange():null,!0}return!1}#lt(t){try{return document.execCommand("insertText",!1,t)}catch{return!1}}#ct(){try{let t=JSON.parse(localStorage.getItem(ds)||"[]");return Array.isArray(t)?t:[]}catch{return[]}}#ut(t){let e=parseInt(this.getAttribute("recent-limit")??"24",10)||24,i=this.#ct();i=i.filter(s=>s!==t),i.unshift(t),i.length>e&&(i.length=e);try{localStorage.setItem(ds,JSON.stringify(i))}catch{}}#ht(){if(!this.#S||!this.#u||!this.#t)return;let t=this.#t.getBoundingClientRect(),e=this.#e.offsetWidth,i=this.#e.offsetHeight,s=document.documentElement.clientWidth,n=document.documentElement.clientHeight,o=this.#H()?t.right-e:t.left;o=Math.max(rt,Math.min(o,s-e-rt));let a=t.bottom+4;a+i>n-rt&&t.top-i-4>=rt&&(a=t.top-i-4),a=Math.max(rt,Math.min(a,n-i-rt)),this.#e.style.setProperty("--picker-top",`${Math.round(a)}px`),this.#e.style.setProperty("--picker-left",`${Math.round(o)}px`)}#ot=t=>{t.type==="scroll"&&this.#e.contains(t.target)||this.#ht()};open(){if(!this.#p){this.#m="open";return}if(!(this.#u||!this.isConnected)){if(this.#Q(),this.#T.extendedCount()!==this.#k&&this.#z(),this.#D(),this.#i.value="",this.#b="",this.#B(),this.#u=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#e.hidden=!1,this.#S){try{this.#e.showPopover()}catch{}this.#ht(),window.addEventListener("scroll",this.#ot,{capture:!0,passive:!0}),window.addEventListener("resize",this.#ot,{passive:!0})}this.#r.scrollTop=0,this.#W(),this.#i.focus(),this.dispatchEvent(new CustomEvent("emoji-picker:open",{bubbles:!0}))}}close(){if(!this.#p){this.#m=null;return}if(this.#u){if(this.#u=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#S){try{this.#e.hidePopover()}catch{}window.removeEventListener("scroll",this.#ot,{capture:!0}),window.removeEventListener("resize",this.#ot)}this.#e.hidden=!0,this.#A?.disconnect(),this.#A=null,this.dispatchEvent(new CustomEvent("emoji-picker:close",{bubbles:!0}))}}toggle(){if(!this.#p){this.#m=this.#m==="open"?null:"open";return}this.#u?this.close():this.open()}};g("emoji-picker",we);var nt="data-drag-surface-controls",An="data-drag-surface-live",ke=class r extends b{static observedAttributes=["disabled","data-move-controls","orientation","group","aria-label"];#t=null;#e=null;#i=null;#s=null;#r=null;setup(){this.setAttribute("role","list"),r.#H.add(this),this.#h(),this.#o(),this.#v(),this.listen(this,"click",this.#$.bind(this)),this.#n(),this.#c(),this.#r=new MutationObserver(()=>this.#a()),this.#r.observe(this,{childList:!0}),r.#E()}teardown(){this.#r?.disconnect(),this.#r=null,this.#t&&(this.#t.remove(),this.#t=null),this.#e&&this.#S(this.#e,!1),this.#e=null,this.#i=null,this.removeAttribute("data-reorder-mode"),this.removeAttribute("data-drag-over"),this.#W(),this.#L(),r.#H.delete(this),r.#q?.source===this&&(r.#q=null),r.#E()}attributeChangedCallback(t,e,i){e===i||!this.hasAttribute("data-upgraded")||(t==="disabled"&&this.#c(),r.#E())}get draggableChildren(){return[...this.querySelectorAll(':scope > [draggable="true"]')]}get group(){return this.getAttribute("group")||null}get orientation(){return this.getAttribute("orientation")==="horizontal"?"horizontal":"vertical"}get disabled(){return this.hasAttribute("disabled")}set disabled(t){this.toggleAttribute("disabled",!!t)}get sortedOrder(){return this.draggableChildren.map(t=>t.dataset.id)}#n(){for(let t of this.draggableChildren)t.getAttribute("role")||t.setAttribute("role","listitem"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0")}#a(){this.#n(),this.#e&&this.#e.parentElement!==this&&(this.#S(this.#e,!1),this.#e=null,this.#i=null,this.removeAttribute("data-reorder-mode")),r.#E()}#c(){this.disabled?(this.setAttribute("aria-disabled","true"),this.#e&&this.#x()):this.removeAttribute("aria-disabled")}#h(){let t=document.createElement("span");t.setAttribute(An,""),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),this.after(t),this.#t=t}#l(t){let e=this.#t;e&&(e.textContent="",requestAnimationFrame(()=>{e.textContent=t}))}#o(){this.listen(this,"pointerdown",t=>{this.#s=t.target}),this.listen(this,"dragstart",this.#u.bind(this)),this.listen(this,"dragover",this.#d.bind(this)),this.listen(this,"dragleave",this.#f.bind(this)),this.listen(this,"drop",this.#k.bind(this)),this.listen(this,"dragend",this.#w.bind(this))}#u(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this)return;if(this.disabled){t.preventDefault();return}let i=e.querySelector("[data-drag-handle]");if(i&&!i.contains(this.#s)){t.preventDefault();return}e.setAttribute("data-dragging",""),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.dataset.id||""),t.dataTransfer.setData("application/x-drag-surface-group",this.group||"");let s=this.#B(e);r.#q={item:e,source:this,originalIndex:s},this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}#p(t){return this.disabled?!1:this.group||t.group?this.group===t.group:t===this}#d(t){let e=r.#q;!e||!this.#p(e.source)||(t.preventDefault(),t.dataTransfer.dropEffect="move",this.setAttribute("data-drag-over",""),this.#U(t.clientX,t.clientY))}#f(t){t.relatedTarget&&!this.contains(t.relatedTarget)&&(this.removeAttribute("data-drag-over"),this.#W())}#k(t){let e=r.#q;if(!e||!this.#p(e.source))return;t.preventDefault();let{item:i,source:s,originalIndex:n}=e,o=this.#K(t.clientX,t.clientY);r.#m(),s===this?(this.#O(i,o),this.#_(),this.#M(i),this.#N(i,n)):(this.#O(i,o),this.#_(),s.#_(),this.#M(i),this.#I(i,s))}#w(){let t=r.#q;r.#m(),r.#q=null,(t?.source??this).dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0}))}static#m(){r.#q?.item.removeAttribute("data-dragging");for(let t of r.#H)t.removeAttribute("data-drag-over"),t.#W()}#v(){this.listen(this,"keydown",this.#g.bind(this)),this.listen(this,"focusout",this.#b.bind(this))}#y(t){let e=t.closest('[draggable="true"]');if(!e||e.parentElement!==this)return null;if(t===e)return e;let i=e.querySelector("[data-drag-handle]");return i&&i===t?e:null}#g(t){let e=this.#y(t.target);if(!e||this.disabled||t.altKey||t.ctrlKey||t.metaKey)return;let i=t.target,s=this.#e===e,n=this.orientation==="horizontal",o=this.#z(),a=n?o?"ArrowRight":"ArrowLeft":"ArrowUp",l=n?o?"ArrowLeft":"ArrowRight":"ArrowDown";if(t.key===" "||t.key==="Enter"){t.preventDefault(),s?this.#A(e):this.#T(e);return}if(t.key===a||t.key===l){t.preventDefault();let u=this.draggableChildren,p=u.indexOf(e),d=t.key===a?Math.max(0,p-1):Math.min(u.length-1,p+1);if(d===p)return;if(!s){u[d].focus();return}this.#O(e,d),i.focus(),this.#l(`Position ${d+1} of ${u.length}`);return}let c=n?"ArrowUp":"ArrowLeft",h=n?"ArrowDown":"ArrowRight";if(s&&(t.key===c||t.key===h)){t.preventDefault();let u=this.#R(t.key===h?1:-1);if(!u)return;this.#e=null,this.#i=null,this.removeAttribute("data-reorder-mode"),this.#P(u,e),i.focus(),u.#e=e,u.#i=u.#B(e),u.setAttribute("data-reorder-mode",""),u.#l(`Moved to ${u.#D()}`);return}t.key==="Escape"&&(t.preventDefault(),s?this.#x():e.blur())}#b(){setTimeout(()=>{let t=this.#e;t&&!t.contains(document.activeElement)&&this.#x()},0)}#T(t){this.#e&&this.#e!==t&&this.#x(),this.#i=this.#B(t),this.#e=t,this.#S(t,!0),this.setAttribute("data-reorder-mode","");let e=this.draggableChildren.length;this.#l(`${this.#F(t)}, grabbed. Position ${this.#i+1} of ${e}. Use arrow keys to move, Enter to drop, Escape to cancel.`),this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}#A(t){let e=this.#i;this.#e=null,this.#i=null,this.#S(t,!1),this.removeAttribute("data-reorder-mode"),this.#_(),this.#M(t);let i=this.#B(t);this.#l(`${this.#F(t)}, dropped at position ${i+1} of ${this.draggableChildren.length}`),this.#N(t,e),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0}))}#x(){let t=this.#e;if(!t)return;let e=this.#i;if(this.#e=null,this.#i=null,this.#S(t,!1),this.removeAttribute("data-reorder-mode"),e!=null&&t.parentElement===this&&this.#B(t)!==e){let i=t.contains(document.activeElement)?document.activeElement:null;this.#O(t,e),i?.focus()}this.#l("Reorder cancelled"),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0}))}#S(t,e){t.toggleAttribute("data-grabbed",e);let i=t.querySelector("[data-drag-handle]");i&&(i.localName==="button"||i.getAttribute("role")==="button")&&i.setAttribute("aria-pressed",String(e)),e?t.hasAttribute("aria-description")||(t.setAttribute("aria-description","Grabbed"),t.setAttribute("data-drag-surface-description","")):t.hasAttribute("data-drag-surface-description")&&(t.removeAttribute("aria-description"),t.removeAttribute("data-drag-surface-description"))}static#E(){for(let t of r.#H)t.#C()}#L(){for(let t of this.querySelectorAll(`:scope > [draggable="true"] > [${nt}]`))t.remove()}#C(){if(!this.isConnected)return;if(!this.hasAttribute("data-move-controls")){this.#L();return}let t=this.draggableChildren,e=this.orientation==="horizontal",i=this.#z(),s=this.disabled,n=this.#R(-1),o=this.#R(1),a=e?i?"right":"left":"up",l=e?i?"left":"right":"down",c={up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192"},h=e?c.up:c.left,u=e?c.down:c.right;t.forEach((p,d)=>{let f=p.querySelector(`:scope > [${nt}]`);if(!f){f=document.createElement("span"),f.setAttribute(nt,"");for(let w of["prev","next","to-prev","to-next"]){let k=document.createElement("button");k.type="button",k.className="ghost small",k.dataset.move=w,f.append(k)}p.append(f)}let m=this.#F(p),y=(w,k,A,T,j=!1)=>{let R=f.querySelector(`[data-move="${w}"]`);R.textContent!==k&&(R.textContent=k),R.setAttribute("aria-label",A),R.setAttribute("aria-disabled",String(T)),R.hidden=j};y("prev",c[a],`Move ${m} ${a}`,s||d===0),y("next",c[l],`Move ${m} ${l}`,s||d===t.length-1),y("to-prev",h,n?`Move ${m} to ${n.#D()}`:"",s,!n),y("to-next",u,o?`Move ${m} to ${o.#D()}`:"",s,!o)})}#$(t){let e=t.target.closest(`[${nt}] > button[data-move]`);if(!e)return;let i=e.closest('[draggable="true"]');if(!i||i.parentElement!==this||(t.preventDefault(),this.disabled||e.getAttribute("aria-disabled")==="true"))return;this.#e&&(this.#S(this.#e,!1),this.#e=null,this.#i=null,this.removeAttribute("data-reorder-mode"));let s=e.dataset.move,n=this;if(s==="prev"||s==="next"){let a=this.#B(i),l=a+(s==="prev"?-1:1);if(l<0||l>=this.draggableChildren.length)return;this.#O(i,l),this.#_(),this.#M(i),this.#l(`${this.#F(i)}, moved to position ${l+1} of ${this.draggableChildren.length}`),this.#N(i,a)}else{let a=this.#R(s==="to-next"?1:-1);if(!a)return;this.#P(a,i),a.#l(`${a.#F(i)}, moved to ${a.#D()}`),n=a}r.#E();let o=i.querySelector(`[${nt}] > [data-move="${s}"]`);o&&!o.hidden?o.focus():n.isConnected&&i.focus()}#P(t,e){t.appendChild(e),t.#_(),this.#_(),t.#M(e),t.#I(e,this)}#N(t,e){this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:t,itemId:t.dataset.id,oldIndex:e,newIndex:this.#B(t),order:this.sortedOrder}}))}#I(t,e){this.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:t,itemId:t.dataset.id,fromSurface:e,toSurface:this,newIndex:this.#B(t),fromOrder:e.sortedOrder,toOrder:this.sortedOrder}}))}#M(t){t.setAttribute("data-just-dropped",""),t.addEventListener("animationend",()=>{t.removeAttribute("data-just-dropped")},{once:!0}),setTimeout(()=>t.removeAttribute("data-just-dropped"),500)}#R(t){if(!this.group)return null;let e=[...r.#H].filter(n=>n===this||n.group===this.group&&n.isConnected&&!n.disabled);if(e.length<2)return null;let i=this.orientation==="horizontal",s=new Map(e.map(n=>[n,n.getBoundingClientRect()]));return e.sort((n,o)=>{let a=s.get(n),l=s.get(o);return i?a.top-l.top||a.left-l.left:a.left-l.left||a.top-l.top}),e[e.indexOf(this)+t]||null}#z(){return getComputedStyle(this).direction==="rtl"}#D(){let t=this.getAttribute("aria-label");if(t)return t;let e=this.getAttribute("aria-labelledby");if(e){let i=e.split(/\s+/).map(s=>document.getElementById(s)?.textContent.trim()).filter(Boolean).join(" ");if(i)return i}return"another list"}#F(t){let e=t.getAttribute("aria-label");if(e)return e;let i=t.cloneNode(!0);for(let n of i.querySelectorAll(`[${nt}], [aria-hidden="true"], [data-drag-handle]:not(:has(*))`))n.remove();return i.textContent.replace(/\s+/g," ").trim().slice(0,40)||t.dataset.id||"Item"}#B(t){return this.draggableChildren.indexOf(t)}#O(t,e){let s=this.draggableChildren.filter(n=>n!==t)[e]||null;s?this.insertBefore(t,s):this.appendChild(t)}#_(){this.draggableChildren.forEach((t,e)=>{t.dataset.sortOrder=String(e+1)})}#j(t,e){let i=this.orientation==="horizontal",s=i&&this.#z(),n=this.draggableChildren.filter(o=>!o.hasAttribute("data-dragging"));for(let o=0;o<n.length;o++){let a=n[o].getBoundingClientRect(),l;if(i?s?l=t>a.left+a.width/2:l=t<a.left+a.width/2:l=e<a.top+a.height/2,l)return{index:o,children:n}}return{index:n.length,children:n}}#K(t,e){return this.#j(t,e).index}#U(t,e){this.#W();let{index:i,children:s}=this.#j(t,e);i<s.length?s[i].setAttribute("data-drop-target","before"):s.length>0&&s[s.length-1].setAttribute("data-drop-target","after")}#W(){for(let t of this.querySelectorAll("[data-drop-target]"))t.removeAttribute("data-drop-target")}static#H=new Set;static#q=null};g("drag-surface",ke);var D=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),fs={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",option:"\u2325",shift:"\u21E7",ctrl:"\u2303",control:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift",ctrl:"Ctrl",control:"Ctrl"}},ms={mac:{meta:"Command",cmd:"Command",alt:"Option",option:"Option",shift:"Shift",ctrl:"Control",control:"Control"},other:{meta:"Control",cmd:"Control",alt:"Alt",option:"Alt",shift:"Shift",ctrl:"Control",control:"Control"}},xn={escape:{label:"Esc",spoken:"Escape"},esc:{label:"Esc",spoken:"Escape"},enter:{label:"Enter",spoken:"Enter"},return:{label:"Enter",spoken:"Enter"},tab:{label:"Tab",spoken:"Tab"},space:{label:"Space",spoken:"Space"},backspace:{label:"Backspace",spoken:"Backspace"},delete:{label:"Del",spoken:"Delete"},del:{label:"Del",spoken:"Delete"},insert:{label:"Ins",spoken:"Insert"},home:{label:"Home",spoken:"Home"},end:{label:"End",spoken:"End"},pageup:{label:"PgUp",spoken:"Page up"},pagedown:{label:"PgDn",spoken:"Page down"},arrowup:{label:"\u2191",spoken:"Up arrow"},up:{label:"\u2191",spoken:"Up arrow"},arrowdown:{label:"\u2193",spoken:"Down arrow"},down:{label:"\u2193",spoken:"Down arrow"},arrowleft:{label:"\u2190",spoken:"Left arrow"},left:{label:"\u2190",spoken:"Left arrow"},arrowright:{label:"\u2192",spoken:"Right arrow"},right:{label:"\u2192",spoken:"Right arrow"},"+":{label:"+",spoken:"Plus"},plus:{label:"+",spoken:"Plus"}};function $t(r){return[...String(r??"").trim().toLowerCase().matchAll(/([^+]+|\+)(?:\+|$)/g)].map(e=>e[1].trim()).filter(Boolean).map(e=>e==="plus"?"+":e)}function Ae(r,t=D){let e=t?fs.mac:fs.other;if(r in e)return{label:e[r],spoken:(t?ms.mac:ms.other)[r],modifier:!0};let i=xn[r];if(i)return{...i,modifier:!1};let s=r.toUpperCase();return{label:s,spoken:s,modifier:!1}}function zt(r){return $t(r).map(t=>Ae(t).label).join(D?"":"+")}var En={esc:"escape",return:"enter",del:"delete",ins:"insert",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",space:" ",spacebar:" ",plus:"+",pgup:"pageup",pgdn:"pagedown"};function Sn(r){let t=String(r??"").toLowerCase();return En[t]??t}function vt(r){let t=$t(r);return{key:Sn(t.pop()??""),meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl")||t.includes("control"),shift:t.includes("shift"),alt:t.includes("alt")||t.includes("option")}}function gs(r){return r.length===1&&!/[a-z0-9 ]/.test(r)}function bs(r,t){let i=(r.key==="Spacebar"?" ":String(r.key??"").toLowerCase())===t.key;if(!i&&(r.altKey||r.shiftKey)&&/^[a-z0-9]$/.test(t.key)){let o=/\d/.test(t.key)?`Digit${t.key}`:`Key${t.key.toUpperCase()}`;i=r.code===o}if(!i)return!1;let s,n;return D?(s=t.meta,n=t.ctrl):(s=!1,n=t.meta||t.ctrl),!(s!==r.metaKey||n!==r.ctrlKey||!gs(t.key)&&t.shift!==r.shiftKey||t.alt!==r.altKey)}function Bt(r){let t=typeof r=="string"?vt(r):r;return!t.meta&&!t.ctrl&&!t.alt&&t.key.length===1}function vs(r,t){let e=vt(r),i=vt(t),s=D?e.ctrl:e.ctrl||e.meta,n=D?i.ctrl:i.ctrl||i.meta,o=D&&e.meta,a=D&&i.meta,l=!gs(e.key);return e.key===i.key&&s===n&&o===a&&e.alt===i.alt&&(!l||e.shift===i.shift)}var xe="data-char-shortcuts",ys="vb:char-shortcuts-change",Cn="vb:settings:extensions";function yt(){return typeof document>"u"?!0:document.documentElement.getAttribute(xe)!=="off"}function Tn(){try{let r=globalThis.localStorage?.getItem(Cn);if(!r)return null;let t=JSON.parse(r)?.data?.charShortcuts;return typeof t=="boolean"?t:null}catch{return null}}var Ln=!0;if(typeof document<"u"){let r=Tn();r===null&&(Ln=yt()),r===!1?document.documentElement.setAttribute(xe,"off"):r===!0&&document.documentElement.removeAttribute(xe)}var Mn=new Set(["INPUT","TEXTAREA","SELECT"]),wt=[],ws=!1;function Rn(r){let t=r;return!t||!t.tagName?!1:Mn.has(t.tagName)||t.isContentEditable}function _n(r){if(r.repeat||r.isComposing||r.defaultPrevented)return;let t=Rn(r.target),e=!yt(),i=document.activeElement;for(let s of wt)if(!(t&&!s.global)&&!(s.scope&&!(s.scope.isConnected&&s.scope.contains(i)))&&!(e&&s.character&&!s.scope)&&!(s.enabled&&!s.enabled())&&bs(r,s.descriptor)){r.preventDefault(),s.callback(r);return}}function Nn(){ws||(document.addEventListener("keydown",_n),ws=!0)}function G(r,t,e={}){Nn();let i=vt(r),s={combo:r,descriptor:i,callback:t,global:e.global===!0,scope:e.scope??null,enabled:typeof e.enabled=="function"?e.enabled:null,character:Bt(i)},n=wt.find(o=>!o.scope&&!s.scope&&vs(o.combo,r));return n&&console.warn(`[hotkey-bind] Shortcut "${r}" is already bound as "${n.combo}". Last-bound wins.`),wt.unshift(s),function(){let a=wt.indexOf(s);a!==-1&&wt.splice(a,1)}}var Pn=0,Ee=class extends b{#t=null;#e;#i;#s=[];#r=-1;#n=[];#a=[];#c=[];#h="";#l=0;setup(){this.#h=`cmdp-${++Pn}`,this.#l=0,this.#o(),this.#p(),this.hasAttribute("discover")&&this.#v()}teardown(){this.#a.forEach(t=>t()),this.#a=[],this.#t?.remove(),this.#t=null,this.#s=[],this.#n=[],this.#c=[],this.#r=-1}get commands(){let t=[];for(let e of this.querySelectorAll("command-group")){let i=e.getAttribute("label")||"";for(let s of e.querySelectorAll("command-item"))t.push({value:s.getAttribute("value")||"",label:s.textContent.trim(),hotkey:s.getAttribute("data-hotkey")||void 0,group:i||void 0})}return t}set commands(t){let e=Array.isArray(t)?t:[],i=new Map;for(let s of e){let n=s.group||"";i.has(n)||i.set(n,[]),i.get(n).push(s)}for(let s of[...this.children])(s.tagName==="COMMAND-GROUP"||s.tagName==="COMMAND-ITEM")&&s.remove();for(let[s,n]of i){let o=document.createElement("command-group");s&&o.setAttribute("label",s);for(let a of n){let l=document.createElement("command-item");if(a.value&&l.setAttribute("value",a.value),a.hotkey&&l.setAttribute("data-hotkey",a.hotkey),a.icon){let c=document.createElement("span");c.setAttribute("slot","icon"),c.innerHTML=a.icon,l.appendChild(c)}l.appendChild(document.createTextNode(a.label||a.value||"")),o.appendChild(l)}this.appendChild(o)}this._reinit(),this.dispatchEvent(new CustomEvent("command-palette:commands-changed",{detail:{commands:e,source:"property"},bubbles:!0}))}#o(){this.#t=document.createElement("dialog"),this.#t.className="command-dialog",this.#t.setAttribute("aria-label",this.getAttribute("label")||"Command palette"),this.#t.addEventListener("click",i=>{i.target===this.#t&&this.close()}),this.#t.addEventListener("close",()=>{this.#e?.setAttribute("aria-expanded","false"),this.#e?.removeAttribute("aria-activedescendant"),this.dispatchEvent(new CustomEvent("command-palette:close",{bubbles:!0}))});let t=document.createElement("div");t.className="command-search",this.#i=document.createElement("div"),this.#i.className="command-list",this.#i.id=`${this.#h}-list`,this.#i.setAttribute("role","listbox"),this.#i.setAttribute("aria-label","Commands"),this.#e=document.createElement("input"),this.#e.type="search",this.#e.placeholder=this.getAttribute("placeholder")||"Type a command...",this.#e.setAttribute("aria-label","Search commands"),this.#e.autocomplete="off",this.#e.setAttribute("role","combobox"),this.#e.setAttribute("aria-autocomplete","list"),this.#e.setAttribute("aria-controls",this.#i.id),this.#e.setAttribute("aria-expanded","false"),this.#e.addEventListener("input",this.#d),this.#e.addEventListener("keydown",this.#f),t.appendChild(this.#e),this.#n=Array.from(this.querySelectorAll("command-group")),this.#n.forEach(i=>{let s=this.#u(i.getAttribute("label")||"");this.#i.appendChild(s),i.querySelectorAll("command-item").forEach(n=>{let o=n.querySelector('[slot="icon"]'),a=this.#b(n.textContent.trim(),o?o.cloneNode(!0):null,n.getAttribute("data-hotkey"));a.dataset.value=n.getAttribute("value")||"",a.addEventListener("click",()=>{this.#m(a.dataset.value)}),s.appendChild(a),this.#s.push({btn:a,group:s,source:n})})});let e=document.createElement("div");e.className="command-empty",e.textContent="No results found.",e.hidden=!0,this.#i.appendChild(e),this.#t.appendChild(t),this.#t.appendChild(this.#i),this.appendChild(this.#t)}#u(t){let e=document.createElement("div");e.className="command-group",e.setAttribute("role","group");let i=document.createElement("div");return i.className="command-group-header",i.id=`${this.#h}-g${++this.#l}`,i.setAttribute("aria-hidden","true"),i.textContent=t,t?e.setAttribute("aria-labelledby",i.id):i.hidden=!0,e.appendChild(i),e}#p(){let t=this.getAttribute("hotkey")||"meta+k";this.#a.push(G(t,()=>{this.#t?.open?this.close():this.open()},{global:!0}));for(let{btn:e,source:i}of this.#s){let s=i?.getAttribute("data-hotkey");if(!s||s.toLowerCase()===t.toLowerCase())continue;let n=e.dataset.value;this.#a.push(G(s,()=>this.#m(n)))}}#d=()=>{let t=this.#e.value.toLowerCase().trim(),e=0,i=new Set;this.#s.forEach(({btn:n,group:o})=>{let a=!t||(n.dataset.searchText??"").includes(t);n.hidden=!a,a&&(e++,i.add(o))}),this.#i.querySelectorAll(":scope > .command-group").forEach(n=>{n.hidden=!i.has(n)});let s=this.#i.querySelector(".command-empty");s&&(s.hidden=e>0),this.#r=-1,this.#s.forEach(({btn:n})=>{n.removeAttribute("data-active"),n.setAttribute("aria-selected","false")}),this.#e.removeAttribute("aria-activedescendant"),e>0&&this.#w(0)};#f=t=>{let e=this.#k();switch(t.key){case"ArrowDown":t.preventDefault(),this.#w(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#w(this.#r-1);break;case"Enter":t.preventDefault(),this.#r>=0&&e[this.#r]&&e[this.#r].btn.click();break;case"Escape":t.preventDefault(),this.close();break}};#k(){return this.#s.filter(({btn:t})=>!t.hidden)}#w(t){let e=this.#k();if(e.length===0)return;e.forEach(({btn:s})=>{s.removeAttribute("data-active"),s.setAttribute("aria-selected","false")}),t<0&&(t=e.length-1),t>=e.length&&(t=0),this.#r=t;let{btn:i}=e[t];i.setAttribute("data-active",""),i.setAttribute("aria-selected","true"),this.#e.setAttribute("aria-activedescendant",i.id),i.scrollIntoView({block:"nearest"})}#m(t){this.close(),this.dispatchEvent(new CustomEvent("command-palette:select",{bubbles:!0,detail:{value:t}}))}#v(){this.listen(document,"vb:command-registry-change",this.#y)}#y=()=>{this.#t?.open&&(this.#g(),this.#d())};#g(){if(!this.hasAttribute("discover"))return;let{getRegisteredCommands:t,scanAutoDiscoverable:e}=window.__commandRegistry||{};if(!t)return;this.#s=this.#s.filter(n=>!n.discovered),this.#c.forEach(n=>n.remove()),this.#c=[];let i=this.#i.querySelector(".command-empty"),s=t();for(let[n,o]of s){let a=this.#u(n);this.#i.insertBefore(a,i),this.#c.push(a);for(let l of o){if(this.contains(l.element))continue;let c=this.#b(l.label,l.icon,l.shortcut);c.dataset.value=`__discovered:${l.label}`,c.addEventListener("click",()=>{this.close(),l.element.click()}),a.appendChild(c),this.#s.push({btn:c,group:a,source:null,discovered:!0})}}if(this.getAttribute("discover")==="auto"&&e){let n=e(),o=new Map;for(let a of n){let l=o.get(a.group)||[];l.push(a),o.set(a.group,l)}for(let[a,l]of o){let c=this.#u(a);this.#i.insertBefore(c,i),this.#c.push(c);for(let h of l){if(this.contains(h.element))continue;let u=this.#b(h.label,h.icon,h.shortcut);u.dataset.value=`__auto:${h.label}`,u.dataset.auto="",u.addEventListener("click",()=>{this.close(),h.action?h.action():h.element.click()}),c.appendChild(u),this.#s.push({btn:u,group:c,source:null,discovered:!0})}}}}#b(t,e,i){let s=document.createElement("button");if(s.type="button",s.className="command-option",s.id=`${this.#h}-opt-${++this.#l}`,s.setAttribute("role","option"),s.setAttribute("aria-selected","false"),s.tabIndex=-1,s.dataset.searchText=t.toLowerCase(),e){let o=document.createElement("span");if(o.className="command-icon",typeof e=="string"){let a=document.createElement("icon-wc");a.setAttribute("name",e),o.appendChild(a)}else o.appendChild(e);s.appendChild(o)}let n=document.createElement("span");if(n.className="command-label",n.textContent=t,s.appendChild(n),i){let o=document.createElement("kbd");o.className="command-kbd",o.setAttribute("aria-hidden","true"),o.textContent=zt(i),s.appendChild(o),s.setAttribute("aria-keyshortcuts",i)}return s}open(){!this.#t||this.#t.open||(this.#g(),this.#t.showModal(),this.#e.setAttribute("aria-expanded","true"),this.#e.value="",this.#d(),this.#e.focus(),this.dispatchEvent(new CustomEvent("command-palette:open",{bubbles:!0})))}close(){this.#t?.open&&this.#t.close()}get isOpen(){return this.#t?.open??!1}},Se=class extends HTMLElement{},Ce=class extends HTMLElement{};g("command-palette",Ee);g("command-group",Se);g("command-item",Ce);var In="shift+?",$n={title:"Keyboard shortcuts",general:"General",self:"Show keyboard shortcuts",close:"Close"},zn=0,Te=class extends b{static get observedAttributes(){return["hotkey"]}#t=null;#e=null;#i=null;#s=null;setup(){this.#a(),this.#n(),this.listen(window,ys,()=>{this.#t?.open&&this.#l()})}teardown(){this.#i?.(),this.#i=null,this.#t?.remove(),this.#t=null,this.#e=null}attributeChangedCallback(t,e,i){t==="hotkey"&&e!==i&&this.hasAttribute("data-upgraded")&&this.#n()}show(){this.#t&&(this.#l(),this.#t.open||this.#t.showModal())}close(){this.#t?.open&&this.#t.close()}toggle(){this.#t?.open?this.close():this.show()}get open(){return!!this.#t?.open}get hotkey(){let t=(this.getAttribute("hotkey")??"").trim();return t.toLowerCase()==="none"?null:t||In}get shortcuts(){return this.#s}set shortcuts(t){this.#s=t&&typeof t=="object"?t:null,this.#t?.open&&this.#l(),this.dispatchEvent(new CustomEvent("short-cuts:shortcuts-changed",{detail:{shortcuts:this.#s,source:"property"},bubbles:!0}))}#r(t){return this.getAttribute(`data-label-${t}`)||$n[t]}#n(){this.#i?.(),this.#i=null;let t=this.hotkey;t&&(this.#i=G(t,()=>this.toggle()))}#a(){this.querySelector(":scope > dialog.shortcut-dialog")?.remove();let t=`short-cuts-title-${++zn}`,e=document.createElement("dialog");e.className="shortcut-dialog",e.setAttribute("aria-labelledby",t);let i=document.createElement("header");i.className="shortcut-header";let s=document.createElement("h2");s.id=t,s.textContent=this.#r("title");let n=document.createElement("button");n.type="button",n.className="shortcut-close",n.setAttribute("aria-label",this.#r("close"));let o=document.createElement("icon-wc");o.setAttribute("name","x"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),n.appendChild(o),n.addEventListener("click",()=>this.close()),i.append(s,n);let a=document.createElement("section");a.className="shortcut-body",e.append(i,a),e.addEventListener("click",l=>{l.target===e&&e.close()}),this.#t=e,this.#e=a,this.appendChild(e)}#c(){let t=new Map,e=!yt(),i=(l,c=!1)=>!(e&&!c&&Bt(l)),s=this.hotkey;s&&i(s)&&t.set(this.#r("general"),[{label:this.#r("self"),shortcut:s}]);let n=(l,c)=>{if(!c?.shortcut||!i(String(c.shortcut),!!c.scoped))return;let h=t.get(l)||[];h.push({label:String(c.label??""),shortcut:String(c.shortcut)}),t.set(l,h)};if(this.#s){for(let[l,c]of Object.entries(this.#s))Array.isArray(c)&&c.forEach(h=>n(l,h));return t}let{getRegisteredCommands:o}=window.__commandRegistry||{};if(o)for(let[l,c]of o())for(let h of c)n(l,h);let{getHotkeyActions:a}=window.__hotkeyActionRegistry||{};if(a)for(let[l,c]of a())for(let h of c)n(l,h);return t}#h(t){let e=document.createElement("kbd");e.className="shortcut-kbd";let i=document.createElement("span");i.setAttribute("aria-hidden","true"),i.textContent=zt(t);let s=document.createElement("span");return s.className="visually-hidden",s.textContent=$t(t).map(n=>Ae(n,D).spoken).join(" "),e.append(i,s),e}#l(){if(this.#e){this.#e.replaceChildren();for(let[t,e]of this.#c()){if(!e.length)continue;let i=document.createElement("section");i.className="shortcut-group";let s=document.createElement("h3");s.className="shortcut-group-header",s.textContent=t;let n=document.createElement("dl");n.className="shortcut-list";for(let o of e){let a=document.createElement("div");a.className="shortcut-row";let l=document.createElement("dt");l.className="shortcut-label",l.textContent=o.label;let c=document.createElement("dd");c.appendChild(this.#h(o.shortcut)),a.append(l,c),n.appendChild(a)}i.append(s,n),this.#e.appendChild(i)}}}};g("short-cuts",Te);var Bn="Comparison slider";function Le(r){if(r===null||r.trim()==="")return 50;let t=Number(r);return Number.isNaN(t)?50:Math.min(100,Math.max(0,t))}var Me=class extends b{static observedAttributes=["position","label","aria-label"];#t=null;#e=!1;#i=!1;#s=50;setup(){let t=[...this.children].filter(e=>!e.classList.contains("comparison-divider"));return t.length<2?!1:(t.length>2&&console.warn("[compare-surface] Expected exactly 2 children; extra children are hidden."),this.#t=document.createElement("div"),this.#t.className="comparison-divider",this.#t.setAttribute("role","slider"),this.#t.setAttribute("aria-valuemin","0"),this.#t.setAttribute("aria-valuemax","100"),this.#t.setAttribute("aria-orientation","horizontal"),this.#t.setAttribute("tabindex","0"),this.#r(),this.appendChild(this.#t),this.#u(Le(this.getAttribute("position"))),this.listen(this.#t,"pointerdown",this.#a),this.listen(this.#t,"pointermove",this.#c),this.listen(this.#t,"pointerup",this.#h),this.listen(this.#t,"pointercancel",this.#h),this.listen(this.#t,"lostpointercapture",this.#h),this.listen(this.#t,"keydown",this.#l),!0)}teardown(){this.#t?.remove(),this.#t=null,this.#e=!1}attributeChangedCallback(t,e,i){if(!(!this.#t||e===i))if(t==="position"){if(this.#i)return;this.#u(Le(i))}else this.#r()}#r(){if(!this.#t)return;let t=this.getAttribute("label")||this.getAttribute("aria-label")||Bn;this.#t.setAttribute("aria-label",t)}get#n(){return getComputedStyle(this).direction==="rtl"}#a=t=>{t.preventDefault(),this.#e=!0,this.#t?.setPointerCapture(t.pointerId)};#c=t=>{if(!this.#e)return;let e=this.getBoundingClientRect();if(!e.width)return;let i=this.#n?e.right-t.clientX:t.clientX-e.left;this.#o(i/e.width*100)};#h=t=>{this.#e&&(this.#e=!1,this.#t?.hasPointerCapture(t.pointerId)&&this.#t.releasePointerCapture(t.pointerId))};#l=t=>{let e=t.shiftKey?10:1,i=this.#n?-1:1,s=this.#s,n;switch(t.key){case"ArrowRight":n=s+e*i;break;case"ArrowLeft":n=s-e*i;break;case"ArrowUp":n=s+e;break;case"ArrowDown":n=s-e;break;case"PageUp":n=s+10;break;case"PageDown":n=s-10;break;case"Home":n=0;break;case"End":n=100;break;default:return}t.preventDefault(),this.#o(n)};#o(t){let e=this.#s;if(this.#u(Math.min(100,Math.max(0,t))),this.#s!==e){this.#i=!0;try{this.setAttribute("position",String(this.#s))}finally{this.#i=!1}this.dispatchEvent(new CustomEvent("compare-surface:change",{detail:{position:this.#s},bubbles:!0}))}}#u(t){this.#s=Math.round(t),this.style.setProperty("--_position",`${t}%`),this.#t&&(this.#t.setAttribute("aria-valuenow",String(this.#s)),this.#t.setAttribute("aria-valuetext",`${this.#s}%`))}get position(){return this.#t?this.#s:Math.round(Le(this.getAttribute("position")))}set position(t){let e=Number(t),i=Math.round(Math.min(100,Math.max(0,Number.isNaN(e)?0:e)));this.setAttribute("position",String(i))}};g("compare-surface",Me);function jn(){let r=globalThis.localStorage;if(!r)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return r.getItem(t)},async setRaw(t,e){r.setItem(t,e)},async removeRaw(t){r.removeItem(t)},async keys(t){let e=[];for(let i=0;i<r.length;i++){let s=r.key(i);s&&s.startsWith(t)&&e.push(s)}return e}}}var jt="__vbStoreBackend",Ot=globalThis;function F(){return Ot[jt]||(Ot[jt]=jn()),Ot[jt]}function Re(r,t){if(typeof r!="string"||!r)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${r}:${t}`}function ks(r){if(typeof r!="string"||!r)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${r}:`}function As(r){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var _={configure(r={}){Ot[jt]=r.backend??null},async set(r,t,e){let i={data:e,timestamp:Date.now()};await F().setRaw(Re(r,t),JSON.stringify(i))},async get(r,t,e){let i=await F().getRaw(Re(r,t));if(i==null)return null;let s=As(i);return!s||e?.maxAge!=null&&Date.now()-s.timestamp>e.maxAge?null:s.data},async remove(r,t){await F().removeRaw(Re(r,t))},async list(r){let t=ks(r),e=await F().keys(t),i=[];for(let s of e){let n=await F().getRaw(s);if(n==null)continue;let o=As(n);o&&i.push({key:s.slice(t.length),data:o.data,timestamp:o.timestamp})}return i},async clear(r){let t=ks(r),e=await F().keys(t);for(let i of e)await F().removeRaw(i)},async clearAll(){let r=await F().keys("vb:");for(let t of r)await F().removeRaw(t)},async setMany(r,t){for(let[e,i]of t)await _.set(r,e,i)}};if(typeof window<"u"){let r=window.VB??(window.VB={});r.store??=_}var On=0;function _e(r,t){if(r===null||r.trim()==="")return t;let e=Number(r);return Number.isFinite(e)?e:t}var Ne=class extends b{static observedAttributes=["position","min","max","direction","collapsible","data-label-resize","data-label-collapsed"];#t=null;#e;#i;#s=50;#r=!1;#n=50;#a=!1;#c={};#h=0;get#l(){return this.getAttribute("direction")==="vertical"}get#o(){return getComputedStyle(this).direction==="rtl"}get#u(){return _e(this.getAttribute("min"),10)}get#p(){return _e(this.getAttribute("max"),90)}get#d(){return this.hasAttribute("collapsible")}get#f(){return _e(this.getAttribute("position"),50)}get position(){return this.#t?this.#s:this.#c.position??this.#s}set position(t){let e=Number(t);if(Number.isFinite(e)){if(!this.#t){this.#c.position=e,delete this.#c.reset;return}this.#r&&this.#E(),this.#C(e,"api")}}get collapsed(){return this.#t?this.#r:this.#c.collapsed??this.#r}set collapsed(t){if(!this.#t){this.#c.collapsed=!!t;return}t?this.#x("api"):this.#L("api")}reset(){if(!this.#t){this.#c={reset:!0},this.#N();return}this.#r&&this.#E(),this.#C(this.#f,"api"),this.#N()}setup(){for(let e of this.querySelectorAll(":scope > .split-divider"))e.remove();let t=[...this.children].filter(e=>!e.classList.contains("split-divider"));return t.length<2?!1:(this.#e=t[0],this.#i=t[1],this.#k(++this.#h),!0)}async#k(t){let e=null;if(this.#a||(e=await this.#$()),t!==this.#h||!this.isConnected)return!1;let i=this.#e,s=document.createElement("div");s.className="split-divider",s.setAttribute("role","separator"),i.id||(i.id=`vb-split-panel-${++On}`),s.setAttribute("aria-controls",i.id),s.setAttribute("tabindex","0"),this.#t=s,this.#m(),this.insertBefore(s,this.#i),this.listen(s,"pointerdown",this.#y),this.listen(s,"keydown",this.#T),this.listen(s,"dblclick",this.#A);let n=this.#r?this.#n:this.#s,o=this.#r;this.#a||(n=e?.position??this.#f,o=!!e?.collapsed&&this.#d);let a=this.#c;return this.#c={},a.reset&&(n=this.#f,o=!1),a.position!==void 0&&(n=a.position,o=!1),a.collapsed!==void 0&&(o=a.collapsed),this.#a=!0,this.#E(),o?(this.#n=this.#w(n),this.#S()):this.#C(n,null),!0}teardown(){this.#h++,this.#t&&(this.#t.remove(),this.#t=null)}attributeChangedCallback(t,e,i){if(!(e===i||!this.#t)){if(t==="position"){this.#r?this.#n=this.#w(this.#f):this.#C(this.#f,"attribute");return}t==="collapsible"&&!this.#d&&this.#r&&this.#L("attribute"),this.#m(),!this.#r&&(t==="min"||t==="max")&&this.#C(this.#s,"attribute")}}#w(t){return Math.min(this.#p,Math.max(this.#u,t))}#m(){let t=this.#t;t&&(t.setAttribute("aria-orientation",this.#l?"horizontal":"vertical"),t.setAttribute("aria-valuemin",String(this.#d?0:this.#u)),t.setAttribute("aria-valuemax",String(this.#p)),t.setAttribute("aria-label",this.getAttribute("data-label-resize")||"Resize panels"),this.#v())}#v(){let t=this.#t;if(!t)return;let e=Math.round(this.#s);t.setAttribute("aria-valuenow",String(e)),t.setAttribute("aria-valuetext",this.#r?this.getAttribute("data-label-collapsed")||"Collapsed":`${e}%`)}#y=t=>{if(t.button!==0)return;t.preventDefault();let e=this.#t;this.setState("divider-dragging",!0);try{e.setPointerCapture(t.pointerId)}catch{}e.addEventListener("pointermove",this.#g),e.addEventListener("pointerup",this.#b),e.addEventListener("pointercancel",this.#b),e.addEventListener("lostpointercapture",this.#b)};#g=t=>{if(!this.matches(":state(divider-dragging)"))return;let e=this.getBoundingClientRect(),i;this.#l?i=(t.clientY-e.top)/e.height*100:i=(this.#o?e.right-t.clientX:t.clientX-e.left)/e.width*100,this.#r&&this.#E(),this.#C(i,"pointer")};#b=t=>{if(!this.#t)return;let e=this.matches(":state(divider-dragging)");this.setState("divider-dragging",!1),this.#t.hasPointerCapture(t.pointerId)&&this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#g),this.#t.removeEventListener("pointerup",this.#b),this.#t.removeEventListener("pointercancel",this.#b),this.#t.removeEventListener("lostpointercapture",this.#b),e&&this.#P()};#T=t=>{if(t.key==="Enter"){if(!this.#d)return;t.preventDefault(),this.#r?this.#L("keyboard"):this.#x("keyboard"),this.#P();return}let e=t.shiftKey?10:1,i=!this.#l&&this.#o,s=this.#l?"ArrowUp":i?"ArrowRight":"ArrowLeft",n=this.#l?"ArrowDown":i?"ArrowLeft":"ArrowRight",o=null;t.key===s?o=this.#s-e:t.key===n?o=this.#s+e:t.key==="Home"?o=this.#u:t.key==="End"&&(o=this.#p),o!==null&&(t.preventDefault(),this.#r&&(this.#E(),this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!1,source:"keyboard"},bubbles:!0}))),this.#C(o,"keyboard"),this.#P())};#A=()=>{this.#d&&(this.#r?this.#L("pointer"):this.#x("pointer"),this.#P())};#x(t){this.#r||!this.#t||(this.#n=this.#s,this.#S(),this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!0,source:t},bubbles:!0})))}#S(){let t=this.#e;this.#r=!0,this.#s=0,t.style.flexBasis="0%",t.style.flexGrow="0",t.style.flexShrink="0",t.style.overflow="hidden",t.inert=!0,this.setState("collapsed",!0),this.#v()}#E(){this.#r=!1,this.#e&&(this.#e.inert=!1),this.setState("collapsed",!1)}#L(t){!this.#r||!this.#t||(this.#E(),this.#C(this.#n,null),this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!1,source:t},bubbles:!0})))}#C(t,e){if(!Number.isFinite(t)||!this.#e||!this.#i)return;let i=this.#w(t);this.#s=i,this.#e.style.flexBasis=`${i}%`,this.#e.style.flexGrow="0",this.#e.style.flexShrink="0",this.#e.style.overflow="auto",this.#i.style.flexGrow="1",this.#i.style.overflow="auto",this.#v(),e!==null&&this.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:i,source:e},bubbles:!0}))}async#$(){let t=this.getAttribute("persist");if(!t)return null;try{let e=await _.get("layout",`split:${t}`);if(e&&typeof e=="object"&&typeof e.position=="number")return e}catch{}return null}#P(){let t=this.getAttribute("persist");if(!t)return;let e=this.#r?{position:Math.round(this.#n),collapsed:!0}:{position:Math.round(this.#s),collapsed:!1};_.set("layout",`split:${t}`,e).catch(()=>{})}#N(){let t=this.getAttribute("persist");t&&_.remove("layout",`split:${t}`).catch(()=>{})}};g("split-surface",Ne);var Dn=["position:absolute","inline-size:1px","block-size:1px","padding:0","margin:-1px","overflow:hidden","clip-path:inset(50%)","white-space:nowrap","border:0"].join(";"),xs=new WeakMap;function Fn(r,t){let e=xs.get(t);e||xs.set(t,e=new Map);let i=e.get(r);if(!i||!i.region.isConnected){let n=(t.ownerDocument||document).createElement("span");n.setAttribute("data-vb-announcer",r),n.setAttribute("role",r==="assertive"?"alert":"status"),n.setAttribute("aria-live",r),n.setAttribute("aria-atomic","true"),n.style.cssText=Dn,t.appendChild(n),i={region:n},e.set(r,i)}return i}function ot(r,{politeness:t="polite",root:e}={}){let i=String(r??"").trim();if(!i||typeof document>"u")return null;let s=e||document.body;if(!s)return null;let o=Fn(t==="assertive"?"assertive":"polite",s);return clearTimeout(o.write),clearTimeout(o.clear),o.region.textContent="",o.write=setTimeout(()=>{o.region.textContent=i,o.clear=setTimeout(()=>{o.region.textContent=""},7e3)},50),o.region}function q(r,t,e,i){let s=`data-label-${t}`,o=r?.closest?.(`[${s}]`)?.getAttribute(s)||e;return i?o.replace(/\{(\w+)\}/g,(a,l)=>l in i?String(i[l]):a):o}var Ie=1500,qn="[data-copy], [data-copy-target], [data-paste-target]",Y={copied:"Copied to clipboard",pasted:"Pasted from clipboard","copy-failed":"Copy failed","copy-failed-selected":"Copy failed. Text selected, press Ctrl+C to copy","paste-failed":"Paste failed"},Pe=new WeakMap;function Hn(r){if(typeof document.execCommand!="function"||!document.body)return!1;let t=document.activeElement,e=document.createElement("textarea");e.value=r,e.setAttribute("readonly",""),e.setAttribute("aria-hidden","true"),e.style.cssText="position:fixed;inset-block-start:0;inset-inline-start:0;opacity:0;pointer-events:none",document.body.appendChild(e),e.select();let i=!1;try{i=document.execCommand("copy")}catch{i=!1}return e.remove(),t?.focus?.({preventScroll:!0}),i}function Un(r){if(!r)return!1;if(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)return r.focus(),r.select(),!0;let t=window.getSelection?.();if(!t)return!1;let e=document.createRange();return e.selectNodeContents(r),t.removeAllRanges(),t.addRange(e),!t.isCollapsed}async function kt(r,t={}){if(r==null||r==="")return!1;let{button:e,duration:i=Ie}=t,s=!1,n=null;try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(r),s=!0}catch(a){n=a,s=Hn(r)}if(s)return at({button:e,duration:i,state:"copied",eventName:"copy:done",eventDetail:{text:r},message:t.announceMessage??q(e,"copied",Y.copied)}),!0;let o=Un(t.source);return at({button:e,duration:i,state:"failed",eventName:"copy:error",eventDetail:{text:r,error:n},message:t.failureMessage??q(e,"copy-failed",o?Y["copy-failed-selected"]:Y["copy-failed"])}),!1}async function Es(r,t={}){let{text:e,html:i,blob:s}=r??{};if(!e&&!i&&!s)return!1;let{button:n,duration:o=Ie}=t;if(typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"){let l={};e&&(l["text/plain"]=new Blob([e],{type:"text/plain"})),i&&(l["text/html"]=new Blob([i],{type:"text/html"})),s&&(l[s.type]=s);try{return await navigator.clipboard.write([new ClipboardItem(l)]),at({button:n,duration:o,state:"copied",eventName:"copy:done",eventDetail:{payload:r},message:t.announceMessage??q(n,"copied",Y.copied)}),!0}catch{}}return e?kt(e,t):(at({button:n,duration:o,state:"failed",eventName:"copy:error",eventDetail:{payload:r,error:null},message:t.failureMessage??q(n,"copy-failed",Y["copy-failed"])}),!1)}function at({button:r,duration:t,message:e,eventDetail:i,state:s,eventName:n}){if(r){r.dataset.state=s;let o=Pe.get(r);o&&clearTimeout(o),Pe.set(r,setTimeout(()=>{r.dataset.state===s&&delete r.dataset.state,Pe.delete(r)},t)),r.dispatchEvent(new CustomEvent(n,{bubbles:!0,detail:i}))}ot(e,{politeness:s==="failed"?"assertive":"polite"})}async function Vn(r,t={}){let{button:e,duration:i=Ie}=t,s;try{if(!navigator.clipboard?.readText)throw new Error("Clipboard API unavailable");s=await navigator.clipboard.readText()}catch(n){return at({button:e,duration:i,state:"failed",eventName:"paste:error",eventDetail:{target:r,error:n},message:t.failureMessage??q(e,"paste-failed",Y["paste-failed"])}),null}return r&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement?r.value=s:r.textContent=s,r.dispatchEvent(new Event("input",{bubbles:!0}))),at({button:e,duration:i,state:"pasted",eventName:"paste:done",eventDetail:{text:s,target:r},message:t.announceMessage??q(e,"pasted",Y.pasted)}),s}function Ss(r){let t=r.dataset.copyTarget;if(!t)return null;try{return document.querySelector(t)}catch{return null}}function Wn(r){if(r.dataset.copy)return r.dataset.copy;let t=Ss(r);if(!t)return"";let e=r.dataset.copyAttr;return e?t.getAttribute(e)??"":t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t.value:t.textContent??""}function Kn(r){let t=r.target?.closest?.(qn);if(!t||t.matches(':disabled, [aria-disabled="true"]'))return;if(t.dataset.pasteTarget){let i=null;try{i=document.querySelector(t.dataset.pasteTarget)}catch{}if(!i)return;Vn(i,{button:t});return}let e=Wn(t);e&&kt(e,{button:t,source:Ss(t)??void 0})}typeof document<"u"&&!document.__vbCopyDelegated&&(document.__vbCopyDelegated=!0,document.addEventListener("click",Kn));var V;(r=>{class t{constructor(a,l,c,h){if(this.version=a,this.errorCorrectionLevel=l,a<t.MIN_VERSION||a>t.MAX_VERSION)throw new RangeError("Version value out of range");if(h<-1||h>7)throw new RangeError("Mask value out of range");this.size=a*4+17;let u=[];for(let d=0;d<this.size;d++)u.push(!1);for(let d=0;d<this.size;d++)this.modules.push(u.slice()),this.isFunction.push(u.slice());this.drawFunctionPatterns();let p=this.addEccAndInterleave(c);if(this.drawCodewords(p),h==-1){let d=1e9;for(let f=0;f<8;f++){this.applyMask(f),this.drawFormatBits(f);let m=this.getPenaltyScore();m<d&&(h=f,d=m),this.applyMask(f)}}s(0<=h&&h<=7),this.mask=h,this.applyMask(h),this.drawFormatBits(h),this.isFunction=[]}version;errorCorrectionLevel;static encodeText(a,l){let c=r.QrSegment.makeSegments(a);return t.encodeSegments(c,l)}static encodeBinary(a,l){let c=r.QrSegment.makeBytes(a);return t.encodeSegments([c],l)}static encodeSegments(a,l,c=1,h=40,u=-1,p=!0){if(!(t.MIN_VERSION<=c&&c<=h&&h<=t.MAX_VERSION)||u<-1||u>7)throw new RangeError("Invalid value");let d,f;for(d=c;;d++){let k=t.getNumDataCodewords(d,l)*8,A=n.getTotalBits(a,d);if(A<=k){f=A;break}if(d>=h)throw new RangeError("Data too long")}for(let k of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])p&&f<=t.getNumDataCodewords(d,k)*8&&(l=k);let m=[];for(let k of a){e(k.mode.modeBits,4,m),e(k.numChars,k.mode.numCharCountBits(d),m);for(let A of k.getData())m.push(A)}s(m.length==f);let y=t.getNumDataCodewords(d,l)*8;s(m.length<=y),e(0,Math.min(4,y-m.length),m),e(0,(8-m.length%8)%8,m),s(m.length%8==0);for(let k=236;m.length<y;k^=253)e(k,8,m);let w=[];for(;w.length*8<m.length;)w.push(0);return m.forEach((k,A)=>w[A>>>3]|=k<<7-(A&7)),new t(d,l,w,u)}size;mask;modules=[];isFunction=[];getModule(a,l){return 0<=a&&a<this.size&&0<=l&&l<this.size&&this.modules[l][a]}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let a=this.getAlignmentPatternPositions(),l=a.length;for(let c=0;c<l;c++)for(let h=0;h<l;h++)c==0&&h==0||c==0&&h==l-1||c==l-1&&h==0||this.drawAlignmentPattern(a[c],a[h]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(a){let l=this.errorCorrectionLevel.formatBits<<3|a,c=l;for(let u=0;u<10;u++)c=c<<1^(c>>>9)*1335;let h=(l<<10|c)^21522;s(h>>>15==0);for(let u=0;u<=5;u++)this.setFunctionModule(8,u,i(h,u));this.setFunctionModule(8,7,i(h,6)),this.setFunctionModule(8,8,i(h,7)),this.setFunctionModule(7,8,i(h,8));for(let u=9;u<15;u++)this.setFunctionModule(14-u,8,i(h,u));for(let u=0;u<8;u++)this.setFunctionModule(this.size-1-u,8,i(h,u));for(let u=8;u<15;u++)this.setFunctionModule(8,this.size-15+u,i(h,u));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let a=this.version;for(let c=0;c<12;c++)a=a<<1^(a>>>11)*7973;let l=this.version<<12|a;s(l>>>18==0);for(let c=0;c<18;c++){let h=i(l,c),u=this.size-11+c%3,p=Math.floor(c/3);this.setFunctionModule(u,p,h),this.setFunctionModule(p,u,h)}}drawFinderPattern(a,l){for(let c=-4;c<=4;c++)for(let h=-4;h<=4;h++){let u=Math.max(Math.abs(h),Math.abs(c)),p=a+h,d=l+c;0<=p&&p<this.size&&0<=d&&d<this.size&&this.setFunctionModule(p,d,u!=2&&u!=4)}}drawAlignmentPattern(a,l){for(let c=-2;c<=2;c++)for(let h=-2;h<=2;h++)this.setFunctionModule(a+h,l+c,Math.max(Math.abs(h),Math.abs(c))!=1)}setFunctionModule(a,l,c){this.modules[l][a]=c,this.isFunction[l][a]=!0}addEccAndInterleave(a){let l=this.version,c=this.errorCorrectionLevel;if(a.length!=t.getNumDataCodewords(l,c))throw new RangeError("Invalid argument");let h=t.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l],u=t.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l],p=Math.floor(t.getNumRawDataModules(l)/8),d=h-p%h,f=Math.floor(p/h),m=[],y=t.reedSolomonComputeDivisor(u);for(let k=0,A=0;k<h;k++){let T=a.slice(A,A+f-u+(k<d?0:1));A+=T.length;let j=t.reedSolomonComputeRemainder(T,y);k<d&&T.push(0),m.push(T.concat(j))}let w=[];for(let k=0;k<m[0].length;k++)m.forEach((A,T)=>{(k!=f-u||T>=d)&&w.push(A[k])});return s(w.length==p),w}drawCodewords(a){if(a.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let l=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let h=0;h<this.size;h++)for(let u=0;u<2;u++){let p=c-u,f=(c+1&2)==0?this.size-1-h:h;!this.isFunction[f][p]&&l<a.length*8&&(this.modules[f][p]=i(a[l>>>3],7-(l&7)),l++)}}s(l==a.length*8)}applyMask(a){if(a<0||a>7)throw new RangeError("Mask value out of range");for(let l=0;l<this.size;l++)for(let c=0;c<this.size;c++){let h;switch(a){case 0:h=(c+l)%2==0;break;case 1:h=l%2==0;break;case 2:h=c%3==0;break;case 3:h=(c+l)%3==0;break;case 4:h=(Math.floor(c/3)+Math.floor(l/2))%2==0;break;case 5:h=c*l%2+c*l%3==0;break;case 6:h=(c*l%2+c*l%3)%2==0;break;case 7:h=((c+l)%2+c*l%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[l][c]&&h&&(this.modules[l][c]=!this.modules[l][c])}}getPenaltyScore(){let a=0;for(let u=0;u<this.size;u++){let p=!1,d=0,f=[0,0,0,0,0,0,0];for(let m=0;m<this.size;m++)this.modules[u][m]==p?(d++,d==5?a+=t.PENALTY_N1:d>5&&a++):(this.finderPenaltyAddHistory(d,f),p||(a+=this.finderPenaltyCountPatterns(f)*t.PENALTY_N3),p=this.modules[u][m],d=1);a+=this.finderPenaltyTerminateAndCount(p,d,f)*t.PENALTY_N3}for(let u=0;u<this.size;u++){let p=!1,d=0,f=[0,0,0,0,0,0,0];for(let m=0;m<this.size;m++)this.modules[m][u]==p?(d++,d==5?a+=t.PENALTY_N1:d>5&&a++):(this.finderPenaltyAddHistory(d,f),p||(a+=this.finderPenaltyCountPatterns(f)*t.PENALTY_N3),p=this.modules[m][u],d=1);a+=this.finderPenaltyTerminateAndCount(p,d,f)*t.PENALTY_N3}for(let u=0;u<this.size-1;u++)for(let p=0;p<this.size-1;p++){let d=this.modules[u][p];d==this.modules[u][p+1]&&d==this.modules[u+1][p]&&d==this.modules[u+1][p+1]&&(a+=t.PENALTY_N2)}let l=0;for(let u of this.modules)l=u.reduce((p,d)=>p+(d?1:0),l);let c=this.size*this.size,h=Math.ceil(Math.abs(l*20-c*10)/c)-1;return s(0<=h&&h<=9),a+=h*t.PENALTY_N4,s(0<=a&&a<=2568888),a}getAlignmentPatternPositions(){if(this.version==1)return[];{let a=Math.floor(this.version/7)+2,l=Math.floor((this.version*8+a*3+5)/(a*4-4))*2,c=[6];for(let h=this.size-7;c.length<a;h-=l)c.splice(1,0,h);return c}}static getNumRawDataModules(a){if(a<t.MIN_VERSION||a>t.MAX_VERSION)throw new RangeError("Version number out of range");let l=(16*a+128)*a+64;if(a>=2){let c=Math.floor(a/7)+2;l-=(25*c-10)*c-55,a>=7&&(l-=36)}return s(208<=l&&l<=29648),l}static getNumDataCodewords(a,l){return Math.floor(t.getNumRawDataModules(a)/8)-t.ECC_CODEWORDS_PER_BLOCK[l.ordinal][a]*t.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][a]}static reedSolomonComputeDivisor(a){if(a<1||a>255)throw new RangeError("Degree out of range");let l=[];for(let h=0;h<a-1;h++)l.push(0);l.push(1);let c=1;for(let h=0;h<a;h++){for(let u=0;u<l.length;u++)l[u]=t.reedSolomonMultiply(l[u],c),u+1<l.length&&(l[u]^=l[u+1]);c=t.reedSolomonMultiply(c,2)}return l}static reedSolomonComputeRemainder(a,l){let c=l.map(h=>0);for(let h of a){let u=h^c.shift();c.push(0),l.forEach((p,d)=>c[d]^=t.reedSolomonMultiply(p,u))}return c}static reedSolomonMultiply(a,l){if(a>>>8||l>>>8)throw new RangeError("Byte out of range");let c=0;for(let h=7;h>=0;h--)c=c<<1^(c>>>7)*285,c^=(l>>>h&1)*a;return s(c>>>8==0),c}finderPenaltyCountPatterns(a){let l=a[1];s(l<=this.size*3);let c=l>0&&a[2]==l&&a[3]==l*3&&a[4]==l&&a[5]==l;return(c&&a[0]>=l*4&&a[6]>=l?1:0)+(c&&a[6]>=l*4&&a[0]>=l?1:0)}finderPenaltyTerminateAndCount(a,l,c){return a&&(this.finderPenaltyAddHistory(l,c),l=0),l+=this.size,this.finderPenaltyAddHistory(l,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(a,l){l[0]==0&&(a+=this.size),l.pop(),l.unshift(a)}static MIN_VERSION=1;static MAX_VERSION=40;static PENALTY_N1=3;static PENALTY_N2=3;static PENALTY_N3=40;static PENALTY_N4=10;static ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]];static NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]}r.QrCode=t;function e(o,a,l){if(a<0||a>31||o>>>a)throw new RangeError("Value out of range");for(let c=a-1;c>=0;c--)l.push(o>>>c&1)}function i(o,a){return(o>>>a&1)!=0}function s(o){if(!o)throw new Error("Assertion error")}class n{constructor(a,l,c){if(this.mode=a,this.numChars=l,this.bitData=c,l<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}mode;numChars;bitData;static makeBytes(a){let l=[];for(let c of a)e(c,8,l);return new n(n.Mode.BYTE,a.length,l)}static makeNumeric(a){if(!n.isNumeric(a))throw new RangeError("String contains non-numeric characters");let l=[];for(let c=0;c<a.length;){let h=Math.min(a.length-c,3);e(parseInt(a.substring(c,c+h),10),h*3+1,l),c+=h}return new n(n.Mode.NUMERIC,a.length,l)}static makeAlphanumeric(a){if(!n.isAlphanumeric(a))throw new RangeError("String contains unencodable characters in alphanumeric mode");let l=[],c;for(c=0;c+2<=a.length;c+=2){let h=n.ALPHANUMERIC_CHARSET.indexOf(a.charAt(c))*45;h+=n.ALPHANUMERIC_CHARSET.indexOf(a.charAt(c+1)),e(h,11,l)}return c<a.length&&e(n.ALPHANUMERIC_CHARSET.indexOf(a.charAt(c)),6,l),new n(n.Mode.ALPHANUMERIC,a.length,l)}static makeSegments(a){return a==""?[]:n.isNumeric(a)?[n.makeNumeric(a)]:n.isAlphanumeric(a)?[n.makeAlphanumeric(a)]:[n.makeBytes(n.toUtf8ByteArray(a))]}static makeEci(a){let l=[];if(a<0)throw new RangeError("ECI assignment value out of range");if(a<128)e(a,8,l);else if(a<16384)e(2,2,l),e(a,14,l);else if(a<1e6)e(6,3,l),e(a,21,l);else throw new RangeError("ECI assignment value out of range");return new n(n.Mode.ECI,0,l)}static isNumeric(a){return n.NUMERIC_REGEX.test(a)}static isAlphanumeric(a){return n.ALPHANUMERIC_REGEX.test(a)}getData(){return this.bitData.slice()}static getTotalBits(a,l){let c=0;for(let h of a){let u=h.mode.numCharCountBits(l);if(h.numChars>=1<<u)return 1/0;c+=4+u+h.bitData.length}return c}static toUtf8ByteArray(a){a=encodeURI(a);let l=[];for(let c=0;c<a.length;c++)a.charAt(c)!="%"?l.push(a.charCodeAt(c)):(l.push(parseInt(a.substring(c+1,c+3),16)),c+=2);return l}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}r.QrSegment=n})(V||(V={}));(r=>{let t;(e=>{class i{constructor(n,o){this.ordinal=n,this.formatBits=o}ordinal;formatBits;static LOW=new i(0,1);static MEDIUM=new i(1,0);static QUARTILE=new i(2,3);static HIGH=new i(3,2)}e.Ecc=i})(t=r.QrCode||(r.QrCode={}))})(V||(V={}));(r=>{let t;(e=>{class i{constructor(n,o){this.modeBits=n,this.numBitsCharCount=o}modeBits;numBitsCharCount;static NUMERIC=new i(1,[10,12,14]);static ALPHANUMERIC=new i(2,[9,11,13]);static BYTE=new i(4,[8,16,16]);static KANJI=new i(8,[8,10,12]);static ECI=new i(7,[0,0,0]);numCharCountBits(n){return this.numBitsCharCount[Math.floor((n+7)/17)]}}e.Mode=i})(t=r.QrSegment||(r.QrSegment={}))})(V||(V={}));var lt=V.QrCode,Cs=V.QrSegment;var Gn=4,ze=["L","M","Q","H"],$e=[lt.Ecc.LOW,lt.Ecc.MEDIUM,lt.Ecc.QUARTILE,lt.Ecc.HIGH];function Ls(r){if(r==null||r.trim()==="")return 1;let t=r.trim().toUpperCase(),e=ze.indexOf(t);return e!==-1?e:/^[0-3]$/.test(t)?Number(t):null}function Ms(r,t=1){let e=$e[t]??$e[1],i;try{i=lt.encodeSegments(Cs.makeSegments(r),e,1,40,-1,!1)}catch(n){let o=new RangeError(n instanceof Error?n.message:String(n));throw o.reason=/too long/i.test(o.message)?"capacity":"encoding",o}let s=[];for(let n=0;n<i.size;n++){let o=[];for(let a=0;a<i.size;a++)o.push(i.getModule(a,n));s.push(o)}return{version:i.version,size:i.size,ecl:$e.indexOf(e),modules:s}}function Rs(r,t){let e=r+Gn*2,i=Math.max(1,Math.floor(t/e)),s=Math.max(t,i*e),n=Math.floor((s-i*r)/2);return{cell:i,offset:n,edge:s}}function Ts([r,t,e]){let i=s=>{let n=s/255;return n<=.03928?n/12.92:((n+.055)/1.055)**2.4};return .2126*i(r)+.7152*i(t)+.0722*i(e)}function _s(r,t){let e=[];(t[3]??1)<1&&e.push("the background is not opaque, so the code takes on whatever is behind it"),(r[3]??1)<1&&e.push("the module colour is not opaque");let i=Ts(r),s=Ts(t);i>s&&e.push("modules are lighter than the background (inverted codes are rejected by many scanners)");let n=(Math.max(i,s)+.05)/(Math.min(i,s)+.05);return n<4&&e.push(`contrast is ${n.toFixed(2)}:1 (aim for at least 4:1)`),e}var Yn=200,Xn="#000",Jn="#fff",Be=class extends b{#t=null;#e=null;#i="";#s=!1;#r="";#n="";static get observedAttributes(){return["value","size","color","background","error-correction","data-label-prefix"]}get value(){return this.getAttribute("value")||this.#i}set value(t){t==null||t===""?this.removeAttribute("value"):this.setAttribute("value",String(t))}setup(){if(!this.#e){this.#i=(this.textContent??"").trim();let t=document.createElement("span");t.setAttribute("data-qr-caption",""),t.append(...this.childNodes),!this.#i&&!t.children.length&&(t.textContent=this.value,this.#s=!0),this.#e=t}return this.#t||(this.#t=document.createElement("canvas"),this.#t.setAttribute("role","img")),this.#t.parentNode!==this&&this.prepend(this.#t),this.#e.parentNode!==this&&this.append(this.#e),this.#c(),this.#a(),!0}#a(){if(typeof window.matchMedia!="function")return;let t=window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`);this.listen(t,"change",()=>{this.isConnected&&(this.#c(),this.#a())},{once:!0})}attributeChangedCallback(){!this.hasAttribute("data-upgraded")||!this.isConnected||this.#c()}#c(){let t=this.#t,e=this.value;if(t.setAttribute("aria-label",this.getAttribute("data-label-prefix")||"QR code"),this.#s&&this.#e&&this.#e.textContent!==e&&(this.#e.textContent=e),this.removeAttribute("data-error"),!e){this.#h();return}let i=this.getAttribute("error-correction"),s=Ls(i);s===null&&(console.warn(`<qr-code>: error-correction="${i}" is not L, M, Q, H or 0-3; using M.`),s=1);let n;try{n=Ms(e,s)}catch(f){let m=f.reason||"encoding";this.#h(),this.setAttribute("data-error",m),this.dispatchEvent(new CustomEvent("qr-code:error",{bubbles:!0,detail:{reason:m,value:e,errorCorrection:ze[s],message:f.message}}));return}let o=Math.max(1,parseInt(this.getAttribute("size")??"",10)||Yn),a=Math.max(1,window.devicePixelRatio||1),{cell:l,offset:c,edge:h}=Rs(n.size,Math.round(o*a));t.hidden=!1,t.width=h,t.height=h,t.style.inlineSize=`${o}px`;let u=this.#l(this.getAttribute("color"),Xn),p=this.#l(this.getAttribute("background"),Jn);this.#o(u,p);let d=t.getContext("2d");if(d){d.clearRect(0,0,h,h),d.fillStyle=p.css,d.fillRect(0,0,h,h),d.fillStyle=u.css;for(let f=0;f<n.size;f++)for(let m=0;m<n.size;m++)n.modules[f][m]&&d.fillRect(c+m*l,c+f*l,l,l);this.#r=e}}#h(){let t=this.#t;t.hidden=!0,t.width=0,t.height=0,this.#r=""}#l(t,e){let i=this.#t,s=t?.trim()||e,n=i.style.color;i.style.color="",i.style.color=s,i.style.color||(console.warn(`<qr-code>: "${s}" is not a valid colour; using ${e}.`),i.style.color=e);let o=getComputedStyle(i).color;i.style.color=n;let a=(o.match(/[\d.]+/g)||[]).map(Number),l=[a[0]??0,a[1]??0,a[2]??0,a[3]??1];return{css:o,rgba:l}}#o(t,e){if(!this.hasAttribute("color")&&!this.hasAttribute("background"))return;let i=`${t.css}|${e.css}`;if(i===this.#n)return;this.#n=i;let s=_s(t.rgba,e.rgba);s.length&&console.warn(`<qr-code>: color="${t.css}" on background="${e.css}" may not scan: ${s.join("; ")}.`,this)}toDataURL(t="image/png"){return!this.#t||!this.#r?"":this.#t.toDataURL(t)}async copy({button:t}={}){let e=this.#t;if(!e||!this.#r)return!1;let i=this.#r,s=await new Promise(n=>e.toBlob(n,"image/png"));return Es({text:i,blob:s||void 0},{button:t,announceMessage:this.getAttribute("data-label-copied")||"QR code copied"})}};g("qr-code",Be);var Zn="Slide to confirm",Qn="Confirmed!",to="Press Enter to confirm",Ns=6,je=class extends b{static formAssociated=!0;static observedAttributes=["label","activated-label","data-label-hint","required","value"];#t;#e;#i;#s;#r;#n=!1;#a=0;#c=0;#h=0;#l=0;#o=!1;#u=!1;#p=!1;#d="";#f;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}get activated(){return this.#o}get#k(){let t=this.getAttribute("threshold"),e=Number(t);return t!==null&&t.trim()!==""&&!isNaN(e)?Math.min(100,Math.max(0,e)):90}get#w(){return this.getAttribute("label")||this.#d||Zn}get#m(){return this.getAttribute("activated-label")||Qn}get#v(){return getComputedStyle(this).direction==="rtl"}setup(){this.#p||(this.#y(),this.#p=!0),this.listen(this.#e,"pointerdown",this.#x),this.listen(this.#e,"keydown",this.#$),this.listen(this.#e,"transitionend",this.#P)}teardown(){this.#n&&this.#E(),clearTimeout(this.#f),this.removeAttribute("transitioning")}attributeChangedCallback(t,e,i){e===i||!this.#p||(this.#g(),(t==="required"||t==="value")&&this.#T())}#y(){this.#d=(this.textContent||"").replace(/\s+/g," ").trim(),this.#r=document.createElement("div"),this.#r.className="slide-track",this.#i=document.createElement("span"),this.#i.className="slide-label",this.#i.setAttribute("role","status"),this.#s=document.createElement("span"),this.#s.className="visually-hidden slide-hint",this.#s.id=`slide-hint-${Math.random().toString(36).slice(2,9)}`,this.#e=document.createElement("div"),this.#e.className="slide-handle",this.#e.setAttribute("role","slider"),this.#e.setAttribute("aria-valuemin","0"),this.#e.setAttribute("aria-valuemax","100"),this.#e.setAttribute("aria-describedby",this.#s.id),this.#e.setAttribute("tabindex","0"),this.#e.innerHTML='<icon-wc name="chevrons-right" size="sm"></icon-wc>',this.#r.append(this.#i,this.#e),this.textContent="",this.append(this.#r,this.#s),this.#g(),this.#M(0),this.#T()}#g(){let t=this.#w;this.#i.textContent=this.#o?this.#m:t,this.#e.setAttribute("aria-label",t),this.#s.textContent=this.getAttribute("data-label-hint")||to,this.#b()}#b(){this.#e.setAttribute("aria-valuetext",this.#o?this.#m:`${Math.round(this.#a)}%`)}#T(){let t=this.getAttribute("value")||"on";this.#t.setFormValue(this.#o?t:null),this.hasAttribute("required")&&!this.#o?this.#t.setValidity({valueMissing:!0},`${this.#w} to continue.`,this.#e):this.#t.setValidity({})}reset(){this.#o=!1,this.removeAttribute("data-activated"),this.#e.removeAttribute("aria-disabled"),this.#A(),this.#M(0),this.#g(),this.#T(),this.dispatchEvent(new CustomEvent("slide-accept:reset",{bubbles:!0}))}formResetCallback(){(this.#o||this.#a!==0)&&this.reset()}formDisabledCallback(t){this.#u=t,t&&this.#n&&(this.#E(),this.#I()),this.#A()}#A(){this.#e&&(this.#o||this.#u?this.#e.setAttribute("aria-disabled","true"):this.#e.removeAttribute("aria-disabled"))}#x=t=>{if(!(this.#o||this.#u)&&t.button===0){if(t.preventDefault(),this.#e.focus({preventScroll:!0}),this.hasAttribute("transitioning")){let e=this.#e.getBoundingClientRect(),i=this.#r.getBoundingClientRect(),s=parseFloat(getComputedStyle(this.#r).getPropertyValue("--_handle-inset")||"0"),n=this.#e.offsetWidth,o=i.width-n-s*2,a=this.#v?i.right-e.right-s:e.left-i.left-s;this.removeAttribute("transitioning"),clearTimeout(this.#f),this.#M(o>0?Math.max(0,Math.min(100,a/o*100)):0)}this.#n=!0,this.#c=t.clientX,this.#h=this.#a,this.#l=0;try{this.#e.setPointerCapture(t.pointerId)}catch{}this.setAttribute("data-dragging",""),this.#e.addEventListener("pointermove",this.#S),this.#e.addEventListener("pointerup",this.#L),this.#e.addEventListener("pointercancel",this.#C)}};#S=t=>{if(!this.#n)return;let e=this.#r.getBoundingClientRect().width-this.#e.offsetWidth;if(e<=0)return;let i=t.clientX-this.#c;this.#l=Math.max(this.#l,Math.abs(i));let n=(this.#v?-i:i)/e*100;this.#M(Math.min(100,Math.max(0,this.#h+n)))};#E(t){if(this.#n=!1,this.removeAttribute("data-dragging"),t)try{this.#e.releasePointerCapture(t.pointerId)}catch{}this.#e.removeEventListener("pointermove",this.#S),this.#e.removeEventListener("pointerup",this.#L),this.#e.removeEventListener("pointercancel",this.#C)}#L=t=>{if(!this.#n)return;let e=this.#l<Ns&&Math.abs(t.clientX-this.#c)<Ns;this.#E(t),e||this.#a>=this.#k?this.#N():this.#I()};#C=t=>{this.#n&&(this.#E(t),this.#I())};#$=t=>{if(this.#o||this.#u)return;let e=t.shiftKey?20:5,i=this.#v,s=i?"ArrowLeft":"ArrowRight",n=i?"ArrowRight":"ArrowLeft";t.key===s||t.key==="ArrowUp"?(t.preventDefault(),this.#M(Math.min(100,this.#a+e)),this.#a>=this.#k&&this.#N()):t.key===n||t.key==="ArrowDown"?(t.preventDefault(),this.#M(Math.max(0,this.#a-e))):t.key==="End"||t.key==="Enter"||t.key===" "?(t.preventDefault(),this.#N()):t.key==="Home"&&(t.preventDefault(),this.#M(0))};#P=()=>{this.removeAttribute("transitioning")};#N(){this.#o||(this.#o=!0,this.#M(100),this.setAttribute("data-activated",""),this.#A(),this.#g(),this.#T(),this.dispatchEvent(new CustomEvent("slide-accept:accept",{bubbles:!0})))}#I(){this.setAttribute("transitioning",""),this.#M(0),clearTimeout(this.#f),this.#f=setTimeout(()=>{this.removeAttribute("transitioning")},500)}#M(t){this.#a=t,this.style.setProperty("--_slide-position",String(t)),this.#e.setAttribute("aria-valuenow",String(Math.round(t))),this.#b()}};g("slide-accept",je);var Dt="banner",Ps=365,Is=864e5;function $s(r){if(r===0||r==="0"||r==="never")return;let t=r==null||r===""?Ps:Number.parseFloat(String(r));return Number.isFinite(t)?t>0?t*Is:void 0:Ps*Is}var eo=0,Oe=class extends b{#t=null;static get observedAttributes(){return["position"]}get#e(){return this.getAttribute("persist")||Dt}get#i(){return $s(this.getAttribute("expires"))}get#s(){return this.getAttribute("position")==="center"}setup(){return this.#t=this.querySelector("dialog"),this.#t?(this.#r(),this.getAttribute("trigger")&&this.listen(document,"click",this.#u),this.listen(this,"click",this.#o),this.listen(this.#t,"cancel",this.#l),this.#n(),!0):!1}attributeChangedCallback(t,e,i){e===i||!this.#t?.open||(this.#t.close(),this.#a())}#r(){let t=this.#t;if(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby"))return;let e=t.querySelector("h1, h2, h3, h4, h5, h6");e?(e.id||(e.id=`consent-banner-title-${++eo}`),t.setAttribute("aria-labelledby",e.id)):t.setAttribute("aria-label","Cookie consent")}async#n(){if(await this.#p()){this.getAttribute("trigger")?this.hidden=!0:this.remove();return}this.#c()}#a(){this.#s?this.#t.showModal():this.#t.show()}#c(){!this.isConnected||this.#t.open||this.#a()}#h(){this.#t.close(),this.getAttribute("trigger")?this.hidden=!0:this.remove()}#l=t=>{this.#s&&t.preventDefault()};#o=async t=>{if(!this.#t.open)return;let e=t.target.closest("button[value]");if(!e||!this.#t.contains(e))return;let i=e.value;if(!["accept","reject","save"].includes(i))return;let s=[...this.querySelectorAll('input[type="checkbox"]')],n={};i==="accept"?s.forEach(o=>{n[o.name]=!0}):i==="reject"?s.forEach(o=>{n[o.name]=!!o.disabled}):s.forEach(o=>{n[o.name]=o.checked}),await this.#d({preferences:n,action:i}),this.dispatchEvent(new CustomEvent("consent-banner:change",{bubbles:!0,detail:{preferences:n,action:i}})),this.#h()};#u=async t=>{let e=this.getAttribute("trigger");if(!e||!t.target.closest(e))return;t.preventDefault();let s=await this.#p();if(s?.preferences)for(let[n,o]of Object.entries(s.preferences)){let a=this.querySelector(`input[type="checkbox"][name="${CSS.escape(n)}"]`);a&&!a.disabled&&(a.checked=o)}this.hidden=!1,this.#c()};async#p(){let t=this.#i;try{return await _.get("consent",this.#e,t?{maxAge:t}:void 0)}catch{return null}}async#d(t){try{await _.set("consent",this.#e,t)}catch{}}static async reset(t=Dt){try{await _.remove("consent",t)}catch{}}static async getConsent(t=Dt,e={}){let i=e.expires;i===void 0&&typeof document<"u"&&(i=[...document.querySelectorAll("consent-banner")].find(o=>(o.getAttribute("persist")||Dt)===t)?.getAttribute("expires")??void 0);let s=$s(i);try{return await _.get("consent",t,s?{maxAge:s}:void 0)}catch{return null}}};g("consent-banner",Oe);var io={play:"Play",pause:"Pause",stop:"Stop",reader:"Article reader",controls:"Reader controls",voice:"Voice","loading-voices":"Loading voices\u2026",speed:"Speed",slower:"Slower",faster:"Faster"},zs='[aria-hidden="true"], [hidden], script, style, template, text-reader',so=()=>typeof HTMLElement<"u"&&Object.prototype.hasOwnProperty.call(HTMLElement.prototype,"popover"),De=()=>typeof window<"u"&&"speechSynthesis"in window,At=r=>(r||"").toLowerCase().split(/[-_]/)[0],Fe=class extends b{#t=null;#e=null;#i=[];#s="";#r=0;#n=null;#a=null;#c=null;#h=null;#l=!1;#o=!1;#u=0;#p=null;#d=null;#f=null;#k=null;#w=null;#m=null;#v=null;#y=!1;#g=null;#b=null;#T=[];#A=[];static get observedAttributes(){return["speed","voice","for"]}attributeChangedCallback(t,e,i){if(e!==i&&(t==="for"&&e!==null&&this.hasAttribute("data-upgraded")&&(this.#l&&this.stop(),this.#F(),this.#st(this.#A)),(t==="speed"||t==="voice")&&this.#l&&this.#U(),t==="speed")){let s=this.#Y(parseFloat(i)||1);this.#w&&(this.#w.value=String(s)),this.#m&&(this.#m.textContent=`${s}\xD7`)}}setup(){return De()?(this.getAttribute("variant")==="icon"?this.#C():this.#x(),this.#F(),this.#q(),this.#h=this.#it(),this.#h.then(t=>{this.#A=t,this.#st(t)}),this.listen(window,"beforeunload",this.#at),!0):(this.style.display="none",!1)}teardown(){this.#l&&this.stop(),this.#J(),this.#v?.remove(),this.#b?.remove(),this.#g?.remove(),this.#v=null,this.#b=null,this.#g=null,this.#p=this.#d=this.#f=null,this.#k=null,this.#w=null,this.#m=null,this.#y=!1;for(let{icon:t,slot:e}of this.#T)t.setAttribute("slot",e),this.append(t);this.#T=[]}play(){if(De()){if(this.#o){this.resume();return}this.#l||(this.#_(),this.#K(0))}}pause(){!this.#l||this.#o||(speechSynthesis.pause(),this.#o=!0,this.#G(!0),this.#V("text-reader:pause"))}resume(){this.#o&&(speechSynthesis.resume(),this.#o=!1,this.#G(!1),this.#V("text-reader:resume"))}stop(){!De()||!this.#l||(this.#e=null,speechSynthesis.cancel(),this.#X(),this.#V("text-reader:stop"))}get voices(){return this.#h||this.#it()}get speaking(){return this.#l}get paused(){return this.#o}get progress(){return this.#s.length?Math.min(this.#r/this.#s.length,1):0}#x(){let t=document.createElement("div");t.setAttribute("part","controls"),t.setAttribute("role","group"),t.setAttribute("aria-label",this.#E("reader"));let e=this.#S("play",this.#E("play"),"\u25B6");e.addEventListener("click",()=>this.play());let i=this.#S("pause",this.#E("pause"),"\u23F8");i.hidden=!0,i.addEventListener("click",()=>this.pause());let s=this.#S("stop",this.#E("stop"),"\u23F9");s.disabled=!0,s.addEventListener("click",()=>this.stop());let n=document.createElement("select");n.setAttribute("aria-label",this.#E("voice"));let o=document.createElement("option");o.textContent=this.#E("loading-voices"),n.append(o),n.addEventListener("change",()=>{this.#l&&this.#U()});let a=document.createElement("label");a.setAttribute("data-speed-group","");let l=document.createElement("span");l.setAttribute("data-speed-value","");let c=this.#Y(parseFloat(this.getAttribute("speed")??"1")||1);l.textContent=`${c}\xD7`;let h=document.createElement("input");h.type="range",h.min="0.5",h.max="2",h.step="0.1",h.value=String(c),h.setAttribute("aria-label",this.#E("speed")),h.addEventListener("input",()=>{let u=parseFloat(h.value);l.textContent=`${u}\xD7`,this.#l&&this.#U()}),a.append(l,h),this.#L("icon-play",e),this.#L("icon-pause",i),this.#L("icon-stop",s),t.append(e,i,s,n,a),this.prepend(t),this.#v=t,this.#p=e,this.#d=i,this.#f=s,this.#k=n,this.#w=h,this.#m=l}#S(t,e,i){let s=document.createElement("button");return s.type="button",s.setAttribute("part",`button ${t}`),s.setAttribute("aria-label",e),s.textContent=i,s}#E(t){return this.getAttribute(`data-label-${t}`)||io[t]}#L(t,e){let i=this.querySelector(`:scope > [slot="${t}"]`);i&&(i.removeAttribute("slot"),e.textContent="",e.append(i),this.#T.push({icon:i,slot:t}))}#C(){this.#y=!0;for(let i of this.querySelectorAll(':scope > [part="trigger"]'))i.remove();let t=document.createElement("button");t.type="button",t.setAttribute("part","trigger"),t.setAttribute("aria-label",this.#E("reader")),t.setAttribute("aria-pressed","false");let e=this.querySelector(':scope > [slot="icon-trigger"]');if(e)e.removeAttribute("slot"),t.append(e),this.#T.push({icon:e,slot:"icon-trigger"});else{let i=document.createElement("icon-wc");i.setAttribute("name","volume-2"),i.setAttribute("aria-hidden","true"),t.append(i)}t.addEventListener("click",()=>this.#P()),this.append(t),this.#g=t,this.#$()}#$(){let t=document.createElement("div");t.setAttribute("data-text-reader-toolbar",""),t.setAttribute("role","group"),t.setAttribute("aria-label",this.#E("controls")),t.hidden=!0,so()&&(t.popover="manual");let e=this.#S("play",this.#E("play"),"\u25B6");e.addEventListener("click",()=>this.play());let i=this.#S("pause",this.#E("pause"),"\u23F8");i.hidden=!0,i.addEventListener("click",()=>this.pause());let s=this.#S("stop",this.#E("stop"),"\u23F9");s.addEventListener("click",()=>this.stop());let n=this.#S("speed-down",this.#E("slower"),"\u2212");n.addEventListener("click",()=>this.#R(-.1));let o=document.createElement("span");o.setAttribute("data-speed-value","");let a=this.#Y(parseFloat(this.getAttribute("speed")??"1")||1);o.textContent=`${a}\xD7`;let l=this.#S("speed-up",this.#E("faster"),"+");l.addEventListener("click",()=>this.#R(.1)),this.#L("icon-play",e),this.#L("icon-pause",i),this.#L("icon-stop",s),t.append(e,i,s,n,o,l),this.append(t),this.#p=e,this.#d=i,this.#f=s,this.#m=o,this.#b=t,this.listen(document,"pointerdown",this.#z),this.listen(document,"keydown",this.#D)}#P(){if(!this.#l){this.play();return}this.#b?.hidden&&this.#N(),this.#o?this.resume():this.pause()}#N(){if(!this.#b||!this.#g)return;let t=this.#b;t.hidden=!1,t.popover&&!t.matches(":popover-open")&&t.showPopover(),t.style.visibility="hidden",requestAnimationFrame(()=>{this.#M(),t.style.visibility=""})}#I(){let t=this.#b;if(!t||t.hidden)return;let e=t.contains(document.activeElement);t.popover&&t.matches(":popover-open")&&t.hidePopover(),t.hidden=!0,e&&this.#g?.focus()}#M(){let t=this.#b,e=this.#g;if(!t||!e)return;let i=e.getBoundingClientRect(),s=t.offsetWidth,n=t.offsetHeight,o=8,a=8,l=i.top-n-o;l<a&&(l=i.bottom+o);let c=i.left+i.width/2-s/2,h=window.innerWidth-s-a;c=Math.max(a,Math.min(c,h)),t.style.top=`${l}px`,t.style.left=`${c}px`}#R(t){let e=parseFloat(this.getAttribute("speed")??"1")||1,i=this.#Y(e+t);this.setAttribute("speed",String(i))}#z=t=>{!this.#b||this.#b.hidden||this.#b.contains(t.target)||this.#g?.contains(t.target)||this.#I()};#D=t=>{if(t.key==="Escape"&&this.#b&&!this.#b.hidden){let e=this.#b.contains(document.activeElement)||this.#g===document.activeElement;this.#I(),e&&this.#g?.focus()}};#F(){let t=this.getAttribute("for");if(!t){console.warn('<text-reader>: missing "for" attribute'),this.#B();return}if(this.#t=document.getElementById(t),!this.#t){console.warn(`<text-reader>: no element found with id="${t}"`),this.#B();return}this.#_(),this.#O()}#B(){this.#p&&(this.#p.disabled=!0),this.#f&&(this.#f.disabled=!0)}#O(){this.#p&&(this.#p.disabled=!1)}#_(){let t=this.#t;if(!t)return;let e=this.getAttribute("selectors")||"p,li",i=[...t.querySelectorAll(e)],s=o=>o.closest("pre")||o.closest("code")||o.closest(zs);this.#i=[];let n=0;for(let o of i){if(s(o))continue;let a=[],l="",c=document.createTreeWalker(o,NodeFilter.SHOW_TEXT,{acceptNode:h=>h.parentElement?.closest(zs)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(;c.nextNode();){let h=c.currentNode,u=h.data;u&&(a.push({node:h,start:l.length,end:l.length+u.length}),l+=u)}l.trim()&&(this.#i.push({element:o,text:l,speechStart:n,speechEnd:n+l.length,segments:a}),n+=l.length+1)}this.#s=this.#i.map(o=>o.text).join(" ")}#j(){return this.#t?.closest("[lang]")?.getAttribute("lang")||document.documentElement.lang||""}#K(t){if(!this.#s)return;let e=t>0?this.#s.slice(t):this.#s;if(!e.trim())return;let i=e.replace(/[<>]/g," "),s=new SpeechSynthesisUtterance(i),n=this.#j();n&&(s.lang=n),s.rate=this.#Y(parseFloat(this.#w?.value??this.getAttribute("speed")??"1")||1);let o=this.#k?.selectedOptions[0];if(o?.dataset.voiceUri){let a=speechSynthesis.getVoices().find(l=>l.voiceURI===o.dataset.voiceUri);a&&(s.voice=a)}else if(n){let a=At(n),l=speechSynthesis.getVoices(),c=l.find(h=>h.lang.toLowerCase()===n.toLowerCase())||l.find(h=>At(h.lang)===a&&h.default)||l.find(h=>At(h.lang)===a);c&&(s.voice=c)}s.onboundary=a=>{if(this.#e!==s||a.name!=="word")return;let l=t+a.charIndex;this.#r=l;let c=a.charLength;if(!c){let u=this.#s.slice(l).match(/^\S+/);c=u?u[0].length:1}this.#Z(l,c),this.#V("text-reader:word",{word:this.#s.slice(l,l+c),charIndex:l,element:this.#Q(l)?.element})},s.onend=()=>{if(this.#e!==s)return;let a=Date.now()-this.#u;this.#X(),this.#V("text-reader:end",{duration:a})},s.onerror=a=>{if(this.#e===s){if(a.error==="interrupted"||a.error==="canceled"){this.#X(),this.#V("text-reader:stop");return}console.warn("<text-reader>: SpeechSynthesisUtterance error:",a.error),this.#X(),this.#V("text-reader:error",{error:a.error})}},this.#e=s,this.#l=!0,this.#o=!1,this.#u=Date.now(),this.#r=t,this.#nt(!0),speechSynthesis.cancel(),speechSynthesis.speak(s),this.#W(),this.#V("text-reader:play",{voice:s.voice?.name,speed:s.rate})}#U(){let t=this.#r;this.#e=null,speechSynthesis.cancel(),this.#H(),requestAnimationFrame(()=>this.#K(t))}#W(){this.#H(),this.#n=setInterval(()=>{if(!speechSynthesis.speaking){this.#H();return}speechSynthesis.pause(),speechSynthesis.resume()},1e4)}#H(){this.#n&&clearInterval(this.#n),this.#n=null}#q(){if(!CSS.highlights)return;let t=new CSSStyleSheet;t.replaceSync(`
1076
1250
  ::highlight(text-reader-word) {
1077
1251
  background-color: var(--text-reader-highlight, Mark);
1078
1252
  color: var(--text-reader-highlight-text, MarkText);
1079
1253
  }
1080
- `),this.#o=t,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}#Y(){let t=this.#o;t&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(e=>e!==t),this.#o=null),this.#V()}#Z(t,e){if(!CSS.highlights||this.getAttribute("highlight")==="false")return;let i=this.#G(t);if(!i)return;let s=t-i.speechStart,n=this.#Q(i.element,s,e);if(!n)return;let o=new Highlight(n);if(CSS.highlights.set("text-reader-word",o),this.#a=o,this.getAttribute("scroll")!=="false"){let a=n.getBoundingClientRect(),l=window.innerHeight;(a.top<0||a.bottom>l)&&i.element.scrollIntoView({behavior:"smooth",block:"nearest"})}}#V(){CSS.highlights&&CSS.highlights.delete("text-reader-word"),this.#a=null}#G(t){let e=this.#i,i=0,s=e.length-1;for(;i<=s;){let n=i+s>>>1,o=e[n];if(t<o.speechStart)s=n-1;else if(t>=o.speechEnd)i=n+1;else return o}return null}#Q(t,e,i){let s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),n=0;for(;s.nextNode();){let o=s.currentNode,a=o.textContent??"";if(!a.trim())continue;let l=a.length;if(n+l>e){let c=e-n,h=document.createRange();h.setStart(o,Math.min(c,l));let u=c+i;return u<=l?h.setEnd(o,u):h.setEnd(o,l),h}n+=l}return null}async#W(){let t=speechSynthesis.getVoices();return t.length>0?t:new Promise(e=>{let i=()=>{speechSynthesis.removeEventListener("voiceschanged",i),e(speechSynthesis.getVoices())};speechSynthesis.addEventListener("voiceschanged",i),setTimeout(()=>{speechSynthesis.removeEventListener("voiceschanged",i),e(speechSynthesis.getVoices())},3e3)})}#tt(t){if(!this.#g||!t.length)return;let e=this.#g;e.innerHTML="";let i=document.documentElement.lang||"en",s=t.filter(l=>l.lang.startsWith(i)),n=t.filter(l=>!l.lang.startsWith(i)),o=[...s,...n],a=this.getAttribute("voice");for(let l of o){let c=document.createElement("option");c.textContent=`${l.name} (${l.lang})`,c.dataset.voiceUri=l.voiceURI,a&&l.voiceURI===a&&(c.selected=!0),e.append(c)}if(!a){let l=s.find(c=>c.default)||s[0];if(l){let c=[...e.options].find(h=>h.dataset.voiceUri===l.voiceURI);c&&(c.selected=!0)}}}#K(t){!this.#d||!this.#p||!this.#u||(t?(this.#d.hidden=!0,this.#p.hidden=!1,this.#u.disabled=!1):(this.#d.hidden=!1,this.#p.hidden=!0,this.#u.disabled=!0),this.#y&&(this.#b&&this.#b.setAttribute("aria-pressed",String(t)),t?this.#S():this.#M()))}#X(t){!this.#d||!this.#p||(this.#d.hidden=!t,this.#p.hidden=t)}#U(){this.#c=!1,this.#l=!1,this.#n=0,this.#e=null,this.#B(),this.#V(),this.#K(!1)}#z(t){return Math.round(Math.max(.5,Math.min(2,t))*10)/10}#I(t,e={}){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}#et=()=>{speechSynthesis.cancel()}};p("text-reader",ne);function gt(r){if(!r||typeof r!="string")return"";let t=document.createElement("template");return t.innerHTML=r,t.content.querySelectorAll("script, iframe, object, embed, form, base, link, meta, noscript").forEach(s=>s.remove()),t.content.querySelectorAll("*").forEach(s=>{for(let n of[...s.attributes]){if(n.name.startsWith("on")){s.removeAttribute(n.name);continue}if(["href","src","action","formaction","xlink:href"].includes(n.name)){let o=n.value.trim().toLowerCase();(o.startsWith("javascript:")||o.startsWith("data:text/html"))&&s.removeAttribute(n.name);continue}(n.name==="srcdoc"||n.name==="data"&&s.tagName==="OBJECT")&&s.removeAttribute(n.name)}}),t.innerHTML}function Ti({newItems:r,nodes:t,keyOf:e,renderItem:i,containerFor:s}){let n=[],o=[],a=[],l=new Set;for(let h of r)l.add(e(h));for(let[h,u]of[...t])l.has(h)||(u.remove(),t.delete(h),a.push(h));let c=new Map;for(let h of r){let u=e(h),d=t.get(u)||null,f=s(h,d);c.has(f)||c.set(f,[]),c.get(f)?.push({item:h,key:u,existing:d})}for(let[h,u]of c)for(let d=0;d<u.length;d++){let{item:f,key:g,existing:k}=u[d],w=k;w?(w.parentElement!==h||h.children[d]!==w)&&o.push(g):(w=i(f),t.set(g,w),n.push(g));let _=h.children[d];_!==w&&h.insertBefore(w,_||null)}return{added:n,moved:o,removed:a}}var oe=class extends m{#t=null;#e=null;#i=null;#s=new Map;#n=null;#r=new Map;#o=new Set;setup(){this.#a(),this.#h(),this.#m(),this.#c(),this.#y(),this.#d()}teardown(){for(let t of this.#o)t.abort();this.#o.clear()}#a(){this.#t=this.querySelector(":scope > chat-thread"),this.#e=this.querySelector(":scope > chat-input"),this.#i=this.querySelector(":scope > header select[data-model-select]")}#h(){let t=this.querySelector(":scope > script[data-participants]");if(t)try{let e=JSON.parse(t.textContent);this.#s=new Map(Object.entries(e))}catch{console.warn("[chat-window] Invalid participant JSON")}}#c(){if(this.#t)for(let t of this.#t.querySelectorAll("chat-message[data-from]"))this.#l(t)}#l(t){let e=t.getAttribute("data-from");if(!e)return;let i=this.#s.get(e);i?.name?t.setAttribute("data-from-label",i.name):t.hasAttribute("data-from-label")||t.setAttribute("data-from-label",e)}#m(){if(!this.#i)return;let t=this.getAttribute("model");t?this.#i.value=t:this.#i.value&&this.setAttribute("model",this.#i.value)}#d(){this.listen(this,"chat-input:send",this.#p),this.#i&&this.listen(this.#i,"change",this.#u)}#p=async t=>{t.stopPropagation();let{message:e}=t.detail;if(!e||!this.#t)return;let i=this.#g("user",e,"user");this.#t.appendChild(i),this.#b(),this.#y();let s=this.#w(),n=this.#f(s);this.#t.appendChild(n),this.#b(),this.#e&&(this.#e.disabled=!0);let o=this.getAttribute("endpoint");if(o){let a=new AbortController;this.#o.add(a);try{let l=await this.#k(o,e,a.signal);this.resolveTyping(n,l)}catch(l){a.signal.aborted?n.remove():(this.resolveTyping(n,"<p>Sorry, something went wrong.</p>",{error:!0}),this.dispatchEvent(new CustomEvent("chat-window:error",{bubbles:!0,detail:{error:l.message,status:l.status??0}})))}finally{this.#o.delete(a)}}else this.dispatchEvent(new CustomEvent("chat-window:send",{bubbles:!0,detail:{message:e,typingElement:n}}));this.#e&&(this.#e.disabled=!1,this.isConnected&&this.#e.focus()),this.#b(),this.#y()};#u=()=>{let t=this.#i.value;this.setAttribute("model",t),this.dispatchEvent(new CustomEvent("chat-window:model-change",{bubbles:!0,detail:{model:t}}))};#g(t,e,i){let s=document.createElement("chat-message");s.setAttribute("data-role",t),i&&(s.setAttribute("data-from",i),this.#l(s));let n=document.createElement("chat-bubble");return this.#v(n,e,{asText:t==="user"}),s.appendChild(n),s}#v(t,e,{asText:i=!1}={}){let s=e==null?"":String(e);if(i||!s.includes("<")){let n=document.createElement("p");n.textContent=s,t.replaceChildren(n)}else t.innerHTML=gt(s)}#f(t){let e=document.createElement("chat-message");e.setAttribute("data-role","agent"),e.setAttribute("data-status","typing");let i="Agent";t&&(e.setAttribute("data-from",t),this.#l(e),i=this.#s.get(t)?.name??t);let s=this.getAttribute("model");s&&e.setAttribute("data-model",s);let n=document.createElement("chat-bubble"),o=document.createElement("span");return o.className="visually-hidden",o.setAttribute("data-chat-typing",""),o.textContent=`${i} is typing`,n.appendChild(o),e.appendChild(n),e}#w(){for(let[t,e]of this.#s)if(e.role==="agent")return t;return null}#y(){if(!this.#t)return;if(this.#t.querySelector(":scope > chat-message")!==null){this.#n?.remove(),this.#n=null;return}this.#n||(this.#n=this.#t.querySelector(":scope > [data-chat-empty]")),this.#n||(this.#n=document.createElement("p"),this.#n.setAttribute("data-chat-empty",""),this.#n.textContent=this.getAttribute("empty-message")||"Send a message to start."),this.#n.parentNode!==this.#t&&this.#t.prepend(this.#n)}#b(){this.#t&&requestAnimationFrame(()=>{this.#t.scrollTop=this.#t.scrollHeight})}scrollToBottom(){this.#b()}async#k(t,e,i){let s={message:e,model:this.getAttribute("model")||void 0},n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),signal:i});if(!n.ok){let a=new Error(`Chat request failed: ${n.status}`);throw a.status=n.status,a}let o=await n.json();return o.html??o.message??o.content??""}get model(){return this.getAttribute("model")??""}set model(t){this.setAttribute("model",t),this.#i&&(this.#i.value=t)}get participants(){return this.#s}set participants(t){this.#s=t instanceof Map?t:new Map(Object.entries(t)),this.#c()}clearThread(){if(this.#t){for(;this.#t.firstChild;)this.#t.removeChild(this.#t.firstChild);this.#y()}}appendMessage(t,e,i){if(!this.#t)return;let s=this.#g(t,e,i);return this.#t.appendChild(s),this.#b(),this.#y(),s}resolveTyping(t,e,{error:i=!1}={}){if(!t)return;let s=t.querySelector(":scope > chat-bubble");s||(s=document.createElement("chat-bubble"),t.appendChild(s)),this.#v(s,e),t.removeAttribute("aria-label"),i?t.setAttribute("data-status","error"):t.removeAttribute("data-status"),this.#b()}get messages(){return this.#t?[...this.#t.querySelectorAll(':scope > chat-message:not([data-status="typing"])')].map(t=>{let e=t.getAttribute("data-role")||"user",i=t.querySelector("chat-bubble");return{id:t.id||t.getAttribute("data-id")||void 0,role:e,content:(e==="user"?i?.textContent?.trim():i?.innerHTML)||"",from:t.getAttribute("data-from")||void 0}}):[]}set messages(t){if(!this.#t)return;let e=Array.isArray(t)?t:[];for(let[s,n]of this.#r)n.parentNode!==this.#t&&this.#r.delete(s);let i=new Set(this.#r.values());for(let s of[...this.#t.children])if(!i.has(s)){if(s.localName==="chat-message"&&s.id&&!s.matches('[data-status="typing"]')&&!this.#r.has(s.id)){this.#r.set(s.id,s);continue}s===this.#n&&(this.#n=null),s.remove()}Ti({newItems:e,nodes:this.#r,keyOf:s=>s.id??s.role+":"+s.content,renderItem:s=>{let n=this.#g(s.role||"user",s.content||"",s.from);return s.id&&(n.id=s.id),n},containerFor:()=>this.#t}),this.#y(),this.#b(),this.dispatchEvent(new CustomEvent("chat-window:messages-changed",{detail:{messages:e,source:"property"},bubbles:!0}))}};p("chat-window",oe);var ae=class extends m{static formAssociated=!0;#t;#e=null;#i=null;#s;#n=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){return this.#e=this.querySelector(":scope > textarea, :scope textarea[data-grow]"),this.#i=this.querySelector("[data-send]"),this.#e?(this.#r(),this.listen(this.#e,"keydown",this.#o),this.listen(this.#e,"input",this.#a),this.#i&&this.listen(this.#i,"click",this.#h),this.form&&this.listen(this.form,"submit",this.#c),this.#u(),this.#d(),this.#p(),this.hasAttribute("autofocus")&&requestAnimationFrame(()=>this.#e?.focus()),!0):!1}teardown(){clearTimeout(this.#s)}#r(){let t=this.#e;t&&(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")||t.labels&&t.labels.length||t.hasAttribute("title")||t.setAttribute("aria-label","Message"))}#o=t=>{if(!(t.isComposing||t.keyCode===229))switch(t.key){case"Enter":t.shiftKey||(t.preventDefault(),this.#m());break;case"Escape":t.preventDefault(),this.reset();break}};#a=()=>{this.#d(),this.#p(),clearTimeout(this.#s),this.#s=setTimeout(()=>{this.dispatchEvent(new CustomEvent("chat-input:input",{bubbles:!0,detail:{value:this.value,length:this.value.length}}))},100)};#h=t=>{let e=this.#i;this.form&&e?.type==="submit"&&e.form===this.form&&this.#l()||(t.preventDefault(),this.#m())};#c=t=>{setTimeout(()=>{t.defaultPrevented||this.reset()},0)};#l({report:t=!1}={}){if(this.matches(":disabled"))return!1;let e=this.value.trim(),i=parseInt(this.getAttribute("minlength")??"1",10)||1;return e.length<i?!1:this.#t.validity.valid?!0:(t&&this.#t.reportValidity(),!1)}#m(){if(!this.#l({report:!0}))return;let t=this.form;if(t){let e=this.#i,i=e?.type==="submit"&&e.form===t?e:null;t.requestSubmit(i);return}this.dispatchEvent(new CustomEvent("chat-input:send",{bubbles:!0,detail:{message:this.value.trim()}})),this.reset()}#d(){let t=this.value;this.#t.setFormValue(t||null)}#p(){let t=this.value,e=parseInt(this.getAttribute("maxlength")??"4000",10)||4e3;t.length>e&&this.#e?this.#t.setValidity({tooLong:!0},`Message exceeds ${e} characters`,this.#e):this.#t.setValidity({})}#u(){let t=this.hasAttribute("disabled")||this.#n;this.#e&&(this.#e.disabled=t),this.#i&&(this.#i.disabled=t)}formDisabledCallback(t){this.#n=t,this.#u()}formResetCallback(){this.reset()}formStateRestoreCallback(t){!t||!this.#e||(this.#e.value=t,this.#d(),this.#p())}get form(){return this.#t.form}get name(){return this.getAttribute("name")??""}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#e?.value??""}set value(t){if(!this.#e)return;let e=t==null?"":String(t);this.#e.value!==e&&(this.#e.value=e,this.#e.dispatchEvent(new Event("input",{bubbles:!0})),this.#d(),this.#p(),this.dispatchEvent(new CustomEvent("chat-input:change",{bubbles:!0,detail:{value:e,source:"api"}})))}get disabled(){return this.hasAttribute("disabled")}set disabled(t){this.toggleAttribute("disabled",!!t)}focus(){this.#e?.focus()}reset(){this.#e&&(this.#e.value="",this.#e.dispatchEvent(new Event("input",{bubbles:!0})),this.#d(),this.#p())}static get observedAttributes(){return["disabled"]}attributeChangedCallback(t){t==="disabled"&&this.#u()}};p("chat-input",ae);var bt="http://www.w3.org/2000/svg";function ar(r){return r.trim().split(/[\s,]+/).map(Number)}function lr(r,t){let e=ar(t);switch(r){case"rect":{let[i,s,n,o]=e;return{type:"rect",x:i,y:s,width:n-i,height:o-s}}case"circle":{let[i,s,n]=e;return{type:"circle",cx:i,cy:s,r:n}}case"poly":{let i=[];for(let s=0;s<e.length;s+=2)i.push([e[s],e[s+1]]);return{type:"poly",points:i}}default:return null}}function cr(r){if(!r)return null;switch(r.type){case"rect":{let t=document.createElementNS(bt,"rect");return t.setAttribute("x",String(r.x)),t.setAttribute("y",String(r.y)),t.setAttribute("width",String(r.width)),t.setAttribute("height",String(r.height)),t}case"circle":{let t=document.createElementNS(bt,"circle");return t.setAttribute("cx",String(r.cx)),t.setAttribute("cy",String(r.cy)),t.setAttribute("r",String(r.r)),t}case"poly":{let t=document.createElementNS(bt,"polygon");return t.setAttribute("points",r.points.map(e=>e.join(",")).join(" ")),t}default:return null}}function hr(r){if(!r)return{x:0,y:0,width:0,height:0};switch(r.type){case"rect":return{x:r.x,y:r.y,width:r.width,height:r.height};case"circle":return{x:r.cx-r.r,y:r.cy-r.r,width:r.r*2,height:r.r*2};case"poly":{let t=100,e=100,i=0,s=0;for(let[n,o]of r.points)n<t&&(t=n),o<e&&(e=o),n>i&&(i=n),o>s&&(s=o);return{x:t,y:e,width:i-t,height:s-e}}default:return{x:0,y:0,width:0,height:0}}}var le=class extends HTMLElement{get shape(){return this.getAttribute("shape")||"rect"}get coords(){return this.getAttribute("coords")||""}get label(){return this.getAttribute("label")||""}get href(){return this.getAttribute("href")}get target(){return this.getAttribute("target")||""}get tooltipMode(){return this.getAttribute("tooltip")||"hover"}get disabled(){return this.hasAttribute("disabled")}connectedCallback(){this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded")}},ce=class extends m{#t=null;#e=null;#i=null;#s=[];#n=[];#r=null;#o=null;#a=null;setup(){if(this.#t=this.querySelector(":scope > img"),!this.#t){let t=this.getAttribute("src"),e=this.getAttribute("alt");if(t)this.#t=document.createElement("img"),this.#t.src=t,this.#t.alt=e||"",this.prepend(this.#t);else return!1}return this.#t.classList.add("image-map-img"),this.#t.complete?this.#h():this.#t.addEventListener("load",()=>this.#h(),{once:!0}),!0}teardown(){this.#o?.disconnect(),this.#l(),this.#e?.remove(),this.#i?.remove();for(let t of this.#n)t.anchor?.remove();this.#n=[],this.#s=[]}get regions(){return[...this.querySelectorAll(":scope > map-area")].map(t=>({shape:t.getAttribute("shape")||void 0,coords:t.getAttribute("coords")||void 0,label:t.getAttribute("label")||t.textContent?.trim()||void 0,href:t.getAttribute("href")||void 0,target:t.getAttribute("target")||void 0}))}set regions(t){let e=Array.isArray(t)?t:[];for(let i of[...this.querySelectorAll(":scope > map-area")])i.remove();for(let i of e){let s=document.createElement("map-area");i.shape&&s.setAttribute("shape",i.shape),i.coords&&s.setAttribute("coords",i.coords),i.label&&s.setAttribute("label",i.label),i.href&&s.setAttribute("href",i.href),i.target&&s.setAttribute("target",i.target),this.appendChild(s)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("image-map:regions-changed",{detail:{regions:e,source:"property"},bubbles:!0}))}#h(){let t=[...this.querySelectorAll(":scope > map-area")];if(t.length===0){this.setAttribute("data-upgraded","");return}this.#e=document.createElementNS(bt,"svg"),this.#e.setAttribute("viewBox","0 0 100 100"),this.#e.setAttribute("preserveAspectRatio","none"),this.#e.setAttribute("aria-hidden","true"),this.#e.classList.add("image-map-overlay"),this.#i=document.createElement("div"),this.#i.className="image-map-tooltip",this.#i.setAttribute("role","tooltip"),this.#i.setAttribute("aria-live","polite"),this.#i.id=`imap-tip-${crypto.randomUUID().slice(0,8)}`;for(let e of t){let i=e,s=i.shape,n=i.coords,o=lr(s,n),a=cr(o);if(!a)continue;let l=hr(o),c=i.href?document.createElement("a"):document.createElement("button");i.href&&(c.href=i.href,i.target&&(c.target=i.target)),c.className="image-map-anchor",c.setAttribute("aria-label",i.label),c.setAttribute("aria-describedby",this.#i.id),c.textContent=i.label,c.style.left=`${l.x}%`,c.style.top=`${l.y}%`,c.style.width=`${l.width}%`,c.style.height=`${l.height}%`,i.disabled&&(a.setAttribute("data-disabled",""),c.setAttribute("tabindex","-1"),c.setAttribute("aria-disabled","true"));let h=e.innerHTML,u={area:e,parsed:o,svgShape:a,anchor:c,contentHTML:h};if(!i.disabled){let d=i.tooltipMode;this.listen(a,"pointerenter",()=>{d==="hover"&&this.#c(u),a.setAttribute("data-hover",""),this.#p("image-map:area-enter",i)}),this.listen(a,"pointerleave",()=>{d==="hover"&&this.#l(),a.removeAttribute("data-hover"),this.#p("image-map:area-leave",i)}),this.listen(a,"click",()=>{d==="click"&&(this.#r===u?this.#l():this.#c(u)),this.#p("image-map:area-activate",i),i.href&&d!=="click"&&(i.target==="_blank"?window.open(i.href,"_blank","noopener"):window.location.href=i.href)}),this.listen(a,"touchstart",f=>{d==="hover"&&(this.#a!==u?(f.preventDefault(),this.#a=u,this.#c(u)):this.#a=null)},{passive:!1}),this.listen(c,"focus",()=>{this.#c(u),a.setAttribute("data-hover","")}),this.listen(c,"blur",()=>{this.#l(),a.removeAttribute("data-hover")})}this.#e.appendChild(a),this.#n.push(u),this.#s.push(c)}this.appendChild(this.#e);for(let e of this.#s)this.appendChild(e);this.appendChild(this.#i),this.listen(this,"keydown",this.#d),this.#o=new ResizeObserver(()=>{this.#r&&this.#m(this.#r.svgShape)}),this.#o.observe(this.#t),this.setAttribute("role","group"),this.hasAttribute("aria-label")||this.setAttribute("aria-label",this.#t.alt||"Image map"),this.setAttribute("data-upgraded","")}#c(t){this.#i&&(this.#r=t,this.#i.innerHTML=t.contentHTML,this.#i.setAttribute("data-visible",""),this.#m(t.svgShape))}#l(){this.#i&&(this.#r=null,this.#i.removeAttribute("data-visible"))}#m(t){if(!this.#i||!t)return;let e=t.getBoundingClientRect(),i=this.#i.getBoundingClientRect(),s=8,n=8,o=window.innerWidth,a=window.innerHeight,l,c,h=e.top-i.height-s;h>=n?(l=h,c=e.left+(e.width-i.width)/2):e.bottom+s+i.height<=a-n?(l=e.bottom+s,c=e.left+(e.width-i.width)/2):e.right+s+i.width<=o-n?(l=e.top+(e.height-i.height)/2,c=e.right+s):(l=e.top+(e.height-i.height)/2,c=e.left-i.width-s),c=Math.max(n,Math.min(c,o-i.width-n)),l=Math.max(n,Math.min(l,a-i.height-n)),this.#i.style.top=`${l}px`,this.#i.style.left=`${c}px`}#d=t=>{let e=this.#s.filter(s=>!s.hasAttribute("aria-disabled")),i=e.indexOf(document.activeElement);switch(t.key){case"ArrowDown":case"ArrowRight":{t.preventDefault();let s=i<e.length-1?i+1:0;e[s]?.focus();break}case"ArrowUp":case"ArrowLeft":{t.preventDefault();let s=i>0?i-1:e.length-1;e[s]?.focus();break}case"Escape":this.#l(),this.#a=null;break}};#p(t,e){this.dispatchEvent(new CustomEvent(t,{detail:{area:e},bubbles:!0}))}};p("map-area",le);p("image-map",ce);var ur='<svg viewBox="0 0 68 48" width="68" height="48" aria-hidden="true" focusable="false"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.64 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="var(--color-error, #f00)"/><path d="M45 24 27 14v20z" fill="#fff"/></svg>',dr={hq:"hqdefault",mq:"mqdefault",sd:"sddefault",maxres:"maxresdefault"},he=class extends m{#t;#e;setup(){return this.#t=this.getAttribute("video-id"),this.#e=this.getAttribute("title")??"Play video",this.#t?(this.hasAttribute("autoplay")?this.#a():this.#n(),!0):(console.warn("youtube-player: missing required video-id attribute"),!1)}#i(){let t=new URLSearchParams({autoplay:"1"}),e=this.getAttribute("start");e&&t.set("start",e);let i=this.getAttribute("list");return i&&t.set("list",i),this.getAttribute("params")&&new URLSearchParams(this.getAttribute("params")||"").forEach((s,n)=>t.set(n,s)),`https://www.youtube-nocookie.com/embed/${this.#t}?${t}`}#s(){let t=this.getAttribute("thumbnail")??"hq";return`https://i.ytimg.com/vi/${this.#t}/${dr[t]??"hqdefault"}.jpg`}#n(){this.setAttribute("state","ready"),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-label",`Play ${this.#e}`),this.innerHTML=`<img src="${this.#s()}" alt="" loading="lazy" decoding="async"><button type="button" aria-label="Play ${this.#e}">${ur}</button>`,this.addEventListener("click",this.#r,{once:!0}),this.addEventListener("keydown",this.#o)}#r=()=>{this.removeEventListener("keydown",this.#o),this.#a()};#o=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.removeEventListener("click",this.#r),this.#a())};#a(){this.setAttribute("state","active"),this.removeAttribute("tabindex"),this.removeAttribute("role"),this.removeAttribute("aria-label"),this.innerHTML=`<iframe src="${this.#i()}" title="${this.#e}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen loading="lazy"></iframe>`,this.querySelector("iframe")?.focus()}};p("youtube-player",he);var vt=CSS.supports("anchor-name","--x"),_i=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,ue=class extends HTMLElement{get target(){return this.dataset.target??""}get placement(){return this.dataset.placement??"auto"}get action(){return this.dataset.action??"none"}get actionHint(){return this.dataset.actionHint??null}get skippable(){return this.dataset.skippable!=="false"}get scrollBehavior(){return this.dataset.scroll??"smooth"}},de=class r extends m{#t=[];#e=0;#i=!1;#s=null;#n=null;#r=null;#o=null;#a=null;#h=null;#c=null;#l=null;static#m=null;static observedAttributes=["data-step"];setup(){if(this.#t=[...this.querySelectorAll("tour-step")],this.#t.length===0)return!1;let t=this.querySelector(".page-tour-start-btn");if(t&&this.listen(t,"click",e=>{e.preventDefault(),this.start()}),this.id&&this.listen(document,"click",e=>{e.target?.closest?.(`[data-tour="${this.id}"]`)&&(e.preventDefault(),this.start())}),this.dataset.trigger==="auto"){let e=this.#j();e?.complete||e?.skipped?this.setAttribute("data-complete",""):setTimeout(()=>this.start(e?.step??0),400)}return!0}teardown(){this.#i&&this.stop()}attributeChangedCallback(t,e,i){if(t==="data-step"&&this.#i&&e!==null){let s=parseInt(i,10);!Number.isNaN(s)&&s!==this.#e&&this.#y(s)}}start(t=0){r.#m&&r.#m!==this&&r.#m.stop(),this.#a=document.activeElement,this.#i=!0,r.#m=this,this.#d(),this.setAttribute("data-active",""),this.removeAttribute("data-complete"),this.#T("tour:start",{step:t}),this.#y(t)}stop(){this.#S(),this.#i=!1,this.removeAttribute("data-active"),r.#m===this&&(r.#m=null)}next(){!this.#i||this.#r?.querySelector('[data-action="next"]')?.hasAttribute("data-waiting")||(this.#e<this.#t.length-1?this.#y(this.#e+1,"next"):this.#E())}prev(){this.#i&&this.#e>0&&this.#y(this.#e-1,"prev")}goto(t){this.#i&&t>=0&&t<this.#t.length&&this.#y(t)}skip(){!this.#i||(this.dataset.mode??"passive")==="forced"||(this.#T("tour:skip",{step:this.#e}),this.#_({skipped:!0}),this.stop(),this.setAttribute("data-complete",""))}reset(){this.#P(),this.removeAttribute("data-complete"),this.dataset.step="0"}#d(){this.#s=document.createElement("div"),this.#s.className="page-tour-backdrop",this.#s.setAttribute("aria-hidden","true"),this.#s.addEventListener("click",()=>{(this.dataset.mode??"passive")!=="forced"&&this.skip()}),this.#n=document.createElement("div"),this.#n.className="page-tour-spotlight",this.#n.setAttribute("aria-hidden","true"),this.#r=document.createElement("div"),this.#r.className="page-tour-card",this.#r.setAttribute("popover","manual"),this.#r.setAttribute("role","dialog"),this.#r.setAttribute("aria-modal","true"),this.#r.setAttribute("aria-label",this.dataset.title??"Page Tour"),this.#r.addEventListener("keydown",t=>this.#k(t)),this.#r.addEventListener("click",t=>this.#x(t)),this.#o=document.createElement("div"),this.#o.setAttribute("aria-live","polite"),this.#o.setAttribute("aria-atomic","true"),this.#o.className="visually-hidden",this.#o.id=`page-tour-announcer-${crypto.randomUUID().slice(0,8)}`,this.append(this.#s,this.#n,this.#r,this.#o),this.#r.showPopover(),requestAnimationFrame(()=>{this.#s?.setAttribute("data-visible","")})}#p(t){if(!this.#n)return;let e=parseInt(this.dataset.spotlightPadding??"",10)||8,i=t.getBoundingClientRect();Object.assign(this.#n.style,{top:`${i.top-e}px`,left:`${i.left-e}px`,width:`${i.width+e*2}px`,height:`${i.height+e*2}px`})}#u(t,e){if(this.#r){if(vt){this.#g(t,e);return}this.#v(t,e)}}#g(t,e){if(!this.#r)return;let i="--tour-target";t.style.anchorName=i,this.#r.style.positionAnchor=i,this.#r.style.position="fixed",this.#r.style.top="",this.#r.style.left="",this.#r.style.bottom="",this.#r.style.right="";let s="var(--tour-card-offset, 0.75rem)";switch(e==="auto"?this.#f(t):e){case"bottom":this.#r.style.top="anchor(bottom)",this.#r.style.left="anchor(center)",this.#r.style.translate="0 calc("+s+")";break;case"top":this.#r.style.bottom="anchor(top)",this.#r.style.left="anchor(center)",this.#r.style.translate="0 calc(-1 * "+s+")";break;case"right":this.#r.style.left="anchor(right)",this.#r.style.top="anchor(center)",this.#r.style.translate=s+" 0";break;case"left":this.#r.style.right="anchor(left)",this.#r.style.top="anchor(center)",this.#r.style.translate="calc(-1 * "+s+") 0";break}}#v(t,e){if(!this.#r)return;let i=t.getBoundingClientRect(),s=12,n=8,o=e==="auto"?this.#f(t):e;this.#r.style.position="fixed",this.#r.style.visibility="hidden",this.#r.style.top="0",this.#r.style.left="0",this.#r.style.translate="";let a=this.#r.getBoundingClientRect();this.#r.style.visibility="";let l=0,c=0,h=parseInt(this.dataset.spotlightPadding??"",10)||8;switch(o){case"bottom":l=i.bottom+h+s,c=i.left+(i.width-a.width)/2;break;case"top":l=i.top-h-s-a.height,c=i.left+(i.width-a.width)/2;break;case"right":l=i.top+(i.height-a.height)/2,c=i.right+h+s;break;case"left":l=i.top+(i.height-a.height)/2,c=i.left-h-s-a.width;break}c=Math.max(n,Math.min(c,window.innerWidth-a.width-n)),l=Math.max(n,Math.min(l,window.innerHeight-a.height-n)),Object.assign(this.#r.style,{top:`${l}px`,left:`${c}px`,translate:""})}#f(t){let e=t.getBoundingClientRect(),i=window.innerWidth,n=window.innerHeight-e.bottom,o=e.top,a=i-e.right,l=e.left,c=Math.max(n,o,a,l);return c===n?"bottom":c===o?"top":c===a?"right":"left"}#w(t,e){if(!this.#r)return;let i=this.#t.length,s=e===i-1,n=e===0,a=(this.dataset.mode??"passive")!=="forced",l=t.action!=="none";this.#r.innerHTML=`
1081
- <div class="page-tour-progress" aria-hidden="true">
1082
- ${this.#t.map((c,h)=>`
1083
- <span class="page-tour-pip" ${h===e?"data-active":""} ${h<e?"data-visited":""}></span>
1084
- `).join("")}
1085
- </div>
1086
- <p class="page-tour-meta">
1087
- <span class="page-tour-step-count">Step ${e+1} of ${i}</span>
1088
- </p>
1089
- <div class="page-tour-content">
1090
- ${t.innerHTML}
1091
- </div>
1092
- ${l&&t.actionHint?`
1093
- <p class="page-tour-action-hint">${t.actionHint}</p>
1094
- `:""}
1095
- <footer class="page-tour-footer">
1096
- ${a?`
1097
- <button type="button" class="page-tour-skip" data-action="skip">
1098
- ${s?"Close":"Skip tour"}
1099
- </button>
1100
- `:""}
1101
- <nav class="page-tour-nav" aria-label="Tour navigation">
1102
- ${n?"":`
1103
- <button type="button" class="page-tour-prev" data-action="prev">
1104
- Previous
1105
- </button>
1106
- `}
1107
- <button
1108
- type="button"
1109
- class="page-tour-next"
1110
- data-action="next"
1111
- ${l?"data-waiting":""}
1112
- >
1113
- ${s?"Finish":"Next"}
1114
- </button>
1115
- </nav>
1116
- </footer>
1117
- `}#y(t,e="next"){if(this.#c?.abort(),this.#c=null,this.#e!==t){let h=this.#t[this.#e],u=h?document.querySelector(h.target):null;u&&(vt&&(u.style.anchorName=""),u.removeAttribute("data-tour-target"))}this.#R(),this.#e=t;let i=this.#t[t],s=document.querySelector(i.target);if(!s){console.warn(`[page-tour] Target "${i.target}" not found, skipping step ${t}`),e==="next"&&t<this.#t.length-1?this.#y(t+1,"next"):e==="prev"&&t>0&&this.#y(t-1,"prev");return}s.setAttribute("data-tour-target","");let n=_i()?"instant":i.scrollBehavior;i.scrollBehavior!=="none"&&s.scrollIntoView({block:"nearest",behavior:n});let o=()=>{this.#p(s),this.#u(s,i.placement)};o(),setTimeout(o,_i()?0:300),this.#w(i,t);let a=this.#r;a&&(a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.focus()),requestAnimationFrame(()=>{let h=this.#r?.querySelector(".page-tour-content h3, .page-tour-content h2, .page-tour-content h4")??null;h?(h.hasAttribute("tabindex")||h.setAttribute("tabindex","-1"),h.focus()):(this.#r?.querySelector('[data-action="next"]')??null)?.focus()});let c=i.querySelector("h3, h2, h4")?.textContent??`Step ${t+1}`;this.#M(`Step ${t+1} of ${this.#t.length}: ${c}`),this.dataset.step=String(t),i.action!=="none"&&this.#b(i),this.#A(s),this.#_({step:t}),this.#i&&this.#T("tour:step",{step:t,target:s,direction:e})}#b(t){let e=document.querySelector(t.target);if(!e)return;let i=this.#r?.querySelector('[data-action="next"]')??null,s=new AbortController;this.#c=s;let o={click:"click",focus:"focus",input:"input",change:"change"}[t.action];o?e.addEventListener(o,()=>{i?.removeAttribute("data-waiting"),this.#r?.querySelector(".page-tour-action-hint")?.remove(),i?.focus(),this.#T("tour:action",{step:this.#e,action:t.action}),s.abort()},{signal:s.signal,once:!0}):t.action==="custom"&&this.addEventListener("tour:action",()=>{i?.removeAttribute("data-waiting"),this.#r?.querySelector(".page-tour-action-hint")?.remove(),i?.focus(),s.abort()},{signal:s.signal,once:!0})}#k(t){let e=this.dataset.mode??"passive",s=this.#t[this.#e]?.action!=="none",o=this.#r?.querySelector('[data-action="next"]')?.hasAttribute("data-waiting");switch(t.key){case"Escape":e!=="forced"&&(t.preventDefault(),this.skip());break;case"ArrowRight":case"ArrowDown":t.preventDefault(),s&&o||this.next();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.prev();break;case"Home":t.preventDefault(),this.goto(0);break;case"End":t.preventDefault(),this.goto(this.#t.length-1);break;case"Tab":this.#L(t,s&&o);break}}#L(t,e){if(!this.#r)return;let i=[...this.#r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')].filter(c=>!c.disabled&&c.offsetParent!==null),s=[];if(e){let c=this.#t[this.#e],h=document.querySelector(c.target);h&&(s=(h.matches("input, select, textarea, button, [href], [tabindex]")?[h]:[...h.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')]).filter(d=>!d.disabled&&d.offsetParent!==null))}let n=[...i,...s];if(n.length===0)return;let o=n[0],a=n[n.length-1],l=document.activeElement;t.shiftKey?(l===o||l&&!n.includes(l))&&(t.preventDefault(),a.focus()):(l===a||l&&!n.includes(l))&&(t.preventDefault(),o.focus())}#x(t){let e=t.target.closest("[data-action]");if(!e)return;switch(e.dataset.action){case"next":this.next();break;case"prev":this.prev();break;case"skip":this.skip();break}}#A(t){this.#h=new ResizeObserver(()=>{this.#C(t)}),this.#h.observe(t),this.listen(window,"scroll",()=>this.#C(t),{passive:!0})}#R(){this.#h&&(this.#h.disconnect(),this.#h=null),this.#l&&(cancelAnimationFrame(this.#l),this.#l=null)}#C(t){this.#l||(this.#l=requestAnimationFrame(()=>{if(this.#l=null,!this.#i)return;this.#p(t);let e=this.#t[this.#e];vt||this.#v(t,e.placement)}))}#E(){this.#T("tour:complete",{steps:this.#t.length}),this.#_({complete:!0}),this.stop(),this.setAttribute("data-complete","")}#S(){this.#c?.abort(),this.#c=null,this.#R();let t=this.#t[this.#e],e=t?document.querySelector(t.target):null;e&&(vt&&(e.style.anchorName=""),e.removeAttribute("data-tour-target")),this.#s?.remove(),this.#n?.remove(),this.#r?.hidePopover?.(),this.#r?.remove(),this.#o?.remove(),this.#s=null,this.#n=null,this.#r=null,this.#o=null;let i=this.#a;i&&typeof i.focus=="function"&&(i.focus(),this.#a=null)}#M(t){this.#o&&(this.#o.textContent="",requestAnimationFrame(()=>{this.#o&&(this.#o.textContent=t)}))}#T(t,e){let i=t!=="tour:skip";this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:i,detail:e}))}#N(){let t=this.dataset.persist??"session";return t==="session"?sessionStorage:t==="local"?localStorage:null}#$(){return`vb-tour-${this.dataset.persistKey??window.location.pathname}`}#_(t){let e=this.#N();if(!e)return;let i=this.#$(),s={};try{s=JSON.parse(e.getItem(i)??"null")??{}}catch{}e.setItem(i,JSON.stringify({...s,...t}))}#j(){let t=this.#N();if(!t)return null;try{return JSON.parse(t.getItem(this.#$())??"null")}catch{return null}}#P(){let t=this.#N();t&&t.removeItem(this.#$())}};p("page-tour",de);p("tour-step",ue);function ge(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var D=ge();function Pi(r){D=r}var I={exec:()=>null};function b(r,t=""){let e=typeof r=="string"?r:r.source,i={replace:(s,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(x.caret,"$1"),e=e.replace(s,o),i},getRegex:()=>new RegExp(e,t)};return i}var pr=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}>`)},mr=/^(?:[ \t]*(?:\n|$))+/,fr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,it=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,br=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,be=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Bi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ii=b(Bi).replace(/bull/g,be).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),vr=b(Bi).replace(/bull/g,be).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ve=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,yr=/^[^\n]+/,ye=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wr=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ye).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),kr=b(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,be).getRegex(),At="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",we=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,xr=b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",we).replace("tag",At).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),qi=b(ve).replace("hr",it).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex(),Ar=b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",qi).getRegex(),ke={blockquote:Ar,code:fr,def:wr,fences:gr,heading:br,hr:it,html:xr,lheading:Ii,list:kr,newline:mr,paragraph:qi,table:I,text:yr},Li=b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",it).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex(),Er={...ke,lheading:vr,table:Li,paragraph:b(ve).replace("hr",it).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Li).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex()},Sr={...ke,html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",we).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:I,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(ve).replace("hr",it).replace("heading",` *#{1,6} *[^
1118
- ]`).replace("lheading",Ii).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Cr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Tr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Di=/^( {2,}|\\)\n(?!\s*$)/,_r=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,H=/[\p{P}\p{S}]/u,Et=/[\s\p{P}\p{S}]/u,xe=/[^\s\p{P}\p{S}]/u,Lr=b(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Et).getRegex(),Oi=/(?!~)[\p{P}\p{S}]/u,Mr=/(?!~)[\s\p{P}\p{S}]/u,Nr=/(?:[^\s\p{P}\p{S}]|~)/u,Rr=b(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",pr?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),zi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,$r=b(zi,"u").replace(/punct/g,H).getRegex(),jr=b(zi,"u").replace(/punct/g,Oi).getRegex(),Fi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Pr=b(Fi,"gu").replace(/notPunctSpace/g,xe).replace(/punctSpace/g,Et).replace(/punct/g,H).getRegex(),Br=b(Fi,"gu").replace(/notPunctSpace/g,Nr).replace(/punctSpace/g,Mr).replace(/punct/g,Oi).getRegex(),Ir=b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xe).replace(/punctSpace/g,Et).replace(/punct/g,H).getRegex(),qr=b(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,H).getRegex(),Dr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Or=b(Dr,"gu").replace(/notPunctSpace/g,xe).replace(/punctSpace/g,Et).replace(/punct/g,H).getRegex(),zr=b(/\\(punct)/,"gu").replace(/punct/g,H).getRegex(),Fr=b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Hr=b(we).replace("(?:-->|$)","-->").getRegex(),Ur=b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Hr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Vr=b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",wt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Hi=b(/^!?\[(label)\]\[(ref)\]/).replace("label",wt).replace("ref",ye).getRegex(),Ui=b(/^!?\[(ref)\](?:\[\])?/).replace("ref",ye).getRegex(),Gr=b("reflink|nolink(?!\\()","g").replace("reflink",Hi).replace("nolink",Ui).getRegex(),Mi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ae={_backpedal:I,anyPunctuation:zr,autolink:Fr,blockSkip:Rr,br:Di,code:Tr,del:I,delLDelim:I,delRDelim:I,emStrongLDelim:$r,emStrongRDelimAst:Pr,emStrongRDelimUnd:Ir,escape:Cr,link:Vr,nolink:Ui,punctuation:Lr,reflink:Hi,reflinkSearch:Gr,tag:Ur,text:_r,url:I},Wr={...Ae,link:b(/^!?\[(label)\]\((.*?)\)/).replace("label",wt).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wt).getRegex()},pe={...Ae,emStrongRDelimAst:Br,emStrongLDelim:jr,delLDelim:qr,delRDelim:Or,url:b(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Mi).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:b(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Mi).getRegex()},Kr={...pe,br:b(Di).replace("{2,}","*").getRegex(),text:b(pe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},yt={normal:ke,gfm:Er,pedantic:Sr},Q={normal:Ae,gfm:pe,breaks:Kr,pedantic:Wr},Xr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ni=r=>Xr[r];function L(r,t){if(t){if(x.escapeTest.test(r))return r.replace(x.escapeReplace,Ni)}else if(x.escapeTestNoEncode.test(r))return r.replace(x.escapeReplaceNoEncode,Ni);return r}function Ri(r){try{r=encodeURI(r).replace(x.percentDecode,"%")}catch{return null}return r}function $i(r,t){let e=r.replace(x.findPipe,(n,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=e.split(x.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(x.slashPipe,"|");return i}function tt(r,t,e){let i=r.length;if(i===0)return"";let s=0;for(;s<i;){let n=r.charAt(i-s-1);if(n===t&&!e)s++;else if(n!==t&&e)s++;else break}return r.slice(0,i-s)}function Jr(r,t){if(r.indexOf(t[1])===-1)return-1;let e=0;for(let i=0;i<r.length;i++)if(r[i]==="\\")i++;else if(r[i]===t[0])e++;else if(r[i]===t[1]&&(e--,e<0))return i;return e>0?-2:-1}function Yr(r,t=0){let e=t,i="";for(let s of r)if(s===" "){let n=4-e%4;i+=" ".repeat(n),e+=n}else i+=s,e++;return i}function ji(r,t,e,i,s){let n=t.href,o=t.title||null,a=r[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:e,href:n,title:o,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function Zr(r,t,e){let i=r.match(e.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
1254
+ `),this.#a=t,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}#J(){let t=this.#a;t&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(e=>e!==t),this.#a=null),this.#et()}#Z(t,e){if(!CSS.highlights||this.getAttribute("highlight")==="false")return;let i=this.#Q(t);if(!i)return;let s=t-i.speechStart,n=this.#rt(i,s,e);if(!n)return;let o=new Highlight(n);if(CSS.highlights.set("text-reader-word",o),this.#c=o,this.getAttribute("scroll")!=="false"){let a=n.getBoundingClientRect(),l=window.innerHeight;if(a.top<0||a.bottom>l){let c=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;i.element.scrollIntoView({behavior:c?"auto":"smooth",block:"nearest"})}}}#et(){CSS.highlights&&CSS.highlights.delete("text-reader-word"),this.#c=null}#Q(t){let e=this.#i,i=0,s=e.length-1;for(;i<=s;){let n=i+s>>>1,o=e[n];if(t<o.speechStart)s=n-1;else if(t>=o.speechEnd)i=n+1;else return o}return null}#rt(t,e,i){let s=t.segments,n=e+i,o=s.find(c=>e>=c.start&&e<c.end);if(!o||!o.node.isConnected)return null;let a=s.find(c=>n>c.start&&n<=c.end)||o,l=document.createRange();return l.setStart(o.node,e-o.start),a.node.isConnected&&a.start>=o.start?l.setEnd(a.node,Math.min(n-a.start,a.node.length)):l.setEnd(o.node,o.node.length),l}async#it(){let t=speechSynthesis.getVoices();return t.length>0?t:new Promise(e=>{let i=()=>{speechSynthesis.removeEventListener("voiceschanged",i),e(speechSynthesis.getVoices())};speechSynthesis.addEventListener("voiceschanged",i),setTimeout(()=>{speechSynthesis.removeEventListener("voiceschanged",i),e(speechSynthesis.getVoices())},3e3)})}#st(t){if(!this.#k||!t.length)return;let e=this.#k;e.innerHTML="";let i=At(this.#j()||"en"),s=c=>At(c.lang)===i,n=t.filter(s),o=t.filter(c=>!s(c)),a=[...n,...o],l=this.getAttribute("voice");for(let c of a){let h=document.createElement("option");h.textContent=`${c.name} (${c.lang})`,h.dataset.voiceUri=c.voiceURI,l&&c.voiceURI===l&&(h.selected=!0),e.append(h)}if(!l){let c=n.find(h=>h.default)||n[0];if(c){let h=[...e.options].find(u=>u.dataset.voiceUri===c.voiceURI);h&&(h.selected=!0)}}}#tt(t,e){let i=document.activeElement;t();for(let[s,n]of e)if(s&&n&&i===s&&!n.hidden&&!n.disabled){n.focus();return}}#nt(t){if(!this.#p||!this.#d||!this.#f)return;let e=this.#p,i=this.#d,s=this.#f;this.#tt(()=>{e.hidden=t,i.hidden=!t,s.disabled=!t},t?[[e,i]]:[[i,e],[s,e]]),this.#y&&(this.#g&&this.#g.setAttribute("aria-pressed",String(t)),t?this.#N():this.#I())}#G(t){if(!this.#p||!this.#d)return;let e=this.#p,i=this.#d;this.#tt(()=>{e.hidden=!t,i.hidden=t},t?[[i,e]]:[[e,i]])}#X(){this.#l=!1,this.#o=!1,this.#r=0,this.#e=null,this.#H(),this.#et(),this.#nt(!1)}#Y(t){return Math.round(Math.max(.5,Math.min(2,t))*10)/10}#V(t,e={}){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}#at=()=>{this.#l&&speechSynthesis.cancel()}};g("text-reader",Fe);var ro="http://www.w3.org/1999/xhtml",qe="http://www.w3.org/2000/svg",no="http://www.w3.org/1998/Math/MathML",oo=new Set([ro,qe,no]),He="user-content-",ao=new Set(["script","iframe","frame","frameset","object","embed","applet","portal","fencedframe","form","base","link","meta","noscript","foreignobject","style","xmp","noembed","noframes","plaintext","mglyph","malignmark","annotation-xml"]),js=new Set(["title","desc"]),lo=new Set(["animate","set","animatemotion","animatetransform"]),co=new Set(["href","xlink:href","action","formaction","data","codebase","cite","background","longdesc","manifest","to","from","values","by"]),ho=new Set(["src","poster","srcset"]),uo=new Set(["srcdoc","form","formaction","formmethod","formtarget","formenctype","formnovalidate","action","method","ping"]),po=new Set(["popovertarget","popovertargetaction","commandfor","command","interestfor","autofocus"]),fo=new Set(["for","headers","list","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-flowto","aria-details","aria-errormessage","aria-activedescendant"]),mo={"include-file":["trusted","allow-scripts","allow-cross-origin"],"markdown-viewer":["src","sanitize","ping","allow-cross-origin"]},go=new Set(["social-embed","youtube-player","geo-map"]),bo=["src","src-dark","data-src","url","endpoint","tile-url","data-versions"],vo=new Set(["audio-player","video-player","image-map","brand-mark"]);function yo(r){return String(r).replace(/[\u0000- \u007f-\u009f]/g,"").toLowerCase()}function Bs(r,t=!1){let e=yo(r);return t?/(^|,)(javascript|vbscript|livescript):/.test(e)?!0:/(^|,)data:/.test(e)?e.split(/(?=data:)/).filter(s=>s.startsWith("data:")).some(s=>!/^data:(image|audio|video|font)\//.test(s)):!1:/^(javascript|vbscript|livescript|data):/.test(e)}function Os(r){let t=String(r).replace(/\/\*[\s\S]*?\*\//g,"").replace(/\\/g,"").replace(/\s+/g,"").toLowerCase();return/expression\(|javascript:|vbscript:|-moz-binding|behavior:|@import|position:fixed/.test(t)}var wo=r=>String(r.localName||r.tagName||"").toLowerCase(),ko=r=>r.startsWith(He)?r:He+r;function Ao(r,t){if(ao.has(t))return!0;let e=r.namespaceURI;return!!(e&&!oo.has(e)||t==="title"&&e!==qe||js.has(t)&&e===qe&&r.children?.length||lo.has(t)&&(r.getAttribute("attributeName")||r.getAttribute("attributename")||"").toLowerCase().includes("href"))}function xo(r,t){for(let e of[...r.attributes]){let i=e.name.toLowerCase();if(i.startsWith("on")||uo.has(i)||!t.keepIds&&po.has(i)){r.removeAttribute(e.name);continue}if(i==="style"){(!t.keepStyle||Os(e.value))&&r.removeAttribute(e.name);continue}if((i==="id"||i==="name")&&!t.keepIds){let s=ko(e.value);i==="id"?t.ids.set(e.value,s):t.ids.set(`name:${e.value}`,s),r.setAttribute(e.name,s);continue}if(co.has(i)||i.endsWith(":href")){Bs(e.value,!1)&&r.removeAttribute(e.name);continue}ho.has(i)&&Bs(e.value,!0)&&r.removeAttribute(e.name)}}function Eo(r,t){let e=(r.getAttribute("type")||"").toLowerCase();t==="button"&&e!=="button"&&r.setAttribute("type","button"),t==="input"&&/^(submit|reset|image)$/.test(e)&&r.setAttribute("type","button")}function So(r,t){for(let e of r)for(let i of[...e.attributes]){let s=i.name.toLowerCase(),n=i.value;if((s==="href"||s.endsWith(":href"))&&n.startsWith("#")){let o=Co(n.slice(1));t.has(o)&&e.setAttribute(i.name,`#${t.get(o)}`)}else if(s==="usemap"&&n.startsWith("#")){let o=t.get(`name:${n.slice(1)}`);o?e.setAttribute(i.name,`#${o}`):e.removeAttribute(i.name)}else if(fo.has(s)){let o=n.split(/\s+/).filter(Boolean).map(a=>t.get(a)||(a.startsWith(He)?a:null)).filter(Boolean);o.length?e.setAttribute(i.name,o.join(" ")):e.removeAttribute(i.name)}else n.includes("url(#")&&e.setAttribute(i.name,n.replace(/url\(#([^)]+)\)/g,(o,a)=>t.has(a)?`url(#${t.get(a)})`:o))}}function Co(r){try{return decodeURIComponent(r)}catch{return r}}function Ds(r){let t=r.childNodes;if(t)for(let e of[...t])e.nodeType===8?e.remove():(e.nodeType===1||e.nodeType===11)&&Ds(e)}function Fs(r,t){Ds(r);let e=[...r.querySelectorAll("*")];t.includeRoot&&e.unshift(r);let i=new Map,s=[],n={...t,ids:i};for(let o of e){if(!Lo(o,r))continue;let a=wo(o);if(t.svgOnly&&(js.has(a)||a==="style")){if(a==="style"&&Os(o.textContent||"")){o.remove();continue}}else if(Ao(o,a)){o.remove();continue}if(!t.keepIds&&!t.svgOnly&&go.has(a)){To(o);continue}if(a==="template"){let c=o.content;c&&Fs(c,{...t,includeRoot:!1})}xo(o,n),t.keepIds||Eo(o,a);let l=mo[a];if(l)for(let c of l)o.removeAttribute(c);if(a==="include-file"&&!t.allowIncludeFile&&o.removeAttribute("src"),!t.keepIds&&!t.svgOnly&&a.includes("-")&&a!=="include-file"&&!vo.has(a))for(let c of bo)o.removeAttribute(c);s.push(o)}!t.keepIds&&i.size&&So(s,i)}function To(r){let t=r.parentNode;if(t){for(let e of[...r.childNodes])t.insertBefore(e,r);r.remove()}}function Lo(r,t){let e=r;for(;e;){if(e===t)return!0;e=e.parentNode??e.parent??null}return!1}function Ft(r,t={}){let e=document.createElement("template");return r&&typeof r=="string"&&(e.innerHTML=r,Fs(e.content,{allowIncludeFile:!!t.allowIncludeFile,keepIds:!!t.keepIds,keepStyle:!!t.keepStyle})),e.content}function qs({newItems:r,nodes:t,keyOf:e,renderItem:i,containerFor:s}){let n=[],o=[],a=[],l=new Set;for(let h of r)l.add(e(h));for(let[h,u]of[...t])l.has(h)||(u.remove(),t.delete(h),a.push(h));let c=new Map;for(let h of r){let u=e(h),p=t.get(u)||null,d=s(h,p);c.has(d)||c.set(d,[]),c.get(d)?.push({item:h,key:u,existing:p})}for(let[h,u]of c)for(let p=0;p<u.length;p++){let{item:d,key:f,existing:m}=u[p],y=m;y?(y.parentElement!==h||h.children[p]!==y)&&o.push(f):(y=i(d),t.set(f,y),n.push(f));let w=h.children[p];w!==y&&h.insertBefore(y,w||null)}return{added:n,moved:o,removed:a}}var Ue=class extends b{#t=null;#e=null;#i=null;#s=new Map;#r=null;#n=new Map;#a=new Set;setup(){this.#c(),this.#h(),this.#u(),this.#l(),this.#y(),this.#p()}teardown(){for(let t of this.#a)t.abort();this.#a.clear()}#c(){this.#t=this.querySelector(":scope > chat-thread"),this.#e=this.querySelector(":scope > chat-input"),this.#i=this.querySelector(":scope > header select[data-model-select]")}#h(){let t=this.querySelector(":scope > script[data-participants]");if(t)try{let e=JSON.parse(t.textContent);this.#s=new Map(Object.entries(e))}catch{console.warn("[chat-window] Invalid participant JSON")}}#l(){if(this.#t)for(let t of this.#t.querySelectorAll("chat-message[data-from]"))this.#o(t)}#o(t){let e=t.getAttribute("data-from");if(!e)return;let i=this.#s.get(e);i?.name?t.setAttribute("data-from-label",i.name):t.hasAttribute("data-from-label")||t.setAttribute("data-from-label",e)}#u(){if(!this.#i)return;let t=this.getAttribute("model");t?this.#i.value=t:this.#i.value&&this.setAttribute("model",this.#i.value)}#p(){this.listen(this,"chat-input:send",this.#d),this.#i&&this.listen(this.#i,"change",this.#f)}#d=async t=>{t.stopPropagation();let{message:e}=t.detail;if(!e||!this.#t)return;let i=this.#k("user",e,"user");this.#t.appendChild(i),this.#g(),this.#y();let s=this.#v(),n=this.#m(s);this.#t.appendChild(n),this.#g(),this.#e&&(this.#e.disabled=!0);let o=this.getAttribute("endpoint");if(o){let a=new AbortController;this.#a.add(a);try{let l=await this.#b(o,e,a.signal);this.resolveTyping(n,l)}catch(l){a.signal.aborted?n.remove():(this.resolveTyping(n,"<p>Sorry, something went wrong.</p>",{error:!0}),this.dispatchEvent(new CustomEvent("chat-window:error",{bubbles:!0,detail:{error:l.message,status:l.status??0}})))}finally{this.#a.delete(a)}}else this.dispatchEvent(new CustomEvent("chat-window:send",{bubbles:!0,detail:{message:e,typingElement:n}}));this.#e&&(this.#e.disabled=!1,this.isConnected&&this.#e.focus()),this.#g(),this.#y()};#f=()=>{let t=this.#i.value;this.setAttribute("model",t),this.dispatchEvent(new CustomEvent("chat-window:model-change",{bubbles:!0,detail:{model:t}}))};#k(t,e,i){let s=document.createElement("chat-message");s.setAttribute("data-role",t),i&&(s.setAttribute("data-from",i),this.#o(s));let n=document.createElement("chat-bubble");return this.#w(n,e,{asText:t==="user"}),s.appendChild(n),s}#w(t,e,{asText:i=!1}={}){let s=e==null?"":String(e);if(i||!s.includes("<")){let n=document.createElement("p");n.textContent=s,t.replaceChildren(n)}else t.replaceChildren(Ft(s))}#m(t){let e=document.createElement("chat-message");e.setAttribute("data-role","agent"),e.setAttribute("data-status","typing");let i="Agent";t&&(e.setAttribute("data-from",t),this.#o(e),i=this.#s.get(t)?.name??t);let s=this.getAttribute("model");s&&e.setAttribute("data-model",s);let n=document.createElement("chat-bubble"),o=document.createElement("span");return o.className="visually-hidden",o.setAttribute("data-chat-typing",""),o.textContent=`${i} is typing`,n.appendChild(o),e.appendChild(n),e}#v(){for(let[t,e]of this.#s)if(e.role==="agent")return t;return null}#y(){if(!this.#t)return;if(this.#t.querySelector(":scope > chat-message")!==null){this.#r?.remove(),this.#r=null;return}this.#r||(this.#r=this.#t.querySelector(":scope > [data-chat-empty]")),this.#r||(this.#r=document.createElement("p"),this.#r.setAttribute("data-chat-empty",""),this.#r.textContent=this.getAttribute("empty-message")||"Send a message to start."),this.#r.parentNode!==this.#t&&this.#t.prepend(this.#r)}#g(){this.#t&&requestAnimationFrame(()=>{this.#t.scrollTop=this.#t.scrollHeight})}scrollToBottom(){this.#g()}async#b(t,e,i){let s={message:e,model:this.getAttribute("model")||void 0},n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),signal:i});if(!n.ok){let a=new Error(`Chat request failed: ${n.status}`);throw a.status=n.status,a}let o=await n.json();return o.html??o.message??o.content??""}get model(){return this.getAttribute("model")??""}set model(t){this.setAttribute("model",t),this.#i&&(this.#i.value=t)}get participants(){return this.#s}set participants(t){this.#s=t instanceof Map?t:new Map(Object.entries(t)),this.#l()}clearThread(){if(this.#t){for(;this.#t.firstChild;)this.#t.removeChild(this.#t.firstChild);this.#y()}}appendMessage(t,e,i){if(!this.#t)return;let s=this.#k(t,e,i);return this.#t.appendChild(s),this.#g(),this.#y(),s}resolveTyping(t,e,{error:i=!1}={}){if(!t)return;let s=t.querySelector(":scope > chat-bubble");s||(s=document.createElement("chat-bubble"),t.appendChild(s)),this.#w(s,e),t.removeAttribute("aria-label"),i?t.setAttribute("data-status","error"):t.removeAttribute("data-status"),this.#g()}get messages(){return this.#t?[...this.#t.querySelectorAll(':scope > chat-message:not([data-status="typing"])')].map(t=>{let e=t.getAttribute("data-role")||"user",i=t.querySelector("chat-bubble");return{id:t.id||t.getAttribute("data-id")||void 0,role:e,content:(e==="user"?i?.textContent?.trim():i?.innerHTML)||"",from:t.getAttribute("data-from")||void 0}}):[]}set messages(t){if(!this.#t)return;let e=Array.isArray(t)?t:[];for(let[s,n]of this.#n)n.parentNode!==this.#t&&this.#n.delete(s);let i=new Set(this.#n.values());for(let s of[...this.#t.children])if(!i.has(s)){if(s.localName==="chat-message"&&s.id&&!s.matches('[data-status="typing"]')&&!this.#n.has(s.id)){this.#n.set(s.id,s);continue}s===this.#r&&(this.#r=null),s.remove()}qs({newItems:e,nodes:this.#n,keyOf:s=>s.id??s.role+":"+s.content,renderItem:s=>{let n=this.#k(s.role||"user",s.content||"",s.from);return s.id&&(n.id=s.id),n},containerFor:()=>this.#t}),this.#y(),this.#g(),this.dispatchEvent(new CustomEvent("chat-window:messages-changed",{detail:{messages:e,source:"property"},bubbles:!0}))}};g("chat-window",Ue);var Ve=class extends b{static formAssociated=!0;#t;#e=null;#i=null;#s;#r=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){return this.#e=this.querySelector(":scope > textarea, :scope textarea[data-grow]"),this.#i=this.querySelector("[data-send]"),this.#e?(this.#n(),this.listen(this.#e,"keydown",this.#a),this.listen(this.#e,"input",this.#c),this.#i&&this.listen(this.#i,"click",this.#h),this.form&&this.listen(this.form,"submit",this.#l),this.#f(),this.#p(),this.#d(),this.hasAttribute("autofocus")&&requestAnimationFrame(()=>this.#e?.focus()),!0):!1}teardown(){clearTimeout(this.#s)}#n(){let t=this.#e;t&&(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")||t.labels&&t.labels.length||t.hasAttribute("title")||t.setAttribute("aria-label","Message"))}#a=t=>{if(!(t.isComposing||t.keyCode===229))switch(t.key){case"Enter":t.shiftKey||(t.preventDefault(),this.#u());break;case"Escape":t.preventDefault(),this.reset();break}};#c=()=>{this.#p(),this.#d(),clearTimeout(this.#s),this.#s=setTimeout(()=>{this.dispatchEvent(new CustomEvent("chat-input:input",{bubbles:!0,detail:{value:this.value,length:this.value.length}}))},100)};#h=t=>{let e=this.#i;this.form&&e?.type==="submit"&&e.form===this.form&&this.#o()||(t.preventDefault(),this.#u())};#l=t=>{setTimeout(()=>{t.defaultPrevented||this.reset()},0)};#o({report:t=!1}={}){if(this.matches(":disabled"))return!1;let e=this.value.trim(),i=parseInt(this.getAttribute("minlength")??"1",10)||1;return e.length<i?!1:this.#t.validity.valid?!0:(t&&this.#t.reportValidity(),!1)}#u(){if(!this.#o({report:!0}))return;let t=this.form;if(t){let e=this.#i,i=e?.type==="submit"&&e.form===t?e:null;t.requestSubmit(i);return}this.dispatchEvent(new CustomEvent("chat-input:send",{bubbles:!0,detail:{message:this.value.trim()}})),this.reset()}#p(){let t=this.value;this.#t.setFormValue(t||null)}#d(){let t=this.value,e=parseInt(this.getAttribute("maxlength")??"4000",10)||4e3;t.length>e&&this.#e?this.#t.setValidity({tooLong:!0},`Message exceeds ${e} characters`,this.#e):this.#t.setValidity({})}#f(){let t=this.hasAttribute("disabled")||this.#r;this.#e&&(this.#e.disabled=t),this.#i&&(this.#i.disabled=t)}formDisabledCallback(t){this.#r=t,this.#f()}formResetCallback(){this.reset()}formStateRestoreCallback(t){!t||!this.#e||(this.#e.value=t,this.#p(),this.#d())}get form(){return this.#t.form}get name(){return this.getAttribute("name")??""}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#e?.value??""}set value(t){if(!this.#e)return;let e=t==null?"":String(t);this.#e.value!==e&&(this.#e.value=e,this.#e.dispatchEvent(new Event("input",{bubbles:!0})),this.#p(),this.#d(),this.dispatchEvent(new CustomEvent("chat-input:change",{bubbles:!0,detail:{value:e,source:"api"}})))}get disabled(){return this.hasAttribute("disabled")}set disabled(t){this.toggleAttribute("disabled",!!t)}focus(){this.#e?.focus()}reset(){this.#e&&(this.#e.value="",this.#e.dispatchEvent(new Event("input",{bubbles:!0})),this.#p(),this.#d())}static get observedAttributes(){return["disabled"]}attributeChangedCallback(t){t==="disabled"&&this.#f()}};g("chat-input",Ve);var qt="http://www.w3.org/2000/svg";function Mo(r){return r.trim().split(/[\s,]+/).map(Number)}function Ro(r,t){let e=Mo(t);switch(r){case"rect":{let[i,s,n,o]=e;return{type:"rect",x:i,y:s,width:n-i,height:o-s}}case"circle":{let[i,s,n]=e;return{type:"circle",cx:i,cy:s,r:n}}case"poly":{let i=[];for(let s=0;s<e.length;s+=2)i.push([e[s],e[s+1]]);return{type:"poly",points:i}}default:return null}}function _o(r){if(!r)return null;switch(r.type){case"rect":{let t=document.createElementNS(qt,"rect");return t.setAttribute("x",String(r.x)),t.setAttribute("y",String(r.y)),t.setAttribute("width",String(r.width)),t.setAttribute("height",String(r.height)),t}case"circle":{let t=document.createElementNS(qt,"circle");return t.setAttribute("cx",String(r.cx)),t.setAttribute("cy",String(r.cy)),t.setAttribute("r",String(r.r)),t}case"poly":{let t=document.createElementNS(qt,"polygon");return t.setAttribute("points",r.points.map(e=>e.join(",")).join(" ")),t}default:return null}}function No(r){if(!r)return{x:0,y:0,width:0,height:0};switch(r.type){case"rect":return{x:r.x,y:r.y,width:r.width,height:r.height};case"circle":return{x:r.cx-r.r,y:r.cy-r.r,width:r.r*2,height:r.r*2};case"poly":{let t=100,e=100,i=0,s=0;for(let[n,o]of r.points)n<t&&(t=n),o<e&&(e=o),n>i&&(i=n),o>s&&(s=o);return{x:t,y:e,width:i-t,height:s-e}}default:return{x:0,y:0,width:0,height:0}}}var Hs=0,Po=300,Io='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function $o(r){return r==null||r===""?[]:r instanceof HTMLTemplateElement?[r.content.cloneNode(!0)]:r instanceof Node?[r.cloneNode(!0)]:[document.createTextNode(String(r))]}var We=class extends HTMLElement{get shape(){return this.getAttribute("shape")||"rect"}get coords(){return this.getAttribute("coords")||""}get label(){return this.getAttribute("label")||""}get href(){return this.getAttribute("href")}get target(){return this.getAttribute("target")||""}get tooltipMode(){return this.getAttribute("tooltip")||"hover"}get disabled(){return this.hasAttribute("disabled")}connectedCallback(){this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded")}},Ke=class extends b{#t=null;#e=null;#i=null;#s=[];#r=[];#n=null;#a=null;#c=null;#h=0;#l=0;#o=[];setup(){if(this.#t=this.querySelector(":scope > img"),!this.#t){let t=this.getAttribute("src"),e=this.getAttribute("alt");if(t)this.#t=document.createElement("img"),this.#t.src=t,this.#t.alt=e||"",this.prepend(this.#t);else return!1}return this.#t.classList.add("image-map-img"),this.#t.complete?this.#u():this.listen(this.#t,"load",()=>this.#u(),{once:!0}),!0}teardown(){this.#a?.disconnect(),this.#a=null,this.#m(),clearTimeout(this.#h),cancelAnimationFrame(this.#l),this.#e?.remove(),this.#i?.remove();for(let t of this.#r)t.anchor?.remove();for(let t of this.#o)t.removeAttribute("id");this.#e=null,this.#i=null,this.#r=[],this.#s=[],this.#o=[],this.#c=null}get regions(){return[...this.querySelectorAll(":scope > map-area")].map(t=>{let e;if(t.children.length){let i=document.createDocumentFragment();i.append(...[...t.childNodes].map(s=>s.cloneNode(!0))),e=i}else e=t.textContent?.trim()||void 0;return{shape:t.getAttribute("shape")||void 0,coords:t.getAttribute("coords")||void 0,label:t.getAttribute("label")||t.textContent?.trim().replace(/\s+/g," ")||void 0,href:t.getAttribute("href")||void 0,target:t.getAttribute("target")||void 0,tooltip:t.getAttribute("tooltip")||void 0,disabled:t.hasAttribute("disabled")||void 0,content:e}})}set regions(t){let e=Array.isArray(t)?t:[];for(let i of[...this.querySelectorAll(":scope > map-area")])i.remove();for(let i of e){if(!i)continue;let s=document.createElement("map-area");i.shape&&s.setAttribute("shape",i.shape),i.coords&&s.setAttribute("coords",i.coords),i.label&&s.setAttribute("label",i.label),i.href&&s.setAttribute("href",i.href),i.target&&s.setAttribute("target",i.target),i.tooltip&&s.setAttribute("tooltip",i.tooltip),i.disabled&&s.setAttribute("disabled",""),s.append(...$o(i.content)),this.appendChild(s)}this._reinit(),this.dispatchEvent(new CustomEvent("image-map:regions-changed",{detail:{regions:this.regions,source:"property"},bubbles:!0}))}#u(){if(!this.isConnected||this.#e)return;let t=[...this.querySelectorAll(":scope > map-area")];if(t.length===0)return;let e=document.createElementNS(qt,"svg");e.setAttribute("viewBox","0 0 100 100"),e.setAttribute("preserveAspectRatio","none"),e.setAttribute("aria-hidden","true"),e.classList.add("image-map-overlay"),this.#e=e;let i=document.createElement("div");i.className="image-map-tooltip",i.id=`imap-tip-${++Hs}`,i.hidden=!0,this.#i=i;for(let s of t){let n=s,o=Ro(n.shape,n.coords),a=_o(o);if(!a)continue;let l=No(o),c=s.getAttribute("href"),h=s.getAttribute("target")||"",u=s.getAttribute("tooltip")||"hover",p=s.hasAttribute("disabled"),d=s.textContent?.trim().replace(/\s+/g," ")||"",f=s.getAttribute("label")||d,m=c?document.createElement("a"):document.createElement("button");c?(m.href=c,h&&(m.target=h)):m.type="button",m.className="image-map-anchor",m.textContent=f;let y=u!=="none"&&(s.children.length>0||d&&d!==f);y&&(s.id||(s.id=`imap-area-${++Hs}`,this.#o.push(s)),u==="click"?(m.setAttribute("aria-expanded","false"),m.setAttribute("aria-controls",i.id)):m.setAttribute("aria-describedby",s.id)),m.style.left=`${l.x}%`,m.style.top=`${l.y}%`,m.style.width=`${l.width}%`,m.style.height=`${l.height}%`,p&&(a.setAttribute("data-disabled",""),m.setAttribute("tabindex","-1"),m.setAttribute("aria-disabled","true"));let w={area:s,parsed:o,svgShape:a,anchor:m,href:c,target:h,mode:u,hasContent:y,keyboardOpen:!1};p||this.#p(w),e.appendChild(a),this.#r.push(w),this.#s.push(m)}this.appendChild(e);for(let s of this.#s)this.appendChild(s);this.appendChild(i),this.listen(i,"pointerenter",()=>clearTimeout(this.#h)),this.listen(i,"pointerleave",()=>{this.#n?.mode==="hover"&&!this.#f()&&this.#k()}),this.listen(i,"focusout",s=>{let n=s.relatedTarget;n&&(i.contains(n)||n===this.#n?.anchor)||this.#m()}),this.listen(this,"keydown",this.#g),this.listen(document,"keydown",this.#b),this.listen(document,"pointerdown",this.#T),this.listen(window,"scroll",this.#v,{passive:!0,capture:!0}),this.#a=new ResizeObserver(this.#v),this.#a.observe(this.#t),this.setAttribute("role","group"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label",this.#t.alt||this.dataset.labelMap||"Image map")}#p(t){let{svgShape:e,anchor:i,area:s,mode:n}=t;this.listen(e,"pointerenter",()=>{clearTimeout(this.#h),n==="hover"&&this.#w(t),e.setAttribute("data-hover",""),this.#A("image-map:area-enter",s)}),this.listen(e,"pointerleave",()=>{n==="hover"&&this.#n===t&&!this.#f()&&this.#k(),document.activeElement!==i&&e.removeAttribute("data-hover"),this.#A("image-map:area-leave",s)}),this.listen(e,"click",()=>{let o=this.#d(t,!1);t.href&&n!=="click"&&!o.defaultPrevented&&(t.target==="_blank"?window.open(t.href,"_blank","noopener"):window.location.href=t.href)}),this.listen(e,"touchstart",o=>{n==="hover"&&(this.#c!==t?(o.preventDefault(),this.#c=t,this.#w(t)):this.#c=null)},{passive:!1}),this.listen(i,"click",o=>{let a=o.detail===0,l=this.#d(t,a);(n==="click"||l.defaultPrevented)&&o.preventDefault()}),t.href&&this.listen(i,"keydown",o=>{o.key===" "&&(o.preventDefault(),i.click())}),this.listen(i,"focus",()=>{clearTimeout(this.#h),n==="hover"&&this.#w(t),e.setAttribute("data-hover",""),this.#A("image-map:area-enter",s)}),this.listen(i,"blur",o=>{e.removeAttribute("data-hover"),this.#A("image-map:area-leave",s);let a=o.relatedTarget;this.#n===t&&!(a&&this.#i?.contains(a))&&this.#m()})}#d(t,e){if(t.mode==="click"&&t.hasContent){if(this.#n===t)this.#m();else if(this.#w(t),e){t.keyboardOpen=!0;let i=this.#i?.querySelector(Io);i&&i.focus()}}return this.#A("image-map:area-activate",t.area,!0)}#f(){let t=document.activeElement;return!!(t&&this.#i?.contains(t))}#k(){clearTimeout(this.#h),this.#h=setTimeout(()=>this.#m(),Po)}#w(t){let e=this.#i;!e||t.mode==="none"||!t.hasContent||(clearTimeout(this.#h),this.#n&&this.#n!==t&&this.#m(),this.#n=t,e.replaceChildren(...[...t.area.childNodes].map(i=>i.cloneNode(!0))),t.mode==="click"?(e.removeAttribute("role"),e.setAttribute("role","group"),e.setAttribute("aria-label",t.anchor.textContent||""),t.anchor.setAttribute("aria-expanded","true")):(e.setAttribute("role","tooltip"),e.removeAttribute("aria-label")),t.anchor.nextSibling!==e&&t.anchor.after(e),e.hidden=!1,e.setAttribute("data-state-visible",""),this.#y(t.svgShape))}#m({restoreFocus:t=!1}={}){clearTimeout(this.#h);let e=this.#n,i=this.#i;if(!i||!e)return;let s=this.#f();this.#n=null,e.keyboardOpen=!1,e.mode==="click"&&e.anchor.hasAttribute("aria-expanded")&&e.anchor.setAttribute("aria-expanded","false"),i.removeAttribute("data-state-visible"),i.hidden=!0,i.replaceChildren(),(t||s)&&e.anchor.focus()}#v=()=>{!this.#n||this.#l||(this.#l=requestAnimationFrame(()=>{this.#l=0,this.#n&&this.#y(this.#n.svgShape)}))};#y(t){if(!this.#i||!t)return;let e=t.getBoundingClientRect(),i=this.#i.getBoundingClientRect(),s=8,n=8,o=window.innerWidth,a=window.innerHeight,l,c,h=e.top-i.height-s;h>=n?(l=h,c=e.left+(e.width-i.width)/2):e.bottom+s+i.height<=a-n?(l=e.bottom+s,c=e.left+(e.width-i.width)/2):e.right+s+i.width<=o-n?(l=e.top+(e.height-i.height)/2,c=e.right+s):(l=e.top+(e.height-i.height)/2,c=e.left-i.width-s),c=Math.max(n,Math.min(c,o-i.width-n)),l=Math.max(n,Math.min(l,a-i.height-n)),this.#i.style.top=`${l}px`,this.#i.style.left=`${c}px`}#g=t=>{if(this.#i?.contains(t.target))return;let e=this.#s.filter(s=>!s.hasAttribute("aria-disabled")),i=e.indexOf(document.activeElement);if(i!==-1)switch(t.key){case"ArrowDown":case"ArrowRight":{t.preventDefault(),e[i<e.length-1?i+1:0]?.focus();break}case"ArrowUp":case"ArrowLeft":{t.preventDefault(),e[i>0?i-1:e.length-1]?.focus();break}}};#b=t=>{t.key==="Escape"&&(this.#c=null,this.#n&&(t.preventDefault(),this.#m()))};#T=t=>{if(!this.#n)return;let e=t.target;this.#i?.contains(e)||this.contains(e)&&e!==this&&e!==this.#t||(this.#c=null,this.#m())};#A(t,e,i=!1){let s=new CustomEvent(t,{detail:{area:e},bubbles:!0,cancelable:i});return this.dispatchEvent(s),s}};g("map-area",We);g("image-map",Ke);var zo='<svg viewBox="0 0 68 48" width="68" height="48" aria-hidden="true" focusable="false"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.64 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="var(--color-error, #f00)"/><path d="M45 24 27 14v20z" fill="#fff"/></svg>',Bo={hq:"hqdefault",mq:"mqdefault",sd:"sddefault",maxres:"maxresdefault"},Us="YouTube video",jo="Play {title}",Oo=/^\d+$/;function Vs(r){return String(r).replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function Do(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches||document.documentElement.hasAttribute("data-motion-reduced")}var Ge=class extends b{#t="";#e=Us;setup(){let t=this.getAttribute("video-id");return this.#e=this.getAttribute("title")||Us,t?/^[A-Za-z0-9_-]{6,20}$/.test(t)?(this.#t=t,this.hasAttribute("autoplay")&&!Do()?this.#c(!1):this.#a(),!0):(console.warn(`youtube-player: invalid video-id ${JSON.stringify(t)}`),!1):(console.warn("youtube-player: missing required video-id attribute"),!1)}#i(t){let e=this.getAttribute(t);return e===null||e===""?null:Oo.test(e.trim())?e.trim():(console.warn(`youtube-player: ${t} must be whole seconds, got ${JSON.stringify(e)}`),null)}#s(){let t=new URLSearchParams({autoplay:"1"}),e=this.#i("start");e&&t.set("start",e);let i=this.#i("end");i&&t.set("end",i);let s=this.getAttribute("list");s&&t.set("list",s);let n=this.getAttribute("params");return n&&new URLSearchParams(n).forEach((o,a)=>t.set(a,o)),`https://www.youtube-nocookie.com/embed/${this.#t}?${t}`}#r(t){return`https://i.ytimg.com/vi/${this.#t}/${Bo[t]??"hqdefault"}.jpg`}#n(){return(this.getAttribute("data-label-play")||jo).replace(/\{title\}/g,this.#e)}#a(){this.setAttribute("state","ready");let t=document.createElement("img");t.alt="",t.loading="lazy",t.decoding="async";let e=this.getAttribute("poster");if(e)t.src=e;else{let s=this.getAttribute("thumbnail")??"hq";if(t.referrerPolicy="no-referrer",t.src=this.#r(s),s==="sd"||s==="maxres"){let n=()=>{t.src=this.#r("hq")};t.addEventListener("error",n,{once:!0}),t.addEventListener("load",()=>{t.naturalWidth<=120&&n()},{once:!0})}}let i=document.createElement("button");i.type="button",i.setAttribute("aria-label",this.#n()),i.innerHTML=zo,i.addEventListener("click",()=>this.#c(!0),{once:!0}),this.replaceChildren(t,i)}#c(t){this.setAttribute("state","active"),this.innerHTML=`<iframe src="${Vs(this.#s())}" title="${Vs(this.#e)}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen loading="lazy"></iframe>`,t&&this.querySelector("iframe")?.focus(),this.dispatchEvent(new CustomEvent("youtube-player:activate",{bubbles:!0,detail:{videoId:this.#t,fromUser:t}}))}};g("youtube-player",Ge);var xt=CSS.supports("anchor-name","--x")&&CSS.supports("position-area","bottom"),Ws=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,Fo="--tour-target",Ye='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',qo='input, textarea, select, [contenteditable]:not([contenteditable="false"])',Ho={title:"Page Tour",step:"Step {n} of {total}",skip:"Skip tour",close:"Close",prev:"Previous",next:"Next",finish:"Finish",nav:"Tour navigation",ready:"Done. Next is available."},Uo=0,Xe=class extends HTMLElement{get target(){return this.dataset.target??""}get placement(){return this.dataset.placement??"auto"}get action(){return this.dataset.action??"none"}get actionHint(){return this.dataset.actionHint??null}get skippable(){return this.dataset.skippable!=="false"}get scrollBehavior(){return this.dataset.scroll??"smooth"}};function Ks(r){if(!r?.target)return null;try{return document.querySelector(r.target)}catch{return null}}function L(r,t,e){let i=document.createElement(r);return t&&(i.className=t),e!=null&&(i.textContent=e),i}var Je=class r extends b{#t=[];#e=0;#i=!1;#s=null;#r=null;#n=null;#a=null;#c=null;#h=null;#l="";#o=null;#u=null;#p=null;#d=null;#f=null;#k=null;#w=null;static#m=null;static observedAttributes=["data-step"];setup(){if(this.#t=[...this.querySelectorAll("tour-step")],this.#t.length===0)return!1;let t=this.querySelector(".page-tour-start-btn");if(t&&this.listen(t,"click",e=>{e.preventDefault(),this.start()}),this.id&&this.listen(document,"click",e=>{e.target?.closest?.(`[data-tour="${CSS.escape(this.id)}"]`)&&(e.preventDefault(),this.start())}),this.dataset.trigger==="auto"){let e=this.#J();e?.complete||e?.skipped?this.setAttribute("data-complete",""):this.#w=setTimeout(()=>{this.#w=null,this.isConnected&&this.start(e?.step??0)},400)}return!0}teardown(){this.#w&&(clearTimeout(this.#w),this.#w=null),this.#i&&this.stop()}attributeChangedCallback(t,e,i){if(t==="data-step"&&this.#i&&e!==null){let s=parseInt(i,10);!Number.isNaN(s)&&s!==this.#e&&this.goto(s)}}start(t=0){let e=Math.min(Math.max(0,Number(t)||0),this.#t.length-1);if(this.#i){this.goto(e);return}let i=this.#b(e,1,!0);if(i===-1&&(i=this.#b(e-1,-1,!0)),i===-1){console.warn("[page-tour] No step target found on the page; tour not started");return}r.#m&&r.#m!==this&&r.#m.stop(),this.#c=document.activeElement,this.#i=!0,r.#m=this,this.#T(),this.setAttribute("data-active",""),this.removeAttribute("data-complete"),this.#U("tour:start",{step:i}),this.#N(i,"next")}stop(){this.#i&&(this.#j(),this.#i=!1,this.removeAttribute("data-active"),r.#m===this&&(r.#m=null))}next(){if(!this.#i||this.#g())return;let t=this.#b(this.#e+1,1,!0);t===-1?this.#_():this.#N(t,"next")}prev(){if(!this.#i)return;let t=this.#b(this.#e-1,-1,!0);t!==-1&&this.#N(t,"prev")}goto(t){if(!this.#i)return;let e=Number(t);if(!Number.isInteger(e)||e<0||e>=this.#t.length)return;let i=e>=this.#e?"next":"prev",s=i==="next"?1:-1,n=this.#b(e,s,!0);n===-1&&(n=this.#b(e-s,s===1?-1:1,!0)),!(n===-1||n===this.#e)&&this.#N(n,i)}skip(){this.#i&&this.#y(this.#t[this.#e])&&(this.#U("tour:skip",{step:this.#e}),this.#q({skipped:!0}),this.stop(),this.setAttribute("data-complete",""))}reset(){this.#Z(),this.removeAttribute("data-complete"),this.dataset.step="0"}#v(t){return(t==="title"?this.dataset.title:this.getAttribute(`data-label-${t}`))??Ho[t]}#y(t){return(this.dataset.mode??"passive")!=="forced"&&(t?.skippable??!0)}#g(){return!!this.#n?.querySelector(".page-tour-next[data-waiting]")}#b(t,e,i=!1){for(let s=t;s>=0&&s<this.#t.length;s+=e){if(Ks(this.#t[s]))return s;i&&console.warn(`[page-tour] Target "${this.#t[s].target}" not found, skipping step ${s}`)}return-1}#T(){this.#s=L("div","page-tour-backdrop"),this.#s.setAttribute("aria-hidden","true"),this.#s.addEventListener("click",()=>this.skip()),this.#r=L("div","page-tour-spotlight"),this.#r.setAttribute("aria-hidden","true"),this.#n=L("div","page-tour-card"),this.#n.setAttribute("popover","manual"),this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-label",this.#v("title")),this.#n.setAttribute("tabindex","-1"),this.#n.toggleAttribute("data-anchored",xt),this.#n.addEventListener("click",e=>this.#D(e));let t=parseFloat(this.dataset.spotlightPadding??"");if(Number.isFinite(t)&&t>=0)for(let e of[this.#r,this.#n])e.style.setProperty("--tour-spotlight-padding",`${t}px`);this.#a=L("div","visually-hidden"),this.#a.setAttribute("aria-live","polite"),this.#a.setAttribute("aria-atomic","true"),this.#a.id=`page-tour-announcer-${++Uo}`,this.append(this.#s,this.#r,this.#n,this.#a),this.#n.showPopover(),this.#u=new AbortController,document.addEventListener("keydown",e=>this.#R(e),{signal:this.#u.signal}),requestAnimationFrame(()=>{this.#s?.setAttribute("data-state-visible","")})}#A(t){this.#h=t;let e=getComputedStyle(t).position==="static";t.setAttribute("data-tour-target",e?"raised":""),xt&&(this.#l=t.style.getPropertyValue("anchor-name"),t.style.setProperty("anchor-name",Fo))}#x(){let t=this.#h;t&&(t.removeAttribute("data-tour-target"),xt&&(this.#l?t.style.setProperty("anchor-name",this.#l):t.style.removeProperty("anchor-name"),t.getAttribute("style")||t.removeAttribute("style")),this.#l="",this.#h=null)}#S(t){if(!this.#r)return;let e=t.getBoundingClientRect();Object.assign(this.#r.style,{top:`${e.top}px`,left:`${e.left}px`,width:`${e.width}px`,height:`${e.height}px`})}#E(t,e){let i=getComputedStyle(this).direction==="rtl";switch(e){case"top":case"bottom":return e;case"inline-start":return i?"right":"left";case"inline-end":return i?"left":"right";default:return this.#$(t)}}#L(t,e){if(!this.#n)return;let i=this.#E(t,e);this.#n.dataset.side=i,xt||this.#C(t,i)}#C(t,e){let i=this.#n;if(!i)return;let s=t.getBoundingClientRect(),n=12,o=8,a=this.#r&&parseFloat(getComputedStyle(this.#r).paddingTop)||0;i.style.visibility="hidden",i.style.top="0",i.style.left="0";let l=i.getBoundingClientRect();i.style.visibility="";let c=0,h=0;switch(e){case"bottom":c=s.bottom+a+n,h=s.left+(s.width-l.width)/2;break;case"top":c=s.top-a-n-l.height,h=s.left+(s.width-l.width)/2;break;case"right":c=s.top+(s.height-l.height)/2,h=s.right+a+n;break;case"left":c=s.top+(s.height-l.height)/2,h=s.left-a-n-l.width;break}h=Math.max(o,Math.min(h,window.innerWidth-l.width-o)),c=Math.max(o,Math.min(c,window.innerHeight-l.height-o)),i.style.top=`${c}px`,i.style.left=`${h}px`}#$(t){let e=t.getBoundingClientRect(),i=window.innerHeight-e.bottom,s=e.top,n=window.innerWidth-e.right,o=e.left,a=Math.max(i,s,n,o);return a===i?"bottom":a===s?"top":a===n?"right":"left"}#P(t,e){let i=this.#n;if(!i)return;let s=this.#t.length,n=this.#b(e+1,1)!==-1,o=this.#b(e-1,-1)!==-1,a=t.action!=="none",l=L("div","page-tour-progress");l.setAttribute("aria-hidden","true"),this.#t.forEach((m,y)=>{let w=L("span","page-tour-pip");y===e&&w.setAttribute("data-active",""),y<e&&w.setAttribute("data-visited",""),l.append(w)});let c=L("p","page-tour-meta");c.append(L("span","page-tour-step-count",this.#v("step").replace("{n}",String(e+1)).replace("{total}",String(s))));let h=L("div","page-tour-content");for(let m of t.childNodes)h.append(m.cloneNode(!0));let u=L("footer","page-tour-footer");if(this.#y(t)){let m=L("button","page-tour-skip",this.#v(n?"skip":"close"));m.type="button",m.dataset.action="skip",u.append(m)}let p=L("nav","page-tour-nav");if(p.setAttribute("aria-label",this.#v("nav")),o){let m=L("button","page-tour-prev",this.#v("prev"));m.type="button",m.dataset.action="prev",p.append(m)}let d=L("button","page-tour-next",this.#v(n?"next":"finish"));d.type="button",d.dataset.action="next",p.append(d),u.append(p);let f=[l,c,h];if(a&&(d.setAttribute("data-waiting",""),d.setAttribute("aria-disabled","true"),t.actionHint)){let m=L("p","page-tour-action-hint",t.actionHint);m.id=`${this.#a?.id??"page-tour"}-hint`,d.setAttribute("aria-describedby",m.id),f.push(m)}f.push(u),i.replaceChildren(...f),a?i.removeAttribute("aria-modal"):i.setAttribute("aria-modal","true")}#N(t,e="next"){let i=this.#t[t],s=Ks(i);if(!i||!s)return;if(this.#d?.abort(),this.#d=null,this.#B(),this.#x(),this.#e=t,this.#A(s),i.scrollBehavior!=="none"){let l=Ws()?"instant":i.scrollBehavior;s.scrollIntoView({block:"nearest",behavior:l})}this.#P(i,t),this.#S(s),this.#L(s,i.placement);let n=this.#n;n?.focus(),requestAnimationFrame(()=>{if(this.#n!==n||this.#e!==t)return;let l=n?.querySelector(".page-tour-content :is(h2, h3, h4)")??null;l?(l.hasAttribute("tabindex")||l.setAttribute("tabindex","-1"),l.focus()):(n?.querySelector(".page-tour-next")??null)?.focus()});let o=i.querySelector("h2, h3, h4"),a=this.#v("step").replace("{n}",String(t+1)).replace("{total}",String(this.#t.length));this.#K(o?.textContent?`${a}: ${o.textContent.trim()}`:a),this.dataset.step=String(t),i.action!=="none"&&this.#I(i,s),this.#F(s),this.#q({step:t}),this.#U("tour:step",{step:t,target:s,direction:e})}#I(t,e){let i=new AbortController;this.#d=i;let n={click:"click",focus:"focus",input:"input",change:"change"}[t.action];n?e.addEventListener(n,()=>{i.abort(),this.#M(),this.#U("tour:action",{step:this.#e,action:t.action})},{signal:i.signal}):t.action==="custom"&&this.addEventListener("tour:action",()=>{i.abort(),this.#M()},{signal:i.signal})}#M(){let t=this.#n?.querySelector(".page-tour-next");t&&(t.removeAttribute("data-waiting"),t.removeAttribute("aria-disabled"),t.removeAttribute("aria-describedby"),this.#n?.querySelector(".page-tour-action-hint")?.remove(),this.#K(this.#v("ready")))}#R(t){if(!this.#i||t.defaultPrevented)return;let i=!!(t.target instanceof Element?t.target:null)?.closest(qo),s=t.altKey||t.ctrlKey||t.metaKey;switch(t.key){case"Escape":this.#y(this.#t[this.#e])&&(t.preventDefault(),this.skip());break;case"ArrowRight":case"ArrowDown":if(i||s)return;t.preventDefault(),this.next();break;case"ArrowLeft":case"ArrowUp":if(i||s)return;t.preventDefault(),this.prev();break;case"Home":if(i||s)return;t.preventDefault(),this.goto(0);break;case"End":if(i||s)return;t.preventDefault(),this.goto(this.#t.length-1);break;case"Tab":this.#z(t);break}}#z(t){if(!this.#n)return;let e=d=>!d.disabled&&(d.checkVisibility?.()??!0),i=[...this.#n.querySelectorAll(Ye)].filter(e),s=[],n=this.#t[this.#e],o=this.#h;n&&n.action!=="none"&&o&&(s=(o.matches(Ye)?[o]:[...o.querySelectorAll(Ye)]).filter(e));let a=[...i,...s];if(a.length===0)return;let l=a[0],c=a[a.length-1],h=document.activeElement,u=!h||!a.includes(h),p=u?-1:a.indexOf(h);t.preventDefault(),t.shiftKey?(u||h===l?c:a[p-1]).focus():(u||h===c?l:a[p+1]).focus()}#D(t){let e=t.target.closest?.("[data-action]")??null;if(e)switch(e.dataset.action){case"next":this.next();break;case"prev":this.prev();break;case"skip":this.skip();break}}#F(t){let e=new AbortController;this.#p=e;let i=()=>this.#O();document.addEventListener("scroll",i,{capture:!0,passive:!0,signal:e.signal}),window.addEventListener("resize",i,{passive:!0,signal:e.signal}),this.#o=new ResizeObserver(i),this.#o.observe(t),this.#k=setTimeout(i,Ws()?0:300)}#B(){this.#p?.abort(),this.#p=null,this.#o?.disconnect(),this.#o=null,this.#k&&(clearTimeout(this.#k),this.#k=null),this.#f&&(cancelAnimationFrame(this.#f),this.#f=null)}#O(){this.#f||(this.#f=requestAnimationFrame(()=>{this.#f=null;let t=this.#h;!this.#i||!t||(this.#S(t),xt||this.#L(t,this.#t[this.#e].placement))}))}#_(){this.#U("tour:complete",{steps:this.#t.length}),this.#q({complete:!0}),this.stop(),this.setAttribute("data-complete","")}#j(){this.#u?.abort(),this.#u=null,this.#d?.abort(),this.#d=null,this.#B(),this.#x();let t=document.activeElement,e=!t||t===document.body||!!this.#n?.contains(t);this.#s?.remove(),this.#r?.remove(),this.#n?.matches(":popover-open")&&this.#n.hidePopover(),this.#n?.remove(),this.#a?.remove(),this.#s=null,this.#r=null,this.#n=null,this.#a=null;let i=this.#c;this.#c=null,e&&i?.isConnected&&typeof i.focus=="function"&&i.focus()}#K(t){let e=this.#a;e&&(e.textContent="",requestAnimationFrame(()=>{this.#a===e&&(e.textContent=t)}))}#U(t,e){let i=t!=="tour:skip";this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:i,detail:e}))}#W(){let t=this.dataset.persist??"session";return t==="session"?sessionStorage:t==="local"?localStorage:null}#H(){return`vb-tour-${this.dataset.persistKey??window.location.pathname}`}#q(t){let e=this.#W();if(!e)return;let i=this.#H(),s={};try{s=JSON.parse(e.getItem(i)??"null")??{}}catch{}e.setItem(i,JSON.stringify({...s,...t}))}#J(){let t=this.#W();if(!t)return null;try{return JSON.parse(t.getItem(this.#H())??"null")}catch{return null}}#Z(){let t=this.#W();t&&t.removeItem(this.#H())}};g("page-tour",Je);g("tour-step",Xe);function ei(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Z=ei();function tr(r){Z=r}var X={exec:()=>null};function x(r,t=""){let e=typeof r=="string"?r:r.source,i={replace:(s,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(M.caret,"$1"),e=e.replace(s,o),i},getRegex:()=>new RegExp(e,t)};return i}var Vo=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),M={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}>`)},Wo=/^(?:[ \t]*(?:\n|$))+/,Ko=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Go=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Tt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yo=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ii=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,er=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ir=x(er).replace(/bull/g,ii).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Xo=x(er).replace(/bull/g,ii).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),si=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jo=/^[^\n]+/,ri=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Zo=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ri).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qo=x(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ii).getRegex(),Kt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ni=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ta=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ni).replace("tag",Kt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sr=x(si).replace("hr",Tt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kt).getRegex(),ea=x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sr).getRegex(),oi={blockquote:ea,code:Ko,def:Zo,fences:Go,heading:Yo,hr:Tt,html:ta,lheading:ir,list:Qo,newline:Wo,paragraph:sr,table:X,text:Jo},Gs=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Tt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kt).getRegex(),ia={...oi,lheading:Xo,table:Gs,paragraph:x(si).replace("hr",Tt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Gs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kt).getRegex()},sa={...oi,html:x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ni).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:X,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(si).replace("hr",Tt).replace("heading",` *#{1,6} *[^
1255
+ ]`).replace("lheading",ir).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ra=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,na=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rr=/^( {2,}|\\)\n(?!\s*$)/,oa=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ct=/[\p{P}\p{S}]/u,Gt=/[\s\p{P}\p{S}]/u,ai=/[^\s\p{P}\p{S}]/u,aa=x(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gt).getRegex(),nr=/(?!~)[\p{P}\p{S}]/u,la=/(?!~)[\s\p{P}\p{S}]/u,ca=/(?:[^\s\p{P}\p{S}]|~)/u,ha=x(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Vo?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),or=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,ua=x(or,"u").replace(/punct/g,ct).getRegex(),da=x(or,"u").replace(/punct/g,nr).getRegex(),ar="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pa=x(ar,"gu").replace(/notPunctSpace/g,ai).replace(/punctSpace/g,Gt).replace(/punct/g,ct).getRegex(),fa=x(ar,"gu").replace(/notPunctSpace/g,ca).replace(/punctSpace/g,la).replace(/punct/g,nr).getRegex(),ma=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ai).replace(/punctSpace/g,Gt).replace(/punct/g,ct).getRegex(),ga=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ct).getRegex(),ba="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",va=x(ba,"gu").replace(/notPunctSpace/g,ai).replace(/punctSpace/g,Gt).replace(/punct/g,ct).getRegex(),ya=x(/\\(punct)/,"gu").replace(/punct/g,ct).getRegex(),wa=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ka=x(ni).replace("(?:-->|$)","-->").getRegex(),Aa=x("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ka).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ut=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,xa=x(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ut).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lr=x(/^!?\[(label)\]\[(ref)\]/).replace("label",Ut).replace("ref",ri).getRegex(),cr=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",ri).getRegex(),Ea=x("reflink|nolink(?!\\()","g").replace("reflink",lr).replace("nolink",cr).getRegex(),Ys=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,li={_backpedal:X,anyPunctuation:ya,autolink:wa,blockSkip:ha,br:rr,code:na,del:X,delLDelim:X,delRDelim:X,emStrongLDelim:ua,emStrongRDelimAst:pa,emStrongRDelimUnd:ma,escape:ra,link:xa,nolink:cr,punctuation:aa,reflink:lr,reflinkSearch:Ea,tag:Aa,text:oa,url:X},Sa={...li,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",Ut).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ut).getRegex()},Ze={...li,emStrongRDelimAst:fa,emStrongLDelim:da,delLDelim:ga,delRDelim:va,url:x(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ys).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ys).getRegex()},Ca={...Ze,br:x(rr).replace("{2,}","*").getRegex(),text:x(Ze.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ht={normal:oi,gfm:ia,pedantic:sa},Et={normal:li,gfm:Ze,breaks:Ca,pedantic:Sa},Ta={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xs=r=>Ta[r];function O(r,t){if(t){if(M.escapeTest.test(r))return r.replace(M.escapeReplace,Xs)}else if(M.escapeTestNoEncode.test(r))return r.replace(M.escapeReplaceNoEncode,Xs);return r}function Js(r){try{r=encodeURI(r).replace(M.percentDecode,"%")}catch{return null}return r}function Zs(r,t){let e=r.replace(M.findPipe,(n,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=e.split(M.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(M.slashPipe,"|");return i}function St(r,t,e){let i=r.length;if(i===0)return"";let s=0;for(;s<i;){let n=r.charAt(i-s-1);if(n===t&&!e)s++;else if(n!==t&&e)s++;else break}return r.slice(0,i-s)}function La(r,t){if(r.indexOf(t[1])===-1)return-1;let e=0;for(let i=0;i<r.length;i++)if(r[i]==="\\")i++;else if(r[i]===t[0])e++;else if(r[i]===t[1]&&(e--,e<0))return i;return e>0?-2:-1}function Ma(r,t=0){let e=t,i="";for(let s of r)if(s===" "){let n=4-e%4;i+=" ".repeat(n),e+=n}else i+=s,e++;return i}function Qs(r,t,e,i,s){let n=t.href,o=t.title||null,a=r[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:e,href:n,title:o,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function Ra(r,t,e){let i=r.match(e.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
1119
1256
  `).map(n=>{let o=n.match(e.other.beginningSpace);if(o===null)return n;let[a]=o;return a.length>=s.length?n.slice(s.length):n}).join(`
1120
- `)}var kt=class{options;rules;lexer;constructor(r){this.options=r||D}space(r){let t=this.rules.block.newline.exec(r);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(r){let t=this.rules.block.code.exec(r);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:tt(e,`
1121
- `)}}}fences(r){let t=this.rules.block.fences.exec(r);if(t){let e=t[0],i=Zr(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(r){let t=this.rules.block.heading.exec(r);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let i=tt(e,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(e=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(r){let t=this.rules.block.hr.exec(r);if(t)return{type:"hr",raw:tt(t[0],`
1122
- `)}}blockquote(r){let t=this.rules.block.blockquote.exec(r);if(t){let e=tt(t[0],`
1257
+ `)}var Vt=class{options;rules;lexer;constructor(r){this.options=r||Z}space(r){let t=this.rules.block.newline.exec(r);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(r){let t=this.rules.block.code.exec(r);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:St(e,`
1258
+ `)}}}fences(r){let t=this.rules.block.fences.exec(r);if(t){let e=t[0],i=Ra(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(r){let t=this.rules.block.heading.exec(r);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let i=St(e,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(e=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(r){let t=this.rules.block.hr.exec(r);if(t)return{type:"hr",raw:St(t[0],`
1259
+ `)}}blockquote(r){let t=this.rules.block.blockquote.exec(r);if(t){let e=St(t[0],`
1123
1260
  `).split(`
1124
1261
  `),i="",s="",n=[];for(;e.length>0;){let o=!1,a=[],l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))a.push(e[l]),o=!0;else if(!o)a.push(e[l]);else break;e=e.slice(l);let c=a.join(`
1125
1262
  `),h=c.replace(this.rules.other.blockquoteSetextReplace,`
1126
1263
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
1127
1264
  ${c}`:c,s=s?`${s}
1128
- ${h}`:h;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,n,!0),this.lexer.state.top=u,e.length===0)break;let d=n.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let f=d,g=f.raw+`
1265
+ ${h}`:h;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,n,!0),this.lexer.state.top=u,e.length===0)break;let p=n.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let d=p,f=d.raw+`
1129
1266
  `+e.join(`
1130
- `),k=this.blockquote(g);n[n.length-1]=k,i=i.substring(0,i.length-f.raw.length)+k.raw,s=s.substring(0,s.length-f.text.length)+k.text;break}else if(d?.type==="list"){let f=d,g=f.raw+`
1267
+ `),m=this.blockquote(f);n[n.length-1]=m,i=i.substring(0,i.length-d.raw.length)+m.raw,s=s.substring(0,s.length-d.text.length)+m.text;break}else if(p?.type==="list"){let d=p,f=d.raw+`
1131
1268
  `+e.join(`
1132
- `),k=this.list(g);n[n.length-1]=k,i=i.substring(0,i.length-d.raw.length)+k.raw,s=s.substring(0,s.length-f.raw.length)+k.raw,e=g.substring(n.at(-1).raw.length).split(`
1133
- `);continue}}return{type:"blockquote",raw:i,tokens:n,text:s}}}list(r){let t=this.rules.block.list.exec(r);if(t){let e=t[1].trim(),i=e.length>1,s={type:"list",raw:"",ordered:i,start:i?+e.slice(0,-1):"",loose:!1,items:[]};e=i?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=i?e:"[*+-]");let n=this.rules.other.listItemRegex(e),o=!1;for(;r;){let l=!1,c="",h="";if(!(t=n.exec(r))||this.rules.block.hr.test(r))break;c=t[0],r=r.substring(c.length);let u=Yr(t[2].split(`
1134
- `,1)[0],t[1].length),d=r.split(`
1135
- `,1)[0],f=!u.trim(),g=0;if(this.options.pedantic?(g=2,h=u.trimStart()):f?g=t[1].length+1:(g=u.search(this.rules.other.nonSpaceChar),g=g>4?1:g,h=u.slice(g),g+=t[1].length),f&&this.rules.other.blankLine.test(d)&&(c+=d+`
1136
- `,r=r.substring(d.length+1),l=!0),!l){let k=this.rules.other.nextBulletRegex(g),w=this.rules.other.hrRegex(g),_=this.rules.other.fencesBeginRegex(g),F=this.rules.other.headingBeginRegex(g),G=this.rules.other.htmlBeginRegex(g),W=this.rules.other.blockquoteBeginRegex(g);for(;r;){let K=r.split(`
1137
- `,1)[0],j;if(d=K,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),j=d):j=d.replace(this.rules.other.tabCharGlobal," "),_.test(d)||F.test(d)||G.test(d)||W.test(d)||k.test(d)||w.test(d))break;if(j.search(this.rules.other.nonSpaceChar)>=g||!d.trim())h+=`
1138
- `+j.slice(g);else{if(f||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(u)||F.test(u)||w.test(u))break;h+=`
1139
- `+d}f=!d.trim(),c+=K+`
1140
- `,r=r.substring(K.length+1),u=j.slice(g)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0)),s.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),s.raw+=c}let a=s.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l of s.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=h.checked,s.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=h.raw+l.tokens[0].raw,l.tokens[0].text=h.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(h)):l.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):l.tokens.unshift(h)}}if(!s.loose){let c=l.tokens.filter(u=>u.type==="space"),h=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));s.loose=h}}if(s.loose)for(let l of s.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return s}}html(r){let t=this.rules.block.html.exec(r);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(r){let t=this.rules.block.def.exec(r);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:s}}}table(r){let t=this.rules.block.table.exec(r);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=$i(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
1141
- `):[],n={type:"table",raw:t[0],header:[],align:[],rows:[]};if(e.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?n.align.push("right"):this.rules.other.tableAlignCenter.test(o)?n.align.push("center"):this.rules.other.tableAlignLeft.test(o)?n.align.push("left"):n.align.push(null);for(let o=0;o<e.length;o++)n.header.push({text:e[o],tokens:this.lexer.inline(e[o]),header:!0,align:n.align[o]});for(let o of s)n.rows.push($i(o,n.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:n.align[l]})));return n}}lheading(r){let t=this.rules.block.lheading.exec(r);if(t){let e=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(r){let t=this.rules.block.paragraph.exec(r);if(t){let e=t[1].charAt(t[1].length-1)===`
1142
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(r){let t=this.rules.block.text.exec(r);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(r){let t=this.rules.inline.escape.exec(r);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(r){let t=this.rules.inline.tag.exec(r);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){let t=this.rules.inline.link.exec(r);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let n=tt(e.slice(0,-1),"\\");if((e.length-n.length)%2===0)return}else{let n=Jr(t[2],"()");if(n===-2)return;if(n>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let i=t[2],s="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(i);n&&(i=n[1],s=n[3])}else s=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i=i.slice(1):i=i.slice(1,-1)),ji(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(r,t){let e;if((e=this.rules.inline.reflink.exec(r))||(e=this.rules.inline.nolink.exec(r))){let i=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[i.toLowerCase()];if(!s){let n=e[0].charAt(0);return{type:"text",raw:n,text:n}}return ji(e,s,e[0],this.lexer,this.rules)}}emStrong(r,t,e=""){let i=this.rules.inline.emStrongLDelim.exec(r);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!e||this.rules.inline.punctuation.exec(e))){let s=[...i[0]].length-1,n,o,a=s,l=0,c=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*r.length+s);(i=c.exec(t))!==null;){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n)continue;if(o=[...n].length,i[3]||i[4]){a+=o;continue}else if((i[5]||i[6])&&s%3&&!((s+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let h=[...i[0]][0].length,u=r.slice(0,s+i.index+h+o);if(Math.min(s,o)%2){let f=u.slice(1,-1);return{type:"em",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}let d=u.slice(2,-2);return{type:"strong",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(r){let t=this.rules.inline.code.exec(r);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(r){let t=this.rules.inline.br.exec(r);if(t)return{type:"br",raw:t[0]}}del(r,t,e=""){let i=this.rules.inline.delLDelim.exec(r);if(i&&(!i[1]||!e||this.rules.inline.punctuation.exec(e))){let s=[...i[0]].length-1,n,o,a=s,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*r.length+s);(i=l.exec(t))!==null;){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n||(o=[...n].length,o!==s))continue;if(i[3]||i[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let c=[...i[0]][0].length,h=r.slice(0,s+i.index+c+o),u=h.slice(s,-s);return{type:"del",raw:h,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(r){let t=this.rules.inline.autolink.exec(r);if(t){let e,i;return t[2]==="@"?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(r){let t;if(t=this.rules.inline.url.exec(r)){let e,i;if(t[2]==="@")e=t[0],i="mailto:"+e;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);e=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(r){let t=this.rules.inline.text.exec(r);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},S=class me{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||D,this.options.tokenizer=this.options.tokenizer||new kt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:x,block:yt.normal,inline:Q.normal};this.options.pedantic?(e.block=yt.pedantic,e.inline=Q.pedantic):this.options.gfm&&(e.block=yt.gfm,this.options.breaks?e.inline=Q.breaks:e.inline=Q.gfm),this.tokenizer.rules=e}static get rules(){return{block:yt,inline:Q}}static lex(t,e){return new me(e).lex(t)}static lexInline(t,e){return new me(e).inlineTokens(t)}lex(t){t=t.replace(x.carriageReturn,`
1143
- `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let i=this.inlineQueue[e];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],i=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(x.tabCharGlobal," ").replace(x.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(o=>(s=o.call({lexer:this},t,e))?(t=t.substring(s.raw.length),e.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let o=e.at(-1);s.raw.length===1&&o!==void 0?o.raw+=`
1269
+ `),m=this.list(f);n[n.length-1]=m,i=i.substring(0,i.length-p.raw.length)+m.raw,s=s.substring(0,s.length-d.raw.length)+m.raw,e=f.substring(n.at(-1).raw.length).split(`
1270
+ `);continue}}return{type:"blockquote",raw:i,tokens:n,text:s}}}list(r){let t=this.rules.block.list.exec(r);if(t){let e=t[1].trim(),i=e.length>1,s={type:"list",raw:"",ordered:i,start:i?+e.slice(0,-1):"",loose:!1,items:[]};e=i?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=i?e:"[*+-]");let n=this.rules.other.listItemRegex(e),o=!1;for(;r;){let l=!1,c="",h="";if(!(t=n.exec(r))||this.rules.block.hr.test(r))break;c=t[0],r=r.substring(c.length);let u=Ma(t[2].split(`
1271
+ `,1)[0],t[1].length),p=r.split(`
1272
+ `,1)[0],d=!u.trim(),f=0;if(this.options.pedantic?(f=2,h=u.trimStart()):d?f=t[1].length+1:(f=u.search(this.rules.other.nonSpaceChar),f=f>4?1:f,h=u.slice(f),f+=t[1].length),d&&this.rules.other.blankLine.test(p)&&(c+=p+`
1273
+ `,r=r.substring(p.length+1),l=!0),!l){let m=this.rules.other.nextBulletRegex(f),y=this.rules.other.hrRegex(f),w=this.rules.other.fencesBeginRegex(f),k=this.rules.other.headingBeginRegex(f),A=this.rules.other.htmlBeginRegex(f),T=this.rules.other.blockquoteBeginRegex(f);for(;r;){let j=r.split(`
1274
+ `,1)[0],R;if(p=j,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),R=p):R=p.replace(this.rules.other.tabCharGlobal," "),w.test(p)||k.test(p)||A.test(p)||T.test(p)||m.test(p)||y.test(p))break;if(R.search(this.rules.other.nonSpaceChar)>=f||!p.trim())h+=`
1275
+ `+R.slice(f);else{if(d||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(u)||k.test(u)||y.test(u))break;h+=`
1276
+ `+p}d=!p.trim(),c+=j+`
1277
+ `,r=r.substring(j.length+1),u=R.slice(f)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0)),s.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),s.raw+=c}let a=s.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l of s.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=h.checked,s.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=h.raw+l.tokens[0].raw,l.tokens[0].text=h.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(h)):l.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):l.tokens.unshift(h)}}if(!s.loose){let c=l.tokens.filter(u=>u.type==="space"),h=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));s.loose=h}}if(s.loose)for(let l of s.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return s}}html(r){let t=this.rules.block.html.exec(r);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(r){let t=this.rules.block.def.exec(r);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:s}}}table(r){let t=this.rules.block.table.exec(r);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=Zs(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
1278
+ `):[],n={type:"table",raw:t[0],header:[],align:[],rows:[]};if(e.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?n.align.push("right"):this.rules.other.tableAlignCenter.test(o)?n.align.push("center"):this.rules.other.tableAlignLeft.test(o)?n.align.push("left"):n.align.push(null);for(let o=0;o<e.length;o++)n.header.push({text:e[o],tokens:this.lexer.inline(e[o]),header:!0,align:n.align[o]});for(let o of s)n.rows.push(Zs(o,n.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:n.align[l]})));return n}}lheading(r){let t=this.rules.block.lheading.exec(r);if(t){let e=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(r){let t=this.rules.block.paragraph.exec(r);if(t){let e=t[1].charAt(t[1].length-1)===`
1279
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(r){let t=this.rules.block.text.exec(r);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(r){let t=this.rules.inline.escape.exec(r);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(r){let t=this.rules.inline.tag.exec(r);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){let t=this.rules.inline.link.exec(r);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let n=St(e.slice(0,-1),"\\");if((e.length-n.length)%2===0)return}else{let n=La(t[2],"()");if(n===-2)return;if(n>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let i=t[2],s="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(i);n&&(i=n[1],s=n[3])}else s=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i=i.slice(1):i=i.slice(1,-1)),Qs(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(r,t){let e;if((e=this.rules.inline.reflink.exec(r))||(e=this.rules.inline.nolink.exec(r))){let i=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[i.toLowerCase()];if(!s){let n=e[0].charAt(0);return{type:"text",raw:n,text:n}}return Qs(e,s,e[0],this.lexer,this.rules)}}emStrong(r,t,e=""){let i=this.rules.inline.emStrongLDelim.exec(r);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!e||this.rules.inline.punctuation.exec(e))){let s=[...i[0]].length-1,n,o,a=s,l=0,c=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*r.length+s);(i=c.exec(t))!==null;){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n)continue;if(o=[...n].length,i[3]||i[4]){a+=o;continue}else if((i[5]||i[6])&&s%3&&!((s+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let h=[...i[0]][0].length,u=r.slice(0,s+i.index+h+o);if(Math.min(s,o)%2){let d=u.slice(1,-1);return{type:"em",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}let p=u.slice(2,-2);return{type:"strong",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(r){let t=this.rules.inline.code.exec(r);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(r){let t=this.rules.inline.br.exec(r);if(t)return{type:"br",raw:t[0]}}del(r,t,e=""){let i=this.rules.inline.delLDelim.exec(r);if(i&&(!i[1]||!e||this.rules.inline.punctuation.exec(e))){let s=[...i[0]].length-1,n,o,a=s,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*r.length+s);(i=l.exec(t))!==null;){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n||(o=[...n].length,o!==s))continue;if(i[3]||i[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let c=[...i[0]][0].length,h=r.slice(0,s+i.index+c+o),u=h.slice(s,-s);return{type:"del",raw:h,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(r){let t=this.rules.inline.autolink.exec(r);if(t){let e,i;return t[2]==="@"?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(r){let t;if(t=this.rules.inline.url.exec(r)){let e,i;if(t[2]==="@")e=t[0],i="mailto:"+e;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);e=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(r){let t=this.rules.inline.text.exec(r);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},$=class Qe{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Z,this.options.tokenizer=this.options.tokenizer||new Vt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:M,block:Ht.normal,inline:Et.normal};this.options.pedantic?(e.block=Ht.pedantic,e.inline=Et.pedantic):this.options.gfm&&(e.block=Ht.gfm,this.options.breaks?e.inline=Et.breaks:e.inline=Et.gfm),this.tokenizer.rules=e}static get rules(){return{block:Ht,inline:Et}}static lex(t,e){return new Qe(e).lex(t)}static lexInline(t,e){return new Qe(e).inlineTokens(t)}lex(t){t=t.replace(M.carriageReturn,`
1280
+ `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let i=this.inlineQueue[e];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],i=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(M.tabCharGlobal," ").replace(M.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(o=>(s=o.call({lexer:this},t,e))?(t=t.substring(s.raw.length),e.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let o=e.at(-1);s.raw.length===1&&o!==void 0?o.raw+=`
1144
1281
  `:e.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let o=e.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
1145
1282
  `)?"":`
1146
1283
  `)+s.raw,o.text+=`
@@ -1153,9 +1290,9 @@ ${h}`:h;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
1153
1290
  `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(s),i=n.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let o=e.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
1154
1291
  `)?"":`
1155
1292
  `)+s.raw,o.text+=`
1156
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(s);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){this.tokenizer.lexer=this;let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let n;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)n=s[2]?s[2].length:0,i=i.slice(0,s.index+n)+"["+"a".repeat(s[0].length-n-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,a="";for(;t;){o||(a=""),o=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,e))?(t=t.substring(l.raw.length),e.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=e.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):e.push(l);continue}if(l=this.tokenizer.emStrong(t,i,a)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.del(t,i,a)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),e.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),e.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),o=!0;let h=e.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):e.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return e}},xt=class{options;parser;constructor(r){this.options=r||D}space(r){return""}code({text:r,lang:t,escaped:e}){let i=(t||"").match(x.notSpaceStart)?.[0],s=r.replace(x.endingNewline,"")+`
1157
- `;return i?'<pre><code class="language-'+L(i)+'">'+(e?s:L(s,!0))+`</code></pre>
1158
- `:"<pre><code>"+(e?s:L(s,!0))+`</code></pre>
1293
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(s);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){this.tokenizer.lexer=this;let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let n;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)n=s[2]?s[2].length:0,i=i.slice(0,s.index+n)+"["+"a".repeat(s[0].length-n-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,a="";for(;t;){o||(a=""),o=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,e))?(t=t.substring(l.raw.length),e.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=e.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):e.push(l);continue}if(l=this.tokenizer.emStrong(t,i,a)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.del(t,i,a)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),e.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),e.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),p;this.options.extensions.startInline.forEach(d=>{p=d.call({lexer:this},u),typeof p=="number"&&p>=0&&(h=Math.min(h,p))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),o=!0;let h=e.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):e.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return e}},Wt=class{options;parser;constructor(r){this.options=r||Z}space(r){return""}code({text:r,lang:t,escaped:e}){let i=(t||"").match(M.notSpaceStart)?.[0],s=r.replace(M.endingNewline,"")+`
1294
+ `;return i?'<pre><code class="language-'+O(i)+'">'+(e?s:O(s,!0))+`</code></pre>
1295
+ `:"<pre><code>"+(e?s:O(s,!0))+`</code></pre>
1159
1296
  `}blockquote({tokens:r}){return`<blockquote>
1160
1297
  ${this.parser.parse(r)}</blockquote>
1161
1298
  `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:t}){return`<h${t}>${this.parser.parseInline(r)}</h${t}>
@@ -1171,9 +1308,14 @@ ${this.parser.parse(r)}</blockquote>
1171
1308
  `}tablerow({text:r}){return`<tr>
1172
1309
  ${r}</tr>
1173
1310
  `}tablecell(r){let t=this.parser.parseInline(r.tokens),e=r.header?"th":"td";return(r.align?`<${e} align="${r.align}">`:`<${e}>`)+t+`</${e}>
1174
- `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${L(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:t,tokens:e}){let i=this.parser.parseInline(e),s=Ri(r);if(s===null)return i;r=s;let n='<a href="'+r+'"';return t&&(n+=' title="'+L(t)+'"'),n+=">"+i+"</a>",n}image({href:r,title:t,text:e,tokens:i}){i&&(e=this.parser.parseInline(i,this.parser.textRenderer));let s=Ri(r);if(s===null)return L(e);r=s;let n=`<img src="${r}" alt="${L(e)}"`;return t&&(n+=` title="${L(t)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:L(r.text)}},Ee=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},C=class fe{options;renderer;textRenderer;constructor(t){this.options=t||D,this.options.renderer=this.options.renderer||new xt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ee}static parse(t,e){return new fe(e).parse(t)}static parseInline(t,e){return new fe(e).parseInline(t)}parse(t){this.renderer.parser=this;let e="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let o=s,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){e+=a||"";continue}}let n=s;switch(n.type){case"space":{e+=this.renderer.space(n);break}case"hr":{e+=this.renderer.hr(n);break}case"heading":{e+=this.renderer.heading(n);break}case"code":{e+=this.renderer.code(n);break}case"table":{e+=this.renderer.table(n);break}case"blockquote":{e+=this.renderer.blockquote(n);break}case"list":{e+=this.renderer.list(n);break}case"checkbox":{e+=this.renderer.checkbox(n);break}case"html":{e+=this.renderer.html(n);break}case"def":{e+=this.renderer.def(n);break}case"paragraph":{e+=this.renderer.paragraph(n);break}case"text":{e+=this.renderer.text(n);break}default:{let o='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return e}parseInline(t,e=this.renderer){this.renderer.parser=this;let i="";for(let s=0;s<t.length;s++){let n=t[s];if(this.options.extensions?.renderers?.[n.type]){let a=this.options.extensions.renderers[n.type].call({parser:this},n);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=a||"";continue}}let o=n;switch(o.type){case"escape":{i+=e.text(o);break}case"html":{i+=e.html(o);break}case"link":{i+=e.link(o);break}case"image":{i+=e.image(o);break}case"checkbox":{i+=e.checkbox(o);break}case"strong":{i+=e.strong(o);break}case"em":{i+=e.em(o);break}case"codespan":{i+=e.codespan(o);break}case"br":{i+=e.br(o);break}case"del":{i+=e.del(o);break}case"text":{i+=e.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},et=class{options;block;constructor(r){this.options=r||D}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?S.lex:S.lexInline}provideParser(r=this.block){return r?C.parse:C.parseInline}},Qr=class{defaults=ge();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=C;Renderer=xt;TextRenderer=Ee;Lexer=S;Tokenizer=kt;Hooks=et;constructor(...r){this.use(...r)}walkTokens(r,t){let e=[];for(let i of r)switch(e=e.concat(t.call(this,i)),i.type){case"table":{let s=i;for(let n of s.header)e=e.concat(this.walkTokens(n.tokens,t));for(let n of s.rows)for(let o of n)e=e.concat(this.walkTokens(o.tokens,t));break}case"list":{let s=i;e=e.concat(this.walkTokens(s.items,t));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(n=>{let o=s[n].flat(1/0);e=e.concat(this.walkTokens(o,t))}):s.tokens&&(e=e.concat(this.walkTokens(s.tokens,t)))}}return e}use(...r){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(e=>{let i={...e};if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let n=t.renderers[s.name];n?t.renderers[s.name]=function(...o){let a=s.renderer.apply(this,o);return a===!1&&(a=n.apply(this,o)),a}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=t[s.level];n?n.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),i.extensions=t),e.renderer){let s=this.defaults.renderer||new xt(this.defaults);for(let n in e.renderer){if(!(n in s))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,a=e.renderer[o],l=s[o];s[o]=(...c)=>{let h=a.apply(s,c);return h===!1&&(h=l.apply(s,c)),h||""}}i.renderer=s}if(e.tokenizer){let s=this.defaults.tokenizer||new kt(this.defaults);for(let n in e.tokenizer){if(!(n in s))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,a=e.tokenizer[o],l=s[o];s[o]=(...c)=>{let h=a.apply(s,c);return h===!1&&(h=l.apply(s,c)),h}}i.tokenizer=s}if(e.hooks){let s=this.defaults.hooks||new et;for(let n in e.hooks){if(!(n in s))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,a=e.hooks[o],l=s[o];et.passThroughHooks.has(n)?s[o]=c=>{if(this.defaults.async&&et.passThroughHooksRespectAsync.has(n))return(async()=>{let u=await a.call(s,c);return l.call(s,u)})();let h=a.call(s,c);return l.call(s,h)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let u=await a.apply(s,c);return u===!1&&(u=await l.apply(s,c)),u})();let h=a.apply(s,c);return h===!1&&(h=l.apply(s,c)),h}}i.hooks=s}if(e.walkTokens){let s=this.defaults.walkTokens,n=e.walkTokens;i.walkTokens=function(o){let a=[];return a.push(n.call(this,o)),s&&(a=a.concat(s.call(this,o))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,t){return S.lex(r,t??this.defaults)}parser(r,t){return C.parse(r,t??this.defaults)}parseMarkdown(r){return(t,e)=>{let i={...e},s={...this.defaults,...i},n=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=r),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(t):t,a=await(s.hooks?await s.hooks.provideLexer(r):r?S.lex:S.lexInline)(o,s),l=s.hooks?await s.hooks.processAllTokens(a):a;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(r):r?C.parse:C.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(n);try{s.hooks&&(t=s.hooks.preprocess(t));let o=(s.hooks?s.hooks.provideLexer(r):r?S.lex:S.lexInline)(t,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let a=(s.hooks?s.hooks.provideParser(r):r?C.parse:C.parseInline)(o,s);return s.hooks&&(a=s.hooks.postprocess(a)),a}catch(o){return n(o)}}}onError(r,t){return e=>{if(e.message+=`
1175
- Please report this to https://github.com/markedjs/marked.`,r){let i="<p>An error occurred:</p><pre>"+L(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(e);throw e}}},q=new Qr;function v(r,t){return q.parse(r,t)}v.options=v.setOptions=function(r){return q.setOptions(r),v.defaults=q.defaults,Pi(v.defaults),v};v.getDefaults=ge;v.defaults=D;v.use=function(...r){return q.use(...r),v.defaults=q.defaults,Pi(v.defaults),v};v.walkTokens=function(r,t){return q.walkTokens(r,t)};v.parseInline=q.parseInline;v.Parser=C;v.parser=C.parse;v.Renderer=xt;v.TextRenderer=Ee;v.Lexer=S;v.lexer=S.lex;v.Tokenizer=kt;v.Hooks=et;v.parse=v;var Ea=v.options,Sa=v.setOptions,Ca=v.use,Ta=v.walkTokens,_a=v.parseInline;var La=C.parse,Ma=S.lex;var Se=class extends m{#t=null;#e=null;#i=null;#s=null;#n=null;static get observedAttributes(){return["src"]}setup(){this.#o()}teardown(){this.#e?.abort(),this.removeAttribute("data-rendered"),this.removeAttribute("data-loading")}attributeChangedCallback(t,e,i){t==="src"&&i&&e!==i&&this.isConnected&&this.#o()}get parser(){return this.#t}set parser(t){this.#t=typeof t=="function"?t:null}get markdown(){return this.#s??this.#n??""}set markdown(t){let e=t==null?null:String(t);this.#s!==e&&(this.#s=e,this.#o())}async render(){await this.#o()}async reload(){this.getAttribute("src")&&await this.#o()}#r(){if(this.getAttribute("src"))return null;let t=this.querySelector('script[type="text/markdown"]');if(t)return t.textContent;let e=this.querySelector("template[data-md]");if(e)return e.content.textContent;let i=this.querySelector(":scope > pre");return i?i.textContent:null}async#o(){let t=this.getAttribute("src"),e;if(this.removeAttribute("data-rendered"),this.removeAttribute("data-error"),t){this.#e?.abort(),this.#e=new AbortController,this.setAttribute("data-loading",""),this.#l("markdown-viewer:fetch",{src:t});try{let n=await fetch(t,{signal:this.#e.signal});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);e=await n.text()}catch(n){if(n.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),this.#l("markdown-viewer:error",{error:n.message});return}this.removeAttribute("data-loading")}else this.#s!=null?e=this.#s:e=this.#r();if(e==null)return;this.#n=e;let i;try{i=await(await this.#a())(e)}catch(n){this.setAttribute("data-error",""),this.#l("markdown-viewer:error",{error:n.message});return}this.#i||(this.#i=document.createElement("div"),this.#i.className="md-content",this.#i.setAttribute("part","content"),this.appendChild(this.#i)),this.#i.innerHTML=this.#h()?gt(String(i??"")):i,this.#c(),this.setAttribute("data-rendered","");let s=this.getAttribute("ping");if(s&&navigator.sendBeacon?.(s,JSON.stringify({src:t||"inline"})),this.#l("markdown-viewer:rendered",{src:t,node:this.#i}),this.hasAttribute("highlight"))for(let n of this.#i.querySelectorAll('pre > code[class*="language-"]')){let o=n.className.match(/language-(\S+)/)?.[1]||"";this.#l("markdown-viewer:highlight",{node:n,language:o})}}async#a(){return this.#t?this.#t:t=>v.parse(t,{gfm:!0})}#h(){let t=this.getAttribute("sanitize");return t==null?!0:!/^(off|false)$/i.test(t.trim())}#c(){if(!this.#i)return;let t=this.dataset.theme??this.closest("[data-theme]")?.dataset.theme;t&&(this.#i.dataset.theme=t)}#l(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}};p("markdown-viewer",Se);var Ce=class extends m{#t=null;#e=null;#i=null;#s=null;#n="";#r=null;static get observedAttributes(){return["name","placeholder","rows"]}setup(){this.#o(),this.#a(),this.#c()}teardown(){this.#r!==null&&clearTimeout(this.#r),this.removeAttribute("data-editing")}attributeChangedCallback(t,e,i){!this.#t||e===i||(t==="name"&&(this.#t.name=i||""),t==="placeholder"&&(this.#t.placeholder=i||""),t==="rows"&&(this.#t.rows=parseInt(i,10)||10))}get value(){return this.#t?.value??""}set value(t){if(!this.#t)return;let e=t==null?"":String(t);this.#t.value!==e&&(this.#t.value=e,this.#c(),this.dispatchEvent(new CustomEvent("markdown-editor:change",{detail:{value:e,source:"api"},bubbles:!0})))}get textarea(){return this.#t}#o(){let e=this.querySelector("textarea")?.value||"";this.#i=document.createElement("section"),this.#i.className="md-editor-pane",this.#i.setAttribute("aria-label","Markdown source"),this.#s=document.createElement("section"),this.#s.className="md-preview-pane",this.#s.setAttribute("aria-label","Rendered preview"),this.#s.setAttribute("aria-live","polite"),this.#t=document.createElement("textarea"),this.#t.className="md-editor-input",this.#t.value=e,this.#t.name=this.getAttribute("name")||"",this.#t.placeholder=this.getAttribute("placeholder")||"Write markdown here...",this.#t.rows=parseInt(this.getAttribute("rows")??"",10)||10,this.#t.setAttribute("spellcheck","true"),this.#e=document.createElement("markdown-viewer"),this.hasAttribute("highlight")&&this.#e.setAttribute("highlight","");let i=this.dataset.theme??this.closest("[data-theme]")?.dataset.theme;i&&(this.#e.dataset.theme=i),this.#i.appendChild(this.#t),this.#s.appendChild(this.#e),this.innerHTML="",this.appendChild(this.#i),this.appendChild(this.#s),this.#n=e}#a(){let t=this.#t;t&&(this.listen(t,"input",()=>{this.#l("markdown-editor:input",{value:t.value}),this.#h()}),this.listen(t,"focus",()=>{this.setAttribute("data-editing","")}),this.listen(t,"blur",()=>{this.removeAttribute("data-editing"),t.value!==this.#n&&(this.#n=t.value,this.#l("markdown-editor:change",{value:t.value}))}),this.hasAttribute("data-tab-indent")&&this.listen(t,"keydown",e=>{let i=e;if(i.key==="Tab"&&!i.shiftKey&&!i.ctrlKey&&!i.metaKey){i.preventDefault();let{selectionStart:s,selectionEnd:n}=t;t.setRangeText(" ",s,n,"end"),t.dispatchEvent(new Event("input",{bubbles:!0}))}}))}#h(){this.#r!==null&&clearTimeout(this.#r),this.#r=setTimeout(()=>this.#c(),150)}#c(){if(!this.#e)return;let t=this.#t?.value||"";if(!t.trim()){let i=this.#e.querySelector(".md-content");i&&(i.innerHTML="");return}let e=this.#e.querySelector('script[type="text/markdown"]');e||(e=document.createElement("script"),e.type="text/markdown",this.#e.prepend(e)),e.textContent=t,this.#e.removeAttribute("data-rendered"),this.#e.render?.()}#l(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}};p("markdown-editor",Ce);var tn=0,Te=class extends m{#t=null;#e=null;#i=null;#s=!1;#n=null;setup(){this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.getAttribute("aria-label")||this.setAttribute("aria-label","Page tools"),this.#r(),this.#o();let t=this.dataset.breakpoint||"48rem";this.#i=matchMedia(`(max-width: ${t})`),this.#a(this.#i),this.listen(this.#i,"change",e=>this.#a(e)),this.#n=new MutationObserver(e=>{for(let i of e)i.type==="childList"&&this.#s&&this.#l()}),this.#n.observe(this,{childList:!0})}teardown(){this.#n?.disconnect(),this.#n=null,this.#s&&this.#c(),this.#t?.remove(),this.#e?.remove(),this.#t=null,this.#e=null}get tools(){return Array.from(this.children).filter(t=>!t.hasAttribute("data-page-tools-internal"))}#r(){if((this.dataset.orientation||"auto")!=="auto")return;let i=(this.dataset.position||"sticky")==="inline"?"horizontal":"vertical";this.dataset.resolvedOrientation=i}#o(){let t=`pt-${++tn}`,e=this.dataset.fabIcon||"ellipsis-vertical",i=this.dataset.fabLabel||"Page tools";this.#t=document.createElement("button"),this.#t.className="page-tools-fab",this.#t.setAttribute("data-page-tools-internal",""),this.#t.setAttribute("popovertarget",t),this.#t.setAttribute("aria-label",i),this.#t.hidden=!0,this.#t.innerHTML=`<icon-wc name="${e}" size="md"></icon-wc>`,this.#e=document.createElement("section"),this.#e.className="page-tools-popover",this.#e.setAttribute("data-page-tools-internal",""),this.#e.id=t,this.#e.setAttribute("popover",""),this.#e.setAttribute("aria-label",i),this.#e.hidden=!0,this.appendChild(this.#t),this.appendChild(this.#e),this.listen(this.#e,"toggle",s=>{s.newState==="closed"&&this.#t?.focus()})}#a(t){t.matches??t?this.#h():this.#c()}#h(){if(this.#s||!this.#t||!this.#e)return;this.#s=!0;let t=this.tools;for(let e of t)this.#e.appendChild(e);this.#t.hidden=!1,this.#e.hidden=!1,this.dataset.collapsed=""}#c(){if(!this.#s||!this.#t||!this.#e)return;this.#s=!1,this.#e.matches(":popover-open")&&this.#e.hidePopover?.();let t=Array.from(this.#e.children);for(let e of t)this.insertBefore(e,this.#t);this.#t.hidden=!0,this.#e.hidden=!0,delete this.dataset.collapsed}#l(){if(!this.#e)return;let t=this.tools;for(let e of t)this.#e.appendChild(e)}};p("page-tools",Te);var _e=class extends m{#t;#e;#i=null;setup(){this.#i===null&&(this.#i=this.getAttribute("label")||this.textContent.trim()||"Print this page");let t=this.#i,e=this.hasAttribute("raw-toggle");this.innerHTML="",e&&this.setAttribute("role","group");let i=this.getAttribute("variant")||"icon";this.#t=document.createElement("button"),this.#t.type="button",this.#t.className="print-trigger",this.#t.setAttribute("aria-label",t);let s=i!=="label",n=i!=="icon";if(s){let o=document.createElement("icon-wc");o.setAttribute("name","printer"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),this.#t.appendChild(o)}if(n){let o=document.createElement("span");o.textContent=t,this.#t.appendChild(o)}if(this.listen(this.#t,"click",this.#s),this.append(this.#t),e){let o=document.createElement("label");this.#e=document.createElement("input"),this.#e.type="checkbox";let a=document.createElement("span");a.textContent="Print without VB styles",o.append(this.#e,a),this.append(o)}}teardown(){this.#t=null,this.#e=null}#s=()=>{let t=this.#e?.checked;if(t&&document.documentElement.setAttribute("data-print-raw",""),window.print(),t){let e=()=>{document.documentElement.removeAttribute("data-print-raw"),window.removeEventListener("afterprint",e),clearTimeout(i)};window.addEventListener("afterprint",e,{once:!0});let i=setTimeout(e,5e3)}}};p("print-page",_e);var Le=new Map([["x",{label:"X",iconName:"twitter",buildUrl:({url:r,title:t})=>`https://x.com/intent/post?url=${E(r)}&text=${E(t)}`}],["twitter",{label:"X",iconName:"twitter",buildUrl:({url:r,title:t})=>`https://x.com/intent/post?url=${E(r)}&text=${E(t)}`}],["facebook",{label:"Facebook",iconName:"facebook",buildUrl:({url:r})=>`https://www.facebook.com/sharer/sharer.php?u=${E(r)}`}],["linkedin",{label:"LinkedIn",iconName:"linkedin",buildUrl:({url:r})=>`https://www.linkedin.com/sharing/share-offsite/?url=${E(r)}`}],["whatsapp",{label:"WhatsApp",iconName:"whatsapp",iconSet:"custom",buildUrl:({url:r,title:t})=>`https://wa.me/?text=${E(`${t} ${r}`)}`}],["telegram",{label:"Telegram",iconName:"telegram",iconSet:"custom",buildUrl:({url:r,title:t})=>`https://t.me/share/url?url=${E(r)}&text=${E(t)}`}],["bluesky",{label:"Bluesky",iconName:"bluesky",iconSet:"custom",buildUrl:({url:r,title:t})=>`https://bsky.app/intent/compose?text=${E(`${t} ${r}`)}`}],["mastodon",{label:"Mastodon",iconName:"mastodon",iconSet:"custom",buildUrl:({url:r,title:t},e="mastodon.social")=>`https://${e}/share?text=${E(`${t} ${r}`)}`}],["email",{label:"Email",iconName:"mail",buildUrl:({url:r,title:t,text:e})=>`mailto:?subject=${E(t)}&body=${E(`${e}
1176
-
1177
- ${r}`)}`}],["copy",{label:"Copy link",iconName:"link",buildUrl:()=>""}]]),Me="x,linkedin,bluesky,mastodon,whatsapp,email,copy";function E(r){return encodeURIComponent(r)}var Ne=class extends m{#t;#e;#i;#s="";#n=null;#r=null;get url(){return this.#t}set url(t){this.#t=t}get title(){return this.#e??""}set title(t){this.#e=t}get text(){return this.#i}set text(t){this.#i=t}setup(){if(this.#o(),this.#a(),this.closest("selection-menu")){this.#h(),this.setAttribute("data-tier-resolved","selection");return}this.#s==="native"?this.#c():this.#s==="hidden"?this.style.display="none":this.children.length>0?this.#m():this.#l(),this.setAttribute("data-tier-resolved",this.#s)}teardown(){this.removeAttribute("data-tier-resolved"),this.#n&&(clearTimeout(this.#n),this.#n=null),this.#r&&(this.#r.removeEventListener("click",this.#u),this.#r.remove(),this.#r=null),this.querySelector(".share-trigger")?.remove()}async share(){this.#s==="native"&&await this.#p()}#o(){this.#t=this.getAttribute("url")||document.querySelector('link[rel="canonical"]')?.getAttribute("href")||location.href,this.#e=this.getAttribute("title")||document.querySelector('meta[property="og:title"]')?.getAttribute("content")||document.title,this.#i=this.getAttribute("text")||document.querySelector('meta[name="description"]')?.getAttribute("content")||document.querySelector('meta[property="og:description"]')?.getAttribute("content")||""}#a(){let t=this.getAttribute("tier");if(t==="platforms"||t==="native"){t==="native"&&!navigator.share?this.#s="hidden":this.#s=t;return}if((this.getAttribute("platforms")||Me)==="native-only"){this.#s=typeof navigator.share=="function"?"native":"hidden";return}this.#s=typeof navigator.share=="function"?"native":"platforms"}#h(){let t=document.createElement("button");t.type="button",t.setAttribute("aria-label","Share selection");let e=document.createElement("icon-wc");e.setAttribute("name","share-2"),e.setAttribute("size","sm"),e.setAttribute("aria-hidden","true"),t.appendChild(e),t.addEventListener("click",()=>{let i=this.closest("selection-menu"),n=i?.getSelection?.()?.text||window.getSelection()?.toString()||"";n&&navigator.share?navigator.share({text:`"${n}" \u2014 ${location.href}`}).catch(()=>{}):n&&Y(`"${n}" \u2014 ${location.href}`,{button:t,announceMessage:"Selection copied"}),i?.dismiss?.()}),this.appendChild(t)}#c(){let t=this.getAttribute("label")||"Share",e=document.createElement("button");e.type="button",e.className="share-trigger",e.setAttribute("aria-label","Share this page"),e.innerHTML=`<icon-wc name="share-2" size="sm" aria-hidden="true"></icon-wc><span class="share-label">${t}</span>`,e.addEventListener("click",this.#d),this.appendChild(e)}#l(){let t=(this.getAttribute("platforms")||Me).split(",").map(e=>e.trim()).filter(Boolean);this.#r=document.createElement("nav"),this.#r.setAttribute("aria-label","Share this page");for(let e of t){let i=Le.get(e);if(!i)continue;let s=document.createElement("button");s.type="button",s.dataset.platform=e,s.setAttribute("aria-label",e==="copy"?"Copy link":`Share on ${i.label}`);let n=i.iconSet?` set="${i.iconSet}"`:"";s.innerHTML=`<icon-wc name="${i.iconName}" size="sm"${n} aria-hidden="true"></icon-wc><span class="share-label">${i.label}</span>`,this.#r.appendChild(s)}this.#r.addEventListener("click",this.#u),this.appendChild(this.#r)}#m(){if(this.querySelector("nav"))this.#r=this.querySelector("nav");else{let i=document.createElement("nav");for(i.setAttribute("aria-label","Share this page");this.firstChild;)i.appendChild(this.firstChild);this.appendChild(i),this.#r=i}let t=this.querySelectorAll("a[data-platform]");for(let i of t){let s=i.getAttribute("href")||"";i.setAttribute("href",s.replace(/\{url\}/g,encodeURIComponent(this.#t||"")).replace(/\{title\}/g,encodeURIComponent(this.#e||"")).replace(/\{text\}/g,encodeURIComponent(this.#i||"")))}let e=this.querySelectorAll('[data-platform="copy"]');for(let i of e)i.addEventListener("click",this.#g);this.#r.addEventListener("click",this.#u)}#d=async()=>{await this.#p()};async#p(){let t={url:this.#t||"",title:this.#e||"",text:this.#i||""};this.dispatchEvent(new CustomEvent("share-wc:open",{detail:{platform:"native"},bubbles:!0}));try{if(navigator.canShare&&!navigator.canShare(t))throw new Error("Payload not shareable");await navigator.share(t),this.dispatchEvent(new CustomEvent("share-wc:success",{detail:{platform:"native"},bubbles:!0}))}catch(e){e.name!=="AbortError"&&this.dispatchEvent(new CustomEvent("share-wc:error",{detail:{platform:"native",error:e},bubbles:!0}))}}#u=t=>{let e=t.target.closest("[data-platform]");if(!e)return;let i=e.dataset.platform;if(i==="copy"){this.#g(t,e);return}if(e.tagName==="A"||!i)return;let s=Le.get(i);if(!s)return;this.dispatchEvent(new CustomEvent("share-wc:open",{detail:{platform:i},bubbles:!0}));let n={url:this.#t||"",title:this.#e||"",text:this.#i||""};if(i==="email")location.href=s.buildUrl(n);else if(i==="mastodon"){let o=this.getAttribute("mastodon-instance")||"mastodon.social",a=s.buildUrl(n,o);window.open(a,"_blank","noopener,noreferrer")}else window.open(s.buildUrl(n),"_blank","noopener,noreferrer");this.dispatchEvent(new CustomEvent("share-wc:success",{detail:{platform:i},bubbles:!0}))};#g=async(t,e)=>{let i=e||t?.target?.closest('[data-platform="copy"]');if(!i)return;if(!await Y(this.#t||"",{button:i,announceMessage:"Link copied to clipboard",duration:2e3})){this.dispatchEvent(new CustomEvent("share-wc:error",{detail:{platform:"copy"},bubbles:!0}));return}let n=i.querySelector(".share-label"),o=n?.textContent;n&&(n.textContent="Copied!"),this.dispatchEvent(new CustomEvent("share-wc:success",{detail:{platform:"copy"},bubbles:!0})),this.#n&&clearTimeout(this.#n),this.#n=setTimeout(()=>{n&&o&&(n.textContent=o),this.#n=null},2e3)}};p("share-wc",Ne);var en="Home",sn="Show full path",Re=":scope > ol > li:not([data-crumb-toggle])",rn=4;function Vi(r){try{return decodeURIComponent(r)}catch{return r}}var $e=class extends m{#t={};#e=!1;#i=!1;static get observedAttributes(){return["data-collapsed"]}setup(){this.#s(),this.hasAttribute("data-from-pathname")?this.#n():this.#o(),this.#a(),this.#h(),this.#c(),this.listen(this,"click",t=>{let i=(t.target instanceof Element?t.target:null)?.closest("[data-crumb-toggle] > button");if(!i||!this.contains(i))return;let s=i.getAttribute("aria-expanded")!=="true";i.setAttribute("aria-expanded",String(s)),this.dispatchEvent(new CustomEvent("bread-crumb:toggle",{bubbles:!0,detail:{expanded:s}}))})}attributeChangedCallback(t,e,i){e===i||!this.hasAttribute("data-upgraded")||t==="data-collapsed"&&this.#h()}get labels(){return{...this.#t}}set labels(t){!t||typeof t!="object"||(this.#t={...t},this.isConnected&&this.hasAttribute("data-from-pathname")&&(this.#n(),this.#a(),this.#h(),this.#c()))}#s(){if(!!this.parentElement?.closest('nav, [role="navigation"]')){this.#e&&this.removeAttribute("role"),this.#i&&this.removeAttribute("aria-label"),this.#e=!1,this.#i=!1;return}this.hasAttribute("role")||(this.setAttribute("role","navigation"),this.#e=!0),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&(this.setAttribute("aria-label","Breadcrumb"),this.#i=!0)}#n(){let e=window.location.pathname.split("/").filter(Boolean),i=document.createElement("ol"),s=document.createElement("li"),n=document.createElement("a");n.href="/",n.textContent=this.#t["/"]||this.#t.home||en,s.appendChild(n),i.appendChild(s);let o=this.dataset.currentLabel,a="";e.forEach((c,h)=>{a+=`/${c}`;let u=h===e.length-1,d=document.createElement("li"),f=`${a}/`,g=Vi(c),k=u&&o||this.#t[f]||this.#t[a]||this.#t[Vi(f)]||this.#t[g]||this.#t[c]||this.#r(g);if(u){let w=document.createElement("span");w.setAttribute("aria-current","page"),w.textContent=k,d.appendChild(w)}else{let w=document.createElement("a");w.href=f,w.textContent=k,d.appendChild(w)}i.appendChild(d)});let l=this.querySelector(":scope > ol");l?l.replaceWith(i):this.prepend(i)}#r(t){return t.replace(/[-_]+/g," ").replace(/\S+/g,e=>e[0].toUpperCase()+e.slice(1))}#o(){if(this.querySelector(":scope > ol"))return;let e=Array.from(this.querySelectorAll(":scope > a, :scope > span"));if(e.length===0)return;let i=document.createElement("ol");e.forEach(s=>{let n=document.createElement("li");n.appendChild(s),i.appendChild(n)}),this.prepend(i)}#a(){let t=this.querySelectorAll(Re);t.length!==0&&t.forEach((e,i)=>{let s=i===t.length-1,n=e.querySelector("a, span");n&&(s?n.setAttribute("aria-current","page"):n.removeAttribute("aria-current"))})}#h(){let t=this.querySelector(":scope > ol"),e=t?.querySelector(":scope > li[data-crumb-toggle]"),i=this.querySelectorAll(Re);if(!(!!t&&this.hasAttribute("data-collapsed")&&i.length>=rn)){e?.remove();return}let n=e||document.createElement("li");if(!e){n.setAttribute("data-crumb-toggle","");let o=document.createElement("button");o.type="button",o.setAttribute("aria-expanded","false"),o.setAttribute("aria-label",sn),o.textContent="\u2026",n.appendChild(o)}i[0].nextElementSibling!==n&&i[0].after(n)}#c(){if(this.dataset.jsonld==="off")return;let t=Array.from(this.querySelectorAll(Re));if(t.length===0)return;let i={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:t.map((n,o)=>{let a=n.querySelector("a, span"),l=a?.textContent?.trim()||"",c=a instanceof HTMLAnchorElement&&a.hasAttribute("href")?a.href:void 0;return{"@type":"ListItem",position:o+1,name:l,...c?{item:c}:{}}})},s=this.querySelector(':scope > script[type="application/ld+json"]');s||(s=document.createElement("script"),s.type="application/ld+json",this.appendChild(s)),s.textContent=JSON.stringify(i)}};p("bread-crumb",$e);var Be="[data-highlights]",Gi="highlights",nn=["yellow","green","blue","pink"];var on=typeof CSS<"u"&&"highlights"in CSS;function Wi(r){let t=2166136261;for(let e=0;e<r.length;e++)t^=r.charCodeAt(e),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function an(){return"hn-"+crypto.randomUUID().slice(0,8)}var ln=/^[a-z0-9_-]+$/i;function Ki(r){return typeof r=="string"&&ln.test(r)}var O=null,z=new Map,st=new Map;function Zi(){if(z.size===0){O&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(t=>t!==O),O=null);return}O||(O=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,O]);let r=[...z.keys()].map(t=>`::highlight(hn-${t}) { background-color: var(--highlight-${t}); text-decoration-line: underline; text-decoration-color: var(--highlight-${t}); text-underline-offset: 2px; }`).join(`
1178
- `);O.replaceSync(r)}function cn(r){for(let t of r)z.set(t,(z.get(t)??0)+1);Zi()}function hn(r){for(let t of r){let e=(z.get(t)??0)-1;e>0?z.set(t,e):z.delete(t)}Zi()}function un(r){let t=st.get(r),e=t?[...t.values()].flat():[];e.length===0?(CSS.highlights.delete(`hn-${r}`),st.delete(r)):CSS.highlights.set(`hn-${r}`,new Highlight(...e))}function Xi(r,t){let e=new Set(t.keys());for(let[i,s]of st)s.has(r)&&e.add(i);for(let i of e){let s=t.get(i)??[],n=st.get(i);s.length?(n||st.set(i,n=new Map),n.set(r,s)):n?.delete(r),un(i)}}var R=null;function je(r){R||(R=document.createElement("div"),R.setAttribute("aria-live","polite"),R.setAttribute("aria-atomic","true"),R.className="hn-sr-only",document.body.appendChild(R)),R.textContent="",requestAnimationFrame(()=>{R.textContent=r})}function Ji(r,t,e){let i=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),s=0;for(;i.nextNode();){if(i.currentNode===t)return s+e;s+=(i.currentNode.textContent??"").length}return-1}function U(r,t,e){let i=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),s=0,n=null,o=0,a=null,l=0;for(;i.nextNode();){let c=i.currentNode,h=(c.textContent??"").length;if(!n&&s+h>t&&(n=c,o=t-s),s+h>=e){a=c,l=e-s;break}s+=h}if(!n||!a)return null;try{let c=document.createRange();return c.setStart(n,Math.min(o,(n.textContent??"").length)),c.setEnd(a,Math.min(l,(a.textContent??"").length)),c}catch{return null}}var Ie=class{#t;#e;#i;#s;#n=[];#r=!on;#o;#a;#h=!1;#c=[];constructor(t){this.#t=t,this.#s=t.hasAttribute("data-highlights-readonly");let e=t.dataset.highlights;this.#e=e&&e!==""?e:location.pathname;let i=t.dataset.highlightsColors,s=i?i.split(",").map(n=>n.trim()).filter(Ki):[...nn];this.#i=[...new Set(s)],this.#r||cn(this.#i),this.#g(),this.#s||(this.#o=this.#l.bind(this),this.#a=this.#m.bind(this),t.addEventListener("pointerup",this.#o),t.addEventListener("click",this.#a)),t.setAttribute("data-highlights-init",""),this.#p().then(()=>{this.#h||this.#g()})}get colors(){return[...this.#i]}get element(){return this.#t}getHighlights(){return this.#n.map(t=>({...t}))}removeHighlight(t){let e=this.#n.findIndex(i=>i.id===t);e<0||(this.#n.splice(e,1),this.#u(),this.#g(),this.#b("highlights:removed",{id:t}),je("Highlight removed"))}clearAll(){this.#n=[],this.#u(),this.#g()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#n})}importHighlights(t){try{let e=typeof t=="string"?JSON.parse(t):t;if(!e.highlights||!Array.isArray(e.highlights))return;this.#n=e.highlights,this.#u(),this.#g()}catch{}}destroy(){this.#h||(this.#h=!0,this.#o&&this.#t.removeEventListener("pointerup",this.#o),this.#a&&this.#t.removeEventListener("click",this.#a),this.#r?this.#t.querySelectorAll("mark[data-hn-id]").forEach(t=>{let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t),e.normalize()}):(Xi(this,new Map),hn(this.#i)),this.#w(),this.#t.removeAttribute("data-highlights-init"))}#l(){requestAnimationFrame(()=>{if(this.#h)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let e=t.getRangeAt(0);this.#t.contains(e.commonAncestorContainer)&&this.#b("highlights:selected",{text:t.toString().trim(),rect:e.getBoundingClientRect()})})}#m(t){let e=t.target.closest?.(".hn-margin-annotation");if(e){let s=e.dataset.hnId,n=this.#n.find(o=>o.id===s);if(n){this.#b("highlights:clicked",{id:s,highlight:{...n}}),this.#b("highlights:request-note",{id:s,highlight:{...n},controller:this});return}}let i=t.target.closest?.("mark[data-hn-id]");if(i){let s=i.dataset.hnId,n=this.#n.find(o=>o.id===s);if(n){this.#b("highlights:clicked",{id:s,highlight:{...n}});return}}if(!this.#r){let s=this.#d(t.clientX,t.clientY);s&&this.#b("highlights:clicked",{id:s.id,highlight:{...s}})}}findHighlightRect(t){let e=this.#n.find(n=>n.id===t);if(!e)return null;let i=U(this.#t,e.startOffset,e.endOffset);if(!i)return null;let s=i.getClientRects();return s.length?s[0]:null}#d(t,e){for(let i of this.#n){let s=U(this.#t,i.startOffset,i.endOffset);if(!s)continue;let n=s.getClientRects();for(let o of n)if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)return i}return null}_createFromSelection(t){let e=window.getSelection();if(!e||e.isCollapsed)return;let i=e.getRangeAt(0);if(!this.#t.contains(i.commonAncestorContainer))return;let s=Ji(this.#t,i.startContainer,i.startOffset),n=Ji(this.#t,i.endContainer,i.endOffset);if(s<0||n<0||s>=n)return;let o=e.toString().trim(),a={id:an(),startOffset:s,endOffset:n,text:o,color:t,note:"",created:Date.now()};this.#n.push(a),this.#u(),this.#g(),e.removeAllRanges(),this.#b("highlights:added",{id:a.id,text:o,color:t,note:""}),je("Highlight added")}_changeColor(t,e){let i=this.#n.find(s=>s.id===t);i&&(i.color=e,this.#u(),this.#g())}_updateNote(t,e){let i=this.#n.find(s=>s.id===t);i&&(i.note=e,this.#u(),this.#y(),this.#b("highlights:note-changed",{id:t,note:e}),je("Note saved"))}async#p(){let t=await A.get(Gi,this.#e);if(!t||!Array.isArray(t.highlights))return;let e=Wi(this.#t.textContent);t.contentHash&&t.contentHash!==e?(this.#n=t.highlights.filter(i=>{let s=U(this.#t,i.startOffset,i.endOffset);return s?s.toString().trim()===i.text:!1}),this.#u()):this.#n=t.highlights}#u(){let t={version:1,contentHash:Wi(this.#t.textContent),highlights:this.#n};A.set(Gi,this.#e,t).catch(()=>{})}#g(){this.#r?this.#f():this.#v(),this.#y()}#v(){let t=new Map;for(let e of this.#i)t.set(e,[]);for(let e of this.#n){let i=U(this.#t,e.startOffset,e.endOffset);i&&t.has(e.color)&&t.get(e.color).push(i)}Xi(this,t)}#f(){this.#t.querySelectorAll("mark[data-hn-id]").forEach(e=>{let i=e.parentNode;for(;e.firstChild;)i.insertBefore(e.firstChild,e);i.removeChild(e)}),this.#t.normalize();let t=[...this.#n].sort((e,i)=>i.startOffset-e.startOffset);for(let e of t){let i=U(this.#t,e.startOffset,e.endOffset);if(!i)continue;let s=document.createElement("mark");s.dataset.hnId=e.id,Ki(e.color)&&(s.dataset.hnColor=e.color,s.style.setProperty("--_hn-color",`var(--highlight-${e.color})`));try{i.surroundContents(s)}catch{let n=i.extractContents();s.appendChild(n),i.insertNode(s)}}}#w(){for(let t of this.#c)t.remove();this.#c=[]}#y(){if(this.#w(),this.#n.length===0)return;getComputedStyle(this.#t).position==="static"&&(this.#t.style.position="relative");for(let e of this.#n){let i=U(this.#t,e.startOffset,e.endOffset);if(!i)continue;let s=i.getClientRects();if(s.length===0)continue;let n=s[0],o=this.#t.getBoundingClientRect(),a=n.top-o.top,l=document.createElement("span");l.className="hn-margin-annotation",l.dataset.hnId=e.id,l.setAttribute("aria-hidden","true"),l.style.top=`${a}px`,e.note?(l.innerHTML='<span class="hn-note-indicator">*</span> You highlighted',l.classList.add("hn-has-note")):l.textContent="You highlighted",this.#t.appendChild(l),this.#c.push(l)}}#b(t,e={}){this.#t.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}},Pe=new WeakMap;function M(r){if(Pe.has(r))return Pe.get(r);let t=new Ie(r);return Pe.set(r,t),t}function Yi(r=document){r.querySelectorAll(Be).forEach(t=>{t.hasAttribute("data-highlights-init")||M(t)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Yi()):Yi();var dn=new MutationObserver(r=>{for(let t of r)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Be)&&M(i),i.querySelectorAll(Be).forEach(s=>{s.hasAttribute("data-highlights-init")||M(s)})}});dn.observe(document.documentElement,{childList:!0,subtree:!0});var pn=["yellow","green","blue","pink"],qe=class extends m{#t=null;#e="yellow";#i=!1;#s=null;setup(){this.#i=!!this.closest("selection-menu"),this.#i?this.#n():this.#a()}teardown(){this.#t?.destroy(),this.#t=null,this.#s?.remove(),this.#s=null}#n(){let t=this.#c(),e=document.createElement("button");e.type="button",e.setAttribute("aria-label","Highlight selection");let i=document.createElement("icon-wc");i.setAttribute("name","highlighter"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),e.appendChild(i),e.addEventListener("click",n=>{n.stopPropagation(),this.#r()}),this.appendChild(e),this.#s=document.createElement("div"),this.#s.className="highlight-color-dropdown",this.#s.setAttribute("role","group"),this.#s.setAttribute("aria-label","Highlight color"),this.#s.hidden=!0;let s=this.#s;t.forEach(n=>{let o=document.createElement("button");o.type="button",o.className="highlight-color-swatch",o.dataset.color=n,o.setAttribute("aria-label",`${n}`),o.setAttribute("aria-pressed",n===this.#e?"true":"false"),o.style.backgroundColor=`var(--highlight-${n})`,o.addEventListener("click",a=>{a.stopPropagation(),this.#e=n,s.querySelectorAll(".highlight-color-swatch").forEach(l=>l.setAttribute("aria-pressed",l.dataset.color===n?"true":"false")),s.hidden=!0,this.#o()}),s.appendChild(o)}),this.appendChild(s)}#r(){this.#s&&(this.#s.hidden=!this.#s.hidden)}#o(){let t=this.closest("selection-menu");if(!t)return;let e=t.getSelection?.();if(!e)return;let i=e.target;if(i.hasAttribute("data-highlights-init"))this.#t||(this.#t=M(i));else{let s=this.getAttribute("storage-key")||"";i.setAttribute("data-highlights",s),this.hasAttribute("colors")&&i.setAttribute("data-highlights-colors",this.getAttribute("colors")??""),this.#t=M(i)}this.#t?._createFromSelection(this.#e),t.dismiss?.()}#a(){let t=this.#h();if(!t)return!1;let e=this.getAttribute("storage-key")||"";return t.setAttribute("data-highlights",e),this.hasAttribute("colors")&&t.setAttribute("data-highlights-colors",this.getAttribute("colors")??""),this.hasAttribute("readonly")&&t.setAttribute("data-highlights-readonly",""),this.#t=M(t),!0}#h(){let t=this.getAttribute("for");return t?document.getElementById(t):this.firstElementChild}#c(){let t=this.getAttribute("colors");return t?t.split(",").map(e=>e.trim()).filter(Boolean):[...pn]}getHighlights(){return this.#t?.getHighlights()??[]}removeHighlight(t){this.#t?.removeHighlight(t)}clearAll(){this.#t?.clearAll()}exportHighlights(){return this.#t?.exportHighlights()??'{"version":1,"highlights":[]}'}importHighlights(t){this.#t?.importHighlights(t)}};p("highlight-wc",qe);var De=CSS.supports("anchor-name","--x"),mn=CSS.supports("position-area","bottom"),fn=0,Oe=class extends m{#t=null;#e=null;#i=null;#s=null;setup(){this.id||(this.id=`pop-over-${++fn}`);let t=this.dataset.mode||"auto";this.hasAttribute("popover")||this.setAttribute("popover",t),this.#n(),this.#r(),this.#i=e=>{let i=e.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${i}`,{detail:{state:e.newState},bubbles:!0,composed:!0})),!De&&e.newState==="open"&&this.#t&&this.#a()},this.listen(this,"beforetoggle",this.#i),De||(this.#s=()=>{this.matches(":popover-open")&&this.#t&&this.#a()},this.listen(window,"resize",this.#s),this.listen(window,"scroll",this.#s,{capture:!0,passive:!0}))}show(){this.matches(":popover-open")||this.showPopover()}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#n(){let t=this.dataset.anchor;t?this.#t=document.getElementById(t)||document.querySelector(t):this.#t=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#r(){if(!(!this.#t||!De)&&(this.#e=`--pop-over-anchor-${this.id}`,this.#t.style.setProperty("anchor-name",this.#e),this.style.setProperty("position-anchor",this.#e),this.setAttribute("data-anchor-name",this.#e||""),!mn)){let t=this.dataset.position||"bottom";this.#o(t)}}#o(t){let e="var(--_pop-over-offset, var(--size-xs))",i={top:{bottom:`calc(anchor(top) + ${e})`,left:"anchor(left)"},bottom:{top:`calc(anchor(bottom) + ${e})`,left:"anchor(left)"},left:{right:`calc(anchor(left) + ${e})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${e})`,top:"anchor(top)"}},s=t.split("-")[0],n=i[s]||i.bottom;Object.entries(n).forEach(([o,a])=>this.style.setProperty(o,a))}#a(){if(!this.#t)return;let t=this.#t.getBoundingClientRect(),e=this.dataset.position||"bottom",i=this.#h(),s,n;switch(e.split("-")[0]){case"top":s=t.top-this.offsetHeight-i,n=t.left;break;case"left":s=t.top,n=t.left-this.offsetWidth-i;break;case"right":s=t.top,n=t.right+i;break;default:s=t.bottom+i,n=t.left;break}e.endsWith("-end")&&(e.startsWith("top")||e.startsWith("bottom")?n=t.right-this.offsetWidth:s=t.bottom-this.offsetHeight),this.style.position="fixed",this.style.top=`${Math.round(s)}px`,this.style.left=`${Math.round(n)}px`,this.style.margin="0"}#h(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset]??t.xs}};p("pop-over",Oe);var Qi=8,ze=8,gn=0,Fe=class extends m{#t=null;#e=new Set;#i=!1;#s;setup(){let t=this.querySelector(":scope > pop-over[data-selection-menu-host]");if(t)this.#s=t;else{this.#s=document.createElement("pop-over"),this.#s.setAttribute("data-selection-menu-host",""),this.#s.dataset.mode="manual",this.#s.id=`selection-menu-${++gn}`;let e=[...this.children];for(let i of e)i!==this.#s&&this.#s.appendChild(i);this.appendChild(this.#s)}this.hidden=!1,this.#n(),this.listen(document,"pointerup",this.#r),this.listen(document,"pointerdown",this.#c),this.listen(document,"keydown",this.#l),this.id&&new MutationObserver(()=>this.#n()).observe(document.body,{childList:!0,subtree:!0,attributeFilter:["data-selection-menu"]})}getSelection(){return this.#t?{...this.#t}:null}dismiss(){this.#h()}get actions(){return[...(this.#s||this).children].map(e=>({tag:e.tagName.toLowerCase(),attrs:Object.fromEntries([...e.attributes].map(i=>[i.name,i.value])),html:e.innerHTML||void 0}))}set actions(t){let e=Array.isArray(t)?t:[],i=this.#s||this;for(;i.firstChild;)i.firstChild.remove();for(let s of e){if(s instanceof Element){i.appendChild(s);continue}if(!s?.tag)continue;let n=document.createElement(s.tag);if(s.attrs)for(let[o,a]of Object.entries(s.attrs))a==null||a===!1||n.setAttribute(o,a===!0?"":String(a));s.html&&(n.innerHTML=s.html),i.appendChild(n)}this.dispatchEvent(new CustomEvent("selection-menu:actions-changed",{detail:{actions:this.actions,source:"property"},bubbles:!0}))}#n(){this.#e.clear();let t=this.getAttribute("for");if(t){let e=document.getElementById(t);e&&(this.#e.add(e),e.hasAttribute("data-selection-menu")||e.setAttribute("data-selection-menu",this.id||""))}this.id&&document.querySelectorAll(`[data-selection-menu="${this.id}"]`).forEach(e=>{this.#e.add(e)})}#r=()=>{requestAnimationFrame(()=>{this.isConnected&&this.#o()})};#o(){let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let e=t.getRangeAt(0),i=e.commonAncestorContainer,s=i.nodeType===Node.ELEMENT_NODE?i:i.parentElement,n=null;for(let a of this.#e)if(a.contains(s)){n=a;break}if(!n)return;let o=t.toString().trim();this.#t={range:e.cloneRange(),text:o,target:n},this.dispatchEvent(new CustomEvent("selection-menu:select",{detail:{range:this.#t.range,text:o,target:n},bubbles:!0})),this.#a(e.getBoundingClientRect())}#a(t){this.#s&&(this.#s.show(),this.#i=!0,requestAnimationFrame(()=>{let e=this.#s.getBoundingClientRect(),i=e.width||200,s=e.height||40,n=t.top-s-Qi,o=t.left+t.width/2-i/2;n<ze&&(n=t.bottom+Qi);let a=window.innerWidth-i-ze;o=Math.max(ze,Math.min(o,a)),this.#s.style.top=`${n}px`,this.#s.style.left=`${o}px`}))}#h(){this.#s&&this.#s.hide(),this.#i=!1,this.#t=null,this.dispatchEvent(new CustomEvent("selection-menu:dismiss",{bubbles:!0}))}#c=t=>{this.#i&&(this.#s?.contains(t.target)||this.contains(t.target)||this.#h())};#l=t=>{t.key==="Escape"&&this.#i&&this.#h()}};p("selection-menu",Fe);var ts=!1,He=new Set,Ue=class extends m{#t=!1;#e=null;setup(){this.#t=!!this.closest("selection-menu");let t=document.createElement("button");t.type="button",t.setAttribute("aria-label",this.#t?"Add private note":"View notes");let e=document.createElement("icon-wc");e.setAttribute("name","sticky-note"),e.setAttribute("size","sm"),e.setAttribute("aria-hidden","true"),t.appendChild(e),this.#t?t.addEventListener("click",()=>this.#i()):t.addEventListener("click",()=>this.#s()),this.appendChild(t),He.add(this),ts||(ts=!0,document.addEventListener("highlights:request-note",bn))}teardown(){He.delete(this),this.#o()}openFor(t,e){this.#n(t,e)}#i(){let t=this.closest("selection-menu");if(!t)return;let e=t.getSelection();if(!e)return;let i=e.target;i.hasAttribute("data-highlights-init")||i.setAttribute("data-highlights","");let s=M(i),n=s.getHighlights(),o=null;for(let a of n)if(e.text&&a.text&&e.text.includes(a.text.slice(0,20))){o=a;break}if(!o){s._createFromSelection("yellow");let a=s.getHighlights();o=a[a.length-1]}o&&this.#n(o,s),t.dismiss()}#s(){let t=this.getAttribute("for"),e=t?document.getElementById(t):null;if(!e)return;e.hasAttribute("data-highlights-init")||e.setAttribute("data-highlights","");let i=M(e),s=i.getHighlights(),n=s.filter(o=>o.note);n.length>0?this.#n(n[0],i):s.length>0&&this.#n(s[0],i)}#n(t,e){this.#o();let i=e.element,s=document.createElement("div");s.className="hn-note-panel",s.setAttribute("role","dialog"),s.setAttribute("aria-label","Private note");let n=document.createElement("header");n.className="hn-note-header";let o=document.createElement("small");o.textContent="PRIVATE NOTE",n.appendChild(o),s.appendChild(n);let a=document.createElement("blockquote");a.className="hn-note-quote",a.textContent=t.text.length>80?t.text.slice(0,80)+"\u2026":t.text,s.appendChild(a);let l=document.createElement("textarea");l.className="hn-note-textarea",l.placeholder="Add a note\u2026",l.value=t.note||"",l.rows=3,l.setAttribute("aria-label","Note for highlighted text"),s.appendChild(l);let c=document.createElement("footer");c.className="hn-note-actions";let h=document.createElement("button");h.type="button",h.className="hn-action hn-action-save",h.textContent="Save",h.addEventListener("click",()=>{e._updateNote(t.id,l.value.trim()),this.#o()});let u=document.createElement("button");if(u.type="button",u.className="hn-action",u.textContent="Cancel",u.addEventListener("click",()=>this.#o()),c.append(h,u),s.appendChild(c),l.addEventListener("keydown",d=>{d.key==="Escape"&&(d.preventDefault(),this.#o()),d.key==="Enter"&&(d.metaKey||d.ctrlKey)&&(d.preventDefault(),e._updateNote(t.id,l.value.trim()),this.#o())}),getComputedStyle(i).position==="static"&&(i.style.position="relative"),i.appendChild(s),typeof e.findHighlightRect=="function"){let d=e.findHighlightRect(t.id);if(d){let f=i.getBoundingClientRect();s.style.top=`${d.top-f.top}px`}}this.#e=s,requestAnimationFrame(()=>{l.focus(),document.addEventListener("pointerdown",this.#r)})}#r=t=>{this.#e&&!this.#e.contains(t.target)&&this.#o()};#o(){this.#e&&(document.removeEventListener("pointerdown",this.#r),this.#e.remove(),this.#e=null)}};function bn(r){let{highlight:t,controller:e}=r.detail||{};if(!t||!e)return;let i=He.values().next().value;i&&i.openFor(t,e)}p("note-wc",Ue);var vn=0,Ve=class extends m{#t=null;#e=null;setup(){if(this.#t=this.querySelector(":scope > button"),this.#e=this.querySelector(":scope > .comment-wc-reason"),!this.#t){let e=document.createElement("button");e.type="button";let i=document.createElement("icon-wc");i.setAttribute("name","message-circle"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),e.appendChild(i);let s=document.createElement("span");s.className="comment-wc-reason visually-hidden",s.id=`comment-wc-reason-${++vn}`,s.textContent="Comments are unavailable: this content has no review surface.",this.append(e,s),this.#t=e,this.#e=s}this.#s(),this.listen(this,"click",this.#n);let t=this.closest("selection-menu");t&&this.listen(t,"toggle",()=>this.#s())}#i(){let t=this.closest("review-surface");if(t)return t;let e=this.closest("selection-menu")?.getAttribute("for");return e?document.querySelector(`review-surface[for="${CSS.escape(e)}"]`):null}#s(){let t=this.#t;if(!t)return;!!this.#i()?(t.removeAttribute("aria-disabled"),t.removeAttribute("aria-describedby"),t.setAttribute("aria-label","Add comment")):(t.setAttribute("aria-disabled","true"),t.setAttribute("aria-label","Add comment"),this.#e&&t.setAttribute("aria-describedby",this.#e.id))}#n=t=>{if(!this.#t?.contains(t.target))return;this.#s();let e=this.#i();if(!e)return;let i=this.closest("selection-menu");if(!i)return;let s=i.getSelection();if(!s)return;let n=s.range.getBoundingClientRect(),o=e.getBoundingClientRect(),a=(n.left+n.width/2-o.left)/o.width*100,l=(n.top-o.top)/o.height*100;typeof e.addPin=="function"&&e.addPin({x:a,y:l,text:s.text}),this.dispatchEvent(new CustomEvent("comment-wc:created",{detail:{text:s.text,x:a,y:l},bubbles:!0})),i.dismiss()}};p("comment-wc",Ve);var Ge='track[kind="chapters"][data-chapter-list]';function es(r=document){r.querySelectorAll(Ge).forEach(t=>We(t))}function We(r){if(r.hasAttribute("data-chapter-list-init"))return;r.setAttribute("data-chapter-list-init","");let t=r.parentElement;if(!t||t.tagName!=="VIDEO")return;let e=r.track;e.mode==="disabled"&&(e.mode="hidden"),r.readyState>=2?is(t,e):r.addEventListener("load",()=>is(t,e),{once:!0})}function is(r,t){let e=t.cues;if(!e||e.length===0)return;let i=document.createElement("nav");i.setAttribute("aria-label","Video chapters"),i.classList.add("chapter-list");let s=document.createElement("ol");for(let o of e){let a=document.createElement("li"),l=document.createElement("button");l.type="button";let c=document.createElement("span");c.textContent=o.text;let h=document.createElement("time");h.textContent=yn(o.startTime),h.setAttribute("datetime",wn(o.startTime)),l.appendChild(c),l.appendChild(h),l.addEventListener("click",()=>{r.currentTime=o.startTime,r.paused&&r.play()}),a.appendChild(l),s.appendChild(a)}i.appendChild(s),r.insertAdjacentElement("afterend",i);let n=null;r.addEventListener("timeupdate",()=>{let o=r.currentTime,a=-1;for(let l=0;l<e.length;l++)if(o>=e[l].startTime&&o<e[l].endTime){a=l;break}n&&n.removeAttribute("data-active"),a>=0?(n=s.children[a],n.setAttribute("data-active","")):n=null})}function yn(r){let t=Math.floor(r/3600),e=Math.floor(r%3600/60),i=Math.floor(r%60);return t>0?`${t}:${String(e).padStart(2,"0")}:${String(i).padStart(2,"0")}`:`${e}:${String(i).padStart(2,"0")}`}function wn(r){let t=Math.floor(r/3600),e=Math.floor(r%3600/60),i=Math.floor(r%60);return`PT${t?t+"H":""}${e?e+"M":""}${i}S`}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>es()):es();var kn=new MutationObserver(r=>{for(let t of r)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches?.(Ge)&&We(i),i.querySelectorAll?.(Ge).forEach(s=>We(s))}});kn.observe(document.documentElement,{childList:!0,subtree:!0});var V="[data-command], [commandfor]",xn="Page Actions",T=new Map;function St(r){if(T.has(r)||r.hasAttribute("data-command-init"))return;r.setAttribute("data-command-init","");let t=r.getAttribute("data-command")||r.textContent.trim();if(!t)return;let e=r.getAttribute("data-command-group")||xn,i=r.getAttribute("data-command-icon")||null,s=r.getAttribute("data-shortcut")||null,n=null;s&&(n=B(s,()=>r.click()));let o={element:r,label:t,group:e,icon:i,shortcut:s,unbind:n};T.set(r,o),document.dispatchEvent(new CustomEvent("vb:command-registry-change",{detail:{action:"add",entry:o}}))}function Ke(r){let t=T.get(r);t&&(t.unbind?.(),T.delete(r),r.removeAttribute("data-command-init"),document.dispatchEvent(new CustomEvent("vb:command-registry-change",{detail:{action:"remove",element:r}})))}function An(){let r=new Map;for(let t of T.values()){if(t.element.hidden||t.element.closest("[hidden]"))continue;let e=r.get(t.group)||[];e.push(t),r.set(t.group,e)}return r}function ss(r=document){r.querySelectorAll(V).forEach(St)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ss()):ss();var En=new MutationObserver(r=>{for(let t of r){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(V)&&St(i),i.querySelectorAll(V).forEach(St)}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;T.has(i)&&Ke(i),i.querySelectorAll(V).forEach(s=>{T.has(s)&&Ke(s)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let e=t.target;e.matches(V)&&!T.has(e)?St(e):!e.matches(V)&&T.has(e)&&Ke(e)}}});En.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-command","commandfor"]});function Sn(){let r='footer, aside, dialog, [hidden], [aria-hidden="true"]',e=[];return document.querySelectorAll("nav a[href]").forEach(i=>{if(i.closest(r)||T.has(i))return;let s=i.textContent.trim();!s||e.length>=50||e.push({element:i,label:s,group:"Navigation",icon:null,shortcut:null,auto:!0,action:null})}),document.querySelectorAll("h2[id], h3[id]").forEach(i=>{if(i.closest(r)||T.has(i))return;let s=i.textContent.trim();!s||e.length>=50||e.push({element:i,label:`Jump to: ${s}`,group:"On This Page",icon:null,shortcut:null,auto:!0,action:()=>i.scrollIntoView({behavior:"smooth"})})}),e}window.__commandRegistry={getRegisteredCommands:An,scanAutoDiscoverable:Sn};var Cn=window.matchMedia("(prefers-reduced-motion: reduce)");function rs(){return Cn.matches||document.documentElement.hasAttribute("data-motion-reduced")}var ns=0,Tn=new Map([["vb-fade-in","entrance"],["vb-slide-up","entrance"],["vb-pop","entrance"],["vb-slide-in-ltr","entrance"],["vb-slide-in-rtl","entrance"],["vb-fade-slide-up","entrance"],["vb-shadow-lift","entrance"],["vb-fade-out","exit"],["vb-collapse","exit"],["vb-slide-out-ltr","exit"],["vb-slide-out-rtl","exit"],["vb-shake","attention"],["vb-pulse","attention"],["vb-bounce","attention"],["vb-blink","attention"],["vb-neon-pulse","decoration"],["vb-3d-shift","decoration"],["vb-outline-glow-pulse","decoration"],["vb-rainbow","decoration"],["vb-gradient-flow","decoration"],["vb-shimmer","decoration"],["vb-shimmer-gradient","decoration"],["vb-glow","decoration"],["vb-float","decoration"]]),os="__vbEffectsRuntime",as=globalThis,y=as[os]??{_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_wiredTriggers:new WeakMap,_transitionCleanups:new WeakMap,_transitionFallback:new WeakSet,_keyframePhase:Tn,_observer:null,_animationEndHandler:null,_autoBooted:!1,effect(r,t){this._effects.set(r,t),document.querySelectorAll("[data-effect]").forEach(e=>{if(!(e.getAttribute("data-effect")||"").split(/\s+/).includes(r))return;let s=!this._instances.get(e)?.has(r);this._initEffect(e,r),s&&e.hasAttribute("data-effect-active")&&this._instances.get(e)?.get(r)?.activate?.()})},trigger(r,t){this._triggers.set(r,t),document.querySelectorAll("[data-effect-processed][data-trigger]").forEach(e=>{let i=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(e,i)})},transition(r,t){this._transitions.set(r,t),document.querySelectorAll("[data-transition-processed][data-transition]").forEach(e=>{if(!this._transitionFallback.has(e))return;let i=e.getAttribute("data-transition")||"",s=i.indexOf(":");if((s>-1?i.slice(0,s):i)!==r)return;this._transitionFallback.delete(e);let n=e;n.style.viewTransitionName="";let o=t(e,s>-1?i.slice(s+1):null);o&&this._transitionCleanups.set(e,o)})},uid(r){return r.id?r.id:(r._vbUid||(ns++,r._vbUid=`vb-${ns}`),r._vbUid)},theme(r,t){this._themes=this._themes||new Map,this._themes.set(r,t)},applyTheme(r,t=document.documentElement){let e=this._themes?.get(r);if(e)for(let[i,s]of Object.entries(e))t.style.setProperty(i,s)},swap(r){if(!document.startViewTransition){r(),queueMicrotask(()=>this._dispatchVtDone(document.body));return}let t=document.startViewTransition(r);return t.updateCallbackDone.then(()=>{this._dispatchVtDone(document.body)}).catch(()=>{}),t},_dispatchVtDone(r){r.querySelectorAll('[data-trigger~="vt"]').forEach(t=>{this.emit(t,"vb:vt-update-done",{})})},activate(r){this._activateEffects(r)},deactivate(r){r.hasAttribute("data-effect-active")&&(r.removeAttribute("data-effect-active"),this.emit(r,"vb:phase-change",{active:!1}))},onPhaseEnd(r,t,e){let i=s=>{s.detail?.phase===t&&e(s.detail)};return r.addEventListener("vb:effect-phase-end",i),()=>r.removeEventListener("vb:effect-phase-end",i)},registerKeyframe(r,t){this._keyframePhase.set(r,t)},observe(r=document){if(r.querySelectorAll("[data-effect]").forEach(e=>this._processElement(e)),r.querySelectorAll("[data-stagger]").forEach(e=>this._processStagger(e)),r.querySelectorAll("[data-transition]").forEach(e=>this._processTransition(e)),this._observer)return;this._observer=new MutationObserver(e=>{for(let i of e){if(i.type==="childList"){for(let s of i.addedNodes)s.nodeType===Node.ELEMENT_NODE&&this._processTree(s);for(let s of i.removedNodes)s.nodeType===Node.ELEMENT_NODE&&(s.isConnected||this._cleanupTree(s))}if(i.type==="attributes"){let s=i.target;i.attributeName==="data-effect"&&this._reconcileEffects(s),i.attributeName==="data-trigger"&&this._reconcileTrigger(s),i.attributeName==="data-stagger"&&this._processStagger(s),i.attributeName==="data-transition"&&this._processTransition(s)}}});let t=r===document?document.body:r;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]}),this._animationEndHandler||(this._animationEndHandler=e=>{let i=e.target;if(!(i instanceof Element)||!i.hasAttribute("data-effect"))return;let s=this._keyframePhase.get(e.animationName);s&&this.emit(i,"vb:effect-phase-end",{phase:s,animationName:e.animationName})},document.addEventListener("animationend",this._animationEndHandler))},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null),this._animationEndHandler&&(document.removeEventListener("animationend",this._animationEndHandler),this._animationEndHandler=null)},params(r){let t=getComputedStyle(r);return{get(e){return t.getPropertyValue(`--vb-${e}`).trim()},getNumber(e,i=0){let s=t.getPropertyValue(`--vb-${e}`).trim();return s?parseFloat(s):i},getTime(e,i=0){let s=t.getPropertyValue(`--vb-${e}`).trim();if(!s)return i;let n=parseFloat(s);return Number.isFinite(n)?/s\s*$/.test(s)&&!/ms\s*$/.test(s)?n*1e3:n:i},hasClass(e){return r.classList.contains(e)}}},emit(r,t,e={}){r.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))},prefersReducedMotion:rs,_processTree(r){r.hasAttribute?.("data-effect")&&this._processElement(r),r.hasAttribute?.("data-stagger")&&this._processStagger(r),r.hasAttribute?.("data-transition")&&this._processTransition(r),r.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),r.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),r.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(r){r.hasAttribute?.("data-effect")&&this._cleanupElement(r),r.hasAttribute?.("data-transition")&&this._cleanupTransition(r),r.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),r.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(r){if(r.hasAttribute("data-effect-processed"))return;r.setAttribute("data-effect-processed","");let t=r.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let e of t)this._initEffect(r,e);this._wireTrigger(r,t)},_initEffect(r,t){let e=this._effects.get(t);if(!e)return;let i=this._instances.get(r);if(i?.has(t))return;rs();let s=e(r);s&&(i||(i=new Map,this._instances.set(r,i)),typeof s=="function"?i.set(t,{cleanup:s}):i.set(t,s))},_wireTrigger(r,t){let e=r.getAttribute("data-trigger");if(!e){this._activateEffects(r);return}let i=e.split(/\s+/).filter(Boolean);this._wiredTriggers??=new WeakMap;let s=this._wiredTriggers.get(r);s||(s=new Set,this._wiredTriggers.set(r,s));for(let n of i){if(s.has(n))continue;let o=n.indexOf(":"),a=o>-1?n.slice(0,o):n,l=o>-1?n.slice(o+1):null,c=this._triggers.get(a);if(!c)continue;s.add(n);let h=c(r,()=>this._activateEffects(r),l);if(h){let u=this._triggerCleanups.get(r);if(u){let d=u;this._triggerCleanups.set(r,()=>{d(),h()})}else this._triggerCleanups.set(r,h)}}},_activateEffects(r){r.setAttribute("data-effect-active",""),this.emit(r,"vb:phase-change",{active:!0});let t=this._instances.get(r);if(t)for(let[,e]of t)e.activate&&e.activate()},_cleanupElement(r){let t=this._instances.get(r);if(t){for(let[,i]of t)i.cleanup&&i.cleanup();this._instances.delete(r)}let e=this._triggerCleanups.get(r);e&&(e(),this._triggerCleanups.delete(r)),this._wiredTriggers?.delete(r)},_reconcileEffects(r){let t=r.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],e=this._instances.get(r);if(e)for(let[i,s]of e)t.includes(i)||(s.cleanup&&s.cleanup(),e.delete(i));for(let i of t)e?.has(i)||this._initEffect(r,i);r.hasAttribute("data-effect-processed")||(r.setAttribute("data-effect-processed",""),this._wireTrigger(r,t))},_reconcileTrigger(r){let t=this._triggerCleanups.get(r);t&&(t(),this._triggerCleanups.delete(r)),this._wiredTriggers?.delete(r);let e=r.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(r,e)},_processStagger(r){let t=r.getAttribute("data-stagger")||"",e=r.children,i=e.length,s;if(t==="reverse")s=Array.from({length:i},(n,o)=>i-1-o);else if(t==="random"){let n=this._hashString(this.uid(r));s=Array.from({length:i},(a,l)=>l);let o=n;for(let a=i-1;a>0;a--){o^=o<<13,o^=o>>>17,o^=o<<5;let l=Math.abs(o)%(a+1);[s[a],s[l]]=[s[l],s[a]]}}else if(t==="grid"){let n=[];for(let o=0;o<i;o++){let a=getComputedStyle(e[o]),l=parseInt(a.gridRowStart,10),c=parseInt(a.gridColumnStart,10);n.push({i:o,dist:Number.isFinite(l)&&Number.isFinite(c)?l-1+(c-1):o})}n.sort((o,a)=>o.dist-a.dist),s=new Array(i),n.forEach((o,a)=>{s[o.i]=a})}else s=Array.from({length:i},(n,o)=>o);for(let n=0;n<i;n++)e[n].style.setProperty("--vb-stagger-index",String(s[n]))},_hashString(r){let t=5381;for(let e=0;e<r.length;e++)t=(t<<5)+t^r.charCodeAt(e);return t|0},_processTransition(r){if(r.hasAttribute("data-transition-processed"))return;r.setAttribute("data-transition-processed","");let t=r.getAttribute("data-transition");if(!t)return;let e=t.indexOf(":"),i=e>-1?t.slice(0,e):t,s=e>-1?t.slice(e+1):null,n=this._transitions.get(i);if(n){let o=n(r,s);o&&this._transitionCleanups.set(r,o)}else r.style.viewTransitionName=`${t}-${this.uid(r)}`,this._transitionFallback.add(r)},_cleanupTransition(r){let t=this._transitionCleanups.get(r);t&&(t(),this._transitionCleanups.delete(r)),this._transitionFallback.delete(r),r.style.viewTransitionName=""}};as[os]=y;if(typeof window<"u"){let r=window.VB;if(r&&r!==y)for(let t of Object.keys(r))t in y||(y[t]=r[t]);window.VB=y}typeof document<"u"&&!y._autoBooted&&(y._autoBooted=!0,document.body?y.observe():document.addEventListener("DOMContentLoaded",()=>y.observe(),{once:!0}));y.effect("glitch",r=>{r.hasAttribute("data-effect-glitch-init")||(r.setAttribute("data-effect-glitch-init",""),r.setAttribute("data-glitch-text",r.textContent))});function _n(r){let t=r.textContent;r.setAttribute("aria-label",t),r.innerHTML="",t.split(/(\s+)/).forEach((i,s)=>{if(/^\s+$/.test(i)){r.appendChild(document.createTextNode(i));return}let n=document.createElement("span");n.className="vb-blur-chunk",n.textContent=i,n.style.setProperty("--i",String(Math.floor(s/2))),n.setAttribute("aria-hidden","true"),r.appendChild(n)})}function Ln(r){let t=r.textContent;r.setAttribute("aria-label",t);let e=t.split(/\s+/).filter(Boolean),i=[],s="",n=r.offsetWidth,o=document.createElement("span");o.style.visibility="hidden",o.style.position="absolute",o.style.font=getComputedStyle(r).font,document.body.appendChild(o),e.forEach(a=>{let l=s?s+" "+a:a;o.textContent=l,o.offsetWidth>n&&s?(i.push(s),s=a):s=l}),s&&i.push(s),document.body.removeChild(o),i.length===0&&i.push(t),r.innerHTML="",i.forEach((a,l)=>{let c=document.createElement("span");c.className="vb-blur-chunk",c.textContent=a,c.style.setProperty("--i",String(l)),c.setAttribute("aria-hidden","true"),r.appendChild(c),l<i.length-1&&r.appendChild(document.createTextNode(" "))})}y.effect("blur-reveal",r=>{if(r.hasAttribute("data-effect-blur-reveal-init")||(r.setAttribute("data-effect-blur-reveal-init",""),y.prefersReducedMotion()))return;let t=r.classList.contains("line")?"line":"word",e=y.params(r).get("blur-reveal-delay")||"80ms";return r.style.setProperty("--blur-delay",e),t==="line"?Ln(r):_n(r),{activate(){r.setAttribute("data-effect-active","")},cleanup(){}}});function Mn(r,t,e,i){let s=0;function n(){s<=t.length?(r.firstChild.textContent=t.slice(0,s),s++,setTimeout(n,e)):i&&i()}n()}function Nn(r,t,e){let i=r.firstChild.textContent,s=i.length;function n(){s>=0?(r.firstChild.textContent=i.slice(0,s),s--,setTimeout(n,t/2)):e&&e()}n()}function Rn(r){let t=r.getAttribute("data-typewriter-text"),e=y.params(r),i=e.getTime("typewriter-speed",50),s=e.getTime("typewriter-delay",0),o=r.classList.contains("loop")?2e3:null;r.textContent="";let a=document.createTextNode("");if(r.appendChild(a),!r.classList.contains("no-cursor")){let h=document.createElement("span");h.className="vb-typewriter-cursor",h.textContent="|",h.setAttribute("aria-hidden","true"),r.appendChild(h)}function c(){Mn(r,t,i,()=>{o!==null&&setTimeout(()=>{Nn(r,i,()=>{setTimeout(c,400)})},o)})}setTimeout(c,s)}y.effect("typewriter",r=>{if(r.hasAttribute("data-effect-typewriter-init"))return;r.setAttribute("data-effect-typewriter-init","");let t=r.textContent.trim();if(r.setAttribute("data-typewriter-text",t),r.setAttribute("aria-label",t),!y.prefersReducedMotion())return r.textContent="",{activate(){Rn(r)},cleanup(){}}});var ls="!<>-_\\/[]{}=+*^?#";function cs(r){return r[Math.floor(Math.random()*r.length)]}function $n(r){let t=r.getAttribute("data-scramble-text"),e=y.params(r),i=e.getTime("scramble-duration",1500),s=e.get("scramble-chars")||ls,n=e.getTime("scramble-speed",30),o=t.length,a=0,l=Math.ceil(i/n);function c(){let h=a/l,u=Math.floor(h*o),d="";for(let f=0;f<o;f++)f<u?d+=t[f]:t[f]===" "?d+=" ":d+=cs(s);r.textContent=d,a++,a<=l?setTimeout(c,n):r.textContent=t}c()}y.effect("scramble",r=>{if(r.hasAttribute("data-effect-scramble-init"))return;r.setAttribute("data-effect-scramble-init","");let t=r.textContent.trim();if(r.setAttribute("data-scramble-text",t),r.setAttribute("aria-label",t),y.prefersReducedMotion())return;let e=y.params(r).get("scramble-chars")||ls;return r.textContent=t.replace(/\S/g,()=>cs(e)),{activate(){$n(r)},cleanup(){}}});y.effect("animate-image",r=>{if(r.hasAttribute("data-effect-animate-image-init"))return;r.setAttribute("data-effect-animate-image-init","");let t=r,e=document.createElement("div");if(e.className="animate-image-wrapper",!t.parentNode)return;t.parentNode.insertBefore(e,t),e.appendChild(t);let i=document.createElement("button");i.type="button",i.className="animate-image-toggle",i.setAttribute("aria-label","Pause animation"),e.appendChild(i);let s=t.src,n=null,o=!1;function a(){let u=document.createElement("canvas");u.width=t.naturalWidth||t.width,u.height=t.naturalHeight||t.height;let d=u.getContext("2d");if(d){d.drawImage(t,0,0);try{n=u.toDataURL("image/png")}catch{n=null}}}function l(){o||(o=!0,t.setAttribute("data-animate-image-paused",""),i.setAttribute("aria-label","Play animation"),i.classList.add("paused"),n&&(t.src=n))}function c(){o&&(o=!1,t.removeAttribute("data-animate-image-paused"),i.setAttribute("aria-label","Pause animation"),i.classList.remove("paused"),t.src=s)}i.addEventListener("click",()=>o?c():l()),t.complete&&t.naturalWidth?a():t.addEventListener("load",a,{once:!0});let h=window.matchMedia("(prefers-reduced-motion: reduce)");return(h.matches||document.documentElement.dataset.motionReduced!==void 0)&&(t.complete?(a(),l()):t.addEventListener("load",()=>{a(),l()},{once:!0})),h.addEventListener("change",u=>{u.matches&&l()}),t.hasAttribute("data-animate-image-paused")&&(t.complete?(a(),o=!1,l()):t.addEventListener("load",()=>{a(),o=!1,l()},{once:!0})),{cleanup(){e.parentNode&&(e.parentNode.insertBefore(t,e),e.remove())}}});var Ct=new Map,Xe=null,Tt=!1;function jn(r){for(let[t,e]of Ct)r.querySelectorAll(t).forEach(e)}function Pn(r){if(r.nodeType!==Node.ELEMENT_NODE)return;let t=r;for(let[e,i]of Ct)t.matches(e)&&i(t),t.querySelectorAll(e).forEach(i)}function Bn(){Xe||(Xe=new MutationObserver(r=>{for(let t of r)for(let e of t.addedNodes)Pn(e)}),Xe.observe(document.documentElement,{childList:!0,subtree:!0}))}function In(){Tt||(Tt=!0,jn(document))}function hs(r,t){Ct.set(r,t),Bn(),Tt||document.readyState!=="loading"?(Tt=!0,document.querySelectorAll(r).forEach(t)):Ct.size===1&&document.addEventListener("DOMContentLoaded",In)}var _t=null;async function qn(){if(_t)return;_t=(await Promise.resolve().then(()=>(Dt(),qt))).resolveEmoji}var Dn="[data-emoji]",$=/:([a-z0-9_+-]+):/g,On=new Set(["SCRIPT","STYLE","CODE","PRE","TEXTAREA"]),zn=new Set(["INPUT","TEXTAREA"]),Fn=100;function Hn(r){if(r.hasAttribute("data-emoji-init"))return;if(r.setAttribute("data-emoji-init",""),zn.has(r.tagName)){Un(r);return}let t=r.getAttribute("data-emoji-unknown")||"keep";if(us(r,t),r.getAttribute("data-emoji-scan")==="observe"){let e=null;new MutationObserver(()=>{e&&clearTimeout(e),e=setTimeout(()=>{us(r,t),e=null},Fn)}).observe(r,{childList:!0,subtree:!0,characterData:!0})}}function Un(r){let t=!1;r.addEventListener("compositionstart",()=>{t=!0}),r.addEventListener("compositionend",()=>{t=!1,Je(r)}),r.addEventListener("input",()=>{t||Je(r)}),r.value&&$.test(r.value)&&($.lastIndex=0,Je(r))}function Je(r){let t=r.value;$.lastIndex=0;let e,i="",s=0,n=0,o=r.selectionStart??t.length,a=!1;for(;(e=$.exec(t))!==null;){let c=e[0],h=e[1],u=_t(h);if(i+=t.slice(s,e.index),u){i+=u.emoji,a=!0;let d=e.index+c.length;o>=d?n+=c.length-u.emoji.length:o>e.index&&(n+=o-e.index-u.emoji.length)}else i+=c;s=e.index+c.length}if(!a)return;i+=t.slice(s),r.value=i;let l=Math.max(0,o-n);r.setSelectionRange(l,l)}function us(r,t){let e=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode(s){let n=s.parentElement;return!n||On.has(n.tagName)||n.isContentEditable||n.hasAttribute("data-emoji-processed")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),i=[];for(;e.nextNode();)$.test(e.currentNode.textContent??"")&&i.push(e.currentNode),$.lastIndex=0;for(let s of i)Vn(s,t)}function Vn(r,t){let e=r.textContent;$.lastIndex=0;let i,s=0,n=[],o=!1;for(;(i=$.exec(e))!==null;){let a=i[1],l=_t(a);i.index>s&&n.push(e.slice(s,i.index)),l?(n.push(l.emoji),o=!0):t==="strip"?o=!0:n.push(i[0]),s=i.index+i[0].length}o&&(s<e.length&&n.push(e.slice(s)),r.textContent=n.join(""))}function Gn(r){qn().then(()=>Hn(r))}hs(Dn,Gn);
1311
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${O(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:t,tokens:e}){let i=this.parser.parseInline(e),s=Js(r);if(s===null)return i;r=s;let n='<a href="'+r+'"';return t&&(n+=' title="'+O(t)+'"'),n+=">"+i+"</a>",n}image({href:r,title:t,text:e,tokens:i}){i&&(e=this.parser.parseInline(i,this.parser.textRenderer));let s=Js(r);if(s===null)return O(e);r=s;let n=`<img src="${r}" alt="${O(e)}"`;return t&&(n+=` title="${O(t)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:O(r.text)}},ci=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},z=class ti{options;renderer;textRenderer;constructor(t){this.options=t||Z,this.options.renderer=this.options.renderer||new Wt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ci}static parse(t,e){return new ti(e).parse(t)}static parseInline(t,e){return new ti(e).parseInline(t)}parse(t){this.renderer.parser=this;let e="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let o=s,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){e+=a||"";continue}}let n=s;switch(n.type){case"space":{e+=this.renderer.space(n);break}case"hr":{e+=this.renderer.hr(n);break}case"heading":{e+=this.renderer.heading(n);break}case"code":{e+=this.renderer.code(n);break}case"table":{e+=this.renderer.table(n);break}case"blockquote":{e+=this.renderer.blockquote(n);break}case"list":{e+=this.renderer.list(n);break}case"checkbox":{e+=this.renderer.checkbox(n);break}case"html":{e+=this.renderer.html(n);break}case"def":{e+=this.renderer.def(n);break}case"paragraph":{e+=this.renderer.paragraph(n);break}case"text":{e+=this.renderer.text(n);break}default:{let o='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return e}parseInline(t,e=this.renderer){this.renderer.parser=this;let i="";for(let s=0;s<t.length;s++){let n=t[s];if(this.options.extensions?.renderers?.[n.type]){let a=this.options.extensions.renderers[n.type].call({parser:this},n);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=a||"";continue}}let o=n;switch(o.type){case"escape":{i+=e.text(o);break}case"html":{i+=e.html(o);break}case"link":{i+=e.link(o);break}case"image":{i+=e.image(o);break}case"checkbox":{i+=e.checkbox(o);break}case"strong":{i+=e.strong(o);break}case"em":{i+=e.em(o);break}case"codespan":{i+=e.codespan(o);break}case"br":{i+=e.br(o);break}case"del":{i+=e.del(o);break}case"text":{i+=e.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},Ct=class{options;block;constructor(r){this.options=r||Z}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?$.lex:$.lexInline}provideParser(r=this.block){return r?z.parse:z.parseInline}},hi=class{defaults=ei();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=z;Renderer=Wt;TextRenderer=ci;Lexer=$;Tokenizer=Vt;Hooks=Ct;constructor(...r){this.use(...r)}walkTokens(r,t){let e=[];for(let i of r)switch(e=e.concat(t.call(this,i)),i.type){case"table":{let s=i;for(let n of s.header)e=e.concat(this.walkTokens(n.tokens,t));for(let n of s.rows)for(let o of n)e=e.concat(this.walkTokens(o.tokens,t));break}case"list":{let s=i;e=e.concat(this.walkTokens(s.items,t));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(n=>{let o=s[n].flat(1/0);e=e.concat(this.walkTokens(o,t))}):s.tokens&&(e=e.concat(this.walkTokens(s.tokens,t)))}}return e}use(...r){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(e=>{let i={...e};if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let n=t.renderers[s.name];n?t.renderers[s.name]=function(...o){let a=s.renderer.apply(this,o);return a===!1&&(a=n.apply(this,o)),a}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=t[s.level];n?n.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),i.extensions=t),e.renderer){let s=this.defaults.renderer||new Wt(this.defaults);for(let n in e.renderer){if(!(n in s))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,a=e.renderer[o],l=s[o];s[o]=(...c)=>{let h=a.apply(s,c);return h===!1&&(h=l.apply(s,c)),h||""}}i.renderer=s}if(e.tokenizer){let s=this.defaults.tokenizer||new Vt(this.defaults);for(let n in e.tokenizer){if(!(n in s))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,a=e.tokenizer[o],l=s[o];s[o]=(...c)=>{let h=a.apply(s,c);return h===!1&&(h=l.apply(s,c)),h}}i.tokenizer=s}if(e.hooks){let s=this.defaults.hooks||new Ct;for(let n in e.hooks){if(!(n in s))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,a=e.hooks[o],l=s[o];Ct.passThroughHooks.has(n)?s[o]=c=>{if(this.defaults.async&&Ct.passThroughHooksRespectAsync.has(n))return(async()=>{let u=await a.call(s,c);return l.call(s,u)})();let h=a.call(s,c);return l.call(s,h)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let u=await a.apply(s,c);return u===!1&&(u=await l.apply(s,c)),u})();let h=a.apply(s,c);return h===!1&&(h=l.apply(s,c)),h}}i.hooks=s}if(e.walkTokens){let s=this.defaults.walkTokens,n=e.walkTokens;i.walkTokens=function(o){let a=[];return a.push(n.call(this,o)),s&&(a=a.concat(s.call(this,o))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,t){return $.lex(r,t??this.defaults)}parser(r,t){return z.parse(r,t??this.defaults)}parseMarkdown(r){return(t,e)=>{let i={...e},s={...this.defaults,...i},n=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=r),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(t):t,a=await(s.hooks?await s.hooks.provideLexer(r):r?$.lex:$.lexInline)(o,s),l=s.hooks?await s.hooks.processAllTokens(a):a;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(r):r?z.parse:z.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(n);try{s.hooks&&(t=s.hooks.preprocess(t));let o=(s.hooks?s.hooks.provideLexer(r):r?$.lex:$.lexInline)(t,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let a=(s.hooks?s.hooks.provideParser(r):r?z.parse:z.parseInline)(o,s);return s.hooks&&(a=s.hooks.postprocess(a)),a}catch(o){return n(o)}}}onError(r,t){return e=>{if(e.message+=`
1312
+ Please report this to https://github.com/markedjs/marked.`,r){let i="<p>An error occurred:</p><pre>"+O(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(e);throw e}}},J=new hi;function E(r,t){return J.parse(r,t)}E.options=E.setOptions=function(r){return J.setOptions(r),E.defaults=J.defaults,tr(E.defaults),E};E.getDefaults=ei;E.defaults=Z;E.use=function(...r){return J.use(...r),E.defaults=J.defaults,tr(E.defaults),E};E.walkTokens=function(r,t){return J.walkTokens(r,t)};E.parseInline=J.parseInline;E.Parser=z;E.parser=z.parse;E.Renderer=Wt;E.TextRenderer=ci;E.Lexer=$;E.lexer=$.lex;E.Tokenizer=Vt;E.Hooks=Ct;E.parse=E;var su=E.options,ru=E.setOptions,nu=E.use,ou=E.walkTokens,au=E.parseInline;var lu=z.parse,cu=$.lex;var _a="Failed to load markdown",Na=/^:::[ \t]*(note|info|tip|warning|danger)(?:[ \t]+([^\n]*?))?[ \t]*\n([\s\S]*?)\n?^:::[ \t]*(?:\n+|$)/m,Pa=r=>r.replace(/[&<>"']/g,t=>`&#${t.charCodeAt(0)};`),Ia={name:"vbCallout",level:"block",start(r){return r.match(/^:::[ \t]*(?:note|info|tip|warning|danger)\b/m)?.index},tokenizer(r){let t=Na.exec(r);if(!t||t.index!==0)return;let e=t[1],i=(t[2]||"").trim()||e[0].toUpperCase()+e.slice(1),s={type:"vbCallout",raw:t[0],kind:e,title:i,tokens:[]};return this.lexer.blockTokens(t[3],s.tokens),s},renderer(r){return`<aside data-callout="${r.kind}" role="note"><p data-callout-title><strong>${Pa(r.title)}</strong></p>${this.parser.parse(r.tokens)}</aside>
1313
+ `}},$a=new hi({gfm:!0,extensions:[Ia]}),ui=class extends b{#t=null;#e=null;#i=null;#s=null;#r=null;#n=null;#a=0;static get observedAttributes(){return["src","sanitize","allow-cross-origin"]}setup(){this.#o()}teardown(){this.#e?.abort(),this.removeAttribute("data-rendered"),this.removeAttribute("data-loading")}attributeChangedCallback(t,e,i){e===i||!this.isConnected||!this.hasAttribute("data-upgraded")||this.#o()}get parser(){return this.#t}set parser(t){this.#t=typeof t=="function"?t:null}get markdown(){return this.#r??this.#n??""}set markdown(t){let e=t==null?null:String(t);this.#r!==e&&(this.#r=e,this.#o())}async render(){await this.#o()}async reload(){this.getAttribute("src")&&await this.#o()}#c(){let t=this.querySelector('script[type="text/markdown"]');if(t)return t.textContent;let e=this.querySelector("template[data-md]");if(e)return e.content.textContent;let i=this.querySelector(":scope > pre");return i?i.textContent:null}#h(t){let e;try{e=new URL(t,document.baseURI)}catch{throw new Error(`Invalid URL: ${t}`)}if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Error(`Refused ${e.protocol} URL: only http(s) is allowed`);return this.#l(e.href),e.href}#l(t){if(!this.hasAttribute("allow-cross-origin")&&new URL(t).origin!==location.origin)throw new Error(`Refused cross-origin URL ${t} (add allow-cross-origin to permit)`)}async#o(){let t=++this.#a,e=this.getAttribute("src"),i;if(this.#e?.abort(),this.#e=null,this.removeAttribute("data-rendered"),this.removeAttribute("data-error"),this.removeAttribute("data-loading"),this.#s?.remove(),this.#s=null,e){let o=new AbortController;this.#e=o,this.setAttribute("data-loading",""),this.#k("markdown-viewer:fetch",{src:e});try{let a=this.#h(e),l=await fetch(a,{signal:o.signal});if(l.url&&this.#l(l.url),!l.ok)throw new Error(`HTTP ${l.status}: ${l.statusText}`);i=await l.text()}catch(a){if(a.name==="AbortError"||t!==this.#a)return;this.#u(a);return}if(t!==this.#a)return;this.removeAttribute("data-loading")}else this.#r!=null?i=this.#r:i=this.#c();if(i==null){this.#i?.replaceChildren();return}this.#n=i;let s;try{s=await(await this.#p())(i)}catch(o){if(t!==this.#a)return;this.#u(o);return}if(t!==this.#a)return;(!this.#i||this.#i.parentNode!==this)&&(this.#i=document.createElement("div"),this.#i.className="md-content",this.#i.setAttribute("part","content"),this.appendChild(this.#i)),this.hasAttribute("dir")?this.#i.removeAttribute("dir"):this.#i.setAttribute("dir","auto"),this.#d()?this.#i.replaceChildren(Ft(String(s??""))):this.#i.innerHTML=String(s??""),this.#f(),this.setAttribute("data-rendered","");let n=this.getAttribute("ping");if(n&&navigator.sendBeacon?.(n,JSON.stringify({src:e||"inline"})),this.#k("markdown-viewer:rendered",{src:e,node:this.#i}),this.hasAttribute("highlight"))for(let o of this.#i.querySelectorAll('pre > code[class*="language-"]')){let a=o.className.match(/language-(\S+)/)?.[1]||"";this.#k("markdown-viewer:highlight",{node:o,language:a})}}#u(t){if(this.removeAttribute("data-loading"),this.setAttribute("data-error",""),this.#i?.replaceChildren(),!this.querySelector(":scope > pre")){let e=document.createElement("p");e.setAttribute("role","alert"),e.setAttribute("data-md-error",""),e.textContent=this.getAttribute("data-label-error")||_a,this.append(e),this.#s=e}this.#k("markdown-viewer:error",{error:t.message})}async#p(){return this.#t?this.#t:t=>$a.parse(t)}#d(){let t=this.getAttribute("sanitize");return t==null?!0:!/^(off|false)$/i.test(t.trim())}#f(){if(!this.#i)return;let t=this.dataset.theme??this.closest("[data-theme]")?.dataset.theme;t&&(this.#i.dataset.theme=t)}#k(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}};g("markdown-viewer",ui);var hr={source:"Markdown source",preview:"Rendered preview",tabHint:"Tab inserts spaces. Press Escape, then Tab, to move focus."},za=0,di=class extends b{#t=null;#e=null;#i=null;#s=null;#r=null;#n="";#a=null;#c=null;#h=!1;#l={placeholder:null,rows:null};static get observedAttributes(){return["placeholder","rows","highlight","data-label-source","data-label-preview"]}setup(){this.#o()||this.#u(),this.#w(),this.#v()}teardown(){this.#c!==null&&clearTimeout(this.#c),this.#c=null,this.#h=!1,this.removeAttribute("data-editing")}attributeChangedCallback(t,e,i){!this.#t||e===i||(t==="placeholder"?this.#k(this.#t,"placeholder",i??this.#l.placeholder):t==="rows"?this.#p():t==="highlight"?this.#e?.toggleAttribute("highlight",i!=null):this.#d())}get value(){return this.#t?.value??this.#a??""}set value(t){let e=t==null?"":String(t);if(!this.#t){this.#a=e;return}this.#t.value!==e&&(this.#t.value=e,this.#n=e,this.#v(),this.#y("markdown-editor:change",{value:e,source:"api"}))}get textarea(){return this.#t}#o(){return!!(this.#t&&this.#i?.parentNode===this&&this.#s?.parentNode===this&&this.#i.contains(this.#t))}#u(){let t=this.#t&&this.contains(this.#t)?this.#t:this.querySelector("textarea"),e=[...this.childNodes];t||(t=document.createElement("textarea"),e.push(t)),this.#t=t,this.#l={placeholder:t.getAttribute("placeholder"),rows:t.getAttribute("rows")},this.hasAttribute("placeholder")&&(t.placeholder=this.getAttribute("placeholder")??""),this.#p(),t.hasAttribute("dir")||(t.dir="auto"),t.hasAttribute("spellcheck")||(t.spellcheck=!0),this.#i=document.createElement("section"),this.#i.className="md-editor-pane",this.#i.append(...e),this.#s=document.createElement("section"),this.#s.className="md-preview-pane",this.#e=document.createElement("markdown-viewer");let i=t.getAttribute("dir");i&&i!=="auto"&&(this.#s.dir=i),this.#e.dir=i||"auto",this.hasAttribute("highlight")&&this.#e.setAttribute("highlight","");let s=this.dataset.theme??this.closest("[data-theme]")?.dataset.theme;if(s&&(this.#e.dataset.theme=s),this.#s.append(this.#e),this.hasAttribute("data-tab-indent")){this.#r=document.createElement("span"),this.#r.className="visually-hidden",this.#r.id=`md-editor-tab-hint-${++za}`,this.#r.textContent=this.dataset.labelTabHint||hr.tabHint,this.#i.append(this.#r);let n=t.getAttribute("aria-describedby");t.setAttribute("aria-describedby",n?`${n} ${this.#r.id}`:this.#r.id)}this.replaceChildren(this.#i,this.#s),this.#d(),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&!t.labels?.length&&!t.title&&t.setAttribute("aria-label",this.#f("source")),this.#a!=null&&(t.value=this.#a,this.#a=null),this.#n=t.value}#p(){if(!this.#t)return;let t=this.getAttribute("rows")??this.#l.rows;this.#t.rows=parseInt(t??"",10)||10}#d(){this.#i?.setAttribute("aria-label",this.#f("source")),this.#s?.setAttribute("aria-label",this.#f("preview"))}#f(t){return(t==="source"?this.dataset.labelSource:this.dataset.labelPreview)||hr[t]}#k(t,e,i){i==null?t.removeAttribute(e):t.setAttribute(e,i)}#w(){let t=this.#t;t&&(this.listen(t,"input",()=>{this.#y("markdown-editor:input",{value:t.value}),this.#m()}),this.listen(t,"focus",()=>{this.setAttribute("data-editing","")}),this.listen(t,"blur",()=>{this.removeAttribute("data-editing"),this.#h=!1,t.value!==this.#n&&(this.#n=t.value,this.#y("markdown-editor:change",{value:t.value,source:"user"}))}),this.listen(this.getRootNode(),"reset",e=>{!t.form||e.target!==t.form||queueMicrotask(()=>{this.#n=t.value,this.#v()})},{capture:!0}),this.hasAttribute("data-tab-indent")&&this.listen(t,"keydown",e=>{let i=e;if(i.key==="Escape"){this.#h=!0;return}if(i.key!=="Tab"||i.shiftKey||i.ctrlKey||i.metaKey||i.altKey){["Shift","Control","Alt","Meta"].includes(i.key)||(this.#h=!1);return}if(this.#h||t.readOnly||t.disabled){this.#h=!1;return}if(i.preventDefault(),!document.execCommand("insertText",!1," ")){let{selectionStart:s,selectionEnd:n}=t;t.setRangeText(" ",s,n,"end"),t.dispatchEvent(new Event("input",{bubbles:!0}))}}))}#m(){this.#c!==null&&clearTimeout(this.#c),this.#c=setTimeout(()=>this.#v(),150)}#v(){this.#c!==null&&clearTimeout(this.#c),this.#c=null,this.#e&&(this.#e.markdown=this.#t?.value??"")}#y(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}};g("markdown-editor",di);var Ba=0,ja="button, a[href], input, select, textarea, [tabindex]",Oa='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]), select, textarea, [contenteditable]',pi=class extends b{static get observedAttributes(){return["data-orientation","data-position"]}#t=null;#e=null;#i=null;#s=!1;#r=null;#n=!1;#a=0;#c=null;setup(){this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.getAttribute("aria-label")||this.setAttribute("aria-label","Page tools"),this.#h(),this.#w();let t=this.dataset.breakpoint||"48rem";this.#i=matchMedia(`(max-width: ${t})`),this.#m(this.#i),this.listen(this.#i,"change",e=>this.#m(e)),this.listen(this,"keydown",this.#k),this.listen(this,"focusin",this.#f),this.#r=new MutationObserver(e=>{for(let i of e)i.type==="childList"&&i.target===this&&this.#s&&this.#g();this.#p()}),this.#r.observe(this,{childList:!0,subtree:!0}),this.#p()}teardown(){this.#r?.disconnect(),this.#r=null,cancelAnimationFrame(this.#a),this.#a=0,this.#s&&this.#y(),this.#t?.remove(),this.#e?.remove(),this.#t=null,this.#e=null,this.#c=null}attributeChangedCallback(t,e,i){e===i||!this.hasAttribute("data-upgraded")||this.#h()}get tools(){let t=this.#s&&this.#e?this.#e:this;return Array.from(t.children).filter(e=>!e.hasAttribute("data-page-tools-internal"))}#h(){let t=this.dataset.orientation||"auto",e=this.dataset.position||"sticky",i=t==="horizontal"||t==="vertical"?t:e==="inline"?"horizontal":"vertical";this.setAttribute("data-resolved-orientation",i),this.#o()}#l(){return this.#s?"vertical":this.dataset.resolvedOrientation||"vertical"}#o(){this.setAttribute("aria-orientation",this.#l())}#u(){return Array.from(this.querySelectorAll(ja)).filter(t=>!t.closest("[data-page-tools-internal]:not(.page-tools-popover)")&&!t.matches(":disabled")&&!t.closest("[inert]")&&t.checkVisibility())}#p(){this.#a||(this.#a=requestAnimationFrame(()=>{this.#a=0,this.#d()}))}#d(t=null){let e=this.#u();if(!e.length)return;let i=[t,this.#c].find(s=>s&&e.includes(s))||e[0];this.#c=i;for(let s of e)s.tabIndex=s===i?0:-1}#f=t=>{let e=t.target;e!==this.#t&&this.#u().includes(e)&&this.#d(e)};#k=t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;let e=t.target;if(e===this.#t||e.matches(Oa))return;let i=this.#u(),s=i.indexOf(e);if(s===-1)return;let n=this.#l()==="horizontal",o=getComputedStyle(this).direction==="rtl",a=n?o?"ArrowRight":"ArrowLeft":"ArrowUp",l=n?o?"ArrowLeft":"ArrowRight":"ArrowDown",c=-1;t.key===l?c=(s+1)%i.length:t.key===a?c=(s-1+i.length)%i.length:t.key==="Home"?c=0:t.key==="End"&&(c=i.length-1),c!==-1&&(t.preventDefault(),this.#d(i[c]),i[c].focus())};#w(){let t=`pt-${++Ba}`,e=this.dataset.fabIcon||"ellipsis-vertical",i=this.dataset.fabLabel||"Page tools";this.#t=document.createElement("button"),this.#t.type="button",this.#t.className="page-tools-fab",this.#t.setAttribute("data-page-tools-internal",""),this.#t.setAttribute("popovertarget",t),this.#t.setAttribute("aria-label",i),this.#t.hidden=!0;let s=document.createElement("icon-wc");s.setAttribute("name",e),s.setAttribute("size","md"),s.setAttribute("aria-hidden","true"),this.#t.appendChild(s),this.#e=document.createElement("section"),this.#e.className="page-tools-popover",this.#e.setAttribute("data-page-tools-internal",""),this.#e.id=t,this.#e.setAttribute("popover",""),this.#e.setAttribute("aria-label",i),this.appendChild(this.#t),this.appendChild(this.#e),this.listen(this.#e,"beforetoggle",n=>{n.newState==="closed"&&(this.#n=!!this.#e?.contains(document.activeElement))}),this.listen(this.#e,"toggle",n=>{if(n.newState==="open"){this.#d();return}let a=this.#n&&this.#s;if(this.#n=!1,!a)return;let l=document.activeElement;(!l||l===document.body||this.#e?.contains(l))&&this.#t?.focus()})}#m(t){t.matches??t?this.#v():this.#y()}#v(){if(this.#s||!this.#t||!this.#e)return;let t=this.tools;for(let e of t)this.#e.appendChild(e);this.#s=!0,this.#t.hidden=!1,this.setAttribute("data-collapsed",""),this.#o()}#y(){if(!this.#s||!this.#t||!this.#e)return;this.#s=!1,this.#e.matches(":popover-open")&&this.#e.hidePopover?.();let t=Array.from(this.#e.children);for(let e of t)this.insertBefore(e,this.#t);this.#t.hidden=!0,this.removeAttribute("data-collapsed"),this.#o(),this.#p()}#g(){if(!this.#e)return;let t=Array.from(this.children).filter(e=>!e.hasAttribute("data-page-tools-internal"));for(let e of t)this.#e.appendChild(e)}};g("page-tools",pi);var fi=class extends b{#t;#e;#i=null;setup(){this.#i===null&&(this.#i=this.getAttribute("label")||this.textContent.trim()||"Print this page");let t=this.#i,e=this.hasAttribute("raw-toggle");this.innerHTML="",e&&(this.setAttribute("role","group"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label",t));let i=this.getAttribute("variant")||"icon";this.#t=document.createElement("button"),this.#t.type="button",this.#t.className="print-trigger",this.#t.setAttribute("aria-label",t);let s=i!=="label",n=i!=="icon";if(s){let o=document.createElement("icon-wc");o.setAttribute("name","printer"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),this.#t.appendChild(o)}if(n){let o=document.createElement("span");o.textContent=t,this.#t.appendChild(o)}if(this.listen(this.#t,"click",this.#s),this.append(this.#t),e){let o=document.createElement("label");this.#e=document.createElement("input"),this.#e.type="checkbox";let a=document.createElement("span");a.textContent=this.dataset.labelRaw||"Print without VB styles",o.append(this.#e,a),this.append(o)}}teardown(){this.#t=null,this.#e=null}#s=()=>{if(this.#e?.checked){document.documentElement.setAttribute("data-print-raw","");let e,i=()=>{document.documentElement.removeAttribute("data-print-raw"),window.removeEventListener("afterprint",i),clearTimeout(e)};window.addEventListener("afterprint",i,{once:!0}),e=setTimeout(i,5e3)}window.print()}};g("print-page",fi);var mi=new Map([["x",{label:"X",iconName:"twitter",buildUrl:({url:r,title:t})=>`https://x.com/intent/post?url=${N(r)}&text=${N(t)}`}],["twitter",{label:"X",iconName:"twitter",buildUrl:({url:r,title:t})=>`https://x.com/intent/post?url=${N(r)}&text=${N(t)}`}],["facebook",{label:"Facebook",iconName:"facebook",buildUrl:({url:r})=>`https://www.facebook.com/sharer/sharer.php?u=${N(r)}`}],["linkedin",{label:"LinkedIn",iconName:"linkedin",buildUrl:({url:r})=>`https://www.linkedin.com/sharing/share-offsite/?url=${N(r)}`}],["whatsapp",{label:"WhatsApp",iconName:"whatsapp",iconSet:"custom",buildUrl:({url:r,title:t})=>`https://wa.me/?text=${N(`${t} ${r}`)}`}],["telegram",{label:"Telegram",iconName:"telegram",iconSet:"custom",buildUrl:({url:r,title:t})=>`https://t.me/share/url?url=${N(r)}&text=${N(t)}`}],["bluesky",{label:"Bluesky",iconName:"bluesky",iconSet:"custom",buildUrl:({url:r,title:t})=>`https://bsky.app/intent/compose?text=${N(`${t} ${r}`)}`}],["mastodon",{label:"Mastodon",iconName:"mastodon",iconSet:"custom",buildUrl:({url:r,title:t},e="mastodon.social")=>`https://${e}/share?text=${N(`${t} ${r}`)}`}],["email",{label:"Email",iconName:"mail",buildUrl:({url:r,title:t,text:e})=>`mailto:?subject=${N(t)}&body=${N(`${e}
1314
+
1315
+ ${r}`)}`}],["copy",{label:"Copy link",iconName:"link",buildUrl:()=>""}]]),gi="x,linkedin,bluesky,mastodon,whatsapp,email,copy";function N(r){return encodeURIComponent(r)}var Da={sharePage:"Share this page",shareOn:"Share on {platform}",copy:"Copy link",copied:"Copied!",linkCopied:"Link copied to clipboard",shareSelection:"Share selection",selectionCopied:"Selection copied"},Fa=/\{(url|title|text)\}/;function qa(r,t){let e=n=>encodeURIComponent(n).replace(/-/g,"%2D"),i=t.replace(/\s+/g," ").trim().split(" "),s=i.length>10?`${e(i.slice(0,4).join(" "))},${e(i.slice(-4).join(" "))}`:e(i.join(" "));return`${r.split("#")[0]}#:~:text=${s}`}var bi=class extends b{#t;#e;#i;#s={};#r=new WeakMap;#n="";#a=null;#c=null;#h=!1;get url(){return this.#s.url??this.#t}set url(t){this.#l("url",t)}get shareTitle(){return this.#s.title??this.#e??""}set shareTitle(t){this.#l("title",t)}get text(){return this.#s.text??this.#i}set text(t){this.#l("text",t)}#l(t,e){e==null?delete this.#s[t]:this.#s[t]=String(e),this.hasAttribute("data-upgraded")&&(this.#u(),this.#g())}setup(){if(this.#u(),this.#d(),this.closest("selection-menu")){this.#w(),this.setAttribute("data-tier-resolved","selection");return}this.#n==="native"?this.#m():this.#n==="hidden"?this.style.display="none":this.children.length>0?this.#y():this.#v(),this.setAttribute("data-tier-resolved",this.#n)}teardown(){this.removeAttribute("data-tier-resolved"),this.#n==="hidden"&&this.style.removeProperty("display"),this.#a&&(clearTimeout(this.#a),this.#a=null);for(let t of this.querySelectorAll(".share-label[data-original]"))t.textContent=t.dataset.original??"",delete t.dataset.original;this.#c&&(this.#c.removeEventListener("click",this.#A),this.#h&&this.#c.remove(),this.#c=null,this.#h=!1),this.querySelector(":scope > .share-trigger")?.remove(),this.querySelector(":scope > .share-selection")?.remove()}async share(){return this.#n==="native"?this.#T():this.#x()}#o(t){let e=`data-label-${t.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}`;return this.getAttribute(e)||Da[t]}#u(){this.#t=this.#s.url||this.getAttribute("url")||document.querySelector('link[rel~="canonical" i]')?.href||location.href,this.#e=this.#s.title??(this.getAttribute("title")||document.querySelector('meta[property="og:title"]')?.getAttribute("content")||document.title),this.#i=this.#s.text??(this.getAttribute("text")||document.querySelector('meta[name="description"]')?.getAttribute("content")||document.querySelector('meta[property="og:description"]')?.getAttribute("content")||"")}#p(){return{url:this.#t||"",title:this.#e||"",text:this.#i||""}}#d(){let t=this.getAttribute("tier");if(t==="platforms"||t==="native"){t==="native"&&!navigator.share?this.#n="hidden":this.#n=t;return}if((this.getAttribute("platforms")||gi)==="native-only"){this.#n=typeof navigator.share=="function"?"native":"hidden";return}this.#n=typeof navigator.share=="function"?"native":"platforms"}#f(t){let e=document.createElement("span");return e.className="share-label",e.textContent=t,e}#k(t,e){let i=document.createElement("icon-wc");return i.setAttribute("name",t),i.setAttribute("size","sm"),e&&i.setAttribute("set",e),i.setAttribute("aria-hidden","true"),i}#w(){let t=document.createElement("button");t.type="button",t.className="share-selection",t.setAttribute("aria-label",this.#o("shareSelection")),t.appendChild(this.#k("share-2")),t.addEventListener("click",async()=>{let e=this.closest("selection-menu"),s=e?.getSelection?.()?.text||window.getSelection()?.toString().trim()||"";if(!s){e?.dismiss?.();return}let n=qa(this.#t||location.href,s),o=`"${s}" \u2014 ${n}`,a=!1;if(typeof navigator.share=="function")try{await navigator.share({text:o}),a=!0}catch(l){l?.name==="AbortError"&&(a=!0)}a||await kt(o,{announceMessage:this.#o("selectionCopied")}),e?.dismiss?.()}),this.appendChild(t)}#m(){let t=document.createElement("button");t.type="button",t.className="share-trigger",t.append(this.#k("share-2"),this.#f(this.getAttribute("label")||"Share")),t.addEventListener("click",this.#b),this.appendChild(t)}#v(){let t=(this.getAttribute("platforms")||gi).split(",").map(e=>e.trim()).filter(Boolean);this.#c=document.createElement("nav"),this.#c.setAttribute("aria-label",this.#o("sharePage"));for(let e of t){let i=mi.get(e);if(!i)continue;let s=document.createElement("button");s.type="button",s.dataset.platform=e,e==="copy"?s.append(this.#k(i.iconName,i.iconSet),this.#f(this.#o("copy"))):(s.setAttribute("aria-label",this.#o("shareOn").replace("{platform}",i.label)),s.append(this.#k(i.iconName,i.iconSet),this.#f(i.label))),this.#c.appendChild(s)}this.#c.addEventListener("click",this.#A),this.appendChild(this.#c),this.#h=!0}#y(){if(this.querySelector("nav"))this.#c=this.querySelector("nav");else{let t=document.createElement("nav");for(t.setAttribute("aria-label",this.#o("sharePage"));this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t),this.#c=t}this.#g(),this.#c.addEventListener("click",this.#A)}#g(){let{url:t,title:e,text:i}=this.#p();for(let s of this.querySelectorAll("a[data-platform]")){let n=this.#r.get(s);if(n==null){let o=s.getAttribute("href")||"";if(!Fa.test(o))continue;n=o,this.#r.set(s,n)}s.setAttribute("href",n.replace(/\{url\}/g,encodeURIComponent(t)).replace(/\{title\}/g,encodeURIComponent(e)).replace(/\{text\}/g,encodeURIComponent(i)))}}#b=async()=>{await this.#T()};async#T(){let t=this.#p();this.dispatchEvent(new CustomEvent("share-wc:open",{detail:{platform:"native"},bubbles:!0}));try{if(navigator.canShare&&!navigator.canShare(t))throw new Error("Payload not shareable");return await navigator.share(t),this.dispatchEvent(new CustomEvent("share-wc:success",{detail:{platform:"native"},bubbles:!0})),!0}catch(e){return e?.name==="AbortError"?!1:(this.dispatchEvent(new CustomEvent("share-wc:error",{detail:{platform:"native",error:e},bubbles:!0})),this.#x(this.querySelector(":scope > .share-trigger")))}}#A=t=>{let e=t.target.closest("[data-platform]");if(!e)return;let i=e.dataset.platform;if(i==="copy"){e.tagName==="A"&&t.preventDefault(),this.#x(e);return}if(e.tagName==="A"||!i)return;let s=mi.get(i);if(!s)return;this.dispatchEvent(new CustomEvent("share-wc:open",{detail:{platform:i},bubbles:!0}));let n=this.#p();if(i==="email")location.href=s.buildUrl(n);else if(i==="mastodon"){let o=this.getAttribute("mastodon-instance")||"mastodon.social",a=s.buildUrl(n,o);window.open(a,"_blank","noopener,noreferrer")}else window.open(s.buildUrl(n),"_blank","noopener,noreferrer");this.dispatchEvent(new CustomEvent("share-wc:success",{detail:{platform:i},bubbles:!0}))};async#x(t=null){let e=t?.isConnected?t:void 0;if(!await kt(this.#t||"",{button:e,announceMessage:this.#o("linkCopied"),duration:2e3}))return this.dispatchEvent(new CustomEvent("share-wc:error",{detail:{platform:"copy"},bubbles:!0})),!1;this.dispatchEvent(new CustomEvent("share-wc:success",{detail:{platform:"copy"},bubbles:!0}));let s=e?.dataset.platform==="copy"?e.querySelector(".share-label"):null;if(!s)return!0;let n=s.dataset.original??s.textContent??"";return s.dataset.original=n,s.textContent=this.#o("copied"),this.#a&&clearTimeout(this.#a),this.#a=setTimeout(()=>{s.textContent=n,delete s.dataset.original,this.#a=null},2e3),!0}};g("share-wc",bi);var Ha="Home",Ua="Show full path",vi=":scope > ol > li:not([data-crumb-toggle])",Va=4;function ur(r){try{return decodeURIComponent(r)}catch{return r}}var yi=class extends b{#t={};#e=!1;#i=!1;static get observedAttributes(){return["data-collapsed"]}setup(){this.#s(),this.hasAttribute("data-from-pathname")?this.#r():this.#a(),this.#c(),this.#h(),this.#l(),this.listen(this,"click",t=>{let i=(t.target instanceof Element?t.target:null)?.closest("[data-crumb-toggle] > button");if(!i||!this.contains(i))return;let s=i.getAttribute("aria-expanded")!=="true";i.setAttribute("aria-expanded",String(s)),this.dispatchEvent(new CustomEvent("bread-crumb:toggle",{bubbles:!0,detail:{expanded:s}}))})}attributeChangedCallback(t,e,i){e===i||!this.hasAttribute("data-upgraded")||t==="data-collapsed"&&this.#h()}get labels(){return{...this.#t}}set labels(t){!t||typeof t!="object"||(this.#t={...t},this.isConnected&&this.hasAttribute("data-from-pathname")&&(this.#r(),this.#c(),this.#h(),this.#l()))}#s(){if(!!this.parentElement?.closest('nav, [role="navigation"]')){this.#e&&this.removeAttribute("role"),this.#i&&this.removeAttribute("aria-label"),this.#e=!1,this.#i=!1;return}this.hasAttribute("role")||(this.setAttribute("role","navigation"),this.#e=!0),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&(this.setAttribute("aria-label","Breadcrumb"),this.#i=!0)}#r(){let e=window.location.pathname.split("/").filter(Boolean),i=document.createElement("ol"),s=document.createElement("li"),n=document.createElement("a");n.href="/",n.textContent=this.#t["/"]||this.#t.home||Ha,s.appendChild(n),i.appendChild(s);let o=this.dataset.currentLabel,a="";e.forEach((c,h)=>{a+=`/${c}`;let u=h===e.length-1,p=document.createElement("li"),d=`${a}/`,f=ur(c),m=u&&o||this.#t[d]||this.#t[a]||this.#t[ur(d)]||this.#t[f]||this.#t[c]||this.#n(f);if(u){let y=document.createElement("span");y.setAttribute("aria-current","page"),y.textContent=m,p.appendChild(y)}else{let y=document.createElement("a");y.href=d,y.textContent=m,p.appendChild(y)}i.appendChild(p)});let l=this.querySelector(":scope > ol");l?l.replaceWith(i):this.prepend(i)}#n(t){return t.replace(/[-_]+/g," ").replace(/\S+/g,e=>e[0].toUpperCase()+e.slice(1))}#a(){if(this.querySelector(":scope > ol"))return;let e=Array.from(this.querySelectorAll(":scope > a, :scope > span"));if(e.length===0)return;let i=document.createElement("ol");e.forEach(s=>{let n=document.createElement("li");n.appendChild(s),i.appendChild(n)}),this.prepend(i)}#c(){let t=this.querySelectorAll(vi);t.length!==0&&t.forEach((e,i)=>{let s=i===t.length-1,n=e.querySelector("a, span");n&&(s?n.setAttribute("aria-current","page"):n.removeAttribute("aria-current"))})}#h(){let t=this.querySelector(":scope > ol"),e=t?.querySelector(":scope > li[data-crumb-toggle]"),i=this.querySelectorAll(vi);if(!(!!t&&this.hasAttribute("data-collapsed")&&i.length>=Va)){e?.remove();return}let n=e||document.createElement("li");if(!e){n.setAttribute("data-crumb-toggle","");let o=document.createElement("button");o.type="button",o.setAttribute("aria-expanded","false"),o.setAttribute("aria-label",Ua),o.textContent="\u2026",n.appendChild(o)}i[0].nextElementSibling!==n&&i[0].after(n)}#l(){if(this.dataset.jsonld==="off")return;let t=Array.from(this.querySelectorAll(vi));if(t.length===0)return;let i={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:t.map((n,o)=>{let a=n.querySelector("a, span"),l=a?.textContent?.trim()||"",c=a instanceof HTMLAnchorElement&&a.hasAttribute("href")?a.href:void 0;return{"@type":"ListItem",position:o+1,name:l,...c?{item:c}:{}}})},s=this.querySelector(':scope > script[type="application/ld+json"]');s||(s=document.createElement("script"),s.type="application/ld+json",this.appendChild(s)),s.textContent=JSON.stringify(i)}};g("bread-crumb",yi);var wi="[data-highlights]",dr="highlights",Wa=["yellow","green","blue","pink"];var Ka=typeof CSS<"u"&&"highlights"in CSS,Jt=new WeakMap;function pr(r){let t=2166136261;for(let e=0;e<r.length;e++)t^=r.charCodeAt(e),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function vr(){return"hn-"+crypto.randomUUID().slice(0,8)}var Ga=/^[a-z0-9_-]+$/i,fr=["solid","double","dotted","dashed","wavy"],Ya={annotation:"You highlighted",added:"Highlight added",removed:"Highlight removed",noteSaved:"Note saved"};function Yt(r,t){let e="highlightsLabel"+t[0].toUpperCase()+t.slice(1);return r.dataset[e]||Ya[t]}function Xa(r,{textLength:t,colors:e}){if(!r||typeof r!="object")return null;let i=r,{startOffset:s,endOffset:n,color:o}=i;if(!Number.isInteger(s)||!Number.isInteger(n))return null;let a=s,l=n;return a<0||l<=a||l>t||!ki(o)||!e.includes(o)||i.id!=null&&(typeof i.id!="string"||!/^[\w-]{1,64}$/.test(i.id))||i.text!=null&&typeof i.text!="string"||i.note!=null&&typeof i.note!="string"?null:{id:i.id||vr(),startOffset:a,endOffset:l,text:i.text??"",color:o,note:i.note??"",created:Number.isFinite(i.created)?i.created:Date.now()}}function ki(r){return typeof r=="string"&&Ga.test(r)}var Q=null,tt=new Map,Lt=new Map;function yr(){if(tt.size===0){Q&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(i=>i!==Q),Q=null);return}Q||(Q=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,Q]);let r=[...tt.keys()],t=r.map(i=>`::highlight(hn-${i}) { background-color: var(--highlight-${i}); color: var(--highlight-${i}-ink, var(--highlight-ink, CanvasText)); text-decoration-line: underline; text-decoration-color: var(--highlight-${i}); text-underline-offset: 2px; }`),e=r.map((i,s)=>`::highlight(hn-${i}) { background-color: Mark; color: MarkText; text-decoration-line: underline; text-decoration-color: MarkText; text-decoration-style: ${fr[s%fr.length]}; text-decoration-thickness: 2px; }`);Q.replaceSync(`${t.join(`
1316
+ `)}
1317
+ @media (forced-colors: active) {
1318
+ ${e.join(`
1319
+ `)}
1320
+ }`)}function Ja(r){for(let t of r)tt.set(t,(tt.get(t)??0)+1);yr()}function Za(r){for(let t of r){let e=(tt.get(t)??0)-1;e>0?tt.set(t,e):tt.delete(t)}yr()}function Qa(r){let t=Lt.get(r),e=t?[...t.values()].flat():[];e.length===0?(CSS.highlights.delete(`hn-${r}`),Lt.delete(r)):CSS.highlights.set(`hn-${r}`,new Highlight(...e))}function mr(r,t){let e=new Set(t.keys());for(let[i,s]of Lt)s.has(r)&&e.add(i);for(let i of e){let s=t.get(i)??[],n=Lt.get(i);s.length?(n||Lt.set(i,n=new Map),n.set(r,s)):n?.delete(r),Qa(i)}}function gr(r,t,e){let i=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),s=0;for(;i.nextNode();){if(i.currentNode===t)return s+e;s+=(i.currentNode.textContent??"").length}return-1}function Xt(r,t,e){let i=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),s=0,n=null,o=0,a=null,l=0;for(;i.nextNode();){let c=i.currentNode,h=(c.textContent??"").length;if(!n&&s+h>t&&(n=c,o=t-s),s+h>=e){a=c,l=e-s;break}s+=h}if(!n||!a)return null;try{let c=document.createRange();return c.setStart(n,Math.min(o,(n.textContent??"").length)),c.setEnd(a,Math.min(l,(a.textContent??"").length)),c}catch{return null}}var Ai=class{#t;#e;#i;#s;#r=[];#n=!Ka;#a;#c;#h=!1;#l=[];#o=new Map;constructor(t){this.#t=t,this.#s=t.hasAttribute("data-highlights-readonly");let e=t.dataset.highlights;this.#e=e&&e!==""?e:location.pathname;let i=t.dataset.highlightsColors,s=i?i.split(",").map(n=>n.trim()).filter(ki):[...Wa];this.#i=[...new Set(s)],this.#n||Ja(this.#i),this.#y(),this.#s||(this.#a=this.#p.bind(this),this.#c=this.#d.bind(this),t.addEventListener("pointerup",this.#a),t.addEventListener("click",this.#c)),t.setAttribute("data-highlights-init",""),this.#m().then(()=>{this.#h||this.#y()})}get colors(){return[...this.#i]}get destroyed(){return this.#h}get element(){return this.#t}getHighlights(){return this.#r.map(t=>({...t}))}removeHighlight(t){let e=this.#r.findIndex(i=>i.id===t);e<0||(this.#r.splice(e,1),this.#v(),this.#y(),this.#x("highlights:removed",{id:t}),ot(Yt(this.#t,"removed")))}clearAll(){this.#r=[],this.#v(),this.#y()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#r})}importHighlights(t){let e;try{e=typeof t=="string"?JSON.parse(t):t}catch{return{imported:0,rejected:0}}if(!e||!Array.isArray(e.highlights))return{imported:0,rejected:0};let i=this.#u(e.highlights);return this.#r=i,this.#v(),this.#y(),{imported:i.length,rejected:e.highlights.length-i.length}}#u(t){let e={textLength:(this.#t.textContent??"").length,colors:this.#i},i=new Set,s=[];for(let n of t){let o=Xa(n,e);!o||i.has(o.id)||(i.add(o.id),s.push(o))}return s}destroy(){this.#h||(this.#h=!0,this.#a&&this.#t.removeEventListener("pointerup",this.#a),this.#c&&this.#t.removeEventListener("click",this.#c),this.#n?this.#t.querySelectorAll("mark[data-hn-id]").forEach(t=>{let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t),e.normalize()}):(mr(this,new Map),Za(this.#i)),this.#T(),this.#o.clear(),this.#t.removeAttribute("data-highlights-init"),Jt.get(this.#t)===this&&Jt.delete(this.#t))}#p(){requestAnimationFrame(()=>{if(this.#h)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let e=t.getRangeAt(0);this.#t.contains(e.commonAncestorContainer)&&this.#x("highlights:selected",{text:t.toString().trim(),rect:e.getBoundingClientRect()})})}#d(t){let e=t.target.closest?.(".hn-margin-annotation");if(e){let s=e.dataset.hnId,n=this.#r.find(o=>o.id===s);if(n){this.#x("highlights:clicked",{id:s,highlight:{...n}}),this.#x("highlights:request-note",{id:s,highlight:{...n},controller:this});return}}let i=t.target.closest?.("mark[data-hn-id]");if(i){let s=i.dataset.hnId,n=this.#r.find(o=>o.id===s);if(n){this.#x("highlights:clicked",{id:s,highlight:{...n}});return}}if(!this.#n){let s=this.#w(t.clientX,t.clientY);s&&this.#x("highlights:clicked",{id:s.id,highlight:{...s}})}}findHighlightRect(t){let e=this.#r.find(n=>n.id===t);if(!e)return null;let i=this.#f(e);if(!i)return null;let s=i.getClientRects();return s.length?s[0]:null}#f(t){return this.#o.get(t.id)??Xt(this.#t,t.startOffset,t.endOffset)}#k(){this.#o.clear();for(let t of this.#r){let e=Xt(this.#t,t.startOffset,t.endOffset);e&&this.#o.set(t.id,e)}}#w(t,e){for(let i of this.#r){let s=this.#o.get(i.id);if(!s)continue;let n=s.getClientRects();for(let o of n)if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)return i}return null}_createFromSelection(t){let e=window.getSelection();if(!e||e.isCollapsed)return;let i=e.getRangeAt(0);if(!this.#t.contains(i.commonAncestorContainer))return;let s=gr(this.#t,i.startContainer,i.startOffset),n=gr(this.#t,i.endContainer,i.endOffset);if(s<0||n<0||s>=n)return;let o=e.toString().trim(),a={id:vr(),startOffset:s,endOffset:n,text:o,color:t,note:"",created:Date.now()};this.#r.push(a),this.#v(),this.#y(),e.removeAllRanges(),this.#x("highlights:added",{id:a.id,text:o,color:t,note:""}),ot(Yt(this.#t,"added"))}_changeColor(t,e){let i=this.#r.find(s=>s.id===t);i&&(i.color=e,this.#v(),this.#y())}_updateNote(t,e){let i=this.#r.find(s=>s.id===t);i&&(i.note=e,this.#v(),this.#A(),this.#x("highlights:note-changed",{id:t,note:e}),ot(Yt(this.#t,"noteSaved")))}async#m(){let t=await _.get(dr,this.#e);if(!t||!Array.isArray(t.highlights)||this.#h)return;let e=this.#u(t.highlights),i=pr(this.#t.textContent);t.contentHash&&t.contentHash!==i?(this.#r=e.filter(s=>{let n=Xt(this.#t,s.startOffset,s.endOffset);return n?n.toString().trim()===s.text:!1}),this.#v()):this.#r=e}#v(){let t={version:1,contentHash:pr(this.#t.textContent),highlights:this.#r};_.set(dr,this.#e,t).catch(()=>{})}#y(){this.#n?(this.#b(),this.#k()):(this.#k(),this.#g()),this.#A()}#g(){let t=new Map;for(let e of this.#i)t.set(e,[]);for(let e of this.#r){let i=this.#o.get(e.id);i&&t.has(e.color)&&t.get(e.color).push(i)}mr(this,t)}#b(){this.#t.querySelectorAll("mark[data-hn-id]").forEach(e=>{let i=e.parentNode;for(;e.firstChild;)i.insertBefore(e.firstChild,e);i.removeChild(e)}),this.#t.normalize();let t=[...this.#r].sort((e,i)=>i.startOffset-e.startOffset);for(let e of t){let i=Xt(this.#t,e.startOffset,e.endOffset);if(!i)continue;let s=document.createElement("mark");s.dataset.hnId=e.id,ki(e.color)&&(s.dataset.hnColor=e.color,s.style.setProperty("--_hn-color",`var(--highlight-${e.color})`),s.style.setProperty("--_hn-ink",`var(--highlight-${e.color}-ink, var(--highlight-ink))`));try{i.surroundContents(s)}catch{let n=i.extractContents();s.appendChild(n),i.insertNode(s)}}}#T(){for(let t of this.#l)t.remove();this.#l=[]}#A(){if(this.#T(),this.#r.length===0)return;getComputedStyle(this.#t).position==="static"&&(this.#t.style.position="relative");let e=this.#t.getBoundingClientRect(),i=Yt(this.#t,"annotation");for(let s of this.#r){let n=this.#o.get(s.id);if(!n)continue;let o=n.getClientRects();if(o.length===0)continue;let a=o[0].top-e.top,l=document.createElement("span");if(l.className="hn-margin-annotation",l.dataset.hnId=s.id,l.setAttribute("aria-hidden","true"),l.style.insetBlockStart=`${a}px`,s.note){let c=document.createElement("span");c.className="hn-note-indicator",c.textContent="*",l.append(c,` ${i}`),l.classList.add("hn-has-note")}else l.textContent=i;this.#t.appendChild(l),this.#l.push(l)}}#x(t,e={}){this.#t.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}};function H(r){let t=Jt.get(r);if(t&&!t.destroyed)return t;let e=new Ai(r);return Jt.set(r,e),e}function br(r=document){r.querySelectorAll(wi).forEach(t=>{t.hasAttribute("data-highlights-init")||H(t)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>br()):br();var tl=new MutationObserver(r=>{for(let t of r)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(wi)&&H(i),i.querySelectorAll(wi).forEach(s=>{s.hasAttribute("data-highlights-init")||H(s)})}});tl.observe(document.documentElement,{childList:!0,subtree:!0});var el=["yellow","green","blue","pink"],il=/^[a-z0-9_-]+$/i,sl=["annotation","added","removed"],rl=0,xi=class extends b{#t=null;#e=null;#i="yellow";#s=null;#r=null;#n=!1;#a=null;setup(){this.#s=this.closest("selection-menu");let t=this.#w();t.includes(this.#i)||(this.#i=t[0]??"yellow"),this.#s?this.#c():this.#f()}teardown(){this.#t?.destroy(),this.#t=null,this.#a?.remove(),this.#a=null,this.#n?this.#r?.remove():this.#r?.removeAttribute("aria-expanded"),this.#r=null,this.#n=!1,this.#s=null}#c(){let t=this.hasAttribute("readonly");for(let n of this.#p())this.#d(n);if(t)return;let e=this.#w(),i=this.querySelector(":scope > button");if(this.#n=!i,!i){i=document.createElement("button"),i.type="button",i.setAttribute("aria-label",this.dataset.labelButton||"Highlight selection");let n=document.createElement("icon-wc");n.setAttribute("name","highlighter"),n.setAttribute("size","sm"),n.setAttribute("aria-hidden","true"),i.appendChild(n),this.appendChild(i)}this.#r=i;let s=document.createElement("div");s.className="highlight-color-dropdown",s.id=`highlight-palette-${++rl}`,s.setAttribute("role","group"),s.setAttribute("aria-label",this.dataset.labelPalette||"Highlight color"),s.hidden=!0;for(let n of e){let o=document.createElement("button");o.type="button",o.className="highlight-color-swatch",o.dataset.color=n,o.title=n,o.setAttribute("aria-label",n),o.setAttribute("aria-pressed",String(n===this.#i)),o.style.setProperty("--_swatch",`var(--highlight-${n})`),s.appendChild(o)}this.appendChild(s),this.#a=s,i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls",s.id),this.listen(i,"click",n=>{n.stopPropagation(),this.#h(s.hidden)}),this.listen(s,"click",n=>{let o=n.target.closest?.(".highlight-color-swatch");o&&(n.stopPropagation(),this.#o(o.dataset.color??this.#i),this.#h(!1),this.#u(this.#i))}),this.listen(this,"keydown",n=>{let o=n;o.key!=="Escape"||s.hidden||(o.stopPropagation(),this.#h(!1),i.focus())}),this.listen(document,"pointerdown",n=>{!s.hidden&&!this.contains(n.target)&&this.#h(!1)}),this.listen(this.#s,"selection-menu:dismiss",()=>this.#h(!1))}#h(t){!this.#a||!this.#r||(this.#a.hidden=!t,this.#r.setAttribute("aria-expanded",String(t)),t&&(this.#l(),(this.#a.querySelector('[aria-pressed="true"]')??this.#a.firstElementChild)?.focus({preventScroll:!0})))}#l(){let t=this.#a;if(!t)return;t.style.removeProperty("--_hn-shift");let{left:e,right:i}=t.getBoundingClientRect(),s=8,n=e<s?s-e:i>window.innerWidth-s?window.innerWidth-s-i:0;n&&t.style.setProperty("--_hn-shift",`${n}px`)}#o(t){this.#i=t,this.#a?.querySelectorAll(".highlight-color-swatch").forEach(e=>e.setAttribute("aria-pressed",String(e.dataset.color===t)))}#u(t){let e=this.#s,i=e?.getSelection?.();if(!i?.target)return;let s=this.#d(i.target);if(!s)return;let n=window.getSelection();n&&(n.isCollapsed||!n.rangeCount)&&i.range&&(n.removeAllRanges(),n.addRange(i.range)),s._createFromSelection(t),this.#e=i.target,e.dismiss?.()}#p(){let t=this.#s;if(!t)return[];let e=new Set,i=t.getAttribute("for"),s=i&&document.getElementById(i);return s&&e.add(s),t.id&&document.querySelectorAll(`[data-selection-menu="${CSS.escape(t.id)}"]`).forEach(n=>e.add(n)),[...e]}#d(t){t.hasAttribute("data-highlights-init")||(t.setAttribute("data-highlights",this.getAttribute("storage-key")||""),this.hasAttribute("colors")&&t.setAttribute("data-highlights-colors",this.getAttribute("colors")??""));for(let i of sl){let s=this.getAttribute(`data-label-${i}`);s&&t.setAttribute(`data-highlights-label-${i}`,s)}let e=H(t);return this.hasAttribute("readonly")&&!t.hasAttribute("data-highlights-readonly")&&(t.setAttribute("data-highlights-readonly",""),e.destroy(),e=H(t)),e}#f(){let t=this.#k();t&&(this.#t=this.#d(t))}#k(){let t=this.getAttribute("for");return t?document.getElementById(t):this.firstElementChild}#w(){let t=this.getAttribute("colors"),e=t?t.split(",").map(i=>i.trim()).filter(i=>il.test(i)):[];return e.length?[...new Set(e)]:[...el]}#m(){if(this.#t&&!this.#t.destroyed)return this.#t;let t=this.#e?.isConnected?this.#e:this.#p()[0];return t?this.#d(t):null}highlightSelection(t=this.#i){this.hasAttribute("readonly")||!this.#w().includes(t)||(this.#o(t),this.#s?this.#u(t):this.#t?._createFromSelection(t))}getHighlights(){return this.#m()?.getHighlights()??[]}removeHighlight(t){this.#m()?.removeHighlight(t)}clearAll(){this.#m()?.clearAll()}exportHighlights(){return this.#m()?.exportHighlights()??'{"version":1,"highlights":[]}'}importHighlights(t){return this.#m()?.importHighlights(t)??{imported:0,rejected:0}}};g("highlight-wc",xi);var Zt=CSS.supports("anchor-name","--x"),nl=CSS.supports("position-area","bottom"),ol=(()=>{let r=document.createElement("span");return r.setAttribute("popover","hint"),r.popover==="hint"})(),al=["auto","manual","hint"];function ll(r){let t=al.includes(r||"")?r:"auto";return t==="hint"&&!ol?"auto":t}var cl=["top","bottom","left","right","inset-inline-start","inset-inline-end"],hl=["position","top","left","right","bottom","margin"],wr=8,ul=0,dl=0;function kr(r){return!r||r==="none"?[]:r.split(",").map(t=>t.trim()).filter(Boolean)}var Ei=class extends b{static get observedAttributes(){return["data-mode","data-anchor","data-position"]}#t=null;#e=null;#i=`--pop-over-anchor-${++dl}`;#s=!1;#r=!1;#n=!1;setup(){if(this.id||(this.id=`pop-over-${++ul}`),(!this.hasAttribute("popover")||this.#s)&&this.#a(),this.#c(),this.#h(),this.listen(this,"beforetoggle",t=>{let e=t.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${e}`,{detail:{state:t.newState},bubbles:!0,composed:!0})),!Zt&&t.newState==="open"&&this.#t&&queueMicrotask(()=>{this.matches(":popover-open")&&this.#u()})}),!Zt){let t=()=>{this.matches(":popover-open")&&this.#t&&this.#u()};this.listen(window,"resize",t),this.listen(window,"scroll",t,{capture:!0,passive:!0})}}teardown(){this.#l(),this.#r&&(cl.forEach(t=>this.style.removeProperty(t)),this.#r=!1),this.#n&&(hl.forEach(t=>this.style.removeProperty(t)),this.#n=!1),this.#t=null}attributeChangedCallback(t,e,i){if(e!==i){if(!this.hasAttribute("data-upgraded")){t==="data-mode"&&this.hasAttribute("popover")&&!this.isConnected&&(this.#s=!0);return}if(t==="data-mode"){this.#a();return}this._reinit()}}#a(){let t=ll(this.dataset.mode);this.getAttribute("popover")!==t&&this.setAttribute("popover",t),this.#s=!0}show(){this.matches(":popover-open")||(this.showPopover(),!Zt&&this.#t&&this.matches(":popover-open")&&this.#u())}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#c(){let t=this.dataset.anchor;if(t){let e=document.getElementById(t);if(!e)try{e=document.querySelector(t)}catch{e=null}this.#t=e}else this.#t=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#h(){if(!this.#t||!Zt)return;let t=this.#t,e=t.style.getPropertyValue("anchor-name"),i=kr(e||getComputedStyle(t).getPropertyValue("anchor-name"));i.includes(this.#i)||i.push(this.#i),t.style.setProperty("anchor-name",i.join(", ")),this.#e=this.#i,this.style.setProperty("position-anchor",this.#i),this.setAttribute("data-anchor-name",this.#i),nl||this.#o(this.dataset.position||"bottom")}#l(){if(this.#t&&this.#e){let t=kr(this.#t.style.getPropertyValue("anchor-name")).filter(e=>e!==this.#e);t.length?this.#t.style.setProperty("anchor-name",t.join(", ")):this.#t.style.removeProperty("anchor-name")}this.#e=null,this.style.getPropertyValue("position-anchor")&&this.style.removeProperty("position-anchor"),this.hasAttribute("data-anchor-name")&&this.removeAttribute("data-anchor-name")}#o(t){let e="var(--_pop-over-offset, var(--size-xs))",i=t.endsWith("-end")?{"inset-inline-end":"anchor(end)"}:{"inset-inline-start":"anchor(start)"},s={top:{bottom:`calc(anchor(top) + ${e})`,...i},bottom:{top:`calc(anchor(bottom) + ${e})`,...i},left:{right:`calc(anchor(left) + ${e})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${e})`,top:"anchor(top)"}},n=t.split("-")[0],o=s[n]||s.bottom;Object.entries(o).forEach(([a,l])=>this.style.setProperty(a,l)),this.#r=!0}#u(){if(!this.#t)return;let t=this.#t.getBoundingClientRect(),e=this.dataset.position||"bottom",i=this.#p(),s=document.documentElement.clientWidth,n=document.documentElement.clientHeight;this.style.position="fixed",this.style.margin="0",this.style.right="auto",this.style.bottom="auto",this.#n=!0;let o=this.offsetWidth,a=this.offsetHeight,l=e.split("-")[0];["top","bottom","left","right"].includes(l)||(l="bottom");let c={top:t.top-i,bottom:n-t.bottom-i,left:t.left-i,right:s-t.right-i},h={top:"bottom",bottom:"top",left:"right",right:"left"},u=l==="top"||l==="bottom"?a:o;c[l]<u&&c[h[l]]>c[l]&&(l=h[l]);let p,d;switch(l){case"top":p=t.top-a-i,d=t.left;break;case"left":p=t.top,d=t.left-o-i;break;case"right":p=t.top,d=t.right+i;break;default:p=t.bottom+i,d=t.left;break}if(l==="top"||l==="bottom"){let m=getComputedStyle(this).direction==="rtl";d=e.endsWith("-end")!==m?t.right-o:t.left}else e.endsWith("-end")&&(p=t.bottom-a);let f=(m,y,w)=>Math.max(wr,Math.min(m,w-y-wr));d=f(d,o,s),p=f(p,a,n),this.style.top=`${Math.round(p)}px`,this.style.left=`${Math.round(d)}px`}#p(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset||""]??t.xs}};g("pop-over",Ei);var Ar=8,Qt=8,pl=300,fl="Text selection actions",xr="F10",ml='button:not([disabled]), a[href], [role="button"]:not([aria-disabled="true"])',gl='[role="group"], [role="menu"], [role="listbox"], [role="radiogroup"], dialog, [popover]:not([data-selection-menu-host])',bl=0,Si=class extends b{#t=null;#e=new Set;#i=!1;#s;#r=null;#n=null;#a=null;#c=0;#h=!1;#l="mouse";#o="pointer";#u=!1;#p=new Set;setup(){let t=this.querySelector(":scope > pop-over[data-selection-menu-host]");if(t)this.#s=t;else{this.#s=document.createElement("pop-over"),this.#s.setAttribute("data-selection-menu-host",""),this.#s.dataset.mode="manual",this.#s.id=`selection-menu-${++bl}`;let e=[...this.children];for(let i of e)i!==this.#s&&this.#s.appendChild(i);this.appendChild(this.#s)}this.#s.setAttribute("role","toolbar"),this.#s.setAttribute("aria-orientation","horizontal"),this.#s.setAttribute("aria-label",this.dataset.label||fl),this.#s.setAttribute("aria-keyshortcuts",`Alt+${xr}`),this.hidden=!1,this.#d(),this.listen(document,"pointerup",this.#f),this.listen(document,"pointerdown",this.#T),this.listen(document,"keydown",this.#A),this.listen(document,"keyup",this.#k),this.listen(document,"selectionchange",this.#w),this.listen(window,"scroll",this.#g,{capture:!0,passive:!0}),this.listen(window,"resize",this.#g),this.listen(this.#s,"keydown",this.#L),this.id&&(this.#r=new MutationObserver(()=>this.#d()),this.#r.observe(document.body,{childList:!0,subtree:!0,attributeFilter:["data-selection-menu"]}))}teardown(){this.#r?.disconnect(),this.#r=null,this.#a&&clearTimeout(this.#a),this.#a=null,cancelAnimationFrame(this.#c),this.#n?.getAttribute("data-selection-menu")===this.id&&this.#n.removeAttribute("data-selection-menu"),this.#n=null;for(let t of this.#p)t.removeAttribute("tabindex");this.#p.clear(),this.#i=!1,this.#t=null,this.#h=!1}getSelection(){return this.#t?{...this.#t}:null}dismiss(){this.#i&&this.#b({restoreFocus:!0})}get actions(){return[...(this.#s||this).children].map(e=>({tag:e.tagName.toLowerCase(),attrs:Object.fromEntries([...e.attributes].map(i=>[i.name,i.value])),html:e.innerHTML||void 0}))}set actions(t){let e=Array.isArray(t)?t:[],i=this.#s||this;for(;i.firstChild;)i.firstChild.remove();this.#p.clear();for(let s of e){if(s instanceof Element){i.appendChild(s);continue}if(!s?.tag)continue;let n=document.createElement(s.tag);if(s.attrs)for(let[o,a]of Object.entries(s.attrs))a==null||a===!1||n.setAttribute(o,a===!0?"":String(a));s.html&&(n.innerHTML=s.html),i.appendChild(n)}this.dispatchEvent(new CustomEvent("selection-menu:actions-changed",{detail:{actions:this.actions,source:"property"},bubbles:!0}))}#d(){this.#e.clear();let t=this.getAttribute("for");if(t){let e=document.getElementById(t);e&&(this.#e.add(e),this.id&&!e.hasAttribute("data-selection-menu")&&(e.setAttribute("data-selection-menu",this.id),this.#n=e))}this.id&&document.querySelectorAll(`[data-selection-menu="${CSS.escape(this.id)}"]`).forEach(e=>{this.#e.add(e)})}#f=t=>{this.#h=!1,this.#l=t.pointerType||"mouse",requestAnimationFrame(()=>{this.isConnected&&this.#m()})};#k=t=>{!t.shiftKey&&t.key!=="Shift"||this.#s?.contains(document.activeElement)||(this.#l="keyboard",this.#m())};#w=()=>{this.#h||this.#u||(this.#a&&clearTimeout(this.#a),this.#a=setTimeout(()=>{if(this.#a=null,!this.isConnected||this.#h||this.#u||this.#s?.contains(document.activeElement))return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim()){this.#i&&this.#o==="keyboard"&&this.#b({restoreFocus:!1});return}this.#o==="keyboard"&&(this.#l="keyboard"),this.#m()},pl))};#m(){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed||!t.toString().trim())return!1;let e=t.getRangeAt(0),i=e.commonAncestorContainer,s=i.nodeType===Node.ELEMENT_NODE?i:i.parentElement,n=null;for(let c of this.#e)if(c.contains(s)){n=c;break}if(!n)return!1;let o=t.toString().trim(),a=this.#t,l=this.#i&&a&&a.target===n&&a.text===o&&a.range.compareBoundaryPoints(Range.START_TO_START,e)===0&&a.range.compareBoundaryPoints(Range.END_TO_END,e)===0;return this.#t={range:e.cloneRange(),text:o,target:n},l||this.dispatchEvent(new CustomEvent("selection-menu:select",{detail:{range:this.#t.range,text:o,target:n},bubbles:!0})),this.#v(),!0}#v(){this.#s&&(this.#s.show(),this.#i=!0,this.#S(),cancelAnimationFrame(this.#c),this.#c=requestAnimationFrame(()=>this.#y()))}#y(){if(!this.#i||!this.#t||!this.#s)return;let t=this.#t.range.getBoundingClientRect();if(t.bottom<0||t.top>window.innerHeight||t.width===0&&t.height===0){this.#b({restoreFocus:!0});return}let i=this.#s.getBoundingClientRect(),s=i.width||200,n=i.height||40,o=t.top-n-Ar,a=t.bottom+Ar,l;this.#l==="touch"?l=a+n+Qt<=window.innerHeight?a:o:l=o<Qt?a:o;let c=t.left+t.width/2-s/2,h=window.innerWidth-s-Qt;c=Math.max(Qt,Math.min(c,h)),this.#s.style.top=`${l}px`,this.#s.style.left=`${c}px`}#g=()=>{this.#i&&(cancelAnimationFrame(this.#c),this.#c=requestAnimationFrame(()=>this.#y()))};#b({restoreFocus:t=!1,restoreRange:e=!1}={}){let i=this.#t,s=!!this.#s?.contains(document.activeElement);if(this.#s&&this.#s.hide(),this.#i=!1,this.#t=null,cancelAnimationFrame(this.#c),this.#u=!0,this.dispatchEvent(new CustomEvent("selection-menu:dismiss",{bubbles:!0})),t&&s&&i?.target?.isConnected){let n=i.target;if(n.hasAttribute("tabindex")||(n.setAttribute("tabindex","-1"),n.addEventListener("blur",()=>{n.getAttribute("tabindex")==="-1"&&n.removeAttribute("tabindex")},{once:!0})),n.focus({preventScroll:!0}),e){let o=window.getSelection();o&&(o.removeAllRanges(),o.addRange(i.range))}}}#T=t=>{if(this.#h=!0,this.#o="pointer",this.#u=!1,!this.#i)return;let e=t.target;this.#s?.contains(e)||this.contains(e)||this.#b()};#A=t=>{if(["Shift","Alt","Control","Meta"].includes(t.key)||(this.#u=!1),this.#o="keyboard",!t.defaultPrevented){if(t.key==="Escape"&&this.#i){t.preventDefault(),this.#b({restoreFocus:!0,restoreRange:!0});return}if(t.key===xr&&t.altKey&&!t.ctrlKey&&!t.metaKey){if(!this.#i&&(this.#l="keyboard",!this.#m()))return;t.preventDefault(),this.#E(0)}}};#x(){return this.#s?[...this.#s.querySelectorAll(ml)].filter(t=>{let e=t.closest(gl);if(e&&this.#s.contains(e))return!1;let i=t.closest("[hidden]");return!(i&&this.#s.contains(i))}):[]}#S(){let t=this.#x(),e=t.find(i=>i===document.activeElement)??t.find(i=>i.getAttribute("tabindex")==="0")??t[0];for(let i of t)i.setAttribute("tabindex",i===e?"0":"-1"),this.#p.add(i)}#E(t){this.#S();let e=this.#x();if(!e.length)return;let i=(t%e.length+e.length)%e.length;for(let s of e)s.setAttribute("tabindex",s===e[i]?"0":"-1");e[i].focus()}#L=t=>{let e=t.target;if(e.matches('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let i=this.#x(),s=i.indexOf(e);if(s===-1)return;let n=getComputedStyle(this.#s).direction==="rtl",o=n?"ArrowLeft":"ArrowRight",a=n?"ArrowRight":"ArrowLeft",l=-1;if(t.key===o)l=s+1;else if(t.key===a)l=s-1;else if(t.key==="Home")l=0;else if(t.key==="End")l=i.length-1;else return;t.preventDefault(),this.#E(l)}};g("selection-menu",Si);var vl={add:"Add private note",view:"View notes",dialog:"Private note",heading:"Private note",placeholder:"Add a note\u2026",textarea:"Note for highlighted text",save:"Save",cancel:"Cancel"},Er=!1,Ci=new Set;function Sr(r,t,e){if(!r.contains(t))return-1;let i=document.createRange();return i.setStart(r,0),i.setEnd(t,e),i.toString().length}var Ti=class extends b{#t=!1;#e=null;#i=null;#s=null;#r=null;#n=null;setup(){this.#t=!!this.closest("selection-menu");let t=this.hasAttribute("for");Ci.add(this),Er||(Er=!0,document.addEventListener("highlights:request-note",yl));let e=this.querySelector(":scope > button[data-note-action]");if(!this.#t&&!t){e?.remove();return}if(!e){e=document.createElement("button"),e.type="button",e.setAttribute("data-note-action","");let i=document.createElement("icon-wc");i.setAttribute("name","sticky-note"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),e.appendChild(i),this.appendChild(e)}e.setAttribute("aria-label",this.#a(this.#t?"add":"view")),this.listen(e,"click",this.#t?()=>this.#c():()=>this.#h())}teardown(){Ci.delete(this),this.#d({restoreFocus:!1})}#a(t){return this.getAttribute(`data-label-${t}`)??vl[t]??t}openFor(t,e,i){this.#l(t,e,i??document.activeElement)}#c(){let t=this.closest("selection-menu");if(!t)return;let e=t.getSelection();if(!e)return;let i=e.target,s=document.activeElement;i.hasAttribute("data-highlights-init")||i.setAttribute("data-highlights","");let n=H(i),o=e.range,a=Sr(i,o.startContainer,o.startOffset),l=Sr(i,o.endContainer,o.endOffset),c=null;if(a>=0&&l>a&&(c=n.getHighlights().find(h=>h.startOffset<=a&&h.endOffset>=l)??null),!c){let h=window.getSelection();h&&(h.isCollapsed||h.rangeCount===0)&&(h.removeAllRanges(),h.addRange(o)),n._createFromSelection("yellow");let u=n.getHighlights();c=u.find(p=>p.startOffset===a&&p.endOffset===l)??u[u.length-1]??null}t.dismiss(),c&&this.#l(c,n,s)}#h(){let t=this.getAttribute("for"),e=t?document.getElementById(t):null;if(!e)return;e.hasAttribute("data-highlights-init")||e.setAttribute("data-highlights","");let i=H(e),s=i.getHighlights(),n=s.find(o=>o.note)??s[0];n&&this.#l(n,i,document.activeElement)}#l(t,e,i){this.#d({restoreFocus:!1});let s=e.element;this.#i=i&&i!==document.body?i:null,this.#s=t,this.#r=e;let n=document.createElement("div");n.className="hn-note-panel",n.setAttribute("role","dialog"),n.setAttribute("aria-label",this.#a("dialog"));let o=document.createElement("header");o.className="hn-note-header";let a=document.createElement("small");a.textContent=this.#a("heading"),o.appendChild(a),n.appendChild(o);let l=document.createElement("blockquote");l.className="hn-note-quote",l.textContent=t.text.length>80?t.text.slice(0,80)+"\u2026":t.text,n.appendChild(l);let c=document.createElement("textarea");c.className="hn-note-textarea",c.placeholder=this.#a("placeholder"),c.value=t.note||"",c.rows=3,c.setAttribute("aria-label",this.#a("textarea")),n.appendChild(c);let h=document.createElement("footer");h.className="hn-note-actions";let u=()=>{e._updateNote(t.id,c.value.trim()),this.#d()},p=document.createElement("button");p.type="button",p.className="hn-action hn-action-save",p.textContent=this.#a("save"),p.addEventListener("click",u);let d=document.createElement("button");if(d.type="button",d.className="hn-action",d.textContent=this.#a("cancel"),d.addEventListener("click",()=>this.#d()),h.append(p,d),n.appendChild(h),n.addEventListener("keydown",f=>{f.key==="Escape"?(f.preventDefault(),f.stopPropagation(),this.#d()):f.key==="Enter"&&(f.metaKey||f.ctrlKey)&&f.target===c&&(f.preventDefault(),u())}),getComputedStyle(s).position==="static"&&(s.setAttribute("data-note-host",""),this.#n=s),s.appendChild(n),typeof e.findHighlightRect=="function"){let f=e.findHighlightRect(t.id);if(f){let m=s.getBoundingClientRect();n.style.top=`${f.top-m.top}px`}}this.#e=n,requestAnimationFrame(()=>{this.#e===n&&(c.focus(),document.addEventListener("pointerdown",this.#o))})}#o=t=>{if(!this.#e||this.#e.contains(t.target))return;this.#d({restoreFocus:!1});let e=this.#u;document.addEventListener("pointerup",()=>{setTimeout(()=>{let i=document.activeElement;(!i||i===document.body)&&e?.()})},{once:!0,capture:!0})};#u=null;#p(){let t=this.#i,e=this.#r?.element,i=this.#s?.id;return()=>{if(t?.isConnected&&(typeof t.checkVisibility!="function"||t.checkVisibility())&&(t.focus({preventScroll:!0}),document.activeElement===t)||!e?.isConnected)return;let n=(i?e.querySelector(`mark[data-hn-id="${CSS.escape(i)}"]`):null)??e;n.tabIndex<0&&!n.hasAttribute("tabindex")&&(n.setAttribute("tabindex","-1"),n.addEventListener("blur",()=>n.removeAttribute("tabindex"),{once:!0})),n.focus({preventScroll:!0})}}#d({restoreFocus:t=!0}={}){if(!this.#e)return;let e=this.#p();document.removeEventListener("pointerdown",this.#o),this.#e.remove(),this.#e=null,this.#n?.removeAttribute("data-note-host"),this.#n=null,this.#u=e,this.#i=null,this.#s=null,this.#r=null,t&&e()}};function yl(r){let{highlight:t,controller:e}=r.detail||{};if(!t||!e)return;let i=Ci.values().next().value;i&&i.openFor(t,e)}g("note-wc",Ti);var wl=0,Li=class extends b{#t=null;#e=null;setup(){if(this.#t=this.querySelector(":scope > button"),this.#e=this.querySelector(":scope > .comment-wc-reason"),!this.#t){let e=document.createElement("button");e.type="button";let i=document.createElement("icon-wc");i.setAttribute("name","message-circle"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),e.appendChild(i);let s=document.createElement("span");s.className="comment-wc-reason visually-hidden",s.id=`comment-wc-reason-${++wl}`,s.textContent="Comments are unavailable: this content has no review surface.",this.append(e,s),this.#t=e,this.#e=s}this.#s(),this.listen(this,"click",this.#r);let t=this.closest("selection-menu");t&&this.listen(t,"toggle",()=>this.#s())}#i(){let t=this.closest("review-surface");if(t)return t;let e=this.closest("selection-menu")?.getAttribute("for");return e?document.querySelector(`review-surface[for="${CSS.escape(e)}"]`):null}#s(){let t=this.#t;if(!t)return;!!this.#i()?(t.removeAttribute("aria-disabled"),t.removeAttribute("aria-describedby"),t.setAttribute("aria-label","Add comment")):(t.setAttribute("aria-disabled","true"),t.setAttribute("aria-label","Add comment"),this.#e&&t.setAttribute("aria-describedby",this.#e.id))}#r=t=>{if(!this.#t?.contains(t.target))return;this.#s();let e=this.#i();if(!e)return;let i=this.closest("selection-menu");if(!i)return;let s=i.getSelection();if(!s)return;let n=s.range.getBoundingClientRect(),o=e.getBoundingClientRect(),a=(n.left+n.width/2-o.left)/o.width*100,l=(n.top-o.top)/o.height*100;typeof e.addPin=="function"&&e.addPin({x:a,y:l,text:s.text}),this.dispatchEvent(new CustomEvent("comment-wc:created",{detail:{text:s.text,x:a,y:l},bubbles:!0})),i.dismiss()}};g("comment-wc",Li);var Mi='track[kind="chapters"][data-chapter-list]';function Cr(r=document){r.querySelectorAll(Mi).forEach(t=>Ri(t))}function Ri(r){if(r.hasAttribute("data-chapter-list-init"))return;r.setAttribute("data-chapter-list-init","");let t=r.parentElement;if(!t||t.tagName!=="VIDEO")return;let e=r.track;e.mode==="disabled"&&(e.mode="hidden"),r.readyState>=2?Tr(t,e,r):r.addEventListener("load",()=>Tr(t,e,r),{once:!0})}function Tr(r,t,e){let i=t.cues;if(!i||i.length===0)return;let s=document.createElement("nav");s.setAttribute("aria-label",e.getAttribute("data-label")||"Video chapters"),s.classList.add("chapter-list");let n=document.createElement("ol");for(let a of i){let l=document.createElement("li"),c=document.createElement("button");c.type="button";let h=document.createElement("span");h.textContent=a.text;let u=document.createElement("time");u.textContent=kl(a.startTime),u.setAttribute("datetime",Al(a.startTime)),c.appendChild(h),c.appendChild(u),c.addEventListener("click",()=>{r.currentTime=a.startTime,r.paused&&r.play()?.catch(()=>{})}),l.appendChild(c),n.appendChild(l)}s.appendChild(n),r.insertAdjacentElement("afterend",s);let o=null;r.addEventListener("timeupdate",()=>{let a=r.currentTime,l=-1;for(let h=0;h<i.length;h++)if(a>=i[h].startTime&&a<i[h].endTime){l=h;break}let c=l>=0?n.children[l]:null;c!==o&&(o&&(o.removeAttribute("data-active"),o.querySelector("button")?.removeAttribute("aria-current")),o=c,o&&(o.setAttribute("data-active",""),o.querySelector("button")?.setAttribute("aria-current","true")))})}function kl(r){let t=Math.floor(r/3600),e=Math.floor(r%3600/60),i=Math.floor(r%60);return t>0?`${t}:${String(e).padStart(2,"0")}:${String(i).padStart(2,"0")}`:`${e}:${String(i).padStart(2,"0")}`}function Al(r){let t=Math.floor(r/3600),e=Math.floor(r%3600/60),i=Math.floor(r%60);return`PT${t?t+"H":""}${e?e+"M":""}${i}S`}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Cr()):Cr();var xl=new MutationObserver(r=>{for(let t of r)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches?.(Mi)&&Ri(i),i.querySelectorAll?.(Mi).forEach(s=>Ri(s))}});xl.observe(document.documentElement,{childList:!0,subtree:!0});var ht="[data-command], [commandfor]",El="Page Actions",B=new Map;function te(r){if(B.has(r)||r.hasAttribute("data-command-init"))return;r.setAttribute("data-command-init","");let t=r.getAttribute("data-command")||r.textContent.trim();if(!t)return;let e=r.getAttribute("data-command-group")||El,i=r.getAttribute("data-command-icon")||null,s=r.getAttribute("data-shortcut")||null,n=null;s&&(n=G(s,()=>r.click()));let o={element:r,label:t,group:e,icon:i,shortcut:s,unbind:n};B.set(r,o),document.dispatchEvent(new CustomEvent("vb:command-registry-change",{detail:{action:"add",entry:o}}))}function _i(r){let t=B.get(r);t&&(t.unbind?.(),B.delete(r),r.removeAttribute("data-command-init"),document.dispatchEvent(new CustomEvent("vb:command-registry-change",{detail:{action:"remove",element:r}})))}function Sl(){let r=new Map;for(let t of B.values()){if(t.element.hidden||t.element.closest("[hidden]"))continue;let e=r.get(t.group)||[];e.push(t),r.set(t.group,e)}return r}function Lr(r=document){r.querySelectorAll(ht).forEach(te)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Lr()):Lr();var Cl=new MutationObserver(r=>{for(let t of r){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(ht)&&te(i),i.querySelectorAll(ht).forEach(te)}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;B.has(i)&&_i(i),i.querySelectorAll(ht).forEach(s=>{B.has(s)&&_i(s)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let e=t.target;e.matches(ht)&&!B.has(e)?te(e):!e.matches(ht)&&B.has(e)&&_i(e)}}});Cl.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-command","commandfor"]});function Tl(){let r='footer, aside, dialog, [hidden], [aria-hidden="true"]',e=[];return document.querySelectorAll("nav a[href]").forEach(i=>{if(i.closest(r)||B.has(i))return;let s=i.textContent.trim();!s||e.length>=50||e.push({element:i,label:s,group:"Navigation",icon:null,shortcut:null,auto:!0,action:null})}),document.querySelectorAll("h2[id], h3[id]").forEach(i=>{if(i.closest(r)||B.has(i))return;let s=i.textContent.trim();!s||e.length>=50||e.push({element:i,label:`Jump to: ${s}`,group:"On This Page",icon:null,shortcut:null,auto:!0,action:()=>i.scrollIntoView({behavior:"smooth"})})}),e}window.__commandRegistry={getRegisteredCommands:Sl,scanAutoDiscoverable:Tl};var Ll=window.matchMedia("(prefers-reduced-motion: reduce)");function Ml(){return Ll.matches||document.documentElement.hasAttribute("data-motion-reduced")}var Mr=0,Rl=new Map([["vb-fade-in","entrance"],["vb-slide-up","entrance"],["vb-pop","entrance"],["vb-slide-in-ltr","entrance"],["vb-slide-in-rtl","entrance"],["vb-fade-slide-up","entrance"],["vb-shadow-lift","entrance"],["vb-fade-out","exit"],["vb-collapse","exit"],["vb-slide-out-ltr","exit"],["vb-slide-out-rtl","exit"],["vb-shake","attention"],["vb-pulse","attention"],["vb-bounce","attention"],["vb-blink","attention"],["vb-neon-pulse","decoration"],["vb-3d-shift","decoration"],["vb-outline-glow-pulse","decoration"],["vb-rainbow","decoration"],["vb-gradient-flow","decoration"],["vb-shimmer","decoration"],["vb-shimmer-gradient","decoration"],["vb-glow","decoration"],["vb-float","decoration"]]),Rr="__vbEffectsRuntime",_r=globalThis,v=_r[Rr]??{_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_wiredTriggers:new WeakMap,_transitionCleanups:new WeakMap,_transitionFallback:new WeakSet,_processed:new WeakSet,_transitionProcessed:new WeakSet,_staggerTime:new WeakSet,_unresolved:new Set,_warnedTriggers:new Set,_unresolvedTimer:null,_keyframePhase:Rl,_observer:null,_animationEndHandler:null,_autoBooted:!1,effect(r,t){this._effects.set(r,t),document.querySelectorAll("[data-effect]").forEach(e=>{if(!(e.getAttribute("data-effect")||"").split(/\s+/).includes(r))return;let s=!this._instances.get(e)?.has(r);this._initEffect(e,r),s&&e.hasAttribute("data-effect-active")&&this._instances.get(e)?.get(r)?.activate?.()})},trigger(r,t){this._triggers.set(r,t),document.querySelectorAll("[data-effect][data-trigger]").forEach(e=>{if(!this._processed.has(e))return;let i=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(e,i)})},transition(r,t){this._transitions.set(r,t),document.querySelectorAll("[data-transition]").forEach(e=>{if(!this._transitionProcessed.has(e)||!this._transitionFallback.has(e))return;let i=e.getAttribute("data-transition")||"",s=i.indexOf(":");if((s>-1?i.slice(0,s):i)!==r)return;this._transitionFallback.delete(e);let n=e;n.style.viewTransitionName="";let o=t(e,s>-1?i.slice(s+1):null);o&&this._transitionCleanups.set(e,o)})},uid(r){return r.id?r.id:(r._vbUid||(Mr++,r._vbUid=`vb-${Mr}`),r._vbUid)},theme(r,t){this._themes=this._themes||new Map,this._themes.set(r,t)},applyTheme(r,t=document.documentElement){let e=this._themes?.get(r);if(e)for(let[i,s]of Object.entries(e))t.style.setProperty(i,s)},swap(r){if(!document.startViewTransition){r(),queueMicrotask(()=>this._dispatchVtDone(document.body));return}let t=document.startViewTransition(r);return t.updateCallbackDone.then(()=>{this._dispatchVtDone(document.body)}).catch(()=>{}),t},_dispatchVtDone(r){r.querySelectorAll('[data-trigger~="vt"]').forEach(t=>{this.emit(t,"vb:vt-update-done",{})})},activate(r){this._activateEffects(r)},deactivate(r){r.hasAttribute("data-effect-active")&&(r.removeAttribute("data-effect-active"),this.emit(r,"vb:phase-change",{active:!1}))},onPhaseEnd(r,t,e){let i=s=>{s.detail?.phase===t&&e(s.detail)};return r.addEventListener("vb:effect-phase-end",i),()=>r.removeEventListener("vb:effect-phase-end",i)},registerKeyframe(r,t){this._keyframePhase.set(r,t)},observe(r=document){if(r.querySelectorAll("[data-effect]").forEach(e=>this._processElement(e)),r.querySelectorAll("[data-stagger]").forEach(e=>this._processStagger(e)),r.querySelectorAll("[data-transition]").forEach(e=>this._processTransition(e)),this._observer)return;this._observer=new MutationObserver(e=>{let i=new Set;for(let s of e){if(s.type==="childList"){let n=s.target;n.hasAttribute?.("data-stagger")&&i.add(n);for(let o of s.addedNodes)o.nodeType===Node.ELEMENT_NODE&&this._processTree(o);for(let o of s.removedNodes)o.nodeType===Node.ELEMENT_NODE&&(o.isConnected||this._cleanupTree(o))}if(s.type==="attributes"){let n=s.target;s.attributeName==="data-effect"&&this._reconcileEffects(n),s.attributeName==="data-trigger"&&this._reconcileTrigger(n),s.attributeName==="data-stagger"&&(n.hasAttribute("data-stagger")?i.add(n):this._cleanupStagger(n)),s.attributeName==="data-transition"&&this._reconcileTransition(n)}}for(let s of i)s.isConnected&&this._processStagger(s)});let t=r===document?document.body:r;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]}),this._animationEndHandler||(this._animationEndHandler=e=>{let i=e.target;if(!(i instanceof Element)||!i.hasAttribute("data-effect"))return;let s=this._keyframePhase.get(e.animationName);s&&this.emit(i,"vb:effect-phase-end",{phase:s,animationName:e.animationName})},document.addEventListener("animationend",this._animationEndHandler))},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null),this._animationEndHandler&&(document.removeEventListener("animationend",this._animationEndHandler),this._animationEndHandler=null)},params(r){let t=getComputedStyle(r);return{get(e){return t.getPropertyValue(`--vb-${e}`).trim()},getNumber(e,i=0){let s=t.getPropertyValue(`--vb-${e}`).trim();return s?parseFloat(s):i},getTime(e,i=0){let s=t.getPropertyValue(`--vb-${e}`).trim();if(!s)return i;let n=parseFloat(s);return Number.isFinite(n)?/s\s*$/.test(s)&&!/ms\s*$/.test(s)?n*1e3:n:i},hasClass(e){return r.classList.contains(e)}}},emit(r,t,e={}){r.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))},prefersReducedMotion:Ml,_processTree(r){r.hasAttribute?.("data-effect")&&this._processElement(r),r.hasAttribute?.("data-stagger")&&this._processStagger(r),r.hasAttribute?.("data-transition")&&this._processTransition(r),r.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),r.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),r.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(r){r.hasAttribute?.("data-effect")&&this._cleanupElement(r),r.hasAttribute?.("data-transition")&&this._cleanupTransition(r),r.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),r.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(r){if(this._processed.has(r))return;this._processed.add(r),r.removeAttribute("data-effect-processed"),r.removeAttribute("data-effect-armed");let t=r.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let e of t)this._initEffect(r,e);this._wireTrigger(r,t)},_initEffect(r,t){let e=this._effects.get(t);if(!e)return;let i=this._instances.get(r);if(i?.has(t))return;let s=e(r);s&&(i||(i=new Map,this._instances.set(r,i)),typeof s=="function"?i.set(t,{cleanup:s}):i.set(t,s))},_parseTrigger(r){let t=r.indexOf(":");return t>-1?[r.slice(0,t),r.slice(t+1)]:[r,null]},_wireTrigger(r,t){let e=r.getAttribute("data-trigger");if(!e||!e.trim()){r.removeAttribute("data-effect-armed"),this._activateEffects(r);return}let i=e.split(/\s+/).filter(Boolean);this._wiredTriggers??=new WeakMap;let s=this._wiredTriggers.get(r);s||(s=new Set,this._wiredTriggers.set(r,s));let n=!1;for(let o of i){if(s.has(o))continue;let[a,l]=this._parseTrigger(o),c=this._triggers.get(a);if(!c){n=!0;continue}s.add(o);let h=c(r,()=>this._activateEffects(r),l);if(h){let u=this._triggerCleanups.get(r);if(u){let p=u;this._triggerCleanups.set(r,()=>{p(),h()})}else this._triggerCleanups.set(r,h)}}s.size&&r.setAttribute("data-effect-armed",""),n?(this._unresolved.add(r),this._scheduleUnresolvedCheck()):this._unresolved.delete(r)},_scheduleUnresolvedCheck(){if(this._unresolvedTimer)return;let r=()=>{this._unresolvedTimer=null,this._resolveUnknownTriggers()};typeof window>"u"||typeof window.addEventListener!="function"||(document.readyState==="complete"?this._unresolvedTimer=setTimeout(r,0):(this._unresolvedTimer=!0,window.addEventListener("load",()=>setTimeout(r,0),{once:!0})))},_resolveUnknownTriggers(){for(let r of[...this._unresolved]){if(this._unresolved.delete(r),!r.isConnected||!this._processed.has(r))continue;let e=(r.getAttribute("data-trigger")||"").split(/\s+/).filter(Boolean).filter(i=>!this._triggers.has(this._parseTrigger(i)[0]));if(e.length){for(let i of e){let s=this._parseTrigger(i)[0];this._warnedTriggers.has(s)||(this._warnedTriggers.add(s),console.warn(`[VB] data-trigger="${i}": no trigger named "${s}" is registered. The effect runs immediately instead. Register it with VB.trigger('${s}', \u2026) or check the spelling.`,r))}!r.hasAttribute("data-effect-armed")&&!r.hasAttribute("data-effect-active")&&this._activateEffects(r)}}},_activateEffects(r){r.setAttribute("data-effect-active",""),this.emit(r,"vb:phase-change",{active:!0});let t=this._instances.get(r);if(t)for(let[,e]of t)e.activate&&e.activate()},_cleanupElement(r){let t=this._instances.get(r);if(t){for(let[,i]of t)i.cleanup&&i.cleanup();this._instances.delete(r)}let e=this._triggerCleanups.get(r);e&&(e(),this._triggerCleanups.delete(r)),this._wiredTriggers?.delete(r),this._unresolved.delete(r),r.removeAttribute("data-effect-armed"),this._processed.delete(r)},_reconcileEffects(r){if(!r.hasAttribute("data-effect")){this._cleanupElement(r),r.removeAttribute("data-effect-active");return}let t=r.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],e=this._instances.get(r);if(e)for(let[i,s]of e)t.includes(i)||(s.cleanup&&s.cleanup(),e.delete(i));for(let i of t)e?.has(i)||this._initEffect(r,i);this._processed.has(r)||this._processElement(r)},_reconcileTrigger(r){if(!r.hasAttribute("data-effect"))return;let t=this._triggerCleanups.get(r);if(t&&(t(),this._triggerCleanups.delete(r)),this._wiredTriggers?.delete(r),this._unresolved.delete(r),r.removeAttribute("data-effect-armed"),!this._processed.has(r)){this._processElement(r);return}let e=r.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(r,e)},_parseStagger(r){let t=(r||"").trim().split(/\s+/).filter(Boolean),e=t.find(s=>/^(\d+(\.\d+)?|\.\d+)(ms|s)$/i.test(s))||null;return{mode:t.find(s=>s==="reverse"||s==="random"||s==="grid")||"",time:e}},_processStagger(r){let{mode:t,time:e}=this._parseStagger(r.getAttribute("data-stagger"));e?(r.style.setProperty("--vb-stagger",e),this._staggerTime.add(r)):this._staggerTime.has(r)&&(r.style.removeProperty("--vb-stagger"),this._staggerTime.delete(r));let i=Array.from(r.children),s=i.length,n;if(t==="reverse")n=Array.from({length:s},(o,a)=>s-1-a);else if(t==="random"){let o=this._hashString(this.uid(r));n=Array.from({length:s},(l,c)=>c);let a=o;for(let l=s-1;l>0;l--){a^=a<<13,a^=a>>>17,a^=a<<5;let c=Math.abs(a)%(l+1);[n[l],n[c]]=[n[c],n[l]]}}else t==="grid"?n=this._gridStaggerIndices(r,i):n=Array.from({length:s},(o,a)=>a);for(let o=0;o<s;o++)i[o].style.setProperty("--vb-stagger-index",String(n[o]))},_gridStaggerIndices(r,t){let e=t.length,i=()=>Array.from({length:e},(c,h)=>h);if(!e)return[];let s=t.map(c=>{let h=getComputedStyle(c);return[parseInt(h.gridRowStart,10),parseInt(h.gridColumnStart,10)]});if(s.every(([c,h])=>Number.isFinite(c)&&Number.isFinite(h))){let c=Math.min(...s.map(([u])=>u)),h=Math.min(...s.map(([,u])=>u));return s.map(([u,p])=>u-c+(p-h))}let n=t.map(c=>c.getBoundingClientRect?.());if(!n.every(Boolean)||n.every(c=>c.width===0&&c.height===0))return i();let o=getComputedStyle(r).direction==="rtl",a=this._trackRanks(n.map(c=>[c.top,c.bottom])),l=this._trackRanks(n.map(c=>o?[-c.right,-c.left]:[c.left,c.right]));return a.map((c,h)=>c+l[h])},_trackRanks(r){let t=r.map((n,o)=>o).sort((n,o)=>r[n][0]-r[o][0]),e=new Array(r.length),i=-1,s=-1/0;for(let n of t){let[o,a]=r[n];o>=s-.5?(i++,s=a):s=Math.min(s,a),e[n]=i}return e},_cleanupStagger(r){this._staggerTime.has(r)&&(r.style.removeProperty("--vb-stagger"),this._staggerTime.delete(r));for(let t of Array.from(r.children))t.style?.removeProperty("--vb-stagger-index")},_hashString(r){let t=5381;for(let e=0;e<r.length;e++)t=(t<<5)+t^r.charCodeAt(e);return t|0},_vtIdent(r){let t=String(r).replace(/[^A-Za-z0-9_ -￿-]/g,"-");return(!t||/^(-?\d|--)/.test(t))&&(t=`vb-${t}`),t},_processTransition(r){if(this._transitionProcessed.has(r)||r.matches?.("[data-swap], content-swap"))return;let t=(r.getAttribute("data-transition")||"").trim();if(!t)return;this._transitionProcessed.add(r),r.removeAttribute("data-transition-processed");let[e,i]=this._parseTrigger(t),s=this._transitions.get(e);if(s){let n=s(r,i);n&&this._transitionCleanups.set(r,n)}else r.style.viewTransitionName=this._vtIdent(`${e}-${this.uid(r)}`),this._transitionFallback.add(r)},_cleanupTransition(r){if(!this._transitionProcessed.has(r))return;let t=this._transitionCleanups.get(r);t&&(t(),this._transitionCleanups.delete(r)),this._transitionFallback.has(r)&&(this._transitionFallback.delete(r),r.style.viewTransitionName=""),this._transitionProcessed.delete(r)},_reconcileTransition(r){this._cleanupTransition(r),r.hasAttribute("data-transition")&&this._processTransition(r)}};_r[Rr]=v;if(typeof window<"u"){let r=window.VB;if(r&&r!==v)for(let t of Object.keys(r))t in v||(v[t]=r[t]);window.VB=v}typeof document<"u"&&!v._autoBooted&&(v._autoBooted=!0,document.body?v.observe():document.addEventListener("DOMContentLoaded",()=>v.observe(),{once:!0}));function ee(r,t){v.deactivate(r),r.offsetWidth,t()}function Ni(r,t){if(v.prefersReducedMotion()){t();return}let e=new IntersectionObserver(([i])=>{i.isIntersecting&&(e.disconnect(),t())},{threshold:.1});return e.observe(r),()=>e.disconnect()}function _l(r){let t=(r||"0").trim(),e=parseFloat(t);return!Number.isFinite(e)||e<0?0:/^[\d.]+s$/i.test(t)?e*1e3:e}v.trigger("scroll",(r,t)=>Ni(r,t));v.trigger("hover",(r,t)=>{let e=!1,i=!1;function s(h){let u=e||i;h==="hover"?e=!0:i=!0,u||ee(r,t)}function n(){!e&&!i&&v.deactivate(r)}let o=()=>s("hover"),a=()=>{e=!1,n()},l=()=>s("focus"),c=h=>{h.relatedTarget instanceof Node&&r.contains(h.relatedTarget)||(i=!1,n())};return r.addEventListener("pointerenter",o),r.addEventListener("pointerleave",a),r.addEventListener("focusin",l),r.addEventListener("focusout",c),()=>{r.removeEventListener("pointerenter",o),r.removeEventListener("pointerleave",a),r.removeEventListener("focusin",l),r.removeEventListener("focusout",c)}});v.trigger("click",(r,t,e)=>{function i(){e==="replay"?ee(r,t):r.hasAttribute("data-effect-active")?v.deactivate(r):t()}return r.addEventListener("click",i),()=>r.removeEventListener("click",i)});v.trigger("time",(r,t,e)=>{let i=setTimeout(t,_l(e));return()=>clearTimeout(i)});v.trigger("intersect",(r,t,e)=>{if(v.prefersReducedMotion()){t();return}if((e||"once")==="toggle"){let s=new IntersectionObserver(([n])=>{n.isIntersecting?t():v.deactivate(r)},{threshold:.1});return s.observe(r),()=>s.disconnect()}return Ni(r,t)});v.trigger("media",(r,t,e)=>{if(!e)return;let i=window.matchMedia(e);function s(){i.matches?t():v.deactivate(r)}return i.addEventListener("change",s),s(),()=>i.removeEventListener("change",s)});v.trigger("event",(r,t,e)=>{if(!e)return;let i=()=>ee(r,t);return r.addEventListener(e,i),()=>r.removeEventListener(e,i)});v.trigger("vt",(r,t)=>{let e=()=>ee(r,t);return r.addEventListener("vb:vt-update-done",e),()=>r.removeEventListener("vb:vt-update-done",e)});var Nl=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()");for(let r of["view-progress","scroll-progress"])v.trigger(r,(t,e)=>{if(!(Nl&&!v.prefersReducedMotion()))return Ni(t,e)});var Pl=12;function et(r,t,e){let i=v.uid(t),s=e===void 0?`${r}-${i}`:`${r}-${i}-${e}`;return typeof CSS<"u"&&CSS.escape?CSS.escape(s):s.replace(/[^\w-]/g,"_")}function ut(r,t,e){return r.style.viewTransitionName=t,e&&(r.style.viewTransitionClass=e),()=>{r.style.viewTransitionName="",e&&(r.style.viewTransitionClass="")}}v.transition("morph",r=>ut(r,et("morph",r)));function Il(r,t){let e=(t||"forward").trim().toLowerCase();if(e==="left")return"slide-left";if(e==="right")return"slide-right";let s=!(getComputedStyle(r).direction==="rtl");return(e==="back"?!s:s)?"slide-left":"slide-right"}v.transition("slide",(r,t)=>ut(r,et("slide",r),Il(r,t)));v.transition("fade",r=>ut(r,et("fade",r),"fade"));v.transition("scale",r=>ut(r,et("scale",r),"scale"));v.transition("none",r=>ut(r,et("none",r),"vt-none"));function $l(r){let t=new Set,e=()=>{let s=Array.from(r.children);for(let n of t)n.parentElement!==r&&(n.style.viewTransitionName="",n.style.viewTransitionClass="",t.delete(n));s.forEach((n,o)=>{if(!(n instanceof HTMLElement))return;let a=Math.min(o,Pl-1);n.style.viewTransitionName=et("stagger",r,v.uid(n)),n.style.viewTransitionClass=`fade vt-stagger-${a}`,t.add(n)})};e();let i=new MutationObserver(e);return i.observe(r,{childList:!0}),()=>{i.disconnect();for(let s of t)s.style.viewTransitionName="",s.style.viewTransitionClass="";t.clear()}}v.transition("stagger",r=>$l(r));v.transition("effect",(r,t)=>{let e=(t||"fade").trim();return ut(r,et("effect",r),/^-?[_a-zA-Z][\w-]*$/.test(e)?e:"fade")});var Nr="data-effect-glitch-init";v.effect("glitch",r=>(r.setAttribute("data-glitch-text",(r.textContent||"").trim()),r.setAttribute(Nr,""),{cleanup(){r.removeAttribute(Nr),r.removeAttribute("data-glitch-text")}}));var ie="vb-split-sr",Pi="vb-split";function zl(r){return r.closest?.("[lang]")?.getAttribute("lang")||void 0}function dt(r,t){if(typeof Intl<"u"&&"Segmenter"in Intl)try{let e=new Intl.Segmenter(t,{granularity:"grapheme"});return Array.from(e.segment(r),i=>i.segment)}catch{}return Array.from(r)}function Bl(r,t){let e=[],i;if(typeof Intl<"u"&&"Segmenter"in Intl)try{i=Array.from(new Intl.Segmenter(t,{granularity:"word"}).segment(r))}catch{i=null}if(!i){for(let n of r.split(/(\s+)/))n&&e.push({text:n,space:/^\s+$/.test(n)});return e}let s="";for(let n of i){if(/^\s+$/.test(n.segment)){s&&(e.push({text:s,space:!1}),s=""),e.push({text:n.segment,space:!0});continue}let o=e[e.length-1];if(!n.isWordLike){o&&!o.space?o.text+=n.segment:s+=n.segment;continue}e.push({text:s+n.segment,space:!1}),s=""}return s&&e.push({text:s,space:!1}),e}function P(r){for(let t of r.querySelectorAll(`.${ie}`)){let e=t.nextElementSibling;e?.classList.contains(Pi)&&e.remove(),t.replaceWith(document.createTextNode(t.textContent||""))}r.normalize()}function Pr(r){let t=r.querySelectorAll(`.${ie}`);return t.length?Array.from(t,e=>e.textContent).join(""):r.textContent||""}function pt(r,{unit:t="word",className:e="",locale:i}={}){P(r);let s=i||zl(r),n=[],o=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode(c){let h=c.parentElement;return h&&h.closest("script, style, template, svg, math")?NodeFilter.FILTER_REJECT:c.nodeValue&&c.nodeValue.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});for(;o.nextNode();)n.push(o.currentNode);let a=[],l=c=>{let h=document.createElement("span");return e&&(h.className=e),h.textContent=c,a.push(h),h};for(let c of n){let h=c.nodeValue||"",u=document.createElement("span");u.className=ie,u.textContent=h;let p=document.createElement("span");if(p.className=Pi,p.setAttribute("aria-hidden","true"),t==="grapheme")for(let d of dt(h,s)){let f=l(d);/^\s+$/.test(d)&&f.setAttribute("data-space",""),p.append(f)}else for(let d of Bl(h,s))p.append(d.space?document.createTextNode(d.text):l(d.text));c.replaceWith(u,p)}return a}function Ir(r,t){P(r);let e=document.createElement("span");e.className=ie,e.textContent=t;let i=document.createElement("span");return i.className=Pi,i.setAttribute("aria-hidden","true"),r.replaceChildren(e,i),i}function Ii(r){let t=0,e=null;for(let i of r){let s=i.getBoundingClientRect(),n=s.top;e!==null&&n-e>s.height/2&&t++,e=n,i.style.setProperty("--i",String(t))}return r.length?t+1:0}var $i="data-effect-blur-reveal-init";v.effect("blur-reveal",r=>{let t=r;if(P(t),t.removeAttribute($i),v.prefersReducedMotion())return{cleanup(){}};t.style.setProperty("--blur-delay",v.params(t).get("blur-reveal-delay")||"80ms");let e=pt(t,{className:"vb-blur-chunk"});e.forEach((s,n)=>s.style.setProperty("--i",String(n))),t.setAttribute($i,"");let i=null;if(t.classList.contains("line")){Ii(e);let s=t.clientWidth;i=new ResizeObserver(()=>{t.clientWidth!==s&&(s=t.clientWidth,Ii(e))}),i.observe(t)}return{activate(){t.setAttribute("data-effect-active","")},cleanup(){i?.disconnect(),P(t),t.removeAttribute($i),t.style.removeProperty("--blur-delay")}}});var zi="data-effect-typewriter-init",jl=2e3,Ol=400,Dl=200;v.effect("typewriter",r=>{let t=r;if(P(t),t.querySelectorAll(":scope > .vb-typewriter-cursor").forEach(u=>u.remove()),t.removeAttribute(zi),v.prefersReducedMotion())return{cleanup(){}};let e=pt(t,{unit:"grapheme",className:"vb-typewriter-char"});t.setAttribute(zi,"");let i=0,s=null,n=()=>{clearTimeout(i),i=0},o=()=>!!t.closest("[data-paused]"),a=(u,p)=>{i=window.setTimeout(function d(){if(o()){i=window.setTimeout(d,Dl);return}u()},p)},l=u=>e.forEach((p,d)=>{p.hidden=d>=u}),c=(u,p)=>{let d=u+p;for(;d>0&&d<e.length&&e[d-1].hasAttribute("data-space");)d+=p;return d};function h(){n();let u=v.params(t),p=u.getTime("typewriter-speed",50),d=u.getTime("typewriter-delay",0),f=t.classList.contains("loop");!s&&!t.classList.contains("no-cursor")&&(s=document.createElement("span"),s.className="vb-typewriter-cursor",s.textContent="|",s.setAttribute("aria-hidden","true"),t.append(s));let m=0;l(0);let y=()=>{m<e.length?(m=c(m,1),l(m),a(y,p)):f&&a(w,jl)},w=()=>{m>0?(m=Math.max(0,c(m,-1)),l(m),a(w,p/2)):a(y,Ol)};a(y,d)}return{activate(){h()},cleanup(){n(),s?.remove(),s=null,P(t),t.removeAttribute(zi)}}});var Bi="data-effect-scramble-init",Fl="!<>-_\\/[]{}=+*^?#";function ql(r){let t=v.params(r).get("scramble-chars"),e=/^(['"])(.*)\1$/.exec(t);e&&(t=e[2]);let i=dt(t);return i.length?i:dt(Fl)}var Hl=r=>r[Math.floor(Math.random()*r.length)];v.effect("scramble",r=>{let t=r;if(P(t),t.removeAttribute(Bi),v.prefersReducedMotion())return{cleanup(){}};let e=pt(t,{unit:"grapheme",className:"vb-scramble-char"}),i=e.map(c=>c.textContent||""),s=e.flatMap((c,h)=>c.hasAttribute("data-space")?[]:[h]);t.setAttribute(Bi,"");let n=0,o=()=>{clearTimeout(n),n=0},a=()=>e.forEach((c,h)=>{c.textContent=i[h]});function l(){o();let c=v.params(t),h=c.getTime("scramble-duration",1500),u=Math.max(1,c.getTime("scramble-speed",30)),p=ql(t),d=Math.max(1,Math.ceil(h/u)),f=0,m=()=>{let y=Math.floor(f/d*s.length);s.forEach((w,k)=>{e[w].textContent=k<y?i[w]:Hl(p)}),f++,f<=d?n=window.setTimeout(m,u):a()};m()}return{activate(){l()},cleanup(){o(),P(t),t.removeAttribute(Bi)}}});var $r="animate-image-wrapper";function Ul(r){let t=(r.getAttribute("alt")||"").trim(),e=q(r,"animation-pause","Pause animation");return e.includes("{alt}")?e.replace("{alt}",t).trim():t?`${e}: ${t}`:e}v.effect("animate-image",r=>{let t=r;if(t.tagName!=="IMG"||!t.parentNode)return{cleanup(){}};t.removeAttribute("data-effect-animate-image-init"),t.hasAttribute("alt")||console.warn("[animate-image] Image has no alt text; describe what the animation shows.",t);let e=t.getAttribute("data-animate-image-src");if(e){t.src=e;let C=t.getAttribute("data-animate-image-srcset");C&&(t.srcset=C),t.removeAttribute("data-animate-image-src"),t.removeAttribute("data-animate-image-srcset")}let i=t.parentElement?.tagName==="PICTURE"?t.parentElement:null,s=i||t,n=i?[...i.querySelectorAll(":scope > source")]:[],o=s.parentElement?.classList.contains($r)?s.parentElement:null,a=o||document.createElement("span");o?a.querySelectorAll(":scope > .animate-image-toggle, :scope > .animate-image-placeholder").forEach(C=>C.remove()):(a.className=$r,s.parentNode?.insertBefore(a,s),a.appendChild(s));let l=document.createElement("span");l.className="animate-image-placeholder",l.hidden=!0,a.appendChild(l);let c=document.createElement("button");c.type="button",c.className="animate-image-toggle",c.setAttribute("aria-pressed","false"),c.setAttribute("aria-label",Ul(t)),a.appendChild(c);let h=t.hasAttribute("data-animate-image-paused"),u=t.getAttribute("data-poster"),p=!1,d=!1,f=null;function m(){if(u||!t.naturalWidth)return;let C=document.createElement("canvas");C.width=t.naturalWidth,C.height=t.naturalHeight;let I=C.getContext("2d");if(I)try{I.drawImage(t,0,0),u=C.toDataURL("image/png")}catch{u=null}}function y(){c.setAttribute("aria-pressed",String(p)),c.classList.toggle("paused",p),t.toggleAttribute("data-animate-image-paused",p)}function w({auto:C=!1}={}){if(!p){if(m(),p=!0,d=C,f={src:t.currentSrc||t.src,srcset:t.getAttribute("srcset"),sizes:t.getAttribute("sizes"),sources:n.map(I=>[I,I.getAttribute("srcset"),I.getAttribute("sizes")])},t.setAttribute("data-animate-image-src",t.getAttribute("src")||f.src),f.srcset&&t.setAttribute("data-animate-image-srcset",f.srcset),u){for(let[I]of f.sources)I.removeAttribute("srcset"),I.removeAttribute("sizes");t.removeAttribute("srcset"),t.removeAttribute("sizes"),t.src=u}else l.textContent=t.getAttribute("alt")||"",l.hidden=!1,a.setAttribute("data-animate-image-hidden","");y()}}function k(){if(p){if(p=!1,d=!1,f){for(let[C,I,qi]of f.sources)I!=null&&C.setAttribute("srcset",I),qi!=null&&C.setAttribute("sizes",qi);f.sizes!=null&&t.setAttribute("sizes",f.sizes),f.srcset!=null&&t.setAttribute("srcset",f.srcset),t.src=t.getAttribute("data-animate-image-src")||f.src}f=null,t.removeAttribute("data-animate-image-src"),t.removeAttribute("data-animate-image-srcset"),l.hidden=!0,a.removeAttribute("data-animate-image-hidden"),y()}}c.addEventListener("click",()=>p?k():w());function A(C){t.complete&&t.naturalWidth?C():t.addEventListener("load",C,{once:!0})}A(m),h?A(()=>w()):v.prefersReducedMotion()&&A(()=>w({auto:!0}));let T=()=>{v.prefersReducedMotion()?A(()=>w({auto:!0})):d&&k()},j=window.matchMedia("(prefers-reduced-motion: reduce)");j.addEventListener("change",T);let R=new MutationObserver(T);return R.observe(document.documentElement,{attributes:!0,attributeFilter:["data-motion-reduced"]}),{cleanup(){j.removeEventListener("change",T),R.disconnect(),p&&k(),t.toggleAttribute("data-animate-image-paused",h),c.remove(),l.remove(),a.parentNode&&(a.parentNode.insertBefore(s,a),a.remove())}}});var zr="vb-stamp-noise",ft="http://www.w3.org/2000/svg";function Vl(){if(document.getElementById(zr))return;let r=document.createElementNS(ft,"svg");r.setAttribute("aria-hidden","true"),r.setAttribute("focusable","false"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.style.position="absolute",r.style.overflow="hidden";let t=document.createElementNS(ft,"filter");t.id=zr;for(let[o,a]of Object.entries({x:"-5%",y:"-5%",width:"110%",height:"110%"}))t.setAttribute(o,a);let e=document.createElementNS(ft,"feTurbulence");for(let[o,a]of Object.entries({type:"fractalNoise",baseFrequency:"0.75",numOctaves:"4",stitchTiles:"stitch",result:"noise"}))e.setAttribute(o,a);let i=document.createElementNS(ft,"feColorMatrix");for(let[o,a]of Object.entries({type:"saturate",values:"0",in:"noise",result:"greyNoise"}))i.setAttribute(o,a);let s=document.createElementNS(ft,"feComposite");for(let[o,a]of Object.entries({in:"SourceGraphic",in2:"greyNoise",operator:"in"}))s.setAttribute(o,a);t.append(e,i,s);let n=document.createElementNS(ft,"defs");n.append(t),r.append(n),document.body.prepend(r)}v.effect("stamp",()=>(Vl(),{cleanup(){}}));var Br="data-effect-flipboard-init",se=" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,:!?/-",Wl=60,Kl=30,Gl=80,W="\xA0",jr=new WeakMap;function Yl(){let r=document.createElement("span");r.className="vb-flap-char";for(let e of["top","bottom","flip-top","flip-bottom"]){let i=document.createElement("span");i.className=`vb-flap-${e}`;let s=document.createElement("span");s.className="vb-flap-text",s.textContent=W,i.append(s),r.append(i)}let t=document.createElement("span");return t.className="vb-flap-hinge",r.append(t),r}function Or(r,t){for(let e of r.querySelectorAll(".vb-flap-text"))e.textContent=t||W}function re(r,t){return new Promise(e=>{let i=window.setTimeout(()=>{r.timers.delete(i),e(void 0)},t);r.timers.add(i)})}async function Xl(r,t,e,i,s){let n=t.querySelector(".vb-flap-top .vb-flap-text"),o=t.querySelector(".vb-flap-bottom .vb-flap-text"),a=t.querySelector(".vb-flap-flip-top"),l=t.querySelector(".vb-flap-flip-bottom");n.textContent=e||W,o.textContent=e||W,a.querySelector(".vb-flap-text").textContent=e||W,l.querySelector(".vb-flap-text").textContent=i||W,a.classList.add("vb-flap-flipping"),l.classList.add("vb-flap-flipping"),await re(r,s/2),n.textContent=i||W,await re(r,s/2),o.textContent=i||W,a.classList.remove("vb-flap-flipping"),l.classList.remove("vb-flap-flipping")}async function Jl(r,t,e,i,s,n){for(let o=0;o<i;o++){if(r.generation!==s)return;let a=o===i-1,l=se[o%se.length],c=a?e:se[(o+1)%se.length];await Xl(r,t,l,c,n),a||await re(r,Kl)}}function Dr(r){r.generation++;for(let t of r.timers)clearTimeout(t);r.timers.clear()}function Zl(r,t){let e=Ir(r,t.original);return r.classList.add("vb-flap-board"),t.chars.map(()=>e.appendChild(Yl()))}function Ql(r,t){Dr(t);let e=r,i=v.params(e).getTime("flip-ms",Wl);e.style.setProperty("--_vb-flip-duration",`${i}ms`);let s=Zl(r,t),n=t.generation;if(v.prefersReducedMotion()){s.forEach((o,a)=>Or(o,t.chars[a]));return}Promise.all(s.map(async(o,a)=>{if(await re(t,a*Gl),t.generation!==n)return;let l=4+Math.floor(Math.random()*7);await Jl(t,o,t.chars[a],l,n,i)})).then(()=>{t.generation===n&&s.forEach((o,a)=>Or(o,t.chars[a]))})}v.effect("flipboard",r=>{let t=Pr(r).trim();if(P(r),r.classList.remove("vb-flap-board"),!t)return{cleanup(){}};let e={original:t,chars:dt(t.toLocaleUpperCase(r.closest("[lang]")?.getAttribute("lang")||void 0)),generation:0,timers:new Set};return jr.set(r,e),r.setAttribute(Br,""),Ql(r,e),{cleanup(){Dr(e),jr.delete(r),r.textContent=e.original,r.classList.remove("vb-flap-board"),r.removeAttribute(Br),r.style.removeProperty("--_vb-flip-duration")}}});var ne=new Map,ji=null,oe=!1;function tc(r){for(let[t,e]of ne)r.querySelectorAll(t).forEach(e)}function ec(r){if(r.nodeType!==Node.ELEMENT_NODE)return;let t=r;for(let[e,i]of ne)t.matches(e)&&i(t),t.querySelectorAll(e).forEach(i)}function ic(){ji||(ji=new MutationObserver(r=>{for(let t of r)for(let e of t.addedNodes)ec(e)}),ji.observe(document.documentElement,{childList:!0,subtree:!0}))}function sc(){oe||(oe=!0,tc(document))}function Fr(r,t){ne.set(r,t),ic(),oe||document.readyState!=="loading"?(oe=!0,document.querySelectorAll(r).forEach(t)):ne.size===1&&document.addEventListener("DOMContentLoaded",sc)}var K=null;async function rc(){if(K)return;K=(await Promise.resolve().then(()=>(ye(),ve))).resolveEmoji}var Hr="[data-emoji]",Ur=/(?<![\p{L}\p{N}_]):([a-z0-9_+-]+):/gu,nc=/[a-z]/,oc="script,style,code,pre,kbd,samp,var,textarea,code-block,[data-emoji-skip]",Oi=["alt","title","aria-label"],Vr=new Set(["INPUT","TEXTAREA"]),ac=100,lc=new Set(["insertFromPaste","insertFromDrop","insertReplacementText","insertFromYank"]),it=new WeakMap;function Di(r,t="keep"){if(!K||!r.includes(":"))return r;let e=K;return r.replace(Ur,(i,s)=>{let n=e(s);return n?n.emoji:t==="strip"&&nc.test(s)?"":i})}function cc(r){return r.getAttribute("data-emoji-unknown")==="strip"?"strip":"keep"}function hc(r){if(it.has(r)||!r.hasAttribute("data-emoji"))return;if(r.removeAttribute("data-emoji-init"),Vr.has(r.tagName)){it.set(r,dc(r));return}if(Fi(r),r.getAttribute("data-emoji-scan")!=="observe"){it.set(r,()=>{});return}let t=null,e=new MutationObserver(()=>{t&&clearTimeout(t),t=setTimeout(()=>{t=null,Fi(r)},ac)});e.observe(r,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:Oi}),it.set(r,()=>{e.disconnect(),t&&clearTimeout(t)})}function uc(r){let t=it.get(r);t&&(t(),it.delete(r))}function dc(r){let t=!1,e=!1,i=()=>{t=!0},s=()=>{t=!1,o(!0)},n=a=>{let{isComposing:l,inputType:c}=a;t||l||c==="historyUndo"||c==="historyRedo"||o(!!c&&!lc.has(c))};function o(a=!1){if(!e){e=!0;try{pc(r,a)}finally{e=!1}}}return r.addEventListener("compositionstart",i),r.addEventListener("compositionend",s),r.addEventListener("input",n),r.value&&o(),()=>{r.removeEventListener("compositionstart",i),r.removeEventListener("compositionend",s),r.removeEventListener("input",n)}}function pc(r,t=!1){if(!K)return;let e=r.value,i=r.selectionStart,s=[];for(let a of e.matchAll(Ur)){let l=a.index??0,c=l+a[0].length;if(t&&i!==null&&c!==i)continue;let h=K(a[1]);h&&s.push({start:l,end:c,emoji:h.emoji})}if(s.length===0)return;if(r.selectionStart===null){r.value=Di(e,"keep");return}let n=r.selectionStart??e.length,o=document.activeElement===r&&typeof document.execCommand=="function";for(let a=s.length-1;a>=0;a--){let{start:l,end:c,emoji:h}=s[a];n>=c?n-=c-l-h.length:n>l&&(n=l+h.length);let u=!1;if(o){r.setSelectionRange(l,c);try{u=document.execCommand("insertText",!1,h)&&r.value.slice(l,l+h.length)===h}catch{u=!1}}u||r.setRangeText(h,l,c)}r.setSelectionRange(n,n)}function qr(r,t){if(r.isContentEditable)return!0;let e=r.closest(oc);return!!(e&&e!==t&&t.contains(e))}function Fi(r){if(!K)return;let t=cc(r),e=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode(o){let a=o.parentElement;return!a||qr(a,r)?NodeFilter.FILTER_REJECT:(o.textContent??"").includes(":")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),i=[];for(;e.nextNode();)i.push(e.currentNode);for(let o of i){let a=o.textContent??"",l=Di(a,t);l!==a&&(o.textContent=l)}let s=Oi.map(o=>`[${o}*=":"]`).join(","),n=[r,...r.querySelectorAll(s)];for(let o of n)if(!(o!==r&&qr(o,r)))for(let a of Oi){let l=o.getAttribute(a);if(!l)continue;let c=Di(l,t);c!==l&&o.setAttribute(a,c)}}document.addEventListener("vb:emoji-extended",()=>{if(K)for(let r of document.querySelectorAll(Hr))!it.has(r)||Vr.has(r.tagName)||Fi(r)});function Wr(r){rc().then(()=>hc(r))}Fr(Hr,Wr);new MutationObserver(r=>{for(let{target:t}of r){let e=t;e.hasAttribute("data-emoji")?Wr(e):uc(e)}}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-emoji"],subtree:!0});
1179
1321
  //# sourceMappingURL=vanilla-breeze-extras.js.map