@roxyapi/ui 1.1.1 → 1.1.3

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 (195) hide show
  1. package/AGENTS.md +5 -5
  2. package/README.md +3 -3
  3. package/THEMING.md +3 -3
  4. package/components-catalog.json +258 -158
  5. package/dist/cdn/components/almanac-day.js +3 -205
  6. package/dist/cdn/components/angel-number-card.js +3 -205
  7. package/dist/cdn/components/angel-number-lookup.js +3 -205
  8. package/dist/cdn/components/arudha-padas.js +3 -205
  9. package/dist/cdn/components/ashtakavarga-grid.js +3 -205
  10. package/dist/cdn/components/aspects-table.js +3 -205
  11. package/dist/cdn/components/astrocartography-map.js +3 -205
  12. package/dist/cdn/components/bazi-chart.js +3 -205
  13. package/dist/cdn/components/bhav-chalit-table.js +2 -204
  14. package/dist/cdn/components/bhava-bala-table.js +3 -205
  15. package/dist/cdn/components/biorhythm-chart.js +3 -205
  16. package/dist/cdn/components/bodygraph.js +7 -209
  17. package/dist/cdn/components/chara-karakas.js +3 -205
  18. package/dist/cdn/components/choghadiya-grid.js +3 -205
  19. package/dist/cdn/components/compatibility-card.js +2 -204
  20. package/dist/cdn/components/compound-number.js +3 -205
  21. package/dist/cdn/components/crystal-card.js +3 -205
  22. package/dist/cdn/components/crystal-grid.js +3 -205
  23. package/dist/cdn/components/dasha-timeline.js +3 -205
  24. package/dist/cdn/components/data.js +3 -205
  25. package/dist/cdn/components/divisional-chart.js +13 -215
  26. package/dist/cdn/components/dosha-card.js +3 -205
  27. package/dist/cdn/components/dosha-constitution.js +3 -205
  28. package/dist/cdn/components/dream-card.js +3 -205
  29. package/dist/cdn/components/dream-search.js +3 -205
  30. package/dist/cdn/components/endpoint-form.js +3 -205
  31. package/dist/cdn/components/ephemeris-table.js +2 -204
  32. package/dist/cdn/components/fixed-stars.js +2 -204
  33. package/dist/cdn/components/flying-star-chart.js +2 -204
  34. package/dist/cdn/components/forecast-digest.js +3 -205
  35. package/dist/cdn/components/forecast-timeline.js +3 -205
  36. package/dist/cdn/components/gematria.js +3 -205
  37. package/dist/cdn/components/gochara-table.js +3 -205
  38. package/dist/cdn/components/guna-milan.js +3 -205
  39. package/dist/cdn/components/hd-connection.js +5 -207
  40. package/dist/cdn/components/hd-penta.js +5 -207
  41. package/dist/cdn/components/hd-type-card.js +3 -205
  42. package/dist/cdn/components/hd-variables.js +3 -205
  43. package/dist/cdn/components/heliacal-table.js +3 -205
  44. package/dist/cdn/components/hexagram.js +3 -205
  45. package/dist/cdn/components/hora-table.js +3 -205
  46. package/dist/cdn/components/horoscope-card.js +3 -205
  47. package/dist/cdn/components/kp-chart.js +3 -205
  48. package/dist/cdn/components/kp-finance-card.js +3 -205
  49. package/dist/cdn/components/kp-planets-table.js +3 -205
  50. package/dist/cdn/components/kp-ruling-planets.js +3 -205
  51. package/dist/cdn/components/kua-card.js +3 -205
  52. package/dist/cdn/components/local-space-compass.js +8 -210
  53. package/dist/cdn/components/location-search.js +3 -205
  54. package/dist/cdn/components/luck-pillars.js +3 -205
  55. package/dist/cdn/components/mayan-day-sign.js +3 -205
  56. package/dist/cdn/components/moon-phase.js +3 -205
  57. package/dist/cdn/components/nakshatra-card.js +3 -205
  58. package/dist/cdn/components/natal-chart.js +6 -208
  59. package/dist/cdn/components/numerology-card.js +3 -205
  60. package/dist/cdn/components/panchang-table.js +3 -205
  61. package/dist/cdn/components/positions-table.js +3 -205
  62. package/dist/cdn/components/profection-card.js +3 -205
  63. package/dist/cdn/components/reference-card.js +3 -205
  64. package/dist/cdn/components/relocation-wheel.js +6 -208
  65. package/dist/cdn/components/shadbala-table.js +3 -205
  66. package/dist/cdn/components/synastry-chart.js +7 -209
  67. package/dist/cdn/components/tarot-card.js +3 -205
  68. package/dist/cdn/components/tarot-catalog.js +3 -205
  69. package/dist/cdn/components/tarot-spread.js +3 -205
  70. package/dist/cdn/components/transit-wheel.js +8 -210
  71. package/dist/cdn/components/transits-table.js +3 -205
  72. package/dist/cdn/components/upagraha-table.js +2 -204
  73. package/dist/cdn/components/vastu-mandala.js +4 -206
  74. package/dist/cdn/components/vedic-aspects.js +2 -204
  75. package/dist/cdn/components/vedic-daily.js +3 -205
  76. package/dist/cdn/components/vedic-kundli.js +10 -212
  77. package/dist/cdn/components/vedic-planets-table.js +3 -205
  78. package/dist/cdn/components/western-planets-table.js +2 -204
  79. package/dist/cdn/components/yoga-list.js +3 -205
  80. package/dist/cdn/components/zodiac-card.js +2 -204
  81. package/dist/cdn/locales/de.js +1 -1
  82. package/dist/cdn/roxy-ui.js +49 -251
  83. package/dist/components/almanac-day.js +1 -203
  84. package/dist/components/angel-number-card.js +1 -203
  85. package/dist/components/angel-number-lookup.js +1 -203
  86. package/dist/components/arudha-padas.js +1 -203
  87. package/dist/components/ashtakavarga-grid.js +1 -203
  88. package/dist/components/aspects-table.js +1 -203
  89. package/dist/components/astrocartography-map.js +6 -208
  90. package/dist/components/bazi-chart.js +1 -203
  91. package/dist/components/bhav-chalit-table.js +1 -203
  92. package/dist/components/bhava-bala-table.js +1 -203
  93. package/dist/components/biorhythm-chart.js +1 -203
  94. package/dist/components/bodygraph.js +3 -205
  95. package/dist/components/chara-karakas.js +1 -203
  96. package/dist/components/choghadiya-grid.js +1 -203
  97. package/dist/components/compatibility-card.js +1 -203
  98. package/dist/components/compound-number.js +1 -203
  99. package/dist/components/crystal-card.js +1 -203
  100. package/dist/components/crystal-grid.js +1 -203
  101. package/dist/components/dasha-timeline.js +1 -203
  102. package/dist/components/data.js +1 -203
  103. package/dist/components/divisional-chart.js +45 -247
  104. package/dist/components/dosha-card.js +1 -203
  105. package/dist/components/dosha-constitution.js +1 -203
  106. package/dist/components/dream-card.js +1 -203
  107. package/dist/components/dream-search.js +1 -203
  108. package/dist/components/endpoint-form.js +1 -203
  109. package/dist/components/ephemeris-table.js +1 -203
  110. package/dist/components/fixed-stars.js +1 -203
  111. package/dist/components/flying-star-chart.js +1 -203
  112. package/dist/components/forecast-digest.js +1 -203
  113. package/dist/components/forecast-timeline.js +1 -203
  114. package/dist/components/gematria.js +1 -203
  115. package/dist/components/gochara-table.js +1 -203
  116. package/dist/components/guna-milan.js +1 -203
  117. package/dist/components/hd-connection.js +3 -205
  118. package/dist/components/hd-penta.js +5 -207
  119. package/dist/components/hd-type-card.js +1 -203
  120. package/dist/components/hd-variables.js +1 -203
  121. package/dist/components/heliacal-table.js +1 -203
  122. package/dist/components/hexagram.d.ts +1 -1
  123. package/dist/components/hexagram.js +1 -203
  124. package/dist/components/hora-table.js +1 -203
  125. package/dist/components/horoscope-card.js +1 -203
  126. package/dist/components/kp-chart.js +1 -203
  127. package/dist/components/kp-finance-card.js +1 -203
  128. package/dist/components/kp-planets-table.js +1 -203
  129. package/dist/components/kp-ruling-planets.js +1 -203
  130. package/dist/components/kua-card.js +1 -203
  131. package/dist/components/local-space-compass.js +4 -206
  132. package/dist/components/location-search.js +1 -203
  133. package/dist/components/luck-pillars.js +1 -203
  134. package/dist/components/mayan-day-sign.js +1 -203
  135. package/dist/components/moon-phase.js +1 -203
  136. package/dist/components/nakshatra-card.js +1 -203
  137. package/dist/components/natal-chart.d.ts +1 -1
  138. package/dist/components/natal-chart.js +5 -207
  139. package/dist/components/numerology-card.js +1 -203
  140. package/dist/components/panchang-table.js +1 -203
  141. package/dist/components/positions-table.js +1 -203
  142. package/dist/components/profection-card.js +1 -203
  143. package/dist/components/reference-card.js +1 -203
  144. package/dist/components/relocation-wheel.js +3 -205
  145. package/dist/components/shadbala-table.js +1 -203
  146. package/dist/components/synastry-chart.js +6 -208
  147. package/dist/components/tarot-card.js +1 -203
  148. package/dist/components/tarot-catalog.js +1 -203
  149. package/dist/components/tarot-spread.js +1 -203
  150. package/dist/components/transit-wheel.js +8 -210
  151. package/dist/components/transits-table.js +1 -203
  152. package/dist/components/upagraha-table.js +1 -203
  153. package/dist/components/vastu-mandala.js +6 -208
  154. package/dist/components/vedic-aspects.js +1 -203
  155. package/dist/components/vedic-daily.js +1 -203
  156. package/dist/components/vedic-kundli.js +15 -217
  157. package/dist/components/vedic-planets-table.js +1 -203
  158. package/dist/components/western-planets-table.js +1 -203
  159. package/dist/components/yoga-list.js +1 -203
  160. package/dist/components/zodiac-card.js +1 -203
  161. package/dist/forms.json +1 -1
  162. package/dist/index.cjs +49 -251
  163. package/dist/index.js +50 -252
  164. package/dist/locales/de.js +1 -1
  165. package/dist/schemas/post--astrology-lilith.json +1 -1
  166. package/dist/schemas/post--astrology-progressions.json +1 -1
  167. package/dist/schemas/post--kabbalah-birth-profile.json +1 -1
  168. package/dist/schemas/post--numerology-chart.json +1 -1
  169. package/dist/schemas/post--vedic-astrology-daily.json +1 -1
  170. package/dist/schemas/post--vedic-astrology-dasha-current.json +1 -1
  171. package/dist/schemas/post--vedic-astrology-dasha-major.json +1 -1
  172. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha-sookshma.json +1 -1
  173. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha.json +1 -1
  174. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha.json +1 -1
  175. package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha.json +1 -1
  176. package/dist/schemas/post--vedic-astrology-kp-chart.json +1 -1
  177. package/dist/schemas/post--vedic-astrology-kp-cusps.json +1 -1
  178. package/dist/schemas/post--vedic-astrology-kp-daily-finance.json +1 -1
  179. package/dist/schemas/post--vedic-astrology-kp-horary.json +1 -1
  180. package/dist/schemas/post--vedic-astrology-kp-planets.json +1 -1
  181. package/dist/schemas/post--vedic-astrology-kp-ruling-planets-interval.json +1 -1
  182. package/dist/schemas/post--vedic-astrology-kp-ruling-planets.json +1 -1
  183. package/dist/schemas/post--vedic-astrology-transit.json +1 -1
  184. package/dist/styles/palettes.d.ts +4 -0
  185. package/dist/styles/themes/celeste.css +1 -115
  186. package/dist/styles/themes/eucalyptus.css +1 -121
  187. package/dist/styles/themes/kiln.css +1 -121
  188. package/dist/styles/themes/moonlit.css +1 -121
  189. package/dist/styles/themes/practitioner.css +1 -170
  190. package/dist/styles/tokens-css.d.ts +1 -1
  191. package/dist/styles/tokens.css +1 -202
  192. package/dist/types/types.gen.d.ts +48 -36
  193. package/dist/utils/string.d.ts +2 -0
  194. package/dist/version.d.ts +1 -1
  195. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,221 +1,19 @@
1
- var Kh=Object.defineProperty;var Vh=Object.getOwnPropertyDescriptor;var m=(n,a,e,t)=>{for(var r=t>1?void 0:t?Vh(a,e):a,s=n.length-1,i;s>=0;s--)(i=n[s])&&(r=(t?i(a,e,r):i(r))||r);return t&&r&&Kh(a,e,r),r};import{css as pm,html as ie,nothing as _e}from"lit";import{property as hm}from"lit/decorators.js";var Pl=[{endpoint:"chinese-astrology/calendar/day/{date}",method:"GET",attrs:{mode:"day"}},{endpoint:"chinese-astrology/calendar/monthly",method:"GET",attrs:{mode:"month"}},{endpoint:"chinese-astrology/calendar/auspicious-days",method:"POST",attrs:{mode:"auspicious"}}],Ml=[{endpoint:"angel-numbers/numbers/{number}",method:"GET"},{endpoint:"angel-numbers/daily",method:"POST"}],_l=[{endpoint:"angel-numbers/lookup",method:"GET"}],Nl=[{endpoint:"vedic-astrology/arudha",method:"POST"}],zl=[{endpoint:"vedic-astrology/ashtakavarga",method:"POST"}],Ol=[{endpoint:"astrology/aspects",method:"POST"},{endpoint:"astrology/transit-aspects",method:"POST"},{endpoint:"astrology/aspect-patterns",method:"POST"}],Gl=[{endpoint:"astrology/astrocartography",method:"POST"}],Il=[{endpoint:"chinese-astrology/bazi/chart",method:"POST"}],Fl=[{endpoint:"vedic-astrology/bhav-chalit",method:"POST"}],Bl=[{endpoint:"vedic-astrology/bhava-bala",method:"POST"}],Hl=[{endpoint:"biorhythm/daily",method:"POST",attrs:{mode:"daily"}},{endpoint:"biorhythm/forecast",method:"POST",attrs:{mode:"forecast"}},{endpoint:"biorhythm/critical-days",method:"POST",attrs:{mode:"critical-days"}}],jl=[{endpoint:"human-design/bodygraph",method:"POST"}],Kl=[{endpoint:"vedic-astrology/chara-karakas",method:"POST"}],Vl=[{endpoint:"vedic-astrology/panchang/choghadiya",method:"POST"}],ql=[{endpoint:"astrology/compatibility-score",method:"POST",attrs:{mode:"astrology"}},{endpoint:"numerology/compatibility",method:"POST",attrs:{mode:"numerology"}},{endpoint:"biorhythm/compatibility",method:"POST",attrs:{mode:"biorhythm"}}],Yl=[{endpoint:"numerology/compound-number/{number}",method:"GET"}],Ul=[{endpoint:"crystals/{id}",method:"GET"}],Zl=[{endpoint:"crystals",method:"GET"},{endpoint:"crystals/chakra/{chakra}",method:"GET"},{endpoint:"crystals/element/{element}",method:"GET"},{endpoint:"crystals/zodiac/{sign}",method:"GET"},{endpoint:"crystals/birthstone/{month}",method:"GET"},{endpoint:"crystals/search",method:"GET"}],Wl=[{endpoint:"vedic-astrology/dasha/major",method:"POST",attrs:{period:"major"}},{endpoint:"vedic-astrology/dasha/current",method:"POST",attrs:{period:"current"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}",method:"POST",attrs:{period:"sub"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}",method:"POST",attrs:{period:"antara"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}",method:"POST",attrs:{period:"sookshma"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}/{sookshma}",method:"POST",attrs:{period:"prana"}}],Xl=[{endpoint:"vedic-astrology/divisional-chart",method:"POST"},{endpoint:"vedic-astrology/navamsa",method:"POST"}],Jl=[{endpoint:"vedic-astrology/dosha/manglik",method:"POST",attrs:{type:"manglik"}},{endpoint:"vedic-astrology/dosha/kalsarpa",method:"POST",attrs:{type:"kalsarpa"}},{endpoint:"vedic-astrology/dosha/sadhesati",method:"POST",attrs:{type:"sadhesati"}}],Ql=[{endpoint:"ayurveda/constitution",method:"POST"}],ec=[{endpoint:"dreams/symbols/{id}",method:"GET"}],tc=[{endpoint:"dreams/symbols",method:"GET"}],ac=[{endpoint:"astrology/planets/monthly",method:"POST"},{endpoint:"vedic-astrology/planetary-positions/monthly",method:"POST"}],rc=[{endpoint:"astrology/fixed-stars",method:"POST"}],sc=[{endpoint:"feng-shui/flying-stars/natal",method:"POST",attrs:{mode:"natal"}},{endpoint:"feng-shui/flying-stars/annual/{year}",method:"GET",attrs:{mode:"annual"}}],nc=[{endpoint:"forecast/digest",method:"POST"}],ic=[{endpoint:"forecast/timeline",method:"POST"},{endpoint:"forecast/significant-dates",method:"POST"},{endpoint:"forecast/transits",method:"POST"}],oc=[{endpoint:"kabbalah/gematria",method:"POST"}],lc=[{endpoint:"vedic-astrology/transit",method:"POST"}],cc=[{endpoint:"vedic-astrology/compatibility",method:"POST"}],dc=[{endpoint:"human-design/connection",method:"POST"}],pc=[{endpoint:"human-design/penta",method:"POST"}],hc=[{endpoint:"human-design/type",method:"POST"},{endpoint:"human-design/profile",method:"POST"}],mc=[{endpoint:"human-design/variables",method:"POST"}],gc=[{endpoint:"vedic-astrology/heliacal",method:"POST"}],yc=[{endpoint:"iching/hexagrams/random",method:"GET"},{endpoint:"iching/hexagrams/{number}",method:"GET"},{endpoint:"iching/hexagrams/lookup",method:"GET"},{endpoint:"iching/cast",method:"GET"},{endpoint:"iching/daily",method:"POST"},{endpoint:"iching/daily/cast",method:"POST"}],uc=[{endpoint:"vedic-astrology/panchang/hora",method:"POST"}],fc=[{endpoint:"astrology/horoscope/{sign}/daily",method:"GET",attrs:{period:"daily"}},{endpoint:"astrology/horoscope/{sign}/weekly",method:"GET",attrs:{period:"weekly"}},{endpoint:"astrology/horoscope/{sign}/monthly",method:"GET",attrs:{period:"monthly"}},{endpoint:"astrology/horoscope/{sign}/yearly",method:"GET",attrs:{period:"yearly"}}],xc=[{endpoint:"vedic-astrology/kp/chart",method:"POST"}],bc=[{endpoint:"vedic-astrology/kp/daily-finance",method:"POST"}],vc=[{endpoint:"vedic-astrology/kp/planets",method:"POST"}],Lc=[{endpoint:"vedic-astrology/kp/ruling-planets",method:"POST"}],$c=[{endpoint:"feng-shui/kua",method:"POST",attrs:{mode:"kua"}},{endpoint:"feng-shui/eight-mansions",method:"POST",attrs:{mode:"mansions"}}],wc=[{endpoint:"astrology/local-space",method:"POST"}],kc=[{endpoint:"chinese-astrology/bazi/luck-pillars",method:"POST"}],Sc=[{endpoint:"mesoamerican-astrology/mayan/tzolkin",method:"POST",attrs:{mode:"day"}},{endpoint:"mesoamerican-astrology/mayan/chart",method:"POST",attrs:{mode:"chart"}}],Rc=[{endpoint:"astrology/moon-phase/current",method:"GET",attrs:{mode:"current"}},{endpoint:"astrology/moon-phase/upcoming",method:"GET",attrs:{mode:"upcoming"}},{endpoint:"astrology/moon-phase/calendar/{year}/{month}",method:"GET",attrs:{mode:"calendar"}}],Cc=[{endpoint:"vedic-astrology/nakshatras/{id}",method:"GET"}],Tc=[{endpoint:"astrology/natal-chart",method:"POST"}],Ec=[{endpoint:"numerology/life-path",method:"POST",attrs:{type:"life-path"}},{endpoint:"numerology/expression",method:"POST",attrs:{type:"expression"}},{endpoint:"numerology/soul-urge",method:"POST",attrs:{type:"soul-urge"}},{endpoint:"numerology/personality",method:"POST",attrs:{type:"personality"}},{endpoint:"numerology/birth-day",method:"POST",attrs:{type:"birth-day"}},{endpoint:"numerology/maturity",method:"POST",attrs:{type:"maturity"}},{endpoint:"numerology/daily",method:"POST",attrs:{type:"daily"}},{endpoint:"numerology/personal-day",method:"POST",attrs:{type:"personal-day"}},{endpoint:"numerology/personal-month",method:"POST",attrs:{type:"personal-month"}},{endpoint:"numerology/personal-year",method:"POST",attrs:{type:"personal-year"}},{endpoint:"numerology/chart",method:"POST",attrs:{type:"chart"}}],Dc=[{endpoint:"vedic-astrology/panchang/detailed",method:"POST",attrs:{detail:"detailed"}},{endpoint:"vedic-astrology/panchang/basic",method:"POST",attrs:{detail:"basic"}}],Ac=[{endpoint:"astrology/asteroids",method:"POST"},{endpoint:"astrology/lilith",method:"POST"},{endpoint:"astrology/progressions",method:"POST"},{endpoint:"astrology/solar-arc",method:"POST"},{endpoint:"astrology/arabic-lots",method:"POST"}],Pc=[{endpoint:"astrology/profections",method:"POST"}],Mc=[{endpoint:"astrology/signs/{id}",method:"GET"},{endpoint:"astrology/planet-meanings/{id}",method:"GET"},{endpoint:"vedic-astrology/rashis/{id}",method:"GET"},{endpoint:"iching/trigrams/{id}",method:"GET"},{endpoint:"human-design/gates/{number}",method:"GET"},{endpoint:"human-design/centers/{id}",method:"GET"},{endpoint:"numerology/meanings/{number}",method:"GET"},{endpoint:"vedic-astrology/avasthas/{id}",method:"GET"}],_c=[{endpoint:"astrology/relocation-chart",method:"POST"}],Nc=[{endpoint:"vedic-astrology/shadbala",method:"POST"}],zc=[{endpoint:"astrology/synastry",method:"POST"}],Oc=[{endpoint:"tarot/daily",method:"POST"},{endpoint:"tarot/cards/{id}",method:"GET"}],Gc=[{endpoint:"tarot/cards",method:"GET"}],Ic=[{endpoint:"tarot/spreads/three-card",method:"POST",attrs:{spread:"three-card"}},{endpoint:"tarot/spreads/celtic-cross",method:"POST",attrs:{spread:"celtic-cross"}},{endpoint:"tarot/spreads/love",method:"POST",attrs:{spread:"love"}},{endpoint:"tarot/spreads/career",method:"POST",attrs:{spread:"career"}},{endpoint:"tarot/spreads/custom",method:"POST",attrs:{spread:"custom"}},{endpoint:"tarot/yes-no",method:"POST",attrs:{spread:"yes-no"}},{endpoint:"tarot/draw",method:"POST",attrs:{spread:"draw"}}],Fc=[{endpoint:"astrology/transit-aspects",method:"POST"}],Bc=[{endpoint:"astrology/transits",method:"POST"}],Hc=[{endpoint:"vedic-astrology/upagraha",method:"POST"}],jc=[{endpoint:"vastu/mandala",method:"POST",attrs:{mode:"mandala"}},{endpoint:"vastu/entrance",method:"POST",attrs:{mode:"entrance"}}],Kc=[{endpoint:"vedic-astrology/aspects",method:"POST"}],Vc=[{endpoint:"vedic-astrology/daily",method:"POST"}],qc=[{endpoint:"vedic-astrology/birth-chart",method:"POST"}],Yc=[{endpoint:"vedic-astrology/birth-chart",method:"POST"}],Uc=[{endpoint:"astrology/natal-chart",method:"POST"}],Zc=[{endpoint:"vedic-astrology/yoga",method:"GET"},{endpoint:"vedic-astrology/yoga/detect",method:"POST"},{endpoint:"vedic-astrology/yoga/{id}",method:"GET"}],Wc=[{endpoint:"chinese-astrology/zodiac/sign",method:"POST",attrs:{mode:"sign"}},{endpoint:"chinese-astrology/zodiac/animals/{id}",method:"GET",attrs:{mode:"animal"}},{endpoint:"chinese-astrology/zodiac/{id}/daily",method:"GET",attrs:{mode:"daily"}},{endpoint:"chinese-astrology/zodiac/compatibility/{sign1}/{sign2}",method:"GET",attrs:{mode:"compatibility"}}];import{html as ct,nothing as Oa}from"lit";import{property as yt,state as na}from"lit/decorators.js";import{ifDefined as Ws}from"lit/directives/if-defined.js";var Xc=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function xo(n){if(n.lang)return n.lang;if(typeof document>"u")return;let a=n.closest?.("[lang]")?.getAttribute("lang");return a||document.documentElement.lang||void 0}function Jc(n){return!n||n.toLowerCase().split("-")[0]==="en"}var qh={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function fo(n){let a=n.toLowerCase();return Xc.find(e=>e.toLowerCase()===a)}function Un(n){let a=xo(n);if(!a)return;let e=fo(a);if(e)return e;let t=a.toLowerCase().split("-"),r=t[0];if(r==="zh"){let s=t.find(i=>i==="hans"||i==="hant")??qh[t[1]??""];return s?fo(`zh-${s}`):void 0}return fo(r)}import{LitElement as Yh}from"lit";var Qc=`/**
2
- * Roxy UI design tokens: every colour, size, space, radius, font and duration a component reads.
3
- *
4
- * Two tiers. BASES are the few values a host tunes: fonts, base text size and its scale ratio, the
5
- * space unit, the base radius, motion, and the colour bases (bg, fg, accent and the four status
6
- * colours). Every other token DERIVES from them with calc() or color-mix(), so dark mode reassigns
7
- * the colour bases only and one font token restyles every heading. A host may still set any
8
- * derived token directly, and its value wins.
9
- *
10
- * Delivery: a global light-DOM stylesheet (linked, or injected by the CDN bundle). Custom properties
11
- * inherit through the shadow boundary, so a token set on any light-DOM ancestor reaches every
12
- * component. The :host selectors apply only if this sheet is adopted into a shadow root.
13
- *
14
- * Light is the default. Dark applies under prefers-color-scheme: dark, or [data-theme="dark"] or
15
- * .dark on the element or any ancestor; [data-theme="light"] or .light opts back into light. An
16
- * explicit choice wins over the OS because those blocks come later in source order.
17
- *
18
- * A derivation is computed where it is declared, so the derived block also matches every theme
19
- * trigger: a base reassigned on :root or on an element carrying data-theme, .light or .dark
20
- * re-derives everything below it.
21
- *
22
- * Font: --roxy-font-sans is unset by default, so every component inherits the host page font; any
23
- * value set by the host or a preset replaces it, and --roxy-font-display follows it until set.
24
- *
25
- * Motion: --roxy-motion-duration defaults to 200ms and prefers-reduced-motion forces 0ms.
26
- */
27
-
28
- /*
29
- * Two mechanisms keep the host page in charge of every token, and both are load bearing.
30
- *
31
- * Every rule sits in the roxy.tokens cascade layer, and an unlayered declaration beats a layered
32
- * one at ANY specificity, so a plain \`:root { --roxy-accent: #8b5cf6 }\` on the host page wins, and
33
- * so does the same line inside a layer of its own, because this statement registers ours first
34
- * and the CDN bundle injects this sheet at the top of <head>. A host that links this file after its
35
- * own CSS orders the layers itself: \`@layer roxy, base, components, utilities;\` before either sheet.
36
- *
37
- * Every selector is ALSO wrapped in :where(), which has ZERO specificity, so a host declaration
38
- * still wins wherever a layer cannot decide it, under every dark signal alike.
39
- *
40
- * The theme presets in styles/themes/*.css write into roxy.theme; both files declare this order,
41
- * so either one loading alone still ranks a preset above these defaults.
42
- */
43
- @layer roxy.tokens, roxy.theme;
44
-
45
- @layer roxy.tokens {
46
- /* Bases, light. Also the mode-specific derivations: accent ink and status inks mix toward black. */
47
- :where(:root, :host) {
48
- /* A real inherited property: native controls, popups and scrollbars follow it. */
49
- color-scheme: light;
50
-
51
- --roxy-bg: #ffffff;
52
- --roxy-fg: #0a0a0a;
53
- --roxy-accent: #4a6297;
54
- --roxy-success: #16a34a;
55
- --roxy-warning: #ea580c;
56
- --roxy-danger: #dc2626;
57
- --roxy-info: #0284c7;
58
-
59
- /* Accent and status inks: 70 percent toward black reads at AA on the card and on a tint of the base. */
60
- --roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
61
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);
62
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);
63
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);
64
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);
65
-
66
- /* Unset on purpose: a component inherits the host page font until a host or preset sets one. */
67
- --roxy-font-sans: initial;
68
- --roxy-font-mono:
69
- ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas,
70
- "Liberation Mono", monospace;
71
-
72
- --roxy-text-base: 1rem;
73
- --roxy-text-scale: 1.15;
74
- --roxy-weight-normal: 400;
75
- --roxy-weight-bold: 600;
76
- --roxy-leading-tight: 1.25;
77
- --roxy-leading-normal: 1.5;
78
- --roxy-tracking-tight: -0.01em;
79
- --roxy-tracking-normal: 0em;
80
-
81
- --roxy-space-unit: 0.25rem;
82
- --roxy-radius: 6px;
83
-
84
- --roxy-motion-duration: 200ms;
85
- --roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1);
86
- }
87
-
88
- /* Derived roles, identical in every mode, restated on every theme trigger so they follow its bases. */
89
- :where(:root, :host, [data-theme], .light, .dark) {
90
- /* Flat: the card is the page colour, separated by a hairline. */
91
- --roxy-surface: var(--roxy-bg);
92
- --roxy-primary: var(--roxy-fg);
93
- --roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));
94
- --roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));
95
- --roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));
96
- --roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);
97
- --roxy-heat: var(--roxy-danger);
98
-
99
- --roxy-font-display: var(--roxy-font-sans);
100
-
101
- --roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));
102
- --roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));
103
- --roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));
104
- --roxy-text-xl: calc(
105
- var(--roxy-text-lg) *
106
- var(--roxy-text-scale) *
107
- var(--roxy-text-scale)
108
- );
109
-
110
- --roxy-space-xs: var(--roxy-space-unit);
111
- --roxy-space-sm: calc(var(--roxy-space-unit) * 2);
112
- --roxy-space-md: calc(var(--roxy-space-unit) * 4);
113
- --roxy-space-lg: calc(var(--roxy-space-unit) * 6);
114
- --roxy-space-xl: calc(var(--roxy-space-unit) * 10);
115
- --roxy-line-thick: calc(var(--roxy-space-unit) / 2);
116
- --roxy-touch: calc(var(--roxy-space-unit) * 11);
117
-
118
- --roxy-radius-sm: calc(var(--roxy-radius) / 2);
119
- --roxy-radius-md: var(--roxy-radius);
120
- --roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);
121
- --roxy-radius-full: 9999px;
122
-
123
- /* Flat surfaces cast nothing; only a floating layer (a popup, an enlarged chart) lifts. */
124
- --roxy-shadow-sm: none;
125
- --roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);
126
- --roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent);
127
- }
128
-
129
- /* Bases, dark, by system preference. Inks mix toward white so they read on a dark card. */
130
- @media (prefers-color-scheme: dark) {
131
- :where(:root, :host) {
132
- color-scheme: dark;
133
- --roxy-bg: #0a0a0a;
134
- --roxy-fg: #fafafa;
135
- --roxy-accent: #92aade;
136
- --roxy-success: #22c55e;
137
- --roxy-warning: #fb923c;
138
- --roxy-danger: #ef4444;
139
- --roxy-info: #38bdf8;
140
-
141
- --roxy-accent-ink: var(--roxy-accent);
142
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);
143
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);
144
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);
145
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);
146
- }
147
- }
148
-
149
- /* Explicit light: beats the OS dark block when the host chooses light. */
150
- :where(
151
- :root[data-theme="light"],
152
- [data-theme="light"],
153
- :root.light,
154
- .light,
155
- :host([data-theme="light"])
156
- ) {
157
- color-scheme: light;
158
- --roxy-bg: #ffffff;
159
- --roxy-fg: #0a0a0a;
160
- --roxy-accent: #4a6297;
161
- --roxy-success: #16a34a;
162
- --roxy-warning: #ea580c;
163
- --roxy-danger: #dc2626;
164
- --roxy-info: #0284c7;
165
-
166
- --roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
167
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);
168
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);
169
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);
170
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);
171
- }
172
-
173
- /* Explicit dark: a .dark class or data-theme="dark" on any ancestor themes every component below it. */
174
- :where(
175
- :root[data-theme="dark"],
176
- [data-theme="dark"],
177
- :root.dark,
178
- .dark,
179
- :host([data-theme="dark"])
180
- ) {
181
- color-scheme: dark;
182
- --roxy-bg: #0a0a0a;
183
- --roxy-fg: #fafafa;
184
- --roxy-accent: #92aade;
185
- --roxy-success: #22c55e;
186
- --roxy-warning: #fb923c;
187
- --roxy-danger: #ef4444;
188
- --roxy-info: #38bdf8;
189
-
190
- --roxy-accent-ink: var(--roxy-accent);
191
- --roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);
192
- --roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);
193
- --roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);
194
- --roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);
195
- }
196
-
197
- @media (prefers-reduced-motion: reduce) {
198
- :where(:root, :host) {
199
- --roxy-motion-duration: 0ms;
200
- }
201
- }
202
- }
203
- `;var ed="roxy-ui-tokens";function td(){if(typeof document>"u")return null;let n=document.getElementById(ed);if(n)return n;let a=document.createElement("style");return a.id=ed,a.textContent=Qc,document.head.prepend(a),a}function St(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function A(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function S(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,a=>a.toUpperCase())}var ad="__ROXY_UI_I18N__";function bo(){let n=globalThis,a=n[ad];if(a)return a;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[ad]=e,e}function vo(n,a){return a?n.replace(/\{\{(\w+)\}\}/g,(e,t)=>t in a?String(a[t]??""):e):n}function rd(n,a,e){return vo(Lo(n,a)??a,e)}function Lo(n,a){if(!n)return;let{catalogs:e}=bo(),t=n.toLowerCase();return(e[t]??e[t.split("-")[0]])?.[St(a)]}function sd(n){if(!n)return;let{fieldLabels:a}=bo(),e=n.toLowerCase();return a[e]??a[e.split("-")[0]]}function Ys(n,a){return sd(n)?.fields[a]}function nd(n,a,e){return sd(n)?.enums[`${a}.${e}`]}function id(n){let{listeners:a}=bo();return a.add(n),()=>{a.delete(n)}}var Zn=class{constructor(a){this.host=a,a.addController(this)}hostConnected(){this.unsubscribe=id(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var _a=class extends Yh{constructor(){super();this.translator=(e,t)=>this.t(e,t);new Zn(this)}connectedCallback(){super.connectedCallback(),td()}t(e,t){return rd(this.effectiveLang(),e,t)}effectiveLang(){return xo(this)}};import{css as Zh}from"lit";import{css as Uh}from"lit";var od=Uh`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var Wh=Zh`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,u=[Wh,od];var Xh="__cols",Jh="__rows";function Qh(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Wn(n){if(Array.isArray(n)){let s=!1,i=n.map(o=>{let l=Wn(o);return l!==o&&(s=!0),l});return s?i:n}if(!Qh(n))return n;let a=n[Xh],e=n[Jh];if(Array.isArray(a)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return a.forEach((o,l)=>{i[o]=Wn(s[l])}),i});let t=!1,r={};for(let[s,i]of Object.entries(n)){let o=Wn(i);o!==i&&(t=!0),r[s]=o}return t?r:n}function Xn(n){return Wn(n)}function ld(n,a){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([t,r])=>a[t]===r))??n[0]}var em="pk_live_YOUR_KEY",cd={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function Dr(n){if(n)return n===em?cd.sample:n.startsWith("pk_")?void 0:cd.secret}function Us(n,a,e={}){e.warn&&console.warn(a.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:a.reason,message:a.message},bubbles:!0,composed:!0}))}var Qn="https://roxyapi.com/api/v2";async function dd(n){return(await pd(n)).message}async function pd(n){try{let a=await n.json();if(a?.error){let e=a.code==="validation_error"&&Array.isArray(a.issues)?a.issues.filter(t=>typeof t.path=="string"&&typeof t.message=="string").map(t=>({path:t.path,message:t.message})):null;return{message:a.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:!1}}var ei={fromAttribute:n=>{if(n!=null){try{let a=JSON.parse(n);if(a&&typeof a=="object"&&!Array.isArray(a))return a}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},Zs=class extends Error{constructor(e,t=null,r=!0){super(e);this.issues=t;this.worded=r}};function $o(n){return n.submitUrl?void 0:Dr(n.publishableKey)}function wo(n){return!!(n.submitUrl||n.publishableKey&&!$o(n))}async function Na(n,a,e){let t=$o(n);if(t)throw new Zs(t.message);let r=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:tm(a,n.submitContext),signal:e}):await am(n,a,e);if(!r.ok){let s=await pd(r);throw new Zs(s.message,s.issues,s.worded)}return await r.json()}function tm(n,a){return JSON.stringify(a?{...n,context:a}:n)}function am(n,a,e){let t=new URL(`${n.baseUrl??Qn}${a.path}`,document.baseURI);for(let[s,i]of Object.entries(a.query??{}))i!=null&&t.searchParams.set(s,String(i));let r={Accept:"application/json"};return n.publishableKey&&(r["X-API-Key"]=n.publishableKey),a.body!=null&&(r["Content-Type"]="application/json"),fetch(t,{method:a.method??"GET",headers:r,body:a.body!=null?JSON.stringify(a.body):void 0,signal:e})}var Jn=class{constructor(a){this.baseUrl=Qn;this.worded=!0;this.host=a,a.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(a){this.worded=!0;let e=$o(this);if(e){this.host.error=e.message,Us(this.host,e);return}this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let r=await Na(this,a,t.signal);if(t.signal.aborted)return;this.host.data=r}catch(r){if(t.signal.aborted||r?.name==="AbortError")return;r instanceof Zs&&(this.host.issues=r.issues),this.worded=r instanceof Zs&&r.worded,this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}};function hd(n,a,e,t=[]){let r={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(c,d)=>{let p=r[d];return delete r[d],encodeURIComponent(String(p??""))}),i=new Set(t),o={},l={};for(let[c,d]of Object.entries(r))d===void 0||d===""||(a==="GET"||i.has(c)?o[c]=d:l[c]=d);return{path:s,method:a,query:o,body:a==="POST"?l:void 0}}import{css as nm,html as za,nothing as Ar}from"lit";import{css as rm,html as sm}from"lit";function H(){return sm`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var M=rm`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var j=nm`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function Pr(n){return n?.length?za`<div class="interp-keywords roxy-chips">${n.map(a=>za`<span class="roxy-chip">${a}</span>`)}</div>`:Ar}function Ln(n,a){if(!n)return Ar;let e=(t,r)=>r?za`<p><strong>${a(t)}</strong> ${r}</p>`:Ar;return za`${n.summary?za`<p>${n.summary}</p>`:Ar} ${e("Impact:",n.impact)}${e("Timing:",n.timing)}${e("Guidance:",n.guidance)} ${Pr(n.keywords)}`}function md(n,a,e){let t=n.filter(r=>!!r.body);return t.length===0?Ar:za`<section class="block" part="section readings"><h3>${e}</h3>${t.map((r,s)=>za`<details class="interp-card" part="reading" name="${a}" ?open="${s===0}"><summary><span class="interp-lead">${r.label}</span> ${H()} ${r.aside?za`<span class="interp-aside"><small>${r.aside}</small></span>`:Ar}</summary><div class="interp-body"><p>${r.body}</p>${r.extra??Ar}</div></details>`)}</section>`}var gd="roxy-data";function yd(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function im(n){return`<script type="application/json" class="${gd}">${yd(n)}<\/script>`}function om(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var ti=class{constructor(a){this.host=a,a.addController(this)}hostConnected(){if(this.host.data!=null)return;let a=this.read();a!==void 0&&(this.host.data=a,this.host.requestUpdate())}read(){let a=this.findInlineScript();return a?this.parse(a.textContent):void 0}findInlineScript(){for(let a of Array.from(this.host.children))if(om(a)&&a.classList.contains(gd))return a;return null}parse(a){if(a?.trim())try{return JSON.parse(a)}catch{return}}};var y=class extends _a{constructor(){super();this.data=null;this.endpoint="";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.hostLoaded=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,t=this.listKey,r=this.listRows();if(!(!e||!t||!r)){this.moreLoading=!0,this.moreError=null;try{let s=await Na(this.fetcher,{...e,query:{...e.query,offset:r.length}});if(this.lastRequest!==e)return;let i=s[t];this.data={...this.data,...s,[t]:[...r,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!1}}};this.onEdit=()=>{this.editing=!0};this.onFormSubmit=e=>{let t=this.selfFetch();if(!t)return;let r=e.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetchFresh(hd(t.endpoint,t.method,r.values,r.queryKeys??[]))};new ti(this),this.fetcher=new Jn(this)}static{this.styles=[u]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let t=Xn(this.data);t!==this.data&&(this.data=t)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:ld(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return ct`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(t){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,t),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:t},bubbles:!0,composed:!0})),customElements.get("roxy-data")?ct`<roxy-data .data="${e}" lang="${Ws(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hiddenSectionsStyle(){let e=this.hideSections.split(",").map(r=>r.trim().toLowerCase()).filter(r=>/^[a-z][a-z0-9-]*$/.test(r));if(e.length===0)return Oa;let t=e.map(r=>`[part~="${r}"],roxy-endpoint-form::part(${r}){display:none!important}`).join("");return ct`<style>${t}</style>`}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?ct`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,t,r){return this.hideReadings?Oa:md(e,t,this.t(r??"Reading"))}renderResult(e){let t=ct`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?ct`${t}${this.renderAttribution()}`:t}renderWithForm(e){return ct`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?Oa:this.renderErrorBanner(this.error):this.data==null?Oa:this.showAttribution()?ct`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),t=this.data?.total;return!this.lastRequest||!e||typeof t!="number"?Oa:e.length>=t?Oa:ct`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?ct`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:Oa}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=!0,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:!0,composed:!0})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let t=this.openedRow??document.createElement(this.rowDetail.tag);t.publishableKey=this.publishableKey,t.baseUrl=this.baseUrl,t.submitUrl=this.submitUrl,t.submitContext=this.submitContext,t.hideReadings=this.hideReadings,t.hideSections=this.hideSections;let r=this.effectiveLang();r&&t.setAttribute("lang",r),this.openedRow=t,this.openedRowId=e,t.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Un(this)}}).then(()=>t.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return ct`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(Oa):this.renderEmpty()}renderForm(){let e=this.selfFetch();return ct`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${Ws(this.specUrl)}" publishable-key="${Ws(this.publishableKey)}" location-url="${Ws(this.locationUrl)}" submit-label="${Ws(this.submitLabel)}" lang="${Ws(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return ct`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return ct`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let t=!!this.selfFetch();if(t&&this.issues)return this.renderForm();let r=this.renderErrorBanner(e);return t?ct`${r}${this.renderForm()}`:r}renderErrorBanner(e){return ct`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([yt({attribute:!1})],y.prototype,"data",2),m([yt({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([yt({type:String})],y.prototype,"method",2),m([yt({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([yt({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([yt({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([yt({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([yt({attribute:"submit-context",converter:ei})],y.prototype,"submitContext",2),m([yt({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([yt({type:Boolean})],y.prototype,"remember",2),m([yt({type:Boolean,attribute:"hide-readings",reflect:!0})],y.prototype,"hideReadings",2),m([yt({type:String,attribute:"hide-sections",reflect:!0})],y.prototype,"hideSections",2),m([yt({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([yt({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([yt({type:String})],y.prototype,"attribution",2),m([na()],y.prototype,"loading",2),m([na()],y.prototype,"error",2),m([na()],y.prototype,"issues",2),m([na()],y.prototype,"selfFetched",2),m([na()],y.prototype,"editing",2),m([na()],y.prototype,"sticky",2),m([na()],y.prototype,"openedRow",2),m([na()],y.prototype,"openedRowId",2),m([na()],y.prototype,"moreLoading",2),m([na()],y.prototype,"moreError",2);var f=n=>a=>{customElements.get(n)||customElements.define(n,a)};var ai=/^\d{4}-\d{2}-\d{2}$/,lm=/^\d{4}-\d{2}$/,xd=/^\d{2}:\d{2}(:\d{2})?$/,cm=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,ud=new Map;function ut(n){if(!n)return["en"];let a=ud.get(n);if(a)return[a,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return ud.set(n,e),[e,"en"]}var fd=new Map;function ri(n){let a=n??"",e=fd.get(a);if(e)return e;let r={hour:new Intl.DateTimeFormat(ut(n),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return fd.set(a,r),r}function $n(n,a){return n&&a?`${n} - ${a}`:n||a}function _r(n){let a=xd.test(n)?`1970-01-01T${n}`:ai.test(n)?`${n}T00:00:00`:lm.test(n)?`${n}-01T00:00:00`:cm.test(n)?n.replace(" ","T"):null;return a?{d:new Date(`${a}Z`),timeZone:"UTC"}:{d:new Date(n)}}function Rt(n,a){if(typeof a!="string"||a.length===0||ai.test(a))return"";let{d:e,timeZone:t}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleTimeString(ut(n),{...ri(n),timeZone:t})}function R(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(ut(n),{month:"short",day:"numeric",year:"numeric",timeZone:t})}function ia(n,a){return a?$n(Rt(n,a.start),Rt(n,a.end)):""}function xt(n,a,e){return $n(R(n,a),R(n,e))}function Ga(n,a,e){if(typeof a!="string"||a.length===0)return"";if(e==="year")return a.match(/^(\d{4})/)?.[1]??a;let{d:t,timeZone:r}=_r(a);return Number.isNaN(t.getTime())?a:t.toLocaleString(ut(n),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?ri(n):{},timeZone:r})}function bd(n,a,e,t){return $n(Ga(n,a,t),Ga(n,e,t))}function Mr(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(ut(n),{month:"short",day:"numeric",timeZone:t})}function vd(n,a,e){let t=Mr(n,a),r=Mr(n,e);return t===r?t:$n(t,r)}function Ld(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(ut(n),{weekday:"short",day:"numeric",timeZone:t})}function Xs(n,a,e){return typeof a!="number"||!Number.isFinite(a)||typeof e!="number"||!Number.isInteger(e)||e<1||e>12?"":new Date(Date.UTC(a,e-1,1,12)).toLocaleDateString(ut(n),{month:"long",year:"numeric",timeZone:"UTC"})}function si(n,a){return typeof a!="number"||!Number.isInteger(a)||a<1||a>12?"":new Date(Date.UTC(2e3,a-1,1,12)).toLocaleDateString(ut(n),{month:"long",timeZone:"UTC"})}function P(n,a){return typeof a!="number"||!Number.isFinite(a)?"":a.toLocaleString(ut(n),{maximumFractionDigits:0})}function qe(n,a){let e=a.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(ut(n),{style:"long",type:"conjunction"}).format(e)}function b(n,a,e=1){return typeof a!="number"||!Number.isFinite(a)?"":a.toLocaleString(ut(n),{maximumFractionDigits:e})}function we(n,a,e=1){return typeof a!="number"||!Number.isFinite(a)?"":(a/100).toLocaleString(ut(n),{style:"percent",maximumFractionDigits:e})}function Ct(n){return(n.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function Me(n){return A(Ct(n))}var dm={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Nr(n,a,e){let t=typeof a=="string"?dm[a]??S(a):"",r=typeof e=="number"?`${b(n,e,2)}°`:"";return t&&r?`${t} (${r})`:t||r}function V(n,a,e,t=!1){let r=typeof a=="string"&&ai.test(a)&&typeof e=="string"&&xd.test(e)?`${a}T${e}`:a;if(typeof r!="string"||r.length===0)return"";if(ai.test(r))return R(n,r);let{d:s,timeZone:i}=_r(r);return Number.isNaN(s.getTime())?r:s.toLocaleString(ut(n),{month:"short",day:"numeric",year:"numeric",...ri(n),...t?{second:"2-digit"}:{},timeZone:i})}function Js(n,a,e){return $n(V(n,a),V(n,e))}function $d(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleString(ut(n),{month:"short",day:"numeric",year:"numeric",...ri(n),timeZone:"UTC",timeZoneName:"short"})}function wd(){try{return new Intl.DateTimeFormat(ut(void 0)).resolvedOptions().timeZone}catch{return}}function ko(n,a){if(!(typeof a!="string"||!a))return a===n?void 0:a}function wn(n,a){let e=typeof n=="string"?n:"",t=ko(e,a);return e?t?`${e} (${t})`:e:t??""}function ae(n,a,e){return Ys(n,a)??e??S(a)}function I(n,a,e,t){return nd(n,a,e)??t??S(e)}var ni="Localized";function g(n,a,e){let t=n,r=t?.[`${a}${ni}`];if(typeof r=="string"&&r!=="")return r;if(e!==void 0)return e;let s=t?.[a];return typeof s=="string"?s:""}function ii(n,a){let e=n,t=e?.[a];if(!Array.isArray(t))return[];let r=e?.[`${a}${ni}`],s=Array.isArray(r)?r:[];return t.map((i,o)=>{let l=s[o];return{value:String(i),label:typeof l=="string"&&l!==""?l:String(i)}})}function Qs(n){let a;for(let e of Object.keys(n)){if(!e.endsWith(ni))continue;let t=e.slice(0,-ni.length);if(t===""||!(t in n))continue;a??={...n};let r=n[e];r!=null&&r!==""&&(a[t]=r),delete a[e]}return a??n}function kd(n){return!("days"in n)}var Ia=class extends y{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang();return this.mode==="day"&&kd(e)?ie`<article class="card" part="card" aria-labelledby="almanac-title">${this.renderDayCard(e,t)}</article>`:kd(e)?_e:ie`<article class="card" part="card" aria-labelledby="almanac-title"><header class="head" part="header"><h2 class="title" id="almanac-title">${"activityLabel"in e&&e.activityLabel?e.activityLabel:this.t("Almanac")}</h2>${"startDate"in e&&e.startDate?ie`<span class="lunar">${xt(t,e.startDate,e.endDate)}</span>`:_e} ${"year"in e&&typeof e.year=="number"?ie`<span class="lunar">${Xs(t,e.year,e.month)||e.year}</span>`:_e} ${typeof e.total=="number"?ie`<span class="lunar">${this.t("{{count}} days",{count:P(t,e.total)})}</span>`:_e}</header>${"avoidAnimal"in e&&e.avoidAnimal?ie`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Avoiding")}</span><b>${S(g(e,"avoidAnimal"))}</b></span></div>`:_e} ${this.renderSolarTerms(e,t)}<section part="section days"><ul class="days">${(e.days??[]).map(r=>this.renderDayRow(r,t))}</ul></section></article>`}renderDayCard(e,t){let r=e.dayOfficer;return ie`<header class="head" part="header"><h2 class="title" id="almanac-title">${R(t,e.date)}</h2>${e.lunar?ie`<span class="lunar">${e.lunar.isLeapMonth?this.t("Lunar {{month}}/{{day}} (leap)",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")}):this.t("Lunar {{month}}/{{day}}",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")})}</span>`:_e} ${r?.name?ie`<span class="roxy-chip tag tag-${r.quality??"neutral"}">${g(r,"name")} <span lang="zh">${r.chinese??""}</span></span>`:_e}</header>${this.renderPillars(e)} ${this.renderLists(e,t)} ${r?.meaning&&!this.hideReadings?ie`<p class="meaning" part="reading">${r.meaning}</p>`:_e} ${this.renderMansion(e)}`}renderPillars(e){let r=[["Year",e.yearPillar],["Month",e.monthPillar],["Day",e.dayPillar]].filter(([,s])=>s?.chinese||s?.stem);return r.length===0&&!e.clashAnimal?_e:ie`<div class="facts" part="details">${r.map(([s,i])=>ie`<span><span class="roxy-label">${this.t(s)}</span> <b lang="zh">${i?.chinese??""}</b> ${i?.naYin??""}</span>`)} ${e.clashAnimal?ie`<span><span class="roxy-label">${this.t("Clash")}</span><b>${g(e,"clashAnimal")}</b></span>`:_e}</div>`}renderLists(e,t){let r=e.favours??[],s=e.avoids??[];return r.length===0&&s.length===0?_e:ie`<div class="lists" part="section activities">${r.length?ie`<div class="list"><h3>${this.t("Favours")}</h3><div class="roxy-chips chips-favour">${r.map(i=>ie`<span class="roxy-chip">${I(t,"activity",i)}</span>`)}</div></div>`:_e} ${s.length?ie`<div class="list"><h3>${this.t("Avoids")}</h3><div class="roxy-chips chips-avoid">${s.map(i=>ie`<span class="roxy-chip">${I(t,"activity",i)}</span>`)}</div></div>`:_e}</div>`}renderMansion(e){let t=e.mansion;return t?.name?ie`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Mansion")}</span><b>${g(t,"name")}</b> <span lang="zh">${t.chinese??""}</span></span> ${t.palace?ie`<span>${S(t.palace)}</span>`:_e} ${t.planet?ie`<span>${t.planet}</span>`:_e} ${t.animal?ie`<span>${g(t,"animal")}</span>`:_e}</div>`:_e}renderSolarTerms(e,t){let r="solarTerms"in e?e.solarTerms??[]:[];return r.length===0?_e:ie`<div class="terms" part="details">${r.map(s=>ie`<span>${Mr(t,s.date)} ${s.name??""}</span>`)}</div>`}renderDayRow(e,t){let r=e.dayOfficer,s=e.favours??[];return ie`<li class="day" part="label-track"><span class="day-date">${Mr(t,e.date)}</span><div class="day-body"><span lang="zh">${e.dayPillar?.chinese??""}</span> ${r?.name?ie`<span class="roxy-chip tag tag-${r.quality??"neutral"}">${g(r,"name")}</span>`:_e} ${s.length?ie`<span class="roxy-chips chips-favour">${s.map(i=>ie`<span class="roxy-chip">${I(t,"activity",i)}</span>`)}</span>`:_e} ${e.clashAnimal?ie`<span class="roxy-label">${this.t("Clash")} ${g(e,"clashAnimal")}</span>`:_e}</div></li>`}};Ia.endpoints=Pl,Ia.styles=[u,pm`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.list h3{margin:0}.list h3{margin-block-end:var(--roxy-space-xs)}.lunar{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}:is(.tag-auspicious,.chips-favour>*){color:var(--roxy-success-fg)}:is(.tag-inauspicious,.chips-avoid>*){color:var(--roxy-danger-fg)}.tag-neutral{color:var(--roxy-info-fg)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.meaning{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin:0;padding-block-start:var(--roxy-space-md)}.days{margin:0;padding:0;list-style:none;display:grid}.day{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);display:grid}.day:first-child{border-block-start:0;padding-block-start:0}.day-date{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.day-body{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.terms{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}`],m([hm({type:String,reflect:!0})],Ia.prototype,"mode",2),Ia=m([f("roxy-almanac-day")],Ia);import{css as gm,html as _t,nothing as oa}from"lit";var mm=[{key:"spiritual",source:"Spiritual"},{key:"love",source:"Love"},{key:"career",source:"Career"},{key:"money",source:"Money"},{key:"twinFlame",source:"Twin flame"}];function oi(n,a,e,t){let r=[];if(a)for(let s of mm){let i=a[s.key];i&&r.push({label:n(s.source),body:i})}return e&&r.push({label:n("Biblical"),body:e}),t&&r.push({label:n("Shadow"),body:t}),r}var ym={positive:"success",cautionary:"danger",neutral:"info"},zr=class extends y{renderData(a){let e=(a.energy??"").toLowerCase(),t=a.keywords??[],r=a.actionSteps??[];return _t`<article class="card" part="card" aria-label="${`${this.t("Angel number")} ${a.number??""}`}"><div class="hero" part="header">${a.number?_t`<div class="numeral">${a.number}</div>`:oa}<div><p class="roxy-label">${this.t("Angel number")}</p>${a.title?_t`<h2>${a.title}</h2>`:oa}</div></div>${a.coreMessage&&!this.hideReadings?_t`<p>${a.coreMessage}</p>`:oa}<ul class="badges roxy-chips" part="details">${a.type?_t`<li>${a.type}</li>`:oa} ${typeof a.digitRoot=="number"?_t`<li>${this.t("Digit root")} ${a.digitRoot}</li>`:oa} ${a.energy?_t`<li class="roxy-chip" data-tone="${ym[e]??oa}">${a.energy}</li>`:oa}</ul>${t.length>0&&!this.hideReadings?_t`<ul class="roxy-chips">${t.map(s=>_t`<li>${s}</li>`)}</ul>`:oa} ${this.renderSections(a)} ${a.affirmation&&!this.hideReadings?_t`<p class="affirmation">${a.affirmation}</p>`:oa} ${r.length>0&&!this.hideReadings?_t`<div class="steps" part="section action-steps"><h3>${this.t("Action steps")}</h3><ul>${r.map(s=>_t`<li>${s}</li>`)}</ul></div>`:oa}</article>`}renderSections(a){return this.renderInterpretation(oi(this.translator,a.meaning,a.biblical,a.shadow),"angel-meaning","Reading")}};zr.endpoints=Ml,zr.styles=[u,j,gm`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm);grid-template-columns:minmax(0,1fr);display:grid}}.badges>li{text-transform:capitalize}.affirmation{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);font-style:italic}.steps h3{margin-block-end:var(--roxy-space-xs)}.steps ul{gap:calc(var(--roxy-space-unit) / 2);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}`],zr=m([f("roxy-angel-number-card")],zr);import{css as um,html as fe,nothing as Se}from"lit";var fm={positive:"Positive energy",neutral:"Neutral energy",cautionary:"Cautionary energy"},xm={positive:"success",cautionary:"warning"},Or=class extends y{renderData(a){let e=a.knownMeaning,t=a.digitRootMeaning,r=e?.title??this.t("Number analysis"),s=e?.actionSteps??[];return fe`<article class="card" part="card" aria-label="${this.t("Angel number {{number}}",{number:a.number??""})}"><div class="hero" part="header">${a.number?fe`<div class="numeral">${a.number}</div>`:Se}<div>${e?.title?fe`<p class="roxy-label">${this.t("Number analysis")}</p>`:Se}<h2>${r}</h2></div></div><ul class="badges roxy-chips" part="details">${a.type?fe`<li>${a.type}</li>`:Se} ${typeof a.digits=="number"?fe`<li>${this.t("{{count}} digits",{count:a.digits})}</li>`:Se} ${typeof a.uniqueDigits=="number"?fe`<li>${this.t("{{count}} unique",{count:a.uniqueDigits})}</li>`:Se} ${typeof a.digitRoot=="number"?fe`<li>${this.t("Digit root {{n}}",{n:a.digitRoot})}</li>`:Se} ${a.isPalindrome?fe`<li class="roxy-chip" data-tone="info">${this.t("Palindrome")}</li>`:Se} ${a.isRepeating?fe`<li class="roxy-chip" data-tone="info">${this.t("Repeating")}</li>`:Se} ${e?.energy?fe`<li class="roxy-chip" data-tone="${xm[e.energy]??Se}">${this.t(fm[e.energy]??"Neutral energy")}</li>`:Se}</ul>${a.contextNote?fe`<div class="context" part="section context"><p class="roxy-label">${this.t("Where you saw it")}</p><p>${a.contextNote}</p></div>`:Se} ${e&&!this.hideReadings?fe`<div class="section" part="section known-meaning"><p class="roxy-label">${this.t("Known angel number")}</p>${e.coreMessage?fe`<p>${e.coreMessage}</p>`:Se} ${e.keywords&&e.keywords.length>0?fe`<ul class="roxy-chips">${e.keywords.map(i=>fe`<li>${i}</li>`)}</ul>`:Se} ${this.renderMeaning(e.meaning,"lookup-known",e.biblical,e.shadow)} ${e.affirmation?fe`<p><em>${e.affirmation}</em></p>`:Se} ${s.length>0?fe`<p class="roxy-label">${this.t("What to do next")}</p><ol class="steps">${s.map(i=>fe`<li>${i}</li>`)}</ol>`:Se}</div>`:Se} ${t&&!this.hideReadings?fe`<div class="section" part="section digit-root"><p class="roxy-label">${t.number?this.t("Foundational digit root ({{n}})",{n:t.number}):this.t("Foundational digit root")}</p>${t.title?fe`<h3>${t.title}</h3>`:Se} ${t.coreMessage?fe`<p>${t.coreMessage}</p>`:Se} ${e?Se:this.renderRootMeaning(t)}</div>`:Se}</article>`}renderMeaning(a,e,t,r){return this.renderInterpretation(oi(this.translator,a,t,r),e,"Reading")}renderRootMeaning(a){return fe`${a.keywords&&a.keywords.length>0?fe`<ul class="roxy-chips">${a.keywords.map(e=>fe`<li>${e}</li>`)}</ul>`:Se}${this.renderMeaning(a.meaning,"lookup-root")}${a.affirmation?fe`<p><em>${a.affirmation}</em></p>`:Se}`}};Or.endpoints=_l,Or.styles=[u,M,j,um`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm);grid-template-columns:minmax(0,1fr);display:grid}}.badges>li{text-transform:capitalize}.context{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);display:grid}.steps{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.section{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.section p{font-size:var(--roxy-text-sm)}`],Or=m([f("roxy-angel-number-lookup")],Or);import{css as Cm,html as Ba,nothing as Sn}from"lit";var en=(n,a)=>a?n[St(a)]:void 0,bm={sun:"☉",moon:"☽",mercury:"☿",venus:"♀",earth:"♁",mars:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",rahu:"☊",ketu:"☋",ascendant:"Asc",midheaven:"MC","part of fortune":"⊗",vertex:"Vx",lagna:"La","north node":"☊","south node":"☋",chiron:"⚷",lilith:"⚸","black moon lilith":"⚸"},$=n=>en(bm,n),vm={sun:"Su",moon:"Mo",mercury:"Me",venus:"Ve",mars:"Ma",jupiter:"Ju",saturn:"Sa",uranus:"Ur",neptune:"Ne",pluto:"Pl",rahu:"Ra",ketu:"Ke",ascendant:"Asc",lagna:"La"},Rd=n=>en(vm,n),Lm={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},N=n=>en(Lm,n),$m={aries:"Ar",taurus:"Ta",gemini:"Ge",cancer:"Cn",leo:"Le",virgo:"Vi",libra:"Li",scorpio:"Sc",sagittarius:"Sg",capricorn:"Cp",aquarius:"Aq",pisces:"Pi"},li=n=>en($m,n),Re=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],wm={conjunction:"☌",semisextile:"⚺","semi sextile":"⚺",semisquare:"∠","semi square":"∠",sextile:"⚹",square:"□",trine:"△",sesquiquadrate:"⚼",quincunx:"⚻",opposition:"☍"},tn=n=>en(wm,n),km={heaven:"☰",lake:"☱",fire:"☲",thunder:"☳",wind:"☴",water:"☵",mountain:"☶",earth:"☷"},So=n=>en(km,n),Sd={"new moon":"🌑","waxing crescent":"🌒","first quarter":"🌓","waxing gibbous":"🌔","full moon":"🌕","waning gibbous":"🌖","last quarter":"🌗","waning crescent":"🌘"},Cd=n=>{if(!n)return;let a=St(n),e=a.replace(/ moon$/,""),t=e==="third quarter"?"last quarter":e;return Sd[a]??Sd[t]};import{css as Sm}from"lit";var re=Sm`.roxy-facts{gap:var(--roxy-space-sm) var(--roxy-space-lg);margin:var(--roxy-space-sm) 0 0;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;flex-wrap:wrap;display:flex}.roxy-facts>div{min-width:0}.roxy-facts dd{overflow-wrap:anywhere;margin:0}`;import{css as Rm,html as kn,nothing as ci}from"lit";var G=Rm`.roxy-frame{color:var(--roxy-muted);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-normal);margin:0}.roxy-frame .roxy-frame-deg{font-variant-numeric:tabular-nums}`;function X(n,a,e){if(!a?.ayanamsa)return ci;let t=Nr(n,a.ayanamsa);if(!t)return ci;let r=typeof a.ayanamsaDegrees=="number"?b(n,a.ayanamsaDegrees,4):void 0;return kn`<p class="roxy-frame">${r===void 0?e("Sidereal frame: {{frame}}",{frame:t}):e("Sidereal frame: {{frame}}, {{degrees}}° subtracted",{frame:t,degrees:r})}</p>`}function Fa(n,a,e){let t=[];return n?.yearBoundary&&t.push(["Year boundary","yearBoundary",n.yearBoundary]),n?.dayBoundary&&t.push(["Day boundary","dayBoundary",n.dayBoundary]),n?.hourClock&&t.push(["Hour clock","hourClock",n.hourClock]),t.length===0?ci:kn`<p class="roxy-frame">${t.map(([r,s,i],o)=>kn`${o>0?" · ":""}${a(r)}: <span class="roxy-frame-deg" title="${i}">${I(e,s,i)}</span>`)}</p>`}function Td(n,a,e){let t=Object.values(a??{}).filter(r=>!!r?.ayanamsa);return t.length===0?ci:kn`<div class="roxy-frame">${t.map(r=>{let s=Nr(n,r.ayanamsa),i=typeof r.ayanamsaDegrees=="number"?b(n,r.ayanamsaDegrees,4):void 0,o=r.governs?.length?r.governs.join(", "):"";return kn`<p class="roxy-frame">${i===void 0?e("Sidereal frame: {{frame}}",{frame:s}):e("Sidereal frame: {{frame}}, {{degrees}}° subtracted",{frame:s,degrees:i})}${o?e(", governs {{sections}}",{sections:o}):""}</p>`})}</div>`}var Tm=new Set(["a1","a12"]),Gr=class extends y{renderData(a){let e=a.padas??[];if(!e.length)return this.renderEmpty();let t=e.filter(r=>r.exceptionApplied).length;return Ba`<div class="wrap" part="card" aria-label="${this.t("Arudha padas")}"><header class="head" part="header"><h2>${this.t("Arudha padas")}</h2>${X(this.effectiveLang(),a.frame,this.translator)}</header><dl class="roxy-facts" part="details"><div><dt>${this.t("Lagna")}</dt><dd>${a.lagnaRashi??""}</dd></div><div><dt>${this.t("Arudha Lagna")}</dt><dd>${a.arudhaLagna??""}</dd></div><div><dt>${this.t("Upapada")}</dt><dd>${a.upapada??""}</dd></div></dl><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Arudha padas")}"><table role="table"><caption class="roxy-sr-only">${this.t("The twelve Arudha padas: each pada with its bhava, the bhava sign and its lord, the sign the lord occupies, the sign the pada falls in, which house from the Lagna that is, whether the classical exception was applied, and what the pada is read for.")}</caption><thead><tr><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Bhava")}</th><th scope="col">${this.t("Bhava rashi")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Lord rashi")}</th><th scope="col">${this.t("Pada rashi")}</th><th scope="col">${this.t("From Lagna")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map(r=>this.renderRow(r))}</tbody></table></div>${t>0?Ba`<p class="note" part="legend"><span class="exception">${this.t("Moved")}</span> ${this.t("marks a pada that fell in its own bhava or the seventh from it and was moved to the tenth from there, as the classical rule requires. {{count}} of {{total}} padas here.",{count:t,total:e.length})}</p>`:Sn}</div>`}renderRow(a){let e=r=>N(r)??"",t=r=>{let s=e(r);return Ba`${s?Ba`<span class="glyph">${s}</span>`:Sn}${r??""}`};return Ba`<tr class="${Tm.has(a.id)?"lead-row":""}"><td class="pada">${a.name??""}${a.abbreviation?Ba`<span class="abbr">${a.abbreviation}</span>`:Sn}</td><td>${a.house??""}</td><td>${t(a.bhavaRashi)}</td><td>${a.lord??""}</td><td>${t(a.lordRashi)}</td><td>${t(a.rashi)} ${a.exceptionApplied?Ba`<span class="exception">${this.t("Moved")}</span>`:Sn}</td><td>${a.houseFromLagna??""}</td><td class="meaning"><strong>${a.meaning??""}</strong> ${a.significations?Ba`<p>${a.significations}</p>`:Sn}</td></tr>`}};Gr.endpoints=Nl,Gr.styles=[u,G,re,Cm`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,p{margin:0}.roxy-facts{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);margin:0}.roxy-facts dd{font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.lead-row td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}td.pada{font-weight:var(--roxy-weight-bold)}.abbr{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);margin-inline-start:var(--roxy-space-xs)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}tbody tr.lead-row :is(.abbr,.glyph){color:var(--roxy-accent-ink)}.exception{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.meaning{white-space:normal;min-width:20ch}.meaning strong{display:block}.meaning p,.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.note{padding:var(--roxy-space-md)}`],Gr=m([f("roxy-arudha-padas")],Gr);import{css as Dm,html as Ne,nothing as Dd}from"lit";import{state as Am}from"lit/decorators.js";import{css as Em,html as Ro,nothing as Ed}from"lit";var Xe=Em`.roxy-tablist{gap:var(--roxy-space-xs);box-shadow:inset 0 calc(var(--roxy-line-thick) * -1) 0 var(--roxy-border);scrollbar-width:thin;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);border:none;border-bottom:var(--roxy-line-thick) solid transparent;cursor:pointer;color:var(--roxy-muted);transition:color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;flex-shrink:0}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink);border-bottom-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg)}.roxy-tab:focus-visible{outline-offset:calc(var(--roxy-line-thick) * -1);border-radius:var(--roxy-radius-sm)}`;function dt(n){let{items:a,active:e,onSelect:t,label:r,idPrefix:s,controls:i=!1}=n;return Ro`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${r}" @keydown="${l=>{if(l.key!=="ArrowRight"&&l.key!=="ArrowLeft")return;l.preventDefault();let c=a.findIndex(x=>x.id===e);if(c===-1)return;let d=l.key==="ArrowRight"?1:-1,p=a[(c+d+a.length)%a.length];if(!p)return;t(p.id);let h=l.currentTarget.getRootNode();requestAnimationFrame(()=>{h.querySelector(`#${s}-tab-${p.id}`)?.focus()})}}">${a.map(l=>Ro`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${l.id}" aria-selected="${e===l.id?"true":"false"}" aria-controls="${i?`${s}-panel-${l.id}`:Ed}" tabindex="${e===l.id?"0":"-1"}" @click="${()=>t(l.id)}">${l.label}</button>`)}</div>${i?a.filter(l=>l.id!==e).map(l=>Ro`<div role="tabpanel" id="${s}-panel-${l.id}" aria-labelledby="${s}-tab-${l.id}" hidden></div>`):Ed}`}var Pm=[{id:"sarva",source:"Sarvashtakavarga"},{id:"bhinna",source:"Bhinnashtakavarga"},{id:"reduced",source:"Reduced"},{id:"pinda",source:"Shodhya Pinda"}],Ha=class extends y{constructor(){super(...arguments);this.activeTab="sarva"}renderData(e){let t=e.signs??[];return Ne`<div class="wrap" part="card" aria-label="${this.t("Ashtakavarga grid")}"><div class="head" part="header"><h2 class="title">${this.t("Ashtakavarga")}</h2>${t.length?Ne`<p class="subtitle">${this.t("{{count}} signs",{count:t.length})}</p>`:Dd} ${X(this.effectiveLang(),e.frame,this.translator)}</div>${dt({items:Pm.map(({id:r,source:s})=>({id:r,label:this.t(s)})),active:this.activeTab,onSelect:r=>{this.activeTab=r},label:this.t("Ashtakavarga views"),idPrefix:"ashtakavarga",controls:!0})}<div id="ashtakavarga-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="ashtakavarga-tab-${this.activeTab}">${this.activeTab==="sarva"?this.renderSarva(t):this.activeTab==="bhinna"?this.renderBhinna(t):this.activeTab==="reduced"?this.renderReduced(t):this.renderPinda()}</div></div>`}bhinnaTier(e){return e<=1?"tier-1":e<=2?"tier-2":e<=3?"tier-3":e<=4?"tier-4":e<=5?"tier-5":e<=6?"tier-6":"tier-7"}sarvaTier(e){return e<=20?"tier-1":e<=24?"tier-2":e<=27?"tier-3":e<=29?"tier-4":e<=32?"tier-5":e<=36?"tier-6":"tier-7"}renderLegend(e){return Ne`<div class="legend" part="legend"><span>${this.t("Fewer bindus")}</span> <span class="legend-scale" aria-hidden="true">${[1,2,3,4,5,6,7].map(t=>Ne`<span class="legend-swatch tier-${t}"></span>`)} </span><span>${this.t("More bindus")}</span> <span class="legend-note">${e}</span></div>`}renderSarva(e){let t=this.data?.sarvashtakavarga;return t?Ne`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Sarvashtakavarga")}"><table><caption class="roxy-sr-only">${this.t("Sarvashtakavarga: each of the twelve signs and the bindus all planets contribute to it, with a grand total.")}</caption><thead><tr><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Bindus")}</th></tr></thead><tbody>${e.map((r,s)=>{let i=t.bindus[s]??0;return Ne`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${N(r)??""}</span> ${r}</div></td><td class="${`bindu-cell ${this.sarvaTier(i)}`}">${i}</td></tr>`})}</tbody><tfoot><tr class="total-row"><td>${this.t("Total")}</td><td>${t.total}</td></tr></tfoot></table></div>${this.renderLegend("Under 25 is a weak sign, 25 to 29 average, 30 and above strong. The 12 signs always total 337.")}`:Ne`<p class="roxy-empty">${this.t("No sarvashtakavarga data")}</p>`}renderBhinna(e){let t=this.data?.bhinnashtakavarga;return t?.length?Ne`${this.renderBinduGrid(e,t,"Bhinnashtakavarga: the bindus each planet scores in every one of the twelve signs, with a row total.","Bhinnashtakavarga")} ${this.renderLegend("Each planet scores 0 to 8 bindus per sign. 4 is the mid, 5 and above is strong support for that planet in that sign.")}`:Ne`<p class="roxy-empty">${this.t("No bhinnashtakavarga data")}</p>`}renderReduced(e){let t=this.data?.reducedBhinnashtakavarga,r=this.data?.reducedSarvashtakavarga;return!t?.length&&!r?Ne`<p class="roxy-empty">${this.t("No reduced ashtakavarga data")}</p>`:Ne`${this.renderBinduGrid(e,t??[],"Reduced Bhinnashtakavarga after Shodhana: the bindus each planet keeps in every one of the twelve signs, with a row total and a Reduced Sarvashtakavarga totals row.","Reduced",r)} ${this.renderLegend("Bindus left after Trikona and Ekadipati Shodhana, the input to Shodhya Pinda. The Reduced SAV row totals the seven planets only, so it does not include the Lagna row above it.")}`}renderBinduGrid(e,t,r,s,i){return t.length?Ne`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t(s)}"><table class="bhinna-table"><caption class="roxy-sr-only">${r}</caption><thead><tr><th scope="col">${this.t("Planet")}</th>${e.map(o=>Ne`<th scope="col" title="${o}">${N(o)??o}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(o=>Ne`<tr><td>${o.planet}</td>${o.bindus.map(l=>Ne`<td class="${`bindu-cell ${this.bhinnaTier(l)}`}">${l}</td>`)}<td>${o.total}</td></tr>`)}</tbody>${i?Ne`<tfoot><tr class="total-row"><td>${this.t("Reduced SAV")}</td>${e.map((o,l)=>Ne`<td>${i.bindus[l]??0}</td>`)}<td>${i.total}</td></tr></tfoot>`:Dd}</table></div>`:Ne`<p class="roxy-empty">${this.t("No bindu data")}</p>`}renderPinda(){let e=this.data?.shodhyaPinda;return e?.length?Ne`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Shodhya Pinda")}"><table><caption class="roxy-sr-only">${this.t("Shodhya Pinda: each planet with its Rashi Pinda, Graha Pinda and Shodhya Pinda strength scores.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Rashi Pinda")}</th><th scope="col">${this.t("Graha Pinda")}</th><th scope="col">${this.t("Shodhya Pinda")}</th></tr></thead><tbody>${e.map(t=>Ne`<tr><td>${t.planet}</td><td>${t.rashiPinda}</td><td>${t.grahaPinda}</td><td>${t.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:Ne`<p class="roxy-empty">${this.t("No shodhya pinda data")}</p>`}};Ha.endpoints=zl,Ha.styles=[u,G,Xe,Dm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.subtitle{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}[role=tabpanel]:not([hidden]){gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.overflow-scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){text-align:center}:is(th,td):first-child{text-align:start}.glyph{font-size:var(--roxy-text-base);line-height:1}.planet-cell{align-items:center;gap:var(--roxy-space-xs);white-space:nowrap;display:flex}.total-row td{font-weight:var(--roxy-weight-bold);border-block-start:var(--roxy-line-thick) solid var(--roxy-border);border-block-end:0}.bindu-cell{min-width:3ch;font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;color:var(--roxy-fg)}.tier-1{background:color-mix(in srgb, var(--roxy-heat) 30%, transparent)}.tier-2{background:color-mix(in srgb, var(--roxy-heat) 17%, transparent)}.tier-3{background:color-mix(in srgb, var(--roxy-heat) 7%, transparent)}.tier-4{background:color-mix(in srgb, var(--roxy-border) 45%, transparent)}.tier-5{background:color-mix(in srgb, var(--roxy-success) 16%, transparent)}.tier-6{background:color-mix(in srgb, var(--roxy-success) 32%, transparent)}.tier-7{background:color-mix(in srgb, var(--roxy-success) 50%, transparent)}.legend{align-items:center;gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend-scale{gap:1px;display:flex}.legend-swatch{block-size:.75lh;inline-size:2ch}.legend-note{flex:24ch}.bhinna-table :is(th,td):first-child{min-width:8ch}@container (width<=480px){.bhinna-table :is(th,td){padding:var(--roxy-space-xs);font-size:var(--roxy-text-xs)}.bhinna-table :is(th,td):first-child{min-width:6ch}.bindu-cell{min-width:2ch}}`],m([Am()],Ha.prototype,"activeTab",2),Ha=m([f("roxy-ashtakavarga-grid")],Ha);import{css as zm,html as de,nothing as ze}from"lit";import{css as Md}from"lit";var va=Md`.aspect-trine,.aspect-sextile{--_aspect:var(--roxy-info);--_aspect-ink:var(--roxy-info-fg)}.aspect-square,.aspect-opposition{--_aspect:var(--roxy-danger);--_aspect-ink:var(--roxy-danger-fg)}.aspect-quincunx,.aspect-semi-sextile{--_aspect:var(--roxy-success);--_aspect-ink:var(--roxy-success-fg)}.aspect-conjunction{--_aspect:var(--roxy-accent-ink);--_aspect-ink:var(--roxy-accent-ink)}:is(.aspect-trine,.aspect-sextile,.aspect-square,.aspect-opposition,.aspect-quincunx,.aspect-semi-sextile,.aspect-conjunction){color:var(--_aspect-ink);stroke-opacity:1}.aspect-swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_aspect);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`,an=[Md`.aspect{stroke:var(--_aspect,var(--roxy-muted));stroke-width:.8px;fill:none;opacity:.55;stroke-opacity:.7}`,va],Mm=new Set(["conjunction","sextile","square","trine","opposition"]);function ja(n){return Mm.has(Ct(n))}function Je(n){return`aspect-${Ct(n)}`}var Ad=.3,_m=.9,Pd=.5,Nm=1.8;function rn(n){let{strength:a}=n;if(typeof a!="number"||!Number.isFinite(a))return;let e=Math.min(1,Math.max(0,a/100)),t=Ad+e*(_m-Ad),r=Pd+e*(Nm-Pd);return`opacity:${t.toFixed(3)};stroke-width:${r.toFixed(3)}`}function Om(n,a,e){if(n.include?.length){let t={bodies:qe(a,n.include)};return n.strictOrbs?e("Detected with strict orbs, including {{bodies}}.",t):e("Detected with industry-standard orbs, including {{bodies}}.",t)}return n.strictOrbs?e("Detected with strict orbs, classical bodies only."):e("Detected with industry-standard orbs, classical bodies only.")}var _d={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},Ir=class extends y{renderData(a){let e="aspects"in a?a.aspects??[]:[],t="patterns"in a?a.patterns??[]:[],r="summary"in a?a.summary:void 0;if(e.length===0&&t.length===0)return this.renderEmpty();let s=V(this.effectiveLang(),"transitDate"in a?a.transitDate:"date"in a?a.date:"","time"in a?a.time:void 0,!0),i="timezone"in a?a.timezone:void 0,o="options"in a?a.options:void 0;return de`<div class="wrap" part="card" aria-label="${this.t("Aspects")}"><div class="head" part="header"><h2>${e.length===0?this.t("Chart patterns"):this.t("Aspects")}</h2>${e.length>0||s?de`<p class="subtitle roxy-label">${[e.length===1?this.t("1 aspect"):e.length>1?this.t("{{count}} aspects",{count:e.length}):"",s].filter(Boolean).join(" · ")}</p>`:ze} ${typeof i=="number"&&Number.isFinite(i)?de`<dl class="roxy-facts" part="details"><div><dt>${ae(this.effectiveLang(),"timezone")}</dt><dd>${b(this.effectiveLang(),i,5)}</dd></div></dl>`:ze}</div>${r?this.renderSummary(r):ze} ${r&&"strongest"in r&&r.strongest?this.renderStrongest(r.strongest):ze} ${e.length>0?de`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((l,c)=>de`<div role="listitem">${this.renderAspect(l,c)}</div>`)}</div>`:ze} ${t.length>0?de`<section class="patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${[...t].sort((l,c)=>(_d[l.kind]??9)-(_d[c.kind]??9)||(c.tightness??0)-(l.tightness??0)).map(l=>this.renderPattern(l))}</section>`:ze} ${o?de`<p class="provenance">${Om(o,this.effectiveLang(),this.translator)}</p>`:ze}</div>`}renderSummary(a){let e="totalAspects"in a?a.totalAspects:a.total,t=Object.entries(a.byType??{}).sort((r,s)=>s[1]-r[1]);return de`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?de`<span>${this.t("Total")}: ${e}</span>`:ze} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:a.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:a.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:a.neutral})}</span> ${t.map(([r,s])=>de`<span>${Me({type:r})}: ${s}</span>`)}</p>`}renderStrongest(a){let e=$(a.planet1)??"",t=$(a.planet2)??"";return de`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${e}</span>${g(a,"planet1")} <span class="asp-name ${Je(a)}">${g(a,"type",Me(a))}</span> <span aria-hidden="true" class="glyph">${t}</span>${g(a,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:a.isApplying?this.t("Applying"):this.t("Separating"),orb:b(this.effectiveLang(),a.orb,2),strength:b(this.effectiveLang(),a.strength,0)})}</span></div>`}renderAspect(a,e){let t=$(a.planet1)??"",r=$(a.planet2)??"",s=Me(a),i=a.isApplying?this.t("Applying"):this.t("Separating"),o="meaning"in a?a.meaning:void 0,l="transitInterpretation"in a?a.transitInterpretation:void 0,c="aspectInterpretation"in a?a.aspectInterpretation:void 0,d=!!(o||l||c),p=de`<span aria-hidden="true" class="glyph">${t}</span>${g(a,"planet1")} <span class="asp-name ${Je(a)}">${g(a,"type",s)}</span> <span aria-hidden="true" class="glyph">${r}</span>${g(a,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:i,orb:b(this.effectiveLang(),a.orb,2),strength:b(this.effectiveLang(),a.strength,0)})}</span>`;return!d||this.hideReadings?de`<div class="interp-card" part="reading"><div class="static-head">${p}</div></div>`:de`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${p}${H()}</summary><div class="interp-body" part="readings">${o?this.renderMeaning(o):ze} ${l?this.renderTransit(l):ze} ${c?Ln(c,this.translator):ze}</div></details>`}renderMeaning(a){return de`${a.description?.short?de`<p>${a.description.short}</p>`:ze} ${a.description?.long&&a.description.long!==a.description.short?de`<p>${a.description.long}</p>`:ze} ${Pr(a.keywords)}`}renderTransit(a){return Ln(a,this.translator)}renderPattern(a){let e=a.planets??[],t=a.apex?[...e].sort((r,s)=>+(s===a.apex)-+(r===a.apex)):e;return de`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${a.name??a.kind??this.t("Pattern")}</span> ${a.element?de`<span class="roxy-chip">${a.element}</span>`:ze} ${a.modality?de`<span class="roxy-chip">${a.modality}</span>`:ze} ${a.dissociate?de`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:ze} ${typeof a.tightness=="number"?de`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:we(this.effectiveLang(),a.tightness,0)})}</span>`:ze}</div>${t.length?de`<ul class="roxy-chips">${t.map(r=>{let s=$(r),i=!!a.apex&&r===a.apex;return de`<li class="${i?"roxy-chip apex":"roxy-chip"}">${s?de`<span aria-hidden="true">${s}</span>`:ze}${r}${i?de`<span>${this.t("apex")}</span>`:ze}</li>`})}</ul>`:ze} ${a.interpretation&&!this.hideReadings?de`<p class="pattern-interp">${a.interpretation}</p>`:ze}</div>`}};Ir.endpoints=Ol,Ir.styles=[u,re,M,j,va,zm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.interp-card summary,.static-head{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.static-head{font-size:var(--roxy-text-sm)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.strongest,.pattern{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.pattern{gap:var(--roxy-space-xs);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],Ir=m([f("roxy-aspects-table")],Ir);import{css as Hm,html as Vt,nothing as Ka,svg as qt}from"lit";import{css as Gm,html as Nd,nothing as Im}from"lit";var Ce=class{constructor(a){this.host=a;this.state="closed";this.zoom=1;this.pressedBy="";this.press=a=>{this.pressedBy=a.pointerType};this.openOnMouse=a=>{let e=this.pressedBy==="mouse";this.pressedBy="",e&&(a.target?.closest?.("a, button, summary, input, select, textarea")||getSelection()?.toString()||this.open())};a.addController(this)}hostUpdated(){let a=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!a)this.reset();else if(a.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",a.open||a.showModal());let e=a.querySelector(".roxy-chart-scroll");a.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}open(){this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(a){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=a===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=a===0?1:Math.min(3,Math.max(1,this.zoom+a)),this.host.requestUpdate()}renderChartViewport(a,e,t){return Nd`<div class="roxy-chart-view"><div class="roxy-chart-hit" @pointerdown="${this.press}" @click="${this.openOnMouse}">${a}</div><div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>this.open()}">${t("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?Nd`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${t("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${t("Reset zoom")}</button> <button type="button" aria-label="${t("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${t("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${a}</div></div>`:Im}</dialog></div>`}},Ge=Gm`.roxy-chart-view{min-width:0}@media (hover:hover) and (pointer:fine){.roxy-chart-hit{cursor:zoom-in}}.roxy-chart-tools{gap:var(--roxy-space-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font-size:var(--roxy-text-sm);color:var(--roxy-secondary);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);min-width:2lh;min-height:2lh;padding:var(--roxy-space-xs) var(--roxy-space-sm);cursor:pointer;background:0 0}.roxy-chart-tools button:hover:not(:disabled){border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-chart-tools button:disabled{color:var(--roxy-muted);cursor:default}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg);width:calc(100% - 2 * var(--roxy-space-md));max-width:calc(var(--roxy-chart-expanded-width,60rem) * 1.2);max-height:calc(100% - 2 * var(--roxy-space-md));padding:var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);color:var(--roxy-fg);background:var(--roxy-bg);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:color-mix(in oklab, var(--roxy-bg) 85%, transparent)}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);margin-bottom:var(--roxy-space-md);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(var(--roxy-chart-expanded-width,60rem) * var(--chart-zoom)));padding:var(--roxy-space-sm)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;function Tt(n){let a=n%360;return a<0?a+360:a}function Nt(n){let a=Tt(n),e=Math.floor(a/30)%12,t=a%30,r=Math.floor(t),s=(t-r)*60,i=Math.floor(s),o=Math.round((s-i)*60);return{sign:Re[e]??"Aries",signIndex:e,degree:r,minute:i,second:o}}function Qe(n,a){let{sign:e,degree:t,minute:r}=Nt(n);return`${t}° ${a||e} ${String(r).padStart(2,"0")}'`}function jt(n){return Kt(Tt(n)%30)}function Co(n){let a=Math.floor(n);return{degree:a,minute:Math.floor((n-a)*60)}}function Kt(n){let{degree:a,minute:e}=Co(n);return`${a}°${String(e).padStart(2,"0")}'`}function Rn(n){return Tt(n+180)}function di(n,a){let e=Tt(n),t=Tt(a)-e;return t<0&&(t+=360),Tt(e+t/2)}function zt(n,a,e){let t=n.filter(c=>Number.isFinite(a(c))).map(c=>{let d=Tt(a(c));return{item:c,longitude:d,displayLongitude:d}}).sort((c,d)=>c.longitude-d.longitude),r=t.length;if(r<2)return t;let s=0,i=-1;for(let c=0;c<r;c++){let d=t[(c+r-1)%r],h=(t[c].longitude-d.longitude+360)%360;h>i&&(i=h,s=c)}let o=t[s],l=o.longitude;for(let c=1;c<r;c++){let d=t[(s+c)%r],p=typeof e=="function"?e(o.item,d.item):e,h=d.longitude+(s+c>=r?360:0);l=Math.max(h,l+p),d.displayLongitude=Tt(l),o=d}return t}var la=2;function zd(n,a){let e=n*Math.PI/180;return a.width/2*Math.abs(Math.cos(e))+a.height/2*Math.abs(Math.sin(e))}function La(n,a,e,t){let r=n*Math.PI/180,s=(i,o)=>o>1e-9?(i+t)/o:Number.POSITIVE_INFINITY;return Math.min(s((a.width+e.width)/2,Math.abs(Math.cos(r))),s((a.height+e.height)/2,Math.abs(Math.sin(r))))}var Fm=(n,a)=>Math.abs(n.x-a.x)<(n.width+a.width)/2&&Math.abs(n.y-a.y)<(n.height+a.height)/2;function Od(n,a){let e=[],t=r=>e.reduce((s,i)=>Fm(r,i)?Math.max(s,Math.min((r.width+i.width)/2-Math.abs(r.x-i.x),(r.height+i.height)/2-Math.abs(r.y-i.y))):s,0);return[...n].map((r,s)=>({point:r,index:s})).sort((r,s)=>r.point.displayLongitude-s.point.displayLongitude).reduce((r,{point:s,index:i})=>{let o=a(s,0),l=a(s,1),c=t(o)===0||t(o)<=t(l)?0:1;return e.push(c===0?o:l),r[i]=c,r},[])}function Et(n,a){return a>0?n/a*(180/Math.PI):0}function T(n,a,e,t){let r=t*Math.PI/180;return{x:n+e*Math.cos(r),y:a+e*Math.sin(r)}}var Bm={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},Gd=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function Fr(n,a=0){return Bm[A(n)]??Gd[a%Gd.length]??"var(--roxy-accent)"}var Id="M120 170L120 171L118 171L116 171L114 171L114 170L116 170L118 170L119 170L120 170ZM21 169L19 170L18 169L17 169L16 169L17 168L19 168L20 169L21 169ZM135 168L136 168L137 169L137 170L135 170L133 171L132 171L130 171L127 171L126 171L126 170L128 170L129 170L130 169L131 168L132 168L133 168L135 168ZM59 164L60 164L61 163L61 164L60 164L58 164L57 164L58 163L59 164ZM54 163L56 164L55 164L54 164L53 163L54 163ZM81 162L82 162L83 162L84 163L83 162L82 162L81 162L79 163L78 162L80 162L81 162ZM112 161L111 162L110 162L109 163L108 162L107 162L106 162L105 162L106 161L107 161L108 161L108 160L109 159L110 159L111 160L111 161L112 161ZM121 154L120 154L119 154L119 155L118 155L117 155L117 156L118 156L117 156L116 157L115 157L114 158L115 158L115 159L116 159L117 159L117 160L118 160L118 161L119 162L119 163L119 164L118 164L117 165L116 165L114 166L113 166L112 166L110 166L109 167L108 167L106 167L104 167L103 167L105 167L106 168L105 168L104 168L102 168L102 169L103 170L105 170L107 170L109 171L110 171L112 171L114 171L117 172L118 172L120 172L121 173L122 173L123 173L125 173L126 172L128 172L130 172L133 172L135 172L137 172L138 172L139 171L142 171L144 171L146 171L148 171L150 171L151 170L150 170L150 169L148 169L146 169L144 169L144 168L145 168L146 168L148 168L149 167L150 167L151 167L152 166L154 166L155 166L156 166L158 166L159 166L160 166L161 165L162 165L163 165L164 164L165 164L164 164L164 163L165 163L166 163L167 163L168 162L169 162L170 161L171 161L171 162L173 162L173 161L174 161L176 161L177 161L178 161L179 161L180 162L181 161L182 161L183 161L184 161L185 161L186 160L187 160L188 160L190 160L191 161L192 161L192 160L193 160L195 160L196 160L197 160L198 160L199 160L200 160L201 160L202 160L203 161L204 161L205 160L206 160L207 160L208 160L209 160L210 160L211 160L212 160L213 159L214 159L215 159L216 159L217 159L218 160L219 160L220 160L220 159L221 159L222 159L223 158L224 158L225 158L226 158L227 158L228 157L229 157L230 157L231 157L232 156L233 156L234 156L235 156L236 156L237 156L237 157L238 157L239 157L240 157L241 158L242 158L243 158L244 157L245 158L246 158L247 158L248 158L249 158L250 159L250 160L249 160L248 160L248 161L249 161L248 161L248 162L249 162L250 162L251 162L252 162L252 161L253 161L253 160L254 160L256 160L257 160L258 159L259 158L260 158L261 158L262 157L263 157L264 157L265 157L266 157L267 157L268 156L269 157L270 157L271 157L272 157L273 157L274 157L275 157L276 157L277 157L278 157L279 157L280 157L281 157L282 156L283 156L284 156L285 156L286 157L287 157L288 157L289 157L290 157L291 156L292 156L293 156L294 156L295 156L296 157L297 157L299 157L300 157L301 157L302 157L303 156L304 157L305 157L306 157L307 157L308 157L309 157L310 157L311 156L312 156L313 156L314 156L315 156L315 155L316 156L317 157L319 157L320 157L321 157L322 157L323 157L324 157L325 157L326 157L326 158L327 158L328 158L329 158L330 159L331 159L333 159L334 159L335 159L336 159L337 159L338 159L339 160L340 160L341 160L342 161L343 161L344 161L345 161L346 161L347 161L348 161L349 161L351 161L351 162L350 163L349 164L348 164L347 164L346 164L346 165L345 165L344 165L344 166L343 167L344 167L344 168L345 168L347 168L347 169L345 169L344 169L342 169L341 170L340 171L341 171L342 172L344 172L345 173L347 173L349 173L349 174L352 174L353 174L356 174L358 174L360 175L360 180L0 180L0 175L1 174L3 174L4 174L6 175L7 174L10 174L11 174L13 175L16 175L18 175L22 175L25 175L29 175L31 176L34 175L37 175L33 175L30 174L29 174L26 174L27 173L27 172L25 172L25 171L23 171L26 171L28 171L29 171L31 171L33 171L34 170L33 170L32 170L30 169L28 169L27 169L25 169L24 169L23 168L22 168L22 167L23 167L25 167L26 167L27 167L29 167L30 167L31 167L32 167L34 166L34 165L35 165L36 166L37 165L38 165L40 165L41 165L42 165L44 165L45 164L46 164L48 164L49 164L50 164L52 164L53 164L55 165L56 164L57 164L59 165L60 164L61 164L63 164L64 164L65 164L66 164L67 164L68 165L69 164L70 165L71 165L72 165L74 165L75 165L77 165L78 165L79 165L80 165L79 165L79 164L77 164L77 163L76 163L77 163L78 163L80 163L81 163L82 163L82 164L84 164L85 163L86 163L88 163L89 163L90 163L91 163L92 163L93 163L94 163L95 163L96 164L97 164L99 164L99 163L100 163L101 164L102 163L103 164L104 164L105 164L106 164L107 163L108 163L110 163L111 163L112 163L113 162L112 161L112 160L111 160L112 159L113 158L112 158L112 157L113 157L114 156L115 156L116 155L117 155L118 155L119 154L120 154L121 154L121 153L122 153L123 154L122 154L121 154ZM112 144L114 144L115 145L114 145L113 145L112 146L111 145L110 145L109 145L108 144L107 144L105 143L106 143L108 144L109 144L110 143L111 143L112 143L112 144ZM121 141L122 142L121 142L120 142L119 142L120 141L121 142L121 141ZM250 140L249 140L249 139L250 139L251 139L250 140ZM325 131L326 131L327 131L328 131L328 132L328 133L327 134L326 134L325 133L325 132L325 131ZM353 131L354 131L354 132L353 133L353 134L352 134L351 134L351 135L351 136L350 136L349 137L348 137L348 136L347 136L347 135L348 134L349 134L350 134L351 133L352 132L352 131L353 130L353 131ZM355 126L355 127L356 127L356 128L357 128L358 128L359 128L358 129L357 129L357 130L357 131L356 131L355 132L355 131L355 130L354 130L354 129L355 129L355 128L355 127L354 127L354 126L353 125L353 124L354 125L355 126ZM347 112L346 112L345 112L345 111L344 110L345 110L345 111L346 111L347 112ZM358 107L359 108L358 108L357 108L358 107L358 108L358 107ZM359 107L359 106L360 106L360 107L359 107ZM230 104L230 105L230 106L230 105L230 106L230 107L229 107L229 108L229 109L229 110L228 112L228 114L227 115L226 115L225 116L225 115L224 115L224 114L223 113L223 112L223 111L224 111L224 110L224 109L224 108L224 107L224 106L225 106L226 106L227 105L228 105L228 104L229 103L229 102L230 102L230 103L230 104ZM324 104L324 105L325 104L325 105L325 106L326 107L326 108L326 109L327 109L328 110L329 110L329 111L330 112L330 113L331 112L331 113L332 114L333 115L333 116L333 117L334 118L334 119L333 119L333 120L333 121L333 122L332 123L331 124L331 125L330 126L330 127L329 128L328 128L327 128L327 129L326 129L325 129L325 128L324 128L324 129L323 129L322 128L321 128L320 127L320 126L319 126L318 126L318 125L318 124L318 125L317 125L318 124L318 123L317 124L316 124L316 125L315 124L315 123L314 123L313 122L312 122L311 121L310 122L308 122L307 122L306 122L305 123L304 123L304 124L303 124L302 124L301 124L300 124L299 125L299 124L299 125L298 125L297 125L296 124L295 124L296 123L296 122L295 121L295 120L295 119L294 118L294 117L293 117L293 116L294 117L293 116L294 116L294 115L293 114L294 114L294 113L294 112L294 113L295 112L295 111L296 111L297 111L298 110L299 110L300 110L301 110L301 109L302 109L302 108L302 107L303 106L303 107L304 107L304 106L305 105L306 105L306 104L307 104L308 104L308 105L309 105L310 105L309 104L310 104L310 103L311 103L311 102L312 102L313 102L312 101L313 101L314 102L315 102L316 102L317 102L317 103L316 103L316 104L315 105L316 105L316 106L317 106L318 106L318 107L319 107L320 108L321 107L321 106L322 105L322 104L322 103L322 102L322 101L323 101L323 102L324 103L324 104ZM301 100L300 100L299 100L300 99L300 100L301 100ZM341 100L340 100L340 99L341 100ZM342 100L341 99L341 98L341 99L342 100ZM304 100L303 100L304 100L304 99L305 99L306 98L307 98L307 99L306 99L305 99L304 100ZM298 98L299 98L299 99L298 99L297 99L297 98L298 98ZM303 98L303 99L301 99L300 99L300 98L301 98L301 99L302 98L303 98ZM340 98L340 99L339 98L338 97L339 98L340 98ZM289 97L291 97L291 96L293 97L293 98L294 98L296 98L295 99L293 98L292 98L291 98L289 98L288 98L286 97L285 97L286 96L287 96L288 96L289 97ZM315 96L314 97L314 96L314 95L315 96ZM336 97L335 97L335 96L335 95L335 96L336 96L336 97ZM332 95L331 96L330 96L329 96L328 96L328 95L329 96L330 96L330 95L330 96L331 95L332 95L332 94L332 95ZM307 93L307 94L306 94L306 93L307 93ZM310 93L311 94L310 93L309 93L308 93L309 93L310 93ZM333 94L333 95L333 94L332 94L332 93L331 93L332 93L333 94ZM314 91L314 93L315 93L316 92L317 92L318 92L319 92L320 92L321 93L323 93L325 94L326 95L328 96L328 97L327 97L328 98L329 99L329 100L330 100L331 100L331 101L330 101L330 100L329 100L328 100L327 99L326 98L325 98L324 98L323 98L323 99L322 99L321 99L320 98L319 98L318 98L319 97L318 96L318 95L316 95L315 94L314 94L313 94L313 93L312 93L313 92L314 92L312 92L311 91L312 91L312 90L314 91ZM305 89L304 90L303 90L301 90L300 90L300 91L301 91L303 91L302 92L302 93L302 94L303 95L303 96L302 95L303 94L302 95L301 95L302 94L301 94L301 93L300 93L300 94L300 96L299 95L300 94L299 93L299 92L299 91L300 90L300 89L301 89L302 89L303 89L304 89L305 88L305 89ZM309 89L309 90L308 90L308 91L308 90L307 89L308 88L309 88L309 89ZM286 96L285 96L284 95L283 94L282 94L281 93L281 92L280 91L279 90L279 89L279 88L278 88L277 87L276 86L275 85L276 85L277 85L278 86L279 86L280 87L281 88L282 88L282 89L283 89L284 90L283 91L284 91L285 92L286 92L286 93L286 94L286 96ZM298 88L299 89L298 89L297 90L298 91L297 91L297 92L296 94L295 94L294 93L293 93L292 93L291 93L290 93L290 92L290 91L289 90L289 89L290 88L291 88L291 87L292 87L293 87L294 86L294 85L295 85L296 84L297 83L298 84L299 85L298 85L299 86L298 86L297 87L298 88ZM306 82L307 83L306 84L306 83L305 83L306 84L305 84L304 84L304 83L304 82L303 83L302 83L302 82L303 82L303 81L304 82L305 81L305 80L306 81L306 82ZM261 84L260 84L260 83L260 82L260 80L261 81L262 82L262 84L261 84ZM304 80L303 81L302 80L303 80L303 79L303 80L304 79L304 80ZM299 81L297 82L298 81L298 80L299 80L300 79L299 80L299 81ZM302 78L303 78L303 79L302 80L302 79L302 78ZM306 78L306 79L305 79L305 80L305 79L304 79L305 79L305 78L304 77L305 77L306 78ZM302 77L301 78L301 77L300 77L301 77L302 77ZM301 71L302 72L303 73L302 74L302 75L302 76L303 76L304 76L304 77L303 77L303 76L303 77L302 76L301 76L301 75L301 76L300 75L300 74L300 72L301 71ZM114 72L113 72L113 71L114 71L114 72ZM103 72L102 72L102 71L102 72L103 72L104 72L103 72ZM107 70L108 70L109 70L110 70L110 71L111 71L112 71L111 72L110 72L109 72L108 72L107 72L106 72L106 71L107 71L107 72L108 71L107 71L107 70ZM290 71L289 72L289 71L289 70L290 70L291 70L291 71L290 71ZM24 71L24 70L25 70L25 71L24 71ZM100 67L101 68L102 67L102 68L103 68L103 69L104 69L105 69L106 70L105 70L104 70L102 70L103 70L103 69L102 69L101 68L100 68L99 68L98 68L98 67L97 67L97 68L96 68L95 68L96 68L96 67L97 67L98 67L99 67L100 67ZM102 66L102 65L102 66ZM301 67L301 68L300 67L300 66L301 65L302 65L302 66L301 67ZM315 56L314 57L314 56L313 57L312 57L313 56L314 56L315 56ZM215 54L214 55L213 55L212 55L213 55L214 55L215 54ZM204 54L204 55L205 55L206 55L205 55L204 55L204 54ZM196 52L195 53L194 53L192 52L193 52L194 52L195 52L196 52ZM189 49L190 49L190 51L189 51L188 51L188 50L188 49L189 49ZM321 53L321 54L320 55L319 55L317 55L316 57L315 56L315 55L313 56L312 56L311 56L312 57L311 59L310 59L310 58L310 57L309 57L310 56L311 56L312 55L313 55L315 54L316 54L317 53L319 52L320 51L320 49L321 49L322 50L322 51L321 52L321 53ZM190 48L189 49L189 48L189 47L190 48ZM324 46L325 46L326 47L324 47L323 48L322 47L321 48L320 48L320 47L321 47L322 45L322 44L323 45L324 46ZM116 43L117 44L118 44L117 44L116 44L116 43ZM118 41L116 41L115 40L116 40L117 40L118 41ZM56 41L56 42L54 41L53 40L52 40L52 39L53 39L53 40L54 40L55 40L55 41L56 41ZM124 39L123 40L124 40L125 40L124 40L125 41L126 40L127 41L126 41L127 41L127 42L127 43L126 43L126 42L125 43L124 43L125 43L124 42L123 42L121 42L121 41L122 41L123 39L124 38L125 38L124 39ZM47 36L48 36L48 37L49 38L48 38L48 37L47 37L47 36ZM324 39L325 41L323 41L323 42L324 43L324 44L323 43L322 44L322 43L322 42L322 41L322 40L322 39L322 38L322 37L323 36L322 36L323 36L323 37L323 38L324 39ZM173 38L171 38L170 38L171 37L170 36L172 35L173 35L174 35L174 36L174 37L173 38ZM193 34L192 35L191 35L191 34L192 34L193 34ZM27 33L26 33L25 33L26 32L27 32L28 32L27 33ZM177 31L176 32L177 32L178 32L178 33L177 34L178 34L179 35L180 36L180 37L182 37L182 38L181 38L181 39L179 39L178 39L177 39L176 40L175 40L174 40L176 39L177 39L175 38L176 38L175 37L177 37L177 36L176 35L175 35L175 34L174 35L174 34L174 33L174 32L175 31L176 31L177 31ZM14 30L13 30L14 30ZM98 27L97 28L96 28L97 27L98 27ZM8 26L9 26L10 26L10 27L11 27L10 27L9 27L8 27L8 26ZM95 24L95 25L96 25L97 25L98 26L99 26L100 26L99 27L97 26L96 26L94 27L94 26L93 26L94 26L94 25L94 24L95 24ZM165 24L166 25L165 26L162 26L161 27L160 26L157 26L158 26L156 25L158 25L156 24L158 24L159 24L161 24L162 24L164 23L165 24ZM104 23L103 23L103 22L104 22L105 22L105 23L104 23ZM5 23L6 24L5 23L8 23L10 24L9 24L7 25L7 26L6 26L5 25L4 25L3 24L2 25L1 24L0 24L1 25L0 25L0 21L2 22L5 23ZM84 21L82 21L80 21L81 20L82 20L83 20L84 21ZM360 19L359 19L360 18L360 19ZM1 19L0 19L0 18L1 18L2 19L1 19ZM89 21L89 22L91 21L92 21L92 22L93 23L94 22L94 21L94 20L96 20L97 20L99 21L98 22L99 22L99 23L97 24L95 24L94 23L94 24L93 25L92 26L90 26L89 26L89 27L88 27L87 28L86 29L85 30L85 31L87 31L87 32L88 33L89 33L91 33L92 34L93 34L94 34L95 35L97 35L98 35L98 36L98 37L99 38L100 39L101 38L101 37L101 36L100 35L102 35L103 34L103 33L103 32L101 31L103 30L102 29L102 28L103 27L104 28L105 28L106 28L107 28L108 28L109 29L110 29L110 30L111 31L112 31L112 32L114 31L115 30L116 31L117 32L119 33L118 34L120 34L120 35L122 35L123 35L123 36L124 36L124 37L124 38L123 39L121 39L120 40L118 40L116 40L115 40L114 40L113 40L111 41L110 42L109 43L110 43L111 42L113 41L115 41L116 41L115 42L115 43L116 44L117 44L118 44L119 43L120 44L119 45L117 45L116 46L115 46L114 46L116 45L114 45L113 45L112 46L111 46L110 46L109 47L109 48L110 48L109 49L108 49L107 49L106 49L108 49L107 49L106 49L106 50L105 51L104 51L105 51L105 52L104 53L104 52L104 51L103 51L104 52L103 52L104 52L104 53L104 54L104 55L103 55L102 56L101 56L101 57L100 57L99 58L99 59L99 60L99 61L99 62L100 63L100 64L100 65L99 65L99 64L98 64L98 63L97 63L97 62L97 61L96 60L95 60L94 60L92 60L91 60L90 60L91 60L91 61L90 61L89 61L88 60L87 60L86 60L85 61L84 61L83 62L83 63L83 64L82 65L82 66L82 67L82 68L83 69L83 70L84 71L85 71L86 72L87 71L88 71L89 71L89 70L90 69L91 69L92 69L93 68L93 69L93 70L92 70L93 71L92 71L92 72L92 71L92 72L92 73L91 74L92 74L93 74L94 74L95 74L96 74L96 75L97 75L97 76L96 76L96 77L97 77L97 78L96 78L96 79L97 80L98 81L99 81L100 81L100 80L101 80L101 81L102 81L103 81L104 81L104 80L105 79L106 79L107 79L107 78L108 78L109 78L108 79L108 80L108 81L109 81L109 80L109 79L110 79L110 78L110 79L111 79L112 79L113 79L114 79L114 80L115 80L116 80L116 79L117 79L118 79L117 80L118 80L119 81L120 81L120 82L121 82L122 83L122 84L123 84L124 84L125 84L126 84L127 85L128 85L128 86L129 86L129 88L130 88L130 89L129 90L130 90L131 90L131 91L132 91L133 91L135 92L136 92L135 93L137 92L139 93L140 93L141 94L143 95L144 95L145 95L145 97L145 99L144 100L143 101L142 102L142 103L141 103L141 104L141 106L141 107L141 108L140 108L140 110L139 111L139 112L138 112L138 113L137 113L135 113L135 114L134 114L132 115L132 116L131 117L132 117L131 118L131 119L130 119L129 121L128 122L127 123L127 124L126 124L125 125L124 125L123 124L122 124L123 125L123 126L123 127L122 128L121 129L119 129L118 129L118 130L118 131L117 131L116 131L115 131L115 132L116 132L117 133L116 133L115 133L115 135L114 135L113 135L113 136L112 136L113 137L114 137L114 138L113 139L112 140L111 140L111 141L111 142L112 142L111 142L110 143L109 143L109 144L107 144L106 143L105 142L105 141L105 140L104 139L105 138L106 137L104 137L105 136L106 134L107 134L107 132L106 133L106 132L106 130L107 129L106 128L106 127L107 127L107 126L108 124L109 122L108 121L109 120L109 119L109 118L109 116L110 114L110 111L110 110L110 108L109 108L109 107L107 106L105 105L104 105L104 104L103 102L102 100L101 98L100 97L99 97L99 96L99 95L99 94L100 93L100 92L100 93L99 92L99 91L100 90L100 89L101 89L101 88L102 87L103 86L103 85L102 84L103 84L103 83L102 83L102 82L101 81L100 81L100 82L100 83L99 83L99 82L98 82L97 82L96 82L96 81L95 80L94 80L94 79L93 78L92 77L93 77L92 77L91 77L90 76L89 76L88 76L88 75L87 74L86 74L85 74L84 74L83 74L82 74L81 73L80 73L79 73L78 72L76 72L76 71L75 71L75 70L74 70L75 69L74 69L75 69L74 68L74 67L73 66L72 65L71 64L70 63L69 62L68 62L68 61L67 60L67 59L66 58L65 58L65 59L65 60L66 60L66 61L67 61L67 62L68 62L68 63L69 64L69 65L69 66L70 66L71 67L70 67L69 66L68 66L68 65L68 64L67 64L67 63L66 63L65 62L66 62L66 61L65 61L64 60L64 59L63 58L63 57L62 56L61 56L60 56L59 55L58 54L57 52L56 51L56 50L56 49L56 48L55 47L56 46L56 44L56 43L56 42L55 42L57 42L57 43L58 43L58 42L57 41L55 40L54 40L53 39L52 38L51 37L51 36L49 36L49 35L48 35L48 34L46 33L46 32L45 32L43 32L42 31L40 30L39 30L37 30L36 30L34 30L33 29L32 29L32 30L31 30L30 30L29 31L28 31L28 30L29 29L30 29L29 29L28 29L27 30L26 31L27 31L26 32L25 32L24 33L23 33L22 34L20 34L19 35L18 35L17 35L15 36L15 35L16 35L17 35L18 34L19 34L20 34L21 33L22 33L22 32L23 31L22 31L21 31L21 32L20 31L19 31L18 31L18 30L17 30L16 30L15 30L15 29L14 28L15 27L16 27L17 27L18 26L18 27L19 26L18 26L19 25L18 25L17 26L16 25L15 26L14 25L13 25L12 24L13 24L16 23L16 24L18 24L18 23L16 23L16 22L15 22L13 22L14 21L16 21L17 21L17 20L18 20L19 20L21 19L22 19L23 19L25 19L26 19L28 19L29 20L30 19L32 20L34 20L35 20L36 20L38 20L39 20L41 21L42 21L43 21L44 21L46 20L47 20L49 20L50 20L51 20L52 20L53 20L54 21L56 20L56 21L57 20L59 20L60 21L62 21L64 21L65 21L66 22L65 22L67 22L69 22L70 22L71 23L72 22L71 22L72 21L73 21L74 21L75 21L76 22L77 22L79 22L80 22L82 22L81 22L82 21L84 22L84 23L85 22L86 21L85 20L84 20L84 19L85 18L86 18L87 19L88 20L89 21ZM66 17L65 17L68 17L69 18L70 17L71 17L72 18L72 17L73 17L75 17L75 18L76 19L77 20L79 20L77 20L78 21L76 21L74 21L73 21L71 21L68 21L67 21L66 21L65 21L64 21L63 20L65 20L66 20L68 20L66 19L64 19L62 19L64 19L62 19L61 18L62 17L65 17L66 17ZM76 17L75 17L73 17L73 16L75 16L76 17ZM104 17L103 17L102 17L101 17L100 17L99 17L99 16L100 16L102 16L104 17ZM93 17L94 17L95 17L98 16L99 17L99 18L101 18L102 17L104 18L106 18L106 19L108 18L109 19L111 19L112 20L113 21L111 21L114 22L115 22L117 23L118 23L118 24L116 25L115 25L113 24L112 24L113 25L114 25L115 26L115 27L114 27L111 26L113 27L114 28L111 28L109 27L108 27L108 26L107 26L105 25L105 26L102 26L101 25L102 25L104 25L106 25L106 24L107 23L107 22L105 21L103 21L104 21L103 20L102 20L101 20L99 20L95 20L93 20L91 20L90 19L92 19L90 19L90 18L91 17L92 16L94 16L93 17ZM80 16L81 16L83 16L83 17L82 17L83 17L83 18L82 19L81 19L80 18L78 17L80 17L78 17L80 16ZM324 17L322 17L320 17L321 16L322 16L323 17L324 17ZM87 17L86 18L85 18L84 17L85 16L88 16L89 16L88 17L87 17ZM60 19L57 19L56 19L54 18L55 17L56 16L55 16L58 16L60 16L62 16L63 16L64 17L63 17L61 17L60 18L60 19ZM331 15L330 15L328 15L326 15L328 15L331 15ZM86 15L84 15L83 15L84 15L85 14L86 15ZM325 14L324 15L321 15L319 15L317 15L318 14L319 14L321 14L325 14ZM82 13L82 14L82 15L80 15L79 15L79 14L77 14L79 14L80 13L81 13L82 13ZM72 14L73 14L74 14L74 15L70 15L68 16L66 16L66 15L68 15L64 15L62 15L64 14L65 14L67 14L69 14L71 15L70 14L70 13L71 13L72 14ZM238 19L237 19L234 19L233 19L232 19L231 18L232 18L232 17L234 16L236 15L238 14L241 14L244 14L246 13L248 13L249 13L248 14L245 14L242 15L238 16L237 17L235 18L236 18L238 19ZM85 13L86 13L88 13L89 14L90 14L91 14L92 14L94 15L95 14L97 14L99 14L100 15L98 16L97 15L94 16L92 16L90 15L88 15L87 15L87 14L86 14L84 14L83 13L85 13ZM64 12L64 13L63 13L62 14L60 14L59 14L57 14L59 13L61 12L62 13L64 12ZM287 13L287 14L288 13L291 13L293 14L294 14L294 15L293 15L290 16L289 16L291 16L292 16L293 16L294 17L294 16L296 16L299 16L299 17L303 17L303 16L305 16L307 16L309 17L309 18L308 18L310 19L311 19L312 18L314 19L316 18L317 19L318 18L320 19L319 18L320 17L330 18L333 19L337 19L339 19L340 20L341 21L342 20L344 20L346 21L348 20L350 21L351 21L350 20L354 20L356 20L359 21L360 21L360 25L359 25L357 25L358 26L359 27L359 28L357 27L355 28L354 28L352 29L351 30L350 30L349 29L346 30L345 30L344 30L343 31L342 32L343 32L343 34L342 34L342 35L340 36L340 37L339 37L338 38L337 39L336 38L336 37L335 35L336 33L337 33L337 32L338 32L340 31L342 30L344 29L344 27L343 28L340 29L339 28L337 29L334 30L335 31L333 31L331 31L331 30L330 30L329 31L325 31L322 31L319 33L315 35L317 35L317 36L318 36L319 36L320 36L321 37L321 38L321 39L321 40L320 42L319 43L318 44L317 45L316 46L315 47L314 47L313 47L312 47L311 47L311 48L310 48L310 49L309 49L309 50L308 50L308 51L307 51L308 51L309 53L309 54L309 55L308 55L307 56L306 56L306 55L307 54L306 53L307 53L306 52L305 52L305 51L305 50L304 50L303 50L302 51L301 51L302 51L301 50L302 50L302 49L301 49L300 50L299 51L298 51L298 52L299 52L299 53L300 53L301 52L302 53L303 53L301 53L301 54L300 54L299 55L300 56L301 57L301 58L302 58L302 59L301 59L302 60L302 61L302 62L301 62L300 63L300 64L299 65L297 66L296 67L295 67L294 68L294 67L293 68L292 68L291 69L290 70L290 69L289 68L288 68L287 69L286 70L286 71L286 72L287 73L288 74L289 75L289 77L289 78L288 79L287 80L286 80L285 81L285 80L284 80L283 79L283 78L282 77L281 77L280 77L280 78L279 79L279 80L279 81L280 81L280 82L280 83L281 83L282 83L282 84L283 84L283 85L283 86L283 87L284 87L284 88L284 89L283 88L281 87L281 86L281 85L280 85L280 84L280 83L279 82L278 82L278 81L279 80L278 79L279 79L278 78L279 77L278 76L278 75L278 74L277 73L277 74L275 74L274 74L275 73L274 72L274 71L274 70L273 70L272 69L272 68L271 67L270 67L271 68L270 68L269 68L268 68L267 69L266 70L265 71L264 72L263 72L262 73L262 74L261 74L260 74L260 75L260 76L260 77L260 78L260 80L259 80L259 81L258 81L258 82L257 81L256 80L256 79L255 78L255 77L255 76L254 75L254 74L253 72L253 71L253 70L253 69L251 69L250 69L249 68L250 68L249 67L248 66L247 66L247 65L246 65L245 65L243 65L241 65L240 65L239 64L237 64L237 63L236 63L235 64L233 63L232 62L231 61L230 60L229 60L228 60L228 61L229 62L229 63L230 63L230 64L231 65L231 64L232 64L232 65L231 65L232 66L233 66L234 66L235 65L236 64L236 65L237 66L238 66L239 66L239 67L240 67L240 68L239 68L239 69L238 70L238 71L237 71L237 72L236 72L235 72L235 73L234 73L233 73L232 74L231 75L230 75L229 76L228 76L227 76L227 77L226 77L225 77L224 77L223 77L223 76L223 75L223 74L223 73L222 73L222 72L221 71L220 70L219 69L219 68L219 67L218 66L217 66L217 65L217 64L216 63L215 62L215 61L215 60L215 61L214 62L213 62L212 60L213 61L213 62L214 64L215 65L216 66L215 66L216 67L217 68L217 69L217 70L217 71L218 72L219 73L219 74L220 75L221 76L222 76L222 77L223 77L223 78L223 79L224 79L224 80L225 80L226 79L227 79L228 79L229 79L230 78L231 78L231 79L231 80L231 81L230 82L229 83L229 85L228 86L227 87L226 88L224 89L223 90L222 91L222 92L221 92L220 93L220 94L219 95L219 96L219 97L219 98L220 99L220 100L220 101L220 102L221 103L221 104L221 105L220 105L220 106L219 107L217 108L216 109L215 110L215 111L215 112L216 112L216 113L215 114L216 114L215 114L214 115L213 115L213 116L213 117L212 118L212 119L211 119L211 120L210 121L209 122L208 123L207 123L206 124L205 124L204 124L203 124L202 124L201 124L200 125L199 124L198 124L198 123L198 122L198 121L197 120L196 119L196 118L195 117L195 116L195 115L194 114L194 113L194 112L193 111L193 110L193 109L192 108L192 107L192 106L192 105L192 104L193 104L193 103L193 102L194 102L194 101L193 100L193 99L193 98L193 97L192 96L192 95L191 94L190 93L189 92L189 91L189 90L189 89L190 88L190 87L189 86L188 86L189 85L187 86L186 86L185 85L185 84L184 84L183 84L182 84L181 84L179 85L178 85L177 85L176 85L175 85L174 85L173 85L172 86L171 85L170 84L169 84L169 83L168 83L167 82L167 81L166 81L166 80L165 80L165 79L164 79L164 78L163 78L163 77L163 76L162 75L163 75L163 74L164 74L163 73L164 73L164 72L164 71L164 70L163 69L163 68L164 67L164 66L165 66L165 65L165 64L166 64L166 63L167 62L168 62L169 61L170 61L170 60L170 59L171 58L171 57L172 56L173 56L174 55L174 54L175 54L175 55L176 55L177 55L178 55L179 54L180 54L181 54L181 53L183 53L185 53L186 53L187 53L188 53L190 53L191 53L191 54L191 55L190 56L191 56L191 57L193 57L194 57L195 58L196 59L197 59L198 59L199 60L200 59L200 58L201 57L202 57L203 57L203 58L204 58L205 58L206 58L207 59L208 59L209 59L210 59L211 58L212 59L213 59L214 59L215 58L214 58L215 58L215 57L215 56L216 55L216 54L216 53L215 53L214 54L213 54L212 53L211 53L210 54L209 53L208 53L207 52L206 52L207 51L206 51L207 50L209 50L209 49L211 49L212 48L214 48L215 48L217 49L218 49L220 49L222 48L221 47L220 47L219 46L218 45L217 45L218 44L218 43L219 43L218 43L217 43L216 43L215 44L216 45L217 45L216 45L215 45L214 46L213 45L214 45L212 45L213 44L214 44L213 44L212 44L212 43L211 43L210 44L210 45L209 45L209 46L208 47L208 48L209 49L208 49L207 49L206 50L206 49L205 49L204 49L204 50L203 50L203 51L204 51L204 52L203 52L203 53L203 54L202 54L202 53L201 52L201 51L200 51L200 50L199 50L199 49L200 48L199 48L198 48L198 47L197 47L196 46L195 46L195 45L194 45L194 44L193 44L192 45L193 46L194 46L194 47L195 48L196 48L197 49L198 49L198 50L197 50L196 50L197 51L196 52L196 51L196 50L195 50L195 49L194 49L193 49L192 48L191 48L191 47L190 46L189 46L188 46L187 46L187 47L185 47L183 47L183 48L182 49L181 49L180 50L180 51L180 52L179 52L179 53L178 53L177 53L176 53L175 54L174 54L173 53L172 53L171 53L171 52L170 51L171 51L171 50L171 49L171 48L171 47L172 46L173 46L175 46L176 47L178 47L179 46L179 44L178 43L177 42L176 42L175 41L177 41L178 41L178 40L179 41L181 40L182 39L183 39L184 38L185 37L186 36L187 37L187 36L188 36L189 36L189 35L188 34L188 33L189 33L190 33L191 32L191 33L190 33L191 34L190 34L190 35L191 36L192 36L193 36L194 36L195 36L196 35L198 35L199 35L199 36L200 36L200 35L201 35L201 34L201 33L202 33L203 32L203 33L204 33L204 32L203 31L205 31L206 30L207 31L208 31L209 30L208 29L206 30L204 30L203 30L202 30L201 29L202 28L201 27L202 27L202 26L205 25L205 24L204 24L202 24L201 25L201 26L200 26L198 27L197 29L198 29L199 30L198 31L197 31L196 33L196 34L195 34L194 35L193 35L193 34L192 33L191 31L190 31L188 32L187 32L186 31L185 30L185 28L186 27L189 27L191 26L192 24L195 22L196 21L199 20L201 20L203 20L205 19L206 19L208 19L211 20L210 20L211 20L212 20L214 21L217 21L220 22L221 23L220 24L218 24L214 23L213 23L215 24L215 26L216 26L217 26L217 25L220 25L222 24L223 24L224 24L225 23L224 23L224 22L223 21L226 22L227 22L226 22L226 23L228 23L228 22L230 22L234 21L233 22L235 22L237 22L239 21L240 22L241 21L240 20L241 20L244 20L245 21L249 22L249 21L248 21L247 21L247 20L247 19L249 18L249 17L250 17L253 17L253 18L252 19L253 20L253 21L254 22L253 22L251 24L252 24L253 23L254 23L255 22L254 22L255 21L254 21L254 20L254 19L253 19L255 18L255 17L256 18L255 19L256 19L256 18L258 18L260 18L262 18L261 17L261 16L262 16L265 16L267 16L266 16L267 15L268 15L270 14L273 14L276 14L277 14L279 14L281 14L281 13L282 13L284 12L286 13L285 13L287 13ZM229 49L230 49L230 50L229 51L229 52L230 53L231 53L232 53L234 53L234 52L234 51L233 51L233 50L233 49L234 49L235 49L234 48L233 48L233 49L233 48L232 48L233 48L233 47L231 47L231 46L230 46L230 45L231 45L232 45L233 45L233 44L233 43L232 43L231 43L230 43L229 44L228 44L227 45L228 46L227 47L229 48L229 49ZM86 12L86 13L84 12L86 12ZM70 12L68 13L66 12L67 12L69 12L70 12ZM205 12L202 13L201 12L203 12L205 12ZM70 11L69 12L67 12L67 11L68 11L69 11L70 11ZM84 12L83 12L82 12L81 12L81 11L83 11L84 12ZM80 12L79 12L77 12L75 12L76 11L75 11L76 11L79 11L80 12ZM285 12L279 12L281 11L282 11L283 11L285 11L285 12ZM198 10L202 11L199 11L198 12L197 13L196 13L194 13L195 12L193 12L191 11L190 10L193 10L194 10L195 10L196 10L197 10L198 10ZM205 10L207 10L206 10L203 11L200 10L198 10L197 10L200 9L202 10L203 9L205 10ZM231 9L230 10L229 10L228 10L227 10L227 9L225 9L227 9L228 9L229 9L230 9L232 9L231 9ZM280 11L278 11L275 11L273 11L273 10L271 10L274 9L276 9L278 9L280 10L280 11ZM93 10L94 11L93 11L91 12L89 12L87 12L86 11L87 11L85 11L84 10L83 10L84 9L85 9L86 9L85 9L88 9L89 9L91 9L92 10L93 10ZM112 7L114 7L116 7L118 7L118 8L116 8L113 8L112 8L115 8L112 9L111 9L109 10L107 10L106 11L103 11L104 11L105 11L104 12L102 12L100 13L102 13L99 14L97 14L94 14L92 14L91 14L90 13L92 13L92 12L95 12L94 12L92 12L93 11L95 11L93 10L96 10L97 10L98 10L96 9L92 9L91 9L90 9L89 8L88 8L90 8L91 8L93 8L95 7L96 7L97 8L98 7L99 7L101 7L104 7L107 7L109 7L112 7ZM153 6L159 7L157 8L153 8L148 8L149 8L152 8L155 8L157 8L158 8L157 9L159 8L164 8L167 8L168 9L164 9L163 10L160 10L162 10L161 11L160 11L160 12L162 13L160 13L158 13L160 14L160 15L159 15L161 16L158 16L160 16L159 17L158 17L156 17L158 17L158 18L156 17L155 18L157 18L158 19L156 20L156 19L154 19L155 19L154 20L156 20L158 20L155 21L152 22L149 22L148 22L147 22L146 23L144 24L143 24L142 24L140 25L139 25L139 26L139 27L137 27L138 28L137 29L137 30L135 30L134 29L132 29L131 29L130 28L128 26L128 25L126 24L127 23L126 23L127 22L129 21L129 20L128 20L127 21L125 20L126 19L127 19L129 19L127 19L126 18L125 19L124 18L125 17L124 16L123 15L121 15L121 14L119 14L117 14L114 14L111 14L110 14L109 13L111 13L113 13L109 12L107 12L111 11L114 11L115 10L112 10L113 9L116 9L118 9L117 8L120 8L123 8L126 8L127 8L130 8L132 8L133 8L135 8L133 8L133 7L137 7L140 7L141 6L145 6L153 6Z";var pi=360,sn=180,nn=n=>n+180,on=n=>90-n,jm=9,Fd=23.44,Bd=66.56,Hd=n=>n===0?"0":`${Math.abs(n)}°${n>0?"E":"W"}`,jd=n=>n===0?"0":`${Math.abs(n)}°${n>0?"N":"S"}`;function Km(n){let a=[],e=[],t=null;for(let r of n)t!==null&&Math.abs(r.longitude-t)>180&&(e.length&&a.push(e),e=[]),e.push(`${nn(r.longitude)},${on(r.latitude)}`),t=r.longitude;return e.length&&a.push(e),a.filter(r=>r.length>1).map(r=>r.join(" "))}var Kd={mc:"MC",ic:"IC",ascendant:"ASC",descendant:"DSC"},Br=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this)}updated(){for(let e of this.renderRoot.querySelectorAll('svg[part="chart"]')){if(typeof e.getBBox!="function")continue;let{x:t,y:r,width:s,height:i}=e.getBBox();e.setAttribute("viewBox",[t-1,r-1,s+2,i+2].join(" "))}}renderData(e){let t=e.lines??[],r=e.birthDetails;return Vt`<div class="wrap" part="card"><header part="header"><h2>${this.t("Astrocartography")}</h2>${r?Vt`<p class="roxy-label">${V(this.effectiveLang(),r.date,r.time)} · ${jd(Math.round(r.latitude))} ${Hd(Math.round(r.longitude))}</p>`:Ka}</header>${this.chartViewport.renderChartViewport(this.renderMap(t,r),this.t("Astrocartography"),this.translator)} ${this.renderLegend(t)} ${e.summary&&!this.hideReadings?Vt`<p class="summary">${e.summary}</p>`:Ka} ${this.renderInterpretations(t)}</div>`}renderMap(e,t){return Vt`<svg viewBox="0 0 ${pi} ${sn}" part="chart" role="img" aria-label="${this.t("World map of planetary astrocartography lines")}"><title>${this.t("Astrocartography world map")}</title><desc>${this.t("Equirectangular world map. Each body has a Midheaven and Imum Coeli meridian and a curved Ascendant and Descendant line, colored per body.")}</desc><rect class="map-frame" x="0" y="0" width="${pi}" height="${sn}"/><path class="land" d="${Id}" fill-rule="evenodd"/>${this.renderGraticule()} ${this.renderBodyLines(e)} ${t?qt`<text class="birthplace" x=${nn(t.longitude)} y=${on(t.latitude)} text-anchor="middle" dominant-baseline="central"><title>${this.t("Birth location")}</title>★</text>`:Ka}</svg>`}renderGraticule(){let e=[];for(let s=-150;s<=150;s+=30){let i=nn(s),o=s===0;e.push(qt`<line class=${o?"grat-axis":"grat"} x1=${i} y1="0" x2=${i} y2=${sn} />`),e.push(qt`<text class="axis-label" x=${i} y=${sn-2} text-anchor="middle">${Hd(s)}</text>`)}let t=[];for(let s=-60;s<=60;s+=30){let i=on(s),o=s===0;t.push(qt`<line class=${o?"grat-axis":"grat"} x1="0" y1=${i} x2=${pi} y2=${i} />`),t.push(qt`<text class="axis-label" x="2" y=${i-1}>${jd(s)}</text>`)}let r=[Fd,-Fd,Bd,-Bd].map(s=>qt`<line class="grat-ref" x1="0" y1=${on(s)} x2=${pi} y2=${on(s)} />`);return qt`${e}${t}${r}`}renderBodyLines(e){let t=e.map((d,p)=>{let h=g(d,"planet");return{line:d,name:h,color:Fr(d.planet,p),glyph:d.symbol||$(d.planet)||h}}),r=d=>d.reduce((p,h)=>Math.abs(h.latitude)<Math.abs(p.latitude)?h:p,d[0]??{latitude:0,longitude:0}),s=d=>new Map(zt(t,p=>d(p)+180,jm).map(({item:p,displayLongitude:h})=>[p,h-180])),i=s(d=>d.line.mc.longitude),o=s(d=>d.line.ic.longitude),l=s(d=>r(d.line.ascendant.points??[]).longitude),c=s(d=>r(d.line.descendant.points??[]).longitude);return t.map(d=>{let{line:p,name:h,color:x,glyph:L}=d,v=w=>w.get(d)??0;return qt`${[this.renderMeridian(p.mc.longitude,v(i),x,L,h,"mc",!1),this.renderMeridian(p.ic.longitude,v(o),x,L,h,"ic",!0),this.renderCurve(p.ascendant.points,{longitude:v(l),latitude:r(p.ascendant.points??[]).latitude},x,L,h,"ascendant",!1),this.renderCurve(p.descendant.points,{longitude:v(c),latitude:r(p.descendant.points??[]).latitude},x,L,h,"descendant",!0)]}`})}renderMeridian(e,t,r,s,i,o,l){let c=nn(e),d=o==="ic"?sn-16:9;return qt`<g>
204
- <line class=${`acg-line${l?" dashed":""}`} stroke=${r} x1=${c} y1="0" x2=${c} y2=${sn}><title>${this.t("{{planet}} {{angle}} line",{planet:i,angle:this.t(Kd[o]??"MC")})}</title></line>
1
+ var Vh=Object.defineProperty;var qh=Object.getOwnPropertyDescriptor;var m=(n,a,e,t)=>{for(var r=t>1?void 0:t?qh(a,e):a,s=n.length-1,i;s>=0;s--)(i=n[s])&&(r=(t?i(a,e,r):i(r))||r);return t&&r&&Vh(a,e,r),r};import{css as hm,html as ie,nothing as _e}from"lit";import{property as mm}from"lit/decorators.js";var Ml=[{endpoint:"chinese-astrology/calendar/day/{date}",method:"GET",attrs:{mode:"day"}},{endpoint:"chinese-astrology/calendar/monthly",method:"GET",attrs:{mode:"month"}},{endpoint:"chinese-astrology/calendar/auspicious-days",method:"POST",attrs:{mode:"auspicious"}}],_l=[{endpoint:"angel-numbers/numbers/{number}",method:"GET"},{endpoint:"angel-numbers/daily",method:"POST"}],Nl=[{endpoint:"angel-numbers/lookup",method:"GET"}],zl=[{endpoint:"vedic-astrology/arudha",method:"POST"}],Ol=[{endpoint:"vedic-astrology/ashtakavarga",method:"POST"}],Gl=[{endpoint:"astrology/aspects",method:"POST"},{endpoint:"astrology/transit-aspects",method:"POST"},{endpoint:"astrology/aspect-patterns",method:"POST"}],Il=[{endpoint:"astrology/astrocartography",method:"POST"}],Fl=[{endpoint:"chinese-astrology/bazi/chart",method:"POST"}],Bl=[{endpoint:"vedic-astrology/bhav-chalit",method:"POST"}],Hl=[{endpoint:"vedic-astrology/bhava-bala",method:"POST"}],jl=[{endpoint:"biorhythm/daily",method:"POST",attrs:{mode:"daily"}},{endpoint:"biorhythm/forecast",method:"POST",attrs:{mode:"forecast"}},{endpoint:"biorhythm/critical-days",method:"POST",attrs:{mode:"critical-days"}}],Kl=[{endpoint:"human-design/bodygraph",method:"POST"}],Vl=[{endpoint:"vedic-astrology/chara-karakas",method:"POST"}],ql=[{endpoint:"vedic-astrology/panchang/choghadiya",method:"POST"}],Yl=[{endpoint:"astrology/compatibility-score",method:"POST",attrs:{mode:"astrology"}},{endpoint:"numerology/compatibility",method:"POST",attrs:{mode:"numerology"}},{endpoint:"biorhythm/compatibility",method:"POST",attrs:{mode:"biorhythm"}}],Ul=[{endpoint:"numerology/compound-number/{number}",method:"GET"}],Zl=[{endpoint:"crystals/{id}",method:"GET"}],Wl=[{endpoint:"crystals",method:"GET"},{endpoint:"crystals/chakra/{chakra}",method:"GET"},{endpoint:"crystals/element/{element}",method:"GET"},{endpoint:"crystals/zodiac/{sign}",method:"GET"},{endpoint:"crystals/birthstone/{month}",method:"GET"},{endpoint:"crystals/search",method:"GET"}],Xl=[{endpoint:"vedic-astrology/dasha/major",method:"POST",attrs:{period:"major"}},{endpoint:"vedic-astrology/dasha/current",method:"POST",attrs:{period:"current"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}",method:"POST",attrs:{period:"sub"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}",method:"POST",attrs:{period:"antara"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}",method:"POST",attrs:{period:"sookshma"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}/{sookshma}",method:"POST",attrs:{period:"prana"}}],Jl=[{endpoint:"vedic-astrology/divisional-chart",method:"POST"},{endpoint:"vedic-astrology/navamsa",method:"POST"}],Ql=[{endpoint:"vedic-astrology/dosha/manglik",method:"POST",attrs:{type:"manglik"}},{endpoint:"vedic-astrology/dosha/kalsarpa",method:"POST",attrs:{type:"kalsarpa"}},{endpoint:"vedic-astrology/dosha/sadhesati",method:"POST",attrs:{type:"sadhesati"}}],ec=[{endpoint:"ayurveda/constitution",method:"POST"}],tc=[{endpoint:"dreams/symbols/{id}",method:"GET"}],ac=[{endpoint:"dreams/symbols",method:"GET"}],rc=[{endpoint:"astrology/planets/monthly",method:"POST"},{endpoint:"vedic-astrology/planetary-positions/monthly",method:"POST"}],sc=[{endpoint:"astrology/fixed-stars",method:"POST"}],nc=[{endpoint:"feng-shui/flying-stars/natal",method:"POST",attrs:{mode:"natal"}},{endpoint:"feng-shui/flying-stars/annual/{year}",method:"GET",attrs:{mode:"annual"}}],ic=[{endpoint:"forecast/digest",method:"POST"}],oc=[{endpoint:"forecast/timeline",method:"POST"},{endpoint:"forecast/significant-dates",method:"POST"},{endpoint:"forecast/transits",method:"POST"}],lc=[{endpoint:"kabbalah/gematria",method:"POST"}],cc=[{endpoint:"vedic-astrology/transit",method:"POST"}],dc=[{endpoint:"vedic-astrology/compatibility",method:"POST"}],pc=[{endpoint:"human-design/connection",method:"POST"}],hc=[{endpoint:"human-design/penta",method:"POST"}],mc=[{endpoint:"human-design/type",method:"POST"},{endpoint:"human-design/profile",method:"POST"}],gc=[{endpoint:"human-design/variables",method:"POST"}],yc=[{endpoint:"vedic-astrology/heliacal",method:"POST"}],uc=[{endpoint:"iching/hexagrams/random",method:"GET"},{endpoint:"iching/hexagrams/{number}",method:"GET"},{endpoint:"iching/hexagrams/lookup",method:"GET"},{endpoint:"iching/cast",method:"GET"},{endpoint:"iching/daily",method:"POST"},{endpoint:"iching/daily/cast",method:"POST"}],fc=[{endpoint:"vedic-astrology/panchang/hora",method:"POST"}],xc=[{endpoint:"astrology/horoscope/{sign}/daily",method:"GET",attrs:{period:"daily"}},{endpoint:"astrology/horoscope/{sign}/weekly",method:"GET",attrs:{period:"weekly"}},{endpoint:"astrology/horoscope/{sign}/monthly",method:"GET",attrs:{period:"monthly"}},{endpoint:"astrology/horoscope/{sign}/yearly",method:"GET",attrs:{period:"yearly"}}],bc=[{endpoint:"vedic-astrology/kp/chart",method:"POST"}],vc=[{endpoint:"vedic-astrology/kp/daily-finance",method:"POST"}],Lc=[{endpoint:"vedic-astrology/kp/planets",method:"POST"}],$c=[{endpoint:"vedic-astrology/kp/ruling-planets",method:"POST"}],wc=[{endpoint:"feng-shui/kua",method:"POST",attrs:{mode:"kua"}},{endpoint:"feng-shui/eight-mansions",method:"POST",attrs:{mode:"mansions"}}],kc=[{endpoint:"astrology/local-space",method:"POST"}],Sc=[{endpoint:"chinese-astrology/bazi/luck-pillars",method:"POST"}],Rc=[{endpoint:"mesoamerican-astrology/mayan/tzolkin",method:"POST",attrs:{mode:"day"}},{endpoint:"mesoamerican-astrology/mayan/chart",method:"POST",attrs:{mode:"chart"}}],Cc=[{endpoint:"astrology/moon-phase/current",method:"GET",attrs:{mode:"current"}},{endpoint:"astrology/moon-phase/upcoming",method:"GET",attrs:{mode:"upcoming"}},{endpoint:"astrology/moon-phase/calendar/{year}/{month}",method:"GET",attrs:{mode:"calendar"}}],Tc=[{endpoint:"vedic-astrology/nakshatras/{id}",method:"GET"}],Ec=[{endpoint:"astrology/natal-chart",method:"POST"}],Dc=[{endpoint:"numerology/life-path",method:"POST",attrs:{type:"life-path"}},{endpoint:"numerology/expression",method:"POST",attrs:{type:"expression"}},{endpoint:"numerology/soul-urge",method:"POST",attrs:{type:"soul-urge"}},{endpoint:"numerology/personality",method:"POST",attrs:{type:"personality"}},{endpoint:"numerology/birth-day",method:"POST",attrs:{type:"birth-day"}},{endpoint:"numerology/maturity",method:"POST",attrs:{type:"maturity"}},{endpoint:"numerology/daily",method:"POST",attrs:{type:"daily"}},{endpoint:"numerology/personal-day",method:"POST",attrs:{type:"personal-day"}},{endpoint:"numerology/personal-month",method:"POST",attrs:{type:"personal-month"}},{endpoint:"numerology/personal-year",method:"POST",attrs:{type:"personal-year"}},{endpoint:"numerology/chart",method:"POST",attrs:{type:"chart"}}],Ac=[{endpoint:"vedic-astrology/panchang/detailed",method:"POST",attrs:{detail:"detailed"}},{endpoint:"vedic-astrology/panchang/basic",method:"POST",attrs:{detail:"basic"}}],Pc=[{endpoint:"astrology/asteroids",method:"POST"},{endpoint:"astrology/lilith",method:"POST"},{endpoint:"astrology/progressions",method:"POST"},{endpoint:"astrology/solar-arc",method:"POST"},{endpoint:"astrology/arabic-lots",method:"POST"}],Mc=[{endpoint:"astrology/profections",method:"POST"}],_c=[{endpoint:"astrology/signs/{id}",method:"GET"},{endpoint:"astrology/planet-meanings/{id}",method:"GET"},{endpoint:"vedic-astrology/rashis/{id}",method:"GET"},{endpoint:"iching/trigrams/{id}",method:"GET"},{endpoint:"human-design/gates/{number}",method:"GET"},{endpoint:"human-design/centers/{id}",method:"GET"},{endpoint:"numerology/meanings/{number}",method:"GET"},{endpoint:"vedic-astrology/avasthas/{id}",method:"GET"}],Nc=[{endpoint:"astrology/relocation-chart",method:"POST"}],zc=[{endpoint:"vedic-astrology/shadbala",method:"POST"}],Oc=[{endpoint:"astrology/synastry",method:"POST"}],Gc=[{endpoint:"tarot/daily",method:"POST"},{endpoint:"tarot/cards/{id}",method:"GET"}],Ic=[{endpoint:"tarot/cards",method:"GET"}],Fc=[{endpoint:"tarot/spreads/three-card",method:"POST",attrs:{spread:"three-card"}},{endpoint:"tarot/spreads/celtic-cross",method:"POST",attrs:{spread:"celtic-cross"}},{endpoint:"tarot/spreads/love",method:"POST",attrs:{spread:"love"}},{endpoint:"tarot/spreads/career",method:"POST",attrs:{spread:"career"}},{endpoint:"tarot/spreads/custom",method:"POST",attrs:{spread:"custom"}},{endpoint:"tarot/yes-no",method:"POST",attrs:{spread:"yes-no"}},{endpoint:"tarot/draw",method:"POST",attrs:{spread:"draw"}}],Bc=[{endpoint:"astrology/transit-aspects",method:"POST"}],Hc=[{endpoint:"astrology/transits",method:"POST"}],jc=[{endpoint:"vedic-astrology/upagraha",method:"POST"}],Kc=[{endpoint:"vastu/mandala",method:"POST",attrs:{mode:"mandala"}},{endpoint:"vastu/entrance",method:"POST",attrs:{mode:"entrance"}}],Vc=[{endpoint:"vedic-astrology/aspects",method:"POST"}],qc=[{endpoint:"vedic-astrology/daily",method:"POST"}],Yc=[{endpoint:"vedic-astrology/birth-chart",method:"POST"}],Uc=[{endpoint:"vedic-astrology/birth-chart",method:"POST"}],Zc=[{endpoint:"astrology/natal-chart",method:"POST"}],Wc=[{endpoint:"vedic-astrology/yoga",method:"GET"},{endpoint:"vedic-astrology/yoga/detect",method:"POST"},{endpoint:"vedic-astrology/yoga/{id}",method:"GET"}],Xc=[{endpoint:"chinese-astrology/zodiac/sign",method:"POST",attrs:{mode:"sign"}},{endpoint:"chinese-astrology/zodiac/animals/{id}",method:"GET",attrs:{mode:"animal"}},{endpoint:"chinese-astrology/zodiac/{id}/daily",method:"GET",attrs:{mode:"daily"}},{endpoint:"chinese-astrology/zodiac/compatibility/{sign1}/{sign2}",method:"GET",attrs:{mode:"compatibility"}}];import{html as ct,nothing as Oa}from"lit";import{property as yt,state as na}from"lit/decorators.js";import{ifDefined as Ws}from"lit/directives/if-defined.js";var Jc=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function bo(n){if(n.lang)return n.lang;if(typeof document>"u")return;let a=n.closest?.("[lang]")?.getAttribute("lang");return a||document.documentElement.lang||void 0}function Qc(n){return!n||n.toLowerCase().split("-")[0]==="en"}var Yh={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function xo(n){let a=n.toLowerCase();return Jc.find(e=>e.toLowerCase()===a)}function Un(n){let a=bo(n);if(!a)return;let e=xo(a);if(e)return e;let t=a.toLowerCase().split("-"),r=t[0];if(r==="zh"){let s=t.find(i=>i==="hans"||i==="hant")??Yh[t[1]??""];return s?xo(`zh-${s}`):void 0}return xo(r)}import{LitElement as Uh}from"lit";var ed='@layer roxy.tokens,roxy.theme;@layer roxy.tokens{:where(:root,:host){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-text-base: 1rem;--roxy-text-scale: 1.15;--roxy-weight-normal: 400;--roxy-weight-bold: 600;--roxy-leading-tight: 1.25;--roxy-leading-normal: 1.5;--roxy-tracking-tight: -0.01em;--roxy-tracking-normal: 0em;--roxy-space-unit: 0.25rem;--roxy-radius: 6px;--roxy-motion-duration: 200ms;--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1)}:where(:root,:host,[data-theme],.light,.dark){--roxy-surface: var(--roxy-bg);--roxy-primary: var(--roxy-fg);--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);--roxy-heat: var(--roxy-danger);--roxy-font-display: var(--roxy-font-sans);--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));--roxy-text-xl: calc( var(--roxy-text-lg) * var(--roxy-text-scale) * var(--roxy-text-scale) );--roxy-space-xs: var(--roxy-space-unit);--roxy-space-sm: calc(var(--roxy-space-unit) * 2);--roxy-space-md: calc(var(--roxy-space-unit) * 4);--roxy-space-lg: calc(var(--roxy-space-unit) * 6);--roxy-space-xl: calc(var(--roxy-space-unit) * 10);--roxy-line-thick: calc(var(--roxy-space-unit) / 2);--roxy-touch: calc(var(--roxy-space-unit) * 11);--roxy-radius-sm: calc(var(--roxy-radius) / 2);--roxy-radius-md: var(--roxy-radius);--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);--roxy-radius-full: 9999px;--roxy-shadow-sm: none;--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent)}@media(prefers-color-scheme:dark){:where(:root,:host){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white)}}:where(:root[data-theme=light],[data-theme=light],:root.light,.light,:host([data-theme="light"])){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black)}:where(:root[data-theme=dark],[data-theme=dark],:root.dark,.dark,:host([data-theme="dark"])){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white)}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var td="roxy-ui-tokens";function ad(){if(typeof document>"u")return null;let n=document.getElementById(td);if(n)return n;let a=document.createElement("style");return a.id=td,a.textContent=ed,document.head.prepend(a),a}function St(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function A(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}function S(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,a=>a.toUpperCase())}function Zn(n){return typeof n=="string"&&/^https?:\/\//.test(n)}var rd="__ROXY_UI_I18N__";function vo(){let n=globalThis,a=n[rd];if(a)return a;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[rd]=e,e}function Lo(n,a){return a?n.replace(/\{\{(\w+)\}\}/g,(e,t)=>t in a?String(a[t]??""):e):n}function sd(n,a,e){return Lo($o(n,a)??a,e)}function $o(n,a){if(!n)return;let{catalogs:e}=vo(),t=n.toLowerCase();return(e[t]??e[t.split("-")[0]])?.[St(a)]}function nd(n){if(!n)return;let{fieldLabels:a}=vo(),e=n.toLowerCase();return a[e]??a[e.split("-")[0]]}function Ys(n,a){return nd(n)?.fields[a]}function id(n,a,e){return nd(n)?.enums[`${a}.${e}`]}function od(n){let{listeners:a}=vo();return a.add(n),()=>{a.delete(n)}}var Wn=class{constructor(a){this.host=a,a.addController(this)}hostConnected(){this.unsubscribe=od(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var _a=class extends Uh{constructor(){super();this.translator=(e,t)=>this.t(e,t);new Wn(this)}connectedCallback(){super.connectedCallback(),ad()}t(e,t){return sd(this.effectiveLang(),e,t)}effectiveLang(){return bo(this)}};import{css as Wh}from"lit";import{css as Zh}from"lit";var ld=Zh`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var Xh=Wh`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,u=[Xh,ld];var Jh="__cols",Qh="__rows";function em(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Xn(n){if(Array.isArray(n)){let s=!1,i=n.map(o=>{let l=Xn(o);return l!==o&&(s=!0),l});return s?i:n}if(!em(n))return n;let a=n[Jh],e=n[Qh];if(Array.isArray(a)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return a.forEach((o,l)=>{i[o]=Xn(s[l])}),i});let t=!1,r={};for(let[s,i]of Object.entries(n)){let o=Xn(i);o!==i&&(t=!0),r[s]=o}return t?r:n}function Jn(n){return Xn(n)}function cd(n,a){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([t,r])=>a[t]===r))??n[0]}var tm="pk_live_YOUR_KEY",dd={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function Dr(n){if(n)return n===tm?dd.sample:n.startsWith("pk_")?void 0:dd.secret}function Us(n,a,e={}){e.warn&&console.warn(a.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:a.reason,message:a.message},bubbles:!0,composed:!0}))}var ei="https://roxyapi.com/api/v2";async function pd(n){return(await hd(n)).message}async function hd(n){try{let a=await n.json();if(a?.error){let e=a.code==="validation_error"&&Array.isArray(a.issues)?a.issues.filter(t=>typeof t.path=="string"&&typeof t.message=="string").map(t=>({path:t.path,message:t.message})):null;return{message:a.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:!1}}var ti={fromAttribute:n=>{if(n!=null){try{let a=JSON.parse(n);if(a&&typeof a=="object"&&!Array.isArray(a))return a}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},Zs=class extends Error{constructor(e,t=null,r=!0){super(e);this.issues=t;this.worded=r}};function wo(n){return n.submitUrl?void 0:Dr(n.publishableKey)}function ko(n){return!!(n.submitUrl||n.publishableKey&&!wo(n))}async function Na(n,a,e){let t=wo(n);if(t)throw new Zs(t.message);let r=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:am(a,n.submitContext),signal:e}):await rm(n,a,e);if(!r.ok){let s=await hd(r);throw new Zs(s.message,s.issues,s.worded)}return await r.json()}function am(n,a){return JSON.stringify(a?{...n,context:a}:n)}function rm(n,a,e){let t=new URL(`${n.baseUrl??ei}${a.path}`,document.baseURI);for(let[s,i]of Object.entries(a.query??{}))i!=null&&t.searchParams.set(s,String(i));let r={Accept:"application/json"};return n.publishableKey&&(r["X-API-Key"]=n.publishableKey),a.body!=null&&(r["Content-Type"]="application/json"),fetch(t,{method:a.method??"GET",headers:r,body:a.body!=null?JSON.stringify(a.body):void 0,signal:e})}var Qn=class{constructor(a){this.baseUrl=ei;this.worded=!0;this.host=a,a.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(a){this.worded=!0;let e=wo(this);if(e){this.host.error=e.message,Us(this.host,e);return}this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null,this.host.issues=null;try{let r=await Na(this,a,t.signal);if(t.signal.aborted)return;this.host.data=r}catch(r){if(t.signal.aborted||r?.name==="AbortError")return;r instanceof Zs&&(this.host.issues=r.issues),this.worded=r instanceof Zs&&r.worded,this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}};function md(n,a,e,t=[]){let r={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(c,d)=>{let p=r[d];return delete r[d],encodeURIComponent(String(p??""))}),i=new Set(t),o={},l={};for(let[c,d]of Object.entries(r))d===void 0||d===""||(a==="GET"||i.has(c)?o[c]=d:l[c]=d);return{path:s,method:a,query:o,body:a==="POST"?l:void 0}}import{css as im,html as za,nothing as Ar}from"lit";import{css as sm,html as nm}from"lit";function H(){return nm`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var M=sm`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var j=im`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function Pr(n){return n?.length?za`<div class="interp-keywords roxy-chips">${n.map(a=>za`<span class="roxy-chip">${a}</span>`)}</div>`:Ar}function Ln(n,a){if(!n)return Ar;let e=(t,r)=>r?za`<p><strong>${a(t)}</strong> ${r}</p>`:Ar;return za`${n.summary?za`<p>${n.summary}</p>`:Ar} ${e("Impact:",n.impact)}${e("Timing:",n.timing)}${e("Guidance:",n.guidance)} ${Pr(n.keywords)}`}function gd(n,a,e){let t=n.filter(r=>!!r.body);return t.length===0?Ar:za`<section class="block" part="section readings"><h3>${e}</h3>${t.map((r,s)=>za`<details class="interp-card" part="reading" name="${a}" ?open="${s===0}"><summary><span class="interp-lead">${r.label}</span> ${H()} ${r.aside?za`<span class="interp-aside"><small>${r.aside}</small></span>`:Ar}</summary><div class="interp-body"><p>${r.body}</p>${r.extra??Ar}</div></details>`)}</section>`}var yd="roxy-data";function ud(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function om(n){return`<script type="application/json" class="${yd}">${ud(n)}<\/script>`}function lm(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var ai=class{constructor(a){this.host=a,a.addController(this)}hostConnected(){if(this.host.data!=null)return;let a=this.read();a!==void 0&&(this.host.data=a,this.host.requestUpdate())}read(){let a=this.findInlineScript();return a?this.parse(a.textContent):void 0}findInlineScript(){for(let a of Array.from(this.host.children))if(lm(a)&&a.classList.contains(yd))return a;return null}parse(a){if(a?.trim())try{return JSON.parse(a)}catch{return}}};var y=class extends _a{constructor(){super();this.data=null;this.endpoint="";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.issues=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.hostLoaded=!1;this.moreLoading=!1;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,t=this.listKey,r=this.listRows();if(!(!e||!t||!r)){this.moreLoading=!0,this.moreError=null;try{let s=await Na(this.fetcher,{...e,query:{...e.query,offset:r.length}});if(this.lastRequest!==e)return;let i=s[t];this.data={...this.data,...s,[t]:[...r,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=!1}}};this.onEdit=()=>{this.editing=!0};this.onFormSubmit=e=>{let t=this.selfFetch();if(!t)return;let r=e.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetchFresh(md(t.endpoint,t.method,r.values,r.queryKeys??[]))};new ai(this),this.fetcher=new Qn(this)}static{this.styles=[u]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let t=Jn(this.data);t!==this.data&&(this.data=t)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:cd(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return ct`${this.hiddenSectionsStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(t){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,t),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:t},bubbles:!0,composed:!0})),customElements.get("roxy-data")?ct`<roxy-data .data="${e}" lang="${Ws(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hiddenSectionsStyle(){let e=this.hideSections.split(",").map(r=>r.trim().toLowerCase()).filter(r=>/^[a-z][a-z0-9-]*$/.test(r));if(e.length===0)return Oa;let t=e.map(r=>`[part~="${r}"],roxy-endpoint-form::part(${r}){display:none!important}`).join("");return ct`<style>${t}</style>`}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?ct`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,t,r){return this.hideReadings?Oa:gd(e,t,this.t(r??"Reading"))}renderResult(e){let t=ct`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?ct`${t}${this.renderAttribution()}`:t}renderWithForm(e){return ct`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?Oa:this.renderErrorBanner(this.error):this.data==null?Oa:this.showAttribution()?ct`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),t=this.data?.total;return!this.lastRequest||!e||typeof t!="number"?Oa:e.length>=t?Oa:ct`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?ct`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:Oa}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=!0,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:!0,composed:!0})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let t=this.openedRow??document.createElement(this.rowDetail.tag);t.publishableKey=this.publishableKey,t.baseUrl=this.baseUrl,t.submitUrl=this.submitUrl,t.submitContext=this.submitContext,t.hideReadings=this.hideReadings,t.hideSections=this.hideSections;let r=this.effectiveLang();r&&t.setAttribute("lang",r),this.openedRow=t,this.openedRowId=e,t.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Un(this)}}).then(()=>t.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return ct`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(Oa):this.renderEmpty()}renderForm(){let e=this.selfFetch();return ct`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${Ws(this.specUrl)}" publishable-key="${Ws(this.publishableKey)}" location-url="${Ws(this.locationUrl)}" submit-label="${Ws(this.submitLabel)}" lang="${Ws(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return ct`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return ct`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let t=!!this.selfFetch();if(t&&this.issues)return this.renderForm();let r=this.renderErrorBanner(e);return t?ct`${r}${this.renderForm()}`:r}renderErrorBanner(e){return ct`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};m([yt({attribute:!1})],y.prototype,"data",2),m([yt({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([yt({type:String})],y.prototype,"method",2),m([yt({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([yt({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([yt({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([yt({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([yt({attribute:"submit-context",converter:ti})],y.prototype,"submitContext",2),m([yt({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([yt({type:Boolean})],y.prototype,"remember",2),m([yt({type:Boolean,attribute:"hide-readings",reflect:!0})],y.prototype,"hideReadings",2),m([yt({type:String,attribute:"hide-sections",reflect:!0})],y.prototype,"hideSections",2),m([yt({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([yt({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([yt({type:String})],y.prototype,"attribution",2),m([na()],y.prototype,"loading",2),m([na()],y.prototype,"error",2),m([na()],y.prototype,"issues",2),m([na()],y.prototype,"selfFetched",2),m([na()],y.prototype,"editing",2),m([na()],y.prototype,"sticky",2),m([na()],y.prototype,"openedRow",2),m([na()],y.prototype,"openedRowId",2),m([na()],y.prototype,"moreLoading",2),m([na()],y.prototype,"moreError",2);var f=n=>a=>{customElements.get(n)||customElements.define(n,a)};var ri=/^\d{4}-\d{2}-\d{2}$/,cm=/^\d{4}-\d{2}$/,bd=/^\d{2}:\d{2}(:\d{2})?$/,dm=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,fd=new Map;function ut(n){if(!n)return["en"];let a=fd.get(n);if(a)return[a,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return fd.set(n,e),[e,"en"]}var xd=new Map;function si(n){let a=n??"",e=xd.get(a);if(e)return e;let r={hour:new Intl.DateTimeFormat(ut(n),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return xd.set(a,r),r}function $n(n,a){return n&&a?`${n} - ${a}`:n||a}function _r(n){let a=bd.test(n)?`1970-01-01T${n}`:ri.test(n)?`${n}T00:00:00`:cm.test(n)?`${n}-01T00:00:00`:dm.test(n)?n.replace(" ","T"):null;return a?{d:new Date(`${a}Z`),timeZone:"UTC"}:{d:new Date(n)}}function Rt(n,a){if(typeof a!="string"||a.length===0||ri.test(a))return"";let{d:e,timeZone:t}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleTimeString(ut(n),{...si(n),timeZone:t})}function R(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(ut(n),{month:"short",day:"numeric",year:"numeric",timeZone:t})}function ia(n,a){return a?$n(Rt(n,a.start),Rt(n,a.end)):""}function xt(n,a,e){return $n(R(n,a),R(n,e))}function Ga(n,a,e){if(typeof a!="string"||a.length===0)return"";if(e==="year")return a.match(/^(\d{4})/)?.[1]??a;let{d:t,timeZone:r}=_r(a);return Number.isNaN(t.getTime())?a:t.toLocaleString(ut(n),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?si(n):{},timeZone:r})}function vd(n,a,e,t){return $n(Ga(n,a,t),Ga(n,e,t))}function Mr(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(ut(n),{month:"short",day:"numeric",timeZone:t})}function Ld(n,a,e){let t=Mr(n,a),r=Mr(n,e);return t===r?t:$n(t,r)}function $d(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e,timeZone:t}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleDateString(ut(n),{weekday:"short",day:"numeric",timeZone:t})}function Xs(n,a,e){return typeof a!="number"||!Number.isFinite(a)||typeof e!="number"||!Number.isInteger(e)||e<1||e>12?"":new Date(Date.UTC(a,e-1,1,12)).toLocaleDateString(ut(n),{month:"long",year:"numeric",timeZone:"UTC"})}function ni(n,a){return typeof a!="number"||!Number.isInteger(a)||a<1||a>12?"":new Date(Date.UTC(2e3,a-1,1,12)).toLocaleDateString(ut(n),{month:"long",timeZone:"UTC"})}function P(n,a){return typeof a!="number"||!Number.isFinite(a)?"":a.toLocaleString(ut(n),{maximumFractionDigits:0})}function qe(n,a){let e=a.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(ut(n),{style:"long",type:"conjunction"}).format(e)}function b(n,a,e=1){return typeof a!="number"||!Number.isFinite(a)?"":a.toLocaleString(ut(n),{maximumFractionDigits:e})}function we(n,a,e=1){return typeof a!="number"||!Number.isFinite(a)?"":(a/100).toLocaleString(ut(n),{style:"percent",maximumFractionDigits:e})}function Ct(n){return(n.type??"").toLowerCase().trim().replace(/[\s_]+/g,"-")}function Me(n){return A(Ct(n))}var pm={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Nr(n,a,e){let t=typeof a=="string"?pm[a]??S(a):"",r=typeof e=="number"?`${b(n,e,2)}°`:"";return t&&r?`${t} (${r})`:t||r}function V(n,a,e,t=!1){let r=typeof a=="string"&&ri.test(a)&&typeof e=="string"&&bd.test(e)?`${a}T${e}`:a;if(typeof r!="string"||r.length===0)return"";if(ri.test(r))return R(n,r);let{d:s,timeZone:i}=_r(r);return Number.isNaN(s.getTime())?r:s.toLocaleString(ut(n),{month:"short",day:"numeric",year:"numeric",...si(n),...t?{second:"2-digit"}:{},timeZone:i})}function Js(n,a,e){return $n(V(n,a),V(n,e))}function wd(n,a){if(typeof a!="string"||a.length===0)return"";let{d:e}=_r(a);return Number.isNaN(e.getTime())?a:e.toLocaleString(ut(n),{month:"short",day:"numeric",year:"numeric",...si(n),timeZone:"UTC",timeZoneName:"short"})}function kd(){try{return new Intl.DateTimeFormat(ut(void 0)).resolvedOptions().timeZone}catch{return}}function So(n,a){if(!(typeof a!="string"||!a))return a===n?void 0:a}function wn(n,a){let e=typeof n=="string"?n:"",t=So(e,a);return e?t?`${e} (${t})`:e:t??""}function ae(n,a,e){return Ys(n,a)??e??S(a)}function I(n,a,e,t){return id(n,a,e)??t??S(e)}var ii="Localized";function g(n,a,e){let t=n,r=t?.[`${a}${ii}`];if(typeof r=="string"&&r!=="")return r;if(e!==void 0)return e;let s=t?.[a];return typeof s=="string"?s:""}function oi(n,a){let e=n,t=e?.[a];if(!Array.isArray(t))return[];let r=e?.[`${a}${ii}`],s=Array.isArray(r)?r:[];return t.map((i,o)=>{let l=s[o];return{value:String(i),label:typeof l=="string"&&l!==""?l:String(i)}})}function Qs(n){let a;for(let e of Object.keys(n)){if(!e.endsWith(ii))continue;let t=e.slice(0,-ii.length);if(t===""||!(t in n))continue;a??={...n};let r=n[e];r!=null&&r!==""&&(a[t]=r),delete a[e]}return a??n}function Sd(n){return!("days"in n)}var Ia=class extends y{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang();return this.mode==="day"&&Sd(e)?ie`<article class="card" part="card" aria-labelledby="almanac-title">${this.renderDayCard(e,t)}</article>`:Sd(e)?_e:ie`<article class="card" part="card" aria-labelledby="almanac-title"><header class="head" part="header"><h2 class="title" id="almanac-title">${"activityLabel"in e&&e.activityLabel?e.activityLabel:this.t("Almanac")}</h2>${"startDate"in e&&e.startDate?ie`<span class="lunar">${xt(t,e.startDate,e.endDate)}</span>`:_e} ${"year"in e&&typeof e.year=="number"?ie`<span class="lunar">${Xs(t,e.year,e.month)||e.year}</span>`:_e} ${typeof e.total=="number"?ie`<span class="lunar">${this.t("{{count}} days",{count:P(t,e.total)})}</span>`:_e}</header>${"avoidAnimal"in e&&e.avoidAnimal?ie`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Avoiding")}</span><b>${S(g(e,"avoidAnimal"))}</b></span></div>`:_e} ${this.renderSolarTerms(e,t)}<section part="section days"><ul class="days">${(e.days??[]).map(r=>this.renderDayRow(r,t))}</ul></section></article>`}renderDayCard(e,t){let r=e.dayOfficer;return ie`<header class="head" part="header"><h2 class="title" id="almanac-title">${R(t,e.date)}</h2>${e.lunar?ie`<span class="lunar">${e.lunar.isLeapMonth?this.t("Lunar {{month}}/{{day}} (leap)",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")}):this.t("Lunar {{month}}/{{day}}",{month:String(e.lunar.month??""),day:String(e.lunar.day??"")})}</span>`:_e} ${r?.name?ie`<span class="roxy-chip tag tag-${r.quality??"neutral"}">${g(r,"name")} <span lang="zh">${r.chinese??""}</span></span>`:_e}</header>${this.renderPillars(e)} ${this.renderLists(e,t)} ${r?.meaning&&!this.hideReadings?ie`<p class="meaning" part="reading">${r.meaning}</p>`:_e} ${this.renderMansion(e)}`}renderPillars(e){let r=[["Year",e.yearPillar],["Month",e.monthPillar],["Day",e.dayPillar]].filter(([,s])=>s?.chinese||s?.stem);return r.length===0&&!e.clashAnimal?_e:ie`<div class="facts" part="details">${r.map(([s,i])=>ie`<span><span class="roxy-label">${this.t(s)}</span> <b lang="zh">${i?.chinese??""}</b> ${i?.naYin??""}</span>`)} ${e.clashAnimal?ie`<span><span class="roxy-label">${this.t("Clash")}</span><b>${g(e,"clashAnimal")}</b></span>`:_e}</div>`}renderLists(e,t){let r=e.favours??[],s=e.avoids??[];return r.length===0&&s.length===0?_e:ie`<div class="lists" part="section activities">${r.length?ie`<div class="list"><h3>${this.t("Favours")}</h3><div class="roxy-chips chips-favour">${r.map(i=>ie`<span class="roxy-chip">${I(t,"activity",i)}</span>`)}</div></div>`:_e} ${s.length?ie`<div class="list"><h3>${this.t("Avoids")}</h3><div class="roxy-chips chips-avoid">${s.map(i=>ie`<span class="roxy-chip">${I(t,"activity",i)}</span>`)}</div></div>`:_e}</div>`}renderMansion(e){let t=e.mansion;return t?.name?ie`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Mansion")}</span><b>${g(t,"name")}</b> <span lang="zh">${t.chinese??""}</span></span> ${t.palace?ie`<span>${S(t.palace)}</span>`:_e} ${t.planet?ie`<span>${t.planet}</span>`:_e} ${t.animal?ie`<span>${g(t,"animal")}</span>`:_e}</div>`:_e}renderSolarTerms(e,t){let r="solarTerms"in e?e.solarTerms??[]:[];return r.length===0?_e:ie`<div class="terms" part="details">${r.map(s=>ie`<span>${Mr(t,s.date)} ${s.name??""}</span>`)}</div>`}renderDayRow(e,t){let r=e.dayOfficer,s=e.favours??[];return ie`<li class="day" part="label-track"><span class="day-date">${Mr(t,e.date)}</span><div class="day-body"><span lang="zh">${e.dayPillar?.chinese??""}</span> ${r?.name?ie`<span class="roxy-chip tag tag-${r.quality??"neutral"}">${g(r,"name")}</span>`:_e} ${s.length?ie`<span class="roxy-chips chips-favour">${s.map(i=>ie`<span class="roxy-chip">${I(t,"activity",i)}</span>`)}</span>`:_e} ${e.clashAnimal?ie`<span class="roxy-label">${this.t("Clash")} ${g(e,"clashAnimal")}</span>`:_e}</div></li>`}};Ia.endpoints=Ml,Ia.styles=[u,hm`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.list h3{margin:0}.list h3{margin-block-end:var(--roxy-space-xs)}.lunar{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}:is(.tag-auspicious,.chips-favour>*){color:var(--roxy-success-fg)}:is(.tag-inauspicious,.chips-avoid>*){color:var(--roxy-danger-fg)}.tag-neutral{color:var(--roxy-info-fg)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.meaning{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin:0;padding-block-start:var(--roxy-space-md)}.days{margin:0;padding:0;list-style:none;display:grid}.day{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);display:grid}.day:first-child{border-block-start:0;padding-block-start:0}.day-date{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.day-body{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.terms{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}`],m([mm({type:String,reflect:!0})],Ia.prototype,"mode",2),Ia=m([f("roxy-almanac-day")],Ia);import{css as ym,html as _t,nothing as oa}from"lit";var gm=[{key:"spiritual",source:"Spiritual"},{key:"love",source:"Love"},{key:"career",source:"Career"},{key:"money",source:"Money"},{key:"twinFlame",source:"Twin flame"}];function li(n,a,e,t){let r=[];if(a)for(let s of gm){let i=a[s.key];i&&r.push({label:n(s.source),body:i})}return e&&r.push({label:n("Biblical"),body:e}),t&&r.push({label:n("Shadow"),body:t}),r}var um={positive:"success",cautionary:"danger",neutral:"info"},zr=class extends y{renderData(a){let e=(a.energy??"").toLowerCase(),t=a.keywords??[],r=a.actionSteps??[];return _t`<article class="card" part="card" aria-label="${`${this.t("Angel number")} ${a.number??""}`}"><div class="hero" part="header">${a.number?_t`<div class="numeral">${a.number}</div>`:oa}<div><p class="roxy-label">${this.t("Angel number")}</p>${a.title?_t`<h2>${a.title}</h2>`:oa}</div></div>${a.coreMessage&&!this.hideReadings?_t`<p>${a.coreMessage}</p>`:oa}<ul class="badges roxy-chips" part="details">${a.type?_t`<li>${a.type}</li>`:oa} ${typeof a.digitRoot=="number"?_t`<li>${this.t("Digit root")} ${a.digitRoot}</li>`:oa} ${a.energy?_t`<li class="roxy-chip" data-tone="${um[e]??oa}">${a.energy}</li>`:oa}</ul>${t.length>0&&!this.hideReadings?_t`<ul class="roxy-chips">${t.map(s=>_t`<li>${s}</li>`)}</ul>`:oa} ${this.renderSections(a)} ${a.affirmation&&!this.hideReadings?_t`<p class="affirmation">${a.affirmation}</p>`:oa} ${r.length>0&&!this.hideReadings?_t`<div class="steps" part="section action-steps"><h3>${this.t("Action steps")}</h3><ul>${r.map(s=>_t`<li>${s}</li>`)}</ul></div>`:oa}</article>`}renderSections(a){return this.renderInterpretation(li(this.translator,a.meaning,a.biblical,a.shadow),"angel-meaning","Reading")}};zr.endpoints=_l,zr.styles=[u,j,ym`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm);grid-template-columns:minmax(0,1fr);display:grid}}.badges>li{text-transform:capitalize}.affirmation{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);font-style:italic}.steps h3{margin-block-end:var(--roxy-space-xs)}.steps ul{gap:calc(var(--roxy-space-unit) / 2);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}`],zr=m([f("roxy-angel-number-card")],zr);import{css as fm,html as fe,nothing as Se}from"lit";var xm={positive:"Positive energy",neutral:"Neutral energy",cautionary:"Cautionary energy"},bm={positive:"success",cautionary:"warning"},Or=class extends y{renderData(a){let e=a.knownMeaning,t=a.digitRootMeaning,r=e?.title??this.t("Number analysis"),s=e?.actionSteps??[];return fe`<article class="card" part="card" aria-label="${this.t("Angel number {{number}}",{number:a.number??""})}"><div class="hero" part="header">${a.number?fe`<div class="numeral">${a.number}</div>`:Se}<div>${e?.title?fe`<p class="roxy-label">${this.t("Number analysis")}</p>`:Se}<h2>${r}</h2></div></div><ul class="badges roxy-chips" part="details">${a.type?fe`<li>${a.type}</li>`:Se} ${typeof a.digits=="number"?fe`<li>${this.t("{{count}} digits",{count:a.digits})}</li>`:Se} ${typeof a.uniqueDigits=="number"?fe`<li>${this.t("{{count}} unique",{count:a.uniqueDigits})}</li>`:Se} ${typeof a.digitRoot=="number"?fe`<li>${this.t("Digit root {{n}}",{n:a.digitRoot})}</li>`:Se} ${a.isPalindrome?fe`<li class="roxy-chip" data-tone="info">${this.t("Palindrome")}</li>`:Se} ${a.isRepeating?fe`<li class="roxy-chip" data-tone="info">${this.t("Repeating")}</li>`:Se} ${e?.energy?fe`<li class="roxy-chip" data-tone="${bm[e.energy]??Se}">${this.t(xm[e.energy]??"Neutral energy")}</li>`:Se}</ul>${a.contextNote?fe`<div class="context" part="section context"><p class="roxy-label">${this.t("Where you saw it")}</p><p>${a.contextNote}</p></div>`:Se} ${e&&!this.hideReadings?fe`<div class="section" part="section known-meaning"><p class="roxy-label">${this.t("Known angel number")}</p>${e.coreMessage?fe`<p>${e.coreMessage}</p>`:Se} ${e.keywords&&e.keywords.length>0?fe`<ul class="roxy-chips">${e.keywords.map(i=>fe`<li>${i}</li>`)}</ul>`:Se} ${this.renderMeaning(e.meaning,"lookup-known",e.biblical,e.shadow)} ${e.affirmation?fe`<p><em>${e.affirmation}</em></p>`:Se} ${s.length>0?fe`<p class="roxy-label">${this.t("What to do next")}</p><ol class="steps">${s.map(i=>fe`<li>${i}</li>`)}</ol>`:Se}</div>`:Se} ${t&&!this.hideReadings?fe`<div class="section" part="section digit-root"><p class="roxy-label">${t.number?this.t("Foundational digit root ({{n}})",{n:t.number}):this.t("Foundational digit root")}</p>${t.title?fe`<h3>${t.title}</h3>`:Se} ${t.coreMessage?fe`<p>${t.coreMessage}</p>`:Se} ${e?Se:this.renderRootMeaning(t)}</div>`:Se}</article>`}renderMeaning(a,e,t,r){return this.renderInterpretation(li(this.translator,a,t,r),e,"Reading")}renderRootMeaning(a){return fe`${a.keywords&&a.keywords.length>0?fe`<ul class="roxy-chips">${a.keywords.map(e=>fe`<li>${e}</li>`)}</ul>`:Se}${this.renderMeaning(a.meaning,"lookup-root")}${a.affirmation?fe`<p><em>${a.affirmation}</em></p>`:Se}`}};Or.endpoints=Nl,Or.styles=[u,M,j,fm`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.numeral){min-width:0}@container (width<=24rem){.hero{justify-items:start;gap:var(--roxy-space-sm);grid-template-columns:minmax(0,1fr);display:grid}}.badges>li{text-transform:capitalize}.context{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);display:grid}.steps{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.section{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.section p{font-size:var(--roxy-text-sm)}`],Or=m([f("roxy-angel-number-lookup")],Or);import{css as Tm,html as Ba,nothing as Sn}from"lit";var en=(n,a)=>a?n[St(a)]:void 0,vm={sun:"☉",moon:"☽",mercury:"☿",venus:"♀",earth:"♁",mars:"♂",jupiter:"♃",saturn:"♄",uranus:"♅",neptune:"♆",pluto:"♇",rahu:"☊",ketu:"☋",ascendant:"Asc",midheaven:"MC","part of fortune":"⊗",vertex:"Vx",lagna:"La","north node":"☊","south node":"☋",chiron:"⚷",lilith:"⚸","black moon lilith":"⚸"},$=n=>en(vm,n),Lm={sun:"Su",moon:"Mo",mercury:"Me",venus:"Ve",mars:"Ma",jupiter:"Ju",saturn:"Sa",uranus:"Ur",neptune:"Ne",pluto:"Pl",rahu:"Ra",ketu:"Ke",ascendant:"Asc",lagna:"La"},Cd=n=>en(Lm,n),$m={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},N=n=>en($m,n),wm={aries:"Ar",taurus:"Ta",gemini:"Ge",cancer:"Cn",leo:"Le",virgo:"Vi",libra:"Li",scorpio:"Sc",sagittarius:"Sg",capricorn:"Cp",aquarius:"Aq",pisces:"Pi"},ci=n=>en(wm,n),Re=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],km={conjunction:"☌",semisextile:"⚺","semi sextile":"⚺",semisquare:"∠","semi square":"∠",sextile:"⚹",square:"□",trine:"△",sesquiquadrate:"⚼",quincunx:"⚻",opposition:"☍"},tn=n=>en(km,n),Sm={heaven:"☰",lake:"☱",fire:"☲",thunder:"☳",wind:"☴",water:"☵",mountain:"☶",earth:"☷"},Ro=n=>en(Sm,n),Rd={"new moon":"🌑","waxing crescent":"🌒","first quarter":"🌓","waxing gibbous":"🌔","full moon":"🌕","waning gibbous":"🌖","last quarter":"🌗","waning crescent":"🌘"},Td=n=>{if(!n)return;let a=St(n),e=a.replace(/ moon$/,""),t=e==="third quarter"?"last quarter":e;return Rd[a]??Rd[t]};import{css as Rm}from"lit";var re=Rm`.roxy-facts{gap:var(--roxy-space-sm) var(--roxy-space-lg);margin:var(--roxy-space-sm) 0 0;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;flex-wrap:wrap;display:flex}.roxy-facts>div{min-width:0}.roxy-facts dd{overflow-wrap:anywhere;margin:0}`;import{css as Cm,html as kn,nothing as di}from"lit";var G=Cm`.roxy-frame{color:var(--roxy-muted);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-normal);margin:0}.roxy-frame .roxy-frame-deg{font-variant-numeric:tabular-nums}`;function X(n,a,e){if(!a?.ayanamsa)return di;let t=Nr(n,a.ayanamsa);if(!t)return di;let r=typeof a.ayanamsaDegrees=="number"?b(n,a.ayanamsaDegrees,4):void 0;return kn`<p class="roxy-frame">${r===void 0?e("Sidereal frame: {{frame}}",{frame:t}):e("Sidereal frame: {{frame}}, {{degrees}}° subtracted",{frame:t,degrees:r})}</p>`}function Fa(n,a,e){let t=[];return n?.yearBoundary&&t.push(["Year boundary","yearBoundary",n.yearBoundary]),n?.dayBoundary&&t.push(["Day boundary","dayBoundary",n.dayBoundary]),n?.hourClock&&t.push(["Hour clock","hourClock",n.hourClock]),t.length===0?di:kn`<p class="roxy-frame">${t.map(([r,s,i],o)=>kn`${o>0?" · ":""}${a(r)}: <span class="roxy-frame-deg" title="${i}">${I(e,s,i)}</span>`)}</p>`}function Ed(n,a,e){let t=Object.values(a??{}).filter(r=>!!r?.ayanamsa);return t.length===0?di:kn`<div class="roxy-frame">${t.map(r=>{let s=Nr(n,r.ayanamsa),i=typeof r.ayanamsaDegrees=="number"?b(n,r.ayanamsaDegrees,4):void 0,o=r.governs?.length?r.governs.join(", "):"";return kn`<p class="roxy-frame">${i===void 0?e("Sidereal frame: {{frame}}",{frame:s}):e("Sidereal frame: {{frame}}, {{degrees}}° subtracted",{frame:s,degrees:i})}${o?e(", governs {{sections}}",{sections:o}):""}</p>`})}</div>`}var Em=new Set(["a1","a12"]),Gr=class extends y{renderData(a){let e=a.padas??[];if(!e.length)return this.renderEmpty();let t=e.filter(r=>r.exceptionApplied).length;return Ba`<div class="wrap" part="card" aria-label="${this.t("Arudha padas")}"><header class="head" part="header"><h2>${this.t("Arudha padas")}</h2>${X(this.effectiveLang(),a.frame,this.translator)}</header><dl class="roxy-facts" part="details"><div><dt>${this.t("Lagna")}</dt><dd>${a.lagnaRashi??""}</dd></div><div><dt>${this.t("Arudha Lagna")}</dt><dd>${a.arudhaLagna??""}</dd></div><div><dt>${this.t("Upapada")}</dt><dd>${a.upapada??""}</dd></div></dl><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Arudha padas")}"><table role="table"><caption class="roxy-sr-only">${this.t("The twelve Arudha padas: each pada with its bhava, the bhava sign and its lord, the sign the lord occupies, the sign the pada falls in, which house from the Lagna that is, whether the classical exception was applied, and what the pada is read for.")}</caption><thead><tr><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Bhava")}</th><th scope="col">${this.t("Bhava rashi")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Lord rashi")}</th><th scope="col">${this.t("Pada rashi")}</th><th scope="col">${this.t("From Lagna")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map(r=>this.renderRow(r))}</tbody></table></div>${t>0?Ba`<p class="note" part="legend"><span class="exception">${this.t("Moved")}</span> ${this.t("marks a pada that fell in its own bhava or the seventh from it and was moved to the tenth from there, as the classical rule requires. {{count}} of {{total}} padas here.",{count:t,total:e.length})}</p>`:Sn}</div>`}renderRow(a){let e=r=>N(r)??"",t=r=>{let s=e(r);return Ba`${s?Ba`<span class="glyph">${s}</span>`:Sn}${r??""}`};return Ba`<tr class="${Em.has(a.id)?"lead-row":""}"><td class="pada">${a.name??""}${a.abbreviation?Ba`<span class="abbr">${a.abbreviation}</span>`:Sn}</td><td>${a.house??""}</td><td>${t(a.bhavaRashi)}</td><td>${a.lord??""}</td><td>${t(a.lordRashi)}</td><td>${t(a.rashi)} ${a.exceptionApplied?Ba`<span class="exception">${this.t("Moved")}</span>`:Sn}</td><td>${a.houseFromLagna??""}</td><td class="meaning"><strong>${a.meaning??""}</strong> ${a.significations?Ba`<p>${a.significations}</p>`:Sn}</td></tr>`}};Gr.endpoints=zl,Gr.styles=[u,G,re,Tm`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,p{margin:0}.roxy-facts{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);margin:0}.roxy-facts dd{font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.lead-row td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}td.pada{font-weight:var(--roxy-weight-bold)}.abbr{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);margin-inline-start:var(--roxy-space-xs)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}tbody tr.lead-row :is(.abbr,.glyph){color:var(--roxy-accent-ink)}.exception{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.meaning{white-space:normal;min-width:20ch}.meaning strong{display:block}.meaning p,.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.note{padding:var(--roxy-space-md)}`],Gr=m([f("roxy-arudha-padas")],Gr);import{css as Am,html as Ne,nothing as Ad}from"lit";import{state as Pm}from"lit/decorators.js";import{css as Dm,html as Co,nothing as Dd}from"lit";var Xe=Dm`.roxy-tablist{gap:var(--roxy-space-xs);box-shadow:inset 0 calc(var(--roxy-line-thick) * -1) 0 var(--roxy-border);scrollbar-width:thin;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);border:none;border-bottom:var(--roxy-line-thick) solid transparent;cursor:pointer;color:var(--roxy-muted);transition:color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;flex-shrink:0}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink);border-bottom-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg)}.roxy-tab:focus-visible{outline-offset:calc(var(--roxy-line-thick) * -1);border-radius:var(--roxy-radius-sm)}`;function dt(n){let{items:a,active:e,onSelect:t,label:r,idPrefix:s,controls:i=!1}=n;return Co`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${r}" @keydown="${l=>{if(l.key!=="ArrowRight"&&l.key!=="ArrowLeft")return;l.preventDefault();let c=a.findIndex(x=>x.id===e);if(c===-1)return;let d=l.key==="ArrowRight"?1:-1,p=a[(c+d+a.length)%a.length];if(!p)return;t(p.id);let h=l.currentTarget.getRootNode();requestAnimationFrame(()=>{h.querySelector(`#${s}-tab-${p.id}`)?.focus()})}}">${a.map(l=>Co`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${l.id}" aria-selected="${e===l.id?"true":"false"}" aria-controls="${i?`${s}-panel-${l.id}`:Dd}" tabindex="${e===l.id?"0":"-1"}" @click="${()=>t(l.id)}">${l.label}</button>`)}</div>${i?a.filter(l=>l.id!==e).map(l=>Co`<div role="tabpanel" id="${s}-panel-${l.id}" aria-labelledby="${s}-tab-${l.id}" hidden></div>`):Dd}`}var Mm=[{id:"sarva",source:"Sarvashtakavarga"},{id:"bhinna",source:"Bhinnashtakavarga"},{id:"reduced",source:"Reduced"},{id:"pinda",source:"Shodhya Pinda"}],Ha=class extends y{constructor(){super(...arguments);this.activeTab="sarva"}renderData(e){let t=e.signs??[];return Ne`<div class="wrap" part="card" aria-label="${this.t("Ashtakavarga grid")}"><div class="head" part="header"><h2 class="title">${this.t("Ashtakavarga")}</h2>${t.length?Ne`<p class="subtitle">${this.t("{{count}} signs",{count:t.length})}</p>`:Ad} ${X(this.effectiveLang(),e.frame,this.translator)}</div>${dt({items:Mm.map(({id:r,source:s})=>({id:r,label:this.t(s)})),active:this.activeTab,onSelect:r=>{this.activeTab=r},label:this.t("Ashtakavarga views"),idPrefix:"ashtakavarga",controls:!0})}<div id="ashtakavarga-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="ashtakavarga-tab-${this.activeTab}">${this.activeTab==="sarva"?this.renderSarva(t):this.activeTab==="bhinna"?this.renderBhinna(t):this.activeTab==="reduced"?this.renderReduced(t):this.renderPinda()}</div></div>`}bhinnaTier(e){return e<=1?"tier-1":e<=2?"tier-2":e<=3?"tier-3":e<=4?"tier-4":e<=5?"tier-5":e<=6?"tier-6":"tier-7"}sarvaTier(e){return e<=20?"tier-1":e<=24?"tier-2":e<=27?"tier-3":e<=29?"tier-4":e<=32?"tier-5":e<=36?"tier-6":"tier-7"}renderLegend(e){return Ne`<div class="legend" part="legend"><span>${this.t("Fewer bindus")}</span> <span class="legend-scale" aria-hidden="true">${[1,2,3,4,5,6,7].map(t=>Ne`<span class="legend-swatch tier-${t}"></span>`)} </span><span>${this.t("More bindus")}</span> <span class="legend-note">${e}</span></div>`}renderSarva(e){let t=this.data?.sarvashtakavarga;return t?Ne`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Sarvashtakavarga")}"><table><caption class="roxy-sr-only">${this.t("Sarvashtakavarga: each of the twelve signs and the bindus all planets contribute to it, with a grand total.")}</caption><thead><tr><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Bindus")}</th></tr></thead><tbody>${e.map((r,s)=>{let i=t.bindus[s]??0;return Ne`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${N(r)??""}</span> ${r}</div></td><td class="${`bindu-cell ${this.sarvaTier(i)}`}">${i}</td></tr>`})}</tbody><tfoot><tr class="total-row"><td>${this.t("Total")}</td><td>${t.total}</td></tr></tfoot></table></div>${this.renderLegend("Under 25 is a weak sign, 25 to 29 average, 30 and above strong. The 12 signs always total 337.")}`:Ne`<p class="roxy-empty">${this.t("No sarvashtakavarga data")}</p>`}renderBhinna(e){let t=this.data?.bhinnashtakavarga;return t?.length?Ne`${this.renderBinduGrid(e,t,"Bhinnashtakavarga: the bindus each planet scores in every one of the twelve signs, with a row total.","Bhinnashtakavarga")} ${this.renderLegend("Each planet scores 0 to 8 bindus per sign. 4 is the mid, 5 and above is strong support for that planet in that sign.")}`:Ne`<p class="roxy-empty">${this.t("No bhinnashtakavarga data")}</p>`}renderReduced(e){let t=this.data?.reducedBhinnashtakavarga,r=this.data?.reducedSarvashtakavarga;return!t?.length&&!r?Ne`<p class="roxy-empty">${this.t("No reduced ashtakavarga data")}</p>`:Ne`${this.renderBinduGrid(e,t??[],"Reduced Bhinnashtakavarga after Shodhana: the bindus each planet keeps in every one of the twelve signs, with a row total and a Reduced Sarvashtakavarga totals row.","Reduced",r)} ${this.renderLegend("Bindus left after Trikona and Ekadipati Shodhana, the input to Shodhya Pinda. The Reduced SAV row totals the seven planets only, so it does not include the Lagna row above it.")}`}renderBinduGrid(e,t,r,s,i){return t.length?Ne`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t(s)}"><table class="bhinna-table"><caption class="roxy-sr-only">${r}</caption><thead><tr><th scope="col">${this.t("Planet")}</th>${e.map(o=>Ne`<th scope="col" title="${o}">${N(o)??o}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(o=>Ne`<tr><td>${o.planet}</td>${o.bindus.map(l=>Ne`<td class="${`bindu-cell ${this.bhinnaTier(l)}`}">${l}</td>`)}<td>${o.total}</td></tr>`)}</tbody>${i?Ne`<tfoot><tr class="total-row"><td>${this.t("Reduced SAV")}</td>${e.map((o,l)=>Ne`<td>${i.bindus[l]??0}</td>`)}<td>${i.total}</td></tr></tfoot>`:Ad}</table></div>`:Ne`<p class="roxy-empty">${this.t("No bindu data")}</p>`}renderPinda(){let e=this.data?.shodhyaPinda;return e?.length?Ne`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Shodhya Pinda")}"><table><caption class="roxy-sr-only">${this.t("Shodhya Pinda: each planet with its Rashi Pinda, Graha Pinda and Shodhya Pinda strength scores.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Rashi Pinda")}</th><th scope="col">${this.t("Graha Pinda")}</th><th scope="col">${this.t("Shodhya Pinda")}</th></tr></thead><tbody>${e.map(t=>Ne`<tr><td>${t.planet}</td><td>${t.rashiPinda}</td><td>${t.grahaPinda}</td><td>${t.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:Ne`<p class="roxy-empty">${this.t("No shodhya pinda data")}</p>`}};Ha.endpoints=Ol,Ha.styles=[u,G,Xe,Am`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.subtitle{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}[role=tabpanel]:not([hidden]){gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.overflow-scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){text-align:center}:is(th,td):first-child{text-align:start}.glyph{font-size:var(--roxy-text-base);line-height:1}.planet-cell{align-items:center;gap:var(--roxy-space-xs);white-space:nowrap;display:flex}.total-row td{font-weight:var(--roxy-weight-bold);border-block-start:var(--roxy-line-thick) solid var(--roxy-border);border-block-end:0}.bindu-cell{min-width:3ch;font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;color:var(--roxy-fg)}.tier-1{background:color-mix(in srgb, var(--roxy-heat) 30%, transparent)}.tier-2{background:color-mix(in srgb, var(--roxy-heat) 17%, transparent)}.tier-3{background:color-mix(in srgb, var(--roxy-heat) 7%, transparent)}.tier-4{background:color-mix(in srgb, var(--roxy-border) 45%, transparent)}.tier-5{background:color-mix(in srgb, var(--roxy-success) 16%, transparent)}.tier-6{background:color-mix(in srgb, var(--roxy-success) 32%, transparent)}.tier-7{background:color-mix(in srgb, var(--roxy-success) 50%, transparent)}.legend{align-items:center;gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend-scale{gap:1px;display:flex}.legend-swatch{block-size:.75lh;inline-size:2ch}.legend-note{flex:24ch}.bhinna-table :is(th,td):first-child{min-width:8ch}@container (width<=480px){.bhinna-table :is(th,td){padding:var(--roxy-space-xs);font-size:var(--roxy-text-xs)}.bhinna-table :is(th,td):first-child{min-width:6ch}.bindu-cell{min-width:2ch}}`],m([Pm()],Ha.prototype,"activeTab",2),Ha=m([f("roxy-ashtakavarga-grid")],Ha);import{css as Om,html as de,nothing as ze}from"lit";import{css as _d}from"lit";var va=_d`.aspect-trine,.aspect-sextile{--_aspect:var(--roxy-info);--_aspect-ink:var(--roxy-info-fg)}.aspect-square,.aspect-opposition{--_aspect:var(--roxy-danger);--_aspect-ink:var(--roxy-danger-fg)}.aspect-quincunx,.aspect-semi-sextile{--_aspect:var(--roxy-success);--_aspect-ink:var(--roxy-success-fg)}.aspect-conjunction{--_aspect:var(--roxy-accent-ink);--_aspect-ink:var(--roxy-accent-ink)}:is(.aspect-trine,.aspect-sextile,.aspect-square,.aspect-opposition,.aspect-quincunx,.aspect-semi-sextile,.aspect-conjunction){color:var(--_aspect-ink);stroke-opacity:1}.aspect-swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_aspect);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`,an=[_d`.aspect{stroke:var(--_aspect,var(--roxy-muted));stroke-width:.8px;fill:none;opacity:.55;stroke-opacity:.7}`,va],_m=new Set(["conjunction","sextile","square","trine","opposition"]);function ja(n){return _m.has(Ct(n))}function Je(n){return`aspect-${Ct(n)}`}var Pd=.3,Nm=.9,Md=.5,zm=1.8;function rn(n){let{strength:a}=n;if(typeof a!="number"||!Number.isFinite(a))return;let e=Math.min(1,Math.max(0,a/100)),t=Pd+e*(Nm-Pd),r=Md+e*(zm-Md);return`opacity:${t.toFixed(3)};stroke-width:${r.toFixed(3)}`}function Gm(n,a,e){if(n.include?.length){let t={bodies:qe(a,n.include)};return n.strictOrbs?e("Detected with strict orbs, including {{bodies}}.",t):e("Detected with industry-standard orbs, including {{bodies}}.",t)}return n.strictOrbs?e("Detected with strict orbs, classical bodies only."):e("Detected with industry-standard orbs, classical bodies only.")}var Nd={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},Ir=class extends y{renderData(a){let e="aspects"in a?a.aspects??[]:[],t="patterns"in a?a.patterns??[]:[],r="summary"in a?a.summary:void 0;if(e.length===0&&t.length===0)return this.renderEmpty();let s=V(this.effectiveLang(),"transitDate"in a?a.transitDate:"date"in a?a.date:"","time"in a?a.time:void 0,!0),i="timezone"in a?a.timezone:void 0,o="options"in a?a.options:void 0;return de`<div class="wrap" part="card" aria-label="${this.t("Aspects")}"><div class="head" part="header"><h2>${e.length===0?this.t("Chart patterns"):this.t("Aspects")}</h2>${e.length>0||s?de`<p class="subtitle roxy-label">${[e.length===1?this.t("1 aspect"):e.length>1?this.t("{{count}} aspects",{count:e.length}):"",s].filter(Boolean).join(" · ")}</p>`:ze} ${typeof i=="number"&&Number.isFinite(i)?de`<dl class="roxy-facts" part="details"><div><dt>${ae(this.effectiveLang(),"timezone")}</dt><dd>${b(this.effectiveLang(),i,5)}</dd></div></dl>`:ze}</div>${r?this.renderSummary(r):ze} ${r&&"strongest"in r&&r.strongest?this.renderStrongest(r.strongest):ze} ${e.length>0?de`<div role="list" part="section aspects" aria-label="${this.t("Aspect list")}">${e.map((l,c)=>de`<div role="listitem">${this.renderAspect(l,c)}</div>`)}</div>`:ze} ${t.length>0?de`<section class="patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${[...t].sort((l,c)=>(Nd[l.kind]??9)-(Nd[c.kind]??9)||(c.tightness??0)-(l.tightness??0)).map(l=>this.renderPattern(l))}</section>`:ze} ${o?de`<p class="provenance">${Gm(o,this.effectiveLang(),this.translator)}</p>`:ze}</div>`}renderSummary(a){let e="totalAspects"in a?a.totalAspects:a.total,t=Object.entries(a.byType??{}).sort((r,s)=>s[1]-r[1]);return de`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}">${typeof e=="number"?de`<span>${this.t("Total")}: ${e}</span>`:ze} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:a.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:a.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:a.neutral})}</span> ${t.map(([r,s])=>de`<span>${Me({type:r})}: ${s}</span>`)}</p>`}renderStrongest(a){let e=$(a.planet1)??"",t=$(a.planet2)??"";return de`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${e}</span>${g(a,"planet1")} <span class="asp-name ${Je(a)}">${g(a,"type",Me(a))}</span> <span aria-hidden="true" class="glyph">${t}</span>${g(a,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:a.isApplying?this.t("Applying"):this.t("Separating"),orb:b(this.effectiveLang(),a.orb,2),strength:b(this.effectiveLang(),a.strength,0)})}</span></div>`}renderAspect(a,e){let t=$(a.planet1)??"",r=$(a.planet2)??"",s=Me(a),i=a.isApplying?this.t("Applying"):this.t("Separating"),o="meaning"in a?a.meaning:void 0,l="transitInterpretation"in a?a.transitInterpretation:void 0,c="aspectInterpretation"in a?a.aspectInterpretation:void 0,d=!!(o||l||c),p=de`<span aria-hidden="true" class="glyph">${t}</span>${g(a,"planet1")} <span class="asp-name ${Je(a)}">${g(a,"type",s)}</span> <span aria-hidden="true" class="glyph">${r}</span>${g(a,"planet2")} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:i,orb:b(this.effectiveLang(),a.orb,2),strength:b(this.effectiveLang(),a.strength,0)})}</span>`;return!d||this.hideReadings?de`<div class="interp-card" part="reading"><div class="static-head">${p}</div></div>`:de`<details class="interp-card" part="reading" name="aspects" ?open="${e===0}"><summary>${p}${H()}</summary><div class="interp-body" part="readings">${o?this.renderMeaning(o):ze} ${l?this.renderTransit(l):ze} ${c?Ln(c,this.translator):ze}</div></details>`}renderMeaning(a){return de`${a.description?.short?de`<p>${a.description.short}</p>`:ze} ${a.description?.long&&a.description.long!==a.description.short?de`<p>${a.description.long}</p>`:ze} ${Pr(a.keywords)}`}renderTransit(a){return Ln(a,this.translator)}renderPattern(a){let e=a.planets??[],t=a.apex?[...e].sort((r,s)=>+(s===a.apex)-+(r===a.apex)):e;return de`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${a.name??a.kind??this.t("Pattern")}</span> ${a.element?de`<span class="roxy-chip">${a.element}</span>`:ze} ${a.modality?de`<span class="roxy-chip">${a.modality}</span>`:ze} ${a.dissociate?de`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:ze} ${typeof a.tightness=="number"?de`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:we(this.effectiveLang(),a.tightness,0)})}</span>`:ze}</div>${t.length?de`<ul class="roxy-chips">${t.map(r=>{let s=$(r),i=!!a.apex&&r===a.apex;return de`<li class="${i?"roxy-chip apex":"roxy-chip"}">${s?de`<span aria-hidden="true">${s}</span>`:ze}${r}${i?de`<span>${this.t("apex")}</span>`:ze}</li>`})}</ul>`:ze} ${a.interpretation&&!this.hideReadings?de`<p class="pattern-interp">${a.interpretation}</p>`:ze}</div>`}};Ir.endpoints=Gl,Ir.styles=[u,re,M,j,va,Om`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.interp-card summary,.static-head{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.static-head{font-size:var(--roxy-text-sm)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.strongest,.pattern{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.pattern{gap:var(--roxy-space-xs);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],Ir=m([f("roxy-aspects-table")],Ir);import{css as jm,html as Vt,nothing as Ka,svg as qt}from"lit";import{css as Im,html as zd,nothing as Fm}from"lit";var Ce=class{constructor(a){this.host=a;this.state="closed";this.zoom=1;this.pressedBy="";this.press=a=>{this.pressedBy=a.pointerType};this.openOnMouse=a=>{let e=this.pressedBy==="mouse";this.pressedBy="",e&&(a.target?.closest?.("a, button, summary, input, select, textarea")||getSelection()?.toString()||this.open())};a.addController(this)}hostUpdated(){let a=this.host.renderRoot.querySelector(".roxy-chart-dialog");if(!a)this.reset();else if(a.isConnected&&this.state!=="closed"){this.state==="opening"&&(this.state="open",a.open||a.showModal());let e=a.querySelector(".roxy-chart-scroll");a.open&&e&&this.position&&(e.scrollLeft=e.scrollWidth*this.position.x-e.clientWidth/2,e.scrollTop=e.scrollHeight*this.position.y-e.clientHeight/2,this.position=void 0)}}hostDisconnected(){this.reset(),this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}open(){this.state="opening",this.position={x:.5,y:0},this.host.requestUpdate()}reset(){this.state="closed",this.zoom=1,this.position=void 0}resize(a){let e=this.host.renderRoot.querySelector(".roxy-chart-scroll");this.position=a===0?{x:.5,y:0}:e?{x:(e.scrollLeft+e.clientWidth/2)/e.scrollWidth,y:(e.scrollTop+e.clientHeight/2)/e.scrollHeight}:void 0,this.zoom=a===0?1:Math.min(3,Math.max(1,this.zoom+a)),this.host.requestUpdate()}renderChartViewport(a,e,t){return zd`<div class="roxy-chart-view"><div class="roxy-chart-hit" @pointerdown="${this.press}" @click="${this.openOnMouse}">${a}</div><div class="roxy-chart-tools" part="chart-controls"><button type="button" @click="${()=>this.open()}">${t("Enlarge chart")}</button></div><dialog class="roxy-chart-dialog" part="chart-dialog" aria-label="${e}" @close="${()=>{this.reset(),this.host.requestUpdate()}}">${this.state!=="closed"?zd`<div class="roxy-chart-bar"><strong>${e}</strong><div class="roxy-chart-tools"><button type="button" aria-label="${t("Zoom out")}" ?disabled="${this.zoom===1}" @click="${()=>this.resize(-.5)}">−</button> <button type="button" @click="${()=>this.resize(0)}">${t("Reset zoom")}</button> <button type="button" aria-label="${t("Zoom in")}" ?disabled="${this.zoom===3}" @click="${()=>this.resize(.5)}">+</button> <button type="button" @click="${()=>this.host.renderRoot.querySelector(".roxy-chart-dialog")?.close()}">${t("Close")}</button></div></div><div class="roxy-chart-scroll" role="region" tabindex="0" aria-label="${e}"><div class="roxy-chart-expanded" style="${`--chart-zoom:${this.zoom}`}">${a}</div></div>`:Fm}</dialog></div>`}},Ge=Im`.roxy-chart-view{min-width:0}@media (hover:hover) and (pointer:fine){.roxy-chart-hit{cursor:zoom-in}}.roxy-chart-tools{gap:var(--roxy-space-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.roxy-chart-tools button{font-size:var(--roxy-text-sm);color:var(--roxy-secondary);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);min-width:2lh;min-height:2lh;padding:var(--roxy-space-xs) var(--roxy-space-sm);cursor:pointer;background:0 0}.roxy-chart-tools button:hover:not(:disabled){border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-chart-tools button:disabled{color:var(--roxy-muted);cursor:default}.roxy-chart-dialog{--roxy-surface:var(--roxy-bg);width:calc(100% - 2 * var(--roxy-space-md));max-width:calc(var(--roxy-chart-expanded-width,60rem) * 1.2);max-height:calc(100% - 2 * var(--roxy-space-md));padding:var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);color:var(--roxy-fg);background:var(--roxy-bg);box-shadow:var(--roxy-shadow-lg);margin:auto}.roxy-chart-dialog[open]{flex-direction:column;display:flex;overflow:hidden}.roxy-chart-dialog::backdrop{background:color-mix(in oklab, var(--roxy-bg) 85%, transparent)}.roxy-chart-bar{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);margin-bottom:var(--roxy-space-md);flex-wrap:wrap;flex-shrink:0;display:flex}.roxy-chart-bar>strong{overflow-wrap:anywhere;min-width:0}.roxy-chart-scroll{overscroll-behavior:contain;flex:auto;min-height:0;overflow:auto}.roxy-chart-expanded{width:max(100%, calc(var(--roxy-chart-expanded-width,60rem) * var(--chart-zoom)));padding:var(--roxy-space-sm)}.roxy-chart-expanded>svg{width:100%;max-width:none;height:auto;margin:0}`;function Tt(n){let a=n%360;return a<0?a+360:a}function Nt(n){let a=Tt(n),e=Math.floor(a/30)%12,t=a%30,r=Math.floor(t),s=(t-r)*60,i=Math.floor(s),o=Math.round((s-i)*60);return{sign:Re[e]??"Aries",signIndex:e,degree:r,minute:i,second:o}}function Qe(n,a){let{sign:e,degree:t,minute:r}=Nt(n);return`${t}° ${a||e} ${String(r).padStart(2,"0")}'`}function jt(n){return Kt(Tt(n)%30)}function To(n){let a=Math.floor(n);return{degree:a,minute:Math.floor((n-a)*60)}}function Kt(n){let{degree:a,minute:e}=To(n);return`${a}°${String(e).padStart(2,"0")}'`}function Rn(n){return Tt(n+180)}function pi(n,a){let e=Tt(n),t=Tt(a)-e;return t<0&&(t+=360),Tt(e+t/2)}function zt(n,a,e){let t=n.filter(c=>Number.isFinite(a(c))).map(c=>{let d=Tt(a(c));return{item:c,longitude:d,displayLongitude:d}}).sort((c,d)=>c.longitude-d.longitude),r=t.length;if(r<2)return t;let s=0,i=-1;for(let c=0;c<r;c++){let d=t[(c+r-1)%r],h=(t[c].longitude-d.longitude+360)%360;h>i&&(i=h,s=c)}let o=t[s],l=o.longitude;for(let c=1;c<r;c++){let d=t[(s+c)%r],p=typeof e=="function"?e(o.item,d.item):e,h=d.longitude+(s+c>=r?360:0);l=Math.max(h,l+p),d.displayLongitude=Tt(l),o=d}return t}var la=2;function Od(n,a){let e=n*Math.PI/180;return a.width/2*Math.abs(Math.cos(e))+a.height/2*Math.abs(Math.sin(e))}function La(n,a,e,t){let r=n*Math.PI/180,s=(i,o)=>o>1e-9?(i+t)/o:Number.POSITIVE_INFINITY;return Math.min(s((a.width+e.width)/2,Math.abs(Math.cos(r))),s((a.height+e.height)/2,Math.abs(Math.sin(r))))}var Bm=(n,a)=>Math.abs(n.x-a.x)<(n.width+a.width)/2&&Math.abs(n.y-a.y)<(n.height+a.height)/2;function Gd(n,a){let e=[],t=r=>e.reduce((s,i)=>Bm(r,i)?Math.max(s,Math.min((r.width+i.width)/2-Math.abs(r.x-i.x),(r.height+i.height)/2-Math.abs(r.y-i.y))):s,0);return[...n].map((r,s)=>({point:r,index:s})).sort((r,s)=>r.point.displayLongitude-s.point.displayLongitude).reduce((r,{point:s,index:i})=>{let o=a(s,0),l=a(s,1),c=t(o)===0||t(o)<=t(l)?0:1;return e.push(c===0?o:l),r[i]=c,r},[])}function Et(n,a){return a>0?n/a*(180/Math.PI):0}function T(n,a,e,t){let r=t*Math.PI/180;return{x:n+e*Math.cos(r),y:a+e*Math.sin(r)}}var Hm={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},Id=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function Fr(n,a=0){return Hm[A(n)]??Id[a%Id.length]??"var(--roxy-accent)"}var Fd="M120 170L120 171L118 171L116 171L114 171L114 170L116 170L118 170L119 170L120 170ZM21 169L19 170L18 169L17 169L16 169L17 168L19 168L20 169L21 169ZM135 168L136 168L137 169L137 170L135 170L133 171L132 171L130 171L127 171L126 171L126 170L128 170L129 170L130 169L131 168L132 168L133 168L135 168ZM59 164L60 164L61 163L61 164L60 164L58 164L57 164L58 163L59 164ZM54 163L56 164L55 164L54 164L53 163L54 163ZM81 162L82 162L83 162L84 163L83 162L82 162L81 162L79 163L78 162L80 162L81 162ZM112 161L111 162L110 162L109 163L108 162L107 162L106 162L105 162L106 161L107 161L108 161L108 160L109 159L110 159L111 160L111 161L112 161ZM121 154L120 154L119 154L119 155L118 155L117 155L117 156L118 156L117 156L116 157L115 157L114 158L115 158L115 159L116 159L117 159L117 160L118 160L118 161L119 162L119 163L119 164L118 164L117 165L116 165L114 166L113 166L112 166L110 166L109 167L108 167L106 167L104 167L103 167L105 167L106 168L105 168L104 168L102 168L102 169L103 170L105 170L107 170L109 171L110 171L112 171L114 171L117 172L118 172L120 172L121 173L122 173L123 173L125 173L126 172L128 172L130 172L133 172L135 172L137 172L138 172L139 171L142 171L144 171L146 171L148 171L150 171L151 170L150 170L150 169L148 169L146 169L144 169L144 168L145 168L146 168L148 168L149 167L150 167L151 167L152 166L154 166L155 166L156 166L158 166L159 166L160 166L161 165L162 165L163 165L164 164L165 164L164 164L164 163L165 163L166 163L167 163L168 162L169 162L170 161L171 161L171 162L173 162L173 161L174 161L176 161L177 161L178 161L179 161L180 162L181 161L182 161L183 161L184 161L185 161L186 160L187 160L188 160L190 160L191 161L192 161L192 160L193 160L195 160L196 160L197 160L198 160L199 160L200 160L201 160L202 160L203 161L204 161L205 160L206 160L207 160L208 160L209 160L210 160L211 160L212 160L213 159L214 159L215 159L216 159L217 159L218 160L219 160L220 160L220 159L221 159L222 159L223 158L224 158L225 158L226 158L227 158L228 157L229 157L230 157L231 157L232 156L233 156L234 156L235 156L236 156L237 156L237 157L238 157L239 157L240 157L241 158L242 158L243 158L244 157L245 158L246 158L247 158L248 158L249 158L250 159L250 160L249 160L248 160L248 161L249 161L248 161L248 162L249 162L250 162L251 162L252 162L252 161L253 161L253 160L254 160L256 160L257 160L258 159L259 158L260 158L261 158L262 157L263 157L264 157L265 157L266 157L267 157L268 156L269 157L270 157L271 157L272 157L273 157L274 157L275 157L276 157L277 157L278 157L279 157L280 157L281 157L282 156L283 156L284 156L285 156L286 157L287 157L288 157L289 157L290 157L291 156L292 156L293 156L294 156L295 156L296 157L297 157L299 157L300 157L301 157L302 157L303 156L304 157L305 157L306 157L307 157L308 157L309 157L310 157L311 156L312 156L313 156L314 156L315 156L315 155L316 156L317 157L319 157L320 157L321 157L322 157L323 157L324 157L325 157L326 157L326 158L327 158L328 158L329 158L330 159L331 159L333 159L334 159L335 159L336 159L337 159L338 159L339 160L340 160L341 160L342 161L343 161L344 161L345 161L346 161L347 161L348 161L349 161L351 161L351 162L350 163L349 164L348 164L347 164L346 164L346 165L345 165L344 165L344 166L343 167L344 167L344 168L345 168L347 168L347 169L345 169L344 169L342 169L341 170L340 171L341 171L342 172L344 172L345 173L347 173L349 173L349 174L352 174L353 174L356 174L358 174L360 175L360 180L0 180L0 175L1 174L3 174L4 174L6 175L7 174L10 174L11 174L13 175L16 175L18 175L22 175L25 175L29 175L31 176L34 175L37 175L33 175L30 174L29 174L26 174L27 173L27 172L25 172L25 171L23 171L26 171L28 171L29 171L31 171L33 171L34 170L33 170L32 170L30 169L28 169L27 169L25 169L24 169L23 168L22 168L22 167L23 167L25 167L26 167L27 167L29 167L30 167L31 167L32 167L34 166L34 165L35 165L36 166L37 165L38 165L40 165L41 165L42 165L44 165L45 164L46 164L48 164L49 164L50 164L52 164L53 164L55 165L56 164L57 164L59 165L60 164L61 164L63 164L64 164L65 164L66 164L67 164L68 165L69 164L70 165L71 165L72 165L74 165L75 165L77 165L78 165L79 165L80 165L79 165L79 164L77 164L77 163L76 163L77 163L78 163L80 163L81 163L82 163L82 164L84 164L85 163L86 163L88 163L89 163L90 163L91 163L92 163L93 163L94 163L95 163L96 164L97 164L99 164L99 163L100 163L101 164L102 163L103 164L104 164L105 164L106 164L107 163L108 163L110 163L111 163L112 163L113 162L112 161L112 160L111 160L112 159L113 158L112 158L112 157L113 157L114 156L115 156L116 155L117 155L118 155L119 154L120 154L121 154L121 153L122 153L123 154L122 154L121 154ZM112 144L114 144L115 145L114 145L113 145L112 146L111 145L110 145L109 145L108 144L107 144L105 143L106 143L108 144L109 144L110 143L111 143L112 143L112 144ZM121 141L122 142L121 142L120 142L119 142L120 141L121 142L121 141ZM250 140L249 140L249 139L250 139L251 139L250 140ZM325 131L326 131L327 131L328 131L328 132L328 133L327 134L326 134L325 133L325 132L325 131ZM353 131L354 131L354 132L353 133L353 134L352 134L351 134L351 135L351 136L350 136L349 137L348 137L348 136L347 136L347 135L348 134L349 134L350 134L351 133L352 132L352 131L353 130L353 131ZM355 126L355 127L356 127L356 128L357 128L358 128L359 128L358 129L357 129L357 130L357 131L356 131L355 132L355 131L355 130L354 130L354 129L355 129L355 128L355 127L354 127L354 126L353 125L353 124L354 125L355 126ZM347 112L346 112L345 112L345 111L344 110L345 110L345 111L346 111L347 112ZM358 107L359 108L358 108L357 108L358 107L358 108L358 107ZM359 107L359 106L360 106L360 107L359 107ZM230 104L230 105L230 106L230 105L230 106L230 107L229 107L229 108L229 109L229 110L228 112L228 114L227 115L226 115L225 116L225 115L224 115L224 114L223 113L223 112L223 111L224 111L224 110L224 109L224 108L224 107L224 106L225 106L226 106L227 105L228 105L228 104L229 103L229 102L230 102L230 103L230 104ZM324 104L324 105L325 104L325 105L325 106L326 107L326 108L326 109L327 109L328 110L329 110L329 111L330 112L330 113L331 112L331 113L332 114L333 115L333 116L333 117L334 118L334 119L333 119L333 120L333 121L333 122L332 123L331 124L331 125L330 126L330 127L329 128L328 128L327 128L327 129L326 129L325 129L325 128L324 128L324 129L323 129L322 128L321 128L320 127L320 126L319 126L318 126L318 125L318 124L318 125L317 125L318 124L318 123L317 124L316 124L316 125L315 124L315 123L314 123L313 122L312 122L311 121L310 122L308 122L307 122L306 122L305 123L304 123L304 124L303 124L302 124L301 124L300 124L299 125L299 124L299 125L298 125L297 125L296 124L295 124L296 123L296 122L295 121L295 120L295 119L294 118L294 117L293 117L293 116L294 117L293 116L294 116L294 115L293 114L294 114L294 113L294 112L294 113L295 112L295 111L296 111L297 111L298 110L299 110L300 110L301 110L301 109L302 109L302 108L302 107L303 106L303 107L304 107L304 106L305 105L306 105L306 104L307 104L308 104L308 105L309 105L310 105L309 104L310 104L310 103L311 103L311 102L312 102L313 102L312 101L313 101L314 102L315 102L316 102L317 102L317 103L316 103L316 104L315 105L316 105L316 106L317 106L318 106L318 107L319 107L320 108L321 107L321 106L322 105L322 104L322 103L322 102L322 101L323 101L323 102L324 103L324 104ZM301 100L300 100L299 100L300 99L300 100L301 100ZM341 100L340 100L340 99L341 100ZM342 100L341 99L341 98L341 99L342 100ZM304 100L303 100L304 100L304 99L305 99L306 98L307 98L307 99L306 99L305 99L304 100ZM298 98L299 98L299 99L298 99L297 99L297 98L298 98ZM303 98L303 99L301 99L300 99L300 98L301 98L301 99L302 98L303 98ZM340 98L340 99L339 98L338 97L339 98L340 98ZM289 97L291 97L291 96L293 97L293 98L294 98L296 98L295 99L293 98L292 98L291 98L289 98L288 98L286 97L285 97L286 96L287 96L288 96L289 97ZM315 96L314 97L314 96L314 95L315 96ZM336 97L335 97L335 96L335 95L335 96L336 96L336 97ZM332 95L331 96L330 96L329 96L328 96L328 95L329 96L330 96L330 95L330 96L331 95L332 95L332 94L332 95ZM307 93L307 94L306 94L306 93L307 93ZM310 93L311 94L310 93L309 93L308 93L309 93L310 93ZM333 94L333 95L333 94L332 94L332 93L331 93L332 93L333 94ZM314 91L314 93L315 93L316 92L317 92L318 92L319 92L320 92L321 93L323 93L325 94L326 95L328 96L328 97L327 97L328 98L329 99L329 100L330 100L331 100L331 101L330 101L330 100L329 100L328 100L327 99L326 98L325 98L324 98L323 98L323 99L322 99L321 99L320 98L319 98L318 98L319 97L318 96L318 95L316 95L315 94L314 94L313 94L313 93L312 93L313 92L314 92L312 92L311 91L312 91L312 90L314 91ZM305 89L304 90L303 90L301 90L300 90L300 91L301 91L303 91L302 92L302 93L302 94L303 95L303 96L302 95L303 94L302 95L301 95L302 94L301 94L301 93L300 93L300 94L300 96L299 95L300 94L299 93L299 92L299 91L300 90L300 89L301 89L302 89L303 89L304 89L305 88L305 89ZM309 89L309 90L308 90L308 91L308 90L307 89L308 88L309 88L309 89ZM286 96L285 96L284 95L283 94L282 94L281 93L281 92L280 91L279 90L279 89L279 88L278 88L277 87L276 86L275 85L276 85L277 85L278 86L279 86L280 87L281 88L282 88L282 89L283 89L284 90L283 91L284 91L285 92L286 92L286 93L286 94L286 96ZM298 88L299 89L298 89L297 90L298 91L297 91L297 92L296 94L295 94L294 93L293 93L292 93L291 93L290 93L290 92L290 91L289 90L289 89L290 88L291 88L291 87L292 87L293 87L294 86L294 85L295 85L296 84L297 83L298 84L299 85L298 85L299 86L298 86L297 87L298 88ZM306 82L307 83L306 84L306 83L305 83L306 84L305 84L304 84L304 83L304 82L303 83L302 83L302 82L303 82L303 81L304 82L305 81L305 80L306 81L306 82ZM261 84L260 84L260 83L260 82L260 80L261 81L262 82L262 84L261 84ZM304 80L303 81L302 80L303 80L303 79L303 80L304 79L304 80ZM299 81L297 82L298 81L298 80L299 80L300 79L299 80L299 81ZM302 78L303 78L303 79L302 80L302 79L302 78ZM306 78L306 79L305 79L305 80L305 79L304 79L305 79L305 78L304 77L305 77L306 78ZM302 77L301 78L301 77L300 77L301 77L302 77ZM301 71L302 72L303 73L302 74L302 75L302 76L303 76L304 76L304 77L303 77L303 76L303 77L302 76L301 76L301 75L301 76L300 75L300 74L300 72L301 71ZM114 72L113 72L113 71L114 71L114 72ZM103 72L102 72L102 71L102 72L103 72L104 72L103 72ZM107 70L108 70L109 70L110 70L110 71L111 71L112 71L111 72L110 72L109 72L108 72L107 72L106 72L106 71L107 71L107 72L108 71L107 71L107 70ZM290 71L289 72L289 71L289 70L290 70L291 70L291 71L290 71ZM24 71L24 70L25 70L25 71L24 71ZM100 67L101 68L102 67L102 68L103 68L103 69L104 69L105 69L106 70L105 70L104 70L102 70L103 70L103 69L102 69L101 68L100 68L99 68L98 68L98 67L97 67L97 68L96 68L95 68L96 68L96 67L97 67L98 67L99 67L100 67ZM102 66L102 65L102 66ZM301 67L301 68L300 67L300 66L301 65L302 65L302 66L301 67ZM315 56L314 57L314 56L313 57L312 57L313 56L314 56L315 56ZM215 54L214 55L213 55L212 55L213 55L214 55L215 54ZM204 54L204 55L205 55L206 55L205 55L204 55L204 54ZM196 52L195 53L194 53L192 52L193 52L194 52L195 52L196 52ZM189 49L190 49L190 51L189 51L188 51L188 50L188 49L189 49ZM321 53L321 54L320 55L319 55L317 55L316 57L315 56L315 55L313 56L312 56L311 56L312 57L311 59L310 59L310 58L310 57L309 57L310 56L311 56L312 55L313 55L315 54L316 54L317 53L319 52L320 51L320 49L321 49L322 50L322 51L321 52L321 53ZM190 48L189 49L189 48L189 47L190 48ZM324 46L325 46L326 47L324 47L323 48L322 47L321 48L320 48L320 47L321 47L322 45L322 44L323 45L324 46ZM116 43L117 44L118 44L117 44L116 44L116 43ZM118 41L116 41L115 40L116 40L117 40L118 41ZM56 41L56 42L54 41L53 40L52 40L52 39L53 39L53 40L54 40L55 40L55 41L56 41ZM124 39L123 40L124 40L125 40L124 40L125 41L126 40L127 41L126 41L127 41L127 42L127 43L126 43L126 42L125 43L124 43L125 43L124 42L123 42L121 42L121 41L122 41L123 39L124 38L125 38L124 39ZM47 36L48 36L48 37L49 38L48 38L48 37L47 37L47 36ZM324 39L325 41L323 41L323 42L324 43L324 44L323 43L322 44L322 43L322 42L322 41L322 40L322 39L322 38L322 37L323 36L322 36L323 36L323 37L323 38L324 39ZM173 38L171 38L170 38L171 37L170 36L172 35L173 35L174 35L174 36L174 37L173 38ZM193 34L192 35L191 35L191 34L192 34L193 34ZM27 33L26 33L25 33L26 32L27 32L28 32L27 33ZM177 31L176 32L177 32L178 32L178 33L177 34L178 34L179 35L180 36L180 37L182 37L182 38L181 38L181 39L179 39L178 39L177 39L176 40L175 40L174 40L176 39L177 39L175 38L176 38L175 37L177 37L177 36L176 35L175 35L175 34L174 35L174 34L174 33L174 32L175 31L176 31L177 31ZM14 30L13 30L14 30ZM98 27L97 28L96 28L97 27L98 27ZM8 26L9 26L10 26L10 27L11 27L10 27L9 27L8 27L8 26ZM95 24L95 25L96 25L97 25L98 26L99 26L100 26L99 27L97 26L96 26L94 27L94 26L93 26L94 26L94 25L94 24L95 24ZM165 24L166 25L165 26L162 26L161 27L160 26L157 26L158 26L156 25L158 25L156 24L158 24L159 24L161 24L162 24L164 23L165 24ZM104 23L103 23L103 22L104 22L105 22L105 23L104 23ZM5 23L6 24L5 23L8 23L10 24L9 24L7 25L7 26L6 26L5 25L4 25L3 24L2 25L1 24L0 24L1 25L0 25L0 21L2 22L5 23ZM84 21L82 21L80 21L81 20L82 20L83 20L84 21ZM360 19L359 19L360 18L360 19ZM1 19L0 19L0 18L1 18L2 19L1 19ZM89 21L89 22L91 21L92 21L92 22L93 23L94 22L94 21L94 20L96 20L97 20L99 21L98 22L99 22L99 23L97 24L95 24L94 23L94 24L93 25L92 26L90 26L89 26L89 27L88 27L87 28L86 29L85 30L85 31L87 31L87 32L88 33L89 33L91 33L92 34L93 34L94 34L95 35L97 35L98 35L98 36L98 37L99 38L100 39L101 38L101 37L101 36L100 35L102 35L103 34L103 33L103 32L101 31L103 30L102 29L102 28L103 27L104 28L105 28L106 28L107 28L108 28L109 29L110 29L110 30L111 31L112 31L112 32L114 31L115 30L116 31L117 32L119 33L118 34L120 34L120 35L122 35L123 35L123 36L124 36L124 37L124 38L123 39L121 39L120 40L118 40L116 40L115 40L114 40L113 40L111 41L110 42L109 43L110 43L111 42L113 41L115 41L116 41L115 42L115 43L116 44L117 44L118 44L119 43L120 44L119 45L117 45L116 46L115 46L114 46L116 45L114 45L113 45L112 46L111 46L110 46L109 47L109 48L110 48L109 49L108 49L107 49L106 49L108 49L107 49L106 49L106 50L105 51L104 51L105 51L105 52L104 53L104 52L104 51L103 51L104 52L103 52L104 52L104 53L104 54L104 55L103 55L102 56L101 56L101 57L100 57L99 58L99 59L99 60L99 61L99 62L100 63L100 64L100 65L99 65L99 64L98 64L98 63L97 63L97 62L97 61L96 60L95 60L94 60L92 60L91 60L90 60L91 60L91 61L90 61L89 61L88 60L87 60L86 60L85 61L84 61L83 62L83 63L83 64L82 65L82 66L82 67L82 68L83 69L83 70L84 71L85 71L86 72L87 71L88 71L89 71L89 70L90 69L91 69L92 69L93 68L93 69L93 70L92 70L93 71L92 71L92 72L92 71L92 72L92 73L91 74L92 74L93 74L94 74L95 74L96 74L96 75L97 75L97 76L96 76L96 77L97 77L97 78L96 78L96 79L97 80L98 81L99 81L100 81L100 80L101 80L101 81L102 81L103 81L104 81L104 80L105 79L106 79L107 79L107 78L108 78L109 78L108 79L108 80L108 81L109 81L109 80L109 79L110 79L110 78L110 79L111 79L112 79L113 79L114 79L114 80L115 80L116 80L116 79L117 79L118 79L117 80L118 80L119 81L120 81L120 82L121 82L122 83L122 84L123 84L124 84L125 84L126 84L127 85L128 85L128 86L129 86L129 88L130 88L130 89L129 90L130 90L131 90L131 91L132 91L133 91L135 92L136 92L135 93L137 92L139 93L140 93L141 94L143 95L144 95L145 95L145 97L145 99L144 100L143 101L142 102L142 103L141 103L141 104L141 106L141 107L141 108L140 108L140 110L139 111L139 112L138 112L138 113L137 113L135 113L135 114L134 114L132 115L132 116L131 117L132 117L131 118L131 119L130 119L129 121L128 122L127 123L127 124L126 124L125 125L124 125L123 124L122 124L123 125L123 126L123 127L122 128L121 129L119 129L118 129L118 130L118 131L117 131L116 131L115 131L115 132L116 132L117 133L116 133L115 133L115 135L114 135L113 135L113 136L112 136L113 137L114 137L114 138L113 139L112 140L111 140L111 141L111 142L112 142L111 142L110 143L109 143L109 144L107 144L106 143L105 142L105 141L105 140L104 139L105 138L106 137L104 137L105 136L106 134L107 134L107 132L106 133L106 132L106 130L107 129L106 128L106 127L107 127L107 126L108 124L109 122L108 121L109 120L109 119L109 118L109 116L110 114L110 111L110 110L110 108L109 108L109 107L107 106L105 105L104 105L104 104L103 102L102 100L101 98L100 97L99 97L99 96L99 95L99 94L100 93L100 92L100 93L99 92L99 91L100 90L100 89L101 89L101 88L102 87L103 86L103 85L102 84L103 84L103 83L102 83L102 82L101 81L100 81L100 82L100 83L99 83L99 82L98 82L97 82L96 82L96 81L95 80L94 80L94 79L93 78L92 77L93 77L92 77L91 77L90 76L89 76L88 76L88 75L87 74L86 74L85 74L84 74L83 74L82 74L81 73L80 73L79 73L78 72L76 72L76 71L75 71L75 70L74 70L75 69L74 69L75 69L74 68L74 67L73 66L72 65L71 64L70 63L69 62L68 62L68 61L67 60L67 59L66 58L65 58L65 59L65 60L66 60L66 61L67 61L67 62L68 62L68 63L69 64L69 65L69 66L70 66L71 67L70 67L69 66L68 66L68 65L68 64L67 64L67 63L66 63L65 62L66 62L66 61L65 61L64 60L64 59L63 58L63 57L62 56L61 56L60 56L59 55L58 54L57 52L56 51L56 50L56 49L56 48L55 47L56 46L56 44L56 43L56 42L55 42L57 42L57 43L58 43L58 42L57 41L55 40L54 40L53 39L52 38L51 37L51 36L49 36L49 35L48 35L48 34L46 33L46 32L45 32L43 32L42 31L40 30L39 30L37 30L36 30L34 30L33 29L32 29L32 30L31 30L30 30L29 31L28 31L28 30L29 29L30 29L29 29L28 29L27 30L26 31L27 31L26 32L25 32L24 33L23 33L22 34L20 34L19 35L18 35L17 35L15 36L15 35L16 35L17 35L18 34L19 34L20 34L21 33L22 33L22 32L23 31L22 31L21 31L21 32L20 31L19 31L18 31L18 30L17 30L16 30L15 30L15 29L14 28L15 27L16 27L17 27L18 26L18 27L19 26L18 26L19 25L18 25L17 26L16 25L15 26L14 25L13 25L12 24L13 24L16 23L16 24L18 24L18 23L16 23L16 22L15 22L13 22L14 21L16 21L17 21L17 20L18 20L19 20L21 19L22 19L23 19L25 19L26 19L28 19L29 20L30 19L32 20L34 20L35 20L36 20L38 20L39 20L41 21L42 21L43 21L44 21L46 20L47 20L49 20L50 20L51 20L52 20L53 20L54 21L56 20L56 21L57 20L59 20L60 21L62 21L64 21L65 21L66 22L65 22L67 22L69 22L70 22L71 23L72 22L71 22L72 21L73 21L74 21L75 21L76 22L77 22L79 22L80 22L82 22L81 22L82 21L84 22L84 23L85 22L86 21L85 20L84 20L84 19L85 18L86 18L87 19L88 20L89 21ZM66 17L65 17L68 17L69 18L70 17L71 17L72 18L72 17L73 17L75 17L75 18L76 19L77 20L79 20L77 20L78 21L76 21L74 21L73 21L71 21L68 21L67 21L66 21L65 21L64 21L63 20L65 20L66 20L68 20L66 19L64 19L62 19L64 19L62 19L61 18L62 17L65 17L66 17ZM76 17L75 17L73 17L73 16L75 16L76 17ZM104 17L103 17L102 17L101 17L100 17L99 17L99 16L100 16L102 16L104 17ZM93 17L94 17L95 17L98 16L99 17L99 18L101 18L102 17L104 18L106 18L106 19L108 18L109 19L111 19L112 20L113 21L111 21L114 22L115 22L117 23L118 23L118 24L116 25L115 25L113 24L112 24L113 25L114 25L115 26L115 27L114 27L111 26L113 27L114 28L111 28L109 27L108 27L108 26L107 26L105 25L105 26L102 26L101 25L102 25L104 25L106 25L106 24L107 23L107 22L105 21L103 21L104 21L103 20L102 20L101 20L99 20L95 20L93 20L91 20L90 19L92 19L90 19L90 18L91 17L92 16L94 16L93 17ZM80 16L81 16L83 16L83 17L82 17L83 17L83 18L82 19L81 19L80 18L78 17L80 17L78 17L80 16ZM324 17L322 17L320 17L321 16L322 16L323 17L324 17ZM87 17L86 18L85 18L84 17L85 16L88 16L89 16L88 17L87 17ZM60 19L57 19L56 19L54 18L55 17L56 16L55 16L58 16L60 16L62 16L63 16L64 17L63 17L61 17L60 18L60 19ZM331 15L330 15L328 15L326 15L328 15L331 15ZM86 15L84 15L83 15L84 15L85 14L86 15ZM325 14L324 15L321 15L319 15L317 15L318 14L319 14L321 14L325 14ZM82 13L82 14L82 15L80 15L79 15L79 14L77 14L79 14L80 13L81 13L82 13ZM72 14L73 14L74 14L74 15L70 15L68 16L66 16L66 15L68 15L64 15L62 15L64 14L65 14L67 14L69 14L71 15L70 14L70 13L71 13L72 14ZM238 19L237 19L234 19L233 19L232 19L231 18L232 18L232 17L234 16L236 15L238 14L241 14L244 14L246 13L248 13L249 13L248 14L245 14L242 15L238 16L237 17L235 18L236 18L238 19ZM85 13L86 13L88 13L89 14L90 14L91 14L92 14L94 15L95 14L97 14L99 14L100 15L98 16L97 15L94 16L92 16L90 15L88 15L87 15L87 14L86 14L84 14L83 13L85 13ZM64 12L64 13L63 13L62 14L60 14L59 14L57 14L59 13L61 12L62 13L64 12ZM287 13L287 14L288 13L291 13L293 14L294 14L294 15L293 15L290 16L289 16L291 16L292 16L293 16L294 17L294 16L296 16L299 16L299 17L303 17L303 16L305 16L307 16L309 17L309 18L308 18L310 19L311 19L312 18L314 19L316 18L317 19L318 18L320 19L319 18L320 17L330 18L333 19L337 19L339 19L340 20L341 21L342 20L344 20L346 21L348 20L350 21L351 21L350 20L354 20L356 20L359 21L360 21L360 25L359 25L357 25L358 26L359 27L359 28L357 27L355 28L354 28L352 29L351 30L350 30L349 29L346 30L345 30L344 30L343 31L342 32L343 32L343 34L342 34L342 35L340 36L340 37L339 37L338 38L337 39L336 38L336 37L335 35L336 33L337 33L337 32L338 32L340 31L342 30L344 29L344 27L343 28L340 29L339 28L337 29L334 30L335 31L333 31L331 31L331 30L330 30L329 31L325 31L322 31L319 33L315 35L317 35L317 36L318 36L319 36L320 36L321 37L321 38L321 39L321 40L320 42L319 43L318 44L317 45L316 46L315 47L314 47L313 47L312 47L311 47L311 48L310 48L310 49L309 49L309 50L308 50L308 51L307 51L308 51L309 53L309 54L309 55L308 55L307 56L306 56L306 55L307 54L306 53L307 53L306 52L305 52L305 51L305 50L304 50L303 50L302 51L301 51L302 51L301 50L302 50L302 49L301 49L300 50L299 51L298 51L298 52L299 52L299 53L300 53L301 52L302 53L303 53L301 53L301 54L300 54L299 55L300 56L301 57L301 58L302 58L302 59L301 59L302 60L302 61L302 62L301 62L300 63L300 64L299 65L297 66L296 67L295 67L294 68L294 67L293 68L292 68L291 69L290 70L290 69L289 68L288 68L287 69L286 70L286 71L286 72L287 73L288 74L289 75L289 77L289 78L288 79L287 80L286 80L285 81L285 80L284 80L283 79L283 78L282 77L281 77L280 77L280 78L279 79L279 80L279 81L280 81L280 82L280 83L281 83L282 83L282 84L283 84L283 85L283 86L283 87L284 87L284 88L284 89L283 88L281 87L281 86L281 85L280 85L280 84L280 83L279 82L278 82L278 81L279 80L278 79L279 79L278 78L279 77L278 76L278 75L278 74L277 73L277 74L275 74L274 74L275 73L274 72L274 71L274 70L273 70L272 69L272 68L271 67L270 67L271 68L270 68L269 68L268 68L267 69L266 70L265 71L264 72L263 72L262 73L262 74L261 74L260 74L260 75L260 76L260 77L260 78L260 80L259 80L259 81L258 81L258 82L257 81L256 80L256 79L255 78L255 77L255 76L254 75L254 74L253 72L253 71L253 70L253 69L251 69L250 69L249 68L250 68L249 67L248 66L247 66L247 65L246 65L245 65L243 65L241 65L240 65L239 64L237 64L237 63L236 63L235 64L233 63L232 62L231 61L230 60L229 60L228 60L228 61L229 62L229 63L230 63L230 64L231 65L231 64L232 64L232 65L231 65L232 66L233 66L234 66L235 65L236 64L236 65L237 66L238 66L239 66L239 67L240 67L240 68L239 68L239 69L238 70L238 71L237 71L237 72L236 72L235 72L235 73L234 73L233 73L232 74L231 75L230 75L229 76L228 76L227 76L227 77L226 77L225 77L224 77L223 77L223 76L223 75L223 74L223 73L222 73L222 72L221 71L220 70L219 69L219 68L219 67L218 66L217 66L217 65L217 64L216 63L215 62L215 61L215 60L215 61L214 62L213 62L212 60L213 61L213 62L214 64L215 65L216 66L215 66L216 67L217 68L217 69L217 70L217 71L218 72L219 73L219 74L220 75L221 76L222 76L222 77L223 77L223 78L223 79L224 79L224 80L225 80L226 79L227 79L228 79L229 79L230 78L231 78L231 79L231 80L231 81L230 82L229 83L229 85L228 86L227 87L226 88L224 89L223 90L222 91L222 92L221 92L220 93L220 94L219 95L219 96L219 97L219 98L220 99L220 100L220 101L220 102L221 103L221 104L221 105L220 105L220 106L219 107L217 108L216 109L215 110L215 111L215 112L216 112L216 113L215 114L216 114L215 114L214 115L213 115L213 116L213 117L212 118L212 119L211 119L211 120L210 121L209 122L208 123L207 123L206 124L205 124L204 124L203 124L202 124L201 124L200 125L199 124L198 124L198 123L198 122L198 121L197 120L196 119L196 118L195 117L195 116L195 115L194 114L194 113L194 112L193 111L193 110L193 109L192 108L192 107L192 106L192 105L192 104L193 104L193 103L193 102L194 102L194 101L193 100L193 99L193 98L193 97L192 96L192 95L191 94L190 93L189 92L189 91L189 90L189 89L190 88L190 87L189 86L188 86L189 85L187 86L186 86L185 85L185 84L184 84L183 84L182 84L181 84L179 85L178 85L177 85L176 85L175 85L174 85L173 85L172 86L171 85L170 84L169 84L169 83L168 83L167 82L167 81L166 81L166 80L165 80L165 79L164 79L164 78L163 78L163 77L163 76L162 75L163 75L163 74L164 74L163 73L164 73L164 72L164 71L164 70L163 69L163 68L164 67L164 66L165 66L165 65L165 64L166 64L166 63L167 62L168 62L169 61L170 61L170 60L170 59L171 58L171 57L172 56L173 56L174 55L174 54L175 54L175 55L176 55L177 55L178 55L179 54L180 54L181 54L181 53L183 53L185 53L186 53L187 53L188 53L190 53L191 53L191 54L191 55L190 56L191 56L191 57L193 57L194 57L195 58L196 59L197 59L198 59L199 60L200 59L200 58L201 57L202 57L203 57L203 58L204 58L205 58L206 58L207 59L208 59L209 59L210 59L211 58L212 59L213 59L214 59L215 58L214 58L215 58L215 57L215 56L216 55L216 54L216 53L215 53L214 54L213 54L212 53L211 53L210 54L209 53L208 53L207 52L206 52L207 51L206 51L207 50L209 50L209 49L211 49L212 48L214 48L215 48L217 49L218 49L220 49L222 48L221 47L220 47L219 46L218 45L217 45L218 44L218 43L219 43L218 43L217 43L216 43L215 44L216 45L217 45L216 45L215 45L214 46L213 45L214 45L212 45L213 44L214 44L213 44L212 44L212 43L211 43L210 44L210 45L209 45L209 46L208 47L208 48L209 49L208 49L207 49L206 50L206 49L205 49L204 49L204 50L203 50L203 51L204 51L204 52L203 52L203 53L203 54L202 54L202 53L201 52L201 51L200 51L200 50L199 50L199 49L200 48L199 48L198 48L198 47L197 47L196 46L195 46L195 45L194 45L194 44L193 44L192 45L193 46L194 46L194 47L195 48L196 48L197 49L198 49L198 50L197 50L196 50L197 51L196 52L196 51L196 50L195 50L195 49L194 49L193 49L192 48L191 48L191 47L190 46L189 46L188 46L187 46L187 47L185 47L183 47L183 48L182 49L181 49L180 50L180 51L180 52L179 52L179 53L178 53L177 53L176 53L175 54L174 54L173 53L172 53L171 53L171 52L170 51L171 51L171 50L171 49L171 48L171 47L172 46L173 46L175 46L176 47L178 47L179 46L179 44L178 43L177 42L176 42L175 41L177 41L178 41L178 40L179 41L181 40L182 39L183 39L184 38L185 37L186 36L187 37L187 36L188 36L189 36L189 35L188 34L188 33L189 33L190 33L191 32L191 33L190 33L191 34L190 34L190 35L191 36L192 36L193 36L194 36L195 36L196 35L198 35L199 35L199 36L200 36L200 35L201 35L201 34L201 33L202 33L203 32L203 33L204 33L204 32L203 31L205 31L206 30L207 31L208 31L209 30L208 29L206 30L204 30L203 30L202 30L201 29L202 28L201 27L202 27L202 26L205 25L205 24L204 24L202 24L201 25L201 26L200 26L198 27L197 29L198 29L199 30L198 31L197 31L196 33L196 34L195 34L194 35L193 35L193 34L192 33L191 31L190 31L188 32L187 32L186 31L185 30L185 28L186 27L189 27L191 26L192 24L195 22L196 21L199 20L201 20L203 20L205 19L206 19L208 19L211 20L210 20L211 20L212 20L214 21L217 21L220 22L221 23L220 24L218 24L214 23L213 23L215 24L215 26L216 26L217 26L217 25L220 25L222 24L223 24L224 24L225 23L224 23L224 22L223 21L226 22L227 22L226 22L226 23L228 23L228 22L230 22L234 21L233 22L235 22L237 22L239 21L240 22L241 21L240 20L241 20L244 20L245 21L249 22L249 21L248 21L247 21L247 20L247 19L249 18L249 17L250 17L253 17L253 18L252 19L253 20L253 21L254 22L253 22L251 24L252 24L253 23L254 23L255 22L254 22L255 21L254 21L254 20L254 19L253 19L255 18L255 17L256 18L255 19L256 19L256 18L258 18L260 18L262 18L261 17L261 16L262 16L265 16L267 16L266 16L267 15L268 15L270 14L273 14L276 14L277 14L279 14L281 14L281 13L282 13L284 12L286 13L285 13L287 13ZM229 49L230 49L230 50L229 51L229 52L230 53L231 53L232 53L234 53L234 52L234 51L233 51L233 50L233 49L234 49L235 49L234 48L233 48L233 49L233 48L232 48L233 48L233 47L231 47L231 46L230 46L230 45L231 45L232 45L233 45L233 44L233 43L232 43L231 43L230 43L229 44L228 44L227 45L228 46L227 47L229 48L229 49ZM86 12L86 13L84 12L86 12ZM70 12L68 13L66 12L67 12L69 12L70 12ZM205 12L202 13L201 12L203 12L205 12ZM70 11L69 12L67 12L67 11L68 11L69 11L70 11ZM84 12L83 12L82 12L81 12L81 11L83 11L84 12ZM80 12L79 12L77 12L75 12L76 11L75 11L76 11L79 11L80 12ZM285 12L279 12L281 11L282 11L283 11L285 11L285 12ZM198 10L202 11L199 11L198 12L197 13L196 13L194 13L195 12L193 12L191 11L190 10L193 10L194 10L195 10L196 10L197 10L198 10ZM205 10L207 10L206 10L203 11L200 10L198 10L197 10L200 9L202 10L203 9L205 10ZM231 9L230 10L229 10L228 10L227 10L227 9L225 9L227 9L228 9L229 9L230 9L232 9L231 9ZM280 11L278 11L275 11L273 11L273 10L271 10L274 9L276 9L278 9L280 10L280 11ZM93 10L94 11L93 11L91 12L89 12L87 12L86 11L87 11L85 11L84 10L83 10L84 9L85 9L86 9L85 9L88 9L89 9L91 9L92 10L93 10ZM112 7L114 7L116 7L118 7L118 8L116 8L113 8L112 8L115 8L112 9L111 9L109 10L107 10L106 11L103 11L104 11L105 11L104 12L102 12L100 13L102 13L99 14L97 14L94 14L92 14L91 14L90 13L92 13L92 12L95 12L94 12L92 12L93 11L95 11L93 10L96 10L97 10L98 10L96 9L92 9L91 9L90 9L89 8L88 8L90 8L91 8L93 8L95 7L96 7L97 8L98 7L99 7L101 7L104 7L107 7L109 7L112 7ZM153 6L159 7L157 8L153 8L148 8L149 8L152 8L155 8L157 8L158 8L157 9L159 8L164 8L167 8L168 9L164 9L163 10L160 10L162 10L161 11L160 11L160 12L162 13L160 13L158 13L160 14L160 15L159 15L161 16L158 16L160 16L159 17L158 17L156 17L158 17L158 18L156 17L155 18L157 18L158 19L156 20L156 19L154 19L155 19L154 20L156 20L158 20L155 21L152 22L149 22L148 22L147 22L146 23L144 24L143 24L142 24L140 25L139 25L139 26L139 27L137 27L138 28L137 29L137 30L135 30L134 29L132 29L131 29L130 28L128 26L128 25L126 24L127 23L126 23L127 22L129 21L129 20L128 20L127 21L125 20L126 19L127 19L129 19L127 19L126 18L125 19L124 18L125 17L124 16L123 15L121 15L121 14L119 14L117 14L114 14L111 14L110 14L109 13L111 13L113 13L109 12L107 12L111 11L114 11L115 10L112 10L113 9L116 9L118 9L117 8L120 8L123 8L126 8L127 8L130 8L132 8L133 8L135 8L133 8L133 7L137 7L140 7L141 6L145 6L153 6Z";var hi=360,sn=180,nn=n=>n+180,on=n=>90-n,Km=9,Bd=23.44,Hd=66.56,jd=n=>n===0?"0":`${Math.abs(n)}°${n>0?"E":"W"}`,Kd=n=>n===0?"0":`${Math.abs(n)}°${n>0?"N":"S"}`;function Vm(n){let a=[],e=[],t=null;for(let r of n)t!==null&&Math.abs(r.longitude-t)>180&&(e.length&&a.push(e),e=[]),e.push(`${nn(r.longitude)},${on(r.latitude)}`),t=r.longitude;return e.length&&a.push(e),a.filter(r=>r.length>1).map(r=>r.join(" "))}var Vd={mc:"MC",ic:"IC",ascendant:"ASC",descendant:"DSC"},Br=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this)}updated(){for(let e of this.renderRoot.querySelectorAll('svg[part="chart"]')){if(typeof e.getBBox!="function")continue;let{x:t,y:r,width:s,height:i}=e.getBBox();e.setAttribute("viewBox",[t-1,r-1,s+2,i+2].join(" "))}}renderData(e){let t=e.lines??[],r=e.birthDetails;return Vt`<div class="wrap" part="card"><header part="header"><h2>${this.t("Astrocartography")}</h2>${r?Vt`<p class="roxy-label">${V(this.effectiveLang(),r.date,r.time)} · ${Kd(Math.round(r.latitude))} ${jd(Math.round(r.longitude))}</p>`:Ka}</header>${this.chartViewport.renderChartViewport(this.renderMap(t,r),this.t("Astrocartography"),this.translator)} ${this.renderLegend(t)} ${e.summary&&!this.hideReadings?Vt`<p class="summary">${e.summary}</p>`:Ka} ${this.renderInterpretations(t)}</div>`}renderMap(e,t){return Vt`<svg viewBox="0 0 ${hi} ${sn}" part="chart" role="img" aria-label="${this.t("World map of planetary astrocartography lines")}"><title>${this.t("Astrocartography world map")}</title><desc>${this.t("Equirectangular world map. Each body has a Midheaven and Imum Coeli meridian and a curved Ascendant and Descendant line, colored per body.")}</desc><rect class="map-frame" x="0" y="0" width="${hi}" height="${sn}"/><path class="land" d="${Fd}" fill-rule="evenodd"/>${this.renderGraticule()} ${this.renderBodyLines(e)} ${t?qt`<text class="birthplace" x=${nn(t.longitude)} y=${on(t.latitude)} text-anchor="middle" dominant-baseline="central"><title>${this.t("Birth location")}</title>★</text>`:Ka}</svg>`}renderGraticule(){let e=[];for(let s=-150;s<=150;s+=30){let i=nn(s),o=s===0;e.push(qt`<line class=${o?"grat-axis":"grat"} x1=${i} y1="0" x2=${i} y2=${sn} />`),e.push(qt`<text class="axis-label" x=${i} y=${sn-2} text-anchor="middle">${jd(s)}</text>`)}let t=[];for(let s=-60;s<=60;s+=30){let i=on(s),o=s===0;t.push(qt`<line class=${o?"grat-axis":"grat"} x1="0" y1=${i} x2=${hi} y2=${i} />`),t.push(qt`<text class="axis-label" x="2" y=${i-1}>${Kd(s)}</text>`)}let r=[Bd,-Bd,Hd,-Hd].map(s=>qt`<line class="grat-ref" x1="0" y1=${on(s)} x2=${hi} y2=${on(s)} />`);return qt`${e}${t}${r}`}renderBodyLines(e){let t=e.map((d,p)=>{let h=g(d,"planet");return{line:d,name:h,color:Fr(d.planet,p),glyph:d.symbol||$(d.planet)||h}}),r=d=>d.reduce((p,h)=>Math.abs(h.latitude)<Math.abs(p.latitude)?h:p,d[0]??{latitude:0,longitude:0}),s=d=>new Map(zt(t,p=>d(p)+180,Km).map(({item:p,displayLongitude:h})=>[p,h-180])),i=s(d=>d.line.mc.longitude),o=s(d=>d.line.ic.longitude),l=s(d=>r(d.line.ascendant.points??[]).longitude),c=s(d=>r(d.line.descendant.points??[]).longitude);return t.map(d=>{let{line:p,name:h,color:x,glyph:L}=d,v=w=>w.get(d)??0;return qt`${[this.renderMeridian(p.mc.longitude,v(i),x,L,h,"mc",!1),this.renderMeridian(p.ic.longitude,v(o),x,L,h,"ic",!0),this.renderCurve(p.ascendant.points,{longitude:v(l),latitude:r(p.ascendant.points??[]).latitude},x,L,h,"ascendant",!1),this.renderCurve(p.descendant.points,{longitude:v(c),latitude:r(p.descendant.points??[]).latitude},x,L,h,"descendant",!0)]}`})}renderMeridian(e,t,r,s,i,o,l){let c=nn(e),d=o==="ic"?sn-16:9;return qt`<g>
2
+ <line class=${`acg-line${l?" dashed":""}`} stroke=${r} x1=${c} y1="0" x2=${c} y2=${sn}><title>${this.t("{{planet}} {{angle}} line",{planet:i,angle:this.t(Vd[o]??"MC")})}</title></line>
205
3
  <text class="acg-glyph" fill=${r} x=${nn(t)} y=${d} text-anchor="middle" dominant-baseline="central">${s}</text>
206
- </g>`}renderCurve(e,t,r,s,i,o,l){let c=Km(e??[]);return c.length===0?Ka:qt`<g>
207
- ${c.map(d=>qt`<polyline class=${`acg-line${l?" dashed":""}`} stroke=${r} points=${d}><title>${this.t("{{planet}} {{angle}} line",{planet:i,angle:this.t(Kd[o]??"MC")})}</title></polyline>`)}
4
+ </g>`}renderCurve(e,t,r,s,i,o,l){let c=Vm(e??[]);return c.length===0?Ka:qt`<g>
5
+ ${c.map(d=>qt`<polyline class=${`acg-line${l?" dashed":""}`} stroke=${r} points=${d}><title>${this.t("{{planet}} {{angle}} line",{planet:i,angle:this.t(Vd[o]??"MC")})}</title></polyline>`)}
208
6
  <text class="acg-glyph" fill=${r} x=${nn(t.longitude)} y=${on(t.latitude)} text-anchor="middle" dominant-baseline="central">${s}</text>
209
- </g>`}renderLegend(e){return e.length===0?Ka:Vt`<div class="legend" part="legend">${e.map((t,r)=>{let s=Fr(t.planet,r);return Vt`<span class="legend-item"><span class="legend-swatch" style="${`border-block-start-color: ${s}`}"></span> ${t.symbol?Vt`<span aria-hidden="true">${t.symbol}</span>`:Ka}${g(t,"planet")}</span>`})} <span class="legend-note">${this.t("Solid lines are the Ascendant and Midheaven, dashed are the Descendant and IC.")}</span></div>`}renderInterpretations(e){return e.length===0||this.hideReadings?Ka:Vt`<section class="block" part="section readings"><h3>${this.t("Planetary lines")}</h3>${e.map((t,r)=>{let s=Fr(t.planet,r),i=[["MC",t.mc.interpretation],["IC",t.ic.interpretation],["AC",t.ascendant.interpretation],["DC",t.descendant.interpretation]];return Vt`<details class="interp-card" part="reading" name="acg-lines" ?open="${r===0}"><summary><span class="interp-lead"><span class="interp-dot" style="${`background: ${s}`}"></span> ${t.symbol?Vt`<span aria-hidden="true">${t.symbol}</span>`:Ka}${g(t,"planet")} </span>${H()}</summary><div class="interp-body">${i.filter(([,o])=>o).map(([o,l])=>Vt`<p class="interp-line"><span class="code">${o}</span>${l}</p>`)}</div></details>`})}</section>`}};Br.endpoints=Gl,Br.styles=[u,Ge,M,j,Hm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}svg{border-radius:var(--roxy-radius-sm);width:100%;height:auto;display:block}.map-frame{fill:color-mix(in srgb, var(--roxy-border) 12%, transparent);stroke:var(--roxy-border);stroke-width:.8px}.land{fill:var(--roxy-secondary);opacity:.13}.grat{stroke:var(--roxy-border);stroke-width:.4px;fill:none}.grat-axis{stroke:var(--roxy-muted);stroke-width:.6px;opacity:.6}.grat-ref{stroke:var(--roxy-secondary);stroke-width:.4px;stroke-dasharray:2 2;opacity:.5;fill:none}.axis-label{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .3125)}.acg-line{fill:none;stroke-width:1px;opacity:.95}.acg-line.dashed{stroke-dasharray:4 2.5}.acg-glyph{font-size:calc(var(--roxy-text-base) * .5);font-weight:var(--roxy-weight-bold)}.birthplace{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .5625)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.legend-item{align-items:center;gap:var(--roxy-space-xs);display:inline-flex}.legend-swatch{inline-size:var(--roxy-space-md);border-block-start:var(--roxy-line-thick) solid;block-size:0}.legend-note{width:100%}.summary,.interp-line{font-size:var(--roxy-text-sm)}.interp-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);flex-shrink:0;align-self:center}.interp-line .code{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);margin-inline-end:var(--roxy-space-xs)}`],Br=m([f("roxy-astrocartography-map")],Br);import{css as Ym,html as Ie,nothing as ft}from"lit";import{css as Vm}from"lit";var qm=new Set(["wood","fire","earth","metal","water"]);function bt(n){let a=St(n??"");return qm.has(a)?`element-${a}`:""}var ca=Vm`.element-wood{--_element:var(--roxy-success);--_element-ink:var(--roxy-success-fg)}.element-fire{--_element:var(--roxy-danger);--_element-ink:var(--roxy-danger-fg)}.element-earth{--_element:var(--roxy-warning);--_element-ink:var(--roxy-warning-fg)}.element-metal{--_element:var(--roxy-secondary);--_element-ink:var(--roxy-secondary)}.element-water{--_element:var(--roxy-info);--_element-ink:var(--roxy-info-fg)}.element-word{color:var(--_element-ink)}`;var Um={year:"Year",month:"Month",day:"Day",hour:"Hour"},Vd={harmonious:"Harmonious",challenging:"Challenging"},qd={"stem-combination":"Stem combination","six-combination":"Six combination",trine:"Trine",clash:"Clash",harm:"Harm",punishment:"Punishment","stem-clash":"Stem clash"},Yd={deficient:"Deficient",balanced:"Balanced",excess:"Excess"},Hr=class extends y{renderData(a){let e=this.effectiveLang(),t=V(e,a.birthData?.date,a.birthData?.time);return Ie`<article class="card" part="card" aria-labelledby="bazi-title"><header class="head" part="header"><h2 class="title" id="bazi-title">${this.t("Four pillars")}</h2>${t?Ie`<span class="born">${t}</span>`:ft} ${a.zodiacAnimal?Ie`<span class="roxy-chip animal">${g(a,"zodiacAnimal")}</span>`:ft}</header><div class="pillars-wrap" part="chart" role="region" tabindex="0" aria-label="${this.t("Four pillars")}"><div class="pillars">${(a.pillars??[]).map(r=>this.renderPillar(r))}</div></div>${this.renderDayMaster(a)} ${this.renderElements(a)} ${this.renderInteractions(a)} ${a.summary&&!this.hideReadings?Ie`<p class="summary" part="section summary">${a.summary}</p>`:ft} ${Fa(a.conventions,this.translator,this.effectiveLang())}</article>`}renderPillar(a){let e=Um[a.position],t=a.position==="day";return Ie`<div class="pillar ${t?"pillar-self":""}" part="pillar"><span class="pos roxy-label">${e?this.t(e):S(a.position)}</span> <span class="god">${g(a.tenGod,"name")}</span> <span class="hanzi" lang="zh">${a.stem?.chinese??""}</span> <span class="romanised">${a.stem?.pinyin??""} <span class="element-word ${bt(a.stem?.element)}">${g(a.stem,"element")}</span></span> <span class="hanzi hanzi-branch" lang="zh">${a.branch?.chinese??""}</span> <span class="romanised">${a.branch?.pinyin??""} ${g(a.branch,"animal")}</span> ${a.hiddenStems?.length?Ie`<hr class="rule"><ul class="hidden" aria-label="${this.t("Hidden stems")}">${a.hiddenStems.map(r=>Ie`<li><span lang="zh">${r.stem?.chinese??""}</span> <span class="role">${r.role}</span> ${g(r.tenGod,"name")}</li>`)}</ul>`:ft} ${a.naYin?Ie`<hr class="rule"><span class="nayin" title="${this.t("Na Yin")}">${a.naYin}</span>`:ft}</div>`}renderDayMaster(a){let e=a.dayMaster;return e?Ie`<section part="section day-master"><h3 class="block-title">${this.t("Day Master")}</h3><div class="master"><span class="hanzi" lang="zh">${e.chinese??""}</span> <span><b class="element-word ${bt(e.element)}">${g(e,"element")}</b> ${e.polarity??""} ${e.pinyin??""}</span> ${e.nature&&!this.hideReadings?Ie`<p part="reading">${e.nature}</p>`:ft}</div></section>`:ft}renderElements(a){let e=a.fiveElements??[];if(e.length===0)return ft;let t=this.effectiveLang(),r=e.reduce((s,i)=>s+(i.count??0),0)||1;return Ie`<section part="section elements"><h3 class="block-title">${this.t("Elements")}</h3><div class="elements">${e.map(s=>Ie`<div class="element ${bt(s.element)}" part="label-track"><span class="element-word">${g(s,"element")}</span> <span class="element-track"><span class="element-fill" style="width:${(s.count??0)/r*100}%"></span></span> <span class="element-count">${P(t,s.count??0)} ${s.level&&Yd[s.level]?this.t(Yd[s.level]):s.level??""}</span> ${s.reading&&!this.hideReadings?Ie`<p class="element-reading" part="reading">${s.reading}</p>`:ft}</div>`)}</div></section>`}renderInteractions(a){let e=a.interactions??[];return e.length===0?ft:Ie`<section part="section interactions"><h3 class="block-title">${this.t("Interactions")}</h3><ul class="interactions">${e.map(t=>Ie`<li class="interaction"><div class="interaction-line"><span lang="zh">${t.chinese??""}</span> <b>${t.type&&qd[t.type]?this.t(qd[t.type]):S(t.type??"")}</b> ${t.quality?Ie`<span class="roxy-chip tag tag-${t.quality}">${t.quality&&Vd[t.quality]?this.t(Vd[t.quality]):t.quality}</span>`:ft} <span>${(t.positions??[]).join(" ")}</span> ${t.transformsTo?Ie`<span>${t.transformsTo}</span>`:ft} ${t.variety?Ie`<span>${t.variety}</span>`:ft} ${t.type==="punishment"&&typeof t.complete=="boolean"?Ie`<span class="completeness">${t.complete?this.t("Complete"):this.t("Partial")}</span>`:ft}</div>${t.meaning&&!this.hideReadings?Ie`<p class="interaction-meaning" part="reading">${t.meaning}</p>`:ft}</li>`)}</ul></section>`}};Hr.endpoints=Il,Hr.styles=[u,G,ca,Ym`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.born{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.animal{margin-inline-start:auto}.pillars-wrap{min-width:0;overflow-x:auto}.pillars{grid-template-columns:repeat(4,minmax(12ch,1fr));display:grid}.pillar{gap:var(--roxy-space-xs);padding:var(--roxy-space-sm);border-block-start:var(--roxy-line-thick) solid transparent;text-align:center;align-content:start;display:grid}.pillar+.pillar{border-inline-start:1px solid var(--roxy-border)}.pillar-self{border-block-start-color:var(--roxy-accent)}.pillar-self .pos{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.god{min-block-size:1lh;color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.hanzi{font-size:calc(var(--roxy-text-base) * 2);line-height:var(--roxy-leading-tight)}.hanzi-branch{color:var(--roxy-accent-ink)}.romanised,.nayin,.hidden .role{color:var(--roxy-muted)}.romanised,.nayin{font-size:var(--roxy-text-xs)}.rule{inline-size:100%;margin:calc(var(--roxy-space-unit) / 2) 0;border:0;border-block-start:1px solid var(--roxy-border)}.hidden{gap:calc(var(--roxy-space-unit) / 2);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);text-align:start;margin:0;padding:0;list-style:none;display:grid}.nayin{text-align:start}.master{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.master .hanzi{font-size:calc(var(--roxy-text-base) * 1.5)}.master p{color:var(--roxy-secondary);flex-basis:100%;margin:0}.elements{gap:var(--roxy-space-xs);display:grid}.element{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) max-content;align-items:center;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:grid}.element-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.25lh;overflow:hidden}:where(.element){--_element:var(--roxy-accent)}.element-fill{background:var(--_element);height:100%;display:block}.element-count{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.element-reading,.interaction-meaning{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);margin:0}.element-reading{grid-column:1/-1}:is(.master p,.element-reading,.interaction-meaning){border-block-start:0}.interactions{margin:0;padding:0;list-style:none;display:grid}.interaction{gap:calc(var(--roxy-space-unit) / 2);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.interaction:first-child{border-block-start:0;padding-block-start:0}.interaction-line{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.tag-harmonious{color:var(--roxy-success-fg)}.tag-challenging{color:var(--roxy-danger-fg)}.summary{margin:0}`],Hr=m([f("roxy-bazi-chart")],Hr);import{css as Zm,html as jr,nothing as hi}from"lit";function da(n,a){return!a||!n?.length?"":n.map(e=>a[String(e)]?.[0]).filter(Boolean).join(", ")}function To(n,a){return!a||typeof n!="number"?"":(a[String(n)]??[]).join(", ")}var Kr=class extends y{renderData(a){let e=a.grahas??[],t=a.bhavas??[];if(!e.length&&!t.length)return this.renderEmpty();let r=e.filter(i=>i.moved),s=a.movedCount??r.length;return jr`<div class="wrap" part="card" aria-label="${this.t("Bhav Chalit")}"><header class="head" part="header"><h2 class="title">${this.t("Bhav Chalit")}</h2><p class="lede">${s===0?this.t("No graha changes house. The Rashi chart and the Chalit chart agree, which is a normal result rather than a missing reading."):this.t("{{count}} of {{total}} grahas change house between the Rashi chart and the unequal Sripati cusps.",{count:s,total:e.length})}</p>${X(this.effectiveLang(),a.frame,this.translator)}</header>${r.length?jr`<div class="moved-list" part="table moved">${r.map(i=>this.renderMoved(i,a.houseThemes))}</div>`:hi} ${t.length?jr`<details part="details"><summary>${this.t("Bhava cusps and occupants")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Bhava cusps and occupants")}"><table part="table"><thead><tr><th>${this.t("Bhava")}</th><th>${this.t("Rashi")}</th><th>${this.t("Start")}</th><th>${this.t("Madhya")}</th><th>${this.t("End")}</th><th>${this.t("Span")}</th><th>${this.t("Grahas")}</th></tr></thead><tbody>${t.map(i=>this.renderBhavaRow(i))}</tbody></table></div></details>`:hi}</div>`}renderMoved(a,e){let t=$(a.graha)??"",r=typeof a.bhava=="number"?da([a.bhava],e):"";return jr`<div class="moved-row"><span class="graha">${t?jr`<span class="glyph">${t}</span>`:hi}${a.graha} </span><span class="shift">${this.t("house {{from}} in the Rashi chart, house {{to}} here",{from:a.rashiHouse??"",to:a.bhava??""})} </span>${r?jr`<span class="themes">${r}</span>`:hi}</div>`}renderBhavaRow(a){let e=(a.grahas??[]).join(", ");return jr`<tr><td class="num">${a.house}</td><td>${a.rashi}</td><td class="num">${b(this.effectiveLang(),a.start,2)}°</td><td class="num">${b(this.effectiveLang(),a.madhya,2)}°</td><td class="num">${b(this.effectiveLang(),a.end,2)}°</td><td class="num">${b(this.effectiveLang(),a.span,2)}°</td><td class="occupants">${e}</td></tr>`}};Kr.endpoints=Fl,Kr.styles=[u,G,Zm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.lede{margin:0}.lede{font-size:var(--roxy-text-sm)}.moved-row{align-items:baseline;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.shift{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.occupants{white-space:normal;color:var(--roxy-secondary)}summary{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}`],Kr=m([f("roxy-bhav-chalit-table")],Kr);import{css as Wm,html as Vr,nothing as mi}from"lit";var Ud=[{key:"bhavadhipatiBala",source:"Bhavadhipati",color:"var(--roxy-accent)"},{key:"digBala",source:"Dig",color:"var(--roxy-info)"},{key:"drishtiBala",source:"Drishti",color:"var(--roxy-success)"}],qr=class extends y{renderData(a){let e=a.bhavas??[];if(!e.length)return this.renderEmpty();let t=Math.max(...e.map(r=>r.totalVirupas??0),1);return Vr`<div class="wrap" part="card" aria-label="${this.t("Bhava Bala")}"><header class="head" part="header"><h2 class="title">${this.t("Bhava Bala")}</h2><p class="subtitle">${a.houseSystem?this.t("Twelve houses ranked by strength on the {{system}} frame",{system:a.houseSystem}):this.t("Twelve houses ranked by strength")}</p>${X(this.effectiveLang(),a.frame,this.translator)}</header><div class="rows" part="table" role="list">${e.map(r=>this.renderBhava(r,t,a.houseThemes))}</div><div class="legend" part="legend" aria-label="${this.t("Component legend")}">${Ud.map(r=>Vr`<div class="legend-row"><span class="swatch" style="background:${r.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(r.source)})}</div>`)}</div></div>`}renderBhava(a,e,t){let r=typeof a.house=="number"?da([a.house],t):"";return Vr`<article class="row" role="listitem"><div class="row-top"><span class="house">${this.t("House {{n}}",{n:a.house})}</span> <span class="rashi">${a.rashi}</span> ${a.lord?Vr`<span class="lord">${this.t("lord {{graha}}",{graha:a.lord})}</span>`:mi} <span class="total">${this.t("{{value}} rupas",{value:b(this.effectiveLang(),a.totalRupas,2)})} ${typeof a.rank=="number"?Vr`<span class="rank">#${a.rank}</span>`:mi}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:b(this.effectiveLang(),a.totalVirupas,1)})}">${Ud.map(s=>{let i=Math.max(0,a[s.key]??0);return i>0?Vr`<span class="seg" style="width:${i/e*100}%;background:${s.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(s.source),value:b(this.effectiveLang(),i,1)})}"></span>`:mi})}</div>${r?Vr`<p class="themes">${r}</p>`:mi}</article>`}};qr.endpoints=Bl,qr.styles=[u,G,Wm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.subtitle,.themes{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.row{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row:last-child{border-block-end:0}.row-top{align-items:baseline;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.house{min-width:9ch;font-weight:var(--roxy-weight-bold)}.rashi{color:var(--roxy-secondary)}.lord{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.total{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);margin-inline-start:auto}.rank{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:var(--roxy-space-xs)}.bar{border-radius:var(--roxy-radius-full);background:color-mix(in srgb, var(--roxy-border) 55%, transparent);block-size:.5lh;display:flex;overflow:hidden}.seg{height:100%}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend-row{align-items:center;gap:var(--roxy-space-xs);display:flex}.swatch{border-radius:var(--roxy-radius-sm);block-size:.6lh;inline-size:1.5ch}`],qr=m([f("roxy-bhava-bala-table")],qr);import{css as Xm,html as Le,nothing as vt,svg as Zd}from"lit";import{property as Jm}from"lit/decorators.js";var Cn=["physical","emotional","intellectual","intuitive"],gi={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function Va(n,a){let e=gi[n];return e?a(e):S(n)}var yi={physical:"var(--roxy-danger)",emotional:"var(--roxy-info)",intellectual:"var(--roxy-success)",intuitive:"color-mix(in oklab, var(--roxy-info) 50%, var(--roxy-danger))",aesthetic:"var(--roxy-warning)",awareness:"color-mix(in oklab, var(--roxy-danger) 70%, var(--roxy-info))",spiritual:"color-mix(in oklab, var(--roxy-success) 50%, var(--roxy-info))",passion:"color-mix(in oklab, var(--roxy-danger) 50%, var(--roxy-warning))",mastery:"var(--roxy-accent)",wisdom:"var(--roxy-muted)"},Qm={ascending:"ascending through zero",descending:"descending through zero"},eg={double:"Double day",triple:"Triple day"},qa=class extends y{constructor(){super(...arguments);this.mode="daily"}renderData(e){return this.mode==="critical-days"&&"criticalDays"in e?this.renderCritical(e):this.mode==="forecast"&&"days"in e?this.renderForecast(e):this.renderDaily(e)}renderDaily(e){let t=e.quickRead??{},r=Object.entries(t).map(([i,o])=>{let l=typeof o=="number"?o:0,c=Math.abs(l)>1?l/100:l;return[i,c]}),s=e.spotlight;return Le`<section class="wrap" part="card" aria-label="${this.t("Daily biorhythm")}"><header class="head" part="header"><h2>${this.t("Biorhythm")}</h2><div class="head-meta">${e.overallPhase?Le`<span class="roxy-chip">${S(e.overallPhase)}</span>`:vt} ${typeof e.energyRating=="number"?Le`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:vt}</div></header>${s?Le`<div class="spotlight" part="details spotlight" style="${`border-inline-start-color: ${yi[s.cycle]??"var(--roxy-accent)"}`}"><p class="roxy-label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${Va(s.cycle,i=>this.t(i))}</strong> ${typeof s.value=="number"?Le`<span class="energy">${we(this.effectiveLang(),s.value,0)}</span>`:vt} ${s.phase?Le`<span class="roxy-chip">${S(s.phase)}</span>`:vt}</div>${s.message&&!this.hideReadings?Le`<p>${s.message}</p>`:vt}</div>`:vt}<div class="bars" part="chart bars" role="list">${r.map(([i,o])=>{let l=Math.abs(o)*50,c=yi[i]??"var(--roxy-accent)";return Le`<div class="bar" role="listitem"><span>${Va(i,d=>this.t(d))}</span> <span class="track"><span class="fill ${o<0?"low":"high"}" style="width:${l}%;background:${c}"></span> </span><span class="value">${we(this.effectiveLang(),o*100,0)}</span></div>`})}</div>${this.hideReadings?vt:Le`${e.dailyMessage?Le`<p>${e.dailyMessage}</p>`:vt} ${e.advice?Le`<p>${e.advice}</p>`:vt}`}</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return Le`<div class="roxy-empty" role="status">${this.t("No forecast")}</div>`;let r=600,s=160,i=r/Math.max(t.length-1,1),o=e.summary;return Le`<section class="wrap" part="card" aria-label="${this.t("Biorhythm forecast")}"><header class="head" part="header"><h2>${this.t("Forecast")}</h2><span class="energy">${xt(this.effectiveLang(),e.startDate,e.endDate)}</span></header><svg viewBox="0 0 ${r} ${s}" part="chart" role="img" aria-label="${this.t("Biorhythm cycle lines across the forecast window")}"><title>${this.t("Biorhythm forecast")}</title><line x1="0" y1="${s/2}" x2="${r}" y2="${s/2}" stroke="var(--roxy-border)" stroke-width="1"/>${Cn.map(l=>{let c=t.map((p,h)=>{let x=p[l]??0,L=h*i,v=s/2-x/100*(s/2-8);return`${L.toFixed(2)},${v.toFixed(2)}`}).join(" "),d=yi[l]??"var(--roxy-secondary)";return Zd`<polyline points=${c} fill="none" stroke=${d} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${t.map((l,c)=>l.isCritical?Zd`<circle cx=${(c*i).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger)"><title>${[R(this.effectiveLang(),l.date),qe(this.effectiveLang(),(l.criticalCycles??[]).map(d=>Va(d,p=>this.t(p)))),this.t("critical day"),typeof l.energyRating=="number"?this.t("Energy {{value}}/10",{value:l.energyRating}):""].filter(Boolean).join(" · ")}</title></circle>`:vt)}</svg><div class="forecast-axis" part="legend"><span>${R(this.effectiveLang(),t[0]?.date)}</span><span>${R(this.effectiveLang(),t.at(-1)?.date)}</span></div><div class="legend" part="legend">${Cn.map(l=>Le`<span class="key"><span class="dot" style="${`background: ${yi[l]}`}"></span>${this.t(gi[l])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${o?Le`<dl class="roxy-facts" part="details">${this.stat(this.t("Best day"),R(this.effectiveLang(),o.bestDay))} ${this.stat(this.t("Worst day"),R(this.effectiveLang(),o.worstDay))} ${this.stat(this.t("Average energy"),typeof o.averageEnergy=="number"?`${o.averageEnergy}/10`:"")} ${this.stat(this.t("Critical days"),typeof o.criticalDayCount=="number"?`${o.criticalDayCount}`:"")}</dl>`:vt} ${this.renderForecastData(e)} ${o?.periodAdvice&&!this.hideReadings?Le`<p>${o.periodAdvice}</p>`:vt}</section>`}renderForecastData(e){let t=this.effectiveLang();return Le`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${H()}</summary><div class="forecast-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Biorhythm forecast")}"><table class="forecast-table"><caption class="roxy-sr-only">${this.t("Biorhythm forecast")}</caption><thead><tr><th scope="col">${this.t("Date")}</th>${Cn.map(r=>Le`<th scope="col">${this.t(gi[r])}</th>`)}<th scope="col">${this.t("Energy rating")}</th><th scope="col">${this.t("Days since birth")}</th><th scope="col">${this.t("Critical days")}</th></tr></thead><tbody>${e.days.map(r=>Le`<tr><th scope="row"><time datetime="${r.date}">${R(t,r.date)}</time></th>${Cn.map(s=>Le`<td>${we(t,r[s],2)}</td>`)}<td>${this.t("Energy {{value}}/10",{value:r.energyRating})}</td><td>${b(t,r.daysSinceBirth,0)}</td><td>${r.isCritical?qe(t,r.criticalCycles.map(s=>Va(s,i=>this.t(i))))||this.t("critical day"):this.t("None")}</td></tr>`)}</tbody></table></div></details>`}renderCritical(e){let t=e.criticalDays??[],r=e.doubleCriticalDays??[],s=t.map(i=>({label:R(this.effectiveLang(),i.date)||i.date,aside:[i.cycle?Va(i.cycle,o=>this.t(o)):"",this.severityName(i.severity)].filter(Boolean).join(" · "),body:i.advisory??"",extra:Le`<p class="crit-meta">${[i.direction?this.t(Qm[i.direction]):"",typeof i.period=="number"?this.t("{{period}}-day cycle",{period:i.period}):""].filter(Boolean).join(" · ")}</p>`}));return Le`<section class="wrap" part="card" aria-label="${this.t("Critical days")}"><header class="head" part="header"><h2>${this.t("Critical days")}</h2><span class="energy">${xt(this.effectiveLang(),e.startDate,e.endDate)}</span></header><dl class="roxy-facts" part="details">${this.stat(this.t("Events"),typeof e.totalCriticalDays=="number"?`${e.totalCriticalDays}`:"")} ${this.stat(this.t("Double days"),r.length?`${r.length}`:"0")} ${this.stat(this.t("Triple day"),e.tripleCriticalDay?R(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${r.length>0?Le`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:qe(this.effectiveLang(),r.map(i=>R(this.effectiveLang(),i)||i))})}</p>`:vt} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let t=eg[e];return t?this.t(t):""}stat(e,t){return t?Le`<div><dt>${e}</dt><dd>${t}</dd></div>`:vt}};qa.endpoints=Hl,qa.styles=[u,M,re,j,Xm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.head-meta{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.energy{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.spotlight{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);display:grid}.spotlight .lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.spotlight strong{text-transform:capitalize}.spotlight p{font-size:var(--roxy-text-sm)}.bars{gap:var(--roxy-space-xs);display:grid}.bar{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:minmax(0,16ch) minmax(0,1fr) 7ch;display:grid}.track{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.7lh;position:relative;overflow:hidden}.track:after{content:"";background:var(--roxy-surface);width:1px;position:absolute;top:0;bottom:0;left:50%}.fill{height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);position:absolute;top:0}.fill.high{left:50%}.fill.low{right:50%}.value{color:var(--roxy-muted);text-align:end;font-variant-numeric:tabular-nums}svg{width:100%;max-width:var(--roxy-chart-max-width,37.5rem);height:auto;display:block}.legend{gap:var(--roxy-space-md);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.key{align-items:center;gap:var(--roxy-space-xs);text-transform:capitalize;display:inline-flex}.dot{border-radius:var(--roxy-radius-full);block-size:.6lh;inline-size:.6lh}.dot.critical{background:var(--roxy-danger)}.roxy-facts{margin:0}.roxy-facts dd{font-weight:var(--roxy-weight-bold)}.forecast-data>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}.forecast-scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}.forecast-table{width:100%}.forecast-table th,.forecast-table td{text-align:end;white-space:nowrap}.forecast-table th:first-child,.forecast-table td:first-child{text-align:start}.forecast-axis{justify-content:space-between;gap:var(--roxy-space-sm);width:100%;max-width:var(--roxy-chart-max-width,37.5rem);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);display:flex}.crit-note{border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md)}.crit-meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],m([Jm({type:String,reflect:!0})],qa.prototype,"mode",2),qa=m([f("roxy-biorhythm-chart")],qa);import{css as $g,html as Y,nothing as oe}from"lit";import{state as wg}from"lit/decorators.js";import{nothing as tg,svg as Dt}from"lit";var ap=14,ag=86,rp=0,rg=102,Ya=6,sp=(ag-ap)*Ya,sg=(rg-rp)*Ya;function Ur(n,a){return{x:(n-ap)*Ya,y:(a-rp)*Ya}}var E=50,xi=n=>2*E-n,Tn=1.02*Ya,ng=1.15*Ya,Fe=2.87,Lt=4.4,Wd=5.65,Eo={head:{64:[E-Fe,11.2],61:[E,11.2],63:[E+Fe,11.2]},ajna:{47:[E-Fe,18],24:[E,18],4:[E+Fe,18],17:[E-Fe,20.6],11:[E+Fe,20.6],43:[E,25.3]},throat:{62:[E-Fe,32.4],23:[E,32.4],56:[E+Fe,32.4],16:[E-Lt,34.7],35:[E+Lt,34.7],20:[E-Lt,37.3],12:[E+Lt,37.3],45:[E+Lt,39.6],31:[E-Fe,41.9],8:[E,41.9],33:[E+Fe,41.9]},g:{1:[E,47.7],7:[E-Fe,50.3],13:[E+Fe,50.3],10:[E-Wd,53.4],25:[E+Wd,53.4],15:[E-Fe,56.8],46:[E+Fe,56.8],2:[E,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[E-Fe,72.7],14:[E,72.7],29:[E+Fe,72.7],34:[E-Lt,75.4],27:[E-Lt,79],59:[E+Lt,79],42:[E-Fe,81.7],3:[E,81.7],9:[E+Fe,81.7]},"solar-plexus":{},root:{53:[E-Fe,90.2],60:[E,90.2],52:[E+Fe,90.2],54:[E-Lt,92.6],19:[E+Lt,92.6],38:[E-Lt,95.3],39:[E+Lt,95.3],58:[E-Lt,98.1],41:[E+Lt,98.1]}},ig={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function og(){let n={},a={};for(let[e,[t,r]]of Object.entries(Eo.spleen))Eo["solar-plexus"][ig[Number(e)]]=[xi(t),r];for(let[e,t]of Object.entries(Eo))for(let[r,[s,i]]of Object.entries(t))n[Number(r)]=Ur(s,i),a[Number(r)]=e;return{points:n,centerOf:a}}var{points:Mo,centerOf:En}=og(),i$=sp/2;function Yr(n){return n.map(([a,e])=>Ur(a,e))}function Do(n,a,e){return Yr([[E-n,a],[E+n,a],[E+n,e],[E-n,e]])}var Ao=5.9,Xd=[[18.3,68.3],[18.3,82],[30.3,75.15]],Po=[20,84.4],Jd=12*Ya,lg=[63.2,67.9],cg=13.1*Ya,_o=[{id:"head",label:"Head",color:"gold",points:Yr([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:Yr([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:Do(Ao,31,43.3)},{id:"g",label:"G",color:"gold",points:Yr([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:Yr([[56.65,65.23],[64.2,56.74],[69.75,65.23]]),caption:{at:Ur(...lg),room:cg}},{id:"spleen",label:"Spleen",color:"brown",points:Yr(Xd),caption:{at:Ur(...Po),room:Jd}},{id:"sacral",label:"Sacral",color:"red",points:Do(Ao,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:Yr(Xd.map(([n,a])=>[xi(n),a])),caption:{at:Ur(xi(Po[0]),Po[1]),room:Jd}},{id:"root",label:"Root",color:"brown",points:Do(Ao,88.5,99.8)}],dg=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],pg=hg();function hg(){let n=xi,a=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],e=[`M ${ui(a[0])}`];for(let t=1;t+2<a.length;t+=3)e.push(`C ${ui(a[t])} ${ui(a[t+1])} ${ui(a[t+2])}`);e.push(`L ${fi(a[a.length-1],n)}`);for(let t=a.length-3;t>=1;t-=3)e.push(`C ${fi(a[t+1],n)} ${fi(a[t],n)} ${fi(a[t-1],n)}`);return e.push("Z"),e.join(" ")}function ui([n,a]){let e=Ur(n,a);return`${e.x} ${e.y}`}function fi([n,a],e){let t=Ur(e(n),a);return`${t.x} ${t.y}`}function mg(n){return n.map(a=>`${a.x},${a.y}`).join(" ")}function np(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function gg(){return Dt`<path class="bg-body" d=${pg} />`}function yg(n){let a=[];for(let[e,t]of dg){let r=Mo[e],s=Mo[t];if(!r||!s)continue;a.push(Dt`<line class="bg-channel" x1=${r.x} y1=${r.y} x2=${s.x} y2=${s.y} />`);let i={x:(r.x+s.x)/2,y:(r.y+s.y)/2};for(let[o,l]of[[e,r],[t,s]]){let c=n.get(o);if(!c)continue;let d=np(c);a.push(Dt`<line class="bg-half ${d==="both"?"src-left":d}" x1=${l.x} y1=${l.y} x2=${i.x} y2=${i.y} />`),d==="both"&&a.push(Dt`<line class="bg-half src-right stripe" x1=${l.x} y1=${l.y} x2=${i.x} y2=${i.y} />`)}}return a}function ug(n,a,e){return _o.flatMap(t=>{let r=n.has(t.id),s=`bg-center bg-${t.color}${r?" defined":""}`,i=a?.get(t.id)||t.label;return[Dt`<polygon class=${s} points=${mg(t.points)}><title>${i}: ${r?e.defined:e.open}</title></polygon>`,t.caption?Qd(i,t.caption.at,"bg-caption",t.caption.room):Qd(i,ep(t.points),r?`defined bg-${t.color}`:"",xg(t.points,ep(t.points).y)*.86)]})}function Qd(n,a,e,t){let r=n.split(/\s+/).filter(Boolean),s=r.reduce((c,d)=>Math.max(c,d.length),0),i=Math.min(ng,t/Math.max(1,s*fg)),o=i*1.05,l=a.y-o*(r.length-1)/2;return Dt`<text class="bg-center-name ${e}" style=${`font-size:${i}px`} x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central" aria-hidden="true">${r.map((c,d)=>Dt`<tspan x=${a.x} y=${l+d*o}>${c}</tspan>`)}</text>`}var fg=.66;function xg(n,a){let e=[];for(let t=0;t<n.length;t++){let r=n[t],s=n[(t+1)%n.length];if(r.y===s.y)continue;let i=Math.min(r.y,s.y),o=Math.max(r.y,s.y);a<i||a>o||e.push(r.x+(a-r.y)/(s.y-r.y)*(s.x-r.x))}return e.length<2?0:Math.max(...e)-Math.min(...e)}function ep(n){let a=n.length||1;return{x:n.reduce((e,t)=>e+t.x,0)/a,y:n.reduce((e,t)=>e+t.y,0)/a}}function tp(n,a){return`M ${n.x} ${n.y-Tn} A ${Tn} ${Tn} 0 0 ${a} ${n.x} ${n.y+Tn} Z`}function bg(n,a){let e=[];for(let[t,r]of Object.entries(Mo)){let s=Number(t),i=n.get(s),o=i?np(i):"",l=a.get(s);e.push(Dt`<g class="bg-gate-node">
210
- ${o==="both"?[Dt`<path class="bg-gate-dot on src-left" d=${tp(r,0)} />`,Dt`<path class="bg-gate-dot on src-right" d=${tp(r,1)} />`]:Dt`<circle class="bg-gate-dot ${o&&`on ${o}`}" cx=${r.x} cy=${r.y} r=${Tn} />`}
7
+ </g>`}renderLegend(e){return e.length===0?Ka:Vt`<div class="legend" part="legend">${e.map((t,r)=>{let s=Fr(t.planet,r);return Vt`<span class="legend-item"><span class="legend-swatch" style="${`border-block-start-color: ${s}`}"></span> ${t.symbol?Vt`<span aria-hidden="true">${t.symbol}</span>`:Ka}${g(t,"planet")}</span>`})} <span class="legend-note">${this.t("Solid lines are the Ascendant and Midheaven, dashed are the Descendant and IC.")}</span></div>`}renderInterpretations(e){return e.length===0||this.hideReadings?Ka:Vt`<section class="block" part="section readings"><h3>${this.t("Planetary lines")}</h3>${e.map((t,r)=>{let s=Fr(t.planet,r),i=[["MC",t.mc.interpretation],["IC",t.ic.interpretation],["AC",t.ascendant.interpretation],["DC",t.descendant.interpretation]];return Vt`<details class="interp-card" part="reading" name="acg-lines" ?open="${r===0}"><summary><span class="interp-lead"><span class="interp-dot" style="${`background: ${s}`}"></span> ${t.symbol?Vt`<span aria-hidden="true">${t.symbol}</span>`:Ka}${g(t,"planet")} </span>${H()}</summary><div class="interp-body">${i.filter(([,o])=>o).map(([o,l])=>Vt`<p class="interp-line"><span class="code">${o}</span>${l}</p>`)}</div></details>`})}</section>`}};Br.endpoints=Il,Br.styles=[u,Ge,M,j,jm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}svg{border-radius:var(--roxy-radius-sm);width:100%;height:auto;display:block}.map-frame{fill:color-mix(in srgb, var(--roxy-border) 12%, transparent);stroke:var(--roxy-border);stroke-width:.8px}.land{fill:var(--roxy-secondary);opacity:.13}.grat{stroke:var(--roxy-border);stroke-width:.4px;fill:none}.grat-axis{stroke:var(--roxy-muted);stroke-width:.6px;opacity:.6}.grat-ref{stroke:var(--roxy-secondary);stroke-width:.4px;stroke-dasharray:2 2;opacity:.5;fill:none}.axis-label{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .3125)}.acg-line{fill:none;stroke-width:1px;opacity:.95}.acg-line.dashed{stroke-dasharray:4 2.5}.acg-glyph{font-size:calc(var(--roxy-text-base) * .5);font-weight:var(--roxy-weight-bold)}.birthplace{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .5625)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.legend-item{align-items:center;gap:var(--roxy-space-xs);display:inline-flex}.legend-swatch{inline-size:var(--roxy-space-md);border-block-start:var(--roxy-line-thick) solid;block-size:0}.legend-note{width:100%}.summary,.interp-line{font-size:var(--roxy-text-sm)}.interp-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);flex-shrink:0;align-self:center}.interp-line .code{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);margin-inline-end:var(--roxy-space-xs)}`],Br=m([f("roxy-astrocartography-map")],Br);import{css as Um,html as Ie,nothing as ft}from"lit";import{css as qm}from"lit";var Ym=new Set(["wood","fire","earth","metal","water"]);function bt(n){let a=St(n??"");return Ym.has(a)?`element-${a}`:""}var ca=qm`.element-wood{--_element:var(--roxy-success);--_element-ink:var(--roxy-success-fg)}.element-fire{--_element:var(--roxy-danger);--_element-ink:var(--roxy-danger-fg)}.element-earth{--_element:var(--roxy-warning);--_element-ink:var(--roxy-warning-fg)}.element-metal{--_element:var(--roxy-secondary);--_element-ink:var(--roxy-secondary)}.element-water{--_element:var(--roxy-info);--_element-ink:var(--roxy-info-fg)}.element-word{color:var(--_element-ink)}`;var Zm={year:"Year",month:"Month",day:"Day",hour:"Hour"},qd={harmonious:"Harmonious",challenging:"Challenging"},Yd={"stem-combination":"Stem combination","six-combination":"Six combination",trine:"Trine",clash:"Clash",harm:"Harm",punishment:"Punishment","stem-clash":"Stem clash"},Ud={deficient:"Deficient",balanced:"Balanced",excess:"Excess"},Hr=class extends y{renderData(a){let e=this.effectiveLang(),t=V(e,a.birthData?.date,a.birthData?.time);return Ie`<article class="card" part="card" aria-labelledby="bazi-title"><header class="head" part="header"><h2 class="title" id="bazi-title">${this.t("Four pillars")}</h2>${t?Ie`<span class="born">${t}</span>`:ft} ${a.zodiacAnimal?Ie`<span class="roxy-chip animal">${g(a,"zodiacAnimal")}</span>`:ft}</header><div class="pillars-wrap" part="chart" role="region" tabindex="0" aria-label="${this.t("Four pillars")}"><div class="pillars">${(a.pillars??[]).map(r=>this.renderPillar(r))}</div></div>${this.renderDayMaster(a)} ${this.renderElements(a)} ${this.renderInteractions(a)} ${a.summary&&!this.hideReadings?Ie`<p class="summary" part="section summary">${a.summary}</p>`:ft} ${Fa(a.conventions,this.translator,this.effectiveLang())}</article>`}renderPillar(a){let e=Zm[a.position],t=a.position==="day";return Ie`<div class="pillar ${t?"pillar-self":""}" part="pillar"><span class="pos roxy-label">${e?this.t(e):S(a.position)}</span> <span class="god">${g(a.tenGod,"name")}</span> <span class="hanzi" lang="zh">${a.stem?.chinese??""}</span> <span class="romanised">${a.stem?.pinyin??""} <span class="element-word ${bt(a.stem?.element)}">${g(a.stem,"element")}</span></span> <span class="hanzi hanzi-branch" lang="zh">${a.branch?.chinese??""}</span> <span class="romanised">${a.branch?.pinyin??""} ${g(a.branch,"animal")}</span> ${a.hiddenStems?.length?Ie`<hr class="rule"><ul class="hidden" aria-label="${this.t("Hidden stems")}">${a.hiddenStems.map(r=>Ie`<li><span lang="zh">${r.stem?.chinese??""}</span> <span class="role">${r.role}</span> ${g(r.tenGod,"name")}</li>`)}</ul>`:ft} ${a.naYin?Ie`<hr class="rule"><span class="nayin" title="${this.t("Na Yin")}">${a.naYin}</span>`:ft}</div>`}renderDayMaster(a){let e=a.dayMaster;return e?Ie`<section part="section day-master"><h3 class="block-title">${this.t("Day Master")}</h3><div class="master"><span class="hanzi" lang="zh">${e.chinese??""}</span> <span><b class="element-word ${bt(e.element)}">${g(e,"element")}</b> ${e.polarity??""} ${e.pinyin??""}</span> ${e.nature&&!this.hideReadings?Ie`<p part="reading">${e.nature}</p>`:ft}</div></section>`:ft}renderElements(a){let e=a.fiveElements??[];if(e.length===0)return ft;let t=this.effectiveLang(),r=e.reduce((s,i)=>s+(i.count??0),0)||1;return Ie`<section part="section elements"><h3 class="block-title">${this.t("Elements")}</h3><div class="elements">${e.map(s=>Ie`<div class="element ${bt(s.element)}" part="label-track"><span class="element-word">${g(s,"element")}</span> <span class="element-track"><span class="element-fill" style="width:${(s.count??0)/r*100}%"></span></span> <span class="element-count">${P(t,s.count??0)} ${s.level&&Ud[s.level]?this.t(Ud[s.level]):s.level??""}</span> ${s.reading&&!this.hideReadings?Ie`<p class="element-reading" part="reading">${s.reading}</p>`:ft}</div>`)}</div></section>`}renderInteractions(a){let e=a.interactions??[];return e.length===0?ft:Ie`<section part="section interactions"><h3 class="block-title">${this.t("Interactions")}</h3><ul class="interactions">${e.map(t=>Ie`<li class="interaction"><div class="interaction-line"><span lang="zh">${t.chinese??""}</span> <b>${t.type&&Yd[t.type]?this.t(Yd[t.type]):S(t.type??"")}</b> ${t.quality?Ie`<span class="roxy-chip tag tag-${t.quality}">${t.quality&&qd[t.quality]?this.t(qd[t.quality]):t.quality}</span>`:ft} <span>${(t.positions??[]).join(" ")}</span> ${t.transformsTo?Ie`<span>${t.transformsTo}</span>`:ft} ${t.variety?Ie`<span>${t.variety}</span>`:ft} ${t.type==="punishment"&&typeof t.complete=="boolean"?Ie`<span class="completeness">${t.complete?this.t("Complete"):this.t("Partial")}</span>`:ft}</div>${t.meaning&&!this.hideReadings?Ie`<p class="interaction-meaning" part="reading">${t.meaning}</p>`:ft}</li>`)}</ul></section>`}};Hr.endpoints=Fl,Hr.styles=[u,G,ca,Um`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.born{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.animal{margin-inline-start:auto}.pillars-wrap{min-width:0;overflow-x:auto}.pillars{grid-template-columns:repeat(4,minmax(12ch,1fr));display:grid}.pillar{gap:var(--roxy-space-xs);padding:var(--roxy-space-sm);border-block-start:var(--roxy-line-thick) solid transparent;text-align:center;align-content:start;display:grid}.pillar+.pillar{border-inline-start:1px solid var(--roxy-border)}.pillar-self{border-block-start-color:var(--roxy-accent)}.pillar-self .pos{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.god{min-block-size:1lh;color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.hanzi{font-size:calc(var(--roxy-text-base) * 2);line-height:var(--roxy-leading-tight)}.hanzi-branch{color:var(--roxy-accent-ink)}.romanised,.nayin,.hidden .role{color:var(--roxy-muted)}.romanised,.nayin{font-size:var(--roxy-text-xs)}.rule{inline-size:100%;margin:calc(var(--roxy-space-unit) / 2) 0;border:0;border-block-start:1px solid var(--roxy-border)}.hidden{gap:calc(var(--roxy-space-unit) / 2);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);text-align:start;margin:0;padding:0;list-style:none;display:grid}.nayin{text-align:start}.master{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.master .hanzi{font-size:calc(var(--roxy-text-base) * 1.5)}.master p{color:var(--roxy-secondary);flex-basis:100%;margin:0}.elements{gap:var(--roxy-space-xs);display:grid}.element{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) max-content;align-items:center;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:grid}.element-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.25lh;overflow:hidden}:where(.element){--_element:var(--roxy-accent)}.element-fill{background:var(--_element);height:100%;display:block}.element-count{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.element-reading,.interaction-meaning{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);margin:0}.element-reading{grid-column:1/-1}:is(.master p,.element-reading,.interaction-meaning){border-block-start:0}.interactions{margin:0;padding:0;list-style:none;display:grid}.interaction{gap:calc(var(--roxy-space-unit) / 2);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.interaction:first-child{border-block-start:0;padding-block-start:0}.interaction-line{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.tag-harmonious{color:var(--roxy-success-fg)}.tag-challenging{color:var(--roxy-danger-fg)}.summary{margin:0}`],Hr=m([f("roxy-bazi-chart")],Hr);import{css as Wm,html as jr,nothing as mi}from"lit";function da(n,a){return!a||!n?.length?"":n.map(e=>a[String(e)]?.[0]).filter(Boolean).join(", ")}function Eo(n,a){return!a||typeof n!="number"?"":(a[String(n)]??[]).join(", ")}var Kr=class extends y{renderData(a){let e=a.grahas??[],t=a.bhavas??[];if(!e.length&&!t.length)return this.renderEmpty();let r=e.filter(i=>i.moved),s=a.movedCount??r.length;return jr`<div class="wrap" part="card" aria-label="${this.t("Bhav Chalit")}"><header class="head" part="header"><h2 class="title">${this.t("Bhav Chalit")}</h2><p class="lede">${s===0?this.t("No graha changes house. The Rashi chart and the Chalit chart agree, which is a normal result rather than a missing reading."):this.t("{{count}} of {{total}} grahas change house between the Rashi chart and the unequal Sripati cusps.",{count:s,total:e.length})}</p>${X(this.effectiveLang(),a.frame,this.translator)}</header>${r.length?jr`<div class="moved-list" part="table moved">${r.map(i=>this.renderMoved(i,a.houseThemes))}</div>`:mi} ${t.length?jr`<details part="details"><summary>${this.t("Bhava cusps and occupants")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Bhava cusps and occupants")}"><table part="table"><thead><tr><th>${this.t("Bhava")}</th><th>${this.t("Rashi")}</th><th>${this.t("Start")}</th><th>${this.t("Madhya")}</th><th>${this.t("End")}</th><th>${this.t("Span")}</th><th>${this.t("Grahas")}</th></tr></thead><tbody>${t.map(i=>this.renderBhavaRow(i))}</tbody></table></div></details>`:mi}</div>`}renderMoved(a,e){let t=$(a.graha)??"",r=typeof a.bhava=="number"?da([a.bhava],e):"";return jr`<div class="moved-row"><span class="graha">${t?jr`<span class="glyph">${t}</span>`:mi}${a.graha} </span><span class="shift">${this.t("house {{from}} in the Rashi chart, house {{to}} here",{from:a.rashiHouse??"",to:a.bhava??""})} </span>${r?jr`<span class="themes">${r}</span>`:mi}</div>`}renderBhavaRow(a){let e=(a.grahas??[]).join(", ");return jr`<tr><td class="num">${a.house}</td><td>${a.rashi}</td><td class="num">${b(this.effectiveLang(),a.start,2)}°</td><td class="num">${b(this.effectiveLang(),a.madhya,2)}°</td><td class="num">${b(this.effectiveLang(),a.end,2)}°</td><td class="num">${b(this.effectiveLang(),a.span,2)}°</td><td class="occupants">${e}</td></tr>`}};Kr.endpoints=Bl,Kr.styles=[u,G,Wm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.lede{margin:0}.lede{font-size:var(--roxy-text-sm)}.moved-row{align-items:baseline;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.shift{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.occupants{white-space:normal;color:var(--roxy-secondary)}summary{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}`],Kr=m([f("roxy-bhav-chalit-table")],Kr);import{css as Xm,html as Vr,nothing as gi}from"lit";var Zd=[{key:"bhavadhipatiBala",source:"Bhavadhipati",color:"var(--roxy-accent)"},{key:"digBala",source:"Dig",color:"var(--roxy-info)"},{key:"drishtiBala",source:"Drishti",color:"var(--roxy-success)"}],qr=class extends y{renderData(a){let e=a.bhavas??[];if(!e.length)return this.renderEmpty();let t=Math.max(...e.map(r=>r.totalVirupas??0),1);return Vr`<div class="wrap" part="card" aria-label="${this.t("Bhava Bala")}"><header class="head" part="header"><h2 class="title">${this.t("Bhava Bala")}</h2><p class="subtitle">${a.houseSystem?this.t("Twelve houses ranked by strength on the {{system}} frame",{system:a.houseSystem}):this.t("Twelve houses ranked by strength")}</p>${X(this.effectiveLang(),a.frame,this.translator)}</header><div class="rows" part="table" role="list">${e.map(r=>this.renderBhava(r,t,a.houseThemes))}</div><div class="legend" part="legend" aria-label="${this.t("Component legend")}">${Zd.map(r=>Vr`<div class="legend-row"><span class="swatch" style="background:${r.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(r.source)})}</div>`)}</div></div>`}renderBhava(a,e,t){let r=typeof a.house=="number"?da([a.house],t):"";return Vr`<article class="row" role="listitem"><div class="row-top"><span class="house">${this.t("House {{n}}",{n:a.house})}</span> <span class="rashi">${a.rashi}</span> ${a.lord?Vr`<span class="lord">${this.t("lord {{graha}}",{graha:a.lord})}</span>`:gi} <span class="total">${this.t("{{value}} rupas",{value:b(this.effectiveLang(),a.totalRupas,2)})} ${typeof a.rank=="number"?Vr`<span class="rank">#${a.rank}</span>`:gi}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:b(this.effectiveLang(),a.totalVirupas,1)})}">${Zd.map(s=>{let i=Math.max(0,a[s.key]??0);return i>0?Vr`<span class="seg" style="width:${i/e*100}%;background:${s.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(s.source),value:b(this.effectiveLang(),i,1)})}"></span>`:gi})}</div>${r?Vr`<p class="themes">${r}</p>`:gi}</article>`}};qr.endpoints=Hl,qr.styles=[u,G,Xm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.subtitle,.themes{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.row{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row:last-child{border-block-end:0}.row-top{align-items:baseline;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.house{min-width:9ch;font-weight:var(--roxy-weight-bold)}.rashi{color:var(--roxy-secondary)}.lord{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.total{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);margin-inline-start:auto}.rank{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:var(--roxy-space-xs)}.bar{border-radius:var(--roxy-radius-full);background:color-mix(in srgb, var(--roxy-border) 55%, transparent);block-size:.5lh;display:flex;overflow:hidden}.seg{height:100%}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend-row{align-items:center;gap:var(--roxy-space-xs);display:flex}.swatch{border-radius:var(--roxy-radius-sm);block-size:.6lh;inline-size:1.5ch}`],qr=m([f("roxy-bhava-bala-table")],qr);import{css as Jm,html as Le,nothing as vt,svg as Wd}from"lit";import{property as Qm}from"lit/decorators.js";var Cn=["physical","emotional","intellectual","intuitive"],yi={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function Va(n,a){let e=yi[n];return e?a(e):S(n)}var ui={physical:"var(--roxy-danger)",emotional:"var(--roxy-info)",intellectual:"var(--roxy-success)",intuitive:"color-mix(in oklab, var(--roxy-info) 50%, var(--roxy-danger))",aesthetic:"var(--roxy-warning)",awareness:"color-mix(in oklab, var(--roxy-danger) 70%, var(--roxy-info))",spiritual:"color-mix(in oklab, var(--roxy-success) 50%, var(--roxy-info))",passion:"color-mix(in oklab, var(--roxy-danger) 50%, var(--roxy-warning))",mastery:"var(--roxy-accent)",wisdom:"var(--roxy-muted)"},eg={ascending:"ascending through zero",descending:"descending through zero"},tg={double:"Double day",triple:"Triple day"},qa=class extends y{constructor(){super(...arguments);this.mode="daily"}renderData(e){return this.mode==="critical-days"&&"criticalDays"in e?this.renderCritical(e):this.mode==="forecast"&&"days"in e?this.renderForecast(e):this.renderDaily(e)}renderDaily(e){let t=e.quickRead??{},r=Object.entries(t).map(([i,o])=>{let l=typeof o=="number"?o:0,c=Math.abs(l)>1?l/100:l;return[i,c]}),s=e.spotlight;return Le`<section class="wrap" part="card" aria-label="${this.t("Daily biorhythm")}"><header class="head" part="header"><h2>${this.t("Biorhythm")}</h2><div class="head-meta">${e.overallPhase?Le`<span class="roxy-chip">${S(e.overallPhase)}</span>`:vt} ${typeof e.energyRating=="number"?Le`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:vt}</div></header>${s?Le`<div class="spotlight" part="details spotlight" style="${`border-inline-start-color: ${ui[s.cycle]??"var(--roxy-accent)"}`}"><p class="roxy-label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${Va(s.cycle,i=>this.t(i))}</strong> ${typeof s.value=="number"?Le`<span class="energy">${we(this.effectiveLang(),s.value,0)}</span>`:vt} ${s.phase?Le`<span class="roxy-chip">${S(s.phase)}</span>`:vt}</div>${s.message&&!this.hideReadings?Le`<p>${s.message}</p>`:vt}</div>`:vt}<div class="bars" part="chart bars" role="list">${r.map(([i,o])=>{let l=Math.abs(o)*50,c=ui[i]??"var(--roxy-accent)";return Le`<div class="bar" role="listitem"><span>${Va(i,d=>this.t(d))}</span> <span class="track"><span class="fill ${o<0?"low":"high"}" style="width:${l}%;background:${c}"></span> </span><span class="value">${we(this.effectiveLang(),o*100,0)}</span></div>`})}</div>${this.hideReadings?vt:Le`${e.dailyMessage?Le`<p>${e.dailyMessage}</p>`:vt} ${e.advice?Le`<p>${e.advice}</p>`:vt}`}</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return Le`<div class="roxy-empty" role="status">${this.t("No forecast")}</div>`;let r=600,s=160,i=r/Math.max(t.length-1,1),o=e.summary;return Le`<section class="wrap" part="card" aria-label="${this.t("Biorhythm forecast")}"><header class="head" part="header"><h2>${this.t("Forecast")}</h2><span class="energy">${xt(this.effectiveLang(),e.startDate,e.endDate)}</span></header><svg viewBox="0 0 ${r} ${s}" part="chart" role="img" aria-label="${this.t("Biorhythm cycle lines across the forecast window")}"><title>${this.t("Biorhythm forecast")}</title><line x1="0" y1="${s/2}" x2="${r}" y2="${s/2}" stroke="var(--roxy-border)" stroke-width="1"/>${Cn.map(l=>{let c=t.map((p,h)=>{let x=p[l]??0,L=h*i,v=s/2-x/100*(s/2-8);return`${L.toFixed(2)},${v.toFixed(2)}`}).join(" "),d=ui[l]??"var(--roxy-secondary)";return Wd`<polyline points=${c} fill="none" stroke=${d} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${t.map((l,c)=>l.isCritical?Wd`<circle cx=${(c*i).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger)"><title>${[R(this.effectiveLang(),l.date),qe(this.effectiveLang(),(l.criticalCycles??[]).map(d=>Va(d,p=>this.t(p)))),this.t("critical day"),typeof l.energyRating=="number"?this.t("Energy {{value}}/10",{value:l.energyRating}):""].filter(Boolean).join(" · ")}</title></circle>`:vt)}</svg><div class="forecast-axis" part="legend"><span>${R(this.effectiveLang(),t[0]?.date)}</span><span>${R(this.effectiveLang(),t.at(-1)?.date)}</span></div><div class="legend" part="legend">${Cn.map(l=>Le`<span class="key"><span class="dot" style="${`background: ${ui[l]}`}"></span>${this.t(yi[l])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${o?Le`<dl class="roxy-facts" part="details">${this.stat(this.t("Best day"),R(this.effectiveLang(),o.bestDay))} ${this.stat(this.t("Worst day"),R(this.effectiveLang(),o.worstDay))} ${this.stat(this.t("Average energy"),typeof o.averageEnergy=="number"?`${o.averageEnergy}/10`:"")} ${this.stat(this.t("Critical days"),typeof o.criticalDayCount=="number"?`${o.criticalDayCount}`:"")}</dl>`:vt} ${this.renderForecastData(e)} ${o?.periodAdvice&&!this.hideReadings?Le`<p>${o.periodAdvice}</p>`:vt}</section>`}renderForecastData(e){let t=this.effectiveLang();return Le`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${H()}</summary><div class="forecast-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Biorhythm forecast")}"><table class="forecast-table"><caption class="roxy-sr-only">${this.t("Biorhythm forecast")}</caption><thead><tr><th scope="col">${this.t("Date")}</th>${Cn.map(r=>Le`<th scope="col">${this.t(yi[r])}</th>`)}<th scope="col">${this.t("Energy rating")}</th><th scope="col">${this.t("Days since birth")}</th><th scope="col">${this.t("Critical days")}</th></tr></thead><tbody>${e.days.map(r=>Le`<tr><th scope="row"><time datetime="${r.date}">${R(t,r.date)}</time></th>${Cn.map(s=>Le`<td>${we(t,r[s],2)}</td>`)}<td>${this.t("Energy {{value}}/10",{value:r.energyRating})}</td><td>${b(t,r.daysSinceBirth,0)}</td><td>${r.isCritical?qe(t,r.criticalCycles.map(s=>Va(s,i=>this.t(i))))||this.t("critical day"):this.t("None")}</td></tr>`)}</tbody></table></div></details>`}renderCritical(e){let t=e.criticalDays??[],r=e.doubleCriticalDays??[],s=t.map(i=>({label:R(this.effectiveLang(),i.date)||i.date,aside:[i.cycle?Va(i.cycle,o=>this.t(o)):"",this.severityName(i.severity)].filter(Boolean).join(" · "),body:i.advisory??"",extra:Le`<p class="crit-meta">${[i.direction?this.t(eg[i.direction]):"",typeof i.period=="number"?this.t("{{period}}-day cycle",{period:i.period}):""].filter(Boolean).join(" · ")}</p>`}));return Le`<section class="wrap" part="card" aria-label="${this.t("Critical days")}"><header class="head" part="header"><h2>${this.t("Critical days")}</h2><span class="energy">${xt(this.effectiveLang(),e.startDate,e.endDate)}</span></header><dl class="roxy-facts" part="details">${this.stat(this.t("Events"),typeof e.totalCriticalDays=="number"?`${e.totalCriticalDays}`:"")} ${this.stat(this.t("Double days"),r.length?`${r.length}`:"0")} ${this.stat(this.t("Triple day"),e.tripleCriticalDay?R(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${r.length>0?Le`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:qe(this.effectiveLang(),r.map(i=>R(this.effectiveLang(),i)||i))})}</p>`:vt} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let t=tg[e];return t?this.t(t):""}stat(e,t){return t?Le`<div><dt>${e}</dt><dd>${t}</dd></div>`:vt}};qa.endpoints=jl,qa.styles=[u,M,re,j,Jm`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.head-meta{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.energy{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.spotlight{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-md);display:grid}.spotlight .lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.spotlight strong{text-transform:capitalize}.spotlight p{font-size:var(--roxy-text-sm)}.bars{gap:var(--roxy-space-xs);display:grid}.bar{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:minmax(0,16ch) minmax(0,1fr) 7ch;display:grid}.track{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.7lh;position:relative;overflow:hidden}.track:after{content:"";background:var(--roxy-surface);width:1px;position:absolute;top:0;bottom:0;left:50%}.fill{height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);position:absolute;top:0}.fill.high{left:50%}.fill.low{right:50%}.value{color:var(--roxy-muted);text-align:end;font-variant-numeric:tabular-nums}svg{width:100%;max-width:var(--roxy-chart-max-width,37.5rem);height:auto;display:block}.legend{gap:var(--roxy-space-md);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.key{align-items:center;gap:var(--roxy-space-xs);text-transform:capitalize;display:inline-flex}.dot{border-radius:var(--roxy-radius-full);block-size:.6lh;inline-size:.6lh}.dot.critical{background:var(--roxy-danger)}.roxy-facts{margin:0}.roxy-facts dd{font-weight:var(--roxy-weight-bold)}.forecast-data>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}.forecast-scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}.forecast-table{width:100%}.forecast-table th,.forecast-table td{text-align:end;white-space:nowrap}.forecast-table th:first-child,.forecast-table td:first-child{text-align:start}.forecast-axis{justify-content:space-between;gap:var(--roxy-space-sm);width:100%;max-width:var(--roxy-chart-max-width,37.5rem);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);display:flex}.crit-note{border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md)}.crit-meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],m([Qm({type:String,reflect:!0})],qa.prototype,"mode",2),qa=m([f("roxy-biorhythm-chart")],qa);import{css as wg,html as Y,nothing as oe}from"lit";import{state as kg}from"lit/decorators.js";import{nothing as ag,svg as Dt}from"lit";var rp=14,rg=86,sp=0,sg=102,Ya=6,np=(rg-rp)*Ya,ng=(sg-sp)*Ya;function Ur(n,a){return{x:(n-rp)*Ya,y:(a-sp)*Ya}}var E=50,bi=n=>2*E-n,Tn=1.02*Ya,ig=1.15*Ya,Fe=2.87,Lt=4.4,Xd=5.65,Do={head:{64:[E-Fe,11.2],61:[E,11.2],63:[E+Fe,11.2]},ajna:{47:[E-Fe,18],24:[E,18],4:[E+Fe,18],17:[E-Fe,20.6],11:[E+Fe,20.6],43:[E,25.3]},throat:{62:[E-Fe,32.4],23:[E,32.4],56:[E+Fe,32.4],16:[E-Lt,34.7],35:[E+Lt,34.7],20:[E-Lt,37.3],12:[E+Lt,37.3],45:[E+Lt,39.6],31:[E-Fe,41.9],8:[E,41.9],33:[E+Fe,41.9]},g:{1:[E,47.7],7:[E-Fe,50.3],13:[E+Fe,50.3],10:[E-Xd,53.4],25:[E+Xd,53.4],15:[E-Fe,56.8],46:[E+Fe,56.8],2:[E,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[E-Fe,72.7],14:[E,72.7],29:[E+Fe,72.7],34:[E-Lt,75.4],27:[E-Lt,79],59:[E+Lt,79],42:[E-Fe,81.7],3:[E,81.7],9:[E+Fe,81.7]},"solar-plexus":{},root:{53:[E-Fe,90.2],60:[E,90.2],52:[E+Fe,90.2],54:[E-Lt,92.6],19:[E+Lt,92.6],38:[E-Lt,95.3],39:[E+Lt,95.3],58:[E-Lt,98.1],41:[E+Lt,98.1]}},og={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function lg(){let n={},a={};for(let[e,[t,r]]of Object.entries(Do.spleen))Do["solar-plexus"][og[Number(e)]]=[bi(t),r];for(let[e,t]of Object.entries(Do))for(let[r,[s,i]]of Object.entries(t))n[Number(r)]=Ur(s,i),a[Number(r)]=e;return{points:n,centerOf:a}}var{points:_o,centerOf:En}=lg(),i$=np/2;function Yr(n){return n.map(([a,e])=>Ur(a,e))}function Ao(n,a,e){return Yr([[E-n,a],[E+n,a],[E+n,e],[E-n,e]])}var Po=5.9,Jd=[[18.3,68.3],[18.3,82],[30.3,75.15]],Mo=[20,84.4],Qd=12*Ya,cg=[63.2,67.9],dg=13.1*Ya,No=[{id:"head",label:"Head",color:"gold",points:Yr([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:Yr([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:Ao(Po,31,43.3)},{id:"g",label:"G",color:"gold",points:Yr([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:Yr([[56.65,65.23],[64.2,56.74],[69.75,65.23]]),caption:{at:Ur(...cg),room:dg}},{id:"spleen",label:"Spleen",color:"brown",points:Yr(Jd),caption:{at:Ur(...Mo),room:Qd}},{id:"sacral",label:"Sacral",color:"red",points:Ao(Po,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:Yr(Jd.map(([n,a])=>[bi(n),a])),caption:{at:Ur(bi(Mo[0]),Mo[1]),room:Qd}},{id:"root",label:"Root",color:"brown",points:Ao(Po,88.5,99.8)}],pg=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],hg=mg();function mg(){let n=bi,a=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],e=[`M ${fi(a[0])}`];for(let t=1;t+2<a.length;t+=3)e.push(`C ${fi(a[t])} ${fi(a[t+1])} ${fi(a[t+2])}`);e.push(`L ${xi(a[a.length-1],n)}`);for(let t=a.length-3;t>=1;t-=3)e.push(`C ${xi(a[t+1],n)} ${xi(a[t],n)} ${xi(a[t-1],n)}`);return e.push("Z"),e.join(" ")}function fi([n,a]){let e=Ur(n,a);return`${e.x} ${e.y}`}function xi([n,a],e){let t=Ur(e(n),a);return`${t.x} ${t.y}`}function gg(n){return n.map(a=>`${a.x},${a.y}`).join(" ")}function ip(n){return n.left&&n.right?"both":n.left?"src-left":"src-right"}function yg(){return Dt`<path class="bg-body" d=${hg} />`}function ug(n){let a=[];for(let[e,t]of pg){let r=_o[e],s=_o[t];if(!r||!s)continue;a.push(Dt`<line class="bg-channel" x1=${r.x} y1=${r.y} x2=${s.x} y2=${s.y} />`);let i={x:(r.x+s.x)/2,y:(r.y+s.y)/2};for(let[o,l]of[[e,r],[t,s]]){let c=n.get(o);if(!c)continue;let d=ip(c);a.push(Dt`<line class="bg-half ${d==="both"?"src-left":d}" x1=${l.x} y1=${l.y} x2=${i.x} y2=${i.y} />`),d==="both"&&a.push(Dt`<line class="bg-half src-right stripe" x1=${l.x} y1=${l.y} x2=${i.x} y2=${i.y} />`)}}return a}function fg(n,a,e){return No.flatMap(t=>{let r=n.has(t.id),s=`bg-center bg-${t.color}${r?" defined":""}`,i=a?.get(t.id)||t.label;return[Dt`<polygon class=${s} points=${gg(t.points)}><title>${i}: ${r?e.defined:e.open}</title></polygon>`,t.caption?ep(i,t.caption.at,"bg-caption",t.caption.room):ep(i,tp(t.points),r?`defined bg-${t.color}`:"",bg(t.points,tp(t.points).y)*.86)]})}function ep(n,a,e,t){let r=n.split(/\s+/).filter(Boolean),s=r.reduce((c,d)=>Math.max(c,d.length),0),i=Math.min(ig,t/Math.max(1,s*xg)),o=i*1.05,l=a.y-o*(r.length-1)/2;return Dt`<text class="bg-center-name ${e}" style=${`font-size:${i}px`} x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central" aria-hidden="true">${r.map((c,d)=>Dt`<tspan x=${a.x} y=${l+d*o}>${c}</tspan>`)}</text>`}var xg=.66;function bg(n,a){let e=[];for(let t=0;t<n.length;t++){let r=n[t],s=n[(t+1)%n.length];if(r.y===s.y)continue;let i=Math.min(r.y,s.y),o=Math.max(r.y,s.y);a<i||a>o||e.push(r.x+(a-r.y)/(s.y-r.y)*(s.x-r.x))}return e.length<2?0:Math.max(...e)-Math.min(...e)}function tp(n){let a=n.length||1;return{x:n.reduce((e,t)=>e+t.x,0)/a,y:n.reduce((e,t)=>e+t.y,0)/a}}function ap(n,a){return`M ${n.x} ${n.y-Tn} A ${Tn} ${Tn} 0 0 ${a} ${n.x} ${n.y+Tn} Z`}function vg(n,a){let e=[];for(let[t,r]of Object.entries(_o)){let s=Number(t),i=n.get(s),o=i?ip(i):"",l=a.get(s);e.push(Dt`<g class="bg-gate-node">
8
+ ${o==="both"?[Dt`<path class="bg-gate-dot on src-left" d=${ap(r,0)} />`,Dt`<path class="bg-gate-dot on src-right" d=${ap(r,1)} />`]:Dt`<circle class="bg-gate-dot ${o&&`on ${o}`}" cx=${r.x} cy=${r.y} r=${Tn} />`}
211
9
  <text class="bg-gate ${i?"on":""}" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${s}</text>
212
- ${l?Dt`<title>${l}</title>`:tg}
213
- </g>`)}return e}var bi=`0 0 ${sp} ${sg}`;function vi(n){return Dt`
214
- ${gg()}
215
- ${yg(n.gateSources)}
216
- ${ug(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
217
- ${bg(n.gateSources,n.gateTitles)}
218
- `}import{css as vg}from"lit";var Li=vg`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg));margin-inline:calc(-1 * var(--roxy-space-lg))}}.bg-body{fill:color-mix(in srgb, var(--roxy-secondary) 8%, transparent);stroke:var(--roxy-border);stroke-width:1px}.bg-channel{stroke:var(--roxy-border);stroke-width:5px;stroke-linecap:round}.bg-half{stroke-width:5px;stroke-linecap:round}.bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}.bg-center{fill:var(--_mask);stroke:var(--roxy-secondary);stroke-width:1.8px}.bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg) 45%, transparent)}:host{--_gold:color-mix(in oklch, var(--roxy-warning) 60%, var(--roxy-success));--_gold-ink:color-mix(in oklch, var(--roxy-warning-fg) 60%, var(--roxy-success-fg));--_center-gold:light-dark(color-mix(in oklab, var(--_gold) 40%, var(--roxy-bg)),color-mix(in oklab, var(--_gold) 50%, var(--_gold-ink)));--_center-green:light-dark(color-mix(in oklab, var(--roxy-success) 40%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-success) 50%, var(--roxy-success-fg)));--_center-red:light-dark(color-mix(in oklab, var(--roxy-danger) 40%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-danger) 50%, var(--roxy-danger-fg)));--_center-brown:light-dark(color-mix(in oklab, color-mix(in oklab, var(--roxy-warning-fg) 75%, var(--roxy-fg)) 45%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-warning-fg) 50%, var(--roxy-secondary)))}.bg-center.bg-gold.defined,.legend .swatch.bg-gold{fill:var(--_center-gold);background:var(--_center-gold)}.bg-center.bg-green.defined,.legend .swatch.bg-green{fill:var(--_center-green);background:var(--_center-green)}.bg-center.bg-red.defined,.legend .swatch.bg-red{fill:var(--_center-red);background:var(--_center-red)}.bg-center.bg-brown.defined,.legend .swatch.bg-brown{fill:var(--_center-brown);background:var(--_center-brown)}.bg-gate-dot{fill:var(--_mask);stroke:var(--roxy-border);stroke-width:1px}.bg-gate-dot.on{stroke:var(--_mask)}.bg-center-name{color:var(--roxy-muted);fill:currentColor;font-weight:var(--roxy-weight-bold);text-transform:uppercase;pointer-events:none}.bg-center-name.defined{color:light-dark(var(--roxy-fg),var(--roxy-bg))}.bg-gate{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .50625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.bg-gate.on{fill:var(--src-ink,var(--_mask))}.legend{gap:var(--roxy-space-sm) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend .swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border:1px solid var(--roxy-secondary);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.bg-half.src-left{stroke:var(--src-left)}.bg-half.src-right{stroke:var(--src-right)}.bg-gate-dot.on.src-left{fill:var(--src-left)}.bg-gate-dot.on.src-right{fill:var(--src-right)}.legend .swatch.src-left{background:var(--src-left)}.legend .swatch.src-right{background:var(--src-right)}.legend .swatch.source{border-radius:var(--roxy-radius-full);border-color:#0000}`;import{css as Lg,html as Ua,nothing as Zr}from"lit";var Za=[re,Lg`.roxy-facts{margin:0}.lead{font-size:var(--roxy-text-sm);margin:0}.keynotes{gap:var(--roxy-space-xs);margin:0;display:grid}.keynotes dd{margin:0}`];function $i(n,a){return n==="design"?a("Design"):n==="personality"?a("Personality"):n??""}function $a(n){let a=n.filter(e=>!!e.value);return a.length===0?Zr:Ua`<dl class="roxy-facts" part="facts">${a.map(e=>Ua`<div part="fact"><dt>${e.label}</dt><dd>${e.value}</dd></div>`)}</dl>`}function wi(n,a,e){return!n&&!a?Zr:Ua`<div class="themes roxy-chips" part="themes">${n?Ua`<span class="roxy-chip" data-tone="success">${e("Signature: {{value}}",{value:n})}</span>`:Zr} ${a?Ua`<span class="roxy-chip" data-tone="danger">${e("Not-self: {{value}}",{value:a})}</span>`:Zr}</div>`}function ki(n,a){return!n?.personality&&!n?.design?Zr:Ua`<dl class="keynotes" part="keynotes">${n.personality?Ua`<dt>${a("Line {{line}} · Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:Zr} ${n.design?Ua`<dt>${a("Line {{line}} · Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:Zr}</dl>`}var kg=["gold","green","brown","red"];function Sg(n){let a=new Map;for(let e of n){if(e.gate==null)continue;let t=a.get(e.gate);t?t.push(e):a.set(e.gate,[e])}return a}var Wa=class extends y{constructor(){super(...arguments);this.viewport=new Ce(this);this.side="personality"}renderData(e){let t=e.centers??[],r=new Set(t.filter(c=>c.defined).map(c=>c.id)),s=Sg(e.gates??[]),i=new Map([...s].map(([c,d])=>[c,{left:d.some(p=>p.side==="design"),right:d.some(p=>p.side==="personality")}])),o=this.buildGateTitles(s),l=new Map(t.map(c=>[c.id,g(c,"name")]));return Y`<div class="wrap" part="card"><header class="head" part="header"><div><h2>${this.t("Bodygraph")}</h2>${e.designInstantUtc?Y`<div class="meta">${this.t("Design")} <time datetime="${e.designInstantUtc}">${$d(this.effectiveLang(),e.designInstantUtc)}</time></div>`:oe}</div>${e.type||e.profile?Y`<div class="type-line">${[g(e,"type"),e.profile?this.t("Profile {{profile}}",{profile:e.profile}):""].filter(Boolean).join(" · ")}</div>`:oe}</header><div class="layout" part="layout">${this.viewport.renderChartViewport(Y`<svg class="chart" part="chart" viewBox="${bi}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${this.t("Human Design bodygraph with nine centers, channels, and activated gates overlaid on a human silhouette")}"><title>${this.t("Human Design bodygraph")}</title><desc>${this.t("Nine energy centers in their canonical positions over a human silhouette, each filled with its traditional color when defined and outlined when open, wired by channels between activated gates.")}</desc>${vi({definedCenters:r,gateSources:i,gateTitles:o,centerNames:l,stateWords:{defined:this.t("Defined"),open:this.t("Open")}})}</svg>`,this.t("Human Design bodygraph"),this.translator)} ${this.renderSummary(e,l)}</div>${this.renderReading(e)} ${this.renderChannels(e.channels??[],l)} ${this.renderCenters(t)} ${this.renderActivations(e)}</div>`}buildGateTitles(e){let t=new Map;for(let[r,s]of e){let i=s.map(o=>[this.gateGlyph(o),`${r}${o.line!=null?`.${o.line}`:""}`,$i(o.side,this.translator)].filter(Boolean).join(" "));t.set(r,[this.t("Gate {{gate}}",{gate:r}),g(s[0],"gateName"),...i].filter(Boolean).join(" · "))}return t}gateGlyph(e){return e.planet?$(e.planet)??g(e,"planet"):""}renderSummary(e,t){let r=e.incarnationCross;return Y`<div class="summary" part="details">${$a([{label:this.t("Type"),value:g(e,"type")},{label:this.t("Strategy"),value:g(e,"strategy")},{label:this.t("Authority"),value:g(e,"authority")},{label:this.t("Profile"),value:e.profile},{label:this.t("Definition"),value:g(e,"definition")}])} ${e.typeDescription&&!this.hideReadings?Y`<p class="lead">${e.typeDescription}</p>`:oe} ${r?.name?Y`<p class="cross">${r.name} ${r.gates?.length?Y`<span class="gates">(${r.gates.join(", ")})</span>`:oe}</p>`:oe} ${wi(e.signature?g(e,"signature"):void 0,e.notSelf?g(e,"notSelf"):void 0,this.translator)} ${this.renderLegend(t)}</div>`}renderLegend(e){let t=kg.map(r=>[r,_o.filter(s=>s.color===r).map(s=>e.get(s.id)||s.label).join(", ")]);return Y`<div class="legend" part="legend"><span class="legend-row"><span class="swatch source src-left"></span>${this.t("Design")} <span class="swatch source src-right"></span>${this.t("Personality")} </span><span class="legend-row">${this.t("Center colors when defined. Open centers are outlined.")}</span> ${t.map(([r,s])=>Y`<span><span class="swatch bg-${r} defined"></span>${s}</span>`)} <span><span class="swatch"></span>${this.t("Open center")}</span></div>`}renderReading(e){let t=e.incarnationCross,r=[{label:this.t("Strategy"),aside:g(e,"strategy"),body:e.strategyDescription},{label:this.t("Authority"),aside:g(e,"authority"),body:e.authorityDescription},{label:this.t("Profile"),aside:e.profile,body:e.profileDescription,extra:ki(e.profileKeynotes,this.translator)},{label:this.t("Definition"),aside:g(e,"definition"),body:e.definitionDescription},{label:this.t("Aura"),body:e.aura},{label:this.t("Incarnation cross"),aside:t?g(t,"angle"):void 0,body:t?.description??""}];return this.renderInterpretation(r,"hd-reading")}renderChannels(e,t){if(e.length===0||this.hideReadings)return oe;let r=new Map;for(let i of e){let o=i.circuit??"",l=r.get(o);l?l.push(i):r.set(o,[i])}let s=0;return Y`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:e.length})}</h3>${[...r].map(([i,o])=>Y`<div class="group">${i?Y`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:g(o[0],"circuit")})}</p>`:oe} ${o[0]?.circuitDescription?Y`<p class="group-note">${o[0].circuitDescription}</p>`:oe} ${o.map(l=>Y`<details class="interp-card" part="reading" name="hd-channel" ?open="${s++===0}"><summary><span class="interp-lead"><span class="chan-gates">${l.gateA}-${l.gateB}</span> <span>${g(l,"name")}</span> </span>${H()} <span class="interp-aside"><span class="roxy-chips">${(l.centers??[]).map(c=>Y`<span class="roxy-chip">${t.get(c)||c}</span>`)}</span></span></summary><div class="interp-body">${l.description?Y`<p>${l.description}</p>`:oe}</div></details>`)}</div>`)}</section>`}renderCenters(e){if(e.length===0||this.hideReadings)return oe;let t=e.filter(r=>r.defined).length;return Y`<section class="block" part="section centers"><h3>${this.t("Centers ({{defined}} defined, {{open}} open)",{defined:t,open:e.length-t})}</h3>${e.map((r,s)=>Y`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${g(r,"name")}</span> ${H()} <span class="interp-aside"><span class="roxy-chips"><span class="roxy-chip ${r.defined?"on":""}">${r.defined?this.t("Defined"):this.t("Open")}</span> ${r.motor?Y`<span class="roxy-chip">${this.t("Motor")}</span>`:oe} ${r.awareness?Y`<span class="roxy-chip">${this.t("Awareness")}</span>`:oe}</span></span></summary><div class="interp-body">${r.theme?Y`<p>${r.theme}</p>`:oe} ${!r.defined&&r.notSelfQuestion?Y`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${r.notSelfQuestion}</dd></dl>`:oe} ${r.biology?Y`<p class="footnote">${this.t("Biology")}. ${r.biology}</p>`:oe} ${r.gates?.length?Y`<p class="footnote">${this.t("Gates {{gates}}",{gates:r.gates.join(", ")})}</p>`:oe}</div></details>`)}</section>`}renderActivations(e){let t=e.gates??[];if(t.length===0||this.hideReadings)return oe;let r=t.filter(d=>d.side==="personality"),s=t.filter(d=>d.side==="design"),i=r.length>0&&s.length>0,o=this.side,l=i?o==="design"?s:r:t,c=i?e.sides?.[o]:void 0;return Y`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:t.length})}</h3>${i?dt({items:[{id:"personality",label:`${this.t("Personality")} (${r.length})`},{id:"design",label:`${this.t("Design")} (${s.length})`}],active:o,onSelect:d=>{this.side=d},label:this.t("Chart sides"),idPrefix:"hd",controls:!0}):oe}<div id="${i?`hd-panel-${o}`:oe}" part="panel" role="${i?"tabpanel":oe}" aria-labelledby="${i?`hd-tab-${o}`:oe}">${c?Y`<p class="side-note">${c}</p>`:oe} ${l.map((d,p)=>this.renderGate(d,p===0))}</div></section>`}renderGate(e,t){let r=this.gateGlyph(e),s=g(e,"planet"),i=e.ichingHexagram;return Y`<details class="interp-card" part="reading" name="hd-gate" ?open="${t}"><summary><span class="interp-lead">${r?Y`<span class="glyph" aria-hidden="true">${r}</span>`:oe} <span class="gate-id">${e.gate}${e.line!=null?`.${e.line}`:""}</span> <span>${g(e,"gateName")}</span> </span>${H()} ${s?Y`<span class="interp-aside"><small>${s}</small></span>`:oe}</summary><div class="interp-body">${e.gateDescription?Y`<p>${e.gateDescription}</p>`:oe} ${e.lineMeaning?Y`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:e.line??""})}</dt><dd>${e.lineMeaning}</dd></dl>`:oe} ${e.planetDescription?Y`<p class="footnote">${s}. ${e.planetDescription}</p>`:oe} ${i?.number?Y`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:i.number})}${i.english?`, ${i.english}`:""}</p>`:oe}</div></details>`}};Wa.endpoints=jl,Wa.styles=[u,Ge,Xe,M,j,Za,Li,$g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.type-line,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.layout{align-items:start;gap:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap{--src-left:var(--roxy-danger);--src-right:var(--roxy-fg)}.summary{gap:var(--roxy-space-md);display:grid}.cross{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm)}.cross .gates{color:var(--roxy-muted);font-variant-numeric:tabular-nums}.legend-row{flex-basis:100%}.legend-row .swatch:not(:first-child){margin-inline-start:var(--roxy-space-md)}.legend .swatch.defined{border-color:color-mix(in srgb, var(--roxy-fg) 45%, transparent)}.group+.group{margin-block-start:var(--roxy-space-md)}.group-head{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-note,.side-note,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.group-note,.side-note{margin-block-end:var(--roxy-space-sm)}.side-note{padding-block-start:var(--roxy-space-sm)}.roxy-chip.on{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.gate-id,.chan-gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.glyph{color:var(--roxy-accent-ink)}`],m([wg()],Wa.prototype,"side",2),Wa=m([f("roxy-bodygraph")],Wa);import{css as Rg,html as Wr,nothing as Dn}from"lit";var Cg={eight:"Eight karaka scheme, Rahu included and ranked from the end of its sign.",seven:"Seven karaka scheme, Rahu excluded and the Pitrikaraka office not assigned."},Xr=class extends y{renderData(a){let e=a.karakas??[];return e.length?Wr`<div class="wrap" part="card" aria-label="${this.t("Chara karakas")}"><header class="head" part="header"><h2>${this.t("Chara karakas")}</h2><p class="scheme"><span class="scheme-chip roxy-chip">${a.scheme??""}</span> ${a.scheme?Cg[a.scheme]??"":""}</p>${X(this.effectiveLang(),a.frame,this.translator)}</header><dl class="roxy-facts" part="details"><div><dt>${this.t("Atmakaraka")}</dt><dd>${a.atmakaraka??""}</dd></div><div><dt>${this.t("Darakaraka")}</dt><dd>${a.darakaraka??""}</dd></div></dl><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Chara karakas")}"><table role="table"><caption class="roxy-sr-only">${this.t("Chara karakas in descending rank: each office, the graha holding it, its rashi, the degree it holds, the degree that earned the office, and what the office is read for.")}</caption><thead><tr><th scope="col">${this.t("Office")}</th><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Ranked on")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map((t,r)=>this.renderRow(t,r===0))}</tbody></table></div></div>`:this.renderEmpty()}renderRow(a,e){let t=$(a.graha)??"",r=N(a.rashi)??"";return Wr`<tr class="${e?"ak":""}"><td class="office">${a.name??""}${a.abbreviation?Wr`<span class="abbr">${a.abbreviation}</span>`:Dn}</td><td>${t?Wr`<span class="glyph">${t}</span>`:Dn}${a.graha??""}</td><td>${r?Wr`<span class="glyph">${r}</span>`:Dn}${a.rashi??""}</td><td>${b(this.effectiveLang(),a.degreeInRashi,2)}</td><td>${b(this.effectiveLang(),a.rankingDegree,2)} ${a.isReversed?Wr`<span class="reversed">${this.t("measured from the end of the sign")}</span>`:Dn}</td><td class="meaning"><strong>${a.meaning??""}</strong> ${a.significations?Wr`<p>${a.significations}</p>`:Dn}</td></tr>`}};Xr.endpoints=Kl,Xr.styles=[u,G,re,Rg`.wrap{overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);display:grid}h2,p{margin:0}.scheme{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.scheme-chip{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.roxy-facts{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);margin:0}.roxy-facts dd{font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.ak td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}td.office{font-weight:var(--roxy-weight-bold)}.abbr{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);margin-inline-start:var(--roxy-space-xs)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}tbody tr.ak :is(.abbr,.glyph){color:var(--roxy-accent-ink)}.reversed{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.meaning{white-space:normal;min-width:20ch}.meaning strong{display:block}.meaning p{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],Xr=m([f("roxy-chara-karakas")],Xr);import{css as Tg,html as Xa,nothing as Si}from"lit";var Jr=class extends y{isCurrent(a){let e=Date.now(),t=Date.parse(a.start),r=Date.parse(a.end);return Number.isNaN(t)||Number.isNaN(r)?!1:e>=t&&e<r}renderTile(a){let e=a.effect==="Good"?"good":a.effect==="Bad"?"bad":"neutral",t=this.isCurrent(a),r=$(a.lord)??"",s=ia(this.effectiveLang(),a),i=e==="good"?this.t("Favourable"):e==="bad"?this.t("Unfavourable"):"";return Xa`<div class="cho-tile ${e}${t?" now":""}" role="listitem" aria-current="${t?"time":"false"}"><span class="tile-name">${a.name}${t?Xa`<span class="now-badge">${this.t("Now")}</span>`:Si} </span><span class="tile-time" aria-label="${this.t("Time range")}">${s}</span> <span class="tile-lord">${r?Xa`<span aria-hidden="true">${r}</span>`:Si} ${a.lord} ${i?Xa`<span aria-hidden="true">·</span><span class="tile-effect">${i}</span>`:Si}</span></div>`}renderData(a){let{date:e,dayChoghadiya:t,nightChoghadiya:r}=a;return Xa`<div class="wrap" part="card"><div class="header" part="header"><h2>${this.t("Choghadiya")}</h2>${e?Xa`<p class="roxy-label">${R(this.effectiveLang(),e)}</p>`:Si}</div><div class="cho-grid" part="table"><section class="period-col" aria-label="${this.t("Day muhurta periods")}"><h3 class="period-heading">${this.t("Daytime")}</h3><div role="list" aria-label="${this.t("Daytime choghadiya")}">${t&&t.length>0?t.map(s=>this.renderTile(s)):Xa`<p class="roxy-empty" role="status">${this.t("No daytime periods")}</p>`}</div></section><section class="period-col" aria-label="${this.t("Night muhurta periods")}"><h3 class="period-heading">${this.t("Night")}</h3><div role="list" aria-label="${this.t("Nighttime choghadiya")}">${r&&r.length>0?r.map(s=>this.renderTile(s)):Xa`<p class="roxy-empty" role="status">${this.t("No nighttime periods")}</p>`}</div></section></div></div>`}};Jr.endpoints=Vl,Jr.styles=[u,Tg`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.header{gap:var(--roxy-space-xs);display:grid}h2,h3,p{margin:0}.cho-grid{gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}@container (width>=40rem){.cho-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.period-heading{margin-block-end:var(--roxy-space-xs)}.cho-tile{align-items:center;gap:0 var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr) auto;display:grid}.cho-tile:last-child{border-block-end:0}.cho-tile.now{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-sm)}.now-badge{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-sm)}.tile-name{min-width:0;font-weight:var(--roxy-weight-bold);overflow-wrap:anywhere;grid-column:1}.good :is(.tile-name,.tile-effect){color:var(--roxy-success-fg)}.bad :is(.tile-name,.tile-effect){color:var(--roxy-danger-fg)}.tile-time{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;grid-area:1/2/3;align-self:center}.tile-lord{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;grid-column:1;display:flex}`],Jr=m([f("roxy-choghadiya-grid")],Jr);import{css as Eg,html as Te,nothing as et}from"lit";import{property as Dg}from"lit/decorators.js";var Ag=["sun","moon","venus","mars"],ip=["fire","earth","air","water"],op={astrology:"Astrology compatibility",numerology:"Numerology compatibility",biorhythm:"Biorhythm compatibility"},Pg={in_sync:"In sync",complementary:"Complementary",neutral:"Neutral",opposing:"Opposing"},Ja=class extends y{constructor(){super(...arguments);this.mode="astrology"}getBreakdown(){let e=this.data;if(!e)return{};if("categories"in e&&e.categories){let t={};for(let[r,s]of Object.entries(e.categories))typeof s=="number"&&Number.isFinite(s)&&(t[r]=s);return t}return{}}renderData(e){let t=e.overallScore,r=this.getBreakdown(),s="rating"in e?e.rating:void 0,i="archetype"in e?e.archetype:void 0,o="advice"in e?e.advice:void 0,l="summary"in e?e.summary:void 0,c="interpretation"in e?e.interpretation:void 0,d="strengths"in e?e.strengths:void 0,p="challenges"in e?e.challenges:void 0,h="keyAspects"in e?e.keyAspects:void 0,x=!this.hideReadings,L=this.t(op[this.mode]??op.astrology);return Te`<article class="card" part="card" aria-label="${L}"><div class="head" part="header"><h2>${L}</h2><div>${typeof t=="number"?Te`<div class="score">${Math.round(t)}</div>`:et} ${s?Te`<div class="rating">${s}</div>`:et}</div></div>${Object.keys(r).length>0?Te`<div role="list" part="details breakdown">${Object.entries(r).map(([v,w])=>Te`<div class="bar-row" role="listitem"><span style="text-transform:capitalize">${v}</span> <span class="bar"><span style="width:${Math.max(0,Math.min(100,w))}%"></span></span> <span>${Math.round(w)}</span></div>`)}</div>`:et} ${i?Te`<p><span class="archetype">${i.label}</span> ${i.description&&x?Te`· ${i.description}`:et}</p>`:et} ${l&&x?Te`<p>${l}</p>`:et} ${c&&x?Te`<p class="body">${c}</p>`:et} ${o&&x?Te`<p class="body">${o}</p>`:et} ${this.renderAspectBreakdown()} ${this.renderSignCompatibility()} ${this.renderElementBalance()} ${this.renderSubScores()} ${x&&((d?.length??0)>0||(p?.length??0)>0)?Te`<div class="lists" part="section strengths-challenges">${d?.length?Te`<div><h3>${this.t("Strengths")}</h3><ul>${d.map(v=>Te`<li>${v}</li>`)}</ul></div>`:et} ${p?.length?Te`<div><h3>${this.t("Challenges")}</h3><ul>${p.map(v=>Te`<li>${v}</li>`)}</ul></div>`:et}</div>`:et} ${h?.length?Te`<div class="lists" part="section key-aspects"><div><h3>${this.t("Key aspects")}</h3><ul>${h.slice(0,6).map(v=>Te`<li>${Mg(this.effectiveLang(),v,x)}</li>`)}</ul></div></div>`:et}</article>`}renderAspectBreakdown(){let e=this.astro()?.aspectBreakdown;return e?Te`<p class="counts" part="details aspect-breakdown" role="region" aria-label="${this.t("Aspect breakdown")}">${typeof e.total=="number"?Te`<span>${this.t("Total")}: ${e.total}</span>`:et} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span></p>`:et}renderSignCompatibility(){let e=this.astro(),t=e?.signCompatibility;if(!t)return et;let r=e?.persons,s=Ag.map(i=>{let o=t[i];if(!o)return null;let l=c=>{let d=A((c==="person1"?o.person1Sign:o.person2Sign)??""),p=r?.[c]?.[i]?.degree,h=N(d)??"",x=typeof p=="number"?` ${Math.round(p)}°`:"";return`${h} ${d}${x}`.trim()};return{label:`${$(i)??""} ${A(i)}`.trim(),aside:qe(this.effectiveLang(),[l("person1"),l("person2")]),body:o.description??""}}).filter(i=>i!==null);return this.renderInterpretation(s,"compat-signs","Sign compatibility")}renderElementBalance(){let e=this.astro()?.elementBalance;if(!e)return et;let t=e.person1,r=e.person2,s=Math.max(1,...ip.map(o=>Math.max(t?.[o]??0,r?.[o]??0))),i=e.sharedElement?.toLowerCase();return Te`<section class="block" part="section element-balance"><h3>${this.t("Element balance")}</h3><div class="elements"><div class="el-row el-head"><span></span> <span class="roxy-label">${this.t("Person 1")}</span> <span class="roxy-label">${this.t("Person 2")}</span></div>${ip.map(o=>{let l=t?.[o]??0,c=r?.[o]??0;return Te`<div class="${o===i?"el-row shared":"el-row"}"><span class="el-name">${o}</span> <span class="el-bar p1"><span>${l}</span> <span class="track"><span style="width:${l/s*100}%"></span></span> </span><span class="el-bar p2"><span class="track"><span style="width:${c/s*100}%"></span></span> <span>${c}</span></span></div>`})}</div>${e.description&&!this.hideReadings?Te`<p class="shared-note">${e.description}</p>`:et}</section>`}renderSubScores(){let e=this.data;if(!e)return et;let t=[];if("lifePath"in e){let r=[["Life Path",e.lifePath],["Expression",e.expression],["Soul Urge",e.soulUrge]];for(let[s,i]of r)i&&t.push({label:this.t(s),aside:[qe(this.effectiveLang(),[String(i.person1),String(i.person2)]),we(this.effectiveLang(),i.compatibility,0)].filter(Boolean).join(" · "),body:i.description??""})}if("cycles"in e&&e.cycles)for(let[r,s]of Object.entries(e.cycles))s&&t.push({label:Va(r,i=>this.t(i)),aside:[typeof s.alignment=="number"?this.t("{{percent}} in step",{percent:we(this.effectiveLang(),s.alignment,0)}):"",s.phase?this.t(Pg[s.phase]):""].filter(Boolean).join(" · "),body:s.description??""});return this.renderInterpretation(t,"compat-sub-scores","Breakdown")}astro(){let e=this.data;return e&&"signCompatibility"in e?e:void 0}};Ja.endpoints=ql,Ja.styles=[u,M,j,Eg`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr) auto;display:grid}.head h2{text-transform:capitalize}.score{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.rating{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.bar-row{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:14ch minmax(0,1fr) 4ch;display:grid}.bar,.el-bar .track{block-size:var(--roxy-space-sm);background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.bar>span{background:var(--roxy-accent);height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-row>span:last-child{color:var(--roxy-muted);text-align:end;font-variant-numeric:tabular-nums}.archetype{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.lists h3{margin-block-end:var(--roxy-space-xs)}.lists ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}p.body{font-size:var(--roxy-text-sm)}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.block>h3{margin-block-end:var(--roxy-space-sm)}.elements{gap:var(--roxy-space-sm);display:grid}.el-row{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:8ch minmax(0,1fr) minmax(0,1fr);display:grid}.el-row .el-name{text-transform:capitalize}.el-row.shared .el-name{font-weight:var(--roxy-weight-bold)}.el-head span:nth-child(2){text-align:end}.el-bar{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;display:flex}.el-bar.p1{flex-direction:row-reverse}.el-bar .track{flex:auto;display:flex}.el-bar.p1 .track{justify-content:flex-end}.el-bar .track>span{background:var(--roxy-accent);height:100%;display:block}.el-bar.p2 .track>span{background:var(--roxy-secondary)}.shared-note{font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-sm)}`],m([Dg({type:String,reflect:!0})],Ja.prototype,"mode",2),Ja=m([f("roxy-compatibility-card")],Ja);function Mg(n,a,e){let t=Ct(a),r=typeof a.orb=="number"?` (orb ${b(n,a.orb,1)}°)`:"",s=[a.planet1,t,a.planet2].filter(Boolean).join(" ");return a.description&&e?`${s}${r} · ${a.description}`:`${s}${r}`}import{css as _g,html as Ri,nothing as Ci}from"lit";var lp={fortunate:"Fortunate",unfortunate:"Unfortunate",mixed:"Mixed fortune"},Ng={fortunate:"success",unfortunate:"danger",mixed:"warning"},Qr=class extends y{renderData(a){let e=P(this.effectiveLang(),a.number);return Ri`<article class="card" part="card" aria-label="${`${this.t("Compound number")} ${e}`}"><header class="hero" part="header"><div class="numeral">${e}</div><div><p class="roxy-label">${this.t("Compound number")}</p>${a.name?Ri`<h2>${a.name}</h2>`:Ci}</div></header><ul class="badges roxy-chips" part="details"><li>${this.t("Root number {{n}}",{n:P(this.effectiveLang(),a.root)})}</li><li class="roxy-chip" data-tone="${Ng[a.nature]??Ci}">${lp[a.nature]?this.t(lp[a.nature]):S(a.nature)}</li>${typeof a.sameAs=="number"?Ri`<li>${this.t("Same meaning as {{n}}",{n:P(this.effectiveLang(),a.sameAs)})}</li>`:Ci}</ul>${a.meaning&&!this.hideReadings?Ri`<p part="section readings">${a.meaning}</p>`:Ci}</article>`}};Qr.endpoints=Yl,Qr.styles=[u,_g`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.hero>div{min-width:0}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.badges>li{font-variant-numeric:tabular-nums}`],Qr=m([f("roxy-compound-number")],Qr);import{css as Ig,html as $t,nothing as pa}from"lit";var zg={apple:"#8db600",azure:"#007fff",blackish:"black",bluish:"blue",bottle:"#006a4e",brass:"#b5a642",brick:"#b22222",brownish:"brown",browns:"brown",burgundy:"#800020",clear:"#eef2f6",colorless:"#eef2f6",colourless:"#eef2f6",cream:"#fffdd0",creamy:"#fffdd0",emerald:"#50c878",golden:"gold",greenish:"green",lilac:"#c8a2c8",mauve:"#e0b0ff",peach:"peachpuff",pinkish:"pink",reddish:"red",rose:"#f4a6b7",royal:"royalblue",silvery:"silver",sky:"skyblue",yellowish:"yellow"},Og=new Set(["beige","black","blue","brown","crimson","cyan","gold","gray","green","grey","indigo","lavender","magenta","maroon","navy","olive","orange","pink","purple","red","salmon","silver","tan","teal","turquoise","violet","white","yellow"]),Gg={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function Ti(n){let a=[],e=[];for(let i of n.toLowerCase().split(/[\s-]+/)){let o=Gg[i];if(o){e.push(o);continue}let l=zg[i]??(Og.has(i)?i:"");l&&a.push(l)}let[t,r]=a;if(!t)return"var(--roxy-border, #e4e4e7)";let s=r?`color-mix(in srgb, ${t}, ${r})`:t;for(let[i,o]of e)s=`color-mix(in srgb, ${s} ${o}%, ${i})`;return s}var es=class extends y{renderData(a){let e=a.colors??[],t=a.keywords??[],r=a.pairsWith??[],s=si(this.effectiveLang(),a.birthMonth)||void 0,i=a.name??this.t("Crystal");return $t`<article class="wrap" part="card" aria-label="${i}"><div class="hero" part="header">${a.imageUrl?$t`<img class="photo" part="chart" src="${a.imageUrl}" alt="${i}" loading="lazy">`:pa}<div><h2>${a.name}</h2>${a.description&&!this.hideReadings?$t`<p class="desc">${a.description}</p>`:pa}</div></div><dl class="roxy-facts" part="details">${this.attr(this.t("Planet"),a.planet)} ${this.attr(this.t("Hardness"),typeof a.hardness=="number"?this.t("{{value}} Mohs",{value:b(this.effectiveLang(),a.hardness)}):void 0)} ${this.attr(this.t("Vibration"),a.numericalVibration)} ${this.attr(this.t("Birthstone"),s)} ${this.list(this.t("Chakras"),a.chakras)} ${this.list(this.t("Zodiac"),a.zodiacSigns)} ${this.list(this.t("Elements"),a.elements)} ${e.length?$t`<div><dt>${this.t("Colors")}</dt><dd><div class="colors">${e.map(o=>$t`<span class="color"><span class="dot" style="${`background:${Ti(o)}`}"></span>${o}</span>`)}</div></dd></div>`:pa}</dl>${this.renderMeaning(a.meaning)} ${t.length&&!this.hideReadings?$t`<section part="section keywords"><h3>${this.t("Keywords")}</h3><ul class="chips roxy-chips">${t.map(o=>$t`<li>${o}</li>`)}</ul></section>`:pa} ${a.affirmation&&!this.hideReadings?$t`<p class="affirmation">${a.affirmation}</p>`:pa} ${r.length?$t`<section part="section pairs-with"><h3>${this.t("Pairs with")}</h3><ul class="chips roxy-chips">${r.map(o=>$t`<li>${String(o).replace(/-/g," ")}</li>`)}</ul></section>`:pa}</article>`}attr(a,e){return e==null||e===""?pa:$t`<div><dt>${a}</dt><dd>${e}</dd></div>`}list(a,e){return e?.length?$t`<div><dt>${a}</dt><dd>${e.join(", ")}</dd></div>`:pa}renderMeaning(a){if(!a||this.hideReadings)return pa;let t=[[this.t("Spiritual"),a.spiritual],[this.t("Emotional"),a.emotional],[this.t("Physical"),a.physical]].filter(([,r])=>!!r);return t.length===0?pa:$t`<div class="meaning" part="section meaning">${t.map(([r,s])=>$t`<h3>${r}</h3><p>${s}</p>`)}</div>`}};es.endpoints=Ul,es.styles=[u,re,Ig`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:flex-start;gap:var(--roxy-space-md);display:flex}.photo{border-radius:var(--roxy-radius-md);object-fit:cover;background:var(--roxy-border);flex:none;block-size:4lh;inline-size:4lh}.hero h2{margin-block-end:var(--roxy-space-xs)}.desc,.meaning p{font-size:var(--roxy-text-sm)}.colors{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.color{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-xs);text-transform:capitalize;display:inline-flex}.dot{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;inline-size:.6lh}.meaning h3,section>h3{margin-block-end:var(--roxy-space-xs)}.meaning p{margin-block-end:var(--roxy-space-sm)}.chips>li{text-transform:capitalize}.affirmation{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md);font-style:italic}`],es=m([f("roxy-crystal-card")],es);import{css as Fg,html as ts,nothing as cp}from"lit";import{property as Bg}from"lit/decorators.js";var Qa=class extends y{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"};this.listKey="crystals"}renderData(e){let t=e.crystals??[];if(t.length===0)return this.renderEmpty();let r=this.heading||this.deriveHeading(e),s="total"in e&&typeof e.total=="number"?e.total:t.length;return ts`<section class="wrap" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="count">${s===1?this.t("1 crystal"):this.t("{{count}} crystals",{count:s})}</span></header><ul class="grid" part="section crystals">${t.map(i=>ts`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===i.id?"true":"false"}" @click="${()=>this.pickRow({id:i.id,name:i.name})}">${i.imageUrl?ts`<img class="photo" src="${i.imageUrl}" alt="${i.name??this.t("Crystal")}" loading="lazy">`:ts`<div class="photo" aria-hidden="true"></div>`}<p class="name">${i.name}</p>${i.colors&&i.colors.length>0?ts`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:qe(this.effectiveLang(),i.colors)})}">${i.colors.map(o=>ts`<span class="swatch" style="${`background:${Ti(o)}`}" title="${o}"></span>`)}</div>`:cp}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?ts`<div class="detail" part="detail">${this.openedRow}</div>`:cp}</section>`}deriveHeading(e){return"chakra"in e&&e.chakra?this.t("{{chakra}} chakra crystals",{chakra:e.chakra}):"element"in e&&e.element?this.t("{{element}} element crystals",{element:e.element}):"sign"in e&&e.sign?this.t("Crystals for {{sign}}",{sign:e.sign}):"month"in e&&typeof e.month=="number"?this.t("{{month}} birthstones",{month:si(this.effectiveLang(),e.month)}):this.t("Crystals")}};Qa.endpoints=Zl,Qa.styles=[u,Fg`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.photo{aspect-ratio:1;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.colors{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.swatch{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.4lh;inline-size:.4lh}`],m([Bg({type:String,reflect:!0})],Qa.prototype,"heading",2),Qa=m([f("roxy-crystal-grid")],Qa);import{css as Hg,html as rt,nothing as st}from"lit";import{property as jg,state as Kg}from"lit/decorators.js";function dp(n){return"pranaDashas"in n?"Prana":"sookshmaDashas"in n?"Sookshma":"pratyantardashas"in n?"Pratyantardasha":"antardashas"in n?"Antardasha":"Mahadasha"}function No(n){if("sookshmaPeriod"in n&&n.sookshmaPeriod)return{source:"Sookshma",period:n.sookshmaPeriod};if("pratyantardashaPeriod"in n&&n.pratyantardashaPeriod)return{source:"Pratyantardasha",period:n.pratyantardashaPeriod};if("antardashaPeriod"in n&&n.antardashaPeriod)return{source:"Antardasha",period:n.antardashaPeriod};if("mahadashaPeriod"in n&&n.mahadashaPeriod)return{source:"Mahadasha",period:n.mahadashaPeriod}}function zo(n){if(!n)return"";let a=[];return n.years&&a.push(`${n.years}y`),n.months&&a.push(`${n.months}m`),n.days&&a.push(`${n.days}d`),a.length?a.join(" "):"0d"}function pp(n,a){return da(n?.strongHouses?.length?n.strongHouses:n?.signifiedHouses,a)}function Ei(n,a){let e=R(n,a.startDate);return e&&e===R(n,a.endDate)?Js(n,a.startDate,a.endDate):xt(n,a.startDate,a.endDate)}var wa=class extends y{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let t=this.collectPeriods(e),r=t.length?Math.max(...t.map(d=>d.durationYears)):0,s=qg(t.length?Math.min(...t.map(d=>d.durationYears)):0),i=this.hideReadings?[]:this.readings(e,t),o=this.frameRows(e),l=[{id:"timeline",label:this.t("Timeline")},...i.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:i.length})}]:[],...o.length?[{id:"frame",label:this.t("Chart details")}]:[]],c=l.some(d=>d.id===this.view)?this.view:"timeline";return rt`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${l.length>1?dt({items:l,active:c,onSelect:d=>{this.view=d},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:!0}):st}<div id="roxy-dasha-panel-${c}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${c}`:st}">${c==="timeline"?rt`${this.period==="current"?this.renderCurrent(e):st} ${t.length>0?rt`<div class="timeline" part="chart timeline" role="list">${t.map(d=>this.renderBar(d,r,s,e.houseThemes))}</div>`:st}`:st} ${c==="readings"?this.renderReadings(i):st} ${c==="frame"?this.renderFrame(o):st}</div></div>`}renderLordChain(e){let t=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return t.length>1?rt`<div class="nakshatra">${t.join(" › ")}</div>`:"nakshatraName"in e&&e.nakshatraName?rt`<div class="nakshatra">${"nakshatraLord"in e&&e.nakshatraLord?this.t("Moon nakshatra: {{name}} (lord {{lord}})",{name:e.nakshatraName,lord:e.nakshatraLord}):this.t("Moon nakshatra: {{name}}",{name:e.nakshatraName})}</div>`:st}frameRows(e){let t=[];if("nakshatraName"in e&&e.nakshatraName){let r="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";t.push(["Moon nakshatra",`${e.nakshatraName}${r}`])}if("nakshatraLord"in e&&e.nakshatraLord&&t.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&t.push(["Moon longitude",`${b(this.effectiveLang(),e.moonLongitude,3)}° sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&t.push(["Ayanamsa",Nr(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let r="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";t.push(["Balance at birth",`${zo(e.birthDashaBalance)} of the opening ${r}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&t.push(["Cycle length",`${e.totalYears} years`]),t}renderFrame(e){return rt`<dl class="roxy-facts" part="details frame">${e.map(([t,r])=>rt`<div><dt>${t}</dt><dd>${r}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let t=No(e);return t?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(dp(e)),planet:t.period.planet,parent:this.t(t.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let t=No(e);if(!t)return st;let r=t.period,s=Ei(this.effectiveLang(),r),i=r.nominalStartDate?R(this.effectiveLang(),r.nominalStartDate):"";return rt`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:r.planet,level:this.t(t.source),span:s?`, ${s}`:"",duration:typeof r.durationYears=="number"?` (${Vg(this.effectiveLang(),r.durationYears)})`:""})} ${i?rt`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:i})}`:st}</p>`}readings(e,t){let r=[],s=No(e);if(s?.period.interpretation&&r.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:Ei(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let o=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[l,c,d]of o){if(!c?.interpretation)continue;let p=zo(d);r.push({label:this.t("{{planet}} {{level}}",{planet:c.planet,level:this.t(l)}),aside:p?this.t("{{balance}} left",{balance:p}):Ei(this.effectiveLang(),c),body:c.interpretation})}}let i=t.find(o=>this.isCurrent(o));return i?.interpretation&&r.push({label:`${i.planet} ${dp(e)}`,aside:Ei(this.effectiveLang(),i),body:i.interpretation}),r}renderCurrent(e){if(!("mahadasha"in e))return st;let t=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return rt`<div class="current" part="details current">${t.map(([r,s,i])=>{if(!s)return st;let o=zo(i),l=pp(s.significators,e.houseThemes);return rt`<div><span class="roxy-label">${this.t(r)}</span> <strong>${s.planet}</strong> ${o?rt`<small>${this.t("{{balance}} left",{balance:o})}</small>`:st} ${l?rt`<small class="houses">${this.t("Signifies {{houses}}",{houses:l})}</small>`:st}</div>`})}</div>`}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:"pratyantardashas"in e&&e.pratyantardashas?.length?e.pratyantardashas:"sookshmaDashas"in e&&e.sookshmaDashas?.length?e.sookshmaDashas:"pranaDashas"in e&&e.pranaDashas?.length?e.pranaDashas:[]}isCurrent(e){if(!e.startDate||!e.endDate)return!1;let t=Date.now(),r=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(r)||Number.isNaN(s)?!1:t>=r&&t<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let t=Date.parse(e.startDate),r=Date.parse(e.endDate),s=Date.now();return Number.isNaN(t)||Number.isNaN(r)||s<t||s>=r||r<=t?-1:(s-t)/(r-t)}renderBar(e,t,r,s){let i=e.durationYears,o=t>0?i/t*100:0,l=this.isCurrent(e),c=l?this.progressIn(e):-1,d=l?"bar-track bar-now":"bar-track",p=pp(e.significators,s),h=["bar",l?"now":"",r==="time"?"fine":""].filter(Boolean).join(" ");return rt`<div class="${h}" part="label-track" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${e.planet}</strong>${l?rt`<span class="now-badge">${this.t("Now")}</span>`:st} </span><span class="${d}"><span class="bar-fill" style="width:${o}%"></span> ${c>=0?rt`<span class="bar-progress" style="left:${c*o}%" aria-hidden="true"></span>`:st} </span><span class="dates">${bd(this.effectiveLang(),e.startDate,e.endDate,r)} </span>${p?rt`<span class="houses">${this.t("Signifies {{houses}}",{houses:p})}</span>`:st}</div>`}};wa.endpoints=Wl,wa.styles=[u,M,re,j,Xe,Hg`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.nakshatra{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.current{gap:var(--roxy-space-md) var(--roxy-space-lg);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;margin-block-end:var(--roxy-space-md);padding-block-end:var(--roxy-space-md);display:flex}.current>div{align-content:start;min-width:0;display:grid}.current small{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.parent{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);font-size:var(--roxy-text-sm);color:var(--roxy-muted);margin:0;padding-inline-start:var(--roxy-space-sm)}.timeline{gap:var(--roxy-space-xs);display:grid}.bar{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) 16ch;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);align-items:center;row-gap:0;display:grid}.bar.now strong,.now-badge{color:var(--roxy-accent-ink)}.now-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.bar-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent);opacity:.45;height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-now .bar-fill{opacity:1}.bar-progress{inline-size:var(--roxy-line-thick);background:var(--roxy-accent-ink);position:absolute;inset-block:0}.dates{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end}.bar.fine{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr)}.bar.fine .dates{text-align:start;grid-column:1/-1;min-width:0}.bar .houses{min-width:0;color:var(--roxy-muted);font-size:var(--roxy-text-xs);grid-column:1/-1}[role=tabpanel]{padding-top:var(--roxy-space-md)}`],m([jg({type:String,reflect:!0})],wa.prototype,"period",2),m([Kg()],wa.prototype,"view",2),wa=m([f("roxy-dasha-timeline")],wa);var Oo=365.25;function Vg(n,a){if(a>=1)return`${b(n,a,1)} years`;let e=a*Oo;if(e>=1)return`${b(n,e,e>=10?0:1)} days`;let t=e*24;return t>=1?`${b(n,t,1)} hours`:`${b(n,t*60,0)} minutes`}function qg(n){return n>=2?"year":n>=60/Oo?"month":n>=1/Oo?"day":"time"}import{css as Ug,html as q,nothing as ka}from"lit";import{property as Zg}from"lit/decorators.js";import{ifDefined as hp}from"lit/directives/if-defined.js";import{css as Yg}from"lit";var er=Yg`@container (width<=30rem){table.stacked,table.stacked caption,table.stacked tbody,table.stacked tr,table.stacked td{width:100%;min-width:0;display:block}table.stacked thead{display:none}table.stacked tr{border-bottom:1px solid var(--roxy-border);padding-block:var(--roxy-space-sm)}table.stacked tr:last-child{border-bottom:0}table.stacked td{padding:calc(var(--roxy-space-unit) / 2) 0;white-space:normal;border:0}table.stacked td:empty{display:none}table.stacked td[data-label]:before{content:attr(data-label) " ";color:var(--roxy-muted)}}`;var mp=["title","name","label","heading","overview","summary"],Wg=80,Xg=80,Jg=3,Qg=["imageUrl","image","icon","symbol"],ey=["imageUrl","image"],ty=["affirmation","mantra","motto","quote"],ay=new Set(["seed"]),ry=new Set(["id","slug","key"]),sy=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),ny=8,gp=1,iy=12,oy=n=>n.toLowerCase().replace(/[_-]/g,""),yp=n=>/^(has|is)([A-Z_]|$)/.test(n),ly=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,cy=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,dy=/^https?:\/\//,py=6;function hy(n,a){if(!Number.isInteger(a))return!1;let e=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s_-]+/);return e[e.length-1].toLowerCase()==="year"}function as(n){return n===null||["string","number","boolean"].includes(typeof n)}function Go(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(as))}function up(n){if(n==null)return!0;if(Array.isArray(n))return n.length===0;if(typeof n!="object")return!1;let a=Object.values(n);return a.length===0||a.every(up)}var rs=class extends y{constructor(){super(...arguments);this.depth=0}renderData(e){return this.depth>=py?q`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:q`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(e)}</div>`}renderValue(e){return e==null?ka:as(e)?q`<p>${this.scalarTemplate(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?q`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:e.every(as)?this.renderChips(e):e.every(r=>r!==null&&typeof r=="object"&&!Array.isArray(r))?this.renderObjectArray(e):q`<ol>${e.map(r=>q`<li>${this.renderValue(r)}</li>`)}</ol>`}renderChips(e){return q`<ul class="roxy-chips">${e.filter(t=>t!==null).map(t=>q`<li>${this.formatScalar(t)}</li>`)}</ul>`}renderObjectArray(e){let t=e.map(h=>this.suppress(h)),r=this.collectKeys(t),s=new Set(r.filter(h=>t.some(x=>typeof x[h]=="string"&&Array.from(x[h]).length>Xg))),i=new Set(r.filter(h=>s.has(h)||t.some(x=>Go(x[h]??null)))),o=s.size>0||i.size>0&&i.size<r.length,l=h=>o?i.has(h)?"col-wide":"col-tight":"",c=i.size>0&&r.length>Jg,d=t.length>iy;return q`<div class="${c?"roxy-collection":d&&!c?"roxy-collection compact long":"roxy-collection compact"}" part="table" role="${c?"list":"group"}" aria-label="${c?this.t("{{count}} rows",{count:t.length}):this.t("Data table")}" tabindex="${c?ka:"0"}">${c?q`${d?q`<p>${this.t("{{count}} rows",{count:t.length})}</p>`:ka} ${t.map(h=>q`<div class="roxy-record" role="listitem">${this.renderField(h)}</div>`)}`:q`<table class="${s.size?"roxy-table stacked prose":i.size?"roxy-table stacked":"roxy-table"}" role="table">${d?q`<caption>${this.t("{{count}} rows",{count:t.length})}</caption>`:ka}<thead><tr>${r.map(h=>q`<th class="${l(h)}">${ae(this.effectiveLang(),h)}</th>`)}</tr></thead><tbody>${t.map(h=>q`<tr>${r.map(x=>q`<td class="${l(x)}" data-label="${ae(this.effectiveLang(),x)}">${this.renderCell(h[x],x)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(e){let t=Qs(e),r=mp.some(s=>typeof t[s]=="string");return Object.fromEntries(Object.entries(t).filter(([s])=>{let i=oy(s);return ay.has(i)||r&&ry.has(i)?!1:!sy.has(i)}))}renderObject(e){let t=this.suppress(e),r=mp.find(p=>typeof t[p]=="string"&&t[p].length<=Wg),s=Qg.find(p=>typeof t[p]=="string"&&t[p].startsWith("http")),i=r!=="summary"&&typeof t.summary=="string"?"summary":null,o=ty.find(p=>typeof t[p]=="string"),l=Object.entries(t).filter(([p,h])=>p!==r&&p!==i&&p!==o&&!ey.includes(p)&&!up(h)),c=l.filter(([,p])=>!Go(p)),d=l.filter(([,p])=>Go(p));return q`${s?q`<img class="roxy-image" src="${String(t[s])}" alt="${r?String(t[r]):this.t("illustration")}" loading="lazy">`:ka} ${r?this.depth===0?q`<h2 class="roxy-title" part="header">${t[r]}</h2>`:q`<h3 class="roxy-title" part="header">${t[r]}</h3>`:ka} ${i?q`<p class="roxy-summary">${t[i]}</p>`:ka} ${o?q`<blockquote class="roxy-quote">${t[o]}</blockquote>`:ka} ${c.length>0?q`<dl class="roxy-rows" part="details label-track">${c.map(([p,h])=>q`<dt>${ae(this.effectiveLang(),p)}</dt><dd>${this.renderField(h,p)}</dd>`)}</dl>`:ka} ${d.map(([p,h])=>this.renderSection(p,h))}`}renderSection(e,t){let r=t!==null&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:0,s=this.renderField(t,e),i=ae(this.effectiveLang(),e);return r>ny||this.depth>=gp?q`<details class="roxy-section" ?open="${this.depth<gp}"><summary>${i}</summary>${s}</details>`:q`<div class="roxy-section">${this.depth===0?q`<h3>${i}</h3>`:q`<h4>${i}</h4>`} ${s}</div>`}renderField(e,t){return e==null?"":e===!0&&t!==void 0&&yp(t)?q`<span class="roxy-chip">${this.t("Yes")}</span>`:as(e)?q`${this.scalarTemplate(e,t)}`:Array.isArray(e)&&e.every(as)?this.renderChips(e):q`<roxy-data bare lang="${hp(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}renderCell(e,t){return e==null?"":e===!0&&t!==void 0&&yp(t)?q`<span class="roxy-chip">${this.t("Yes")}</span>`:as(e)?this.scalarTemplate(e,t):Array.isArray(e)&&e.every(as)?e.filter(r=>r!==null).map(r=>this.formatScalar(r)).join(", "):q`<roxy-data bare lang="${hp(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(e,t){return typeof e=="string"&&dy.test(e)?q`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`:this.formatScalar(e,t)}formatScalar(e,t){return typeof e=="number"?t!==void 0&&hy(t,e)?String(e):b(this.effectiveLang(),e,2)||String(e):typeof e=="boolean"?e?this.t("Yes"):this.t("No"):ly.test(e)?V(this.effectiveLang(),e):cy.test(e)?S(e.toLowerCase()):e}collectKeys(e){let t=new Set;for(let r of e)for(let s of Object.keys(r))t.add(s);return Array.from(t)}};rs.styles=[u,Ug`.roxy-card{padding:var(--roxy-space-md)}.roxy-card a{color:var(--roxy-accent-ink)}:is(h2,h3,h4,p,dl){margin:0}:is(h2,h3).roxy-title{margin-block-end:var(--roxy-space-sm)}.roxy-summary{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-md)}dl.roxy-rows{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:fit-content(25%) minmax(0,1fr);display:grid}dl.roxy-rows dd{word-break:break-word;margin:0}.roxy-collection{min-width:0}.roxy-collection.compact{overflow-x:auto}.roxy-collection.long{max-block-size:20lh}.roxy-record+.roxy-record{margin-block-start:var(--roxy-space-sm)}table.roxy-table{width:100%}table.roxy-table caption{text-align:start}table.roxy-table th{white-space:nowrap}:where(table.roxy-table) :is(th,td).col-tight{white-space:nowrap;width:1%}:where(table.roxy-table.prose) :is(th,td).col-wide{min-width:40ch}.roxy-image{max-width:100%;height:auto;border-radius:var(--roxy-radius-md);margin-block-end:var(--roxy-space-md)}.roxy-section{margin-block-start:var(--roxy-space-md)}.roxy-section>:is(h3,h4,summary){font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);margin-block-end:var(--roxy-space-xs)}blockquote.roxy-quote{margin:var(--roxy-space-md) 0;border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md);font-style:italic}`,er],m([Zg({attribute:!1})],rs.prototype,"depth",2),rs=m([f("roxy-data")],rs);import{css as _y,html as ln,nothing as Ho}from"lit";import{property as Ny}from"lit/decorators.js";import{html as An,nothing as ht,svg as Ee}from"lit";var Yt=400,le=20,pt=Yt-2*le,Oe=Yt/2,fp=Object.fromEntries(Re.map(n=>[n.toLowerCase(),n])),my=[{id:"north",source:"North"},{id:"south",source:"South"},{id:"east",source:"East"}],vp="ʳ",Lp="ᶜ",$p="ʷ";function Io(n){return Re.indexOf(n)}function gy(n){let a=Rd(n.graha)??n.graha,e=`${n.isRetrograde?vp:""}${n.combust?Lp:""}${n.war?$p:""}`;if(typeof n.longitude!="number"||!Number.isFinite(n.longitude)||n.natalReference)return`${a}${e}`;let{degree:t}=Nt(n.longitude);return`${a} ${t}°${e}`}function yy(n,a,e){let t=[A(n.graha)],r=n.natalReference===!0;if(r&&t.push(e("in {{sign}}",{sign:a})),typeof n.longitude=="number"&&Number.isFinite(n.longitude)){let s=Nt(n.longitude),i=String(s.minute).padStart(2,"0");t.push(r?`D1: ${s.degree}°${i}' ${s.sign}`:`${s.degree}°${i}' ${s.sign}`)}if(n.nakshatra?.name){let s=n.nakshatra.pada?` ${e("pada {{n}}",{n:n.nakshatra.pada})}`:"";t.push(`${r?"D1: ":""}${n.nakshatra.name}${s}`)}return n.nakshatra?.lord&&t.push(e("nakshatra lord {{graha}}",{graha:n.nakshatra.lord})),n.awastha&&t.push(n.awastha),n.deeptadi&&t.push(n.deeptadi),n.combust&&t.push(e("combust")),n.war&&t.push(n.war.winner?e("planetary war with {{graha}}, won by {{winner}}",{graha:n.war.opponent,winner:n.war.winner}):e("planetary war with {{graha}}",{graha:n.war.opponent})),n.isRetrograde&&t.push(e("retrograde")),t.join(" · ")}function Fo(n,a,e,t,r,s){let i=t-(n.length-1)*r/2;return n.map((o,l)=>{let c=i+l*r;return Ee`<text class="planet-text" x=${e} y=${c} text-anchor="middle" dominant-baseline="central">${gy(o)}<title>${yy(o,a,s)}</title></text>`})}function Ai(n,a={}){let{divisionLabel:e,lagnaOverride:t,states:r,natalReference:s}=a,i=new Set((r?.combustion??[]).map(p=>(p.planet??"").toLowerCase())),o=new Map;for(let p of r?.planetaryWar??[])!p.planet1||!p.planet2||(o.set(p.planet1.toLowerCase(),{opponent:p.planet2,winner:p.winner}),o.set(p.planet2.toLowerCase(),{opponent:p.planet1,winner:p.winner}));let l={};for(let p of Re)l[p.toLowerCase()]=[];let c=t?fp[t.toLowerCase()]??"":"",d=c;for(let[p,h]of Object.entries(n??{})){let x=(h?.rashi??"").toLowerCase();if(p==="Lagna"||h?.graha==="Lagna"){c||(d=fp[x]??"");continue}if(!x||!(x in l))continue;let L=h.graha??p,v=L.toLowerCase();l[x]?.push({graha:L,natalReference:s,longitude:h.longitude,nakshatra:h.nakshatra,isRetrograde:h.isRetrograde,awastha:h.awastha,deeptadi:h.deeptadi,combust:i.has(v)||void 0,war:o.get(v)})}return{lagnaSign:d,placements:l,divisionLabel:e}}var ss=pt/4,uy={Pisces:{col:0,row:0},Aries:{col:1,row:0},Taurus:{col:2,row:0},Gemini:{col:3,row:0},Cancer:{col:3,row:1},Leo:{col:3,row:2},Virgo:{col:3,row:3},Libra:{col:2,row:3},Scorpio:{col:1,row:3},Sagittarius:{col:0,row:3},Capricorn:{col:0,row:2},Aquarius:{col:0,row:1}};function fy(n){let a=uy[n]??{col:0,row:0};return{x:le+a.col*ss,y:le+a.row*ss,w:ss,h:ss}}function xy(n){let a=le,e=le+ss,t=le+2*ss,r=le+3*ss,s=Yt-le;return Ee`
10
+ ${l?Dt`<title>${l}</title>`:ag}
11
+ </g>`)}return e}var vi=`0 0 ${np} ${ng}`;function Li(n){return Dt`
12
+ ${yg()}
13
+ ${ug(n.gateSources)}
14
+ ${fg(n.definedCenters,n.centerNames,n.stateWords??{defined:"defined",open:"open"})}
15
+ ${vg(n.gateSources,n.gateTitles)}
16
+ `}import{css as Lg}from"lit";var $i=Lg`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg));margin-inline:calc(-1 * var(--roxy-space-lg))}}.bg-body{fill:color-mix(in srgb, var(--roxy-secondary) 8%, transparent);stroke:var(--roxy-border);stroke-width:1px}.bg-channel{stroke:var(--roxy-border);stroke-width:5px;stroke-linecap:round}.bg-half{stroke-width:5px;stroke-linecap:round}.bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}.bg-center{fill:var(--_mask);stroke:var(--roxy-secondary);stroke-width:1.8px}.bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg) 45%, transparent)}:host{--_gold:color-mix(in oklch, var(--roxy-warning) 60%, var(--roxy-success));--_gold-ink:color-mix(in oklch, var(--roxy-warning-fg) 60%, var(--roxy-success-fg));--_center-gold:light-dark(color-mix(in oklab, var(--_gold) 40%, var(--roxy-bg)),color-mix(in oklab, var(--_gold) 50%, var(--_gold-ink)));--_center-green:light-dark(color-mix(in oklab, var(--roxy-success) 40%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-success) 50%, var(--roxy-success-fg)));--_center-red:light-dark(color-mix(in oklab, var(--roxy-danger) 40%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-danger) 50%, var(--roxy-danger-fg)));--_center-brown:light-dark(color-mix(in oklab, color-mix(in oklab, var(--roxy-warning-fg) 75%, var(--roxy-fg)) 45%, var(--roxy-bg)),color-mix(in oklab, var(--roxy-warning-fg) 50%, var(--roxy-secondary)))}.bg-center.bg-gold.defined,.legend .swatch.bg-gold{fill:var(--_center-gold);background:var(--_center-gold)}.bg-center.bg-green.defined,.legend .swatch.bg-green{fill:var(--_center-green);background:var(--_center-green)}.bg-center.bg-red.defined,.legend .swatch.bg-red{fill:var(--_center-red);background:var(--_center-red)}.bg-center.bg-brown.defined,.legend .swatch.bg-brown{fill:var(--_center-brown);background:var(--_center-brown)}.bg-gate-dot{fill:var(--_mask);stroke:var(--roxy-border);stroke-width:1px}.bg-gate-dot.on{stroke:var(--_mask)}.bg-center-name{color:var(--roxy-muted);fill:currentColor;font-weight:var(--roxy-weight-bold);text-transform:uppercase;pointer-events:none}.bg-center-name.defined{color:light-dark(var(--roxy-fg),var(--roxy-bg))}.bg-gate{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .50625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.bg-gate.on{fill:var(--src-ink,var(--_mask))}.legend{gap:var(--roxy-space-sm) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.legend .swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border:1px solid var(--roxy-secondary);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.bg-half.src-left{stroke:var(--src-left)}.bg-half.src-right{stroke:var(--src-right)}.bg-gate-dot.on.src-left{fill:var(--src-left)}.bg-gate-dot.on.src-right{fill:var(--src-right)}.legend .swatch.src-left{background:var(--src-left)}.legend .swatch.src-right{background:var(--src-right)}.legend .swatch.source{border-radius:var(--roxy-radius-full);border-color:#0000}`;import{css as $g,html as Ua,nothing as Zr}from"lit";var Za=[re,$g`.roxy-facts{margin:0}.lead{font-size:var(--roxy-text-sm);margin:0}.keynotes{gap:var(--roxy-space-xs);margin:0;display:grid}.keynotes dd{margin:0}`];function wi(n,a){return n==="design"?a("Design"):n==="personality"?a("Personality"):n??""}function $a(n){let a=n.filter(e=>!!e.value);return a.length===0?Zr:Ua`<dl class="roxy-facts" part="facts">${a.map(e=>Ua`<div part="fact"><dt>${e.label}</dt><dd>${e.value}</dd></div>`)}</dl>`}function ki(n,a,e){return!n&&!a?Zr:Ua`<div class="themes roxy-chips" part="themes">${n?Ua`<span class="roxy-chip" data-tone="success">${e("Signature: {{value}}",{value:n})}</span>`:Zr} ${a?Ua`<span class="roxy-chip" data-tone="danger">${e("Not-self: {{value}}",{value:a})}</span>`:Zr}</div>`}function Si(n,a){return!n?.personality&&!n?.design?Zr:Ua`<dl class="keynotes" part="keynotes">${n.personality?Ua`<dt>${a("Line {{line}} · Personality",{line:n.personalityLine??""})}</dt><dd>${n.personality}</dd>`:Zr} ${n.design?Ua`<dt>${a("Line {{line}} · Design",{line:n.designLine??""})}</dt><dd>${n.design}</dd>`:Zr}</dl>`}var Sg=["gold","green","brown","red"];function Rg(n){let a=new Map;for(let e of n){if(e.gate==null)continue;let t=a.get(e.gate);t?t.push(e):a.set(e.gate,[e])}return a}var Wa=class extends y{constructor(){super(...arguments);this.viewport=new Ce(this);this.side="personality"}renderData(e){let t=e.centers??[],r=new Set(t.filter(c=>c.defined).map(c=>c.id)),s=Rg(e.gates??[]),i=new Map([...s].map(([c,d])=>[c,{left:d.some(p=>p.side==="design"),right:d.some(p=>p.side==="personality")}])),o=this.buildGateTitles(s),l=new Map(t.map(c=>[c.id,g(c,"name")]));return Y`<div class="wrap" part="card"><header class="head" part="header"><div><h2>${this.t("Bodygraph")}</h2>${e.designInstantUtc?Y`<div class="meta">${this.t("Design")} <time datetime="${e.designInstantUtc}">${wd(this.effectiveLang(),e.designInstantUtc)}</time></div>`:oe}</div>${e.type||e.profile?Y`<div class="type-line">${[g(e,"type"),e.profile?this.t("Profile {{profile}}",{profile:e.profile}):""].filter(Boolean).join(" · ")}</div>`:oe}</header><div class="layout" part="layout">${this.viewport.renderChartViewport(Y`<svg class="chart" part="chart" viewBox="${vi}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${this.t("Human Design bodygraph with nine centers, channels, and activated gates overlaid on a human silhouette")}"><title>${this.t("Human Design bodygraph")}</title><desc>${this.t("Nine energy centers in their canonical positions over a human silhouette, each filled with its traditional color when defined and outlined when open, wired by channels between activated gates.")}</desc>${Li({definedCenters:r,gateSources:i,gateTitles:o,centerNames:l,stateWords:{defined:this.t("Defined"),open:this.t("Open")}})}</svg>`,this.t("Human Design bodygraph"),this.translator)} ${this.renderSummary(e,l)}</div>${this.renderReading(e)} ${this.renderChannels(e.channels??[],l)} ${this.renderCenters(t)} ${this.renderActivations(e)}</div>`}buildGateTitles(e){let t=new Map;for(let[r,s]of e){let i=s.map(o=>[this.gateGlyph(o),`${r}${o.line!=null?`.${o.line}`:""}`,wi(o.side,this.translator)].filter(Boolean).join(" "));t.set(r,[this.t("Gate {{gate}}",{gate:r}),g(s[0],"gateName"),...i].filter(Boolean).join(" · "))}return t}gateGlyph(e){return e.planet?$(e.planet)??g(e,"planet"):""}renderSummary(e,t){let r=e.incarnationCross;return Y`<div class="summary" part="details">${$a([{label:this.t("Type"),value:g(e,"type")},{label:this.t("Strategy"),value:g(e,"strategy")},{label:this.t("Authority"),value:g(e,"authority")},{label:this.t("Profile"),value:e.profile},{label:this.t("Definition"),value:g(e,"definition")}])} ${e.typeDescription&&!this.hideReadings?Y`<p class="lead">${e.typeDescription}</p>`:oe} ${r?.name?Y`<p class="cross">${r.name} ${r.gates?.length?Y`<span class="gates">(${r.gates.join(", ")})</span>`:oe}</p>`:oe} ${ki(e.signature?g(e,"signature"):void 0,e.notSelf?g(e,"notSelf"):void 0,this.translator)} ${this.renderLegend(t)}</div>`}renderLegend(e){let t=Sg.map(r=>[r,No.filter(s=>s.color===r).map(s=>e.get(s.id)||s.label).join(", ")]);return Y`<div class="legend" part="legend"><span class="legend-row"><span class="swatch source src-left"></span>${this.t("Design")} <span class="swatch source src-right"></span>${this.t("Personality")} </span><span class="legend-row">${this.t("Center colors when defined. Open centers are outlined.")}</span> ${t.map(([r,s])=>Y`<span><span class="swatch bg-${r} defined"></span>${s}</span>`)} <span><span class="swatch"></span>${this.t("Open center")}</span></div>`}renderReading(e){let t=e.incarnationCross,r=[{label:this.t("Strategy"),aside:g(e,"strategy"),body:e.strategyDescription},{label:this.t("Authority"),aside:g(e,"authority"),body:e.authorityDescription},{label:this.t("Profile"),aside:e.profile,body:e.profileDescription,extra:Si(e.profileKeynotes,this.translator)},{label:this.t("Definition"),aside:g(e,"definition"),body:e.definitionDescription},{label:this.t("Aura"),body:e.aura},{label:this.t("Incarnation cross"),aside:t?g(t,"angle"):void 0,body:t?.description??""}];return this.renderInterpretation(r,"hd-reading")}renderChannels(e,t){if(e.length===0||this.hideReadings)return oe;let r=new Map;for(let i of e){let o=i.circuit??"",l=r.get(o);l?l.push(i):r.set(o,[i])}let s=0;return Y`<section class="block" part="section channels"><h3>${this.t("Defined channels ({{count}})",{count:e.length})}</h3>${[...r].map(([i,o])=>Y`<div class="group">${i?Y`<p class="group-head">${this.t("{{circuit}} circuit",{circuit:g(o[0],"circuit")})}</p>`:oe} ${o[0]?.circuitDescription?Y`<p class="group-note">${o[0].circuitDescription}</p>`:oe} ${o.map(l=>Y`<details class="interp-card" part="reading" name="hd-channel" ?open="${s++===0}"><summary><span class="interp-lead"><span class="chan-gates">${l.gateA}-${l.gateB}</span> <span>${g(l,"name")}</span> </span>${H()} <span class="interp-aside"><span class="roxy-chips">${(l.centers??[]).map(c=>Y`<span class="roxy-chip">${t.get(c)||c}</span>`)}</span></span></summary><div class="interp-body">${l.description?Y`<p>${l.description}</p>`:oe}</div></details>`)}</div>`)}</section>`}renderCenters(e){if(e.length===0||this.hideReadings)return oe;let t=e.filter(r=>r.defined).length;return Y`<section class="block" part="section centers"><h3>${this.t("Centers ({{defined}} defined, {{open}} open)",{defined:t,open:e.length-t})}</h3>${e.map((r,s)=>Y`<details class="interp-card" part="reading" name="hd-center" ?open="${s===0}"><summary><span class="interp-lead">${g(r,"name")}</span> ${H()} <span class="interp-aside"><span class="roxy-chips"><span class="roxy-chip ${r.defined?"on":""}">${r.defined?this.t("Defined"):this.t("Open")}</span> ${r.motor?Y`<span class="roxy-chip">${this.t("Motor")}</span>`:oe} ${r.awareness?Y`<span class="roxy-chip">${this.t("Awareness")}</span>`:oe}</span></span></summary><div class="interp-body">${r.theme?Y`<p>${r.theme}</p>`:oe} ${!r.defined&&r.notSelfQuestion?Y`<dl class="keynotes"><dt>${this.t("Not-self question")}</dt><dd>${r.notSelfQuestion}</dd></dl>`:oe} ${r.biology?Y`<p class="footnote">${this.t("Biology")}. ${r.biology}</p>`:oe} ${r.gates?.length?Y`<p class="footnote">${this.t("Gates {{gates}}",{gates:r.gates.join(", ")})}</p>`:oe}</div></details>`)}</section>`}renderActivations(e){let t=e.gates??[];if(t.length===0||this.hideReadings)return oe;let r=t.filter(d=>d.side==="personality"),s=t.filter(d=>d.side==="design"),i=r.length>0&&s.length>0,o=this.side,l=i?o==="design"?s:r:t,c=i?e.sides?.[o]:void 0;return Y`<section class="block" part="section activations"><h3>${this.t("Activations ({{count}})",{count:t.length})}</h3>${i?dt({items:[{id:"personality",label:`${this.t("Personality")} (${r.length})`},{id:"design",label:`${this.t("Design")} (${s.length})`}],active:o,onSelect:d=>{this.side=d},label:this.t("Chart sides"),idPrefix:"hd",controls:!0}):oe}<div id="${i?`hd-panel-${o}`:oe}" part="panel" role="${i?"tabpanel":oe}" aria-labelledby="${i?`hd-tab-${o}`:oe}">${c?Y`<p class="side-note">${c}</p>`:oe} ${l.map((d,p)=>this.renderGate(d,p===0))}</div></section>`}renderGate(e,t){let r=this.gateGlyph(e),s=g(e,"planet"),i=e.ichingHexagram;return Y`<details class="interp-card" part="reading" name="hd-gate" ?open="${t}"><summary><span class="interp-lead">${r?Y`<span class="glyph" aria-hidden="true">${r}</span>`:oe} <span class="gate-id">${e.gate}${e.line!=null?`.${e.line}`:""}</span> <span>${g(e,"gateName")}</span> </span>${H()} ${s?Y`<span class="interp-aside"><small>${s}</small></span>`:oe}</summary><div class="interp-body">${e.gateDescription?Y`<p>${e.gateDescription}</p>`:oe} ${e.lineMeaning?Y`<dl class="keynotes"><dt>${this.t("Line {{line}}",{line:e.line??""})}</dt><dd>${e.lineMeaning}</dd></dl>`:oe} ${e.planetDescription?Y`<p class="footnote">${s}. ${e.planetDescription}</p>`:oe} ${i?.number?Y`<p class="footnote">${this.t("I Ching hexagram {{number}}",{number:i.number})}${i.english?`, ${i.english}`:""}</p>`:oe}</div></details>`}};Wa.endpoints=Kl,Wa.styles=[u,Ge,Xe,M,j,Za,$i,wg`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.type-line,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.layout{align-items:start;gap:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap{--src-left:var(--roxy-danger);--src-right:var(--roxy-fg)}.summary{gap:var(--roxy-space-md);display:grid}.cross{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm)}.cross .gates{color:var(--roxy-muted);font-variant-numeric:tabular-nums}.legend-row{flex-basis:100%}.legend-row .swatch:not(:first-child){margin-inline-start:var(--roxy-space-md)}.legend .swatch.defined{border-color:color-mix(in srgb, var(--roxy-fg) 45%, transparent)}.group+.group{margin-block-start:var(--roxy-space-md)}.group-head{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-note,.side-note,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.group-note,.side-note{margin-block-end:var(--roxy-space-sm)}.side-note{padding-block-start:var(--roxy-space-sm)}.roxy-chip.on{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.gate-id,.chan-gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.glyph{color:var(--roxy-accent-ink)}`],m([kg()],Wa.prototype,"side",2),Wa=m([f("roxy-bodygraph")],Wa);import{css as Cg,html as Wr,nothing as Dn}from"lit";var Tg={eight:"Eight karaka scheme, Rahu included and ranked from the end of its sign.",seven:"Seven karaka scheme, Rahu excluded and the Pitrikaraka office not assigned."},Xr=class extends y{renderData(a){let e=a.karakas??[];return e.length?Wr`<div class="wrap" part="card" aria-label="${this.t("Chara karakas")}"><header class="head" part="header"><h2>${this.t("Chara karakas")}</h2><p class="scheme"><span class="scheme-chip roxy-chip">${a.scheme??""}</span> ${a.scheme?Tg[a.scheme]??"":""}</p>${X(this.effectiveLang(),a.frame,this.translator)}</header><dl class="roxy-facts" part="details"><div><dt>${this.t("Atmakaraka")}</dt><dd>${a.atmakaraka??""}</dd></div><div><dt>${this.t("Darakaraka")}</dt><dd>${a.darakaraka??""}</dd></div></dl><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Chara karakas")}"><table role="table"><caption class="roxy-sr-only">${this.t("Chara karakas in descending rank: each office, the graha holding it, its rashi, the degree it holds, the degree that earned the office, and what the office is read for.")}</caption><thead><tr><th scope="col">${this.t("Office")}</th><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Ranked on")}</th><th scope="col">${this.t("Read for")}</th></tr></thead><tbody>${e.map((t,r)=>this.renderRow(t,r===0))}</tbody></table></div></div>`:this.renderEmpty()}renderRow(a,e){let t=$(a.graha)??"",r=N(a.rashi)??"";return Wr`<tr class="${e?"ak":""}"><td class="office">${a.name??""}${a.abbreviation?Wr`<span class="abbr">${a.abbreviation}</span>`:Dn}</td><td>${t?Wr`<span class="glyph">${t}</span>`:Dn}${a.graha??""}</td><td>${r?Wr`<span class="glyph">${r}</span>`:Dn}${a.rashi??""}</td><td>${b(this.effectiveLang(),a.degreeInRashi,2)}</td><td>${b(this.effectiveLang(),a.rankingDegree,2)} ${a.isReversed?Wr`<span class="reversed">${this.t("measured from the end of the sign")}</span>`:Dn}</td><td class="meaning"><strong>${a.meaning??""}</strong> ${a.significations?Wr`<p>${a.significations}</p>`:Dn}</td></tr>`}};Xr.endpoints=Vl,Xr.styles=[u,G,re,Cg`.wrap{overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);display:grid}h2,p{margin:0}.scheme{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.scheme-chip{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.roxy-facts{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);margin:0}.roxy-facts dd{font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.ak td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}td.office{font-weight:var(--roxy-weight-bold)}.abbr{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);margin-inline-start:var(--roxy-space-xs)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}tbody tr.ak :is(.abbr,.glyph){color:var(--roxy-accent-ink)}.reversed{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.meaning{white-space:normal;min-width:20ch}.meaning strong{display:block}.meaning p{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],Xr=m([f("roxy-chara-karakas")],Xr);import{css as Eg,html as Xa,nothing as Ri}from"lit";var Jr=class extends y{isCurrent(a){let e=Date.now(),t=Date.parse(a.start),r=Date.parse(a.end);return Number.isNaN(t)||Number.isNaN(r)?!1:e>=t&&e<r}renderTile(a){let e=a.effect==="Good"?"good":a.effect==="Bad"?"bad":"neutral",t=this.isCurrent(a),r=$(a.lord)??"",s=ia(this.effectiveLang(),a),i=e==="good"?this.t("Favourable"):e==="bad"?this.t("Unfavourable"):"";return Xa`<div class="cho-tile ${e}${t?" now":""}" role="listitem" aria-current="${t?"time":"false"}"><span class="tile-name">${a.name}${t?Xa`<span class="now-badge">${this.t("Now")}</span>`:Ri} </span><span class="tile-time" aria-label="${this.t("Time range")}">${s}</span> <span class="tile-lord">${r?Xa`<span aria-hidden="true">${r}</span>`:Ri} ${a.lord} ${i?Xa`<span aria-hidden="true">·</span><span class="tile-effect">${i}</span>`:Ri}</span></div>`}renderData(a){let{date:e,dayChoghadiya:t,nightChoghadiya:r}=a;return Xa`<div class="wrap" part="card"><div class="header" part="header"><h2>${this.t("Choghadiya")}</h2>${e?Xa`<p class="roxy-label">${R(this.effectiveLang(),e)}</p>`:Ri}</div><div class="cho-grid" part="table"><section class="period-col" aria-label="${this.t("Day muhurta periods")}"><h3 class="period-heading">${this.t("Daytime")}</h3><div role="list" aria-label="${this.t("Daytime choghadiya")}">${t&&t.length>0?t.map(s=>this.renderTile(s)):Xa`<p class="roxy-empty" role="status">${this.t("No daytime periods")}</p>`}</div></section><section class="period-col" aria-label="${this.t("Night muhurta periods")}"><h3 class="period-heading">${this.t("Night")}</h3><div role="list" aria-label="${this.t("Nighttime choghadiya")}">${r&&r.length>0?r.map(s=>this.renderTile(s)):Xa`<p class="roxy-empty" role="status">${this.t("No nighttime periods")}</p>`}</div></section></div></div>`}};Jr.endpoints=ql,Jr.styles=[u,Eg`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.header{gap:var(--roxy-space-xs);display:grid}h2,h3,p{margin:0}.cho-grid{gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}@container (width>=40rem){.cho-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.period-heading{margin-block-end:var(--roxy-space-xs)}.cho-tile{align-items:center;gap:0 var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr) auto;display:grid}.cho-tile:last-child{border-block-end:0}.cho-tile.now{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);padding-inline-start:var(--roxy-space-sm)}.now-badge{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-sm)}.tile-name{min-width:0;font-weight:var(--roxy-weight-bold);overflow-wrap:anywhere;grid-column:1}.good :is(.tile-name,.tile-effect){color:var(--roxy-success-fg)}.bad :is(.tile-name,.tile-effect){color:var(--roxy-danger-fg)}.tile-time{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end;white-space:nowrap;grid-area:1/2/3;align-self:center}.tile-lord{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;grid-column:1;display:flex}`],Jr=m([f("roxy-choghadiya-grid")],Jr);import{css as Dg,html as Te,nothing as et}from"lit";import{property as Ag}from"lit/decorators.js";var Pg=["sun","moon","venus","mars"],op=["fire","earth","air","water"],lp={astrology:"Astrology compatibility",numerology:"Numerology compatibility",biorhythm:"Biorhythm compatibility"},Mg={in_sync:"In sync",complementary:"Complementary",neutral:"Neutral",opposing:"Opposing"},Ja=class extends y{constructor(){super(...arguments);this.mode="astrology"}getBreakdown(){let e=this.data;if(!e)return{};if("categories"in e&&e.categories){let t={};for(let[r,s]of Object.entries(e.categories))typeof s=="number"&&Number.isFinite(s)&&(t[r]=s);return t}return{}}renderData(e){let t=e.overallScore,r=this.getBreakdown(),s="rating"in e?e.rating:void 0,i="archetype"in e?e.archetype:void 0,o="advice"in e?e.advice:void 0,l="summary"in e?e.summary:void 0,c="interpretation"in e?e.interpretation:void 0,d="strengths"in e?e.strengths:void 0,p="challenges"in e?e.challenges:void 0,h="keyAspects"in e?e.keyAspects:void 0,x=!this.hideReadings,L=this.t(lp[this.mode]??lp.astrology);return Te`<article class="card" part="card" aria-label="${L}"><div class="head" part="header"><h2>${L}</h2><div>${typeof t=="number"?Te`<div class="score">${Math.round(t)}</div>`:et} ${s?Te`<div class="rating">${s}</div>`:et}</div></div>${Object.keys(r).length>0?Te`<div role="list" part="details breakdown">${Object.entries(r).map(([v,w])=>Te`<div class="bar-row" role="listitem"><span style="text-transform:capitalize">${v}</span> <span class="bar"><span style="width:${Math.max(0,Math.min(100,w))}%"></span></span> <span>${Math.round(w)}</span></div>`)}</div>`:et} ${i?Te`<p><span class="archetype">${i.label}</span> ${i.description&&x?Te`· ${i.description}`:et}</p>`:et} ${l&&x?Te`<p>${l}</p>`:et} ${c&&x?Te`<p class="body">${c}</p>`:et} ${o&&x?Te`<p class="body">${o}</p>`:et} ${this.renderAspectBreakdown()} ${this.renderSignCompatibility()} ${this.renderElementBalance()} ${this.renderSubScores()} ${x&&((d?.length??0)>0||(p?.length??0)>0)?Te`<div class="lists" part="section strengths-challenges">${d?.length?Te`<div><h3>${this.t("Strengths")}</h3><ul>${d.map(v=>Te`<li>${v}</li>`)}</ul></div>`:et} ${p?.length?Te`<div><h3>${this.t("Challenges")}</h3><ul>${p.map(v=>Te`<li>${v}</li>`)}</ul></div>`:et}</div>`:et} ${h?.length?Te`<div class="lists" part="section key-aspects"><div><h3>${this.t("Key aspects")}</h3><ul>${h.slice(0,6).map(v=>Te`<li>${_g(this.effectiveLang(),v,x)}</li>`)}</ul></div></div>`:et}</article>`}renderAspectBreakdown(){let e=this.astro()?.aspectBreakdown;return e?Te`<p class="counts" part="details aspect-breakdown" role="region" aria-label="${this.t("Aspect breakdown")}">${typeof e.total=="number"?Te`<span>${this.t("Total")}: ${e.total}</span>`:et} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span></p>`:et}renderSignCompatibility(){let e=this.astro(),t=e?.signCompatibility;if(!t)return et;let r=e?.persons,s=Pg.map(i=>{let o=t[i];if(!o)return null;let l=c=>{let d=A((c==="person1"?o.person1Sign:o.person2Sign)??""),p=r?.[c]?.[i]?.degree,h=N(d)??"",x=typeof p=="number"?` ${Math.round(p)}°`:"";return`${h} ${d}${x}`.trim()};return{label:`${$(i)??""} ${A(i)}`.trim(),aside:qe(this.effectiveLang(),[l("person1"),l("person2")]),body:o.description??""}}).filter(i=>i!==null);return this.renderInterpretation(s,"compat-signs","Sign compatibility")}renderElementBalance(){let e=this.astro()?.elementBalance;if(!e)return et;let t=e.person1,r=e.person2,s=Math.max(1,...op.map(o=>Math.max(t?.[o]??0,r?.[o]??0))),i=e.sharedElement?.toLowerCase();return Te`<section class="block" part="section element-balance"><h3>${this.t("Element balance")}</h3><div class="elements"><div class="el-row el-head"><span></span> <span class="roxy-label">${this.t("Person 1")}</span> <span class="roxy-label">${this.t("Person 2")}</span></div>${op.map(o=>{let l=t?.[o]??0,c=r?.[o]??0;return Te`<div class="${o===i?"el-row shared":"el-row"}"><span class="el-name">${o}</span> <span class="el-bar p1"><span>${l}</span> <span class="track"><span style="width:${l/s*100}%"></span></span> </span><span class="el-bar p2"><span class="track"><span style="width:${c/s*100}%"></span></span> <span>${c}</span></span></div>`})}</div>${e.description&&!this.hideReadings?Te`<p class="shared-note">${e.description}</p>`:et}</section>`}renderSubScores(){let e=this.data;if(!e)return et;let t=[];if("lifePath"in e){let r=[["Life Path",e.lifePath],["Expression",e.expression],["Soul Urge",e.soulUrge]];for(let[s,i]of r)i&&t.push({label:this.t(s),aside:[qe(this.effectiveLang(),[String(i.person1),String(i.person2)]),we(this.effectiveLang(),i.compatibility,0)].filter(Boolean).join(" · "),body:i.description??""})}if("cycles"in e&&e.cycles)for(let[r,s]of Object.entries(e.cycles))s&&t.push({label:Va(r,i=>this.t(i)),aside:[typeof s.alignment=="number"?this.t("{{percent}} in step",{percent:we(this.effectiveLang(),s.alignment,0)}):"",s.phase?this.t(Mg[s.phase]):""].filter(Boolean).join(" · "),body:s.description??""});return this.renderInterpretation(t,"compat-sub-scores","Breakdown")}astro(){let e=this.data;return e&&"signCompatibility"in e?e:void 0}};Ja.endpoints=Yl,Ja.styles=[u,M,j,Dg`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr) auto;display:grid}.head h2{text-transform:capitalize}.score{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.rating{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.bar-row{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:14ch minmax(0,1fr) 4ch;display:grid}.bar,.el-bar .track{block-size:var(--roxy-space-sm);background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.bar>span{background:var(--roxy-accent);height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-row>span:last-child{color:var(--roxy-muted);text-align:end;font-variant-numeric:tabular-nums}.archetype{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.lists h3{margin-block-end:var(--roxy-space-xs)}.lists ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}p.body{font-size:var(--roxy-text-sm)}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.block>h3{margin-block-end:var(--roxy-space-sm)}.elements{gap:var(--roxy-space-sm);display:grid}.el-row{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);grid-template-columns:8ch minmax(0,1fr) minmax(0,1fr);display:grid}.el-row .el-name{text-transform:capitalize}.el-row.shared .el-name{font-weight:var(--roxy-weight-bold)}.el-head span:nth-child(2){text-align:end}.el-bar{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;display:flex}.el-bar.p1{flex-direction:row-reverse}.el-bar .track{flex:auto;display:flex}.el-bar.p1 .track{justify-content:flex-end}.el-bar .track>span{background:var(--roxy-accent);height:100%;display:block}.el-bar.p2 .track>span{background:var(--roxy-secondary)}.shared-note{font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-sm)}`],m([Ag({type:String,reflect:!0})],Ja.prototype,"mode",2),Ja=m([f("roxy-compatibility-card")],Ja);function _g(n,a,e){let t=Ct(a),r=typeof a.orb=="number"?` (orb ${b(n,a.orb,1)}°)`:"",s=[a.planet1,t,a.planet2].filter(Boolean).join(" ");return a.description&&e?`${s}${r} · ${a.description}`:`${s}${r}`}import{css as Ng,html as Ci,nothing as Ti}from"lit";var cp={fortunate:"Fortunate",unfortunate:"Unfortunate",mixed:"Mixed fortune"},zg={fortunate:"success",unfortunate:"danger",mixed:"warning"},Qr=class extends y{renderData(a){let e=P(this.effectiveLang(),a.number);return Ci`<article class="card" part="card" aria-label="${`${this.t("Compound number")} ${e}`}"><header class="hero" part="header"><div class="numeral">${e}</div><div><p class="roxy-label">${this.t("Compound number")}</p>${a.name?Ci`<h2>${a.name}</h2>`:Ti}</div></header><ul class="badges roxy-chips" part="details"><li>${this.t("Root number {{n}}",{n:P(this.effectiveLang(),a.root)})}</li><li class="roxy-chip" data-tone="${zg[a.nature]??Ti}">${cp[a.nature]?this.t(cp[a.nature]):S(a.nature)}</li>${typeof a.sameAs=="number"?Ci`<li>${this.t("Same meaning as {{n}}",{n:P(this.effectiveLang(),a.sameAs)})}</li>`:Ti}</ul>${a.meaning&&!this.hideReadings?Ci`<p part="section readings">${a.meaning}</p>`:Ti}</article>`}};Qr.endpoints=Ul,Qr.styles=[u,Ng`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.hero>div{min-width:0}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.badges>li{font-variant-numeric:tabular-nums}`],Qr=m([f("roxy-compound-number")],Qr);import{css as Fg,html as $t,nothing as pa}from"lit";var Og={apple:"#8db600",azure:"#007fff",blackish:"black",bluish:"blue",bottle:"#006a4e",brass:"#b5a642",brick:"#b22222",brownish:"brown",browns:"brown",burgundy:"#800020",clear:"#eef2f6",colorless:"#eef2f6",colourless:"#eef2f6",cream:"#fffdd0",creamy:"#fffdd0",emerald:"#50c878",golden:"gold",greenish:"green",lilac:"#c8a2c8",mauve:"#e0b0ff",peach:"peachpuff",pinkish:"pink",reddish:"red",rose:"#f4a6b7",royal:"royalblue",silvery:"silver",sky:"skyblue",yellowish:"yellow"},Gg=new Set(["beige","black","blue","brown","crimson","cyan","gold","gray","green","grey","indigo","lavender","magenta","maroon","navy","olive","orange","pink","purple","red","salmon","silver","tan","teal","turquoise","violet","white","yellow"]),Ig={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function Ei(n){let a=[],e=[];for(let i of n.toLowerCase().split(/[\s-]+/)){let o=Ig[i];if(o){e.push(o);continue}let l=Og[i]??(Gg.has(i)?i:"");l&&a.push(l)}let[t,r]=a;if(!t)return"var(--roxy-border, #e4e4e7)";let s=r?`color-mix(in srgb, ${t}, ${r})`:t;for(let[i,o]of e)s=`color-mix(in srgb, ${s} ${o}%, ${i})`;return s}var es=class extends y{renderData(a){let e=a.colors??[],t=a.keywords??[],r=a.pairsWith??[],s=ni(this.effectiveLang(),a.birthMonth)||void 0,i=a.name??this.t("Crystal");return $t`<article class="wrap" part="card" aria-label="${i}"><div class="hero" part="header">${a.imageUrl?$t`<img class="photo" part="chart" src="${a.imageUrl}" alt="${i}" loading="lazy">`:pa}<div><h2>${a.name}</h2>${a.description&&!this.hideReadings?$t`<p class="desc">${a.description}</p>`:pa}</div></div><dl class="roxy-facts" part="details">${this.attr(this.t("Planet"),a.planet)} ${this.attr(this.t("Hardness"),typeof a.hardness=="number"?this.t("{{value}} Mohs",{value:b(this.effectiveLang(),a.hardness)}):void 0)} ${this.attr(this.t("Vibration"),a.numericalVibration)} ${this.attr(this.t("Birthstone"),s)} ${this.list(this.t("Chakras"),a.chakras)} ${this.list(this.t("Zodiac"),a.zodiacSigns)} ${this.list(this.t("Elements"),a.elements)} ${e.length?$t`<div><dt>${this.t("Colors")}</dt><dd><div class="colors">${e.map(o=>$t`<span class="color"><span class="dot" style="${`background:${Ei(o)}`}"></span>${o}</span>`)}</div></dd></div>`:pa}</dl>${this.renderMeaning(a.meaning)} ${t.length&&!this.hideReadings?$t`<section part="section keywords"><h3>${this.t("Keywords")}</h3><ul class="chips roxy-chips">${t.map(o=>$t`<li>${o}</li>`)}</ul></section>`:pa} ${a.affirmation&&!this.hideReadings?$t`<p class="affirmation">${a.affirmation}</p>`:pa} ${r.length?$t`<section part="section pairs-with"><h3>${this.t("Pairs with")}</h3><ul class="chips roxy-chips">${r.map(o=>$t`<li>${String(o).replace(/-/g," ")}</li>`)}</ul></section>`:pa}</article>`}attr(a,e){return e==null||e===""?pa:$t`<div><dt>${a}</dt><dd>${e}</dd></div>`}list(a,e){return e?.length?$t`<div><dt>${a}</dt><dd>${e.join(", ")}</dd></div>`:pa}renderMeaning(a){if(!a||this.hideReadings)return pa;let t=[[this.t("Spiritual"),a.spiritual],[this.t("Emotional"),a.emotional],[this.t("Physical"),a.physical]].filter(([,r])=>!!r);return t.length===0?pa:$t`<div class="meaning" part="section meaning">${t.map(([r,s])=>$t`<h3>${r}</h3><p>${s}</p>`)}</div>`}};es.endpoints=Zl,es.styles=[u,re,Fg`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.hero{align-items:flex-start;gap:var(--roxy-space-md);display:flex}.photo{border-radius:var(--roxy-radius-md);object-fit:cover;background:var(--roxy-border);flex:none;block-size:4lh;inline-size:4lh}.hero h2{margin-block-end:var(--roxy-space-xs)}.desc,.meaning p{font-size:var(--roxy-text-sm)}.colors{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.color{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-xs);text-transform:capitalize;display:inline-flex}.dot{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;inline-size:.6lh}.meaning h3,section>h3{margin-block-end:var(--roxy-space-xs)}.meaning p{margin-block-end:var(--roxy-space-sm)}.chips>li{text-transform:capitalize}.affirmation{border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md);font-style:italic}`],es=m([f("roxy-crystal-card")],es);import{css as Bg,html as ts,nothing as dp}from"lit";import{property as Hg}from"lit/decorators.js";var Qa=class extends y{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"};this.listKey="crystals"}renderData(e){let t=e.crystals??[];if(t.length===0)return this.renderEmpty();let r=this.heading||this.deriveHeading(e),s="total"in e&&typeof e.total=="number"?e.total:t.length;return ts`<section class="wrap" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="count">${s===1?this.t("1 crystal"):this.t("{{count}} crystals",{count:s})}</span></header><ul class="grid" part="section crystals">${t.map(i=>ts`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===i.id?"true":"false"}" @click="${()=>this.pickRow({id:i.id,name:i.name})}">${i.imageUrl?ts`<img class="photo" src="${i.imageUrl}" alt="${i.name??this.t("Crystal")}" loading="lazy">`:ts`<div class="photo" aria-hidden="true"></div>`}<p class="name">${i.name}</p>${i.colors&&i.colors.length>0?ts`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:qe(this.effectiveLang(),i.colors)})}">${i.colors.map(o=>ts`<span class="swatch" style="${`background:${Ei(o)}`}" title="${o}"></span>`)}</div>`:dp}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?ts`<div class="detail" part="detail">${this.openedRow}</div>`:dp}</section>`}deriveHeading(e){return"chakra"in e&&e.chakra?this.t("{{chakra}} chakra crystals",{chakra:e.chakra}):"element"in e&&e.element?this.t("{{element}} element crystals",{element:e.element}):"sign"in e&&e.sign?this.t("Crystals for {{sign}}",{sign:e.sign}):"month"in e&&typeof e.month=="number"?this.t("{{month}} birthstones",{month:ni(this.effectiveLang(),e.month)}):this.t("Crystals")}};Qa.endpoints=Wl,Qa.styles=[u,Bg`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.photo{aspect-ratio:1;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.colors{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.swatch{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.4lh;inline-size:.4lh}`],m([Hg({type:String,reflect:!0})],Qa.prototype,"heading",2),Qa=m([f("roxy-crystal-grid")],Qa);import{css as jg,html as rt,nothing as st}from"lit";import{property as Kg,state as Vg}from"lit/decorators.js";function pp(n){return"pranaDashas"in n?"Prana":"sookshmaDashas"in n?"Sookshma":"pratyantardashas"in n?"Pratyantardasha":"antardashas"in n?"Antardasha":"Mahadasha"}function zo(n){if("sookshmaPeriod"in n&&n.sookshmaPeriod)return{source:"Sookshma",period:n.sookshmaPeriod};if("pratyantardashaPeriod"in n&&n.pratyantardashaPeriod)return{source:"Pratyantardasha",period:n.pratyantardashaPeriod};if("antardashaPeriod"in n&&n.antardashaPeriod)return{source:"Antardasha",period:n.antardashaPeriod};if("mahadashaPeriod"in n&&n.mahadashaPeriod)return{source:"Mahadasha",period:n.mahadashaPeriod}}function Oo(n){if(!n)return"";let a=[];return n.years&&a.push(`${n.years}y`),n.months&&a.push(`${n.months}m`),n.days&&a.push(`${n.days}d`),a.length?a.join(" "):"0d"}function hp(n,a){return da(n?.strongHouses?.length?n.strongHouses:n?.signifiedHouses,a)}function Di(n,a){let e=R(n,a.startDate);return e&&e===R(n,a.endDate)?Js(n,a.startDate,a.endDate):xt(n,a.startDate,a.endDate)}var wa=class extends y{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let t=this.collectPeriods(e),r=t.length?Math.max(...t.map(d=>d.durationYears)):0,s=Yg(t.length?Math.min(...t.map(d=>d.durationYears)):0),i=this.hideReadings?[]:this.readings(e,t),o=this.frameRows(e),l=[{id:"timeline",label:this.t("Timeline")},...i.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:i.length})}]:[],...o.length?[{id:"frame",label:this.t("Chart details")}]:[]],c=l.some(d=>d.id===this.view)?this.view:"timeline";return rt`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${l.length>1?dt({items:l,active:c,onSelect:d=>{this.view=d},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:!0}):st}<div id="roxy-dasha-panel-${c}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${l.length>1?`roxy-dasha-tab-${c}`:st}">${c==="timeline"?rt`${this.period==="current"?this.renderCurrent(e):st} ${t.length>0?rt`<div class="timeline" part="chart timeline" role="list">${t.map(d=>this.renderBar(d,r,s,e.houseThemes))}</div>`:st}`:st} ${c==="readings"?this.renderReadings(i):st} ${c==="frame"?this.renderFrame(o):st}</div></div>`}renderLordChain(e){let t=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return t.length>1?rt`<div class="nakshatra">${t.join(" › ")}</div>`:"nakshatraName"in e&&e.nakshatraName?rt`<div class="nakshatra">${"nakshatraLord"in e&&e.nakshatraLord?this.t("Moon nakshatra: {{name}} (lord {{lord}})",{name:e.nakshatraName,lord:e.nakshatraLord}):this.t("Moon nakshatra: {{name}}",{name:e.nakshatraName})}</div>`:st}frameRows(e){let t=[];if("nakshatraName"in e&&e.nakshatraName){let r="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";t.push(["Moon nakshatra",`${e.nakshatraName}${r}`])}if("nakshatraLord"in e&&e.nakshatraLord&&t.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&t.push(["Moon longitude",`${b(this.effectiveLang(),e.moonLongitude,3)}° sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&t.push(["Ayanamsa",Nr(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let r="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";t.push(["Balance at birth",`${Oo(e.birthDashaBalance)} of the opening ${r}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&t.push(["Cycle length",`${e.totalYears} years`]),t}renderFrame(e){return rt`<dl class="roxy-facts" part="details frame">${e.map(([t,r])=>rt`<div><dt>${t}</dt><dd>${r}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let t=zo(e);return t?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(pp(e)),planet:t.period.planet,parent:this.t(t.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let t=zo(e);if(!t)return st;let r=t.period,s=Di(this.effectiveLang(),r),i=r.nominalStartDate?R(this.effectiveLang(),r.nominalStartDate):"";return rt`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:r.planet,level:this.t(t.source),span:s?`, ${s}`:"",duration:typeof r.durationYears=="number"?` (${qg(this.effectiveLang(),r.durationYears)})`:""})} ${i?rt`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:i})}`:st}</p>`}readings(e,t){let r=[],s=zo(e);if(s?.period.interpretation&&r.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:Di(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let o=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[l,c,d]of o){if(!c?.interpretation)continue;let p=Oo(d);r.push({label:this.t("{{planet}} {{level}}",{planet:c.planet,level:this.t(l)}),aside:p?this.t("{{balance}} left",{balance:p}):Di(this.effectiveLang(),c),body:c.interpretation})}}let i=t.find(o=>this.isCurrent(o));return i?.interpretation&&r.push({label:`${i.planet} ${pp(e)}`,aside:Di(this.effectiveLang(),i),body:i.interpretation}),r}renderCurrent(e){if(!("mahadasha"in e))return st;let t=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return rt`<div class="current" part="details current">${t.map(([r,s,i])=>{if(!s)return st;let o=Oo(i),l=hp(s.significators,e.houseThemes);return rt`<div><span class="roxy-label">${this.t(r)}</span> <strong>${s.planet}</strong> ${o?rt`<small>${this.t("{{balance}} left",{balance:o})}</small>`:st} ${l?rt`<small class="houses">${this.t("Signifies {{houses}}",{houses:l})}</small>`:st}</div>`})}</div>`}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:"pratyantardashas"in e&&e.pratyantardashas?.length?e.pratyantardashas:"sookshmaDashas"in e&&e.sookshmaDashas?.length?e.sookshmaDashas:"pranaDashas"in e&&e.pranaDashas?.length?e.pranaDashas:[]}isCurrent(e){if(!e.startDate||!e.endDate)return!1;let t=Date.now(),r=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(r)||Number.isNaN(s)?!1:t>=r&&t<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let t=Date.parse(e.startDate),r=Date.parse(e.endDate),s=Date.now();return Number.isNaN(t)||Number.isNaN(r)||s<t||s>=r||r<=t?-1:(s-t)/(r-t)}renderBar(e,t,r,s){let i=e.durationYears,o=t>0?i/t*100:0,l=this.isCurrent(e),c=l?this.progressIn(e):-1,d=l?"bar-track bar-now":"bar-track",p=hp(e.significators,s),h=["bar",l?"now":"",r==="time"?"fine":""].filter(Boolean).join(" ");return rt`<div class="${h}" part="label-track" role="listitem" aria-current="${l?"time":"false"}"><span><strong>${e.planet}</strong>${l?rt`<span class="now-badge">${this.t("Now")}</span>`:st} </span><span class="${d}"><span class="bar-fill" style="width:${o}%"></span> ${c>=0?rt`<span class="bar-progress" style="left:${c*o}%" aria-hidden="true"></span>`:st} </span><span class="dates">${vd(this.effectiveLang(),e.startDate,e.endDate,r)} </span>${p?rt`<span class="houses">${this.t("Signifies {{houses}}",{houses:p})}</span>`:st}</div>`}};wa.endpoints=Xl,wa.styles=[u,M,re,j,Xe,jg`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.nakshatra{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.current{gap:var(--roxy-space-md) var(--roxy-space-lg);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;margin-block-end:var(--roxy-space-md);padding-block-end:var(--roxy-space-md);display:flex}.current>div{align-content:start;min-width:0;display:grid}.current small{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.parent{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);font-size:var(--roxy-text-sm);color:var(--roxy-muted);margin:0;padding-inline-start:var(--roxy-space-sm)}.timeline{gap:var(--roxy-space-xs);display:grid}.bar{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) 16ch;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);align-items:center;row-gap:0;display:grid}.bar.now strong,.now-badge{color:var(--roxy-accent-ink)}.now-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.bar-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent);opacity:.45;height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-now .bar-fill{opacity:1}.bar-progress{inline-size:var(--roxy-line-thick);background:var(--roxy-accent-ink);position:absolute;inset-block:0}.dates{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end}.bar.fine{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr)}.bar.fine .dates{text-align:start;grid-column:1/-1;min-width:0}.bar .houses{min-width:0;color:var(--roxy-muted);font-size:var(--roxy-text-xs);grid-column:1/-1}[role=tabpanel]{padding-top:var(--roxy-space-md)}`],m([Kg({type:String,reflect:!0})],wa.prototype,"period",2),m([Vg()],wa.prototype,"view",2),wa=m([f("roxy-dasha-timeline")],wa);var Go=365.25;function qg(n,a){if(a>=1)return`${b(n,a,1)} years`;let e=a*Go;if(e>=1)return`${b(n,e,e>=10?0:1)} days`;let t=e*24;return t>=1?`${b(n,t,1)} hours`:`${b(n,t*60,0)} minutes`}function Yg(n){return n>=2?"year":n>=60/Go?"month":n>=1/Go?"day":"time"}import{css as Zg,html as q,nothing as ka}from"lit";import{property as Wg}from"lit/decorators.js";import{ifDefined as mp}from"lit/directives/if-defined.js";import{css as Ug}from"lit";var er=Ug`@container (width<=30rem){table.stacked,table.stacked caption,table.stacked tbody,table.stacked tr,table.stacked td{width:100%;min-width:0;display:block}table.stacked thead{display:none}table.stacked tr{border-bottom:1px solid var(--roxy-border);padding-block:var(--roxy-space-sm)}table.stacked tr:last-child{border-bottom:0}table.stacked td{padding:calc(var(--roxy-space-unit) / 2) 0;white-space:normal;border:0}table.stacked td:empty{display:none}table.stacked td[data-label]:before{content:attr(data-label) " ";color:var(--roxy-muted)}}`;var gp=["title","name","label","heading","overview","summary"],Xg=80,Jg=80,Qg=3,ey=["imageUrl","image","icon","symbol"],ty=["imageUrl","image"],ay=["affirmation","mantra","motto","quote"],ry=new Set(["seed"]),sy=new Set(["id","slug","key"]),ny=new Set(["calculation","calculations","type","position","count","totalcount","total","limit","offset","page","pagesize","perpage"]),iy=8,yp=1,oy=12,ly=n=>n.toLowerCase().replace(/[_-]/g,""),up=n=>/^(has|is)([A-Z_]|$)/.test(n),cy=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/,dy=/^[A-Z0-9]+(_[A-Z0-9]+)+$/,py=6;function hy(n,a){if(!Number.isInteger(a))return!1;let e=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s_-]+/);return e[e.length-1].toLowerCase()==="year"}function as(n){return n===null||["string","number","boolean"].includes(typeof n)}function Io(n){return n!==null&&typeof n=="object"&&!(Array.isArray(n)&&n.every(as))}function fp(n){if(n==null)return!0;if(Array.isArray(n))return n.length===0;if(typeof n!="object")return!1;let a=Object.values(n);return a.length===0||a.every(fp)}var rs=class extends y{constructor(){super(...arguments);this.depth=0}renderData(e){return this.depth>=py?q`<div class="roxy-empty" role="status">${this.t("Nested data omitted")}</div>`:q`<div class="roxy-card" part="card" aria-label="${this.t("Generic data display")}">${this.renderValue(e)}</div>`}renderValue(e){return e==null?ka:as(e)?q`<p>${this.scalarTemplate(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?q`<div class="roxy-empty" role="status">${this.t("Empty list")}</div>`:e.every(as)?this.renderChips(e):e.every(r=>r!==null&&typeof r=="object"&&!Array.isArray(r))?this.renderObjectArray(e):q`<ol>${e.map(r=>q`<li>${this.renderValue(r)}</li>`)}</ol>`}renderChips(e){return q`<ul class="roxy-chips">${e.filter(t=>t!==null).map(t=>q`<li>${this.formatScalar(t)}</li>`)}</ul>`}renderObjectArray(e){let t=e.map(h=>this.suppress(h)),r=this.collectKeys(t),s=new Set(r.filter(h=>t.some(x=>typeof x[h]=="string"&&Array.from(x[h]).length>Jg))),i=new Set(r.filter(h=>s.has(h)||t.some(x=>Io(x[h]??null)))),o=s.size>0||i.size>0&&i.size<r.length,l=h=>o?i.has(h)?"col-wide":"col-tight":"",c=i.size>0&&r.length>Qg,d=t.length>oy;return q`<div class="${c?"roxy-collection":d&&!c?"roxy-collection compact long":"roxy-collection compact"}" part="table" role="${c?"list":"group"}" aria-label="${c?this.t("{{count}} rows",{count:t.length}):this.t("Data table")}" tabindex="${c?ka:"0"}">${c?q`${d?q`<p>${this.t("{{count}} rows",{count:t.length})}</p>`:ka} ${t.map(h=>q`<div class="roxy-record" role="listitem">${this.renderField(h)}</div>`)}`:q`<table class="${s.size?"roxy-table stacked prose":i.size?"roxy-table stacked":"roxy-table"}" role="table">${d?q`<caption>${this.t("{{count}} rows",{count:t.length})}</caption>`:ka}<thead><tr>${r.map(h=>q`<th class="${l(h)}">${ae(this.effectiveLang(),h)}</th>`)}</tr></thead><tbody>${t.map(h=>q`<tr>${r.map(x=>q`<td class="${l(x)}" data-label="${ae(this.effectiveLang(),x)}">${this.renderCell(h[x],x)}</td>`)}</tr>`)}</tbody></table>`}</div>`}suppress(e){let t=Qs(e),r=gp.some(s=>typeof t[s]=="string");return Object.fromEntries(Object.entries(t).filter(([s])=>{let i=ly(s);return ry.has(i)||r&&sy.has(i)?!1:!ny.has(i)}))}renderObject(e){let t=this.suppress(e),r=gp.find(p=>typeof t[p]=="string"&&t[p].length<=Xg),s=ey.find(p=>typeof t[p]=="string"&&t[p].startsWith("http")),i=r!=="summary"&&typeof t.summary=="string"?"summary":null,o=ay.find(p=>typeof t[p]=="string"),l=Object.entries(t).filter(([p,h])=>p!==r&&p!==i&&p!==o&&!ty.includes(p)&&!fp(h)),c=l.filter(([,p])=>!Io(p)),d=l.filter(([,p])=>Io(p));return q`${s?q`<img class="roxy-image" src="${String(t[s])}" alt="${r?String(t[r]):this.t("illustration")}" loading="lazy">`:ka} ${r?this.depth===0?q`<h2 class="roxy-title" part="header">${t[r]}</h2>`:q`<h3 class="roxy-title" part="header">${t[r]}</h3>`:ka} ${i?q`<p class="roxy-summary">${t[i]}</p>`:ka} ${o?q`<blockquote class="roxy-quote">${t[o]}</blockquote>`:ka} ${c.length>0?q`<dl class="roxy-rows" part="details label-track">${c.map(([p,h])=>q`<dt>${ae(this.effectiveLang(),p)}</dt><dd>${this.renderField(h,p)}</dd>`)}</dl>`:ka} ${d.map(([p,h])=>this.renderSection(p,h))}`}renderSection(e,t){let r=t!==null&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:0,s=this.renderField(t,e),i=ae(this.effectiveLang(),e);return r>iy||this.depth>=yp?q`<details class="roxy-section" ?open="${this.depth<yp}"><summary>${i}</summary>${s}</details>`:q`<div class="roxy-section">${this.depth===0?q`<h3>${i}</h3>`:q`<h4>${i}</h4>`} ${s}</div>`}renderField(e,t){return e==null?"":e===!0&&t!==void 0&&up(t)?q`<span class="roxy-chip">${this.t("Yes")}</span>`:as(e)?q`${this.scalarTemplate(e,t)}`:Array.isArray(e)&&e.every(as)?this.renderChips(e):q`<roxy-data bare lang="${mp(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}renderCell(e,t){return e==null?"":e===!0&&t!==void 0&&up(t)?q`<span class="roxy-chip">${this.t("Yes")}</span>`:as(e)?this.scalarTemplate(e,t):Array.isArray(e)&&e.every(as)?e.filter(r=>r!==null).map(r=>this.formatScalar(r)).join(", "):q`<roxy-data bare lang="${mp(this.effectiveLang())}" .data="${e}" .depth="${this.depth+1}"></roxy-data>`}scalarTemplate(e,t){return Zn(e)?q`<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`:this.formatScalar(e,t)}formatScalar(e,t){return typeof e=="number"?t!==void 0&&hy(t,e)?String(e):b(this.effectiveLang(),e,2)||String(e):typeof e=="boolean"?e?this.t("Yes"):this.t("No"):cy.test(e)?V(this.effectiveLang(),e):dy.test(e)?S(e.toLowerCase()):e}collectKeys(e){let t=new Set;for(let r of e)for(let s of Object.keys(r))t.add(s);return Array.from(t)}};rs.styles=[u,Zg`.roxy-card{padding:var(--roxy-space-md)}.roxy-card a{color:var(--roxy-accent-ink)}:is(h2,h3,h4,p,dl){margin:0}:is(h2,h3).roxy-title{margin-block-end:var(--roxy-space-sm)}.roxy-summary{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-md)}dl.roxy-rows{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:fit-content(25%) minmax(0,1fr);display:grid}dl.roxy-rows dd{word-break:break-word;margin:0}.roxy-collection{min-width:0}.roxy-collection.compact{overflow-x:auto}.roxy-collection.long{max-block-size:20lh}.roxy-record+.roxy-record{margin-block-start:var(--roxy-space-sm)}table.roxy-table{width:100%}table.roxy-table caption{text-align:start}table.roxy-table th{white-space:nowrap}:where(table.roxy-table) :is(th,td).col-tight{white-space:nowrap;width:1%}:where(table.roxy-table.prose) :is(th,td).col-wide{min-width:40ch}.roxy-image{max-width:100%;height:auto;border-radius:var(--roxy-radius-md);margin-block-end:var(--roxy-space-md)}.roxy-section{margin-block-start:var(--roxy-space-md)}.roxy-section>:is(h3,h4,summary){font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);margin-block-end:var(--roxy-space-xs)}blockquote.roxy-quote{margin:var(--roxy-space-md) 0;border-inline-start:var(--roxy-line-thick) solid var(--roxy-accent);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md);font-style:italic}`,er],m([Wg({attribute:!1})],rs.prototype,"depth",2),rs=m([f("roxy-data")],rs);import{css as _y,html as ln,nothing as jo}from"lit";import{property as Ny}from"lit/decorators.js";import{html as An,nothing as ht,svg as Ee}from"lit";var Yt=400,le=20,pt=Yt-2*le,Oe=Yt/2,xp=Object.fromEntries(Re.map(n=>[n.toLowerCase(),n])),my=[{id:"north",source:"North"},{id:"south",source:"South"},{id:"east",source:"East"}],Lp="ʳ",$p="ᶜ",wp="ʷ";function Fo(n){return Re.indexOf(n)}function gy(n){let a=Cd(n.graha)??n.graha,e=`${n.isRetrograde?Lp:""}${n.combust?$p:""}${n.war?wp:""}`;if(typeof n.longitude!="number"||!Number.isFinite(n.longitude)||n.natalReference)return`${a}${e}`;let{degree:t}=Nt(n.longitude);return`${a} ${t}°${e}`}function yy(n,a,e){let t=[A(n.graha)],r=n.natalReference===!0;if(r&&t.push(e("in {{sign}}",{sign:a})),typeof n.longitude=="number"&&Number.isFinite(n.longitude)){let s=Nt(n.longitude),i=String(s.minute).padStart(2,"0");t.push(r?`D1: ${s.degree}°${i}' ${s.sign}`:`${s.degree}°${i}' ${s.sign}`)}if(n.nakshatra?.name){let s=n.nakshatra.pada?` ${e("pada {{n}}",{n:n.nakshatra.pada})}`:"";t.push(`${r?"D1: ":""}${n.nakshatra.name}${s}`)}return n.nakshatra?.lord&&t.push(e("nakshatra lord {{graha}}",{graha:n.nakshatra.lord})),n.awastha&&t.push(n.awastha),n.deeptadi&&t.push(n.deeptadi),n.combust&&t.push(e("combust")),n.war&&t.push(n.war.winner?e("planetary war with {{graha}}, won by {{winner}}",{graha:n.war.opponent,winner:n.war.winner}):e("planetary war with {{graha}}",{graha:n.war.opponent})),n.isRetrograde&&t.push(e("retrograde")),t.join(" · ")}function Bo(n,a,e,t,r,s){let i=t-(n.length-1)*r/2;return n.map((o,l)=>{let c=i+l*r;return Ee`<text class="planet-text" x=${e} y=${c} text-anchor="middle" dominant-baseline="central">${gy(o)}<title>${yy(o,a,s)}</title></text>`})}function Pi(n,a={}){let{divisionLabel:e,lagnaOverride:t,states:r,natalReference:s}=a,i=new Set((r?.combustion??[]).map(p=>(p.planet??"").toLowerCase())),o=new Map;for(let p of r?.planetaryWar??[])!p.planet1||!p.planet2||(o.set(p.planet1.toLowerCase(),{opponent:p.planet2,winner:p.winner}),o.set(p.planet2.toLowerCase(),{opponent:p.planet1,winner:p.winner}));let l={};for(let p of Re)l[p.toLowerCase()]=[];let c=t?xp[t.toLowerCase()]??"":"",d=c;for(let[p,h]of Object.entries(n??{})){let x=(h?.rashi??"").toLowerCase();if(p==="Lagna"||h?.graha==="Lagna"){c||(d=xp[x]??"");continue}if(!x||!(x in l))continue;let L=h.graha??p,v=L.toLowerCase();l[x]?.push({graha:L,natalReference:s,longitude:h.longitude,nakshatra:h.nakshatra,isRetrograde:h.isRetrograde,awastha:h.awastha,deeptadi:h.deeptadi,combust:i.has(v)||void 0,war:o.get(v)})}return{lagnaSign:d,placements:l,divisionLabel:e}}var ss=pt/4,uy={Pisces:{col:0,row:0},Aries:{col:1,row:0},Taurus:{col:2,row:0},Gemini:{col:3,row:0},Cancer:{col:3,row:1},Leo:{col:3,row:2},Virgo:{col:3,row:3},Libra:{col:2,row:3},Scorpio:{col:1,row:3},Sagittarius:{col:0,row:3},Capricorn:{col:0,row:2},Aquarius:{col:0,row:1}};function fy(n){let a=uy[n]??{col:0,row:0};return{x:le+a.col*ss,y:le+a.row*ss,w:ss,h:ss}}function xy(n){let a=le,e=le+ss,t=le+2*ss,r=le+3*ss,s=Yt-le;return Ee`
219
17
  <rect class="line" x=${a} y=${a} width=${pt} height=${pt} stroke-width="1.5" fill="none" />
220
18
  <line class="line" x1=${a} y1=${e} x2=${s} y2=${e} stroke-width="1" />
221
19
  <line class="line" x1=${a} y1=${r} x2=${s} y2=${r} stroke-width="1" />
@@ -226,7 +24,7 @@ var Kh=Object.defineProperty;var Vh=Object.getOwnPropertyDescriptor;var m=(n,a,e
226
24
  <line class="line" x1=${t} y1=${a} x2=${t} y2=${e} stroke-width="1" />
227
25
  <line class="line" x1=${t} y1=${r} x2=${t} y2=${s} stroke-width="1" />
228
26
  ${n?Ee`<text class="centre-label" x=${Oe} y=${Oe} text-anchor="middle" dominant-baseline="central">${n}</text>`:ht}
229
- `}function Bo(n,a){let e=Io(a),t=Io(n);return e===-1||t===-1?0:(t-e+12)%12+1}function by(n,a,e,t,r){let s=fy(n),i=s.x+s.w/2,o=s.y+s.h/2,l=li(n)??n,c=14;return Ee`
27
+ `}function Ho(n,a){let e=Fo(a),t=Fo(n);return e===-1||t===-1?0:(t-e+12)%12+1}function by(n,a,e,t,r){let s=fy(n),i=s.x+s.w/2,o=s.y+s.h/2,l=ci(n)??n,c=14;return Ee`
230
28
  <g class=${e?"cell lagna":"cell"}>
231
29
  ${e?Ee`
232
30
  <rect class="lagna-bg" x=${s.x} y=${s.y} width=${s.w} height=${s.h} />
@@ -235,27 +33,27 @@ var Kh=Object.defineProperty;var Vh=Object.getOwnPropertyDescriptor;var m=(n,a,e
235
33
  <text class="sign-text" x=${s.x+6} y=${s.y+12} text-anchor="start" dominant-baseline="central">${l}</text>
236
34
  ${t>0?Ee`<text class="house-num" x=${s.x+s.w-6} y=${s.y+12} text-anchor="end" dominant-baseline="central">${t}</text>`:ht}
237
35
  ${e?Ee`<text class="lagna-marker" x=${i} y=${s.y+26} text-anchor="middle" dominant-baseline="central">${r("ASC")}</text>`:ht}
238
- ${a.length?Fo(a,n,i,o+4,14,r):ht}
36
+ ${a.length?Bo(a,n,i,o+4,14,r):ht}
239
37
  </g>
240
- `}function xp(n,a){let e=n.lagnaSign.toLowerCase();return Ee`
38
+ `}function bp(n,a){let e=n.lagnaSign.toLowerCase();return Ee`
241
39
  ${xy(n.divisionLabel)}
242
- ${Re.map(t=>by(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Bo(t,n.lagnaSign),a))}
243
- `}var wp={tl:{x:le,y:le},tr:{x:Yt-le,y:le},br:{x:Yt-le,y:Yt-le},bl:{x:le,y:Yt-le},top:{x:Oe,y:le},right:{x:Yt-le,y:Oe},bottom:{x:Oe,y:Yt-le},left:{x:le,y:Oe},tlMid:{x:Oe-pt/4,y:Oe-pt/4},trMid:{x:Oe+pt/4,y:Oe-pt/4},brMid:{x:Oe+pt/4,y:Oe+pt/4},blMid:{x:Oe-pt/4,y:Oe+pt/4}};function kp(n){let a=n.reduce((t,r)=>t+r.x,0)/n.length,e=n.reduce((t,r)=>t+r.y,0)/n.length;return{x:a,y:e}}var vy=Object.fromEntries(Object.entries({1:["top","trMid","centre","tlMid"],2:["tl","top","tlMid"],3:["tl","left","tlMid"],4:["left","tlMid","centre","blMid"],5:["bl","left","blMid"],6:["bl","bottom","blMid"],7:["bottom","blMid","centre","brMid"],8:["br","bottom","brMid"],9:["br","right","brMid"],10:["right","brMid","centre","trMid"],11:["tr","right","trMid"],12:["tr","top","trMid"]}).map(([n,a])=>{let e=a.map(t=>t==="centre"?{x:Oe,y:Oe}:wp[t]);return[n,{centre:kp(e),floor:Math.max(...e.map(t=>t.y))}]})),bp=12,Ly=16,$y=8;function wy(n){let{tl:a,tr:e,br:t,bl:r,top:s,right:i,bottom:o,left:l}=wp;return Ee`
40
+ ${Re.map(t=>by(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Ho(t,n.lagnaSign),a))}
41
+ `}var kp={tl:{x:le,y:le},tr:{x:Yt-le,y:le},br:{x:Yt-le,y:Yt-le},bl:{x:le,y:Yt-le},top:{x:Oe,y:le},right:{x:Yt-le,y:Oe},bottom:{x:Oe,y:Yt-le},left:{x:le,y:Oe},tlMid:{x:Oe-pt/4,y:Oe-pt/4},trMid:{x:Oe+pt/4,y:Oe-pt/4},brMid:{x:Oe+pt/4,y:Oe+pt/4},blMid:{x:Oe-pt/4,y:Oe+pt/4}};function Sp(n){let a=n.reduce((t,r)=>t+r.x,0)/n.length,e=n.reduce((t,r)=>t+r.y,0)/n.length;return{x:a,y:e}}var vy=Object.fromEntries(Object.entries({1:["top","trMid","centre","tlMid"],2:["tl","top","tlMid"],3:["tl","left","tlMid"],4:["left","tlMid","centre","blMid"],5:["bl","left","blMid"],6:["bl","bottom","blMid"],7:["bottom","blMid","centre","brMid"],8:["br","bottom","brMid"],9:["br","right","brMid"],10:["right","brMid","centre","trMid"],11:["tr","right","trMid"],12:["tr","top","trMid"]}).map(([n,a])=>{let e=a.map(t=>t==="centre"?{x:Oe,y:Oe}:kp[t]);return[n,{centre:Sp(e),floor:Math.max(...e.map(t=>t.y))}]})),vp=12,Ly=16,$y=8;function wy(n){let{tl:a,tr:e,br:t,bl:r,top:s,right:i,bottom:o,left:l}=kp;return Ee`
244
42
  <rect class="line" x=${a.x} y=${a.y} width=${pt} height=${pt} stroke-width="1.5" fill="none" />
245
43
  <polygon class="line" points="${s.x},${s.y} ${i.x},${i.y} ${o.x},${o.y} ${l.x},${l.y}" stroke-width="1" fill="none" />
246
44
  <line class="line" x1=${a.x} y1=${a.y} x2=${t.x} y2=${t.y} stroke-width="1" />
247
45
  <line class="line" x1=${e.x} y1=${e.y} x2=${r.x} y2=${r.y} stroke-width="1" />
248
46
  ${n?Ee`<text class="centre-label" x=${Oe} y=${Oe} text-anchor="middle" dominant-baseline="central">${n}</text>`:ht}
249
- `}function ky(n,a,e,t,r,s){let i=vy[n];if(!i)return Ee``;let o=i.centre,l=Math.min(14,Math.abs(o.y-Oe)*.45+6),c=(t.length-1)*bp,d=Math.max(o.y+8-c/2,o.y-l+Ly),p=Math.max(0,d+c-(i.floor-$y)),h=o.y-l-p,x=d-p+c/2,L=r?`${a} · ${li(e)??e}`:`${a}`;return Ee`
47
+ `}function ky(n,a,e,t,r,s){let i=vy[n];if(!i)return Ee``;let o=i.centre,l=Math.min(14,Math.abs(o.y-Oe)*.45+6),c=(t.length-1)*vp,d=Math.max(o.y+8-c/2,o.y-l+Ly),p=Math.max(0,d+c-(i.floor-$y)),h=o.y-l-p,x=d-p+c/2,L=r?`${a} · ${ci(e)??e}`:`${a}`;return Ee`
250
48
  <g class=${r?"cell lagna":"cell"}>
251
49
  <text class="rashi-num" x=${o.x} y=${h} text-anchor="middle" dominant-baseline="central">${L}</text>
252
50
  ${r?Ee`<text class="lagna-marker" x=${o.x} y=${h-12} text-anchor="middle" dominant-baseline="central">${s("ASC")}</text>`:ht}
253
- ${t.length?Fo(t,e,o.x,x,bp,s):ht}
51
+ ${t.length?Bo(t,e,o.x,x,vp,s):ht}
254
52
  </g>
255
53
  `}function Sy(n,a){return Ee`
256
54
  ${wy(n.divisionLabel)}
257
- ${Re.map((e,t)=>{let r=Bo(e,n.lagnaSign);return ky(r,t+1,e,n.placements[e.toLowerCase()]??[],r===1,a)})}
258
- `}var Di=pt/3;function Ry(){let n=le,a=le+Di,e=le+2*Di,t=Yt-le,w={Aries:[{x:a,y:n},{x:e,y:n},{x:e,y:a},{x:a,y:a}],Taurus:[{x:n,y:n},{x:a,y:n},{x:a,y:a}],Gemini:[{x:n,y:n},{x:a,y:a},{x:n,y:a}],Cancer:[{x:n,y:a},{x:a,y:a},{x:a,y:e},{x:n,y:e}],Leo:[{x:n,y:e},{x:a,y:e},{x:n,y:t}],Virgo:[{x:a,y:e},{x:a,y:t},{x:n,y:t}],Libra:[{x:a,y:e},{x:e,y:e},{x:e,y:t},{x:a,y:t}],Scorpio:[{x:e,y:e},{x:e,y:t},{x:t,y:t}],Sagittarius:[{x:e,y:e},{x:t,y:t},{x:t,y:e}],Capricorn:[{x:e,y:a},{x:t,y:a},{x:t,y:e},{x:e,y:e}],Aquarius:[{x:t,y:n},{x:t,y:a},{x:e,y:a}],Pisces:[{x:e,y:n},{x:t,y:n},{x:e,y:a}]},O={};for(let[te,We]of Object.entries(w))O[te]={points:[...We],centroid:kp(We)};return O}var Cy=Ry();function Ty(n){let a=le,e=le+Di,t=le+2*Di,r=Yt-le;return Ee`
55
+ ${Re.map((e,t)=>{let r=Ho(e,n.lagnaSign);return ky(r,t+1,e,n.placements[e.toLowerCase()]??[],r===1,a)})}
56
+ `}var Ai=pt/3;function Ry(){let n=le,a=le+Ai,e=le+2*Ai,t=Yt-le,w={Aries:[{x:a,y:n},{x:e,y:n},{x:e,y:a},{x:a,y:a}],Taurus:[{x:n,y:n},{x:a,y:n},{x:a,y:a}],Gemini:[{x:n,y:n},{x:a,y:a},{x:n,y:a}],Cancer:[{x:n,y:a},{x:a,y:a},{x:a,y:e},{x:n,y:e}],Leo:[{x:n,y:e},{x:a,y:e},{x:n,y:t}],Virgo:[{x:a,y:e},{x:a,y:t},{x:n,y:t}],Libra:[{x:a,y:e},{x:e,y:e},{x:e,y:t},{x:a,y:t}],Scorpio:[{x:e,y:e},{x:e,y:t},{x:t,y:t}],Sagittarius:[{x:e,y:e},{x:t,y:t},{x:t,y:e}],Capricorn:[{x:e,y:a},{x:t,y:a},{x:t,y:e},{x:e,y:e}],Aquarius:[{x:t,y:n},{x:t,y:a},{x:e,y:a}],Pisces:[{x:e,y:n},{x:t,y:n},{x:e,y:a}]},O={};for(let[te,We]of Object.entries(w))O[te]={points:[...We],centroid:Sp(We)};return O}var Cy=Ry();function Ty(n){let a=le,e=le+Ai,t=le+2*Ai,r=Yt-le;return Ee`
259
57
  <rect class="line" x=${a} y=${a} width=${pt} height=${pt} stroke-width="1.5" fill="none" />
260
58
  <line class="line" x1=${a} y1=${e} x2=${e} y2=${e} stroke-width="1" />
261
59
  <line class="line" x1=${t} y1=${e} x2=${r} y2=${e} stroke-width="1" />
@@ -270,68 +68,68 @@ var Kh=Object.defineProperty;var Vh=Object.getOwnPropertyDescriptor;var m=(n,a,e
270
68
  <line class="line" x1=${r} y1=${r} x2=${t} y2=${t} stroke-width="1" />
271
69
  <line class="line" x1=${a} y1=${r} x2=${e} y2=${t} stroke-width="1" />
272
70
  ${n?Ee`<text class="centre-label" x=${Oe} y=${Oe} text-anchor="middle" dominant-baseline="central">${n}</text>`:ht}
273
- `}function Ey(n,a,e,t,r){let s=Cy[n];if(!s)return Ee``;let{centroid:i,points:o}=s,l=li(n)??n,c=o.map(d=>`${d.x},${d.y}`).join(" ");return Ee`
71
+ `}function Ey(n,a,e,t,r){let s=Cy[n];if(!s)return Ee``;let{centroid:i,points:o}=s,l=ci(n)??n,c=o.map(d=>`${d.x},${d.y}`).join(" ");return Ee`
274
72
  <g class=${e?"cell lagna":"cell"}>
275
73
  ${e?Ee`<polygon class="lagna-bg" points=${c} />`:ht}
276
74
  <text class="sign-text" x=${i.x} y=${i.y-16} text-anchor="middle" dominant-baseline="central">${l}</text>
277
75
  ${t>0?Ee`<text class="house-num" x=${i.x+18} y=${i.y-16} text-anchor="start" dominant-baseline="central">${t}</text>`:ht}
278
76
  ${e?Ee`<text class="lagna-marker" x=${i.x} y=${i.y-30} text-anchor="middle" dominant-baseline="central">${r("ASC")}</text>`:ht}
279
- ${a.length?Fo(a,n,i.x,i.y+4,12,r):ht}
77
+ ${a.length?Bo(a,n,i.x,i.y+4,12,r):ht}
280
78
  </g>
281
79
  `}function Dy(n,a){let e=n.lagnaSign.toLowerCase();return Ee`
282
80
  ${Ty(n.divisionLabel)}
283
- ${Re.map(t=>Ey(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Bo(t,n.lagnaSign),a))}
284
- `}function Sp(n){return Io(n.lagnaSign)!==-1}function Ay(n,a){let e=Object.values(n.placements).flat(),t=[];return e.some(r=>r.isRetrograde)&&t.push(`${vp} ${a("retrograde")}`),e.some(r=>r.combust)&&t.push(`${Lp} ${a("combust")}`),e.some(r=>r.war)&&t.push(`${$p} ${a("planetary war")}`),t.length===0?ht:An`<p class="roxy-frame">${t.join(" · ")}</p>`}function Py(n){return An`<p class="roxy-frame">${n("No ascendant in this chart, so the houses are not numbered.")}</p>`}function Pi(n,a){let e=[];Sp(n)||e.push(Py(a));let t=Ay(n,a);return t!==ht&&e.push(t),e}function Mi(n,a,e){if(a==="north"&&!Sp(n))return xp(n,e);switch(a){case"north":return Sy(n,e);case"east":return Dy(n,e);default:return xp(n,e)}}function _i(n,a,e){return dt({items:my.map(({id:t,source:r})=>({id:t,label:e(r)})),active:n,onSelect:a,label:e("Kundli style"),idPrefix:"kundli",controls:!0})}function Rp(n,a,e,t){return An`<details class="kundli-reference" part="section positions"><summary>${t("Planetary positions")}${H()}</summary><div class="kundli-reference-scroll" part="table" tabindex="0" role="region" aria-label="${t("Planetary positions")}"><table class="kundli-reference-table"><caption class="roxy-sr-only">${t("Planetary positions")}</caption><thead><tr><th scope="col">${t("Body")}</th><th scope="col">D${a} ${t("Sign")}</th><th scope="col">D${a} ${t("House")}</th><th scope="col">D1 ${t("Position")}</th><th scope="col">D1 ${t("Nakshatra")}</th><th scope="col">${t("Pada")}</th><th scope="col">${t("Star lord")}</th><th scope="col">${t("Motion")}</th></tr></thead><tbody>${Object.entries(n).map(([r,s])=>An`<tr><th scope="row">${s.graha??r}</th><td>${s.rashi??""}</td><td>${typeof s.house=="number"?s.house:""}</td><td>${typeof s.longitude=="number"?An`<span>${Qe(s.longitude)}</span><small>${b(e,s.longitude,12)}°</small>`:ht}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${s.isRetrograde?t("retrograde"):""}</td></tr>`)}</tbody></table></div></details>`}import{css as My}from"lit";var Ni=My`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.kundli-reference{min-width:0}.kundli-reference>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}.kundli-reference-scroll{min-width:0;margin-top:var(--roxy-space-sm);overflow-x:auto}.kundli-reference-table{width:100%}.kundli-reference-table :is(th,td){white-space:nowrap}.kundli-reference-table small{color:var(--roxy-secondary);display:block}.header{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,35rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.line{fill:#0000;stroke:var(--roxy-border)}.sign-text{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-normal);font-family:var(--roxy-font-sans);text-transform:uppercase}.rashi-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .75);font-weight:var(--roxy-weight-normal);font-family:var(--roxy-font-sans)}.house-num{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.planet-text{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.centre-label{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.lagna-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans);text-transform:uppercase}.lagna-bg{fill:color-mix(in srgb, var(--roxy-accent) 14%, transparent)}.lagna-slash{stroke:var(--roxy-accent);stroke-linecap:round;opacity:.7}`;var zy={number:9,name:"Navamsa"},Cp=n=>"division"in n&&n.division?n.division:zy,tr=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this);this.chartStyle="north";this.setStyle=e=>{this.chartStyle=e}}viewModel(){if(!this.data?.chart?.meta)return null;let e=Cp(this.data),t=`D${e.number} ${e.name}`;return Ai(this.data.chart.meta,{divisionLabel:t,natalReference:!0})}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let r=Cp(e),{vargottama:s}=e;return ln`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">D${r.number} ${r.name} ${ko(r.name,r.sanskritName)?ln`<span class="division-meta">· ${r.sanskritName}</span>`:Ho}</h2>${r.significance?ln`<p class="significance">${r.significance}</p>`:Ho} ${X(this.effectiveLang(),e.frame,this.translator)} ${Pi(t,this.translator)}</div>${_i(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(ln`<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label="${this.t("{{chart}} divisional chart with twelve sign houses",{chart:`D${r.number} ${r.name}`})}"><title>D${r.number} ${r.name}</title>${Mi(t,this.chartStyle,this.translator)}</svg>`,`D${r.number} ${r.name}`,this.translator)}</div>${Rp(e.chart.meta,r.number,this.effectiveLang(),this.translator)} ${s&&s.length>0?ln`<div class="vargottama-row" part="details"><span class="roxy-label">${this.t("Vargottama")}:</span><ul class="roxy-chips" aria-label="${this.t("Vargottama planets")}">${s.map(i=>ln`<li>${$(i)??""} ${i}</li>`)}</ul></div>`:Ho}</div>`}};tr.endpoints=Xl,tr.styles=[u,Ge,G,Ni,M,Xe,_y`.division-meta{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);color:var(--roxy-muted)}.significance{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);font-size:var(--roxy-text-sm);color:var(--roxy-muted);margin:0;padding-inline-start:var(--roxy-space-sm)}.vargottama-row{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}`],m([Ny({type:String,reflect:!0,attribute:"chart-style"})],tr.prototype,"chartStyle",2),tr=m([f("roxy-divisional-chart")],tr);import{css as Oy,html as Ut,nothing as ns}from"lit";import{property as Gy}from"lit/decorators.js";var Iy={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},ar=class extends y{constructor(){super(...arguments);this.type="manglik"}renderData(e){let t=!!e.present,r=Iy[this.type]??this.type,s=(e.severity??"").toLowerCase(),i=s==="severe"?3:s==="moderate"?2:s==="mild"?1:0,o=i*33;return Ut`<article class="card" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="${`badge roxy-chip ${t?"present":"absent"}`}" data-tone="${t?"danger":"success"}">${t?this.t("Present"):this.t("Absent")} </span>${X(this.effectiveLang(),e.frame,this.translator)}</header>${"type"in e&&e.type?Ut`<p class="subtype"><span class="subtype-label roxy-label">${this.type==="sadhesati"?this.t("Current phase"):this.t("Type")}</span>${e.type}</p>`:ns} ${e.severity?Ut`<div class="severity-bar" part="details" role="meter" aria-valuemin="0" aria-valuemax="3" aria-valuenow="${i}" aria-label="${this.t("Severity")} ${e.severity}"><span class="severity-fill" data-tier="${i}" style="width:${o}%"></span></div>`:ns} ${e.description&&!this.hideReadings?Ut`<p class="description">${e.description}</p>`:ns} ${this.renderEffects(e)} ${e.remedies&&e.remedies.length>0&&!this.hideReadings?Ut`<div part="section remedies"><h3>${this.t("Remedies")}</h3><ul>${e.remedies.map(l=>Ut`<li>${l}</li>`)}</ul></div>`:ns} ${"exceptions"in e&&e.exceptions&&e.exceptions.length>0&&!this.hideReadings?Ut`<div part="section exceptions"><h3>${this.t("Exceptions")}</h3><ul>${e.exceptions.map(l=>Ut`<li>${l}</li>`)}</ul></div>`:ns}</article>`}renderEffects(e){if(!e.effects||this.hideReadings)return ns;let t=[];for(let[r,s]of Object.entries(e.effects))if(typeof s=="string"&&s.length>0)t.push(Ut`<div><h3>${r}</h3><p>${s}</p></div>`);else if(s&&typeof s=="object")for(let[i,o]of Object.entries(s))typeof o=="string"&&o.length>0&&t.push(Ut`<div><h3>${i}</h3><p>${o}</p></div>`);return t.length===0?ns:Ut`<div class="effects" part="section effects">${t}</div>`}};ar.endpoints=Jl,ar.styles=[u,G,Oy`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}h2{text-transform:capitalize}.subtype{font-size:var(--roxy-text-sm)}.subtype-label{margin-inline-end:var(--roxy-space-sm)}.badge{font-weight:var(--roxy-weight-bold)}.severity-bar{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.35lh;inline-size:100%;overflow:hidden}.severity-fill{background:var(--roxy-warning);block-size:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.severity-fill[data-tier="3"]{background:var(--roxy-danger)}@media (prefers-reduced-motion:reduce){.severity-fill{transition:none}}h3{margin-block-end:var(--roxy-space-xs)}ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}.effects{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.effects p{font-size:var(--roxy-text-sm)}`],m([Gy({type:String,reflect:!0})],ar.prototype,"type",2),ar=m([f("roxy-dosha-card")],ar);import{css as Hy,html as De,nothing as mt}from"lit";var Fy=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function Pn(n){if(!n.text)return"";let a=n.chapter==null?"":String(n.chapter),e=n.verse??"",t=a;e&&(t=a?Fy.test(e.trim())?`${a}.${e}`:`${a}, ${e}`:e);let r=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[S(n.text),t].filter(Boolean).join(" "),r,n.basis].filter(Boolean).join(" · ")}import{css as By}from"lit";var rr=By`.row{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);display:grid}@container (width<=30rem){.row{grid-template-columns:minmax(0,1fr)}}`;var jy=["vata","pitta","kapha"],Ky={"lagna-sign":"Lagna","moon-sign":"Moon sign","strongest-planet":"Strongest graha"};function Vy(n){return n.split("-").map(A).join("-")}function qy(n,a){return qe(n,(a??"").split(" ").filter(Boolean).map(A))}var is=class extends y{renderData(a){let e=this.effectiveLang(),t=a.composite;return De`<article class="card" part="card" aria-labelledby="dosha-title"><header class="head" part="header"><h2 id="dosha-title">${this.t("Ayurvedic constitution")}</h2>${t?.type?De`<span class="type">${Vy(t.type)}</span>`:mt}</header>${this.renderBar(e,a)}<div class="facts" part="details">${t?.dominant?De`<span><span class="roxy-label">${this.t("Dominant")}</span><b>${A(t.dominant)}</b></span>`:mt} ${t?.secondary?De`<span><span class="roxy-label">${this.t("Secondary")}</span><b>${A(t.secondary)}</b></span>`:mt} ${a.lagnaSign?De`<span><span class="roxy-label">${this.t("Lagna")}</span><b>${A(a.lagnaSign)}</b></span>`:mt} ${a.moonSign?De`<span><span class="roxy-label">${this.t("Moon sign")}</span><b>${A(a.moonSign)}</b></span>`:mt}</div>${this.renderFactors(e,a.factors)} ${this.renderRanking(e,a.strengthRanking)} ${this.renderPlanetDoshas(a.planetDoshas)} ${a.summary&&!this.hideReadings?De`<p class="summary" part="section readings">${a.summary}</p>`:mt} ${X(e,a.frame,this.translator)} ${a.meta?.disclaimer?De`<p class="disclaimer" part="disclaimer">${a.meta.disclaimer}</p>`:mt}</article>`}renderBar(a,e){let t=e.composite,r=jy.map(i=>({humour:i,value:t?.[i]??0}));return r.reduce((i,o)=>i+o.value,0)<=0?mt:De`<div part="chart"><div class="bar" role="img" aria-label="${r.map(i=>`${A(i.humour)} ${we(a,i.value,0)}`).join(", ")}">${r.filter(i=>i.value>0).map(i=>De`<div class="${`seg seg-${i.humour}`}" style="${`flex: ${i.value} 0 0`}"></div>`)}</div><p class="shares">${r.map(i=>De`<span><span class="${`swatch seg-${i.humour}`}"></span>${A(i.humour)} <b>${we(a,i.value,0)}</b></span>`)}</p></div>`}renderFactors(a,e){let t=e??[];return t.length===0?mt:De`<section part="section factors"><h3>${this.t("Factors")}</h3><ul class="rows">${t.map(r=>De`<li class="row" part="label-track"><span class="roxy-label">${this.factorLabel(r.id)}</span><div><span>${qy(a,r.input)}</span> ${r.doshas?.length?De`· ${r.doshas.map(s=>A(s)).join(", ")}`:mt} ${typeof r.weight=="number"?De`· <span class="roxy-label">${this.t("Weight")}</span>${b(a,r.weight,2)}`:mt} ${this.renderCitation(r.source)}</div></li>`)}</ul></section>`}factorLabel(a){let e=Ky[a??""];return e?this.t(e):S(a??"")}renderCitation(a){let e=Pn(a??{});return e?De`<div class="cite"><p><span class="roxy-label">${this.t("Source")}</span>${e}</p>${a?.note?De`<details class="note"><summary>${this.t("Note on the source")}${H()}</summary><p>${a.note}</p></details>`:mt}</div>`:mt}renderRanking(a,e){let t=e??[];return t.length===0?mt:De`<section part="section ranking"><h3>${this.t("Shadbala")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Shadbala")}"><table><thead><tr><th>${this.t("Rank")}</th><th>${this.t("Graha")}</th><th>${this.t("Strength")}</th><th>${this.t("Strong")}</th></tr></thead><tbody>${t.map(r=>De`<tr class="${r.strong?"is-strong":""}"><td>${P(a,r.rank)}</td><td>${r.graha??""}</td><td>${this.t("{{value}} virupas",{value:b(a,r.totalVirupas,2)})}</td><td>${r.strong?this.t("Yes"):this.t("No")}</td></tr>`)}</tbody></table></div></section>`}renderPlanetDoshas(a){let e=a??[];return e.length===0?mt:De`<section part="section planet-humours"><h3>${this.t("Planetary humours")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Planetary humours")}"><table><thead><tr><th>${this.t("Graha")}</th><th>${this.t("Humours")}</th><th>${this.t("Dhatu")}</th></tr></thead><tbody>${e.map(t=>De`<tr><td>${t.graha??""}</td><td>${(t.doshas??[]).map(r=>A(r)).join(", ")}</td><td>${[t.dhatu,t.dhatuSanskrit].filter(Boolean).join(" · ")}</td></tr>`)}</tbody></table></div>${this.renderTableSources(e)}</section>`}renderTableSources(a){let e=new Set;for(let t of a)for(let r of[t.doshaSource,t.dhatuSource]){let s=Pn(r??{});s&&e.add(s)}return e.size===0?mt:De`<p class="cite"><span class="roxy-label">${this.t("Source")}</span>${[...e].join(" · ")}</p>`}};is.endpoints=Ql,is.styles=[u,G,M,rr,Hy`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.type{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold)}.bar{width:100%;min-width:0;border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);block-size:1lh;display:flex;overflow:hidden}.seg{min-width:0}.seg-vata{background:color-mix(in srgb, var(--roxy-info) 45%, var(--roxy-surface))}.seg-pitta{background:color-mix(in srgb, var(--roxy-danger) 45%, var(--roxy-surface))}.seg-kapha{background:color-mix(in srgb, var(--roxy-success) 45%, var(--roxy-surface))}.shares,.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.swatch{block-size:.5lh;inline-size:.5lh;border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.shares b,.facts b{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.facts .roxy-label,.row>div .roxy-label,.cite .roxy-label{margin-inline-end:var(--roxy-space-xs)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.cite{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2)}.cite .roxy-label{font-size:inherit}.cite .note summary{align-items:center;gap:var(--roxy-space-xs);width:fit-content;color:var(--roxy-secondary);display:flex}.cite .note p{margin-block-start:calc(var(--roxy-space-unit) / 2)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}tr.is-strong td{font-weight:var(--roxy-weight-bold)}.summary{font-size:var(--roxy-text-sm)}.disclaimer{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);padding-inline-start:var(--roxy-space-md)}`],is=m([f("roxy-dosha-constitution")],is);import{css as Yy,html as zi,nothing as jo}from"lit";var os=class extends y{renderData(a){return zi`<article class="card" part="card" aria-label="${a.name??this.t("Dream symbol")}"><header class="head" part="header">${a.letter?zi`<span class="letter" aria-hidden="true">${a.letter}</span>`:jo}<div><p class="roxy-label">${this.t("Dream symbol")}</p>${a.name?zi`<h2>${a.name}</h2>`:jo}</div></header>${a.meaning?zi`<p>${a.meaning}</p>`:jo}</article>`}};os.endpoints=ec,os.styles=[u,Yy`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);display:flex}.letter{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:2lh;inline-size:2lh;color:var(--roxy-accent-ink);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);text-transform:uppercase;flex:none;justify-content:center;align-items:center;display:inline-flex}`],os=m([f("roxy-dream-card")],os);import{css as Uy,html as Oi,nothing as Tp}from"lit";var ls=class extends y{constructor(){super(...arguments);this.rowDetail={tag:"roxy-dream-card",path:"dreams/symbols/{id}"};this.listKey="symbols"}renderData(e){let t=e.symbols??[];if(t.length===0)return this.renderEmpty();let r=typeof e.total=="number"?e.total:t.length;return Oi`<section class="wrap" part="card" aria-label="${this.t("Dream symbols")}"><header class="head" part="header"><h2>${this.t("Dream symbols")}</h2><span class="count">${r===1?this.t("1 symbol"):this.t("{{count}} symbols",{count:r})}</span></header><ul class="grid" part="section symbols">${t.map(s=>Oi`<li><button type="button" class="result" aria-pressed="${this.openedRowId===s.id?"true":"false"}" @click="${()=>this.pickRow({id:s.id,name:s.name,letter:s.letter})}">${s.letter?Oi`<span class="letter" aria-hidden="true">${s.letter}</span>`:Tp} <span class="name">${s.name}</span></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Oi`<div class="detail" part="detail">${this.openedRow}</div>`:Tp}</section>`}};ls.endpoints=tc,ls.styles=[u,Uy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.result{align-items:center;gap:var(--roxy-space-sm);width:100%;padding:var(--roxy-space-sm) var(--roxy-space-md);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;display:flex}.result[aria-pressed=true],.result:hover{border-color:var(--roxy-accent)}.result[aria-pressed=true] .name{color:var(--roxy-accent-ink)}.detail{margin-block-start:var(--roxy-space-md)}.letter{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);text-transform:uppercase;flex:none}.name{font-size:var(--roxy-text-sm)}`],ls=m([f("roxy-dream-search")],ls);import{css as ou,html as Z,nothing as tt}from"lit";import{property as Zt,state as ha}from"lit/decorators.js";import{ifDefined as ma}from"lit/directives/if-defined.js";import{live as lu}from"lit/directives/live.js";var Sa={afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Current year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",q:"Search",question:"Your question",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var Ep={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:!0}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:!0}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:!0}},"GET /crystals":{color:{path:"/crystals/colors",lang:!0},planet:{path:"/crystals/planets",lang:!0}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:!0}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:!0}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:!0}}},Dp={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var Ot=(n,a)=>`${n}.${a}`;function Ii(n){let a=/^(.+)\.(\d+)$/.exec(n);return a?{key:a[1],index:Number(a[2])}:null}function Fi(n,a=vo,e=t=>Sa[t]??S(t)){let t=Ii(n);return t?a("{{group}} {{n}}",{group:e(t.key),n:t.index+1}):a(S(n))}function Pp(n,a){let e=a.key??a.name;if(_p(e))return Ys(n,e);if(!a.label)return Ys(n,a.name);let t=Object.keys(Sa).find(r=>Sa[r]===a.label);return Lo(n,a.label)??(t?Ys(n,t):void 0)}function Mp(n,a,e){let t=Ot(a,0);return n.filter(r=>r.group===t).map(r=>({...r,key:`${Ot(a,e)}.${r.name}`,group:Ot(a,e)}))}function qo(n){return n.length<=(Bi(n)?30:12)?"tiles":"select"}function Bi(n){return n.every(a=>a.length<=2)}var Zy=["latitude","longitude","timezone"],Ap=["latitude","longitude"];function _p(n){let a=n.match(/^(.+?)(Latitude|Longitude)$/);return a?{group:a[1],leaf:a[2].toLowerCase()}:null}var Wy=Re.map(n=>n.toLowerCase());function cs(n,a){if(n){if("$ref"in n&&n.$ref){let e=n.$ref.split("/").pop();return e?a[e]:void 0}return n}}function Np(n){let a=n.anyOf??n.oneOf;return!a||a.length===0?n:a.find(e=>Array.isArray(e.enum))??a.find(e=>Vo(e)&&Vo(e)!=="null")??a[0]??n}function Vo(n){if(typeof n.type=="string")return n.type;if(!Array.isArray(n.type))return;let a=n.type.filter(e=>e!=="null");return a.length===1?a[0]:void 0}function Xy(n){let a=Np(n),e=Vo(a);return Array.isArray(a.enum)?qo(a.enum):e==="boolean"?"toggle":a.format==="date"?"date":a.format==="time"?"time":a.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function zp(n){if(n.length!==12)return!1;let a=new Set(n.map(e=>e.toLowerCase()));return Wy.every(e=>a.has(e))}function Gi(n,a,e){let t=Np(a);return{key:e.key,name:n,group:e.group,inQuery:e.inQuery,kind:Xy(a)??"text",required:e.required,description:t.description??a.description,enum:t.enum,min:t.minimum??t.exclusiveMinimum,max:t.maximum??t.exclusiveMaximum,default:a.default??t.default,example:a.example??t.example}}function Ko(n){return new Set([...n.required??[],...n["x-required-any-of"]?.[0]??[]])}function Op(n,a,e,t=n.requestBody?"POST":"GET"){let r=[],s=[],i=!1,o=n.requestBody?.content?.["application/json"]?.schema,l=cs(o,a),c=l?.["x-required-any-of"];if(l?.properties){let d=Ko(l);for(let[p,h]of Object.entries(l.properties)){let x=cs(h,a)??{},L=x.type==="array"?cs(x.items,a):void 0;if(L?.type==="object"&&L.properties){let v=Math.max(1,x.minItems??1),w=Ko(L);s.push({key:p,min:v,max:x.maxItems??v});for(let O=0;O<v;O++)for(let[te,We]of Object.entries(L.properties)){let Ma=cs(We,a)??{};r.push(Gi(te,Ma,{key:`${Ot(p,O)}.${te}`,group:Ot(p,O),required:d.has(p)&&w.has(te)}))}}else if(x.type==="object"&&x.properties){let v=Ko(x);for(let[w,O]of Object.entries(x.properties)){let te=cs(O,a)??{};te.type==="array"&&cs(te.items,a)?.type==="object"||r.push(Gi(w,te,{key:`${p}.${w}`,group:p,required:d.has(p)&&v.has(w)}))}}else{let v=_p(p),w=Gi(v?.leaf??p,x,{key:p,group:v?.group,required:d.has(p)});v&&(w.label=`${S(v.group)} ${v.leaf}`),r.push(w)}}}for(let d of n.parameters??[]){if(d.in!=="path"&&d.in!=="query")continue;if(d.name==="lang"&&d.in==="query"){i=!0;continue}let p=cs(d.schema,a)??{},h=Gi(d.name,p,{key:d.name,required:!!d.required,inQuery:d.in==="query"});if(d.in==="path"&&h.enum&&/^(id|identifier|slug)$/i.test(Sa[h.name]??S(h.name))){let x=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(d.description??h.description??"")?.[1]?.trim();x&&(h.label=x)}r.push(h)}for(let d of r)!d.group&&!d.label&&r.some(p=>p.group&&p.name===d.name)&&(d.label=Jy(d));return Yo({title:Qy(n.summary,e),fields:r,hasLang:i,...s.length>0?{repeats:s}:{},...c?{requiredAnyOf:c}:{}},t,e)}function Jy(n){let e=(Sa[n.name]??S(n.name)).toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^(\\p{L}+) ${e}\\b`,"iu").exec(n.description??"")?.[1];return t?Sa[t.toLowerCase()+n.name.replace(/^./,r=>r.toUpperCase())]:void 0}function Yo(n,a,e){let t=`${a.toUpperCase()} /${e.replace(/^\//,"")}`,r=Ep[t]??{},s=Dp[t]??{},i=n.fields.map(h=>{let x={...h};return delete x.role,delete x.city,delete x.viewerZone,delete x.moment,delete x.fold,{...x,...r[h.key]&&{source:r[h.key]},...s[h.key]&&{disabledWhen:s[h.key]}}}),o=[...new Set(i.map(h=>h.group))].map(h=>h===void 0?{}:{key:h,label:Fi(h)}),l=o.filter(h=>Ap.every(x=>i.some(L=>L.group===h.key&&L.name===x)));for(let[h,x]of l.entries()){let L=i.filter(w=>w.group===x.key),v=L.find(w=>w.name==="timezone")??(h===0?i.find(w=>!w.group&&w.name==="timezone"):void 0);x.location={fields:[...L.filter(w=>Ap.includes(w.name)).map(w=>w.key),...v?[v.key]:[]],required:L.some(w=>Zy.includes(w.name)&&w.required)}}for(let h of i)h.name==="seed"?h.role="seed":(h.name==="limit"||h.name==="offset")&&!h.required?h.role="hidden-default":l.some(x=>x.location?.fields.includes(h.key))?h.role="location":h.name==="timezone"&&(h.city=!0,!h.group&&!h.required&&(h.viewerZone=!0));let c=o.filter(h=>h.key!==void 0&&(h.location||i.some(x=>x.group===h.key&&x.required))),d=i.some(h=>!h.group&&!h.role&&h.required)||c.length>0||l.some(h=>h.key===void 0);for(let h of o)h.key!==void 0&&d&&!c.includes(h)&&(h.fold=!0);let p=h=>c.length>0&&h.default===void 0&&(h.kind==="date"||h.kind==="time"||h.kind==="datetime");for(let h of i)h.group?o.find(x=>x.key===h.group)?.fold&&(h.fold=!0):!h.role&&d&&!h.required?p(h)?h.moment=!0:h.fold=!0:!h.role&&!d&&h.default!==void 0&&(h.fold=!0);return{...n,fields:i,groups:o,opensOnLoad:eu(n,a)}}function Gp(n,a){let e=n.filter(t=>t.moment);return e.some(t=>t.kind==="time"||t.kind==="datetime")&&e.every(t=>a[t.key]===void 0||a[t.key]==="")}function Qy(n,a){let e=n?.split(" - ")[0]?.trim();return e||S(a.split("/").pop()??"")}function eu(n,a){return a.toUpperCase()==="GET"&&!n.fields.some(e=>e.required)}function Ip(n,a=[]){if(a.some(t=>t.name==="limit"||t.name==="offset"))return"Search";let e=n.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function Fp(n,a){let e=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist/schemas`;if(!a)return e;let t=new URL(a),r=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/.exec(t.pathname)?.[1];return t.hostname==="cdn.jsdelivr.net"||r===void 0?e:`${t.origin}${r}/schemas`}function Bp(n,a){let e=a.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${n.toLowerCase()}--${e}.json`}function tu(n){if(Array.isArray(n))return n;if(!n||typeof n!="object")return null;let a=Object.values(n),e=a.find(Array.isArray);return e||(a.find(r=>!!r&&typeof r=="object"&&Object.values(r).every(s=>typeof s=="number"))??null)}function Uo(n,a="id"){let e=tu(n);if(!e)return[];if(!Array.isArray(e)){let r=Object.keys(e),s=r.length>0&&r.every(o=>/^[a-z]$/.test(o));return(s?[..."abcdefghijklmnopqrstuvwxyz"]:r).map(o=>({value:o,label:s?o.toUpperCase():o,disabled:!e[o]}))}let t=[];for(let r of e){if(typeof r=="string"){t.push({value:r,label:r});continue}if(!r||typeof r!="object")continue;let s=r,i=s.id??s[a]??s.number;if(i==null)continue;let o=String(i),l=s.name??s.english;t.push({value:o,label:typeof l=="string"?l:o})}return t}function Hp(n){let a=n?.total;return typeof a=="number"?a:void 0}import{css as ru,html as cn,nothing as Zo}from"lit";import{ifDefined as Wo}from"lit/directives/if-defined.js";import{css as au}from"lit";var Hi=au`.spinner{inset-inline-end:calc(var(--roxy-space-unit) * 3);border:var(--roxy-line-thick) solid var(--roxy-muted);border-radius:var(--roxy-radius-full);border-top-color:#0000;block-size:.6lh;inline-size:.6lh;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;top:calc(100% + var(--roxy-space-xs));padding:var(--roxy-space-xs);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);box-shadow:var(--roxy-shadow-md);max-block-size:15lh;animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing);margin:0;list-style:none;position:absolute;left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm);inline-size:100%;min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm) var(--roxy-space-md);border-radius:var(--roxy-radius-sm);text-align:start;font-size:var(--roxy-text-sm);color:var(--roxy-fg);cursor:pointer;transition:background-color var(--roxy-motion-duration);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent) 10%, transparent)}.empty{padding:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`;function ji(n,a){let e,t=((...r)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,n(...r)},a)});return t.cancel=()=>{e&&(clearTimeout(e),e=void 0)},t}var su=10,nu=10,Xo=new Map;function jp(n,a,e={}){return{...n.limit?{limit:n.limit}:{},...n.lang&&a?{lang:a}:{},...e}}function Qo(n,a,e,t){let r=JSON.stringify([n.submitUrl??n.baseUrl,a.path,e,t]),s=Xo.get(r);return s||(s=iu(n,a,e,t).catch(i=>{throw Xo.delete(r),i}),Xo.set(r,s)),s}async function iu(n,a,e,t){let r=[];for(let s=0;s<nu;s++){let i=await Na(n,{path:a.path,method:"GET",query:jp(a,t,r.length?{offset:r.length}:{})}),o=Uo(i,e);r.push(...o);let l=Hp(i);if(!a.limit||l===void 0||r.length>=l||!o.length)break}return r}var Jo=n=>n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),Ki=class{constructor(a,e,t,r,s){this.host=a;this.source=e;this.field=t;this.context=r;this.onPick=s;this.query="";this.options=[];this.open=!1;this.highlight=-1;this.loading=!1;this.error=null;this.search=ji(a=>{this.searchServer(a)},250);a.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(a){this.query=a,this.error=null,this.source.search?a.trim().length<2?this.close():this.search(a):this.filter(a),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=!1,this.highlight=-1,this.host.requestUpdate()}pick(a){this.query=a.label,this.close(),this.onPick(a)}keydown(a){let e=this.options.length;if(a.key==="Escape"){this.close();return}if(a.key==="ArrowDown"&&!this.open){a.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(a.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(a.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(a.key==="Home")this.highlight=0;else if(a.key==="End")this.highlight=e-1;else if(a.key==="Enter"){let t=this.options[this.highlight]??this.options[0];t&&this.pick(t)}else return;a.preventDefault(),this.host.requestUpdate()}}async filter(a){let{route:e,lang:t}=this.context();this.loading=!0,this.host.requestUpdate();try{let r=await Qo(e,this.source,this.field,t);if(a!==this.query)return;let s=Jo(a.trim());this.show(r.filter(i=>Jo(i.label).includes(s)||Jo(i.value).includes(s)))}catch(r){this.fail(r)}finally{this.loading=!1,this.host.requestUpdate()}}async searchServer(a){let{route:e,lang:t}=this.context(),r=this.source.search;this.abort?.abort();let s=new AbortController;this.abort=s,this.loading=!0,this.host.requestUpdate();try{let i=await Na(e,{path:this.source.path,method:"GET",query:jp({...this.source,limit:su},t,{[r]:a})},s.signal);if(s.signal.aborted)return;this.show(Uo(i,this.field))}catch(i){if(s.signal.aborted)return;this.fail(i)}finally{this.abort===s&&(this.abort=void 0),s.signal.aborted||(this.loading=!1,this.host.requestUpdate())}}show(a){this.options=a,this.open=!0,this.highlight=a.length?0:-1}fail(a){this.options=[],this.open=!1,this.error=a instanceof Error?a.message:String(a)}};function Kp(n,a,e,t={}){let r=`${a}-listbox`;return cn`<div class="picker"><input id="${a}" type="text" role="combobox" aria-expanded="${n.open?"true":"false"}" aria-controls="${r}" aria-autocomplete="list" aria-labelledby="${Wo(t.labelledby)}" aria-describedby="${Wo(t.describedby)}" aria-invalid="${Wo(t.invalid?"true":void 0)}" aria-activedescendant="${n.open&&n.highlight>=0?`${a}-opt-${n.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${n.query}" @input="${s=>n.input(s.target.value)}" @keydown="${s=>n.keydown(s)}" @focus="${()=>n.focus()}" @blur="${()=>n.close()}"> ${n.loading?cn`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:Zo} ${n.open?cn`<ul id="${r}" class="results" role="listbox">${n.options.length===0?cn`<li class="empty" role="status">${e.empty}</li>`:n.options.map((s,i)=>cn`<li id="${`${a}-opt-${i}`}" class="option" role="option" aria-selected="${n.highlight===i?"true":"false"}" @mousedown="${o=>o.preventDefault()}" @click="${()=>n.pick(s)}">${s.label}</li>`)}</ul>`:Zo}</div>${n.error?cn`<small class="field-error" role="alert">${n.error}</small>`:Zo}`}var Vp=[Hi,ru`.picker{position:relative}`];var el="1.1.1";var qp="https://roxyapi.com/api/v2/openapi.json",cu=Fp(el,globalThis.document?.currentScript?.src||void 0),tl=new Map,Vi=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},qi=class extends Error{constructor(e,t){super(`Endpoint ${e} ${t} not found in OpenAPI spec`);this.method=e;this.path=t}};async function du(n){let a=tl.get(n);return a||(a=fetch(n).then(async e=>{if(!e.ok)throw new Vi(e.status);return await e.json()}).catch(e=>{throw tl.delete(n),e}),tl.set(n,a)),a}function pu(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var Yp=n=>/\bbirth/i.test(n?.description??""),Up=n=>n.key===`${n.group}.${n.name}`;function hu(n){let a=n.trim();if(!a)return[];try{let e=JSON.parse(a);if(Array.isArray(e))return e}catch{}return a.split(",").map(e=>e.trim()).filter(Boolean)}var pe=class extends _a{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=!1;this.fullPages=!1;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=!1;this.repeats=[];this.formTitle="";this.hasLang=!1;this.values={};this.loaded=!1;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||qp,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof Vi?this.t("HTTP error {{status}}",{status:e.status}):e instanceof qi?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(qp)}async modelFromSpec(e){let t=await du(e),r=`/${this.endpoint.replace(/^\//,"")}`,s=t.paths?.[r]?.[this.method.toLowerCase()];if(!s)throw new qi(this.method,r);return Op(s,t.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${cu}/${Bp(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Yo(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??!1,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang;let t={};for(let r of e.fields){let s=r.viewerZone?void 0:this.fullPages&&r.name==="limit"&&this.roleOf(r)==="hidden-default"?r.max??r.default:r.default;s!==void 0&&(t[r.key]=s);let i=r.group&&Up(r)?this.initialValues?.[r.group]?.[r.name]:this.initialValues?.[r.key];i!==void 0&&(t[r.key]=i)}this.values=this.withoutDisabled(t),this.loaded=!0,this.loadChoices(),this.autoload&&this.opensOnLoad&&wo(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let t of this.pickers.values())this.removeController(t);if(this.pickers.clear(),!wo(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let t of this.fields)if(t.source){if(t.required){let r=new Ki(this,t.source,t.name,e,s=>this.pickChoice(t,s.value));r.query=String(this.values[t.key]??""),this.pickers.set(t.key,r);continue}this.choices={...this.choices,[t.key]:"loading"},Qo(this.route,t.source,t.name,this.requestLang()).then(r=>{this.choices={...this.choices,[t.key]:r}},()=>{let{[t.key]:r,...s}=this.choices;this.choices=s})}}setValue(e,t){this.setValues({[e]:t})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let t=Object.keys(e).filter(r=>this.serverIssues?.some(s=>s.path===r));t.length&&(this.clearedIssues=new Set([...this.clearedIssues,...t]))}isDisabled(e,t=this.values){let r=e.disabledWhen;return!!r&&t[r.field]===r.value}withoutDisabled(e){for(let t of this.fields)this.isDisabled(t,e)&&(e[t.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let t=e.has("publishableKey")?Dr(this.publishableKey):void 0;t&&Us(this,t,{warn:!0})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(t=>t.path===e.key)}cityIssues(e){return this.liveIssues().filter(t=>{let r=this.fields.find(s=>s.key===t.path);return!!r&&this.roleOf(r)==="location"&&this.cityGroup(r)===e})}issuesForGroup(e){return this.liveIssues().filter(t=>t.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e)}`:this.fieldText(e)}issueLines(e){return e.map(t=>Z`<small part="field-error" class="field-error" role="alert">${t.message}</small>`)}fieldIssue(e){let t=this.issueFor(e);return t?Z`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${t.message}</small>`:tt}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return tt;let t=r=>{let s=this.fields.find(o=>o.key===r);if(s)return this.fieldLabel(s);let i=this.groupKeys().find(o=>o===r);return i?this.groupName(i):this.fieldText({name:r.split(".")[0]??r})};return Z`<div part="validation-error" class="validation-error" role="alert">${e.map(r=>Z`<div><strong>${t(r.path)}</strong> ${r.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(t=>t.key===e)?.location}cityGroup(e){return this.groups.find(t=>t.location?.fields.includes(e.key))?.key??e.group}placeField(e){let t=this.fields.filter(r=>r.group===e);return t.find(r=>r.name==="latitude")??t.find(r=>r.name==="timezone")}locationRequired(e){return this.groups.find(t=>t.key===e)?.location?.required??!1}get soleChoice(){if(this.groupKeys().some(r=>this.groupHasLocation(r))||this.groupKeys().some(r=>r!==void 0))return null;let e=this.fields.filter(r=>r.required&&this.isRendered(r)),t=e[0];return e.length!==1||!t?null:t.kind==="tiles"||t.kind==="select"||this.pickers.has(t.key)?t:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return!0;if(!this.opensOnLoad)return!1;let e=this.fields.filter(t=>this.isRendered(t));return e.length>0&&e.every(t=>this.isFilter(t))}choiceKind(e){let t=this.choicesOf(e).map(r=>r.value);return this.isFilter(e)&&!Bi(t)?"select":this.choices[e.key]?qo(t):e.kind}choicesOf(e){let t=this.choices[e.key];return Array.isArray(t)?t:(e.enum??[]).map(r=>({value:r,label:this.optionText(e.name,r)}))}effectiveSubmitLabel(){return this.submitLabel?this.submitLabel:Gp(this.fields,this.values)?this.t("Show right now"):this.t(Ip(this.endpoint,this.fields))}requestLang(){return Un(this)}fieldText(e){let t=this.requestLang();return e.label?Pp(t,e)??e.label:ae(t,e.name,Sa[e.name])}optionText(e,t){return I(this.requestLang(),e,t)}onLocationFor(e){return t=>{let r=this.groups.find(i=>i.key===e)?.location?.fields??[],s={};for(let i of r){let o=this.fields.find(l=>l.key===i)?.name;o&&(s[i]=t[o])}this.setValues(s)}}chooseOption(e,t){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===t?"":t),this.submit();return}this.pickChoice(e,t)}pickChoice(e,t){this.setValue(e.key,t),this.resend()}resend(){let e=this.soleChoice;e&&this.values[e.key]&&this.submit()}setFilter(e,t){let r={[e.key]:t};for(let s of this.fields)s!==e&&(this.isFilter(s)||this.opensOnLoad&&s.kind==="text"&&this.isRendered(s))&&(r[s.key]=void 0);this.setValues(r)}onTilesKeyDown(e){return t=>{let r=this.choicesOf(e).filter(d=>!d.disabled).map(d=>d.value);if(r.length===0)return;let s=r.indexOf(this.values[e.key]),i;if(t.key==="Home")i=0;else if(t.key==="End")i=r.length-1;else if(t.key==="ArrowRight"||t.key==="ArrowDown")i=s===-1?0:(s+1)%r.length;else if(t.key==="ArrowLeft"||t.key==="ArrowUp")i=s===-1?r.length-1:(s-1+r.length)%r.length;else return;t.preventDefault();let o=r[i];if(o===void 0)return;this.chooseOption(e,o);let l=t.currentTarget,c=this.choicesOf(e).findIndex(d=>d.value===o);requestAnimationFrame(()=>l.querySelector(`[data-tile='${c}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:!0,composed:!0}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(i=>i.path));let t={};for(let i of this.fields){let o=this.values[i.key];if(i.name==="seed"&&(o===void 0||o==="")&&(o=pu()),i.viewerZone&&(o===void 0||o==="")&&(o=wd()??i.default),o===void 0||o==="")continue;i.kind==="array"&&typeof o=="string"&&(o=hu(o));let l=i.group?Ii(i.group):null;if(l){let c=t[l.key]??[],d=c[l.index]??{};d[i.name]=o,c[l.index]=d,t[l.key]=c}else if(i.group&&Up(i)){let c=t[i.group]??{};c[i.name]=o,t[i.group]=c}else t[i.key]=o}let r=this.fields.filter(i=>i.inQuery).map(i=>i.name),s=this.requestLang();this.hasLang&&s&&(t.lang=s,r.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:t,queryKeys:r,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:!0,composed:!0}))}collectMissing(){let e=[],t=[],r=new Set;for(let s of this.fields){if(!s.required)continue;let i=this.roleOf(s)==="location";if(!this.isRendered(s)&&!i)continue;let o=this.values[s.key];if(!(o!==void 0&&o!=="")){if(e.push(s.key),i){r.add(this.cityGroup(s));continue}t.push(this.fieldLabel(s))}}for(let s of r)t.push(this.locationLabel(s));return{keys:e,labels:t}}get readsEnglish(){return Jc(this.effectiveLang())}renderTitle(){return this.readsEnglish?Z`<h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>`:tt}reqMark(e){return e.required?Z`<span class="req" aria-hidden="true">*</span>`:tt}description(e){if(!e.description||!this.readsEnglish)return tt;if(e.description.length<=120)return Z`<small part="hint" class="help">${e.description}</small>`;let t=e.description.split(". ")[0]??e.description;return Z`<details part="hint" class="help-details"><summary><span class="help-lead">${t}</span>${H()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let t=`roxy-form-${e.key}-label`,r=!!e.enum&&zp(e.enum),s=this.choicesOf(e),i=Bi(s.map(c=>c.value)),o=s.findIndex(c=>c.value===this.values[e.key]),l=o===-1?s.findIndex(c=>!c.disabled):o;return Z`<div class="field tiles-field"><span class="label" id="${t}">${this.fieldText(e)}${this.reqMark(e)}</span><div class="${i?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${t}" @keydown="${this.onTilesKeyDown(e)}">${s.map((c,d)=>{let p=this.values[e.key]===c.value,h=r?N(c.value):void 0;return Z`<button type="button" class="tile" role="radio" data-tile="${d}" aria-checked="${p?"true":"false"}" tabindex="${d===l?"0":"-1"}" ?disabled="${!!c.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,c.value)}">${h?Z`<span class="tile-glyph" aria-hidden="true">${h}</span>`:tt} <span class="tile-label">${c.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let t=`roxy-form-${e.key}`;return Z`<div part="field" class="field"><label for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label> <select id="${t}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${ma(this.issueFor(e)?"true":void 0)}" aria-describedby="${ma(this.issueFor(e)?`${t}-error`:void 0)}" .value="${lu(this.values[e.key]??"")}" @change="${r=>this.chooseOption(e,r.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(r=>Z`<option value="${r.value}" ?selected="${this.values[e.key]===r.value}" ?disabled="${!!r.disabled}">${r.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,t){let r=`roxy-form-${e.key}`,s=this.soleChoice?.key===e.key&&this.readsEnglish,i=this.issueFor(e);return Z`<div part="field" class="field">${s?tt:Z`<label for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label>`} ${Kp(t,r,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:s?"roxy-form-title":void 0,describedby:i?`${r}-error`:void 0,invalid:!!i})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let t=`roxy-form-${e.key}`,r=this.values[e.key]===!0;return Z`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${t}" class="toggle" role="switch" aria-checked="${r?"true":"false"}" @click="${()=>this.pickChoice(e,!r)}"><span class="knob"></span></button> <label class="toggle-label" for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let t=`roxy-form-${e.key}`,r=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,s=e.example!=null?String(e.example):"",i=e.kind==="array"?this.t("Comma separated"):this.readsEnglish||!new RegExp("\\p{L}","u").test(s)?s:"";return Z`<div part="field" class="field"><label for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label> <input id="${t}" type="${e.kind==="array"?"text":r}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${ma(this.issueFor(e)?"true":void 0)}" aria-describedby="${ma(this.issueFor(e)?`${t}-error`:void 0)}" min="${ma(e.min)}" max="${ma(e.max)}" step="${e.kind==="number"?"any":tt}" placeholder="${i||tt}" .value="${this.values[e.key]??""}" @input="${o=>{let l=this.coerce(e.kind,o.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,l):this.setValue(e.key,l)}}" @change="${()=>this.resend()}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let t=this.pickers.get(e.key);if(t)return this.renderPickerField(e,t);let r=this.choices[e.key];return r==="loading"?Z`<div class="field"><div class="roxy-skeleton field-skeleton" aria-label="${this.t("Loading")}" role="status"></div></div>`:r||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return Fi(e,(t,r)=>this.t(t,r),t=>this.fieldText({name:t}))}repeatCount(e){return new Set(this.fields.map(t=>t.group&&Ii(t.group)).filter(t=>t&&t.key===e).map(t=>t.index)).size}addRecord(e){let t=this.repeatCount(e),r=Mp(this.fields,e,t),s=this.groups.find(o=>o.key===Ot(e,0));if(s){let o=l=>l.replace(`${Ot(e,0)}.`,`${Ot(e,t)}.`);this.groups=[...this.groups,{...s,key:Ot(e,t),label:Fi(Ot(e,t)),...s.location&&{location:{...s.location,fields:s.location.fields.map(o)}}}]}let i={...this.values};for(let o of r)o.default!==void 0&&(i[o.key]=o.default);this.values=i,this.fields=[...this.fields,...r]}removeRecord(e){let t=Ot(e,this.repeatCount(e)-1);this.fields=this.fields.filter(s=>s.group!==t),this.groups=this.groups.filter(s=>s.key!==t);let r={...this.values};for(let s of Object.keys(r))s.startsWith(`${t}.`)&&delete r[s];this.values=r}repeatControls(e){let t=this.repeatCount(e.key);return e.max<=e.min?tt:Z`<div class="repeat-controls">${t<e.max?Z`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:tt} ${t>e.min?Z`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:tt}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):Yp(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return Z`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?Z`<span class="req" aria-hidden="true">*</span>`:tt}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return Z`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,t=>this.pickChoice(e,t.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,t){let r=e?this.t("{{group}} city",{group:this.groupName(e)}):Yp(this.placeField(e))?this.t("City of birth"):void 0;return Z`<roxy-location-search endpoint="${ma(this.locationUrl||void 0)}" publishable-key="${ma(this.publishableKey)}" .submitUrl="${this.route.submitUrl}" .submitContext="${this.route.submitContext}" lang="${ma(this.effectiveLang())}" placeholder="${ma(r)}" @roxy-location-select="${s=>t(s.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let t=this.fields.filter(r=>r.group===e&&this.isRendered(r));return Z`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):tt}<div class="fields">${t.map(r=>this.renderField(r))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return Z`<form><div class="roxy-skeleton form-skeleton"></div></form>`;if(this.specError)return Z`<div class="roxy-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=Dr(this.publishableKey);if(e)return Z`<form>${this.renderTitle()}<div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let t=this.fields.filter(d=>!d.group&&this.isRendered(d)),r=this.groupKeys().filter(d=>d!==void 0),s=t.filter(d=>!d.fold),i=t.filter(d=>d.fold),o=r.filter(d=>!this.groups.find(p=>p.key===d)?.fold),l=r.filter(d=>this.groups.find(p=>p.key===d)?.fold),c=i.length>0||l.length>0;return Z`<form @submit="${this.onSubmit}">${this.renderTitle()} ${this.validationErrors.length>0?Z`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:tt} ${this.renderIssueSummary()}<div class="fields">${s.map(d=>this.renderField(d))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):tt} ${o.map(d=>this.groupCard(d))} ${this.repeats.map(d=>this.repeatControls(d))} ${c?Z`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(d=>[...i.map(p=>p.key),...l].some(p=>d.path===p||d.path.startsWith(`${p}.`)))}"><summary>${this.t("Advanced")}${H()}</summary><div class="fields">${i.map(d=>this.renderField(d))}</div>${l.map(d=>this.groupCard(d))}</details>`:tt} ${this.selfSubmits?tt:Z`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,t){if(t!==""){if(e==="number"){let r=Number(t);return Number.isFinite(r)?r:void 0}return t}}};pe.styles=[u,M,Vp,ou`form{gap:var(--roxy-space-md);background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);padding:var(--roxy-space-lg);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{margin:0}.fields{align-items:start;gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(22ch,1fr));display:grid}.fields:empty{display:none}.person-group{gap:var(--roxy-space-md);min-inline-size:0;padding:var(--roxy-space-md) 0 0;border:0;border-block-start:1px solid var(--roxy-border);margin:0;display:grid}.person-group legend{float:inline-start;color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);padding:0}.field{gap:var(--roxy-space-xs);flex-direction:column;min-inline-size:0;display:flex}.fields>*{min-inline-size:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm);color:var(--roxy-secondary)}.req{color:var(--roxy-danger-fg);margin-inline-start:var(--roxy-space-xs)}input,select{inline-size:100%;min-inline-size:0;min-block-size:var(--roxy-touch)}.help{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.field-error{color:var(--roxy-danger-fg);font-size:var(--roxy-text-xs)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.help-details>summary{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-block-start:var(--roxy-space-xs);display:block}.location-block{gap:var(--roxy-space-xs);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(10ch,1fr));display:grid}.tiles.narrow{gap:var(--roxy-space-xs);grid-template-columns:repeat(auto-fill,minmax(4ch,1fr))}.tile{justify-content:center;align-items:center;gap:calc(var(--roxy-space-unit) / 2);min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-size:var(--roxy-text-sm);cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing), background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-direction:column;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent)}.tile:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.tile[aria-checked=true]{border-color:var(--roxy-accent);background:color-mix(in srgb, var(--roxy-accent) 12%, transparent);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.tile-glyph{font-size:var(--roxy-text-lg);line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm);display:flex}.toggle{box-sizing:content-box;block-size:.8lh;inline-size:1.6lh;padding:calc(var(--roxy-space-unit) / 2);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);background:var(--roxy-border);cursor:pointer;transition:background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0;display:inline-flex}.toggle[aria-checked=true]{background:var(--roxy-accent);border-color:var(--roxy-accent)}.toggle .knob{border-radius:var(--roxy-radius-full);background:var(--roxy-bg);block-size:.8lh;inline-size:.8lh;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.toggle[aria-checked=true] .knob{transform:translate(100%)}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.advanced>summary{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);display:flex}.advanced[open]>summary{margin-block-end:var(--roxy-space-md)}.repeat-controls{gap:var(--roxy-space-sm);display:flex}.repeat-btn{color:var(--roxy-accent-ink);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink)}.advanced .fields,.advanced .person-group{margin-block-start:var(--roxy-space-md)}.validation-error{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm);display:grid}button.submit{min-block-size:var(--roxy-touch);background:var(--roxy-accent-ink);color:var(--roxy-bg);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-sm) var(--roxy-space-lg);font-weight:var(--roxy-weight-bold);cursor:pointer;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.field-skeleton{block-size:var(--roxy-touch)}.form-skeleton{block-size:5lh}`],m([Zt({type:String,attribute:"data-endpoint"})],pe.prototype,"endpoint",2),m([Zt({type:String})],pe.prototype,"method",2),m([Zt({type:String,attribute:"spec-url"})],pe.prototype,"specUrl",2),m([Zt({type:String,attribute:"submit-label"})],pe.prototype,"submitLabel",2),m([Zt({type:String,attribute:"publishable-key"})],pe.prototype,"publishableKey",2),m([Zt({type:String,attribute:"location-url"})],pe.prototype,"locationUrl",2),m([Zt({attribute:!1})],pe.prototype,"initialValues",2),m([Zt({attribute:!1})],pe.prototype,"serverIssues",2),m([Zt({attribute:!1})],pe.prototype,"apiRoute",2),m([Zt({attribute:!1})],pe.prototype,"autoload",2),m([Zt({attribute:!1})],pe.prototype,"fullPages",2),m([ha()],pe.prototype,"choices",2),m([ha()],pe.prototype,"clearedIssues",2),m([ha()],pe.prototype,"fields",2),m([ha()],pe.prototype,"repeats",2),m([ha()],pe.prototype,"formTitle",2),m([ha()],pe.prototype,"hasLang",2),m([ha()],pe.prototype,"values",2),m([ha()],pe.prototype,"loaded",2),m([ha()],pe.prototype,"specError",2),m([ha()],pe.prototype,"validationErrors",2),pe=m([f("roxy-endpoint-form")],pe);import{css as mu,html as Ye,nothing as Mn}from"lit";import{property as gu}from"lit/decorators.js";var yu="12:00 UTC",sr=class extends y{constructor(){super(...arguments);this.heading="Ephemeris"}renderData(e){if(!e.days?.length)return this.renderEmpty();let t=this.toViewModel(e),r=this.effectiveLang();return Ye`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2><p class="month roxy-label"><span>${Xs(r,t.year,t.month)}</span><span>${yu}</span></p></header>${this.renderSignKey(t.signs)}<section part="section changes"><h3>${this.t("Sign changes and retrograde periods")}</h3><div role="list">${t.bodies.map(s=>this.renderTrack(s))}</div></section><section part="section daily"><h3>${this.t("Daily positions")}</h3><div class="scroll" part="table" tabindex="0" aria-label="${this.t("Daily positions")}">${this.renderGrid(t)}</div></section></div>`}renderSignKey(e){return e.length===0?Mn:Ye`<section part="section legend"><h3>${this.t("Signs in this month")}</h3><ul class="signkey" role="list">${e.map(t=>Ye`<li class="signkey-item"><span class="signkey-glyph" aria-hidden="true">${t.glyph}</span>${t.label}</li>`)}</ul></section>`}renderTrack(e){let t=$(e.name);return Ye`<div class="track" role="listitem"><span class="body-name">${t?Ye`<span class="glyph" aria-hidden="true">${t}</span>`:Mn}${e.label} </span><span class="span">${this.renderPosition(e.first)}<span class="arrow" aria-hidden="true">→</span>${this.renderPosition(e.last)} </span>${e.ingresses.length||e.retrogrades.length?Ye`<span class="chips roxy-chips">${e.ingresses.map(r=>this.renderIngressChip(r))} ${e.retrogrades.map(r=>this.renderRetrogradeChip(r))}</span>`:Mn}</div>`}renderPosition(e){let{degree:t,minute:r}=Co(e.degreeInSign),s=N(e.sign),i=g(e,"sign");return Ye`<span class="pos" title="${i}">${t}${s?Ye`<span class="sg" aria-hidden="true">${s}</span>`:Ye`<span class="sg">${i}</span>`}${String(r).padStart(2,"0")}</span>`}renderIngressChip(e){let t=N(e.sign),r=Mr(this.effectiveLang(),e.date);return Ye`<span class="roxy-chip chip--ingress" aria-label="${this.t("Enters {{sign}} on {{date}}",{sign:e.signLabel,date:r})}"><span aria-hidden="true">→</span>${t?Ye`<span aria-hidden="true">${t}</span>`:Mn}${e.signLabel} <span class="chip-date">${r}</span></span>`}renderRetrogradeChip(e){let t=vd(this.effectiveLang(),e.start,e.end);return Ye`<span class="roxy-chip chip--retro" data-tone="danger"><span aria-hidden="true">℞</span>${this.t("Retrograde {{range}}",{range:t})}</span>`}renderGrid(e){let t=this.effectiveLang();return Ye`<table><caption class="roxy-sr-only">${this.t("Every body with its position on each day of the month, as a zodiac sign and a degree.")}</caption><thead><tr><th scope="col" class="day">${this.t("Date")}</th>${e.bodies.map(r=>{let s=$(r.name);return Ye`<th scope="col" title="${r.label}">${s?Ye`<span class="glyph" aria-hidden="true">${s}</span><span class="roxy-sr-only">${r.label}</span>`:r.label}</th>`})}</tr></thead><tbody>${e.rows.map(r=>Ye`<tr><th scope="row" class="day">${Ld(t,r.date)}</th>${r.cells.map((s,i)=>this.renderCell(s,e.bodies[i],r.date))}</tr>`)}</tbody></table>`}renderCell(e,t,r){if(!e)return Ye`<td>—</td>`;let s=[e.isRetrograde?"retro":"",t?.ingressDates.has(r)?"ingress":"",t?.stationDates.has(r)?"station":""].filter(Boolean).join(" ");return Ye`<td class="${s}">${this.renderPosition(e)}${e.isRetrograde?Ye`<span class="retro-mark" aria-label="${this.t("retrograde")}">℞</span>`:Mn}</td>`}toViewModel(e){let t=[],r=new Map;for(let o of e.days)for(let l of o.positions){let c=r.get(l.planet);c||(c=[],r.set(l.planet,c),t.push(l.planet)),c.push({date:o.date,p:l})}let s=[];for(let o of t){let l=r.get(o),c=l?.[0],d=l?.[l.length-1];if(!l||!c||!d)continue;let p=[],h=[],x=new Set,L=new Set;for(let v=0;v<l.length;v++){let w=l[v],O=l[v-1];if(!w||(O&&w.p.sign!==O.p.sign&&(p.push({date:w.date,sign:w.p.sign,signLabel:g(w.p,"sign")}),x.add(w.date)),O&&w.p.isRetrograde!==O.p.isRetrograde&&L.add(w.date),!w.p.isRetrograde))continue;let te=h[h.length-1];te&&O?.p.isRetrograde?te.end=w.date:h.push({start:w.date,end:w.date})}s.push({name:o,label:g(d.p,"planet"),first:c.p,last:d.p,ingresses:p,retrogrades:h,ingressDates:x,stationDates:L})}let i=e.days.map(o=>{let l=new Map(o.positions.map(c=>[c.planet,c]));return{date:o.date,cells:s.map(c=>l.get(c.name))}});return{year:e.year,month:e.month,bodies:s,rows:i,signs:this.toSignKey(e)}}toSignKey(e){let t=new Map;for(let s of e.days)for(let i of s.positions){let o=String(i.sign??"").toLowerCase();o&&!t.has(o)&&t.set(o,g(i,"sign"))}let r=[];for(let s of Re){let i=t.get(s.toLowerCase()),o=N(s);i&&o&&r.push({sign:s,label:i,glyph:o})}return r}};sr.endpoints=ac,sr.styles=[u,mu`:host{overflow-x:clip}.wrap{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap>*{min-width:0}h2,h3,p{margin:0}header,section{gap:var(--roxy-space-sm);display:grid}.month{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.signkey{gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.signkey-item{align-items:baseline;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);white-space:nowrap;display:inline-flex}.signkey-glyph{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}.track{align-items:center;gap:var(--roxy-space-xs) var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.body-name{align-items:baseline;gap:var(--roxy-space-xs);min-inline-size:16ch;font-weight:var(--roxy-weight-bold);display:inline-flex}.body-name .glyph{color:var(--roxy-accent-ink)}.span{align-items:baseline;gap:var(--roxy-space-xs);color:var(--roxy-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;display:inline-flex}.arrow{color:var(--roxy-muted)}.chips{margin-inline-start:auto}.chip-date{color:var(--roxy-muted)}.scroll{min-width:0;overflow-x:auto}table{font-size:var(--roxy-text-xs)}:is(th,td){white-space:nowrap}thead th .glyph{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}th.day{z-index:1;background:var(--roxy-bg);color:var(--roxy-fg);border-inline-end:1px solid var(--roxy-border);position:sticky;left:0}thead th.day{z-index:2}.sg{margin-inline:calc(var(--roxy-space-unit) / 2);color:var(--roxy-secondary);font-variant-numeric:normal}.retro-mark{font-weight:var(--roxy-weight-bold);margin-inline-start:calc(var(--roxy-space-unit) / 2)}td.retro,td.retro .sg{color:var(--roxy-danger-fg)}td.ingress{box-shadow:inset var(--roxy-line-thick) 0 var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}td.station{border-block-start:var(--roxy-line-thick) solid var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}`],m([gu({type:String})],sr.prototype,"heading",2),sr=m([f("roxy-ephemeris-table")],sr);import{css as uu,html as Wt,nothing as _n}from"lit";var ds=class extends y{renderData(a){let e=a.conjunctions??[],t=a.stars??[];return Wt`<div class="wrap" part="card"><header part="header"><h2>${this.t("Fixed stars")}</h2>${typeof a.orb=="number"?Wt`<p class="roxy-label">${this.t("Orb")} ${b(this.effectiveLang(),a.orb,1)}°</p>`:_n}</header>${a.summary&&!this.hideReadings?Wt`<p class="summary">${a.summary}</p>`:_n} ${e.length?Wt`<section part="section conjunctions"><h3>${this.t("Conjunctions to the chart")}</h3>${e.map((r,s)=>Wt`<details class="interp-card" part="reading" name="fixed-star-contacts" ?open="${s===0}"><summary><span class="interp-lead">${this.t("{{point}} conjunct {{star}}",{point:g(r,"point"),star:r.star})}</span> ${H()} <span class="interp-aside"><small>${this.t("orb {{value}}°",{value:b(this.effectiveLang(),r.orb,2)})}</small></span></summary>${r.interpretation&&!this.hideReadings?Wt`<div class="interp-body"><p>${r.interpretation}</p></div>`:_n}</details>`)}</section>`:Wt`<p class="empty-note">${this.t("No star sits within the orb of a natal point.")}</p>`} ${t.length?this.renderCatalog(t):_n}</div>`}renderCatalog(a){return Wt`<details class="catalog"><summary>${H()} ${this.t("Star catalog ({{count}})",{count:a.length})}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Precessed positions for the chart date")}"><table><caption class="roxy-label">${this.t("Precessed positions for the chart date")}</caption><thead><tr><th scope="col">${this.t("Star")}</th><th scope="col">${this.t("Position")}</th><th scope="col" class="num">${this.t("Mag")}</th><th scope="col">${this.t("Nature")}</th><th scope="col">${this.t("Keywords")}</th></tr></thead><tbody>${a.map(e=>{let t=N(e.sign);return Wt`<tr><td>${e.name}</td><td>${t?Wt`<span class="sg">${t}</span>`:_n}${Kt(e.degree)} ${e.sign}</td><td class="num">${b(this.effectiveLang(),e.magnitude,1)}</td><td>${e.nature}</td><td><ul class="kw roxy-chips">${(e.keywords??[]).map(r=>Wt`<li>${r}</li>`)}</ul></td></tr>`})}</tbody></table></div></details>`}};ds.endpoints=rc,ds.styles=[u,M,j,uu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}.summary{font-size:var(--roxy-text-sm)}.empty-note{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}section>h3{margin-block-end:var(--roxy-space-sm)}.interp-lead .point{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.interp-aside small{font-variant-numeric:tabular-nums}.catalog summary{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);display:flex}.scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}table{width:100%}caption{caption-side:top;text-align:start;padding-block-end:var(--roxy-space-xs)}:is(th,td){white-space:nowrap}:is(th,td).num{text-align:end}.sg{color:var(--roxy-secondary);margin-inline-end:var(--roxy-space-xs)}.kw{max-inline-size:32ch}`],ds=m([f("roxy-fixed-stars")],ds);import{css as xu,html as se,nothing as he}from"lit";import{property as bu}from"lit/decorators.js";var Yi=["Southeast","South","Southwest","East","Center","West","Northeast","North","Northwest"];import{css as fu}from"lit";var Ui=fu`.plate-heading{font-size:var(--roxy-text-xs);color:var(--roxy-muted);font-weight:var(--roxy-weight-bold);hyphens:manual}@container (width<=30rem){.plate-heading{font-size:calc(var(--roxy-text-xs) / var(--roxy-text-scale) / var(--roxy-text-scale))}}`;var Zi={forward:"Forward",reverse:"Backward"};function ps(n){return"mountainCenterStar"in n}var nr=class extends y{constructor(){super(...arguments);this.mode="natal"}renderData(e){let t=this.effectiveLang(),r=this.mode!=="annual"&&ps(e);return se`<article class="card" part="card" aria-labelledby="flying-star-title"><header class="head" part="header"><h2 class="title" id="flying-star-title">${this.t("Flying star chart")}</h2>${ps(e)?r?se`<span class="period">${this.t("Period {{n}}",{n:P(t,e.period??0)})}</span>`:he:se`<span class="period">${e.year??""}</span>`}</header>${ps(e)?r?this.renderNatalFacts(e,t):he:this.renderAnnualFacts(e,t)}<div class="plate" part="chart plate" role="group" aria-label="${this.t("Flying star chart")}">${Yi.map(s=>this.renderPalace(e,s))}</div>${r?se`<div class="legend" part="legend"><span><span class="swatch swatch-mountain"></span>${this.t("Mountain star")}</span> <span><span class="swatch swatch-water"></span>${this.t("Water star")}</span> <span>${this.t("Period star")}</span></div>`:he} ${r&&ps(e)?this.renderStructure(e):he} ${this.renderPalaceRows(e)}</article>`}renderNatalFacts(e,t){return se`<div class="facts" part="details">${e.facing?se`<span><span class="roxy-label">${this.t("Facing")}</span> <b>${I(t,"facing",e.facing.label??"")}</b></span>`:he} ${e.sitting?se`<span><span class="roxy-label">${this.t("Sitting")}</span> <b>${I(t,"facing",e.sitting.label??"")}</b></span>`:he} ${typeof e.facingDegrees=="number"?se`<span>${P(t,e.facingDegrees)}°</span>`:he} ${e.mountainFlight?se`<span><span class="roxy-label">${this.t("Mountain star")}</span> ${Zi[e.mountainFlight]?this.t(Zi[e.mountainFlight]):e.mountainFlight}</span>`:he} ${e.waterFlight?se`<span><span class="roxy-label">${this.t("Water star")}</span> ${Zi[e.waterFlight]?this.t(Zi[e.waterFlight]):e.waterFlight}</span>`:he} ${e.straddling?se`<span><b>${this.t("Straddling")}</b></span>`:he}</div>`}renderAnnualFacts(e,t){return!e.changeoverDate&&typeof e.centerStar!="number"?he:se`<div class="facts" part="details">${typeof e.centerStar=="number"?se`<span><span class="roxy-label">${this.t("Center")}</span> <b>${P(t,e.centerStar)}</b></span>`:he} ${e.changeoverDate?se`<span>${R(t,e.changeoverDate)}</span>`:he}</div>`}paletteHeading(e,t){return t==="Center"?this.t("Center"):I(e,"facing",t)}renderPalace(e,t){let r=this.effectiveLang(),s=this.paletteHeading(r,t),i=(e.palaces??[]).find(d=>d.palace===t),o=this.mode!=="annual"&&ps(e);if(!i)return se`<div class="palace"><span class="palace-name plate-heading">${s}</span></div>`;let l=t==="Center";if(o&&ps(e)){let d=i;return se`<div class="palace ${l?"palace-center":""}"><span class="mountain" title="${this.t("Mountain star")}">${d.mountain??""}</span> <span class="water" title="${this.t("Water star")}">${d.water??""}</span> <span class="star" title="${this.t("Period star")}">${d.period??""}</span> <span class="palace-name plate-heading">${s}</span> ${d.combination?se`<span class="combo">${g(d.combination,"name")}</span>`:he}</div>`}let c=i;return se`<div class="palace ${l?"palace-center":""}"><span class="star">${c.star??""}</span> <span class="palace-name plate-heading">${s}</span> <span class="combo">${g(c,"name")}</span></div>`}renderStructure(e){let t=e.structure;return t?.name?se`<section part="section structure"><h3 class="block-title">${t.name}</h3>${t.meaning&&!this.hideReadings?se`<p class="structure" part="reading">${t.meaning}</p>`:he}</section>`:he}renderPalaceRows(e){let t=e.palaces??[];if(t.length===0)return he;let r=this.effectiveLang(),s=this.mode!=="annual"&&ps(e),i=t.map(o=>{let l=this.paletteHeading(r,o.palace??"");if(s){let d=o;return!d.reading&&!d.combination?he:se`<li class="row" part="label-track"><span class="roxy-label">${l}</span><div class="row-body">${d.combination?se`<span>${g(d.combination,"name")}</span>`:he} ${d.reading&&!this.hideReadings?se`<p part="reading">${d.reading}</p>`:he}</div></li>`}let c=o;return se`<li class="row" part="label-track"><span class="roxy-label">${l}</span><div class="row-body"><span>${g(c,"name")}</span> ${c.element?se`<span class="element-word ${bt(c.element)}">${g(c,"element")}</span>`:he}<dl class="star-facts">${c.nature?se`<div><dt>${this.t("Nature")}</dt><dd>${c.nature==="auspicious"?this.t("Favourable"):c.nature==="inauspicious"?this.t("Unfavourable"):c.nature}</dd></div>`:he} ${c.enhancer?se`<div><dt>${this.t("Enhancer")}</dt><dd>${c.enhancer}</dd></div>`:he} ${c.remedy?se`<div><dt>${this.t("Remedy")}</dt><dd>${c.remedy}</dd></div>`:he}</dl>${c.meaning&&!this.hideReadings?se`<p part="reading">${c.meaning}</p>`:he}</div></li>`});return i.every(o=>o===he)?he:se`<section part="section palaces"><ul class="rows">${i}</ul></section>`}};nr.endpoints=sc,nr.styles=[u,ca,Ui,rr,xu`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.period{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.plate{background:var(--roxy-border);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.palace{align-content:start;gap:calc(var(--roxy-space-unit) / 2);min-block-size:3.5lh;padding:var(--roxy-space-sm);background:var(--roxy-surface);grid-template-columns:1fr 1fr;display:grid}.palace-center{background:color-mix(in srgb, var(--roxy-accent) 8%, var(--roxy-surface))}.mountain,.water{font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.mountain{color:var(--roxy-info-fg);text-align:start}.water{color:var(--roxy-accent-ink);text-align:end}.star,.palace-name,.combo{text-align:center;grid-column:1/-1}.star{font-size:calc(var(--roxy-text-base) * 1.75);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.combo{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-mountain{background:var(--roxy-info)}.swatch-water{background:var(--roxy-accent)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.row-body p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}.star-facts{gap:var(--roxy-space-xs) var(--roxy-space-md);margin:var(--roxy-space-xs) 0 0;font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.star-facts div{gap:var(--roxy-space-xs);display:flex}.star-facts dt{color:var(--roxy-secondary);font-size:inherit}.star-facts dd{margin:0}.structure{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);border-block-start:0;margin:0}`],m([bu({type:String,reflect:!0})],nr.prototype,"mode",2),nr=m([f("roxy-flying-star-chart")],nr);import{css as vu,html as ir,nothing as Zp}from"lit";var hs=class extends y{renderData(a){let e=a.windows??[];if(e.length===0)return this.renderEmpty();let t=xt(this.effectiveLang(),a.startDate,a.endDate);return ir`<div class="wrap" part="card" aria-label="${this.t("Forecast digest")}"><div class="head" part="header"><h2>${this.t("Forecast digest")}</h2>${t?ir`<p class="subtitle">${t}</p>`:Zp}</div>${e.map(r=>this.renderWindow(r))}</div>`}windowLabel(a){return a===1?this.t("Next 24 hours"):typeof a=="number"?this.t("Next {{count}} days",{count:a}):this.t("Window")}renderWindow(a){let e=[...a.top??[]].sort((s,i)=>(i.significance??0)-(s.significance??0)),t=a.byDomain??{},r=Object.entries(t);return ir`<section class="window" part="section window"><div class="window-head" part="details"><h3>${this.windowLabel(a.days)}</h3><span class="window-count">${this.t("{{count}} events",{count:a.count??0})}</span></div>${r.length>0?ir`<div class="domains" part="legend">${r.map(([s,i])=>ir`<span class="domain-chip"><span class="swatch sw-${s}"></span>${S(s)} ${i}</span>`)}</div>`:Zp} ${e.length>0?ir`<div role="list">${e.map(s=>this.renderEvent(s))}</div>`:ir`<p class="quiet">${this.t("No notable events.")}</p>`}</section>`}renderEvent(a){let e=typeof a.significance=="number"?a.significance:0,t=this.hideReadings||a.description==null?S(a.type??""):a.description;return ir`<div class="event" part="label-track" role="listitem"><span class="event-date">${R(this.effectiveLang(),a.date)}</span> <span class="event-desc">${t}</span> <span class="sig" role="img" aria-label="${this.t("significance {{value}} of 100",{value:b(this.effectiveLang(),e,0)})}"><span class="sig-fill ${a.domain}" style="width:${Math.max(0,Math.min(100,e))}%"></span></span></div>`}};hs.endpoints=nc,hs.styles=[u,vu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.window{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.window:first-of-type{border-block-start:0;padding-block-start:0}.window-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.window-count{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.domains{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.domain-chip{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:inline-flex}.swatch{border-radius:var(--roxy-radius-sm);block-size:.6lh;inline-size:.6lh;display:inline-block}.sw-western,.sig-fill.western{background:var(--roxy-accent)}.sw-vedic,.sig-fill.vedic{background:var(--roxy-info)}.sw-biorhythm,.sig-fill.biorhythm{background:var(--roxy-success)}.event{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);display:grid}.event-date{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.event-desc{font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-tight)}.sig{block-size:calc(var(--roxy-line-thick) * 2);border-radius:var(--roxy-radius-full);background:var(--roxy-border);grid-column:2;overflow:hidden}.sig-fill{height:100%;display:block}.quiet{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-style:italic}`],hs=m([f("roxy-forecast-digest")],hs);import{css as Lu,html as At,nothing as Nn}from"lit";var $u={western:"Western",vedic:"Vedic",biorhythm:"Biorhythm"},wu=["western","vedic","biorhythm"],ms=class extends y{renderData(a){let e=a.events??[],t=this.groupByDate(e),r=wu.filter(s=>e.some(i=>i.domain===s));return At`<div class="wrap" part="card" aria-label="${this.t("Forecast timeline")}"><header class="head" part="header"><h2>${this.t("Forecast timeline")}</h2>${a.startDate&&a.endDate?At`<div class="range">${xt(this.effectiveLang(),a.startDate,a.endDate)} · ${this.t("{{count}} events",{count:a.count??e.length})}</div>`:Nn}</header>${r.length?At`<div class="legend" part="legend">${r.map(s=>At`<span><span class="swatch swatch-${s}"></span>${$u[s]}</span>`)}</div>`:Nn} ${t.length?At`<div class="days" part="section events" role="list">${t.map(([s,i])=>this.renderDay(s,i))}</div>`:At`<p class="roxy-empty" role="status">${this.t("No events in this window")}</p>`}</div>`}groupByDate(a){let e=new Map;for(let t of a){let r=t.date??"",s=e.get(r)??[];s.push(t),e.set(r,s)}return[...e.entries()]}renderDay(a,e){return At`<div class="day" role="listitem"><div class="day-date">${R(this.effectiveLang(),a)}</div><div class="events">${e.map(t=>this.renderEvent(t))}</div></div>`}renderEvent(a){let e=typeof a.significance=="number"?a.significance:0,t=Math.max(0,Math.min(100,e));return At`<div class="event"><span class="dot dot-${a.domain}" aria-hidden="true"></span><div class="event-body"><div class="event-line">${this.renderHeadline(a)}</div>${a.description&&!this.hideReadings?At`<p class="event-desc">${a.description}</p>`:Nn}<div class="sig" title="${this.t("significance {{value}} of 100",{value:t})}"><span class="sig-track"><span class="sig-fill sig-fill-${a.domain}" style="width:${t}%"></span> </span><span class="sig-val">${t}</span></div></div></div>`}renderHeadline(a){let e=a.body?S(a.body):"",t=a.target?S(a.target):"",r=Ct({type:a.aspect}),s=r?tn(a.aspect)??Me({type:a.aspect}):"",i=typeof a.orb=="number"?b(this.effectiveLang(),a.orb,1):"",o=this.typeQualifier(a);return r&&t?At`<strong>${e}</strong> <span class="${Je({type:a.aspect})}">${s}</span> <strong>${t}</strong>${i?At`<span class="kind">${this.t("orb {{value}}°",{value:i})}</span>`:Nn}`:At`<strong>${e||S(a.type??"")}</strong>${o?At`<span class="kind">${o}</span>`:Nn}`}typeQualifier(a){return a.type==="sign-ingress"&&a.target?`enters ${S(a.target)}`:a.type==="retrograde-station"&&a.station?a.station:a.type==="eclipse"?[a.kind,"eclipse"].filter(Boolean).join(" "):a.type==="critical-day"?"critical day":a.type==="dasha-change"&&a.target?`dasha ${S(a.target)}`:S(a.type??"")}};ms.endpoints=ic,ms.styles=[u,va,Lu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.range{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.legend{gap:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.legend .swatch{block-size:.6lh;inline-size:.6lh;border-radius:var(--roxy-radius-full);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-western,.dot-western,.sig-fill-western{background:var(--roxy-accent)}.swatch-vedic,.dot-vedic,.sig-fill-vedic{background:var(--roxy-info)}.swatch-biorhythm,.dot-biorhythm,.sig-fill-biorhythm{background:var(--roxy-success)}.day{gap:var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);grid-template-columns:9ch minmax(0,1fr);display:grid}.day:first-of-type{border-block-start:0}@container (width<=30rem){.day{grid-template-columns:minmax(0,1fr)}}.day-date{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;padding-block-start:calc(var(--roxy-space-unit) / 2)}.events{gap:var(--roxy-space-sm);display:grid}.event{align-items:start;gap:var(--roxy-space-sm);grid-template-columns:.4lh minmax(0,1fr);display:grid}.dot{block-size:.4lh;inline-size:.4lh;border-radius:var(--roxy-radius-full);margin-block-start:var(--roxy-space-xs)}.event-body{min-width:0}.event-line{font-size:var(--roxy-text-sm)}.event-line .kind{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.event-desc{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2)}.sig{align-items:center;gap:var(--roxy-space-xs);margin-block-start:var(--roxy-space-xs);display:flex}.sig-track{max-inline-size:16ch;block-size:calc(var(--roxy-line-thick) * 2);border-radius:var(--roxy-radius-full);background:var(--roxy-border);flex:1;overflow:hidden}.sig-fill{height:100%;display:block}.sig-val{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],ms=m([f("roxy-forecast-timeline")],ms);import{css as ku,html as Q,nothing as Ae}from"lit";import{ifDefined as Su}from"lit/directives/if-defined.js";var gs=class extends y{renderData(a){let e=this.effectiveLang(),t=a.chosen,r=a.input?.text??a.input?.textHebrew??"";return Q`<article class="card" part="card" aria-labelledby="gematria-title"><header class="head" part="header"><h2 id="gematria-title">${r?`${this.t("Gematria")} · ${r}`:this.t("Gematria")}</h2>${t?.hebrew?Q`<span class="hebrew" lang="he" dir="rtl">${t.hebrew}</span>`:Ae} ${this.chosenForm(a)?.romanization?Q`<span class="roman">${this.chosenForm(a)?.romanization}</span>`:Ae} ${t?.rule?Q`<p class="rule">${t.rule}</p>`:Ae}</header>${this.renderLetters(e,this.chosenForm(a)?.letters)} ${this.renderValues(e,a.values,this.t("Cipher values"))} ${this.renderForms(e,a)} ${this.renderTransformations(e,a.transformations)} ${this.renderLatin(e,a.latinValues)} ${this.renderMatches(e,a.matches)} ${this.renderConventions(a.conventions)}</article>`}chosenForm(a){let e=a.hebrewForms??[];return e.find(t=>t.hebrew===a.chosen?.hebrew)??e[0]}renderLetters(a,e){let t=e??[];return t.length===0?Ae:Q`<section part="section letters"><h3>${this.t("Letters")}</h3><div class="letters" part="chart" dir="rtl">${t.map(r=>Q`<div class="${`letter${r.isFinal?" is-final":""}`}" dir="ltr" title="${Su(r.isFinal?this.t("Final form"):void 0)}"><span class="glyph" lang="he">${r.glyph??""}</span> <span class="name">${r.name??""}</span> <span class="num">${P(a,r.value)}</span></div>`)}</div>${t.some(r=>r.isFinal)?Q`<p class="legend" part="legend"><span class="swatch"></span>${this.t("Final form")}</p>`:Ae}</section>`}renderValues(a,e,t){let r=(e??[]).filter(i=>typeof i.value=="number");if(r.length===0)return Ae;let s=r.some(i=>(i.alternateValues??[]).length>0);return Q`<section part="section values"><h3>${t}</h3><div class="scroll" tabindex="0" role="region" aria-label="${t}"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th>${s?Q`<th>${this.t("Also published")}</th>`:Ae}</tr></thead><tbody>${r.map(i=>Q`<tr><td>${S(i.id??"")}</td><td class="num">${P(a,i.value)}</td>${s?Q`<td class="num">${(i.alternateValues??[]).map(o=>P(a,o)).join(", ")}</td>`:Ae}</tr>`)}</tbody></table></div>${this.renderProvenance(r)}</section>`}renderProvenance(a){let e=new Map;for(let t of a)t.tradition&&!e.has(t.tradition)&&e.set(t.tradition,t.source);return e.size===0?Ae:Q`<p class="provenance"><span class="roxy-label">${this.t("Tradition")}</span> ${[...e].map(([t,r],s)=>Q`${s>0?" · ":""}${S(t)}${r?Q`<a class="src" href="${r}" target="_blank" rel="noopener noreferrer">${this.t("Source")}</a>`:Ae}`)}</p>`}renderForms(a,e){let t=e.hebrewForms??[];return t.length<2?Ae:Q`<section part="section spellings"><h3>${this.t("Spellings")}</h3><ul class="forms">${t.map(r=>Q`<li class="form"><div><span class="hebrew" lang="he" dir="rtl">${r.hebrew??""}</span> ${r.hebrew===e.chosen?.hebrew?Q`<span class="chosen roxy-chip" data-tone="success">${this.t("Chosen")}</span>`:Ae}</div><span class="roman">${r.romanization??""}</span> ${r.rule?Q`<p class="rule">${r.rule}</p>`:Ae} ${this.renderFormTotals(a,r)}</li>`)}</ul></section>`}renderFormTotals(a,e){let t=(e.values??[]).find(r=>typeof r.value=="number");return t?Q`<p class="rule"><span class="roxy-label">${S(t.id??"")}</span> ${P(a,t.value)}</p>`:Ae}renderTransformations(a,e){let t=e??[];return t.length===0?Ae:Q`<section part="section substitutions"><h3>${this.t("Substitutions")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Substitutions")}"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Output")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(r=>Q`<tr><td>${S(r.id??"")}</td><td>${r.output?Q`<span lang="he" dir="rtl">${r.output}</span>`:Ae} ${r.outputRomanization?Q`<span class="roman">${r.outputRomanization}</span>`:Ae}</td><td class="num">${P(a,r.value)}</td></tr>`)}</tbody></table></div></section>`}renderLatin(a,e){let t=e??[];return t.length===0?Ae:Q`<section part="section latin-ciphers"><h3>${this.t("Latin ciphers")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Latin ciphers")}"><table class="stacked"><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th><th>${this.t("Tradition")}</th></tr></thead><tbody>${t.map(r=>Q`<tr><td data-label="${this.t("Cipher")}">${S(r.id??"")} ${r.lineage?Q`<p class="lineage">${r.lineage}</p>`:Ae}</td><td class="num" data-label="${this.t("Value")}">${P(a,r.value)}</td><td data-label="${this.t("Tradition")}">${S(r.tradition??"")}</td></tr>`)}</tbody></table></div></section>`}renderMatches(a,e){let t=e??[];return t.length===0?Ae:Q`<section part="section matches"><h3>${this.t("Equal values")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Equal values")}"><table class="stacked"><thead><tr><th>${this.t("Word")}</th><th>${this.t("Meaning")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(r=>Q`<tr><td data-label="${this.t("Word")}"><span lang="he" dir="rtl">${r.hebrew??""}</span> <span class="roman">${r.romanization??""}</span></td><td data-label="${this.t("Meaning")}">${r.meaning??""} ${r.note&&!this.hideReadings?Q`<p class="match-note" part="reading">${r.note}</p>`:Ae}</td><td class="num" data-label="${this.t("Value")}">${P(a,r.value)}</td></tr>`)}</tbody></table></div></section>`}renderConventions(a){let e=this.effectiveLang(),t=[];for(let r of["transliteration","misparGadol"]){let s=a?.[r];s&&t.push([ae(e,r),I(e,r,s)])}return t.length===0?Ae:Q`<p class="provenance">${t.map(([r,s],i)=>Q`${i>0?" · ":""}<span class="roxy-label">${r}</span>${s}`)}</p>`}};gs.endpoints=oc,gs.styles=[u,er,ku`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{justify-items:start;gap:calc(var(--roxy-space-unit) / 2);min-width:0;display:grid}.hebrew{font-size:calc(var(--roxy-text-xl) * 1.3);font-weight:var(--roxy-weight-bold);line-height:1.4}.roman{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.rule{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.provenance .roxy-label,.rule .roxy-label{font-size:inherit;margin-inline-end:var(--roxy-space-xs)}.src{margin-inline-start:var(--roxy-space-xs)}.letters{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.letter{justify-items:center;gap:calc(var(--roxy-space-unit) / 2);min-inline-size:5ch;padding:var(--roxy-space-xs) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);display:grid}.letter .glyph{font-size:var(--roxy-text-lg);line-height:1.3}.letter .name{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.letter .num{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.letter.is-final{border-color:var(--roxy-accent)}.legend{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:var(--roxy-space-sm)}.legend .swatch{block-size:.6lh;inline-size:.6lh;border:1px solid var(--roxy-accent);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td.num{white-space:nowrap}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:var(--roxy-space-sm)}.lineage,.match-note{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);white-space:normal;margin-block-start:calc(var(--roxy-space-unit) / 2)}a{color:var(--roxy-accent-ink)}.forms{gap:var(--roxy-space-md);margin:0;padding:0;list-style:none;display:grid}.form{gap:var(--roxy-space-xs);min-width:0;border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.form:first-child{border-block-start:0;padding-block-start:0}`],gs=m([f("roxy-gematria")],gs);import{css as Ru,html as Xt,nothing as ys}from"lit";var Wp=8,us=class extends y{renderData(a){let e=a.transitingPlanets??[];if(!e.length)return this.renderEmpty();let t=a.keyTransits??[],r=a.natalPlanets?.find(s=>s.name==="Moon")?.sign;return Xt`<div class="wrap" part="card" aria-label="${this.t("Gochara transits")}"><header class="head" part="header"><h2>${this.t("Gochara")}</h2><p class="sub">${this.t("Where each graha transits at {{when}}, read against the natal chart of {{birth}}.",{when:V(this.effectiveLang(),a.transitDatetime),birth:V(this.effectiveLang(),a.birthDatetime)})}</p>${r?Xt`<p class="sub">${this.t("Gochara houses are counted from the natal Moon in {{sign}}.",{sign:r})}</p>`:ys} ${X(this.effectiveLang(),a.frame,this.translator)}</header><div part="table">${e.map(s=>this.renderPlanet(s))}</div>${t.length&&!this.hideReadings?Xt`<section class="key" part="section key-transits"><h3>${this.t("Key transits")}</h3>${t.map(s=>Xt`<p class="key-item">${s.description}</p>`)}</section>`:ys}</div>`}renderPlanet(a){let e=$(a.name)??"",t=typeof a.longitude=="number"?jt(a.longitude):void 0;return Xt`<article class="row"><div class="row-top"><span class="graha">${e?Xt`<span class="glyph">${e}</span>`:ys}${a.name} </span><span class="pos">${t?`${a.sign} ${t}`:a.sign} </span>${typeof a.houseFromMoon=="number"?Xt`<span class="house moon roxy-chip">${this.t("house {{n}} from the Moon",{n:a.houseFromMoon})}</span>`:ys} ${typeof a.natalHouse=="number"?Xt`<span class="house lagna roxy-chip">${this.t("house {{n}} from the Lagna",{n:a.natalHouse})}</span>`:ys}</div>${this.renderKaksha(a.kaksha)} ${this.renderContacts(this.t("Drishti"),a.drishtiToNatal)} ${this.renderContacts(this.t("Aspects"),a.aspectsToNatal)}</article>`}renderContacts(a,e){return e?.length?Xt`<p class="aspects"><span class="contact-label">${a}</span> ${e.map(t=>typeof t.orb=="number"?this.t("{{aspect}} natal {{planet}} ({{orb}}°)",{aspect:Me({type:t.aspectType}),planet:t.natalPlanet,orb:b(this.effectiveLang(),t.orb,1)}):this.t("{{aspect}} natal {{planet}}",{aspect:Me({type:t.aspectType}),planet:t.natalPlanet})).join(" · ")}</p>`:ys}renderKaksha(a){if(!a||typeof a.number!="number")return ys;let e=a.number,t=a.bindu===!0?"yes":a.bindu===!1?"no":"",r=Wp,s=a.lord&&typeof a.startDegree=="number"&&typeof a.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}° to {{end}}° of the sign",{n:e,total:r,graha:a.lord,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)}):a.lord?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}",{n:e,total:r,graha:a.lord}):typeof a.startDegree=="number"&&typeof a.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, spanning {{start}}° to {{end}}° of the sign",{n:e,total:r,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)}):this.t("Kaksha {{n}} of {{total}}",{n:e,total:r}),i=a.bindu===null||a.bindu===void 0?"":typeof a.binduCount=="number"?a.bindu?this.t("this kaksha lord gave bindu, {{count}} of {{total}} in this sign",{count:a.binduCount,total:r}):this.t("this kaksha lord gave no bindu, {{count}} of {{total}} in this sign",{count:a.binduCount,total:r}):a.bindu?this.t("this kaksha lord gave bindu"):this.t("this kaksha lord gave no bindu");return Xt`<div class="kaksha-bar" part="chart" role="img" aria-label="${this.t("Kaksha {{n}} of {{total}} within the current sign",{n:e,total:r})}">${Array.from({length:Wp},(o,l)=>Xt`<span class="seg ${l+1===e?`here ${t}`:""}"></span>`)}</div><p class="meta">${i?`${s} · ${i}`:s}</p>`}};us.endpoints=lc,us.styles=[u,G,Ru`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);display:grid}h2,h3,p{margin:0}.sub,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.pos{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.house.moon{border-color:var(--roxy-accent);color:var(--roxy-fg)}.contact-label{font-weight:var(--roxy-weight-bold);margin-inline-end:var(--roxy-space-xs)}.kaksha-bar{block-size:.4lh;margin-block:var(--roxy-space-xs);grid-template-columns:repeat(8,minmax(0,1fr));gap:1px;display:grid}.seg{background:var(--roxy-border);border-radius:var(--roxy-radius-sm)}.seg.here{background:var(--roxy-muted)}.seg.here.yes{background:var(--roxy-success)}.seg.here.no{background:var(--roxy-warning)}.aspects{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.key{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);display:grid}.key-item{font-size:var(--roxy-text-sm)}`],us=m([f("roxy-gochara-table")],us);import{css as Cu,html as ga,nothing as dn}from"lit";var Tu={varna:1,vashya:2,tara:3,yoni:4,"graha maitri":5,gana:6,bhakoot:7,nadi:8},fs=class extends y{renderData(a){let e=(a.breakdown??[]).filter(c=>c?.category!==void 0),t=a.total??0,r=a.maxScore??36,s=t/r*100,i=s>=70?"high":s>=50?"mid":"low",o=s*2.827,l=(100-s)*2.827;return ga`<article class="card" part="card" aria-label="${this.t("Guna Milan score")}"><div class="score-header" part="header"><div class="score-info"><div class="score-bar" part="details"><div><span class="total">${b(this.effectiveLang(),a.total,1)}</span> <span class="over">/ ${a.maxScore}</span> ${typeof a.percentage=="number"?ga`<small class="pct">${we(this.effectiveLang(),a.percentage,1)}</small>`:dn}</div><div class="verdict-wrap">${typeof a.isCompatible=="boolean"?ga`<span class="verdict roxy-chip ${a.isCompatible?"yes":"no"}" data-tone="${a.isCompatible?"success":"danger"}">${a.isCompatible?this.t("Compatible"):this.t("Not compatible")}</span>`:dn} ${a.recommendation&&!this.hideReadings?ga`<span class="recommendation">${a.recommendation}</span>`:dn}</div></div></div><div class="score-ring" part="chart" role="meter" aria-label="${this.t("Guna Milan score")}" aria-valuemin="0" aria-valuemax="${r}" aria-valuenow="${t}"><svg viewBox="0 0 100 100" aria-hidden="true"><circle class="ring-track" cx="50" cy="50" r="45"/><circle class="ring-fill" data-band="${i}" cx="50" cy="50" r="45" stroke-dasharray="${o},${l}" transform="rotate(-90 50 50)"/></svg></div></div>${e.length>0?ga`<div class="table-scroll" part="table"><table class="stacked"><caption class="roxy-sr-only">${this.t("Guna Milan breakdown: each koota with the classification of person 1 and person 2, and the score it earned out of its maximum.")}</caption><thead><tr><th scope="col">${this.t("Koota")}</th><th scope="col">${this.t("Person 1")}</th><th scope="col">${this.t("Person 2")}</th><th scope="col" class="bar-col">${this.t("Progress")}</th><th scope="col" class="score">${this.t("Points")}</th></tr></thead><tbody>${e.map(c=>{let d=c.score??0,p=c.maxScore??Eu(c.category),h=p?d/p*100:0;return ga`<tr><td>${c.category} ${c.description?ga`<small>${c.description}</small>`:dn}</td><td class="classification" data-label="${this.t("Person 1")}">${c.person1??""}</td><td class="classification" data-label="${this.t("Person 2")}">${c.person2??""}</td><td class="bar-cell bar-col"><div class="mini-bar"><span style="width:${h}%"></span></div></td><td class="score" data-label="${this.t("Points")}">${b(this.effectiveLang(),d,1)} / ${p}</td></tr>`})}</tbody></table></div>`:dn} ${(a.doshas?.length??0)>0||(a.doshaCancellations?.length??0)>0?ga`<ul class="tags roxy-chips" part="details">${a.doshas?.map(c=>ga`<li class="dosha roxy-chip" data-tone="danger">${c}</li>`)} ${a.doshaCancellations?.map(c=>ga`<li class="cancel roxy-chip" data-tone="success" title="${c.reason}">${this.t("{{dosha}} cancelled",{dosha:c.dosha})}</li>`)}</ul>`:dn} ${X(this.effectiveLang(),a.frame,this.translator)}</article>`}};fs.endpoints=cc,fs.styles=[u,G,er,Cu`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.card>*{min-width:0}.score-header{align-items:center;gap:var(--roxy-space-md);display:flex}.score-info{flex:1;min-width:0}.table-scroll{min-width:0;overflow-x:auto}.score-bar{align-items:center;gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr) auto;display:grid}.total{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.over,.pct{color:var(--roxy-muted)}.pct{font-size:var(--roxy-text-sm);margin-inline-start:var(--roxy-space-sm)}.verdict-wrap{justify-items:end;gap:var(--roxy-space-xs);text-align:end;display:grid}.verdict{font-weight:var(--roxy-weight-bold)}.recommendation{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.score-ring{flex-shrink:0;block-size:5lh;inline-size:5lh}.score-ring svg{block-size:100%;inline-size:100%;display:block}.ring-track,.ring-fill{fill:none;stroke-width:8px}.ring-track{stroke:var(--roxy-border)}.ring-fill{stroke:var(--roxy-danger);stroke-linecap:round}.ring-fill[data-band=mid]{stroke:var(--roxy-warning)}.ring-fill[data-band=high]{stroke:var(--roxy-success)}table{width:100%}td small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2);display:block}td.classification{color:var(--roxy-secondary);white-space:nowrap}:is(th,td).score{text-align:end}td.score{font-weight:var(--roxy-weight-bold)}td.bar-cell{width:22%}@container (width<=32rem){.bar-col{display:none}}@container (width<=26rem){.score-header{flex-direction:column-reverse;align-items:stretch}.score-ring{align-self:center}.score-bar{gap:var(--roxy-space-xs);grid-template-columns:minmax(0,1fr)}.verdict-wrap{text-align:start;justify-items:start}}.mini-bar{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.35lh;overflow:hidden}.mini-bar>span{background:var(--roxy-accent);block-size:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}`],fs=m([f("roxy-guna-milan")],fs);function Eu(n){return n&&Tu[n.toLowerCase()]||1}import{css as Du,html as Jt,nothing as Ra}from"lit";var xs=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this)}renderChart(e,t,r){let s=new Set(r?e.personAGates:(e.channels??[]).flatMap(h=>h.personAGates??[])),i=new Set(r?e.personBGates:(e.channels??[]).flatMap(h=>h.personBGates??[])),o=new Map;for(let h of new Set([...s,...i]))o.set(h,{left:s.has(h),right:i.has(h)});let l=new Set((e.centers??[]).filter(h=>h.defined).map(h=>h.id)),c=new Map((e.centers??[]).map(h=>[h.id,h.name])),d=new Map;for(let h of e.channels??[])d.set(h.gateA,h.name),d.set(h.gateB,h.name);let p=new Map;for(let[h,x]of o){let L=[x.left&&"A",x.right&&"B"].filter(Boolean).join(" + ");p.set(h,[`Gate ${h}`,d.get(h),L].filter(Boolean).join(" · "))}return Jt`<svg class="chart" part="chart" viewBox="${bi}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${t}"><title>${t}</title>${vi({definedCenters:l,gateSources:o,gateTitles:p,centerNames:c,stateWords:{defined:"Defined",open:"Open"}})}</svg> ${r?Ra:Jt`<p class="note">${t}</p>`}<div class="legend" part="legend"><span><span class="swatch source src-left"></span>Person A</span> <span><span class="swatch source src-right"></span>Person B</span> <span><span class="swatch"></span>Open center</span></div>`}renderData(e){let t=Array.isArray(e.personAGates)&&Array.isArray(e.personBGates),r=t?this.t("Combined bodygraph"):this.t("Defined channels"),s=e.channels??[],i=e.centers??[],o=i.filter(l=>l.defined).length;return Jt`<div class="wrap" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2>Connection</h2>${typeof e.totalChannels=="number"?Jt`<span class="count">${e.totalChannels} channels</span>`:Ra}</header>${this.chartViewport.renderChartViewport(this.renderChart(e,r,t),r,this.translator)} ${$a([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?S(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:i.length>0?`${o}/${i.length}`:void 0}])} ${this.hideReadings?Ra:Jt`<p class="lead">A connection chart reads the two charts as one bodygraph. Wherever the two of them together hold both gates of a channel, that channel is defined between them, and the centers it joins are defined in the connection whether or not either person defines them alone.</p>`} ${this.renderDynamics(e.summary)} ${this.renderCenters(i)} ${this.renderChannels(s,i)}</div>`}renderDynamics(e){if(!e)return Ra;let t=[{label:"Electromagnetic",aside:Wi(e.electromagnetic),body:"Each person holds one of the two gates, so the channel completes only when they are together. The classic point of attraction."},{label:"Dominance",aside:Wi(e.dominance),body:"One person holds both gates and the other holds neither, so the conditioning runs one way, from the person who carries the channel to the person who does not."},{label:"Compromise",aside:Wi(e.compromise),body:"One person holds both gates and the other holds a single hanging gate of the same channel, so the channel is complete for one of them and half open for the other."},{label:"Companionship",aside:Wi(e.companionship),body:"Both people independently hold both gates, so neither needs the other to complete it. A shared and familiar frequency rather than an attraction."}];return this.renderInterpretation(t,"hd-connection-dynamic","Dynamics")}renderCenters(e){return e.length===0?Ra:Jt`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?Ra:Jt`<p class="note">Defined is the state of the combined chart. Beside it is who already defines that center in their own chart. A center defined only together is what the connection itself creates: it is there when the two are together and gone when they are apart. The combined definition counts how the defined centers hang together, so Single is one connected piece and a split is more than one.</p>`} ${e.map(t=>{let r=t.definedBy??[],s=r.includes("A"),i=r.includes("B"),o=!!t.defined&&!s&&!i;return Jt`<div class="row"><span class="cname">${t.name??S(String(t.id??""))}</span> <span class="roxy-chip ${o?"together":""}" data-tone="${t.defined&&!o?"success":Ra}">${t.defined?o?"Only together":"Defined":"Open"} </span><span class="who">${Au(!!t.defined,s,i)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return Ra;let r=new Map(t.map(i=>[String(i.id??""),i.name??""])),s=i=>r.get(i)||S(i);return Jt`<section class="block" part="section channels"><h3>Channels</h3><div class="scroll" part="table" tabindex="0" role="region" aria-label="Connection channels"><table role="table"><caption class="roxy-sr-only">Connection channels: each channel with its gates, the centers it links, its circuit and dynamic, and the gates person A and person B each hold.</caption><thead><tr><th scope="col">Channel</th><th scope="col">Gates</th><th scope="col">Centers</th><th scope="col">Circuit</th><th scope="col">Dynamic</th><th scope="col">Person A holds</th><th scope="col">Person B holds</th></tr></thead><tbody>${e.map(i=>Jt`<tr><td>${i.name??""}</td><td class="gates">${i.gateA}-${i.gateB}</td><td>${(i.centers??[]).map(s).join(" to ")}</td><td>${i.circuit??""}</td><td>${i.dynamic?Jt`<span class="roxy-chip">${i.dynamic}</span>`:Ra}</td><td class="held">${Xp(i.personAGates)}</td><td class="held">${Xp(i.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};xs.endpoints=dc,xs.styles=[u,M,j,Za,Li,Ge,Du`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-end:var(--roxy-space-sm)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.row:last-child{border-block-end:0}.cname{flex:1;min-width:16ch}.roxy-chip.together{color:var(--roxy-accent-ink);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.who{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}table{width:100%}th,td{white-space:nowrap}tbody tr:last-child td{border-block-end:0}.gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.held{font-variant-numeric:tabular-nums}.scroll{min-width:0;overflow-x:auto}.wrap{--src-left:var(--roxy-info-fg);--src-right:var(--roxy-warning-fg);--src-ink:var(--roxy-bg)}`],xs=m([f("roxy-hd-connection")],xs);function Wi(n){if(typeof n=="number")return n===0?"None":n===1?"1 channel":`${n} channels`}function Xp(n){let a=n??[];return a.length>0?a.join(", "):"Neither"}function Au(n,a,e){return a&&e?"Defined in both charts":a?"Defined by A":e?"Defined by B":n?"Defined by neither alone, only by the connection":"Open in both charts"}import{css as Gu,html as gt,nothing as Gt}from"lit";import{nothing as Pu,svg as On}from"lit";var rl=360,Mu=470,sl=8,eh=rl-sl*2,Ji=48,zn=15,al=7,Jp=16,Xi=[{id:"throat",label:"Throat",y:0},{id:"g",label:"G",y:211},{id:"sacral",label:"Sacral",y:422}],th=`0 0 ${rl} ${Mu}`;function _u(n,a){return sl+eh*(n*2+1)/(a*2)}function ah(n){return En[n.gateA]==="throat"||En[n.gateB]==="throat"}function Nu(n){return(ah(n)?En[n.gateA]==="throat":En[n.gateA]==="g")?n.gateA:n.gateB}function zu(){return Xi.map(n=>On`<g>
285
- <rect class="pn-bar" x=${sl} y=${n.y} width=${eh} height=${Ji} rx="10" />
286
- <text class="pn-bar-label" x=${rl/2} y=${n.y+Ji/2} text-anchor="middle" dominant-baseline="central">${n.label}</text>
81
+ ${Re.map(t=>Ey(t,n.placements[t.toLowerCase()]??[],t.toLowerCase()===e,Ho(t,n.lagnaSign),a))}
82
+ `}function Rp(n){return Fo(n.lagnaSign)!==-1}function Ay(n,a){let e=Object.values(n.placements).flat(),t=[];return e.some(r=>r.isRetrograde)&&t.push(`${Lp} ${a("retrograde")}`),e.some(r=>r.combust)&&t.push(`${$p} ${a("combust")}`),e.some(r=>r.war)&&t.push(`${wp} ${a("planetary war")}`),t.length===0?ht:An`<p class="roxy-frame">${t.join(" · ")}</p>`}function Py(n){return An`<p class="roxy-frame">${n("No ascendant in this chart, so the houses are not numbered.")}</p>`}function Mi(n,a){let e=[];Rp(n)||e.push(Py(a));let t=Ay(n,a);return t!==ht&&e.push(t),e}function _i(n,a,e){if(a==="north"&&!Rp(n))return bp(n,e);switch(a){case"north":return Sy(n,e);case"east":return Dy(n,e);default:return bp(n,e)}}function Ni(n,a,e){return dt({items:my.map(({id:t,source:r})=>({id:t,label:e(r)})),active:n,onSelect:a,label:e("Kundli style"),idPrefix:"kundli",controls:!0})}function Cp(n,a,e,t){return An`<details class="kundli-reference" part="section positions"><summary>${t("Planetary positions")}${H()}</summary><div class="kundli-reference-scroll" part="table" tabindex="0" role="region" aria-label="${t("Planetary positions")}"><table class="kundli-reference-table"><caption class="roxy-sr-only">${t("Planetary positions")}</caption><thead><tr><th scope="col">${t("Body")}</th><th scope="col">D${a} ${t("Sign")}</th><th scope="col">D${a} ${t("House")}</th><th scope="col">D1 ${t("Position")}</th><th scope="col">D1 ${t("Nakshatra")}</th><th scope="col">${t("Pada")}</th><th scope="col">${t("Star lord")}</th><th scope="col">${t("Motion")}</th></tr></thead><tbody>${Object.entries(n).map(([r,s])=>An`<tr><th scope="row">${s.graha??r}</th><td>${s.rashi??""}</td><td>${typeof s.house=="number"?s.house:""}</td><td>${typeof s.longitude=="number"?An`<span>${Qe(s.longitude)}</span><small>${b(e,s.longitude,12)}°</small>`:ht}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${s.isRetrograde?t("retrograde"):""}</td></tr>`)}</tbody></table></div></details>`}import{css as My}from"lit";var zi=My`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.kundli-reference{min-width:0}.kundli-reference>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}.kundli-reference-scroll{min-width:0;margin-top:var(--roxy-space-sm);overflow-x:auto}.kundli-reference-table{width:100%}.kundli-reference-table :is(th,td){white-space:nowrap}.kundli-reference-table small{color:var(--roxy-secondary);display:block}.header{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,35rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.line{fill:#0000;stroke:var(--roxy-border)}.sign-text{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-normal);font-family:var(--roxy-font-sans);text-transform:uppercase}.rashi-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .75);font-weight:var(--roxy-weight-normal);font-family:var(--roxy-font-sans)}.house-num{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.planet-text{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.centre-label{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.lagna-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans);text-transform:uppercase}.lagna-bg{fill:color-mix(in srgb, var(--roxy-accent) 14%, transparent)}.lagna-slash{stroke:var(--roxy-accent);stroke-linecap:round;opacity:.7}`;var zy={number:9,name:"Navamsa"},Tp=n=>"division"in n&&n.division?n.division:zy,tr=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this);this.chartStyle="north";this.setStyle=e=>{this.chartStyle=e}}viewModel(){if(!this.data?.chart?.meta)return null;let e=Tp(this.data),t=`D${e.number} ${e.name}`;return Pi(this.data.chart.meta,{divisionLabel:t,natalReference:!0})}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let r=Tp(e),{vargottama:s}=e;return ln`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">D${r.number} ${r.name} ${So(r.name,r.sanskritName)?ln`<span class="division-meta">· ${r.sanskritName}</span>`:jo}</h2>${r.significance?ln`<p class="significance">${r.significance}</p>`:jo} ${X(this.effectiveLang(),e.frame,this.translator)} ${Mi(t,this.translator)}</div>${Ni(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(ln`<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label="${this.t("{{chart}} divisional chart with twelve sign houses",{chart:`D${r.number} ${r.name}`})}"><title>D${r.number} ${r.name}</title>${_i(t,this.chartStyle,this.translator)}</svg>`,`D${r.number} ${r.name}`,this.translator)}</div>${Cp(e.chart.meta,r.number,this.effectiveLang(),this.translator)} ${s&&s.length>0?ln`<div class="vargottama-row" part="details"><span class="roxy-label">${this.t("Vargottama")}:</span><ul class="roxy-chips" aria-label="${this.t("Vargottama planets")}">${s.map(i=>ln`<li>${$(i)??""} ${i}</li>`)}</ul></div>`:jo}</div>`}};tr.endpoints=Jl,tr.styles=[u,Ge,G,zi,M,Xe,_y`.division-meta{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);color:var(--roxy-muted)}.significance{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);font-size:var(--roxy-text-sm);color:var(--roxy-muted);margin:0;padding-inline-start:var(--roxy-space-sm)}.vargottama-row{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}`],m([Ny({type:String,reflect:!0,attribute:"chart-style"})],tr.prototype,"chartStyle",2),tr=m([f("roxy-divisional-chart")],tr);import{css as Oy,html as Ut,nothing as ns}from"lit";import{property as Gy}from"lit/decorators.js";var Iy={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},ar=class extends y{constructor(){super(...arguments);this.type="manglik"}renderData(e){let t=!!e.present,r=Iy[this.type]??this.type,s=(e.severity??"").toLowerCase(),i=s==="severe"?3:s==="moderate"?2:s==="mild"?1:0,o=i*33;return Ut`<article class="card" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="${`badge roxy-chip ${t?"present":"absent"}`}" data-tone="${t?"danger":"success"}">${t?this.t("Present"):this.t("Absent")} </span>${X(this.effectiveLang(),e.frame,this.translator)}</header>${"type"in e&&e.type?Ut`<p class="subtype"><span class="subtype-label roxy-label">${this.type==="sadhesati"?this.t("Current phase"):this.t("Type")}</span>${e.type}</p>`:ns} ${e.severity?Ut`<div class="severity-bar" part="details" role="meter" aria-valuemin="0" aria-valuemax="3" aria-valuenow="${i}" aria-label="${this.t("Severity")} ${e.severity}"><span class="severity-fill" data-tier="${i}" style="width:${o}%"></span></div>`:ns} ${e.description&&!this.hideReadings?Ut`<p class="description">${e.description}</p>`:ns} ${this.renderEffects(e)} ${e.remedies&&e.remedies.length>0&&!this.hideReadings?Ut`<div part="section remedies"><h3>${this.t("Remedies")}</h3><ul>${e.remedies.map(l=>Ut`<li>${l}</li>`)}</ul></div>`:ns} ${"exceptions"in e&&e.exceptions&&e.exceptions.length>0&&!this.hideReadings?Ut`<div part="section exceptions"><h3>${this.t("Exceptions")}</h3><ul>${e.exceptions.map(l=>Ut`<li>${l}</li>`)}</ul></div>`:ns}</article>`}renderEffects(e){if(!e.effects||this.hideReadings)return ns;let t=[];for(let[r,s]of Object.entries(e.effects))if(typeof s=="string"&&s.length>0)t.push(Ut`<div><h3>${r}</h3><p>${s}</p></div>`);else if(s&&typeof s=="object")for(let[i,o]of Object.entries(s))typeof o=="string"&&o.length>0&&t.push(Ut`<div><h3>${i}</h3><p>${o}</p></div>`);return t.length===0?ns:Ut`<div class="effects" part="section effects">${t}</div>`}};ar.endpoints=Ql,ar.styles=[u,G,Oy`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}h2{text-transform:capitalize}.subtype{font-size:var(--roxy-text-sm)}.subtype-label{margin-inline-end:var(--roxy-space-sm)}.badge{font-weight:var(--roxy-weight-bold)}.severity-bar{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.35lh;inline-size:100%;overflow:hidden}.severity-fill{background:var(--roxy-warning);block-size:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.severity-fill[data-tier="3"]{background:var(--roxy-danger)}@media (prefers-reduced-motion:reduce){.severity-fill{transition:none}}h3{margin-block-end:var(--roxy-space-xs)}ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}.effects{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.effects p{font-size:var(--roxy-text-sm)}`],m([Gy({type:String,reflect:!0})],ar.prototype,"type",2),ar=m([f("roxy-dosha-card")],ar);import{css as Hy,html as De,nothing as mt}from"lit";var Fy=/^\d+(?:[.,]\d+)*(?:\s*-\s*\d+(?:[.,]\d+)*)?$/;function Pn(n){if(!n.text)return"";let a=n.chapter==null?"":String(n.chapter),e=n.verse??"",t=a;e&&(t=a?Fy.test(e.trim())?`${a}.${e}`:`${a}, ${e}`:e);let r=n.translation?[n.translation,n.year].filter(Boolean).join(" "):"";return[[S(n.text),t].filter(Boolean).join(" "),r,n.basis].filter(Boolean).join(" · ")}import{css as By}from"lit";var rr=By`.row{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);display:grid}@container (width<=30rem){.row{grid-template-columns:minmax(0,1fr)}}`;var jy=["vata","pitta","kapha"],Ky={"lagna-sign":"Lagna","moon-sign":"Moon sign","strongest-planet":"Strongest graha"};function Vy(n){return n.split("-").map(A).join("-")}function qy(n,a){return qe(n,(a??"").split(" ").filter(Boolean).map(A))}var is=class extends y{renderData(a){let e=this.effectiveLang(),t=a.composite;return De`<article class="card" part="card" aria-labelledby="dosha-title"><header class="head" part="header"><h2 id="dosha-title">${this.t("Ayurvedic constitution")}</h2>${t?.type?De`<span class="type">${Vy(t.type)}</span>`:mt}</header>${this.renderBar(e,a)}<div class="facts" part="details">${t?.dominant?De`<span><span class="roxy-label">${this.t("Dominant")}</span><b>${A(t.dominant)}</b></span>`:mt} ${t?.secondary?De`<span><span class="roxy-label">${this.t("Secondary")}</span><b>${A(t.secondary)}</b></span>`:mt} ${a.lagnaSign?De`<span><span class="roxy-label">${this.t("Lagna")}</span><b>${A(a.lagnaSign)}</b></span>`:mt} ${a.moonSign?De`<span><span class="roxy-label">${this.t("Moon sign")}</span><b>${A(a.moonSign)}</b></span>`:mt}</div>${this.renderFactors(e,a.factors)} ${this.renderRanking(e,a.strengthRanking)} ${this.renderPlanetDoshas(a.planetDoshas)} ${a.summary&&!this.hideReadings?De`<p class="summary" part="section readings">${a.summary}</p>`:mt} ${X(e,a.frame,this.translator)} ${a.meta?.disclaimer?De`<p class="disclaimer" part="disclaimer">${a.meta.disclaimer}</p>`:mt}</article>`}renderBar(a,e){let t=e.composite,r=jy.map(i=>({humour:i,value:t?.[i]??0}));return r.reduce((i,o)=>i+o.value,0)<=0?mt:De`<div part="chart"><div class="bar" role="img" aria-label="${r.map(i=>`${A(i.humour)} ${we(a,i.value,0)}`).join(", ")}">${r.filter(i=>i.value>0).map(i=>De`<div class="${`seg seg-${i.humour}`}" style="${`flex: ${i.value} 0 0`}"></div>`)}</div><p class="shares">${r.map(i=>De`<span><span class="${`swatch seg-${i.humour}`}"></span>${A(i.humour)} <b>${we(a,i.value,0)}</b></span>`)}</p></div>`}renderFactors(a,e){let t=e??[];return t.length===0?mt:De`<section part="section factors"><h3>${this.t("Factors")}</h3><ul class="rows">${t.map(r=>De`<li class="row" part="label-track"><span class="roxy-label">${this.factorLabel(r.id)}</span><div><span>${qy(a,r.input)}</span> ${r.doshas?.length?De`· ${r.doshas.map(s=>A(s)).join(", ")}`:mt} ${typeof r.weight=="number"?De`· <span class="roxy-label">${this.t("Weight")}</span>${b(a,r.weight,2)}`:mt} ${this.renderCitation(r.source)}</div></li>`)}</ul></section>`}factorLabel(a){let e=Ky[a??""];return e?this.t(e):S(a??"")}renderCitation(a){let e=Pn(a??{});return e?De`<div class="cite"><p><span class="roxy-label">${this.t("Source")}</span>${e}</p>${a?.note?De`<details class="note"><summary>${this.t("Note on the source")}${H()}</summary><p>${a.note}</p></details>`:mt}</div>`:mt}renderRanking(a,e){let t=e??[];return t.length===0?mt:De`<section part="section ranking"><h3>${this.t("Shadbala")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Shadbala")}"><table><thead><tr><th>${this.t("Rank")}</th><th>${this.t("Graha")}</th><th>${this.t("Strength")}</th><th>${this.t("Strong")}</th></tr></thead><tbody>${t.map(r=>De`<tr class="${r.strong?"is-strong":""}"><td>${P(a,r.rank)}</td><td>${r.graha??""}</td><td>${this.t("{{value}} virupas",{value:b(a,r.totalVirupas,2)})}</td><td>${r.strong?this.t("Yes"):this.t("No")}</td></tr>`)}</tbody></table></div></section>`}renderPlanetDoshas(a){let e=a??[];return e.length===0?mt:De`<section part="section planet-humours"><h3>${this.t("Planetary humours")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Planetary humours")}"><table><thead><tr><th>${this.t("Graha")}</th><th>${this.t("Humours")}</th><th>${this.t("Dhatu")}</th></tr></thead><tbody>${e.map(t=>De`<tr><td>${t.graha??""}</td><td>${(t.doshas??[]).map(r=>A(r)).join(", ")}</td><td>${[t.dhatu,t.dhatuSanskrit].filter(Boolean).join(" · ")}</td></tr>`)}</tbody></table></div>${this.renderTableSources(e)}</section>`}renderTableSources(a){let e=new Set;for(let t of a)for(let r of[t.doshaSource,t.dhatuSource]){let s=Pn(r??{});s&&e.add(s)}return e.size===0?mt:De`<p class="cite"><span class="roxy-label">${this.t("Source")}</span>${[...e].join(" · ")}</p>`}};is.endpoints=ec,is.styles=[u,G,M,rr,Hy`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.type{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold)}.bar{width:100%;min-width:0;border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);block-size:1lh;display:flex;overflow:hidden}.seg{min-width:0}.seg-vata{background:color-mix(in srgb, var(--roxy-info) 45%, var(--roxy-surface))}.seg-pitta{background:color-mix(in srgb, var(--roxy-danger) 45%, var(--roxy-surface))}.seg-kapha{background:color-mix(in srgb, var(--roxy-success) 45%, var(--roxy-surface))}.shares,.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.swatch{block-size:.5lh;inline-size:.5lh;border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.shares b,.facts b{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.facts .roxy-label,.row>div .roxy-label,.cite .roxy-label{margin-inline-end:var(--roxy-space-xs)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.cite{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2)}.cite .roxy-label{font-size:inherit}.cite .note summary{align-items:center;gap:var(--roxy-space-xs);width:fit-content;color:var(--roxy-secondary);display:flex}.cite .note p{margin-block-start:calc(var(--roxy-space-unit) / 2)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}tr.is-strong td{font-weight:var(--roxy-weight-bold)}.summary{font-size:var(--roxy-text-sm)}.disclaimer{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);padding-inline-start:var(--roxy-space-md)}`],is=m([f("roxy-dosha-constitution")],is);import{css as Yy,html as Oi,nothing as Ko}from"lit";var os=class extends y{renderData(a){return Oi`<article class="card" part="card" aria-label="${a.name??this.t("Dream symbol")}"><header class="head" part="header">${a.letter?Oi`<span class="letter" aria-hidden="true">${a.letter}</span>`:Ko}<div><p class="roxy-label">${this.t("Dream symbol")}</p>${a.name?Oi`<h2>${a.name}</h2>`:Ko}</div></header>${a.meaning?Oi`<p>${a.meaning}</p>`:Ko}</article>`}};os.endpoints=tc,os.styles=[u,Yy`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);display:flex}.letter{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:2lh;inline-size:2lh;color:var(--roxy-accent-ink);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);text-transform:uppercase;flex:none;justify-content:center;align-items:center;display:inline-flex}`],os=m([f("roxy-dream-card")],os);import{css as Uy,html as Gi,nothing as Ep}from"lit";var ls=class extends y{constructor(){super(...arguments);this.rowDetail={tag:"roxy-dream-card",path:"dreams/symbols/{id}"};this.listKey="symbols"}renderData(e){let t=e.symbols??[];if(t.length===0)return this.renderEmpty();let r=typeof e.total=="number"?e.total:t.length;return Gi`<section class="wrap" part="card" aria-label="${this.t("Dream symbols")}"><header class="head" part="header"><h2>${this.t("Dream symbols")}</h2><span class="count">${r===1?this.t("1 symbol"):this.t("{{count}} symbols",{count:r})}</span></header><ul class="grid" part="section symbols">${t.map(s=>Gi`<li><button type="button" class="result" aria-pressed="${this.openedRowId===s.id?"true":"false"}" @click="${()=>this.pickRow({id:s.id,name:s.name,letter:s.letter})}">${s.letter?Gi`<span class="letter" aria-hidden="true">${s.letter}</span>`:Ep} <span class="name">${s.name}</span></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Gi`<div class="detail" part="detail">${this.openedRow}</div>`:Ep}</section>`}};ls.endpoints=ac,ls.styles=[u,Uy`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.result{align-items:center;gap:var(--roxy-space-sm);width:100%;padding:var(--roxy-space-sm) var(--roxy-space-md);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;display:flex}.result[aria-pressed=true],.result:hover{border-color:var(--roxy-accent)}.result[aria-pressed=true] .name{color:var(--roxy-accent-ink)}.detail{margin-block-start:var(--roxy-space-md)}.letter{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);text-transform:uppercase;flex:none}.name{font-size:var(--roxy-text-sm)}`],ls=m([f("roxy-dream-search")],ls);import{css as ou,html as Z,nothing as tt}from"lit";import{property as Zt,state as ha}from"lit/decorators.js";import{ifDefined as ma}from"lit/directives/if-defined.js";import{live as lu}from"lit/directives/live.js";var Sa={afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Current year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",q:"Search",question:"Your question",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var Dp={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:!0}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:!0}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:!0}},"GET /crystals":{color:{path:"/crystals/colors",lang:!0},planet:{path:"/crystals/planets",lang:!0}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:!0}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:!0}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:!0}}},Ap={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var Ot=(n,a)=>`${n}.${a}`;function Fi(n){let a=/^(.+)\.(\d+)$/.exec(n);return a?{key:a[1],index:Number(a[2])}:null}function Bi(n,a=Lo,e=t=>Sa[t]??S(t)){let t=Fi(n);return t?a("{{group}} {{n}}",{group:e(t.key),n:t.index+1}):a(S(n))}function Mp(n,a){let e=a.key??a.name;if(Np(e))return Ys(n,e);if(!a.label)return Ys(n,a.name);let t=Object.keys(Sa).find(r=>Sa[r]===a.label);return $o(n,a.label)??(t?Ys(n,t):void 0)}function _p(n,a,e){let t=Ot(a,0);return n.filter(r=>r.group===t).map(r=>({...r,key:`${Ot(a,e)}.${r.name}`,group:Ot(a,e)}))}function Yo(n){return n.length<=(Hi(n)?30:12)?"tiles":"select"}function Hi(n){return n.every(a=>a.length<=2)}var Zy=["latitude","longitude","timezone"],Pp=["latitude","longitude"];function Np(n){let a=n.match(/^(.+?)(Latitude|Longitude)$/);return a?{group:a[1],leaf:a[2].toLowerCase()}:null}var Wy=Re.map(n=>n.toLowerCase());function cs(n,a){if(n){if("$ref"in n&&n.$ref){let e=n.$ref.split("/").pop();return e?a[e]:void 0}return n}}function zp(n){let a=n.anyOf??n.oneOf;return!a||a.length===0?n:a.find(e=>Array.isArray(e.enum))??a.find(e=>qo(e)&&qo(e)!=="null")??a[0]??n}function qo(n){if(typeof n.type=="string")return n.type;if(!Array.isArray(n.type))return;let a=n.type.filter(e=>e!=="null");return a.length===1?a[0]:void 0}function Xy(n){let a=zp(n),e=qo(a);return Array.isArray(a.enum)?Yo(a.enum):e==="boolean"?"toggle":a.format==="date"?"date":a.format==="time"?"time":a.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function Op(n){if(n.length!==12)return!1;let a=new Set(n.map(e=>e.toLowerCase()));return Wy.every(e=>a.has(e))}function Ii(n,a,e){let t=zp(a);return{key:e.key,name:n,group:e.group,inQuery:e.inQuery,kind:Xy(a)??"text",required:e.required,description:t.description??a.description,enum:t.enum,min:t.minimum??t.exclusiveMinimum,max:t.maximum??t.exclusiveMaximum,default:a.default??t.default,example:a.example??t.example}}function Vo(n){return new Set([...n.required??[],...n["x-required-any-of"]?.[0]??[]])}function Gp(n,a,e,t=n.requestBody?"POST":"GET"){let r=[],s=[],i=!1,o=n.requestBody?.content?.["application/json"]?.schema,l=cs(o,a),c=l?.["x-required-any-of"];if(l?.properties){let d=Vo(l);for(let[p,h]of Object.entries(l.properties)){let x=cs(h,a)??{},L=x.type==="array"?cs(x.items,a):void 0;if(L?.type==="object"&&L.properties){let v=Math.max(1,x.minItems??1),w=Vo(L);s.push({key:p,min:v,max:x.maxItems??v});for(let O=0;O<v;O++)for(let[te,We]of Object.entries(L.properties)){let Ma=cs(We,a)??{};r.push(Ii(te,Ma,{key:`${Ot(p,O)}.${te}`,group:Ot(p,O),required:d.has(p)&&w.has(te)}))}}else if(x.type==="object"&&x.properties){let v=Vo(x);for(let[w,O]of Object.entries(x.properties)){let te=cs(O,a)??{};te.type==="array"&&cs(te.items,a)?.type==="object"||r.push(Ii(w,te,{key:`${p}.${w}`,group:p,required:d.has(p)&&v.has(w)}))}}else{let v=Np(p),w=Ii(v?.leaf??p,x,{key:p,group:v?.group,required:d.has(p)});v&&(w.label=`${S(v.group)} ${v.leaf}`),r.push(w)}}}for(let d of n.parameters??[]){if(d.in!=="path"&&d.in!=="query")continue;if(d.name==="lang"&&d.in==="query"){i=!0;continue}let p=cs(d.schema,a)??{},h=Ii(d.name,p,{key:d.name,required:!!d.required,inQuery:d.in==="query"});if(d.in==="path"&&h.enum&&/^(id|identifier|slug)$/i.test(Sa[h.name]??S(h.name))){let x=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(d.description??h.description??"")?.[1]?.trim();x&&(h.label=x)}r.push(h)}for(let d of r)!d.group&&!d.label&&r.some(p=>p.group&&p.name===d.name)&&(d.label=Jy(d));return Uo({title:Qy(n.summary,e),fields:r,hasLang:i,...s.length>0?{repeats:s}:{},...c?{requiredAnyOf:c}:{}},t,e)}function Jy(n){let e=(Sa[n.name]??S(n.name)).toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^(\\p{L}+) ${e}\\b`,"iu").exec(n.description??"")?.[1];return t?Sa[t.toLowerCase()+n.name.replace(/^./,r=>r.toUpperCase())]:void 0}function Uo(n,a,e){let t=`${a.toUpperCase()} /${e.replace(/^\//,"")}`,r=Dp[t]??{},s=Ap[t]??{},i=n.fields.map(h=>{let x={...h};return delete x.role,delete x.city,delete x.viewerZone,delete x.moment,delete x.fold,{...x,...r[h.key]&&{source:r[h.key]},...s[h.key]&&{disabledWhen:s[h.key]}}}),o=[...new Set(i.map(h=>h.group))].map(h=>h===void 0?{}:{key:h,label:Bi(h)}),l=o.filter(h=>Pp.every(x=>i.some(L=>L.group===h.key&&L.name===x)));for(let[h,x]of l.entries()){let L=i.filter(w=>w.group===x.key),v=L.find(w=>w.name==="timezone")??(h===0?i.find(w=>!w.group&&w.name==="timezone"):void 0);x.location={fields:[...L.filter(w=>Pp.includes(w.name)).map(w=>w.key),...v?[v.key]:[]],required:L.some(w=>Zy.includes(w.name)&&w.required)}}for(let h of i)h.name==="seed"?h.role="seed":(h.name==="limit"||h.name==="offset")&&!h.required?h.role="hidden-default":l.some(x=>x.location?.fields.includes(h.key))?h.role="location":h.name==="timezone"&&(h.city=!0,!h.group&&!h.required&&(h.viewerZone=!0));let c=o.filter(h=>h.key!==void 0&&(h.location||i.some(x=>x.group===h.key&&x.required))),d=i.some(h=>!h.group&&!h.role&&h.required)||c.length>0||l.some(h=>h.key===void 0);for(let h of o)h.key!==void 0&&d&&!c.includes(h)&&(h.fold=!0);let p=h=>c.length>0&&h.default===void 0&&(h.kind==="date"||h.kind==="time"||h.kind==="datetime");for(let h of i)h.group?o.find(x=>x.key===h.group)?.fold&&(h.fold=!0):!h.role&&d&&!h.required?p(h)?h.moment=!0:h.fold=!0:!h.role&&!d&&h.default!==void 0&&(h.fold=!0);return{...n,fields:i,groups:o,opensOnLoad:eu(n,a)}}function Ip(n,a){let e=n.filter(t=>t.moment);return e.some(t=>t.kind==="time"||t.kind==="datetime")&&e.every(t=>a[t.key]===void 0||a[t.key]==="")}function Qy(n,a){let e=n?.split(" - ")[0]?.trim();return e||S(a.split("/").pop()??"")}function eu(n,a){return a.toUpperCase()==="GET"&&!n.fields.some(e=>e.required)}function Fp(n,a=[]){if(a.some(t=>t.name==="limit"||t.name==="offset"))return"Search";let e=n.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function Bp(n,a){let e=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist/schemas`;if(!a)return e;let t=new URL(a),r=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/.exec(t.pathname)?.[1];return t.hostname==="cdn.jsdelivr.net"||r===void 0?e:`${t.origin}${r}/schemas`}function Hp(n,a){let e=a.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${n.toLowerCase()}--${e}.json`}function tu(n){if(Array.isArray(n))return n;if(!n||typeof n!="object")return null;let a=Object.values(n),e=a.find(Array.isArray);return e||(a.find(r=>!!r&&typeof r=="object"&&Object.values(r).every(s=>typeof s=="number"))??null)}function Zo(n,a="id"){let e=tu(n);if(!e)return[];if(!Array.isArray(e)){let r=Object.keys(e),s=r.length>0&&r.every(o=>/^[a-z]$/.test(o));return(s?[..."abcdefghijklmnopqrstuvwxyz"]:r).map(o=>({value:o,label:s?o.toUpperCase():o,disabled:!e[o]}))}let t=[];for(let r of e){if(typeof r=="string"){t.push({value:r,label:r});continue}if(!r||typeof r!="object")continue;let s=r,i=s.id??s[a]??s.number;if(i==null)continue;let o=String(i),l=s.name??s.english;t.push({value:o,label:typeof l=="string"?l:o})}return t}function jp(n){let a=n?.total;return typeof a=="number"?a:void 0}import{css as ru,html as cn,nothing as Wo}from"lit";import{ifDefined as Xo}from"lit/directives/if-defined.js";import{css as au}from"lit";var ji=au`.spinner{inset-inline-end:calc(var(--roxy-space-unit) * 3);border:var(--roxy-line-thick) solid var(--roxy-muted);border-radius:var(--roxy-radius-full);border-top-color:#0000;block-size:.6lh;inline-size:.6lh;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;top:calc(100% + var(--roxy-space-xs));padding:var(--roxy-space-xs);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);box-shadow:var(--roxy-shadow-md);max-block-size:15lh;animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing);margin:0;list-style:none;position:absolute;left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm);inline-size:100%;min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm) var(--roxy-space-md);border-radius:var(--roxy-radius-sm);text-align:start;font-size:var(--roxy-text-sm);color:var(--roxy-fg);cursor:pointer;transition:background-color var(--roxy-motion-duration);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent) 10%, transparent)}.empty{padding:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`;function Ki(n,a){let e,t=((...r)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,n(...r)},a)});return t.cancel=()=>{e&&(clearTimeout(e),e=void 0)},t}var su=10,nu=10,Jo=new Map;function Kp(n,a,e={}){return{...n.limit?{limit:n.limit}:{},...n.lang&&a?{lang:a}:{},...e}}function el(n,a,e,t){let r=JSON.stringify([n.submitUrl??n.baseUrl,a.path,e,t]),s=Jo.get(r);return s||(s=iu(n,a,e,t).catch(i=>{throw Jo.delete(r),i}),Jo.set(r,s)),s}async function iu(n,a,e,t){let r=[];for(let s=0;s<nu;s++){let i=await Na(n,{path:a.path,method:"GET",query:Kp(a,t,r.length?{offset:r.length}:{})}),o=Zo(i,e);r.push(...o);let l=jp(i);if(!a.limit||l===void 0||r.length>=l||!o.length)break}return r}var Qo=n=>n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),Vi=class{constructor(a,e,t,r,s){this.host=a;this.source=e;this.field=t;this.context=r;this.onPick=s;this.query="";this.options=[];this.open=!1;this.highlight=-1;this.loading=!1;this.error=null;this.search=Ki(a=>{this.searchServer(a)},250);a.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(a){this.query=a,this.error=null,this.source.search?a.trim().length<2?this.close():this.search(a):this.filter(a),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=!1,this.highlight=-1,this.host.requestUpdate()}pick(a){this.query=a.label,this.close(),this.onPick(a)}keydown(a){let e=this.options.length;if(a.key==="Escape"){this.close();return}if(a.key==="ArrowDown"&&!this.open){a.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(a.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(a.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(a.key==="Home")this.highlight=0;else if(a.key==="End")this.highlight=e-1;else if(a.key==="Enter"){let t=this.options[this.highlight]??this.options[0];t&&this.pick(t)}else return;a.preventDefault(),this.host.requestUpdate()}}async filter(a){let{route:e,lang:t}=this.context();this.loading=!0,this.host.requestUpdate();try{let r=await el(e,this.source,this.field,t);if(a!==this.query)return;let s=Qo(a.trim());this.show(r.filter(i=>Qo(i.label).includes(s)||Qo(i.value).includes(s)))}catch(r){this.fail(r)}finally{this.loading=!1,this.host.requestUpdate()}}async searchServer(a){let{route:e,lang:t}=this.context(),r=this.source.search;this.abort?.abort();let s=new AbortController;this.abort=s,this.loading=!0,this.host.requestUpdate();try{let i=await Na(e,{path:this.source.path,method:"GET",query:Kp({...this.source,limit:su},t,{[r]:a})},s.signal);if(s.signal.aborted)return;this.show(Zo(i,this.field))}catch(i){if(s.signal.aborted)return;this.fail(i)}finally{this.abort===s&&(this.abort=void 0),s.signal.aborted||(this.loading=!1,this.host.requestUpdate())}}show(a){this.options=a,this.open=!0,this.highlight=a.length?0:-1}fail(a){this.options=[],this.open=!1,this.error=a instanceof Error?a.message:String(a)}};function Vp(n,a,e,t={}){let r=`${a}-listbox`;return cn`<div class="picker"><input id="${a}" type="text" role="combobox" aria-expanded="${n.open?"true":"false"}" aria-controls="${r}" aria-autocomplete="list" aria-labelledby="${Xo(t.labelledby)}" aria-describedby="${Xo(t.describedby)}" aria-invalid="${Xo(t.invalid?"true":void 0)}" aria-activedescendant="${n.open&&n.highlight>=0?`${a}-opt-${n.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${n.query}" @input="${s=>n.input(s.target.value)}" @keydown="${s=>n.keydown(s)}" @focus="${()=>n.focus()}" @blur="${()=>n.close()}"> ${n.loading?cn`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:Wo} ${n.open?cn`<ul id="${r}" class="results" role="listbox">${n.options.length===0?cn`<li class="empty" role="status">${e.empty}</li>`:n.options.map((s,i)=>cn`<li id="${`${a}-opt-${i}`}" class="option" role="option" aria-selected="${n.highlight===i?"true":"false"}" @mousedown="${o=>o.preventDefault()}" @click="${()=>n.pick(s)}">${s.label}</li>`)}</ul>`:Wo}</div>${n.error?cn`<small class="field-error" role="alert">${n.error}</small>`:Wo}`}var qp=[ji,ru`.picker{position:relative}`];var tl="1.1.3";var Yp="https://roxyapi.com/api/v2/openapi.json",cu=Bp(tl,globalThis.document?.currentScript?.src||void 0),al=new Map,qi=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},Yi=class extends Error{constructor(e,t){super(`Endpoint ${e} ${t} not found in OpenAPI spec`);this.method=e;this.path=t}};async function du(n){let a=al.get(n);return a||(a=fetch(n).then(async e=>{if(!e.ok)throw new qi(e.status);return await e.json()}).catch(e=>{throw al.delete(n),e}),al.set(n,a)),a}function pu(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var Up=n=>/\bbirth/i.test(n?.description??""),Zp=n=>n.key===`${n.group}.${n.name}`;function hu(n){let a=n.trim();if(!a)return[];try{let e=JSON.parse(a);if(Array.isArray(e))return e}catch{}return a.split(",").map(e=>e.trim()).filter(Boolean)}var pe=class extends _a{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=!1;this.fullPages=!1;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=!1;this.repeats=[];this.formTitle="";this.hasLang=!1;this.values={};this.loaded=!1;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||Yp,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof qi?this.t("HTTP error {{status}}",{status:e.status}):e instanceof Yi?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(Yp)}async modelFromSpec(e){let t=await du(e),r=`/${this.endpoint.replace(/^\//,"")}`,s=t.paths?.[r]?.[this.method.toLowerCase()];if(!s)throw new Yi(this.method,r);return Gp(s,t.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${cu}/${Hp(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Uo(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??!1,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang;let t={};for(let r of e.fields){let s=r.viewerZone?void 0:this.fullPages&&r.name==="limit"&&this.roleOf(r)==="hidden-default"?r.max??r.default:r.default;s!==void 0&&(t[r.key]=s);let i=r.group&&Zp(r)?this.initialValues?.[r.group]?.[r.name]:this.initialValues?.[r.key];i!==void 0&&(t[r.key]=i)}this.values=this.withoutDisabled(t),this.loaded=!0,this.loadChoices(),this.autoload&&this.opensOnLoad&&ko(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let t of this.pickers.values())this.removeController(t);if(this.pickers.clear(),!ko(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let t of this.fields)if(t.source){if(t.required){let r=new Vi(this,t.source,t.name,e,s=>this.pickChoice(t,s.value));r.query=String(this.values[t.key]??""),this.pickers.set(t.key,r);continue}this.choices={...this.choices,[t.key]:"loading"},el(this.route,t.source,t.name,this.requestLang()).then(r=>{this.choices={...this.choices,[t.key]:r}},()=>{let{[t.key]:r,...s}=this.choices;this.choices=s})}}setValue(e,t){this.setValues({[e]:t})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let t=Object.keys(e).filter(r=>this.serverIssues?.some(s=>s.path===r));t.length&&(this.clearedIssues=new Set([...this.clearedIssues,...t]))}isDisabled(e,t=this.values){let r=e.disabledWhen;return!!r&&t[r.field]===r.value}withoutDisabled(e){for(let t of this.fields)this.isDisabled(t,e)&&(e[t.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let t=e.has("publishableKey")?Dr(this.publishableKey):void 0;t&&Us(this,t,{warn:!0})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(t=>t.path===e.key)}cityIssues(e){return this.liveIssues().filter(t=>{let r=this.fields.find(s=>s.key===t.path);return!!r&&this.roleOf(r)==="location"&&this.cityGroup(r)===e})}issuesForGroup(e){return this.liveIssues().filter(t=>t.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e)}`:this.fieldText(e)}issueLines(e){return e.map(t=>Z`<small part="field-error" class="field-error" role="alert">${t.message}</small>`)}fieldIssue(e){let t=this.issueFor(e);return t?Z`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${t.message}</small>`:tt}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return tt;let t=r=>{let s=this.fields.find(o=>o.key===r);if(s)return this.fieldLabel(s);let i=this.groupKeys().find(o=>o===r);return i?this.groupName(i):this.fieldText({name:r.split(".")[0]??r})};return Z`<div part="validation-error" class="validation-error" role="alert">${e.map(r=>Z`<div><strong>${t(r.path)}</strong> ${r.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(t=>t.key===e)?.location}cityGroup(e){return this.groups.find(t=>t.location?.fields.includes(e.key))?.key??e.group}placeField(e){let t=this.fields.filter(r=>r.group===e);return t.find(r=>r.name==="latitude")??t.find(r=>r.name==="timezone")}locationRequired(e){return this.groups.find(t=>t.key===e)?.location?.required??!1}get soleChoice(){if(this.groupKeys().some(r=>this.groupHasLocation(r))||this.groupKeys().some(r=>r!==void 0))return null;let e=this.fields.filter(r=>r.required&&this.isRendered(r)),t=e[0];return e.length!==1||!t?null:t.kind==="tiles"||t.kind==="select"||this.pickers.has(t.key)?t:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return!0;if(!this.opensOnLoad)return!1;let e=this.fields.filter(t=>this.isRendered(t));return e.length>0&&e.every(t=>this.isFilter(t))}choiceKind(e){let t=this.choicesOf(e).map(r=>r.value);return this.isFilter(e)&&!Hi(t)?"select":this.choices[e.key]?Yo(t):e.kind}choicesOf(e){let t=this.choices[e.key];return Array.isArray(t)?t:(e.enum??[]).map(r=>({value:r,label:this.optionText(e.name,r)}))}effectiveSubmitLabel(){return this.submitLabel?this.submitLabel:Ip(this.fields,this.values)?this.t("Show right now"):this.t(Fp(this.endpoint,this.fields))}requestLang(){return Un(this)}fieldText(e){let t=this.requestLang();return e.label?Mp(t,e)??e.label:ae(t,e.name,Sa[e.name])}optionText(e,t){return I(this.requestLang(),e,t)}onLocationFor(e){return t=>{let r=this.groups.find(i=>i.key===e)?.location?.fields??[],s={};for(let i of r){let o=this.fields.find(l=>l.key===i)?.name;o&&(s[i]=t[o])}this.setValues(s)}}chooseOption(e,t){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===t?"":t),this.submit();return}this.pickChoice(e,t)}pickChoice(e,t){this.setValue(e.key,t),this.resend()}resend(){let e=this.soleChoice;e&&this.values[e.key]&&this.submit()}setFilter(e,t){let r={[e.key]:t};for(let s of this.fields)s!==e&&(this.isFilter(s)||this.opensOnLoad&&s.kind==="text"&&this.isRendered(s))&&(r[s.key]=void 0);this.setValues(r)}onTilesKeyDown(e){return t=>{let r=this.choicesOf(e).filter(d=>!d.disabled).map(d=>d.value);if(r.length===0)return;let s=r.indexOf(this.values[e.key]),i;if(t.key==="Home")i=0;else if(t.key==="End")i=r.length-1;else if(t.key==="ArrowRight"||t.key==="ArrowDown")i=s===-1?0:(s+1)%r.length;else if(t.key==="ArrowLeft"||t.key==="ArrowUp")i=s===-1?r.length-1:(s-1+r.length)%r.length;else return;t.preventDefault();let o=r[i];if(o===void 0)return;this.chooseOption(e,o);let l=t.currentTarget,c=this.choicesOf(e).findIndex(d=>d.value===o);requestAnimationFrame(()=>l.querySelector(`[data-tile='${c}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:!0,composed:!0}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(i=>i.path));let t={};for(let i of this.fields){let o=this.values[i.key];if(i.name==="seed"&&(o===void 0||o==="")&&(o=pu()),i.viewerZone&&(o===void 0||o==="")&&(o=kd()??i.default),o===void 0||o==="")continue;i.kind==="array"&&typeof o=="string"&&(o=hu(o));let l=i.group?Fi(i.group):null;if(l){let c=t[l.key]??[],d=c[l.index]??{};d[i.name]=o,c[l.index]=d,t[l.key]=c}else if(i.group&&Zp(i)){let c=t[i.group]??{};c[i.name]=o,t[i.group]=c}else t[i.key]=o}let r=this.fields.filter(i=>i.inQuery).map(i=>i.name),s=this.requestLang();this.hasLang&&s&&(t.lang=s,r.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:t,queryKeys:r,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:!0,composed:!0}))}collectMissing(){let e=[],t=[],r=new Set;for(let s of this.fields){if(!s.required)continue;let i=this.roleOf(s)==="location";if(!this.isRendered(s)&&!i)continue;let o=this.values[s.key];if(!(o!==void 0&&o!=="")){if(e.push(s.key),i){r.add(this.cityGroup(s));continue}t.push(this.fieldLabel(s))}}for(let s of r)t.push(this.locationLabel(s));return{keys:e,labels:t}}get readsEnglish(){return Qc(this.effectiveLang())}renderTitle(){return this.readsEnglish?Z`<h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>`:tt}reqMark(e){return e.required?Z`<span class="req" aria-hidden="true">*</span>`:tt}description(e){if(!e.description||!this.readsEnglish)return tt;if(e.description.length<=120)return Z`<small part="hint" class="help">${e.description}</small>`;let t=e.description.split(". ")[0]??e.description;return Z`<details part="hint" class="help-details"><summary><span class="help-lead">${t}</span>${H()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let t=`roxy-form-${e.key}-label`,r=!!e.enum&&Op(e.enum),s=this.choicesOf(e),i=Hi(s.map(c=>c.value)),o=s.findIndex(c=>c.value===this.values[e.key]),l=o===-1?s.findIndex(c=>!c.disabled):o;return Z`<div class="field tiles-field"><span class="label" id="${t}">${this.fieldText(e)}${this.reqMark(e)}</span><div class="${i?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${t}" @keydown="${this.onTilesKeyDown(e)}">${s.map((c,d)=>{let p=this.values[e.key]===c.value,h=r?N(c.value):void 0;return Z`<button type="button" class="tile" role="radio" data-tile="${d}" aria-checked="${p?"true":"false"}" tabindex="${d===l?"0":"-1"}" ?disabled="${!!c.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,c.value)}">${h?Z`<span class="tile-glyph" aria-hidden="true">${h}</span>`:tt} <span class="tile-label">${c.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let t=`roxy-form-${e.key}`;return Z`<div part="field" class="field"><label for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label> <select id="${t}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${ma(this.issueFor(e)?"true":void 0)}" aria-describedby="${ma(this.issueFor(e)?`${t}-error`:void 0)}" .value="${lu(this.values[e.key]??"")}" @change="${r=>this.chooseOption(e,r.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(r=>Z`<option value="${r.value}" ?selected="${this.values[e.key]===r.value}" ?disabled="${!!r.disabled}">${r.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,t){let r=`roxy-form-${e.key}`,s=this.soleChoice?.key===e.key&&this.readsEnglish,i=this.issueFor(e);return Z`<div part="field" class="field">${s?tt:Z`<label for="${r}">${this.fieldText(e)}${this.reqMark(e)}</label>`} ${Vp(t,r,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:s?"roxy-form-title":void 0,describedby:i?`${r}-error`:void 0,invalid:!!i})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let t=`roxy-form-${e.key}`,r=this.values[e.key]===!0;return Z`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${t}" class="toggle" role="switch" aria-checked="${r?"true":"false"}" @click="${()=>this.pickChoice(e,!r)}"><span class="knob"></span></button> <label class="toggle-label" for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let t=`roxy-form-${e.key}`,r=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,s=e.example!=null?String(e.example):"",i=e.kind==="array"?this.t("Comma separated"):this.readsEnglish||!new RegExp("\\p{L}","u").test(s)?s:"";return Z`<div part="field" class="field"><label for="${t}">${this.fieldText(e)}${this.reqMark(e)}</label> <input id="${t}" type="${e.kind==="array"?"text":r}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${ma(this.issueFor(e)?"true":void 0)}" aria-describedby="${ma(this.issueFor(e)?`${t}-error`:void 0)}" min="${ma(e.min)}" max="${ma(e.max)}" step="${e.kind==="number"?"any":tt}" placeholder="${i||tt}" .value="${this.values[e.key]??""}" @input="${o=>{let l=this.coerce(e.kind,o.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,l):this.setValue(e.key,l)}}" @change="${()=>this.resend()}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let t=this.pickers.get(e.key);if(t)return this.renderPickerField(e,t);let r=this.choices[e.key];return r==="loading"?Z`<div class="field"><div class="roxy-skeleton field-skeleton" aria-label="${this.t("Loading")}" role="status"></div></div>`:r||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return Bi(e,(t,r)=>this.t(t,r),t=>this.fieldText({name:t}))}repeatCount(e){return new Set(this.fields.map(t=>t.group&&Fi(t.group)).filter(t=>t&&t.key===e).map(t=>t.index)).size}addRecord(e){let t=this.repeatCount(e),r=_p(this.fields,e,t),s=this.groups.find(o=>o.key===Ot(e,0));if(s){let o=l=>l.replace(`${Ot(e,0)}.`,`${Ot(e,t)}.`);this.groups=[...this.groups,{...s,key:Ot(e,t),label:Bi(Ot(e,t)),...s.location&&{location:{...s.location,fields:s.location.fields.map(o)}}}]}let i={...this.values};for(let o of r)o.default!==void 0&&(i[o.key]=o.default);this.values=i,this.fields=[...this.fields,...r]}removeRecord(e){let t=Ot(e,this.repeatCount(e)-1);this.fields=this.fields.filter(s=>s.group!==t),this.groups=this.groups.filter(s=>s.key!==t);let r={...this.values};for(let s of Object.keys(r))s.startsWith(`${t}.`)&&delete r[s];this.values=r}repeatControls(e){let t=this.repeatCount(e.key);return e.max<=e.min?tt:Z`<div class="repeat-controls">${t<e.max?Z`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:tt} ${t>e.min?Z`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:tt}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):Up(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return Z`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?Z`<span class="req" aria-hidden="true">*</span>`:tt}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return Z`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,t=>this.pickChoice(e,t.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,t){let r=e?this.t("{{group}} city",{group:this.groupName(e)}):Up(this.placeField(e))?this.t("City of birth"):void 0;return Z`<roxy-location-search endpoint="${ma(this.locationUrl||void 0)}" publishable-key="${ma(this.publishableKey)}" .submitUrl="${this.route.submitUrl}" .submitContext="${this.route.submitContext}" lang="${ma(this.effectiveLang())}" placeholder="${ma(r)}" @roxy-location-select="${s=>t(s.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let t=this.fields.filter(r=>r.group===e&&this.isRendered(r));return Z`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):tt}<div class="fields">${t.map(r=>this.renderField(r))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return Z`<form><div class="roxy-skeleton form-skeleton"></div></form>`;if(this.specError)return Z`<div class="roxy-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=Dr(this.publishableKey);if(e)return Z`<form>${this.renderTitle()}<div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let t=this.fields.filter(d=>!d.group&&this.isRendered(d)),r=this.groupKeys().filter(d=>d!==void 0),s=t.filter(d=>!d.fold),i=t.filter(d=>d.fold),o=r.filter(d=>!this.groups.find(p=>p.key===d)?.fold),l=r.filter(d=>this.groups.find(p=>p.key===d)?.fold),c=i.length>0||l.length>0;return Z`<form @submit="${this.onSubmit}">${this.renderTitle()} ${this.validationErrors.length>0?Z`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:tt} ${this.renderIssueSummary()}<div class="fields">${s.map(d=>this.renderField(d))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):tt} ${o.map(d=>this.groupCard(d))} ${this.repeats.map(d=>this.repeatControls(d))} ${c?Z`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(d=>[...i.map(p=>p.key),...l].some(p=>d.path===p||d.path.startsWith(`${p}.`)))}"><summary>${this.t("Advanced")}${H()}</summary><div class="fields">${i.map(d=>this.renderField(d))}</div>${l.map(d=>this.groupCard(d))}</details>`:tt} ${this.selfSubmits?tt:Z`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,t){if(t!==""){if(e==="number"){let r=Number(t);return Number.isFinite(r)?r:void 0}return t}}};pe.styles=[u,M,qp,ou`form{gap:var(--roxy-space-md);background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);padding:var(--roxy-space-lg);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{margin:0}.fields{align-items:start;gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(22ch,1fr));display:grid}.fields:empty{display:none}.person-group{gap:var(--roxy-space-md);min-inline-size:0;padding:var(--roxy-space-md) 0 0;border:0;border-block-start:1px solid var(--roxy-border);margin:0;display:grid}.person-group legend{float:inline-start;color:var(--roxy-fg);font-weight:var(--roxy-weight-bold);padding:0}.field{gap:var(--roxy-space-xs);flex-direction:column;min-inline-size:0;display:flex}.fields>*{min-inline-size:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm);color:var(--roxy-secondary)}.req{color:var(--roxy-danger-fg);margin-inline-start:var(--roxy-space-xs)}input,select{inline-size:100%;min-inline-size:0;min-block-size:var(--roxy-touch)}.help{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.field-error{color:var(--roxy-danger-fg);font-size:var(--roxy-text-xs)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.help-details>summary{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-block-start:var(--roxy-space-xs);display:block}.location-block{gap:var(--roxy-space-xs);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(10ch,1fr));display:grid}.tiles.narrow{gap:var(--roxy-space-xs);grid-template-columns:repeat(auto-fill,minmax(4ch,1fr))}.tile{justify-content:center;align-items:center;gap:calc(var(--roxy-space-unit) / 2);min-block-size:var(--roxy-touch);padding:var(--roxy-space-sm);background:var(--roxy-bg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-size:var(--roxy-text-sm);cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing), background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-direction:column;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent)}.tile:disabled{cursor:default;color:var(--roxy-muted);border-style:dashed}.tile[aria-checked=true]{border-color:var(--roxy-accent);background:color-mix(in srgb, var(--roxy-accent) 12%, transparent);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.tile-glyph{font-size:var(--roxy-text-lg);line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm);display:flex}.toggle{box-sizing:content-box;block-size:.8lh;inline-size:1.6lh;padding:calc(var(--roxy-space-unit) / 2);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);background:var(--roxy-border);cursor:pointer;transition:background-color var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0;display:inline-flex}.toggle[aria-checked=true]{background:var(--roxy-accent);border-color:var(--roxy-accent)}.toggle .knob{border-radius:var(--roxy-radius-full);background:var(--roxy-bg);block-size:.8lh;inline-size:.8lh;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.toggle[aria-checked=true] .knob{transform:translate(100%)}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.advanced>summary{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);display:flex}.advanced[open]>summary{margin-block-end:var(--roxy-space-md)}.repeat-controls{gap:var(--roxy-space-sm);display:flex}.repeat-btn{color:var(--roxy-accent-ink);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink)}.advanced .fields,.advanced .person-group{margin-block-start:var(--roxy-space-md)}.validation-error{gap:var(--roxy-space-xs);border-inline-start:var(--roxy-line-thick) solid var(--roxy-danger);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-sm);display:grid}button.submit{min-block-size:var(--roxy-touch);background:var(--roxy-accent-ink);color:var(--roxy-bg);border-radius:var(--roxy-radius-md);padding:var(--roxy-space-sm) var(--roxy-space-lg);font-weight:var(--roxy-weight-bold);cursor:pointer;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.field-skeleton{block-size:var(--roxy-touch)}.form-skeleton{block-size:5lh}`],m([Zt({type:String,attribute:"data-endpoint"})],pe.prototype,"endpoint",2),m([Zt({type:String})],pe.prototype,"method",2),m([Zt({type:String,attribute:"spec-url"})],pe.prototype,"specUrl",2),m([Zt({type:String,attribute:"submit-label"})],pe.prototype,"submitLabel",2),m([Zt({type:String,attribute:"publishable-key"})],pe.prototype,"publishableKey",2),m([Zt({type:String,attribute:"location-url"})],pe.prototype,"locationUrl",2),m([Zt({attribute:!1})],pe.prototype,"initialValues",2),m([Zt({attribute:!1})],pe.prototype,"serverIssues",2),m([Zt({attribute:!1})],pe.prototype,"apiRoute",2),m([Zt({attribute:!1})],pe.prototype,"autoload",2),m([Zt({attribute:!1})],pe.prototype,"fullPages",2),m([ha()],pe.prototype,"choices",2),m([ha()],pe.prototype,"clearedIssues",2),m([ha()],pe.prototype,"fields",2),m([ha()],pe.prototype,"repeats",2),m([ha()],pe.prototype,"formTitle",2),m([ha()],pe.prototype,"hasLang",2),m([ha()],pe.prototype,"values",2),m([ha()],pe.prototype,"loaded",2),m([ha()],pe.prototype,"specError",2),m([ha()],pe.prototype,"validationErrors",2),pe=m([f("roxy-endpoint-form")],pe);import{css as mu,html as Ye,nothing as Mn}from"lit";import{property as gu}from"lit/decorators.js";var yu="12:00 UTC",sr=class extends y{constructor(){super(...arguments);this.heading="Ephemeris"}renderData(e){if(!e.days?.length)return this.renderEmpty();let t=this.toViewModel(e),r=this.effectiveLang();return Ye`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2><p class="month roxy-label"><span>${Xs(r,t.year,t.month)}</span><span>${yu}</span></p></header>${this.renderSignKey(t.signs)}<section part="section changes"><h3>${this.t("Sign changes and retrograde periods")}</h3><div role="list">${t.bodies.map(s=>this.renderTrack(s))}</div></section><section part="section daily"><h3>${this.t("Daily positions")}</h3><div class="scroll" part="table" tabindex="0" aria-label="${this.t("Daily positions")}">${this.renderGrid(t)}</div></section></div>`}renderSignKey(e){return e.length===0?Mn:Ye`<section part="section legend"><h3>${this.t("Signs in this month")}</h3><ul class="signkey" role="list">${e.map(t=>Ye`<li class="signkey-item"><span class="signkey-glyph" aria-hidden="true">${t.glyph}</span>${t.label}</li>`)}</ul></section>`}renderTrack(e){let t=$(e.name);return Ye`<div class="track" role="listitem"><span class="body-name">${t?Ye`<span class="glyph" aria-hidden="true">${t}</span>`:Mn}${e.label} </span><span class="span">${this.renderPosition(e.first)}<span class="arrow" aria-hidden="true">→</span>${this.renderPosition(e.last)} </span>${e.ingresses.length||e.retrogrades.length?Ye`<span class="chips roxy-chips">${e.ingresses.map(r=>this.renderIngressChip(r))} ${e.retrogrades.map(r=>this.renderRetrogradeChip(r))}</span>`:Mn}</div>`}renderPosition(e){let{degree:t,minute:r}=To(e.degreeInSign),s=N(e.sign),i=g(e,"sign");return Ye`<span class="pos" title="${i}">${t}${s?Ye`<span class="sg" aria-hidden="true">${s}</span>`:Ye`<span class="sg">${i}</span>`}${String(r).padStart(2,"0")}</span>`}renderIngressChip(e){let t=N(e.sign),r=Mr(this.effectiveLang(),e.date);return Ye`<span class="roxy-chip chip--ingress" aria-label="${this.t("Enters {{sign}} on {{date}}",{sign:e.signLabel,date:r})}"><span aria-hidden="true">→</span>${t?Ye`<span aria-hidden="true">${t}</span>`:Mn}${e.signLabel} <span class="chip-date">${r}</span></span>`}renderRetrogradeChip(e){let t=Ld(this.effectiveLang(),e.start,e.end);return Ye`<span class="roxy-chip chip--retro" data-tone="danger"><span aria-hidden="true">℞</span>${this.t("Retrograde {{range}}",{range:t})}</span>`}renderGrid(e){let t=this.effectiveLang();return Ye`<table><caption class="roxy-sr-only">${this.t("Every body with its position on each day of the month, as a zodiac sign and a degree.")}</caption><thead><tr><th scope="col" class="day">${this.t("Date")}</th>${e.bodies.map(r=>{let s=$(r.name);return Ye`<th scope="col" title="${r.label}">${s?Ye`<span class="glyph" aria-hidden="true">${s}</span><span class="roxy-sr-only">${r.label}</span>`:r.label}</th>`})}</tr></thead><tbody>${e.rows.map(r=>Ye`<tr><th scope="row" class="day">${$d(t,r.date)}</th>${r.cells.map((s,i)=>this.renderCell(s,e.bodies[i],r.date))}</tr>`)}</tbody></table>`}renderCell(e,t,r){if(!e)return Ye`<td>—</td>`;let s=[e.isRetrograde?"retro":"",t?.ingressDates.has(r)?"ingress":"",t?.stationDates.has(r)?"station":""].filter(Boolean).join(" ");return Ye`<td class="${s}">${this.renderPosition(e)}${e.isRetrograde?Ye`<span class="retro-mark" aria-label="${this.t("retrograde")}">℞</span>`:Mn}</td>`}toViewModel(e){let t=[],r=new Map;for(let o of e.days)for(let l of o.positions){let c=r.get(l.planet);c||(c=[],r.set(l.planet,c),t.push(l.planet)),c.push({date:o.date,p:l})}let s=[];for(let o of t){let l=r.get(o),c=l?.[0],d=l?.[l.length-1];if(!l||!c||!d)continue;let p=[],h=[],x=new Set,L=new Set;for(let v=0;v<l.length;v++){let w=l[v],O=l[v-1];if(!w||(O&&w.p.sign!==O.p.sign&&(p.push({date:w.date,sign:w.p.sign,signLabel:g(w.p,"sign")}),x.add(w.date)),O&&w.p.isRetrograde!==O.p.isRetrograde&&L.add(w.date),!w.p.isRetrograde))continue;let te=h[h.length-1];te&&O?.p.isRetrograde?te.end=w.date:h.push({start:w.date,end:w.date})}s.push({name:o,label:g(d.p,"planet"),first:c.p,last:d.p,ingresses:p,retrogrades:h,ingressDates:x,stationDates:L})}let i=e.days.map(o=>{let l=new Map(o.positions.map(c=>[c.planet,c]));return{date:o.date,cells:s.map(c=>l.get(c.name))}});return{year:e.year,month:e.month,bodies:s,rows:i,signs:this.toSignKey(e)}}toSignKey(e){let t=new Map;for(let s of e.days)for(let i of s.positions){let o=String(i.sign??"").toLowerCase();o&&!t.has(o)&&t.set(o,g(i,"sign"))}let r=[];for(let s of Re){let i=t.get(s.toLowerCase()),o=N(s);i&&o&&r.push({sign:s,label:i,glyph:o})}return r}};sr.endpoints=rc,sr.styles=[u,mu`:host{overflow-x:clip}.wrap{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap>*{min-width:0}h2,h3,p{margin:0}header,section{gap:var(--roxy-space-sm);display:grid}.month{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.signkey{gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.signkey-item{align-items:baseline;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);white-space:nowrap;display:inline-flex}.signkey-glyph{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}.track{align-items:center;gap:var(--roxy-space-xs) var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.body-name{align-items:baseline;gap:var(--roxy-space-xs);min-inline-size:16ch;font-weight:var(--roxy-weight-bold);display:inline-flex}.body-name .glyph{color:var(--roxy-accent-ink)}.span{align-items:baseline;gap:var(--roxy-space-xs);color:var(--roxy-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;display:inline-flex}.arrow{color:var(--roxy-muted)}.chips{margin-inline-start:auto}.chip-date{color:var(--roxy-muted)}.scroll{min-width:0;overflow-x:auto}table{font-size:var(--roxy-text-xs)}:is(th,td){white-space:nowrap}thead th .glyph{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}th.day{z-index:1;background:var(--roxy-bg);color:var(--roxy-fg);border-inline-end:1px solid var(--roxy-border);position:sticky;left:0}thead th.day{z-index:2}.sg{margin-inline:calc(var(--roxy-space-unit) / 2);color:var(--roxy-secondary);font-variant-numeric:normal}.retro-mark{font-weight:var(--roxy-weight-bold);margin-inline-start:calc(var(--roxy-space-unit) / 2)}td.retro,td.retro .sg{color:var(--roxy-danger-fg)}td.ingress{box-shadow:inset var(--roxy-line-thick) 0 var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}td.station{border-block-start:var(--roxy-line-thick) solid var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}`],m([gu({type:String})],sr.prototype,"heading",2),sr=m([f("roxy-ephemeris-table")],sr);import{css as uu,html as Wt,nothing as _n}from"lit";var ds=class extends y{renderData(a){let e=a.conjunctions??[],t=a.stars??[];return Wt`<div class="wrap" part="card"><header part="header"><h2>${this.t("Fixed stars")}</h2>${typeof a.orb=="number"?Wt`<p class="roxy-label">${this.t("Orb")} ${b(this.effectiveLang(),a.orb,1)}°</p>`:_n}</header>${a.summary&&!this.hideReadings?Wt`<p class="summary">${a.summary}</p>`:_n} ${e.length?Wt`<section part="section conjunctions"><h3>${this.t("Conjunctions to the chart")}</h3>${e.map((r,s)=>Wt`<details class="interp-card" part="reading" name="fixed-star-contacts" ?open="${s===0}"><summary><span class="interp-lead">${this.t("{{point}} conjunct {{star}}",{point:g(r,"point"),star:r.star})}</span> ${H()} <span class="interp-aside"><small>${this.t("orb {{value}}°",{value:b(this.effectiveLang(),r.orb,2)})}</small></span></summary>${r.interpretation&&!this.hideReadings?Wt`<div class="interp-body"><p>${r.interpretation}</p></div>`:_n}</details>`)}</section>`:Wt`<p class="empty-note">${this.t("No star sits within the orb of a natal point.")}</p>`} ${t.length?this.renderCatalog(t):_n}</div>`}renderCatalog(a){return Wt`<details class="catalog"><summary>${H()} ${this.t("Star catalog ({{count}})",{count:a.length})}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Precessed positions for the chart date")}"><table><caption class="roxy-label">${this.t("Precessed positions for the chart date")}</caption><thead><tr><th scope="col">${this.t("Star")}</th><th scope="col">${this.t("Position")}</th><th scope="col" class="num">${this.t("Mag")}</th><th scope="col">${this.t("Nature")}</th><th scope="col">${this.t("Keywords")}</th></tr></thead><tbody>${a.map(e=>{let t=N(e.sign);return Wt`<tr><td>${e.name}</td><td>${t?Wt`<span class="sg">${t}</span>`:_n}${Kt(e.degree)} ${e.sign}</td><td class="num">${b(this.effectiveLang(),e.magnitude,1)}</td><td>${e.nature}</td><td><ul class="kw roxy-chips">${(e.keywords??[]).map(r=>Wt`<li>${r}</li>`)}</ul></td></tr>`})}</tbody></table></div></details>`}};ds.endpoints=sc,ds.styles=[u,M,j,uu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}.summary{font-size:var(--roxy-text-sm)}.empty-note{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}section>h3{margin-block-end:var(--roxy-space-sm)}.interp-lead .point{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.interp-aside small{font-variant-numeric:tabular-nums}.catalog summary{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);display:flex}.scroll{min-width:0;margin-block-start:var(--roxy-space-sm);overflow-x:auto}table{width:100%}caption{caption-side:top;text-align:start;padding-block-end:var(--roxy-space-xs)}:is(th,td){white-space:nowrap}:is(th,td).num{text-align:end}.sg{color:var(--roxy-secondary);margin-inline-end:var(--roxy-space-xs)}.kw{max-inline-size:32ch}`],ds=m([f("roxy-fixed-stars")],ds);import{css as xu,html as se,nothing as he}from"lit";import{property as bu}from"lit/decorators.js";var Ui=["Southeast","South","Southwest","East","Center","West","Northeast","North","Northwest"];import{css as fu}from"lit";var Zi=fu`.plate-heading{font-size:var(--roxy-text-xs);color:var(--roxy-muted);font-weight:var(--roxy-weight-bold);hyphens:manual}@container (width<=30rem){.plate-heading{font-size:calc(var(--roxy-text-xs) / var(--roxy-text-scale) / var(--roxy-text-scale))}}`;var Wi={forward:"Forward",reverse:"Backward"};function ps(n){return"mountainCenterStar"in n}var nr=class extends y{constructor(){super(...arguments);this.mode="natal"}renderData(e){let t=this.effectiveLang(),r=this.mode!=="annual"&&ps(e);return se`<article class="card" part="card" aria-labelledby="flying-star-title"><header class="head" part="header"><h2 class="title" id="flying-star-title">${this.t("Flying star chart")}</h2>${ps(e)?r?se`<span class="period">${this.t("Period {{n}}",{n:P(t,e.period??0)})}</span>`:he:se`<span class="period">${e.year??""}</span>`}</header>${ps(e)?r?this.renderNatalFacts(e,t):he:this.renderAnnualFacts(e,t)}<div class="plate" part="chart plate" role="group" aria-label="${this.t("Flying star chart")}">${Ui.map(s=>this.renderPalace(e,s))}</div>${r?se`<div class="legend" part="legend"><span><span class="swatch swatch-mountain"></span>${this.t("Mountain star")}</span> <span><span class="swatch swatch-water"></span>${this.t("Water star")}</span> <span>${this.t("Period star")}</span></div>`:he} ${r&&ps(e)?this.renderStructure(e):he} ${this.renderPalaceRows(e)}</article>`}renderNatalFacts(e,t){return se`<div class="facts" part="details">${e.facing?se`<span><span class="roxy-label">${this.t("Facing")}</span> <b>${I(t,"facing",e.facing.label??"")}</b></span>`:he} ${e.sitting?se`<span><span class="roxy-label">${this.t("Sitting")}</span> <b>${I(t,"facing",e.sitting.label??"")}</b></span>`:he} ${typeof e.facingDegrees=="number"?se`<span>${P(t,e.facingDegrees)}°</span>`:he} ${e.mountainFlight?se`<span><span class="roxy-label">${this.t("Mountain star")}</span> ${Wi[e.mountainFlight]?this.t(Wi[e.mountainFlight]):e.mountainFlight}</span>`:he} ${e.waterFlight?se`<span><span class="roxy-label">${this.t("Water star")}</span> ${Wi[e.waterFlight]?this.t(Wi[e.waterFlight]):e.waterFlight}</span>`:he} ${e.straddling?se`<span><b>${this.t("Straddling")}</b></span>`:he}</div>`}renderAnnualFacts(e,t){return!e.changeoverDate&&typeof e.centerStar!="number"?he:se`<div class="facts" part="details">${typeof e.centerStar=="number"?se`<span><span class="roxy-label">${this.t("Center")}</span> <b>${P(t,e.centerStar)}</b></span>`:he} ${e.changeoverDate?se`<span>${R(t,e.changeoverDate)}</span>`:he}</div>`}paletteHeading(e,t){return t==="Center"?this.t("Center"):I(e,"facing",t)}renderPalace(e,t){let r=this.effectiveLang(),s=this.paletteHeading(r,t),i=(e.palaces??[]).find(d=>d.palace===t),o=this.mode!=="annual"&&ps(e);if(!i)return se`<div class="palace"><span class="palace-name plate-heading">${s}</span></div>`;let l=t==="Center";if(o&&ps(e)){let d=i;return se`<div class="palace ${l?"palace-center":""}"><span class="mountain" title="${this.t("Mountain star")}">${d.mountain??""}</span> <span class="water" title="${this.t("Water star")}">${d.water??""}</span> <span class="star" title="${this.t("Period star")}">${d.period??""}</span> <span class="palace-name plate-heading">${s}</span> ${d.combination?se`<span class="combo">${g(d.combination,"name")}</span>`:he}</div>`}let c=i;return se`<div class="palace ${l?"palace-center":""}"><span class="star">${c.star??""}</span> <span class="palace-name plate-heading">${s}</span> <span class="combo">${g(c,"name")}</span></div>`}renderStructure(e){let t=e.structure;return t?.name?se`<section part="section structure"><h3 class="block-title">${t.name}</h3>${t.meaning&&!this.hideReadings?se`<p class="structure" part="reading">${t.meaning}</p>`:he}</section>`:he}renderPalaceRows(e){let t=e.palaces??[];if(t.length===0)return he;let r=this.effectiveLang(),s=this.mode!=="annual"&&ps(e),i=t.map(o=>{let l=this.paletteHeading(r,o.palace??"");if(s){let d=o;return!d.reading&&!d.combination?he:se`<li class="row" part="label-track"><span class="roxy-label">${l}</span><div class="row-body">${d.combination?se`<span>${g(d.combination,"name")}</span>`:he} ${d.reading&&!this.hideReadings?se`<p part="reading">${d.reading}</p>`:he}</div></li>`}let c=o;return se`<li class="row" part="label-track"><span class="roxy-label">${l}</span><div class="row-body"><span>${g(c,"name")}</span> ${c.element?se`<span class="element-word ${bt(c.element)}">${g(c,"element")}</span>`:he}<dl class="star-facts">${c.nature?se`<div><dt>${this.t("Nature")}</dt><dd>${c.nature==="auspicious"?this.t("Favourable"):c.nature==="inauspicious"?this.t("Unfavourable"):c.nature}</dd></div>`:he} ${c.enhancer?se`<div><dt>${this.t("Enhancer")}</dt><dd>${c.enhancer}</dd></div>`:he} ${c.remedy?se`<div><dt>${this.t("Remedy")}</dt><dd>${c.remedy}</dd></div>`:he}</dl>${c.meaning&&!this.hideReadings?se`<p part="reading">${c.meaning}</p>`:he}</div></li>`});return i.every(o=>o===he)?he:se`<section part="section palaces"><ul class="rows">${i}</ul></section>`}};nr.endpoints=nc,nr.styles=[u,ca,Zi,rr,xu`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.period{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.plate{background:var(--roxy-border);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.palace{align-content:start;gap:calc(var(--roxy-space-unit) / 2);min-block-size:3.5lh;padding:var(--roxy-space-sm);background:var(--roxy-surface);grid-template-columns:1fr 1fr;display:grid}.palace-center{background:color-mix(in srgb, var(--roxy-accent) 8%, var(--roxy-surface))}.mountain,.water{font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.mountain{color:var(--roxy-info-fg);text-align:start}.water{color:var(--roxy-accent-ink);text-align:end}.star,.palace-name,.combo{text-align:center;grid-column:1/-1}.star{font-size:calc(var(--roxy-text-base) * 1.75);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.combo{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-mountain{background:var(--roxy-info)}.swatch-water{background:var(--roxy-accent)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.row-body p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}.star-facts{gap:var(--roxy-space-xs) var(--roxy-space-md);margin:var(--roxy-space-xs) 0 0;font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.star-facts div{gap:var(--roxy-space-xs);display:flex}.star-facts dt{color:var(--roxy-secondary);font-size:inherit}.star-facts dd{margin:0}.structure{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);border-block-start:0;margin:0}`],m([bu({type:String,reflect:!0})],nr.prototype,"mode",2),nr=m([f("roxy-flying-star-chart")],nr);import{css as vu,html as ir,nothing as Wp}from"lit";var hs=class extends y{renderData(a){let e=a.windows??[];if(e.length===0)return this.renderEmpty();let t=xt(this.effectiveLang(),a.startDate,a.endDate);return ir`<div class="wrap" part="card" aria-label="${this.t("Forecast digest")}"><div class="head" part="header"><h2>${this.t("Forecast digest")}</h2>${t?ir`<p class="subtitle">${t}</p>`:Wp}</div>${e.map(r=>this.renderWindow(r))}</div>`}windowLabel(a){return a===1?this.t("Next 24 hours"):typeof a=="number"?this.t("Next {{count}} days",{count:a}):this.t("Window")}renderWindow(a){let e=[...a.top??[]].sort((s,i)=>(i.significance??0)-(s.significance??0)),t=a.byDomain??{},r=Object.entries(t);return ir`<section class="window" part="section window"><div class="window-head" part="details"><h3>${this.windowLabel(a.days)}</h3><span class="window-count">${this.t("{{count}} events",{count:a.count??0})}</span></div>${r.length>0?ir`<div class="domains" part="legend">${r.map(([s,i])=>ir`<span class="domain-chip"><span class="swatch sw-${s}"></span>${S(s)} ${i}</span>`)}</div>`:Wp} ${e.length>0?ir`<div role="list">${e.map(s=>this.renderEvent(s))}</div>`:ir`<p class="quiet">${this.t("No notable events.")}</p>`}</section>`}renderEvent(a){let e=typeof a.significance=="number"?a.significance:0,t=this.hideReadings||a.description==null?S(a.type??""):a.description;return ir`<div class="event" part="label-track" role="listitem"><span class="event-date">${R(this.effectiveLang(),a.date)}</span> <span class="event-desc">${t}</span> <span class="sig" role="img" aria-label="${this.t("significance {{value}} of 100",{value:b(this.effectiveLang(),e,0)})}"><span class="sig-fill ${a.domain}" style="width:${Math.max(0,Math.min(100,e))}%"></span></span></div>`}};hs.endpoints=ic,hs.styles=[u,vu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.window{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.window:first-of-type{border-block-start:0;padding-block-start:0}.window-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.window-count{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.domains{gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.domain-chip{align-items:center;gap:var(--roxy-space-xs);color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:inline-flex}.swatch{border-radius:var(--roxy-radius-sm);block-size:.6lh;inline-size:.6lh;display:inline-block}.sw-western,.sig-fill.western{background:var(--roxy-accent)}.sw-vedic,.sig-fill.vedic{background:var(--roxy-info)}.sw-biorhythm,.sig-fill.biorhythm{background:var(--roxy-success)}.event{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);display:grid}.event-date{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.event-desc{font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-tight)}.sig{block-size:calc(var(--roxy-line-thick) * 2);border-radius:var(--roxy-radius-full);background:var(--roxy-border);grid-column:2;overflow:hidden}.sig-fill{height:100%;display:block}.quiet{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-style:italic}`],hs=m([f("roxy-forecast-digest")],hs);import{css as Lu,html as At,nothing as Nn}from"lit";var $u={western:"Western",vedic:"Vedic",biorhythm:"Biorhythm"},wu=["western","vedic","biorhythm"],ms=class extends y{renderData(a){let e=a.events??[],t=this.groupByDate(e),r=wu.filter(s=>e.some(i=>i.domain===s));return At`<div class="wrap" part="card" aria-label="${this.t("Forecast timeline")}"><header class="head" part="header"><h2>${this.t("Forecast timeline")}</h2>${a.startDate&&a.endDate?At`<div class="range">${xt(this.effectiveLang(),a.startDate,a.endDate)} · ${this.t("{{count}} events",{count:a.count??e.length})}</div>`:Nn}</header>${r.length?At`<div class="legend" part="legend">${r.map(s=>At`<span><span class="swatch swatch-${s}"></span>${$u[s]}</span>`)}</div>`:Nn} ${t.length?At`<div class="days" part="section events" role="list">${t.map(([s,i])=>this.renderDay(s,i))}</div>`:At`<p class="roxy-empty" role="status">${this.t("No events in this window")}</p>`}</div>`}groupByDate(a){let e=new Map;for(let t of a){let r=t.date??"",s=e.get(r)??[];s.push(t),e.set(r,s)}return[...e.entries()]}renderDay(a,e){return At`<div class="day" role="listitem"><div class="day-date">${R(this.effectiveLang(),a)}</div><div class="events">${e.map(t=>this.renderEvent(t))}</div></div>`}renderEvent(a){let e=typeof a.significance=="number"?a.significance:0,t=Math.max(0,Math.min(100,e));return At`<div class="event"><span class="dot dot-${a.domain}" aria-hidden="true"></span><div class="event-body"><div class="event-line">${this.renderHeadline(a)}</div>${a.description&&!this.hideReadings?At`<p class="event-desc">${a.description}</p>`:Nn}<div class="sig" title="${this.t("significance {{value}} of 100",{value:t})}"><span class="sig-track"><span class="sig-fill sig-fill-${a.domain}" style="width:${t}%"></span> </span><span class="sig-val">${t}</span></div></div></div>`}renderHeadline(a){let e=a.body?S(a.body):"",t=a.target?S(a.target):"",r=Ct({type:a.aspect}),s=r?tn(a.aspect)??Me({type:a.aspect}):"",i=typeof a.orb=="number"?b(this.effectiveLang(),a.orb,1):"",o=this.typeQualifier(a);return r&&t?At`<strong>${e}</strong> <span class="${Je({type:a.aspect})}">${s}</span> <strong>${t}</strong>${i?At`<span class="kind">${this.t("orb {{value}}°",{value:i})}</span>`:Nn}`:At`<strong>${e||S(a.type??"")}</strong>${o?At`<span class="kind">${o}</span>`:Nn}`}typeQualifier(a){return a.type==="sign-ingress"&&a.target?`enters ${S(a.target)}`:a.type==="retrograde-station"&&a.station?a.station:a.type==="eclipse"?[a.kind,"eclipse"].filter(Boolean).join(" "):a.type==="critical-day"?"critical day":a.type==="dasha-change"&&a.target?`dasha ${S(a.target)}`:S(a.type??"")}};ms.endpoints=oc,ms.styles=[u,va,Lu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.range{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.legend{gap:var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.legend .swatch{block-size:.6lh;inline-size:.6lh;border-radius:var(--roxy-radius-full);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-western,.dot-western,.sig-fill-western{background:var(--roxy-accent)}.swatch-vedic,.dot-vedic,.sig-fill-vedic{background:var(--roxy-info)}.swatch-biorhythm,.dot-biorhythm,.sig-fill-biorhythm{background:var(--roxy-success)}.day{gap:var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);grid-template-columns:9ch minmax(0,1fr);display:grid}.day:first-of-type{border-block-start:0}@container (width<=30rem){.day{grid-template-columns:minmax(0,1fr)}}.day-date{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;padding-block-start:calc(var(--roxy-space-unit) / 2)}.events{gap:var(--roxy-space-sm);display:grid}.event{align-items:start;gap:var(--roxy-space-sm);grid-template-columns:.4lh minmax(0,1fr);display:grid}.dot{block-size:.4lh;inline-size:.4lh;border-radius:var(--roxy-radius-full);margin-block-start:var(--roxy-space-xs)}.event-body{min-width:0}.event-line{font-size:var(--roxy-text-sm)}.event-line .kind{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.event-desc{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2)}.sig{align-items:center;gap:var(--roxy-space-xs);margin-block-start:var(--roxy-space-xs);display:flex}.sig-track{max-inline-size:16ch;block-size:calc(var(--roxy-line-thick) * 2);border-radius:var(--roxy-radius-full);background:var(--roxy-border);flex:1;overflow:hidden}.sig-fill{height:100%;display:block}.sig-val{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],ms=m([f("roxy-forecast-timeline")],ms);import{css as ku,html as Q,nothing as Ae}from"lit";import{ifDefined as Su}from"lit/directives/if-defined.js";var gs=class extends y{renderData(a){let e=this.effectiveLang(),t=a.chosen,r=a.input?.text??a.input?.textHebrew??"";return Q`<article class="card" part="card" aria-labelledby="gematria-title"><header class="head" part="header"><h2 id="gematria-title">${r?`${this.t("Gematria")} · ${r}`:this.t("Gematria")}</h2>${t?.hebrew?Q`<span class="hebrew" lang="he" dir="rtl">${t.hebrew}</span>`:Ae} ${this.chosenForm(a)?.romanization?Q`<span class="roman">${this.chosenForm(a)?.romanization}</span>`:Ae} ${t?.rule?Q`<p class="rule">${t.rule}</p>`:Ae}</header>${this.renderLetters(e,this.chosenForm(a)?.letters)} ${this.renderValues(e,a.values,this.t("Cipher values"))} ${this.renderForms(e,a)} ${this.renderTransformations(e,a.transformations)} ${this.renderLatin(e,a.latinValues)} ${this.renderMatches(e,a.matches)} ${this.renderConventions(a.conventions)}</article>`}chosenForm(a){let e=a.hebrewForms??[];return e.find(t=>t.hebrew===a.chosen?.hebrew)??e[0]}renderLetters(a,e){let t=e??[];return t.length===0?Ae:Q`<section part="section letters"><h3>${this.t("Letters")}</h3><div class="letters" part="chart" dir="rtl">${t.map(r=>Q`<div class="${`letter${r.isFinal?" is-final":""}`}" dir="ltr" title="${Su(r.isFinal?this.t("Final form"):void 0)}"><span class="glyph" lang="he">${r.glyph??""}</span> <span class="name">${r.name??""}</span> <span class="num">${P(a,r.value)}</span></div>`)}</div>${t.some(r=>r.isFinal)?Q`<p class="legend" part="legend"><span class="swatch"></span>${this.t("Final form")}</p>`:Ae}</section>`}renderValues(a,e,t){let r=(e??[]).filter(i=>typeof i.value=="number");if(r.length===0)return Ae;let s=r.some(i=>(i.alternateValues??[]).length>0);return Q`<section part="section values"><h3>${t}</h3><div class="scroll" tabindex="0" role="region" aria-label="${t}"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th>${s?Q`<th>${this.t("Also published")}</th>`:Ae}</tr></thead><tbody>${r.map(i=>Q`<tr><td>${S(i.id??"")}</td><td class="num">${P(a,i.value)}</td>${s?Q`<td class="num">${(i.alternateValues??[]).map(o=>P(a,o)).join(", ")}</td>`:Ae}</tr>`)}</tbody></table></div>${this.renderProvenance(r)}</section>`}renderProvenance(a){let e=new Map;for(let t of a)t.tradition&&!e.has(t.tradition)&&e.set(t.tradition,t.source);return e.size===0?Ae:Q`<p class="provenance"><span class="roxy-label">${this.t("Tradition")}</span> ${[...e].map(([t,r],s)=>Q`${s>0?" · ":""}${S(t)}${Zn(r)?Q`<a class="src" href="${r}" target="_blank" rel="noopener noreferrer">${this.t("Source")}</a>`:Ae}`)}</p>`}renderForms(a,e){let t=e.hebrewForms??[];return t.length<2?Ae:Q`<section part="section spellings"><h3>${this.t("Spellings")}</h3><ul class="forms">${t.map(r=>Q`<li class="form"><div><span class="hebrew" lang="he" dir="rtl">${r.hebrew??""}</span> ${r.hebrew===e.chosen?.hebrew?Q`<span class="chosen roxy-chip" data-tone="success">${this.t("Chosen")}</span>`:Ae}</div><span class="roman">${r.romanization??""}</span> ${r.rule?Q`<p class="rule">${r.rule}</p>`:Ae} ${this.renderFormTotals(a,r)}</li>`)}</ul></section>`}renderFormTotals(a,e){let t=(e.values??[]).find(r=>typeof r.value=="number");return t?Q`<p class="rule"><span class="roxy-label">${S(t.id??"")}</span> ${P(a,t.value)}</p>`:Ae}renderTransformations(a,e){let t=e??[];return t.length===0?Ae:Q`<section part="section substitutions"><h3>${this.t("Substitutions")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Substitutions")}"><table><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Output")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(r=>Q`<tr><td>${S(r.id??"")}</td><td>${r.output?Q`<span lang="he" dir="rtl">${r.output}</span>`:Ae} ${r.outputRomanization?Q`<span class="roman">${r.outputRomanization}</span>`:Ae}</td><td class="num">${P(a,r.value)}</td></tr>`)}</tbody></table></div></section>`}renderLatin(a,e){let t=e??[];return t.length===0?Ae:Q`<section part="section latin-ciphers"><h3>${this.t("Latin ciphers")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Latin ciphers")}"><table class="stacked"><thead><tr><th>${this.t("Cipher")}</th><th>${this.t("Value")}</th><th>${this.t("Tradition")}</th></tr></thead><tbody>${t.map(r=>Q`<tr><td data-label="${this.t("Cipher")}">${S(r.id??"")} ${r.lineage?Q`<p class="lineage">${r.lineage}</p>`:Ae}</td><td class="num" data-label="${this.t("Value")}">${P(a,r.value)}</td><td data-label="${this.t("Tradition")}">${S(r.tradition??"")}</td></tr>`)}</tbody></table></div></section>`}renderMatches(a,e){let t=e??[];return t.length===0?Ae:Q`<section part="section matches"><h3>${this.t("Equal values")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Equal values")}"><table class="stacked"><thead><tr><th>${this.t("Word")}</th><th>${this.t("Meaning")}</th><th>${this.t("Value")}</th></tr></thead><tbody>${t.map(r=>Q`<tr><td data-label="${this.t("Word")}"><span lang="he" dir="rtl">${r.hebrew??""}</span> <span class="roman">${r.romanization??""}</span></td><td data-label="${this.t("Meaning")}">${r.meaning??""} ${r.note&&!this.hideReadings?Q`<p class="match-note" part="reading">${r.note}</p>`:Ae}</td><td class="num" data-label="${this.t("Value")}">${P(a,r.value)}</td></tr>`)}</tbody></table></div></section>`}renderConventions(a){let e=this.effectiveLang(),t=[];for(let r of["transliteration","misparGadol"]){let s=a?.[r];s&&t.push([ae(e,r),I(e,r,s)])}return t.length===0?Ae:Q`<p class="provenance">${t.map(([r,s],i)=>Q`${i>0?" · ":""}<span class="roxy-label">${r}</span>${s}`)}</p>`}};gs.endpoints=lc,gs.styles=[u,er,ku`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{justify-items:start;gap:calc(var(--roxy-space-unit) / 2);min-width:0;display:grid}.hebrew{font-size:calc(var(--roxy-text-xl) * 1.3);font-weight:var(--roxy-weight-bold);line-height:1.4}.roman{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.rule{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.provenance .roxy-label,.rule .roxy-label{font-size:inherit;margin-inline-end:var(--roxy-space-xs)}.src{margin-inline-start:var(--roxy-space-xs)}.letters{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.letter{justify-items:center;gap:calc(var(--roxy-space-unit) / 2);min-inline-size:5ch;padding:var(--roxy-space-xs) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);display:grid}.letter .glyph{font-size:var(--roxy-text-lg);line-height:1.3}.letter .name{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.letter .num{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.letter.is-final{border-color:var(--roxy-accent)}.legend{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:var(--roxy-space-sm)}.legend .swatch{block-size:.6lh;inline-size:.6lh;border:1px solid var(--roxy-accent);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td.num{white-space:nowrap}.provenance{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:var(--roxy-space-sm)}.lineage,.match-note{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);white-space:normal;margin-block-start:calc(var(--roxy-space-unit) / 2)}a{color:var(--roxy-accent-ink)}.forms{gap:var(--roxy-space-md);margin:0;padding:0;list-style:none;display:grid}.form{gap:var(--roxy-space-xs);min-width:0;border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.form:first-child{border-block-start:0;padding-block-start:0}`],gs=m([f("roxy-gematria")],gs);import{css as Ru,html as Xt,nothing as ys}from"lit";var Xp=8,us=class extends y{renderData(a){let e=a.transitingPlanets??[];if(!e.length)return this.renderEmpty();let t=a.keyTransits??[],r=a.natalPlanets?.find(s=>s.name==="Moon")?.sign;return Xt`<div class="wrap" part="card" aria-label="${this.t("Gochara transits")}"><header class="head" part="header"><h2>${this.t("Gochara")}</h2><p class="sub">${this.t("Where each graha transits at {{when}}, read against the natal chart of {{birth}}.",{when:V(this.effectiveLang(),a.transitDatetime),birth:V(this.effectiveLang(),a.birthDatetime)})}</p>${r?Xt`<p class="sub">${this.t("Gochara houses are counted from the natal Moon in {{sign}}.",{sign:r})}</p>`:ys} ${X(this.effectiveLang(),a.frame,this.translator)}</header><div part="table">${e.map(s=>this.renderPlanet(s))}</div>${t.length&&!this.hideReadings?Xt`<section class="key" part="section key-transits"><h3>${this.t("Key transits")}</h3>${t.map(s=>Xt`<p class="key-item">${s.description}</p>`)}</section>`:ys}</div>`}renderPlanet(a){let e=$(a.name)??"",t=typeof a.longitude=="number"?jt(a.longitude):void 0;return Xt`<article class="row"><div class="row-top"><span class="graha">${e?Xt`<span class="glyph">${e}</span>`:ys}${a.name} </span><span class="pos">${t?`${a.sign} ${t}`:a.sign} </span>${typeof a.houseFromMoon=="number"?Xt`<span class="house moon roxy-chip">${this.t("house {{n}} from the Moon",{n:a.houseFromMoon})}</span>`:ys} ${typeof a.natalHouse=="number"?Xt`<span class="house lagna roxy-chip">${this.t("house {{n}} from the Lagna",{n:a.natalHouse})}</span>`:ys}</div>${this.renderKaksha(a.kaksha)} ${this.renderContacts(this.t("Drishti"),a.drishtiToNatal)} ${this.renderContacts(this.t("Aspects"),a.aspectsToNatal)}</article>`}renderContacts(a,e){return e?.length?Xt`<p class="aspects"><span class="contact-label">${a}</span> ${e.map(t=>typeof t.orb=="number"?this.t("{{aspect}} natal {{planet}} ({{orb}}°)",{aspect:Me({type:t.aspectType}),planet:t.natalPlanet,orb:b(this.effectiveLang(),t.orb,1)}):this.t("{{aspect}} natal {{planet}}",{aspect:Me({type:t.aspectType}),planet:t.natalPlanet})).join(" · ")}</p>`:ys}renderKaksha(a){if(!a||typeof a.number!="number")return ys;let e=a.number,t=a.bindu===!0?"yes":a.bindu===!1?"no":"",r=Xp,s=a.lord&&typeof a.startDegree=="number"&&typeof a.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}° to {{end}}° of the sign",{n:e,total:r,graha:a.lord,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)}):a.lord?this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}",{n:e,total:r,graha:a.lord}):typeof a.startDegree=="number"&&typeof a.endDegree=="number"?this.t("Kaksha {{n}} of {{total}}, spanning {{start}}° to {{end}}° of the sign",{n:e,total:r,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)}):this.t("Kaksha {{n}} of {{total}}",{n:e,total:r}),i=a.bindu===null||a.bindu===void 0?"":typeof a.binduCount=="number"?a.bindu?this.t("this kaksha lord gave bindu, {{count}} of {{total}} in this sign",{count:a.binduCount,total:r}):this.t("this kaksha lord gave no bindu, {{count}} of {{total}} in this sign",{count:a.binduCount,total:r}):a.bindu?this.t("this kaksha lord gave bindu"):this.t("this kaksha lord gave no bindu");return Xt`<div class="kaksha-bar" part="chart" role="img" aria-label="${this.t("Kaksha {{n}} of {{total}} within the current sign",{n:e,total:r})}">${Array.from({length:Xp},(o,l)=>Xt`<span class="seg ${l+1===e?`here ${t}`:""}"></span>`)}</div><p class="meta">${i?`${s} · ${i}`:s}</p>`}};us.endpoints=cc,us.styles=[u,G,Ru`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);display:grid}h2,h3,p{margin:0}.sub,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.pos{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.house.moon{border-color:var(--roxy-accent);color:var(--roxy-fg)}.contact-label{font-weight:var(--roxy-weight-bold);margin-inline-end:var(--roxy-space-xs)}.kaksha-bar{block-size:.4lh;margin-block:var(--roxy-space-xs);grid-template-columns:repeat(8,minmax(0,1fr));gap:1px;display:grid}.seg{background:var(--roxy-border);border-radius:var(--roxy-radius-sm)}.seg.here{background:var(--roxy-muted)}.seg.here.yes{background:var(--roxy-success)}.seg.here.no{background:var(--roxy-warning)}.aspects{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.key{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);display:grid}.key-item{font-size:var(--roxy-text-sm)}`],us=m([f("roxy-gochara-table")],us);import{css as Cu,html as ga,nothing as dn}from"lit";var Tu={varna:1,vashya:2,tara:3,yoni:4,"graha maitri":5,gana:6,bhakoot:7,nadi:8},fs=class extends y{renderData(a){let e=(a.breakdown??[]).filter(c=>c?.category!==void 0),t=a.total??0,r=a.maxScore??36,s=t/r*100,i=s>=70?"high":s>=50?"mid":"low",o=s*2.827,l=(100-s)*2.827;return ga`<article class="card" part="card" aria-label="${this.t("Guna Milan score")}"><div class="score-header" part="header"><div class="score-info"><div class="score-bar" part="details"><div><span class="total">${b(this.effectiveLang(),a.total,1)}</span> <span class="over">/ ${a.maxScore}</span> ${typeof a.percentage=="number"?ga`<small class="pct">${we(this.effectiveLang(),a.percentage,1)}</small>`:dn}</div><div class="verdict-wrap">${typeof a.isCompatible=="boolean"?ga`<span class="verdict roxy-chip ${a.isCompatible?"yes":"no"}" data-tone="${a.isCompatible?"success":"danger"}">${a.isCompatible?this.t("Compatible"):this.t("Not compatible")}</span>`:dn} ${a.recommendation&&!this.hideReadings?ga`<span class="recommendation">${a.recommendation}</span>`:dn}</div></div></div><div class="score-ring" part="chart" role="meter" aria-label="${this.t("Guna Milan score")}" aria-valuemin="0" aria-valuemax="${r}" aria-valuenow="${t}"><svg viewBox="0 0 100 100" aria-hidden="true"><circle class="ring-track" cx="50" cy="50" r="45"/><circle class="ring-fill" data-band="${i}" cx="50" cy="50" r="45" stroke-dasharray="${o},${l}" transform="rotate(-90 50 50)"/></svg></div></div>${e.length>0?ga`<div class="table-scroll" part="table"><table class="stacked"><caption class="roxy-sr-only">${this.t("Guna Milan breakdown: each koota with the classification of person 1 and person 2, and the score it earned out of its maximum.")}</caption><thead><tr><th scope="col">${this.t("Koota")}</th><th scope="col">${this.t("Person 1")}</th><th scope="col">${this.t("Person 2")}</th><th scope="col" class="bar-col">${this.t("Progress")}</th><th scope="col" class="score">${this.t("Points")}</th></tr></thead><tbody>${e.map(c=>{let d=c.score??0,p=c.maxScore??Eu(c.category),h=p?d/p*100:0;return ga`<tr><td>${c.category} ${c.description?ga`<small>${c.description}</small>`:dn}</td><td class="classification" data-label="${this.t("Person 1")}">${c.person1??""}</td><td class="classification" data-label="${this.t("Person 2")}">${c.person2??""}</td><td class="bar-cell bar-col"><div class="mini-bar"><span style="width:${h}%"></span></div></td><td class="score" data-label="${this.t("Points")}">${b(this.effectiveLang(),d,1)} / ${p}</td></tr>`})}</tbody></table></div>`:dn} ${(a.doshas?.length??0)>0||(a.doshaCancellations?.length??0)>0?ga`<ul class="tags roxy-chips" part="details">${a.doshas?.map(c=>ga`<li class="dosha roxy-chip" data-tone="danger">${c}</li>`)} ${a.doshaCancellations?.map(c=>ga`<li class="cancel roxy-chip" data-tone="success" title="${c.reason}">${this.t("{{dosha}} cancelled",{dosha:c.dosha})}</li>`)}</ul>`:dn} ${X(this.effectiveLang(),a.frame,this.translator)}</article>`}};fs.endpoints=dc,fs.styles=[u,G,er,Cu`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.card>*{min-width:0}.score-header{align-items:center;gap:var(--roxy-space-md);display:flex}.score-info{flex:1;min-width:0}.table-scroll{min-width:0;overflow-x:auto}.score-bar{align-items:center;gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr) auto;display:grid}.total{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.over,.pct{color:var(--roxy-muted)}.pct{font-size:var(--roxy-text-sm);margin-inline-start:var(--roxy-space-sm)}.verdict-wrap{justify-items:end;gap:var(--roxy-space-xs);text-align:end;display:grid}.verdict{font-weight:var(--roxy-weight-bold)}.recommendation{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.score-ring{flex-shrink:0;block-size:5lh;inline-size:5lh}.score-ring svg{block-size:100%;inline-size:100%;display:block}.ring-track,.ring-fill{fill:none;stroke-width:8px}.ring-track{stroke:var(--roxy-border)}.ring-fill{stroke:var(--roxy-danger);stroke-linecap:round}.ring-fill[data-band=mid]{stroke:var(--roxy-warning)}.ring-fill[data-band=high]{stroke:var(--roxy-success)}table{width:100%}td small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-start:calc(var(--roxy-space-unit) / 2);display:block}td.classification{color:var(--roxy-secondary);white-space:nowrap}:is(th,td).score{text-align:end}td.score{font-weight:var(--roxy-weight-bold)}td.bar-cell{width:22%}@container (width<=32rem){.bar-col{display:none}}@container (width<=26rem){.score-header{flex-direction:column-reverse;align-items:stretch}.score-ring{align-self:center}.score-bar{gap:var(--roxy-space-xs);grid-template-columns:minmax(0,1fr)}.verdict-wrap{text-align:start;justify-items:start}}.mini-bar{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.35lh;overflow:hidden}.mini-bar>span{background:var(--roxy-accent);block-size:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}`],fs=m([f("roxy-guna-milan")],fs);function Eu(n){return n&&Tu[n.toLowerCase()]||1}import{css as Du,html as Jt,nothing as Ra}from"lit";var xs=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this)}renderChart(e,t,r){let s=new Set(r?e.personAGates:(e.channels??[]).flatMap(h=>h.personAGates??[])),i=new Set(r?e.personBGates:(e.channels??[]).flatMap(h=>h.personBGates??[])),o=new Map;for(let h of new Set([...s,...i]))o.set(h,{left:s.has(h),right:i.has(h)});let l=new Set((e.centers??[]).filter(h=>h.defined).map(h=>h.id)),c=new Map((e.centers??[]).map(h=>[h.id,h.name])),d=new Map;for(let h of e.channels??[])d.set(h.gateA,h.name),d.set(h.gateB,h.name);let p=new Map;for(let[h,x]of o){let L=[x.left&&"A",x.right&&"B"].filter(Boolean).join(" + ");p.set(h,[`Gate ${h}`,d.get(h),L].filter(Boolean).join(" · "))}return Jt`<svg class="chart" part="chart" viewBox="${vi}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${t}"><title>${t}</title>${Li({definedCenters:l,gateSources:o,gateTitles:p,centerNames:c,stateWords:{defined:"Defined",open:"Open"}})}</svg> ${r?Ra:Jt`<p class="note">${t}</p>`}<div class="legend" part="legend"><span><span class="swatch source src-left"></span>Person A</span> <span><span class="swatch source src-right"></span>Person B</span> <span><span class="swatch"></span>Open center</span></div>`}renderData(e){let t=Array.isArray(e.personAGates)&&Array.isArray(e.personBGates),r=t?this.t("Combined bodygraph"):this.t("Defined channels"),s=e.channels??[],i=e.centers??[],o=i.filter(l=>l.defined).length;return Jt`<div class="wrap" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2>Connection</h2>${typeof e.totalChannels=="number"?Jt`<span class="count">${e.totalChannels} channels</span>`:Ra}</header>${this.chartViewport.renderChartViewport(this.renderChart(e,r,t),r,this.translator)} ${$a([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?S(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:i.length>0?`${o}/${i.length}`:void 0}])} ${this.hideReadings?Ra:Jt`<p class="lead">A connection chart reads the two charts as one bodygraph. Wherever the two of them together hold both gates of a channel, that channel is defined between them, and the centers it joins are defined in the connection whether or not either person defines them alone.</p>`} ${this.renderDynamics(e.summary)} ${this.renderCenters(i)} ${this.renderChannels(s,i)}</div>`}renderDynamics(e){if(!e)return Ra;let t=[{label:"Electromagnetic",aside:Xi(e.electromagnetic),body:"Each person holds one of the two gates, so the channel completes only when they are together. The classic point of attraction."},{label:"Dominance",aside:Xi(e.dominance),body:"One person holds both gates and the other holds neither, so the conditioning runs one way, from the person who carries the channel to the person who does not."},{label:"Compromise",aside:Xi(e.compromise),body:"One person holds both gates and the other holds a single hanging gate of the same channel, so the channel is complete for one of them and half open for the other."},{label:"Companionship",aside:Xi(e.companionship),body:"Both people independently hold both gates, so neither needs the other to complete it. A shared and familiar frequency rather than an attraction."}];return this.renderInterpretation(t,"hd-connection-dynamic","Dynamics")}renderCenters(e){return e.length===0?Ra:Jt`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?Ra:Jt`<p class="note">Defined is the state of the combined chart. Beside it is who already defines that center in their own chart. A center defined only together is what the connection itself creates: it is there when the two are together and gone when they are apart. The combined definition counts how the defined centers hang together, so Single is one connected piece and a split is more than one.</p>`} ${e.map(t=>{let r=t.definedBy??[],s=r.includes("A"),i=r.includes("B"),o=!!t.defined&&!s&&!i;return Jt`<div class="row"><span class="cname">${t.name??S(String(t.id??""))}</span> <span class="roxy-chip ${o?"together":""}" data-tone="${t.defined&&!o?"success":Ra}">${t.defined?o?"Only together":"Defined":"Open"} </span><span class="who">${Au(!!t.defined,s,i)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return Ra;let r=new Map(t.map(i=>[String(i.id??""),i.name??""])),s=i=>r.get(i)||S(i);return Jt`<section class="block" part="section channels"><h3>Channels</h3><div class="scroll" part="table" tabindex="0" role="region" aria-label="Connection channels"><table role="table"><caption class="roxy-sr-only">Connection channels: each channel with its gates, the centers it links, its circuit and dynamic, and the gates person A and person B each hold.</caption><thead><tr><th scope="col">Channel</th><th scope="col">Gates</th><th scope="col">Centers</th><th scope="col">Circuit</th><th scope="col">Dynamic</th><th scope="col">Person A holds</th><th scope="col">Person B holds</th></tr></thead><tbody>${e.map(i=>Jt`<tr><td>${i.name??""}</td><td class="gates">${i.gateA}-${i.gateB}</td><td>${(i.centers??[]).map(s).join(" to ")}</td><td>${i.circuit??""}</td><td>${i.dynamic?Jt`<span class="roxy-chip">${i.dynamic}</span>`:Ra}</td><td class="held">${Jp(i.personAGates)}</td><td class="held">${Jp(i.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};xs.endpoints=pc,xs.styles=[u,M,j,Za,$i,Ge,Du`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-block-end:var(--roxy-space-sm)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.row:last-child{border-block-end:0}.cname{flex:1;min-width:16ch}.roxy-chip.together{color:var(--roxy-accent-ink);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.who{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}table{width:100%}th,td{white-space:nowrap}tbody tr:last-child td{border-block-end:0}.gates{font-variant-numeric:tabular-nums;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.held{font-variant-numeric:tabular-nums}.scroll{min-width:0;overflow-x:auto}.wrap{--src-left:var(--roxy-info-fg);--src-right:var(--roxy-warning-fg);--src-ink:var(--roxy-bg)}`],xs=m([f("roxy-hd-connection")],xs);function Xi(n){if(typeof n=="number")return n===0?"None":n===1?"1 channel":`${n} channels`}function Jp(n){let a=n??[];return a.length>0?a.join(", "):"Neither"}function Au(n,a,e){return a&&e?"Defined in both charts":a?"Defined by A":e?"Defined by B":n?"Defined by neither alone, only by the connection":"Open in both charts"}import{css as Gu,html as gt,nothing as Gt}from"lit";import{nothing as Pu,svg as On}from"lit";var sl=360,Mu=470,nl=8,th=sl-nl*2,Qi=48,zn=15,rl=7,Qp=16,Ji=[{id:"throat",label:"Throat",y:0},{id:"g",label:"G",y:211},{id:"sacral",label:"Sacral",y:422}],ah=`0 0 ${sl} ${Mu}`;function _u(n,a){return nl+th*(n*2+1)/(a*2)}function rh(n){return En[n.gateA]==="throat"||En[n.gateB]==="throat"}function Nu(n){return(rh(n)?En[n.gateA]==="throat":En[n.gateA]==="g")?n.gateA:n.gateB}function zu(){return Ji.map(n=>On`<g>
83
+ <rect class="pn-bar" x=${nl} y=${n.y} width=${th} height=${Qi} rx="10" />
84
+ <text class="pn-bar-label" x=${sl/2} y=${n.y+Qi/2} text-anchor="middle" dominant-baseline="central">${n.label}</text>
287
85
  </g>`)}function Ou(n,a,e,t){return e.map((r,s)=>On`<g>
288
- <circle class="pn-badge" cx=${n+(s-(e.length-1)/2)*Jp} cy=${a} r=${al} />
289
- <text class="pn-badge-text" x=${n+(s-(e.length-1)/2)*Jp} y=${a} text-anchor="middle" dominant-baseline="central">${t(r)}</text>
290
- </g>`)}function Qp(n,a,e,t,r,s){let i=t.length>0;return On`<g>
86
+ <circle class="pn-badge" cx=${n+(s-(e.length-1)/2)*Qp} cy=${a} r=${rl} />
87
+ <text class="pn-badge-text" x=${n+(s-(e.length-1)/2)*Qp} y=${a} text-anchor="middle" dominant-baseline="central">${t(r)}</text>
88
+ </g>`)}function eh(n,a,e,t,r,s){let i=t.length>0;return On`<g>
291
89
  <circle class="pn-gate-dot ${i?"on":""}" cx=${n} cy=${a} r=${zn} />
292
90
  <text class="pn-gate ${i?"on":""}" x=${n} y=${a} text-anchor="middle" dominant-baseline="central">${e}</text>
293
91
  ${Ou(n,a+s,t,r)}
294
- </g>`}function rh(n){let a=[];for(let e of[!0,!1]){let t=n.rungs.filter(c=>ah(c)===e),r=e?Ji:Xi[1].y+Ji,s=e?Xi[1].y:Xi[2].y,i=r+26,o=s-26,l=(i+o)/2;t.forEach((c,d)=>{let p=_u(d,t.length),h=Nu(c),x=h===c.gateA?c.gateB:c.gateA,L=`pn-rung ${c.defined?"on":""} ${c.isCore?"core":""}`;a.push(On`<g>
92
+ </g>`}function sh(n){let a=[];for(let e of[!0,!1]){let t=n.rungs.filter(c=>rh(c)===e),r=e?Qi:Ji[1].y+Qi,s=e?Ji[1].y:Ji[2].y,i=r+26,o=s-26,l=(i+o)/2;t.forEach((c,d)=>{let p=_u(d,t.length),h=Nu(c),x=h===c.gateA?c.gateB:c.gateA,L=`pn-rung ${c.defined?"on":""} ${c.isCore?"core":""}`;a.push(On`<g>
295
93
  <line class=${L} x1=${p} y1=${i+zn} x2=${p} y2=${l-13} />
296
94
  <line class=${L} x1=${p} y1=${l+13} x2=${p} y2=${o-zn} />
297
95
  <text class="pn-name ${c.defined?"on":""}" x=${p} y=${l} text-anchor="middle" dominant-baseline="central">${c.name}</text>
298
- ${Qp(p,i,h,n.holders.get(h)??[],n.letterFor,zn+al+7)}
299
- ${Qp(p,o,x,n.holders.get(x)??[],n.letterFor,-(zn+al+7))}
300
- </g>`)})}return On`${zu()}${a.length>0?a:Pu}`}var bs=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this)}renderChart(e){let t=(e.channels??[]).filter(s=>s.gateA!=null&&s.gateB!=null).map(s=>({gateA:s.gateA,gateB:s.gateB,name:s.name??"",defined:s.defined===!0,isCore:s.isCore===!0}));if(t.length===0)return Gt;let r=new Map((e.gates??[]).filter(s=>s.gate!=null).map(s=>[s.gate,s.heldBy??[]]));return gt`<svg class="chart" part="chart" viewBox="${th}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Penta ladder: the Throat, G and Sacral with the six penta channels between them, each marked defined or open and lettered with the members holding its gates"><title>Penta</title>${rh({rungs:t,holders:r,letterFor:sh})}</svg>`}renderData(e){let t=e.channels??[],r=e.gates??[],s=e.summary,i=s?.gapGates??[],o=t.some(l=>l.isCore);return gt`<div class="wrap" part="card" aria-label="Human Design penta"><header class="head" part="header"><h2>Penta</h2>${typeof e.memberCount=="number"?gt`<span class="count">${e.memberCount} members</span>`:Gt}</header>${this.chartViewport.renderChartViewport(this.renderChart(e),"Penta",this.translator)} ${$a([{label:"Members",value:e.memberCount?.toString()},{label:"Defined channels",value:typeof s?.definedChannels=="number"&&t.length>0?`${s.definedChannels} of ${t.length}`:void 0},{label:"Filled gates",value:typeof s?.filledGates=="number"&&r.length>0?`${s.filledGates} of ${r.length}`:void 0},{label:"Core",value:typeof s?.coreDefined=="boolean"?s.coreDefined?"Defined":"Open":void 0},{label:"Gap gates",value:i.length>0?i.join(", "):void 0}])} ${this.hideReadings?Gt:gt`<p class="lead">A penta is the field three to five people form when they work as a group. It is read from the twelve penta gates the members bring between them: a channel with both of its gates held somewhere in the group is a defined Strength, and a gate no member holds is a gap the group has to compensate for.</p>`} ${this.renderGroup("Upper (direction)",t.filter(l=>l.position==="upper"),"Upper channels run from the G Center to the Throat. They carry the leadership of the group and how it presents itself.")} ${this.renderGroup("Lower (execution)",t.filter(l=>l.position==="lower"),"Lower channels run from the G Center to the Sacral. They carry the managed, generative, resource work.")} ${this.renderGroup("Channels",t.filter(l=>l.position!=="upper"&&l.position!=="lower"))} ${o&&!this.hideReadings?gt`<p class="footnote">Core is the 2/14 Channel of the Beat, the material core of the penta: gate 2 sets the direction for resources, gate 14 is the resources themselves.</p>`:Gt} ${this.renderGates(r)} ${t.length>0||r.length>0?gt`<p class="footnote" part="legend">Members are lettered in the order they were sent, so A is the first member of the group.</p>`:Gt}</div>`}renderGroup(e,t,r){return t.length===0?Gt:gt`<div class="section" part="section channels"><h3>${e}</h3>${r&&!this.hideReadings?gt`<p class="note">${r}</p>`:Gt} ${t.map(s=>gt`<div class="row"><span class="gates">${s.gateA}-${s.gateB}</span> <span class="cname">${s.name??""} ${s.circuit?gt`<span class="circuit">${s.circuit} circuit</span>`:Gt} </span><span class="roxy-chip" data-tone="${s.defined?"success":Gt}">${s.defined?"Defined":"Open"}</span> ${s.isCore?gt`<span class="roxy-chip core">Core</span>`:Gt} <span class="held">Gate ${s.gateA} held by ${nl(s.gateAHeldBy)}. Gate ${s.gateB} held by ${nl(s.gateBHeldBy)}.</span></div>`)}</div>`}renderGates(e){if(e.length===0)return Gt;let t=e.filter(r=>r.filled).length;return gt`<div class="section" part="section gates"><h3>Gates (${t} of ${e.length} filled)</h3>${this.hideReadings?Gt:gt`<p class="note">The role each gate brings to the group, and who carries it. A gap is a role no member holds, so the group compensates for it.</p>`} ${e.map(r=>gt`<div class="row"><span class="gate-id">${r.gate}</span> <span class="cname">${r.gateName??""}</span> ${r.filled?gt`<span class="who">Held by ${nl(r.heldBy)}</span>`:gt`<span class="roxy-chip" data-tone="danger">Gap</span>`}</div>`)}</div>`}};bs.endpoints=pc,bs.styles=[u,Ge,Za,Gu`.chart{width:100%;max-width:var(--roxy-chart-max-width,22rem);height:auto;margin:0 auto;display:block}.pn-bar{fill:color-mix(in srgb, var(--roxy-accent) 12%, transparent);stroke:var(--roxy-accent-ink);stroke-width:1.5px}.pn-bar-label{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .9375);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.pn-rung{stroke:var(--roxy-border);stroke-width:6px;stroke-dasharray:6 6}.pn-rung.on{stroke:var(--roxy-accent-ink);stroke-dasharray:none}.pn-rung.on.core{stroke-width:9px}.pn-name{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .75);font-family:var(--roxy-font-sans)}.pn-name.on{fill:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pn-gate-dot{fill:var(--_mask);stroke:var(--roxy-border);stroke-width:1.5px;stroke-dasharray:4 4}.pn-gate-dot.on{stroke:var(--roxy-accent-ink);stroke-dasharray:none}.pn-gate{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.pn-gate.on{fill:var(--roxy-fg)}.pn-badge{fill:var(--roxy-accent-ink)}.pn-badge-text{fill:var(--roxy-bg);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.section{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.note{margin-block-start:var(--roxy-space-xs)}.note,.held,.who,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.row:last-child{border-block-end:0}.gates,.gate-id{font-variant-numeric:tabular-nums;min-width:5ch;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.cname{flex:1;min-width:16ch}.circuit{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.held{flex-basis:100%}.roxy-chip.core{color:var(--roxy-accent-ink);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}`],bs=m([f("roxy-hd-penta")],bs);var Iu="ABCDE",sh=n=>Iu[n]??String(n+1);function nl(n){let a=(n??[]).map(sh);return a.length>0?a.join(", "):"nobody"}import{css as Fu,html as pn,nothing as Qi}from"lit";var vs=class extends y{renderData(a){return Bu(a)?this.renderType(a):this.renderProfile(a)}renderType(a){return pn`<div class="wrap" part="card"><header class="head" part="header"><h2>${this.t("Type")}</h2>${a.type||a.profile?pn`<div class="type-line">${[g(a,"type"),a.profile?this.t("Profile {{profile}}",{profile:a.profile}):""].filter(Boolean).join(" · ")}</div>`:Qi}</header>${$a([{label:this.t("Type"),value:g(a,"type")},{label:this.t("Strategy"),value:g(a,"strategy")},{label:this.t("Authority"),value:g(a,"authority")},{label:this.t("Profile"),value:a.profile}])} ${a.typeDescription&&!this.hideReadings?pn`<p class="lead">${a.typeDescription}</p>`:Qi} ${wi(a.signature?g(a,"signature"):void 0,a.notSelf?g(a,"notSelf"):void 0,this.translator)} ${this.renderInterpretation([{label:this.t("Strategy"),aside:g(a,"strategy"),body:a.strategyDescription},{label:this.t("Authority"),aside:g(a,"authority"),body:a.authorityDescription},{label:this.t("Aura"),body:a.aura}],"hd-type-reading")}</div>`}renderProfile(a){return pn`<div class="wrap" part="card"><header class="head" part="header"><h2>${this.t("Profile")}</h2>${a.profile?pn`<div class="type-line">${a.profile}</div>`:Qi}</header>${$a([{label:this.t("Profile"),value:a.profile},{label:this.t("Personality line"),value:a.personalityLine?.toString()},{label:this.t("Design line"),value:a.designLine?.toString()}])} ${this.hideReadings?Qi:pn`<section class="block" part="section lines"><h3>${this.t("Lines")}</h3>${ki({personality:a.personalityKeynote,personalityLine:a.personalityLine,design:a.designKeynote,designLine:a.designLine},this.translator)}</section>`}</div>`}};vs.endpoints=hc,vs.styles=[u,M,j,Za,Fu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.type-line{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`],vs=m([f("roxy-hd-type-card")],vs);function Bu(n){return typeof n.type=="string"}import{css as Hu,html as nt,nothing as It}from"lit";var Ls=class extends y{renderData(a){let e=[...a.arrows??[]].sort((t,r)=>nh(t.position)-nh(r.position));return nt`<div class="wrap" part="card" aria-label="${this.t("Human Design variables")}"><h2 part="header">${this.t("Variables")}</h2><div class="grid" part="details arrows">${e.map(t=>this.renderArrow(t))}</div>${a.confident===!1?nt`<p class="note" role="note">${typeof a.confidenceMarginDeg=="number"?this.t("Low confidence: a birth time near a color or tone boundary (within {{margin}}°). Verify the exact birth time.",{margin:a.confidenceMarginDeg}):this.t("Low confidence: a birth time near a color or tone boundary. Verify the exact birth time.")}</p>`:It} ${this.renderReading(e,a.baseDescription)}</div>`}renderArrow(a){let e=a.direction==="left"?"←":"→",t=g(a,"baseName");return nt`<div class="arrow"><div class="arrow-head"><span class="glyph ${a.activation?.side??""}" aria-hidden="true">${e}</span> <span class="name">${g(a,"name")}</span></div>${a.layer?nt`<span class="layer">${g(a,"layer")}</span>`:It} <span class="labels">${[g(a,"directionLabel"),g(a,"colorLabel")].filter(Boolean).join(" · ")} </span>${typeof a.color=="number"?nt`<span class="ctb">${this.t("Color {{color}} · Tone {{tone}} · Base {{base}}",{color:a.color,tone:a.tone??"",base:a.base??""})}${t?`, ${t}`:""}</span>`:It} ${a.activation?.planet?nt`<span class="ctb">${[g(a.activation,"planet"),$i(a.activation.side,this.translator)].filter(Boolean).join(" · ")}</span>`:It} ${a.confident===!1?nt`<span class="note" role="note">${this.t("Knife-edge: could flip with a more precise birth time.")}</span>`:It}</div>`}renderReading(a,e){let t=a.filter(i=>i.description||i.colorMeaning);if(t.length===0||this.hideReadings)return It;let r=new Map;for(let i of t){let o=i.layer??"",l=r.get(o);l?l.push(i):r.set(o,[i])}let s=0;return nt`<section class="block" part="section readings"><h3>${this.t("Reading")}</h3>${[...r].map(([i,o])=>nt`<div class="group">${i?nt`<p class="group-head">${g(o[0],"layer")}</p>`:It} ${o[0]?.layerDescription?nt`<p class="group-note">${o[0].layerDescription}</p>`:It} ${o.map(l=>this.renderArrowReading(l,s++===0))}</div>`)} ${e?nt`<p class="footnote">${this.t("Base")}. ${e}</p>`:It}</section>`}renderArrowReading(a,e){let t=a.cognition,r=t?g(t,"label"):"",s=[{label:this.t("Color"),body:a.colorMeaning},{label:this.t("Tone"),body:a.toneMeaning},{label:this.t("Direction"),body:a.directionMeaning},{label:r?`${this.t("Cognition")} · ${r}`:this.t("Cognition"),body:t?.description}].filter(i=>!!i.body);return nt`<details class="interp-card" part="reading" name="hd-variable" ?open="${e}"><summary><span class="interp-lead">${g(a,"name")}</span> ${H()} ${a.position?nt`<span class="interp-aside"><small>${g(a,"position")}</small></span>`:It}</summary><div class="interp-body">${a.description?nt`<p>${a.description}</p>`:It} ${s.length>0?nt`<dl class="facets">${s.map(i=>nt`<dt>${i.label}</dt><dd>${i.body}</dd>`)}</dl>`:It}</div></details>`}};Ls.endpoints=mc,Ls.styles=[u,M,j,Hu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.grid{gap:0 var(--roxy-space-lg);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.arrow{align-content:start;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.arrow-head{align-items:center;gap:var(--roxy-space-sm);display:flex}.glyph{font-size:var(--roxy-text-xl);color:var(--roxy-accent-ink);line-height:1}.glyph.design{color:var(--roxy-danger-fg)}.glyph.personality{color:var(--roxy-fg)}.name{font-weight:var(--roxy-weight-bold)}.layer,.ctb{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.ctb{font-variant-numeric:tabular-nums}.labels{font-size:var(--roxy-text-sm)}.note{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs)}@container (width<=28rem){.grid{grid-template-columns:minmax(0,1fr)}}.group+.group{margin-block-start:var(--roxy-space-md)}.group-head{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-note,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.group-note{margin-block-end:var(--roxy-space-sm)}.facets{gap:var(--roxy-space-xs);margin:0;display:grid}.facets dd{margin:0}`],Ls=m([f("roxy-hd-variables")],Ls);function nh(n){switch(n){case"Top left":return 0;case"Top right":return 1;case"Bottom left":return 2;case"Bottom right":return 3;default:return 99}}import{css as ju,html as or,nothing as il}from"lit";var Ku={udaya:"Rose",asta:"Set"},Vu={udaya:"rises",asta:"sets"},$s=class extends y{renderData(a){let e=a.grahas??[];return e.length?or`<div class="wrap" part="card" aria-label="${this.t("Heliacal visibility")}"><header class="head" part="header"><h2>${this.t("Heliacal rising and setting")}</h2><p class="sub">${this.t("Whether each graha stands far enough from the Sun to be seen, for {{date}}. The Sun and the nodes never appear here: they have no heliacal event.",{date:a.date})}</p></header><div part="table">${e.map(t=>this.renderGraha(t))}</div></div>`:this.renderEmpty()}renderGraha(a){let e=$(a.graha)??"";return or`<article class="row"><div class="row-top"><span class="graha">${e?or`<span class="glyph">${e}</span>`:il}${a.graha} </span><span class="state roxy-chip ${a.visible?"visible":"invisible"}" data-tone="${a.visible?il:"warning"}">${a.visible?this.t("Visible"):this.t("Invisible")} </span>${a.retrograde?or`<span class="retro" title="${this.t("retrograde")}">R</span>`:il}</div><p class="window" part="window">${this.windowLine(a)}</p><p class="meta" part="details">${this.metaLine(a)}</p></article>`}windowLine(a){let e=a.nextEvent,t=a.lastEvent;if(e){let r={event:this.t(Vu[e.type]),where:e.horizon==="east"?this.t("in the east"):this.t("in the west"),when:V(this.effectiveLang(),e.datetime)};return or`${a.visible?this.t("Visible until it {{event}} {{where}} on {{when}}",r):this.t("Invisible until it {{event}} {{where}} on {{when}}",r)}`}return t?or`${this.t("{{event}} {{where}} on {{when}}, with no further event inside the search window",{event:this.t(Ku[t.type]),where:t.horizon==="east"?this.t("in the east"):this.t("in the west"),when:V(this.effectiveLang(),t.datetime)})}`:or`${this.t("No rising or setting inside the search window, which is normal for a graha far from the Sun")}`}metaLine(a){let e=a.horizon==="east"?this.t("a morning graha, read before sunrise"):this.t("an evening graha, read after sunset"),t=a.nextEvent??a.lastEvent,r=t&&t.kalamsa!==a.kalamsa,s={degrees:b(this.effectiveLang(),a.timeDegrees,2),limit:b(this.effectiveLang(),a.kalamsa,0),shifted:r?b(this.effectiveLang(),t.kalamsa,0):""};return or`${r?this.t("{{degrees}}° of time from the Sun against a limit of {{limit}}°, becoming {{shifted}}° at that event",s):this.t("{{degrees}}° of time from the Sun against a limit of {{limit}}°",s)} · ${e}`}};$s.endpoints=gc,$s.styles=[u,ju`.wrap{overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);display:grid}h2,p{margin:0}.sub,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.window{font-size:var(--roxy-text-sm)}`],$s=m([f("roxy-heliacal-table")],$s);import{css as qu,html as Ue,nothing as it}from"lit";var ws=class extends y{resolveHexagram(){let a=this.data;if(!a)return null;if("hexagram"in a&&a.hexagram){if("lines"in a){let s=a,i=s.hexagram;return{hex:i,lines:s.lines,date:s.date,changingLinePositions:s.changingLinePositions,changingLines:s.changingLines??i.changingLines,resultingHexagram:s.resultingHexagram}}let t=a,r=t.hexagram;return{hex:r,changingLines:r.changingLines,dailyMessage:t.dailyMessage,date:t.date}}let e=a;return{hex:e,changingLines:e.changingLines}}renderData(){let a=this.resolveHexagram();if(!a)return this.renderEmpty();let{hex:e,lines:t,changingLinePositions:r,changingLines:s,dailyMessage:i,date:o,resultingHexagram:l}=a;return Ue`<article class="card" part="card" aria-label="${this.t("I Ching hexagram")}">${this.renderHexagram("hexagram",e,t,r,s,i,o)} ${l?Ue`<details class="result" part="section resulting-hexagram"><summary>${this.t("Becomes hexagram {{number}} {{name}}.",{number:l.number,name:l.english??l.chinese??""})}${H()}</summary><div class="result-chart">${this.renderHexagram("result",l)}</div></details>`:it}</article>`}renderHexagram(a,e,t,r,s,i,o){let l=t??this.derivedLines(e),c=new Set(r??[]),d=!this.hideReadings;return Ue`<div class="glyphs" part="chart">${e.symbol?Ue`<div class="symbol">${e.symbol}</div>`:it} ${l.length>0?Ue`<div class="lines" aria-hidden="true">${l.slice().reverse().map((p,h)=>{let x=l.length-1-h+1,L=c.has(x),v=p===6||p===8;return Ue`<div class="line ${`${v?"broken":"solid"}${L?" changing":""}`}">${v?Ue`<span class="seg"></span><span class="seg"></span>`:Ue`<span class="seg"></span>`}</div>`})}</div>`:it}</div><div part="header"><h2>${[e.number!=null?`${e.number}.`:"",e.english??e.chinese??this.t("I Ching hexagram")].filter(Boolean).join(" ")}</h2>${o?Ue`<time class="daily-date" part="details" datetime="${o}">${R(this.effectiveLang(),o)}</time>`:it}<p class="subtitle">${e.chinese?Ue`${e.chinese}`:it} ${e.pinyin?Ue`· ${e.pinyin}`:it}</p><div class="trigrams roxy-label" part="details">${e.upperTrigram?Ue`<div>${this.t("Upper")} <span class="tri-glyph">${So(e.upperTrigram)??""}</span>${e.upperTrigram}</div>`:it} ${e.lowerTrigram?Ue`<div>${this.t("Lower")} <span class="tri-glyph">${So(e.lowerTrigram)??""}</span>${e.lowerTrigram}</div>`:it}</div>${e.judgment&&d?Ue`<p class="judgment">${e.judgment}</p>`:it} ${e.image&&d?Ue`<p class="image">${e.image}</p>`:it} ${i&&d?Ue`<p class="message">${i}</p>`:it} ${e.interpretation?.general&&d?Ue`<p>${e.interpretation.general}</p>`:it} ${c.size>0?Ue`<div class="changes" part="section changing-lines">${this.t("Changing lines: {{lines}}.",{lines:Array.from(c).sort((p,h)=>p-h).join(", ")})}</div>`:it} ${this.renderTopics(e,a)} ${this.renderLines(s??e.changingLines,c,`${a}-lines`)}</div>`}renderTopics(a,e){let t=a.interpretation;return t?this.renderInterpretation([{label:this.t("Love"),body:t.love??""},{label:this.t("Career"),body:t.career??""},{label:this.t("Decision"),body:t.decision??""},{label:this.t("Advice"),body:t.advice??""}].filter(r=>r.body),`${e}-topics`,"Readings"):it}renderLines(a,e,t){let r=a??[];if(r.length===0)return it;let s=e.size>0,i=s?r.filter(l=>e.has(l.position)):r;if(i.length===0)return it;let o=i.map(l=>({label:`Line ${l.position}`,body:l.text??"",extra:l.meaning?Ue`<p class="line-meaning">${l.meaning}</p>`:it}));return this.renderInterpretation(o,t,s?"Changing lines":"Lines")}derivedLines(a){let e=a.binary??"";return/^[01]{6}$/.test(e)?Array.from(e,t=>t==="1"?7:8):[]}};ws.endpoints=yc,ws.styles=[u,M,j,qu`.card{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,4lh) minmax(0,1fr);display:grid}.result-chart{gap:var(--roxy-space-lg);grid-template-columns:minmax(0,4lh) minmax(0,1fr);padding-block-start:var(--roxy-space-md);display:grid}.result{border-block-start:1px solid var(--roxy-border);grid-column:1/-1;padding-block-start:var(--roxy-space-md)}.result>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}@container (width<=480px){.card,.result-chart{grid-template-columns:minmax(0,1fr)}}h2,p{margin:0}.glyphs{align-content:start;align-self:start;justify-items:center;gap:var(--roxy-space-md);display:grid}.symbol{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);line-height:1}.lines{gap:calc(var(--roxy-space-unit) * 1.5);inline-size:2lh;display:grid}.line{gap:var(--roxy-space-xs);grid-template-columns:1fr 1fr;display:grid}.seg{block-size:calc(var(--roxy-line-thick) * 3);background:var(--roxy-fg);display:block}.line.solid .seg{grid-column:1/-1}.line.changing .seg{background:var(--roxy-accent)}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm)}.daily-date{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm);display:block}.trigrams{gap:var(--roxy-space-md);flex-wrap:wrap;margin-block-end:var(--roxy-space-sm);display:flex}.tri-glyph{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);vertical-align:middle;margin-inline-end:var(--roxy-space-xs)}.judgment,.image,.message{font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm)}.judgment:before{content:"Judgment. ";color:var(--roxy-secondary);font-weight:var(--roxy-weight-bold)}.image:before{content:"Image. ";color:var(--roxy-secondary);font-weight:var(--roxy-weight-bold)}.line-meaning{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);color:var(--roxy-muted);padding-inline-start:var(--roxy-space-sm)}.changes{border-block-start:1px solid var(--roxy-border);color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-md);padding-block-start:var(--roxy-space-md)}`],ws=m([f("roxy-hexagram")],ws);import{css as Yu,html as Gn,nothing as ol}from"lit";var ks=class extends y{renderData(a){let e=a.dayHoras??[],t=a.nightHoras??[];return e.length===0&&t.length===0?this.renderEmpty():Gn`<div class="wrap" part="card" aria-label="${this.t("Hora periods")}"><div class="head" part="header"><h2>${this.t("Hora")}</h2>${a.date?Gn`<p class="roxy-label">${R(this.effectiveLang(),a.date)}</p>`:ol}</div><div class="cols" part="table">${this.renderColumn(this.t("Daytime"),e)} ${this.renderColumn(this.t("Night"),t)}</div></div>`}renderColumn(a,e){return e.length===0?ol:Gn`<div class="col"><h3 class="section-label">${a}</h3>${e.map(t=>Gn`<div class="row"><span class="glyph" aria-hidden="true">${$(t.planet)??"·"}</span> <span class="planet">${t.planet}</span> <span class="time">${ia(this.effectiveLang(),t)}</span> ${typeof t.number=="number"?Gn`<span class="num">${t.number}</span>`:ol}</div>`)}</div>`}};ks.endpoints=uc,ks.styles=[u,Yu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.cols{gap:var(--roxy-space-md);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.section-label{margin-block-end:var(--roxy-space-xs)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;display:flex}.row:last-child{border-block-end:0}.glyph{inline-size:2ch;color:var(--roxy-accent-ink);font-size:var(--roxy-text-base);text-align:center;line-height:1}.planet{flex:1}.time{color:var(--roxy-muted);white-space:nowrap}.num{inline-size:3ch;color:var(--roxy-muted);font-size:var(--roxy-text-xs);text-align:end}@container (width<=30rem){.cols{grid-template-columns:minmax(0,1fr)}}`],ks=m([f("roxy-hora-table")],ks);import{css as Uu,html as D,nothing as W}from"lit";import{property as ih}from"lit/decorators.js";var Zu={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Wu={aspect:"Aspect","sign-ingress":"Sign ingress","retrograde-station":"Retrograde station","lunar-phase":"Lunar phase",eclipse:"Eclipse","solar-season":"Solar season"},Xu=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"],["advice","Advice"]],Ju=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"]],Ca=class extends y{constructor(){super(...arguments);this.period="daily";this.layout="auto"}renderData(e){let t=e.sign??"",r=N(t)??"",s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,i=this.effectiveLang(),o="date"in e&&e.date&&R(i,e.date)||"week"in e&&e.week&&R(i,e.week)||"month"in e&&e.month&&Ga(i,e.month,"month")||("year"in e&&e.year?String(e.year):"")||"";return D`<article class="card" part="card" aria-labelledby="horoscope-title"><header class="head" part="header"><span class="glyph" aria-hidden="true">${r}</span><div><h2 class="title" id="horoscope-title">${t} ${this.t(Zu[this.period])}</h2>${o?D`<p class="date roxy-label">${o}</p>`:W}</div>${s!==null?D`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:s})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:W}</header>${this.renderReading(e)} ${this.renderSky(e)} ${this.renderEvents(e.events)} ${this.renderYear(e)} ${this.renderMonth(e)} ${(()=>{let l="luckyNumber"in e&&e.luckyNumber!==void 0?e.luckyNumber:void 0,c="luckyColor"in e&&e.luckyColor?e.luckyColor:"",d="luckyNumbers"in e&&e.luckyNumbers?e.luckyNumbers:[],p="luckyDays"in e&&e.luckyDays?e.luckyDays:[],h=e.compatibleSigns??[];return l===void 0&&!c&&d.length===0&&p.length===0&&h.length===0?W:D`<div class="lucky" part="details">${l!==void 0?D`<span>${this.t("Lucky number")} <strong>${l}</strong></span>`:W} ${c?D`<span>${this.t("Lucky color")} <strong>${c}</strong></span>`:W} ${d.length?D`<span>${this.t("Lucky numbers")} <strong>${d.join(", ")}</strong></span>`:W} ${p.length?D`<span>${this.t("Lucky days")} <strong>${p.join(", ")}</strong></span>`:W} ${h.length?D`<span class="compat-wrap">${this.t("Best with")}<ul class="compat roxy-chips">${h.map(x=>D`<li>${x}</li>`)}</ul></span>`:W}</div>`})()}</article>`}renderReading(e){if(this.hideReadings)return W;if(this.layout==="column"||this.layout==="auto"&&!!e.column)return e.column?this.renderColumn(e.column):W;let r=this.paragraphs(e.overview);return D`${r.length?D`<div class="overview" part="section overview">${r}</div>`:W}<div class="sections" part="section outlook">${Xu.map(([s,i])=>{let o=this.paragraphs(e[s]);return o.length?D`<div class="section"><h3>${this.t(i)}</h3>${o}</div>`:W})}</div>`}renderColumn(e){let t=this.paragraphs(e);return t.length===0?W:D`<div class="column" part="section column">${t}</div>`}paragraphs(e){return(e??"").split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean).map(t=>D`<p>${t}</p>`)}renderEvents(e){if(!e?.length)return W;let t=this.effectiveLang();return D`<section part="section events"><h3>${this.t("Events")}</h3><ul class="rows" aria-label="${this.t("Events")}">${e.map(r=>this.renderRow(D`<time class="row-when" datetime="${r.at}">${Ga(t,r.at,"time")}</time>`,this.renderEventBodies(r),D`<span class="kind">${this.t(Wu[r.type])}</span> <span>${this.t("House")} ${r.house}</span> ${r.sign?D`<span>${this.glyphName(N(r.sign),A(r.sign))}</span>`:W} ${r.through?D`<span>${this.t("through {{date}}",{date:R(t,r.through)})}</span>`:W}`,{when:"element"}))}</ul></section>`}renderEventBodies(e){let t=(e.bodies??[]).map(r=>this.glyphName($(r),r));return t.length===2&&e.aspect?D`${t[0]} <span class="${Je({type:e.aspect})}">${tn(e.aspect)??e.aspect}</span> ${t[1]}`:D`${t}`}renderYear(e){if(!("themes"in e))return W;let t=this.effectiveLang();return D`${e.themes.length?D`<section part="section themes"><h3>${this.t("Themes")}</h3><ul class="rows">${e.themes.map(r=>this.renderRow(xt(t,r.from,r.to),D`${this.glyphName($(r.body),r.body)} ${this.glyphName(N(r.sign),A(r.sign))}`,D`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:W} ${e.keyPeriods.length?D`<section part="section key-periods"><h3>${this.t("Key periods")}</h3><ul class="rows">${e.keyPeriods.map(r=>this.renderRow(xt(t,r.from,r.to),this.glyphName($(r.body),r.body),D`<span>${this.t("House")} ${r.house}</span><span>${r.focus}</span>`))}</ul></section>`:W} ${e.eclipses.length?D`<section part="section eclipses"><h3>${this.t("Eclipses")}</h3><ul class="rows">${e.eclipses.map(r=>this.renderRow(R(t,r.date),D`<span class="name">${r.kind}</span>`,D`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:W} ${e.retrogrades.length?D`<section part="section retrogrades"><h3>${this.t("Retrogrades")}</h3><ul class="rows">${e.retrogrades.map(r=>this.renderRow(R(t,r.date),D`${this.glyphName($(r.body),r.body)} <span>${r.direction}</span>`,D`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:W} ${this.renderBestPeriods(e.bestPeriods)}`}renderBestPeriods(e){if(!e)return W;let t=this.effectiveLang(),r=Ju.filter(([s])=>e[s]);return r.length===0?W:D`<section part="section best-periods"><h3>${this.t("Best months")}</h3><div class="tiles" part="details">${r.map(([s,i])=>{let o=e[s];return o?D`<div class="tile"><span class="roxy-label">${this.t(i)}</span> <span class="tile-value">${Ga(t,o.from,"month")}</span> <span class="tile-note">${this.t("{{count}} harmonious aspects",{count:o.count})}</span></div>`:W})}</div></section>`}renderRow(e,t,r,s){return D`<li class="row" part="label-track">${s?.when==="element"?e:D`<span class="row-when">${e}</span>`} <span class="row-what">${t}</span> <span class="row-meta">${r}</span></li>`}glyphName(e,t){return D`<span aria-hidden="true">${e??""}</span> <span class="name">${t}</span>`}renderSky(e){let t="moonSign"in e?e.moonSign:"",r="moonPhase"in e?e.moonPhase:"",s=("activeTransits"in e?e.activeTransits:[])??[];if(!t&&!r&&s.length===0)return W;let i=N(t)??"";return D`<div class="sky" part="section sky">${t||r?D`<div class="moon-line">${t?D`<span><span class="roxy-label">${this.t("Moon")}</span> <span aria-hidden="true">${i}</span> <b>${t}</b></span>`:W} ${r?D`<span><span class="roxy-label">${this.t("Phase")}</span> <b>${r}</b></span>`:W}</div>`:W} ${s.length?D`<ul class="transits" aria-label="${this.t("Active transits")}">${s.map(o=>D`<li>${o}</li>`)}</ul>`:W}</div>`}renderMonth(e){let t=("weekByWeek"in e?e.weekByWeek:[])??[],r=("keyDates"in e?e.keyDates:[])??[];return t.length===0&&r.length===0?W:D`${t.length&&!this.hideReadings?D`<section part="section week-by-week"><h3>${this.t("Week by week")}</h3><div class="weeks">${t.map(s=>D`<div class="week"><span class="roxy-label">${this.t("Week {{n}}",{n:s.week})}</span><div><div class="week-focus">${s.focus}</div>${s.advice?D`<p class="week-advice">${s.advice}</p>`:W}</div></div>`)}</div></section>`:W} ${r.length?D`<section part="section key-dates"><h3>${this.t("Key dates")}</h3><dl class="dates" part="label-track">${r.map(s=>D`<div class="date-row"><dt>${R(this.effectiveLang(),s.date)||s.date}</dt><dd>${s.event}</dd></div>`)}</dl></section>`:W}`}};Ca.endpoints=fc,Ca.styles=[u,va,rr,Uu`.card{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.glyph{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);line-height:1}.title{text-transform:capitalize;white-space:nowrap}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar{inline-size:10ch;block-size:var(--roxy-space-sm);background:var(--roxy-border);border-radius:var(--roxy-radius-full);vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block;overflow:hidden}.energy-bar>span{background:var(--roxy-accent);height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.column p,.overview p,.section p{line-height:1.7}.overview,.column,.section{align-content:start;gap:var(--roxy-space-sm);display:grid}.column{gap:var(--roxy-space-md)}.sections{gap:var(--roxy-space-lg) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,48ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm)}.sky,.lucky{border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);padding-block-start:var(--roxy-space-md)}.sky{gap:var(--roxy-space-sm);display:grid}.lucky{gap:var(--roxy-space-sm) var(--roxy-space-md);color:var(--roxy-secondary);flex-wrap:wrap;display:flex}.lucky strong{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.compat-wrap{align-items:center;gap:var(--roxy-space-xs);flex-wrap:wrap;width:100%;display:flex}.compat>li{text-transform:capitalize}.moon-line{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.moon-line b{font-weight:var(--roxy-weight-bold)}.moon-line .roxy-label{margin-inline-end:var(--roxy-space-xs)}.transits{gap:var(--roxy-space-xs);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.transits li::marker{color:var(--roxy-accent)}.weeks{gap:var(--roxy-space-sm);display:grid}.week{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.week:first-child{border-block-start:0;padding-block-start:0}.week-focus{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.week-advice{font-size:var(--roxy-text-sm);margin-block-start:calc(var(--roxy-space-unit) / 2)}.dates{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);margin:0;display:grid}.date-row{display:contents}.date-row dt{color:var(--roxy-accent-ink);font-size:inherit;font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.date-row dd{margin:0}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.row:first-child{border-block-start:0;padding-block-start:0}.row-when{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.row-what{font-size:var(--roxy-text-sm)}.row-what .name,.row-meta .kind{font-weight:var(--roxy-weight-bold)}.row-meta{gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;grid-column:2;display:flex}@container (width<=30rem){.row-meta{grid-column:1}}.tiles{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));display:grid}.tile{gap:calc(var(--roxy-space-unit) / 2);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.tile-value{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.tile-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],m([ih({type:String,reflect:!0})],Ca.prototype,"period",2),m([ih({type:String,reflect:!0})],Ca.prototype,"layout",2),Ca=m([f("roxy-horoscope-card")],Ca);import{css as Qu,html as ne,nothing as Qt}from"lit";import{state as ef}from"lit/decorators.js";var tf=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],eo=[1,2,3,4];function ll(n,a){return n?typeof a=="number"?`${n} ${a}`:n:""}function oh(n){return[...new Set(n.map(String))].join(" > ")}function af(n){return[...new Set(n??[])]}var lr=class extends y{constructor(){super(...arguments);this.activeTab="planets"}bodies(){let e=this.data;if(!e)return[];let t=(e.planets??[]).map(s=>({name:s.planet,longitude:s.longitude,house:s.house,nakshatra:s.nakshatra,pada:s.pada,starLord:s.starLord,subLord:s.subLord,subSubLord:s.subSubLord,kpNumber:s.kpNumber,retrograde:s.retrograde})),r=e.nodes;for(let[s,i]of[["Rahu",r?.rahu],["Ketu",r?.ketu]])i&&t.push({name:s,longitude:i.longitude,house:i.house,nakshatra:i.nakshatra,pada:i.pada,starLord:i.starLord,subLord:i.subLord,subSubLord:i.subSubLord,kpNumber:i.kpNumber,retrograde:!0});return t}renderData(e){let t=e.ascendant;return ne`<div class="wrap" part="card" aria-label="KP chart"><header class="head" part="header"><h2 class="title">KP chart</h2>${t?ne`<div class="asc">Ascendant: <strong>${typeof t.longitude=="number"?Qe(t.longitude):t.sign??""} </strong>${t.nakshatra?ne`· ${ll(t.nakshatra,t.pada)}`:Qt} ${t.subLord?ne`· sub lord ${t.subLord}`:Qt} ${typeof t.kpNumber=="number"?ne`· KP ${t.kpNumber}`:Qt}</div>`:Qt} ${typeof e.meta?.ayanamsa=="number"?ne`<div class="ayan">Ayanamsa: ${Nr(this.effectiveLang(),e.meta.ayanamsaType,e.meta.ayanamsa)} ${e.meta.houseSystem?ne`· ${e.meta.houseSystem} houses`:Qt}</div>`:Qt}</header>${dt({items:tf,active:this.activeTab,onSelect:r=>{this.activeTab=r},label:"KP chart views",idPrefix:"kp",controls:!0})}<div id="kp-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="kp-tab-${this.activeTab}">${this.activeTab==="planets"?this.renderPlanets():this.activeTab==="cusps"?this.renderCusps():this.renderSignificators()}</div></div>`}renderPlanets(){let e=this.bodies();return e.length?this.scrollBox(ne`<table part="table" role="table"><caption id="kp-planets-caption" class="roxy-sr-only">KP planets and nodes: each body with its position, house, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">Position</th><th scope="col">House</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>ne`<tr><td class="body">${t.name}${t.retrograde?ne`<span class="retro">R</span>`:Qt}</td><td class="num">${typeof t.longitude=="number"?Qe(t.longitude):""}</td><td class="num">${typeof t.house=="number"?t.house:""}</td><td>${ll(t.nakshatra,t.pada)}</td><td>${t.starLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td class="num">${typeof t.kpNumber=="number"?t.kpNumber:""}</td></tr>`)}</tbody></table>`,"kp-planets-caption"):ne`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let e=this.data?.cusps??[],t=this.data?.houseThemes;return e.length?this.scrollBox(ne`<table part="table" role="table"><caption id="kp-cusps-caption" class="roxy-sr-only">KP Placidus cusps: each house cusp with what it signifies, its position, sign lord, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">House</th><th scope="col">Position</th><th scope="col">Sign lord</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(r=>ne`<tr><td class="body num">${r.house}${this.renderThemes(To(r.house,t))}</td><td class="num">${typeof r.longitude=="number"?Qe(r.longitude):r.sign??""}</td><td>${r.signLord??""}</td><td>${ll(r.nakshatra,r.pada)}</td><td>${r.starLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td class="num">${typeof r.kpNumber=="number"?r.kpNumber:""}</td></tr>`)}</tbody></table>`,"kp-cusps-caption"):ne`<p class="roxy-empty" role="status">No cusps</p>`}renderSignificators(){let e=this.data?.significators,t=this.data?.houseThemes,r=e?.houseWise??[],s=e?.planetWise??[];return!r.length&&!s.length?ne`<p class="roxy-empty" role="status">No significators</p>`:ne`${this.renderLevelLegend(r)} ${r.length?ne`<div class="sig-head"><h3 class="sig-title">House-wise significators</h3><p class="sig-note">Planets that signify each house, strongest level first.</p></div>${this.scrollBox(ne`<table part="table" role="table"><caption id="kp-house-sig-caption" class="roxy-sr-only">KP house-wise significators: each house, the planets that signify it at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">House</th>${eo.map(i=>ne`<th scope="col">L${i}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${r.map(i=>ne`<tr><td class="body num">${i.house}${this.renderThemes(To(i.house,t))}</td>${eo.map(o=>this.renderCell(this.planetsAtLevel(i,o).join(", ")))}<td class="chain">${oh(i.all??[])}</td></tr>`)}</tbody></table>`,"kp-house-sig-caption")}`:Qt} ${s.length?ne`<div class="sig-head"><h3 class="sig-title">Planet-wise significators</h3><p class="sig-note">Houses each planet signifies, strongest level first.</p></div>${this.scrollBox(ne`<table part="table" role="table"><caption id="kp-planet-sig-caption" class="roxy-sr-only">KP planet-wise significators: each planet, the houses it signifies at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">Planet</th>${eo.map(i=>ne`<th scope="col">L${i}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${s.map(i=>ne`<tr><td class="body">${i.planet}</td>${eo.map(o=>this.renderCell(this.housesAtLevel(i,o).join(", ")))}<td class="chain">${oh(i.allHouses??[])}${this.renderThemes(da(af(i.allHouses),t))}</td></tr>`)}</tbody></table>`,"kp-planet-sig-caption")}`:Qt}`}scrollBox(e,t){return ne`<div class="scroll" tabindex="0" role="region" aria-labelledby="${t}">${e}</div>`}renderThemes(e){return e?ne`<span class="themes">${e}</span>`:Qt}renderCell(e){return e?ne`<td>${e}</td>`:ne`<td class="empty-cell">none</td>`}planetsAtLevel(e,t){return(e.significators??[]).filter(r=>r.level===t).flatMap(r=>r.planets??[])}housesAtLevel(e,t){return(e.signifies??[]).filter(r=>r.level===t).flatMap(r=>r.houses??[])}renderLevelLegend(e){let t=new Map;for(let r of e)for(let s of r.significators??[])s.description&&!t.has(s.level)&&t.set(s.level,s.description);return t.size===0?Qt:ne`<ul class="legend" part="legend" aria-label="Significator levels">${[...t.entries()].sort((r,s)=>r[0]-s[0]).map(([r,s])=>ne`<li><b>L${r}</b>${s}</li>`)}</ul>`}};lr.endpoints=xc,lr.styles=[u,Xe,Qu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.sig-title,.sig-note{margin:0}.asc,.ayan{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.asc strong{color:var(--roxy-fg)}[role=tabpanel]:not([hidden]){gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.body{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.num{font-variant-numeric:tabular-nums}.sig-head{gap:var(--roxy-space-xs);display:grid}.sig-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.legend b{color:var(--roxy-accent-ink);margin-inline-end:var(--roxy-space-xs)}.chain,.empty-cell{color:var(--roxy-muted)}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);display:block}`],m([ef()],lr.prototype,"activeTab",2),lr=m([f("roxy-kp-chart")],lr);import{css as rf,html as xe,nothing as hn}from"lit";var sf={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},nf={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},lh={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},of={gain:"Gain",loss:"Loss"},lf={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},Ss=class extends y{renderData(a){return a.layers?xe`<div class="wrap" part="card" aria-label="${this.t("KP daily finance")}">${this.renderHead(a)} ${this.renderSignificators(a)}<section class="block" part="section cusps">${this.renderLayer("cusps",a.layers.cusps,this.renderCuspRows(a.layers.cusps.rows))}</section><section class="block" part="section dasha">${this.renderLayer("dasha",a.layers.dasha,this.renderDashaRows(a.layers.dasha.rows))}</section><section class="block" part="section ruling-planets">${this.renderLayer("rulingPlanets",a.layers.rulingPlanets,this.renderRulingRows(a.layers.rulingPlanets.rows))}</section><section class="block" part="section moon-windows">${this.renderLayer("moonWindows",a.layers.moonWindows,this.renderWindowRows(a.layers.moonWindows.rows))}</section>${this.renderWindows(a)}<section class="block" part="section frame">${X(this.effectiveLang(),{ayanamsa:a.ayanamsa,ayanamsaDegrees:a.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(a){let e=this.effectiveLang();return xe`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${V(e,a.date)}</span></div><div class="verdict-row"><span class="verdict ${a.band}">${this.t(sf[a.band])}</span> <span class="evidence">${b(e,a.score,1)}</span></div><dl class="roxy-facts" part="details"><div class="fact"><dt>${this.t("Reading moment")}</dt><dd>${V(e,a.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${qe(e,a.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${qe(e,a.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(a){let e=a.significators,t=this.effectiveLang(),r=s=>xe`<div class="roxy-chips">${s.map(i=>xe`<span class="chip roxy-chip">${this.glyphName(i)}</span>`)}</div>`;return xe`<section class="block" part="section significators"><h3>${this.t("Significators")}</h3><dl class="roxy-facts"><div class="fact"><dt>${this.t("Gain")}</dt><dd>${r(e.gain)}</dd></div><div class="fact"><dt>${this.t("Loss")}</dt><dd>${r(e.loss)}</dd></div></dl>${e.byHouse.length?xe`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Significators")}"><table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Significators")}</th></tr></thead><tbody>${e.byHouse.map(s=>xe`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${qe(t,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:hn}</section>`}renderLayer(a,e,t){let r=this.effectiveLang();return xe`<div class="block-head"><h3>${this.t(lh[a])}</h3><span class="evidence">${this.t("Weight")} ${we(r,e.weight,0)} · ${this.t("Score")} ${b(r,e.score,1)}</span></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(lh[a])}">${t}</div>`}renderCuspRows(a){return xe`<table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Star lord")}</th><th scope="col">${this.t("Sign lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(e=>xe`<tr><td class="num">${e.house} ${this.groupChip(e.inverted?"loss":"gain")}</td><td>${this.glyphName(e.subLord)}</td><td>${this.glyphName(e.starLord)}</td><td>${this.glyphName(e.signLord)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderDashaRows(a){let e=this.effectiveLang();return xe`<table><thead><tr><th scope="col">${this.t("Level")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th><th scope="col">${this.t("Weight")}</th></tr></thead><tbody>${a.map(t=>xe`<tr><td>${this.t(lf[t.level])}</td><td>${this.glyphName(t.lord,t.retrograde)}</td><td>${V(e,t.startDate)}</td><td>${V(e,t.endDate)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${b(e,t.score,0)}</td><td class="num">${we(e,t.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(a){return xe`<table><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(e=>xe`<tr><td>${this.glyphName(e.planet,e.retrograde)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderWindowRows(a){let e=this.effectiveLang();return xe`<table><thead><tr><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(t=>xe`<tr><td>${Rt(e,t.from)}</td><td>${Rt(e,t.to)}</td><td>${this.glyphName(t.subLord)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${b(e,t.score,0)}</td></tr>`)}</tbody></table>`}renderWindows(a){let e=this.effectiveLang(),t=a.bestWindow,r=a.worstWindows??[];if(!t&&!r.length)return hn;let s=(i,o)=>xe`<span class="window roxy-chip ${o}" data-tone="${o==="best"?"success":"danger"}"><span>${this.glyphName(i.subLord)}</span> <small>${ia(e,{start:i.from,end:i.to})}</small></span>`;return xe`<section class="block" part="section windows"><dl class="roxy-facts">${t?xe`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="roxy-chips">${s(t,"best")}</div></dd></div>`:hn} ${r.length?xe`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="roxy-chips">${r.map(i=>s(i,"worst"))}</div></dd></div>`:hn}</dl></section>`}glyphName(a,e=!1){let t=$(a);return xe`${t?xe`<span class="glyph" aria-hidden="true">${t}</span>`:hn}${a}${e?xe`<span class="retro" aria-label="${this.t("retrograde")}">℞</span>`:hn}`}verdictChip(a){return xe`<span class="state ${a}">${this.t(nf[a])}</span>`}groupChip(a){return xe`<span class="chip roxy-chip">${this.t(of[a])}</span>`}};Ss.endpoints=bc,Ss.styles=[u,re,G,rf`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}.title-row,.block-head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title,.block h3{margin:0}.when{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:is(.verdict,.state):is(.strong,.favourable){color:var(--roxy-success-fg)}:is(.verdict,.state):is(.mixed,.caution){color:var(--roxy-warning-fg)}:is(.verdict,.state).unfavourable{color:var(--roxy-danger-fg)}.state.neutral{color:var(--roxy-secondary)}.state{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.names{white-space:normal}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],Ss=m([f("roxy-kp-finance-card")],Ss);import{css as cf,html as to,nothing as ch}from"lit";var Rs=class extends y{renderData(a){let e=a.planets??[];return to`<div class="wrap" part="card" aria-label="KP planets table"><header class="head" part="header"><h2 class="title">KP planets</h2>${typeof a.ayanamsa=="number"?to`<span class="ayanamsa">Ayanamsa: ${b(this.effectiveLang(),a.ayanamsa,2)}°</span>`:ch}</header><div class="scroll" tabindex="0" role="region" aria-labelledby="kp-planets-table-caption"><table part="table" role="table"><caption id="kp-planets-table-caption" class="roxy-sr-only">KP planets: each planet with its sign, sign lord, nakshatra, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Sign</th><th scope="col">Sign lord</th><th scope="col">Nakshatra</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>to`<tr><td class="planet">${t.planet} ${t.retrograde?to`<span class="retro">R</span>`:ch}</td><td>${t.sign??""}</td><td>${t.signLord??""}</td><td>${t.nakshatra??""}</td><td>${t.nakshatraLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td>${t.kpNumber??""}</td></tr>`)}</tbody></table></div></div>`}};Rs.endpoints=vc,Rs.styles=[u,cf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.ayanamsa{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.planet{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}`],Rs=m([f("roxy-kp-planets-table")],Rs);import{css as df,html as Cs,nothing as ao}from"lit";var Ts=class extends y{renderData(a){let e=a.significators??[];return Cs`<div class="wrap" part="card" aria-label="KP ruling planets"><header part="header"><h2 class="title">KP ruling planets</h2>${a.dayLord?Cs`<div class="day-lord">Day lord: <strong>${a.dayLord}</strong></div>`:ao}</header><div class="groups" part="details"><div class="group"><h3>Moon</h3><dl part="label-track"><dt>Sign lord</dt><dd>${a.moonSignLord??""}</dd><dt>Star lord</dt><dd>${a.moonStarLord??""}</dd><dt>Sub lord</dt><dd>${a.moonSublord??""}</dd><dt>Sub-sub lord</dt><dd>${a.moonSubSublord??""}</dd></dl></div><div class="group"><h3>Lagna</h3><dl part="label-track"><dt>Sign lord</dt><dd>${a.lagnaSignLord??""}</dd><dt>Star lord</dt><dd>${a.lagnaStarLord??""}</dd><dt>Sub lord</dt><dd>${a.lagnaSublord??""}</dd><dt>Sub-sub lord</dt><dd>${a.lagnaSubSublord??""}</dd></dl></div></div>${a.rulingPlanets?.length?Cs`<div class="rp-list" part="details"><span class="roxy-label">Ruling planets</span><ol class="roxy-chips" aria-label="Ruling planets by strength">${a.rulingPlanets.map((t,r)=>Cs`<li class="rp"><span class="rank">${r+1}</span> ${t}</li>`)}</ol></div>`:ao} ${e.length?Cs`<table part="table"><caption class="roxy-sr-only">House significators: each ruling planet, the houses it signifies, and what those houses stand for.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Signifies houses</th></tr></thead><tbody>${e.map(t=>{let r=da(t.signifies,a.houseThemes);return Cs`<tr><td>${t.planet}</td><td><span class="num">${(t.signifies??[]).join(", ")}</span> ${r?Cs`<span class="themes">${r}</span>`:ao}</td></tr>`})}</tbody></table>`:ao}</div>`}};Ts.endpoints=Lc,Ts.styles=[u,df`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.title,.group h3{margin:0}.day-lord{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.day-lord strong{color:var(--roxy-fg)}.groups{gap:var(--roxy-space-md) var(--roxy-space-xl);flex-wrap:wrap;display:flex}.group{gap:var(--roxy-space-xs);flex:1 1 0;min-width:min(100%,22ch);display:grid}.group dl{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-sm);margin:0;display:grid}.group dd{font-weight:var(--roxy-weight-bold);margin:0}.rp-list{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.rp .rank{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.num{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}`],Ts=m([f("roxy-kp-ruling-planets")],Ts);import{css as pf,html as at,nothing as ot}from"lit";import{property as hf}from"lit/decorators.js";var cr=class extends y{constructor(){super(...arguments);this.mode="kua"}renderData(e){let t=this.effectiveLang(),r=e.trigram;return at`<article class="card" part="card" aria-labelledby="kua-title"><header class="head" part="header"><h2 class="title" id="kua-title">${this.t("Kua")} ${e.kua??""}</h2>${e.group?at`<span class="group">${this.t("{{direction}} group",{direction:I(t,"facing",A(e.group))})}</span>`:ot}</header><div class="facts" part="details">${r?at`<span><span class="roxy-label">${this.t("Trigram")}</span> <span lang="zh">${r.chinese??""}</span> ${r.symbol??""} <b>${r.english??""}</b> <span class="element-word ${bt(r.element)}">${g(r,"element")}</span></span>`:ot} ${r?.familyMember?at`<span><span class="roxy-label">${this.t("Role")}</span>${r.familyMember}</span>`:ot} ${"solarYear"in e&&typeof e.solarYear=="number"?at`<span class="solar-year"><span class="roxy-label">${this.t("Year")}</span><b>${Ga(t,String(e.solarYear),"year")}</b></span>`:ot} ${"gender"in e&&e.gender?at`<span class="formula-gender"><span class="roxy-label">${ae(t,"gender")}</span>${I(t,"gender",e.gender)}</span>`:ot} ${"boundaryDate"in e&&e.boundaryDate?at`<span>${this.t("Year boundary")} ${R(t,e.boundaryDate)}</span>`:ot} ${"reassigned"in e&&e.reassigned?at`<span>${this.t("Reassigned from {{value}}",{value:String("rawKua"in e?e.rawKua??"":"")})}</span>`:ot} ${this.renderBestWorst(e)}</div><div class="plate" part="chart plate" role="group" aria-label="${this.t("Eight mansions")}">${Yi.map(s=>this.renderSector(e,s))}</div><div class="legend" part="legend"><span><span class="swatch swatch-good"></span>${this.t("Favourable")}</span> <span><span class="swatch swatch-bad"></span>${this.t("Unfavourable")}</span></div>${this.renderSectorRows(e)} ${"conventions"in e?Fa(e.conventions,this.translator,this.effectiveLang()):ot}</article>`}renderBestWorst(e){if(this.mode!=="mansions"||!("bestSector"in e))return ot;let t=this.effectiveLang();return at`${e.bestSector?at`<span><span class="roxy-label">${this.t("Best")}</span><b>${I(t,"facing",e.bestSector)}</b></span>`:ot} ${e.worstSector?at`<span><span class="roxy-label">${this.t("Worst")}</span><b>${I(t,"facing",e.worstSector)}</b></span>`:ot}`}sectorHeading(e,t){return t==="Center"?this.t("Center"):I(e,"facing",t)}renderSector(e,t){let r=this.effectiveLang(),s=this.sectorHeading(r,t);if(t==="Center")return at`<div class="sector sector-self centre"><span class="kua-number">${e.kua??""}</span> <span class="trigram-symbol">${e.trigram?.symbol??""}</span> <span class="sector-name plate-heading">${e.trigram?.english??""}</span></div>`;let i=(e.sectors??[]).find(l=>l.direction===t);if(!i)return at`<div class="sector"><span class="sector-name plate-heading">${s}</span></div>`;let o=i.nature==="auspicious";return at`<div class="sector ${o?"sector-good":"sector-bad"}"><span class="sector-name plate-heading">${s}</span> <span class="star-name">${g(i,"starName")}</span> ${"chinese"in i&&i.chinese?at`<span class="star-hanzi" lang="zh">${i.chinese}</span>`:ot} <span class="domain">${i.domain??""}</span> ${typeof i.rank=="number"?at`<span class="rank">${o?this.t("Rank"):this.t("Severity")} ${i.rank}</span>`:ot}</div>`}renderSectorRows(e){let t=e.sectors??[];if(t.length===0)return ot;let r=this.effectiveLang(),s=t.map(i=>{let o=this.mode==="mansions"&&"reading"in i?i.reading:void 0;return!o||this.hideReadings?ot:at`<li class="row" part="label-track"><span class="roxy-label">${this.sectorHeading(r,i.direction??"")}</span><div class="row-body"><span>${g(i,"starName")}</span><p part="reading">${o}</p></div></li>`});return s.every(i=>i===ot)?ot:at`<section part="section sectors"><h3 class="block-title">${this.t("Sectors")}</h3><ul class="rows">${s}</ul></section>`}};cr.endpoints=$c,cr.styles=[u,ca,G,Ui,rr,pf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.group{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.plate{background:var(--roxy-border);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.sector{align-content:start;gap:calc(var(--roxy-space-unit) / 2);min-block-size:3.5lh;padding:var(--roxy-space-sm);background:var(--roxy-surface);text-align:center;display:grid}.sector-good{background:color-mix(in srgb, var(--roxy-success) 10%, var(--roxy-surface))}.sector-bad{background:color-mix(in srgb, var(--roxy-danger) 10%, var(--roxy-surface))}.sector-self{background:color-mix(in srgb, var(--roxy-accent) 10%, var(--roxy-surface))}:is(.sector-good,.sector-bad,.sector-self) .sector-name,:is(.sector-good,.sector-bad) .rank{color:var(--roxy-secondary)}.star-name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.star-hanzi,.trigram-symbol{color:var(--roxy-accent-ink)}:is(.sector-good,.sector-bad) .star-hanzi{color:var(--roxy-fg)}.domain{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.rank{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.centre{align-content:center}.kua-number{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.trigram-symbol{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight)}@container (width<=30rem){.plate{background:var(--roxy-surface);display:block}.sector.centre{display:none}.sector{column-gap:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name rank""star hanzi""domain domain";min-block-size:auto}.sector:last-child{border-block-end:0}.sector-name{grid-area:name;align-self:center}.rank{text-align:end;white-space:nowrap;grid-area:rank;align-self:center}.star-name{grid-area:star}.star-hanzi{text-align:end;grid-area:hanzi}.domain{grid-area:domain}}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-good{background:var(--roxy-success)}.swatch-bad{background:var(--roxy-danger)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.row-body p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}`],m([hf({type:String,reflect:!0})],cr.prototype,"mode",2),cr=m([f("roxy-kua-card")],cr);import{css as mf,html as Es,nothing as ro,svg as so}from"lit";var cl=320,Ft=cl/2,Ta=128,gf=118,dh=137,yf=152,uf=.95,ff={glyph:11},xf=ff.glyph;function Ea(n,a){let e=n*Math.PI/180;return{x:Ft+a*Math.sin(e),y:Ft-a*Math.cos(e)}}var bf=[{az:0,source:"N"},{az:45,source:"NE"},{az:90,source:"E"},{az:135,source:"SE"},{az:180,source:"S"},{az:225,source:"SW"},{az:270,source:"W"},{az:315,source:"NW"}],Ds=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this)}renderData(e){let t=e.bodies??[],r=e.birthDetails;return Es`<div class="wrap" part="card"><header part="header"><h2>${this.t("Local space")}</h2>${r?Es`<p class="roxy-label">${V(this.effectiveLang(),r.date,r.time)}</p>`:ro}</header>${this.chartViewport.renderChartViewport(this.renderDial(t),this.t("Local space"),this.translator)} ${e.summary&&!this.hideReadings?Es`<p class="summary">${e.summary}</p>`:ro} ${this.renderList(t)}</div>`}renderDial(e){return Es`<svg viewBox="0 0 ${cl} ${cl}" part="chart" role="img" aria-label="${this.t("Local space compass of planetary directions from the birthplace")}"><title>${this.t("Local space compass")}</title><desc>${this.t("A compass centered on the birthplace. Each body is a line pointing to its azimuth, clockwise from north. Bodies below the horizon are dimmed.")}</desc><circle class="dial-fill" cx="${Ft}" cy="${Ft}" r="${Ta}"/><circle class="dial" cx="${Ft}" cy="${Ft}" r="${Ta*.66}" stroke-width="0.5"/><circle class="dial" cx="${Ft}" cy="${Ft}" r="${Ta*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${Ft}" cy="${Ft}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let l=0;l<360;l+=22.5){let c=Ea(l,Ta),d=Ea(l,Ta-(l%45===0?8:4));e.push(so`<line class="tick" x1=${d.x} y1=${d.y} x2=${c.x} y2=${c.y} />`)}let t=Ea(0,Ta),r=Ea(180,Ta),s=Ea(90,Ta),i=Ea(270,Ta),o=bf.map(({az:l,source:c})=>{let d=Ea(l,yf),p=l%90===0;return so`<text class=${`compass-label${p?" cardinal":""}`} x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return so`
96
+ ${eh(p,i,h,n.holders.get(h)??[],n.letterFor,zn+rl+7)}
97
+ ${eh(p,o,x,n.holders.get(x)??[],n.letterFor,-(zn+rl+7))}
98
+ </g>`)})}return On`${zu()}${a.length>0?a:Pu}`}var bs=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this)}renderChart(e){let t=(e.channels??[]).filter(s=>s.gateA!=null&&s.gateB!=null).map(s=>({gateA:s.gateA,gateB:s.gateB,name:s.name??"",defined:s.defined===!0,isCore:s.isCore===!0}));if(t.length===0)return Gt;let r=new Map((e.gates??[]).filter(s=>s.gate!=null).map(s=>[s.gate,s.heldBy??[]]));return gt`<svg class="chart" part="chart" viewBox="${ah}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Penta ladder: the Throat, G and Sacral with the six penta channels between them, each marked defined or open and lettered with the members holding its gates"><title>Penta</title>${sh({rungs:t,holders:r,letterFor:nh})}</svg>`}renderData(e){let t=e.channels??[],r=e.gates??[],s=e.summary,i=s?.gapGates??[],o=t.some(l=>l.isCore);return gt`<div class="wrap" part="card" aria-label="Human Design penta"><header class="head" part="header"><h2>Penta</h2>${typeof e.memberCount=="number"?gt`<span class="count">${e.memberCount} members</span>`:Gt}</header>${this.chartViewport.renderChartViewport(this.renderChart(e),"Penta",this.translator)} ${$a([{label:"Members",value:e.memberCount?.toString()},{label:"Defined channels",value:typeof s?.definedChannels=="number"&&t.length>0?`${s.definedChannels} of ${t.length}`:void 0},{label:"Filled gates",value:typeof s?.filledGates=="number"&&r.length>0?`${s.filledGates} of ${r.length}`:void 0},{label:"Core",value:typeof s?.coreDefined=="boolean"?s.coreDefined?"Defined":"Open":void 0},{label:"Gap gates",value:i.length>0?i.join(", "):void 0}])} ${this.hideReadings?Gt:gt`<p class="lead">A penta is the field three to five people form when they work as a group. It is read from the twelve penta gates the members bring between them: a channel with both of its gates held somewhere in the group is a defined Strength, and a gate no member holds is a gap the group has to compensate for.</p>`} ${this.renderGroup("Upper (direction)",t.filter(l=>l.position==="upper"),"Upper channels run from the G Center to the Throat. They carry the leadership of the group and how it presents itself.")} ${this.renderGroup("Lower (execution)",t.filter(l=>l.position==="lower"),"Lower channels run from the G Center to the Sacral. They carry the managed, generative, resource work.")} ${this.renderGroup("Channels",t.filter(l=>l.position!=="upper"&&l.position!=="lower"))} ${o&&!this.hideReadings?gt`<p class="footnote">Core is the 2/14 Channel of the Beat, the material core of the penta: gate 2 sets the direction for resources, gate 14 is the resources themselves.</p>`:Gt} ${this.renderGates(r)} ${t.length>0||r.length>0?gt`<p class="footnote" part="legend">Members are lettered in the order they were sent, so A is the first member of the group.</p>`:Gt}</div>`}renderGroup(e,t,r){return t.length===0?Gt:gt`<div class="section" part="section channels"><h3>${e}</h3>${r&&!this.hideReadings?gt`<p class="note">${r}</p>`:Gt} ${t.map(s=>gt`<div class="row"><span class="gates">${s.gateA}-${s.gateB}</span> <span class="cname">${s.name??""} ${s.circuit?gt`<span class="circuit">${s.circuit} circuit</span>`:Gt} </span><span class="roxy-chip" data-tone="${s.defined?"success":Gt}">${s.defined?"Defined":"Open"}</span> ${s.isCore?gt`<span class="roxy-chip core">Core</span>`:Gt} <span class="held">Gate ${s.gateA} held by ${il(s.gateAHeldBy)}. Gate ${s.gateB} held by ${il(s.gateBHeldBy)}.</span></div>`)}</div>`}renderGates(e){if(e.length===0)return Gt;let t=e.filter(r=>r.filled).length;return gt`<div class="section" part="section gates"><h3>Gates (${t} of ${e.length} filled)</h3>${this.hideReadings?Gt:gt`<p class="note">The role each gate brings to the group, and who carries it. A gap is a role no member holds, so the group compensates for it.</p>`} ${e.map(r=>gt`<div class="row"><span class="gate-id">${r.gate}</span> <span class="cname">${r.gateName??""}</span> ${r.filled?gt`<span class="who">Held by ${il(r.heldBy)}</span>`:gt`<span class="roxy-chip" data-tone="danger">Gap</span>`}</div>`)}</div>`}};bs.endpoints=hc,bs.styles=[u,Ge,Za,Gu`.chart{width:100%;max-width:var(--roxy-chart-max-width,22rem);height:auto;margin:0 auto;display:block}.pn-bar{fill:color-mix(in srgb, var(--roxy-accent) 12%, transparent);stroke:var(--roxy-accent-ink);stroke-width:1.5px}.pn-bar-label{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .9375);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.pn-rung{stroke:var(--roxy-border);stroke-width:6px;stroke-dasharray:6 6}.pn-rung.on{stroke:var(--roxy-accent-ink);stroke-dasharray:none}.pn-rung.on.core{stroke-width:9px}.pn-name{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .75);font-family:var(--roxy-font-sans)}.pn-name.on{fill:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pn-gate-dot{fill:var(--_mask);stroke:var(--roxy-border);stroke-width:1.5px;stroke-dasharray:4 4}.pn-gate-dot.on{stroke:var(--roxy-accent-ink);stroke-dasharray:none}.pn-gate{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.pn-gate.on{fill:var(--roxy-fg)}.pn-badge{fill:var(--roxy-accent-ink)}.pn-badge-text{fill:var(--roxy-bg);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold);font-family:var(--roxy-font-sans)}.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.section{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md)}.note{margin-block-start:var(--roxy-space-xs)}.note,.held,.who,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.row:last-child{border-block-end:0}.gates,.gate-id{font-variant-numeric:tabular-nums;min-width:5ch;font-weight:var(--roxy-weight-bold);color:var(--roxy-accent-ink)}.cname{flex:1;min-width:16ch}.circuit{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.held{flex-basis:100%}.roxy-chip.core{color:var(--roxy-accent-ink);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}`],bs=m([f("roxy-hd-penta")],bs);var Iu="ABCDE",nh=n=>Iu[n]??String(n+1);function il(n){let a=(n??[]).map(nh);return a.length>0?a.join(", "):"nobody"}import{css as Fu,html as pn,nothing as eo}from"lit";var vs=class extends y{renderData(a){return Bu(a)?this.renderType(a):this.renderProfile(a)}renderType(a){return pn`<div class="wrap" part="card"><header class="head" part="header"><h2>${this.t("Type")}</h2>${a.type||a.profile?pn`<div class="type-line">${[g(a,"type"),a.profile?this.t("Profile {{profile}}",{profile:a.profile}):""].filter(Boolean).join(" · ")}</div>`:eo}</header>${$a([{label:this.t("Type"),value:g(a,"type")},{label:this.t("Strategy"),value:g(a,"strategy")},{label:this.t("Authority"),value:g(a,"authority")},{label:this.t("Profile"),value:a.profile}])} ${a.typeDescription&&!this.hideReadings?pn`<p class="lead">${a.typeDescription}</p>`:eo} ${ki(a.signature?g(a,"signature"):void 0,a.notSelf?g(a,"notSelf"):void 0,this.translator)} ${this.renderInterpretation([{label:this.t("Strategy"),aside:g(a,"strategy"),body:a.strategyDescription},{label:this.t("Authority"),aside:g(a,"authority"),body:a.authorityDescription},{label:this.t("Aura"),body:a.aura}],"hd-type-reading")}</div>`}renderProfile(a){return pn`<div class="wrap" part="card"><header class="head" part="header"><h2>${this.t("Profile")}</h2>${a.profile?pn`<div class="type-line">${a.profile}</div>`:eo}</header>${$a([{label:this.t("Profile"),value:a.profile},{label:this.t("Personality line"),value:a.personalityLine?.toString()},{label:this.t("Design line"),value:a.designLine?.toString()}])} ${this.hideReadings?eo:pn`<section class="block" part="section lines"><h3>${this.t("Lines")}</h3>${Si({personality:a.personalityKeynote,personalityLine:a.personalityLine,design:a.designKeynote,designLine:a.designLine},this.translator)}</section>`}</div>`}};vs.endpoints=mc,vs.styles=[u,M,j,Za,Fu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.type-line{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`],vs=m([f("roxy-hd-type-card")],vs);function Bu(n){return typeof n.type=="string"}import{css as Hu,html as nt,nothing as It}from"lit";var Ls=class extends y{renderData(a){let e=[...a.arrows??[]].sort((t,r)=>ih(t.position)-ih(r.position));return nt`<div class="wrap" part="card" aria-label="${this.t("Human Design variables")}"><h2 part="header">${this.t("Variables")}</h2><div class="grid" part="details arrows">${e.map(t=>this.renderArrow(t))}</div>${a.confident===!1?nt`<p class="note" role="note">${typeof a.confidenceMarginDeg=="number"?this.t("Low confidence: a birth time near a color or tone boundary (within {{margin}}°). Verify the exact birth time.",{margin:a.confidenceMarginDeg}):this.t("Low confidence: a birth time near a color or tone boundary. Verify the exact birth time.")}</p>`:It} ${this.renderReading(e,a.baseDescription)}</div>`}renderArrow(a){let e=a.direction==="left"?"←":"→",t=g(a,"baseName");return nt`<div class="arrow"><div class="arrow-head"><span class="glyph ${a.activation?.side??""}" aria-hidden="true">${e}</span> <span class="name">${g(a,"name")}</span></div>${a.layer?nt`<span class="layer">${g(a,"layer")}</span>`:It} <span class="labels">${[g(a,"directionLabel"),g(a,"colorLabel")].filter(Boolean).join(" · ")} </span>${typeof a.color=="number"?nt`<span class="ctb">${this.t("Color {{color}} · Tone {{tone}} · Base {{base}}",{color:a.color,tone:a.tone??"",base:a.base??""})}${t?`, ${t}`:""}</span>`:It} ${a.activation?.planet?nt`<span class="ctb">${[g(a.activation,"planet"),wi(a.activation.side,this.translator)].filter(Boolean).join(" · ")}</span>`:It} ${a.confident===!1?nt`<span class="note" role="note">${this.t("Knife-edge: could flip with a more precise birth time.")}</span>`:It}</div>`}renderReading(a,e){let t=a.filter(i=>i.description||i.colorMeaning);if(t.length===0||this.hideReadings)return It;let r=new Map;for(let i of t){let o=i.layer??"",l=r.get(o);l?l.push(i):r.set(o,[i])}let s=0;return nt`<section class="block" part="section readings"><h3>${this.t("Reading")}</h3>${[...r].map(([i,o])=>nt`<div class="group">${i?nt`<p class="group-head">${g(o[0],"layer")}</p>`:It} ${o[0]?.layerDescription?nt`<p class="group-note">${o[0].layerDescription}</p>`:It} ${o.map(l=>this.renderArrowReading(l,s++===0))}</div>`)} ${e?nt`<p class="footnote">${this.t("Base")}. ${e}</p>`:It}</section>`}renderArrowReading(a,e){let t=a.cognition,r=t?g(t,"label"):"",s=[{label:this.t("Color"),body:a.colorMeaning},{label:this.t("Tone"),body:a.toneMeaning},{label:this.t("Direction"),body:a.directionMeaning},{label:r?`${this.t("Cognition")} · ${r}`:this.t("Cognition"),body:t?.description}].filter(i=>!!i.body);return nt`<details class="interp-card" part="reading" name="hd-variable" ?open="${e}"><summary><span class="interp-lead">${g(a,"name")}</span> ${H()} ${a.position?nt`<span class="interp-aside"><small>${g(a,"position")}</small></span>`:It}</summary><div class="interp-body">${a.description?nt`<p>${a.description}</p>`:It} ${s.length>0?nt`<dl class="facets">${s.map(i=>nt`<dt>${i.label}</dt><dd>${i.body}</dd>`)}</dl>`:It}</div></details>`}};Ls.endpoints=gc,Ls.styles=[u,M,j,Hu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.grid{gap:0 var(--roxy-space-lg);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.arrow{align-content:start;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.arrow-head{align-items:center;gap:var(--roxy-space-sm);display:flex}.glyph{font-size:var(--roxy-text-xl);color:var(--roxy-accent-ink);line-height:1}.glyph.design{color:var(--roxy-danger-fg)}.glyph.personality{color:var(--roxy-fg)}.name{font-weight:var(--roxy-weight-bold)}.layer,.ctb{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.ctb{font-variant-numeric:tabular-nums}.labels{font-size:var(--roxy-text-sm)}.note{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs)}@container (width<=28rem){.grid{grid-template-columns:minmax(0,1fr)}}.group+.group{margin-block-start:var(--roxy-space-md)}.group-head{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-note,.footnote{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.group-note{margin-block-end:var(--roxy-space-sm)}.facets{gap:var(--roxy-space-xs);margin:0;display:grid}.facets dd{margin:0}`],Ls=m([f("roxy-hd-variables")],Ls);function ih(n){switch(n){case"Top left":return 0;case"Top right":return 1;case"Bottom left":return 2;case"Bottom right":return 3;default:return 99}}import{css as ju,html as or,nothing as ol}from"lit";var Ku={udaya:"Rose",asta:"Set"},Vu={udaya:"rises",asta:"sets"},$s=class extends y{renderData(a){let e=a.grahas??[];return e.length?or`<div class="wrap" part="card" aria-label="${this.t("Heliacal visibility")}"><header class="head" part="header"><h2>${this.t("Heliacal rising and setting")}</h2><p class="sub">${this.t("Whether each graha stands far enough from the Sun to be seen, for {{date}}. The Sun and the nodes never appear here: they have no heliacal event.",{date:a.date})}</p></header><div part="table">${e.map(t=>this.renderGraha(t))}</div></div>`:this.renderEmpty()}renderGraha(a){let e=$(a.graha)??"";return or`<article class="row"><div class="row-top"><span class="graha">${e?or`<span class="glyph">${e}</span>`:ol}${a.graha} </span><span class="state roxy-chip ${a.visible?"visible":"invisible"}" data-tone="${a.visible?ol:"warning"}">${a.visible?this.t("Visible"):this.t("Invisible")} </span>${a.retrograde?or`<span class="retro" title="${this.t("retrograde")}">R</span>`:ol}</div><p class="window" part="window">${this.windowLine(a)}</p><p class="meta" part="details">${this.metaLine(a)}</p></article>`}windowLine(a){let e=a.nextEvent,t=a.lastEvent;if(e){let r={event:this.t(Vu[e.type]),where:e.horizon==="east"?this.t("in the east"):this.t("in the west"),when:V(this.effectiveLang(),e.datetime)};return or`${a.visible?this.t("Visible until it {{event}} {{where}} on {{when}}",r):this.t("Invisible until it {{event}} {{where}} on {{when}}",r)}`}return t?or`${this.t("{{event}} {{where}} on {{when}}, with no further event inside the search window",{event:this.t(Ku[t.type]),where:t.horizon==="east"?this.t("in the east"):this.t("in the west"),when:V(this.effectiveLang(),t.datetime)})}`:or`${this.t("No rising or setting inside the search window, which is normal for a graha far from the Sun")}`}metaLine(a){let e=a.horizon==="east"?this.t("a morning graha, read before sunrise"):this.t("an evening graha, read after sunset"),t=a.nextEvent??a.lastEvent,r=t&&t.kalamsa!==a.kalamsa,s={degrees:b(this.effectiveLang(),a.timeDegrees,2),limit:b(this.effectiveLang(),a.kalamsa,0),shifted:r?b(this.effectiveLang(),t.kalamsa,0):""};return or`${r?this.t("{{degrees}}° of time from the Sun against a limit of {{limit}}°, becoming {{shifted}}° at that event",s):this.t("{{degrees}}° of time from the Sun against a limit of {{limit}}°",s)} · ${e}`}};$s.endpoints=yc,$s.styles=[u,ju`.wrap{overflow:hidden}.head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);display:grid}h2,p{margin:0}.sub,.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.row{gap:var(--roxy-space-xs);padding:var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);grid-template-columns:minmax(0,1fr);display:grid}.row-top{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.window{font-size:var(--roxy-text-sm)}`],$s=m([f("roxy-heliacal-table")],$s);import{css as qu,html as Ue,nothing as it}from"lit";var ws=class extends y{resolveHexagram(){let a=this.data;if(!a)return null;if("hexagram"in a&&a.hexagram){if("lines"in a){let s=a,i=s.hexagram;return{hex:i,lines:s.lines,date:s.date,changingLinePositions:s.changingLinePositions,changingLines:s.changingLines??i.changingLines,resultingHexagram:s.resultingHexagram}}let t=a,r=t.hexagram;return{hex:r,changingLines:r.changingLines,dailyMessage:t.dailyMessage,date:t.date}}let e=a;return{hex:e,changingLines:e.changingLines}}renderData(){let a=this.resolveHexagram();if(!a)return this.renderEmpty();let{hex:e,lines:t,changingLinePositions:r,changingLines:s,dailyMessage:i,date:o,resultingHexagram:l}=a;return Ue`<article class="card" part="card" aria-label="${this.t("I Ching hexagram")}">${this.renderHexagram("hexagram",e,t,r,s,i,o)} ${l?Ue`<details class="result" part="section resulting-hexagram"><summary>${this.t("Becomes hexagram {{number}} {{name}}.",{number:l.number,name:l.english??l.chinese??""})}${H()}</summary><div class="result-chart">${this.renderHexagram("result",l)}</div></details>`:it}</article>`}renderHexagram(a,e,t,r,s,i,o){let l=t??this.derivedLines(e),c=new Set(r??[]),d=!this.hideReadings;return Ue`<div class="glyphs" part="chart">${e.symbol?Ue`<div class="symbol">${e.symbol}</div>`:it} ${l.length>0?Ue`<div class="lines" aria-hidden="true">${l.slice().reverse().map((p,h)=>{let x=l.length-1-h+1,L=c.has(x),v=p===6||p===8;return Ue`<div class="line ${`${v?"broken":"solid"}${L?" changing":""}`}">${v?Ue`<span class="seg"></span><span class="seg"></span>`:Ue`<span class="seg"></span>`}</div>`})}</div>`:it}</div><div part="header"><h2>${[e.number!=null?`${e.number}.`:"",e.english??e.chinese??this.t("I Ching hexagram")].filter(Boolean).join(" ")}</h2>${o?Ue`<time class="daily-date" part="details" datetime="${o}">${R(this.effectiveLang(),o)}</time>`:it}<p class="subtitle">${e.chinese?Ue`${e.chinese}`:it} ${e.pinyin?Ue`· ${e.pinyin}`:it}</p><div class="trigrams roxy-label" part="details">${e.upperTrigram?Ue`<div>${this.t("Upper")} <span class="tri-glyph">${Ro(e.upperTrigram)??""}</span>${e.upperTrigram}</div>`:it} ${e.lowerTrigram?Ue`<div>${this.t("Lower")} <span class="tri-glyph">${Ro(e.lowerTrigram)??""}</span>${e.lowerTrigram}</div>`:it}</div>${e.judgment&&d?Ue`<p class="judgment">${e.judgment}</p>`:it} ${e.image&&d?Ue`<p class="image">${e.image}</p>`:it} ${i&&d?Ue`<p class="message">${i}</p>`:it} ${e.interpretation?.general&&d?Ue`<p>${e.interpretation.general}</p>`:it} ${c.size>0?Ue`<div class="changes" part="section changing-lines">${this.t("Changing lines: {{lines}}.",{lines:Array.from(c).sort((p,h)=>p-h).join(", ")})}</div>`:it} ${this.renderTopics(e,a)} ${this.renderLines(s??e.changingLines,c,`${a}-lines`)}</div>`}renderTopics(a,e){let t=a.interpretation;return t?this.renderInterpretation([{label:this.t("Love"),body:t.love??""},{label:this.t("Career"),body:t.career??""},{label:this.t("Decision"),body:t.decision??""},{label:this.t("Advice"),body:t.advice??""}].filter(r=>r.body),`${e}-topics`,"Readings"):it}renderLines(a,e,t){let r=a??[];if(r.length===0)return it;let s=e.size>0,i=s?r.filter(l=>e.has(l.position)):r;if(i.length===0)return it;let o=i.map(l=>({label:`Line ${l.position}`,body:l.text??"",extra:l.meaning?Ue`<p class="line-meaning">${l.meaning}</p>`:it}));return this.renderInterpretation(o,t,s?"Changing lines":"Lines")}derivedLines(a){let e=a.binary??"";return/^[01]{6}$/.test(e)?Array.from(e,t=>t==="1"?7:8):[]}};ws.endpoints=uc,ws.styles=[u,M,j,qu`.card{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,4lh) minmax(0,1fr);display:grid}.result-chart{gap:var(--roxy-space-lg);grid-template-columns:minmax(0,4lh) minmax(0,1fr);padding-block-start:var(--roxy-space-md);display:grid}.result{border-block-start:1px solid var(--roxy-border);grid-column:1/-1;padding-block-start:var(--roxy-space-md)}.result>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);display:flex}@container (width<=480px){.card,.result-chart{grid-template-columns:minmax(0,1fr)}}h2,p{margin:0}.glyphs{align-content:start;align-self:start;justify-items:center;gap:var(--roxy-space-md);display:grid}.symbol{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2);line-height:1}.lines{gap:calc(var(--roxy-space-unit) * 1.5);inline-size:2lh;display:grid}.line{gap:var(--roxy-space-xs);grid-template-columns:1fr 1fr;display:grid}.seg{block-size:calc(var(--roxy-line-thick) * 3);background:var(--roxy-fg);display:block}.line.solid .seg{grid-column:1/-1}.line.changing .seg{background:var(--roxy-accent)}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm)}.daily-date{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm);display:block}.trigrams{gap:var(--roxy-space-md);flex-wrap:wrap;margin-block-end:var(--roxy-space-sm);display:flex}.tri-glyph{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);vertical-align:middle;margin-inline-end:var(--roxy-space-xs)}.judgment,.image,.message{font-size:var(--roxy-text-sm);margin-block-end:var(--roxy-space-sm)}.judgment:before{content:"Judgment. ";color:var(--roxy-secondary);font-weight:var(--roxy-weight-bold)}.image:before{content:"Image. ";color:var(--roxy-secondary);font-weight:var(--roxy-weight-bold)}.line-meaning{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);color:var(--roxy-muted);padding-inline-start:var(--roxy-space-sm)}.changes{border-block-start:1px solid var(--roxy-border);color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-md);padding-block-start:var(--roxy-space-md)}`],ws=m([f("roxy-hexagram")],ws);import{css as Yu,html as Gn,nothing as ll}from"lit";var ks=class extends y{renderData(a){let e=a.dayHoras??[],t=a.nightHoras??[];return e.length===0&&t.length===0?this.renderEmpty():Gn`<div class="wrap" part="card" aria-label="${this.t("Hora periods")}"><div class="head" part="header"><h2>${this.t("Hora")}</h2>${a.date?Gn`<p class="roxy-label">${R(this.effectiveLang(),a.date)}</p>`:ll}</div><div class="cols" part="table">${this.renderColumn(this.t("Daytime"),e)} ${this.renderColumn(this.t("Night"),t)}</div></div>`}renderColumn(a,e){return e.length===0?ll:Gn`<div class="col"><h3 class="section-label">${a}</h3>${e.map(t=>Gn`<div class="row"><span class="glyph" aria-hidden="true">${$(t.planet)??"·"}</span> <span class="planet">${t.planet}</span> <span class="time">${ia(this.effectiveLang(),t)}</span> ${typeof t.number=="number"?Gn`<span class="num">${t.number}</span>`:ll}</div>`)}</div>`}};ks.endpoints=fc,ks.styles=[u,Yu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.cols{gap:var(--roxy-space-md);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.section-label{margin-block-end:var(--roxy-space-xs)}.row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;display:flex}.row:last-child{border-block-end:0}.glyph{inline-size:2ch;color:var(--roxy-accent-ink);font-size:var(--roxy-text-base);text-align:center;line-height:1}.planet{flex:1}.time{color:var(--roxy-muted);white-space:nowrap}.num{inline-size:3ch;color:var(--roxy-muted);font-size:var(--roxy-text-xs);text-align:end}@container (width<=30rem){.cols{grid-template-columns:minmax(0,1fr)}}`],ks=m([f("roxy-hora-table")],ks);import{css as Uu,html as D,nothing as W}from"lit";import{property as oh}from"lit/decorators.js";var Zu={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Wu={aspect:"Aspect","sign-ingress":"Sign ingress","retrograde-station":"Retrograde station","lunar-phase":"Lunar phase",eclipse:"Eclipse","solar-season":"Solar season"},Xu=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"],["advice","Advice"]],Ju=[["love","Love"],["career","Career"],["health","Health"],["finance","Finance"]],Ca=class extends y{constructor(){super(...arguments);this.period="daily";this.layout="auto"}renderData(e){let t=e.sign??"",r=N(t)??"",s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,i=this.effectiveLang(),o="date"in e&&e.date&&R(i,e.date)||"week"in e&&e.week&&R(i,e.week)||"month"in e&&e.month&&Ga(i,e.month,"month")||("year"in e&&e.year?String(e.year):"")||"";return D`<article class="card" part="card" aria-labelledby="horoscope-title"><header class="head" part="header"><span class="glyph" aria-hidden="true">${r}</span><div><h2 class="title" id="horoscope-title">${t} ${this.t(Zu[this.period])}</h2>${o?D`<p class="date roxy-label">${o}</p>`:W}</div>${s!==null?D`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:s})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:W}</header>${this.renderReading(e)} ${this.renderSky(e)} ${this.renderEvents(e.events)} ${this.renderYear(e)} ${this.renderMonth(e)} ${(()=>{let l="luckyNumber"in e&&e.luckyNumber!==void 0?e.luckyNumber:void 0,c="luckyColor"in e&&e.luckyColor?e.luckyColor:"",d="luckyNumbers"in e&&e.luckyNumbers?e.luckyNumbers:[],p="luckyDays"in e&&e.luckyDays?e.luckyDays:[],h=e.compatibleSigns??[];return l===void 0&&!c&&d.length===0&&p.length===0&&h.length===0?W:D`<div class="lucky" part="details">${l!==void 0?D`<span>${this.t("Lucky number")} <strong>${l}</strong></span>`:W} ${c?D`<span>${this.t("Lucky color")} <strong>${c}</strong></span>`:W} ${d.length?D`<span>${this.t("Lucky numbers")} <strong>${d.join(", ")}</strong></span>`:W} ${p.length?D`<span>${this.t("Lucky days")} <strong>${p.join(", ")}</strong></span>`:W} ${h.length?D`<span class="compat-wrap">${this.t("Best with")}<ul class="compat roxy-chips">${h.map(x=>D`<li>${x}</li>`)}</ul></span>`:W}</div>`})()}</article>`}renderReading(e){if(this.hideReadings)return W;if(this.layout==="column"||this.layout==="auto"&&!!e.column)return e.column?this.renderColumn(e.column):W;let r=this.paragraphs(e.overview);return D`${r.length?D`<div class="overview" part="section overview">${r}</div>`:W}<div class="sections" part="section outlook">${Xu.map(([s,i])=>{let o=this.paragraphs(e[s]);return o.length?D`<div class="section"><h3>${this.t(i)}</h3>${o}</div>`:W})}</div>`}renderColumn(e){let t=this.paragraphs(e);return t.length===0?W:D`<div class="column" part="section column">${t}</div>`}paragraphs(e){return(e??"").split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean).map(t=>D`<p>${t}</p>`)}renderEvents(e){if(!e?.length)return W;let t=this.effectiveLang();return D`<section part="section events"><h3>${this.t("Events")}</h3><ul class="rows" aria-label="${this.t("Events")}">${e.map(r=>this.renderRow(D`<time class="row-when" datetime="${r.at}">${Ga(t,r.at,"time")}</time>`,this.renderEventBodies(r),D`<span class="kind">${this.t(Wu[r.type])}</span> <span>${this.t("House")} ${r.house}</span> ${r.sign?D`<span>${this.glyphName(N(r.sign),A(r.sign))}</span>`:W} ${r.through?D`<span>${this.t("through {{date}}",{date:R(t,r.through)})}</span>`:W}`,{when:"element"}))}</ul></section>`}renderEventBodies(e){let t=(e.bodies??[]).map(r=>this.glyphName($(r),r));return t.length===2&&e.aspect?D`${t[0]} <span class="${Je({type:e.aspect})}">${tn(e.aspect)??e.aspect}</span> ${t[1]}`:D`${t}`}renderYear(e){if(!("themes"in e))return W;let t=this.effectiveLang();return D`${e.themes.length?D`<section part="section themes"><h3>${this.t("Themes")}</h3><ul class="rows">${e.themes.map(r=>this.renderRow(xt(t,r.from,r.to),D`${this.glyphName($(r.body),r.body)} ${this.glyphName(N(r.sign),A(r.sign))}`,D`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:W} ${e.keyPeriods.length?D`<section part="section key-periods"><h3>${this.t("Key periods")}</h3><ul class="rows">${e.keyPeriods.map(r=>this.renderRow(xt(t,r.from,r.to),this.glyphName($(r.body),r.body),D`<span>${this.t("House")} ${r.house}</span><span>${r.focus}</span>`))}</ul></section>`:W} ${e.eclipses.length?D`<section part="section eclipses"><h3>${this.t("Eclipses")}</h3><ul class="rows">${e.eclipses.map(r=>this.renderRow(R(t,r.date),D`<span class="name">${r.kind}</span>`,D`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:W} ${e.retrogrades.length?D`<section part="section retrogrades"><h3>${this.t("Retrogrades")}</h3><ul class="rows">${e.retrogrades.map(r=>this.renderRow(R(t,r.date),D`${this.glyphName($(r.body),r.body)} <span>${r.direction}</span>`,D`<span>${this.t("House")} ${r.house}</span><span>${r.theme}</span>`))}</ul></section>`:W} ${this.renderBestPeriods(e.bestPeriods)}`}renderBestPeriods(e){if(!e)return W;let t=this.effectiveLang(),r=Ju.filter(([s])=>e[s]);return r.length===0?W:D`<section part="section best-periods"><h3>${this.t("Best months")}</h3><div class="tiles" part="details">${r.map(([s,i])=>{let o=e[s];return o?D`<div class="tile"><span class="roxy-label">${this.t(i)}</span> <span class="tile-value">${Ga(t,o.from,"month")}</span> <span class="tile-note">${this.t("{{count}} harmonious aspects",{count:o.count})}</span></div>`:W})}</div></section>`}renderRow(e,t,r,s){return D`<li class="row" part="label-track">${s?.when==="element"?e:D`<span class="row-when">${e}</span>`} <span class="row-what">${t}</span> <span class="row-meta">${r}</span></li>`}glyphName(e,t){return D`<span aria-hidden="true">${e??""}</span> <span class="name">${t}</span>`}renderSky(e){let t="moonSign"in e?e.moonSign:"",r="moonPhase"in e?e.moonPhase:"",s=("activeTransits"in e?e.activeTransits:[])??[];if(!t&&!r&&s.length===0)return W;let i=N(t)??"";return D`<div class="sky" part="section sky">${t||r?D`<div class="moon-line">${t?D`<span><span class="roxy-label">${this.t("Moon")}</span> <span aria-hidden="true">${i}</span> <b>${t}</b></span>`:W} ${r?D`<span><span class="roxy-label">${this.t("Phase")}</span> <b>${r}</b></span>`:W}</div>`:W} ${s.length?D`<ul class="transits" aria-label="${this.t("Active transits")}">${s.map(o=>D`<li>${o}</li>`)}</ul>`:W}</div>`}renderMonth(e){let t=("weekByWeek"in e?e.weekByWeek:[])??[],r=("keyDates"in e?e.keyDates:[])??[];return t.length===0&&r.length===0?W:D`${t.length&&!this.hideReadings?D`<section part="section week-by-week"><h3>${this.t("Week by week")}</h3><div class="weeks">${t.map(s=>D`<div class="week"><span class="roxy-label">${this.t("Week {{n}}",{n:s.week})}</span><div><div class="week-focus">${s.focus}</div>${s.advice?D`<p class="week-advice">${s.advice}</p>`:W}</div></div>`)}</div></section>`:W} ${r.length?D`<section part="section key-dates"><h3>${this.t("Key dates")}</h3><dl class="dates" part="label-track">${r.map(s=>D`<div class="date-row"><dt>${R(this.effectiveLang(),s.date)||s.date}</dt><dd>${s.event}</dd></div>`)}</dl></section>`:W}`}};Ca.endpoints=xc,Ca.styles=[u,va,rr,Uu`.card{gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}section>h3{margin-block-end:var(--roxy-space-sm)}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.glyph{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);line-height:1}.title{text-transform:capitalize;white-space:nowrap}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar{inline-size:10ch;block-size:var(--roxy-space-sm);background:var(--roxy-border);border-radius:var(--roxy-radius-full);vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block;overflow:hidden}.energy-bar>span{background:var(--roxy-accent);height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.column p,.overview p,.section p{line-height:1.7}.overview,.column,.section{align-content:start;gap:var(--roxy-space-sm);display:grid}.column{gap:var(--roxy-space-md)}.sections{gap:var(--roxy-space-lg) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,48ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm)}.sky,.lucky{border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);padding-block-start:var(--roxy-space-md)}.sky{gap:var(--roxy-space-sm);display:grid}.lucky{gap:var(--roxy-space-sm) var(--roxy-space-md);color:var(--roxy-secondary);flex-wrap:wrap;display:flex}.lucky strong{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.compat-wrap{align-items:center;gap:var(--roxy-space-xs);flex-wrap:wrap;width:100%;display:flex}.compat>li{text-transform:capitalize}.moon-line{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.moon-line b{font-weight:var(--roxy-weight-bold)}.moon-line .roxy-label{margin-inline-end:var(--roxy-space-xs)}.transits{gap:var(--roxy-space-xs);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.transits li::marker{color:var(--roxy-accent)}.weeks{gap:var(--roxy-space-sm);display:grid}.week{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);align-items:baseline;gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.week:first-child{border-block-start:0;padding-block-start:0}.week-focus{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.week-advice{font-size:var(--roxy-text-sm);margin-block-start:calc(var(--roxy-space-unit) / 2)}.dates{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);margin:0;display:grid}.date-row{display:contents}.date-row dt{color:var(--roxy-accent-ink);font-size:inherit;font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.date-row dd{margin:0}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.row:first-child{border-block-start:0;padding-block-start:0}.row-when{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.row-what{font-size:var(--roxy-text-sm)}.row-what .name,.row-meta .kind{font-weight:var(--roxy-weight-bold)}.row-meta{gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;grid-column:2;display:flex}@container (width<=30rem){.row-meta{grid-column:1}}.tiles{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));display:grid}.tile{gap:calc(var(--roxy-space-unit) / 2);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm);display:grid}.tile-value{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.tile-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],m([oh({type:String,reflect:!0})],Ca.prototype,"period",2),m([oh({type:String,reflect:!0})],Ca.prototype,"layout",2),Ca=m([f("roxy-horoscope-card")],Ca);import{css as Qu,html as ne,nothing as Qt}from"lit";import{state as ef}from"lit/decorators.js";var tf=[{id:"planets",label:"Planets"},{id:"cusps",label:"Cusps"},{id:"significators",label:"Significators"}],to=[1,2,3,4];function cl(n,a){return n?typeof a=="number"?`${n} ${a}`:n:""}function lh(n){return[...new Set(n.map(String))].join(" > ")}function af(n){return[...new Set(n??[])]}var lr=class extends y{constructor(){super(...arguments);this.activeTab="planets"}bodies(){let e=this.data;if(!e)return[];let t=(e.planets??[]).map(s=>({name:s.planet,longitude:s.longitude,house:s.house,nakshatra:s.nakshatra,pada:s.pada,starLord:s.starLord,subLord:s.subLord,subSubLord:s.subSubLord,kpNumber:s.kpNumber,retrograde:s.retrograde})),r=e.nodes;for(let[s,i]of[["Rahu",r?.rahu],["Ketu",r?.ketu]])i&&t.push({name:s,longitude:i.longitude,house:i.house,nakshatra:i.nakshatra,pada:i.pada,starLord:i.starLord,subLord:i.subLord,subSubLord:i.subSubLord,kpNumber:i.kpNumber,retrograde:!0});return t}renderData(e){let t=e.ascendant;return ne`<div class="wrap" part="card" aria-label="KP chart"><header class="head" part="header"><h2 class="title">KP chart</h2>${t?ne`<div class="asc">Ascendant: <strong>${typeof t.longitude=="number"?Qe(t.longitude):t.sign??""} </strong>${t.nakshatra?ne`· ${cl(t.nakshatra,t.pada)}`:Qt} ${t.subLord?ne`· sub lord ${t.subLord}`:Qt} ${typeof t.kpNumber=="number"?ne`· KP ${t.kpNumber}`:Qt}</div>`:Qt} ${typeof e.meta?.ayanamsa=="number"?ne`<div class="ayan">Ayanamsa: ${Nr(this.effectiveLang(),e.meta.ayanamsaType,e.meta.ayanamsa)} ${e.meta.houseSystem?ne`· ${e.meta.houseSystem} houses`:Qt}</div>`:Qt}</header>${dt({items:tf,active:this.activeTab,onSelect:r=>{this.activeTab=r},label:"KP chart views",idPrefix:"kp",controls:!0})}<div id="kp-panel-${this.activeTab}" part="panel" role="tabpanel" aria-labelledby="kp-tab-${this.activeTab}">${this.activeTab==="planets"?this.renderPlanets():this.activeTab==="cusps"?this.renderCusps():this.renderSignificators()}</div></div>`}renderPlanets(){let e=this.bodies();return e.length?this.scrollBox(ne`<table part="table" role="table"><caption id="kp-planets-caption" class="roxy-sr-only">KP planets and nodes: each body with its position, house, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">Position</th><th scope="col">House</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>ne`<tr><td class="body">${t.name}${t.retrograde?ne`<span class="retro">R</span>`:Qt}</td><td class="num">${typeof t.longitude=="number"?Qe(t.longitude):""}</td><td class="num">${typeof t.house=="number"?t.house:""}</td><td>${cl(t.nakshatra,t.pada)}</td><td>${t.starLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td class="num">${typeof t.kpNumber=="number"?t.kpNumber:""}</td></tr>`)}</tbody></table>`,"kp-planets-caption"):ne`<p class="roxy-empty" role="status">No planets</p>`}renderCusps(){let e=this.data?.cusps??[],t=this.data?.houseThemes;return e.length?this.scrollBox(ne`<table part="table" role="table"><caption id="kp-cusps-caption" class="roxy-sr-only">KP Placidus cusps: each house cusp with what it signifies, its position, sign lord, nakshatra and pada, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">House</th><th scope="col">Position</th><th scope="col">Sign lord</th><th scope="col">Nakshatra, pada</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(r=>ne`<tr><td class="body num">${r.house}${this.renderThemes(Eo(r.house,t))}</td><td class="num">${typeof r.longitude=="number"?Qe(r.longitude):r.sign??""}</td><td>${r.signLord??""}</td><td>${cl(r.nakshatra,r.pada)}</td><td>${r.starLord??""}</td><td>${r.subLord??""}</td><td>${r.subSubLord??""}</td><td class="num">${typeof r.kpNumber=="number"?r.kpNumber:""}</td></tr>`)}</tbody></table>`,"kp-cusps-caption"):ne`<p class="roxy-empty" role="status">No cusps</p>`}renderSignificators(){let e=this.data?.significators,t=this.data?.houseThemes,r=e?.houseWise??[],s=e?.planetWise??[];return!r.length&&!s.length?ne`<p class="roxy-empty" role="status">No significators</p>`:ne`${this.renderLevelLegend(r)} ${r.length?ne`<div class="sig-head"><h3 class="sig-title">House-wise significators</h3><p class="sig-note">Planets that signify each house, strongest level first.</p></div>${this.scrollBox(ne`<table part="table" role="table"><caption id="kp-house-sig-caption" class="roxy-sr-only">KP house-wise significators: each house, the planets that signify it at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">House</th>${to.map(i=>ne`<th scope="col">L${i}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${r.map(i=>ne`<tr><td class="body num">${i.house}${this.renderThemes(Eo(i.house,t))}</td>${to.map(o=>this.renderCell(this.planetsAtLevel(i,o).join(", ")))}<td class="chain">${lh(i.all??[])}</td></tr>`)}</tbody></table>`,"kp-house-sig-caption")}`:Qt} ${s.length?ne`<div class="sig-head"><h3 class="sig-title">Planet-wise significators</h3><p class="sig-note">Houses each planet signifies, strongest level first.</p></div>${this.scrollBox(ne`<table part="table" role="table"><caption id="kp-planet-sig-caption" class="roxy-sr-only">KP planet-wise significators: each planet, the houses it signifies at levels 1 to 4, and the full strength order.</caption><thead><tr><th scope="col">Planet</th>${to.map(i=>ne`<th scope="col">L${i}</th>`)}<th scope="col">Strength order</th></tr></thead><tbody>${s.map(i=>ne`<tr><td class="body">${i.planet}</td>${to.map(o=>this.renderCell(this.housesAtLevel(i,o).join(", ")))}<td class="chain">${lh(i.allHouses??[])}${this.renderThemes(da(af(i.allHouses),t))}</td></tr>`)}</tbody></table>`,"kp-planet-sig-caption")}`:Qt}`}scrollBox(e,t){return ne`<div class="scroll" tabindex="0" role="region" aria-labelledby="${t}">${e}</div>`}renderThemes(e){return e?ne`<span class="themes">${e}</span>`:Qt}renderCell(e){return e?ne`<td>${e}</td>`:ne`<td class="empty-cell">none</td>`}planetsAtLevel(e,t){return(e.significators??[]).filter(r=>r.level===t).flatMap(r=>r.planets??[])}housesAtLevel(e,t){return(e.signifies??[]).filter(r=>r.level===t).flatMap(r=>r.houses??[])}renderLevelLegend(e){let t=new Map;for(let r of e)for(let s of r.significators??[])s.description&&!t.has(s.level)&&t.set(s.level,s.description);return t.size===0?Qt:ne`<ul class="legend" part="legend" aria-label="Significator levels">${[...t.entries()].sort((r,s)=>r[0]-s[0]).map(([r,s])=>ne`<li><b>L${r}</b>${s}</li>`)}</ul>`}};lr.endpoints=bc,lr.styles=[u,Xe,Qu`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{gap:var(--roxy-space-xs);display:grid}.title,.sig-title,.sig-note{margin:0}.asc,.ayan{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.asc strong{color:var(--roxy-fg)}[role=tabpanel]:not([hidden]){gap:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.body{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.num{font-variant-numeric:tabular-nums}.sig-head{gap:var(--roxy-space-xs);display:grid}.sig-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.legend b{color:var(--roxy-accent-ink);margin-inline-end:var(--roxy-space-xs)}.chain,.empty-cell{color:var(--roxy-muted)}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-normal);display:block}`],m([ef()],lr.prototype,"activeTab",2),lr=m([f("roxy-kp-chart")],lr);import{css as rf,html as xe,nothing as hn}from"lit";var sf={strong:"Strong",favourable:"Favourable",mixed:"Mixed",caution:"Caution",unfavourable:"Unfavourable"},nf={favourable:"Favourable",mixed:"Mixed",unfavourable:"Unfavourable",neutral:"Neutral"},ch={cusps:"Cusps",dasha:"Dasha",rulingPlanets:"Ruling planets",moonWindows:"Moon windows"},of={gain:"Gain",loss:"Loss"},lf={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha",sookshmaDasha:"Sookshma"},Ss=class extends y{renderData(a){return a.layers?xe`<div class="wrap" part="card" aria-label="${this.t("KP daily finance")}">${this.renderHead(a)} ${this.renderSignificators(a)}<section class="block" part="section cusps">${this.renderLayer("cusps",a.layers.cusps,this.renderCuspRows(a.layers.cusps.rows))}</section><section class="block" part="section dasha">${this.renderLayer("dasha",a.layers.dasha,this.renderDashaRows(a.layers.dasha.rows))}</section><section class="block" part="section ruling-planets">${this.renderLayer("rulingPlanets",a.layers.rulingPlanets,this.renderRulingRows(a.layers.rulingPlanets.rows))}</section><section class="block" part="section moon-windows">${this.renderLayer("moonWindows",a.layers.moonWindows,this.renderWindowRows(a.layers.moonWindows.rows))}</section>${this.renderWindows(a)}<section class="block" part="section frame">${X(this.effectiveLang(),{ayanamsa:a.ayanamsa,ayanamsaDegrees:a.ayanamsaDegrees},this.translator)}</section></div>`:this.renderEmpty()}renderHead(a){let e=this.effectiveLang();return xe`<header class="head" part="header"><div class="title-row"><h2 class="title">${this.t("KP daily finance")}</h2><span class="when">${V(e,a.date)}</span></div><div class="verdict-row"><span class="verdict ${a.band}">${this.t(sf[a.band])}</span> <span class="evidence">${b(e,a.score,1)}</span></div><dl class="roxy-facts" part="details"><div class="fact"><dt>${this.t("Reading moment")}</dt><dd>${V(e,a.readingAt)}</dd></div><div class="fact"><dt>${this.t("Gain houses")}</dt><dd>${qe(e,a.houses.gain.map(String))}</dd></div><div class="fact"><dt>${this.t("Loss houses")}</dt><dd>${qe(e,a.houses.loss.map(String))}</dd></div></dl></header>`}renderSignificators(a){let e=a.significators,t=this.effectiveLang(),r=s=>xe`<div class="roxy-chips">${s.map(i=>xe`<span class="chip roxy-chip">${this.glyphName(i)}</span>`)}</div>`;return xe`<section class="block" part="section significators"><h3>${this.t("Significators")}</h3><dl class="roxy-facts"><div class="fact"><dt>${this.t("Gain")}</dt><dd>${r(e.gain)}</dd></div><div class="fact"><dt>${this.t("Loss")}</dt><dd>${r(e.loss)}</dd></div></dl>${e.byHouse.length?xe`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Significators")}"><table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Significators")}</th></tr></thead><tbody>${e.byHouse.map(s=>xe`<tr><td class="num">${s.house} ${this.groupChip(s.group)}</td><td class="names">${qe(t,[...new Set(s.significators)])}</td></tr>`)}</tbody></table></div>`:hn}</section>`}renderLayer(a,e,t){let r=this.effectiveLang();return xe`<div class="block-head"><h3>${this.t(ch[a])}</h3><span class="evidence">${this.t("Weight")} ${we(r,e.weight,0)} · ${this.t("Score")} ${b(r,e.score,1)}</span></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(ch[a])}">${t}</div>`}renderCuspRows(a){return xe`<table><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Star lord")}</th><th scope="col">${this.t("Sign lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(e=>xe`<tr><td class="num">${e.house} ${this.groupChip(e.inverted?"loss":"gain")}</td><td>${this.glyphName(e.subLord)}</td><td>${this.glyphName(e.starLord)}</td><td>${this.glyphName(e.signLord)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderDashaRows(a){let e=this.effectiveLang();return xe`<table><thead><tr><th scope="col">${this.t("Level")}</th><th scope="col">${this.t("Lord")}</th><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th><th scope="col">${this.t("Weight")}</th></tr></thead><tbody>${a.map(t=>xe`<tr><td>${this.t(lf[t.level])}</td><td>${this.glyphName(t.lord,t.retrograde)}</td><td>${V(e,t.startDate)}</td><td>${V(e,t.endDate)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${b(e,t.score,0)}</td><td class="num">${we(e,t.weight,0)}</td></tr>`)}</tbody></table>`}renderRulingRows(a){return xe`<table><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(e=>xe`<tr><td>${this.glyphName(e.planet,e.retrograde)}</td><td>${this.verdictChip(e.verdict)}</td><td class="num">${b(this.effectiveLang(),e.score,0)}</td></tr>`)}</tbody></table>`}renderWindowRows(a){let e=this.effectiveLang();return xe`<table><thead><tr><th scope="col">${this.t("Start")}</th><th scope="col">${this.t("End")}</th><th scope="col">${this.t("Sub lord")}</th><th scope="col">${this.t("Verdict")}</th><th scope="col">${this.t("Score")}</th></tr></thead><tbody>${a.map(t=>xe`<tr><td>${Rt(e,t.from)}</td><td>${Rt(e,t.to)}</td><td>${this.glyphName(t.subLord)}</td><td>${this.verdictChip(t.verdict)}</td><td class="num">${b(e,t.score,0)}</td></tr>`)}</tbody></table>`}renderWindows(a){let e=this.effectiveLang(),t=a.bestWindow,r=a.worstWindows??[];if(!t&&!r.length)return hn;let s=(i,o)=>xe`<span class="window roxy-chip ${o}" data-tone="${o==="best"?"success":"danger"}"><span>${this.glyphName(i.subLord)}</span> <small>${ia(e,{start:i.from,end:i.to})}</small></span>`;return xe`<section class="block" part="section windows"><dl class="roxy-facts">${t?xe`<div class="fact"><dt>${this.t("Best window")}</dt><dd><div class="roxy-chips">${s(t,"best")}</div></dd></div>`:hn} ${r.length?xe`<div class="fact"><dt>${this.t("Worst windows")}</dt><dd><div class="roxy-chips">${r.map(i=>s(i,"worst"))}</div></dd></div>`:hn}</dl></section>`}glyphName(a,e=!1){let t=$(a);return xe`${t?xe`<span class="glyph" aria-hidden="true">${t}</span>`:hn}${a}${e?xe`<span class="retro" aria-label="${this.t("retrograde")}">℞</span>`:hn}`}verdictChip(a){return xe`<span class="state ${a}">${this.t(nf[a])}</span>`}groupChip(a){return xe`<span class="chip roxy-chip">${this.t(of[a])}</span>`}};Ss.endpoints=vc,Ss.styles=[u,re,G,rf`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}.title-row,.block-head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title,.block h3{margin:0}.when{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:is(.verdict,.state):is(.strong,.favourable){color:var(--roxy-success-fg)}:is(.verdict,.state):is(.mixed,.caution){color:var(--roxy-warning-fg)}:is(.verdict,.state).unfavourable{color:var(--roxy-danger-fg)}.state.neutral{color:var(--roxy-secondary)}.state{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td.names{white-space:normal}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}`],Ss=m([f("roxy-kp-finance-card")],Ss);import{css as cf,html as ao,nothing as dh}from"lit";var Rs=class extends y{renderData(a){let e=a.planets??[];return ao`<div class="wrap" part="card" aria-label="KP planets table"><header class="head" part="header"><h2 class="title">KP planets</h2>${typeof a.ayanamsa=="number"?ao`<span class="ayanamsa">Ayanamsa: ${b(this.effectiveLang(),a.ayanamsa,2)}°</span>`:dh}</header><div class="scroll" tabindex="0" role="region" aria-labelledby="kp-planets-table-caption"><table part="table" role="table"><caption id="kp-planets-table-caption" class="roxy-sr-only">KP planets: each planet with its sign, sign lord, nakshatra, star lord, sub lord, sub sub lord and KP number.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Sign</th><th scope="col">Sign lord</th><th scope="col">Nakshatra</th><th scope="col">Star lord</th><th scope="col">Sub lord</th><th scope="col">Sub-sub lord</th><th scope="col">KP no.</th></tr></thead><tbody>${e.map(t=>ao`<tr><td class="planet">${t.planet} ${t.retrograde?ao`<span class="retro">R</span>`:dh}</td><td>${t.sign??""}</td><td>${t.signLord??""}</td><td>${t.nakshatra??""}</td><td>${t.nakshatraLord??""}</td><td>${t.subLord??""}</td><td>${t.subSubLord??""}</td><td>${t.kpNumber??""}</td></tr>`)}</tbody></table></div></div>`}};Rs.endpoints=Lc,Rs.styles=[u,cf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.ayanamsa{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}td.planet{font-weight:var(--roxy-weight-bold)}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);margin-inline-start:var(--roxy-space-xs)}`],Rs=m([f("roxy-kp-planets-table")],Rs);import{css as df,html as Cs,nothing as ro}from"lit";var Ts=class extends y{renderData(a){let e=a.significators??[];return Cs`<div class="wrap" part="card" aria-label="KP ruling planets"><header part="header"><h2 class="title">KP ruling planets</h2>${a.dayLord?Cs`<div class="day-lord">Day lord: <strong>${a.dayLord}</strong></div>`:ro}</header><div class="groups" part="details"><div class="group"><h3>Moon</h3><dl part="label-track"><dt>Sign lord</dt><dd>${a.moonSignLord??""}</dd><dt>Star lord</dt><dd>${a.moonStarLord??""}</dd><dt>Sub lord</dt><dd>${a.moonSublord??""}</dd><dt>Sub-sub lord</dt><dd>${a.moonSubSublord??""}</dd></dl></div><div class="group"><h3>Lagna</h3><dl part="label-track"><dt>Sign lord</dt><dd>${a.lagnaSignLord??""}</dd><dt>Star lord</dt><dd>${a.lagnaStarLord??""}</dd><dt>Sub lord</dt><dd>${a.lagnaSublord??""}</dd><dt>Sub-sub lord</dt><dd>${a.lagnaSubSublord??""}</dd></dl></div></div>${a.rulingPlanets?.length?Cs`<div class="rp-list" part="details"><span class="roxy-label">Ruling planets</span><ol class="roxy-chips" aria-label="Ruling planets by strength">${a.rulingPlanets.map((t,r)=>Cs`<li class="rp"><span class="rank">${r+1}</span> ${t}</li>`)}</ol></div>`:ro} ${e.length?Cs`<table part="table"><caption class="roxy-sr-only">House significators: each ruling planet, the houses it signifies, and what those houses stand for.</caption><thead><tr><th scope="col">Planet</th><th scope="col">Signifies houses</th></tr></thead><tbody>${e.map(t=>{let r=da(t.signifies,a.houseThemes);return Cs`<tr><td>${t.planet}</td><td><span class="num">${(t.signifies??[]).join(", ")}</span> ${r?Cs`<span class="themes">${r}</span>`:ro}</td></tr>`})}</tbody></table>`:ro}</div>`}};Ts.endpoints=$c,Ts.styles=[u,df`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.title,.group h3{margin:0}.day-lord{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.day-lord strong{color:var(--roxy-fg)}.groups{gap:var(--roxy-space-md) var(--roxy-space-xl);flex-wrap:wrap;display:flex}.group{gap:var(--roxy-space-xs);flex:1 1 0;min-width:min(100%,22ch);display:grid}.group dl{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr);gap:var(--roxy-space-xs) var(--roxy-space-sm);font-size:var(--roxy-text-sm);margin:0;display:grid}.group dd{font-weight:var(--roxy-weight-bold);margin:0}.rp-list{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.rp .rank{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.num{font-variant-numeric:tabular-nums}.themes{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}`],Ts=m([f("roxy-kp-ruling-planets")],Ts);import{css as pf,html as at,nothing as ot}from"lit";import{property as hf}from"lit/decorators.js";var cr=class extends y{constructor(){super(...arguments);this.mode="kua"}renderData(e){let t=this.effectiveLang(),r=e.trigram;return at`<article class="card" part="card" aria-labelledby="kua-title"><header class="head" part="header"><h2 class="title" id="kua-title">${this.t("Kua")} ${e.kua??""}</h2>${e.group?at`<span class="group">${this.t("{{direction}} group",{direction:I(t,"facing",A(e.group))})}</span>`:ot}</header><div class="facts" part="details">${r?at`<span><span class="roxy-label">${this.t("Trigram")}</span> <span lang="zh">${r.chinese??""}</span> ${r.symbol??""} <b>${r.english??""}</b> <span class="element-word ${bt(r.element)}">${g(r,"element")}</span></span>`:ot} ${r?.familyMember?at`<span><span class="roxy-label">${this.t("Role")}</span>${r.familyMember}</span>`:ot} ${"solarYear"in e&&typeof e.solarYear=="number"?at`<span class="solar-year"><span class="roxy-label">${this.t("Year")}</span><b>${Ga(t,String(e.solarYear),"year")}</b></span>`:ot} ${"gender"in e&&e.gender?at`<span class="formula-gender"><span class="roxy-label">${ae(t,"gender")}</span>${I(t,"gender",e.gender)}</span>`:ot} ${"boundaryDate"in e&&e.boundaryDate?at`<span>${this.t("Year boundary")} ${R(t,e.boundaryDate)}</span>`:ot} ${"reassigned"in e&&e.reassigned?at`<span>${this.t("Reassigned from {{value}}",{value:String("rawKua"in e?e.rawKua??"":"")})}</span>`:ot} ${this.renderBestWorst(e)}</div><div class="plate" part="chart plate" role="group" aria-label="${this.t("Eight mansions")}">${Ui.map(s=>this.renderSector(e,s))}</div><div class="legend" part="legend"><span><span class="swatch swatch-good"></span>${this.t("Favourable")}</span> <span><span class="swatch swatch-bad"></span>${this.t("Unfavourable")}</span></div>${this.renderSectorRows(e)} ${"conventions"in e?Fa(e.conventions,this.translator,this.effectiveLang()):ot}</article>`}renderBestWorst(e){if(this.mode!=="mansions"||!("bestSector"in e))return ot;let t=this.effectiveLang();return at`${e.bestSector?at`<span><span class="roxy-label">${this.t("Best")}</span><b>${I(t,"facing",e.bestSector)}</b></span>`:ot} ${e.worstSector?at`<span><span class="roxy-label">${this.t("Worst")}</span><b>${I(t,"facing",e.worstSector)}</b></span>`:ot}`}sectorHeading(e,t){return t==="Center"?this.t("Center"):I(e,"facing",t)}renderSector(e,t){let r=this.effectiveLang(),s=this.sectorHeading(r,t);if(t==="Center")return at`<div class="sector sector-self centre"><span class="kua-number">${e.kua??""}</span> <span class="trigram-symbol">${e.trigram?.symbol??""}</span> <span class="sector-name plate-heading">${e.trigram?.english??""}</span></div>`;let i=(e.sectors??[]).find(l=>l.direction===t);if(!i)return at`<div class="sector"><span class="sector-name plate-heading">${s}</span></div>`;let o=i.nature==="auspicious";return at`<div class="sector ${o?"sector-good":"sector-bad"}"><span class="sector-name plate-heading">${s}</span> <span class="star-name">${g(i,"starName")}</span> ${"chinese"in i&&i.chinese?at`<span class="star-hanzi" lang="zh">${i.chinese}</span>`:ot} <span class="domain">${i.domain??""}</span> ${typeof i.rank=="number"?at`<span class="rank">${o?this.t("Rank"):this.t("Severity")} ${i.rank}</span>`:ot}</div>`}renderSectorRows(e){let t=e.sectors??[];if(t.length===0)return ot;let r=this.effectiveLang(),s=t.map(i=>{let o=this.mode==="mansions"&&"reading"in i?i.reading:void 0;return!o||this.hideReadings?ot:at`<li class="row" part="label-track"><span class="roxy-label">${this.sectorHeading(r,i.direction??"")}</span><div class="row-body"><span>${g(i,"starName")}</span><p part="reading">${o}</p></div></li>`});return s.every(i=>i===ot)?ot:at`<section part="section sectors"><h3 class="block-title">${this.t("Sectors")}</h3><ul class="rows">${s}</ul></section>`}};cr.endpoints=wc,cr.styles=[u,ca,G,Zi,rr,pf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.group{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.plate{background:var(--roxy-border);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.sector{align-content:start;gap:calc(var(--roxy-space-unit) / 2);min-block-size:3.5lh;padding:var(--roxy-space-sm);background:var(--roxy-surface);text-align:center;display:grid}.sector-good{background:color-mix(in srgb, var(--roxy-success) 10%, var(--roxy-surface))}.sector-bad{background:color-mix(in srgb, var(--roxy-danger) 10%, var(--roxy-surface))}.sector-self{background:color-mix(in srgb, var(--roxy-accent) 10%, var(--roxy-surface))}:is(.sector-good,.sector-bad,.sector-self) .sector-name,:is(.sector-good,.sector-bad) .rank{color:var(--roxy-secondary)}.star-name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.star-hanzi,.trigram-symbol{color:var(--roxy-accent-ink)}:is(.sector-good,.sector-bad) .star-hanzi{color:var(--roxy-fg)}.domain{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.rank{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.centre{align-content:center}.kua-number{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.trigram-symbol{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight)}@container (width<=30rem){.plate{background:var(--roxy-surface);display:block}.sector.centre{display:none}.sector{column-gap:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name rank""star hanzi""domain domain";min-block-size:auto}.sector:last-child{border-block-end:0}.sector-name{grid-area:name;align-self:center}.rank{text-align:end;white-space:nowrap;grid-area:rank;align-self:center}.star-name{grid-area:star}.star-hanzi{text-align:end;grid-area:hanzi}.domain{grid-area:domain}}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-good{background:var(--roxy-success)}.swatch-bad{background:var(--roxy-danger)}.rows{margin:0;padding:0;list-style:none;display:grid}.row{align-items:baseline;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm)}.row:first-child{border-block-start:0;padding-block-start:0}.row-body p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}`],m([hf({type:String,reflect:!0})],cr.prototype,"mode",2),cr=m([f("roxy-kua-card")],cr);import{css as mf,html as Es,nothing as so,svg as no}from"lit";var dl=320,Ft=dl/2,Ta=128,gf=118,ph=137,yf=152,uf=.95,ff={glyph:11},xf=ff.glyph;function Ea(n,a){let e=n*Math.PI/180;return{x:Ft+a*Math.sin(e),y:Ft-a*Math.cos(e)}}var bf=[{az:0,source:"N"},{az:45,source:"NE"},{az:90,source:"E"},{az:135,source:"SE"},{az:180,source:"S"},{az:225,source:"SW"},{az:270,source:"W"},{az:315,source:"NW"}],Ds=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this)}renderData(e){let t=e.bodies??[],r=e.birthDetails;return Es`<div class="wrap" part="card"><header part="header"><h2>${this.t("Local space")}</h2>${r?Es`<p class="roxy-label">${V(this.effectiveLang(),r.date,r.time)}</p>`:so}</header>${this.chartViewport.renderChartViewport(this.renderDial(t),this.t("Local space"),this.translator)} ${e.summary&&!this.hideReadings?Es`<p class="summary">${e.summary}</p>`:so} ${this.renderList(t)}</div>`}renderDial(e){return Es`<svg viewBox="0 0 ${dl} ${dl}" part="chart" role="img" aria-label="${this.t("Local space compass of planetary directions from the birthplace")}"><title>${this.t("Local space compass")}</title><desc>${this.t("A compass centered on the birthplace. Each body is a line pointing to its azimuth, clockwise from north. Bodies below the horizon are dimmed.")}</desc><circle class="dial-fill" cx="${Ft}" cy="${Ft}" r="${Ta}"/><circle class="dial" cx="${Ft}" cy="${Ft}" r="${Ta*.66}" stroke-width="0.5"/><circle class="dial" cx="${Ft}" cy="${Ft}" r="${Ta*.33}" stroke-width="0.5"/>${this.renderCompassRing()} ${this.renderSpokes(e)}<circle class="center-dot" cx="${Ft}" cy="${Ft}" r="2.5"/></svg>`}renderCompassRing(){let e=[];for(let l=0;l<360;l+=22.5){let c=Ea(l,Ta),d=Ea(l,Ta-(l%45===0?8:4));e.push(no`<line class="tick" x1=${d.x} y1=${d.y} x2=${c.x} y2=${c.y} />`)}let t=Ea(0,Ta),r=Ea(180,Ta),s=Ea(90,Ta),i=Ea(270,Ta),o=bf.map(({az:l,source:c})=>{let d=Ea(l,yf),p=l%90===0;return no`<text class=${`compass-label${p?" cardinal":""}`} x=${d.x} y=${d.y} text-anchor="middle" dominant-baseline="central">${this.t(c)}</text>`});return no`
301
99
  <line class="cardinal-axis" x1=${t.x} y1=${t.y} x2=${r.x} y2=${r.y} />
302
100
  <line class="cardinal-axis" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} />
303
- ${e}${o}`}renderSpokes(e){let t=e.map((s,i)=>({b:s,i})),r=Et(uf*xf,dh);return zt(t,({b:s})=>s.azimuth,r).map(({item:s,displayLongitude:i})=>{let{b:o,i:l}=s,c=Fr(o.planet,l),d=o.aboveHorizon===!1,p=Ea(o.azimuth,gf),h=Ea(i,dh),x=o.symbol||$(o.planet)||g(o,"planet"),L=`${o.altitude>0?"+":""}${Math.round(o.altitude)}°`;return so`<g>
101
+ ${e}${o}`}renderSpokes(e){let t=e.map((s,i)=>({b:s,i})),r=Et(uf*xf,ph);return zt(t,({b:s})=>s.azimuth,r).map(({item:s,displayLongitude:i})=>{let{b:o,i:l}=s,c=Fr(o.planet,l),d=o.aboveHorizon===!1,p=Ea(o.azimuth,gf),h=Ea(i,ph),x=o.symbol||$(o.planet)||g(o,"planet"),L=`${o.altitude>0?"+":""}${Math.round(o.altitude)}°`;return no`<g>
304
102
  <line class=${`spoke${d?" below":""}`} stroke=${c} x1=${Ft} y1=${Ft} x2=${p.x} y2=${p.y}><title>${this.t("{{planet}} {{direction}} {{azimuth}}° altitude {{altitude}}",{planet:g(o,"planet"),direction:o.compassDirection,azimuth:Math.round(o.azimuth),altitude:L})}</title></line>
305
103
  <text class=${`body-glyph${d?" below":""}`} fill=${c} x=${h.x} y=${h.y} text-anchor="middle" dominant-baseline="central">${x}</text>
306
- </g>`})}renderList(e){if(e.length===0)return ro;let t=this.t("Local space directions: each body with its compass direction, azimuth, altitude and whether it sits above or below the horizon.");return Es`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${t}"><table><caption class="roxy-sr-only">${t}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Direction")}</th><th scope="col" class="num">${this.t("Azimuth")}</th><th scope="col" class="num">${this.t("Altitude")}</th><th scope="col">${this.t("Horizon")}</th></tr></thead><tbody>${e.map((r,s)=>{let i=Fr(r.planet,s),o=r.aboveHorizon===!1;return Es`<tr><td><span class="body-cell"><span class="body-dot" style="${`background: ${i}`}"></span> ${r.symbol?Es`<span aria-hidden="true">${r.symbol}</span>`:ro}${g(r,"planet")}</span></td><td>${r.compassDirection}</td><td class="num">${Math.round(r.azimuth)}°</td><td class="num">${r.altitude>0?"+":""}${Math.round(r.altitude)}°</td><td><span class="${`horizon ${o?"down":"up"}`}">${o?this.t("Below"):this.t("Above")}</span></td></tr>`})}</tbody></table></div>`}};Ds.endpoints=wc,Ds.styles=[u,Ge,mf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap>*{min-width:0}h2,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,30rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.dial{fill:none;stroke:var(--roxy-border)}.dial-fill{fill:color-mix(in srgb, var(--roxy-border) 10%, transparent);stroke:var(--roxy-border);stroke-width:1px}.cardinal-axis{stroke:var(--roxy-border);stroke-width:.5px}.tick{stroke:var(--roxy-secondary);stroke-width:.6px;opacity:.5}.compass-label{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold)}.compass-label.cardinal,.center-dot{fill:var(--roxy-fg)}.spoke{stroke-width:1.4px}.spoke.below{stroke-dasharray:3 3;opacity:.4}.body-glyph{font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-bold)}.body-glyph.below{opacity:.45}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td).num{text-align:end}.body-cell{align-items:center;gap:var(--roxy-space-xs);display:inline-flex}.body-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);flex-shrink:0}.horizon.up{color:var(--roxy-success-fg)}.horizon.down{color:var(--roxy-muted)}.summary{font-size:var(--roxy-text-sm)}`],Ds=m([f("roxy-local-space-compass")],Ds);import{css as vf,html as dr,nothing as dl}from"lit";import{property as As,state as Ps}from"lit/decorators.js";var Be=class extends _a{constructor(){super(...arguments);this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=!1;this.isLoading=!1;this.highlight=-1;this.error=null;this.debouncedFetch=ji(e=>{this.fetchResults(e)},300);this.onInput=e=>{let t=e.target.value;if(this.query=t,t.length<2){this.results=[],this.isOpen=!1,this.highlight=-1,this.error=null;return}this.debouncedFetch(t)};this.onKeyDown=e=>{if(!this.isOpen||this.results.length===0){e.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),e.preventDefault());return}if(e.key==="ArrowDown")e.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(e.key==="ArrowUp")e.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(e.key==="Enter"){e.preventDefault();let t=this.results[this.highlight]??this.results[0];t&&this.select(t)}else e.key==="Escape"&&(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=e=>{e.composedPath().includes(this)||(this.isOpen=!1)},document.addEventListener("mousedown",this.clickOutsideHandler)}willUpdate(e){if(e.has("publishableKey")||e.has("apiKey")){let t=Dr(this.publishableKey??this.apiKey);t&&!this.refusal&&Us(this,t,{warn:!0}),this.refusal=t}}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}async fetchResults(e){if(this.refusal)return;this.abortController&&this.abortController.abort();let t=new AbortController;this.abortController=t,this.isLoading=!0;try{let r=await this.search(e,t.signal);if(t.signal.aborted)return;this.error=null,this.results=r.cities??[],this.isOpen=!0,this.highlight=this.results.length>0?0:-1}catch(r){if(r?.name==="AbortError")return;this.results=[],this.isOpen=!1,this.highlight=-1,this.error=r instanceof Error?r.message:String(r)}finally{this.abortController===t&&(this.abortController=void 0),t.signal.aborted||(this.isLoading=!1)}}async search(e,t){if(!this.endpoint&&this.submitUrl)return Na({submitUrl:this.submitUrl,submitContext:this.submitContext},{path:"/location/search",method:"GET",query:{q:e,limit:8}},t);let r=new URL(this.endpoint||`${Qn}/location/search`,document.baseURI);r.searchParams.set("q",e),r.searchParams.set("limit","8");let s={Accept:"application/json"};this.apiKey&&this.publishableKey&&console.warn("[roxy-location-search] both api-key and publishable-key set; using publishable-key. Remove api-key from your widget markup.");let i=this.publishableKey??this.apiKey;i&&(s["X-API-Key"]=i);let o=await fetch(r,{headers:s,signal:t});if(!o.ok)throw new Error(await dd(o));return await o.json()}select(e){this.query=`${e.city}${e.province?`, ${e.province}`:""}, ${e.country}`,this.isOpen=!1,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:e,bubbles:!0,composed:!0}))}render(){return this.refusal?dr`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:dr`<div class="field"><input part="input" type="text" role="combobox" aria-expanded="${this.isOpen?"true":"false"}" aria-controls="roxy-location-listbox" aria-activedescendant="${this.isOpen&&this.highlight>=0?`roxy-location-option-${this.highlight}`:""}" aria-autocomplete="list" autocomplete="off" placeholder="${this.t(this.placeholder)}" .value="${this.query}" @input="${this.onInput}" @keydown="${this.onKeyDown}" @focus="${()=>{this.results.length>0&&(this.isOpen=!0)}}"> ${this.isLoading?dr`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:dl} ${this.isOpen?dr`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?dr`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((e,t)=>dr`<li role="presentation"><button type="button" part="option" class="option" role="option" id="${`roxy-location-option-${t}`}" aria-selected="${this.highlight===t?"true":"false"}" @click="${()=>this.select(e)}" @mouseenter="${()=>{this.highlight=t}}"><span class="city">${e.city}</span> <span class="where">${e.province?dr`${e.province},`:""}${e.country}</span> <span class="tz">UTC${e.utcOffset>=0?"+":""}${e.utcOffset}</span></button></li>`)}</ul>`:dl}</div>${this.error?dr`<p class="search-error" role="alert">${this.t(this.error)}</p>`:dl}`}};Be.styles=[u,Hi,vf`:host{display:block;position:relative}.field{position:relative}input{inline-size:100%;min-block-size:var(--roxy-touch)}.option .city{font-weight:var(--roxy-weight-bold)}.option .where{color:var(--roxy-muted);flex-grow:1}.option .tz{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.search-error{margin:var(--roxy-space-xs) 0 0;color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm)}`],m([As({type:String,attribute:"api-key"})],Be.prototype,"apiKey",2),m([As({type:String,attribute:"publishable-key"})],Be.prototype,"publishableKey",2),m([As({type:String})],Be.prototype,"endpoint",2),m([As({type:String,attribute:"submit-url"})],Be.prototype,"submitUrl",2),m([As({attribute:"submit-context",converter:ei})],Be.prototype,"submitContext",2),m([As({type:String})],Be.prototype,"placeholder",2),m([As({type:String,attribute:"default-value"})],Be.prototype,"defaultValue",2),m([Ps()],Be.prototype,"query",2),m([Ps()],Be.prototype,"results",2),m([Ps()],Be.prototype,"isOpen",2),m([Ps()],Be.prototype,"isLoading",2),m([Ps()],Be.prototype,"highlight",2),m([Ps()],Be.prototype,"refusal",2),m([Ps()],Be.prototype,"error",2),Be=m([f("roxy-location-search")],Be);import{css as Lf,html as ea,nothing as pr}from"lit";var ph={forward:"Forward",reverse:"Backward"},Ms=class extends y{renderData(a){let e=this.effectiveLang();return ea`<article class="card" part="card" aria-labelledby="luck-title"><header class="head" part="header"><h2 class="title" id="luck-title">${this.t("Luck pillars")}</h2></header><div class="facts" part="details">${a.direction?ea`<span><span class="roxy-label">${this.t("Direction")}</span><b>${ph[a.direction]?this.t(ph[a.direction]):a.direction}</b></span>`:pr} ${typeof a.startAge=="number"?ea`<span><span class="roxy-label">${this.t("Starts")}</span><b>${this.ageLabel(e,a.startAge,a.startAgeMonths)}</b></span>`:pr} ${a.boundaryTerm?ea`<span><span class="roxy-label">${this.t("Counted to")}</span>${I(e,"boundaryTerm",a.boundaryTerm)}</span>`:pr} ${typeof a.daysToTerm=="number"?ea`<span><span class="roxy-label">${this.t("Days")}</span>${P(e,a.daysToTerm)}</span>`:pr} ${a.gender?ea`<span><span class="roxy-label">${this.t("Formula")}</span>${I(e,"gender",a.gender)}</span>`:pr}</div>${this.renderStrip(a,e)} ${this.renderAnnuals(a)} ${a.summary&&!this.hideReadings?ea`<p class="summary" part="section summary">${a.summary}</p>`:pr} ${Fa(a.conventions,this.translator,this.effectiveLang())}</article>`}ageLabel(a,e,t){let r=P(a,e);return typeof t=="number"&&t>0?this.t("{{years}}y {{months}}m",{years:r,months:P(a,t)}):this.t("{{years}} yrs",{years:r})}renderStrip(a,e){let t=a.luckPillars??[];return t.length===0?pr:ea`<div class="strip-wrap" part="chart" role="region" tabindex="0" aria-label="${this.t("Luck pillars")}"><div class="strip">${t.map(r=>ea`<div class="pillar" part="pillar"><span class="ages roxy-label">${this.t("{{start}} to {{end}}",{start:P(e,r.startAge??0),end:P(e,r.endAge??0)})}</span> <span class="god">${g(r.tenGod,"name")}</span> <span class="hanzi" lang="zh">${r.stem?.chinese??""}</span> <span class="romanised">${r.stem?.pinyin??""} <span class="element-word ${bt(r.stem?.element)}">${g(r.stem,"element")}</span></span> <span class="hanzi hanzi-branch" lang="zh">${r.branch?.chinese??""}</span> <span class="romanised">${r.branch?.pinyin??""} ${g(r.branch,"animal")}</span> <span class="years">${this.t("{{start}} to {{end}}",{start:String(r.startYear??""),end:String(r.endYear??"")})}</span></div>`)}</div></div>`}renderAnnuals(a){let e=a.annualPillars??[];return e.length===0?pr:ea`<section part="section annual-pillars"><h3 class="block-title">${this.t("Annual pillars")}</h3><ul class="roxy-chips annuals">${e.map(t=>ea`<li class="annual"><span class="yr">${t.year??""}</span> <span lang="zh">${t.tenGod?.chinese??""}</span> <span>${g(t.tenGod,"name")}</span></li>`)}</ul></section>`}};Ms.endpoints=kc,Ms.styles=[u,G,ca,Lf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.strip-wrap{min-width:0;overflow-x:auto}.strip{min-width:min-content;display:flex}.pillar{gap:calc(var(--roxy-space-unit) / 2);min-inline-size:12ch;padding:var(--roxy-space-sm);text-align:center;flex:none;align-content:start;display:grid}.pillar+.pillar{border-inline-start:1px solid var(--roxy-border)}.ages,.years{font-variant-numeric:tabular-nums}.ages{font-weight:var(--roxy-weight-bold)}.god{min-block-size:1lh;color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.hanzi{font-size:calc(var(--roxy-text-base) * 1.75);line-height:var(--roxy-leading-tight)}.hanzi-branch{color:var(--roxy-accent-ink)}.romanised,.years{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.annual .yr{font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.summary{margin:0}`],Ms=m([f("roxy-luck-pillars")],Ms);import{css as $f,html as me,nothing as be}from"lit";import{property as wf}from"lit/decorators.js";var kf={gentle:"Gentle",indifferent:"Indifferent",violent:"Violent"},Sf={center:"Center",conception:"Conception arm",destiny:"Destiny arm",left:"Left arm",right:"Right arm"},Rf=13;function hh(n){return"tzolkin"in n}var hr=class extends y{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang(),r=this.mode==="chart"&&hh(e)?e:void 0,s=hh(e)?e.tzolkin:e,i=s?.reading,o=i?.numberBand?kf[i.numberBand]:void 0;return me`<article class="card" part="card" aria-labelledby="mayan-title"><header class="hero" part="header">${typeof s?.number=="number"?me`<div class="coefficient">${P(t,s.number)}</div>`:be}<div><p class="roxy-label">${this.t("Mayan day sign")}</p><h2 class="title" id="mayan-title">${s?.daySignName??""}</h2><p class="spellings">${s?.daySignClassic?me`<span><span class="roxy-label">${this.t("Classic spelling")}</span>${s.daySignClassic}</span>`:be} ${s?.daySignKiche?me`<span><span class="roxy-label">${this.t("Highland spelling")}</span>${s.daySignKiche}</span>`:be}</p></div></header><div class="facts" part="details">${e.date?me`<span><span class="roxy-label">${this.t("Date")}</span><b>${R(t,e.date)}</b></span>`:be} ${this.renderTrecena(t,s?.trecena)} ${r?this.renderHaabFact(t,r.haab):be} ${r?.longCount?.formatted?me`<span><span class="roxy-label">${this.t("Long Count")}</span><b>${r.longCount.formatted}</b></span>`:be} ${r?.calendarRound?me`<span><span class="roxy-label">${this.t("Calendar Round")}</span><b>${r.calendarRound}</b></span>`:be} ${r?.yearBearer?.daySignName?me`<span><span class="roxy-label">${this.t("Year Bearer")}</span><b>${P(t,r.yearBearer.number)} ${r.yearBearer.daySignName}</b></span>`:be} ${r?.lordOfNight?.label?me`<span><span class="roxy-label">${this.t("Lord of the Night")}</span><b>${r.lordOfNight.label}</b></span>`:be} ${o?me`<span><span class="roxy-label">${this.t("Character of the number")}</span><b class="band">${this.t(o)}</b></span>`:be} ${e.conventions?.correlation?me`<span><span class="roxy-label">${this.t("Correlation")}</span><span title="${e.conventions.correlation}">${I(t,"correlation",e.conventions.correlation,e.conventions.correlation)}</span></span>`:be}</div>${i?.keynote&&!this.hideReadings?me`<p class="keynote" part="reading">${i.keynote}</p>`:be} ${this.renderLists(i)} ${this.renderInterpretation(this.sections(r,i),"mayan-day")} ${this.renderCross(t,r?.cross)} ${r?.summary&&!this.hideReadings?me`<p class="summary" part="reading">${r.summary}</p>`:be}</article>`}renderTrecena(e,t){return t?me`<span><span class="roxy-label">${this.t("Trecena")}</span><b>${P(e,t.number)}</b> ${typeof t.dayOfTrecena=="number"?this.t("Day {{n}} of {{total}}",{n:P(e,t.dayOfTrecena),total:P(e,Rf)}):be} ${t.rulingSignName?me`· <span class="roxy-label">${this.t("Ruling sign")}</span>${t.rulingSignName}`:be}</span>`:be}renderHaabFact(e,t){return t?.monthName?me`<span><span class="roxy-label">${this.t("Haab")}</span><b>${P(e,t.day)} ${t.monthName}</b> ${t.monthClassic?me`(${t.monthClassic})`:be} ${typeof t.dayOfYear=="number"?me`· <span class="roxy-label">${this.t("Day of year")}</span>${P(e,t.dayOfYear)}`:be}</span>`:be}renderLists(e){let t=e?.strengths??[],r=e?.challenges??[];return this.hideReadings||t.length===0&&r.length===0?be:me`<div class="lists" part="section readings">${t.length>0?me`<div><h3 class="block-title">${this.t("Strengths")}</h3><ul class="plain">${t.map(s=>me`<li>${s}</li>`)}</ul></div>`:be} ${r.length>0?me`<div><h3 class="block-title">${this.t("Challenges")}</h3><ul class="plain">${r.map(s=>me`<li>${s}</li>`)}</ul></div>`:be}</div>`}sections(e,t){let r=[];return t?.numberReading&&r.push({label:this.t("Coefficient"),body:t.numberReading}),t?.guidance&&r.push({label:this.t("Guidance"),body:t.guidance}),e?.haab?.reading&&r.push({label:this.t("Haab"),body:e.haab.reading}),e?.lordOfNight?.reading&&r.push({label:this.t("Lord of the Night"),body:e.lordOfNight.reading}),e?.yearBearer?.reading&&r.push({label:this.t("Year Bearer"),body:e.yearBearer.reading}),r}crossLabel(e){let t=Sf[e??""];return t?this.t(t):S(e??"")}renderCross(e,t){let r=t??[];return r.length===0?be:me`<section part="section cross"><h3 class="block-title">${this.t("Mayan cross")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Mayan cross")}"><table class="stacked"><thead><tr><th>${this.t("Position")}</th><th>${this.t("Offset in days")}</th><th>${this.t("Day sign")}</th></tr></thead><tbody>${r.map(s=>me`<tr><td data-label="${this.t("Position")}">${this.crossLabel(s.position)}</td><td class="num" data-label="${this.t("Offset in days")}">${P(e,s.offsetDays)}</td><td data-label="${this.t("Day sign")}">${P(e,s.number)} ${s.daySignName??""} ${s.daySignKiche?me`(${s.daySignKiche})`:be} ${s.reading&&!this.hideReadings?me`<p part="reading">${s.reading}</p>`:be}</td></tr>`)}</tbody></table></div></section>`}};hr.endpoints=Sc,hr.styles=[u,j,er,$f`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.coefficient{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * 2.75);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.coefficient){min-width:0}.title,.block-title,p.roxy-label{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.spellings{gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}span>.roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.keynote,.summary{margin:0;padding-block-start:var(--roxy-space-md)}.summary{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}ul.plain{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td.num{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}`],m([wf({type:String,reflect:!0})],hr.prototype,"mode",2),hr=m([f("roxy-mayan-day-sign")],hr);import{css as Cf,html as ta,nothing as mr}from"lit";import{property as Tf}from"lit/decorators.js";var gr=class extends y{constructor(){super(...arguments);this.mode="current"}renderData(e){let t="phases"in e?e.phases:"calendar"in e?e.calendar:[];if(this.mode!=="current"&&t.length>0){let r=Xs(this.effectiveLang(),"year"in e?e.year:void 0,"month"in e?e.month:void 0);return ta`<article class="card" part="card" aria-label="${this.t("Moon phase calendar")}"><h2 class="label" part="header">${r||this.t("Moon phase calendar")}</h2><div part="table" role="list">${t.map(s=>this.renderListItem(s))}</div></article>`}return"phase"in e?this.renderSingle(e):mr}renderSingle(e){let t=e.meaning?.symbol||mh(e.phase);return ta`<article class="card" part="card" aria-label="${this.t("Current moon phase")}"><div class="hero" part="header"><span class="emoji" aria-hidden="true">${t}</span><div><h2 class="label">${e.phase??this.t("Current moon phase")}</h2>${e.date?ta`<p class="roxy-label">${R(this.effectiveLang(),e.date)}</p>`:mr}</div></div><div class="stats" part="details">${typeof e.illumination=="number"?ta`<div><span class="roxy-label">${this.t("Illumination")}</span> <strong>${we(this.effectiveLang(),e.illumination,0)}</strong></div>`:mr} ${typeof e.age=="number"?ta`<div><span class="roxy-label">${this.t("Age")}</span> <strong>${this.t("{{count}} days",{count:b(this.effectiveLang(),e.age,1)})}</strong></div>`:mr} ${e.sign?ta`<div><span class="roxy-label">${this.t("Sign")}</span> <strong>${e.sign}</strong></div>`:mr} ${typeof e.distance=="number"?ta`<div><span class="roxy-label">${this.t("Distance")}</span> <strong>${this.t("{{value}}k km",{value:b(this.effectiveLang(),e.distance/1e3,0)})}</strong></div>`:mr}</div>${e.meaning?.description&&!this.hideReadings?ta`<p>${e.meaning.description}</p>`:mr} ${e.meaning?.keywords?.length&&!this.hideReadings?ta`<ul class="roxy-chips">${e.meaning.keywords.map(r=>ta`<li>${r}</li>`)}</ul>`:mr}</article>`}renderListItem(e){let t=mh(e.phase);return ta`<div class="list-item" role="listitem"><span aria-hidden="true">${t}</span> <span>${e.phase}</span> <span>${R(this.effectiveLang(),e.date)}</span></div>`}};gr.endpoints=Rc,gr.styles=[u,Cf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.emoji{font-size:calc(var(--roxy-text-xl) * 2);line-height:1}.label{text-transform:capitalize}.stats{gap:var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:repeat(auto-fit,minmax(min(100%,14ch),1fr));display:grid}.stats .roxy-label{display:block}.stats strong{font-variant-numeric:tabular-nums}.list-item{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);grid-template-columns:auto minmax(0,1fr) auto;display:grid}.list-item:last-child{border-block-end:0}`],m([Tf({type:String,reflect:!0})],gr.prototype,"mode",2),gr=m([f("roxy-moon-phase")],gr);function mh(n){return Cd(n)??"🌙"}import{css as Ef,html as aa,nothing as ya}from"lit";var _s=class extends y{renderData(a){let e=a.remedies;return aa`<article class="wrap" part="card" aria-label="${this.t("Nakshatra {{name}}",{name:a.name})}"><header class="head" part="header"><h2>${a.name}</h2>${typeof a.number=="number"?aa`<span class="number">${this.t("Nakshatra {{number}} of 27",{number:a.number})}</span>`:ya} ${a.range?aa`<span class="range">${a.range}</span>`:ya}</header><dl class="roxy-facts" part="details">${a.lord?aa`<div><dt>${this.t("Lord")}</dt><dd>${a.lord}</dd></div>`:ya} ${a.deity?aa`<div><dt>${this.t("Deity")}</dt><dd>${a.deity}</dd></div>`:ya} ${a.symbol?aa`<div><dt>${this.t("Symbol")}</dt><dd>${a.symbol}</dd></div>`:ya}</dl>${a.characteristics&&!this.hideReadings?aa`<div class="section" part="section characteristics"><h3>${this.t("Characteristics")}</h3><p>${a.characteristics}</p></div>`:ya} ${e&&!this.hideReadings?aa`<div class="section" part="section remedies"><h3>${this.t("Remedies")}</h3><div class="remedies">${e.mantras?aa`<div class="remedy"><strong>${this.t("Mantras:")}</strong> ${e.mantras}</div>`:ya} ${e.gemstones?aa`<div class="remedy"><strong>${this.t("Gemstones:")}</strong> ${e.gemstones}</div>`:ya} ${e.rituals?aa`<div class="remedy"><strong>${this.t("Rituals:")}</strong> ${e.rituals}</div>`:ya}</div></div>`:ya}</article>`}};_s.endpoints=Cc,_s.styles=[u,re,Ef`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.number{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.range{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.roxy-facts{margin:0}.section h3{margin-block-end:var(--roxy-space-xs)}.section p,.remedy{font-size:var(--roxy-text-sm)}.remedies{gap:var(--roxy-space-xs);display:grid}.remedy strong{color:var(--roxy-secondary)}`],_s=m([f("roxy-nakshatra-card")],_s);import{css as Pf,html as z,nothing as ce,svg as Ht}from"lit";import{css as Df,html as wt,nothing as Bt}from"lit";var Ns=class extends y{rows(){let a=this.data;if(!a)return[];let e=(a.planets??[]).map(r=>({name:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),longitude:r.longitude,latitude:r.latitude,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,dignity:r.dignity})),t=[["Ascendant",a.ascendant],["Midheaven",a.midheaven],["Part of Fortune",a.partOfFortune],["Vertex",a.vertex]];for(let[r,s]of t)s&&e.push({name:r,label:this.t(r),sign:s.sign,signLabel:g(s,"sign"),longitude:s.longitude,house:"house"in s?s.house:void 0,sect:"sect"in s?s.sect:void 0,isPoint:!0});return e}renderData(a){if(!a.planets)return this.renderEmpty();let e=this.rows(),t=a.birthDetails,r=e.some(o=>Number.isFinite(o.latitude)),s=e.some(o=>o.sect),i=["latitude","longitude","timezone"];return wt`<div class="wrap" part="card"><header part="header"><h2>${this.t("Planetary positions")}</h2>${t?wt`<div part="details"><p class="roxy-label">${V(this.effectiveLang(),t.date,t.time,!0)}</p><dl class="roxy-facts">${i.map(o=>wt`<div><dt>${ae(this.effectiveLang(),o)}</dt><dd>${b(this.effectiveLang(),t[o],5)}</dd></div>`)}</dl></div>`:Bt}</header><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Western planetary positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Western planetary positions: each body with its sign, degree, house, essential dignity and motion. The dignity cell is blank for the lunar nodes, Chiron and Lilith, which rule no sign and therefore hold no dignity at all.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th>${r?wt`<th scope="col">${ae(this.effectiveLang(),"latitude")}</th>`:Bt}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?wt`<th scope="col">${this.t("Sect")}</th>`:Bt}</tr></thead><tbody>${e.map(o=>{let l=$(o.name)??"",c=o.sect==="day"?this.t("Daytime"):o.sect==="night"?this.t("Night"):"",d=N(o.sign)??"",p=typeof o.speed=="number"?b(this.effectiveLang(),o.speed,6):"";return wt`<tr class="${o.isPoint?"point":""}"><td class="body">${l?wt`<span class="glyph">${l}</span>`:Bt}${o.label}</td><td>${d?wt`<span class="glyph">${d}</span>`:Bt}${o.signLabel??""}</td><td>${typeof o.longitude=="number"?Qe(o.longitude,o.signLabel):""}</td><td>${typeof o.longitude=="number"?`${b(this.effectiveLang(),o.longitude,5)}°`:Bt}</td>${r?wt`<td>${typeof o.latitude=="number"?`${b(this.effectiveLang(),o.latitude,5)}°`:Bt}</td>`:Bt}<td>${typeof o.house=="number"?o.house:""}</td><td class="dignity">${o.dignity?A(o.dignity):""}</td><td>${p?wt`${p}${this.t("°/day")}`:Bt} ${o.isRetrograde?wt`<span class="retro">℞</span>`:Bt}</td>${s?wt`<td>${c}</td>`:Bt}</tr>`})}</tbody></table></div>${a.houses?.length?wt`<details part="section houses"><summary>${this.t("Houses")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Houses")}"><table part="table"><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th></tr></thead><tbody>${a.houses.map(o=>wt`<tr><th scope="row">${b(this.effectiveLang(),o.number,0)}</th><td>${g(o,"sign")}</td><td>${Qe(o.longitude,g(o,"sign"))}</td><td>${b(this.effectiveLang(),o.longitude,5)}°</td></tr>`)}</tbody></table></div></details>`:Bt}</div>`}};Ns.endpoints=Uc,Ns.styles=[u,re,Df`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}h2{overflow-wrap:anywhere}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}tr:not(.point)+tr.point>*{border-block-start:1px solid var(--roxy-secondary)}td.body{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}details>summary{font-weight:var(--roxy-weight-bold)}details>.scroll{margin-block-start:var(--roxy-space-sm)}`],Ns=m([f("roxy-western-planets-table")],Ns);import{property as Mf,state as _f}from"lit/decorators.js";import{ifDefined as gh}from"lit/directives/if-defined.js";var yr=class{constructor(a,e){this.host=a,this.marks=e,this.size=Object.fromEntries(Object.keys(e).map(t=>[t,e[t][1]])),a.addController(this)}hostConnected(){typeof ResizeObserver>"u"||(this.observer=new ResizeObserver(()=>this.host.requestUpdate()),this.observer.observe(this.host))}hostDisconnected(){this.observer?.disconnect(),this.observer=void 0}hostUpdated(){let a=!1;for(let e of Object.keys(this.marks)){let[t]=this.marks[e],r=Af(this.host.renderRoot,t,this.size[e]);r!==this.size[e]&&(this.size[e]=r,a=!0)}a&&this.host.requestUpdate()}};function Af(n,a,e){let t=n?.querySelector(a);if(!t||typeof getComputedStyle!="function")return e;let r=Number.parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(r)&&r>0?r:e}var yh={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},gl=540,_=gl/2,mn=220,pl=202,In=174,Fn=144,Nf=232,hl=249,ml={glyph:14,degree:7},zf=.95,Of=3.4,Gf=1.85,If=1.25,Ff=.9,Bf=28,Hf=13,no=84,Da=class extends y{constructor(){super(...arguments);this.viewport=new Ce(this);this.heading="Natal chart";this.view="wheel";this.type=new yr(this,{glyph:[".planet-glyph",ml.glyph],degree:[".planet-deg",ml.degree]})}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let e=this.data?.midheaven?.longitude;return typeof e=="number"?e:null}get hasCusps(){return(this.data?.houses??[]).length===12}toAngle(e){return 180+this.getAscendant()-e}renderData(e){let t=this.getPlanets(),r=e.aspects??[],s=this.view;return z`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2>${e.birthDetails?z`<p class="roxy-label">${V(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</p>`:ce}</header>${r.length>0?z`${dt({items:[{id:"wheel",label:this.t("Wheel")},{id:"grid",label:this.t("Aspect grid")}],active:s,onSelect:i=>{this.view=i},label:this.t("Natal chart views"),idPrefix:"natal",controls:!0})}<div id="natal-panel-${s}" part="panel" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(t,r):this.renderAspectGrid(t,r)}</div>`:this.renderWheel(t,r)}<div class="legend" part="legend"><span>${this.t("Positions")}: ${b(this.effectiveLang(),t.length,0)}</span> ${r.length>0?z`<span>${this.t("{{count}} aspects",{count:s==="grid"?r.length:r.filter(ja).length})}</span>`:ce} ${this.hasCusps&&e.houseSystem?z`<span>${ae(this.effectiveLang(),"houseSystem")}: ${I(this.effectiveLang(),"houseSystem",e.houseSystem)}</span>`:z`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${r.length>0?z`<span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:ce}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(r)} ${this.renderInterpretations()}</div>`}renderWheel(e,t){return this.viewport.renderChartViewport(z`<svg viewBox="0 0 ${gl} ${gl}" part="chart" role="img" aria-label="${this.hasCusps?this.t("Natal chart wheel with twelve houses, planets, and aspects"):this.t("Natal chart wheel with planets and aspects, houses shown as equal sectors from the Ascendant")}"><title>${this.t("Natal chart wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Planet glyphs are placed at their ecliptic longitudes. Aspect lines connect related planets.")}</desc><circle class="wheel-line" cx="${_}" cy="${_}" r="${mn}" stroke-width="1.5"/><circle class="wheel-line" cx="${_}" cy="${_}" r="${pl-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${_}" cy="${_}" r="${In}" stroke-width="1"/><circle class="wheel-line" cx="${_}" cy="${_}" r="${no}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()} ${this.renderCuspDegrees()} ${this.renderAspects(e,t)} ${this.renderPlanets(e)} ${this.renderAngles()}</svg>`,this.t(this.heading),this.translator)}renderAspectGrid(e,t){let r=e.map(o=>({name:o.name,label:g(o,"name")})),s=(o,l)=>[St(o),St(l)].sort().join("|"),i=new Map;for(let o of t)i.set(s(o.planet1,o.planet2),o);return r.length===0?z`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:z`<div class="scroll" part="section aspects table aspect-grid" tabindex="0" role="region" aria-label="${this.t("Aspect grid")}"><table class="aspect-grid"><caption class="roxy-sr-only">${this.t("Planet by planet aspect grid: the aspect each pair of planets forms, read from the planet naming the row across to the planet naming the column.")}</caption><thead><tr><td></td>${r.slice(0,-1).map(o=>{let l=$(o.name)??o.label;return z`<th scope="col" title="${o.label}">${l}</th>`})}</tr></thead><tbody>${r.slice(1).map((o,l)=>{let c=$(o.name)??o.label;return z`<tr><th scope="row" title="${o.label}">${c}</th>${r.slice(0,l+1).map(d=>{let p=i.get(s(o.name,d.name));if(!p)return z`<td></td>`;let h=Ct(p),x=tn(h)??g(p,"type",Me(p)),L=b(this.effectiveLang(),p.orb,1);return z`<td class="${`cell ${Je(p)}`}" title="${`${o.label} ${g(p,"type",h)} ${d.label}${L?` (${this.t("Orb")} ${L}°)`:""}`}"><span class="asp">${x}</span></td>`})} ${r.slice(l+1,-1).map(()=>z`<td></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let e=this.getAscendant(),t=this.getMidheaven(),r=[{longitude:e,label:this.t("ASC")},{longitude:Rn(e),label:this.t("DSC")}];t!==null&&(r.push({longitude:t,label:this.t("MC")}),r.push({longitude:Rn(t),label:this.t("IC")}));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&r.push({longitude:Tt(s),label:this.t("PoF")});let i=this.data?.vertex?.longitude;return typeof i=="number"&&r.push({longitude:Tt(i),label:this.t("Vtx")}),zt(r,o=>o.longitude,Et(Bf,hl)).map(({item:o,longitude:l,displayLongitude:c})=>this.renderAngleMark(l,c,o.label))}renderAngleMark(e,t,r){let s=this.toAngle(e),i=this.toAngle(t),o=T(_,_,mn,s),l=T(_,_,Nf,s),c=T(_,_,hl,i),d=Math.abs(t-e)>.5,p=T(_,_,hl-8,i);return Ht`
104
+ </g>`})}renderList(e){if(e.length===0)return so;let t=this.t("Local space directions: each body with its compass direction, azimuth, altitude and whether it sits above or below the horizon.");return Es`<div class="scroll" part="table" tabindex="0" role="region" aria-label="${t}"><table><caption class="roxy-sr-only">${t}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Direction")}</th><th scope="col" class="num">${this.t("Azimuth")}</th><th scope="col" class="num">${this.t("Altitude")}</th><th scope="col">${this.t("Horizon")}</th></tr></thead><tbody>${e.map((r,s)=>{let i=Fr(r.planet,s),o=r.aboveHorizon===!1;return Es`<tr><td><span class="body-cell"><span class="body-dot" style="${`background: ${i}`}"></span> ${r.symbol?Es`<span aria-hidden="true">${r.symbol}</span>`:so}${g(r,"planet")}</span></td><td>${r.compassDirection}</td><td class="num">${Math.round(r.azimuth)}°</td><td class="num">${r.altitude>0?"+":""}${Math.round(r.altitude)}°</td><td><span class="${`horizon ${o?"down":"up"}`}">${o?this.t("Below"):this.t("Above")}</span></td></tr>`})}</tbody></table></div>`}};Ds.endpoints=kc,Ds.styles=[u,Ge,mf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.wrap>*{min-width:0}h2,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,30rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.dial{fill:none;stroke:var(--roxy-border)}.dial-fill{fill:color-mix(in srgb, var(--roxy-border) 10%, transparent);stroke:var(--roxy-border);stroke-width:1px}.cardinal-axis{stroke:var(--roxy-border);stroke-width:.5px}.tick{stroke:var(--roxy-secondary);stroke-width:.6px;opacity:.5}.compass-label{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold)}.compass-label.cardinal,.center-dot{fill:var(--roxy-fg)}.spoke{stroke-width:1.4px}.spoke.below{stroke-dasharray:3 3;opacity:.4}.body-glyph{font-size:calc(var(--roxy-text-base) * .6875);font-weight:var(--roxy-weight-bold)}.body-glyph.below{opacity:.45}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td).num{text-align:end}.body-cell{align-items:center;gap:var(--roxy-space-xs);display:inline-flex}.body-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);flex-shrink:0}.horizon.up{color:var(--roxy-success-fg)}.horizon.down{color:var(--roxy-muted)}.summary{font-size:var(--roxy-text-sm)}`],Ds=m([f("roxy-local-space-compass")],Ds);import{css as vf,html as dr,nothing as pl}from"lit";import{property as As,state as Ps}from"lit/decorators.js";var Be=class extends _a{constructor(){super(...arguments);this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=!1;this.isLoading=!1;this.highlight=-1;this.error=null;this.debouncedFetch=Ki(e=>{this.fetchResults(e)},300);this.onInput=e=>{let t=e.target.value;if(this.query=t,t.length<2){this.results=[],this.isOpen=!1,this.highlight=-1,this.error=null;return}this.debouncedFetch(t)};this.onKeyDown=e=>{if(!this.isOpen||this.results.length===0){e.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),e.preventDefault());return}if(e.key==="ArrowDown")e.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(e.key==="ArrowUp")e.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(e.key==="Enter"){e.preventDefault();let t=this.results[this.highlight]??this.results[0];t&&this.select(t)}else e.key==="Escape"&&(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=e=>{e.composedPath().includes(this)||(this.isOpen=!1)},document.addEventListener("mousedown",this.clickOutsideHandler)}willUpdate(e){if(e.has("publishableKey")||e.has("apiKey")){let t=Dr(this.publishableKey??this.apiKey);t&&!this.refusal&&Us(this,t,{warn:!0}),this.refusal=t}}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}async fetchResults(e){if(this.refusal)return;this.abortController&&this.abortController.abort();let t=new AbortController;this.abortController=t,this.isLoading=!0;try{let r=await this.search(e,t.signal);if(t.signal.aborted)return;this.error=null,this.results=r.cities??[],this.isOpen=!0,this.highlight=this.results.length>0?0:-1}catch(r){if(r?.name==="AbortError")return;this.results=[],this.isOpen=!1,this.highlight=-1,this.error=r instanceof Error?r.message:String(r)}finally{this.abortController===t&&(this.abortController=void 0),t.signal.aborted||(this.isLoading=!1)}}async search(e,t){if(!this.endpoint&&this.submitUrl)return Na({submitUrl:this.submitUrl,submitContext:this.submitContext},{path:"/location/search",method:"GET",query:{q:e,limit:8}},t);let r=new URL(this.endpoint||`${ei}/location/search`,document.baseURI);r.searchParams.set("q",e),r.searchParams.set("limit","8");let s={Accept:"application/json"};this.apiKey&&this.publishableKey&&console.warn("[roxy-location-search] both api-key and publishable-key set; using publishable-key. Remove api-key from your widget markup.");let i=this.publishableKey??this.apiKey;i&&(s["X-API-Key"]=i);let o=await fetch(r,{headers:s,signal:t});if(!o.ok)throw new Error(await pd(o));return await o.json()}select(e){this.query=`${e.city}${e.province?`, ${e.province}`:""}, ${e.country}`,this.isOpen=!1,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:e,bubbles:!0,composed:!0}))}render(){return this.refusal?dr`<div class="roxy-error" role="alert">${this.t(this.refusal.message)}</div>`:dr`<div class="field"><input part="input" type="text" role="combobox" aria-expanded="${this.isOpen?"true":"false"}" aria-controls="roxy-location-listbox" aria-activedescendant="${this.isOpen&&this.highlight>=0?`roxy-location-option-${this.highlight}`:""}" aria-autocomplete="list" autocomplete="off" placeholder="${this.t(this.placeholder)}" .value="${this.query}" @input="${this.onInput}" @keydown="${this.onKeyDown}" @focus="${()=>{this.results.length>0&&(this.isOpen=!0)}}"> ${this.isLoading?dr`<span class="spinner" role="status" aria-label="${this.t("Loading")}"></span>`:pl} ${this.isOpen?dr`<ul id="roxy-location-listbox" part="results" class="results" role="listbox">${this.results.length===0?dr`<li class="empty" role="status">${this.t("No cities found")}</li>`:this.results.map((e,t)=>dr`<li role="presentation"><button type="button" part="option" class="option" role="option" id="${`roxy-location-option-${t}`}" aria-selected="${this.highlight===t?"true":"false"}" @click="${()=>this.select(e)}" @mouseenter="${()=>{this.highlight=t}}"><span class="city">${e.city}</span> <span class="where">${e.province?dr`${e.province},`:""}${e.country}</span> <span class="tz">UTC${e.utcOffset>=0?"+":""}${e.utcOffset}</span></button></li>`)}</ul>`:pl}</div>${this.error?dr`<p class="search-error" role="alert">${this.t(this.error)}</p>`:pl}`}};Be.styles=[u,ji,vf`:host{display:block;position:relative}.field{position:relative}input{inline-size:100%;min-block-size:var(--roxy-touch)}.option .city{font-weight:var(--roxy-weight-bold)}.option .where{color:var(--roxy-muted);flex-grow:1}.option .tz{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.search-error{margin:var(--roxy-space-xs) 0 0;color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm)}`],m([As({type:String,attribute:"api-key"})],Be.prototype,"apiKey",2),m([As({type:String,attribute:"publishable-key"})],Be.prototype,"publishableKey",2),m([As({type:String})],Be.prototype,"endpoint",2),m([As({type:String,attribute:"submit-url"})],Be.prototype,"submitUrl",2),m([As({attribute:"submit-context",converter:ti})],Be.prototype,"submitContext",2),m([As({type:String})],Be.prototype,"placeholder",2),m([As({type:String,attribute:"default-value"})],Be.prototype,"defaultValue",2),m([Ps()],Be.prototype,"query",2),m([Ps()],Be.prototype,"results",2),m([Ps()],Be.prototype,"isOpen",2),m([Ps()],Be.prototype,"isLoading",2),m([Ps()],Be.prototype,"highlight",2),m([Ps()],Be.prototype,"refusal",2),m([Ps()],Be.prototype,"error",2),Be=m([f("roxy-location-search")],Be);import{css as Lf,html as ea,nothing as pr}from"lit";var hh={forward:"Forward",reverse:"Backward"},Ms=class extends y{renderData(a){let e=this.effectiveLang();return ea`<article class="card" part="card" aria-labelledby="luck-title"><header class="head" part="header"><h2 class="title" id="luck-title">${this.t("Luck pillars")}</h2></header><div class="facts" part="details">${a.direction?ea`<span><span class="roxy-label">${this.t("Direction")}</span><b>${hh[a.direction]?this.t(hh[a.direction]):a.direction}</b></span>`:pr} ${typeof a.startAge=="number"?ea`<span><span class="roxy-label">${this.t("Starts")}</span><b>${this.ageLabel(e,a.startAge,a.startAgeMonths)}</b></span>`:pr} ${a.boundaryTerm?ea`<span><span class="roxy-label">${this.t("Counted to")}</span>${I(e,"boundaryTerm",a.boundaryTerm)}</span>`:pr} ${typeof a.daysToTerm=="number"?ea`<span><span class="roxy-label">${this.t("Days")}</span>${P(e,a.daysToTerm)}</span>`:pr} ${a.gender?ea`<span><span class="roxy-label">${this.t("Formula")}</span>${I(e,"gender",a.gender)}</span>`:pr}</div>${this.renderStrip(a,e)} ${this.renderAnnuals(a)} ${a.summary&&!this.hideReadings?ea`<p class="summary" part="section summary">${a.summary}</p>`:pr} ${Fa(a.conventions,this.translator,this.effectiveLang())}</article>`}ageLabel(a,e,t){let r=P(a,e);return typeof t=="number"&&t>0?this.t("{{years}}y {{months}}m",{years:r,months:P(a,t)}):this.t("{{years}} yrs",{years:r})}renderStrip(a,e){let t=a.luckPillars??[];return t.length===0?pr:ea`<div class="strip-wrap" part="chart" role="region" tabindex="0" aria-label="${this.t("Luck pillars")}"><div class="strip">${t.map(r=>ea`<div class="pillar" part="pillar"><span class="ages roxy-label">${this.t("{{start}} to {{end}}",{start:P(e,r.startAge??0),end:P(e,r.endAge??0)})}</span> <span class="god">${g(r.tenGod,"name")}</span> <span class="hanzi" lang="zh">${r.stem?.chinese??""}</span> <span class="romanised">${r.stem?.pinyin??""} <span class="element-word ${bt(r.stem?.element)}">${g(r.stem,"element")}</span></span> <span class="hanzi hanzi-branch" lang="zh">${r.branch?.chinese??""}</span> <span class="romanised">${r.branch?.pinyin??""} ${g(r.branch,"animal")}</span> <span class="years">${this.t("{{start}} to {{end}}",{start:String(r.startYear??""),end:String(r.endYear??"")})}</span></div>`)}</div></div>`}renderAnnuals(a){let e=a.annualPillars??[];return e.length===0?pr:ea`<section part="section annual-pillars"><h3 class="block-title">${this.t("Annual pillars")}</h3><ul class="roxy-chips annuals">${e.map(t=>ea`<li class="annual"><span class="yr">${t.year??""}</span> <span lang="zh">${t.tenGod?.chinese??""}</span> <span>${g(t.tenGod,"name")}</span></li>`)}</ul></section>`}};Ms.endpoints=Sc,Ms.styles=[u,G,ca,Lf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.strip-wrap{min-width:0;overflow-x:auto}.strip{min-width:min-content;display:flex}.pillar{gap:calc(var(--roxy-space-unit) / 2);min-inline-size:12ch;padding:var(--roxy-space-sm);text-align:center;flex:none;align-content:start;display:grid}.pillar+.pillar{border-inline-start:1px solid var(--roxy-border)}.ages,.years{font-variant-numeric:tabular-nums}.ages{font-weight:var(--roxy-weight-bold)}.god{min-block-size:1lh;color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}.hanzi{font-size:calc(var(--roxy-text-base) * 1.75);line-height:var(--roxy-leading-tight)}.hanzi-branch{color:var(--roxy-accent-ink)}.romanised,.years{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.annual .yr{font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.summary{margin:0}`],Ms=m([f("roxy-luck-pillars")],Ms);import{css as $f,html as me,nothing as be}from"lit";import{property as wf}from"lit/decorators.js";var kf={gentle:"Gentle",indifferent:"Indifferent",violent:"Violent"},Sf={center:"Center",conception:"Conception arm",destiny:"Destiny arm",left:"Left arm",right:"Right arm"},Rf=13;function mh(n){return"tzolkin"in n}var hr=class extends y{constructor(){super(...arguments);this.mode="day"}renderData(e){let t=this.effectiveLang(),r=this.mode==="chart"&&mh(e)?e:void 0,s=mh(e)?e.tzolkin:e,i=s?.reading,o=i?.numberBand?kf[i.numberBand]:void 0;return me`<article class="card" part="card" aria-labelledby="mayan-title"><header class="hero" part="header">${typeof s?.number=="number"?me`<div class="coefficient">${P(t,s.number)}</div>`:be}<div><p class="roxy-label">${this.t("Mayan day sign")}</p><h2 class="title" id="mayan-title">${s?.daySignName??""}</h2><p class="spellings">${s?.daySignClassic?me`<span><span class="roxy-label">${this.t("Classic spelling")}</span>${s.daySignClassic}</span>`:be} ${s?.daySignKiche?me`<span><span class="roxy-label">${this.t("Highland spelling")}</span>${s.daySignKiche}</span>`:be}</p></div></header><div class="facts" part="details">${e.date?me`<span><span class="roxy-label">${this.t("Date")}</span><b>${R(t,e.date)}</b></span>`:be} ${this.renderTrecena(t,s?.trecena)} ${r?this.renderHaabFact(t,r.haab):be} ${r?.longCount?.formatted?me`<span><span class="roxy-label">${this.t("Long Count")}</span><b>${r.longCount.formatted}</b></span>`:be} ${r?.calendarRound?me`<span><span class="roxy-label">${this.t("Calendar Round")}</span><b>${r.calendarRound}</b></span>`:be} ${r?.yearBearer?.daySignName?me`<span><span class="roxy-label">${this.t("Year Bearer")}</span><b>${P(t,r.yearBearer.number)} ${r.yearBearer.daySignName}</b></span>`:be} ${r?.lordOfNight?.label?me`<span><span class="roxy-label">${this.t("Lord of the Night")}</span><b>${r.lordOfNight.label}</b></span>`:be} ${o?me`<span><span class="roxy-label">${this.t("Character of the number")}</span><b class="band">${this.t(o)}</b></span>`:be} ${e.conventions?.correlation?me`<span><span class="roxy-label">${this.t("Correlation")}</span><span title="${e.conventions.correlation}">${I(t,"correlation",e.conventions.correlation,e.conventions.correlation)}</span></span>`:be}</div>${i?.keynote&&!this.hideReadings?me`<p class="keynote" part="reading">${i.keynote}</p>`:be} ${this.renderLists(i)} ${this.renderInterpretation(this.sections(r,i),"mayan-day")} ${this.renderCross(t,r?.cross)} ${r?.summary&&!this.hideReadings?me`<p class="summary" part="reading">${r.summary}</p>`:be}</article>`}renderTrecena(e,t){return t?me`<span><span class="roxy-label">${this.t("Trecena")}</span><b>${P(e,t.number)}</b> ${typeof t.dayOfTrecena=="number"?this.t("Day {{n}} of {{total}}",{n:P(e,t.dayOfTrecena),total:P(e,Rf)}):be} ${t.rulingSignName?me`· <span class="roxy-label">${this.t("Ruling sign")}</span>${t.rulingSignName}`:be}</span>`:be}renderHaabFact(e,t){return t?.monthName?me`<span><span class="roxy-label">${this.t("Haab")}</span><b>${P(e,t.day)} ${t.monthName}</b> ${t.monthClassic?me`(${t.monthClassic})`:be} ${typeof t.dayOfYear=="number"?me`· <span class="roxy-label">${this.t("Day of year")}</span>${P(e,t.dayOfYear)}`:be}</span>`:be}renderLists(e){let t=e?.strengths??[],r=e?.challenges??[];return this.hideReadings||t.length===0&&r.length===0?be:me`<div class="lists" part="section readings">${t.length>0?me`<div><h3 class="block-title">${this.t("Strengths")}</h3><ul class="plain">${t.map(s=>me`<li>${s}</li>`)}</ul></div>`:be} ${r.length>0?me`<div><h3 class="block-title">${this.t("Challenges")}</h3><ul class="plain">${r.map(s=>me`<li>${s}</li>`)}</ul></div>`:be}</div>`}sections(e,t){let r=[];return t?.numberReading&&r.push({label:this.t("Coefficient"),body:t.numberReading}),t?.guidance&&r.push({label:this.t("Guidance"),body:t.guidance}),e?.haab?.reading&&r.push({label:this.t("Haab"),body:e.haab.reading}),e?.lordOfNight?.reading&&r.push({label:this.t("Lord of the Night"),body:e.lordOfNight.reading}),e?.yearBearer?.reading&&r.push({label:this.t("Year Bearer"),body:e.yearBearer.reading}),r}crossLabel(e){let t=Sf[e??""];return t?this.t(t):S(e??"")}renderCross(e,t){let r=t??[];return r.length===0?be:me`<section part="section cross"><h3 class="block-title">${this.t("Mayan cross")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Mayan cross")}"><table class="stacked"><thead><tr><th>${this.t("Position")}</th><th>${this.t("Offset in days")}</th><th>${this.t("Day sign")}</th></tr></thead><tbody>${r.map(s=>me`<tr><td data-label="${this.t("Position")}">${this.crossLabel(s.position)}</td><td class="num" data-label="${this.t("Offset in days")}">${P(e,s.offsetDays)}</td><td data-label="${this.t("Day sign")}">${P(e,s.number)} ${s.daySignName??""} ${s.daySignKiche?me`(${s.daySignKiche})`:be} ${s.reading&&!this.hideReadings?me`<p part="reading">${s.reading}</p>`:be}</td></tr>`)}</tbody></table></div></section>`}};hr.endpoints=Rc,hr.styles=[u,j,er,$f`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.coefficient{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * 2.75);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;flex-shrink:0;line-height:1}.hero>div:not(.coefficient){min-width:0}.title,.block-title,p.roxy-label{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.spellings{gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-md);margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}span>.roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.keynote,.summary{margin:0;padding-block-start:var(--roxy-space-md)}.summary{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}ul.plain{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td.num{white-space:nowrap}td.num{font-variant-numeric:tabular-nums}td p{margin:calc(var(--roxy-space-unit) / 2) 0 0;color:var(--roxy-secondary);font-size:var(--roxy-text-xs);border-block-start:0}`],m([wf({type:String,reflect:!0})],hr.prototype,"mode",2),hr=m([f("roxy-mayan-day-sign")],hr);import{css as Cf,html as ta,nothing as mr}from"lit";import{property as Tf}from"lit/decorators.js";var gr=class extends y{constructor(){super(...arguments);this.mode="current"}renderData(e){let t="phases"in e?e.phases:"calendar"in e?e.calendar:[];if(this.mode!=="current"&&t.length>0){let r=Xs(this.effectiveLang(),"year"in e?e.year:void 0,"month"in e?e.month:void 0);return ta`<article class="card" part="card" aria-label="${this.t("Moon phase calendar")}"><h2 class="label" part="header">${r||this.t("Moon phase calendar")}</h2><div part="table" role="list">${t.map(s=>this.renderListItem(s))}</div></article>`}return"phase"in e?this.renderSingle(e):mr}renderSingle(e){let t=e.meaning?.symbol||gh(e.phase);return ta`<article class="card" part="card" aria-label="${this.t("Current moon phase")}"><div class="hero" part="header"><span class="emoji" aria-hidden="true">${t}</span><div><h2 class="label">${e.phase??this.t("Current moon phase")}</h2>${e.date?ta`<p class="roxy-label">${R(this.effectiveLang(),e.date)}</p>`:mr}</div></div><div class="stats" part="details">${typeof e.illumination=="number"?ta`<div><span class="roxy-label">${this.t("Illumination")}</span> <strong>${we(this.effectiveLang(),e.illumination,0)}</strong></div>`:mr} ${typeof e.age=="number"?ta`<div><span class="roxy-label">${this.t("Age")}</span> <strong>${this.t("{{count}} days",{count:b(this.effectiveLang(),e.age,1)})}</strong></div>`:mr} ${e.sign?ta`<div><span class="roxy-label">${this.t("Sign")}</span> <strong>${e.sign}</strong></div>`:mr} ${typeof e.distance=="number"?ta`<div><span class="roxy-label">${this.t("Distance")}</span> <strong>${this.t("{{value}}k km",{value:b(this.effectiveLang(),e.distance/1e3,0)})}</strong></div>`:mr}</div>${e.meaning?.description&&!this.hideReadings?ta`<p>${e.meaning.description}</p>`:mr} ${e.meaning?.keywords?.length&&!this.hideReadings?ta`<ul class="roxy-chips">${e.meaning.keywords.map(r=>ta`<li>${r}</li>`)}</ul>`:mr}</article>`}renderListItem(e){let t=gh(e.phase);return ta`<div class="list-item" role="listitem"><span aria-hidden="true">${t}</span> <span>${e.phase}</span> <span>${R(this.effectiveLang(),e.date)}</span></div>`}};gr.endpoints=Cc,gr.styles=[u,Cf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.emoji{font-size:calc(var(--roxy-text-xl) * 2);line-height:1}.label{text-transform:capitalize}.stats{gap:var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:repeat(auto-fit,minmax(min(100%,14ch),1fr));display:grid}.stats .roxy-label{display:block}.stats strong{font-variant-numeric:tabular-nums}.list-item{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);grid-template-columns:auto minmax(0,1fr) auto;display:grid}.list-item:last-child{border-block-end:0}`],m([Tf({type:String,reflect:!0})],gr.prototype,"mode",2),gr=m([f("roxy-moon-phase")],gr);function gh(n){return Td(n)??"🌙"}import{css as Ef,html as aa,nothing as ya}from"lit";var _s=class extends y{renderData(a){let e=a.remedies;return aa`<article class="wrap" part="card" aria-label="${this.t("Nakshatra {{name}}",{name:a.name})}"><header class="head" part="header"><h2>${a.name}</h2>${typeof a.number=="number"?aa`<span class="number">${this.t("Nakshatra {{number}} of 27",{number:a.number})}</span>`:ya} ${a.range?aa`<span class="range">${a.range}</span>`:ya}</header><dl class="roxy-facts" part="details">${a.lord?aa`<div><dt>${this.t("Lord")}</dt><dd>${a.lord}</dd></div>`:ya} ${a.deity?aa`<div><dt>${this.t("Deity")}</dt><dd>${a.deity}</dd></div>`:ya} ${a.symbol?aa`<div><dt>${this.t("Symbol")}</dt><dd>${a.symbol}</dd></div>`:ya}</dl>${a.characteristics&&!this.hideReadings?aa`<div class="section" part="section characteristics"><h3>${this.t("Characteristics")}</h3><p>${a.characteristics}</p></div>`:ya} ${e&&!this.hideReadings?aa`<div class="section" part="section remedies"><h3>${this.t("Remedies")}</h3><div class="remedies">${e.mantras?aa`<div class="remedy"><strong>${this.t("Mantras:")}</strong> ${e.mantras}</div>`:ya} ${e.gemstones?aa`<div class="remedy"><strong>${this.t("Gemstones:")}</strong> ${e.gemstones}</div>`:ya} ${e.rituals?aa`<div class="remedy"><strong>${this.t("Rituals:")}</strong> ${e.rituals}</div>`:ya}</div></div>`:ya}</article>`}};_s.endpoints=Tc,_s.styles=[u,re,Ef`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.number{color:var(--roxy-accent-ink);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.range{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.roxy-facts{margin:0}.section h3{margin-block-end:var(--roxy-space-xs)}.section p,.remedy{font-size:var(--roxy-text-sm)}.remedies{gap:var(--roxy-space-xs);display:grid}.remedy strong{color:var(--roxy-secondary)}`],_s=m([f("roxy-nakshatra-card")],_s);import{css as Pf,html as z,nothing as ce,svg as Ht}from"lit";import{css as Df,html as wt,nothing as Bt}from"lit";var Ns=class extends y{rows(){let a=this.data;if(!a)return[];let e=(a.planets??[]).map(r=>({name:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),longitude:r.longitude,latitude:r.latitude,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,dignity:r.dignity})),t=[["Ascendant",a.ascendant],["Midheaven",a.midheaven],["Part of Fortune",a.partOfFortune],["Vertex",a.vertex]];for(let[r,s]of t)s&&e.push({name:r,label:this.t(r),sign:s.sign,signLabel:g(s,"sign"),longitude:s.longitude,house:"house"in s?s.house:void 0,sect:"sect"in s?s.sect:void 0,isPoint:!0});return e}renderData(a){if(!a.planets)return this.renderEmpty();let e=this.rows(),t=a.birthDetails,r=e.some(o=>Number.isFinite(o.latitude)),s=e.some(o=>o.sect),i=["latitude","longitude","timezone"];return wt`<div class="wrap" part="card"><header part="header"><h2>${this.t("Planetary positions")}</h2>${t?wt`<div part="details"><p class="roxy-label">${V(this.effectiveLang(),t.date,t.time,!0)}</p><dl class="roxy-facts">${i.map(o=>wt`<div><dt>${ae(this.effectiveLang(),o)}</dt><dd>${b(this.effectiveLang(),t[o],5)}</dd></div>`)}</dl></div>`:Bt}</header><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Western planetary positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Western planetary positions: each body with its sign, degree, house, essential dignity and motion. The dignity cell is blank for the lunar nodes, Chiron and Lilith, which rule no sign and therefore hold no dignity at all.")}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th>${r?wt`<th scope="col">${ae(this.effectiveLang(),"latitude")}</th>`:Bt}<th scope="col">${this.t("House")}</th><th scope="col">${this.t("Dignity")}</th><th scope="col">${this.t("Motion")}</th>${s?wt`<th scope="col">${this.t("Sect")}</th>`:Bt}</tr></thead><tbody>${e.map(o=>{let l=$(o.name)??"",c=o.sect==="day"?this.t("Daytime"):o.sect==="night"?this.t("Night"):"",d=N(o.sign)??"",p=typeof o.speed=="number"?b(this.effectiveLang(),o.speed,6):"";return wt`<tr class="${o.isPoint?"point":""}"><td class="body">${l?wt`<span class="glyph">${l}</span>`:Bt}${o.label}</td><td>${d?wt`<span class="glyph">${d}</span>`:Bt}${o.signLabel??""}</td><td>${typeof o.longitude=="number"?Qe(o.longitude,o.signLabel):""}</td><td>${typeof o.longitude=="number"?`${b(this.effectiveLang(),o.longitude,5)}°`:Bt}</td>${r?wt`<td>${typeof o.latitude=="number"?`${b(this.effectiveLang(),o.latitude,5)}°`:Bt}</td>`:Bt}<td>${typeof o.house=="number"?o.house:""}</td><td class="dignity">${o.dignity?A(o.dignity):""}</td><td>${p?wt`${p}${this.t("°/day")}`:Bt} ${o.isRetrograde?wt`<span class="retro">℞</span>`:Bt}</td>${s?wt`<td>${c}</td>`:Bt}</tr>`})}</tbody></table></div>${a.houses?.length?wt`<details part="section houses"><summary>${this.t("Houses")}</summary><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Houses")}"><table part="table"><thead><tr><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th></tr></thead><tbody>${a.houses.map(o=>wt`<tr><th scope="row">${b(this.effectiveLang(),o.number,0)}</th><td>${g(o,"sign")}</td><td>${Qe(o.longitude,g(o,"sign"))}</td><td>${b(this.effectiveLang(),o.longitude,5)}°</td></tr>`)}</tbody></table></div></details>`:Bt}</div>`}};Ns.endpoints=Zc,Ns.styles=[u,re,Df`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}h2{overflow-wrap:anywhere}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}tr:not(.point)+tr.point>*{border-block-start:1px solid var(--roxy-secondary)}td.body{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}details>summary{font-weight:var(--roxy-weight-bold)}details>.scroll{margin-block-start:var(--roxy-space-sm)}`],Ns=m([f("roxy-western-planets-table")],Ns);import{property as Mf,state as _f}from"lit/decorators.js";import{ifDefined as yh}from"lit/directives/if-defined.js";var yr=class{constructor(a,e){this.host=a,this.marks=e,this.size=Object.fromEntries(Object.keys(e).map(t=>[t,e[t][1]])),a.addController(this)}hostConnected(){typeof ResizeObserver>"u"||(this.observer=new ResizeObserver(()=>this.host.requestUpdate()),this.observer.observe(this.host))}hostDisconnected(){this.observer?.disconnect(),this.observer=void 0}hostUpdated(){let a=!1;for(let e of Object.keys(this.marks)){let[t]=this.marks[e],r=Af(this.host.renderRoot,t,this.size[e]);r!==this.size[e]&&(this.size[e]=r,a=!0)}a&&this.host.requestUpdate()}};function Af(n,a,e){let t=n?.querySelector(a);if(!t||typeof getComputedStyle!="function")return e;let r=Number.parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(r)&&r>0?r:e}var uh={GRAND_CROSS:0,GRAND_TRINE:1,KITE:2,T_SQUARE:3,YOD:4,MYSTIC_RECTANGLE:5,STELLIUM:6},yl=540,_=yl/2,mn=220,hl=202,In=174,Fn=144,Nf=232,ml=249,gl={glyph:14,degree:7},zf=.95,Of=3.4,Gf=1.85,If=1.25,Ff=.9,Bf=28,Hf=13,io=84,Da=class extends y{constructor(){super(...arguments);this.viewport=new Ce(this);this.heading="Natal chart";this.view="wheel";this.type=new yr(this,{glyph:[".planet-glyph",gl.glyph],degree:[".planet-deg",gl.degree]})}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let e=this.data?.midheaven?.longitude;return typeof e=="number"?e:null}get hasCusps(){return(this.data?.houses??[]).length===12}toAngle(e){return 180+this.getAscendant()-e}renderData(e){let t=this.getPlanets(),r=e.aspects??[],s=this.view;return z`<div class="wrap" part="card"><header part="header"><h2>${this.t(this.heading)}</h2>${e.birthDetails?z`<p class="roxy-label">${V(this.effectiveLang(),e.birthDetails.date,e.birthDetails.time)}</p>`:ce}</header>${r.length>0?z`${dt({items:[{id:"wheel",label:this.t("Wheel")},{id:"grid",label:this.t("Aspect grid")}],active:s,onSelect:i=>{this.view=i},label:this.t("Natal chart views"),idPrefix:"natal",controls:!0})}<div id="natal-panel-${s}" part="panel" role="tabpanel" aria-labelledby="natal-tab-${s}">${s==="wheel"?this.renderWheel(t,r):this.renderAspectGrid(t,r)}</div>`:this.renderWheel(t,r)}<div class="legend" part="legend"><span>${this.t("Positions")}: ${b(this.effectiveLang(),t.length,0)}</span> ${r.length>0?z`<span>${this.t("{{count}} aspects",{count:s==="grid"?r.length:r.filter(ja).length})}</span>`:ce} ${this.hasCusps&&e.houseSystem?z`<span>${ae(this.effectiveLang(),"houseSystem")}: ${I(this.effectiveLang(),"houseSystem",e.houseSystem)}</span>`:z`<span class="caveat">${this.t("Equal sectors from the Ascendant, no house cusps in this response")}</span>`} ${r.length>0?z`<span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:ce}</div>${this.renderPositionDetails(e)} ${this.renderDetails()} ${this.renderPatterns()} ${this.renderAspectDetails(r)} ${this.renderInterpretations()}</div>`}renderWheel(e,t){return this.viewport.renderChartViewport(z`<svg viewBox="0 0 ${yl} ${yl}" part="chart" role="img" aria-label="${this.hasCusps?this.t("Natal chart wheel with twelve houses, planets, and aspects"):this.t("Natal chart wheel with planets and aspects, houses shown as equal sectors from the Ascendant")}"><title>${this.t("Natal chart wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Planet glyphs are placed at their ecliptic longitudes. Aspect lines connect related planets.")}</desc><circle class="wheel-line" cx="${_}" cy="${_}" r="${mn}" stroke-width="1.5"/><circle class="wheel-line" cx="${_}" cy="${_}" r="${hl-14}" stroke-width="0.8"/><circle class="wheel-line" cx="${_}" cy="${_}" r="${In}" stroke-width="1"/><circle class="wheel-line" cx="${_}" cy="${_}" r="${io}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()} ${this.renderCuspDegrees()} ${this.renderAspects(e,t)} ${this.renderPlanets(e)} ${this.renderAngles()}</svg>`,this.t(this.heading),this.translator)}renderAspectGrid(e,t){let r=e.map(o=>({name:o.name,label:g(o,"name")})),s=(o,l)=>[St(o),St(l)].sort().join("|"),i=new Map;for(let o of t)i.set(s(o.planet1,o.planet2),o);return r.length===0?z`<p class="roxy-empty" role="status">${this.t("No planets to grid")}</p>`:z`<div class="scroll" part="section aspects table aspect-grid" tabindex="0" role="region" aria-label="${this.t("Aspect grid")}"><table class="aspect-grid"><caption class="roxy-sr-only">${this.t("Planet by planet aspect grid: the aspect each pair of planets forms, read from the planet naming the row across to the planet naming the column.")}</caption><thead><tr><td></td>${r.slice(0,-1).map(o=>{let l=$(o.name)??o.label;return z`<th scope="col" title="${o.label}">${l}</th>`})}</tr></thead><tbody>${r.slice(1).map((o,l)=>{let c=$(o.name)??o.label;return z`<tr><th scope="row" title="${o.label}">${c}</th>${r.slice(0,l+1).map(d=>{let p=i.get(s(o.name,d.name));if(!p)return z`<td></td>`;let h=Ct(p),x=tn(h)??g(p,"type",Me(p)),L=b(this.effectiveLang(),p.orb,1);return z`<td class="${`cell ${Je(p)}`}" title="${`${o.label} ${g(p,"type",h)} ${d.label}${L?` (${this.t("Orb")} ${L}°)`:""}`}"><span class="asp">${x}</span></td>`})} ${r.slice(l+1,-1).map(()=>z`<td></td>`)}</tr>`})}</tbody></table></div>`}renderAngles(){let e=this.getAscendant(),t=this.getMidheaven(),r=[{longitude:e,label:this.t("ASC")},{longitude:Rn(e),label:this.t("DSC")}];t!==null&&(r.push({longitude:t,label:this.t("MC")}),r.push({longitude:Rn(t),label:this.t("IC")}));let s=this.data?.partOfFortune?.longitude;typeof s=="number"&&r.push({longitude:Tt(s),label:this.t("PoF")});let i=this.data?.vertex?.longitude;return typeof i=="number"&&r.push({longitude:Tt(i),label:this.t("Vtx")}),zt(r,o=>o.longitude,Et(Bf,ml)).map(({item:o,longitude:l,displayLongitude:c})=>this.renderAngleMark(l,c,o.label))}renderAngleMark(e,t,r){let s=this.toAngle(e),i=this.toAngle(t),o=T(_,_,mn,s),l=T(_,_,Nf,s),c=T(_,_,ml,i),d=Math.abs(t-e)>.5,p=T(_,_,ml-8,i);return Ht`
307
105
  <g>
308
106
  <line class="angle-tick" x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} />
309
107
  ${d?Ht`<line class="angle-tick" x1=${l.x} y1=${l.y} x2=${p.x} y2=${p.y} />`:ce}
310
108
  <text class="angle-marker" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${r}</text>
311
109
  </g>
312
- `}renderSpokes(){let e=this.data?.houses??[];return(this.hasCusps?e.map(r=>r.longitude):Array.from({length:12},(r,s)=>this.getAscendant()+s*30)).map(r=>{let s=this.toAngle(r),i=T(_,_,In,s),o=T(_,_,mn,s);return Ht`<line class="wheel-line" x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width="0.8" />`})}renderSigns(){return Re.map((e,t)=>{let r=this.toAngle(t*30+15),s=T(_,_,pl,r);return Ht`<text class="sign-glyph" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${N(e)??""}</text>`})}renderHouseNumbers(){let e=this.data?.houses??[];if(this.hasCusps)return e.map((r,s)=>{let i=e[(s+1)%12],o=di(r.longitude,i?i.longitude:r.longitude+30),l=T(_,_,In-12,this.toAngle(o));return Ht`<text class="house-num" x=${l.x} y=${l.y} text-anchor="middle" dominant-baseline="central">${r.number}</text>`});let t=this.getAscendant();return Array.from({length:12},(r,s)=>{let i=this.toAngle(t+s*30+15),o=T(_,_,In-12,i),l=s+1;return Ht`<text class="house-num" x=${o.x} y=${o.y} text-anchor="middle" dominant-baseline="central">${l}</text>`})}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let r=this.toAngle(t),s=t%30===0,i=s?pl-14:mn-5,o=T(_,_,i,r),l=T(_,_,mn,r);e.push(Ht`<line class=${s?"tick tick-major":"tick"} x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} stroke-width=${s?1:.5} />`)}return e}renderCuspDegrees(){let e=this.data?.houses??[];return this.hasCusps?e.map(t=>{let r=this.toAngle(t.longitude),s=T(_,_,In+9,r);return Ht`<text class="cusp-deg" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${jt(t.longitude)}</text>`}):ce}renderPlanets(e){let t=this.type.size.degree>ml.degree,r=zf*this.type.size.glyph,s={width:r,height:r},i=x=>({width:((t?Gf:Of)+(x?If:0))*this.type.size.degree,height:Ff*this.type.size.degree}),o=(x,L,v)=>{let w=i(x.isRetrograde===!0),O=Fn-La(L,s,w,la);return v===0?O:Math.min(O,Math.max(O-Hf,no+la+zd(L,w)))},l=Et(r,Fn),c=i(!0),d=Math.max(l,Et(c.width,Fn-La(90,s,c,la))/2),p=zt(e,x=>x.longitude,d),h=Od(p,({item:x,displayLongitude:L},v)=>{let w=this.toAngle(L);return{...T(_,_,o(x,w,v),w),...i(x.isRetrograde===!0)}});return p.map((x,L)=>{let{item:v,longitude:w,displayLongitude:O}=x,te=this.toAngle(w),We=this.toAngle(O),Ma=T(_,_,Fn,We),Cr=T(_,_,o(v,We,h[L]??0),We),Tr=T(_,_,mn-4,te),Er=T(_,_,Fn+8,We),vn=g(v,"name"),Yn=$(v.name)??vn,Dl=v.isRetrograde===!0,Al=jt(v.longitude),Hh=t?`${Nt(v.longitude).degree}°`:Al,jh=Math.abs(O-w)>.5;return Ht`<g>
313
- ${jh?Ht`<line class="planet-leader" x1=${Tr.x} y1=${Tr.y} x2=${Er.x} y2=${Er.y} />`:ce}
314
- <text class="planet-glyph" x=${Ma.x} y=${Ma.y} text-anchor="middle" dominant-baseline="central"><title>${vn}${Dl?` ${this.t("retrograde")}`:""} - ${Al} ${g(v,"sign")}</title>${Yn}</text>
315
- <text class="planet-deg" x=${Cr.x} y=${Cr.y} text-anchor="middle" dominant-baseline="central">${Hh}${Dl?Ht`<tspan class="retro"> ℞</tspan>`:ce}</text>
316
- </g>`})}renderPositionDetails(e){return z`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${gh(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${e}"></roxy-western-planets-table></details>`}renderDetails(){let e=this.data?.summary,t=this.data?.aspectsInterpretation;if(!e&&!t)return ce;let r=ii(e,"retrogradePlanets");return z`<div class="facts" part="details">${e?.dominantElement||e?.dominantModality?z`<ul class="roxy-chips">${e.dominantElement?z`<li>${this.t("Dominant element")}: ${g(e,"dominantElement")}</li>`:ce} ${e.dominantModality?z`<li>${this.t("Dominant modality")}: ${g(e,"dominantModality")}</li>`:ce}</ul>`:ce} ${t?z`<p class="counts"><span class="harmonious">${this.t("Harmonious: {{count}}",{count:t.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:t.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:t.neutral})}</span></p>`:ce} ${r.length>0?z`<ul class="roxy-chips">${r.map(({value:s,label:i})=>{let o=$(s)??"";return z`<li>${o} ${i} ℞</li>`})}</ul>`:ce} ${t?.summary&&!this.hideReadings?z`<p>${t.summary}</p>`:ce} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return ce;let t=["Fire","Earth","Air","Water"],r=["Cardinal","Fixed","Mutable"],s={Fire:this.t("Fire"),Earth:this.t("Earth"),Air:this.t("Air"),Water:this.t("Water")},i={Cardinal:{abbr:this.t("Car"),full:this.t("Cardinal")},Fixed:{abbr:this.t("Fix"),full:this.t("Fixed")},Mutable:{abbr:this.t("Mut"),full:this.t("Mutable")}},o=Re,l=this.data?.summary,c={};for(let L of t)c[L]={Cardinal:[],Fixed:[],Mutable:[]};let d=0;for(let L of e){let v=o.indexOf(A(L.sign??""));if(v<0)continue;let w=t[v%4],O=r[v%3],te=$(L.name)??g(L,"name");c[w]?.[O]?.push(te),d++}if(d===0)return ce;let p=L=>t.reduce((v,w)=>v+(c[w]?.[L]?.length??0),0),h=[...Object.entries(l?.elementDistribution??{}).map(([L,v])=>({label:s[A(L)]??L,count:v})),...Object.entries(l?.modalityDistribution??{}).map(([L,v])=>({label:i[A(L)]?.full??L,count:v}))],x=Object.values(l?.elementDistribution??{}).reduce((L,v)=>L+v,0);return z`${h.length?z`<section class="block distribution" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p class="counts"><span class="roxy-label">${this.t("{{count}} planets",{count:x})}</span> ${h.map(({label:L,count:v})=>z`<span>${L}: ${b(this.effectiveLang(),v,0)}</span>`)}</p></section>`:ce}<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Element and modality distribution")}"><table class="em-grid" part="table element-modality" aria-label="${this.t("Element and modality distribution")}"><caption class="roxy-label">${this.t("All {{count}} bodies in the chart, placed by sign",{count:d})}</caption><thead><tr><td></td>${r.map(L=>z`<th scope="col" title="${i[L]?.full??L}">${i[L]?.abbr??L}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(L=>{let v=r.reduce((w,O)=>w+(c[L]?.[O]?.length??0),0);return z`<tr><th scope="row">${s[L]??L}</th>${r.map(w=>z`<td>${(c[L]?.[w]??[]).join(" ")}</td>`)}<td class="em-total">${v}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${r.map(L=>z`<td class="em-total">${p(L)}</td>`)}<td class="em-total">${d}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return ce;let t=[...e].sort((r,s)=>(yh[r.kind]??9)-(yh[s.kind]??9)||(s.tightness??0)-(r.tightness??0));return z`<section class="block patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${t.map(r=>this.renderPattern(r))}</section>`}renderPattern(e){let t=e.planets??[],r=e.apex?[...t].sort((s,i)=>+(i===e.apex)-+(s===e.apex)):t;return z`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?z`<span class="roxy-chip">${e.element}</span>`:ce} ${e.modality?z`<span class="roxy-chip">${e.modality}</span>`:ce} ${e.dissociate?z`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:ce} ${typeof e.tightness=="number"?z`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:we(this.effectiveLang(),e.tightness,0)})}</span>`:ce}</div><ul class="roxy-chips">${r.map(s=>{let i=$(s),o=!!e.apex&&s===e.apex;return z`<li class="${o?"roxy-chip apex":"roxy-chip"}">${i?z`<span aria-hidden="true">${i}</span>`:ce}${s}${o?z`<span>${this.t("apex")}</span>`:ce}</li>`})}</ul>${e.interpretation&&!this.hideReadings?z`<p class="pattern-interp">${e.interpretation}</p>`:ce}</div>`}renderAspectDetails(e){return e.length===0?ce:z`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${gh(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}renderInterpretations(){let e=this.getPlanets().filter(t=>t.interpretation).map(t=>{let r=t.interpretation,s=$(t.name)??"",i=g(t,"name"),o=r.summary||r.detailed||"",l=r.summary?r.detailed:void 0;return{label:`${s} ${i}`.trim(),aside:`${g(t,"sign")} ${jt(t.longitude)}`,body:o,extra:z`${l?z`<p>${l}</p>`:ce} ${Pr(r.keywords)}`}});return this.renderInterpretation(e,"natal-planet-readings","Planet readings")}renderAspects(e,t){let r=new Map;for(let s of e){if(typeof s.longitude!="number")continue;let i=St(s.name);i&&r.set(i,s.longitude)}return t.filter(ja).map(s=>{let i=r.get(St(s.planet1)),o=r.get(St(s.planet2));if(i===void 0||o===void 0)return ce;let l=T(_,_,no-2,this.toAngle(i)),c=T(_,_,no-2,this.toAngle(o)),d=Ct(s),p=b(this.effectiveLang(),s.orb,1);return Ht`<line class=${`aspect ${Je(s)}`} style=${rn(s)} x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y}><title>${g(s,"planet1")} ${g(s,"type",d)} ${g(s,"planet2")}${p?` (${this.t("Orb")} ${p}°)`:""}</title></line>`})}};Da.endpoints=Tc,Da.styles=[u,Ge,an,Xe,M,j,Pf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}h2{overflow-wrap:anywhere}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,42.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line,.tick{fill:none;stroke:var(--roxy-border)}.tick-major{stroke:var(--roxy-secondary)}.sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}.planet-glyph{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold)}.planet-deg{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .4375)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.planet-leader{stroke:var(--roxy-accent);stroke-width:.5px;opacity:.55}.house-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .5625)}.cusp-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .375)}.angle-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold)}.angle-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}@container (width<=480px){.sign-glyph,.planet-glyph{font-size:calc(var(--roxy-text-base) * 1.5)}.planet-deg{font-size:calc(var(--roxy-text-base) * .8125)}.house-num{font-size:calc(var(--roxy-text-base) * .75)}}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.legend .caveat{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}.aspect-grid{margin:0 auto}.aspect-grid :is(th,td){inline-size:var(--roxy-space-lg);block-size:var(--roxy-space-lg);text-align:center;vertical-align:middle;border:1px solid var(--roxy-border);padding:0}.aspect-grid .asp{color:var(--_aspect-ink,var(--roxy-muted))}.facts,.distribution,.patterns{gap:var(--roxy-space-sm);display:grid}.em-grid{width:100%}.em-grid caption{caption-side:top;text-align:start}.em-grid :is(th,td){text-align:center}.em-grid th[scope=row]{text-align:start}.em-grid td{color:var(--roxy-accent-ink)}.em-grid .em-total{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pattern{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}`],m([Mf({type:String})],Da.prototype,"heading",2),m([_f()],Da.prototype,"view",2),Da=m([f("roxy-natal-chart")],Da);import{css as jf,html as k,nothing as C}from"lit";import{property as Kf}from"lit/decorators.js";var Vf=new Set([11,22,33]),qf=[["career","Career"],["relationships","Relationships"],["spirituality","Spirituality"]],ur=class extends y{constructor(){super(...arguments);this.type="life-path"}renderData(e){let t=this.t(Yf[this.type]??this.type);return"coreNumbers"in e?this.renderChart(e,t):"personalDay"in e?this.renderPersonalDay(e,t):"personalMonth"in e?this.renderPersonalMonth(e,t):"personalYear"in e?this.renderPersonalYear(e,t):"dailyMessage"in e?this.renderDailyNumber(e,t):this.renderNumberCard(e,t)}renderNumberCard(e,t){let r=!this.hideReadings;return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,io(e.number,e.type))} ${e.meaning?.description&&r?k`<p>${e.meaning.description}</p>`:C} ${e.calculation?k`<pre class="calc" part="calculation">${e.calculation}</pre>`:C} ${e.hasKarmicDebt&&e.karmicDebtNumber?k`<div class="karmic" part="section karmic-debt"><strong>${this.t("Karmic debt")} ${e.karmicDebtNumber}.</strong> ${r?Uf(e.karmicDebtMeaning):""}</div>`:C} ${this.renderReading(e.meaning,"numerology-guidance")}</article>`}renderDailyNumber(e,t){let r=!this.hideReadings;return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,io(e.number,e.type))} ${e.dailyMessage&&r?k`<p>${e.dailyMessage}</p>`:C} ${e.meaning?.description&&r?k`<p>${e.meaning.description}</p>`:C} ${this.renderReading(e.meaning,"numerology-daily-guidance")}</article>`}renderPersonalDay(e,t){return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalDay,e.theme)} ${e.guidance&&!this.hideReadings?k`<p>${e.guidance}</p>`:C}<dl class="roxy-facts" part="details">${this.attr(this.t("Date"),R(this.effectiveLang(),e.targetDate))} ${this.attr(this.t("Personal month"),yl(e.personalMonth,e.personalMonthTheme))} ${this.attr(this.t("Personal year"),yl(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalMonth(e,t){return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalMonth,e.theme)} ${e.focus&&!this.hideReadings?k`<p>${e.focus}</p>`:C}<dl class="roxy-facts" part="details">${this.attr(this.t("Calendar month"),e.calendarMonth)} ${this.attr(this.t("Personal year"),yl(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalYear(e,t){let r=!this.hideReadings;return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalYear,e.theme)} ${e.cycle?k`<p class="roxy-label">${e.cycle}</p>`:C} ${e.forecast&&r?k`<p>${e.forecast}</p>`:C} ${r?this.renderLists(["Opportunities",e.opportunities],["Challenges",e.challenges]):C} ${e.advice&&r?k`<p>${e.advice}</p>`:C}</article>`}renderChart(e,t){let r=Object.entries(e.coreNumbers??{}).filter(([,d])=>d),s=e.additionalInsights,i=e.luckyAssociations,o=e.birthDayProfile,l=e.maturityStatus,c=!this.hideReadings;return k`<article class="card" part="card" aria-label="${t}"><div part="header"><p class="roxy-label">${t}</p>${e.profile?.name?k`<h2>${e.profile.name}</h2>`:C} ${e.profile?.birthdate?k`<p class="roxy-label">${R(this.effectiveLang(),e.profile.birthdate)}</p>`:C}</div>${e.summary&&c?k`<p>${e.summary}</p>`:C} ${r.length>0?k`<div class="cores" part="details cores">${r.map(([d,p])=>k`<div class="item"><div class="core-head"><span class="core-key">${S(d)}</span> <strong>${p.number??""}</strong></div>${p.meaning?.title?k`<span class="core-title">${p.meaning.title}</span>`:C} ${io(p.number,p.type)?k`<span class="master roxy-chip">${this.t("Master")} ${p.number}</span>`:C}</div>`)}</div>`:C} ${this.renderInterpretation(r.map(([d,p])=>({label:S(d),aside:[p.number!=null?`${p.number}`:"",io(p.number,p.type)?"master":"",p.hasKarmicDebt&&p.karmicDebtNumber?`karmic debt ${p.karmicDebtNumber}`:""].filter(Boolean).join(" · "),body:p.meaning?.description??"",extra:this.renderReading(p.meaning,`numerology-core-${d}`)})),"numerology-cores","Core numbers")} ${l?k`<dl class="roxy-facts" part="details maturity">${this.attr(this.t("Maturity"),l.isActive?this.t("Active"):this.t("Not yet active"))} ${this.attr(this.t("Current age"),l.currentAge)} ${this.attr(this.t("Activates"),l.activationRange)}</dl>`:C} ${o?k`<section class="sub" part="section birth-day-profile"><h3>${this.t("Birth day profile")}</h3>${o.title?k`<h4>${[o.day?this.t("Day {{day}}",{day:o.day}):"",o.title].filter(Boolean).join(" · ")}</h4>`:C} ${o.description&&c?k`<p>${o.description}</p>`:C} ${this.renderReading(o,"numerology-birth-day-profile")}</section>`:C} ${s?this.renderInsights(s):C} ${i?k`<section class="sub" part="section lucky-associations"><h3>${this.t("Lucky associations")}</h3><dl class="roxy-facts">${this.attr(this.t("Day"),i.day)} ${this.attr(this.t("Element"),i.element)} ${this.attr(this.t("Ruling planet"),i.rulingPlanet)} ${this.attr(this.t("Colors"),i.colors?.join(", "))} ${this.attr(this.t("Gemstones"),i.gemstones?.join(", "))} ${this.attr(this.t("Compatible"),i.compatibleNumbers?.join(", "))} ${this.attr(this.t("Incompatible"),i.incompatibleNumbers?.join(", "))}</dl></section>`:C}</article>`}renderInsights(e){let t=e.karmicLessons,r=e.karmicDebt,s=e.personalYear,i=e.hiddenPassion,o=e.subconsciousSelf,l=e.nameLetters,c=Object.entries(t?.presentNumbers??{}),d=!this.hideReadings;return k`${t?k`<section class="sub" part="section karmic-lessons"><h3>${this.t("Karmic lessons")}</h3>${t.missingNumbers?.length?k`<ul class="roxy-chips">${t.missingNumbers.map(p=>k`<li>${this.t("Missing")} ${p}</li>`)}</ul>`:k`<p>${this.t("No numbers are missing from the birth name.")}</p>`} ${c.length>0?k`<ul class="roxy-chips">${c.map(([p,h])=>k`<li>${p} x ${h}</li>`)}</ul>`:C} ${this.renderInterpretation((t.lessons??[]).map(p=>({label:p.lesson??`Lesson ${p.number}`,aside:p.number!=null?`${p.number}`:"",body:p.description??"",extra:p.howToOvercome?k`<p><strong>${this.t("How to overcome")}.</strong> ${p.howToOvercome}</p>`:C})),"numerology-karmic-lessons","Lessons")}</section>`:C}${r?.hasKarmicDebt?k`<section class="sub" part="section karmic-debt"><h3>${this.t("Karmic debt")}</h3>${r.debtNumbers?.length?k`<ul class="roxy-chips">${r.debtNumbers.map(p=>k`<li>${this.t("Debt")} ${p}</li>`)}</ul>`:C} ${this.renderInterpretation((r.meanings??[]).map(p=>({label:`${this.t("Karmic debt")} ${p.number}`,body:p.description??"",extra:k`${p.challenge?k`<p><strong>${this.t("Challenge")}.</strong> ${p.challenge}</p>`:C}${p.resolution?k`<p><strong>${this.t("Resolution")}.</strong> ${p.resolution}</p>`:C}`})),"numerology-karmic-debt","Debts")}</section>`:C}${s?k`<section class="sub" part="section personal-year"><h3>${this.t("Personal year")}</h3><h4>${[s.personalYear!=null?`${s.personalYear}`:"",s.theme??"",s.cycle??""].filter(Boolean).join(" · ")}</h4>${s.forecast&&d?k`<p>${s.forecast}</p>`:C} ${d?this.renderLists(["Opportunities",s.opportunities],["Challenges",s.challenges]):C} ${s.advice&&d?k`<p>${s.advice}</p>`:C} ${s.personalMonth?k`<p><strong>${[s.personalMonth.personalMonth!=null?`${this.t("Personal month")} ${s.personalMonth.personalMonth}`:this.t("Personal month"),s.personalMonth.theme??""].filter(Boolean).join(" · ")}.</strong> ${d?s.personalMonth.focus??"":""}</p>`:C}</section>`:C}${e.pinnacles?.length&&d?k`<section class="sub" part="section pinnacles"><h3>${this.t("Pinnacles")}</h3>${this.renderInterpretation(e.pinnacles.map(p=>({label:[p.position!=null?`Pinnacle ${p.position}`:"Pinnacle",p.meaning?.title??""].filter(Boolean).join(" · "),aside:[p.number!=null?`${p.number}`:"",uh(p.startAge,p.endAge)].filter(Boolean).join(" · "),body:p.meaning?.description??"",extra:this.renderLists(["Opportunities",p.meaning?.opportunities],["Challenges",p.meaning?.challenges])})),"numerology-pinnacles","Life phases")}</section>`:C}${e.challenges?.length&&d?k`<section class="sub" part="section obstacle-periods"><h3>${this.t("Challenges")}</h3>${this.renderInterpretation(e.challenges.map(p=>({label:[p.position!=null?`Challenge ${p.position}`:"Challenge",p.meaning?.title??""].filter(Boolean).join(" · "),aside:[p.number!=null?`${p.number}`:"",uh(p.startAge,p.endAge)].filter(Boolean).join(" · "),body:p.meaning?.description??"",extra:k`${p.meaning?.lesson?k`<p><strong>${this.t("Lesson")}.</strong> ${p.meaning.lesson}</p>`:C}${p.meaning?.howToOvercome?k`<p><strong>${this.t("How to overcome")}.</strong> ${p.meaning.howToOvercome}</p>`:C}`})),"numerology-challenges","Obstacle periods")}</section>`:C}${i||o?k`<section class="sub" part="section name-numbers"><h3>${this.t("Name numbers")}</h3>${i?k`<div><h4>${[i.number!=null?this.t("Hidden passion {{number}}",{number:i.number}):this.t("Hidden passion"),i.title??""].filter(Boolean).join(" · ")}</h4>${i.description&&d?k`<p>${i.description}</p>`:C} ${typeof i.count=="number"?k`<p class="roxy-label">${this.t("Appears {{count}} times in the name",{count:i.count})}</p>`:C}</div>`:C} ${o?k`<div><h4>${[o.number!=null?this.t("Subconscious self {{number}}",{number:o.number}):this.t("Subconscious self"),o.title??""].filter(Boolean).join(" · ")}</h4>${o.description&&d?k`<p>${o.description}</p>`:C} ${o.uniqueNumbers?.length?k`<p class="roxy-label">${this.t("Numbers present: {{list}}",{list:qe(this.effectiveLang(),o.uniqueNumbers.map(String))})}</p>`:C}</div>`:C}</section>`:C}${l&&d?k`<section class="sub" part="section name-letters"><h3>${this.t("Name letters")}</h3>${this.renderInterpretation([{label:this.t("Cornerstone"),aside:ul(l.cornerstone?.letter,l.cornerstone?.number),body:l.cornerstone?.meaning??""},{label:this.t("Capstone"),aside:ul(l.capstone?.letter,l.capstone?.number),body:l.capstone?.meaning??""},{label:this.t("First vowel"),aside:ul(l.firstVowel?.letter),body:l.firstVowel?.meaning??""}],"numerology-name-letters","Letter analysis")}</section>`:C}`}renderHero(e,t,r,s=!1){return k`<div class="hero" part="header">${typeof t=="number"?k`<div class="numeral">${t}</div>`:C}<div><p class="roxy-label">${e}</p>${r?k`<h2>${r}</h2>`:C} ${s?k`<span class="master roxy-chip">${this.t("Master number")}</span>`:C}</div></div>`}renderReading(e,t){if(!e||this.hideReadings)return C;let r=qf.map(([s,i])=>({label:i,body:e[s]??""}));return k`${e.keywords?.length?k`<ul class="roxy-chips">${e.keywords.map(s=>k`<li>${s}</li>`)}</ul>`:C}${this.renderLists(["Strengths",e.strengths],["Challenges",e.challenges])}${this.renderInterpretation(r,t,"Guidance")}`}renderLists(...e){let t=e.filter(([,r])=>r&&r.length>0);return t.length===0?C:k`<div class="lists">${t.map(([r,s])=>k`<div><h3>${this.t(r)}</h3><ul>${(s??[]).map(i=>k`<li>${i}</li>`)}</ul></div>`)}</div>`}attr(e,t){return t==null||t===""?C:k`<div><dt>${e}</dt><dd>${t}</dd></div>`}};ur.endpoints=Ec,ur.styles=[u,M,re,j,jf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,h4,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2.5);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.master{margin-block-start:var(--roxy-space-xs)}.calc{color:var(--roxy-muted);font-family:var(--roxy-font-mono);font-size:var(--roxy-text-xs);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.cores{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));padding-block-start:var(--roxy-space-md);display:grid}.cores .item{gap:calc(var(--roxy-space-unit) / 2);font-size:var(--roxy-text-sm);display:grid}.cores .item .core-head{align-items:baseline;gap:var(--roxy-space-xs);display:flex}.cores .item .core-key{color:var(--roxy-muted);text-transform:capitalize}.cores .item strong{color:var(--roxy-accent-ink);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.cores .item .core-title{font-size:var(--roxy-text-xs)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}.lists h3{margin-block-end:var(--roxy-space-xs)}.lists ul{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.sub{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.sub p{font-size:var(--roxy-text-sm)}.roxy-facts{margin:0}.karmic{border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);padding-block-start:var(--roxy-space-md)}.karmic strong{color:var(--roxy-warning-fg);font-weight:var(--roxy-weight-bold)}`],m([Kf({type:String,reflect:!0})],ur.prototype,"type",2),ur=m([f("roxy-numerology-card")],ur);var Yf={"life-path":"Life Path",expression:"Expression","soul-urge":"Soul Urge",personality:"Personality","birth-day":"Birth Day",maturity:"Maturity",daily:"Daily Number","personal-day":"Personal Day","personal-month":"Personal month","personal-year":"Personal year",chart:"Numerology chart"};function Uf(n){return n?[n.description,n.challenge,n.resolution].filter(Boolean).join(" "):""}function io(n,a){return a==="master"||n!==void 0&&Vf.has(n)}function yl(n,a){return[n!=null?`${n}`:"",a??""].filter(Boolean).join(" · ")}function uh(n,a){return n==null?"":a==null?`ages ${n} onward`:`ages ${n} to ${a}`}function ul(n,a){return[n??"",a!=null?`${a}`:""].filter(Boolean).join(" · ")}import{css as Zf,html as ve,nothing as lt}from"lit";import{property as Wf}from"lit/decorators.js";function fl(...n){return n.filter(Boolean).join(" · ")}function xl(...n){return n.filter(Boolean).join(", ")}var fr=class extends y{constructor(){super(...arguments);this.detail="detailed"}renderData(e){let t="sunrise"in e?e:null,r="sunLongitude"in e?e:null,s=t?[["Brahma Muhurta",t.brahmaMuhurta],["Abhijit Muhurta",t.abhijitMuhurta],["Vijaya Muhurta",t.vijayaMuhurta],["Godhuli Muhurta",t.godhuliMuhurta],["Nishita Muhurta",t.nishitaMuhurta],["Pratah Sandhya",t.pratahSandhya],["Sayahna Sandhya",t.sayahnaSandhya]]:[],i=t?this.expandWindows(this.t("Amrit Kalam"),t.amritKalam):[],o=t?[["Rahu Kaal",t.rahuKaal],["Yamaganda",t.yamaganda],["Gulika",t.gulika]]:[],l=t?[...this.expandWindows(this.t("Dur Muhurta"),t.durMuhurta),...this.expandWindows(this.t("Varjyam"),t.varjyam)]:[],c=this.detail==="detailed"&&t!==null;return ve`<div class="wrap" part="card" aria-label="${this.t("Panchang")}"><header class="head" part="header"><h2>${this.t("Panchang")}</h2><span class="roxy-label">${t?R(this.effectiveLang(),t.date):""}</span> ${t?this.renderLocation(t.location):lt}</header><table part="table"><tbody>${this.limbs(e,t).map(d=>this.renderLimbRow(d))} ${t?ve`${this.renderRow(this.t("Sunrise"),Rt(this.effectiveLang(),t.sunrise))} ${this.renderRow(this.t("Sunset"),Rt(this.effectiveLang(),t.sunset))} ${this.renderRow(this.t("Moonrise"),Rt(this.effectiveLang(),t.moonrise))} ${this.renderRow(this.t("Moonset"),Rt(this.effectiveLang(),t.moonset))} ${this.renderRow(this.t("Moon sign"),this.formatRashi(t.moonSign))} ${this.renderRow(this.t("Sun sign"),this.formatRashi(t.sunSign))} ${this.renderRow(this.t("Sun nakshatra"),this.formatSunNakshatra(t.sunNakshatra))} ${this.renderRow(this.t("Hora"),this.formatHora(t.hora))}`:r?ve`${this.renderRow(this.t("Sun"),this.formatLongitude(r.sunLongitude))} ${this.renderRow(this.t("Moon"),this.formatLongitude(r.moonLongitude))}`:lt}</tbody></table>${t?this.renderTransitions(t.transitions):lt} ${c?ve`<h3 class="section" part="section auspicious">${this.t("Auspicious muhurtas")}</h3><table part="table auspicious"><tbody>${this.renderPeriodRows([...s.filter(d=>!!d[1]),...i])}</tbody></table><h3 class="section" part="section inauspicious">${this.t("Inauspicious periods")}</h3><table part="table inauspicious"><tbody>${this.renderPeriodRows([...o.filter(d=>!!d[1]),...l])} ${this.renderBhadraRow(t.bhadra)} ${this.renderPanchakaRow(t.panchaka)}</tbody></table>${this.renderBalams(t.chandrabalam,t.tarabalam)}`:lt}</div>`}limbs(e,t){let r=e.tithi,s=e.nakshatra,i=e.yoga,o=e.karana,l=[{label:this.t("Tithi"),value:xl(r?.name,r?.paksha?`${r.paksha} paksha`:void 0),meta:fl(r?.rulingPlanet?`Ruled by ${r.rulingPlanet}`:void 0,r?.deity?`Deity ${r.deity}`:void 0,r?.element,typeof r?.percent=="number"?`${we(this.effectiveLang(),r.percent,0)} elapsed`:void 0)},{label:this.t("Nakshatra"),value:xl(s?.name,typeof s?.pada=="number"?`pada ${s.pada}`:void 0),meta:fl(s?.lord?`Lord ${s.lord}`:void 0,s?.deity?`Deity ${s.deity}`:void 0,s?.symbol?`Symbol ${s.symbol}`:void 0,s?.characteristics)},{label:this.t("Yoga"),value:i?.name??"",meta:i?.characteristics??""},{label:this.t("Karana"),value:xl(o?.name,o?.type),meta:o?.characteristics??""}];return t?.vara&&l.push({label:this.t("Vara"),value:wn(t.vara.name,t.vara.sanskritName),meta:t.vara.lord?`Lord ${t.vara.lord}`:""}),l.filter(c=>!!c.value)}renderLimbRow(e){return ve`<tr><th>${e.label}</th><td>${e.value}${e.meta?ve`<small>${e.meta}</small>`:lt}</td></tr>`}renderRow(e,t){return t?ve`<tr><th>${e}</th><td>${t}</td></tr>`:lt}renderTransitions(e){return e?ve`<h3 class="section" part="section transitions">${this.t("Next transitions")}</h3><table part="table transitions"><tbody>${this.renderTransitionRow(this.t("Tithi"),e.tithi)} ${this.renderTransitionRow(this.t("Nakshatra"),e.nakshatra)} ${this.renderTransitionRow(this.t("Yoga"),e.yoga)} ${this.renderTransitionRow(this.t("Karana"),e.karana)} ${this.renderMoonSignRow(e.moonSign)}</tbody></table>`:lt}renderPeriodRows(e){return e.map(([t,r])=>{let s=ia(this.effectiveLang(),r);return s?ve`<tr><th>${t}</th><td>${s}</td></tr>`:lt})}expandWindows(e,t){return!t||t.length===0?[]:t.map((r,s)=>[t.length>1?`${e} ${s+1}`:e,r])}renderBhadraRow(e){if(!e)return lt;let t=this.formatSpan(e.startsAt,e.endsAt);return ve`<tr><th>${this.t("Bhadra (Vishti)")}</th><td>${e.active&&t?t:ve`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderPanchakaRow(e){if(!e)return lt;let t=this.formatSpan(e.startsAt,e.endsAt);return ve`<tr><th>${this.t("Panchaka")}</th><td>${e.active?ve`${e.type?this.t("{{type}} Panchaka",{type:e.type}):this.t("Panchaka")}${t?ve`<small>${t}</small>`:lt}`:ve`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderBalams(e,t){return!e&&!t?lt:ve`<h3 class="section" part="section balams">${this.t("Chandrabalam and Tarabalam")}</h3><table part="table balams"><tbody>${e?ve`<tr><th>${this.t("Favorable Moon signs")}</th><td>${this.renderChips(e.favorableRashis,"success")}</td></tr>${this.renderRow(this.t("Ashtama Chandra rashi"),e.ashtamaChandraRashi??"")}`:lt} ${t?ve`<tr><th>${this.t("Favorable birth nakshatras")}</th><td>${this.renderChips(t.favorableNakshatras,"success")}</td></tr><tr><th>${this.t("Unfavorable birth nakshatras")}</th><td>${this.renderChips(t.unfavorableNakshatras,"danger")}</td></tr>`:lt}</tbody></table>`}renderChips(e,t){return e?.length?ve`<ul class="roxy-chips">${e.map(r=>ve`<li class="roxy-chip" data-tone="${t}">${r}</li>`)}</ul>`:ve`<span class="quiet">${this.t("None")}</span>`}renderLocation(e){return e?ve`<dl class="roxy-facts">${["latitude","longitude","timezone"].map(r=>ve`<div><dt>${ae(this.effectiveLang(),r)}</dt><dd>${b(this.effectiveLang(),e[r],5)}</dd></div>`)}</dl>`:lt}clock(e){let t=this.data?.date;return t&&e.slice(0,10)!==t.slice(0,10)?V(this.effectiveLang(),e):Rt(this.effectiveLang(),e)}renderTransitionRow(e,t){if(!t?.endsAt)return lt;let r=this.clock(t.endsAt),s=t.next?typeof t.nextPada=="number"?this.t("ends {{time}} to {{next}} pada {{pada}}",{time:r,next:t.next,pada:t.nextPada}):this.t("ends {{time}} to {{next}}",{time:r,next:t.next}):this.t("ends {{time}}",{time:r});return ve`<tr><th>${e}</th><td>${s}</td></tr>`}renderMoonSignRow(e){return e?.changesAt?ve`<tr><th>${this.t("Moon sign")}</th><td>${e.next?this.t("{{sign}} until {{time}}, then {{next}}",{sign:e.current??"",time:this.clock(e.changesAt),next:e.next}):this.t("{{sign}} until {{time}}",{sign:e.current??"",time:this.clock(e.changesAt)})}</td></tr>`:lt}formatSpan(e,t){let r=ia(this.effectiveLang(),{start:e??void 0,end:t??void 0});return!r||!e||!t||e.slice(0,10)===t.slice(0,10)?r:this.t("{{range}} (ends {{date}})",{range:r,date:R(this.effectiveLang(),t)})}formatRashi(e){return wn(e?.name,e?.sanskritName)}formatSunNakshatra(e){return e?.name?fl(e.name,typeof e.pada=="number"?`pada ${e.pada}`:void 0,e.lord?`lord ${e.lord}`:void 0):""}formatHora(e){if(!e?.current)return"";let t=ia(this.effectiveLang(),e);return t?`${e.current} (${t})`:e.current}formatLongitude(e){return typeof e=="number"?Qe(e):""}};fr.endpoints=Dc,fr.styles=[u,re,Zf`.wrap{overflow:hidden}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;display:flex}h2,h3{margin:0}.head .roxy-facts{flex-basis:100%;margin:0}table{width:100%}th,td{padding-inline:var(--roxy-space-md)}th{width:38%}tbody tr:last-child :is(th,td){border-block-end:0}td small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:normal;margin-block-start:calc(var(--roxy-space-unit) / 2);display:block}.section{padding:var(--roxy-space-sm) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border)}.quiet{color:var(--roxy-muted)}.roxy-chips{margin-block-start:var(--roxy-space-xs)}`],m([Wf({type:String,reflect:!0})],fr.prototype,"detail",2),fr=m([f("roxy-panchang-table")],fr);import{css as Xf,html as Pe,nothing as Pt}from"lit";import{property as Jf}from"lit/decorators.js";var xr=class extends y{constructor(){super(...arguments);this.heading=""}renderData(e){let t=this.toViewModel(e),r=t.cols;return Pe`<div class="wrap" part="card"><header part="header"><h2>${this.heading||t.title}</h2>${t.badges.length?Pe`<ul class="roxy-chips" part="details">${t.badges.map(s=>Pe`<li>${s.label}: ${s.value}</li>`)}</ul>`:Pt}</header>${t.summary&&!this.hideReadings?Pe`<p class="summary">${t.summary}</p>`:Pt}<div class="scroll" part="table" tabindex="0" role="region" aria-label="${t.title}"><table><caption class="roxy-label">${t.title}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Position")}</th>${r.natal?Pe`<th scope="col">${this.t("Natal")}</th>`:Pt} ${r.house?Pe`<th scope="col" class="num">${this.t("House")}</th>`:Pt} ${r.motion?Pe`<th scope="col">${this.t("Motion")}</th>`:Pt} ${r.formula?Pe`<th scope="col">${this.t("Formula")}</th>`:Pt}</tr></thead><tbody>${t.rows.map(s=>this.renderRow(s,r))}</tbody></table></div>${this.renderReadings(t.rows)}</div>`}renderRow(e,t){let r=$(e.body??e.label);return Pe`<tr class="${e.isAngle?"angle":""}"><td class="body-cell">${r?Pe`<span class="glyph">${r}</span>`:Pt}${e.label}</td><td>${this.signCell(e.sign,e.degree,e.signLabel)}</td>${t.natal?Pe`<td>${e.natalLongitude!=null?this.signFromLongitude(e.natalLongitude):Pe`—`}</td>`:Pt} ${t.house?Pe`<td class="num">${e.house!=null?e.house:Pe`—`}</td>`:Pt} ${t.motion?Pe`<td>${e.speed!=null?Pe`${b(this.effectiveLang(),e.speed,3)}${this.t("°/day")}${e.isRetrograde?Pe`<span class="retro">℞</span>`:Pt}`:Pe`—`}</td>`:Pt} ${t.formula?Pe`<td class="formula">${e.formula??Pe`—`}</td>`:Pt}</tr>`}signCell(e,t,r=e){let s=N(e);return Pe`<span class="sign">${s?Pe`<span class="sg">${s}</span>`:Pt}${Kt(t)} ${r}</span>`}signFromLongitude(e){let t=Nt(e);return this.signCell(t.sign,t.degree+t.minute/60)}renderReadings(e){let t=e.filter(r=>r.interpretation).map(r=>({label:`${$(r.body??r.label)??""} ${r.label}`.trim(),aside:`${r.signLabel??r.sign} ${Kt(r.degree)}`.trim(),body:r.interpretation??""}));return this.renderInterpretation(t,"positions-readings","Readings")}toViewModel(e){if("asteroids"in e)return{title:this.t("Asteroids"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:e.asteroids.map(r=>({body:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))};if("lilith"in e)return{title:this.t("Black Moon Lilith"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:e.lilith.map(r=>({label:this.t("{{variant}} apogee",{variant:g(r,"variant",A(r.variant))}),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))};if("directed"in e)return{title:this.t("Solar arc directions"),badges:[{label:this.t("Arc"),value:`${b(this.effectiveLang(),e.solarArc,2)}°`},{label:this.t("Directed to"),value:R(this.effectiveLang(),e.targetDate)}],summary:e.summary,cols:{house:!1,motion:!1,formula:!1,natal:!0},rows:e.directed.map(r=>({body:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,natalLongitude:r.natalLongitude,interpretation:r.interpretation}))};if("lots"in e)return{title:this.t("Arabic lots"),badges:e.sect?[{label:this.t("Sect"),value:A(e.sect)}]:[],summary:e.summary,cols:{house:!1,motion:!1,formula:!0,natal:!1},rows:e.lots.map(r=>({body:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,formula:r.formula,interpretation:r.interpretation}))};let t=[];return e.ascendant&&t.push({label:this.t("Ascendant"),sign:e.ascendant.sign,signLabel:g(e.ascendant,"sign"),degree:e.ascendant.degree,isAngle:!0}),e.midheaven&&t.push({label:this.t("Midheaven"),sign:e.midheaven.sign,signLabel:g(e.midheaven,"sign"),degree:e.midheaven.degree,isAngle:!0}),{title:this.t("Secondary progressions"),badges:[{label:this.t("Progressed to"),value:R(this.effectiveLang(),e.targetDate)},{label:this.t("Elapsed"),value:this.t("{{years}} yrs",{years:b(this.effectiveLang(),e.elapsedYears,1)})}],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:[...t,...e.planets.map(r=>({body:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))]}}};xr.endpoints=Ac,xr.styles=[u,M,j,Xf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}header{gap:var(--roxy-space-sm);display:grid}.summary{font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}caption{caption-side:top;text-align:start;padding-block-end:var(--roxy-space-xs)}:is(th,td){white-space:nowrap}:is(th,td).num{text-align:end}.body-cell{font-weight:var(--roxy-weight-bold)}.body-cell .glyph{color:var(--roxy-accent-ink);margin-inline-end:var(--roxy-space-xs)}tr.angle td{color:var(--roxy-secondary)}.sign{align-items:baseline;gap:var(--roxy-space-xs);display:inline-flex}.sign .sg{color:var(--roxy-secondary)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.formula{color:var(--roxy-muted);white-space:normal}`],m([Jf({type:String})],xr.prototype,"heading",2),xr=m([f("roxy-positions-table")],xr);import{css as Qf,html as zs,nothing as gn}from"lit";var Os=class extends y{renderData(a){let e=N(a.profectedSign),t=$(a.lordOfYear),r=N(a.lordNatalPosition?.sign);return zs`<div class="wrap" part="card"><header part="header"><h2>${this.t("Annual profection")}</h2>${a.targetDate?zs`<p class="roxy-label">${this.t("For")} ${R(this.effectiveLang(),a.targetDate)}</p>`:gn}</header><div class="focus" part="details"><div class="age"><span class="n">${a.age}</span> <span class="roxy-label">${this.t("Age")}</span></div><span class="arrow">${this.t("Activates")}</span><div class="house"><span class="h">${this.t("House")} ${a.profectedHouse}</span> <span class="sign">${e?zs`<span class="sg">${e}</span>`:gn}${a.profectedSign}</span></div></div><div class="lord" part="details"><span class="roxy-label">${this.t("Lord of the year")}</span> <span class="value">${t?zs`<span class="sg" aria-hidden="true">${t}</span>`:gn}${a.lordOfYear}</span> ${a.lordNatalPosition?zs`<span class="sub">${this.t("Natal")} ${r?zs`<span class="sg" aria-hidden="true">${r}</span>`:gn}${this.t("{{sign}} · house {{house}}",{sign:a.lordNatalPosition.sign,house:a.lordNatalPosition.house})}</span>`:gn}</div>${a.interpretation&&!this.hideReadings?zs`<p class="interp">${a.interpretation}</p>`:gn}</div>`}};Os.endpoints=Pc,Os.styles=[u,Qf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}.focus{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.age,.house{gap:calc(var(--roxy-space-unit) / 2);display:grid}.age{justify-items:center}.age .n{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.arrow{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.house .h{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.house .sign{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.sg{margin-inline-end:var(--roxy-space-xs)}.lord{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-sm);display:flex}.lord .value{font-weight:var(--roxy-weight-bold)}.lord .sub{color:var(--roxy-muted)}.interp{font-size:var(--roxy-text-sm)}`],Os=m([f("roxy-profection-card")],Os);import{css as ex,html as Aa,nothing as Bn}from"lit";var xh=["name","english","title"],tx=new Set(["description","meaning","characteristics","tagline","definedMeaning","undefinedMeaning","motto"]),ax=new Set(["id","symbol",...xh]),fh=48;function rx(n){return S(n).toLowerCase().replace(/\s+/g,"-")}function sx(n){return Object.values(Qs(n)).filter(a=>typeof a=="string"||typeof a=="number").map(String).join(" · ")}var Gs=class extends y{renderData(a){let e=Qs(a),t=this.deriveTitle(e),r=typeof e.symbol=="string"?e.symbol:void 0,s=Array.isArray(e.keywords)?e.keywords.map(String):[],i=[],o=[],l=[],c=(p,h,x)=>{if(h!=null){if(Array.isArray(h)){let L=h.filter(v=>v!=null).map(v=>typeof v=="object"?sx(v):String(v)).filter(v=>v.length>0);L.length>0&&o.push([p,L,L.some(v=>v.length>fh)])}else if(typeof h=="string")tx.has(p)||h.length>fh?i.push([p,h]):l.push([p,h]);else if(typeof h=="number"||typeof h=="boolean")l.push([p,String(h)]);else if(typeof h=="object"&&x<2)for(let[L,v]of Object.entries(Qs(h)))c(`${p} ${L}`,v,x+1)}};for(let[p,h]of Object.entries(e))ax.has(p)||p==="keywords"&&Array.isArray(h)||c(p,h,0);let d=!this.hideReadings;return Aa`<article class="card" part="card" aria-label="${t}"><header class="head" part="header">${r?Aa`<span class="symbol" aria-hidden="true">${r}</span>`:Bn}<div><p class="roxy-label">${this.t("Reference")}</p><h2>${t}</h2></div></header>${s.length>0&&d?Aa`<ul class="roxy-chips">${s.map(p=>Aa`<li>${p}</li>`)}</ul>`:Bn} ${d?i.map(([p,h])=>Aa`<p class="prose"><span class="roxy-label">${ae(this.effectiveLang(),p)}</span>${h}</p>`):Bn} ${l.length>0?Aa`<div part="details"><dl class="roxy-facts">${l.map(([p,h])=>Aa`<div><dt>${ae(this.effectiveLang(),p)}</dt><dd>${h}</dd></div>`)}</dl></div>`:Bn} ${o.map(([p,h,x])=>x&&!d?Bn:Aa`<div class="list" part="section ${rx(p)}"><h3>${ae(this.effectiveLang(),p)}</h3><ul class="roxy-chips">${h.map(L=>Aa`<li>${L}</li>`)}</ul></div>`)}</article>`}deriveTitle(a){for(let r of xh)if(typeof a[r]=="string")return a[r];let e=typeof a.type=="string"?S(a.type):"",t=a.number;return t!=null?`${e} ${t}`.trim():this.t("Reference")}};Gs.endpoints=Mc,Gs.styles=[u,re,ex`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);display:flex}.symbol{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);flex:none;line-height:1}.prose .roxy-label{margin-block-end:calc(var(--roxy-space-unit) / 2);display:block}.list h3{margin-block-end:var(--roxy-space-xs)}.roxy-facts{margin:0}`],Gs=m([f("roxy-reference-card")],Gs);import{css as nx,html as ra,nothing as Hn}from"lit";import{ifDefined as ix}from"lit/directives/if-defined.js";var bh=n=>$(n)??"",Is=class extends y{renderData(a){let e=a.changes,t=["latitude","longitude"];return ra`<div class="stack" part="stack"><roxy-natal-chart heading="Relocation chart" lang="${ix(this.effectiveLang())}" exportparts="chart-controls, chart-dialog, card, header, tablist, tab, panel, chart, table, aspects, aspect-grid, element-modality, legend, details, section, patterns, pattern, readings, reading, positions, distribution, houses, strongest" ?hide-readings="${this.hideReadings}" .data="${a}"></roxy-natal-chart><section class="changes" part="card changes"><h2>${this.t("What changes at this location")}</h2>${a.relocation?ra`<dl class="roxy-facts" part="details">${t.map(r=>ra`<div><dt>${ae(this.effectiveLang(),r==="latitude"?"relocationLatitude":"relocationLongitude")}</dt><dd>${b(this.effectiveLang(),a.relocation[r],5)}</dd></div>`)}</dl>`:Hn}<div class="move" part="details">${typeof e?.distanceKm=="number"?ra`<span>${Math.round(e.distanceKm)===0?this.t("Same location as birth"):this.t("{{distance}} km {{direction}} of birthplace",{distance:P(this.effectiveLang(),e.distanceKm),direction:e.direction?I(this.effectiveLang(),"direction",A(e.direction),e.direction):""})}</span>`:Hn} ${e?ra`<span>${a.ascendant?.sign?e.ascendantSignChanged?this.t("Ascendant moves to {{sign}}",{sign:g(a.ascendant,"sign")}):this.t("Ascendant stays in {{sign}}",{sign:g(a.ascendant,"sign")}):e.ascendantSignChanged?this.t("Ascendant changes sign"):this.t("Ascendant keeps its sign")}</span>`:Hn}</div>${a.interpretation?.summary&&!this.hideReadings?ra`<p class="summary">${a.interpretation.summary}</p>`:Hn} ${e?.angularPlanets?.length?ra`<section part="section angular-planets"><h3>${this.t("Angular planets here")}</h3><ul class="roxy-chips">${ii(e,"angularPlanets").map(({value:r,label:s})=>ra`<li>${bh(r)} ${s}</li>`)}</ul></section>`:Hn}<section part="section house-changes"><h3>${this.t("Planets that change house")}</h3>${e?.planetsChangedHouse?.length?ra`<ul class="moves-list">${e.planetsChangedHouse.map(r=>ra`<li>${bh(r.planet)} ${this.t("{{planet}}: house {{from}} to {{to}}",{planet:g(r,"planet"),from:r.natalHouse,to:r.relocatedHouse})}</li>`)}</ul>`:ra`<p class="empty-note">${this.t("No planet changes house at this location.")}</p>`}</section></section></div>`}};Is.endpoints=_c,Is.styles=[u,re,nx`.stack{gap:var(--roxy-space-md);display:grid}.changes{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.changes section{gap:var(--roxy-space-xs);display:grid}.move{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.summary,.moves-list{font-size:var(--roxy-text-sm)}.moves-list{gap:calc(var(--roxy-space-unit) / 2);margin:0;padding:0;list-style:none;display:grid}.empty-note{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`],Is=m([f("roxy-relocation-wheel")],Is);import{css as ox,html as yn,nothing as oo}from"lit";var bl=[{key:"sthanaBala",source:"Sthana",color:"var(--roxy-info)"},{key:"digBala",source:"Dig",color:"var(--roxy-success)"},{key:"kalaBala",source:"Kala",color:"var(--roxy-warning)"},{key:"chestaBala",source:"Chesta",color:"var(--roxy-accent)"},{key:"naisargikaBala",source:"Naisargika",color:"var(--roxy-secondary)"},{key:"drikBala",source:"Drik",color:"var(--roxy-danger)"}],Fs=class extends y{renderData(a){if(!a.planets?.length)return this.renderEmpty();let e=[...a.planets].sort((t,r)=>t.relativeRank-r.relativeRank);return yn`<div class="wrap" part="card" aria-label="${this.t("Shadbala planetary strength")}"><div class="head" part="header"><h2 class="title">${this.t("Shadbala")}</h2><p class="subtitle">${this.t("{{count}} planets ranked by strength",{count:e.length})}</p>${X(this.effectiveLang(),a.frame,this.translator)}</div><div role="list" part="chart bars" aria-label="${this.t("Planet strength bars")}">${e.map(t=>this.renderPlanetRow(t))}</div><div class="legend" part="legend" aria-label="${this.t("Strength component legend")}">${bl.map(t=>yn`<div class="legend-row"><span class="legend-swatch" style="background:${t.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(t.source)})}</div>`)}</div><p class="footnote" part="legend">${this.t("Ishta Phala is the capacity to give benefic results, Kashta Phala the capacity to give malefic ones. Both are in virupas and are read together, since a planet can be strong and still deliver hardship.")}</p></div>`}renderPlanetRow(a){let e=$(a.planet)??"",t=bl.map(c=>Math.max(0,a[c.key])),r=t.reduce((c,d)=>c+d,0),s=typeof a.strengthRatio=="number"&&a.strengthRatio>=1,i=s?"adequacy-badge--adequate":"adequacy-badge--weak",o=s?this.t("Adequate"):this.t("Weak"),l=b(this.effectiveLang(),a.totalRupas,2)&&b(this.effectiveLang(),a.minRequired,2)?`${b(this.effectiveLang(),a.totalRupas,2)} / ${b(this.effectiveLang(),a.minRequired,2)} R`:"";return yn`<div class="planet-row" role="listitem" aria-label="${this.t("{{planet}} Shadbala",{planet:a.planet})}"><div class="planet-label"><span class="glyph" aria-hidden="true">${e}</span> ${a.planet} <span class="rank-badge" aria-label="${this.t("rank {{n}}",{n:a.relativeRank})}">#${a.relativeRank}</span></div><div class="bar-wrap"><div class="bar" role="img" aria-label="${this.t("Strength components for {{planet}}",{planet:a.planet})}">${r>0?bl.map((c,d)=>{let p=t[d];if(p<=0)return oo;let h=p/r*100;return yn`<div class="bar-segment" style="flex-grow:${h};background:${c.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(c.source),value:b(this.effectiveLang(),p,1)})}"></div>`}):oo}</div>${this.renderPhala(a)}</div><div class="pills">${l?yn`<span class="rupas-label">${l}</span>`:oo} <span class="${`adequacy-badge ${i}`}">${o}</span></div></div>`}renderPhala(a){let e=typeof a.ishtaPhala=="number"?a.ishtaPhala:0,t=typeof a.kashtaPhala=="number"?a.kashtaPhala:0;if(e+t<=0)return oo;let r=b(this.effectiveLang(),e,1)||"0",s=b(this.effectiveLang(),t,1)||"0";return yn`<div class="phala" role="img" aria-label="${this.t("Ishta Phala {{ishta}}, Kashta Phala {{kashta}} virupas",{ishta:r,kashta:s})}"><span class="phala-ishta" style="flex-grow:${e}"></span> <span class="phala-kashta" style="flex-grow:${t}"></span></div><div class="phala-label"><span>${this.t("Ishta {{value}}",{value:r})}</span> <span>${this.t("Kashta {{value}}",{value:s})}</span></div>`}};Fs.endpoints=Nc,Fs.styles=[u,G,ox`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.subtitle,.footnote{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.planet-row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:14ch minmax(0,1fr) auto;display:grid}.planet-row:last-of-type{border-block-end:0}.planet-label{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);display:flex}.glyph{font-size:var(--roxy-text-base);line-height:1}.bar-wrap,.pills{gap:var(--roxy-space-xs);flex-direction:column;display:flex}.pills{align-items:flex-end}.bar{border-radius:var(--roxy-radius-sm);background:var(--roxy-border);block-size:.5lh;display:flex;overflow:hidden}.bar-segment{height:100%;transition:flex-grow var(--roxy-motion-duration) var(--roxy-motion-easing)}.rupas-label{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;color:var(--roxy-muted);white-space:nowrap}.phala{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.25lh;display:flex;overflow:hidden}.phala-ishta{background:var(--roxy-success)}.phala-kashta{background:var(--roxy-danger)}.phala-label{justify-content:space-between;gap:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);font-variant-numeric:tabular-nums;display:flex}.footnote{font-size:var(--roxy-text-xs);color:var(--roxy-muted)}.adequacy-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.adequacy-badge--adequate{color:var(--roxy-success-fg)}.adequacy-badge--weak{color:var(--roxy-danger-fg)}.rank-badge{font-size:var(--roxy-text-xs);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.legend{gap:var(--roxy-space-sm) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);flex-wrap:wrap;padding-block-start:var(--roxy-space-sm);display:flex}.legend-row{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-xs);color:var(--roxy-muted);display:flex}.legend-swatch{aspect-ratio:1;border-radius:var(--roxy-radius-sm);flex-shrink:0;block-size:.6lh;display:inline-block}@container (width<=480px){.planet-row{grid-template-rows:auto auto;grid-template-columns:12ch minmax(0,1fr)}.pills{flex-direction:row;grid-column:1/-1;justify-content:flex-start;align-items:center}}`],Fs=m([f("roxy-shadbala-table")],Fs);import{css as lx,html as K,nothing as ge,svg as br}from"lit";function vh(n){let a=n?.ascendant;if(!a)return;let e=Re.findIndex(t=>t.toLowerCase()===a.sign.toLowerCase());return e<0?void 0:e*30+a.degree}var cx=12,Ll=680,J=Ll/2,lo=204,dx=186,Lh=160,$h=258,px=212,vl=224,co=86,wh={glyph:18,degree:10},hx=1.3,mx=1.85,gx=1.25,yx=.95,ux=.9,kh=8,Sh=4,Bs=class extends y{constructor(){super(...arguments);this.viewport=new Ce(this);this.type=new yr(this,{glyph:[".p1",wh.glyph],degree:[".planet-deg",wh.degree]})}renderData(e){let{person1:t,person2:r,compatibilityScore:s,analysis:i}=e,o=e.interAspects??[],l=t?.planets??[],c=r?.planets??[],d=typeof s=="number"?Math.round(s):void 0,p=i?.overall,h=i?.strengths??[],x=i?.challenges??[],L=l.length>0&&c.length>0,v=[...o].sort((O,te)=>(te.strength??0)-(O.strength??0)),w=v.slice(0,cx);return K`<div class="wrap" part="card" aria-label="${this.t("Synastry compatibility chart")}"><div class="head" part="header"><h2>${this.t("Synastry")}</h2>${typeof d=="number"?K`<span class="score" aria-label="${this.t("Score {{score}} of 100",{score:d})}">${d} / 100</span>`:ge}</div>${this.renderPeople(t,r)} ${L?K`${this.viewport.renderChartViewport(K`<svg viewBox="0 0 ${Ll} ${Ll}" part="chart" role="img" aria-label="${this.t("Dual chart wheel comparing two natal charts")}"><title>${this.t("Synastry dual wheel")}</title><circle class="wheel-line" cx="${J}" cy="${J}" r="${lo}" stroke-width="1.5"/><circle class="wheel-line" cx="${J}" cy="${J}" r="${lo-32}" stroke-width="0.8"/><circle class="wheel-line" cx="${J}" cy="${J}" r="${co}" stroke-width="0.6"/>${this.renderSpokes()} ${this.renderSigns()} ${this.renderInterAspectLines(l,c,o)} ${this.renderRing(l,Lh,(O,te,We)=>Lh-La(O,te,We,la),"p1",1)} ${this.renderRing(c,$h,(O,te,We)=>$h+La(O,te,We,la),"p2",2)} ${this.renderAscendants(e)}</svg>`,this.t("Synastry dual wheel"),this.translator)}<div class="legend" part="legend"><span><span class="person-dot p1"></span>${this.t("Person 1")}</span> <span><span class="person-dot p2"></span>${this.t("Person 2")}</span> <span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span> <span>${this.t("Sign sectors, not houses")}</span></div>`:K`<p role="status">${this.t("Synastry response missing planet positions.")} ${this.t("A current {{endpoint}} response carries {{first}} and {{second}}, and the inter-aspect readings below still work without them.",{endpoint:"/astrology/synastry",first:"person1.planets",second:"person2.planets"})}</p>`} ${this.renderOverlay(t,r)} ${this.renderSummaryCounts(e.summary)} ${p&&!this.hideReadings?K`<p class="summary">${p}</p>`:ge} ${w.length>0?K`<section class="block" part="section inter-aspects"><h3>${this.t("Inter-aspects")}</h3>${w.map((O,te)=>this.renderAspectCard(O,te))}</section>`:ge} ${v.length>w.length?this.renderCatalog(v):ge} ${!this.hideReadings&&(h.length>0||x.length>0)?K`<div class="lists" part="section strengths-challenges">${h.length?K`<div><h3>${this.t("Strengths")}</h3><ul>${h.map(O=>K`<li>${O}</li>`)}</ul></div>`:ge} ${x.length?K`<div><h3>${this.t("Challenges")}</h3><ul>${x.map(O=>K`<li>${O}</li>`)}</ul></div>`:ge}</div>`:ge}</div>`}renderPeople(e,t){let r=(i,o)=>{if(!i)return ge;let l=i.ascendant,d=[["Sun",i.sunSign??"",g(i,"sunSign")],["Moon",i.moonSign??"",g(i,"moonSign")],["ASC",l?.sign??"",l?`${g(l,"sign")} ${Kt(l.degree)}`:""]].filter(([,,p])=>p);return d.length===0?ge:K`<div class="person"><span class="person-name"><span class="person-dot p${o}" aria-hidden="true"></span>${i.name||this.t("Person {{n}}",{n:o})}</span><div class="big-three">${d.map(([p,h,x])=>K`<span><span class="roxy-label">${this.t(p)}</span> <span aria-hidden="true">${N(h)??""}</span> ${x}</span>`)}</div></div>`},s=[r(e,1),r(t,2)].filter(i=>i!==ge);return s.length===0?ge:K`<div class="people" part="details">${s}</div>`}renderOverlay(e,t){if(!e?.planets?.length||!t?.planets?.length)return ge;let r=(o,l)=>o?.name||this.t("Person {{n}}",{n:l}),s=r(e,1),i=r(t,2);return K`<section class="block" part="section house-overlay"><h3>${this.t("Houses")}</h3>${this.renderOverlayTable(e.planets,s,i,1)} ${this.renderOverlayTable(t.planets,i,s,2)}</section>`}renderOverlayTable(e,t,r,s){let i=e.filter(l=>typeof l.houseInOtherChart=="number");if(i.length===0)return ge;let o=`overlay-${s}`;return K`<div class="overlay-dir"><h4 id="${o}"><span class="person-dot p${s}" aria-hidden="true"></span>${this.t("{{first}} in the houses of {{second}}",{first:t,second:r})}</h4><div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="${o}"><table aria-labelledby="${o}"><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Own house")}</th></tr></thead><tbody>${i.map(l=>K`<tr><td><span aria-hidden="true">${$(l.name)??""}</span> ${g(l,"name")}${l.isRetrograde?K`<span class="retro" title="${this.t("retrograde")}">℞</span>`:ge}</td><td><span aria-hidden="true">${N(l.sign)??""}</span> ${g(l,"sign")}</td><td>${Kt(l.degree)}</td><td class="overlay-house">${l.houseInOtherChart}</td><td class="own-house">${l.house??""}</td></tr>`)}</tbody></table></div></div>`}renderSummaryCounts(e){if(!e||typeof e!="object")return ge;let t=Object.entries(e.byType??{}).sort((r,s)=>s[1]-r[1]);return typeof e.total!="number"&&t.length===0?ge:K`<p class="counts" part="details" role="region" aria-label="${this.t("Inter-aspect summary")}">${typeof e.total=="number"?K`<span>${this.t("Total")}: ${e.total}</span>`:ge} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([r,s])=>K`<span>${Me({type:r})}: ${s}</span>`)}</p>`}renderAspectCard(e,t){let r=$(e.planet1)??"",s=$(e.planet2)??"",i=e.meaning,o=K`<span class="interp-lead"><span aria-hidden="true" class="glyph">${r}</span>${g(e,"planet1")} <span class="asp-name ${Je(e)}">${g(e,"type",Me(e))}</span> <span aria-hidden="true" class="glyph">${s}</span>${g(e,"planet2")}</span>`,l=K`<span class="interp-aside"><small>${this.t("orb {{orb}}° · str {{strength}}",{orb:b(this.effectiveLang(),e.orb,2),strength:b(this.effectiveLang(),e.strength,0)})}</small></span>`;return this.hideReadings||!i?.relationshipContext&&!i?.description?.short&&!i?.description?.long&&!i?.keywords?.length?K`<div class="interp-card" part="reading"><div class="static-head">${o}${l}</div></div>`:K`<details class="interp-card" part="reading" name="synastry-aspects" ?open="${t===0}"><summary>${o}${H()}${l}</summary>${this.renderAspectMeaning(i)}</details>`}renderAspectMeaning(e){return K`<div class="interp-body">${e.relationshipContext?K`<p><span class="context">${this.t("In this pairing")}</span> ${e.relationshipContext}</p>`:ge} ${e.description?.short?K`<p>${e.description.short}</p>`:ge} ${e.description?.long&&e.description.long!==e.description.short?K`<p>${e.description.long}</p>`:ge} ${Pr(e.keywords)}</div>`}renderCatalog(e){return K`<details class="catalog" part="section aspects inter-aspects"><summary>${H()} ${this.t("All {{count}} inter-aspects",{count:e.length})}</summary><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Inter-aspects")}">${this.renderAspects(e)}</div></details>`}toAngle(e){return 180+(vh(this.data?.person1)??0)-e}renderSpokes(){return Array.from({length:12},(e,t)=>{let r=this.toAngle(t*30),s=T(J,J,co,r),i=T(J,J,lo,r);return br`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} stroke-width="0.6" />`})}renderSigns(){return Re.map((e,t)=>{let r=this.toAngle(t*30+15),s=T(J,J,dx,r);return br`<text class="sign" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${N(e)}</text>`})}renderRing(e,t,r,s,i){let o={width:hx*this.type.size.glyph,height:yx*this.type.size.glyph},l=p=>({width:(mx+(p.isRetrograde===!0?gx:0))*this.type.size.degree,height:ux*this.type.size.degree}),c=Et(o.width,t);return zt(e,p=>p.longitude,(p,h)=>Math.max(c,Et((l(p).width+l(h).width)/2,r(90,o,l(p))))).map(({item:p,longitude:h,displayLongitude:x})=>{let L=this.toAngle(x),v=T(J,J,t,L),w=T(J,J,r(L,o,l(p)),L),O=$(p.name)??g(p,"name"),te=p.isRetrograde===!0,We=typeof p.house=="number"?` · ${this.t("House {{n}}",{n:p.house})}`:"",Ma=`${g(p,"name")}${te?` ${this.t("retrograde")}`:""} - ${jt(h)} ${g(p,"sign")}${We}`,Cr=Math.abs(x-h)>.5,Tr=T(J,J,t+(i===1?kh:-kh),this.toAngle(h)),Er=T(J,J,t+(i===1?Sh:-Sh),L);return br`<g>
110
+ `}renderSpokes(){let e=this.data?.houses??[];return(this.hasCusps?e.map(r=>r.longitude):Array.from({length:12},(r,s)=>this.getAscendant()+s*30)).map(r=>{let s=this.toAngle(r),i=T(_,_,In,s),o=T(_,_,mn,s);return Ht`<line class="wheel-line" x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width="0.8" />`})}renderSigns(){return Re.map((e,t)=>{let r=this.toAngle(t*30+15),s=T(_,_,hl,r);return Ht`<text class="sign-glyph" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${N(e)??""}</text>`})}renderHouseNumbers(){let e=this.data?.houses??[];if(this.hasCusps)return e.map((r,s)=>{let i=e[(s+1)%12],o=pi(r.longitude,i?i.longitude:r.longitude+30),l=T(_,_,In-12,this.toAngle(o));return Ht`<text class="house-num" x=${l.x} y=${l.y} text-anchor="middle" dominant-baseline="central">${r.number}</text>`});let t=this.getAscendant();return Array.from({length:12},(r,s)=>{let i=this.toAngle(t+s*30+15),o=T(_,_,In-12,i),l=s+1;return Ht`<text class="house-num" x=${o.x} y=${o.y} text-anchor="middle" dominant-baseline="central">${l}</text>`})}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let r=this.toAngle(t),s=t%30===0,i=s?hl-14:mn-5,o=T(_,_,i,r),l=T(_,_,mn,r);e.push(Ht`<line class=${s?"tick tick-major":"tick"} x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} stroke-width=${s?1:.5} />`)}return e}renderCuspDegrees(){let e=this.data?.houses??[];return this.hasCusps?e.map(t=>{let r=this.toAngle(t.longitude),s=T(_,_,In+9,r);return Ht`<text class="cusp-deg" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${jt(t.longitude)}</text>`}):ce}renderPlanets(e){let t=this.type.size.degree>gl.degree,r=zf*this.type.size.glyph,s={width:r,height:r},i=x=>({width:((t?Gf:Of)+(x?If:0))*this.type.size.degree,height:Ff*this.type.size.degree}),o=(x,L,v)=>{let w=i(x.isRetrograde===!0),O=Fn-La(L,s,w,la);return v===0?O:Math.min(O,Math.max(O-Hf,io+la+Od(L,w)))},l=Et(r,Fn),c=i(!0),d=Math.max(l,Et(c.width,Fn-La(90,s,c,la))/2),p=zt(e,x=>x.longitude,d),h=Gd(p,({item:x,displayLongitude:L},v)=>{let w=this.toAngle(L);return{...T(_,_,o(x,w,v),w),...i(x.isRetrograde===!0)}});return p.map((x,L)=>{let{item:v,longitude:w,displayLongitude:O}=x,te=this.toAngle(w),We=this.toAngle(O),Ma=T(_,_,Fn,We),Cr=T(_,_,o(v,We,h[L]??0),We),Tr=T(_,_,mn-4,te),Er=T(_,_,Fn+8,We),vn=g(v,"name"),Yn=$(v.name)??vn,Al=v.isRetrograde===!0,Pl=jt(v.longitude),jh=t?`${Nt(v.longitude).degree}°`:Pl,Kh=Math.abs(O-w)>.5;return Ht`<g>
111
+ ${Kh?Ht`<line class="planet-leader" x1=${Tr.x} y1=${Tr.y} x2=${Er.x} y2=${Er.y} />`:ce}
112
+ <text class="planet-glyph" x=${Ma.x} y=${Ma.y} text-anchor="middle" dominant-baseline="central"><title>${vn}${Al?` ${this.t("retrograde")}`:""} - ${Pl} ${g(v,"sign")}</title>${Yn}</text>
113
+ <text class="planet-deg" x=${Cr.x} y=${Cr.y} text-anchor="middle" dominant-baseline="central">${jh}${Al?Ht`<tspan class="retro"> ℞</tspan>`:ce}</text>
114
+ </g>`})}renderPositionDetails(e){return z`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><roxy-western-planets-table bare lang="${yh(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${e}"></roxy-western-planets-table></details>`}renderDetails(){let e=this.data?.summary,t=this.data?.aspectsInterpretation;if(!e&&!t)return ce;let r=oi(e,"retrogradePlanets");return z`<div class="facts" part="details">${e?.dominantElement||e?.dominantModality?z`<ul class="roxy-chips">${e.dominantElement?z`<li>${this.t("Dominant element")}: ${g(e,"dominantElement")}</li>`:ce} ${e.dominantModality?z`<li>${this.t("Dominant modality")}: ${g(e,"dominantModality")}</li>`:ce}</ul>`:ce} ${t?z`<p class="counts"><span class="harmonious">${this.t("Harmonious: {{count}}",{count:t.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:t.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:t.neutral})}</span></p>`:ce} ${r.length>0?z`<ul class="roxy-chips">${r.map(({value:s,label:i})=>{let o=$(s)??"";return z`<li>${o} ${i} ℞</li>`})}</ul>`:ce} ${t?.summary&&!this.hideReadings?z`<p>${t.summary}</p>`:ce} ${this.renderElementModalityGrid()}</div>`}renderElementModalityGrid(){let e=this.getPlanets();if(e.length===0)return ce;let t=["Fire","Earth","Air","Water"],r=["Cardinal","Fixed","Mutable"],s={Fire:this.t("Fire"),Earth:this.t("Earth"),Air:this.t("Air"),Water:this.t("Water")},i={Cardinal:{abbr:this.t("Car"),full:this.t("Cardinal")},Fixed:{abbr:this.t("Fix"),full:this.t("Fixed")},Mutable:{abbr:this.t("Mut"),full:this.t("Mutable")}},o=Re,l=this.data?.summary,c={};for(let L of t)c[L]={Cardinal:[],Fixed:[],Mutable:[]};let d=0;for(let L of e){let v=o.indexOf(A(L.sign??""));if(v<0)continue;let w=t[v%4],O=r[v%3],te=$(L.name)??g(L,"name");c[w]?.[O]?.push(te),d++}if(d===0)return ce;let p=L=>t.reduce((v,w)=>v+(c[w]?.[L]?.length??0),0),h=[...Object.entries(l?.elementDistribution??{}).map(([L,v])=>({label:s[A(L)]??L,count:v})),...Object.entries(l?.modalityDistribution??{}).map(([L,v])=>({label:i[A(L)]?.full??L,count:v}))],x=Object.values(l?.elementDistribution??{}).reduce((L,v)=>L+v,0);return z`${h.length?z`<section class="block distribution" part="section distribution"><h3>${this.t("Element and modality distribution")}</h3><p class="counts"><span class="roxy-label">${this.t("{{count}} planets",{count:x})}</span> ${h.map(({label:L,count:v})=>z`<span>${L}: ${b(this.effectiveLang(),v,0)}</span>`)}</p></section>`:ce}<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Element and modality distribution")}"><table class="em-grid" part="table element-modality" aria-label="${this.t("Element and modality distribution")}"><caption class="roxy-label">${this.t("All {{count}} bodies in the chart, placed by sign",{count:d})}</caption><thead><tr><td></td>${r.map(L=>z`<th scope="col" title="${i[L]?.full??L}">${i[L]?.abbr??L}</th>`)}<th scope="col">${this.t("Total")}</th></tr></thead><tbody>${t.map(L=>{let v=r.reduce((w,O)=>w+(c[L]?.[O]?.length??0),0);return z`<tr><th scope="row">${s[L]??L}</th>${r.map(w=>z`<td>${(c[L]?.[w]??[]).join(" ")}</td>`)}<td class="em-total">${v}</td></tr>`})}<tr><th scope="row">${this.t("Total")}</th>${r.map(L=>z`<td class="em-total">${p(L)}</td>`)}<td class="em-total">${d}</td></tr></tbody></table></div>`}renderPatterns(){let e=this.data?.patterns??[];if(e.length===0)return ce;let t=[...e].sort((r,s)=>(uh[r.kind]??9)-(uh[s.kind]??9)||(s.tightness??0)-(r.tightness??0));return z`<section class="block patterns" part="section patterns"><h3>${this.t("Chart patterns")}</h3>${t.map(r=>this.renderPattern(r))}</section>`}renderPattern(e){let t=e.planets??[],r=e.apex?[...t].sort((s,i)=>+(i===e.apex)-+(s===e.apex)):t;return z`<div class="pattern" part="pattern"><div class="pattern-head"><span class="pattern-name">${e.name}</span> ${e.element?z`<span class="roxy-chip">${e.element}</span>`:ce} ${e.modality?z`<span class="roxy-chip">${e.modality}</span>`:ce} ${e.dissociate?z`<span class="roxy-chip" title="${this.t("Out of sign: one or more planets sit outside the pattern element or modality, so the theme holds but runs weaker.")}">${this.t("Dissociate")}</span>`:ce} ${typeof e.tightness=="number"?z`<span class="pattern-tight roxy-label">${this.t("{{percent}} tight",{percent:we(this.effectiveLang(),e.tightness,0)})}</span>`:ce}</div><ul class="roxy-chips">${r.map(s=>{let i=$(s),o=!!e.apex&&s===e.apex;return z`<li class="${o?"roxy-chip apex":"roxy-chip"}">${i?z`<span aria-hidden="true">${i}</span>`:ce}${s}${o?z`<span>${this.t("apex")}</span>`:ce}</li>`})}</ul>${e.interpretation&&!this.hideReadings?z`<p class="pattern-interp">${e.interpretation}</p>`:ce}</div>`}renderAspectDetails(e){return e.length===0?ce:z`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${yh(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}renderInterpretations(){let e=this.getPlanets().filter(t=>t.interpretation).map(t=>{let r=t.interpretation,s=$(t.name)??"",i=g(t,"name"),o=r.summary||r.detailed||"",l=r.summary?r.detailed:void 0;return{label:`${s} ${i}`.trim(),aside:`${g(t,"sign")} ${jt(t.longitude)}`,body:o,extra:z`${l?z`<p>${l}</p>`:ce} ${Pr(r.keywords)}`}});return this.renderInterpretation(e,"natal-planet-readings","Planet readings")}renderAspects(e,t){let r=new Map;for(let s of e){if(typeof s.longitude!="number")continue;let i=St(s.name);i&&r.set(i,s.longitude)}return t.filter(ja).map(s=>{let i=r.get(St(s.planet1)),o=r.get(St(s.planet2));if(i===void 0||o===void 0)return ce;let l=T(_,_,io-2,this.toAngle(i)),c=T(_,_,io-2,this.toAngle(o)),d=Ct(s),p=b(this.effectiveLang(),s.orb,1);return Ht`<line class=${`aspect ${Je(s)}`} style=${rn(s)} x1=${l.x} y1=${l.y} x2=${c.x} y2=${c.y}><title>${g(s,"planet1")} ${g(s,"type",d)} ${g(s,"planet2")}${p?` (${this.t("Orb")} ${p}°)`:""}</title></line>`})}};Da.endpoints=Ec,Da.styles=[u,Ge,an,Xe,M,j,Pf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}h2{overflow-wrap:anywhere}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,42.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line,.tick{fill:none;stroke:var(--roxy-border)}.tick-major{stroke:var(--roxy-secondary)}.sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}.planet-glyph{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .875);font-weight:var(--roxy-weight-bold)}.planet-deg{fill:var(--roxy-fg);font-size:calc(var(--roxy-text-base) * .4375)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.planet-leader{stroke:var(--roxy-accent);stroke-width:.5px;opacity:.55}.house-num{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .5625)}.cusp-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .375)}.angle-marker{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .8125);font-weight:var(--roxy-weight-bold)}.angle-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}@container (width<=480px){.sign-glyph,.planet-glyph{font-size:calc(var(--roxy-text-base) * 1.5)}.planet-deg{font-size:calc(var(--roxy-text-base) * .8125)}.house-num{font-size:calc(var(--roxy-text-base) * .75)}}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.legend .caveat{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}.aspect-grid{margin:0 auto}.aspect-grid :is(th,td){inline-size:var(--roxy-space-lg);block-size:var(--roxy-space-lg);text-align:center;vertical-align:middle;border:1px solid var(--roxy-border);padding:0}.aspect-grid .asp{color:var(--_aspect-ink,var(--roxy-muted))}.facts,.distribution,.patterns{gap:var(--roxy-space-sm);display:grid}.em-grid{width:100%}.em-grid caption{caption-side:top;text-align:start}.em-grid :is(th,td){text-align:center}.em-grid th[scope=row]{text-align:start}.em-grid td{color:var(--roxy-accent-ink)}.em-grid .em-total{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.pattern{gap:var(--roxy-space-xs);padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);display:grid}.pattern-head{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.pattern-name{font-weight:var(--roxy-weight-bold)}.pattern-tight{font-variant-numeric:tabular-nums;margin-inline-start:auto}.roxy-chip.apex{color:var(--roxy-fg);border-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.pattern-interp{font-size:var(--roxy-text-sm)}`],m([Mf({type:String})],Da.prototype,"heading",2),m([_f()],Da.prototype,"view",2),Da=m([f("roxy-natal-chart")],Da);import{css as jf,html as k,nothing as C}from"lit";import{property as Kf}from"lit/decorators.js";var Vf=new Set([11,22,33]),qf=[["career","Career"],["relationships","Relationships"],["spirituality","Spirituality"]],ur=class extends y{constructor(){super(...arguments);this.type="life-path"}renderData(e){let t=this.t(Yf[this.type]??this.type);return"coreNumbers"in e?this.renderChart(e,t):"personalDay"in e?this.renderPersonalDay(e,t):"personalMonth"in e?this.renderPersonalMonth(e,t):"personalYear"in e?this.renderPersonalYear(e,t):"dailyMessage"in e?this.renderDailyNumber(e,t):this.renderNumberCard(e,t)}renderNumberCard(e,t){let r=!this.hideReadings;return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,oo(e.number,e.type))} ${e.meaning?.description&&r?k`<p>${e.meaning.description}</p>`:C} ${e.calculation?k`<pre class="calc" part="calculation">${e.calculation}</pre>`:C} ${e.hasKarmicDebt&&e.karmicDebtNumber?k`<div class="karmic" part="section karmic-debt"><strong>${this.t("Karmic debt")} ${e.karmicDebtNumber}.</strong> ${r?Uf(e.karmicDebtMeaning):""}</div>`:C} ${this.renderReading(e.meaning,"numerology-guidance")}</article>`}renderDailyNumber(e,t){let r=!this.hideReadings;return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.number,e.meaning?.title,oo(e.number,e.type))} ${e.dailyMessage&&r?k`<p>${e.dailyMessage}</p>`:C} ${e.meaning?.description&&r?k`<p>${e.meaning.description}</p>`:C} ${this.renderReading(e.meaning,"numerology-daily-guidance")}</article>`}renderPersonalDay(e,t){return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalDay,e.theme)} ${e.guidance&&!this.hideReadings?k`<p>${e.guidance}</p>`:C}<dl class="roxy-facts" part="details">${this.attr(this.t("Date"),R(this.effectiveLang(),e.targetDate))} ${this.attr(this.t("Personal month"),ul(e.personalMonth,e.personalMonthTheme))} ${this.attr(this.t("Personal year"),ul(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalMonth(e,t){return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalMonth,e.theme)} ${e.focus&&!this.hideReadings?k`<p>${e.focus}</p>`:C}<dl class="roxy-facts" part="details">${this.attr(this.t("Calendar month"),e.calendarMonth)} ${this.attr(this.t("Personal year"),ul(e.personalYear,e.personalYearTheme))}</dl></article>`}renderPersonalYear(e,t){let r=!this.hideReadings;return k`<article class="card" part="card" aria-label="${t}">${this.renderHero(t,e.personalYear,e.theme)} ${e.cycle?k`<p class="roxy-label">${e.cycle}</p>`:C} ${e.forecast&&r?k`<p>${e.forecast}</p>`:C} ${r?this.renderLists(["Opportunities",e.opportunities],["Challenges",e.challenges]):C} ${e.advice&&r?k`<p>${e.advice}</p>`:C}</article>`}renderChart(e,t){let r=Object.entries(e.coreNumbers??{}).filter(([,d])=>d),s=e.additionalInsights,i=e.luckyAssociations,o=e.birthDayProfile,l=e.maturityStatus,c=!this.hideReadings;return k`<article class="card" part="card" aria-label="${t}"><div part="header"><p class="roxy-label">${t}</p>${e.profile?.name?k`<h2>${e.profile.name}</h2>`:C} ${e.profile?.birthdate?k`<p class="roxy-label">${R(this.effectiveLang(),e.profile.birthdate)}</p>`:C}</div>${e.summary&&c?k`<p>${e.summary}</p>`:C} ${r.length>0?k`<div class="cores" part="details cores">${r.map(([d,p])=>k`<div class="item"><div class="core-head"><span class="core-key">${S(d)}</span> <strong>${p.number??""}</strong></div>${p.meaning?.title?k`<span class="core-title">${p.meaning.title}</span>`:C} ${oo(p.number,p.type)?k`<span class="master roxy-chip">${this.t("Master")} ${p.number}</span>`:C}</div>`)}</div>`:C} ${this.renderInterpretation(r.map(([d,p])=>({label:S(d),aside:[p.number!=null?`${p.number}`:"",oo(p.number,p.type)?"master":"",p.hasKarmicDebt&&p.karmicDebtNumber?`karmic debt ${p.karmicDebtNumber}`:""].filter(Boolean).join(" · "),body:p.meaning?.description??"",extra:this.renderReading(p.meaning,`numerology-core-${d}`)})),"numerology-cores","Core numbers")} ${l?k`<dl class="roxy-facts" part="details maturity">${this.attr(this.t("Maturity"),l.isActive?this.t("Active"):this.t("Not yet active"))} ${this.attr(this.t("Current age"),l.currentAge)} ${this.attr(this.t("Activates"),l.activationRange)}</dl>`:C} ${o?k`<section class="sub" part="section birth-day-profile"><h3>${this.t("Birth day profile")}</h3>${o.title?k`<h4>${[o.day?this.t("Day {{day}}",{day:o.day}):"",o.title].filter(Boolean).join(" · ")}</h4>`:C} ${o.description&&c?k`<p>${o.description}</p>`:C} ${this.renderReading(o,"numerology-birth-day-profile")}</section>`:C} ${s?this.renderInsights(s):C} ${i?k`<section class="sub" part="section lucky-associations"><h3>${this.t("Lucky associations")}</h3><dl class="roxy-facts">${this.attr(this.t("Day"),i.day)} ${this.attr(this.t("Element"),i.element)} ${this.attr(this.t("Ruling planet"),i.rulingPlanet)} ${this.attr(this.t("Colors"),i.colors?.join(", "))} ${this.attr(this.t("Gemstones"),i.gemstones?.join(", "))} ${this.attr(this.t("Compatible"),i.compatibleNumbers?.join(", "))} ${this.attr(this.t("Incompatible"),i.incompatibleNumbers?.join(", "))}</dl></section>`:C}</article>`}renderInsights(e){let t=e.karmicLessons,r=e.karmicDebt,s=e.personalYear,i=e.hiddenPassion,o=e.subconsciousSelf,l=e.nameLetters,c=Object.entries(t?.presentNumbers??{}),d=!this.hideReadings;return k`${t?k`<section class="sub" part="section karmic-lessons"><h3>${this.t("Karmic lessons")}</h3>${t.missingNumbers?.length?k`<ul class="roxy-chips">${t.missingNumbers.map(p=>k`<li>${this.t("Missing")} ${p}</li>`)}</ul>`:k`<p>${this.t("No numbers are missing from the birth name.")}</p>`} ${c.length>0?k`<ul class="roxy-chips">${c.map(([p,h])=>k`<li>${p} x ${h}</li>`)}</ul>`:C} ${this.renderInterpretation((t.lessons??[]).map(p=>({label:p.lesson??`Lesson ${p.number}`,aside:p.number!=null?`${p.number}`:"",body:p.description??"",extra:p.howToOvercome?k`<p><strong>${this.t("How to overcome")}.</strong> ${p.howToOvercome}</p>`:C})),"numerology-karmic-lessons","Lessons")}</section>`:C}${r?.hasKarmicDebt?k`<section class="sub" part="section karmic-debt"><h3>${this.t("Karmic debt")}</h3>${r.debtNumbers?.length?k`<ul class="roxy-chips">${r.debtNumbers.map(p=>k`<li>${this.t("Debt")} ${p}</li>`)}</ul>`:C} ${this.renderInterpretation((r.meanings??[]).map(p=>({label:`${this.t("Karmic debt")} ${p.number}`,body:p.description??"",extra:k`${p.challenge?k`<p><strong>${this.t("Challenge")}.</strong> ${p.challenge}</p>`:C}${p.resolution?k`<p><strong>${this.t("Resolution")}.</strong> ${p.resolution}</p>`:C}`})),"numerology-karmic-debt","Debts")}</section>`:C}${s?k`<section class="sub" part="section personal-year"><h3>${this.t("Personal year")}</h3><h4>${[s.personalYear!=null?`${s.personalYear}`:"",s.theme??"",s.cycle??""].filter(Boolean).join(" · ")}</h4>${s.forecast&&d?k`<p>${s.forecast}</p>`:C} ${d?this.renderLists(["Opportunities",s.opportunities],["Challenges",s.challenges]):C} ${s.advice&&d?k`<p>${s.advice}</p>`:C} ${s.personalMonth?k`<p><strong>${[s.personalMonth.personalMonth!=null?`${this.t("Personal month")} ${s.personalMonth.personalMonth}`:this.t("Personal month"),s.personalMonth.theme??""].filter(Boolean).join(" · ")}.</strong> ${d?s.personalMonth.focus??"":""}</p>`:C}</section>`:C}${e.pinnacles?.length&&d?k`<section class="sub" part="section pinnacles"><h3>${this.t("Pinnacles")}</h3>${this.renderInterpretation(e.pinnacles.map(p=>({label:[p.position!=null?`Pinnacle ${p.position}`:"Pinnacle",p.meaning?.title??""].filter(Boolean).join(" · "),aside:[p.number!=null?`${p.number}`:"",fh(p.startAge,p.endAge)].filter(Boolean).join(" · "),body:p.meaning?.description??"",extra:this.renderLists(["Opportunities",p.meaning?.opportunities],["Challenges",p.meaning?.challenges])})),"numerology-pinnacles","Life phases")}</section>`:C}${e.challenges?.length&&d?k`<section class="sub" part="section obstacle-periods"><h3>${this.t("Challenges")}</h3>${this.renderInterpretation(e.challenges.map(p=>({label:[p.position!=null?`Challenge ${p.position}`:"Challenge",p.meaning?.title??""].filter(Boolean).join(" · "),aside:[p.number!=null?`${p.number}`:"",fh(p.startAge,p.endAge)].filter(Boolean).join(" · "),body:p.meaning?.description??"",extra:k`${p.meaning?.lesson?k`<p><strong>${this.t("Lesson")}.</strong> ${p.meaning.lesson}</p>`:C}${p.meaning?.howToOvercome?k`<p><strong>${this.t("How to overcome")}.</strong> ${p.meaning.howToOvercome}</p>`:C}`})),"numerology-challenges","Obstacle periods")}</section>`:C}${i||o?k`<section class="sub" part="section name-numbers"><h3>${this.t("Name numbers")}</h3>${i?k`<div><h4>${[i.number!=null?this.t("Hidden passion {{number}}",{number:i.number}):this.t("Hidden passion"),i.title??""].filter(Boolean).join(" · ")}</h4>${i.description&&d?k`<p>${i.description}</p>`:C} ${typeof i.count=="number"?k`<p class="roxy-label">${this.t("Appears {{count}} times in the name",{count:i.count})}</p>`:C}</div>`:C} ${o?k`<div><h4>${[o.number!=null?this.t("Subconscious self {{number}}",{number:o.number}):this.t("Subconscious self"),o.title??""].filter(Boolean).join(" · ")}</h4>${o.description&&d?k`<p>${o.description}</p>`:C} ${o.uniqueNumbers?.length?k`<p class="roxy-label">${this.t("Numbers present: {{list}}",{list:qe(this.effectiveLang(),o.uniqueNumbers.map(String))})}</p>`:C}</div>`:C}</section>`:C}${l&&d?k`<section class="sub" part="section name-letters"><h3>${this.t("Name letters")}</h3>${this.renderInterpretation([{label:this.t("Cornerstone"),aside:fl(l.cornerstone?.letter,l.cornerstone?.number),body:l.cornerstone?.meaning??""},{label:this.t("Capstone"),aside:fl(l.capstone?.letter,l.capstone?.number),body:l.capstone?.meaning??""},{label:this.t("First vowel"),aside:fl(l.firstVowel?.letter),body:l.firstVowel?.meaning??""}],"numerology-name-letters","Letter analysis")}</section>`:C}`}renderHero(e,t,r,s=!1){return k`<div class="hero" part="header">${typeof t=="number"?k`<div class="numeral">${t}</div>`:C}<div><p class="roxy-label">${e}</p>${r?k`<h2>${r}</h2>`:C} ${s?k`<span class="master roxy-chip">${this.t("Master number")}</span>`:C}</div></div>`}renderReading(e,t){if(!e||this.hideReadings)return C;let r=qf.map(([s,i])=>({label:i,body:e[s]??""}));return k`${e.keywords?.length?k`<ul class="roxy-chips">${e.keywords.map(s=>k`<li>${s}</li>`)}</ul>`:C}${this.renderLists(["Strengths",e.strengths],["Challenges",e.challenges])}${this.renderInterpretation(r,t,"Guidance")}`}renderLists(...e){let t=e.filter(([,r])=>r&&r.length>0);return t.length===0?C:k`<div class="lists">${t.map(([r,s])=>k`<div><h3>${this.t(r)}</h3><ul>${(s??[]).map(i=>k`<li>${i}</li>`)}</ul></div>`)}</div>`}attr(e,t){return t==null||t===""?C:k`<div><dt>${e}</dt><dd>${t}</dd></div>`}};ur.endpoints=Dc,ur.styles=[u,M,re,j,jf`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,h4,p{margin:0}.hero{align-items:center;gap:var(--roxy-space-md);display:flex}.numeral{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 2.5);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.master{margin-block-start:var(--roxy-space-xs)}.calc{color:var(--roxy-muted);font-family:var(--roxy-font-mono);font-size:var(--roxy-text-xs);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.cores{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));padding-block-start:var(--roxy-space-md);display:grid}.cores .item{gap:calc(var(--roxy-space-unit) / 2);font-size:var(--roxy-text-sm);display:grid}.cores .item .core-head{align-items:baseline;gap:var(--roxy-space-xs);display:flex}.cores .item .core-key{color:var(--roxy-muted);text-transform:capitalize}.cores .item strong{color:var(--roxy-accent-ink);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}.cores .item .core-title{font-size:var(--roxy-text-xs)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}.lists h3{margin-block-end:var(--roxy-space-xs)}.lists ul{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md);display:grid}.sub{gap:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-md);display:grid}.sub p{font-size:var(--roxy-text-sm)}.roxy-facts{margin:0}.karmic{border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);padding-block-start:var(--roxy-space-md)}.karmic strong{color:var(--roxy-warning-fg);font-weight:var(--roxy-weight-bold)}`],m([Kf({type:String,reflect:!0})],ur.prototype,"type",2),ur=m([f("roxy-numerology-card")],ur);var Yf={"life-path":"Life Path",expression:"Expression","soul-urge":"Soul Urge",personality:"Personality","birth-day":"Birth Day",maturity:"Maturity",daily:"Daily Number","personal-day":"Personal Day","personal-month":"Personal month","personal-year":"Personal year",chart:"Numerology chart"};function Uf(n){return n?[n.description,n.challenge,n.resolution].filter(Boolean).join(" "):""}function oo(n,a){return a==="master"||n!==void 0&&Vf.has(n)}function ul(n,a){return[n!=null?`${n}`:"",a??""].filter(Boolean).join(" · ")}function fh(n,a){return n==null?"":a==null?`ages ${n} onward`:`ages ${n} to ${a}`}function fl(n,a){return[n??"",a!=null?`${a}`:""].filter(Boolean).join(" · ")}import{css as Zf,html as ve,nothing as lt}from"lit";import{property as Wf}from"lit/decorators.js";function xl(...n){return n.filter(Boolean).join(" · ")}function bl(...n){return n.filter(Boolean).join(", ")}var fr=class extends y{constructor(){super(...arguments);this.detail="detailed"}renderData(e){let t="sunrise"in e?e:null,r="sunLongitude"in e?e:null,s=t?[["Brahma Muhurta",t.brahmaMuhurta],["Abhijit Muhurta",t.abhijitMuhurta],["Vijaya Muhurta",t.vijayaMuhurta],["Godhuli Muhurta",t.godhuliMuhurta],["Nishita Muhurta",t.nishitaMuhurta],["Pratah Sandhya",t.pratahSandhya],["Sayahna Sandhya",t.sayahnaSandhya]]:[],i=t?this.expandWindows(this.t("Amrit Kalam"),t.amritKalam):[],o=t?[["Rahu Kaal",t.rahuKaal],["Yamaganda",t.yamaganda],["Gulika",t.gulika]]:[],l=t?[...this.expandWindows(this.t("Dur Muhurta"),t.durMuhurta),...this.expandWindows(this.t("Varjyam"),t.varjyam)]:[],c=this.detail==="detailed"&&t!==null;return ve`<div class="wrap" part="card" aria-label="${this.t("Panchang")}"><header class="head" part="header"><h2>${this.t("Panchang")}</h2><span class="roxy-label">${t?R(this.effectiveLang(),t.date):""}</span> ${t?this.renderLocation(t.location):lt}</header><table part="table"><tbody>${this.limbs(e,t).map(d=>this.renderLimbRow(d))} ${t?ve`${this.renderRow(this.t("Sunrise"),Rt(this.effectiveLang(),t.sunrise))} ${this.renderRow(this.t("Sunset"),Rt(this.effectiveLang(),t.sunset))} ${this.renderRow(this.t("Moonrise"),Rt(this.effectiveLang(),t.moonrise))} ${this.renderRow(this.t("Moonset"),Rt(this.effectiveLang(),t.moonset))} ${this.renderRow(this.t("Moon sign"),this.formatRashi(t.moonSign))} ${this.renderRow(this.t("Sun sign"),this.formatRashi(t.sunSign))} ${this.renderRow(this.t("Sun nakshatra"),this.formatSunNakshatra(t.sunNakshatra))} ${this.renderRow(this.t("Hora"),this.formatHora(t.hora))}`:r?ve`${this.renderRow(this.t("Sun"),this.formatLongitude(r.sunLongitude))} ${this.renderRow(this.t("Moon"),this.formatLongitude(r.moonLongitude))}`:lt}</tbody></table>${t?this.renderTransitions(t.transitions):lt} ${c?ve`<h3 class="section" part="section auspicious">${this.t("Auspicious muhurtas")}</h3><table part="table auspicious"><tbody>${this.renderPeriodRows([...s.filter(d=>!!d[1]),...i])}</tbody></table><h3 class="section" part="section inauspicious">${this.t("Inauspicious periods")}</h3><table part="table inauspicious"><tbody>${this.renderPeriodRows([...o.filter(d=>!!d[1]),...l])} ${this.renderBhadraRow(t.bhadra)} ${this.renderPanchakaRow(t.panchaka)}</tbody></table>${this.renderBalams(t.chandrabalam,t.tarabalam)}`:lt}</div>`}limbs(e,t){let r=e.tithi,s=e.nakshatra,i=e.yoga,o=e.karana,l=[{label:this.t("Tithi"),value:bl(r?.name,r?.paksha?`${r.paksha} paksha`:void 0),meta:xl(r?.rulingPlanet?`Ruled by ${r.rulingPlanet}`:void 0,r?.deity?`Deity ${r.deity}`:void 0,r?.element,typeof r?.percent=="number"?`${we(this.effectiveLang(),r.percent,0)} elapsed`:void 0)},{label:this.t("Nakshatra"),value:bl(s?.name,typeof s?.pada=="number"?`pada ${s.pada}`:void 0),meta:xl(s?.lord?`Lord ${s.lord}`:void 0,s?.deity?`Deity ${s.deity}`:void 0,s?.symbol?`Symbol ${s.symbol}`:void 0,s?.characteristics)},{label:this.t("Yoga"),value:i?.name??"",meta:i?.characteristics??""},{label:this.t("Karana"),value:bl(o?.name,o?.type),meta:o?.characteristics??""}];return t?.vara&&l.push({label:this.t("Vara"),value:wn(t.vara.name,t.vara.sanskritName),meta:t.vara.lord?`Lord ${t.vara.lord}`:""}),l.filter(c=>!!c.value)}renderLimbRow(e){return ve`<tr><th>${e.label}</th><td>${e.value}${e.meta?ve`<small>${e.meta}</small>`:lt}</td></tr>`}renderRow(e,t){return t?ve`<tr><th>${e}</th><td>${t}</td></tr>`:lt}renderTransitions(e){return e?ve`<h3 class="section" part="section transitions">${this.t("Next transitions")}</h3><table part="table transitions"><tbody>${this.renderTransitionRow(this.t("Tithi"),e.tithi)} ${this.renderTransitionRow(this.t("Nakshatra"),e.nakshatra)} ${this.renderTransitionRow(this.t("Yoga"),e.yoga)} ${this.renderTransitionRow(this.t("Karana"),e.karana)} ${this.renderMoonSignRow(e.moonSign)}</tbody></table>`:lt}renderPeriodRows(e){return e.map(([t,r])=>{let s=ia(this.effectiveLang(),r);return s?ve`<tr><th>${t}</th><td>${s}</td></tr>`:lt})}expandWindows(e,t){return!t||t.length===0?[]:t.map((r,s)=>[t.length>1?`${e} ${s+1}`:e,r])}renderBhadraRow(e){if(!e)return lt;let t=this.formatSpan(e.startsAt,e.endsAt);return ve`<tr><th>${this.t("Bhadra (Vishti)")}</th><td>${e.active&&t?t:ve`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderPanchakaRow(e){if(!e)return lt;let t=this.formatSpan(e.startsAt,e.endsAt);return ve`<tr><th>${this.t("Panchaka")}</th><td>${e.active?ve`${e.type?this.t("{{type}} Panchaka",{type:e.type}):this.t("Panchaka")}${t?ve`<small>${t}</small>`:lt}`:ve`<span class="quiet">${this.t("None today")}</span>`}</td></tr>`}renderBalams(e,t){return!e&&!t?lt:ve`<h3 class="section" part="section balams">${this.t("Chandrabalam and Tarabalam")}</h3><table part="table balams"><tbody>${e?ve`<tr><th>${this.t("Favorable Moon signs")}</th><td>${this.renderChips(e.favorableRashis,"success")}</td></tr>${this.renderRow(this.t("Ashtama Chandra rashi"),e.ashtamaChandraRashi??"")}`:lt} ${t?ve`<tr><th>${this.t("Favorable birth nakshatras")}</th><td>${this.renderChips(t.favorableNakshatras,"success")}</td></tr><tr><th>${this.t("Unfavorable birth nakshatras")}</th><td>${this.renderChips(t.unfavorableNakshatras,"danger")}</td></tr>`:lt}</tbody></table>`}renderChips(e,t){return e?.length?ve`<ul class="roxy-chips">${e.map(r=>ve`<li class="roxy-chip" data-tone="${t}">${r}</li>`)}</ul>`:ve`<span class="quiet">${this.t("None")}</span>`}renderLocation(e){return e?ve`<dl class="roxy-facts">${["latitude","longitude","timezone"].map(r=>ve`<div><dt>${ae(this.effectiveLang(),r)}</dt><dd>${b(this.effectiveLang(),e[r],5)}</dd></div>`)}</dl>`:lt}clock(e){let t=this.data?.date;return t&&e.slice(0,10)!==t.slice(0,10)?V(this.effectiveLang(),e):Rt(this.effectiveLang(),e)}renderTransitionRow(e,t){if(!t?.endsAt)return lt;let r=this.clock(t.endsAt),s=t.next?typeof t.nextPada=="number"?this.t("ends {{time}} to {{next}} pada {{pada}}",{time:r,next:t.next,pada:t.nextPada}):this.t("ends {{time}} to {{next}}",{time:r,next:t.next}):this.t("ends {{time}}",{time:r});return ve`<tr><th>${e}</th><td>${s}</td></tr>`}renderMoonSignRow(e){return e?.changesAt?ve`<tr><th>${this.t("Moon sign")}</th><td>${e.next?this.t("{{sign}} until {{time}}, then {{next}}",{sign:e.current??"",time:this.clock(e.changesAt),next:e.next}):this.t("{{sign}} until {{time}}",{sign:e.current??"",time:this.clock(e.changesAt)})}</td></tr>`:lt}formatSpan(e,t){let r=ia(this.effectiveLang(),{start:e??void 0,end:t??void 0});return!r||!e||!t||e.slice(0,10)===t.slice(0,10)?r:this.t("{{range}} (ends {{date}})",{range:r,date:R(this.effectiveLang(),t)})}formatRashi(e){return wn(e?.name,e?.sanskritName)}formatSunNakshatra(e){return e?.name?xl(e.name,typeof e.pada=="number"?`pada ${e.pada}`:void 0,e.lord?`lord ${e.lord}`:void 0):""}formatHora(e){if(!e?.current)return"";let t=ia(this.effectiveLang(),e);return t?`${e.current} (${t})`:e.current}formatLongitude(e){return typeof e=="number"?Qe(e):""}};fr.endpoints=Ac,fr.styles=[u,re,Zf`.wrap{overflow:hidden}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;display:flex}h2,h3{margin:0}.head .roxy-facts{flex-basis:100%;margin:0}table{width:100%}th,td{padding-inline:var(--roxy-space-md)}th{width:38%}tbody tr:last-child :is(th,td){border-block-end:0}td small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:normal;margin-block-start:calc(var(--roxy-space-unit) / 2);display:block}.section{padding:var(--roxy-space-sm) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border)}.quiet{color:var(--roxy-muted)}.roxy-chips{margin-block-start:var(--roxy-space-xs)}`],m([Wf({type:String,reflect:!0})],fr.prototype,"detail",2),fr=m([f("roxy-panchang-table")],fr);import{css as Xf,html as Pe,nothing as Pt}from"lit";import{property as Jf}from"lit/decorators.js";var xr=class extends y{constructor(){super(...arguments);this.heading=""}renderData(e){let t=this.toViewModel(e),r=t.cols;return Pe`<div class="wrap" part="card"><header part="header"><h2>${this.heading||t.title}</h2>${t.badges.length?Pe`<ul class="roxy-chips" part="details">${t.badges.map(s=>Pe`<li>${s.label}: ${s.value}</li>`)}</ul>`:Pt}</header>${t.summary&&!this.hideReadings?Pe`<p class="summary">${t.summary}</p>`:Pt}<div class="scroll" part="table" tabindex="0" role="region" aria-label="${t.title}"><table><caption class="roxy-label">${t.title}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col">${this.t("Position")}</th>${r.natal?Pe`<th scope="col">${this.t("Natal")}</th>`:Pt} ${r.house?Pe`<th scope="col" class="num">${this.t("House")}</th>`:Pt} ${r.motion?Pe`<th scope="col">${this.t("Motion")}</th>`:Pt} ${r.formula?Pe`<th scope="col">${this.t("Formula")}</th>`:Pt}</tr></thead><tbody>${t.rows.map(s=>this.renderRow(s,r))}</tbody></table></div>${this.renderReadings(t.rows)}</div>`}renderRow(e,t){let r=$(e.body??e.label);return Pe`<tr class="${e.isAngle?"angle":""}"><td class="body-cell">${r?Pe`<span class="glyph">${r}</span>`:Pt}${e.label}</td><td>${this.signCell(e.sign,e.degree,e.signLabel)}</td>${t.natal?Pe`<td>${e.natalLongitude!=null?this.signFromLongitude(e.natalLongitude):Pe`—`}</td>`:Pt} ${t.house?Pe`<td class="num">${e.house!=null?e.house:Pe`—`}</td>`:Pt} ${t.motion?Pe`<td>${e.speed!=null?Pe`${b(this.effectiveLang(),e.speed,3)}${this.t("°/day")}${e.isRetrograde?Pe`<span class="retro">℞</span>`:Pt}`:Pe`—`}</td>`:Pt} ${t.formula?Pe`<td class="formula">${e.formula??Pe`—`}</td>`:Pt}</tr>`}signCell(e,t,r=e){let s=N(e);return Pe`<span class="sign">${s?Pe`<span class="sg">${s}</span>`:Pt}${Kt(t)} ${r}</span>`}signFromLongitude(e){let t=Nt(e);return this.signCell(t.sign,t.degree+t.minute/60)}renderReadings(e){let t=e.filter(r=>r.interpretation).map(r=>({label:`${$(r.body??r.label)??""} ${r.label}`.trim(),aside:`${r.signLabel??r.sign} ${Kt(r.degree)}`.trim(),body:r.interpretation??""}));return this.renderInterpretation(t,"positions-readings","Readings")}toViewModel(e){if("asteroids"in e)return{title:this.t("Asteroids"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:e.asteroids.map(r=>({body:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))};if("lilith"in e)return{title:this.t("Black Moon Lilith"),badges:e.houseSystem?[{label:this.t("Houses"),value:e.houseSystem}]:[],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:e.lilith.map(r=>({label:this.t("{{variant}} apogee",{variant:g(r,"variant",A(r.variant))}),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))};if("directed"in e)return{title:this.t("Solar arc directions"),badges:[{label:this.t("Arc"),value:`${b(this.effectiveLang(),e.solarArc,2)}°`},{label:this.t("Directed to"),value:R(this.effectiveLang(),e.targetDate)}],summary:e.summary,cols:{house:!1,motion:!1,formula:!1,natal:!0},rows:e.directed.map(r=>({body:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,natalLongitude:r.natalLongitude,interpretation:r.interpretation}))};if("lots"in e)return{title:this.t("Arabic lots"),badges:e.sect?[{label:this.t("Sect"),value:A(e.sect)}]:[],summary:e.summary,cols:{house:!1,motion:!1,formula:!0,natal:!1},rows:e.lots.map(r=>({body:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,formula:r.formula,interpretation:r.interpretation}))};let t=[];return e.ascendant&&t.push({label:this.t("Ascendant"),sign:e.ascendant.sign,signLabel:g(e.ascendant,"sign"),degree:e.ascendant.degree,isAngle:!0}),e.midheaven&&t.push({label:this.t("Midheaven"),sign:e.midheaven.sign,signLabel:g(e.midheaven,"sign"),degree:e.midheaven.degree,isAngle:!0}),{title:this.t("Secondary progressions"),badges:[{label:this.t("Progressed to"),value:R(this.effectiveLang(),e.targetDate)},{label:this.t("Elapsed"),value:this.t("{{years}} yrs",{years:b(this.effectiveLang(),e.elapsedYears,1)})}],summary:e.summary,cols:{house:!0,motion:!0,formula:!1,natal:!1},rows:[...t,...e.planets.map(r=>({body:r.name,label:g(r,"name"),sign:r.sign,signLabel:g(r,"sign"),degree:r.degree,house:r.house,speed:r.speed,isRetrograde:r.isRetrograde,interpretation:r.interpretation}))]}}};xr.endpoints=Pc,xr.styles=[u,M,j,Xf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}header{gap:var(--roxy-space-sm);display:grid}.summary{font-size:var(--roxy-text-sm)}.scroll{min-width:0;overflow-x:auto}table{width:100%}caption{caption-side:top;text-align:start;padding-block-end:var(--roxy-space-xs)}:is(th,td){white-space:nowrap}:is(th,td).num{text-align:end}.body-cell{font-weight:var(--roxy-weight-bold)}.body-cell .glyph{color:var(--roxy-accent-ink);margin-inline-end:var(--roxy-space-xs)}tr.angle td{color:var(--roxy-secondary)}.sign{align-items:baseline;gap:var(--roxy-space-xs);display:inline-flex}.sign .sg{color:var(--roxy-secondary)}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.formula{color:var(--roxy-muted);white-space:normal}`],m([Jf({type:String})],xr.prototype,"heading",2),xr=m([f("roxy-positions-table")],xr);import{css as Qf,html as zs,nothing as gn}from"lit";var Os=class extends y{renderData(a){let e=N(a.profectedSign),t=$(a.lordOfYear),r=N(a.lordNatalPosition?.sign);return zs`<div class="wrap" part="card"><header part="header"><h2>${this.t("Annual profection")}</h2>${a.targetDate?zs`<p class="roxy-label">${this.t("For")} ${R(this.effectiveLang(),a.targetDate)}</p>`:gn}</header><div class="focus" part="details"><div class="age"><span class="n">${a.age}</span> <span class="roxy-label">${this.t("Age")}</span></div><span class="arrow">${this.t("Activates")}</span><div class="house"><span class="h">${this.t("House")} ${a.profectedHouse}</span> <span class="sign">${e?zs`<span class="sg">${e}</span>`:gn}${a.profectedSign}</span></div></div><div class="lord" part="details"><span class="roxy-label">${this.t("Lord of the year")}</span> <span class="value">${t?zs`<span class="sg" aria-hidden="true">${t}</span>`:gn}${a.lordOfYear}</span> ${a.lordNatalPosition?zs`<span class="sub">${this.t("Natal")} ${r?zs`<span class="sg" aria-hidden="true">${r}</span>`:gn}${this.t("{{sign}} · house {{house}}",{sign:a.lordNatalPosition.sign,house:a.lordNatalPosition.house})}</span>`:gn}</div>${a.interpretation&&!this.hideReadings?zs`<p class="interp">${a.interpretation}</p>`:gn}</div>`}};Os.endpoints=Mc,Os.styles=[u,Qf`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}header{gap:var(--roxy-space-xs);display:grid}.focus{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.age,.house{gap:calc(var(--roxy-space-unit) / 2);display:grid}.age{justify-items:center}.age .n{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);font-variant-numeric:tabular-nums}.arrow{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.house .h{font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.house .sign{color:var(--roxy-secondary);font-size:var(--roxy-text-sm)}.sg{margin-inline-end:var(--roxy-space-xs)}.lord{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-sm);display:flex}.lord .value{font-weight:var(--roxy-weight-bold)}.lord .sub{color:var(--roxy-muted)}.interp{font-size:var(--roxy-text-sm)}`],Os=m([f("roxy-profection-card")],Os);import{css as ex,html as Aa,nothing as Bn}from"lit";var bh=["name","english","title"],tx=new Set(["description","meaning","characteristics","tagline","definedMeaning","undefinedMeaning","motto"]),ax=new Set(["id","symbol",...bh]),xh=48;function rx(n){return S(n).toLowerCase().replace(/\s+/g,"-")}function sx(n){return Object.values(Qs(n)).filter(a=>typeof a=="string"||typeof a=="number").map(String).join(" · ")}var Gs=class extends y{renderData(a){let e=Qs(a),t=this.deriveTitle(e),r=typeof e.symbol=="string"?e.symbol:void 0,s=Array.isArray(e.keywords)?e.keywords.map(String):[],i=[],o=[],l=[],c=(p,h,x)=>{if(h!=null){if(Array.isArray(h)){let L=h.filter(v=>v!=null).map(v=>typeof v=="object"?sx(v):String(v)).filter(v=>v.length>0);L.length>0&&o.push([p,L,L.some(v=>v.length>xh)])}else if(typeof h=="string")tx.has(p)||h.length>xh?i.push([p,h]):l.push([p,h]);else if(typeof h=="number"||typeof h=="boolean")l.push([p,String(h)]);else if(typeof h=="object"&&x<2)for(let[L,v]of Object.entries(Qs(h)))c(`${p} ${L}`,v,x+1)}};for(let[p,h]of Object.entries(e))ax.has(p)||p==="keywords"&&Array.isArray(h)||c(p,h,0);let d=!this.hideReadings;return Aa`<article class="card" part="card" aria-label="${t}"><header class="head" part="header">${r?Aa`<span class="symbol" aria-hidden="true">${r}</span>`:Bn}<div><p class="roxy-label">${this.t("Reference")}</p><h2>${t}</h2></div></header>${s.length>0&&d?Aa`<ul class="roxy-chips">${s.map(p=>Aa`<li>${p}</li>`)}</ul>`:Bn} ${d?i.map(([p,h])=>Aa`<p class="prose"><span class="roxy-label">${ae(this.effectiveLang(),p)}</span>${h}</p>`):Bn} ${l.length>0?Aa`<div part="details"><dl class="roxy-facts">${l.map(([p,h])=>Aa`<div><dt>${ae(this.effectiveLang(),p)}</dt><dd>${h}</dd></div>`)}</dl></div>`:Bn} ${o.map(([p,h,x])=>x&&!d?Bn:Aa`<div class="list" part="section ${rx(p)}"><h3>${ae(this.effectiveLang(),p)}</h3><ul class="roxy-chips">${h.map(L=>Aa`<li>${L}</li>`)}</ul></div>`)}</article>`}deriveTitle(a){for(let r of bh)if(typeof a[r]=="string")return a[r];let e=typeof a.type=="string"?S(a.type):"",t=a.number;return t!=null?`${e} ${t}`.trim():this.t("Reference")}};Gs.endpoints=_c,Gs.styles=[u,re,ex`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.head{align-items:center;gap:var(--roxy-space-md);display:flex}.symbol{color:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-xl) * 1.5);flex:none;line-height:1}.prose .roxy-label{margin-block-end:calc(var(--roxy-space-unit) / 2);display:block}.list h3{margin-block-end:var(--roxy-space-xs)}.roxy-facts{margin:0}`],Gs=m([f("roxy-reference-card")],Gs);import{css as nx,html as ra,nothing as Hn}from"lit";import{ifDefined as ix}from"lit/directives/if-defined.js";var vh=n=>$(n)??"",Is=class extends y{renderData(a){let e=a.changes,t=["latitude","longitude"];return ra`<div class="stack" part="stack"><roxy-natal-chart heading="Relocation chart" lang="${ix(this.effectiveLang())}" exportparts="chart-controls, chart-dialog, card, header, tablist, tab, panel, chart, table, aspects, aspect-grid, element-modality, legend, details, section, patterns, pattern, readings, reading, positions, distribution, houses, strongest" ?hide-readings="${this.hideReadings}" .data="${a}"></roxy-natal-chart><section class="changes" part="card changes"><h2>${this.t("What changes at this location")}</h2>${a.relocation?ra`<dl class="roxy-facts" part="details">${t.map(r=>ra`<div><dt>${ae(this.effectiveLang(),r==="latitude"?"relocationLatitude":"relocationLongitude")}</dt><dd>${b(this.effectiveLang(),a.relocation[r],5)}</dd></div>`)}</dl>`:Hn}<div class="move" part="details">${typeof e?.distanceKm=="number"?ra`<span>${Math.round(e.distanceKm)===0?this.t("Same location as birth"):this.t("{{distance}} km {{direction}} of birthplace",{distance:P(this.effectiveLang(),e.distanceKm),direction:e.direction?I(this.effectiveLang(),"direction",A(e.direction),e.direction):""})}</span>`:Hn} ${e?ra`<span>${a.ascendant?.sign?e.ascendantSignChanged?this.t("Ascendant moves to {{sign}}",{sign:g(a.ascendant,"sign")}):this.t("Ascendant stays in {{sign}}",{sign:g(a.ascendant,"sign")}):e.ascendantSignChanged?this.t("Ascendant changes sign"):this.t("Ascendant keeps its sign")}</span>`:Hn}</div>${a.interpretation?.summary&&!this.hideReadings?ra`<p class="summary">${a.interpretation.summary}</p>`:Hn} ${e?.angularPlanets?.length?ra`<section part="section angular-planets"><h3>${this.t("Angular planets here")}</h3><ul class="roxy-chips">${oi(e,"angularPlanets").map(({value:r,label:s})=>ra`<li>${vh(r)} ${s}</li>`)}</ul></section>`:Hn}<section part="section house-changes"><h3>${this.t("Planets that change house")}</h3>${e?.planetsChangedHouse?.length?ra`<ul class="moves-list">${e.planetsChangedHouse.map(r=>ra`<li>${vh(r.planet)} ${this.t("{{planet}}: house {{from}} to {{to}}",{planet:g(r,"planet"),from:r.natalHouse,to:r.relocatedHouse})}</li>`)}</ul>`:ra`<p class="empty-note">${this.t("No planet changes house at this location.")}</p>`}</section></section></div>`}};Is.endpoints=Nc,Is.styles=[u,re,nx`.stack{gap:var(--roxy-space-md);display:grid}.changes{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,p{margin:0}.changes section{gap:var(--roxy-space-xs);display:grid}.move{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.summary,.moves-list{font-size:var(--roxy-text-sm)}.moves-list{gap:calc(var(--roxy-space-unit) / 2);margin:0;padding:0;list-style:none;display:grid}.empty-note{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}`],Is=m([f("roxy-relocation-wheel")],Is);import{css as ox,html as yn,nothing as lo}from"lit";var vl=[{key:"sthanaBala",source:"Sthana",color:"var(--roxy-info)"},{key:"digBala",source:"Dig",color:"var(--roxy-success)"},{key:"kalaBala",source:"Kala",color:"var(--roxy-warning)"},{key:"chestaBala",source:"Chesta",color:"var(--roxy-accent)"},{key:"naisargikaBala",source:"Naisargika",color:"var(--roxy-secondary)"},{key:"drikBala",source:"Drik",color:"var(--roxy-danger)"}],Fs=class extends y{renderData(a){if(!a.planets?.length)return this.renderEmpty();let e=[...a.planets].sort((t,r)=>t.relativeRank-r.relativeRank);return yn`<div class="wrap" part="card" aria-label="${this.t("Shadbala planetary strength")}"><div class="head" part="header"><h2 class="title">${this.t("Shadbala")}</h2><p class="subtitle">${this.t("{{count}} planets ranked by strength",{count:e.length})}</p>${X(this.effectiveLang(),a.frame,this.translator)}</div><div role="list" part="chart bars" aria-label="${this.t("Planet strength bars")}">${e.map(t=>this.renderPlanetRow(t))}</div><div class="legend" part="legend" aria-label="${this.t("Strength component legend")}">${vl.map(t=>yn`<div class="legend-row"><span class="legend-swatch" style="background:${t.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(t.source)})}</div>`)}</div><p class="footnote" part="legend">${this.t("Ishta Phala is the capacity to give benefic results, Kashta Phala the capacity to give malefic ones. Both are in virupas and are read together, since a planet can be strong and still deliver hardship.")}</p></div>`}renderPlanetRow(a){let e=$(a.planet)??"",t=vl.map(c=>Math.max(0,a[c.key])),r=t.reduce((c,d)=>c+d,0),s=typeof a.strengthRatio=="number"&&a.strengthRatio>=1,i=s?"adequacy-badge--adequate":"adequacy-badge--weak",o=s?this.t("Adequate"):this.t("Weak"),l=b(this.effectiveLang(),a.totalRupas,2)&&b(this.effectiveLang(),a.minRequired,2)?`${b(this.effectiveLang(),a.totalRupas,2)} / ${b(this.effectiveLang(),a.minRequired,2)} R`:"";return yn`<div class="planet-row" role="listitem" aria-label="${this.t("{{planet}} Shadbala",{planet:a.planet})}"><div class="planet-label"><span class="glyph" aria-hidden="true">${e}</span> ${a.planet} <span class="rank-badge" aria-label="${this.t("rank {{n}}",{n:a.relativeRank})}">#${a.relativeRank}</span></div><div class="bar-wrap"><div class="bar" role="img" aria-label="${this.t("Strength components for {{planet}}",{planet:a.planet})}">${r>0?vl.map((c,d)=>{let p=t[d];if(p<=0)return lo;let h=p/r*100;return yn`<div class="bar-segment" style="flex-grow:${h};background:${c.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(c.source),value:b(this.effectiveLang(),p,1)})}"></div>`}):lo}</div>${this.renderPhala(a)}</div><div class="pills">${l?yn`<span class="rupas-label">${l}</span>`:lo} <span class="${`adequacy-badge ${i}`}">${o}</span></div></div>`}renderPhala(a){let e=typeof a.ishtaPhala=="number"?a.ishtaPhala:0,t=typeof a.kashtaPhala=="number"?a.kashtaPhala:0;if(e+t<=0)return lo;let r=b(this.effectiveLang(),e,1)||"0",s=b(this.effectiveLang(),t,1)||"0";return yn`<div class="phala" role="img" aria-label="${this.t("Ishta Phala {{ishta}}, Kashta Phala {{kashta}} virupas",{ishta:r,kashta:s})}"><span class="phala-ishta" style="flex-grow:${e}"></span> <span class="phala-kashta" style="flex-grow:${t}"></span></div><div class="phala-label"><span>${this.t("Ishta {{value}}",{value:r})}</span> <span>${this.t("Kashta {{value}}",{value:s})}</span></div>`}};Fs.endpoints=zc,Fs.styles=[u,G,ox`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.subtitle,.footnote{margin:0}.subtitle{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.planet-row{align-items:center;gap:var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);grid-template-columns:14ch minmax(0,1fr) auto;display:grid}.planet-row:last-of-type{border-block-end:0}.planet-label{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);display:flex}.glyph{font-size:var(--roxy-text-base);line-height:1}.bar-wrap,.pills{gap:var(--roxy-space-xs);flex-direction:column;display:flex}.pills{align-items:flex-end}.bar{border-radius:var(--roxy-radius-sm);background:var(--roxy-border);block-size:.5lh;display:flex;overflow:hidden}.bar-segment{height:100%;transition:flex-grow var(--roxy-motion-duration) var(--roxy-motion-easing)}.rupas-label{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;color:var(--roxy-muted);white-space:nowrap}.phala{border-radius:var(--roxy-radius-full);background:var(--roxy-border);block-size:.25lh;display:flex;overflow:hidden}.phala-ishta{background:var(--roxy-success)}.phala-kashta{background:var(--roxy-danger)}.phala-label{justify-content:space-between;gap:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);font-variant-numeric:tabular-nums;display:flex}.footnote{font-size:var(--roxy-text-xs);color:var(--roxy-muted)}.adequacy-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.adequacy-badge--adequate{color:var(--roxy-success-fg)}.adequacy-badge--weak{color:var(--roxy-danger-fg)}.rank-badge{font-size:var(--roxy-text-xs);color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.legend{gap:var(--roxy-space-sm) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);flex-wrap:wrap;padding-block-start:var(--roxy-space-sm);display:flex}.legend-row{align-items:center;gap:var(--roxy-space-xs);font-size:var(--roxy-text-xs);color:var(--roxy-muted);display:flex}.legend-swatch{aspect-ratio:1;border-radius:var(--roxy-radius-sm);flex-shrink:0;block-size:.6lh;display:inline-block}@container (width<=480px){.planet-row{grid-template-rows:auto auto;grid-template-columns:12ch minmax(0,1fr)}.pills{flex-direction:row;grid-column:1/-1;justify-content:flex-start;align-items:center}}`],Fs=m([f("roxy-shadbala-table")],Fs);import{css as lx,html as K,nothing as ge,svg as br}from"lit";function Lh(n){let a=n?.ascendant;if(!a)return;let e=Re.findIndex(t=>t.toLowerCase()===a.sign.toLowerCase());return e<0?void 0:e*30+a.degree}var cx=12,$l=680,J=$l/2,co=204,dx=186,$h=160,wh=258,px=212,Ll=224,po=86,kh={glyph:18,degree:10},hx=1.3,mx=1.85,gx=1.25,yx=.95,ux=.9,Sh=8,Rh=4,Bs=class extends y{constructor(){super(...arguments);this.viewport=new Ce(this);this.type=new yr(this,{glyph:[".p1",kh.glyph],degree:[".planet-deg",kh.degree]})}renderData(e){let{person1:t,person2:r,compatibilityScore:s,analysis:i}=e,o=e.interAspects??[],l=t?.planets??[],c=r?.planets??[],d=typeof s=="number"?Math.round(s):void 0,p=i?.overall,h=i?.strengths??[],x=i?.challenges??[],L=l.length>0&&c.length>0,v=[...o].sort((O,te)=>(te.strength??0)-(O.strength??0)),w=v.slice(0,cx);return K`<div class="wrap" part="card" aria-label="${this.t("Synastry compatibility chart")}"><div class="head" part="header"><h2>${this.t("Synastry")}</h2>${typeof d=="number"?K`<span class="score" aria-label="${this.t("Score {{score}} of 100",{score:d})}">${d} / 100</span>`:ge}</div>${this.renderPeople(t,r)} ${L?K`${this.viewport.renderChartViewport(K`<svg viewBox="0 0 ${$l} ${$l}" part="chart" role="img" aria-label="${this.t("Dual chart wheel comparing two natal charts")}"><title>${this.t("Synastry dual wheel")}</title><circle class="wheel-line" cx="${J}" cy="${J}" r="${co}" stroke-width="1.5"/><circle class="wheel-line" cx="${J}" cy="${J}" r="${co-32}" stroke-width="0.8"/><circle class="wheel-line" cx="${J}" cy="${J}" r="${po}" stroke-width="0.6"/>${this.renderSpokes()} ${this.renderSigns()} ${this.renderInterAspectLines(l,c,o)} ${this.renderRing(l,$h,(O,te,We)=>$h-La(O,te,We,la),"p1",1)} ${this.renderRing(c,wh,(O,te,We)=>wh+La(O,te,We,la),"p2",2)} ${this.renderAscendants(e)}</svg>`,this.t("Synastry dual wheel"),this.translator)}<div class="legend" part="legend"><span><span class="person-dot p1"></span>${this.t("Person 1")}</span> <span><span class="person-dot p2"></span>${this.t("Person 2")}</span> <span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span> <span>${this.t("Sign sectors, not houses")}</span></div>`:K`<p role="status">${this.t("Synastry response missing planet positions.")} ${this.t("A current {{endpoint}} response carries {{first}} and {{second}}, and the inter-aspect readings below still work without them.",{endpoint:"/astrology/synastry",first:"person1.planets",second:"person2.planets"})}</p>`} ${this.renderOverlay(t,r)} ${this.renderSummaryCounts(e.summary)} ${p&&!this.hideReadings?K`<p class="summary">${p}</p>`:ge} ${w.length>0?K`<section class="block" part="section inter-aspects"><h3>${this.t("Inter-aspects")}</h3>${w.map((O,te)=>this.renderAspectCard(O,te))}</section>`:ge} ${v.length>w.length?this.renderCatalog(v):ge} ${!this.hideReadings&&(h.length>0||x.length>0)?K`<div class="lists" part="section strengths-challenges">${h.length?K`<div><h3>${this.t("Strengths")}</h3><ul>${h.map(O=>K`<li>${O}</li>`)}</ul></div>`:ge} ${x.length?K`<div><h3>${this.t("Challenges")}</h3><ul>${x.map(O=>K`<li>${O}</li>`)}</ul></div>`:ge}</div>`:ge}</div>`}renderPeople(e,t){let r=(i,o)=>{if(!i)return ge;let l=i.ascendant,d=[["Sun",i.sunSign??"",g(i,"sunSign")],["Moon",i.moonSign??"",g(i,"moonSign")],["ASC",l?.sign??"",l?`${g(l,"sign")} ${Kt(l.degree)}`:""]].filter(([,,p])=>p);return d.length===0?ge:K`<div class="person"><span class="person-name"><span class="person-dot p${o}" aria-hidden="true"></span>${i.name||this.t("Person {{n}}",{n:o})}</span><div class="big-three">${d.map(([p,h,x])=>K`<span><span class="roxy-label">${this.t(p)}</span> <span aria-hidden="true">${N(h)??""}</span> ${x}</span>`)}</div></div>`},s=[r(e,1),r(t,2)].filter(i=>i!==ge);return s.length===0?ge:K`<div class="people" part="details">${s}</div>`}renderOverlay(e,t){if(!e?.planets?.length||!t?.planets?.length)return ge;let r=(o,l)=>o?.name||this.t("Person {{n}}",{n:l}),s=r(e,1),i=r(t,2);return K`<section class="block" part="section house-overlay"><h3>${this.t("Houses")}</h3>${this.renderOverlayTable(e.planets,s,i,1)} ${this.renderOverlayTable(t.planets,i,s,2)}</section>`}renderOverlayTable(e,t,r,s){let i=e.filter(l=>typeof l.houseInOtherChart=="number");if(i.length===0)return ge;let o=`overlay-${s}`;return K`<div class="overlay-dir"><h4 id="${o}"><span class="person-dot p${s}" aria-hidden="true"></span>${this.t("{{first}} in the houses of {{second}}",{first:t,second:r})}</h4><div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="${o}"><table aria-labelledby="${o}"><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Own house")}</th></tr></thead><tbody>${i.map(l=>K`<tr><td><span aria-hidden="true">${$(l.name)??""}</span> ${g(l,"name")}${l.isRetrograde?K`<span class="retro" title="${this.t("retrograde")}">℞</span>`:ge}</td><td><span aria-hidden="true">${N(l.sign)??""}</span> ${g(l,"sign")}</td><td>${Kt(l.degree)}</td><td class="overlay-house">${l.houseInOtherChart}</td><td class="own-house">${l.house??""}</td></tr>`)}</tbody></table></div></div>`}renderSummaryCounts(e){if(!e||typeof e!="object")return ge;let t=Object.entries(e.byType??{}).sort((r,s)=>s[1]-r[1]);return typeof e.total!="number"&&t.length===0?ge:K`<p class="counts" part="details" role="region" aria-label="${this.t("Inter-aspect summary")}">${typeof e.total=="number"?K`<span>${this.t("Total")}: ${e.total}</span>`:ge} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([r,s])=>K`<span>${Me({type:r})}: ${s}</span>`)}</p>`}renderAspectCard(e,t){let r=$(e.planet1)??"",s=$(e.planet2)??"",i=e.meaning,o=K`<span class="interp-lead"><span aria-hidden="true" class="glyph">${r}</span>${g(e,"planet1")} <span class="asp-name ${Je(e)}">${g(e,"type",Me(e))}</span> <span aria-hidden="true" class="glyph">${s}</span>${g(e,"planet2")}</span>`,l=K`<span class="interp-aside"><small>${this.t("orb {{orb}}° · str {{strength}}",{orb:b(this.effectiveLang(),e.orb,2),strength:b(this.effectiveLang(),e.strength,0)})}</small></span>`;return this.hideReadings||!i?.relationshipContext&&!i?.description?.short&&!i?.description?.long&&!i?.keywords?.length?K`<div class="interp-card" part="reading"><div class="static-head">${o}${l}</div></div>`:K`<details class="interp-card" part="reading" name="synastry-aspects" ?open="${t===0}"><summary>${o}${H()}${l}</summary>${this.renderAspectMeaning(i)}</details>`}renderAspectMeaning(e){return K`<div class="interp-body">${e.relationshipContext?K`<p><span class="context">${this.t("In this pairing")}</span> ${e.relationshipContext}</p>`:ge} ${e.description?.short?K`<p>${e.description.short}</p>`:ge} ${e.description?.long&&e.description.long!==e.description.short?K`<p>${e.description.long}</p>`:ge} ${Pr(e.keywords)}</div>`}renderCatalog(e){return K`<details class="catalog" part="section aspects inter-aspects"><summary>${H()} ${this.t("All {{count}} inter-aspects",{count:e.length})}</summary><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Inter-aspects")}">${this.renderAspects(e)}</div></details>`}toAngle(e){return 180+(Lh(this.data?.person1)??0)-e}renderSpokes(){return Array.from({length:12},(e,t)=>{let r=this.toAngle(t*30),s=T(J,J,po,r),i=T(J,J,co,r);return br`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} stroke-width="0.6" />`})}renderSigns(){return Re.map((e,t)=>{let r=this.toAngle(t*30+15),s=T(J,J,dx,r);return br`<text class="sign" x=${s.x} y=${s.y} text-anchor="middle" dominant-baseline="central">${N(e)}</text>`})}renderRing(e,t,r,s,i){let o={width:hx*this.type.size.glyph,height:yx*this.type.size.glyph},l=p=>({width:(mx+(p.isRetrograde===!0?gx:0))*this.type.size.degree,height:ux*this.type.size.degree}),c=Et(o.width,t);return zt(e,p=>p.longitude,(p,h)=>Math.max(c,Et((l(p).width+l(h).width)/2,r(90,o,l(p))))).map(({item:p,longitude:h,displayLongitude:x})=>{let L=this.toAngle(x),v=T(J,J,t,L),w=T(J,J,r(L,o,l(p)),L),O=$(p.name)??g(p,"name"),te=p.isRetrograde===!0,We=typeof p.house=="number"?` · ${this.t("House {{n}}",{n:p.house})}`:"",Ma=`${g(p,"name")}${te?` ${this.t("retrograde")}`:""} - ${jt(h)} ${g(p,"sign")}${We}`,Cr=Math.abs(x-h)>.5,Tr=T(J,J,t+(i===1?Sh:-Sh),this.toAngle(h)),Er=T(J,J,t+(i===1?Rh:-Rh),L);return br`<g>
317
115
  ${Cr?br`<line class=${`leader ${s}`} x1=${Tr.x} y1=${Tr.y} x2=${Er.x} y2=${Er.y} />`:ge}
318
116
  <text class=${s} x=${v.x} y=${v.y} text-anchor="middle" dominant-baseline="central"><title>${Ma}</title>${O}<tspan class="person-tag" dy="-0.55em" dx="0.15em">${i}</tspan></text>
319
117
  <text class="planet-deg" x=${w.x} y=${w.y} text-anchor="middle" dominant-baseline="central">${Nt(h).degree}°${te?br`<tspan class="retro"> ℞</tspan>`:ge}</text>
320
- </g>`})}renderAscendants(e){let t=[e.person1,e.person2].flatMap((r,s)=>{let i=vh(r);return i===void 0?[]:[{longitude:i,index:s+1}]});return zt(t,r=>r.longitude,Et(34,vl)).map(({item:r,longitude:s,displayLongitude:i})=>{let o=this.toAngle(s),l=this.toAngle(i),c=T(J,J,lo,o),d=T(J,J,px,o),p=T(J,J,vl,l),h=T(J,J,vl-7,l);return br`<g>
118
+ </g>`})}renderAscendants(e){let t=[e.person1,e.person2].flatMap((r,s)=>{let i=Lh(r);return i===void 0?[]:[{longitude:i,index:s+1}]});return zt(t,r=>r.longitude,Et(34,Ll)).map(({item:r,longitude:s,displayLongitude:i})=>{let o=this.toAngle(s),l=this.toAngle(i),c=T(J,J,co,o),d=T(J,J,px,o),p=T(J,J,Ll,l),h=T(J,J,Ll-7,l);return br`<g>
321
119
  <line class="asc-tick" x1=${c.x} y1=${c.y} x2=${d.x} y2=${d.y} />
322
120
  ${Math.abs(i-s)>.5?br`<line class="asc-tick" x1=${d.x} y1=${d.y} x2=${h.x} y2=${h.y} />`:ge}
323
121
  <text class="asc-label" x=${p.x} y=${p.y} text-anchor="middle" dominant-baseline="central">${this.t("ASC{{n}}",{n:r.index})}</text>
324
- </g>`})}renderInterAspectLines(e,t,r){let s=(i,o)=>{let l=A(o);for(let c of i)if(A(c.name)===l&&typeof c.longitude=="number")return c.longitude};return r.filter(ja).map(i=>{let o=s(e,i.planet1),l=s(t,i.planet2);if(o===void 0||l===void 0)return ge;let c=T(J,J,co-2,this.toAngle(o)),d=T(J,J,co-2,this.toAngle(l)),p=b(this.effectiveLang(),i.orb,1);return br`<line class=${`aspect ${Je(i)}`} style=${rn(i)} x1=${c.x} y1=${c.y} x2=${d.x} y2=${d.y}><title>${g(i,"planet1")} ${g(i,"type",Me(i))} ${g(i,"planet2")}${p?` (${this.t("Orb")} ${p}°)`:""}</title></line>`})}renderAspects(e){return K`<table><caption class="roxy-sr-only">${this.t("Inter-chart aspects: the planet from chart 1, the planet from chart 2, the aspect between them, the orb in degrees and the strength.")}</caption><thead><tr><th scope="col">${this.t("Planet 1")}</th><th scope="col">${this.t("Planet 2")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("Orb")}</th><th scope="col">${this.t("Strength")}</th>${this.hideReadings?ge:K`<th scope="col">${this.t("Reading")}</th>`}</tr></thead><tbody>${e.map(t=>K`<tr><td>${g(t,"planet1")}</td><td>${g(t,"planet2")}</td><td>${g(t,"type",Me(t))}</td><td class="orb">${b(this.effectiveLang(),t.orb,1)}</td><td>${b(this.effectiveLang(),t.strength,0)}</td>${this.hideReadings?ge:K`<td>${t.meaning?K`<details part="reading"><summary>${H()} ${this.t("Reading")}</summary>${this.renderAspectMeaning(t.meaning)}</details>`:ge}</td>`}</tr>`)}</tbody></table>`}};Bs.endpoints=zc,Bs.styles=[u,Ge,an,M,j,lx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,h4,p,ul{margin:0}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.score{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,50rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border)}.p1{--_person:var(--roxy-accent-ink)}.p2{--_person:var(--roxy-fg)}.sign{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}text.p1,text.p2{fill:var(--_person);font-size:calc(var(--roxy-text-base) * 1.125);font-weight:var(--roxy-weight-bold)}.person-tag,.planet-deg{font-size:calc(var(--roxy-text-base) * .625)}.planet-deg{fill:var(--roxy-muted)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.leader{stroke:var(--_person);stroke-width:.5px;opacity:.7}@container (width<=480px){.sign,text.p1,text.p2{font-size:calc(var(--roxy-text-base) * 1.75)}.person-tag,.planet-deg{font-size:calc(var(--roxy-text-base) * .9375)}}.asc-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}.asc-label{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold)}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.person-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_person);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.people,.lists{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}.person,.lists>div{gap:var(--roxy-space-xs);align-content:start;display:grid}.person-name{font-weight:var(--roxy-weight-bold)}.big-three{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.lists ul{font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md)}.overlay-dir{gap:var(--roxy-space-xs);display:grid}.overlay-dir+.overlay-dir{margin-block-start:var(--roxy-space-md)}.overlay-house{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.own-house,.retro{color:var(--roxy-muted)}.retro{margin-inline-start:var(--roxy-space-xs)}.glyph{line-height:1}.static-head{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.asp-name,.context{font-weight:var(--roxy-weight-bold)}.catalog>summary{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);font-size:var(--roxy-text-sm);display:flex}.scroll{min-width:0;overflow-x:auto}.catalog .scroll{margin-block-start:var(--roxy-space-sm)}table{width:100%}td.orb{color:var(--roxy-muted)}td .interp-body{white-space:normal;min-width:32ch}`],Bs=m([f("roxy-synastry-chart")],Bs);import{css as fx,html as sa,nothing as un}from"lit";import{state as xx}from"lit/decorators.js";function Hs(n,a){return I(n,"arcana",a,`${A(a)} Arcana`)}function jn(n,a){return I(n,"suit",a,A(a))}var bx=[["love","Love"],["career","Career"],["finances","Finance"],["health","Health"],["spirituality","Spiritual"]],vr=class extends y{constructor(){super(...arguments);this.orientation="upright"}renderData(e){return"card"in e?this.renderDailyCard(e):this.renderFullCard(e)}renderDailyCard(e){let t=e.card,r=!!t.reversed,s=t.keywords??[],i=this.effectiveLang(),o=[t.arcana?Hs(i,t.arcana):"",t.suit?jn(i,t.suit):""].filter(Boolean).join(" · "),l=!this.hideReadings;return sa`<article class="card" part="card" aria-label="${t.name??this.t("Tarot card")}">${this.renderImage(t.imageUrl,t.name,r)}<div part="header"><div class="meta roxy-label">${o?`${o} · `:""}<span class="drawn">${r?this.t("drawn reversed"):this.t("drawn upright")}</span></div><h2>${t.name??this.t("Tarot card")}</h2>${e.dailyMessage&&l?sa`<p class="message">${e.dailyMessage}</p>`:un} ${t.meaning&&l?sa`<p class="reading">${t.meaning}</p>`:un} ${s.length>0&&l?sa`<ul class="roxy-chips">${s.map(c=>sa`<li>${c}</li>`)}</ul>`:un} ${this.renderGuidance(t,"tarot-daily-guidance")}</div></article>`}renderFullCard(e){let t=this.orientation==="reversed",r=t?e.reversed:e.upright,s=(t?e.keywords?.reversed:e.keywords?.upright)??r?.keywords??[],i=!this.hideReadings;return sa`<article class="card" part="card" aria-label="${e.name??this.t("Tarot card")}">${this.renderImage(e.imageUrl,e.name,t)}<div part="header"><div class="meta roxy-label">${[e.arcana?Hs(this.effectiveLang(),e.arcana):"",e.suit?jn(this.effectiveLang(),e.suit):"",e.number!==void 0&&e.number!==null?this.t("no. {{number}}",{number:e.number}):""].filter(Boolean).join(" · ")}</div><h2>${e.name??this.t("Tarot card")}</h2>${dt({items:[{id:"upright",label:this.t("Upright")},{id:"reversed",label:this.t("Reversed")}],active:this.orientation,onSelect:o=>{this.orientation=o},label:this.t("Card orientation"),idPrefix:"tarot",controls:!0})}<div id="tarot-panel-${this.orientation}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="tarot-tab-${this.orientation}">${r?.description&&i?sa`<p class="reading">${r.description}</p>`:un} ${s.length>0&&i?sa`<ul class="roxy-chips">${s.map(o=>sa`<li>${o}</li>`)}</ul>`:un} ${this.renderGuidance(r,`tarot-${this.orientation}-guidance`)}</div></div></article>`}renderImage(e,t,r){let s=`image ${r?"reversed":""}`;return e?sa`<img class="${s}" part="chart" src="${e}" alt="${t??this.t("Tarot card")}">`:sa`<div class="${s}" part="chart" style="aspect-ratio:0.6;display:flex;align-items:center;justify-content:center;color:var(--roxy-muted)">${t??"?"}</div>`}renderGuidance(e,t){if(!e)return un;let r=bx.map(([s,i])=>({label:this.t(i),body:e[s]??""}));return this.renderInterpretation(r,t,"Guidance")}};vr.endpoints=Oc,vr.styles=[u,M,j,Xe,fx`.card{align-items:start;gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,6lh) minmax(0,1fr);display:grid}@container (width<=480px){.card{grid-template-columns:minmax(0,1fr)}}h2,p{margin:0}.image{border-radius:var(--roxy-radius-md);background:var(--roxy-border);width:100%;height:auto;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.image.reversed{transform:rotate(180deg)}.meta{margin-block-end:var(--roxy-space-sm)}.drawn{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.message{margin-block:var(--roxy-space-sm) var(--roxy-space-md)}.reading{white-space:pre-line;margin-block-end:var(--roxy-space-md)}.roxy-tablist{margin-block:var(--roxy-space-sm)}.roxy-chips{margin-block-start:var(--roxy-space-sm)}`],m([xx()],vr.prototype,"orientation",2),vr=m([f("roxy-tarot-card")],vr);import{css as vx,html as Kn,nothing as Lx}from"lit";import{property as $x}from"lit/decorators.js";var Lr=class extends y{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-tarot-card",path:"tarot/cards/{id}"};this.listKey="cards"}renderData(e){let t=e.cards??[];if(t.length===0)return this.renderEmpty();let r=this.heading||this.t("Tarot deck"),s=typeof e.total=="number"?e.total:t.length,i=this.effectiveLang();return Kn`<section class="wrap" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="count">${s===1?this.t("1 card"):this.t("{{count}} cards",{count:s})}</span></header><ul class="grid" part="section cards">${t.map(o=>Kn`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===o.id?"true":"false"}" @click="${()=>this.pickRow({id:o.id,name:o.name})}">${o.imageUrl?Kn`<img class="art" src="${o.imageUrl}" alt="${o.name??this.t("Tarot card")}" loading="lazy">`:Kn`<div class="art" aria-hidden="true"></div>`}<p class="name">${o.name}</p><p class="meta">${wx(i,o)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Kn`<div class="detail" part="detail">${this.openedRow}</div>`:Lx}</section>`}};Lr.endpoints=Gc,Lr.styles=[u,vx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,14ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.art{aspect-ratio:2/3;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],m([$x({type:String,reflect:!0})],Lr.prototype,"heading",2),Lr=m([f("roxy-tarot-catalog")],Lr);function wx(n,a){let e=Hs(n,a.arcana);return a.suit?`${e} · ${jn(n,a.suit)}`:e}import{css as kx,html as $e,nothing as kt}from"lit";import{property as Sx}from"lit/decorators.js";function Rx(n){return n&&n.charAt(0).toUpperCase()+n.slice(1)}var $r=class extends y{constructor(){super(...arguments);this.spread="three-card"}renderData(e){let t="answer"in e,r="cards"in e&&!("spread"in e),s=r?[]:"positions"in e?e.positions??[]:[],i=r&&"cards"in e?e.cards:[],o=t?e:void 0,l=g(o,"strength"),c=o?.card,d=t?this.t("Yes or no"):r?this.t("Card draw"):Rx(("spread"in e?e.spread:"")||this.spread.replace(/-/g," ")),p="question"in e?e.question:void 0,h="summary"in e?e.summary:void 0,x=o?.interpretation,L=o?.answer?o.answer.toLowerCase():"";return $e`<article class="wrap" part="card" aria-label="${this.t("Tarot spread")}"><header class="head" part="header"><h2 class="title">${d}</h2>${p?$e`<span class="question">"${p}"</span>`:kt}</header>${t?$e`<div class="verdict" part="section verdict"><div class="card"><div class="image" part="chart">${c?.imageUrl?$e`<img src="${c.imageUrl}" alt="${c.name??this.t("Tarot card")}" class="${c.reversed?"reversed":""}">`:$e`${c?.name??"?"}`}</div><p class="name">${c?.name??""} ${c?.reversed?$e`<small>${this.t("(reversed)")}</small>`:kt}</p>${c?.arcana?$e`<p class="roxy-label">${Hs(this.effectiveLang(),c.arcana)}</p>`:kt}</div><div class="meta" part="details"><div><span class="${`answer ${L}`}">${g(o,"answer")}</span> ${l?$e`<small>· ${l}</small>`:kt}</div>${c?.keywords&&c.keywords.length>0&&!this.hideReadings?$e`<ul class="roxy-chips">${c.keywords.map(v=>$e`<li>${v}</li>`)}</ul>`:kt}</div></div>`:kt} ${s.length>0?$e`<div class="grid" part="section positions">${s.map(v=>$e`<div class="card"><p class="roxy-label">${v.name??""}</p><div class="image" part="chart">${v.card?.imageUrl?$e`<img src="${v.card.imageUrl}" alt="${v.card.name??this.t("Tarot card")}" class="${v.card.reversed?"reversed":""}">`:$e`${v.card?.name??"?"}`}</div><p class="name">${v.card?.name??""} ${v.card?.reversed?$e`<small>${this.t("(reversed)")}</small>`:kt}</p>${v.interpretation&&!this.hideReadings?$e`<p class="interp">${v.interpretation}</p>`:kt}</div>`)}</div>`:kt} ${i.length>0?$e`<div class="grid" part="section cards">${i.map(v=>$e`<div class="card"><div class="image" part="chart">${v.imageUrl?$e`<img src="${v.imageUrl}" alt="${v.name??this.t("Tarot card")}" class="${v.reversed?"reversed":""}">`:$e`${v.name??"?"}`}</div><p class="name">${v.name??""} ${v.reversed?$e`<small>${this.t("(reversed)")}</small>`:kt}</p>${v.meaning&&!this.hideReadings?$e`<p class="interp">${v.meaning}</p>`:kt}</div>`)}</div>`:kt} ${h&&!this.hideReadings?$e`<p>${h}</p>`:kt} ${x&&!this.hideReadings?$e`<p>${x}</p>`:kt}</article>`}};$r.endpoints=Ic,$r.styles=[u,kx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title{text-transform:capitalize}.question{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-style:italic}.answer{font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight)}.answer.yes{color:var(--roxy-success-fg)}.answer.no{color:var(--roxy-danger-fg)}.answer.maybe{color:var(--roxy-warning-fg)}.verdict{align-items:start;gap:var(--roxy-space-md);grid-template-columns:minmax(0,6lh) minmax(0,1fr);display:grid}@container (width<=26rem){.verdict{grid-template-columns:minmax(0,1fr)}}.verdict .meta{justify-items:start;gap:var(--roxy-space-sm);display:grid}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));display:grid}.card{align-content:start;gap:var(--roxy-space-xs);grid-template-columns:minmax(0,1fr);display:grid}.image{aspect-ratio:.6;border-radius:var(--roxy-radius-sm);background:var(--roxy-border);width:100%;color:var(--roxy-muted);font-size:var(--roxy-text-xs);justify-content:center;align-items:center;display:flex;overflow:hidden}.image img{object-fit:cover;width:100%;height:100%;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.image img.reversed{transform:rotate(180deg)}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.interp{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}`],m([Sx({type:String,reflect:!0})],$r.prototype,"spread",2),$r=m([f("roxy-tarot-spread")],$r);import{css as Cx,html as Ze,nothing as He,svg as Pa}from"lit";import{property as $l}from"lit/decorators.js";import{ifDefined as wl}from"lit/directives/if-defined.js";var Sl=640,F=Sl/2,Tx=212,Ex=226,Vn=204,Dx=186,kl=168,Rh=250,Ch=142,qn=78,Ax=166,Th={glyph:18,degree:10},Px=.95,Mx=1.85,_x=1.25,Nx=.9,zx=8,Ox=4,po=(n,a)=>$(n)??a,ho=n=>{let a=new Map;for(let e of n)a.set(A(e.name),e);return a},ua=class extends y{constructor(){super(...arguments);this.viewport=new Ce(this);this.heading="Transits";this.type=new yr(this,{glyph:[".natal-glyph",Th.glyph],degree:[".planet-deg",Th.degree]})}get effectiveAscendant(){for(let e of[this.ascendant,this.data?.ascendant?.longitude])if(typeof e=="number"&&Number.isFinite(e))return e}get ascendantGiven(){return this.effectiveAscendant!==void 0}get cuspsFromPage(){return Array.isArray(this.houses)}get cusps(){let e=this.houses??this.data?.houses;if(!Array.isArray(e)||e.length!==12)return null;let t=e.map((s,i)=>typeof s=="number"?{number:i+1,longitude:s}:{number:Number(s?.number),longitude:Number(s?.longitude)}).sort((s,i)=>s.number-i.number);return t.every((s,i)=>s.number===i+1&&Number.isFinite(s.longitude))?t:null}toAngle(e){return 180+(this.effectiveAscendant??this.cusps?.[0]?.longitude??0)-e}renderData(e){let t=e.natalPlanets??[],r=e.transitPlanets??[],s=e.aspects??[],i=V(this.effectiveLang(),e.transitDate),o=s.length>0?this.t("Aspects to the natal chart: {{count}}",{count:s.length}):"",l=[...t,...r].some(c=>Number.isFinite(c.house));return Ze`<div class="wrap" part="card" aria-label="${this.t("Natal and transit bi-wheel")}"><div class="head" part="header"><h2>${this.t(this.heading)}</h2>${i||o?Ze`<p class="roxy-label">${[i,o].filter(Boolean).join(" · ")}</p>`:He}</div>${this.renderWheel(t,r,s)} ${this.renderLegend(t,r,s,l?e.houseSystem:void 0)} ${this.renderSummary(e.summary)} ${this.renderPositions(t,r,l)} ${this.renderPositionDetails(e)} ${this.renderAspectDetails(s)}</div>`}get orientationCaption(){return this.ascendantGiven?this.t("Ascendant on the left horizon"):this.cusps?this.t("First house cusp on the left horizon"):this.t("Sign wheel, 0° Aries on the left")}get cuspCaption(){return this.cusps?this.cuspsFromPage?this.t("House cusps supplied by the page"):this.t("House cusps from the response"):this.t("No house cusps")}renderWheel(e,t,r){return this.viewport.renderChartViewport(Ze`<svg viewBox="0 0 ${Sl} ${Sl}" part="chart" role="img" aria-label="${this.t("Bi-wheel with natal bodies on the inner ring and transiting bodies on the outer ring")}"><title>${this.t("Natal and transit bi-wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Natal bodies sit at their ecliptic longitudes on the inner ring and transiting bodies on the outer ring, and each line joins a transiting body to the natal body it aspects.")} ${this.orientationCaption}. ${this.cuspCaption}.</desc><circle class="wheel-line" cx="${F}" cy="${F}" r="${Vn}" stroke-width="1.5"/><circle class="wheel-line" cx="${F}" cy="${F}" r="${kl}" stroke-width="0.8"/><circle class="wheel-line" cx="${F}" cy="${F}" r="${qn}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(e,t,r)} ${this.renderRing(e,Ch,(s,i,o)=>Ch-La(s,i,o,la),"natal-glyph",this.t("Natal"),1)} ${this.renderRing(t,Rh,(s,i,o)=>Rh+La(s,i,o,la),"transit-glyph",this.t("Transiting"),-1)} ${this.renderAxis()}</svg>`,this.t("Natal and transit bi-wheel"),this.translator)}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let r=this.toAngle(t),s=t%30===0,i=T(F,F,s?kl:Vn-5,r),o=T(F,F,Vn,r);e.push(Pa`<line class=${s?"tick tick-major":"tick"} x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width=${s?1:.5} />`)}return e}renderSpokes(){return Re.map((e,t)=>{let r=this.toAngle(t*30),s=T(F,F,qn,r),i=T(F,F,Vn,r);return Pa`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} stroke-width="0.6" />`})}renderHouses(){let e=this.cusps;return e?e.map((t,r)=>{let s=e[(r+1)%12],i=this.toAngle(t.longitude),o=T(F,F,qn,i),l=T(F,F,kl,i),c=T(F,F,Ax,this.toAngle(di(t.longitude,s?.longitude??t.longitude+30)));return Pa`<g>
122
+ </g>`})}renderInterAspectLines(e,t,r){let s=(i,o)=>{let l=A(o);for(let c of i)if(A(c.name)===l&&typeof c.longitude=="number")return c.longitude};return r.filter(ja).map(i=>{let o=s(e,i.planet1),l=s(t,i.planet2);if(o===void 0||l===void 0)return ge;let c=T(J,J,po-2,this.toAngle(o)),d=T(J,J,po-2,this.toAngle(l)),p=b(this.effectiveLang(),i.orb,1);return br`<line class=${`aspect ${Je(i)}`} style=${rn(i)} x1=${c.x} y1=${c.y} x2=${d.x} y2=${d.y}><title>${g(i,"planet1")} ${g(i,"type",Me(i))} ${g(i,"planet2")}${p?` (${this.t("Orb")} ${p}°)`:""}</title></line>`})}renderAspects(e){return K`<table><caption class="roxy-sr-only">${this.t("Inter-chart aspects: the planet from chart 1, the planet from chart 2, the aspect between them, the orb in degrees and the strength.")}</caption><thead><tr><th scope="col">${this.t("Planet 1")}</th><th scope="col">${this.t("Planet 2")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("Orb")}</th><th scope="col">${this.t("Strength")}</th>${this.hideReadings?ge:K`<th scope="col">${this.t("Reading")}</th>`}</tr></thead><tbody>${e.map(t=>K`<tr><td>${g(t,"planet1")}</td><td>${g(t,"planet2")}</td><td>${g(t,"type",Me(t))}</td><td class="orb">${b(this.effectiveLang(),t.orb,1)}</td><td>${b(this.effectiveLang(),t.strength,0)}</td>${this.hideReadings?ge:K`<td>${t.meaning?K`<details part="reading"><summary>${H()} ${this.t("Reading")}</summary>${this.renderAspectMeaning(t.meaning)}</details>`:ge}</td>`}</tr>`)}</tbody></table>`}};Bs.endpoints=Oc,Bs.styles=[u,Ge,an,M,j,lx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,h3,h4,p,ul{margin:0}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.score{color:var(--roxy-accent-ink);font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,50rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line{fill:none;stroke:var(--roxy-border)}.p1{--_person:var(--roxy-accent-ink)}.p2{--_person:var(--roxy-fg)}.sign{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}text.p1,text.p2{fill:var(--_person);font-size:calc(var(--roxy-text-base) * 1.125);font-weight:var(--roxy-weight-bold)}.person-tag,.planet-deg{font-size:calc(var(--roxy-text-base) * .625)}.planet-deg{fill:var(--roxy-muted)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.leader{stroke:var(--_person);stroke-width:.5px;opacity:.7}@container (width<=480px){.sign,text.p1,text.p2{font-size:calc(var(--roxy-text-base) * 1.75)}.person-tag,.planet-deg{font-size:calc(var(--roxy-text-base) * .9375)}}.asc-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}.asc-label{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .5625);font-weight:var(--roxy-weight-bold)}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-xs);color:var(--roxy-muted);flex-wrap:wrap;display:flex}.counts{font-size:var(--roxy-text-sm);color:var(--roxy-fg)}.person-dot{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_person);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.people,.lists{gap:var(--roxy-space-sm) var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,28ch),1fr));display:grid}.person,.lists>div{gap:var(--roxy-space-xs);align-content:start;display:grid}.person-name{font-weight:var(--roxy-weight-bold)}.big-three{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.lists ul{font-size:var(--roxy-text-sm);padding-inline-start:var(--roxy-space-md)}.overlay-dir{gap:var(--roxy-space-xs);display:grid}.overlay-dir+.overlay-dir{margin-block-start:var(--roxy-space-md)}.overlay-house{color:var(--roxy-accent-ink);font-weight:var(--roxy-weight-bold)}.own-house,.retro{color:var(--roxy-muted)}.retro{margin-inline-start:var(--roxy-space-xs)}.glyph{line-height:1}.static-head{align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.asp-name,.context{font-weight:var(--roxy-weight-bold)}.catalog>summary{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);font-size:var(--roxy-text-sm);display:flex}.scroll{min-width:0;overflow-x:auto}.catalog .scroll{margin-block-start:var(--roxy-space-sm)}table{width:100%}td.orb{color:var(--roxy-muted)}td .interp-body{white-space:normal;min-width:32ch}`],Bs=m([f("roxy-synastry-chart")],Bs);import{css as fx,html as sa,nothing as un}from"lit";import{state as xx}from"lit/decorators.js";function Hs(n,a){return I(n,"arcana",a,`${A(a)} Arcana`)}function jn(n,a){return I(n,"suit",a,A(a))}var bx=[["love","Love"],["career","Career"],["finances","Finance"],["health","Health"],["spirituality","Spiritual"]],vr=class extends y{constructor(){super(...arguments);this.orientation="upright"}renderData(e){return"card"in e?this.renderDailyCard(e):this.renderFullCard(e)}renderDailyCard(e){let t=e.card,r=!!t.reversed,s=t.keywords??[],i=this.effectiveLang(),o=[t.arcana?Hs(i,t.arcana):"",t.suit?jn(i,t.suit):""].filter(Boolean).join(" · "),l=!this.hideReadings;return sa`<article class="card" part="card" aria-label="${t.name??this.t("Tarot card")}">${this.renderImage(t.imageUrl,t.name,r)}<div part="header"><div class="meta roxy-label">${o?`${o} · `:""}<span class="drawn">${r?this.t("drawn reversed"):this.t("drawn upright")}</span></div><h2>${t.name??this.t("Tarot card")}</h2>${e.dailyMessage&&l?sa`<p class="message">${e.dailyMessage}</p>`:un} ${t.meaning&&l?sa`<p class="reading">${t.meaning}</p>`:un} ${s.length>0&&l?sa`<ul class="roxy-chips">${s.map(c=>sa`<li>${c}</li>`)}</ul>`:un} ${this.renderGuidance(t,"tarot-daily-guidance")}</div></article>`}renderFullCard(e){let t=this.orientation==="reversed",r=t?e.reversed:e.upright,s=(t?e.keywords?.reversed:e.keywords?.upright)??r?.keywords??[],i=!this.hideReadings;return sa`<article class="card" part="card" aria-label="${e.name??this.t("Tarot card")}">${this.renderImage(e.imageUrl,e.name,t)}<div part="header"><div class="meta roxy-label">${[e.arcana?Hs(this.effectiveLang(),e.arcana):"",e.suit?jn(this.effectiveLang(),e.suit):"",e.number!==void 0&&e.number!==null?this.t("no. {{number}}",{number:e.number}):""].filter(Boolean).join(" · ")}</div><h2>${e.name??this.t("Tarot card")}</h2>${dt({items:[{id:"upright",label:this.t("Upright")},{id:"reversed",label:this.t("Reversed")}],active:this.orientation,onSelect:o=>{this.orientation=o},label:this.t("Card orientation"),idPrefix:"tarot",controls:!0})}<div id="tarot-panel-${this.orientation}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="tarot-tab-${this.orientation}">${r?.description&&i?sa`<p class="reading">${r.description}</p>`:un} ${s.length>0&&i?sa`<ul class="roxy-chips">${s.map(o=>sa`<li>${o}</li>`)}</ul>`:un} ${this.renderGuidance(r,`tarot-${this.orientation}-guidance`)}</div></div></article>`}renderImage(e,t,r){let s=`image ${r?"reversed":""}`;return e?sa`<img class="${s}" part="chart" src="${e}" alt="${t??this.t("Tarot card")}">`:sa`<div class="${s}" part="chart" style="aspect-ratio:0.6;display:flex;align-items:center;justify-content:center;color:var(--roxy-muted)">${t??"?"}</div>`}renderGuidance(e,t){if(!e)return un;let r=bx.map(([s,i])=>({label:this.t(i),body:e[s]??""}));return this.renderInterpretation(r,t,"Guidance")}};vr.endpoints=Gc,vr.styles=[u,M,j,Xe,fx`.card{align-items:start;gap:var(--roxy-space-lg);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,6lh) minmax(0,1fr);display:grid}@container (width<=480px){.card{grid-template-columns:minmax(0,1fr)}}h2,p{margin:0}.image{border-radius:var(--roxy-radius-md);background:var(--roxy-border);width:100%;height:auto;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.image.reversed{transform:rotate(180deg)}.meta{margin-block-end:var(--roxy-space-sm)}.drawn{color:var(--roxy-fg);font-weight:var(--roxy-weight-bold)}.message{margin-block:var(--roxy-space-sm) var(--roxy-space-md)}.reading{white-space:pre-line;margin-block-end:var(--roxy-space-md)}.roxy-tablist{margin-block:var(--roxy-space-sm)}.roxy-chips{margin-block-start:var(--roxy-space-sm)}`],m([xx()],vr.prototype,"orientation",2),vr=m([f("roxy-tarot-card")],vr);import{css as vx,html as Kn,nothing as Lx}from"lit";import{property as $x}from"lit/decorators.js";var Lr=class extends y{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-tarot-card",path:"tarot/cards/{id}"};this.listKey="cards"}renderData(e){let t=e.cards??[];if(t.length===0)return this.renderEmpty();let r=this.heading||this.t("Tarot deck"),s=typeof e.total=="number"?e.total:t.length,i=this.effectiveLang();return Kn`<section class="wrap" part="card" aria-label="${r}"><header class="head" part="header"><h2>${r}</h2><span class="count">${s===1?this.t("1 card"):this.t("{{count}} cards",{count:s})}</span></header><ul class="grid" part="section cards">${t.map(o=>Kn`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===o.id?"true":"false"}" @click="${()=>this.pickRow({id:o.id,name:o.name})}">${o.imageUrl?Kn`<img class="art" src="${o.imageUrl}" alt="${o.name??this.t("Tarot card")}" loading="lazy">`:Kn`<div class="art" aria-hidden="true"></div>`}<p class="name">${o.name}</p><p class="meta">${wx(i,o)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?Kn`<div class="detail" part="detail">${this.openedRow}</div>`:Lx}</section>`}};Lr.endpoints=Ic,Lr.styles=[u,vx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,14ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.art{aspect-ratio:2/3;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],m([$x({type:String,reflect:!0})],Lr.prototype,"heading",2),Lr=m([f("roxy-tarot-catalog")],Lr);function wx(n,a){let e=Hs(n,a.arcana);return a.suit?`${e} · ${jn(n,a.suit)}`:e}import{css as kx,html as $e,nothing as kt}from"lit";import{property as Sx}from"lit/decorators.js";function Rx(n){return n&&n.charAt(0).toUpperCase()+n.slice(1)}var $r=class extends y{constructor(){super(...arguments);this.spread="three-card"}renderData(e){let t="answer"in e,r="cards"in e&&!("spread"in e),s=r?[]:"positions"in e?e.positions??[]:[],i=r&&"cards"in e?e.cards:[],o=t?e:void 0,l=g(o,"strength"),c=o?.card,d=t?this.t("Yes or no"):r?this.t("Card draw"):Rx(("spread"in e?e.spread:"")||this.spread.replace(/-/g," ")),p="question"in e?e.question:void 0,h="summary"in e?e.summary:void 0,x=o?.interpretation,L=o?.answer?o.answer.toLowerCase():"";return $e`<article class="wrap" part="card" aria-label="${this.t("Tarot spread")}"><header class="head" part="header"><h2 class="title">${d}</h2>${p?$e`<span class="question">"${p}"</span>`:kt}</header>${t?$e`<div class="verdict" part="section verdict"><div class="card"><div class="image" part="chart">${c?.imageUrl?$e`<img src="${c.imageUrl}" alt="${c.name??this.t("Tarot card")}" class="${c.reversed?"reversed":""}">`:$e`${c?.name??"?"}`}</div><p class="name">${c?.name??""} ${c?.reversed?$e`<small>${this.t("(reversed)")}</small>`:kt}</p>${c?.arcana?$e`<p class="roxy-label">${Hs(this.effectiveLang(),c.arcana)}</p>`:kt}</div><div class="meta" part="details"><div><span class="${`answer ${L}`}">${g(o,"answer")}</span> ${l?$e`<small>· ${l}</small>`:kt}</div>${c?.keywords&&c.keywords.length>0&&!this.hideReadings?$e`<ul class="roxy-chips">${c.keywords.map(v=>$e`<li>${v}</li>`)}</ul>`:kt}</div></div>`:kt} ${s.length>0?$e`<div class="grid" part="section positions">${s.map(v=>$e`<div class="card"><p class="roxy-label">${v.name??""}</p><div class="image" part="chart">${v.card?.imageUrl?$e`<img src="${v.card.imageUrl}" alt="${v.card.name??this.t("Tarot card")}" class="${v.card.reversed?"reversed":""}">`:$e`${v.card?.name??"?"}`}</div><p class="name">${v.card?.name??""} ${v.card?.reversed?$e`<small>${this.t("(reversed)")}</small>`:kt}</p>${v.interpretation&&!this.hideReadings?$e`<p class="interp">${v.interpretation}</p>`:kt}</div>`)}</div>`:kt} ${i.length>0?$e`<div class="grid" part="section cards">${i.map(v=>$e`<div class="card"><div class="image" part="chart">${v.imageUrl?$e`<img src="${v.imageUrl}" alt="${v.name??this.t("Tarot card")}" class="${v.reversed?"reversed":""}">`:$e`${v.name??"?"}`}</div><p class="name">${v.name??""} ${v.reversed?$e`<small>${this.t("(reversed)")}</small>`:kt}</p>${v.meaning&&!this.hideReadings?$e`<p class="interp">${v.meaning}</p>`:kt}</div>`)}</div>`:kt} ${h&&!this.hideReadings?$e`<p>${h}</p>`:kt} ${x&&!this.hideReadings?$e`<p>${x}</p>`:kt}</article>`}};$r.endpoints=Fc,$r.styles=[u,kx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.title{text-transform:capitalize}.question{color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-style:italic}.answer{font-size:var(--roxy-text-xl);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight)}.answer.yes{color:var(--roxy-success-fg)}.answer.no{color:var(--roxy-danger-fg)}.answer.maybe{color:var(--roxy-warning-fg)}.verdict{align-items:start;gap:var(--roxy-space-md);grid-template-columns:minmax(0,6lh) minmax(0,1fr);display:grid}@container (width<=26rem){.verdict{grid-template-columns:minmax(0,1fr)}}.verdict .meta{justify-items:start;gap:var(--roxy-space-sm);display:grid}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,16ch),1fr));display:grid}.card{align-content:start;gap:var(--roxy-space-xs);grid-template-columns:minmax(0,1fr);display:grid}.image{aspect-ratio:.6;border-radius:var(--roxy-radius-sm);background:var(--roxy-border);width:100%;color:var(--roxy-muted);font-size:var(--roxy-text-xs);justify-content:center;align-items:center;display:flex;overflow:hidden}.image img{object-fit:cover;width:100%;height:100%;transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing)}.image img.reversed{transform:rotate(180deg)}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.interp{color:var(--roxy-secondary);font-size:var(--roxy-text-xs)}`],m([Sx({type:String,reflect:!0})],$r.prototype,"spread",2),$r=m([f("roxy-tarot-spread")],$r);import{css as Cx,html as Ze,nothing as He,svg as Pa}from"lit";import{property as wl}from"lit/decorators.js";import{ifDefined as kl}from"lit/directives/if-defined.js";var Rl=640,F=Rl/2,Tx=212,Ex=226,Vn=204,Dx=186,Sl=168,Ch=250,Th=142,qn=78,Ax=166,Eh={glyph:18,degree:10},Px=.95,Mx=1.85,_x=1.25,Nx=.9,zx=8,Ox=4,ho=(n,a)=>$(n)??a,mo=n=>{let a=new Map;for(let e of n)a.set(A(e.name),e);return a},ua=class extends y{constructor(){super(...arguments);this.viewport=new Ce(this);this.heading="Transits";this.type=new yr(this,{glyph:[".natal-glyph",Eh.glyph],degree:[".planet-deg",Eh.degree]})}get effectiveAscendant(){for(let e of[this.ascendant,this.data?.ascendant?.longitude])if(typeof e=="number"&&Number.isFinite(e))return e}get ascendantGiven(){return this.effectiveAscendant!==void 0}get cuspsFromPage(){return Array.isArray(this.houses)}get cusps(){let e=this.houses??this.data?.houses;if(!Array.isArray(e)||e.length!==12)return null;let t=e.map((s,i)=>typeof s=="number"?{number:i+1,longitude:s}:{number:Number(s?.number),longitude:Number(s?.longitude)}).sort((s,i)=>s.number-i.number);return t.every((s,i)=>s.number===i+1&&Number.isFinite(s.longitude))?t:null}toAngle(e){return 180+(this.effectiveAscendant??this.cusps?.[0]?.longitude??0)-e}renderData(e){let t=e.natalPlanets??[],r=e.transitPlanets??[],s=e.aspects??[],i=V(this.effectiveLang(),e.transitDate),o=s.length>0?this.t("Aspects to the natal chart: {{count}}",{count:s.length}):"",l=[...t,...r].some(c=>Number.isFinite(c.house));return Ze`<div class="wrap" part="card" aria-label="${this.t("Natal and transit bi-wheel")}"><div class="head" part="header"><h2>${this.t(this.heading)}</h2>${i||o?Ze`<p class="roxy-label">${[i,o].filter(Boolean).join(" · ")}</p>`:He}</div>${this.renderWheel(t,r,s)} ${this.renderLegend(t,r,s,l?e.houseSystem:void 0)} ${this.renderSummary(e.summary)} ${this.renderPositions(t,r,l)} ${this.renderPositionDetails(e)} ${this.renderAspectDetails(s)}</div>`}get orientationCaption(){return this.ascendantGiven?this.t("Ascendant on the left horizon"):this.cusps?this.t("First house cusp on the left horizon"):this.t("Sign wheel, 0° Aries on the left")}get cuspCaption(){return this.cusps?this.cuspsFromPage?this.t("House cusps supplied by the page"):this.t("House cusps from the response"):this.t("No house cusps")}renderWheel(e,t,r){return this.viewport.renderChartViewport(Ze`<svg viewBox="0 0 ${Rl} ${Rl}" part="chart" role="img" aria-label="${this.t("Bi-wheel with natal bodies on the inner ring and transiting bodies on the outer ring")}"><title>${this.t("Natal and transit bi-wheel")}</title><desc>${this.t("Twelve zodiac sign segments around a circular wheel. Natal bodies sit at their ecliptic longitudes on the inner ring and transiting bodies on the outer ring, and each line joins a transiting body to the natal body it aspects.")} ${this.orientationCaption}. ${this.cuspCaption}.</desc><circle class="wheel-line" cx="${F}" cy="${F}" r="${Vn}" stroke-width="1.5"/><circle class="wheel-line" cx="${F}" cy="${F}" r="${Sl}" stroke-width="0.8"/><circle class="wheel-line" cx="${F}" cy="${F}" r="${qn}" stroke-width="0.5"/>${this.renderTicks()} ${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouses()} ${this.renderAspectLines(e,t,r)} ${this.renderRing(e,Th,(s,i,o)=>Th-La(s,i,o,la),"natal-glyph",this.t("Natal"),1)} ${this.renderRing(t,Ch,(s,i,o)=>Ch+La(s,i,o,la),"transit-glyph",this.t("Transiting"),-1)} ${this.renderAxis()}</svg>`,this.t("Natal and transit bi-wheel"),this.translator)}renderTicks(){let e=[];for(let t=0;t<360;t+=5){let r=this.toAngle(t),s=t%30===0,i=T(F,F,s?Sl:Vn-5,r),o=T(F,F,Vn,r);e.push(Pa`<line class=${s?"tick tick-major":"tick"} x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width=${s?1:.5} />`)}return e}renderSpokes(){return Re.map((e,t)=>{let r=this.toAngle(t*30),s=T(F,F,qn,r),i=T(F,F,Vn,r);return Pa`<line class="wheel-line" x1=${s.x} y1=${s.y} x2=${i.x} y2=${i.y} stroke-width="0.6" />`})}renderHouses(){let e=this.cusps;return e?e.map((t,r)=>{let s=e[(r+1)%12],i=this.toAngle(t.longitude),o=T(F,F,qn,i),l=T(F,F,Sl,i),c=T(F,F,Ax,this.toAngle(pi(t.longitude,s?.longitude??t.longitude+30)));return Pa`<g>
325
123
  <line class="house-cusp" x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} />
326
124
  <text class="house-num" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${t.number}</text>
327
125
  </g>`}):He}renderSigns(){return Re.map((e,t)=>{let r=T(F,F,Dx,this.toAngle(t*30+15));return Pa`<text class="sign-glyph" x=${r.x} y=${r.y} text-anchor="middle" dominant-baseline="central">${N(e)}</text>`})}renderRing(e,t,r,s,i,o){let l=Px*this.type.size.glyph,c={width:l,height:l},d=x=>({width:(Mx+(x.isRetrograde===!0?_x:0))*this.type.size.degree,height:Nx*this.type.size.degree}),p=Et(l,t);return zt(e,x=>x.longitude,(x,L)=>Math.max(p,Et((d(x).width+d(L).width)/2,r(90,c,d(x))))).map(({item:x,longitude:L,displayLongitude:v})=>{let w=this.toAngle(v),O=T(F,F,t,w),te=T(F,F,r(w,c,d(x)),w),We=x.isRetrograde===!0,Ma=`${Nt(L).degree}°`,Cr=g(x,"name"),Tr=`${i} ${Cr}${We?` ${this.t("retrograde")}`:""} - ${jt(L)} ${g(x,"sign")}`,Er=Math.abs(v-L)>.5,vn=T(F,F,t+o*zx,this.toAngle(L)),Yn=T(F,F,t+o*Ox,w);return Pa`<g>
328
126
  ${Er?Pa`<line class=${`leader ${s}`} x1=${vn.x} y1=${vn.y} x2=${Yn.x} y2=${Yn.y} />`:He}
329
- <text class=${s} x=${O.x} y=${O.y} text-anchor="middle" dominant-baseline="central"><title>${Tr}</title>${po(x.name,Cr)}</text>
127
+ <text class=${s} x=${O.x} y=${O.y} text-anchor="middle" dominant-baseline="central"><title>${Tr}</title>${ho(x.name,Cr)}</text>
330
128
  <text class="planet-deg" x=${te.x} y=${te.y} text-anchor="middle" dominant-baseline="central">${Ma}${We?Pa`<tspan class="retro"> ℞</tspan>`:He}</text>
331
- </g>`})}renderAspectLines(e,t,r){let s=ho(e),i=ho(t);return r.filter(ja).map(o=>{let l=i.get(A(o.planet1)),c=s.get(A(o.planet2));if(!l||!c||!Number.isFinite(l.longitude)||!Number.isFinite(c.longitude))return He;let d=T(F,F,qn-2,this.toAngle(l.longitude)),p=T(F,F,qn-2,this.toAngle(c.longitude)),h=Ct(o),x=b(this.effectiveLang(),o.orb,1);return Pa`<line class=${`aspect ${Je(o)}`} style=${rn(o)} x1=${d.x} y1=${d.y} x2=${p.x} y2=${p.y}><title>${this.t("Transiting")} ${g(o,"planet1")} ${g(o,"type",h)} ${this.t("Natal")} ${g(o,"planet2")}${x?` (${this.t("Orb")} ${x}°)`:""}</title></line>`})}renderAxis(){let e=this.effectiveAscendant;if(e===void 0)return He;let t=Tt(e);return[t,Rn(t)].map((r,s)=>{let i=this.toAngle(r),o=T(F,F,Vn,i),l=T(F,F,Tx,i),c=T(F,F,Ex,i);return Pa`<g>
129
+ </g>`})}renderAspectLines(e,t,r){let s=mo(e),i=mo(t);return r.filter(ja).map(o=>{let l=i.get(A(o.planet1)),c=s.get(A(o.planet2));if(!l||!c||!Number.isFinite(l.longitude)||!Number.isFinite(c.longitude))return He;let d=T(F,F,qn-2,this.toAngle(l.longitude)),p=T(F,F,qn-2,this.toAngle(c.longitude)),h=Ct(o),x=b(this.effectiveLang(),o.orb,1);return Pa`<line class=${`aspect ${Je(o)}`} style=${rn(o)} x1=${d.x} y1=${d.y} x2=${p.x} y2=${p.y}><title>${this.t("Transiting")} ${g(o,"planet1")} ${g(o,"type",h)} ${this.t("Natal")} ${g(o,"planet2")}${x?` (${this.t("Orb")} ${x}°)`:""}</title></line>`})}renderAxis(){let e=this.effectiveAscendant;if(e===void 0)return He;let t=Tt(e);return[t,Rn(t)].map((r,s)=>{let i=this.toAngle(r),o=T(F,F,Vn,i),l=T(F,F,Tx,i),c=T(F,F,Ex,i);return Pa`<g>
332
130
  <line class="axis-tick" x1=${o.x} y1=${o.y} x2=${l.x} y2=${l.y} />
333
131
  <text class="axis-label" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${s===0?this.t("ASC"):this.t("DSC")}</text>
334
- </g>`})}renderLegend(e,t,r,s){return Ze`<div class="legend" part="legend"><span><span class="swatch swatch--natal"></span>${this.t("{{count}} natal bodies",{count:e.length})}</span> <span><span class="swatch swatch--transit"></span>${this.t("{{count}} transiting bodies",{count:t.length})}</span> ${r.length>0?Ze`<span>${this.t("{{count}} aspects",{count:r.filter(ja).length})}</span> <span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:He} ${s?Ze`<span>${ae(this.effectiveLang(),"houseSystem")}: ${I(this.effectiveLang(),"houseSystem",s)}</span>`:He} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(e){if(!e)return He;let t=Object.entries(e.byType??{}).sort((r,s)=>s[1]-r[1]);return Ze`<div part="details"><p class="counts" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof e.total=="number"?Ze`<span>${this.t("Total")}: ${e.total}</span>`:He} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([r,s])=>Ze`<span>${Me({type:r})}: ${s}</span>`)}</p>${e.strongest?this.renderStrongest(e.strongest):He}</div>`}renderStrongest(e){let t=g(e,"planet1"),r=g(e,"planet2");return Ze`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${po(e.planet1,t)}</span>${this.t("Transiting")} ${t} <span class="asp-name ${Je(e)}">${g(e,"type",Me(e))}</span> <span aria-hidden="true" class="glyph">${po(e.planet2,r)}</span>${this.t("Natal")} ${r} <span class="meta">${e.isApplying?this.t("Applying"):this.t("Separating")} · ${this.t("Orb")} ${b(this.effectiveLang(),e.orb,2)}° · ${this.t("Strength")} ${b(this.effectiveLang(),e.strength,0)}</span></div>`}renderPositions(e,t,r){if(e.length===0&&t.length===0)return He;let s=ho(e),i=ho(t),o=e.length>0?e:t,l=d=>d?Ze`${N(d.sign)??""} ${jt(d.longitude)} ${g(d,"sign")}${d.isRetrograde?Ze`<span class="retro-badge" aria-label="${this.t("retrograde")}">℞</span>`:He}`:He,c=d=>r?Ze`<td>${d&&Number.isFinite(d.house)?d.house:He}</td>`:He;return Ze`<div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="transit-positions"><table><caption id="transit-positions" class="roxy-sr-only">${this.t("Every body with its natal position and its position on the transit date, each as a zodiac sign and a degree.")} ${r?this.t("Both house numbers are read against the natal house cusps."):He}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col"><span class="swatch swatch--natal" aria-hidden="true"></span>${this.t("Natal")}</th>${r?Ze`<th scope="col">${this.t("Natal house")}</th>`:He}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${r?Ze`<th scope="col">${this.t("Transiting house")}</th>`:He}</tr></thead><tbody>${o.map(d=>{let p=A(d.name),h=g(d,"name");return Ze`<tr><th scope="row"><span aria-hidden="true" class="glyph">${po(d.name,h)}</span> ${h}</th><td>${l(s.get(p))}</td>${c(s.get(p))}<td>${l(i.get(p))}</td>${c(i.get(p))}</tr>`})}</tbody></table></div>`}renderPositionDetails(e){return Ze`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><p>${this.t("Natal")}</p><roxy-western-planets-table bare hide-sections="header" lang="${wl(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.natalPlanets,houses:e.houses,ascendant:e.ascendant}}"></roxy-western-planets-table><p>${this.t("Transiting")}</p><roxy-western-planets-table bare hide-sections="header" lang="${wl(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.transitPlanets}}"></roxy-western-planets-table></details>`}renderAspectDetails(e){return e.length===0?He:Ze`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${wl(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}};ua.endpoints=Fc,ua.styles=[u,Ge,an,M,Cx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,47.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line,.tick{fill:none;stroke:var(--roxy-border)}.tick-major{stroke:var(--roxy-secondary)}.natal-glyph,.swatch--natal{--_ring:var(--roxy-accent-ink)}.transit-glyph,.swatch--transit{--_ring:var(--roxy-fg)}.sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}.transit-glyph,.natal-glyph{fill:var(--_ring);font-size:calc(var(--roxy-text-base) * 1.125);font-weight:var(--roxy-weight-bold)}.leader{stroke:var(--_ring);stroke-width:.6px;opacity:.6}.planet-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .625)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.house-cusp{stroke:var(--roxy-secondary);stroke-width:1px;stroke-dasharray:3 3}.house-num{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .5625)}.axis-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}.axis-label{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .625);font-weight:var(--roxy-weight-bold)}@container (width<=480px){.sign-glyph,.natal-glyph,.transit-glyph{font-size:calc(var(--roxy-text-base) * 1.625)}.planet-deg{font-size:calc(var(--roxy-text-base) * .875)}.house-num{font-size:calc(var(--roxy-text-base) * .75)}}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.counts{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_ring);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;margin-block-start:var(--roxy-space-sm);display:flex}.strongest .meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}.retro-badge{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}`],m([$l({type:String})],ua.prototype,"heading",2),m([$l({type:Number})],ua.prototype,"ascendant",2),m([$l({type:Array})],ua.prototype,"houses",2),ua=m([f("roxy-transit-wheel")],ua);import{css as Gx,html as fa,nothing as Rl}from"lit";import{state as Ix}from"lit/decorators.js";var wr=class extends y{constructor(){super(...arguments);this.tab="positions"}renderData(e){if(!e.transitPlanets?.length)return this.renderEmpty();let{transitDate:t,transitTime:r,transitPlanets:s,transitAspects:i,summary:o}=e,l=[R(this.effectiveLang(),t),Rt(this.effectiveLang(),r)].filter(Boolean).join(" "),c=i?.length??0,d=this.tab;return fa`<div class="wrap" part="card" aria-label="${this.t("Transits")}"><div class="head" part="header"><h2>${this.t("Transits")}</h2>${l?fa`<p class="roxy-label">${l}</p>`:Rl}</div>${c>0?fa`${dt({items:[{id:"positions",label:this.t("Positions")},{id:"aspects",label:this.t("Aspects ({{count}})",{count:c})}],active:d,onSelect:p=>{this.tab=p},label:this.t("Transit views"),idPrefix:"transits",controls:!0})}<div id="transits-panel-${d}" part="panel" role="tabpanel" aria-labelledby="transits-tab-${d}">${d==="positions"?this.renderPlanetsTable(s):fa`${o?this.renderSummaryCounts(o):Rl} ${this.renderAspectsList(i??[])}`}</div>`:this.renderPlanetsTable(s)}</div>`}renderSummaryCounts(e){return fa`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}"><span>${this.t("Total")}: ${e.totalAspects}</span> <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span></p>`}renderPlanetsTable(e){return fa`<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Transiting planets: each planet with its current sign, degree and daily speed.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Speed")}</th></tr></thead><tbody>${e.map(t=>{let r=$(t.name)??"",s=N(t.sign)??"",i=t.speed>=0?"↑":"↓";return fa`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${r}</span> ${g(t,"name")} ${t.isRetrograde?fa`<span class="retro" aria-label="${this.t("retrograde")}">℞</span>`:Rl}</div></td><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${s}</span> ${g(t,"sign")}</div></td><td class="num">${Kt(t.degree)}</td><td class="speed"><span aria-hidden="true">${i}</span> ${b(this.effectiveLang(),Math.abs(t.speed),2)}${this.t("°/day")}</td></tr>`})}</tbody></table></div>`}renderAspectsList(e){return fa`<div part="section aspects" role="list" aria-label="${this.t("Transit aspects")}">${e.map((t,r)=>{let s=$(t.transitPlanet)??"",i=$(t.natalPlanet)??"",o=t.interpretation,l=Me(t),c=t.isApplying?this.t("Applying"):this.t("Separating");return fa`<details class="aspect-card" part="reading" role="listitem" name="transit-aspects" ?open="${r===0}"><summary><span aria-hidden="true">${s}</span> ${t.transitPlanet} <span class="asp-name ${Je(t)}">${l}</span> <span aria-hidden="true">${i}</span> ${t.natalPlanet} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:c,orb:b(this.effectiveLang(),t.orb,2),strength:b(this.effectiveLang(),t.strength,1)})} </span>${H()}</summary><div class="interp-body">${Ln(o,this.translator)}</div></details>`})}</div>`}};wr.endpoints=Bc,wr.styles=[u,Xe,M,va,Gx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;margin-block-end:var(--roxy-space-sm);display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}table{width:100%}.glyph{line-height:1}.planet-cell{align-items:baseline;gap:var(--roxy-space-xs);display:flex}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}td.num,.speed{color:var(--roxy-muted)}.speed{white-space:nowrap}.aspect-card{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.aspect-card summary{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.asp-name{font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.aspect-card .interp-body{font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-xs)}.aspect-card .interp-body p{margin:0 0 var(--roxy-space-xs)}`],m([Ix()],wr.prototype,"tab",2),wr=m([f("roxy-transits-table")],wr);import{css as Fx,html as fn,nothing as Bx}from"lit";var Hx=[{key:"timeBased",titleSource:"Time based",noteSource:"From the eightfold division of the day or night, so these depend on the birth time, the place and the weekday."},{key:"sunBased",titleSource:"Sun based",noteSource:"The Dhuma group, derived by fixed arc from the Sun. Dhuma is the Sun plus 133 degrees 20 minutes, and each of the rest follows from the one before it."}],js=class extends y{renderData(a){let e=Hx.filter(t=>a[t.key]?.length);return e.length?fn`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2>${this.t("Upagrahas")}</h2>${X(this.effectiveLang(),a.frame,this.translator)}</header>${e.map(t=>this.renderGroup(t,a[t.key]))}</div>`:this.renderEmpty()}renderGroup(a,e){let t=fn`<div class="group-head"><h3>${this.t(a.titleSource)}</h3><p class="group-note">${this.t(a.noteSource)}</p></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(a.titleSource)}"><table role="table"><caption class="roxy-sr-only">${this.t("{{group}} upagrahas: each sub-planet with its rashi, degree in sign, sidereal longitude, and nakshatra with pada.",{group:this.t(a.titleSource)})}</caption><thead><tr><th scope="col">${this.t("Upagraha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th></tr></thead><tbody>${e.map(r=>{let s=N(r.rashi)??"";return fn`<tr><td class="name">${r.name}</td><td>${s?fn`<span class="glyph">${s}</span>`:Bx}${r.rashi??""}</td><td>${typeof r.longitude=="number"?Qe(r.longitude):""}</td><td>${b(this.effectiveLang(),r.longitude,2)}</td><td>${r.nakshatra??""}</td><td>${r.nakshatraPada??""}</td></tr>`})}</tbody></table></div>`;return a.key==="timeBased"?fn`<section part="section time-based">${t}</section>`:fn`<section part="section sun-based">${t}</section>`}};js.endpoints=Hc,js.styles=[u,G,Fx`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,h3,p{margin:0}.group-head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md) var(--roxy-space-md) 0;display:grid}.group-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr:last-child td{border-block-end:0}td.name{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}`],js=m([f("roxy-upagraha-table")],js);import{css as jx,html as ye,nothing as ke,svg as xn}from"lit";import{property as Kx}from"lit/decorators.js";import{ifDefined as Eh}from"lit/directives/if-defined.js";var Vx=["North","East","South","West"],qx={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},Yx={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},Ux={feet:"ft²",metres:"m²"},mo=.04,Zx=8,Wx=.88;function Dh(n){return"cells"in n}function Xx(n){let a=n.map(i=>i.center?.x).filter(i=>i!=null),e=n.map(i=>i.center?.y).filter(i=>i!=null),t=Math.max(0,...n.map(i=>i.rowFromNorth??0),...n.map(i=>i.columnFromWest??0));if(t<2||a.length===0||e.length===0)return;let r=(Math.max(...a)-Math.min(...a))/(t-1),s=(Math.max(...e)-Math.min(...e))/(t-1);if(!(!(r>0)||!(s>0)))return{size:t,cellW:r,cellH:s,originX:Math.min(...a)-r/2,originY:Math.min(...e)-s/2}}function go(n,a){let e=((a?.x??0)-n.originX)/n.cellW,t=n.size-((a?.y??0)-n.originY)/n.cellH;return[Ah(e),Ah(t)]}function Ah(n){return Math.round(n*1e3)/1e3}var kr=class extends y{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let t=this.effectiveLang(),r=Dh(e)?e:void 0,s=this.mode==="entrance"&&!Dh(e)?e:void 0,i=r?Xx(r.cells??[]):Jx(e.conventions?.grid);return ye`<article class="card" part="card" aria-labelledby="vastu-title"><header class="head" part="header"><h2 class="title" id="vastu-title">${s?this.t("Entrance pada"):this.t("Vastu mandala")}</h2>${s?.auspiciousness?ye`<span class="${`roxy-chip verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:ke}</header>${this.renderGrid(t,i,r,s)} ${this.renderLegend(s,r)} ${this.renderDevatas(t,r?.cells)} ${this.renderFacts(t,e,r,s)} ${s?.effect&&!this.hideReadings?ye`<p class="effect" part="reading">${s.effect}</p>`:ke} ${s?.reading&&!this.hideReadings?ye`<p class="reading" part="reading">${s.reading}</p>`:ke} ${this.renderSources(r?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,t,r,s){if(!t)return ke;let i=t.size,o=`${-mo} ${-mo} ${i+mo*2} ${i+mo*2}`;return ye`<div class="frame" part="chart">${Vx.map(l=>ye`<span class="${`compass compass-${l[0]?.toLowerCase()}`}">${I(e,"facing",l)}</span>`)} <svg viewBox="${o}" role="img" aria-label="${this.t("Vastu grid, north at the top and west on the left")}">${(r?.cells??[]).map(l=>this.renderCell(e,l))} ${s?this.renderEmptyGrid(i):ke} ${s?this.renderDoor(e,s):ke} ${this.renderVamsa(t,r?.vamsa)} ${this.renderBrahmasthan(t,r?.brahmasthan?.polygon)} ${this.renderAtimarma(t,r)}</svg></div>`}renderCell(e,t){let r=t.class??t.role??"",s=["pada",r?`pada-${r}`:"",t.withinPlot===!1?"pada-outside":""].filter(Boolean).join(" "),i=t.devataName??"";return this.renderPada(e,t.columnFromWest,t.rowFromNorth,s,t.square,i,[i,this.ringLabel(r)].filter(Boolean).join(" · "))}renderPada(e,t,r,s,i,o,l){let c=(t??1)-1,d=(r??1)-1,p=o.length>Zx;return xn`<g>
132
+ </g>`})}renderLegend(e,t,r,s){return Ze`<div class="legend" part="legend"><span><span class="swatch swatch--natal"></span>${this.t("{{count}} natal bodies",{count:e.length})}</span> <span><span class="swatch swatch--transit"></span>${this.t("{{count}} transiting bodies",{count:t.length})}</span> ${r.length>0?Ze`<span>${this.t("{{count}} aspects",{count:r.filter(ja).length})}</span> <span><span class="aspect-swatch aspect-trine"></span>${this.t("Harmonious aspects")}</span> <span><span class="aspect-swatch aspect-square"></span>${this.t("Challenging aspects")}</span>`:He} ${s?Ze`<span>${ae(this.effectiveLang(),"houseSystem")}: ${I(this.effectiveLang(),"houseSystem",s)}</span>`:He} <span>${this.orientationCaption}</span> <span>${this.cuspCaption}</span></div>`}renderSummary(e){if(!e)return He;let t=Object.entries(e.byType??{}).sort((r,s)=>s[1]-r[1]);return Ze`<div part="details"><p class="counts" role="region" aria-label="${this.t("Transit aspect summary")}">${typeof e.total=="number"?Ze`<span>${this.t("Total")}: ${e.total}</span>`:He} <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span> ${t.map(([r,s])=>Ze`<span>${Me({type:r})}: ${s}</span>`)}</p>${e.strongest?this.renderStrongest(e.strongest):He}</div>`}renderStrongest(e){let t=g(e,"planet1"),r=g(e,"planet2");return Ze`<div class="strongest" part="details strongest"><span class="roxy-label">${this.t("Strongest")}</span> <span aria-hidden="true" class="glyph">${ho(e.planet1,t)}</span>${this.t("Transiting")} ${t} <span class="asp-name ${Je(e)}">${g(e,"type",Me(e))}</span> <span aria-hidden="true" class="glyph">${ho(e.planet2,r)}</span>${this.t("Natal")} ${r} <span class="meta">${e.isApplying?this.t("Applying"):this.t("Separating")} · ${this.t("Orb")} ${b(this.effectiveLang(),e.orb,2)}° · ${this.t("Strength")} ${b(this.effectiveLang(),e.strength,0)}</span></div>`}renderPositions(e,t,r){if(e.length===0&&t.length===0)return He;let s=mo(e),i=mo(t),o=e.length>0?e:t,l=d=>d?Ze`${N(d.sign)??""} ${jt(d.longitude)} ${g(d,"sign")}${d.isRetrograde?Ze`<span class="retro-badge" aria-label="${this.t("retrograde")}">℞</span>`:He}`:He,c=d=>r?Ze`<td>${d&&Number.isFinite(d.house)?d.house:He}</td>`:He;return Ze`<div class="scroll" part="table" tabindex="0" role="region" aria-labelledby="transit-positions"><table><caption id="transit-positions" class="roxy-sr-only">${this.t("Every body with its natal position and its position on the transit date, each as a zodiac sign and a degree.")} ${r?this.t("Both house numbers are read against the natal house cusps."):He}</caption><thead><tr><th scope="col">${this.t("Body")}</th><th scope="col"><span class="swatch swatch--natal" aria-hidden="true"></span>${this.t("Natal")}</th>${r?Ze`<th scope="col">${this.t("Natal house")}</th>`:He}<th scope="col"><span class="swatch swatch--transit" aria-hidden="true"></span>${this.t("Transiting")}</th>${r?Ze`<th scope="col">${this.t("Transiting house")}</th>`:He}</tr></thead><tbody>${o.map(d=>{let p=A(d.name),h=g(d,"name");return Ze`<tr><th scope="row"><span aria-hidden="true" class="glyph">${ho(d.name,h)}</span> ${h}</th><td>${l(s.get(p))}</td>${c(s.get(p))}<td>${l(i.get(p))}</td>${c(i.get(p))}</tr>`})}</tbody></table></div>`}renderPositionDetails(e){return Ze`<details class="block" part="section positions"><summary>${this.t("Chart details")}</summary><p>${this.t("Natal")}</p><roxy-western-planets-table bare hide-sections="header" lang="${kl(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.natalPlanets,houses:e.houses,ascendant:e.ascendant}}"></roxy-western-planets-table><p>${this.t("Transiting")}</p><roxy-western-planets-table bare hide-sections="header" lang="${kl(this.effectiveLang())}" exportparts="card, header, table, details, section, houses" .data="${{planets:e.transitPlanets}}"></roxy-western-planets-table></details>`}renderAspectDetails(e){return e.length===0?He:Ze`<details class="block" part="section aspects"><summary>${this.t("Aspects ({{count}})",{count:e.length})}</summary><roxy-aspects-table bare hide-sections="header" lang="${kl(this.effectiveLang())}" ?hide-readings="${this.hideReadings}" exportparts="card, header, section, aspects, details, reading, readings, pattern, patterns, strongest" .data="${{aspects:e}}"></roxy-aspects-table></details>`}};ua.endpoints=Bc,ua.styles=[u,Ge,an,M,Cx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}details.block>summary{font-weight:var(--roxy-weight-bold)}svg:where([part~=chart]){width:100%;max-width:var(--roxy-chart-max-width,47.5rem);aspect-ratio:1;height:auto;margin:0 auto;display:block}.wheel-line,.tick{fill:none;stroke:var(--roxy-border)}.tick-major{stroke:var(--roxy-secondary)}.natal-glyph,.swatch--natal{--_ring:var(--roxy-accent-ink)}.transit-glyph,.swatch--transit{--_ring:var(--roxy-fg)}.sign-glyph{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .875)}.transit-glyph,.natal-glyph{fill:var(--_ring);font-size:calc(var(--roxy-text-base) * 1.125);font-weight:var(--roxy-weight-bold)}.leader{stroke:var(--_ring);stroke-width:.6px;opacity:.6}.planet-deg{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .625)}.planet-deg .retro{fill:var(--roxy-danger-fg)}.house-cusp{stroke:var(--roxy-secondary);stroke-width:1px;stroke-dasharray:3 3}.house-num{fill:var(--roxy-secondary);font-size:calc(var(--roxy-text-base) * .5625)}.axis-tick{stroke:var(--roxy-accent-ink);stroke-width:1.5px}.axis-label{fill:var(--roxy-accent-ink);font-size:calc(var(--roxy-text-base) * .625);font-weight:var(--roxy-weight-bold)}@container (width<=480px){.sign-glyph,.natal-glyph,.transit-glyph{font-size:calc(var(--roxy-text-base) * 1.625)}.planet-deg{font-size:calc(var(--roxy-text-base) * .875)}.house-num{font-size:calc(var(--roxy-text-base) * .75)}}.legend,.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.counts{color:var(--roxy-fg);font-size:var(--roxy-text-sm)}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border-radius:var(--roxy-radius-full);background:var(--_ring);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.strongest{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);padding-block:var(--roxy-space-sm);border-block:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);flex-wrap:wrap;margin-block-start:var(--roxy-space-sm);display:flex}.strongest .meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.glyph{line-height:1}.asp-name{font-weight:var(--roxy-weight-bold)}.scroll{min-width:0;overflow-x:auto}table{width:100%}:is(th,td){white-space:nowrap}.retro-badge{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}`],m([wl({type:String})],ua.prototype,"heading",2),m([wl({type:Number})],ua.prototype,"ascendant",2),m([wl({type:Array})],ua.prototype,"houses",2),ua=m([f("roxy-transit-wheel")],ua);import{css as Gx,html as fa,nothing as Cl}from"lit";import{state as Ix}from"lit/decorators.js";var wr=class extends y{constructor(){super(...arguments);this.tab="positions"}renderData(e){if(!e.transitPlanets?.length)return this.renderEmpty();let{transitDate:t,transitTime:r,transitPlanets:s,transitAspects:i,summary:o}=e,l=[R(this.effectiveLang(),t),Rt(this.effectiveLang(),r)].filter(Boolean).join(" "),c=i?.length??0,d=this.tab;return fa`<div class="wrap" part="card" aria-label="${this.t("Transits")}"><div class="head" part="header"><h2>${this.t("Transits")}</h2>${l?fa`<p class="roxy-label">${l}</p>`:Cl}</div>${c>0?fa`${dt({items:[{id:"positions",label:this.t("Positions")},{id:"aspects",label:this.t("Aspects ({{count}})",{count:c})}],active:d,onSelect:p=>{this.tab=p},label:this.t("Transit views"),idPrefix:"transits",controls:!0})}<div id="transits-panel-${d}" part="panel" role="tabpanel" aria-labelledby="transits-tab-${d}">${d==="positions"?this.renderPlanetsTable(s):fa`${o?this.renderSummaryCounts(o):Cl} ${this.renderAspectsList(i??[])}`}</div>`:this.renderPlanetsTable(s)}</div>`}renderSummaryCounts(e){return fa`<p class="counts" part="details" role="region" aria-label="${this.t("Aspect summary")}"><span>${this.t("Total")}: ${e.totalAspects}</span> <span class="harmonious">${this.t("Harmonious: {{count}}",{count:e.harmonious})}</span> <span class="challenging">${this.t("Challenging: {{count}}",{count:e.challenging})}</span> <span>${this.t("Neutral: {{count}}",{count:e.neutral})}</span></p>`}renderPlanetsTable(e){return fa`<div class="scroll" tabindex="0" role="region" aria-label="${this.t("Positions")}"><table part="table"><caption class="roxy-sr-only">${this.t("Transiting planets: each planet with its current sign, degree and daily speed.")}</caption><thead><tr><th scope="col">${this.t("Planet")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Speed")}</th></tr></thead><tbody>${e.map(t=>{let r=$(t.name)??"",s=N(t.sign)??"",i=t.speed>=0?"↑":"↓";return fa`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${r}</span> ${g(t,"name")} ${t.isRetrograde?fa`<span class="retro" aria-label="${this.t("retrograde")}">℞</span>`:Cl}</div></td><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${s}</span> ${g(t,"sign")}</div></td><td class="num">${Kt(t.degree)}</td><td class="speed"><span aria-hidden="true">${i}</span> ${b(this.effectiveLang(),Math.abs(t.speed),2)}${this.t("°/day")}</td></tr>`})}</tbody></table></div>`}renderAspectsList(e){return fa`<div part="section aspects" role="list" aria-label="${this.t("Transit aspects")}">${e.map((t,r)=>{let s=$(t.transitPlanet)??"",i=$(t.natalPlanet)??"",o=t.interpretation,l=Me(t),c=t.isApplying?this.t("Applying"):this.t("Separating");return fa`<details class="aspect-card" part="reading" role="listitem" name="transit-aspects" ?open="${r===0}"><summary><span aria-hidden="true">${s}</span> ${t.transitPlanet} <span class="asp-name ${Je(t)}">${l}</span> <span aria-hidden="true">${i}</span> ${t.natalPlanet} <span class="meta">${this.t("{{status}} · orb {{orb}}° · str {{strength}}",{status:c,orb:b(this.effectiveLang(),t.orb,2),strength:b(this.effectiveLang(),t.strength,1)})} </span>${H()}</summary><div class="interp-body">${Ln(o,this.translator)}</div></details>`})}</div>`}};wr.endpoints=Hc,wr.styles=[u,Xe,M,va,Gx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{gap:var(--roxy-space-xs);display:grid}.counts{gap:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);flex-wrap:wrap;margin-block-end:var(--roxy-space-sm);display:flex}.harmonious{color:var(--roxy-info-fg)}.challenging{color:var(--roxy-danger-fg)}.scroll{min-width:0;overflow-x:auto}table{width:100%}.glyph{line-height:1}.planet-cell{align-items:baseline;gap:var(--roxy-space-xs);display:flex}.retro{color:var(--roxy-danger-fg);font-weight:var(--roxy-weight-bold)}td.num,.speed{color:var(--roxy-muted)}.speed{white-space:nowrap}.aspect-card{padding-block:var(--roxy-space-sm);border-block-start:1px solid var(--roxy-border)}.aspect-card summary{align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.asp-name{font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;margin-inline-start:auto}.aspect-card .interp-body{font-size:var(--roxy-text-sm);margin-block-start:var(--roxy-space-xs)}.aspect-card .interp-body p{margin:0 0 var(--roxy-space-xs)}`],m([Ix()],wr.prototype,"tab",2),wr=m([f("roxy-transits-table")],wr);import{css as Fx,html as fn,nothing as Bx}from"lit";var Hx=[{key:"timeBased",titleSource:"Time based",noteSource:"From the eightfold division of the day or night, so these depend on the birth time, the place and the weekday."},{key:"sunBased",titleSource:"Sun based",noteSource:"The Dhuma group, derived by fixed arc from the Sun. Dhuma is the Sun plus 133 degrees 20 minutes, and each of the rest follows from the one before it."}],js=class extends y{renderData(a){let e=Hx.filter(t=>a[t.key]?.length);return e.length?fn`<div class="wrap" part="card" aria-label="${this.t("Upagraha positions")}"><header class="head" part="header"><h2>${this.t("Upagrahas")}</h2>${X(this.effectiveLang(),a.frame,this.translator)}</header>${e.map(t=>this.renderGroup(t,a[t.key]))}</div>`:this.renderEmpty()}renderGroup(a,e){let t=fn`<div class="group-head"><h3>${this.t(a.titleSource)}</h3><p class="group-note">${this.t(a.noteSource)}</p></div><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t(a.titleSource)}"><table role="table"><caption class="roxy-sr-only">${this.t("{{group}} upagrahas: each sub-planet with its rashi, degree in sign, sidereal longitude, and nakshatra with pada.",{group:this.t(a.titleSource)})}</caption><thead><tr><th scope="col">${this.t("Upagraha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Longitude")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th></tr></thead><tbody>${e.map(r=>{let s=N(r.rashi)??"";return fn`<tr><td class="name">${r.name}</td><td>${s?fn`<span class="glyph">${s}</span>`:Bx}${r.rashi??""}</td><td>${typeof r.longitude=="number"?Qe(r.longitude):""}</td><td>${b(this.effectiveLang(),r.longitude,2)}</td><td>${r.nakshatra??""}</td><td>${r.nakshatraPada??""}</td></tr>`})}</tbody></table></div>`;return a.key==="timeBased"?fn`<section part="section time-based">${t}</section>`:fn`<section part="section sun-based">${t}</section>`}};js.endpoints=jc,js.styles=[u,G,Fx`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,h3,p{margin:0}.group-head{gap:var(--roxy-space-xs);padding:var(--roxy-space-md) var(--roxy-space-md) 0;display:grid}.group-note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr:last-child td{border-block-end:0}td.name{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}`],js=m([f("roxy-upagraha-table")],js);import{css as jx,html as ye,nothing as ke,svg as xn}from"lit";import{property as Kx}from"lit/decorators.js";import{ifDefined as Dh}from"lit/directives/if-defined.js";var Vx=["North","East","South","West"],qx={perimeter:"Perimeter",innerRing:"Inner ring",innerCorner:"Inner corner",center:"Center"},Yx={auspicious:"Favourable",inauspicious:"Unfavourable",mixed:"Mixed"},Ux={feet:"ft²",metres:"m²"},go=.04,Zx=8,Wx=.88;function Ah(n){return"cells"in n}function Xx(n){let a=n.map(i=>i.center?.x).filter(i=>i!=null),e=n.map(i=>i.center?.y).filter(i=>i!=null),t=Math.max(0,...n.map(i=>i.rowFromNorth??0),...n.map(i=>i.columnFromWest??0));if(t<2||a.length===0||e.length===0)return;let r=(Math.max(...a)-Math.min(...a))/(t-1),s=(Math.max(...e)-Math.min(...e))/(t-1);if(!(!(r>0)||!(s>0)))return{size:t,cellW:r,cellH:s,originX:Math.min(...a)-r/2,originY:Math.min(...e)-s/2}}function yo(n,a){let e=((a?.x??0)-n.originX)/n.cellW,t=n.size-((a?.y??0)-n.originY)/n.cellH;return[Ph(e),Ph(t)]}function Ph(n){return Math.round(n*1e3)/1e3}var kr=class extends y{constructor(){super(...arguments);this.mode="mandala"}renderData(e){let t=this.effectiveLang(),r=Ah(e)?e:void 0,s=this.mode==="entrance"&&!Ah(e)?e:void 0,i=r?Xx(r.cells??[]):Jx(e.conventions?.grid);return ye`<article class="card" part="card" aria-labelledby="vastu-title"><header class="head" part="header"><h2 class="title" id="vastu-title">${s?this.t("Entrance pada"):this.t("Vastu mandala")}</h2>${s?.auspiciousness?ye`<span class="${`roxy-chip verdict-${s.auspiciousness}`}">${this.verdictLabel(s.auspiciousness)}</span>`:ke}</header>${this.renderGrid(t,i,r,s)} ${this.renderLegend(s,r)} ${this.renderDevatas(t,r?.cells)} ${this.renderFacts(t,e,r,s)} ${s?.effect&&!this.hideReadings?ye`<p class="effect" part="reading">${s.effect}</p>`:ke} ${s?.reading&&!this.hideReadings?ye`<p class="reading" part="reading">${s.reading}</p>`:ke} ${this.renderSources(r?.sources??(s?.source?[s.source]:[]))}</article>`}renderGrid(e,t,r,s){if(!t)return ke;let i=t.size,o=`${-go} ${-go} ${i+go*2} ${i+go*2}`;return ye`<div class="frame" part="chart">${Vx.map(l=>ye`<span class="${`compass compass-${l[0]?.toLowerCase()}`}">${I(e,"facing",l)}</span>`)} <svg viewBox="${o}" role="img" aria-label="${this.t("Vastu grid, north at the top and west on the left")}">${(r?.cells??[]).map(l=>this.renderCell(e,l))} ${s?this.renderEmptyGrid(i):ke} ${s?this.renderDoor(e,s):ke} ${this.renderVamsa(t,r?.vamsa)} ${this.renderBrahmasthan(t,r?.brahmasthan?.polygon)} ${this.renderAtimarma(t,r)}</svg></div>`}renderCell(e,t){let r=t.class??t.role??"",s=["pada",r?`pada-${r}`:"",t.withinPlot===!1?"pada-outside":""].filter(Boolean).join(" "),i=t.devataName??"";return this.renderPada(e,t.columnFromWest,t.rowFromNorth,s,t.square,i,[i,this.ringLabel(r)].filter(Boolean).join(" · "))}renderPada(e,t,r,s,i,o,l){let c=(t??1)-1,d=(r??1)-1,p=o.length>Zx;return xn`<g>
335
133
  <rect class=${s} x=${c} y=${d} width="1" height="1">
336
134
  <title>${l}</title>
337
135
  </rect>
@@ -340,8 +138,8 @@ var Kh=Object.defineProperty;var Vh=Object.getOwnPropertyDescriptor;var m=(n,a,e
340
138
  class="devata"
341
139
  x=${c+.5}
342
140
  y=${d+.68}
343
- textLength=${Eh(p?Wx:void 0)}
344
- lengthAdjust=${Eh(p?"spacingAndGlyphs":void 0)}
141
+ textLength=${Dh(p?Wx:void 0)}
142
+ lengthAdjust=${Dh(p?"spacingAndGlyphs":void 0)}
345
143
  >${o}</text
346
144
  >`:ke}
347
- </g>`}renderEmptyGrid(e){let t=[];for(let r=0;r<e;r++)for(let s=0;s<e;s++)t.push(xn`<rect class="pada" x=${s} y=${r} width="1" height="1"></rect>`);return t}renderDoor(e,t){let r=t.devata?.name??"";return this.renderPada(e,t.cell?.columnFromWest,t.cell?.rowFromNorth,"pada pada-door",t.square,r,r)}renderVamsa(e,t){return(t??[]).map(r=>{let[s,i]=go(e,r.from),[o,l]=go(e,r.to);return xn`<line class="vamsa" x1=${s} y1=${i} x2=${o} y2=${l}></line>`})}renderBrahmasthan(e,t){let r=t??[];if(r.length<3)return ke;let s=r.map(i=>go(e,i).join(",")).join(" ");return xn`<polygon class="brahmasthan" points=${s}></polygon>`}renderAtimarma(e,t){let r=new Set(t?.atimarma??[]);return r.size===0?ke:(t?.cells??[]).filter(s=>s.square!=null&&r.has(s.square)).map(s=>{let[i,o]=go(e,s.center);return xn`<circle class="atimarma" cx=${i} cy=${o} r="0.06"></circle>`})}renderDevatas(e,t){let r=new Map;for(let s of t??[])!s.devataName||s.square==null||r.set(s.devataName,[...r.get(s.devataName)??[],s.square]);return r.size===0?ke:ye`<section part="section devatas"><h3 class="block-title">${this.t("Devata")}</h3><ul class="devatas">${[...r].map(([s,i])=>ye`<li><b>${s}</b> ${i.sort((o,l)=>o-l).map(o=>P(e,o)).join(", ")}</li>`)}</ul></section>`}renderLegend(e,t){if(e)return ye`<div class="legend" part="legend"><span><span class="swatch swatch-door"></span>${this.t("Door pada")}</span></div>`;let r=(t?.cells??[]).some(s=>s.withinPlot===!1);return ye`<div class="legend" part="legend"><span><span class="swatch swatch-brahma"></span>${this.t("Brahmasthan")}</span> ${r?ye`<span><span class="swatch swatch-outside"></span>${this.t("Outside the plot")}</span>`:ke}</div>`}renderFacts(e,t,r,s){let i=t.conventions?.grid;return ye`<div class="facts" part="details">${i?ye`<span><span class="roxy-label">${ae(e,"grid")}</span><b>${I(e,"grid",i)}</b></span>`:ke} ${s?.pada!=null?ye`<span><span class="roxy-label">${this.t("Pada")}</span><b>${P(e,s.pada)}</b></span>`:ke} ${s?.side?ye`<span><span class="roxy-label">${this.t("Side")}</span><b>${I(e,"facing",s.side)}</b></span>`:ke} ${s?.startCorner?ye`<span><span class="roxy-label">${this.t("Counted from")}</span>${I(e,"facing",s.startCorner)} ${s.ordinalOnSide!=null?ye`· ${P(e,s.ordinalOnSide)}`:ke}</span>`:ke} ${s?.devata?.name?ye`<span><span class="roxy-label">${this.t("Devata")}</span><b>${s.devata.name}</b> ${s.devata.padaCount!=null?ye`· ${this.t("Pada")} ${P(e,s.devata.padaCount)}`:ke}</span>`:ke} ${s?.recommendedPadas?.length?ye`<span><span class="roxy-label">${this.t("Recommended padas")}</span>${s.recommendedPadas.map(o=>P(e,o)).join(", ")}</span>`:ke} ${r?.brahmasthan?.area!=null?ye`<span><span class="roxy-label">${this.t("Brahmasthan area")}</span><b>${this.areaLabel(e,r.brahmasthan.area,r.conventions?.unit)}</b></span>`:ke} ${r?.marma?.areaEach!=null?ye`<span><span class="roxy-label">${this.t("Area of one marma")}</span>${this.areaLabel(e,r.marma.areaEach,r.conventions?.unit)}</span>`:ke} ${r?.atimarma?.length?ye`<span><span class="roxy-label">${this.t("Crossing points")}</span>${r.atimarma.map(o=>P(e,o)).join(", ")}</span>`:ke}</div>`}renderSources(e){return e.length===0?ke:ye`<section part="section sources"><ul class="cites">${e.map(t=>ye`<li>${Pn(t)}</li>`)}</ul></section>`}areaLabel(e,t,r){let s=b(e,t,2);if(!r)return s;let i=Ux[r]??`${r}²`;return ye`<span title="${I(e,"unit",r)}">${s} ${i}</span>`}ringLabel(e){let t=qx[e];return t?this.t(t):S(e)}verdictLabel(e){let t=Yx[e];return t?this.t(t):S(e)}};kr.endpoints=jc,kr.styles=[u,jx`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);--_brahma:color-mix(in srgb, var(--roxy-accent) 16%, var(--roxy-surface));--_outside:color-mix(in srgb, var(--roxy-muted) 18%, var(--roxy-surface));--_door:color-mix(in srgb, var(--roxy-success) 26%, var(--roxy-surface));grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.verdict-auspicious{color:var(--roxy-success-fg)}.verdict-inauspicious{color:var(--roxy-danger-fg)}.verdict-mixed{color:var(--roxy-warning-fg)}.frame{place-items:center;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-xs);inline-size:100%;max-inline-size:var(--roxy-chart-max-width,32rem);grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:".n.""w plate e"".s.";margin-inline:auto;display:grid}.compass{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.compass-n{grid-area:n}.compass-s{grid-area:s}.compass-w,.compass-e{writing-mode:vertical-rl}.compass-w{grid-area:w;rotate:180deg}.compass-e{grid-area:e}svg{grid-area:plate;width:100%;height:auto;display:block}.pada{fill:var(--roxy-surface);stroke:var(--roxy-border);stroke-width:.012px}.pada-innerRing,.pada-innerCorner,.pada-around-brahma{fill:color-mix(in srgb, var(--roxy-accent) 7%, var(--roxy-surface))}.pada-center,.pada-brahma{fill:var(--_brahma)}.pada-outside{fill:var(--_outside)}.pada-door{fill:var(--_door);stroke:var(--roxy-fg);stroke-width:.03px}.brahmasthan{fill:none;stroke:var(--roxy-accent-ink);stroke-width:.05px}.vamsa{stroke:var(--roxy-secondary);stroke-width:.02px;stroke-dasharray:.12 .1}.atimarma{fill:var(--roxy-accent-ink)}text{fill:var(--roxy-fg);text-anchor:middle}.devata{font-size:calc(var(--roxy-text-base) * .011875)}.square-no{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .00875)}@container (width<=30rem){.devata{display:none}.square-no{font-size:calc(var(--roxy-text-base) * .02125);dominant-baseline:middle;translate:0 .31lh}}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b,.devatas b{color:var(--roxy-fg)}.devatas{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-brahma{background:var(--_brahma)}.swatch-outside{background:var(--_outside)}.swatch-door{background:var(--_door)}.effect{margin:0;padding-block-start:var(--roxy-space-md)}.reading{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);border-block-start:0;margin:0}.cites{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin:0;padding:0;list-style:none}`],m([Kx({type:String,reflect:!0})],kr.prototype,"mode",2),kr=m([f("roxy-vastu-mandala")],kr);function Jx(n){let a=Number.parseInt(n??"",10),e=Math.round(Math.sqrt(a));if(!(!Number.isFinite(e)||e<2||e*e!==a))return{size:e,originX:0,cellW:1,originY:0,cellH:1}}import{css as Qx,html as xa,nothing as bn}from"lit";var Ks=class extends y{renderData(a){let e=a.aspects??[],t=a.mutualAspects??[],r=a.planets??[];if(e.length===0&&t.length===0)return this.renderEmpty();let s=a.datetime?V(this.effectiveLang(),a.datetime):"";return xa`<div class="wrap" part="card" aria-label="${this.t("Vedic aspects")}"><div class="head" part="header"><h2>${this.t("Vedic aspects")}</h2>${s?xa`<p class="roxy-label">${this.t("Chart time {{when}}",{when:s})}</p>`:bn}</div>${r.length>0?xa`<div part="section positions"><h3 class="section-label">${this.t("Sidereal positions")}</h3><ul class="roxy-chips">${r.map(i=>xa`<li class="position"><strong>${i.name}</strong> ${typeof i.longitude=="number"?Qe(i.longitude):i.sign??""}</li>`)}</ul></div>`:bn} ${t.length>0?xa`<div part="section mutual-aspects"><h3 class="section-label">${this.t("Mutual aspects")}</h3><ul class="roxy-chips">${t.map(i=>xa`<li class="mutual-pill">${i.planet1} ⟷ ${i.planet2} ${i.aspectType?xa`<span class="rel">${i.aspectType}</span>`:bn}</li>`)}</ul></div>`:bn} ${e.length>0?xa`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Vedic aspects")}"><table><caption class="roxy-sr-only">${this.t("Vedic planetary aspects: aspecting planet, aspect type, aspected planet, strength and orb.")}</caption><thead><tr><th scope="col">${this.t("From")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("To")}</th><th scope="col">${this.t("Strength")}</th><th scope="col">${this.t("Orb")}</th></tr></thead><tbody>${e.map(i=>xa`<tr><td>${i.aspectingPlanet}</td><td><span class="kind">${i.aspectType}</span></td><td>${i.aspectedPlanet}</td><td>${typeof i.strength=="number"?xa`<span class="bar" style="--_v:${Math.max(10,Math.min(100,i.strength))}"></span><span class="num">${b(this.effectiveLang(),i.strength,0)}</span>`:bn}</td><td class="num">${typeof i.orb=="number"?`${b(this.effectiveLang(),i.orb,2)}°`:""}</td></tr>`)}</tbody></table></div>`:bn}</div>`}};Ks.endpoints=Kc,Ks.styles=[u,Qx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.section-label{margin-block-end:var(--roxy-space-xs)}.position,.mutual-pill{font-variant-numeric:tabular-nums;min-width:0}.position strong,.mutual-pill{color:var(--roxy-fg)}.overflow-scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}tbody tr:last-child td{border-block-end:0}.kind{font-weight:var(--roxy-weight-bold)}.num{color:var(--roxy-muted)}.bar{inline-size:calc(var(--_v) * 5ch / 100);block-size:.3lh;border-radius:var(--roxy-radius-full);background:var(--roxy-accent);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`],Ks=m([f("roxy-vedic-aspects")],Ks);import{css as eb,html as ee,nothing as je}from"lit";var Cl={favourable:"Favourable",underdelivered:"Underdelivered",obstructed:"Obstructed",void:"Void",aggravated:"Aggravated",unfavourable:"Unfavourable"},tb=Object.keys(Cl),ab={favourable:"success",aggravated:"danger",unfavourable:"danger"},Ph=8,yo={"very-strong":"Very strong",strong:"Strong",moderate:"Moderate",weak:"Weak"},rb={day:"Day",finance:"Finance",natal:"Natal"},Mh={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha"},Vs=class extends y{renderData(a){let e=a.grahas??[];return e.length?ee`<div class="wrap" part="card" aria-label="${this.t("Vedic daily reading")}">${this.renderHead(a)} ${this.renderPanchanga(a)} ${this.renderGrahas(e,a.houseThemes)} ${this.renderWindows(a)} ${this.renderFinance(a)} ${this.renderDasha(a)} ${this.renderProvenance(a)}</div>`:this.renderEmpty()}renderHead(a){let e=new Map((a.tally??[]).map(r=>[r.state,r.count])),t=e.get("favourable")??0;return ee`<header class="head" part="header"><div class="title-row"><h2>${this.t("Vedic daily")}</h2><span class="roxy-label">${Js(this.effectiveLang(),a.dayStart,a.dayEnd)}</span></div><div class="verdict-row"><span class="verdict ${a.verdict}">${this.t(yo[a.verdict])}</span> <span class="evidence">${this.t("{{supportive}} of {{evaluated}} grahas support this day",{supportive:t,evaluated:a.evaluated})}</span></div>${e.size?ee`<ul class="tally roxy-chips" part="legend">${tb.filter(r=>e.get(r)).map(r=>ee`<li class="pill">${this.t(Cl[r])} ${e.get(r)}</li>`)}</ul>`:je} ${a.subject?ee`<p class="note">${this.t("Born with the Moon in {{rashi}}, nakshatra {{nakshatra}}",{rashi:a.subject.janmaRashi,nakshatra:a.subject.janmaNakshatra})}</p>`:je} ${(a.degraded??[]).map(r=>ee`<p class="note">${this.t("{{component}} unavailable: {{reason}}",{component:r.component,reason:r.reason})}</p>`)}</header>`}renderPanchanga(a){let e=a.panchanga;if(!e)return je;let t=(r,s)=>s?ee`<div><dt>${r}</dt><dd>${s.number?`${s.number}. `:""}${s.name} ${s.validTo?ee`<span class="until">${this.t("until {{time}}",{time:V(this.effectiveLang(),s.validTo)})}</span>`:je}</dd></div>`:je;return ee`<section class="block" part="section panchanga"><h3>${this.t("Panchang")}</h3><dl class="roxy-facts" part="details"><div><dt>${this.t("Vara")}</dt><dd>${e.vara}</dd></div><div><dt>${this.t("Paksha")}</dt><dd>${e.paksha}</dd></div>${t(this.t("Tithi"),e.tithi)} ${t(this.t("Nakshatra"),e.nakshatra)} ${t(this.t("Yoga"),e.yoga)} ${t(this.t("Karana"),e.karana)}</dl></section>`}theme(a,e){return a?.[String(e)]?.join(", ")??""}renderGrahas(a,e){return ee`<section class="block" part="section grahas"><h3>${this.t("Grahas today")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Grahas today")}"><table part="table"><caption class="roxy-sr-only">${this.t("Each transiting graha with its sign, the house it occupies from the natal Moon, its bindus, its kaksha and the state the classical rules give it.")}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Bindus")}</th><th scope="col">${this.t("Kaksha")}</th><th scope="col">${this.t("State")}</th></tr></thead><tbody>${a.map(t=>{let r=$(t.graha)??"",s=this.theme(e,t.houseFromMoon);return ee`<tr><td>${r?ee`<span class="glyph">${r}</span>`:je}${t.graha}</td><td>${t.sign}</td><td title="${s}">${t.houseFromMoon}</td><td>${typeof t.binduCount=="number"?t.binduCount:""}</td><td>${this.renderKaksha(t.kaksha)}</td><td><span class="state roxy-chip ${t.state}" data-tone="${ab[t.state]??je}" title="${t.stateSource??""}">${this.t(Cl[t.state])}</span></td></tr>`})}</tbody></table></div></section>`}renderKaksha(a){if(!a||typeof a.number!="number")return je;let e=a.bindu===!0?"yes":a.bindu===!1?"no":"",t=a.bindu===!0?this.t("this kaksha lord gave bindu"):a.bindu===!1?this.t("this kaksha lord gave no bindu"):"",r=this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}° to {{end}}° of the sign",{n:a.number,total:Ph,graha:a.lord,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)});return ee`<span class="kaksha" title="${t?`${r} · ${t}`:r}">${a.number}/${Ph} <span class="dot ${e}" aria-hidden="true"></span></span>`}renderWindows(a){let e=a.tara??[],t=a.chandrabala??[];if(!e.length&&!t.length)return je;let r=(s,i)=>ee`<small>${Js(this.effectiveLang(),s,i)}</small>`;return ee`<section class="block" part="section windows"><h3>${this.t("Tara and Chandrabala")}</h3>${e.length?ee`<div class="chips">${e.map(s=>ee`<span class="window"><span>${s.number}. ${s.name}${s.quality?` · ${s.quality}`:""}</span> ${r(s.validFrom,s.validTo)}</span>`)}</div>`:je} ${t.length?ee`<div class="chips">${t.map(s=>ee`<span class="window ${s.favourable?"yes":"no"}"><span>${this.t("Moon in {{sign}}, house {{n}}",{sign:s.moonSign,n:s.houseFromMoon})} ${s.ashtamaChandra?ee`<span class="mark">· ${this.t("Ashtama Chandra")}</span>`:je} </span>${r(s.validFrom,s.validTo)}</span>`)}</div>`:je}</section>`}renderFinance(a){let e=a.areas?.finance;if(!e)return je;let t=a.houseThemes,r=s=>{let i=this.theme(t,s.house);return ee`<li>${s.graha} · ${this.t("House {{n}}",{n:s.house})}${i?` (${i})`:""} · ${this.t("level {{level}} {{grade}}",{level:s.level,grade:s.grade})} ${s.dashaLevels?.length?ee`<span class="note">${s.dashaLevels.map(o=>this.t(Mh[o])).join(", ")}</span>`:je}</li>`};return ee`<section class="block" part="section finance"><h3>${this.t("Finance")}</h3><div class="verdict-row"><span class="verdict ${e.band??""}">${e.band?this.t(yo[e.band]):""}</span> ${typeof e.positive=="number"&&typeof e.negative=="number"?ee`<span class="evidence">${this.t("{{positive}} positive against {{negative}} negative",{positive:e.positive,negative:e.negative})}</span>`:je}</div><div class="lists">${e.drivers?.length?ee`<div><h3>${this.t("Drivers")}</h3><ul>${e.drivers.map(r)}</ul></div>`:je} ${e.cautions?.length?ee`<div><h3>${this.t("Cautions")}</h3><ul>${e.cautions.map(r)}</ul></div>`:je}</div>${this.renderComposite(e.composite)}</section>`}renderComposite(a){return a?ee`<div class="composite"><h3>${this.t("Combined score")}</h3><div class="verdict-row"><span class="verdict ${a.band}">${this.t(yo[a.band])}</span> <span class="evidence">${a.score}</span></div><ul class="layers">${a.layers.map(e=>ee`<li><span>${this.t(rb[e.layer])}</span> <span class="evidence">${e.score}</span> <span class="band">${this.t(yo[e.band])}</span></li>`)}</ul></div>`:je}renderDasha(a){let e=a.dasha??[];return e.length?ee`<section class="block" part="section dasha"><h3>${this.t("Dasha")}</h3><div class="chips">${e.map(t=>ee`<span class="window"><span>${this.t(Mh[t.level])} · ${t.lord}</span> <small>${Js(this.effectiveLang(),t.startDate,t.endDate)}</small></span>`)}</div></section>`:je}renderProvenance(a){return a.frames?ee`<section class="block" part="section frame">${Td(this.effectiveLang(),a.frames,this.translator)}</section>`:je}};Vs.endpoints=Vc,Vs.styles=[u,G,re,eb`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}h2,h3,p{margin:0}.title-row{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{color:var(--roxy-secondary);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.verdict:is(.very-strong,.strong){color:var(--roxy-success-fg)}.verdict.moderate{color:var(--roxy-accent-ink)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.pill{font-variant-numeric:tabular-nums}.roxy-facts{margin:0}.until{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.state{cursor:help}.kaksha{align-items:center;gap:var(--roxy-space-xs);cursor:help;display:inline-flex}.dot{aspect-ratio:1;border-radius:var(--roxy-radius-full);background:var(--roxy-border);inline-size:1ch}.dot.yes{background:var(--roxy-success)}.dot.no{background:var(--roxy-warning)}.chips{gap:var(--roxy-space-sm) var(--roxy-space-lg);flex-wrap:wrap;display:flex}.window{font-size:var(--roxy-text-sm);display:grid}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.window.yes>:first-child{color:var(--roxy-success-fg)}.window.no>:first-child,.mark{color:var(--roxy-danger-fg)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.lists ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.composite{gap:var(--roxy-space-sm);display:grid}.layers{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding:0;list-style:none;display:grid}.layers li{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.layers .band{color:var(--roxy-secondary)}`],Vs=m([f("roxy-vedic-daily")],Vs);import{html as _h}from"lit";import{property as Tl}from"lit/decorators.js";var ba=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this);this.chartStyle="north";this.chartReference="lagna";this.lagnaOverride="";this.setStyle=e=>{this.chartStyle=e}}resolveReference(){if(this.lagnaOverride)return this.lagnaOverride;if(this.chartReference==="moon")return this.data?.meta?.Moon?.rashi}viewModel(){return this.data?.meta?Ai(this.data.meta,{divisionLabel:"D1 Rashi",lagnaOverride:this.resolveReference(),states:this.data}):null}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let r=this.chartReference==="moon"&&!this.lagnaOverride?this.t("Chandra lagna"):this.t("Vedic kundli");return _h`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">${r}</h2>${X(this.effectiveLang(),e.frame,this.translator)} ${Pi(t,this.translator)}</div>${_i(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(_h`<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label="${this.t("Vedic birth chart with twelve sign houses")}"><title>${this.t("Vedic kundli")}</title>${Mi(t,this.chartStyle,this.translator)}</svg>`,r,this.translator)}</div></div>`}};ba.endpoints=qc,ba.styles=[u,Ge,G,Ni,Xe],m([Tl({type:String,reflect:!0,attribute:"chart-style"})],ba.prototype,"chartStyle",2),m([Tl({type:String,reflect:!0,attribute:"chart-reference"})],ba.prototype,"chartReference",2),m([Tl({type:String,reflect:!0,attribute:"lagna-override"})],ba.prototype,"lagnaOverride",2),ba=m([f("roxy-vedic-kundli")],ba);import{css as sb,html as ue,nothing as Ke}from"lit";var nb=["Lagna","Sun","Moon","Mars","Mercury","Jupiter","Venus","Saturn","Rahu","Ketu"],Nh=[["awastha","Baladi."],["jagradadi","Jagradadi."],["deeptadi","Deeptadi."]],qs=class extends y{orderedRows(){let a=this.data?.meta??{},e=new Set,t=[];for(let r of nb){let s=a[r];s&&(t.push([r,s]),e.add(r))}for(let[r,s]of Object.entries(a))e.has(r)||t.push([r,s]);return t}renderData(a){if(!a.meta)return this.renderEmpty();let e=this.orderedRows(),t=e.some(([,r])=>r.avasthaInfo);return ue`<div class="wrap" part="card" aria-label="${this.t("Vedic planetary positions")}"><header class="head" part="header"><h2>${this.t("Planetary positions")}</h2>${X(this.effectiveLang(),a.frame,this.translator)}</header><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Planetary positions")}"><table role="table"><caption class="roxy-sr-only">${this.t("Vedic planetary positions: each graha with its rashi, degree, nakshatra, pada, nakshatra lord, house, its state in all three avastha systems, and retrograde state. Jagradadi and Deeptadi are read from sign dignity, which the nodes and the Lagna do not have, so those two cells are blank on the Rahu, Ketu and Lagna rows. Uranus, Neptune and Pluto appear only when asked for and rule no sign, so every avastha and house cell is blank on their rows too.")} ${t?this.t("Each avastha state is followed by its meaning."):Ke}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Nak. lord")}</th><th scope="col">${this.t("House")}</th><th scope="col" title="${this.t("Baladi: the five age states, set by degree within the sign")}">${this.t("Baladi")}</th><th scope="col" title="${this.t("Jagradadi: the three waking states, set by sign dignity. The seven classical grahas only")}">${this.t("Jagradadi")}</th><th scope="col" title="${this.t("Deeptadi: the nine dispositional states, set by sign dignity. The seven classical grahas only")}">${this.t("Deeptadi")}</th><th scope="col">${this.t("Retro")}</th></tr></thead><tbody>${e.map(([r,s])=>{let i=(s.graha??r)==="Lagna",o=$(s.graha??r)??"",l=N(s.rashi)??"";return ue`<tr class="${i?"lagna":""}"><td class="graha">${o?ue`<span class="glyph">${o}</span>`:Ke}${s.graha??r}</td><td>${l?ue`<span class="glyph">${l}</span>`:Ke}${s.rashi??""}</td><td>${typeof s.longitude=="number"?Qe(s.longitude):""}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${typeof s.house=="number"?s.house:""}</td>${Nh.map(([c])=>ue`<td>${s[c]??""}${s.avasthaInfo?.[c]?.meaning?ue`<span class="gloss">${s.avasthaInfo[c].meaning}</span>`:Ke}</td>`)}<td>${s.isRetrograde?ue`<span class="retro">R</span>`:Ke}</td></tr>`})} ${this.renderModernRows()}</tbody></table></div>${this.renderCombustion()} ${this.renderPlanetaryWar()} ${this.renderInterpretations()} ${this.renderYogas()} ${this.renderHouses()}</div>`}renderModernRows(){let a=this.data?.modernPlanets??[];return a.length===0?Ke:a.map((e,t)=>{let r=N(e.rashi)??"";return ue`<tr class="modern ${t===0?"modern-first":""}"><td class="graha">${wn(e.planet,e.sanskritName)}</td><td>${r?ue`<span class="glyph">${r}</span>`:Ke}${e.rashi??""}</td><td>${typeof e.longitude=="number"?Qe(e.longitude):""}</td><td>${e.nakshatra?.name??""}</td><td>${e.nakshatra?.pada??""}</td><td>${e.nakshatra?.lord??""}</td><td></td><td></td><td></td><td></td><td>${e.isRetrograde?ue`<span class="retro">R</span>`:Ke}</td></tr>`})}renderCombustion(){let a=this.data?.combustion??[];return a.length===0?Ke:ue`<details class="panel" part="section combustion"><summary>${this.t("Combust grahas")}<span class="summary-count">${a.length}</span>${H()}</summary><div class="panel-body">${a.map(e=>{let t=$(e.planet)??"",r=b(this.effectiveLang(),e.distanceFromSun,2),s=b(this.effectiveLang(),e.orb,1);return ue`<div class="condition"><span class="planet">${t?`${t} `:""}${e.planet}</span> <span class="detail">${this.t("{{distance}} deg from Sun, within {{orb}} deg orb",{distance:r,orb:s})}</span></div>`})}</div></details>`}renderPlanetaryWar(){let a=this.data?.planetaryWar??[];return a.length===0?Ke:ue`<details class="panel" part="section planetary-war"><summary>${this.t("Planetary wars")}<span class="summary-count">${a.length}</span>${H()}</summary><div class="panel-body">${a.map(e=>{let t=b(this.effectiveLang(),e.distance,2);return ue`<div class="condition"><span class="planet">${this.t("{{first}} vs {{second}}",{first:e.planet1,second:e.planet2})}</span> <span class="detail">${this.t("{{distance}} deg apart",{distance:t})}</span> <span class="winner">${this.t("{{graha}} wins",{graha:e.winner})}</span></div>`})}</div></details>`}renderInterpretations(){if(this.hideReadings)return Ke;let a=this.data?.interpretations??{},e=this.orderedRows().map(([t,r])=>[r.graha??t,a[r.graha??t],r.avasthaInfo]).filter(([,t,r])=>t!=null||r!=null);return e.length===0?Ke:ue`<details class="panel" part="section readings"><summary>${this.t("Interpretations")}<span class="summary-count">${e.length}</span>${H()}</summary><div class="panel-body">${e.map(([t,r,s])=>{let i=$(t)??"";return ue`<div class="interp"><span class="planet">${i?`${i} `:""}${t}</span> ${r?.rashi?ue`<p><span class="label">${this.t("Rashi.")}</span> ${r.rashi}</p>`:Ke} ${r?.nakshatra?ue`<p><span class="label">${this.t("Nakshatra.")}</span> ${r.nakshatra}</p>`:Ke} ${Nh.map(([o,l])=>s?.[o]?.interpretation?ue`<p><span class="label">${this.t(l)}</span> ${s[o].interpretation}</p>`:Ke)}</div>`})}</div></details>`}renderHouses(){let a=(this.data?.houses??[]).filter(e=>e.name||e.description);return a.length===0?Ke:ue`<details class="panel" part="section bhava-significations"><summary>${this.t("Bhava significations")}<span class="summary-count">${a.length}</span>${H()}</summary><div class="panel-body">${a.map(e=>ue`<div class="bhava"><span class="name">${e.number}. ${e.name??""}</span> ${e.description?ue`<p class="desc">${e.description}</p>`:Ke}</div>`)}</div></details>`}renderYogas(){let a=(this.data?.yogas??[]).filter(e=>e.present);return a.length===0?Ke:ue`<details class="panel" part="section yogas"><summary>${this.t("Yogas")}<span class="summary-count">${a.length}</span>${H()}</summary><div class="panel-body">${a.map(e=>ue`<div class="bhava"><span class="name">${e.name} ${e.quality?ue`<span class="quality ${e.quality.toLowerCase()}">${e.quality}</span>`:Ke}</span> ${e.result?ue`<p class="desc">${e.result}</p>`:Ke}</div>`)}</div></details>`}};qs.endpoints=Yc,qs.styles=[u,G,M,sb`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,p{margin:0}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.lagna td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}tbody tr.lagna .glyph{color:var(--roxy-accent-ink)}tbody tr.modern-first td{border-block-start:var(--roxy-line-thick) solid var(--roxy-border)}td.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.gloss{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);display:block}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}details.panel{border-block-start:1px solid var(--roxy-border)}details.panel>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);padding:var(--roxy-space-sm) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);display:flex}.summary-count{margin-inline:auto var(--roxy-space-xs);color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums}.panel-body{gap:var(--roxy-space-sm);padding:0 var(--roxy-space-md) var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:minmax(0,1fr);display:grid}.condition{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}:is(.condition,.interp) .planet,.bhava .name{font-weight:var(--roxy-weight-bold)}.condition .detail{color:var(--roxy-muted);font-variant-numeric:tabular-nums}.condition .winner{color:var(--roxy-success-fg);font-weight:var(--roxy-weight-bold)}.interp,.bhava{gap:calc(var(--roxy-space-unit) / 2);display:grid}.interp .label{color:var(--roxy-muted);font-weight:var(--roxy-weight-bold)}.bhava .desc{color:var(--roxy-muted)}.quality{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.quality.positive{color:var(--roxy-success-fg)}.quality.negative{color:var(--roxy-danger-fg)}.quality.both{color:var(--roxy-muted)}`],qs=m([f("roxy-vedic-planets-table")],qs);import{css as ib,html as Ve,nothing as Mt}from"lit";import{state as ob}from"lit/decorators.js";function zh(n){return n.suppressedBy||void 0}var Oh=["classical","asraya","dala","akriti","sankhya"];function Gh(n){let a=Oh.indexOf(n.family);return a===-1?Oh.length:a}var lb=[{id:"present",source:"Present",open:!0,noteSource:"Every classical condition is satisfied by this chart."},{id:"outranked",source:"Outranked",open:!0,noteSource:"The rule matched, but a stronger family silences it under the classical precedence norms. Each card names the family that took precedence."},{id:"absent",source:"Not present",open:!1,noteSource:"At least one classical condition fails. Read the evidence for which."}],cb={Positive:"success",Negative:"danger",Both:"warning"},Sr=class extends y{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":zh(e)?"outranked":"absent"}renderVerdictGroup(e,t){if(!t.length)return Mt;let r=[...t].sort((s,i)=>Gh(s)-Gh(i));return Ve`<details class="group" part="section verdict" ?open="${e.open||!!this.filter}"><summary class="group-summary"><span class="group-label">${this.t(e.source)}</span> <span class="group-count">${t.length}</span></summary><p class="group-note">${this.t(e.noteSource)}</p><div class="detail-grid">${r.map(s=>this.renderDetectCard(s))}</div></details>`}renderQualityChip(e){return Ve`<span class="quality-chip roxy-chip quality-${e}" data-tone="${cb[e]??Mt}">${e}</span>`}renderFamilyChip(e){return e.family?Ve`<span class="family-chip roxy-chip" title="${this.t("Classical family")}">${A(e.family)}</span>`:Mt}renderDetailCard(e){return Ve`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):Mt} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?Ve`<p class="description">${e.description}</p>`:Mt} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?Mt:Ve`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let t=e.present?void 0:zh(e),[r,s,i]=e.present?["is-present","Present","success"]:t?["is-outranked",`Outranked by ${A(t)}`,"warning"]:["is-absent","Not present",void 0];return Ve`<div class="detail-card ${e.present?"":t?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):Mt} ${this.renderFamilyChip(e)} <span class="present-badge roxy-chip ${r}" data-tone="${i??Mt}">${s}</span></p>${e.description&&!this.hideReadings?Ve`<p class="description">${e.description}</p>`:Mt} ${e.present?this.renderEffects(e.result):Mt} ${e.evidence?Ve`<p class="evidence">${e.evidence}</p>`:Mt}</div>`}renderData(e){let t=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let r=e;return Ve`<div class="wrap" part="card">${this.renderDetailCard(r)}</div>`}if("yogas"in e&&Array.isArray(e.yogas)){let r=e.yogas;if(r.length>0&&"present"in r[0]){let c=r,d=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,p=e.total??c.filter(h=>h.present).length;return Ve`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Detected yogas")}</h2><span class="count">${this.t("{{count}} of {{total}} present",{count:p,total:c.length})}</span></div>${X(this.effectiveLang(),e.frame,this.translator)}<div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter detected yogas by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="group-stack" part="section verdicts" role="region" aria-live="polite" aria-label="${this.t("Detected yogas")}">${d.length>0?lb.map(h=>this.renderVerdictGroup(h,d.filter(x=>this.verdictOf(x)===h.id))):Ve`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}if(r.length>0&&"description"in r[0]){let c=r,d=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,p=e.total;return Ve`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${p!==void 0?Ve`<span class="count">${this.t("{{count}} total",{count:p})}</span>`:Mt}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="detail-grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${d.length>0?d.map(h=>this.renderDetailCard(h)):Ve`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}let i=r,o=t?i.filter(c=>c.name.toLowerCase().includes(t)):i,l=e.total;return Ve`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${l!==void 0?Ve`<span class="count">${this.t("{{count}} total",{count:l})}</span>`:Mt}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${o.length>0?o.map(c=>Ve`<div class="yoga-chip">${c.name}</div>`):Ve`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return Ve`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};Sr.endpoints=Zc,Sr.styles=[u,G,ib`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}h2,p{margin:0}.count,.no-results{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.search{inline-size:100%;max-inline-size:32ch;font-size:var(--roxy-text-sm)}.search::placeholder{color:var(--roxy-muted)}.grid{gap:0 var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,22ch),1fr));display:grid}.yoga-chip{padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);overflow-wrap:anywhere}.detail-card{gap:var(--roxy-space-sm);display:grid}.detail-grid>.detail-card+.detail-card{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm)}.detail-name{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);flex-wrap:wrap;display:flex}.wrap>.detail-card .detail-name{font-size:var(--roxy-text-lg)}.family-chip{color:var(--roxy-fg)}.quality-chip,.present-badge{font-weight:var(--roxy-weight-bold)}.detail-card.absent,.detail-card.outranked{color:var(--roxy-secondary)}.group-stack,.group,.detail-grid{gap:var(--roxy-space-sm);display:grid}.group-stack{gap:var(--roxy-space-md)}.group-summary{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-secondary);list-style:none;display:flex}.group-summary:before,.detail-card details>summary:before{content:"+";font-size:var(--roxy-text-base);line-height:1}.group-summary:before{color:var(--roxy-accent-ink)}.group[open]>.group-summary:before,.detail-card details[open]>summary:before{content:"-"}.group-label{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-count{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.group-note,.evidence{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.description{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.detail-card details{font-size:var(--roxy-text-sm)}.detail-card details>summary{align-items:center;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-xs);color:var(--roxy-accent-ink);list-style:none;display:flex}.result-body{color:var(--roxy-fg);padding-block-start:var(--roxy-space-xs)}`],m([ob()],Sr.prototype,"filter",2),Sr=m([f("roxy-yoga-list")],Sr);import{css as db,html as B,nothing as U}from"lit";import{property as pb}from"lit/decorators.js";var uo={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},Ih={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},Rr=class extends y{constructor(){super(...arguments);this.mode="sign"}renderData(e){if(this.mode==="compatibility"&&"signs"in e)return this.renderCompatibility(e);let t="animal"in e&&e.animal?e.animal:e,r=this.effectiveLang(),s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,i="date"in e&&e.date?R(r,e.date):"";return B`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><span class="hanzi" lang="zh">${t.chinese??""}</span><div><h2 class="title" id="zodiac-title">${g(t,"name")}</h2><div class="sub">${t.pinyin??""}${i?` ${i}`:""}</div></div>${s!==null?B`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:P(r,s)})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:U}</header>${this.renderIdentity(e,t)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?B`<p class="prose" part="section interpretation">${e.interpretation}</p>`:U} ${"conventions"in e?Fa(e.conventions,this.translator,this.effectiveLang()):U}</article>`}renderIdentity(e,t){let r="yearPillar"in e&&e.yearPillar||"dayPillar"in e&&e.dayPillar||null,s="hours"in e?e.hours:void 0,i="element"in e&&typeof e.element=="string"?e:void 0,o=i?g(i,"element"):g(t,"element"),l=bt(i?.element??t.element),c="polarity"in e&&typeof e.polarity=="string"&&e.polarity||t.polarity||"";return!o&&!c&&!r&&!s&&!t.branch?U:B`<div class="facts" part="details">${o?B`<span><span class="roxy-label">${this.t("Element")}</span><b class="element-word ${l}">${o}</b></span>`:U} ${c?B`<span><span class="roxy-label">${this.t("Polarity")}</span>${c}</span>`:U} ${t.branch?B`<span><span class="roxy-label">${this.t("Branch")}</span>${t.branch}</span>`:U} ${r?B`<span><span class="roxy-label">${this.t("Pillar")}</span> <b>${r.stem??""}</b> ${r.branch??""}</span>`:U} ${s&&typeof s.start=="number"?B`<span><span class="roxy-label">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(s.start),end:this.hourLabel(s.end)})}</span>`:U}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return U;let t="year"in e?e.year:void 0,r="benMingNian"in e?e.benMingNian:!1;return B`${B`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Day")}</span><b>${e.relationship&&uo[e.relationship]?this.t(uo[e.relationship]):e.relationship??""}</b></span> ${t?B`<span><span class="roxy-label">${this.t("Year")}</span>${t.pillar??""} ${g(t,"animal")} ${t.relationship&&uo[t.relationship]?this.t(uo[t.relationship]):t.relationship??""}</span>`:U} ${r?B`<span class="roxy-chip tag">${this.t("Ben Ming Nian")}</span>`:U}</div>`} ${this.hideReadings?U:B`${e.overview?B`<p class="prose" part="section overview">${e.overview}</p>`:U}<div class="sections" part="section outlook">${"love"in e&&e.love?B`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:U} ${"career"in e&&e.career?B`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:U} ${"advice"in e&&e.advice?B`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:U}</div>`} ${t?.note&&!this.hideReadings?B`<p class="prose" part="reading">${t.note}</p>`:U}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return U;let t=e;return B`${t.trine?B`<section part="section trine"><h3 class="block-title">${this.t("Trine")} ${t.trine.number??""}</h3><div class="facts"><span><b lang="zh">${t.trine.chinese??""}</b> <span class="element-word ${bt(t.trine.element)}">${g(t.trine,"element")}</span></span> ${t.trine.members?.length?B`<span class="roxy-chips">${t.trine.members.map(r=>B`<span class="roxy-chip">${r}</span>`)}</span>`:U} ${t.trine.theme?B`<span>${t.trine.theme}</span>`:U}</div></section>`:U} ${this.renderPartners(t)} ${this.hideReadings?U:B`${t.summary?B`<p class="prose" part="section summary">${t.summary}</p>`:U} ${t.traits?.length?B`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><ul class="roxy-chips">${t.traits.map(r=>B`<li>${r}</li>`)}</ul></section>`:U} ${this.bullets(this.t("Strengths"),t.strengths)} ${this.bullets(this.t("Weaknesses"),t.weaknesses)} ${t.compatibilitySummary?B`<p class="prose" part="reading">${t.compatibilitySummary}</p>`:U}`}`}renderPartners(e){let r=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,s])=>s?.name);return r.length===0?U:B`<section part="section partners"><div class="partners">${r.map(([s,i])=>B`<div class="partner"><span class="role roxy-label">${this.t(s)}</span> <span class="glyph" lang="zh">${i?.chinese??""}</span> <span class="who">${g(i,"name")}</span></div>`)}</div></section>`}bullets(e,t){return t?.length?B`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${t.map(r=>B`<li>${r}</li>`)}</ul></section>`:U}renderCompatibility(e){let t=e.signs?.first,r=e.signs?.second,s=typeof e.score=="number"?e.score:null;return B`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><div class="pair"><span class="side"><span class="hanzi" lang="zh">${t?.chinese??""}</span> <span class="sub">${g(t,"name")}</span></span> <span class="side"><span class="hanzi" lang="zh">${r?.chinese??""}</span> <span class="sub">${g(r,"name")}</span></span></div></header><h2 class="title" id="zodiac-title">${g(e,"relationshipName")} <span lang="zh">${e.relationshipChinese??""}</span></h2>${s!==null?B`<div class="score" part="details"><span class="score-value">${s}</span> <span class="score-track"><span class="score-fill" style="width:${Math.max(0,Math.min(100,s))}%"></span></span> ${e.verdict?B`<span class="roxy-chip tag">${Ih[e.verdict]?this.t(Ih[e.verdict]):e.verdict}</span>`:U}</div>`:U} ${e.sharedElement?B`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Shared element")}</span><b class="element-word ${bt(e.sharedElement)}">${g(e,"sharedElement")}</b></span></div>`:U} ${this.hideReadings?U:B`${e.summary?B`<p class="prose" part="section summary">${e.summary}</p>`:U} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?B`<p class="prose" part="reading">${e.advice}</p>`:U}`}</article>`}};Rr.endpoints=Wc,Rr.styles=[u,G,ca,db`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.hanzi{font-size:calc(var(--roxy-text-base) * 2.75);color:var(--roxy-accent-ink);line-height:1}.title,.block-title{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.sub{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar,.score-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.energy-bar{block-size:.25lh;inline-size:12ch;vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block}.energy-bar>span,.score-fill{background:var(--roxy-accent);height:100%;display:block}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-md);display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.prose{margin:0}.prose[part~=reading]{padding-block-start:var(--roxy-space-md)}section .facts{border-block-start:0;padding-block-start:0}.sections{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm);margin:0}.bullets{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.partners{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(16ch,1fr));display:grid}.partner,.pair .side{gap:calc(var(--roxy-space-unit) / 2);text-align:center;display:grid}.partner .glyph{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight);color:var(--roxy-accent-ink)}.partner .who{font-size:var(--roxy-text-sm)}.score{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.score-value{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.score-track{flex:1;block-size:.35lh;min-inline-size:16ch}.tag{color:var(--roxy-info-fg)}.pair{justify-content:center;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}`],m([pb({type:String,reflect:!0})],Rr.prototype,"mode",2),Rr=m([f("roxy-zodiac-card")],Rr);var Fh={post_astrology_natal_chart:{tag:"roxy-natal-chart",pascal:"RoxyNatalChart",operationId:"generateNatalChart"},post_astrology_synastry:{tag:"roxy-synastry-chart",pascal:"RoxySynastryChart",operationId:"calculateSynastry"},post_astrology_transits:{tag:"roxy-transits-table",pascal:"RoxyTransitsTable",operationId:"calculateTransits"},post_astrology_transit_aspects:{tag:"roxy-transit-wheel",pascal:"RoxyTransitWheel",operationId:"calculateTransitAspects"},post_astrology_aspects:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"calculateAspects"},post_astrology_aspect_patterns:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"detectAspectPatterns"},get_astrology_moon_phase_current:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getCurrentMoonPhase",attrs:{mode:"current"}},get_astrology_moon_phase_upcoming:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getUpcomingMoonPhases",attrs:{mode:"upcoming"}},get_astrology_moon_phase_calendar_year_month:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getMoonCalendar",attrs:{mode:"calendar"}},get_astrology_horoscope_sign_daily:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getDailyHoroscope",attrs:{period:"daily"}},get_astrology_horoscope_sign_weekly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getWeeklyHoroscope",attrs:{period:"weekly"}},get_astrology_horoscope_sign_monthly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getMonthlyHoroscope",attrs:{period:"monthly"}},get_astrology_horoscope_sign_yearly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getYearlyHoroscope",attrs:{period:"yearly"}},post_astrology_astrocartography:{tag:"roxy-astrocartography-map",pascal:"RoxyAstrocartographyMap",operationId:"generateAstrocartography"},post_astrology_local_space:{tag:"roxy-local-space-compass",pascal:"RoxyLocalSpaceCompass",operationId:"generateLocalSpace"},post_astrology_relocation_chart:{tag:"roxy-relocation-wheel",pascal:"RoxyRelocationWheel",operationId:"generateRelocationChart"},post_astrology_asteroids:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateAsteroids"},post_astrology_lilith:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateLilith"},post_astrology_progressions:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateProgressions"},post_astrology_solar_arc:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateSolarArc"},post_astrology_arabic_lots:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"calculateArabicLots"},post_astrology_planets_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyTropicalEphemeris"},post_vedic_astrology_planetary_positions_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyEphemeris"},post_astrology_fixed_stars:{tag:"roxy-fixed-stars",pascal:"RoxyFixedStars",operationId:"generateFixedStars"},post_astrology_profections:{tag:"roxy-profection-card",pascal:"RoxyProfectionCard",operationId:"generateProfections"},post_astrology_compatibility_score:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateCompatibility",attrs:{mode:"astrology"}},post_numerology_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateNumCompatibility",attrs:{mode:"numerology"}},post_biorhythm_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateBioCompatibility",attrs:{mode:"biorhythm"}},post_vedic_astrology_birth_chart:{tag:"roxy-vedic-kundli",pascal:"RoxyVedicKundli",operationId:"generateBirthChart"},post_vedic_astrology_divisional_chart:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateDivisionalChart"},post_vedic_astrology_navamsa:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateNavamsa"},post_vedic_astrology_kp_chart:{tag:"roxy-kp-chart",pascal:"RoxyKpChart",operationId:"generateKpChart"},post_vedic_astrology_kp_planets:{tag:"roxy-kp-planets-table",pascal:"RoxyKpPlanetsTable",operationId:"getKpPlanets"},post_vedic_astrology_kp_ruling_planets:{tag:"roxy-kp-ruling-planets",pascal:"RoxyKpRulingPlanets",operationId:"getKpRulingPlanets"},post_vedic_astrology_ashtakavarga:{tag:"roxy-ashtakavarga-grid",pascal:"RoxyAshtakavargaGrid",operationId:"calculateAshtakavarga"},post_vedic_astrology_shadbala:{tag:"roxy-shadbala-table",pascal:"RoxyShadbalaTable",operationId:"calculateShadbala"},post_vedic_astrology_dasha_major:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getMajorDashas",attrs:{period:"major"}},post_vedic_astrology_dasha_current:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getCurrentDasha",attrs:{period:"current"}},post_vedic_astrology_dasha_sub_mahadasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSubDashas",attrs:{period:"sub"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPratyantardashas",attrs:{period:"antara"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSookshmaDashas",attrs:{period:"sookshma"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha_sookshma:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPranaDashas",attrs:{period:"prana"}},post_vedic_astrology_compatibility:{tag:"roxy-guna-milan",pascal:"RoxyGunaMilan",operationId:"calculateGunMilan"},post_vedic_astrology_panchang_detailed:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getDetailedPanchang",attrs:{detail:"detailed"}},post_vedic_astrology_panchang_basic:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getBasicPanchang",attrs:{detail:"basic"}},post_vedic_astrology_aspects:{tag:"roxy-vedic-aspects",pascal:"RoxyVedicAspects",operationId:"calculateDrishti"},post_vedic_astrology_panchang_hora:{tag:"roxy-hora-table",pascal:"RoxyHoraTable",operationId:"getHora"},post_vedic_astrology_panchang_choghadiya:{tag:"roxy-choghadiya-grid",pascal:"RoxyChoghadiyaGrid",operationId:"getChoghadiya"},post_vedic_astrology_heliacal:{tag:"roxy-heliacal-table",pascal:"RoxyHeliacalTable",operationId:"getHeliacalVisibility"},post_vedic_astrology_daily:{tag:"roxy-vedic-daily",pascal:"RoxyVedicDaily",operationId:"getVedicDailyReading"},post_vedic_astrology_kp_daily_finance:{tag:"roxy-kp-finance-card",pascal:"RoxyKpFinanceCard",operationId:"getKpDailyFinance"},post_vedic_astrology_transit:{tag:"roxy-gochara-table",pascal:"RoxyGocharaTable",operationId:"calculateTransit"},post_vedic_astrology_bhava_bala:{tag:"roxy-bhava-bala-table",pascal:"RoxyBhavaBalaTable",operationId:"calculateBhavaBala"},post_vedic_astrology_bhav_chalit:{tag:"roxy-bhav-chalit-table",pascal:"RoxyBhavChalitTable",operationId:"calculateBhavChalit"},post_vedic_astrology_upagraha:{tag:"roxy-upagraha-table",pascal:"RoxyUpagrahaTable",operationId:"getUpagrahaPositions"},post_vedic_astrology_chara_karakas:{tag:"roxy-chara-karakas",pascal:"RoxyCharaKarakas",operationId:"calculateCharaKarakas"},post_vedic_astrology_arudha:{tag:"roxy-arudha-padas",pascal:"RoxyArudhaPadas",operationId:"calculateArudhaPadas"},get_vedic_astrology_yoga:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"listYogas"},post_vedic_astrology_yoga_detect:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"detectYogas"},get_vedic_astrology_yoga_id:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"getYoga"},get_vedic_astrology_nakshatras_id:{tag:"roxy-nakshatra-card",pascal:"RoxyNakshatraCard",operationId:"getNakshatra"},post_vedic_astrology_dosha_manglik:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkManglikDosha",attrs:{type:"manglik"}},post_vedic_astrology_dosha_kalsarpa:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkKalsarpaDosha",attrs:{type:"kalsarpa"}},post_vedic_astrology_dosha_sadhesati:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkSadhesati",attrs:{type:"sadhesati"}},post_numerology_life_path:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateLifePath",attrs:{type:"life-path"}},post_numerology_expression:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateExpression",attrs:{type:"expression"}},post_numerology_soul_urge:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateSoulUrge",attrs:{type:"soul-urge"}},post_numerology_personality:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonality",attrs:{type:"personality"}},post_numerology_birth_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateBirthDay",attrs:{type:"birth-day"}},post_numerology_maturity:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateMaturity",attrs:{type:"maturity"}},post_numerology_daily:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"getDailyNumber",attrs:{type:"daily"}},post_numerology_personal_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalDay",attrs:{type:"personal-day"}},post_numerology_personal_month:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalMonth",attrs:{type:"personal-month"}},post_numerology_personal_year:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalYear",attrs:{type:"personal-year"}},post_numerology_chart:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"generateNumerologyChart",attrs:{type:"chart"}},get_numerology_compound_number:{tag:"roxy-compound-number",pascal:"RoxyCompoundNumber",operationId:"getCompoundNumber"},post_kabbalah_gematria:{tag:"roxy-gematria",pascal:"RoxyGematria",operationId:"calculateGematria"},post_tarot_daily:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getDailyCard"},get_tarot_cards_id:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getCard"},get_tarot_cards:{tag:"roxy-tarot-catalog",pascal:"RoxyTarotCatalog",operationId:"listCards"},post_tarot_spreads_three_card:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castThreeCard",attrs:{spread:"three-card"}},post_tarot_spreads_celtic_cross:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCelticCross",attrs:{spread:"celtic-cross"}},post_tarot_spreads_love:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castLoveSpread",attrs:{spread:"love"}},post_tarot_spreads_career:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCareerSpread",attrs:{spread:"career"}},post_tarot_spreads_custom:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCustomSpread",attrs:{spread:"custom"}},post_tarot_yes_no:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castYesNo",attrs:{spread:"yes-no"}},post_tarot_draw:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"drawCards",attrs:{spread:"draw"}},post_human_design_bodygraph:{tag:"roxy-bodygraph",pascal:"RoxyBodygraph",operationId:"generateBodygraph"},post_human_design_type:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateType"},post_human_design_profile:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateProfile"},post_human_design_connection:{tag:"roxy-hd-connection",pascal:"RoxyHdConnection",operationId:"calculateConnection"},post_human_design_penta:{tag:"roxy-hd-penta",pascal:"RoxyHdPenta",operationId:"calculatePenta"},post_human_design_variables:{tag:"roxy-hd-variables",pascal:"RoxyHdVariables",operationId:"calculateVariables"},post_forecast_timeline:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"generateTimeline"},post_forecast_significant_dates:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"findSignificantDates"},post_forecast_transits:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"forecastTransits"},post_forecast_digest:{tag:"roxy-forecast-digest",pascal:"RoxyForecastDigest",operationId:"generateDigest"},post_chinese_astrology_bazi_chart:{tag:"roxy-bazi-chart",pascal:"RoxyBaziChart",operationId:"generateBaziChart"},post_chinese_astrology_bazi_luck_pillars:{tag:"roxy-luck-pillars",pascal:"RoxyLuckPillars",operationId:"calculateLuckPillars"},post_chinese_astrology_zodiac_sign:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"calculateZodiacAnimal",attrs:{mode:"sign"}},get_chinese_astrology_zodiac_animals_id:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacAnimal",attrs:{mode:"animal"}},get_chinese_astrology_zodiac_id_daily:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getDailyZodiacReading",attrs:{mode:"daily"}},get_chinese_astrology_zodiac_compatibility_sign1_sign2:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacCompatibility",attrs:{mode:"compatibility"}},get_chinese_astrology_calendar_day_date:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getAlmanacDay",attrs:{mode:"day"}},get_chinese_astrology_calendar_monthly:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getMonthlyAlmanac",attrs:{mode:"month"}},post_chinese_astrology_calendar_auspicious_days:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"lookupAuspiciousDays",attrs:{mode:"auspicious"}},post_feng_shui_flying_stars_natal:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"generateFlyingStarChart",attrs:{mode:"natal"}},get_feng_shui_flying_stars_annual_year:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"getAnnualFlyingStars",attrs:{mode:"annual"}},post_feng_shui_kua:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"calculateKuaNumber",attrs:{mode:"kua"}},post_feng_shui_eight_mansions:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"generateEightMansions",attrs:{mode:"mansions"}},post_mesoamerican_astrology_mayan_tzolkin:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"calculateTzolkin",attrs:{mode:"day"}},post_mesoamerican_astrology_mayan_chart:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"generateMayanChart",attrs:{mode:"chart"}},post_vastu_mandala:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"generateMandala",attrs:{mode:"mandala"}},post_vastu_entrance:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"calculateEntrancePada",attrs:{mode:"entrance"}},post_biorhythm_daily:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getDailyBiorhythm",attrs:{mode:"daily"}},post_biorhythm_forecast:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getForecast",attrs:{mode:"forecast"}},post_biorhythm_critical_days:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getCriticalDays",attrs:{mode:"critical-days"}},post_ayurveda_constitution:{tag:"roxy-dosha-constitution",pascal:"RoxyDoshaConstitution",operationId:"calculateAyurvedicConstitution"},get_iching_hexagrams_random:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getRandomHexagram"},get_iching_hexagrams_number:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getHexagram"},get_iching_hexagrams_lookup:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"lookupHexagram"},get_iching_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castReading"},post_iching_daily:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getDailyHexagram"},post_iching_daily_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castDailyReading"},get_crystals_id:{tag:"roxy-crystal-card",pascal:"RoxyCrystalCard",operationId:"getCrystal"},get_crystals:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"listCrystals"},get_crystals_chakra:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByChakra"},get_crystals_element:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByElement"},get_crystals_zodiac_sign:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByZodiac"},get_crystals_birthstone_month:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getBirthstones"},get_crystals_search:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"searchCrystals"},get_dreams_symbols_id:{tag:"roxy-dream-card",pascal:"RoxyDreamCard",operationId:"getDreamSymbol"},get_dreams_symbols:{tag:"roxy-dream-search",pascal:"RoxyDreamSearch",operationId:"searchDreamSymbols"},get_angel_numbers_number:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getAngelNumber"},post_angel_numbers_daily:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getDailyAngelNumber"},get_angel_numbers_lookup:{tag:"roxy-angel-number-lookup",pascal:"RoxyAngelNumberLookup",operationId:"analyzeNumberSequence"},get_astrology_signs_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getZodiacSign"},get_astrology_planet_meanings_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getPlanetMeaning"},get_vedic_astrology_rashis_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getRashi"},get_iching_trigrams_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getTrigram"},get_human_design_gates_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getGate"},get_human_design_centers_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getCenter"},get_numerology_meanings_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getNumberMeaning"},get_vedic_astrology_avasthas_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getAvastha"}};function Bh(n){let a=n.lastIndexOf(":"),e=a===-1?n:n.slice(a+1),t=Fh[e];return t?{...t,toolName:e}:void 0}var El=[{pascal:"RoxyNatalChart",tag:"roxy-natal-chart",slug:"natal-chart",heading:"Natal chart",description:"Western natal chart wheel for /astrology/natal-chart responses",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Natal chart wheel with planet glyphs and aspect lines",topic:"Astrology"},{pascal:"RoxySynastryChart",tag:"roxy-synastry-chart",slug:"synastry-chart",heading:"Synastry",description:"Dual-wheel synastry chart with inter-aspects table",docsLabel:"Western",endpointLabel:"POST /astrology/synastry",docsSummary:"Dual-wheel synastry with inter-aspects table",topic:"Astrology"},{pascal:"RoxyWesternPlanetsTable",tag:"roxy-western-planets-table",slug:"western-planets-table",heading:"Western planets",description:"Western planetary positions table with sign, degree, house, and motion plus the chart angles",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Sign, degree, house, motion columns plus ASC, MC, PoF, Vertex",topic:"Astrology"},{pascal:"RoxyTransitsTable",tag:"roxy-transits-table",slug:"transits-table",heading:"Transits",description:"Live planet positions plus aspects to a natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transits",docsSummary:"Transit planet positions plus optional aspects to a natal chart",topic:"Astrology"},{pascal:"RoxyTransitWheel",tag:"roxy-transit-wheel",slug:"transit-wheel",heading:"Transit bi-wheel",description:"Natal and transit bi-wheel with an aspect line for every transit to the natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transit-aspects",docsSummary:"Natal chart on the inner ring, transiting bodies on the outer ring, aspect lines between them",topic:"Astrology"},{pascal:"RoxyAspectsTable",tag:"roxy-aspects-table",slug:"aspects-table",heading:"Aspects",description:"Natal and transit aspect grid with chart-pattern detection (grand trines, t-squares, stelliums, yods)",docsLabel:"Western",endpointLabel:"POST /astrology/aspects, /astrology/transit-aspects, /astrology/aspect-patterns",docsSummary:"Aspect rows coloured by nature with orb and strength, plus detected chart patterns",topic:"Astrology"},{pascal:"RoxyMoonPhase",tag:"roxy-moon-phase",slug:"moon-phase",heading:"Moon phase",description:"Moon phase card and calendar",docsLabel:"Western",endpointLabel:"GET /astrology/moon-phase/{current,upcoming,calendar/...}",docsSummary:"Moon phase card and calendar",topic:"Astrology"},{pascal:"RoxyHoroscopeCard",tag:"roxy-horoscope-card",slug:"horoscope-card",heading:"Horoscope",description:"Daily, weekly, monthly, or yearly horoscope card for /astrology/horoscope/..., with the column, the dated sky events behind it, and the yearly themes, key periods, eclipses, retrogrades and best months",docsLabel:"Western",endpointLabel:"GET /astrology/horoscope/{sign}/{daily,weekly,monthly,yearly}",docsSummary:"Daily, weekly, monthly, or yearly horoscope card",topic:"Astrology"},{pascal:"RoxyAstrocartographyMap",tag:"roxy-astrocartography-map",slug:"astrocartography-map",heading:"Astrocartography",description:"Astrocartography world map plotting each body Midheaven, IC, Ascendant, and Descendant relocation lines",docsLabel:"Western",endpointLabel:"POST /astrology/astrocartography",docsSummary:"World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations",topic:"Astrology"},{pascal:"RoxyLocalSpaceCompass",tag:"roxy-local-space-compass",slug:"local-space-compass",heading:"Local space",description:"Local space compass plotting each body direction from the birthplace by azimuth and altitude",docsLabel:"Western",endpointLabel:"POST /astrology/local-space",docsSummary:"Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon",topic:"Astrology"},{pascal:"RoxyRelocationWheel",tag:"roxy-relocation-wheel",slug:"relocation-wheel",heading:"Relocation chart",description:"Relocation chart wheel recomputing houses and angles for a new place, with the planets that change house",docsLabel:"Western",endpointLabel:"POST /astrology/relocation-chart",docsSummary:"Relocated chart wheel plus the move geometry, angular planets, and planets that change house",topic:"Astrology"},{pascal:"RoxyPositionsTable",tag:"roxy-positions-table",slug:"positions-table",heading:"Positions table",description:"Editorial positions table for asteroids, Black Moon Lilith, secondary progressions, solar arc directions, and the Arabic lots",docsLabel:"Western",endpointLabel:"POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots",docsSummary:"Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading",topic:"Astrology"},{pascal:"RoxyEphemerisTable",tag:"roxy-ephemeris-table",slug:"ephemeris-table",heading:"Ephemeris",description:"Monthly ephemeris: every body day by day, with each sign change and retrograde stretch called out",docsLabel:"Cross",endpointLabel:"POST /astrology/planets/monthly, /vedic-astrology/planetary-positions/monthly",docsSummary:"Per-body sign changes and retrograde windows for the month, over the full daily position grid",topic:"Astrology"},{pascal:"RoxyFixedStars",tag:"roxy-fixed-stars",slug:"fixed-stars",heading:"Fixed stars",description:"Fixed star conjunctions to the natal chart, tightest first, with the precessed star catalog",docsLabel:"Western",endpointLabel:"POST /astrology/fixed-stars",docsSummary:"Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords",topic:"Astrology"},{pascal:"RoxyProfectionCard",tag:"roxy-profection-card",slug:"profection-card",heading:"Annual profection",description:"Annual profection card with the profected house and sign, the lord of the year, and its natal placement",docsLabel:"Western",endpointLabel:"POST /astrology/profections",docsSummary:"Profected house and sign for the year, the lord of the year, its natal placement, and the reading",topic:"Astrology"},{pascal:"RoxyCompatibilityCard",tag:"roxy-compatibility-card",slug:"compatibility-card",heading:"Compatibility score",description:"Cross-domain compatibility score card",docsLabel:"Cross",endpointLabel:"POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility",docsSummary:"Score card with category breakdown",topic:"Astrology"},{pascal:"RoxyVedicKundli",tag:"roxy-vedic-kundli",slug:"vedic-kundli",heading:"Vedic kundli",description:"South, North, or East Indian Vedic kundli for /vedic-astrology/birth-chart with per-planet degree and nakshatra detail, plus an optional Chandra Lagna (Moon-as-ascendant) reference view",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"South, North, or East Indian kundli with degree detail and optional Chandra Lagna view",topic:"Vedic"},{pascal:"RoxyDivisionalChart",tag:"roxy-divisional-chart",slug:"divisional-chart",heading:"Divisional chart",description:"D2 to D60 varga chart wheel with Vargottama markers",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/{divisional-chart,navamsa}",docsSummary:"Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa",topic:"Vedic"},{pascal:"RoxyKpChart",tag:"roxy-kp-chart",slug:"kp-chart",heading:"KP chart",description:"Full KP chart with Ascendant, Placidus cusps, and planets and nodes in tabbed stellar-hierarchy tables",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/chart",docsSummary:"Ascendant, cusps, planets and nodes with KP stellar hierarchy and house meanings",topic:"Vedic"},{pascal:"RoxyVedicPlanetsTable",tag:"roxy-vedic-planets-table",slug:"vedic-planets-table",heading:"Vedic planets",description:"Vedic planetary positions table with degree, nakshatra, pada, nakshatra lord, bhava, and all three avastha systems",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"Degree, nakshatra, pada, lord, bhava, Baladi, Jagradadi and Deeptadi columns",topic:"Vedic"},{pascal:"RoxyKpPlanetsTable",tag:"roxy-kp-planets-table",slug:"kp-planets-table",heading:"KP planets",description:"KP planets table with sub-lord and sub-sub-lord columns",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/planets",docsSummary:"Sub-lord and sub-sub-lord columns",topic:"Vedic"},{pascal:"RoxyKpRulingPlanets",tag:"roxy-kp-ruling-planets",slug:"kp-ruling-planets",heading:"KP ruling planets",description:"KP ruling planets with day lord, Moon and Lagna stellar hierarchies, and house significators",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/ruling-planets",docsSummary:"Day lord, Moon/Lagna hierarchies, ruling planets, significators with house meanings",topic:"Vedic"},{pascal:"RoxyAshtakavargaGrid",tag:"roxy-ashtakavarga-grid",slug:"ashtakavarga-grid",heading:"Ashtakavarga",description:"Sarva and Bhinna ashtakavarga heatmap with bindu scores",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/ashtakavarga",docsSummary:"Sarva, Bhinna, and Shodhya Pinda views in a tabbed heatmap",topic:"Vedic"},{pascal:"RoxyShadbalaTable",tag:"roxy-shadbala-table",slug:"shadbala-table",heading:"Shadbala",description:"Six-fold planetary strength with adequacy badge per planet",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/shadbala",docsSummary:"Six-fold planetary strength bar plus rupas and adequacy badge",topic:"Vedic"},{pascal:"RoxyDashaTimeline",tag:"roxy-dasha-timeline",slug:"dasha-timeline",heading:"Vimshottari dasha",description:"Vimshottari dasha timeline, mahadasha through prana, with the active period highlighted",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dasha/{current,major,sub/...}",docsSummary:"Vimshottari mahadasha, antardasha, pratyantardasha, sookshma and prana, drill-down at every level",topic:"Vedic"},{pascal:"RoxyGunaMilan",tag:"roxy-guna-milan",slug:"guna-milan",heading:"Guna milan",description:"36-point Ashtakoota matrimonial compatibility breakdown",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/compatibility",docsSummary:"36-point Ashtakoota with eight sub-scores",topic:"Vedic"},{pascal:"RoxyPanchangTable",tag:"roxy-panchang-table",slug:"panchang-table",heading:"Panchang",description:"Panchang muhurta table with auspicious and inauspicious periods",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/{basic,detailed}",docsSummary:"15+ muhurtas in detailed mode",topic:"Vedic"},{pascal:"RoxyVedicAspects",tag:"roxy-vedic-aspects",slug:"vedic-aspects",heading:"Vedic aspects",description:"Vedic graha drishti table: which planet aspects which, with mutual aspects surfaced first",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/aspects",docsSummary:"Graha drishti rows with aspect type, strength, and orb, plus mutual aspects",topic:"Vedic"},{pascal:"RoxyHoraTable",tag:"roxy-hora-table",slug:"hora-table",heading:"Hora",description:"Vedic Hora (planetary hours) table: 12 day and 12 night horas by ruling planet for electional timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/hora",docsSummary:"Day and night planetary hours with ruling planet and window",topic:"Vedic"},{pascal:"RoxyChoghadiyaGrid",tag:"roxy-choghadiya-grid",slug:"choghadiya-grid",heading:"Choghadiya",description:"Day and night Choghadiya muhurta tiles for activity timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/choghadiya",docsSummary:"Day and night Choghadiya muhurta tiles colored by effect",topic:"Vedic"},{pascal:"RoxyHeliacalTable",tag:"roxy-heliacal-table",slug:"heliacal-table",heading:"Heliacal rising and setting",description:"Whether each graha stands far enough from the Sun to be seen, with the date it next rises or sets",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/heliacal",docsSummary:"Udaya and asta windows for the six visible grahas, the calculation behind Guru Asta and Shukra Asta",topic:"Vedic"},{pascal:"RoxyVedicDaily",tag:"roxy-vedic-daily",slug:"vedic-daily",heading:"Vedic daily",description:"One native, one day: the verdict band, every graha state behind it, the Moon windows and the finance area",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/daily",docsSummary:"Composed Vedic daily reading with the classical rule behind every graha state, the Tara and Chandrabala windows in full, and all three sidereal frames named",topic:"Vedic"},{pascal:"RoxyKpFinanceCard",tag:"roxy-kp-finance-card",slug:"kp-finance-card",heading:"KP daily finance",description:"One native, one day scored for money: the band, the gain and loss significators, and the four sub lord layers behind the score",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/kp/daily-finance",docsSummary:"KP daily finance reading with the cusp sub lords, the running dasha lords, the ruling planets and the Moon sub lord windows each scored against the gain and loss houses, weighed into one band for the day",topic:"Vedic"},{pascal:"RoxyGocharaTable",tag:"roxy-gochara-table",slug:"gochara-table",heading:"Gochara transits",description:"Where each graha transits now, the natal house it falls in, and the Ashtakavarga-qualified kaksha verdict",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/transit",docsSummary:"Vedic gochara with aspects to the natal chart and the Gochara Kaksha reading drawn as a position within the sign",topic:"Vedic"},{pascal:"RoxyBhavaBalaTable",tag:"roxy-bhava-bala-table",slug:"bhava-bala-table",heading:"Bhava Bala",description:"The twelve houses ranked by strength, with the three classical components that make up each total",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhava-bala",docsSummary:"House strength in rupas and virupas, ranked, with Bhavadhipati, Dig and Drishti Bala shown as proportions of the total",topic:"Vedic"},{pascal:"RoxyBhavChalitTable",tag:"roxy-bhav-chalit-table",slug:"bhav-chalit-table",heading:"Bhav Chalit",description:"Which grahas change house once the bhavas are cut at their real cusps instead of at sign boundaries",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhav-chalit",docsSummary:"The Chalit chart against the Rashi chart, leading with how many grahas move and which, plus the unequal bhava spans",topic:"Vedic"},{pascal:"RoxyUpagrahaTable",tag:"roxy-upagraha-table",slug:"upagraha-table",heading:"Upagrahas",description:"The eleven upagrahas in their time-based and Sun-based groups, with rashi, degree, and nakshatra",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/upagraha",docsSummary:"Time-based and Sun-based upagrahas with rashi, degree, longitude and nakshatra",topic:"Vedic"},{pascal:"RoxyCharaKarakas",tag:"roxy-chara-karakas",slug:"chara-karakas",heading:"Chara karakas",description:"Jaimini chara karakas ranked Atmakaraka first, with the scheme that produced the ranking",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/chara-karakas",docsSummary:"Karaka offices in rank order with graha, degree, scheme, and what each is read for",topic:"Vedic"},{pascal:"RoxyArudhaPadas",tag:"roxy-arudha-padas",slug:"arudha-padas",heading:"Arudha padas",description:"The twelve Jaimini arudha padas with their derivation, the Arudha Lagna and the Upapada marked",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/arudha",docsSummary:"Twelve padas with bhava, lord, pada rashi, house from Lagna, and the classical exception marked",topic:"Vedic"},{pascal:"RoxyYogaList",tag:"roxy-yoga-list",slug:"yoga-list",heading:"Yoga catalog",description:"Yoga reference cards from the catalog with optional detail mode",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/yoga, /vedic-astrology/yoga/{id}, POST /vedic-astrology/yoga/detect",docsSummary:"Filterable yoga cards from the 300 plus yoga catalog, grouped by verdict in detect mode",topic:"Vedic"},{pascal:"RoxyNakshatraCard",tag:"roxy-nakshatra-card",slug:"nakshatra-card",heading:"Nakshatra",description:"Nakshatra reference card with lord, deity, symbol, characteristics, and remedies",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/nakshatras/{id}",docsSummary:"Lord, deity, symbol, characteristics, remedies",topic:"Vedic"},{pascal:"RoxyDoshaCard",tag:"roxy-dosha-card",slug:"dosha-card",heading:"Manglik dosha",description:"Manglik, Kaal Sarp, or Sade Sati presence card",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}",docsSummary:"Presence, severity, remedies, scoped effects",topic:"Vedic"},{pascal:"RoxyNumerologyCard",tag:"roxy-numerology-card",slug:"numerology-card",heading:"Life path number",description:"Numerology card for life path, expression, soul urge, personality, personal year, or full chart",docsLabel:"Numerology",endpointLabel:"POST /numerology/{life-path,expression,soul-urge,personality,birth-day,maturity,daily,personal-day,personal-month,personal-year,chart}",docsSummary:"Life path, expression, soul urge, personality, personal year, full chart",topic:"Numerology"},{pascal:"RoxyCompoundNumber",tag:"roxy-compound-number",slug:"compound-number",heading:"Compound number",description:"Chaldean compound number card with the numeral, its symbolic name, root number, fortunate or unfortunate nature, the lower number it repeats, and the meaning",docsLabel:"Numerology",endpointLabel:"GET /numerology/compound-number/{number}",docsSummary:"Compound 10 to 52 with name, root, nature and meaning",topic:"Numerology"},{pascal:"RoxyGematria",tag:"roxy-gematria",slug:"gematria",heading:"Gematria",description:"Gematria calculator that shows its work: every Hebrew spelling the input can take, the value under each cipher with the ones that are not single valued, the per letter breakdown right to left, the two substitution ciphers, the Latin alphabet ciphers and the curated words of equal value",docsLabel:"Kabbalah",endpointLabel:"POST /kabbalah/gematria",docsSummary:"Values by cipher, every candidate Hebrew spelling with its per letter breakdown, and equal-value words",topic:"Kabbalah"},{pascal:"RoxyTarotCard",tag:"roxy-tarot-card",slug:"tarot-card",heading:"Daily tarot card",description:"Single tarot card with upright/reversed flip animation",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards/{id}, POST /tarot/daily",docsSummary:"Single card with upright and reversed flip",topic:"Tarot"},{pascal:"RoxyTarotCatalog",tag:"roxy-tarot-catalog",slug:"tarot-catalog",heading:"Tarot deck",description:"Responsive tarot deck gallery with card art, name, and an arcana and suit caption; a picked tile opens its tarot card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards",docsSummary:"Deck gallery tiles with card art, name, and arcana and suit; a pick opens the card in place",topic:"Tarot"},{pascal:"RoxyTarotSpread",tag:"roxy-tarot-spread",slug:"tarot-spread",heading:"Three-card spread",description:"Tarot spread renderer for three-card, Celtic Cross, love, or yes/no",docsLabel:"Tarot",endpointLabel:"POST /tarot/spreads/{three-card,celtic-cross,love,career,custom}, /tarot/yes-no, /tarot/draw",docsSummary:"Spreads with positions and reading",topic:"Tarot"},{pascal:"RoxyBodygraph",tag:"roxy-bodygraph",slug:"bodygraph",heading:"Bodygraph",description:"Human Design bodygraph with nine centers, channels, and activated gates, plus the full reading: type, strategy, authority, profile, definition, incarnation cross, and a gate and line meaning for every activation",docsLabel:"Human Design",endpointLabel:"POST /human-design/bodygraph",docsSummary:"Nine-center chart with defined and open centers, active channels, and gates, plus the type, strategy, authority, profile, and definition readings, the channels by circuit, the centers, and every activation with its gate and line meaning",topic:"Human Design"},{pascal:"RoxyHdTypeCard",tag:"roxy-hd-type-card",slug:"hd-type-card",heading:"HD type",description:"Human Design type reading without the chart: type, strategy, authority, and profile, with the aura mechanic, the signature and not-self themes, and the interpretation behind each label. Also renders the profile response with its two line keynotes",docsLabel:"Human Design",endpointLabel:"POST /human-design/type, /human-design/profile",docsSummary:"Type, strategy, authority, and profile tiles with the aura, signature, and not-self themes, plus the reading behind each label and the profile line keynotes",topic:"Human Design"},{pascal:"RoxyHdConnection",tag:"roxy-hd-connection",slug:"hd-connection",heading:"HD connection",description:"Human Design connection chart: the composite channels two people form, with circuit, dynamic, and which person holds each gate",docsLabel:"Human Design",endpointLabel:"POST /human-design/connection",docsSummary:"Electromagnetic, compromise, and dominance channels between two charts",topic:"Human Design"},{pascal:"RoxyHdPenta",tag:"roxy-hd-penta",slug:"hd-penta",heading:"HD penta",description:"Human Design penta for a 3 to 5 person group: upper and lower triangle channels, defined or open, with core channels and member coverage",docsLabel:"Human Design",endpointLabel:"POST /human-design/penta",docsSummary:"Group penta channels split into upper and lower triangles",topic:"Human Design"},{pascal:"RoxyHdVariables",tag:"roxy-hd-variables",slug:"hd-variables",heading:"HD variables",description:"Human Design variables: the four PHS arrows (determination, environment, perspective, motivation) with left/right direction, color, tone, and base, plus the reading for each arrow and the cognition",docsLabel:"Human Design",endpointLabel:"POST /human-design/variables",docsSummary:"The four transformation arrows with direction, color, tone, and base, plus a reading per arrow grouped by layer and the cognition",topic:"Human Design"},{pascal:"RoxyForecastTimeline",tag:"roxy-forecast-timeline",slug:"forecast-timeline",heading:"Forecast timeline",description:"Cross-domain forecast event strip colored by domain and weighted by significance",docsLabel:"Forecast",endpointLabel:"POST /forecast/{timeline,significant-dates,transits}",docsSummary:"Date-grouped events across Western, Vedic, and biorhythm domains, weighted by significance",topic:"Forecast"},{pascal:"RoxyForecastDigest",tag:"roxy-forecast-digest",slug:"forecast-digest",heading:"Forecast digest",description:"Rolled-up forecast across the next 24 hours, 7, 30, and 90 days with per-domain breakdown and top events",docsLabel:"Forecast",endpointLabel:"POST /forecast/digest",docsSummary:"Per-window event counts, domain breakdown, and the highest-significance events",topic:"Forecast"},{pascal:"RoxyBaziChart",tag:"roxy-bazi-chart",slug:"bazi-chart",heading:"Four pillars",description:"BaZi four pillars chart: stem over branch per pillar with the Ten God relation, the stems each branch stores, the Na Yin, the Day Master, the five-element balance and every interaction the pillars form",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/chart",docsSummary:"Year, month, day and hour pillars in hanzi with hidden stems, Ten Gods, Na Yin, element balance and interactions",topic:"Chinese Astrology"},{pascal:"RoxyLuckPillars",tag:"roxy-luck-pillars",slug:"luck-pillars",heading:"Luck pillars",description:"BaZi luck pillars: the ten-year stretches a chart is read through, each with its stem, branch and Ten God, plus the annual pillars inside them and the direction and starting age the sequence was built from",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/luck-pillars",docsSummary:"Ten-year luck pillars as a strip with ages and years, the annual pillars, and the direction and start age behind them",topic:"Chinese Astrology"},{pascal:"RoxyZodiacCard",tag:"roxy-zodiac-card",slug:"zodiac-card",heading:"Chinese zodiac",description:"Chinese zodiac card: the animal a date falls in, the reference read of one animal with its trine and partner animals, a daily reading, or the compatibility of a pair",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/zodiac/sign, GET /chinese-astrology/zodiac/{animals/{id},{id}/daily,compatibility/{sign1}/{sign2}}",docsSummary:"The animal for a date, one animal in full, a daily reading, or a pair scored",topic:"Chinese Astrology"},{pascal:"RoxyAlmanacDay",tag:"roxy-almanac-day",slug:"almanac-day",heading:"Chinese almanac",description:"Chinese almanac (Tong Shu): the day officer, what the day favours and avoids, the animal it clashes with, its three pillars and lunar mansion, for one day, a whole month, or a search for a date to act on",docsLabel:"Chinese",endpointLabel:"GET /chinese-astrology/calendar/{day/{date},monthly}, POST /chinese-astrology/calendar/auspicious-days",docsSummary:"Day officer, favours and avoids, clash animal and pillars, as one day, a month, or a date search",topic:"Chinese Astrology"},{pascal:"RoxyFlyingStarChart",tag:"roxy-flying-star-chart",slug:"flying-star-chart",heading:"Flying star chart",description:"Xuan Kong flying star plate: nine palaces on the compass with the mountain, period and water star of each, the facing and sitting mountains, and the structure the pair produces",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/flying-stars/natal, GET /feng-shui/flying-stars/annual/{year}",docsSummary:"Nine-palace flying star plate with the mountain, period and water star per palace, the facing and sitting mountains and the structure",topic:"Feng Shui"},{pascal:"RoxyKuaCard",tag:"roxy-kua-card",slug:"kua-card",heading:"Kua and eight mansions",description:"Kua number with its trigram and the Eight Mansions map: all eight compass sectors on the nine-palace grid, each with its star, nature, rank and life domain, and the best and worst of them named",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/kua, POST /feng-shui/eight-mansions",docsSummary:"Kua number and trigram over the eight-sector direction map, favourable and unfavourable sectors ranked",topic:"Feng Shui"},{pascal:"RoxyMayanDaySign",tag:"roxy-mayan-day-sign",slug:"mayan-day-sign",heading:"Mayan day sign",description:"Tzolkin day sign in all three of its spellings with the coefficient beside it, the trecena it sits in, the keynote, strengths, challenges and guidance, and on the full chart the Haab date, the Long Count, the Calendar Round, the year bearer and the four-fold cross",docsLabel:"Mesoamerican",endpointLabel:"POST /mesoamerican-astrology/mayan/tzolkin, POST /mesoamerican-astrology/mayan/chart",docsSummary:"Day sign and coefficient with the trecena, the reading, and the Calendar Round on the fuller response",topic:"Mesoamerican"},{pascal:"RoxyVastuMandala",tag:"roxy-vastu-mandala",slug:"vastu-mandala",heading:"Vastu mandala",description:"Vastu Purusha Mandala projected over a plot: every pada with the devata holding it, the brahmasthan block, the vamsa diagonals and where they cross, and in the entrance read the square the main door falls on with the verse effect for that pada",docsLabel:"Vastu",endpointLabel:"POST /vastu/mandala, POST /vastu/entrance",docsSummary:"Pada grid with a devata per square, the brahmasthan, and the entrance pada lit with its effect",topic:"Vastu"},{pascal:"RoxyBiorhythmChart",tag:"roxy-biorhythm-chart",slug:"biorhythm-chart",heading:"Daily biorhythm",description:"Daily biorhythm bars or multi-day forecast cycle lines",docsLabel:"Biorhythm",endpointLabel:"POST /biorhythm/{daily,forecast,critical-days}",docsSummary:"Daily bars, forecast cycle lines, critical days",topic:"Biorhythm"},{pascal:"RoxyDoshaConstitution",tag:"roxy-dosha-constitution",slug:"dosha-constitution",heading:"Ayurvedic constitution",description:"Ayurvedic constitution read from a birth chart: the three humour shares as one bar, the dominant and secondary humour, the three cited factors behind the blend with their verses, the shadbala ranking the third factor reads, and the scope note the response carries",docsLabel:"Ayurveda",endpointLabel:"POST /ayurveda/constitution",docsSummary:"Vata, pitta and kapha shares as one bar with the dominant humour and the cited factors behind it",topic:"Ayurveda"},{pascal:"RoxyHexagram",tag:"roxy-hexagram",slug:"hexagram",heading:"I Ching hexagram",description:"I Ching hexagram drawn line by line with trigram glyphs, judgment, image, and a reading for every line: the oracle statement and what it asks of the querent. A cast highlights the moving lines and shows only their readings, plus the hexagram it transforms into",docsLabel:"I Ching",endpointLabel:"GET /iching/hexagrams/{number}, /iching/hexagrams/random, /iching/hexagrams/lookup, /iching/cast, POST /iching/daily, /iching/daily/cast",docsSummary:"Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram",topic:"I Ching"},{pascal:"RoxyCrystalCard",tag:"roxy-crystal-card",slug:"crystal-card",heading:"Crystal detail",description:"Single-crystal detail card with photo, spiritual, emotional, and physical meaning, metaphysical attributes, affirmation, and pairings; as a widget the visitor types a crystal name and picks it",docsLabel:"Crystals",endpointLabel:"GET /crystals/{id}",docsSummary:"Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings",topic:"Crystals"},{pascal:"RoxyCrystalGrid",tag:"roxy-crystal-grid",slug:"crystal-grid",heading:"Crystal grid",description:"Responsive crystal gallery with photo, name, and colour swatches from any crystals list response, filterable by chakra, zodiac sign, element, colour, and planet; a picked tile opens its crystal card in place",docsLabel:"Crystals",endpointLabel:"GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search",docsSummary:"Crystal gallery with chakra, zodiac, element, colour, and planet filters; a pick opens the card in place",topic:"Crystals"},{pascal:"RoxyDreamCard",tag:"roxy-dream-card",slug:"dream-card",heading:"Dream symbol",description:"Dream symbol card with the symbol name, full interpretation, and dictionary letter; as a widget the visitor types a symbol and picks it",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols/{id}",docsSummary:"Symbol name, interpretation body, and letter chip",topic:"Dreams"},{pascal:"RoxyDreamSearch",tag:"roxy-dream-search",slug:"dream-search",heading:"Dream search",description:"The dream dictionary as selectable tiles under a search box and an A to Z bar; a picked tile opens its dream card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols",docsSummary:"The dream dictionary as tiles, browsed A to Z or searched; a pick opens the card in place",topic:"Dreams"},{pascal:"RoxyAngelNumberCard",tag:"roxy-angel-number-card",slug:"angel-number-card",heading:"Angel number",description:"Angel number card with title, core message, badges, keywords, life-area interpretations, affirmation, and action steps",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/numbers/{number}, POST /angel-numbers/daily",docsSummary:"Number meaning with spiritual, love, career, money, twin flame, biblical, and shadow sections",topic:"Angel Numbers"},{pascal:"RoxyAngelNumberLookup",tag:"roxy-angel-number-lookup",slug:"angel-number-lookup",heading:"Angel number lookup",description:"Angel number sequence analysis with pattern classification, the known meaning when present, and a digit-root fallback for any number",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/lookup",docsSummary:"Pattern analysis plus known meaning and digit-root fallback",topic:"Angel Numbers"},{pascal:"RoxyReferenceCard",tag:"roxy-reference-card",slug:"reference-card",heading:"Reference card",description:"Glossary entry for any reference lookup: zodiac sign, planet meaning, rashi, I Ching trigram, Human Design gate or center, or numerology number",docsLabel:"Reference",endpointLabel:"GET /astrology/{signs,planet-meanings}/{id}, /vedic-astrology/{rashis,avasthas}/{id}, /iching/trigrams/{id}, /human-design/gates/{number}, /human-design/centers/{id}, /numerology/meanings/{number}",docsSummary:"Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup",topic:"Helpers"},{pascal:"RoxyEndpointForm",tag:"roxy-endpoint-form",slug:"endpoint-form",heading:"Schema-driven form",description:"Schema-driven form that emits roxy-submit with a validated payload",docsLabel:"Helper",endpointLabel:"Any endpoint, from the spec",docsSummary:"Schema-driven form, emits roxy-submit",topic:"Helpers",selfFetching:!0},{pascal:"RoxyLocationSearch",tag:"roxy-location-search",slug:"location-search",heading:"City search",description:"City search input with debounced /location/search calls",docsLabel:"Helper",endpointLabel:"GET /location/search",docsSummary:"Debounced city search input, emits roxy-location-select",topic:"Helpers",selfFetching:!0},{pascal:"RoxyData",tag:"roxy-data",slug:"data",heading:"Generic renderer",description:"Generic fallback renderer for any OpenAPI response shape",docsLabel:"Helper",endpointLabel:"Any response shape",docsSummary:"Generic fallback renderer for unknown shapes",topic:"Helpers",selfFetching:!0}];var DT=El.map(n=>n.slug);export{El as ROXY_COMPONENTS,DT as ROXY_UI_COMPONENTS,el as ROXY_UI_VERSION,Ia as RoxyAlmanacDay,zr as RoxyAngelNumberCard,Or as RoxyAngelNumberLookup,Gr as RoxyArudhaPadas,Ha as RoxyAshtakavargaGrid,Ir as RoxyAspectsTable,Br as RoxyAstrocartographyMap,Hr as RoxyBaziChart,Kr as RoxyBhavChalitTable,qr as RoxyBhavaBalaTable,qa as RoxyBiorhythmChart,Wa as RoxyBodygraph,Xr as RoxyCharaKarakas,Jr as RoxyChoghadiyaGrid,Ja as RoxyCompatibilityCard,Qr as RoxyCompoundNumber,es as RoxyCrystalCard,Qa as RoxyCrystalGrid,wa as RoxyDashaTimeline,rs as RoxyData,tr as RoxyDivisionalChart,ar as RoxyDoshaCard,is as RoxyDoshaConstitution,os as RoxyDreamCard,ls as RoxyDreamSearch,pe as RoxyEndpointForm,sr as RoxyEphemerisTable,ds as RoxyFixedStars,nr as RoxyFlyingStarChart,hs as RoxyForecastDigest,ms as RoxyForecastTimeline,gs as RoxyGematria,us as RoxyGocharaTable,fs as RoxyGunaMilan,xs as RoxyHdConnection,bs as RoxyHdPenta,vs as RoxyHdTypeCard,Ls as RoxyHdVariables,$s as RoxyHeliacalTable,ws as RoxyHexagram,ks as RoxyHoraTable,Ca as RoxyHoroscopeCard,lr as RoxyKpChart,Ss as RoxyKpFinanceCard,Rs as RoxyKpPlanetsTable,Ts as RoxyKpRulingPlanets,cr as RoxyKuaCard,Ds as RoxyLocalSpaceCompass,Be as RoxyLocationSearch,Ms as RoxyLuckPillars,hr as RoxyMayanDaySign,gr as RoxyMoonPhase,_s as RoxyNakshatraCard,Da as RoxyNatalChart,ur as RoxyNumerologyCard,fr as RoxyPanchangTable,xr as RoxyPositionsTable,Os as RoxyProfectionCard,Gs as RoxyReferenceCard,Is as RoxyRelocationWheel,Fs as RoxyShadbalaTable,Bs as RoxySynastryChart,vr as RoxyTarotCard,Lr as RoxyTarotCatalog,$r as RoxyTarotSpread,ua as RoxyTransitWheel,wr as RoxyTransitsTable,js as RoxyUpagrahaTable,kr as RoxyVastuMandala,Ks as RoxyVedicAspects,Vs as RoxyVedicDaily,ba as RoxyVedicKundli,qs as RoxyVedicPlanetsTable,Ns as RoxyWesternPlanetsTable,Sr as RoxyYogaList,Rr as RoxyZodiacCard,Bh as componentForTool,Xn as expandCompact,im as roxyDataScript,yd as serializeRoxyData};
145
+ </g>`}renderEmptyGrid(e){let t=[];for(let r=0;r<e;r++)for(let s=0;s<e;s++)t.push(xn`<rect class="pada" x=${s} y=${r} width="1" height="1"></rect>`);return t}renderDoor(e,t){let r=t.devata?.name??"";return this.renderPada(e,t.cell?.columnFromWest,t.cell?.rowFromNorth,"pada pada-door",t.square,r,r)}renderVamsa(e,t){return(t??[]).map(r=>{let[s,i]=yo(e,r.from),[o,l]=yo(e,r.to);return xn`<line class="vamsa" x1=${s} y1=${i} x2=${o} y2=${l}></line>`})}renderBrahmasthan(e,t){let r=t??[];if(r.length<3)return ke;let s=r.map(i=>yo(e,i).join(",")).join(" ");return xn`<polygon class="brahmasthan" points=${s}></polygon>`}renderAtimarma(e,t){let r=new Set(t?.atimarma??[]);return r.size===0?ke:(t?.cells??[]).filter(s=>s.square!=null&&r.has(s.square)).map(s=>{let[i,o]=yo(e,s.center);return xn`<circle class="atimarma" cx=${i} cy=${o} r="0.06"></circle>`})}renderDevatas(e,t){let r=new Map;for(let s of t??[])!s.devataName||s.square==null||r.set(s.devataName,[...r.get(s.devataName)??[],s.square]);return r.size===0?ke:ye`<section part="section devatas"><h3 class="block-title">${this.t("Devata")}</h3><ul class="devatas">${[...r].map(([s,i])=>ye`<li><b>${s}</b> ${i.sort((o,l)=>o-l).map(o=>P(e,o)).join(", ")}</li>`)}</ul></section>`}renderLegend(e,t){if(e)return ye`<div class="legend" part="legend"><span><span class="swatch swatch-door"></span>${this.t("Door pada")}</span></div>`;let r=(t?.cells??[]).some(s=>s.withinPlot===!1);return ye`<div class="legend" part="legend"><span><span class="swatch swatch-brahma"></span>${this.t("Brahmasthan")}</span> ${r?ye`<span><span class="swatch swatch-outside"></span>${this.t("Outside the plot")}</span>`:ke}</div>`}renderFacts(e,t,r,s){let i=t.conventions?.grid;return ye`<div class="facts" part="details">${i?ye`<span><span class="roxy-label">${ae(e,"grid")}</span><b>${I(e,"grid",i)}</b></span>`:ke} ${s?.pada!=null?ye`<span><span class="roxy-label">${this.t("Pada")}</span><b>${P(e,s.pada)}</b></span>`:ke} ${s?.side?ye`<span><span class="roxy-label">${this.t("Side")}</span><b>${I(e,"facing",s.side)}</b></span>`:ke} ${s?.startCorner?ye`<span><span class="roxy-label">${this.t("Counted from")}</span>${I(e,"facing",s.startCorner)} ${s.ordinalOnSide!=null?ye`· ${P(e,s.ordinalOnSide)}`:ke}</span>`:ke} ${s?.devata?.name?ye`<span><span class="roxy-label">${this.t("Devata")}</span><b>${s.devata.name}</b> ${s.devata.padaCount!=null?ye`· ${this.t("Pada")} ${P(e,s.devata.padaCount)}`:ke}</span>`:ke} ${s?.recommendedPadas?.length?ye`<span><span class="roxy-label">${this.t("Recommended padas")}</span>${s.recommendedPadas.map(o=>P(e,o)).join(", ")}</span>`:ke} ${r?.brahmasthan?.area!=null?ye`<span><span class="roxy-label">${this.t("Brahmasthan area")}</span><b>${this.areaLabel(e,r.brahmasthan.area,r.conventions?.unit)}</b></span>`:ke} ${r?.marma?.areaEach!=null?ye`<span><span class="roxy-label">${this.t("Area of one marma")}</span>${this.areaLabel(e,r.marma.areaEach,r.conventions?.unit)}</span>`:ke} ${r?.atimarma?.length?ye`<span><span class="roxy-label">${this.t("Crossing points")}</span>${r.atimarma.map(o=>P(e,o)).join(", ")}</span>`:ke}</div>`}renderSources(e){return e.length===0?ke:ye`<section part="section sources"><ul class="cites">${e.map(t=>ye`<li>${Pn(t)}</li>`)}</ul></section>`}areaLabel(e,t,r){let s=b(e,t,2);if(!r)return s;let i=Ux[r]??`${r}²`;return ye`<span title="${I(e,"unit",r)}">${s} ${i}</span>`}ringLabel(e){let t=qx[e];return t?this.t(t):S(e)}verdictLabel(e){let t=Yx[e];return t?this.t(t):S(e)}};kr.endpoints=Kc,kr.styles=[u,jx`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);--_brahma:color-mix(in srgb, var(--roxy-accent) 16%, var(--roxy-surface));--_outside:color-mix(in srgb, var(--roxy-muted) 18%, var(--roxy-surface));--_door:color-mix(in srgb, var(--roxy-success) 26%, var(--roxy-surface));grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-md);flex-wrap:wrap;display:flex}.title,.block-title{margin:0}.block-title{margin-block-end:var(--roxy-space-sm)}.verdict-auspicious{color:var(--roxy-success-fg)}.verdict-inauspicious{color:var(--roxy-danger-fg)}.verdict-mixed{color:var(--roxy-warning-fg)}.frame{place-items:center;gap:calc(var(--roxy-space-unit) / 2) var(--roxy-space-xs);inline-size:100%;max-inline-size:var(--roxy-chart-max-width,32rem);grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:".n.""w plate e"".s.";margin-inline:auto;display:grid}.compass{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.compass-n{grid-area:n}.compass-s{grid-area:s}.compass-w,.compass-e{writing-mode:vertical-rl}.compass-w{grid-area:w;rotate:180deg}.compass-e{grid-area:e}svg{grid-area:plate;width:100%;height:auto;display:block}.pada{fill:var(--roxy-surface);stroke:var(--roxy-border);stroke-width:.012px}.pada-innerRing,.pada-innerCorner,.pada-around-brahma{fill:color-mix(in srgb, var(--roxy-accent) 7%, var(--roxy-surface))}.pada-center,.pada-brahma{fill:var(--_brahma)}.pada-outside{fill:var(--_outside)}.pada-door{fill:var(--_door);stroke:var(--roxy-fg);stroke-width:.03px}.brahmasthan{fill:none;stroke:var(--roxy-accent-ink);stroke-width:.05px}.vamsa{stroke:var(--roxy-secondary);stroke-width:.02px;stroke-dasharray:.12 .1}.atimarma{fill:var(--roxy-accent-ink)}text{fill:var(--roxy-fg);text-anchor:middle}.devata{font-size:calc(var(--roxy-text-base) * .011875)}.square-no{fill:var(--roxy-muted);font-size:calc(var(--roxy-text-base) * .00875)}@container (width<=30rem){.devata{display:none}.square-no{font-size:calc(var(--roxy-text-base) * .02125);dominant-baseline:middle;translate:0 .31lh}}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b,.devatas b{color:var(--roxy-fg)}.devatas{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.legend{gap:var(--roxy-space-xs) var(--roxy-space-md);color:var(--roxy-muted);font-size:var(--roxy-text-xs);flex-wrap:wrap;display:flex}.swatch{inline-size:var(--roxy-space-sm);block-size:var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}.swatch-brahma{background:var(--_brahma)}.swatch-outside{background:var(--_outside)}.swatch-door{background:var(--_door)}.effect{margin:0;padding-block-start:var(--roxy-space-md)}.reading{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);border-block-start:0;margin:0}.cites{color:var(--roxy-muted);font-size:var(--roxy-text-xs);margin:0;padding:0;list-style:none}`],m([Kx({type:String,reflect:!0})],kr.prototype,"mode",2),kr=m([f("roxy-vastu-mandala")],kr);function Jx(n){let a=Number.parseInt(n??"",10),e=Math.round(Math.sqrt(a));if(!(!Number.isFinite(e)||e<2||e*e!==a))return{size:e,originX:0,cellW:1,originY:0,cellH:1}}import{css as Qx,html as xa,nothing as bn}from"lit";var Ks=class extends y{renderData(a){let e=a.aspects??[],t=a.mutualAspects??[],r=a.planets??[];if(e.length===0&&t.length===0)return this.renderEmpty();let s=a.datetime?V(this.effectiveLang(),a.datetime):"";return xa`<div class="wrap" part="card" aria-label="${this.t("Vedic aspects")}"><div class="head" part="header"><h2>${this.t("Vedic aspects")}</h2>${s?xa`<p class="roxy-label">${this.t("Chart time {{when}}",{when:s})}</p>`:bn}</div>${r.length>0?xa`<div part="section positions"><h3 class="section-label">${this.t("Sidereal positions")}</h3><ul class="roxy-chips">${r.map(i=>xa`<li class="position"><strong>${i.name}</strong> ${typeof i.longitude=="number"?Qe(i.longitude):i.sign??""}</li>`)}</ul></div>`:bn} ${t.length>0?xa`<div part="section mutual-aspects"><h3 class="section-label">${this.t("Mutual aspects")}</h3><ul class="roxy-chips">${t.map(i=>xa`<li class="mutual-pill">${i.planet1} ⟷ ${i.planet2} ${i.aspectType?xa`<span class="rel">${i.aspectType}</span>`:bn}</li>`)}</ul></div>`:bn} ${e.length>0?xa`<div class="overflow-scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Vedic aspects")}"><table><caption class="roxy-sr-only">${this.t("Vedic planetary aspects: aspecting planet, aspect type, aspected planet, strength and orb.")}</caption><thead><tr><th scope="col">${this.t("From")}</th><th scope="col">${this.t("Aspect")}</th><th scope="col">${this.t("To")}</th><th scope="col">${this.t("Strength")}</th><th scope="col">${this.t("Orb")}</th></tr></thead><tbody>${e.map(i=>xa`<tr><td>${i.aspectingPlanet}</td><td><span class="kind">${i.aspectType}</span></td><td>${i.aspectedPlanet}</td><td>${typeof i.strength=="number"?xa`<span class="bar" style="--_v:${Math.max(10,Math.min(100,i.strength))}"></span><span class="num">${b(this.effectiveLang(),i.strength,0)}</span>`:bn}</td><td class="num">${typeof i.orb=="number"?`${b(this.effectiveLang(),i.orb,2)}°`:""}</td></tr>`)}</tbody></table></div>`:bn}</div>`}};Ks.endpoints=Vc,Ks.styles=[u,Qx`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}h2,h3,p{margin:0}.section-label{margin-block-end:var(--roxy-space-xs)}.position,.mutual-pill{font-variant-numeric:tabular-nums;min-width:0}.position strong,.mutual-pill{color:var(--roxy-fg)}.overflow-scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}tbody tr:last-child td{border-block-end:0}.kind{font-weight:var(--roxy-weight-bold)}.num{color:var(--roxy-muted)}.bar{inline-size:calc(var(--_v) * 5ch / 100);block-size:.3lh;border-radius:var(--roxy-radius-full);background:var(--roxy-accent);vertical-align:middle;margin-inline-end:var(--roxy-space-xs);display:inline-block}`],Ks=m([f("roxy-vedic-aspects")],Ks);import{css as eb,html as ee,nothing as je}from"lit";var Tl={favourable:"Favourable",underdelivered:"Underdelivered",obstructed:"Obstructed",void:"Void",aggravated:"Aggravated",unfavourable:"Unfavourable"},tb=Object.keys(Tl),ab={favourable:"success",aggravated:"danger",unfavourable:"danger"},Mh=8,uo={"very-strong":"Very strong",strong:"Strong",moderate:"Moderate",weak:"Weak"},rb={day:"Day",finance:"Finance",natal:"Natal"},_h={mahadasha:"Mahadasha",antardasha:"Antardasha",pratyantardasha:"Pratyantardasha"},Vs=class extends y{renderData(a){let e=a.grahas??[];return e.length?ee`<div class="wrap" part="card" aria-label="${this.t("Vedic daily reading")}">${this.renderHead(a)} ${this.renderPanchanga(a)} ${this.renderGrahas(e,a.houseThemes)} ${this.renderWindows(a)} ${this.renderFinance(a)} ${this.renderDasha(a)} ${this.renderProvenance(a)}</div>`:this.renderEmpty()}renderHead(a){let e=new Map((a.tally??[]).map(r=>[r.state,r.count])),t=e.get("favourable")??0;return ee`<header class="head" part="header"><div class="title-row"><h2>${this.t("Vedic daily")}</h2><span class="roxy-label">${Js(this.effectiveLang(),a.dayStart,a.dayEnd)}</span></div><div class="verdict-row"><span class="verdict ${a.verdict}">${this.t(uo[a.verdict])}</span> <span class="evidence">${this.t("{{supportive}} of {{evaluated}} grahas support this day",{supportive:t,evaluated:a.evaluated})}</span></div>${e.size?ee`<ul class="tally roxy-chips" part="legend">${tb.filter(r=>e.get(r)).map(r=>ee`<li class="pill">${this.t(Tl[r])} ${e.get(r)}</li>`)}</ul>`:je} ${a.subject?ee`<p class="note">${this.t("Born with the Moon in {{rashi}}, nakshatra {{nakshatra}}",{rashi:a.subject.janmaRashi,nakshatra:a.subject.janmaNakshatra})}</p>`:je} ${(a.degraded??[]).map(r=>ee`<p class="note">${this.t("{{component}} unavailable: {{reason}}",{component:r.component,reason:r.reason})}</p>`)}</header>`}renderPanchanga(a){let e=a.panchanga;if(!e)return je;let t=(r,s)=>s?ee`<div><dt>${r}</dt><dd>${s.number?`${s.number}. `:""}${s.name} ${s.validTo?ee`<span class="until">${this.t("until {{time}}",{time:V(this.effectiveLang(),s.validTo)})}</span>`:je}</dd></div>`:je;return ee`<section class="block" part="section panchanga"><h3>${this.t("Panchang")}</h3><dl class="roxy-facts" part="details"><div><dt>${this.t("Vara")}</dt><dd>${e.vara}</dd></div><div><dt>${this.t("Paksha")}</dt><dd>${e.paksha}</dd></div>${t(this.t("Tithi"),e.tithi)} ${t(this.t("Nakshatra"),e.nakshatra)} ${t(this.t("Yoga"),e.yoga)} ${t(this.t("Karana"),e.karana)}</dl></section>`}theme(a,e){return a?.[String(e)]?.join(", ")??""}renderGrahas(a,e){return ee`<section class="block" part="section grahas"><h3>${this.t("Grahas today")}</h3><div class="scroll" tabindex="0" role="region" aria-label="${this.t("Grahas today")}"><table part="table"><caption class="roxy-sr-only">${this.t("Each transiting graha with its sign, the house it occupies from the natal Moon, its bindus, its kaksha and the state the classical rules give it.")}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Sign")}</th><th scope="col">${this.t("House")}</th><th scope="col">${this.t("Bindus")}</th><th scope="col">${this.t("Kaksha")}</th><th scope="col">${this.t("State")}</th></tr></thead><tbody>${a.map(t=>{let r=$(t.graha)??"",s=this.theme(e,t.houseFromMoon);return ee`<tr><td>${r?ee`<span class="glyph">${r}</span>`:je}${t.graha}</td><td>${t.sign}</td><td title="${s}">${t.houseFromMoon}</td><td>${typeof t.binduCount=="number"?t.binduCount:""}</td><td>${this.renderKaksha(t.kaksha)}</td><td><span class="state roxy-chip ${t.state}" data-tone="${ab[t.state]??je}" title="${t.stateSource??""}">${this.t(Tl[t.state])}</span></td></tr>`})}</tbody></table></div></section>`}renderKaksha(a){if(!a||typeof a.number!="number")return je;let e=a.bindu===!0?"yes":a.bindu===!1?"no":"",t=a.bindu===!0?this.t("this kaksha lord gave bindu"):a.bindu===!1?this.t("this kaksha lord gave no bindu"):"",r=this.t("Kaksha {{n}} of {{total}}, ruled by {{graha}}, spanning {{start}}° to {{end}}° of the sign",{n:a.number,total:Mh,graha:a.lord,start:b(this.effectiveLang(),a.startDegree,2),end:b(this.effectiveLang(),a.endDegree,2)});return ee`<span class="kaksha" title="${t?`${r} · ${t}`:r}">${a.number}/${Mh} <span class="dot ${e}" aria-hidden="true"></span></span>`}renderWindows(a){let e=a.tara??[],t=a.chandrabala??[];if(!e.length&&!t.length)return je;let r=(s,i)=>ee`<small>${Js(this.effectiveLang(),s,i)}</small>`;return ee`<section class="block" part="section windows"><h3>${this.t("Tara and Chandrabala")}</h3>${e.length?ee`<div class="chips">${e.map(s=>ee`<span class="window"><span>${s.number}. ${s.name}${s.quality?` · ${s.quality}`:""}</span> ${r(s.validFrom,s.validTo)}</span>`)}</div>`:je} ${t.length?ee`<div class="chips">${t.map(s=>ee`<span class="window ${s.favourable?"yes":"no"}"><span>${this.t("Moon in {{sign}}, house {{n}}",{sign:s.moonSign,n:s.houseFromMoon})} ${s.ashtamaChandra?ee`<span class="mark">· ${this.t("Ashtama Chandra")}</span>`:je} </span>${r(s.validFrom,s.validTo)}</span>`)}</div>`:je}</section>`}renderFinance(a){let e=a.areas?.finance;if(!e)return je;let t=a.houseThemes,r=s=>{let i=this.theme(t,s.house);return ee`<li>${s.graha} · ${this.t("House {{n}}",{n:s.house})}${i?` (${i})`:""} · ${this.t("level {{level}} {{grade}}",{level:s.level,grade:s.grade})} ${s.dashaLevels?.length?ee`<span class="note">${s.dashaLevels.map(o=>this.t(_h[o])).join(", ")}</span>`:je}</li>`};return ee`<section class="block" part="section finance"><h3>${this.t("Finance")}</h3><div class="verdict-row"><span class="verdict ${e.band??""}">${e.band?this.t(uo[e.band]):""}</span> ${typeof e.positive=="number"&&typeof e.negative=="number"?ee`<span class="evidence">${this.t("{{positive}} positive against {{negative}} negative",{positive:e.positive,negative:e.negative})}</span>`:je}</div><div class="lists">${e.drivers?.length?ee`<div><h3>${this.t("Drivers")}</h3><ul>${e.drivers.map(r)}</ul></div>`:je} ${e.cautions?.length?ee`<div><h3>${this.t("Cautions")}</h3><ul>${e.cautions.map(r)}</ul></div>`:je}</div>${this.renderComposite(e.composite)}</section>`}renderComposite(a){return a?ee`<div class="composite"><h3>${this.t("Combined score")}</h3><div class="verdict-row"><span class="verdict ${a.band}">${this.t(uo[a.band])}</span> <span class="evidence">${a.score}</span></div><ul class="layers">${a.layers.map(e=>ee`<li><span>${this.t(rb[e.layer])}</span> <span class="evidence">${e.score}</span> <span class="band">${this.t(uo[e.band])}</span></li>`)}</ul></div>`:je}renderDasha(a){let e=a.dasha??[];return e.length?ee`<section class="block" part="section dasha"><h3>${this.t("Dasha")}</h3><div class="chips">${e.map(t=>ee`<span class="window"><span>${this.t(_h[t.level])} · ${t.lord}</span> <small>${Js(this.effectiveLang(),t.startDate,t.endDate)}</small></span>`)}</div></section>`:je}renderProvenance(a){return a.frames?ee`<section class="block" part="section frame">${Ed(this.effectiveLang(),a.frames,this.translator)}</section>`:je}};Vs.endpoints=qc,Vs.styles=[u,G,re,eb`.wrap{grid-template-columns:minmax(0,1fr);display:grid;overflow:hidden}.head,.block{gap:var(--roxy-space-sm);padding:var(--roxy-space-md);display:grid}.block{border-block-start:1px solid var(--roxy-border)}h2,h3,p{margin:0}.title-row{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict-row{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.verdict{color:var(--roxy-secondary);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold)}.verdict:is(.very-strong,.strong){color:var(--roxy-success-fg)}.verdict.moderate{color:var(--roxy-accent-ink)}.evidence{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}.pill{font-variant-numeric:tabular-nums}.roxy-facts{margin:0}.until{color:var(--roxy-muted);font-size:var(--roxy-text-xs);display:block}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.state{cursor:help}.kaksha{align-items:center;gap:var(--roxy-space-xs);cursor:help;display:inline-flex}.dot{aspect-ratio:1;border-radius:var(--roxy-radius-full);background:var(--roxy-border);inline-size:1ch}.dot.yes{background:var(--roxy-success)}.dot.no{background:var(--roxy-warning)}.chips{gap:var(--roxy-space-sm) var(--roxy-space-lg);flex-wrap:wrap;display:flex}.window{font-size:var(--roxy-text-sm);display:grid}.window small{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.window.yes>:first-child{color:var(--roxy-success-fg)}.window.no>:first-child,.mark{color:var(--roxy-danger-fg)}.lists{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.lists ul{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-md)}.note{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.composite{gap:var(--roxy-space-sm);display:grid}.layers{gap:var(--roxy-space-xs);font-size:var(--roxy-text-sm);margin:0;padding:0;list-style:none;display:grid}.layers li{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}.layers .band{color:var(--roxy-secondary)}`],Vs=m([f("roxy-vedic-daily")],Vs);import{html as Nh}from"lit";import{property as El}from"lit/decorators.js";var ba=class extends y{constructor(){super(...arguments);this.chartViewport=new Ce(this);this.chartStyle="north";this.chartReference="lagna";this.lagnaOverride="";this.setStyle=e=>{this.chartStyle=e}}resolveReference(){if(this.lagnaOverride)return this.lagnaOverride;if(this.chartReference==="moon")return this.data?.meta?.Moon?.rashi}viewModel(){return this.data?.meta?Pi(this.data.meta,{divisionLabel:"D1 Rashi",lagnaOverride:this.resolveReference(),states:this.data}):null}renderData(e){let t=this.viewModel();if(!t)return this.renderEmpty();let r=this.chartReference==="moon"&&!this.lagnaOverride?this.t("Chandra lagna"):this.t("Vedic kundli");return Nh`<div class="wrap" part="card"><div class="header" part="header"><div><h2 class="title">${r}</h2>${X(this.effectiveLang(),e.frame,this.translator)} ${Mi(t,this.translator)}</div>${Ni(this.chartStyle,this.setStyle,this.translator)}</div><div id="kundli-panel-${this.chartStyle}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="kundli-tab-${this.chartStyle}">${this.chartViewport.renderChartViewport(Nh`<svg viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" part="chart" role="img" aria-label="${this.t("Vedic birth chart with twelve sign houses")}"><title>${this.t("Vedic kundli")}</title>${_i(t,this.chartStyle,this.translator)}</svg>`,r,this.translator)}</div></div>`}};ba.endpoints=Yc,ba.styles=[u,Ge,G,zi,Xe],m([El({type:String,reflect:!0,attribute:"chart-style"})],ba.prototype,"chartStyle",2),m([El({type:String,reflect:!0,attribute:"chart-reference"})],ba.prototype,"chartReference",2),m([El({type:String,reflect:!0,attribute:"lagna-override"})],ba.prototype,"lagnaOverride",2),ba=m([f("roxy-vedic-kundli")],ba);import{css as sb,html as ue,nothing as Ke}from"lit";var nb=["Lagna","Sun","Moon","Mars","Mercury","Jupiter","Venus","Saturn","Rahu","Ketu"],zh=[["awastha","Baladi."],["jagradadi","Jagradadi."],["deeptadi","Deeptadi."]],qs=class extends y{orderedRows(){let a=this.data?.meta??{},e=new Set,t=[];for(let r of nb){let s=a[r];s&&(t.push([r,s]),e.add(r))}for(let[r,s]of Object.entries(a))e.has(r)||t.push([r,s]);return t}renderData(a){if(!a.meta)return this.renderEmpty();let e=this.orderedRows(),t=e.some(([,r])=>r.avasthaInfo);return ue`<div class="wrap" part="card" aria-label="${this.t("Vedic planetary positions")}"><header class="head" part="header"><h2>${this.t("Planetary positions")}</h2>${X(this.effectiveLang(),a.frame,this.translator)}</header><div class="scroll" part="table" tabindex="0" role="region" aria-label="${this.t("Planetary positions")}"><table role="table"><caption class="roxy-sr-only">${this.t("Vedic planetary positions: each graha with its rashi, degree, nakshatra, pada, nakshatra lord, house, its state in all three avastha systems, and retrograde state. Jagradadi and Deeptadi are read from sign dignity, which the nodes and the Lagna do not have, so those two cells are blank on the Rahu, Ketu and Lagna rows. Uranus, Neptune and Pluto appear only when asked for and rule no sign, so every avastha and house cell is blank on their rows too.")} ${t?this.t("Each avastha state is followed by its meaning."):Ke}</caption><thead><tr><th scope="col">${this.t("Graha")}</th><th scope="col">${this.t("Rashi")}</th><th scope="col">${this.t("Degree")}</th><th scope="col">${this.t("Nakshatra")}</th><th scope="col">${this.t("Pada")}</th><th scope="col">${this.t("Nak. lord")}</th><th scope="col">${this.t("House")}</th><th scope="col" title="${this.t("Baladi: the five age states, set by degree within the sign")}">${this.t("Baladi")}</th><th scope="col" title="${this.t("Jagradadi: the three waking states, set by sign dignity. The seven classical grahas only")}">${this.t("Jagradadi")}</th><th scope="col" title="${this.t("Deeptadi: the nine dispositional states, set by sign dignity. The seven classical grahas only")}">${this.t("Deeptadi")}</th><th scope="col">${this.t("Retro")}</th></tr></thead><tbody>${e.map(([r,s])=>{let i=(s.graha??r)==="Lagna",o=$(s.graha??r)??"",l=N(s.rashi)??"";return ue`<tr class="${i?"lagna":""}"><td class="graha">${o?ue`<span class="glyph">${o}</span>`:Ke}${s.graha??r}</td><td>${l?ue`<span class="glyph">${l}</span>`:Ke}${s.rashi??""}</td><td>${typeof s.longitude=="number"?Qe(s.longitude):""}</td><td>${s.nakshatra?.name??""}</td><td>${s.nakshatra?.pada??""}</td><td>${s.nakshatra?.lord??""}</td><td>${typeof s.house=="number"?s.house:""}</td>${zh.map(([c])=>ue`<td>${s[c]??""}${s.avasthaInfo?.[c]?.meaning?ue`<span class="gloss">${s.avasthaInfo[c].meaning}</span>`:Ke}</td>`)}<td>${s.isRetrograde?ue`<span class="retro">R</span>`:Ke}</td></tr>`})} ${this.renderModernRows()}</tbody></table></div>${this.renderCombustion()} ${this.renderPlanetaryWar()} ${this.renderInterpretations()} ${this.renderYogas()} ${this.renderHouses()}</div>`}renderModernRows(){let a=this.data?.modernPlanets??[];return a.length===0?Ke:a.map((e,t)=>{let r=N(e.rashi)??"";return ue`<tr class="modern ${t===0?"modern-first":""}"><td class="graha">${wn(e.planet,e.sanskritName)}</td><td>${r?ue`<span class="glyph">${r}</span>`:Ke}${e.rashi??""}</td><td>${typeof e.longitude=="number"?Qe(e.longitude):""}</td><td>${e.nakshatra?.name??""}</td><td>${e.nakshatra?.pada??""}</td><td>${e.nakshatra?.lord??""}</td><td></td><td></td><td></td><td></td><td>${e.isRetrograde?ue`<span class="retro">R</span>`:Ke}</td></tr>`})}renderCombustion(){let a=this.data?.combustion??[];return a.length===0?Ke:ue`<details class="panel" part="section combustion"><summary>${this.t("Combust grahas")}<span class="summary-count">${a.length}</span>${H()}</summary><div class="panel-body">${a.map(e=>{let t=$(e.planet)??"",r=b(this.effectiveLang(),e.distanceFromSun,2),s=b(this.effectiveLang(),e.orb,1);return ue`<div class="condition"><span class="planet">${t?`${t} `:""}${e.planet}</span> <span class="detail">${this.t("{{distance}} deg from Sun, within {{orb}} deg orb",{distance:r,orb:s})}</span></div>`})}</div></details>`}renderPlanetaryWar(){let a=this.data?.planetaryWar??[];return a.length===0?Ke:ue`<details class="panel" part="section planetary-war"><summary>${this.t("Planetary wars")}<span class="summary-count">${a.length}</span>${H()}</summary><div class="panel-body">${a.map(e=>{let t=b(this.effectiveLang(),e.distance,2);return ue`<div class="condition"><span class="planet">${this.t("{{first}} vs {{second}}",{first:e.planet1,second:e.planet2})}</span> <span class="detail">${this.t("{{distance}} deg apart",{distance:t})}</span> <span class="winner">${this.t("{{graha}} wins",{graha:e.winner})}</span></div>`})}</div></details>`}renderInterpretations(){if(this.hideReadings)return Ke;let a=this.data?.interpretations??{},e=this.orderedRows().map(([t,r])=>[r.graha??t,a[r.graha??t],r.avasthaInfo]).filter(([,t,r])=>t!=null||r!=null);return e.length===0?Ke:ue`<details class="panel" part="section readings"><summary>${this.t("Interpretations")}<span class="summary-count">${e.length}</span>${H()}</summary><div class="panel-body">${e.map(([t,r,s])=>{let i=$(t)??"";return ue`<div class="interp"><span class="planet">${i?`${i} `:""}${t}</span> ${r?.rashi?ue`<p><span class="label">${this.t("Rashi.")}</span> ${r.rashi}</p>`:Ke} ${r?.nakshatra?ue`<p><span class="label">${this.t("Nakshatra.")}</span> ${r.nakshatra}</p>`:Ke} ${zh.map(([o,l])=>s?.[o]?.interpretation?ue`<p><span class="label">${this.t(l)}</span> ${s[o].interpretation}</p>`:Ke)}</div>`})}</div></details>`}renderHouses(){let a=(this.data?.houses??[]).filter(e=>e.name||e.description);return a.length===0?Ke:ue`<details class="panel" part="section bhava-significations"><summary>${this.t("Bhava significations")}<span class="summary-count">${a.length}</span>${H()}</summary><div class="panel-body">${a.map(e=>ue`<div class="bhava"><span class="name">${e.number}. ${e.name??""}</span> ${e.description?ue`<p class="desc">${e.description}</p>`:Ke}</div>`)}</div></details>`}renderYogas(){let a=(this.data?.yogas??[]).filter(e=>e.present);return a.length===0?Ke:ue`<details class="panel" part="section yogas"><summary>${this.t("Yogas")}<span class="summary-count">${a.length}</span>${H()}</summary><div class="panel-body">${a.map(e=>ue`<div class="bhava"><span class="name">${e.name} ${e.quality?ue`<span class="quality ${e.quality.toLowerCase()}">${e.quality}</span>`:Ke}</span> ${e.result?ue`<p class="desc">${e.result}</p>`:Ke}</div>`)}</div></details>`}};qs.endpoints=Uc,qs.styles=[u,G,M,sb`.wrap{overflow:hidden}.head{padding:var(--roxy-space-md);border-block-end:1px solid var(--roxy-border)}h2,p{margin:0}.scroll{min-width:0;overflow-x:auto}table{width:100%}th,td{white-space:nowrap}:is(th,td):first-child{padding-inline-start:var(--roxy-space-md)}:is(th,td):last-child{padding-inline-end:var(--roxy-space-md)}tbody tr.lagna td:first-child{box-shadow:inset var(--roxy-line-thick) 0 0 var(--roxy-accent)}tbody tr.lagna .glyph{color:var(--roxy-accent-ink)}tbody tr.modern-first td{border-block-start:var(--roxy-line-thick) solid var(--roxy-border)}td.graha{font-weight:var(--roxy-weight-bold)}.glyph{color:var(--roxy-muted);margin-inline-end:var(--roxy-space-xs)}.gloss{color:var(--roxy-secondary);font-size:var(--roxy-text-xs);display:block}.retro{color:var(--roxy-warning-fg);font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}details.panel{border-block-start:1px solid var(--roxy-border)}details.panel>summary{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);padding:var(--roxy-space-sm) var(--roxy-space-md);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold);display:flex}.summary-count{margin-inline:auto var(--roxy-space-xs);color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);font-variant-numeric:tabular-nums}.panel-body{gap:var(--roxy-space-sm);padding:0 var(--roxy-space-md) var(--roxy-space-md);font-size:var(--roxy-text-sm);grid-template-columns:minmax(0,1fr);display:grid}.condition{align-items:baseline;gap:var(--roxy-space-xs) var(--roxy-space-sm);flex-wrap:wrap;display:flex}:is(.condition,.interp) .planet,.bhava .name{font-weight:var(--roxy-weight-bold)}.condition .detail{color:var(--roxy-muted);font-variant-numeric:tabular-nums}.condition .winner{color:var(--roxy-success-fg);font-weight:var(--roxy-weight-bold)}.interp,.bhava{gap:calc(var(--roxy-space-unit) / 2);display:grid}.interp .label{color:var(--roxy-muted);font-weight:var(--roxy-weight-bold)}.bhava .desc{color:var(--roxy-muted)}.quality{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold)}.quality.positive{color:var(--roxy-success-fg)}.quality.negative{color:var(--roxy-danger-fg)}.quality.both{color:var(--roxy-muted)}`],qs=m([f("roxy-vedic-planets-table")],qs);import{css as ib,html as Ve,nothing as Mt}from"lit";import{state as ob}from"lit/decorators.js";function Oh(n){return n.suppressedBy||void 0}var Gh=["classical","asraya","dala","akriti","sankhya"];function Ih(n){let a=Gh.indexOf(n.family);return a===-1?Gh.length:a}var lb=[{id:"present",source:"Present",open:!0,noteSource:"Every classical condition is satisfied by this chart."},{id:"outranked",source:"Outranked",open:!0,noteSource:"The rule matched, but a stronger family silences it under the classical precedence norms. Each card names the family that took precedence."},{id:"absent",source:"Not present",open:!1,noteSource:"At least one classical condition fails. Read the evidence for which."}],cb={Positive:"success",Negative:"danger",Both:"warning"},Sr=class extends y{constructor(){super(...arguments);this.filter="";this.handleInput=e=>{this.filter=e.target.value}}verdictOf(e){return e.present?"present":Oh(e)?"outranked":"absent"}renderVerdictGroup(e,t){if(!t.length)return Mt;let r=[...t].sort((s,i)=>Ih(s)-Ih(i));return Ve`<details class="group" part="section verdict" ?open="${e.open||!!this.filter}"><summary class="group-summary"><span class="group-label">${this.t(e.source)}</span> <span class="group-count">${t.length}</span></summary><p class="group-note">${this.t(e.noteSource)}</p><div class="detail-grid">${r.map(s=>this.renderDetectCard(s))}</div></details>`}renderQualityChip(e){return Ve`<span class="quality-chip roxy-chip quality-${e}" data-tone="${cb[e]??Mt}">${e}</span>`}renderFamilyChip(e){return e.family?Ve`<span class="family-chip roxy-chip" title="${this.t("Classical family")}">${A(e.family)}</span>`:Mt}renderDetailCard(e){return Ve`<div class="detail-card"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):Mt} ${this.renderFamilyChip(e)}</p>${e.description&&!this.hideReadings?Ve`<p class="description">${e.description}</p>`:Mt} ${this.renderEffects(e.result)}</div>`}renderEffects(e){return!e||this.hideReadings?Mt:Ve`<details part="reading"><summary>${this.t("Effects")}</summary><div class="result-body">${e}</div></details>`}renderDetectCard(e){let t=e.present?void 0:Oh(e),[r,s,i]=e.present?["is-present","Present","success"]:t?["is-outranked",`Outranked by ${A(t)}`,"warning"]:["is-absent","Not present",void 0];return Ve`<div class="detail-card ${e.present?"":t?"outranked":"absent"}"><p class="detail-name">${e.name} ${e.quality?this.renderQualityChip(e.quality):Mt} ${this.renderFamilyChip(e)} <span class="present-badge roxy-chip ${r}" data-tone="${i??Mt}">${s}</span></p>${e.description&&!this.hideReadings?Ve`<p class="description">${e.description}</p>`:Mt} ${e.present?this.renderEffects(e.result):Mt} ${e.evidence?Ve`<p class="evidence">${e.evidence}</p>`:Mt}</div>`}renderData(e){let t=this.filter.toLowerCase();if("description"in e&&typeof e.description=="string"){let r=e;return Ve`<div class="wrap" part="card">${this.renderDetailCard(r)}</div>`}if("yogas"in e&&Array.isArray(e.yogas)){let r=e.yogas;if(r.length>0&&"present"in r[0]){let c=r,d=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,p=e.total??c.filter(h=>h.present).length;return Ve`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Detected yogas")}</h2><span class="count">${this.t("{{count}} of {{total}} present",{count:p,total:c.length})}</span></div>${X(this.effectiveLang(),e.frame,this.translator)}<div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter detected yogas by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="group-stack" part="section verdicts" role="region" aria-live="polite" aria-label="${this.t("Detected yogas")}">${d.length>0?lb.map(h=>this.renderVerdictGroup(h,d.filter(x=>this.verdictOf(x)===h.id))):Ve`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}if(r.length>0&&"description"in r[0]){let c=r,d=t?c.filter(h=>h.name.toLowerCase().includes(t)):c,p=e.total;return Ve`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${p!==void 0?Ve`<span class="count">${this.t("{{count}} total",{count:p})}</span>`:Mt}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="detail-grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${d.length>0?d.map(h=>this.renderDetailCard(h)):Ve`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}let i=r,o=t?i.filter(c=>c.name.toLowerCase().includes(t)):i,l=e.total;return Ve`<div class="wrap" part="card"><div class="head" part="header"><h2>${this.t("Yoga catalog")}</h2>${l!==void 0?Ve`<span class="count">${this.t("{{count}} total",{count:l})}</span>`:Mt}</div><div class="search-wrap"><input class="search" type="search" placeholder="${this.t("Filter yogas...")}" aria-label="${this.t("Filter yoga list by name")}" .value="${this.filter}" @input="${this.handleInput}"></div><div class="grid" part="section yogas" role="region" aria-live="polite" aria-label="${this.t("Yoga results")}">${o.length>0?o.map(c=>Ve`<div class="yoga-chip">${c.name}</div>`):Ve`<p class="no-results">${this.t("No yogas match your search.")}</p>`}</div></div>`}return Ve`<div class="roxy-empty" role="status">${this.t("No yoga data")}</div>`}};Sr.endpoints=Wc,Sr.styles=[u,G,ib`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-md);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}h2,p{margin:0}.count,.no-results{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.search{inline-size:100%;max-inline-size:32ch;font-size:var(--roxy-text-sm)}.search::placeholder{color:var(--roxy-muted)}.grid{gap:0 var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,22ch),1fr));display:grid}.yoga-chip{padding-block:var(--roxy-space-xs);border-block-end:1px solid var(--roxy-border);font-size:var(--roxy-text-sm);overflow-wrap:anywhere}.detail-card{gap:var(--roxy-space-sm);display:grid}.detail-grid>.detail-card+.detail-card{border-block-start:1px solid var(--roxy-border);padding-block-start:var(--roxy-space-sm)}.detail-name{align-items:center;gap:var(--roxy-space-sm);font-weight:var(--roxy-weight-bold);flex-wrap:wrap;display:flex}.wrap>.detail-card .detail-name{font-size:var(--roxy-text-lg)}.family-chip{color:var(--roxy-fg)}.quality-chip,.present-badge{font-weight:var(--roxy-weight-bold)}.detail-card.absent,.detail-card.outranked{color:var(--roxy-secondary)}.group-stack,.group,.detail-grid{gap:var(--roxy-space-sm);display:grid}.group-stack{gap:var(--roxy-space-md)}.group-summary{align-items:baseline;gap:var(--roxy-space-sm);color:var(--roxy-secondary);list-style:none;display:flex}.group-summary:before,.detail-card details>summary:before{content:"+";font-size:var(--roxy-text-base);line-height:1}.group-summary:before{color:var(--roxy-accent-ink)}.group[open]>.group-summary:before,.detail-card details[open]>summary:before{content:"-"}.group-label{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.group-count{font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums}.group-note,.evidence{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.description{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.detail-card details{font-size:var(--roxy-text-sm)}.detail-card details>summary{align-items:center;gap:var(--roxy-space-xs);padding-block:var(--roxy-space-xs);color:var(--roxy-accent-ink);list-style:none;display:flex}.result-body{color:var(--roxy-fg);padding-block-start:var(--roxy-space-xs)}`],m([ob()],Sr.prototype,"filter",2),Sr=m([f("roxy-yoga-list")],Sr);import{css as db,html as B,nothing as U}from"lit";import{property as pb}from"lit/decorators.js";var fo={"secret-friend":"Secret friend",trine:"Trine",same:"Same",neutral:"Neutral",harm:"Harm",clash:"Clash"},Fh={excellent:"Excellent",strong:"Strong",workable:"Workable",challenging:"Challenging",difficult:"Difficult"},Rr=class extends y{constructor(){super(...arguments);this.mode="sign"}renderData(e){if(this.mode==="compatibility"&&"signs"in e)return this.renderCompatibility(e);let t="animal"in e&&e.animal?e.animal:e,r=this.effectiveLang(),s="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,i="date"in e&&e.date?R(r,e.date):"";return B`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><span class="hanzi" lang="zh">${t.chinese??""}</span><div><h2 class="title" id="zodiac-title">${g(t,"name")}</h2><div class="sub">${t.pinyin??""}${i?` ${i}`:""}</div></div>${s!==null?B`<span class="energy" part="details" aria-label="${this.t("Energy {{value}} of 10",{value:s})}">${this.t("Energy {{value}}/10",{value:P(r,s)})} <span class="energy-bar"><span style="width:${s/10*100}%"></span></span></span>`:U}</header>${this.renderIdentity(e,t)} ${this.renderDaily(e)} ${this.renderReference(e)} ${"interpretation"in e&&e.interpretation&&!this.hideReadings?B`<p class="prose" part="section interpretation">${e.interpretation}</p>`:U} ${"conventions"in e?Fa(e.conventions,this.translator,this.effectiveLang()):U}</article>`}renderIdentity(e,t){let r="yearPillar"in e&&e.yearPillar||"dayPillar"in e&&e.dayPillar||null,s="hours"in e?e.hours:void 0,i="element"in e&&typeof e.element=="string"?e:void 0,o=i?g(i,"element"):g(t,"element"),l=bt(i?.element??t.element),c="polarity"in e&&typeof e.polarity=="string"&&e.polarity||t.polarity||"";return!o&&!c&&!r&&!s&&!t.branch?U:B`<div class="facts" part="details">${o?B`<span><span class="roxy-label">${this.t("Element")}</span><b class="element-word ${l}">${o}</b></span>`:U} ${c?B`<span><span class="roxy-label">${this.t("Polarity")}</span>${c}</span>`:U} ${t.branch?B`<span><span class="roxy-label">${this.t("Branch")}</span>${t.branch}</span>`:U} ${r?B`<span><span class="roxy-label">${this.t("Pillar")}</span> <b>${r.stem??""}</b> ${r.branch??""}</span>`:U} ${s&&typeof s.start=="number"?B`<span><span class="roxy-label">${this.t("Hours")}</span>${this.t("{{start}} to {{end}}",{start:this.hourLabel(s.start),end:this.hourLabel(s.end)})}</span>`:U}</div>`}hourLabel(e){return typeof e=="number"?`${String(e).padStart(2,"0")}:00`:""}renderDaily(e){if(!("relationship"in e)||!("overview"in e))return U;let t="year"in e?e.year:void 0,r="benMingNian"in e?e.benMingNian:!1;return B`${B`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Day")}</span><b>${e.relationship&&fo[e.relationship]?this.t(fo[e.relationship]):e.relationship??""}</b></span> ${t?B`<span><span class="roxy-label">${this.t("Year")}</span>${t.pillar??""} ${g(t,"animal")} ${t.relationship&&fo[t.relationship]?this.t(fo[t.relationship]):t.relationship??""}</span>`:U} ${r?B`<span class="roxy-chip tag">${this.t("Ben Ming Nian")}</span>`:U}</div>`} ${this.hideReadings?U:B`${e.overview?B`<p class="prose" part="section overview">${e.overview}</p>`:U}<div class="sections" part="section outlook">${"love"in e&&e.love?B`<div class="section"><h3 class="block-title">${this.t("Love")}</h3><p>${e.love}</p></div>`:U} ${"career"in e&&e.career?B`<div class="section"><h3 class="block-title">${this.t("Career")}</h3><p>${e.career}</p></div>`:U} ${"advice"in e&&e.advice?B`<div class="section"><h3 class="block-title">${this.t("Advice")}</h3><p>${e.advice}</p></div>`:U}</div>`} ${t?.note&&!this.hideReadings?B`<p class="prose" part="reading">${t.note}</p>`:U}`}renderReference(e){if(!("trine"in e)&&!("secretFriend"in e))return U;let t=e;return B`${t.trine?B`<section part="section trine"><h3 class="block-title">${this.t("Trine")} ${t.trine.number??""}</h3><div class="facts"><span><b lang="zh">${t.trine.chinese??""}</b> <span class="element-word ${bt(t.trine.element)}">${g(t.trine,"element")}</span></span> ${t.trine.members?.length?B`<span class="roxy-chips">${t.trine.members.map(r=>B`<span class="roxy-chip">${r}</span>`)}</span>`:U} ${t.trine.theme?B`<span>${t.trine.theme}</span>`:U}</div></section>`:U} ${this.renderPartners(t)} ${this.hideReadings?U:B`${t.summary?B`<p class="prose" part="section summary">${t.summary}</p>`:U} ${t.traits?.length?B`<section part="section traits"><h3 class="block-title">${this.t("Traits")}</h3><ul class="roxy-chips">${t.traits.map(r=>B`<li>${r}</li>`)}</ul></section>`:U} ${this.bullets(this.t("Strengths"),t.strengths)} ${this.bullets(this.t("Weaknesses"),t.weaknesses)} ${t.compatibilitySummary?B`<p class="prose" part="reading">${t.compatibilitySummary}</p>`:U}`}`}renderPartners(e){let r=[["Secret friend",e.secretFriend],["Clash",e.clashPartner],["Harm",e.harmPartner]].filter(([,s])=>s?.name);return r.length===0?U:B`<section part="section partners"><div class="partners">${r.map(([s,i])=>B`<div class="partner"><span class="role roxy-label">${this.t(s)}</span> <span class="glyph" lang="zh">${i?.chinese??""}</span> <span class="who">${g(i,"name")}</span></div>`)}</div></section>`}bullets(e,t){return t?.length?B`<section part="section list"><h3 class="block-title">${e}</h3><ul class="bullets">${t.map(r=>B`<li>${r}</li>`)}</ul></section>`:U}renderCompatibility(e){let t=e.signs?.first,r=e.signs?.second,s=typeof e.score=="number"?e.score:null;return B`<article class="card" part="card" aria-labelledby="zodiac-title"><header class="head" part="header"><div class="pair"><span class="side"><span class="hanzi" lang="zh">${t?.chinese??""}</span> <span class="sub">${g(t,"name")}</span></span> <span class="side"><span class="hanzi" lang="zh">${r?.chinese??""}</span> <span class="sub">${g(r,"name")}</span></span></div></header><h2 class="title" id="zodiac-title">${g(e,"relationshipName")} <span lang="zh">${e.relationshipChinese??""}</span></h2>${s!==null?B`<div class="score" part="details"><span class="score-value">${s}</span> <span class="score-track"><span class="score-fill" style="width:${Math.max(0,Math.min(100,s))}%"></span></span> ${e.verdict?B`<span class="roxy-chip tag">${Fh[e.verdict]?this.t(Fh[e.verdict]):e.verdict}</span>`:U}</div>`:U} ${e.sharedElement?B`<div class="facts" part="details"><span><span class="roxy-label">${this.t("Shared element")}</span><b class="element-word ${bt(e.sharedElement)}">${g(e,"sharedElement")}</b></span></div>`:U} ${this.hideReadings?U:B`${e.summary?B`<p class="prose" part="section summary">${e.summary}</p>`:U} ${this.bullets(this.t("Strengths"),e.strengths)} ${this.bullets(this.t("Frictions"),e.frictions)} ${e.advice?B`<p class="prose" part="reading">${e.advice}</p>`:U}`}</article>`}};Rr.endpoints=Xc,Rr.styles=[u,G,ca,db`.card{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}.hanzi{font-size:calc(var(--roxy-text-base) * 2.75);color:var(--roxy-accent-ink);line-height:1}.title,.block-title{margin:0}.title{font-size:var(--roxy-text-xl)}.block-title{margin-block-end:var(--roxy-space-sm)}.sub{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.energy{color:var(--roxy-secondary);font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums;margin-inline-start:auto}.energy-bar,.score-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);overflow:hidden}.energy-bar{block-size:.25lh;inline-size:12ch;vertical-align:middle;margin-inline-start:var(--roxy-space-xs);display:inline-block}.energy-bar>span,.score-fill{background:var(--roxy-accent);height:100%;display:block}.facts{gap:var(--roxy-space-xs) var(--roxy-space-md);border-block-start:1px solid var(--roxy-border);color:var(--roxy-secondary);font-size:var(--roxy-text-sm);flex-wrap:wrap;padding-block-start:var(--roxy-space-md);display:flex}.facts .roxy-label{margin-inline-end:var(--roxy-space-xs)}.facts b{color:var(--roxy-fg)}.prose{margin:0}.prose[part~=reading]{padding-block-start:var(--roxy-space-md)}section .facts{border-block-start:0;padding-block-start:0}.sections{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fit,minmax(min(100%,24ch),1fr));display:grid}.section p{font-size:var(--roxy-text-sm);margin:0}.bullets{font-size:var(--roxy-text-sm);margin:0;padding-inline-start:var(--roxy-space-lg)}.partners{gap:var(--roxy-space-sm);grid-template-columns:repeat(auto-fit,minmax(16ch,1fr));display:grid}.partner,.pair .side{gap:calc(var(--roxy-space-unit) / 2);text-align:center;display:grid}.partner .glyph{font-size:calc(var(--roxy-text-base) * 1.5);line-height:var(--roxy-leading-tight);color:var(--roxy-accent-ink)}.partner .who{font-size:var(--roxy-text-sm)}.score{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.score-value{font-size:calc(var(--roxy-text-base) * 2);font-weight:var(--roxy-weight-bold);font-variant-numeric:tabular-nums;line-height:1}.score-track{flex:1;block-size:.35lh;min-inline-size:16ch}.tag{color:var(--roxy-info-fg)}.pair{justify-content:center;align-items:center;gap:var(--roxy-space-md);flex-wrap:wrap;display:flex}`],m([pb({type:String,reflect:!0})],Rr.prototype,"mode",2),Rr=m([f("roxy-zodiac-card")],Rr);var Bh={post_astrology_natal_chart:{tag:"roxy-natal-chart",pascal:"RoxyNatalChart",operationId:"generateNatalChart"},post_astrology_synastry:{tag:"roxy-synastry-chart",pascal:"RoxySynastryChart",operationId:"calculateSynastry"},post_astrology_transits:{tag:"roxy-transits-table",pascal:"RoxyTransitsTable",operationId:"calculateTransits"},post_astrology_transit_aspects:{tag:"roxy-transit-wheel",pascal:"RoxyTransitWheel",operationId:"calculateTransitAspects"},post_astrology_aspects:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"calculateAspects"},post_astrology_aspect_patterns:{tag:"roxy-aspects-table",pascal:"RoxyAspectsTable",operationId:"detectAspectPatterns"},get_astrology_moon_phase_current:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getCurrentMoonPhase",attrs:{mode:"current"}},get_astrology_moon_phase_upcoming:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getUpcomingMoonPhases",attrs:{mode:"upcoming"}},get_astrology_moon_phase_calendar_year_month:{tag:"roxy-moon-phase",pascal:"RoxyMoonPhase",operationId:"getMoonCalendar",attrs:{mode:"calendar"}},get_astrology_horoscope_sign_daily:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getDailyHoroscope",attrs:{period:"daily"}},get_astrology_horoscope_sign_weekly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getWeeklyHoroscope",attrs:{period:"weekly"}},get_astrology_horoscope_sign_monthly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getMonthlyHoroscope",attrs:{period:"monthly"}},get_astrology_horoscope_sign_yearly:{tag:"roxy-horoscope-card",pascal:"RoxyHoroscopeCard",operationId:"getYearlyHoroscope",attrs:{period:"yearly"}},post_astrology_astrocartography:{tag:"roxy-astrocartography-map",pascal:"RoxyAstrocartographyMap",operationId:"generateAstrocartography"},post_astrology_local_space:{tag:"roxy-local-space-compass",pascal:"RoxyLocalSpaceCompass",operationId:"generateLocalSpace"},post_astrology_relocation_chart:{tag:"roxy-relocation-wheel",pascal:"RoxyRelocationWheel",operationId:"generateRelocationChart"},post_astrology_asteroids:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateAsteroids"},post_astrology_lilith:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateLilith"},post_astrology_progressions:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateProgressions"},post_astrology_solar_arc:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"generateSolarArc"},post_astrology_arabic_lots:{tag:"roxy-positions-table",pascal:"RoxyPositionsTable",operationId:"calculateArabicLots"},post_astrology_planets_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyTropicalEphemeris"},post_vedic_astrology_planetary_positions_monthly:{tag:"roxy-ephemeris-table",pascal:"RoxyEphemerisTable",operationId:"getMonthlyEphemeris"},post_astrology_fixed_stars:{tag:"roxy-fixed-stars",pascal:"RoxyFixedStars",operationId:"generateFixedStars"},post_astrology_profections:{tag:"roxy-profection-card",pascal:"RoxyProfectionCard",operationId:"generateProfections"},post_astrology_compatibility_score:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateCompatibility",attrs:{mode:"astrology"}},post_numerology_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateNumCompatibility",attrs:{mode:"numerology"}},post_biorhythm_compatibility:{tag:"roxy-compatibility-card",pascal:"RoxyCompatibilityCard",operationId:"calculateBioCompatibility",attrs:{mode:"biorhythm"}},post_vedic_astrology_birth_chart:{tag:"roxy-vedic-kundli",pascal:"RoxyVedicKundli",operationId:"generateBirthChart"},post_vedic_astrology_divisional_chart:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateDivisionalChart"},post_vedic_astrology_navamsa:{tag:"roxy-divisional-chart",pascal:"RoxyDivisionalChart",operationId:"generateNavamsa"},post_vedic_astrology_kp_chart:{tag:"roxy-kp-chart",pascal:"RoxyKpChart",operationId:"generateKpChart"},post_vedic_astrology_kp_planets:{tag:"roxy-kp-planets-table",pascal:"RoxyKpPlanetsTable",operationId:"getKpPlanets"},post_vedic_astrology_kp_ruling_planets:{tag:"roxy-kp-ruling-planets",pascal:"RoxyKpRulingPlanets",operationId:"getKpRulingPlanets"},post_vedic_astrology_ashtakavarga:{tag:"roxy-ashtakavarga-grid",pascal:"RoxyAshtakavargaGrid",operationId:"calculateAshtakavarga"},post_vedic_astrology_shadbala:{tag:"roxy-shadbala-table",pascal:"RoxyShadbalaTable",operationId:"calculateShadbala"},post_vedic_astrology_dasha_major:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getMajorDashas",attrs:{period:"major"}},post_vedic_astrology_dasha_current:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getCurrentDasha",attrs:{period:"current"}},post_vedic_astrology_dasha_sub_mahadasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSubDashas",attrs:{period:"sub"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPratyantardashas",attrs:{period:"antara"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getSookshmaDashas",attrs:{period:"sookshma"}},post_vedic_astrology_dasha_sub_mahadasha_antardasha_pratyantardasha_sookshma:{tag:"roxy-dasha-timeline",pascal:"RoxyDashaTimeline",operationId:"getPranaDashas",attrs:{period:"prana"}},post_vedic_astrology_compatibility:{tag:"roxy-guna-milan",pascal:"RoxyGunaMilan",operationId:"calculateGunMilan"},post_vedic_astrology_panchang_detailed:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getDetailedPanchang",attrs:{detail:"detailed"}},post_vedic_astrology_panchang_basic:{tag:"roxy-panchang-table",pascal:"RoxyPanchangTable",operationId:"getBasicPanchang",attrs:{detail:"basic"}},post_vedic_astrology_aspects:{tag:"roxy-vedic-aspects",pascal:"RoxyVedicAspects",operationId:"calculateDrishti"},post_vedic_astrology_panchang_hora:{tag:"roxy-hora-table",pascal:"RoxyHoraTable",operationId:"getHora"},post_vedic_astrology_panchang_choghadiya:{tag:"roxy-choghadiya-grid",pascal:"RoxyChoghadiyaGrid",operationId:"getChoghadiya"},post_vedic_astrology_heliacal:{tag:"roxy-heliacal-table",pascal:"RoxyHeliacalTable",operationId:"getHeliacalVisibility"},post_vedic_astrology_daily:{tag:"roxy-vedic-daily",pascal:"RoxyVedicDaily",operationId:"getVedicDailyReading"},post_vedic_astrology_kp_daily_finance:{tag:"roxy-kp-finance-card",pascal:"RoxyKpFinanceCard",operationId:"getKpDailyFinance"},post_vedic_astrology_transit:{tag:"roxy-gochara-table",pascal:"RoxyGocharaTable",operationId:"calculateTransit"},post_vedic_astrology_bhava_bala:{tag:"roxy-bhava-bala-table",pascal:"RoxyBhavaBalaTable",operationId:"calculateBhavaBala"},post_vedic_astrology_bhav_chalit:{tag:"roxy-bhav-chalit-table",pascal:"RoxyBhavChalitTable",operationId:"calculateBhavChalit"},post_vedic_astrology_upagraha:{tag:"roxy-upagraha-table",pascal:"RoxyUpagrahaTable",operationId:"getUpagrahaPositions"},post_vedic_astrology_chara_karakas:{tag:"roxy-chara-karakas",pascal:"RoxyCharaKarakas",operationId:"calculateCharaKarakas"},post_vedic_astrology_arudha:{tag:"roxy-arudha-padas",pascal:"RoxyArudhaPadas",operationId:"calculateArudhaPadas"},get_vedic_astrology_yoga:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"listYogas"},post_vedic_astrology_yoga_detect:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"detectYogas"},get_vedic_astrology_yoga_id:{tag:"roxy-yoga-list",pascal:"RoxyYogaList",operationId:"getYoga"},get_vedic_astrology_nakshatras_id:{tag:"roxy-nakshatra-card",pascal:"RoxyNakshatraCard",operationId:"getNakshatra"},post_vedic_astrology_dosha_manglik:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkManglikDosha",attrs:{type:"manglik"}},post_vedic_astrology_dosha_kalsarpa:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkKalsarpaDosha",attrs:{type:"kalsarpa"}},post_vedic_astrology_dosha_sadhesati:{tag:"roxy-dosha-card",pascal:"RoxyDoshaCard",operationId:"checkSadhesati",attrs:{type:"sadhesati"}},post_numerology_life_path:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateLifePath",attrs:{type:"life-path"}},post_numerology_expression:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateExpression",attrs:{type:"expression"}},post_numerology_soul_urge:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateSoulUrge",attrs:{type:"soul-urge"}},post_numerology_personality:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonality",attrs:{type:"personality"}},post_numerology_birth_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateBirthDay",attrs:{type:"birth-day"}},post_numerology_maturity:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculateMaturity",attrs:{type:"maturity"}},post_numerology_daily:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"getDailyNumber",attrs:{type:"daily"}},post_numerology_personal_day:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalDay",attrs:{type:"personal-day"}},post_numerology_personal_month:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalMonth",attrs:{type:"personal-month"}},post_numerology_personal_year:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"calculatePersonalYear",attrs:{type:"personal-year"}},post_numerology_chart:{tag:"roxy-numerology-card",pascal:"RoxyNumerologyCard",operationId:"generateNumerologyChart",attrs:{type:"chart"}},get_numerology_compound_number:{tag:"roxy-compound-number",pascal:"RoxyCompoundNumber",operationId:"getCompoundNumber"},post_kabbalah_gematria:{tag:"roxy-gematria",pascal:"RoxyGematria",operationId:"calculateGematria"},post_tarot_daily:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getDailyCard"},get_tarot_cards_id:{tag:"roxy-tarot-card",pascal:"RoxyTarotCard",operationId:"getCard"},get_tarot_cards:{tag:"roxy-tarot-catalog",pascal:"RoxyTarotCatalog",operationId:"listCards"},post_tarot_spreads_three_card:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castThreeCard",attrs:{spread:"three-card"}},post_tarot_spreads_celtic_cross:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCelticCross",attrs:{spread:"celtic-cross"}},post_tarot_spreads_love:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castLoveSpread",attrs:{spread:"love"}},post_tarot_spreads_career:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCareerSpread",attrs:{spread:"career"}},post_tarot_spreads_custom:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castCustomSpread",attrs:{spread:"custom"}},post_tarot_yes_no:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"castYesNo",attrs:{spread:"yes-no"}},post_tarot_draw:{tag:"roxy-tarot-spread",pascal:"RoxyTarotSpread",operationId:"drawCards",attrs:{spread:"draw"}},post_human_design_bodygraph:{tag:"roxy-bodygraph",pascal:"RoxyBodygraph",operationId:"generateBodygraph"},post_human_design_type:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateType"},post_human_design_profile:{tag:"roxy-hd-type-card",pascal:"RoxyHdTypeCard",operationId:"calculateProfile"},post_human_design_connection:{tag:"roxy-hd-connection",pascal:"RoxyHdConnection",operationId:"calculateConnection"},post_human_design_penta:{tag:"roxy-hd-penta",pascal:"RoxyHdPenta",operationId:"calculatePenta"},post_human_design_variables:{tag:"roxy-hd-variables",pascal:"RoxyHdVariables",operationId:"calculateVariables"},post_forecast_timeline:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"generateTimeline"},post_forecast_significant_dates:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"findSignificantDates"},post_forecast_transits:{tag:"roxy-forecast-timeline",pascal:"RoxyForecastTimeline",operationId:"forecastTransits"},post_forecast_digest:{tag:"roxy-forecast-digest",pascal:"RoxyForecastDigest",operationId:"generateDigest"},post_chinese_astrology_bazi_chart:{tag:"roxy-bazi-chart",pascal:"RoxyBaziChart",operationId:"generateBaziChart"},post_chinese_astrology_bazi_luck_pillars:{tag:"roxy-luck-pillars",pascal:"RoxyLuckPillars",operationId:"calculateLuckPillars"},post_chinese_astrology_zodiac_sign:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"calculateZodiacAnimal",attrs:{mode:"sign"}},get_chinese_astrology_zodiac_animals_id:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacAnimal",attrs:{mode:"animal"}},get_chinese_astrology_zodiac_id_daily:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getDailyZodiacReading",attrs:{mode:"daily"}},get_chinese_astrology_zodiac_compatibility_sign1_sign2:{tag:"roxy-zodiac-card",pascal:"RoxyZodiacCard",operationId:"getZodiacCompatibility",attrs:{mode:"compatibility"}},get_chinese_astrology_calendar_day_date:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getAlmanacDay",attrs:{mode:"day"}},get_chinese_astrology_calendar_monthly:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"getMonthlyAlmanac",attrs:{mode:"month"}},post_chinese_astrology_calendar_auspicious_days:{tag:"roxy-almanac-day",pascal:"RoxyAlmanacDay",operationId:"lookupAuspiciousDays",attrs:{mode:"auspicious"}},post_feng_shui_flying_stars_natal:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"generateFlyingStarChart",attrs:{mode:"natal"}},get_feng_shui_flying_stars_annual_year:{tag:"roxy-flying-star-chart",pascal:"RoxyFlyingStarChart",operationId:"getAnnualFlyingStars",attrs:{mode:"annual"}},post_feng_shui_kua:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"calculateKuaNumber",attrs:{mode:"kua"}},post_feng_shui_eight_mansions:{tag:"roxy-kua-card",pascal:"RoxyKuaCard",operationId:"generateEightMansions",attrs:{mode:"mansions"}},post_mesoamerican_astrology_mayan_tzolkin:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"calculateTzolkin",attrs:{mode:"day"}},post_mesoamerican_astrology_mayan_chart:{tag:"roxy-mayan-day-sign",pascal:"RoxyMayanDaySign",operationId:"generateMayanChart",attrs:{mode:"chart"}},post_vastu_mandala:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"generateMandala",attrs:{mode:"mandala"}},post_vastu_entrance:{tag:"roxy-vastu-mandala",pascal:"RoxyVastuMandala",operationId:"calculateEntrancePada",attrs:{mode:"entrance"}},post_biorhythm_daily:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getDailyBiorhythm",attrs:{mode:"daily"}},post_biorhythm_forecast:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getForecast",attrs:{mode:"forecast"}},post_biorhythm_critical_days:{tag:"roxy-biorhythm-chart",pascal:"RoxyBiorhythmChart",operationId:"getCriticalDays",attrs:{mode:"critical-days"}},post_ayurveda_constitution:{tag:"roxy-dosha-constitution",pascal:"RoxyDoshaConstitution",operationId:"calculateAyurvedicConstitution"},get_iching_hexagrams_random:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getRandomHexagram"},get_iching_hexagrams_number:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getHexagram"},get_iching_hexagrams_lookup:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"lookupHexagram"},get_iching_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castReading"},post_iching_daily:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"getDailyHexagram"},post_iching_daily_cast:{tag:"roxy-hexagram",pascal:"RoxyHexagram",operationId:"castDailyReading"},get_crystals_id:{tag:"roxy-crystal-card",pascal:"RoxyCrystalCard",operationId:"getCrystal"},get_crystals:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"listCrystals"},get_crystals_chakra:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByChakra"},get_crystals_element:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByElement"},get_crystals_zodiac_sign:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getCrystalsByZodiac"},get_crystals_birthstone_month:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"getBirthstones"},get_crystals_search:{tag:"roxy-crystal-grid",pascal:"RoxyCrystalGrid",operationId:"searchCrystals"},get_dreams_symbols_id:{tag:"roxy-dream-card",pascal:"RoxyDreamCard",operationId:"getDreamSymbol"},get_dreams_symbols:{tag:"roxy-dream-search",pascal:"RoxyDreamSearch",operationId:"searchDreamSymbols"},get_angel_numbers_number:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getAngelNumber"},post_angel_numbers_daily:{tag:"roxy-angel-number-card",pascal:"RoxyAngelNumberCard",operationId:"getDailyAngelNumber"},get_angel_numbers_lookup:{tag:"roxy-angel-number-lookup",pascal:"RoxyAngelNumberLookup",operationId:"analyzeNumberSequence"},get_astrology_signs_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getZodiacSign"},get_astrology_planet_meanings_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getPlanetMeaning"},get_vedic_astrology_rashis_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getRashi"},get_iching_trigrams_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getTrigram"},get_human_design_gates_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getGate"},get_human_design_centers_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getCenter"},get_numerology_meanings_number:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getNumberMeaning"},get_vedic_astrology_avasthas_id:{tag:"roxy-reference-card",pascal:"RoxyReferenceCard",operationId:"getAvastha"}};function Hh(n){let a=n.lastIndexOf(":"),e=a===-1?n:n.slice(a+1),t=Bh[e];return t?{...t,toolName:e}:void 0}var Dl=[{pascal:"RoxyNatalChart",tag:"roxy-natal-chart",slug:"natal-chart",heading:"Natal chart",description:"Western natal chart wheel for /astrology/natal-chart responses",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Natal chart wheel with planet glyphs and aspect lines",topic:"Astrology"},{pascal:"RoxySynastryChart",tag:"roxy-synastry-chart",slug:"synastry-chart",heading:"Synastry",description:"Dual-wheel synastry chart with inter-aspects table",docsLabel:"Western",endpointLabel:"POST /astrology/synastry",docsSummary:"Dual-wheel synastry with inter-aspects table",topic:"Astrology"},{pascal:"RoxyWesternPlanetsTable",tag:"roxy-western-planets-table",slug:"western-planets-table",heading:"Western planets",description:"Western planetary positions table with sign, degree, house, and motion plus the chart angles",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Sign, degree, house, motion columns plus ASC, MC, PoF, Vertex",topic:"Astrology"},{pascal:"RoxyTransitsTable",tag:"roxy-transits-table",slug:"transits-table",heading:"Transits",description:"Live planet positions plus aspects to a natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transits",docsSummary:"Transit planet positions plus optional aspects to a natal chart",topic:"Astrology"},{pascal:"RoxyTransitWheel",tag:"roxy-transit-wheel",slug:"transit-wheel",heading:"Transit bi-wheel",description:"Natal and transit bi-wheel with an aspect line for every transit to the natal chart",docsLabel:"Western",endpointLabel:"POST /astrology/transit-aspects",docsSummary:"Natal chart on the inner ring, transiting bodies on the outer ring, aspect lines between them",topic:"Astrology"},{pascal:"RoxyAspectsTable",tag:"roxy-aspects-table",slug:"aspects-table",heading:"Aspects",description:"Natal and transit aspect grid with chart-pattern detection (grand trines, t-squares, stelliums, yods)",docsLabel:"Western",endpointLabel:"POST /astrology/aspects, /astrology/transit-aspects, /astrology/aspect-patterns",docsSummary:"Aspect rows coloured by nature with orb and strength, plus detected chart patterns",topic:"Astrology"},{pascal:"RoxyMoonPhase",tag:"roxy-moon-phase",slug:"moon-phase",heading:"Moon phase",description:"Moon phase card and calendar",docsLabel:"Western",endpointLabel:"GET /astrology/moon-phase/{current,upcoming,calendar/...}",docsSummary:"Moon phase card and calendar",topic:"Astrology"},{pascal:"RoxyHoroscopeCard",tag:"roxy-horoscope-card",slug:"horoscope-card",heading:"Horoscope",description:"Daily, weekly, monthly, or yearly horoscope card for /astrology/horoscope/..., with the column, the dated sky events behind it, and the yearly themes, key periods, eclipses, retrogrades and best months",docsLabel:"Western",endpointLabel:"GET /astrology/horoscope/{sign}/{daily,weekly,monthly,yearly}",docsSummary:"Daily, weekly, monthly, or yearly horoscope card",topic:"Astrology"},{pascal:"RoxyAstrocartographyMap",tag:"roxy-astrocartography-map",slug:"astrocartography-map",heading:"Astrocartography",description:"Astrocartography world map plotting each body Midheaven, IC, Ascendant, and Descendant relocation lines",docsLabel:"Western",endpointLabel:"POST /astrology/astrocartography",docsSummary:"World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations",topic:"Astrology"},{pascal:"RoxyLocalSpaceCompass",tag:"roxy-local-space-compass",slug:"local-space-compass",heading:"Local space",description:"Local space compass plotting each body direction from the birthplace by azimuth and altitude",docsLabel:"Western",endpointLabel:"POST /astrology/local-space",docsSummary:"Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon",topic:"Astrology"},{pascal:"RoxyRelocationWheel",tag:"roxy-relocation-wheel",slug:"relocation-wheel",heading:"Relocation chart",description:"Relocation chart wheel recomputing houses and angles for a new place, with the planets that change house",docsLabel:"Western",endpointLabel:"POST /astrology/relocation-chart",docsSummary:"Relocated chart wheel plus the move geometry, angular planets, and planets that change house",topic:"Astrology"},{pascal:"RoxyPositionsTable",tag:"roxy-positions-table",slug:"positions-table",heading:"Positions table",description:"Editorial positions table for asteroids, Black Moon Lilith, secondary progressions, solar arc directions, and the Arabic lots",docsLabel:"Western",endpointLabel:"POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots",docsSummary:"Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading",topic:"Astrology"},{pascal:"RoxyEphemerisTable",tag:"roxy-ephemeris-table",slug:"ephemeris-table",heading:"Ephemeris",description:"Monthly ephemeris: every body day by day, with each sign change and retrograde stretch called out",docsLabel:"Cross",endpointLabel:"POST /astrology/planets/monthly, /vedic-astrology/planetary-positions/monthly",docsSummary:"Per-body sign changes and retrograde windows for the month, over the full daily position grid",topic:"Astrology"},{pascal:"RoxyFixedStars",tag:"roxy-fixed-stars",slug:"fixed-stars",heading:"Fixed stars",description:"Fixed star conjunctions to the natal chart, tightest first, with the precessed star catalog",docsLabel:"Western",endpointLabel:"POST /astrology/fixed-stars",docsSummary:"Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords",topic:"Astrology"},{pascal:"RoxyProfectionCard",tag:"roxy-profection-card",slug:"profection-card",heading:"Annual profection",description:"Annual profection card with the profected house and sign, the lord of the year, and its natal placement",docsLabel:"Western",endpointLabel:"POST /astrology/profections",docsSummary:"Profected house and sign for the year, the lord of the year, its natal placement, and the reading",topic:"Astrology"},{pascal:"RoxyCompatibilityCard",tag:"roxy-compatibility-card",slug:"compatibility-card",heading:"Compatibility score",description:"Cross-domain compatibility score card",docsLabel:"Cross",endpointLabel:"POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility",docsSummary:"Score card with category breakdown",topic:"Astrology"},{pascal:"RoxyVedicKundli",tag:"roxy-vedic-kundli",slug:"vedic-kundli",heading:"Vedic kundli",description:"South, North, or East Indian Vedic kundli for /vedic-astrology/birth-chart with per-planet degree and nakshatra detail, plus an optional Chandra Lagna (Moon-as-ascendant) reference view",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"South, North, or East Indian kundli with degree detail and optional Chandra Lagna view",topic:"Vedic"},{pascal:"RoxyDivisionalChart",tag:"roxy-divisional-chart",slug:"divisional-chart",heading:"Divisional chart",description:"D2 to D60 varga chart wheel with Vargottama markers",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/{divisional-chart,navamsa}",docsSummary:"Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa",topic:"Vedic"},{pascal:"RoxyKpChart",tag:"roxy-kp-chart",slug:"kp-chart",heading:"KP chart",description:"Full KP chart with Ascendant, Placidus cusps, and planets and nodes in tabbed stellar-hierarchy tables",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/chart",docsSummary:"Ascendant, cusps, planets and nodes with KP stellar hierarchy and house meanings",topic:"Vedic"},{pascal:"RoxyVedicPlanetsTable",tag:"roxy-vedic-planets-table",slug:"vedic-planets-table",heading:"Vedic planets",description:"Vedic planetary positions table with degree, nakshatra, pada, nakshatra lord, bhava, and all three avastha systems",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"Degree, nakshatra, pada, lord, bhava, Baladi, Jagradadi and Deeptadi columns",topic:"Vedic"},{pascal:"RoxyKpPlanetsTable",tag:"roxy-kp-planets-table",slug:"kp-planets-table",heading:"KP planets",description:"KP planets table with sub-lord and sub-sub-lord columns",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/planets",docsSummary:"Sub-lord and sub-sub-lord columns",topic:"Vedic"},{pascal:"RoxyKpRulingPlanets",tag:"roxy-kp-ruling-planets",slug:"kp-ruling-planets",heading:"KP ruling planets",description:"KP ruling planets with day lord, Moon and Lagna stellar hierarchies, and house significators",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/ruling-planets",docsSummary:"Day lord, Moon/Lagna hierarchies, ruling planets, significators with house meanings",topic:"Vedic"},{pascal:"RoxyAshtakavargaGrid",tag:"roxy-ashtakavarga-grid",slug:"ashtakavarga-grid",heading:"Ashtakavarga",description:"Sarva and Bhinna ashtakavarga heatmap with bindu scores",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/ashtakavarga",docsSummary:"Sarva, Bhinna, and Shodhya Pinda views in a tabbed heatmap",topic:"Vedic"},{pascal:"RoxyShadbalaTable",tag:"roxy-shadbala-table",slug:"shadbala-table",heading:"Shadbala",description:"Six-fold planetary strength with adequacy badge per planet",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/shadbala",docsSummary:"Six-fold planetary strength bar plus rupas and adequacy badge",topic:"Vedic"},{pascal:"RoxyDashaTimeline",tag:"roxy-dasha-timeline",slug:"dasha-timeline",heading:"Vimshottari dasha",description:"Vimshottari dasha timeline, mahadasha through prana, with the active period highlighted",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dasha/{current,major,sub/...}",docsSummary:"Vimshottari mahadasha, antardasha, pratyantardasha, sookshma and prana, drill-down at every level",topic:"Vedic"},{pascal:"RoxyGunaMilan",tag:"roxy-guna-milan",slug:"guna-milan",heading:"Guna milan",description:"36-point Ashtakoota matrimonial compatibility breakdown",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/compatibility",docsSummary:"36-point Ashtakoota with eight sub-scores",topic:"Vedic"},{pascal:"RoxyPanchangTable",tag:"roxy-panchang-table",slug:"panchang-table",heading:"Panchang",description:"Panchang muhurta table with auspicious and inauspicious periods",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/{basic,detailed}",docsSummary:"15+ muhurtas in detailed mode",topic:"Vedic"},{pascal:"RoxyVedicAspects",tag:"roxy-vedic-aspects",slug:"vedic-aspects",heading:"Vedic aspects",description:"Vedic graha drishti table: which planet aspects which, with mutual aspects surfaced first",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/aspects",docsSummary:"Graha drishti rows with aspect type, strength, and orb, plus mutual aspects",topic:"Vedic"},{pascal:"RoxyHoraTable",tag:"roxy-hora-table",slug:"hora-table",heading:"Hora",description:"Vedic Hora (planetary hours) table: 12 day and 12 night horas by ruling planet for electional timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/hora",docsSummary:"Day and night planetary hours with ruling planet and window",topic:"Vedic"},{pascal:"RoxyChoghadiyaGrid",tag:"roxy-choghadiya-grid",slug:"choghadiya-grid",heading:"Choghadiya",description:"Day and night Choghadiya muhurta tiles for activity timing",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/choghadiya",docsSummary:"Day and night Choghadiya muhurta tiles colored by effect",topic:"Vedic"},{pascal:"RoxyHeliacalTable",tag:"roxy-heliacal-table",slug:"heliacal-table",heading:"Heliacal rising and setting",description:"Whether each graha stands far enough from the Sun to be seen, with the date it next rises or sets",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/heliacal",docsSummary:"Udaya and asta windows for the six visible grahas, the calculation behind Guru Asta and Shukra Asta",topic:"Vedic"},{pascal:"RoxyVedicDaily",tag:"roxy-vedic-daily",slug:"vedic-daily",heading:"Vedic daily",description:"One native, one day: the verdict band, every graha state behind it, the Moon windows and the finance area",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/daily",docsSummary:"Composed Vedic daily reading with the classical rule behind every graha state, the Tara and Chandrabala windows in full, and all three sidereal frames named",topic:"Vedic"},{pascal:"RoxyKpFinanceCard",tag:"roxy-kp-finance-card",slug:"kp-finance-card",heading:"KP daily finance",description:"One native, one day scored for money: the band, the gain and loss significators, and the four sub lord layers behind the score",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/kp/daily-finance",docsSummary:"KP daily finance reading with the cusp sub lords, the running dasha lords, the ruling planets and the Moon sub lord windows each scored against the gain and loss houses, weighed into one band for the day",topic:"Vedic"},{pascal:"RoxyGocharaTable",tag:"roxy-gochara-table",slug:"gochara-table",heading:"Gochara transits",description:"Where each graha transits now, the natal house it falls in, and the Ashtakavarga-qualified kaksha verdict",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/transit",docsSummary:"Vedic gochara with aspects to the natal chart and the Gochara Kaksha reading drawn as a position within the sign",topic:"Vedic"},{pascal:"RoxyBhavaBalaTable",tag:"roxy-bhava-bala-table",slug:"bhava-bala-table",heading:"Bhava Bala",description:"The twelve houses ranked by strength, with the three classical components that make up each total",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhava-bala",docsSummary:"House strength in rupas and virupas, ranked, with Bhavadhipati, Dig and Drishti Bala shown as proportions of the total",topic:"Vedic"},{pascal:"RoxyBhavChalitTable",tag:"roxy-bhav-chalit-table",slug:"bhav-chalit-table",heading:"Bhav Chalit",description:"Which grahas change house once the bhavas are cut at their real cusps instead of at sign boundaries",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/bhav-chalit",docsSummary:"The Chalit chart against the Rashi chart, leading with how many grahas move and which, plus the unequal bhava spans",topic:"Vedic"},{pascal:"RoxyUpagrahaTable",tag:"roxy-upagraha-table",slug:"upagraha-table",heading:"Upagrahas",description:"The eleven upagrahas in their time-based and Sun-based groups, with rashi, degree, and nakshatra",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/upagraha",docsSummary:"Time-based and Sun-based upagrahas with rashi, degree, longitude and nakshatra",topic:"Vedic"},{pascal:"RoxyCharaKarakas",tag:"roxy-chara-karakas",slug:"chara-karakas",heading:"Chara karakas",description:"Jaimini chara karakas ranked Atmakaraka first, with the scheme that produced the ranking",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/chara-karakas",docsSummary:"Karaka offices in rank order with graha, degree, scheme, and what each is read for",topic:"Vedic"},{pascal:"RoxyArudhaPadas",tag:"roxy-arudha-padas",slug:"arudha-padas",heading:"Arudha padas",description:"The twelve Jaimini arudha padas with their derivation, the Arudha Lagna and the Upapada marked",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/arudha",docsSummary:"Twelve padas with bhava, lord, pada rashi, house from Lagna, and the classical exception marked",topic:"Vedic"},{pascal:"RoxyYogaList",tag:"roxy-yoga-list",slug:"yoga-list",heading:"Yoga catalog",description:"Yoga reference cards from the catalog with optional detail mode",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/yoga, /vedic-astrology/yoga/{id}, POST /vedic-astrology/yoga/detect",docsSummary:"Filterable yoga cards from the 300 plus yoga catalog, grouped by verdict in detect mode",topic:"Vedic"},{pascal:"RoxyNakshatraCard",tag:"roxy-nakshatra-card",slug:"nakshatra-card",heading:"Nakshatra",description:"Nakshatra reference card with lord, deity, symbol, characteristics, and remedies",docsLabel:"Vedic",endpointLabel:"GET /vedic-astrology/nakshatras/{id}",docsSummary:"Lord, deity, symbol, characteristics, remedies",topic:"Vedic"},{pascal:"RoxyDoshaCard",tag:"roxy-dosha-card",slug:"dosha-card",heading:"Manglik dosha",description:"Manglik, Kaal Sarp, or Sade Sati presence card",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}",docsSummary:"Presence, severity, remedies, scoped effects",topic:"Vedic"},{pascal:"RoxyNumerologyCard",tag:"roxy-numerology-card",slug:"numerology-card",heading:"Life path number",description:"Numerology card for life path, expression, soul urge, personality, personal year, or full chart",docsLabel:"Numerology",endpointLabel:"POST /numerology/{life-path,expression,soul-urge,personality,birth-day,maturity,daily,personal-day,personal-month,personal-year,chart}",docsSummary:"Life path, expression, soul urge, personality, personal year, full chart",topic:"Numerology"},{pascal:"RoxyCompoundNumber",tag:"roxy-compound-number",slug:"compound-number",heading:"Compound number",description:"Chaldean compound number card with the numeral, its symbolic name, root number, fortunate or unfortunate nature, the lower number it repeats, and the meaning",docsLabel:"Numerology",endpointLabel:"GET /numerology/compound-number/{number}",docsSummary:"Compound 10 to 52 with name, root, nature and meaning",topic:"Numerology"},{pascal:"RoxyGematria",tag:"roxy-gematria",slug:"gematria",heading:"Gematria",description:"Gematria calculator that shows its work: every Hebrew spelling the input can take, the value under each cipher with the ones that are not single valued, the per letter breakdown right to left, the two substitution ciphers, the Latin alphabet ciphers and the curated words of equal value",docsLabel:"Kabbalah",endpointLabel:"POST /kabbalah/gematria",docsSummary:"Values by cipher, every candidate Hebrew spelling with its per letter breakdown, and equal-value words",topic:"Kabbalah"},{pascal:"RoxyTarotCard",tag:"roxy-tarot-card",slug:"tarot-card",heading:"Daily tarot card",description:"Single tarot card with upright/reversed flip animation",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards/{id}, POST /tarot/daily",docsSummary:"Single card with upright and reversed flip",topic:"Tarot"},{pascal:"RoxyTarotCatalog",tag:"roxy-tarot-catalog",slug:"tarot-catalog",heading:"Tarot deck",description:"Responsive tarot deck gallery with card art, name, and an arcana and suit caption; a picked tile opens its tarot card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards",docsSummary:"Deck gallery tiles with card art, name, and arcana and suit; a pick opens the card in place",topic:"Tarot"},{pascal:"RoxyTarotSpread",tag:"roxy-tarot-spread",slug:"tarot-spread",heading:"Three-card spread",description:"Tarot spread renderer for three-card, Celtic Cross, love, or yes/no",docsLabel:"Tarot",endpointLabel:"POST /tarot/spreads/{three-card,celtic-cross,love,career,custom}, /tarot/yes-no, /tarot/draw",docsSummary:"Spreads with positions and reading",topic:"Tarot"},{pascal:"RoxyBodygraph",tag:"roxy-bodygraph",slug:"bodygraph",heading:"Bodygraph",description:"Human Design bodygraph with nine centers, channels, and activated gates, plus the full reading: type, strategy, authority, profile, definition, incarnation cross, and a gate and line meaning for every activation",docsLabel:"Human Design",endpointLabel:"POST /human-design/bodygraph",docsSummary:"Nine-center chart with defined and open centers, active channels, and gates, plus the type, strategy, authority, profile, and definition readings, the channels by circuit, the centers, and every activation with its gate and line meaning",topic:"Human Design"},{pascal:"RoxyHdTypeCard",tag:"roxy-hd-type-card",slug:"hd-type-card",heading:"HD type",description:"Human Design type reading without the chart: type, strategy, authority, and profile, with the aura mechanic, the signature and not-self themes, and the interpretation behind each label. Also renders the profile response with its two line keynotes",docsLabel:"Human Design",endpointLabel:"POST /human-design/type, /human-design/profile",docsSummary:"Type, strategy, authority, and profile tiles with the aura, signature, and not-self themes, plus the reading behind each label and the profile line keynotes",topic:"Human Design"},{pascal:"RoxyHdConnection",tag:"roxy-hd-connection",slug:"hd-connection",heading:"HD connection",description:"Human Design connection chart: the composite channels two people form, with circuit, dynamic, and which person holds each gate",docsLabel:"Human Design",endpointLabel:"POST /human-design/connection",docsSummary:"Electromagnetic, compromise, and dominance channels between two charts",topic:"Human Design"},{pascal:"RoxyHdPenta",tag:"roxy-hd-penta",slug:"hd-penta",heading:"HD penta",description:"Human Design penta for a 3 to 5 person group: upper and lower triangle channels, defined or open, with core channels and member coverage",docsLabel:"Human Design",endpointLabel:"POST /human-design/penta",docsSummary:"Group penta channels split into upper and lower triangles",topic:"Human Design"},{pascal:"RoxyHdVariables",tag:"roxy-hd-variables",slug:"hd-variables",heading:"HD variables",description:"Human Design variables: the four PHS arrows (determination, environment, perspective, motivation) with left/right direction, color, tone, and base, plus the reading for each arrow and the cognition",docsLabel:"Human Design",endpointLabel:"POST /human-design/variables",docsSummary:"The four transformation arrows with direction, color, tone, and base, plus a reading per arrow grouped by layer and the cognition",topic:"Human Design"},{pascal:"RoxyForecastTimeline",tag:"roxy-forecast-timeline",slug:"forecast-timeline",heading:"Forecast timeline",description:"Cross-domain forecast event strip colored by domain and weighted by significance",docsLabel:"Forecast",endpointLabel:"POST /forecast/{timeline,significant-dates,transits}",docsSummary:"Date-grouped events across Western, Vedic, and biorhythm domains, weighted by significance",topic:"Forecast"},{pascal:"RoxyForecastDigest",tag:"roxy-forecast-digest",slug:"forecast-digest",heading:"Forecast digest",description:"Rolled-up forecast across the next 24 hours, 7, 30, and 90 days with per-domain breakdown and top events",docsLabel:"Forecast",endpointLabel:"POST /forecast/digest",docsSummary:"Per-window event counts, domain breakdown, and the highest-significance events",topic:"Forecast"},{pascal:"RoxyBaziChart",tag:"roxy-bazi-chart",slug:"bazi-chart",heading:"Four pillars",description:"BaZi four pillars chart: stem over branch per pillar with the Ten God relation, the stems each branch stores, the Na Yin, the Day Master, the five-element balance and every interaction the pillars form",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/chart",docsSummary:"Year, month, day and hour pillars in hanzi with hidden stems, Ten Gods, Na Yin, element balance and interactions",topic:"Chinese Astrology"},{pascal:"RoxyLuckPillars",tag:"roxy-luck-pillars",slug:"luck-pillars",heading:"Luck pillars",description:"BaZi luck pillars: the ten-year stretches a chart is read through, each with its stem, branch and Ten God, plus the annual pillars inside them and the direction and starting age the sequence was built from",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/bazi/luck-pillars",docsSummary:"Ten-year luck pillars as a strip with ages and years, the annual pillars, and the direction and start age behind them",topic:"Chinese Astrology"},{pascal:"RoxyZodiacCard",tag:"roxy-zodiac-card",slug:"zodiac-card",heading:"Chinese zodiac",description:"Chinese zodiac card: the animal a date falls in, the reference read of one animal with its trine and partner animals, a daily reading, or the compatibility of a pair",docsLabel:"Chinese",endpointLabel:"POST /chinese-astrology/zodiac/sign, GET /chinese-astrology/zodiac/{animals/{id},{id}/daily,compatibility/{sign1}/{sign2}}",docsSummary:"The animal for a date, one animal in full, a daily reading, or a pair scored",topic:"Chinese Astrology"},{pascal:"RoxyAlmanacDay",tag:"roxy-almanac-day",slug:"almanac-day",heading:"Chinese almanac",description:"Chinese almanac (Tong Shu): the day officer, what the day favours and avoids, the animal it clashes with, its three pillars and lunar mansion, for one day, a whole month, or a search for a date to act on",docsLabel:"Chinese",endpointLabel:"GET /chinese-astrology/calendar/{day/{date},monthly}, POST /chinese-astrology/calendar/auspicious-days",docsSummary:"Day officer, favours and avoids, clash animal and pillars, as one day, a month, or a date search",topic:"Chinese Astrology"},{pascal:"RoxyFlyingStarChart",tag:"roxy-flying-star-chart",slug:"flying-star-chart",heading:"Flying star chart",description:"Xuan Kong flying star plate: nine palaces on the compass with the mountain, period and water star of each, the facing and sitting mountains, and the structure the pair produces",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/flying-stars/natal, GET /feng-shui/flying-stars/annual/{year}",docsSummary:"Nine-palace flying star plate with the mountain, period and water star per palace, the facing and sitting mountains and the structure",topic:"Feng Shui"},{pascal:"RoxyKuaCard",tag:"roxy-kua-card",slug:"kua-card",heading:"Kua and eight mansions",description:"Kua number with its trigram and the Eight Mansions map: all eight compass sectors on the nine-palace grid, each with its star, nature, rank and life domain, and the best and worst of them named",docsLabel:"Feng Shui",endpointLabel:"POST /feng-shui/kua, POST /feng-shui/eight-mansions",docsSummary:"Kua number and trigram over the eight-sector direction map, favourable and unfavourable sectors ranked",topic:"Feng Shui"},{pascal:"RoxyMayanDaySign",tag:"roxy-mayan-day-sign",slug:"mayan-day-sign",heading:"Mayan day sign",description:"Tzolkin day sign in all three of its spellings with the coefficient beside it, the trecena it sits in, the keynote, strengths, challenges and guidance, and on the full chart the Haab date, the Long Count, the Calendar Round, the year bearer and the four-fold cross",docsLabel:"Mesoamerican",endpointLabel:"POST /mesoamerican-astrology/mayan/tzolkin, POST /mesoamerican-astrology/mayan/chart",docsSummary:"Day sign and coefficient with the trecena, the reading, and the Calendar Round on the fuller response",topic:"Mesoamerican"},{pascal:"RoxyVastuMandala",tag:"roxy-vastu-mandala",slug:"vastu-mandala",heading:"Vastu mandala",description:"Vastu Purusha Mandala projected over a plot: every pada with the devata holding it, the brahmasthan block, the vamsa diagonals and where they cross, and in the entrance read the square the main door falls on with the verse effect for that pada",docsLabel:"Vastu",endpointLabel:"POST /vastu/mandala, POST /vastu/entrance",docsSummary:"Pada grid with a devata per square, the brahmasthan, and the entrance pada lit with its effect",topic:"Vastu"},{pascal:"RoxyBiorhythmChart",tag:"roxy-biorhythm-chart",slug:"biorhythm-chart",heading:"Daily biorhythm",description:"Daily biorhythm bars or multi-day forecast cycle lines",docsLabel:"Biorhythm",endpointLabel:"POST /biorhythm/{daily,forecast,critical-days}",docsSummary:"Daily bars, forecast cycle lines, critical days",topic:"Biorhythm"},{pascal:"RoxyDoshaConstitution",tag:"roxy-dosha-constitution",slug:"dosha-constitution",heading:"Ayurvedic constitution",description:"Ayurvedic constitution read from a birth chart: the three humour shares as one bar, the dominant and secondary humour, the three cited factors behind the blend with their verses, the shadbala ranking the third factor reads, and the scope note the response carries",docsLabel:"Ayurveda",endpointLabel:"POST /ayurveda/constitution",docsSummary:"Vata, pitta and kapha shares as one bar with the dominant humour and the cited factors behind it",topic:"Ayurveda"},{pascal:"RoxyHexagram",tag:"roxy-hexagram",slug:"hexagram",heading:"I Ching hexagram",description:"I Ching hexagram drawn line by line with trigram glyphs, judgment, image, and a reading for every line: the oracle statement and what it asks of the querent. A cast highlights the moving lines and shows only their readings, plus the hexagram it transforms into",docsLabel:"I Ching",endpointLabel:"GET /iching/hexagrams/{number}, /iching/hexagrams/random, /iching/hexagrams/lookup, /iching/cast, POST /iching/daily, /iching/daily/cast",docsSummary:"Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram",topic:"I Ching"},{pascal:"RoxyCrystalCard",tag:"roxy-crystal-card",slug:"crystal-card",heading:"Crystal detail",description:"Single-crystal detail card with photo, spiritual, emotional, and physical meaning, metaphysical attributes, affirmation, and pairings; as a widget the visitor types a crystal name and picks it",docsLabel:"Crystals",endpointLabel:"GET /crystals/{id}",docsSummary:"Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings",topic:"Crystals"},{pascal:"RoxyCrystalGrid",tag:"roxy-crystal-grid",slug:"crystal-grid",heading:"Crystal grid",description:"Responsive crystal gallery with photo, name, and colour swatches from any crystals list response, filterable by chakra, zodiac sign, element, colour, and planet; a picked tile opens its crystal card in place",docsLabel:"Crystals",endpointLabel:"GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search",docsSummary:"Crystal gallery with chakra, zodiac, element, colour, and planet filters; a pick opens the card in place",topic:"Crystals"},{pascal:"RoxyDreamCard",tag:"roxy-dream-card",slug:"dream-card",heading:"Dream symbol",description:"Dream symbol card with the symbol name, full interpretation, and dictionary letter; as a widget the visitor types a symbol and picks it",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols/{id}",docsSummary:"Symbol name, interpretation body, and letter chip",topic:"Dreams"},{pascal:"RoxyDreamSearch",tag:"roxy-dream-search",slug:"dream-search",heading:"Dream search",description:"The dream dictionary as selectable tiles under a search box and an A to Z bar; a picked tile opens its dream card in place, and emits roxy-symbol-select for a host that pairs its own",docsLabel:"Dreams",endpointLabel:"GET /dreams/symbols",docsSummary:"The dream dictionary as tiles, browsed A to Z or searched; a pick opens the card in place",topic:"Dreams"},{pascal:"RoxyAngelNumberCard",tag:"roxy-angel-number-card",slug:"angel-number-card",heading:"Angel number",description:"Angel number card with title, core message, badges, keywords, life-area interpretations, affirmation, and action steps",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/numbers/{number}, POST /angel-numbers/daily",docsSummary:"Number meaning with spiritual, love, career, money, twin flame, biblical, and shadow sections",topic:"Angel Numbers"},{pascal:"RoxyAngelNumberLookup",tag:"roxy-angel-number-lookup",slug:"angel-number-lookup",heading:"Angel number lookup",description:"Angel number sequence analysis with pattern classification, the known meaning when present, and a digit-root fallback for any number",docsLabel:"Angel Numbers",endpointLabel:"GET /angel-numbers/lookup",docsSummary:"Pattern analysis plus known meaning and digit-root fallback",topic:"Angel Numbers"},{pascal:"RoxyReferenceCard",tag:"roxy-reference-card",slug:"reference-card",heading:"Reference card",description:"Glossary entry for any reference lookup: zodiac sign, planet meaning, rashi, I Ching trigram, Human Design gate or center, or numerology number",docsLabel:"Reference",endpointLabel:"GET /astrology/{signs,planet-meanings}/{id}, /vedic-astrology/{rashis,avasthas}/{id}, /iching/trigrams/{id}, /human-design/gates/{number}, /human-design/centers/{id}, /numerology/meanings/{number}",docsSummary:"Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup",topic:"Helpers"},{pascal:"RoxyEndpointForm",tag:"roxy-endpoint-form",slug:"endpoint-form",heading:"Schema-driven form",description:"Schema-driven form that emits roxy-submit with a validated payload",docsLabel:"Helper",endpointLabel:"Any endpoint, from the spec",docsSummary:"Schema-driven form, emits roxy-submit",topic:"Helpers",selfFetching:!0},{pascal:"RoxyLocationSearch",tag:"roxy-location-search",slug:"location-search",heading:"City search",description:"City search input with debounced /location/search calls",docsLabel:"Helper",endpointLabel:"GET /location/search",docsSummary:"Debounced city search input, emits roxy-location-select",topic:"Helpers",selfFetching:!0},{pascal:"RoxyData",tag:"roxy-data",slug:"data",heading:"Generic renderer",description:"Generic fallback renderer for any OpenAPI response shape",docsLabel:"Helper",endpointLabel:"Any response shape",docsSummary:"Generic fallback renderer for unknown shapes",topic:"Helpers",selfFetching:!0}];var DT=Dl.map(n=>n.slug);export{Dl as ROXY_COMPONENTS,DT as ROXY_UI_COMPONENTS,tl as ROXY_UI_VERSION,Ia as RoxyAlmanacDay,zr as RoxyAngelNumberCard,Or as RoxyAngelNumberLookup,Gr as RoxyArudhaPadas,Ha as RoxyAshtakavargaGrid,Ir as RoxyAspectsTable,Br as RoxyAstrocartographyMap,Hr as RoxyBaziChart,Kr as RoxyBhavChalitTable,qr as RoxyBhavaBalaTable,qa as RoxyBiorhythmChart,Wa as RoxyBodygraph,Xr as RoxyCharaKarakas,Jr as RoxyChoghadiyaGrid,Ja as RoxyCompatibilityCard,Qr as RoxyCompoundNumber,es as RoxyCrystalCard,Qa as RoxyCrystalGrid,wa as RoxyDashaTimeline,rs as RoxyData,tr as RoxyDivisionalChart,ar as RoxyDoshaCard,is as RoxyDoshaConstitution,os as RoxyDreamCard,ls as RoxyDreamSearch,pe as RoxyEndpointForm,sr as RoxyEphemerisTable,ds as RoxyFixedStars,nr as RoxyFlyingStarChart,hs as RoxyForecastDigest,ms as RoxyForecastTimeline,gs as RoxyGematria,us as RoxyGocharaTable,fs as RoxyGunaMilan,xs as RoxyHdConnection,bs as RoxyHdPenta,vs as RoxyHdTypeCard,Ls as RoxyHdVariables,$s as RoxyHeliacalTable,ws as RoxyHexagram,ks as RoxyHoraTable,Ca as RoxyHoroscopeCard,lr as RoxyKpChart,Ss as RoxyKpFinanceCard,Rs as RoxyKpPlanetsTable,Ts as RoxyKpRulingPlanets,cr as RoxyKuaCard,Ds as RoxyLocalSpaceCompass,Be as RoxyLocationSearch,Ms as RoxyLuckPillars,hr as RoxyMayanDaySign,gr as RoxyMoonPhase,_s as RoxyNakshatraCard,Da as RoxyNatalChart,ur as RoxyNumerologyCard,fr as RoxyPanchangTable,xr as RoxyPositionsTable,Os as RoxyProfectionCard,Gs as RoxyReferenceCard,Is as RoxyRelocationWheel,Fs as RoxyShadbalaTable,Bs as RoxySynastryChart,vr as RoxyTarotCard,Lr as RoxyTarotCatalog,$r as RoxyTarotSpread,ua as RoxyTransitWheel,wr as RoxyTransitsTable,js as RoxyUpagrahaTable,kr as RoxyVastuMandala,Ks as RoxyVedicAspects,Vs as RoxyVedicDaily,ba as RoxyVedicKundli,qs as RoxyVedicPlanetsTable,Ns as RoxyWesternPlanetsTable,Sr as RoxyYogaList,Rr as RoxyZodiacCard,Hh as componentForTool,Jn as expandCompact,om as roxyDataScript,ud as serializeRoxyData};