@roxyapi/ui 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/AGENTS.md +19 -1
  2. package/README.md +39 -0
  3. package/THEMING.md +2 -0
  4. package/components-catalog.json +1 -1
  5. package/dist/cdn/components/almanac-day.js +3 -3
  6. package/dist/cdn/components/angel-number-card.js +1 -1
  7. package/dist/cdn/components/angel-number-lookup.js +1 -1
  8. package/dist/cdn/components/arudha-padas.js +2 -2
  9. package/dist/cdn/components/ashtakavarga-grid.js +3 -3
  10. package/dist/cdn/components/aspects-table.js +1 -1
  11. package/dist/cdn/components/astrocartography-map.js +4 -4
  12. package/dist/cdn/components/bazi-chart.js +2 -2
  13. package/dist/cdn/components/bhav-chalit-table.js +2 -2
  14. package/dist/cdn/components/bhava-bala-table.js +2 -2
  15. package/dist/cdn/components/biorhythm-chart.js +2 -2
  16. package/dist/cdn/components/bodygraph.js +3 -3
  17. package/dist/cdn/components/chara-karakas.js +2 -2
  18. package/dist/cdn/components/choghadiya-grid.js +1 -1
  19. package/dist/cdn/components/compatibility-card.js +2 -2
  20. package/dist/cdn/components/compound-number.js +3 -3
  21. package/dist/cdn/components/crystal-card.js +1 -1
  22. package/dist/cdn/components/crystal-grid.js +2 -2
  23. package/dist/cdn/components/dasha-timeline.js +2 -2
  24. package/dist/cdn/components/data.js +1 -1
  25. package/dist/cdn/components/divisional-chart.js +4 -4
  26. package/dist/cdn/components/dosha-card.js +2 -2
  27. package/dist/cdn/components/dosha-constitution.js +2 -2
  28. package/dist/cdn/components/dream-card.js +3 -3
  29. package/dist/cdn/components/dream-search.js +2 -2
  30. package/dist/cdn/components/endpoint-form.js +2 -2
  31. package/dist/cdn/components/ephemeris-table.js +2 -2
  32. package/dist/cdn/components/fixed-stars.js +3 -3
  33. package/dist/cdn/components/flying-star-chart.js +2 -2
  34. package/dist/cdn/components/forecast-digest.js +3 -3
  35. package/dist/cdn/components/forecast-timeline.js +3 -3
  36. package/dist/cdn/components/gematria.js +3 -3
  37. package/dist/cdn/components/gochara-table.js +3 -3
  38. package/dist/cdn/components/guna-milan.js +3 -3
  39. package/dist/cdn/components/hd-connection.js +2 -2
  40. package/dist/cdn/components/hd-penta.js +16 -16
  41. package/dist/cdn/components/hd-type-card.js +3 -3
  42. package/dist/cdn/components/hd-variables.js +1 -1
  43. package/dist/cdn/components/heliacal-table.js +3 -3
  44. package/dist/cdn/components/hexagram.js +1 -1
  45. package/dist/cdn/components/hora-table.js +3 -3
  46. package/dist/cdn/components/horoscope-card.js +2 -2
  47. package/dist/cdn/components/kp-chart.js +3 -3
  48. package/dist/cdn/components/kp-finance-card.js +2 -2
  49. package/dist/cdn/components/kp-planets-table.js +2 -2
  50. package/dist/cdn/components/kp-ruling-planets.js +3 -3
  51. package/dist/cdn/components/kua-card.js +2 -2
  52. package/dist/cdn/components/local-space-compass.js +4 -4
  53. package/dist/cdn/components/location-search.js +1 -1
  54. package/dist/cdn/components/luck-pillars.js +3 -3
  55. package/dist/cdn/components/mayan-day-sign.js +3 -3
  56. package/dist/cdn/components/moon-phase.js +2 -2
  57. package/dist/cdn/components/nakshatra-card.js +3 -3
  58. package/dist/cdn/components/natal-chart.js +10 -10
  59. package/dist/cdn/components/numerology-card.js +2 -2
  60. package/dist/cdn/components/panchang-table.js +2 -2
  61. package/dist/cdn/components/positions-table.js +3 -3
  62. package/dist/cdn/components/profection-card.js +3 -3
  63. package/dist/cdn/components/reference-card.js +3 -3
  64. package/dist/cdn/components/relocation-wheel.js +11 -11
  65. package/dist/cdn/components/report.js +50 -0
  66. package/dist/cdn/components/shadbala-table.js +2 -2
  67. package/dist/cdn/components/synastry-chart.js +6 -6
  68. package/dist/cdn/components/tarot-card.js +2 -2
  69. package/dist/cdn/components/tarot-catalog.js +2 -2
  70. package/dist/cdn/components/tarot-spread.js +2 -2
  71. package/dist/cdn/components/transit-wheel.js +1 -1
  72. package/dist/cdn/components/transits-table.js +2 -2
  73. package/dist/cdn/components/upagraha-table.js +3 -3
  74. package/dist/cdn/components/vastu-mandala.js +5 -5
  75. package/dist/cdn/components/vedic-aspects.js +3 -3
  76. package/dist/cdn/components/vedic-daily.js +2 -2
  77. package/dist/cdn/components/vedic-kundli.js +45 -45
  78. package/dist/cdn/components/vedic-planets-table.js +1 -1
  79. package/dist/cdn/components/western-planets-table.js +2 -2
  80. package/dist/cdn/components/yoga-list.js +1 -1
  81. package/dist/cdn/components/zodiac-card.js +3 -3
  82. package/dist/cdn/locales/de.js +1 -1
  83. package/dist/cdn/locales/es.js +1 -1
  84. package/dist/cdn/locales/fr.js +1 -1
  85. package/dist/cdn/locales/hi.js +1 -1
  86. package/dist/cdn/locales/pt.js +1 -1
  87. package/dist/cdn/locales/ru.js +1 -1
  88. package/dist/cdn/locales/tr.js +1 -1
  89. package/dist/cdn/roxy-ui.js +84 -84
  90. package/dist/cdn/widgets.js +1 -1
  91. package/dist/components/almanac-day.js +1 -1
  92. package/dist/components/angel-number-card.js +1 -1
  93. package/dist/components/angel-number-lookup.js +1 -1
  94. package/dist/components/arudha-padas.js +1 -1
  95. package/dist/components/ashtakavarga-grid.js +1 -1
  96. package/dist/components/aspects-table.js +1 -1
  97. package/dist/components/astrocartography-map.js +2 -2
  98. package/dist/components/bazi-chart.js +1 -1
  99. package/dist/components/bhav-chalit-table.js +1 -1
  100. package/dist/components/bhava-bala-table.js +1 -1
  101. package/dist/components/biorhythm-chart.js +1 -1
  102. package/dist/components/bodygraph.js +2 -2
  103. package/dist/components/chara-karakas.js +1 -1
  104. package/dist/components/choghadiya-grid.js +1 -1
  105. package/dist/components/compatibility-card.js +1 -1
  106. package/dist/components/compound-number.js +1 -1
  107. package/dist/components/crystal-card.js +1 -1
  108. package/dist/components/crystal-grid.js +1 -1
  109. package/dist/components/dasha-timeline.js +1 -1
  110. package/dist/components/data.js +1 -1
  111. package/dist/components/divisional-chart.js +8 -8
  112. package/dist/components/dosha-card.js +1 -1
  113. package/dist/components/dosha-constitution.js +1 -1
  114. package/dist/components/dream-card.js +1 -1
  115. package/dist/components/dream-search.js +1 -1
  116. package/dist/components/endpoint-form.js +1 -1
  117. package/dist/components/ephemeris-table.js +1 -1
  118. package/dist/components/fixed-stars.js +1 -1
  119. package/dist/components/flying-star-chart.js +1 -1
  120. package/dist/components/forecast-digest.js +1 -1
  121. package/dist/components/forecast-timeline.js +1 -1
  122. package/dist/components/gematria.js +1 -1
  123. package/dist/components/gochara-table.js +1 -1
  124. package/dist/components/guna-milan.js +1 -1
  125. package/dist/components/hd-connection.js +3 -3
  126. package/dist/components/hd-penta.js +1 -1
  127. package/dist/components/hd-type-card.js +1 -1
  128. package/dist/components/hd-variables.js +1 -1
  129. package/dist/components/heliacal-table.js +1 -1
  130. package/dist/components/hexagram.js +1 -1
  131. package/dist/components/hora-table.js +1 -1
  132. package/dist/components/horoscope-card.js +1 -1
  133. package/dist/components/kp-chart.js +1 -1
  134. package/dist/components/kp-finance-card.js +1 -1
  135. package/dist/components/kp-planets-table.js +1 -1
  136. package/dist/components/kp-ruling-planets.js +1 -1
  137. package/dist/components/kua-card.js +1 -1
  138. package/dist/components/local-space-compass.js +3 -3
  139. package/dist/components/location-search.js +1 -1
  140. package/dist/components/luck-pillars.js +1 -1
  141. package/dist/components/mayan-day-sign.js +1 -1
  142. package/dist/components/moon-phase.js +1 -1
  143. package/dist/components/nakshatra-card.js +1 -1
  144. package/dist/components/natal-chart.js +1 -1
  145. package/dist/components/numerology-card.js +1 -1
  146. package/dist/components/panchang-table.js +1 -1
  147. package/dist/components/positions-table.js +1 -1
  148. package/dist/components/profection-card.js +1 -1
  149. package/dist/components/reference-card.js +1 -1
  150. package/dist/components/relocation-wheel.js +10 -10
  151. package/dist/components/report.d.ts +61 -0
  152. package/dist/components/report.js +1 -0
  153. package/dist/components/shadbala-table.js +1 -1
  154. package/dist/components/synastry-chart.js +4 -4
  155. package/dist/components/tarot-card.js +1 -1
  156. package/dist/components/tarot-catalog.js +1 -1
  157. package/dist/components/tarot-spread.js +1 -1
  158. package/dist/components/transit-wheel.js +7 -7
  159. package/dist/components/transits-table.js +1 -1
  160. package/dist/components/upagraha-table.js +1 -1
  161. package/dist/components/vastu-mandala.js +4 -4
  162. package/dist/components/vedic-aspects.js +1 -1
  163. package/dist/components/vedic-daily.js +1 -1
  164. package/dist/components/vedic-kundli.js +1 -1
  165. package/dist/components/vedic-planets-table.js +1 -1
  166. package/dist/components/western-planets-table.js +1 -1
  167. package/dist/components/yoga-list.js +1 -1
  168. package/dist/components/zodiac-card.js +1 -1
  169. package/dist/forms/labels/de.json +1 -1
  170. package/dist/forms/labels/en.json +1 -1
  171. package/dist/forms/labels/es.json +1 -1
  172. package/dist/forms/labels/fr.json +1 -1
  173. package/dist/forms/labels/hi.json +1 -1
  174. package/dist/forms/labels/pt.json +1 -1
  175. package/dist/forms/labels/ru.json +1 -1
  176. package/dist/forms/labels/tr.json +1 -1
  177. package/dist/forms.json +1 -1
  178. package/dist/generated/endpoint-defaults.d.ts +1 -0
  179. package/dist/i18n/chrome-strings.d.ts +1 -1
  180. package/dist/index.cjs +83 -83
  181. package/dist/index.d.ts +1 -0
  182. package/dist/index.js +85 -85
  183. package/dist/locales/de.js +1 -1
  184. package/dist/locales/es.js +1 -1
  185. package/dist/locales/fr.js +1 -1
  186. package/dist/locales/hi.js +1 -1
  187. package/dist/locales/pt.js +1 -1
  188. package/dist/locales/ru.js +1 -1
  189. package/dist/locales/tr.js +1 -1
  190. package/dist/manifest.json +1 -1
  191. package/dist/schemas/post--reports-bazi.json +1 -0
  192. package/dist/schemas/post--reports-human-design.json +1 -0
  193. package/dist/schemas/post--reports-kundli.json +1 -0
  194. package/dist/schemas/post--reports-matchmaking.json +1 -0
  195. package/dist/schemas/post--reports-natal.json +1 -0
  196. package/dist/schemas/post--reports-numerology.json +1 -0
  197. package/dist/schemas/post--reports-synastry.json +1 -0
  198. package/dist/schemas/post--reports-tarot.json +1 -0
  199. package/dist/schemas/post--reports-yearly-forecast.json +1 -0
  200. package/dist/tool-component.cjs +1 -1
  201. package/dist/tool-component.js +1 -1
  202. package/dist/types/index.d.ts +1 -1
  203. package/dist/types/types.gen.d.ts +17614 -15166
  204. package/dist/utils/brand.d.ts +3 -0
  205. package/dist/utils/object-url.d.ts +17 -0
  206. package/dist/version.d.ts +1 -1
  207. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- var RoxyUI_bhava_bala_table=(()=>{var H=Object.defineProperty;var St=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ke=Object.prototype.hasOwnProperty;var Ae=(n,t)=>{for(var e in t)H(n,e,{get:t[e],enumerable:true})},_e=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Te(t))!ke.call(n,o)&&o!==e&&H(n,o,{get:()=>t[o],enumerable:!(r=St(t,o))||r.enumerable});return n};var Ce=n=>_e(H({},"__esModule",{value:true}),n),h=(n,t,e,r)=>{for(var o=r>1?void 0:r?St(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(o=(r?i(t,e,o):i(o))||o);return r&&o&&H(t,e,o),o};var mr={};Ae(mr,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyBhavaBalaTable:()=>R,injectRoxyTokens:()=>X});var K=globalThis,z=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol(),wt=new WeakMap,U=class{constructor(t,e,r){if(this._$cssResult$=true,r!==st)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(z&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=wt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&wt.set(e,t))}return t}toString(){return this.cssText}},Et=n=>new U(typeof n=="string"?n:n+"",void 0,st),g=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((r,o,s)=>r+(i=>{if(i._$cssResult$===true)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[s+1],n[0]);return new U(e,n,st)},$t=(n,t)=>{if(z)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=K.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},it=z?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Et(e)})(n):n;var{is:Re,defineProperty:Fe,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:Pe,getOwnPropertySymbols:Ue,getPrototypeOf:Le}=Object,q=globalThis,Tt=q.trustedTypes,Ne=Tt?Tt.emptyScript:"",De=q.reactiveElementPolyfillSupport,L=(n,t)=>n,N={toAttribute(n,t){switch(t){case Boolean:n=n?Ne:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Y=(n,t)=>!Re(n,t),kt={attribute:true,type:String,converter:N,reflect:false,useDefault:false,hasChanged:Y};Symbol.metadata??=Symbol("metadata"),q.litPropertyMetadata??=new WeakMap;var v=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=kt){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),o=this.getPropertyDescriptor(t,r,e);o!==void 0&&Fe(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:s}=Oe(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let d=o?.call(this);s?.call(this,i),this.requestUpdate(t,d,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??kt}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;let t=Le(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(L("properties"))){let e=this.properties,r=[...Pe(e),...Ue(e)];for(let o of r)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,o]of e)this.elementProperties.set(r,o)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let o=this._$Eu(e,r);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let o of r)e.unshift(it(o))}else t!==void 0&&e.push(it(t));return e}static _$Eu(t,e){let r=e.attribute;return r===false?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $t(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,r);if(o!==void 0&&r.reflect===true){let s=(r.converter?.toAttribute!==void 0?r.converter:N).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,o=r._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=r.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:N;this._$Em=o;let d=i.fromAttribute(e,s.type);this[o]=d??this._$Ej?.get(o)??d,this._$Em=null}}requestUpdate(t,e,r,o=false,s){if(t!==void 0){let i=this.constructor;if(o===false&&(s=this[t]),r??=i.getPropertyOptions(t),!((r.hasChanged??Y)(s,e)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:o,wrapped:s},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==true||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),o===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,s]of r){let{wrapped:i}=s,d=this[o];i!==true||this._$AL.has(o)||d===void 0||this.C(o,void 0,s,d)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=false,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[L("elementProperties")]=new Map,v[L("finalized")]=new Map,De?.({ReactiveElement:v}),(q.reactiveElementVersions??=[]).push("2.1.2");var ut=globalThis,At=n=>n,V=ut.trustedTypes,_t=V?V.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ut="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,Lt="?"+w,Ie=`<${Lt}>`,k=document,I=()=>k.createComment(""),j=n=>n===null||typeof n!="object"&&typeof n!="function",mt=Array.isArray,je=n=>mt(n)||typeof n?.[Symbol.iterator]=="function",at=`[
1
+ var RoxyUI_bhava_bala_table=(()=>{var H=Object.defineProperty;var St=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ke=Object.prototype.hasOwnProperty;var Ae=(n,t)=>{for(var e in t)H(n,e,{get:t[e],enumerable:true})},_e=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Te(t))!ke.call(n,o)&&o!==e&&H(n,o,{get:()=>t[o],enumerable:!(r=St(t,o))||r.enumerable});return n};var Ce=n=>_e(H({},"__esModule",{value:true}),n),h=(n,t,e,r)=>{for(var o=r>1?void 0:r?St(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(o=(r?i(t,e,o):i(o))||o);return r&&o&&H(t,e,o),o};var mr={};Ae(mr,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyBhavaBalaTable:()=>R,injectRoxyTokens:()=>X});var K=globalThis,z=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol(),wt=new WeakMap,U=class{constructor(t,e,r){if(this._$cssResult$=true,r!==st)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(z&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=wt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&wt.set(e,t))}return t}toString(){return this.cssText}},Et=n=>new U(typeof n=="string"?n:n+"",void 0,st),g=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((r,o,s)=>r+(i=>{if(i._$cssResult$===true)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[s+1],n[0]);return new U(e,n,st)},$t=(n,t)=>{if(z)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=K.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},it=z?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Et(e)})(n):n;var{is:Re,defineProperty:Oe,getOwnPropertyDescriptor:Pe,getOwnPropertyNames:Fe,getOwnPropertySymbols:Ue,getPrototypeOf:Le}=Object,q=globalThis,Tt=q.trustedTypes,Ne=Tt?Tt.emptyScript:"",De=q.reactiveElementPolyfillSupport,L=(n,t)=>n,N={toAttribute(n,t){switch(t){case Boolean:n=n?Ne:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Y=(n,t)=>!Re(n,t),kt={attribute:true,type:String,converter:N,reflect:false,useDefault:false,hasChanged:Y};Symbol.metadata??=Symbol("metadata"),q.litPropertyMetadata??=new WeakMap;var v=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=kt){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),o=this.getPropertyDescriptor(t,r,e);o!==void 0&&Oe(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:s}=Pe(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let d=o?.call(this);s?.call(this,i),this.requestUpdate(t,d,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??kt}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;let t=Le(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(L("properties"))){let e=this.properties,r=[...Fe(e),...Ue(e)];for(let o of r)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,o]of e)this.elementProperties.set(r,o)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let o=this._$Eu(e,r);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let o of r)e.unshift(it(o))}else t!==void 0&&e.push(it(t));return e}static _$Eu(t,e){let r=e.attribute;return r===false?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $t(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,r);if(o!==void 0&&r.reflect===true){let s=(r.converter?.toAttribute!==void 0?r.converter:N).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,o=r._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=r.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:N;this._$Em=o;let d=i.fromAttribute(e,s.type);this[o]=d??this._$Ej?.get(o)??d,this._$Em=null}}requestUpdate(t,e,r,o=false,s){if(t!==void 0){let i=this.constructor;if(o===false&&(s=this[t]),r??=i.getPropertyOptions(t),!((r.hasChanged??Y)(s,e)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:o,wrapped:s},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==true||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),o===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,s]of r){let{wrapped:i}=s,d=this[o];i!==true||this._$AL.has(o)||d===void 0||this.C(o,void 0,s,d)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=false,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[L("elementProperties")]=new Map,v[L("finalized")]=new Map,De?.({ReactiveElement:v}),(q.reactiveElementVersions??=[]).push("2.1.2");var ut=globalThis,At=n=>n,V=ut.trustedTypes,_t=V?V.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ut="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,Lt="?"+w,Ie=`<${Lt}>`,k=document,I=()=>k.createComment(""),j=n=>n===null||typeof n!="object"&&typeof n!="function",mt=Array.isArray,je=n=>mt(n)||typeof n?.[Symbol.iterator]=="function",at=`[
2
2
  \f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ct=/-->/g,Rt=/>/g,$=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,Ot=/"/g,Nt=/^(?:script|style|textarea|title)$/i,yt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),c=yt(1),vr=yt(2),Sr=yt(3),A=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Pt=new WeakMap,T=k.createTreeWalker(k,129);function Dt(n,t){if(!mt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return _t!==void 0?_t.createHTML(t):t}var Be=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=D;for(let d=0;d<e;d++){let a=n[d],y,u,m=-1,b=0;for(;b<a.length&&(i.lastIndex=b,u=i.exec(a),u!==null);)b=i.lastIndex,i===D?u[1]==="!--"?i=Ct:u[1]!==void 0?i=Rt:u[2]!==void 0?(Nt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=$):u[3]!==void 0&&(i=$):i===$?u[0]===">"?(i=o??D,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?$:u[3]==='"'?Ot:Ft):i===Ot||i===Ft?i=$:i===Ct||i===Rt?i=D:(i=$,o=void 0);let S=i===$&&n[d+1].startsWith("/>")?" ":"";s+=i===D?a+Ie:m>=0?(r.push(y),a.slice(0,m)+Ut+a.slice(m)+w+S):a+w+(m===-2?d:S)}return[Dt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},B=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[y,u]=Be(t,e);if(this.el=n.createElement(y,r),T.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=T.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Ut)){let b=u[i++],S=o.getAttribute(m).split(w),G=/([.?@])?(.*)/.exec(b);a.push({type:1,index:s,name:G[2],strings:S,ctor:G[1]==="."?lt:G[1]==="?"?ct:G[1]==="@"?pt:O}),o.removeAttribute(m)}else m.startsWith(w)&&(a.push({type:6,index:s}),o.removeAttribute(m));if(Nt.test(o.tagName)){let m=o.textContent.split(w),b=m.length-1;if(b>0){o.textContent=V?V.emptyScript:"";for(let S=0;S<b;S++)o.append(m[S],I()),T.nextNode(),a.push({type:2,index:++s});o.append(m[b],I())}}}else if(o.nodeType===8)if(o.data===Lt)a.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)a.push({type:7,index:s}),m+=w.length-1}s++}}static createElement(t,e){let r=k.createElement("template");return r.innerHTML=t,r}};function F(n,t,e=n,r){if(t===A)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=j(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=F(n,o._$AS(n,t.values),o,r)),t}var dt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??k).importNode(e,true);T.currentNode=o;let s=T.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let y;a.type===2?y=new M(s,s.nextSibling,this,t):a.type===1?y=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(y=new ht(s,this,t)),this._$AV.push(y),a=r[++d]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=k,o}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},M=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=F(this,t,e),j(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):je(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==l&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(k.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=B.createElement(Dt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new dt(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Pt.get(t.strings);return e===void 0&&Pt.set(t.strings,e=new B(t)),e}k(t){mt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let s of t)o===e.length?e.push(r=new n(this.O(I()),this.O(I()),this,this.options)):r=e[o],r._$AI(s),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let r=At(t).nextSibling;At(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},O=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=F(this,t,e,0),i=!j(t)||t!==this._$AH&&t!==A,i&&(this._$AH=t);else{let d=t,a,y;for(t=s[0],a=0;a<s.length-1;a++)y=F(this,d[r+a],e,a),y===A&&(y=this._$AH[a]),i||=!j(y)||y!==this._$AH[a],y===l?t=l:t!==l&&(t+=(y??"")+s[a+1]),this._$AH[a]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lt=class extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},ct=class extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},pt=class extends O{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=F(this,t,e,0)??l)===A)return;let r=this._$AH,o=t===l&&r!==l||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==l&&(r===l||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ht=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){F(this,t)}};var Me=ut.litHtmlPolyfillSupport;Me?.(B,M),(ut.litHtmlVersions??=[]).push("3.3.3");var It=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new M(t.insertBefore(I(),s),s,void 0,e??{})}return o._$AI(n),o};var ft=globalThis,E=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=It(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return A}};E._$litElement$=true,E.finalized=true,ft.litElementHydrateSupport?.({LitElement:E});var Ge=ft.litElementPolyfillSupport;Ge?.({LitElement:E});(ft.litElementVersions??=[]).push("4.2.2");var jt=[{endpoint:"vedic-astrology/bhava-bala",method:"POST"}];var He={attribute:true,type:String,converter:N,reflect:false,hasChanged:Y},Ke=(n=He,t,e)=>{let{kind:r,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),s.set(e.name,n),r==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,n,true,d)},init(d){return d!==void 0&&this.C(i,void 0,n,d),d}}}if(r==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,n,true,d)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?Ke(n,t,e):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}function x(n){return f({...n,state:true,attribute:false})}var _=n=>n??l;var Bt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function xt(n){if(n.lang)return n.lang;if(typeof document>"u")return;let t=n.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var ze={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function gt(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Mt(n,t=Bt){let e=xt(n);if(!e)return;let r=gt(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(d=>d==="hans"||d==="hant")??ze[o[1]??""];return i?gt(`zh-${i}`,t):void 0}return gt(s,t)}var qe={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},bt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Gt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ht='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Z={"fraunces-jost":{name:"Fraunces with Jost",sans:bt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:bt,display:bt},geist:{name:"Geist",sans:Gt,display:Gt},system:{name:"System",sans:Ht,display:Ht}};function Kt(n){let{sans:t,display:e}=Z[n];return Object.keys(qe).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var zt="1.2.0";var Ye=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Ve=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function qt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(Ye.exec(e.pathname)??Ve.exec(e.pathname))?.[1];if(r!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist`:`${e.origin}${r}`}var Qe={},We="color-mix(in oklab, var(--roxy-accent) 70%, black)",Ze="var(--roxy-accent)",Je="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Yt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Vt(n){return n!==void 0&&Object.hasOwn(Z,n)}function Wt(n){let t=[];return n.brandColor&&Yt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Yt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${We},${Ze})`,`--roxy-ring:${Je}`),t.join(";")}function Zt(n,t){if(Vt(t))return t;let e=n.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=n.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,d,a;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),d=u("--roxy-font-display"),a=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||d))return Vt(a)?a:void 0}function Jt(n){let{sans:t,display:e}=Z[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var Xe=qt(zt,globalThis.document?.currentScript?.src||Qe.url);function Xt(n,t=Xe){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${n}`;if(Kt(n).length===0||document.getElementById(e))return;let r=document.createElement("link");r.id=e,r.rel="stylesheet",r.href=`${t}/styles/fonts/${n}.css`,document.head.append(r)}var Qt='@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: initial;--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 J="roxy-ui-tokens";function X(){if(typeof document>"u")return null;let n=document.getElementById(J);if(n)return n;let t=document.createElement("style");return t.id=J,t.textContent=Qt,document.head.prepend(t),t}function te(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function ee(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var re="__ROXY_UI_I18N__";function ne(){let n=globalThis,t=n[re];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[re]=e,e}function tr(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function oe(n,t,e){return tr(er(n,t)??t,e)}function er(n,t){if(!n)return;let{catalogs:e}=ne(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[te(t)]}function se(n){let{listeners:t}=ne();return t.add(n),()=>{t.delete(n)}}var Q=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=se(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var tt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new Q(this)}connectedCallback(){super.connectedCallback(),X()}fontDeclarations(e){let r=Zt(this,e);return r?(Xt(r),Jt(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,r){return oe(this.effectiveLang(),e,r)}effectiveLang(){return xt(this)}};var ie=g`: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 rr=g`: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}`,et=[rr,ie];var nr="__cols",or="__rows";function sr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function rt(n){if(Array.isArray(n)){let s=false,i=n.map(d=>{let a=rt(d);return a!==d&&(s=true),a});return s?i:n}if(!sr(n))return n;let t=n[nr],e=n[or];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=rt(s[a])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let d=rt(i);d!==i&&(r=true),o[s]=d}return r?o:n}function ae(n){return rt(n)}function de(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var ir="pk_live_YOUR_KEY",le={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 ce(n){if(n)return n===ir?le.sample:n.startsWith("pk_")?void 0:le.secret}function pe(n,t,e={}){e.warn&&console.warn(t.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var he="https://roxyapi.com/api/v2";async function ar(n){try{let t=await n.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:false}}var ue={fromAttribute:n=>{if(n!=null){try{let t=JSON.parse(n);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},P=class extends Error{constructor(e,r=null,o=true,s,i){super(e);this.issues=r;this.worded=o;this.status=s;this.code=i}};function me(n){return n.submitUrl?void 0:ce(n.publishableKey)}async function vt(n,t,e){let r=me(n);if(r)throw new P(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:dr(t,n.submitContext),signal:e}):await lr(n,t,e);if(!o.ok){let s=await ar(o);throw new P(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function dr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function lr(n,t,e){let r=new URL(`${n.baseUrl??he}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return n.publishableKey&&(o["X-API-Key"]=n.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var nt=class{constructor(t){this.baseUrl=he;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=me(this);if(e){this.host.error=e.message,pe(this.host,e);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await vt(this,t,r.signal);if(r.signal.aborted)return;this.host.data=o}catch(o){if(r.signal.aborted||o?.name==="AbortError")return;o instanceof P&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof P&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=false)}}};function ye(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),i=new Set(r),d={},a={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?d[y]=u:a[y]=u);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function fe(){return c`<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 Wn=g`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 Qn=g`.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 ge(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${fe()} ${o.aside?c`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var cr="roxy-data";function pr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var ot=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(pr(t)&&t.classList.contains(cr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var p=class extends tt{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,r=this.listKey,o=this.listRows();if(!(!e||!r||!o)){this.moreLoading=true,this.moreError=null;try{let s=await vt(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[r];this.data={...this.data,...s,[r]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let r=this.selfFetch();if(!r)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(ye(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new ot(this),this.fetcher=new nt(this)}static{this.styles=[et]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ae(this.data);r!==this.data&&(this.data=r)}(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:de(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return c`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(r){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,r),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:r},bubbles:true,composed:true})),customElements.get("roxy-data")?c`<roxy-data .data="${e}" lang="${_(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),r=[Wt(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return l;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return c`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?l:ge(e,r,this.t(o??"Reading"))}renderResult(e){let r=c`<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()?c`${r}${this.renderAttribution()}`:r}renderWithForm(e){return c`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?l:e.length>=r?l:c`<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?c`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Mt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<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(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return c`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(this.specUrl)}" publishable-key="${_(this.publishableKey)}" location-url="${_(this.locationUrl)}" submit-label="${_(this.submitLabel)}" lang="${_(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 c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let r=!!this.selfFetch();if(r&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return r?c`${o}${this.renderForm()}`:o}renderErrorBanner(e){return c`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};h([f({attribute:false})],p.prototype,"data",2),h([f({type:String,attribute:"data-endpoint"})],p.prototype,"endpoint",2),h([f({type:String})],p.prototype,"method",2),h([f({type:String,attribute:"publishable-key"})],p.prototype,"publishableKey",2),h([f({type:String,attribute:"base-url"})],p.prototype,"baseUrl",2),h([f({type:String,attribute:"spec-url"})],p.prototype,"specUrl",2),h([f({type:String,attribute:"submit-url"})],p.prototype,"submitUrl",2),h([f({attribute:"submit-context",converter:ue})],p.prototype,"submitContext",2),h([f({type:String,attribute:"location-url"})],p.prototype,"locationUrl",2),h([f({type:Boolean})],p.prototype,"remember",2),h([f({type:Boolean,attribute:"hide-readings",reflect:true})],p.prototype,"hideReadings",2),h([f({type:String,attribute:"hide-sections",reflect:true})],p.prototype,"hideSections",2),h([f({type:String,attribute:"brand-color"})],p.prototype,"brandColor",2),h([f({type:String,attribute:"brand-accent"})],p.prototype,"brandAccent",2),h([f({type:String})],p.prototype,"font",2),h([f({type:String,attribute:"submit-label"})],p.prototype,"submitLabel",2),h([f({type:String,attribute:"error-message"})],p.prototype,"errorMessage",2),h([f({type:String})],p.prototype,"attribution",2),h([x()],p.prototype,"loading",2),h([x()],p.prototype,"error",2),h([x()],p.prototype,"issues",2),h([x()],p.prototype,"selfFetched",2),h([x()],p.prototype,"editing",2),h([x()],p.prototype,"sticky",2),h([x()],p.prototype,"openedRow",2),h([x()],p.prototype,"openedRowId",2),h([x()],p.prototype,"moreLoading",2),h([x()],p.prototype,"moreError",2);var xe=n=>t=>{customElements.get(n)||customElements.define(n,t)};var be=new Map;function hr(n){if(!n)return["en"];let t=be.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return be.set(n,e),[e,"en"]}function C(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(hr(n),{maximumFractionDigits:e})}var ur={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function ve(n,t,e){let r=typeof t=="string"?ur[t]??ee(t):"",o=typeof e=="number"?`${C(n,e,2)}\xB0`:"";return r&&o?`${r} (${o})`:r||o}var Se=g`.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 we(n,t,e){if(!t?.ayanamsa)return l;let r=ve(n,t.ayanamsa);if(!r)return l;let o=typeof t.ayanamsaDegrees=="number"?C(n,t.ayanamsaDegrees,4):void 0;return c`<p class="roxy-frame">${o===void 0?e("Sidereal frame: {{frame}}",{frame:r}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:r,degrees:o})}</p>`}function Ee(n,t){return!t||!n?.length?"":n.map(e=>t[String(e)]?.[0]).filter(Boolean).join(", ")}var $e=[{key:"bhavadhipatiBala",source:"Bhavadhipati",color:"var(--roxy-accent)"},{key:"digBala",source:"Dig",color:"var(--roxy-info)"},{key:"drishtiBala",source:"Drishti",color:"var(--roxy-success)"}],R=class extends p{renderData(t){let e=t.bhavas??[];if(!e.length)return this.renderEmpty();let r=Math.max(...e.map(o=>o.totalVirupas??0),1);return c`<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">${t.houseSystem?this.t("Twelve houses ranked by strength on the {{system}} frame",{system:t.houseSystem}):this.t("Twelve houses ranked by strength")}</p>${we(this.effectiveLang(),t.frame,this.translator)}</header><div class="rows" part="table" role="list">${e.map(o=>this.renderBhava(o,r,t.houseThemes))}</div><div class="legend" part="legend" aria-label="${this.t("Component legend")}">${$e.map(o=>c`<div class="legend-row"><span class="swatch" style="background:${o.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(o.source)})}</div>`)}</div></div>`}renderBhava(t,e,r){let o=typeof t.house=="number"?Ee([t.house],r):"";return c`<article class="row" role="listitem"><div class="row-top"><span class="house">${this.t("House {{n}}",{n:t.house})}</span> <span class="rashi">${t.rashi}</span> ${t.lord?c`<span class="lord">${this.t("lord {{graha}}",{graha:t.lord})}</span>`:l} <span class="total">${this.t("{{value}} rupas",{value:C(this.effectiveLang(),t.totalRupas,2)})} ${typeof t.rank=="number"?c`<span class="rank">#${t.rank}</span>`:l}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:C(this.effectiveLang(),t.totalVirupas,1)})}">${$e.map(s=>{let i=Math.max(0,t[s.key]??0);return i>0?c`<span class="seg" style="width:${i/e*100}%;background:${s.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(s.source),value:C(this.effectiveLang(),i,1)})}"></span>`:l})}</div>${o?c`<p class="themes">${o}</p>`:l}</article>`}};R.endpoints=jt,R.styles=[et,Se,g`.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}`],R=h([xe("roxy-bhava-bala-table")],R);return Ce(mr)})();/*! Bundled license information:
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ot=/'/g,Pt=/"/g,Nt=/^(?:script|style|textarea|title)$/i,yt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),c=yt(1),vr=yt(2),Sr=yt(3),A=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ft=new WeakMap,T=k.createTreeWalker(k,129);function Dt(n,t){if(!mt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return _t!==void 0?_t.createHTML(t):t}var Be=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=D;for(let d=0;d<e;d++){let a=n[d],y,u,m=-1,b=0;for(;b<a.length&&(i.lastIndex=b,u=i.exec(a),u!==null);)b=i.lastIndex,i===D?u[1]==="!--"?i=Ct:u[1]!==void 0?i=Rt:u[2]!==void 0?(Nt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=$):u[3]!==void 0&&(i=$):i===$?u[0]===">"?(i=o??D,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?$:u[3]==='"'?Pt:Ot):i===Pt||i===Ot?i=$:i===Ct||i===Rt?i=D:(i=$,o=void 0);let S=i===$&&n[d+1].startsWith("/>")?" ":"";s+=i===D?a+Ie:m>=0?(r.push(y),a.slice(0,m)+Ut+a.slice(m)+w+S):a+w+(m===-2?d:S)}return[Dt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},B=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[y,u]=Be(t,e);if(this.el=n.createElement(y,r),T.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=T.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Ut)){let b=u[i++],S=o.getAttribute(m).split(w),G=/([.?@])?(.*)/.exec(b);a.push({type:1,index:s,name:G[2],strings:S,ctor:G[1]==="."?lt:G[1]==="?"?ct:G[1]==="@"?pt:P}),o.removeAttribute(m)}else m.startsWith(w)&&(a.push({type:6,index:s}),o.removeAttribute(m));if(Nt.test(o.tagName)){let m=o.textContent.split(w),b=m.length-1;if(b>0){o.textContent=V?V.emptyScript:"";for(let S=0;S<b;S++)o.append(m[S],I()),T.nextNode(),a.push({type:2,index:++s});o.append(m[b],I())}}}else if(o.nodeType===8)if(o.data===Lt)a.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)a.push({type:7,index:s}),m+=w.length-1}s++}}static createElement(t,e){let r=k.createElement("template");return r.innerHTML=t,r}};function O(n,t,e=n,r){if(t===A)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=j(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=O(n,o._$AS(n,t.values),o,r)),t}var dt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??k).importNode(e,true);T.currentNode=o;let s=T.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let y;a.type===2?y=new M(s,s.nextSibling,this,t):a.type===1?y=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(y=new ht(s,this,t)),this._$AV.push(y),a=r[++d]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=k,o}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},M=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=O(this,t,e),j(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):je(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==l&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(k.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=B.createElement(Dt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new dt(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ft.get(t.strings);return e===void 0&&Ft.set(t.strings,e=new B(t)),e}k(t){mt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let s of t)o===e.length?e.push(r=new n(this.O(I()),this.O(I()),this,this.options)):r=e[o],r._$AI(s),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let r=At(t).nextSibling;At(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=O(this,t,e,0),i=!j(t)||t!==this._$AH&&t!==A,i&&(this._$AH=t);else{let d=t,a,y;for(t=s[0],a=0;a<s.length-1;a++)y=O(this,d[r+a],e,a),y===A&&(y=this._$AH[a]),i||=!j(y)||y!==this._$AH[a],y===l?t=l:t!==l&&(t+=(y??"")+s[a+1]),this._$AH[a]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lt=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},ct=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},pt=class extends P{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=O(this,t,e,0)??l)===A)return;let r=this._$AH,o=t===l&&r!==l||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==l&&(r===l||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ht=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}};var Me=ut.litHtmlPolyfillSupport;Me?.(B,M),(ut.litHtmlVersions??=[]).push("3.3.3");var It=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new M(t.insertBefore(I(),s),s,void 0,e??{})}return o._$AI(n),o};var ft=globalThis,E=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=It(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return A}};E._$litElement$=true,E.finalized=true,ft.litElementHydrateSupport?.({LitElement:E});var Ge=ft.litElementPolyfillSupport;Ge?.({LitElement:E});(ft.litElementVersions??=[]).push("4.2.2");var jt=[{endpoint:"vedic-astrology/bhava-bala",method:"POST"}];var He={attribute:true,type:String,converter:N,reflect:false,hasChanged:Y},Ke=(n=He,t,e)=>{let{kind:r,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),s.set(e.name,n),r==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,n,true,d)},init(d){return d!==void 0&&this.C(i,void 0,n,d),d}}}if(r==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,n,true,d)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?Ke(n,t,e):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}function x(n){return f({...n,state:true,attribute:false})}var _=n=>n??l;var Bt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function xt(n){if(n.lang)return n.lang;if(typeof document>"u")return;let t=n.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var ze={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function gt(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Mt(n,t=Bt){let e=xt(n);if(!e)return;let r=gt(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(d=>d==="hans"||d==="hant")??ze[o[1]??""];return i?gt(`zh-${i}`,t):void 0}return gt(s,t)}var qe={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},bt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Gt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ht='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Z={"fraunces-jost":{name:"Fraunces with Jost",sans:bt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:bt,display:bt},geist:{name:"Geist",sans:Gt,display:Gt},system:{name:"System",sans:Ht,display:Ht}};function Kt(n){let{sans:t,display:e}=Z[n];return Object.keys(qe).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var zt="1.3.0";var Ye=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Ve=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function qt(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(Ye.exec(e.pathname)??Ve.exec(e.pathname))?.[1];if(r!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist`:`${e.origin}${r}`}var Qe={},We="color-mix(in oklab, var(--roxy-accent) 70%, black)",Ze="var(--roxy-accent)",Je="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Yt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Vt(n){return n!==void 0&&Object.hasOwn(Z,n)}function Wt(n){let t=[];return n.brandColor&&Yt.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&Yt.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${We},${Ze})`,`--roxy-ring:${Je}`),t.join(";")}function Zt(n,t){if(Vt(t))return t;let e=n.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=n.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,d,a;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),d=u("--roxy-font-display"),a=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||d))return Vt(a)?a:void 0}function Jt(n){let{sans:t,display:e}=Z[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var Xe=qt(zt,globalThis.document?.currentScript?.src||Qe.url);function Xt(n,t=Xe){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${n}`;if(Kt(n).length===0||document.getElementById(e))return;let r=document.createElement("link");r.id=e,r.rel="stylesheet",r.href=`${t}/styles/fonts/${n}.css`,document.head.append(r)}var Qt='@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: initial;--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 J="roxy-ui-tokens";function X(){if(typeof document>"u")return null;let n=document.getElementById(J);if(n)return n;let t=document.createElement("style");return t.id=J,t.textContent=Qt,document.head.prepend(t),t}function te(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function ee(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var re="__ROXY_UI_I18N__";function ne(){let n=globalThis,t=n[re];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[re]=e,e}function tr(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function oe(n,t,e){return tr(er(n,t)??t,e)}function er(n,t){if(!n)return;let{catalogs:e}=ne(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[te(t)]}function se(n){let{listeners:t}=ne();return t.add(n),()=>{t.delete(n)}}var Q=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=se(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var tt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new Q(this)}connectedCallback(){super.connectedCallback(),X()}fontDeclarations(e){let r=Zt(this,e);return r?(Xt(r),Jt(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,r){return oe(this.effectiveLang(),e,r)}effectiveLang(){return xt(this)}};var ie=g`: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 rr=g`: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}`,et=[rr,ie];var nr="__cols",or="__rows";function sr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function rt(n){if(Array.isArray(n)){let s=false,i=n.map(d=>{let a=rt(d);return a!==d&&(s=true),a});return s?i:n}if(!sr(n))return n;let t=n[nr],e=n[or];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=rt(s[a])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let d=rt(i);d!==i&&(r=true),o[s]=d}return r?o:n}function ae(n){return rt(n)}function de(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var ir="pk_live_YOUR_KEY",le={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 ce(n){if(n)return n===ir?le.sample:n.startsWith("pk_")?void 0:le.secret}function pe(n,t,e={}){e.warn&&console.warn(t.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var he="https://roxyapi.com/api/v2";async function ar(n){try{let t=await n.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:false}}var ue={fromAttribute:n=>{if(n!=null){try{let t=JSON.parse(n);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},F=class extends Error{constructor(e,r=null,o=true,s,i){super(e);this.issues=r;this.worded=o;this.status=s;this.code=i}};function me(n){return n.submitUrl?void 0:ce(n.publishableKey)}async function vt(n,t,e){let r=me(n);if(r)throw new F(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:dr(t,n.submitContext),signal:e}):await lr(n,t,e);if(!o.ok){let s=await ar(o);throw new F(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function dr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function lr(n,t,e){let r=new URL(`${n.baseUrl??he}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return n.publishableKey&&(o["X-API-Key"]=n.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var nt=class{constructor(t){this.baseUrl=he;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=me(this);if(e){this.host.error=e.message,pe(this.host,e);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await vt(this,t,r.signal);if(r.signal.aborted)return;this.host.data=o}catch(o){if(r.signal.aborted||o?.name==="AbortError")return;o instanceof F&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof F&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=false)}}};function ye(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(y,u)=>{let m=o[u];return delete o[u],encodeURIComponent(String(m??""))}),i=new Set(r),d={},a={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?d[y]=u:a[y]=u);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function fe(){return c`<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 Wn=g`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 Qn=g`.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 ge(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${fe()} ${o.aside?c`<span class="interp-aside"><small>${o.aside}</small></span>`:l}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??l}</div></details>`)}</section>`}var cr="roxy-data";function pr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var ot=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(pr(t)&&t.classList.contains(cr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var p=class extends tt{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,r=this.listKey,o=this.listRows();if(!(!e||!r||!o)){this.moreLoading=true,this.moreError=null;try{let s=await vt(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[r];this.data={...this.data,...s,[r]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let r=this.selfFetch();if(!r)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(ye(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new ot(this),this.fetcher=new nt(this)}static{this.styles=[et]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ae(this.data);r!==this.data&&(this.data=r)}(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:de(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return c`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(r){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,r),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:r},bubbles:true,composed:true})),customElements.get("roxy-data")?c`<roxy-data .data="${e}" lang="${_(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),r=[Wt(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return l;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return c`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?l:ge(e,r,this.t(o??"Reading"))}renderResult(e){let r=c`<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()?c`${r}${this.renderAttribution()}`:r}renderWithForm(e){return c`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?c`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?l:e.length>=r?l:c`<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?c`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Mt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return c`<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(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return c`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${_(this.specUrl)}" publishable-key="${_(this.publishableKey)}" location-url="${_(this.locationUrl)}" submit-label="${_(this.submitLabel)}" lang="${_(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 c`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return c`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let r=!!this.selfFetch();if(r&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return r?c`${o}${this.renderForm()}`:o}renderErrorBanner(e){return c`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};h([f({attribute:false})],p.prototype,"data",2),h([f({type:String,attribute:"data-endpoint"})],p.prototype,"endpoint",2),h([f({type:String})],p.prototype,"method",2),h([f({type:String,attribute:"publishable-key"})],p.prototype,"publishableKey",2),h([f({type:String,attribute:"base-url"})],p.prototype,"baseUrl",2),h([f({type:String,attribute:"spec-url"})],p.prototype,"specUrl",2),h([f({type:String,attribute:"submit-url"})],p.prototype,"submitUrl",2),h([f({attribute:"submit-context",converter:ue})],p.prototype,"submitContext",2),h([f({type:String,attribute:"location-url"})],p.prototype,"locationUrl",2),h([f({type:Boolean})],p.prototype,"remember",2),h([f({type:Boolean,attribute:"hide-readings",reflect:true})],p.prototype,"hideReadings",2),h([f({type:String,attribute:"hide-sections",reflect:true})],p.prototype,"hideSections",2),h([f({type:String,attribute:"brand-color"})],p.prototype,"brandColor",2),h([f({type:String,attribute:"brand-accent"})],p.prototype,"brandAccent",2),h([f({type:String})],p.prototype,"font",2),h([f({type:String,attribute:"submit-label"})],p.prototype,"submitLabel",2),h([f({type:String,attribute:"error-message"})],p.prototype,"errorMessage",2),h([f({type:String})],p.prototype,"attribution",2),h([x()],p.prototype,"loading",2),h([x()],p.prototype,"error",2),h([x()],p.prototype,"issues",2),h([x()],p.prototype,"selfFetched",2),h([x()],p.prototype,"editing",2),h([x()],p.prototype,"sticky",2),h([x()],p.prototype,"openedRow",2),h([x()],p.prototype,"openedRowId",2),h([x()],p.prototype,"moreLoading",2),h([x()],p.prototype,"moreError",2);var xe=n=>t=>{customElements.get(n)||customElements.define(n,t)};var be=new Map;function hr(n){if(!n)return["en"];let t=be.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return be.set(n,e),[e,"en"]}function C(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(hr(n),{maximumFractionDigits:e})}var ur={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function ve(n,t,e){let r=typeof t=="string"?ur[t]??ee(t):"",o=typeof e=="number"?`${C(n,e,2)}\xB0`:"";return r&&o?`${r} (${o})`:r||o}var Se=g`.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 we(n,t,e){if(!t?.ayanamsa)return l;let r=ve(n,t.ayanamsa);if(!r)return l;let o=typeof t.ayanamsaDegrees=="number"?C(n,t.ayanamsaDegrees,4):void 0;return c`<p class="roxy-frame">${o===void 0?e("Sidereal frame: {{frame}}",{frame:r}):e("Sidereal frame: {{frame}}, {{degrees}}\xB0 subtracted",{frame:r,degrees:o})}</p>`}function Ee(n,t){return!t||!n?.length?"":n.map(e=>t[String(e)]?.[0]).filter(Boolean).join(", ")}var $e=[{key:"bhavadhipatiBala",source:"Bhavadhipati",color:"var(--roxy-accent)"},{key:"digBala",source:"Dig",color:"var(--roxy-info)"},{key:"drishtiBala",source:"Drishti",color:"var(--roxy-success)"}],R=class extends p{renderData(t){let e=t.bhavas??[];if(!e.length)return this.renderEmpty();let r=Math.max(...e.map(o=>o.totalVirupas??0),1);return c`<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">${t.houseSystem?this.t("Twelve houses ranked by strength on the {{system}} frame",{system:t.houseSystem}):this.t("Twelve houses ranked by strength")}</p>${we(this.effectiveLang(),t.frame,this.translator)}</header><div class="rows" part="table" role="list">${e.map(o=>this.renderBhava(o,r,t.houseThemes))}</div><div class="legend" part="legend" aria-label="${this.t("Component legend")}">${$e.map(o=>c`<div class="legend-row"><span class="swatch" style="background:${o.color}" aria-hidden="true"></span> ${this.t("{{component}} Bala",{component:this.t(o.source)})}</div>`)}</div></div>`}renderBhava(t,e,r){let o=typeof t.house=="number"?Ee([t.house],r):"";return c`<article class="row" role="listitem"><div class="row-top"><span class="house">${this.t("House {{n}}",{n:t.house})}</span> <span class="rashi">${t.rashi}</span> ${t.lord?c`<span class="lord">${this.t("lord {{graha}}",{graha:t.lord})}</span>`:l} <span class="total">${this.t("{{value}} rupas",{value:C(this.effectiveLang(),t.totalRupas,2)})} ${typeof t.rank=="number"?c`<span class="rank">#${t.rank}</span>`:l}</span></div><div class="bar" role="img" aria-label="${this.t("Bhava Bala {{value}} virupas",{value:C(this.effectiveLang(),t.totalVirupas,1)})}">${$e.map(s=>{let i=Math.max(0,t[s.key]??0);return i>0?c`<span class="seg" style="width:${i/e*100}%;background:${s.color}" title="${this.t("{{component}} {{value}} virupas",{component:this.t(s.source),value:C(this.effectiveLang(),i,1)})}"></span>`:l})}</div>${o?c`<p class="themes">${o}</p>`:l}</article>`}};R.endpoints=jt,R.styles=[et,Se,g`.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}`],R=h([xe("roxy-bhava-bala-table")],R);return Ce(mr)})();/*! Bundled license information:
4
4
 
5
5
  @lit/reactive-element/css-tag.js:
6
6
  (**
@@ -1,6 +1,6 @@
1
- var RoxyUI_biorhythm_chart=(()=>{var q=Object.defineProperty;var Ot=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var De=(n,t)=>{for(var e in t)q(n,e,{get:t[e],enumerable:true})},Ne=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Le(t))!Ue.call(n,o)&&o!==e&&q(n,o,{get:()=>t[o],enumerable:!(r=Ot(t,o))||r.enumerable});return n};var Ie=n=>Ne(q({},"__esModule",{value:true}),n),y=(n,t,e,r)=>{for(var o=r>1?void 0:r?Ot(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(o=(r?i(t,e,o):i(o))||o);return r&&o&&q(t,e,o),o};var _r={};De(_r,{ROXY_UI_TOKENS_STYLE_ID:()=>tt,RoxyBiorhythmChart:()=>T,injectRoxyTokens:()=>et});var Y=globalThis,V=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Pt=new WeakMap,D=class{constructor(t,e,r){if(this._$cssResult$=true,r!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(V&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Pt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Pt.set(e,t))}return t}toString(){return this.cssText}},Lt=n=>new D(typeof n=="string"?n:n+"",void 0,yt),g=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((r,o,s)=>r+(i=>{if(i._$cssResult$===true)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[s+1],n[0]);return new D(e,n,yt)},Ut=(n,t)=>{if(V)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=Y.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},mt=V?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Lt(e)})(n):n;var{is:Ge,defineProperty:je,getOwnPropertyDescriptor:Me,getOwnPropertyNames:He,getOwnPropertySymbols:Be,getPrototypeOf:ze}=Object,W=globalThis,Dt=W.trustedTypes,Ke=Dt?Dt.emptyScript:"",qe=W.reactiveElementPolyfillSupport,N=(n,t)=>n,I={toAttribute(n,t){switch(t){case Boolean:n=n?Ke:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Z=(n,t)=>!Ge(n,t),Nt={attribute:true,type:String,converter:I,reflect:false,useDefault:false,hasChanged:Z};Symbol.metadata??=Symbol("metadata"),W.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Nt){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),o=this.getPropertyDescriptor(t,r,e);o!==void 0&&je(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:s}=Me(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let d=o?.call(this);s?.call(this,i),this.requestUpdate(t,d,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Nt}static _$Ei(){if(this.hasOwnProperty(N("elementProperties")))return;let t=ze(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(N("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(N("properties"))){let e=this.properties,r=[...He(e),...Be(e)];for(let o of r)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,o]of e)this.elementProperties.set(r,o)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let o=this._$Eu(e,r);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let o of r)e.unshift(mt(o))}else t!==void 0&&e.push(mt(t));return e}static _$Eu(t,e){let r=e.attribute;return r===false?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ut(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,r);if(o!==void 0&&r.reflect===true){let s=(r.converter?.toAttribute!==void 0?r.converter:I).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,o=r._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=r.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:I;this._$Em=o;let d=i.fromAttribute(e,s.type);this[o]=d??this._$Ej?.get(o)??d,this._$Em=null}}requestUpdate(t,e,r,o=false,s){if(t!==void 0){let i=this.constructor;if(o===false&&(s=this[t]),r??=i.getPropertyOptions(t),!((r.hasChanged??Z)(s,e)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:o,wrapped:s},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==true||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),o===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,s]of r){let{wrapped:i}=s,d=this[o];i!==true||this._$AL.has(o)||d===void 0||this.C(o,void 0,s,d)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=false,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[N("elementProperties")]=new Map,w[N("finalized")]=new Map,qe?.({ReactiveElement:w}),(W.reactiveElementVersions??=[]).push("2.1.2");var wt=globalThis,It=n=>n,J=wt.trustedTypes,Gt=J?J.createPolicy("lit-html",{createHTML:n=>n}):void 0,Kt="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,qt="?"+$,Ye=`<${qt}>`,A=document,j=()=>A.createComment(""),M=n=>n===null||typeof n!="object"&&typeof n!="function",$t=Array.isArray,Ve=n=>$t(n)||typeof n?.[Symbol.iterator]=="function",ft=`[
1
+ var RoxyUI_biorhythm_chart=(()=>{var q=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var De=(n,t)=>{for(var e in t)q(n,e,{get:t[e],enumerable:true})},Ne=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Le(t))!Ue.call(n,o)&&o!==e&&q(n,o,{get:()=>t[o],enumerable:!(r=Pt(t,o))||r.enumerable});return n};var Ie=n=>Ne(q({},"__esModule",{value:true}),n),y=(n,t,e,r)=>{for(var o=r>1?void 0:r?Pt(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(o=(r?i(t,e,o):i(o))||o);return r&&o&&q(t,e,o),o};var _r={};De(_r,{ROXY_UI_TOKENS_STYLE_ID:()=>tt,RoxyBiorhythmChart:()=>T,injectRoxyTokens:()=>et});var Y=globalThis,V=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Ft=new WeakMap,D=class{constructor(t,e,r){if(this._$cssResult$=true,r!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(V&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Ft.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Ft.set(e,t))}return t}toString(){return this.cssText}},Lt=n=>new D(typeof n=="string"?n:n+"",void 0,yt),g=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((r,o,s)=>r+(i=>{if(i._$cssResult$===true)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[s+1],n[0]);return new D(e,n,yt)},Ut=(n,t)=>{if(V)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),o=Y.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,n.appendChild(r)}},mt=V?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Lt(e)})(n):n;var{is:Ge,defineProperty:je,getOwnPropertyDescriptor:Me,getOwnPropertyNames:He,getOwnPropertySymbols:ze,getPrototypeOf:Be}=Object,W=globalThis,Dt=W.trustedTypes,Ke=Dt?Dt.emptyScript:"",qe=W.reactiveElementPolyfillSupport,N=(n,t)=>n,I={toAttribute(n,t){switch(t){case Boolean:n=n?Ke:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Z=(n,t)=>!Ge(n,t),Nt={attribute:true,type:String,converter:I,reflect:false,useDefault:false,hasChanged:Z};Symbol.metadata??=Symbol("metadata"),W.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Nt){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),o=this.getPropertyDescriptor(t,r,e);o!==void 0&&je(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:s}=Me(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let d=o?.call(this);s?.call(this,i),this.requestUpdate(t,d,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Nt}static _$Ei(){if(this.hasOwnProperty(N("elementProperties")))return;let t=Be(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(N("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(N("properties"))){let e=this.properties,r=[...He(e),...ze(e)];for(let o of r)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,o]of e)this.elementProperties.set(r,o)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let o=this._$Eu(e,r);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let o of r)e.unshift(mt(o))}else t!==void 0&&e.push(mt(t));return e}static _$Eu(t,e){let r=e.attribute;return r===false?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ut(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,r);if(o!==void 0&&r.reflect===true){let s=(r.converter?.toAttribute!==void 0?r.converter:I).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,o=r._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=r.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:I;this._$Em=o;let d=i.fromAttribute(e,s.type);this[o]=d??this._$Ej?.get(o)??d,this._$Em=null}}requestUpdate(t,e,r,o=false,s){if(t!==void 0){let i=this.constructor;if(o===false&&(s=this[t]),r??=i.getPropertyOptions(t),!((r.hasChanged??Z)(s,e)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:o,wrapped:s},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==true||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),o===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,s]of r){let{wrapped:i}=s,d=this[o];i!==true||this._$AL.has(o)||d===void 0||this.C(o,void 0,s,d)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=false,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[N("elementProperties")]=new Map,w[N("finalized")]=new Map,qe?.({ReactiveElement:w}),(W.reactiveElementVersions??=[]).push("2.1.2");var wt=globalThis,It=n=>n,J=wt.trustedTypes,Gt=J?J.createPolicy("lit-html",{createHTML:n=>n}):void 0,Kt="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,qt="?"+$,Ye=`<${qt}>`,C=document,j=()=>C.createComment(""),M=n=>n===null||typeof n!="object"&&typeof n!="function",$t=Array.isArray,Ve=n=>$t(n)||typeof n?.[Symbol.iterator]=="function",ft=`[
2
2
  \f\r]`,G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,jt=/-->/g,Mt=/>/g,k=RegExp(`>|${ft}(?:([^\\s"'>=/]+)(${ft}*=${ft}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ht=/'/g,Bt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Et=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),l=Et(1),Tt=Et(2),Ur=Et(3),_=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),zt=new WeakMap,C=A.createTreeWalker(A,129);function Vt(n,t){if(!$t(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Gt!==void 0?Gt.createHTML(t):t}var We=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=G;for(let d=0;d<e;d++){let a=n[d],h,p,u=-1,b=0;for(;b<a.length&&(i.lastIndex=b,p=i.exec(a),p!==null);)b=i.lastIndex,i===G?p[1]==="!--"?i=jt:p[1]!==void 0?i=Mt:p[2]!==void 0?(Yt.test(p[2])&&(o=RegExp("</"+p[2],"g")),i=k):p[3]!==void 0&&(i=k):i===k?p[0]===">"?(i=o??G,u=-1):p[1]===void 0?u=-2:(u=i.lastIndex-p[2].length,h=p[1],i=p[3]===void 0?k:p[3]==='"'?Bt:Ht):i===Bt||i===Ht?i=k:i===jt||i===Mt?i=G:(i=k,o=void 0);let S=i===k&&n[d+1].startsWith("/>")?" ":"";s+=i===G?a+Ye:u>=0?(r.push(h),a.slice(0,u)+Kt+a.slice(u)+$+S):a+$+(u===-2?d:S)}return[Vt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},H=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[h,p]=We(t,e);if(this.el=n.createElement(h,r),C.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=C.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Kt)){let b=p[i++],S=o.getAttribute(u).split($),F=/([.?@])?(.*)/.exec(b);a.push({type:1,index:s,name:F[2],strings:S,ctor:F[1]==="."?xt:F[1]==="?"?bt:F[1]==="@"?vt:P}),o.removeAttribute(u)}else u.startsWith($)&&(a.push({type:6,index:s}),o.removeAttribute(u));if(Yt.test(o.tagName)){let u=o.textContent.split($),b=u.length-1;if(b>0){o.textContent=J?J.emptyScript:"";for(let S=0;S<b;S++)o.append(u[S],j()),C.nextNode(),a.push({type:2,index:++s});o.append(u[b],j())}}}else if(o.nodeType===8)if(o.data===qt)a.push({type:2,index:s});else{let u=-1;for(;(u=o.data.indexOf($,u+1))!==-1;)a.push({type:7,index:s}),u+=$.length-1}s++}}static createElement(t,e){let r=A.createElement("template");return r.innerHTML=t,r}};function O(n,t,e=n,r){if(t===_)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=M(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=O(n,o._$AS(n,t.values),o,r)),t}var gt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??A).importNode(e,true);C.currentNode=o;let s=C.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let h;a.type===2?h=new B(s,s.nextSibling,this,t):a.type===1?h=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(h=new St(s,this,t)),this._$AV.push(h),a=r[++d]}i!==a?.index&&(s=C.nextNode(),i++)}return C.currentNode=A,o}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},B=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=O(this,t,e),M(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==_&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ve(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=H.createElement(Vt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new gt(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=zt.get(t.strings);return e===void 0&&zt.set(t.strings,e=new H(t)),e}k(t){$t(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let s of t)o===e.length?e.push(r=new n(this.O(j()),this.O(j()),this,this.options)):r=e[o],r._$AI(s),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let r=It(t).nextSibling;It(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=O(this,t,e,0),i=!M(t)||t!==this._$AH&&t!==_,i&&(this._$AH=t);else{let d=t,a,h;for(t=s[0],a=0;a<s.length-1;a++)h=O(this,d[r+a],e,a),h===_&&(h=this._$AH[a]),i||=!M(h)||h!==this._$AH[a],h===c?t=c:t!==c&&(t+=(h??"")+s[a+1]),this._$AH[a]=h}i&&!o&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},xt=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},bt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},vt=class extends P{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=O(this,t,e,0)??c)===_)return;let r=this._$AH,o=t===c&&r!==c||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==c&&(r===c||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},St=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}};var Ze=wt.litHtmlPolyfillSupport;Ze?.(H,B),(wt.litHtmlVersions??=[]).push("3.3.3");var Wt=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new B(t.insertBefore(j(),s),s,void 0,e??{})}return o._$AI(n),o};var kt=globalThis,E=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Wt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return _}};E._$litElement$=true,E.finalized=true,kt.litElementHydrateSupport?.({LitElement:E});var Je=kt.litElementPolyfillSupport;Je?.({LitElement:E});(kt.litElementVersions??=[]).push("4.2.2");var Xe={attribute:true,type:String,converter:I,reflect:false,hasChanged:Z},Qe=(n=Xe,t,e)=>{let{kind:r,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),s.set(e.name,n),r==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,n,true,d)},init(d){return d!==void 0&&this.C(i,void 0,n,d),d}}}if(r==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,n,true,d)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?Qe(n,t,e):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}function v(n){return f({...n,state:true,attribute:false})}var Zt=[{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"}}];var R=n=>n??c;var Jt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function At(n){if(n.lang)return n.lang;if(typeof document>"u")return;let t=n.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var tr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function Ct(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Xt(n,t=Jt){let e=At(n);if(!e)return;let r=Ct(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(d=>d==="hans"||d==="hant")??tr[o[1]??""];return i?Ct(`zh-${i}`,t):void 0}return Ct(s,t)}var er={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},_t='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Qt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',te='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Q={"fraunces-jost":{name:"Fraunces with Jost",sans:_t,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:_t,display:_t},geist:{name:"Geist",sans:Qt,display:Qt},system:{name:"System",sans:te,display:te}};function ee(n){let{sans:t,display:e}=Q[n];return Object.keys(er).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var re="1.2.0";var rr=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,nr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function ne(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(rr.exec(e.pathname)??nr.exec(e.pathname))?.[1];if(r!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist`:`${e.origin}${r}`}var dr={},or="color-mix(in oklab, var(--roxy-accent) 70%, black)",sr="var(--roxy-accent)",ir="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",oe=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function se(n){return n!==void 0&&Object.hasOwn(Q,n)}function ie(n){let t=[];return n.brandColor&&oe.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&oe.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${or},${sr})`,`--roxy-ring:${ir}`),t.join(";")}function ae(n,t){if(se(t))return t;let e=n.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=n.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,d,a;try{let h=globalThis.getComputedStyle(n),p=u=>h.getPropertyValue(u).trim();i=p("--roxy-font-sans"),d=p("--roxy-font-display"),a=p("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||d))return se(a)?a:void 0}function de(n){let{sans:t,display:e}=Q[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ar=ne(re,globalThis.document?.currentScript?.src||dr.url);function ce(n,t=ar){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${n}`;if(ee(n).length===0||document.getElementById(e))return;let r=document.createElement("link");r.id=e,r.rel="stylesheet",r.href=`${t}/styles/fonts/${n}.css`,document.head.append(r)}var le='@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: initial;--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 tt="roxy-ui-tokens";function et(){if(typeof document>"u")return null;let n=document.getElementById(tt);if(n)return n;let t=document.createElement("style");return t.id=tt,t.textContent=le,document.head.prepend(t),t}function pe(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function z(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var he="__ROXY_UI_I18N__";function ue(){let n=globalThis,t=n[he];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[he]=e,e}function cr(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ye(n,t,e){return cr(lr(n,t)??t,e)}function lr(n,t){if(!n)return;let{catalogs:e}=ue(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[pe(t)]}function me(n){let{listeners:t}=ue();return t.add(n),()=>{t.delete(n)}}var rt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=me(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var nt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new rt(this)}connectedCallback(){super.connectedCallback(),et()}fontDeclarations(e){let r=ae(this,e);return r?(ce(r),de(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?l`<style>:host{${e}}</style>`:c}t(e,r){return ye(this.effectiveLang(),e,r)}effectiveLang(){return At(this)}};var fe=g`: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 pr=g`: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}`,ot=[pr,fe];var hr="__cols",ur="__rows";function yr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function st(n){if(Array.isArray(n)){let s=false,i=n.map(d=>{let a=st(d);return a!==d&&(s=true),a});return s?i:n}if(!yr(n))return n;let t=n[hr],e=n[ur];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=st(s[a])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let d=st(i);d!==i&&(r=true),o[s]=d}return r?o:n}function ge(n){return st(n)}function xe(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var mr="pk_live_YOUR_KEY",be={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 ve(n){if(n)return n===mr?be.sample:n.startsWith("pk_")?void 0:be.secret}function Se(n,t,e={}){e.warn&&console.warn(t.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var we="https://roxyapi.com/api/v2";async function fr(n){try{let t=await n.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:false}}var $e={fromAttribute:n=>{if(n!=null){try{let t=JSON.parse(n);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},L=class extends Error{constructor(e,r=null,o=true,s,i){super(e);this.issues=r;this.worded=o;this.status=s;this.code=i}};function Ee(n){return n.submitUrl?void 0:ve(n.publishableKey)}async function Rt(n,t,e){let r=Ee(n);if(r)throw new L(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:gr(t,n.submitContext),signal:e}):await xr(n,t,e);if(!o.ok){let s=await fr(o);throw new L(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function gr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function xr(n,t,e){let r=new URL(`${n.baseUrl??we}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return n.publishableKey&&(o["X-API-Key"]=n.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var it=class{constructor(t){this.baseUrl=we;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=Ee(this);if(e){this.host.error=e.message,Se(this.host,e);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await Rt(this,t,r.signal);if(r.signal.aborted)return;this.host.data=o}catch(o){if(r.signal.aborted||o?.name==="AbortError")return;o instanceof L&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof L&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=false)}}};function Te(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,p)=>{let u=o[p];return delete o[p],encodeURIComponent(String(u??""))}),i=new Set(r),d={},a={};for(let[h,p]of Object.entries(o))p===void 0||p===""||(t==="GET"||i.has(h)?d[h]=p:a[h]=p);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function at(){return l`<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 ke=g`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 Ce=g`.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 Ae(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?c:l`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>l`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${at()} ${o.aside?l`<span class="interp-aside"><small>${o.aside}</small></span>`:c}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??c}</div></details>`)}</section>`}var br="roxy-data";function vr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var dt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(vr(t)&&t.classList.contains(br))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var m=class extends nt{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,r=this.listKey,o=this.listRows();if(!(!e||!r||!o)){this.moreLoading=true,this.moreError=null;try{let s=await Rt(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[r];this.data={...this.data,...s,[r]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let r=this.selfFetch();if(!r)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(Te(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new dt(this),this.fetcher=new it(this)}static{this.styles=[ot]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ge(this.data);r!==this.data&&(this.data=r)}(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:xe(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return l`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(r){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,r),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:r},bubbles:true,composed:true})),customElements.get("roxy-data")?l`<roxy-data .data="${e}" lang="${R(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),r=[ie(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return c;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return l`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?c:Ae(e,r,this.t(o??"Reading"))}renderResult(e){let r=l`<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()?l`${r}${this.renderAttribution()}`:r}renderWithForm(e){return l`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?c:this.renderErrorBanner(this.error):this.data==null?c:this.showAttribution()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?c:e.length>=r?c:l`<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?l`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:c}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Xt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return l`<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(c):this.renderEmpty()}renderForm(){let e=this.selfFetch();return l`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${R(this.specUrl)}" publishable-key="${R(this.publishableKey)}" location-url="${R(this.locationUrl)}" submit-label="${R(this.submitLabel)}" lang="${R(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 l`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let r=!!this.selfFetch();if(r&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return r?l`${o}${this.renderForm()}`:o}renderErrorBanner(e){return l`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};y([f({attribute:false})],m.prototype,"data",2),y([f({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),y([f({type:String})],m.prototype,"method",2),y([f({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),y([f({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),y([f({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),y([f({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),y([f({attribute:"submit-context",converter:$e})],m.prototype,"submitContext",2),y([f({type:String,attribute:"location-url"})],m.prototype,"locationUrl",2),y([f({type:Boolean})],m.prototype,"remember",2),y([f({type:Boolean,attribute:"hide-readings",reflect:true})],m.prototype,"hideReadings",2),y([f({type:String,attribute:"hide-sections",reflect:true})],m.prototype,"hideSections",2),y([f({type:String,attribute:"brand-color"})],m.prototype,"brandColor",2),y([f({type:String,attribute:"brand-accent"})],m.prototype,"brandAccent",2),y([f({type:String})],m.prototype,"font",2),y([f({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),y([f({type:String,attribute:"error-message"})],m.prototype,"errorMessage",2),y([f({type:String})],m.prototype,"attribution",2),y([v()],m.prototype,"loading",2),y([v()],m.prototype,"error",2),y([v()],m.prototype,"issues",2),y([v()],m.prototype,"selfFetched",2),y([v()],m.prototype,"editing",2),y([v()],m.prototype,"sticky",2),y([v()],m.prototype,"openedRow",2),y([v()],m.prototype,"openedRowId",2),y([v()],m.prototype,"moreLoading",2),y([v()],m.prototype,"moreError",2);var K=["physical","emotional","intellectual","intuitive"],ct={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function U(n,t){let e=ct[n];return e?t(e):z(n)}var _e=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Re=g`.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}`;var Sr=/^\d{4}-\d{2}-\d{2}$/,wr=/^\d{4}-\d{2}$/,$r=/^\d{2}:\d{2}(:\d{2})?$/,Er=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Fe=new Map;function lt(n){if(!n)return["en"];let t=Fe.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Fe.set(n,e),[e,"en"]}function Tr(n,t){return n&&t?`${n} - ${t}`:n||t}function kr(n){let t=$r.test(n)?`1970-01-01T${n}`:Sr.test(n)?`${n}T00:00:00`:wr.test(n)?`${n}-01T00:00:00`:Er.test(n)?n.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(n)}}function x(n,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:r}=kr(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(lt(n),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function Ft(n,t,e){return Tr(x(n,t),x(n,e))}function pt(n,t){let e=t.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(lt(n),{style:"long",type:"conjunction"}).format(e)}function Oe(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(lt(n),{maximumFractionDigits:e})}function ht(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":(t/100).toLocaleString(lt(n),{style:"percent",maximumFractionDigits:e})}var ut={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)"},Cr={ascending:"ascending through zero",descending:"descending through zero"},Ar={double:"Double day",triple:"Triple day"},T=class extends m{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 r=e.quickRead??{},o=Object.entries(r).map(([i,d])=>{let a=typeof d=="number"?d:0,h=Math.abs(a)>1?a/100:a;return[i,h]}),s=e.spotlight;return l`<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?l`<span class="roxy-chip">${z(e.overallPhase)}</span>`:c} ${typeof e.energyRating=="number"?l`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:c}</div></header>${s?l`<div class="spotlight" part="details spotlight" style="${`border-inline-start-color: ${ut[s.cycle]??"var(--roxy-accent)"}`}"><p class="roxy-label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${U(s.cycle,i=>this.t(i))}</strong> ${typeof s.value=="number"?l`<span class="energy">${ht(this.effectiveLang(),s.value,0)}</span>`:c} ${s.phase?l`<span class="roxy-chip">${z(s.phase)}</span>`:c}</div>${s.message&&!this.hideReadings?l`<p>${s.message}</p>`:c}</div>`:c}<div class="bars" part="chart bars" role="list">${o.map(([i,d])=>{let a=Math.abs(d)*50,h=ut[i]??"var(--roxy-accent)";return l`<div class="bar" role="listitem"><span>${U(i,p=>this.t(p))}</span> <span class="track"><span class="fill ${d<0?"low":"high"}" style="width:${a}%;background:${h}"></span> </span><span class="value">${ht(this.effectiveLang(),d*100,0)}</span></div>`})}</div>${this.hideReadings?c:l`${e.dailyMessage?l`<p>${e.dailyMessage}</p>`:c} ${e.advice?l`<p>${e.advice}</p>`:c}`}</section>`}renderForecast(e){let r=e.days??[];if(r.length===0)return l`<div class="roxy-empty" role="status">${this.t("No forecast")}</div>`;let o=600,s=160,i=o/Math.max(r.length-1,1),d=e.summary;return l`<section class="wrap" part="card" aria-label="${this.t("Biorhythm forecast")}"><header class="head" part="header"><h2>${this.t("Forecast")}</h2><span class="energy">${Ft(this.effectiveLang(),e.startDate,e.endDate)}</span></header><svg viewBox="0 0 ${o} ${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="${o}" y2="${s/2}" stroke="var(--roxy-border)" stroke-width="1"/>${K.map(a=>{let h=r.map((u,b)=>{let S=u[a]??0,F=b*i,Pe=s/2-S/100*(s/2-8);return`${F.toFixed(2)},${Pe.toFixed(2)}`}).join(" "),p=ut[a]??"var(--roxy-secondary)";return Tt`<polyline points=${h} fill="none" stroke=${p} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${r.map((a,h)=>a.isCritical?Tt`<circle cx=${(h*i).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger)"><title>${[x(this.effectiveLang(),a.date),pt(this.effectiveLang(),(a.criticalCycles??[]).map(p=>U(p,u=>this.t(u)))),this.t("critical day"),typeof a.energyRating=="number"?this.t("Energy {{value}}/10",{value:a.energyRating}):""].filter(Boolean).join(" \xB7 ")}</title></circle>`:c)}</svg><div class="forecast-axis" part="legend"><span>${x(this.effectiveLang(),r[0]?.date)}</span><span>${x(this.effectiveLang(),r.at(-1)?.date)}</span></div><div class="legend" part="legend">${K.map(a=>l`<span class="key"><span class="dot" style="${`background: ${ut[a]}`}"></span>${this.t(ct[a])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${d?l`<dl class="roxy-facts" part="details">${this.stat(this.t("Best day"),x(this.effectiveLang(),d.bestDay))} ${this.stat(this.t("Worst day"),x(this.effectiveLang(),d.worstDay))} ${this.stat(this.t("Average energy"),typeof d.averageEnergy=="number"?`${d.averageEnergy}/10`:"")} ${this.stat(this.t("Critical days"),typeof d.criticalDayCount=="number"?`${d.criticalDayCount}`:"")}</dl>`:c} ${this.renderForecastData(e)} ${d?.periodAdvice&&!this.hideReadings?l`<p>${d.periodAdvice}</p>`:c}</section>`}renderForecastData(e){let r=this.effectiveLang();return l`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${at()}</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>${K.map(o=>l`<th scope="col">${this.t(ct[o])}</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(o=>l`<tr><th scope="row"><time datetime="${o.date}">${x(r,o.date)}</time></th>${K.map(s=>l`<td>${ht(r,o[s],2)}</td>`)}<td>${this.t("Energy {{value}}/10",{value:o.energyRating})}</td><td>${Oe(r,o.daysSinceBirth,0)}</td><td>${o.isCritical?pt(r,o.criticalCycles.map(s=>U(s,i=>this.t(i))))||this.t("critical day"):this.t("None")}</td></tr>`)}</tbody></table></div></details>`}renderCritical(e){let r=e.criticalDays??[],o=e.doubleCriticalDays??[],s=r.map(i=>({label:x(this.effectiveLang(),i.date)||i.date,aside:[i.cycle?U(i.cycle,d=>this.t(d)):"",this.severityName(i.severity)].filter(Boolean).join(" \xB7 "),body:i.advisory??"",extra:l`<p class="crit-meta">${[i.direction?this.t(Cr[i.direction]):"",typeof i.period=="number"?this.t("{{period}}-day cycle",{period:i.period}):""].filter(Boolean).join(" \xB7 ")}</p>`}));return l`<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">${Ft(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"),o.length?`${o.length}`:"0")} ${this.stat(this.t("Triple day"),e.tripleCriticalDay?x(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${o.length>0?l`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:pt(this.effectiveLang(),o.map(i=>x(this.effectiveLang(),i)||i))})}</p>`:c} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let r=Ar[e];return r?this.t(r):""}stat(e,r){return r?l`<div><dt>${e}</dt><dd>${r}</dd></div>`:c}};T.endpoints=Zt,T.styles=[ot,ke,Re,Ce,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: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)}`],y([f({type:String,reflect:true})],T.prototype,"mode",2),T=y([_e("roxy-biorhythm-chart")],T);return Ie(_r)})();/*! Bundled license information:
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ht=/'/g,zt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Et=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),l=Et(1),Tt=Et(2),Ur=Et(3),_=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Bt=new WeakMap,A=C.createTreeWalker(C,129);function Vt(n,t){if(!$t(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Gt!==void 0?Gt.createHTML(t):t}var We=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=G;for(let d=0;d<e;d++){let a=n[d],h,p,u=-1,b=0;for(;b<a.length&&(i.lastIndex=b,p=i.exec(a),p!==null);)b=i.lastIndex,i===G?p[1]==="!--"?i=jt:p[1]!==void 0?i=Mt:p[2]!==void 0?(Yt.test(p[2])&&(o=RegExp("</"+p[2],"g")),i=k):p[3]!==void 0&&(i=k):i===k?p[0]===">"?(i=o??G,u=-1):p[1]===void 0?u=-2:(u=i.lastIndex-p[2].length,h=p[1],i=p[3]===void 0?k:p[3]==='"'?zt:Ht):i===zt||i===Ht?i=k:i===jt||i===Mt?i=G:(i=k,o=void 0);let S=i===k&&n[d+1].startsWith("/>")?" ":"";s+=i===G?a+Ye:u>=0?(r.push(h),a.slice(0,u)+Kt+a.slice(u)+$+S):a+$+(u===-2?d:S)}return[Vt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},H=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[h,p]=We(t,e);if(this.el=n.createElement(h,r),A.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=A.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Kt)){let b=p[i++],S=o.getAttribute(u).split($),O=/([.?@])?(.*)/.exec(b);a.push({type:1,index:s,name:O[2],strings:S,ctor:O[1]==="."?xt:O[1]==="?"?bt:O[1]==="@"?vt:F}),o.removeAttribute(u)}else u.startsWith($)&&(a.push({type:6,index:s}),o.removeAttribute(u));if(Yt.test(o.tagName)){let u=o.textContent.split($),b=u.length-1;if(b>0){o.textContent=J?J.emptyScript:"";for(let S=0;S<b;S++)o.append(u[S],j()),A.nextNode(),a.push({type:2,index:++s});o.append(u[b],j())}}}else if(o.nodeType===8)if(o.data===qt)a.push({type:2,index:s});else{let u=-1;for(;(u=o.data.indexOf($,u+1))!==-1;)a.push({type:7,index:s}),u+=$.length-1}s++}}static createElement(t,e){let r=C.createElement("template");return r.innerHTML=t,r}};function P(n,t,e=n,r){if(t===_)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=M(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(n),o._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=P(n,o._$AS(n,t.values),o,r)),t}var gt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??C).importNode(e,true);A.currentNode=o;let s=A.nextNode(),i=0,d=0,a=r[0];for(;a!==void 0;){if(i===a.index){let h;a.type===2?h=new z(s,s.nextSibling,this,t):a.type===1?h=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(h=new St(s,this,t)),this._$AV.push(h),a=r[++d]}i!==a?.index&&(s=A.nextNode(),i++)}return A.currentNode=C,o}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},z=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=P(this,t,e),M(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==_&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ve(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=H.createElement(Vt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new gt(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Bt.get(t.strings);return e===void 0&&Bt.set(t.strings,e=new H(t)),e}k(t){$t(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let s of t)o===e.length?e.push(r=new n(this.O(j()),this.O(j()),this,this.options)):r=e[o],r._$AI(s),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let r=It(t).nextSibling;It(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},F=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,s){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(t,e=this,r,o){let s=this.strings,i=false;if(s===void 0)t=P(this,t,e,0),i=!M(t)||t!==this._$AH&&t!==_,i&&(this._$AH=t);else{let d=t,a,h;for(t=s[0],a=0;a<s.length-1;a++)h=P(this,d[r+a],e,a),h===_&&(h=this._$AH[a]),i||=!M(h)||h!==this._$AH[a],h===c?t=c:t!==c&&(t+=(h??"")+s[a+1]),this._$AH[a]=h}i&&!o&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},xt=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},bt=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},vt=class extends F{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=P(this,t,e,0)??c)===_)return;let r=this._$AH,o=t===c&&r!==c||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==c&&(r===c||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},St=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}};var Ze=wt.litHtmlPolyfillSupport;Ze?.(H,z),(wt.litHtmlVersions??=[]).push("3.3.3");var Wt=(n,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let s=e?.renderBefore??null;r._$litPart$=o=new z(t.insertBefore(j(),s),s,void 0,e??{})}return o._$AI(n),o};var kt=globalThis,E=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Wt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return _}};E._$litElement$=true,E.finalized=true,kt.litElementHydrateSupport?.({LitElement:E});var Je=kt.litElementPolyfillSupport;Je?.({LitElement:E});(kt.litElementVersions??=[]).push("4.2.2");var Xe={attribute:true,type:String,converter:I,reflect:false,hasChanged:Z},Qe=(n=Xe,t,e)=>{let{kind:r,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),s.set(e.name,n),r==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,n,true,d)},init(d){return d!==void 0&&this.C(i,void 0,n,d),d}}}if(r==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,n,true,d)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?Qe(n,t,e):((r,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}function v(n){return f({...n,state:true,attribute:false})}var Zt=[{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"}}];var R=n=>n??c;var Jt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function Ct(n){if(n.lang)return n.lang;if(typeof document>"u")return;let t=n.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var tr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function At(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Xt(n,t=Jt){let e=Ct(n);if(!e)return;let r=At(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(d=>d==="hans"||d==="hant")??tr[o[1]??""];return i?At(`zh-${i}`,t):void 0}return At(s,t)}var er={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},_t='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Qt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',te='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Q={"fraunces-jost":{name:"Fraunces with Jost",sans:_t,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:_t,display:_t},geist:{name:"Geist",sans:Qt,display:Qt},system:{name:"System",sans:te,display:te}};function ee(n){let{sans:t,display:e}=Q[n];return Object.keys(er).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var re="1.3.0";var rr=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,nr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function ne(n,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=(rr.exec(e.pathname)??nr.exec(e.pathname))?.[1];if(r!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${n}/dist`:`${e.origin}${r}`}var dr={},or="color-mix(in oklab, var(--roxy-accent) 70%, black)",sr="var(--roxy-accent)",ir="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",oe=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function se(n){return n!==void 0&&Object.hasOwn(Q,n)}function ie(n){let t=[];return n.brandColor&&oe.test(n.brandColor)&&t.push(`--roxy-primary:${n.brandColor}`),n.brandAccent&&oe.test(n.brandAccent)&&t.push(`--roxy-accent:${n.brandAccent}`,`--roxy-accent-ink:light-dark(${or},${sr})`,`--roxy-ring:${ir}`),t.join(";")}function ae(n,t){if(se(t))return t;let e=n.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=n.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,d,a;try{let h=globalThis.getComputedStyle(n),p=u=>h.getPropertyValue(u).trim();i=p("--roxy-font-sans"),d=p("--roxy-font-display"),a=p("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||d))return se(a)?a:void 0}function de(n){let{sans:t,display:e}=Q[n];return`--roxy-font:${n};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ar=ne(re,globalThis.document?.currentScript?.src||dr.url);function ce(n,t=ar){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${n}`;if(ee(n).length===0||document.getElementById(e))return;let r=document.createElement("link");r.id=e,r.rel="stylesheet",r.href=`${t}/styles/fonts/${n}.css`,document.head.append(r)}var le='@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: initial;--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 tt="roxy-ui-tokens";function et(){if(typeof document>"u")return null;let n=document.getElementById(tt);if(n)return n;let t=document.createElement("style");return t.id=tt,t.textContent=le,document.head.prepend(t),t}function pe(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}function B(n){return n.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var he="__ROXY_UI_I18N__";function ue(){let n=globalThis,t=n[he];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[he]=e,e}function cr(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ye(n,t,e){return cr(lr(n,t)??t,e)}function lr(n,t){if(!n)return;let{catalogs:e}=ue(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[pe(t)]}function me(n){let{listeners:t}=ue();return t.add(n),()=>{t.delete(n)}}var rt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=me(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var nt=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new rt(this)}connectedCallback(){super.connectedCallback(),et()}fontDeclarations(e){let r=ae(this,e);return r?(ce(r),de(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?l`<style>:host{${e}}</style>`:c}t(e,r){return ye(this.effectiveLang(),e,r)}effectiveLang(){return Ct(this)}};var fe=g`: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 pr=g`: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}`,ot=[pr,fe];var hr="__cols",ur="__rows";function yr(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function st(n){if(Array.isArray(n)){let s=false,i=n.map(d=>{let a=st(d);return a!==d&&(s=true),a});return s?i:n}if(!yr(n))return n;let t=n[hr],e=n[ur];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=st(s[a])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let d=st(i);d!==i&&(r=true),o[s]=d}return r?o:n}function ge(n){return st(n)}function xe(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var mr="pk_live_YOUR_KEY",be={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 ve(n){if(n)return n===mr?be.sample:n.startsWith("pk_")?void 0:be.secret}function Se(n,t,e={}){e.warn&&console.warn(t.message),n.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var we="https://roxyapi.com/api/v2";async function fr(n){try{let t=await n.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${n.status})`,issues:null,worded:false}}var $e={fromAttribute:n=>{if(n!=null){try{let t=JSON.parse(n);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},L=class extends Error{constructor(e,r=null,o=true,s,i){super(e);this.issues=r;this.worded=o;this.status=s;this.code=i}};function Ee(n){return n.submitUrl?void 0:ve(n.publishableKey)}async function Rt(n,t,e){let r=Ee(n);if(r)throw new L(r.message);let o=n.submitUrl?await fetch(n.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:gr(t,n.submitContext),signal:e}):await xr(n,t,e);if(!o.ok){let s=await fr(o);throw new L(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function gr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function xr(n,t,e){let r=new URL(`${n.baseUrl??we}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(s,String(i));let o={Accept:"application/json"};return n.publishableKey&&(o["X-API-Key"]=n.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var it=class{constructor(t){this.baseUrl=we;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=Ee(this);if(e){this.host.error=e.message,Se(this.host,e);return}this.abort?.abort();let r=new AbortController;this.abort=r,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await Rt(this,t,r.signal);if(r.signal.aborted)return;this.host.data=o}catch(o){if(r.signal.aborted||o?.name==="AbortError")return;o instanceof L&&(this.host.issues=o.issues,this.failure={status:o.status,code:o.code}),this.worded=o instanceof L&&o.worded,this.host.error=o instanceof Error?o.message:String(o)}finally{this.abort===r&&(this.abort=void 0),r.signal.aborted||(this.host.loading=false)}}};function Te(n,t,e,r=[]){let o={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,p)=>{let u=o[p];return delete o[p],encodeURIComponent(String(u??""))}),i=new Set(r),d={},a={};for(let[h,p]of Object.entries(o))p===void 0||p===""||(t==="GET"||i.has(h)?d[h]=p:a[h]=p);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function at(){return l`<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 ke=g`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 Ae=g`.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 Ce(n,t,e){let r=n.filter(o=>!!o.body);return r.length===0?c:l`<section class="block" part="section readings"><h3>${e}</h3>${r.map((o,s)=>l`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${o.label}</span> ${at()} ${o.aside?l`<span class="interp-aside"><small>${o.aside}</small></span>`:c}</summary><div class="interp-body"><p>${o.body}</p>${o.extra??c}</div></details>`)}</section>`}var br="roxy-data";function vr(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var dt=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(vr(t)&&t.classList.contains(br))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var m=class extends nt{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,r=this.listKey,o=this.listRows();if(!(!e||!r||!o)){this.moreLoading=true,this.moreError=null;try{let s=await Rt(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[r];this.data={...this.data,...s,[r]:[...o,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let r=this.selfFetch();if(!r)return;let o=e.detail;this.lastValues=o.values,this.sticky=!!o.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(o.values),this.fetchFresh(Te(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new dt(this),this.fetcher=new it(this)}static{this.styles=[ot]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=ge(this.data);r!==this.data&&(this.data=r)}(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:xe(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return l`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(r){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,r),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:r},bubbles:true,composed:true})),customElements.get("roxy-data")?l`<roxy-data .data="${e}" lang="${R(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),r=[ie(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!r)return c;let o=(r?`:host{${r}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return l`<style>${o}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}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()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,r,o){return this.hideReadings?c:Ce(e,r,this.t(o??"Reading"))}renderResult(e){let r=l`<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()?l`${r}${this.renderAttribution()}`:r}renderWithForm(e){return l`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?c:this.renderErrorBanner(this.error):this.data==null?c:this.showAttribution()?l`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),r=this.data?.total;return!this.lastRequest||!e||typeof r!="number"?c:e.length>=r?c:l`<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?l`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:c}</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=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let r=this.openedRow??document.createElement(this.rowDetail.tag);r.publishableKey=this.publishableKey,r.baseUrl=this.baseUrl,r.submitUrl=this.submitUrl,r.submitContext=this.submitContext,r.hideReadings=this.hideReadings,r.hideSections=this.hideSections;let o=this.effectiveLang();o&&r.setAttribute("lang",o),this.openedRow=r,this.openedRowId=e,r.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Xt(this)}}).then(()=>r.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return l`<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(c):this.renderEmpty()}renderForm(){let e=this.selfFetch();return l`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${R(this.specUrl)}" publishable-key="${R(this.publishableKey)}" location-url="${R(this.locationUrl)}" submit-label="${R(this.submitLabel)}" lang="${R(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 l`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return l`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let r=!!this.selfFetch();if(r&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return r?l`${o}${this.renderForm()}`:o}renderErrorBanner(e){return l`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};y([f({attribute:false})],m.prototype,"data",2),y([f({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),y([f({type:String})],m.prototype,"method",2),y([f({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),y([f({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),y([f({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),y([f({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),y([f({attribute:"submit-context",converter:$e})],m.prototype,"submitContext",2),y([f({type:String,attribute:"location-url"})],m.prototype,"locationUrl",2),y([f({type:Boolean})],m.prototype,"remember",2),y([f({type:Boolean,attribute:"hide-readings",reflect:true})],m.prototype,"hideReadings",2),y([f({type:String,attribute:"hide-sections",reflect:true})],m.prototype,"hideSections",2),y([f({type:String,attribute:"brand-color"})],m.prototype,"brandColor",2),y([f({type:String,attribute:"brand-accent"})],m.prototype,"brandAccent",2),y([f({type:String})],m.prototype,"font",2),y([f({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),y([f({type:String,attribute:"error-message"})],m.prototype,"errorMessage",2),y([f({type:String})],m.prototype,"attribution",2),y([v()],m.prototype,"loading",2),y([v()],m.prototype,"error",2),y([v()],m.prototype,"issues",2),y([v()],m.prototype,"selfFetched",2),y([v()],m.prototype,"editing",2),y([v()],m.prototype,"sticky",2),y([v()],m.prototype,"openedRow",2),y([v()],m.prototype,"openedRowId",2),y([v()],m.prototype,"moreLoading",2),y([v()],m.prototype,"moreError",2);var K=["physical","emotional","intellectual","intuitive"],ct={physical:"Physical",emotional:"Emotional",intellectual:"Intellectual",intuitive:"Intuitive"};function U(n,t){let e=ct[n];return e?t(e):B(n)}var _e=n=>t=>{customElements.get(n)||customElements.define(n,t)};var Re=g`.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}`;var Sr=/^\d{4}-\d{2}-\d{2}$/,wr=/^\d{4}-\d{2}$/,$r=/^\d{2}:\d{2}(:\d{2})?$/,Er=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Oe=new Map;function lt(n){if(!n)return["en"];let t=Oe.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return Oe.set(n,e),[e,"en"]}function Tr(n,t){return n&&t?`${n} - ${t}`:n||t}function kr(n){let t=$r.test(n)?`1970-01-01T${n}`:Sr.test(n)?`${n}T00:00:00`:wr.test(n)?`${n}-01T00:00:00`:Er.test(n)?n.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(n)}}function x(n,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:r}=kr(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(lt(n),{month:"short",day:"numeric",year:"numeric",timeZone:r})}function Ot(n,t,e){return Tr(x(n,t),x(n,e))}function pt(n,t){let e=t.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(lt(n),{style:"long",type:"conjunction"}).format(e)}function Pe(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(lt(n),{maximumFractionDigits:e})}function ht(n,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":(t/100).toLocaleString(lt(n),{style:"percent",maximumFractionDigits:e})}var ut={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)"},Ar={ascending:"ascending through zero",descending:"descending through zero"},Cr={double:"Double day",triple:"Triple day"},T=class extends m{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 r=e.quickRead??{},o=Object.entries(r).map(([i,d])=>{let a=typeof d=="number"?d:0,h=Math.abs(a)>1?a/100:a;return[i,h]}),s=e.spotlight;return l`<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?l`<span class="roxy-chip">${B(e.overallPhase)}</span>`:c} ${typeof e.energyRating=="number"?l`<span class="energy">${this.t("Energy {{value}}/10",{value:e.energyRating})}</span>`:c}</div></header>${s?l`<div class="spotlight" part="details spotlight" style="${`border-inline-start-color: ${ut[s.cycle]??"var(--roxy-accent)"}`}"><p class="roxy-label">${this.t("Spotlight cycle")}</p><div class="lead"><strong>${U(s.cycle,i=>this.t(i))}</strong> ${typeof s.value=="number"?l`<span class="energy">${ht(this.effectiveLang(),s.value,0)}</span>`:c} ${s.phase?l`<span class="roxy-chip">${B(s.phase)}</span>`:c}</div>${s.message&&!this.hideReadings?l`<p>${s.message}</p>`:c}</div>`:c}<div class="bars" part="chart bars" role="list">${o.map(([i,d])=>{let a=Math.abs(d)*50,h=ut[i]??"var(--roxy-accent)";return l`<div class="bar" role="listitem"><span>${U(i,p=>this.t(p))}</span> <span class="track"><span class="fill ${d<0?"low":"high"}" style="width:${a}%;background:${h}"></span> </span><span class="value">${ht(this.effectiveLang(),d*100,0)}</span></div>`})}</div>${this.hideReadings?c:l`${e.dailyMessage?l`<p>${e.dailyMessage}</p>`:c} ${e.advice?l`<p>${e.advice}</p>`:c}`}</section>`}renderForecast(e){let r=e.days??[];if(r.length===0)return l`<div class="roxy-empty" role="status">${this.t("No forecast")}</div>`;let o=600,s=160,i=o/Math.max(r.length-1,1),d=e.summary;return l`<section class="wrap" part="card" aria-label="${this.t("Biorhythm forecast")}"><header class="head" part="header"><h2>${this.t("Forecast")}</h2><span class="energy">${Ot(this.effectiveLang(),e.startDate,e.endDate)}</span></header><svg viewBox="0 0 ${o} ${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="${o}" y2="${s/2}" stroke="var(--roxy-border)" stroke-width="1"/>${K.map(a=>{let h=r.map((u,b)=>{let S=u[a]??0,O=b*i,Fe=s/2-S/100*(s/2-8);return`${O.toFixed(2)},${Fe.toFixed(2)}`}).join(" "),p=ut[a]??"var(--roxy-secondary)";return Tt`<polyline points=${h} fill="none" stroke=${p} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})} ${r.map((a,h)=>a.isCritical?Tt`<circle cx=${(h*i).toFixed(2)} cy=${s/2} r="3" fill="var(--roxy-danger)"><title>${[x(this.effectiveLang(),a.date),pt(this.effectiveLang(),(a.criticalCycles??[]).map(p=>U(p,u=>this.t(u)))),this.t("critical day"),typeof a.energyRating=="number"?this.t("Energy {{value}}/10",{value:a.energyRating}):""].filter(Boolean).join(" \xB7 ")}</title></circle>`:c)}</svg><div class="forecast-axis" part="legend"><span>${x(this.effectiveLang(),r[0]?.date)}</span><span>${x(this.effectiveLang(),r.at(-1)?.date)}</span></div><div class="legend" part="legend">${K.map(a=>l`<span class="key"><span class="dot" style="${`background: ${ut[a]}`}"></span>${this.t(ct[a])}</span>`)} <span class="key"><span class="dot critical"></span>${this.t("critical day")}</span></div>${d?l`<dl class="roxy-facts" part="details">${this.stat(this.t("Best day"),x(this.effectiveLang(),d.bestDay))} ${this.stat(this.t("Worst day"),x(this.effectiveLang(),d.worstDay))} ${this.stat(this.t("Average energy"),typeof d.averageEnergy=="number"?`${d.averageEnergy}/10`:"")} ${this.stat(this.t("Critical days"),typeof d.criticalDayCount=="number"?`${d.criticalDayCount}`:"")}</dl>`:c} ${this.renderForecastData(e)} ${d?.periodAdvice&&!this.hideReadings?l`<p>${d.periodAdvice}</p>`:c}</section>`}renderForecastData(e){let r=this.effectiveLang();return l`<details class="forecast-data" part="section days"><summary>${this.t("Daily values")}${at()}</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>${K.map(o=>l`<th scope="col">${this.t(ct[o])}</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(o=>l`<tr><th scope="row"><time datetime="${o.date}">${x(r,o.date)}</time></th>${K.map(s=>l`<td>${ht(r,o[s],2)}</td>`)}<td>${this.t("Energy {{value}}/10",{value:o.energyRating})}</td><td>${Pe(r,o.daysSinceBirth,0)}</td><td>${o.isCritical?pt(r,o.criticalCycles.map(s=>U(s,i=>this.t(i))))||this.t("critical day"):this.t("None")}</td></tr>`)}</tbody></table></div></details>`}renderCritical(e){let r=e.criticalDays??[],o=e.doubleCriticalDays??[],s=r.map(i=>({label:x(this.effectiveLang(),i.date)||i.date,aside:[i.cycle?U(i.cycle,d=>this.t(d)):"",this.severityName(i.severity)].filter(Boolean).join(" \xB7 "),body:i.advisory??"",extra:l`<p class="crit-meta">${[i.direction?this.t(Ar[i.direction]):"",typeof i.period=="number"?this.t("{{period}}-day cycle",{period:i.period}):""].filter(Boolean).join(" \xB7 ")}</p>`}));return l`<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">${Ot(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"),o.length?`${o.length}`:"0")} ${this.stat(this.t("Triple day"),e.tripleCriticalDay?x(this.effectiveLang(),e.tripleCriticalDay):this.t("None"))}</dl>${o.length>0?l`<p class="crit-note">${this.t("Two or more cycles cross zero on {{dates}}. Take extra care on these dates.",{dates:pt(this.effectiveLang(),o.map(i=>x(this.effectiveLang(),i)||i))})}</p>`:c} ${this.renderInterpretation(s,"biorhythm-critical","Advisories")}</section>`}severityName(e){let r=Cr[e];return r?this.t(r):""}stat(e,r){return r?l`<div><dt>${e}</dt><dd>${r}</dd></div>`:c}};T.endpoints=Zt,T.styles=[ot,ke,Re,Ae,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: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)}`],y([f({type:String,reflect:true})],T.prototype,"mode",2),T=y([_e("roxy-biorhythm-chart")],T);return Ie(_r)})();/*! Bundled license information:
4
4
 
5
5
  @lit/reactive-element/css-tag.js:
6
6
  (**