@roxyapi/ui 1.4.0 → 1.5.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 (167) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +2 -2
  3. package/components-catalog.json +1 -1
  4. package/dist/cdn/components/almanac-day.js +1 -1
  5. package/dist/cdn/components/angel-number-card.js +1 -1
  6. package/dist/cdn/components/angel-number-lookup.js +1 -1
  7. package/dist/cdn/components/arudha-padas.js +1 -1
  8. package/dist/cdn/components/ashtakavarga-grid.js +1 -1
  9. package/dist/cdn/components/aspects-table.js +1 -1
  10. package/dist/cdn/components/astrocartography-map.js +1 -1
  11. package/dist/cdn/components/bazi-chart.js +1 -1
  12. package/dist/cdn/components/bhav-chalit-table.js +1 -1
  13. package/dist/cdn/components/bhava-bala-table.js +1 -1
  14. package/dist/cdn/components/biorhythm-chart.js +1 -1
  15. package/dist/cdn/components/bodygraph.js +1 -1
  16. package/dist/cdn/components/chara-karakas.js +1 -1
  17. package/dist/cdn/components/choghadiya-grid.js +1 -1
  18. package/dist/cdn/components/compatibility-card.js +1 -1
  19. package/dist/cdn/components/compound-number.js +1 -1
  20. package/dist/cdn/components/crystal-card.js +1 -1
  21. package/dist/cdn/components/crystal-grid.js +1 -1
  22. package/dist/cdn/components/dasha-timeline.js +1 -1
  23. package/dist/cdn/components/data.js +1 -1
  24. package/dist/cdn/components/divisional-chart.js +1 -1
  25. package/dist/cdn/components/dosha-card.js +1 -1
  26. package/dist/cdn/components/dosha-constitution.js +1 -1
  27. package/dist/cdn/components/dream-card.js +1 -1
  28. package/dist/cdn/components/dream-search.js +1 -1
  29. package/dist/cdn/components/endpoint-form.js +1 -1
  30. package/dist/cdn/components/ephemeris-table.js +1 -1
  31. package/dist/cdn/components/fixed-stars.js +1 -1
  32. package/dist/cdn/components/flying-star-chart.js +1 -1
  33. package/dist/cdn/components/forecast-digest.js +1 -1
  34. package/dist/cdn/components/forecast-timeline.js +1 -1
  35. package/dist/cdn/components/gematria.js +1 -1
  36. package/dist/cdn/components/gochara-table.js +1 -1
  37. package/dist/cdn/components/guna-milan.js +1 -1
  38. package/dist/cdn/components/hd-connection.js +1 -1
  39. package/dist/cdn/components/hd-penta.js +1 -1
  40. package/dist/cdn/components/hd-type-card.js +1 -1
  41. package/dist/cdn/components/hd-variables.js +1 -1
  42. package/dist/cdn/components/heliacal-table.js +1 -1
  43. package/dist/cdn/components/hexagram.js +1 -1
  44. package/dist/cdn/components/hora-table.js +1 -1
  45. package/dist/cdn/components/horoscope-card.js +1 -1
  46. package/dist/cdn/components/kp-chart.js +1 -1
  47. package/dist/cdn/components/kp-finance-card.js +1 -1
  48. package/dist/cdn/components/kp-planets-table.js +1 -1
  49. package/dist/cdn/components/kp-ruling-planets.js +1 -1
  50. package/dist/cdn/components/kua-card.js +1 -1
  51. package/dist/cdn/components/local-space-compass.js +1 -1
  52. package/dist/cdn/components/location-search.js +1 -1
  53. package/dist/cdn/components/luck-pillars.js +1 -1
  54. package/dist/cdn/components/mayan-day-sign.js +1 -1
  55. package/dist/cdn/components/moon-phase.js +3 -3
  56. package/dist/cdn/components/nakshatra-card.js +1 -1
  57. package/dist/cdn/components/natal-chart.js +1 -1
  58. package/dist/cdn/components/numerology-card.js +1 -1
  59. package/dist/cdn/components/panchang-table.js +1 -1
  60. package/dist/cdn/components/positions-table.js +1 -1
  61. package/dist/cdn/components/profection-card.js +1 -1
  62. package/dist/cdn/components/reference-card.js +1 -1
  63. package/dist/cdn/components/relocation-wheel.js +1 -1
  64. package/dist/cdn/components/report.js +1 -1
  65. package/dist/cdn/components/shadbala-table.js +1 -1
  66. package/dist/cdn/components/synastry-chart.js +1 -1
  67. package/dist/cdn/components/tarot-card.js +1 -1
  68. package/dist/cdn/components/tarot-catalog.js +1 -1
  69. package/dist/cdn/components/tarot-spread.js +1 -1
  70. package/dist/cdn/components/transit-wheel.js +1 -1
  71. package/dist/cdn/components/transits-table.js +1 -1
  72. package/dist/cdn/components/upagraha-table.js +1 -1
  73. package/dist/cdn/components/vastu-mandala.js +1 -1
  74. package/dist/cdn/components/vedic-aspects.js +1 -1
  75. package/dist/cdn/components/vedic-daily.js +1 -1
  76. package/dist/cdn/components/vedic-kundli.js +1 -1
  77. package/dist/cdn/components/vedic-planets-table.js +1 -1
  78. package/dist/cdn/components/western-planets-table.js +1 -1
  79. package/dist/cdn/components/yoga-list.js +1 -1
  80. package/dist/cdn/components/zodiac-card.js +1 -1
  81. package/dist/cdn/roxy-ui.js +13 -13
  82. package/dist/charts.cjs +57 -54
  83. package/dist/charts.d.ts +4 -3
  84. package/dist/charts.js +56 -53
  85. package/dist/components/almanac-day.js +1 -1
  86. package/dist/components/angel-number-card.js +1 -1
  87. package/dist/components/angel-number-lookup.js +1 -1
  88. package/dist/components/arudha-padas.js +1 -1
  89. package/dist/components/ashtakavarga-grid.js +1 -1
  90. package/dist/components/aspects-table.js +1 -1
  91. package/dist/components/astrocartography-map.js +1 -1
  92. package/dist/components/bazi-chart.js +1 -1
  93. package/dist/components/bhav-chalit-table.js +1 -1
  94. package/dist/components/bhava-bala-table.js +1 -1
  95. package/dist/components/biorhythm-chart.js +1 -1
  96. package/dist/components/bodygraph.js +1 -1
  97. package/dist/components/chara-karakas.js +1 -1
  98. package/dist/components/choghadiya-grid.js +1 -1
  99. package/dist/components/compatibility-card.js +1 -1
  100. package/dist/components/compound-number.js +1 -1
  101. package/dist/components/crystal-card.js +1 -1
  102. package/dist/components/crystal-grid.js +1 -1
  103. package/dist/components/dasha-timeline.js +1 -1
  104. package/dist/components/data.js +1 -1
  105. package/dist/components/divisional-chart.js +1 -1
  106. package/dist/components/dosha-card.js +1 -1
  107. package/dist/components/dosha-constitution.js +1 -1
  108. package/dist/components/dream-card.js +1 -1
  109. package/dist/components/dream-search.js +1 -1
  110. package/dist/components/endpoint-form.js +1 -1
  111. package/dist/components/ephemeris-table.js +1 -1
  112. package/dist/components/fixed-stars.js +1 -1
  113. package/dist/components/flying-star-chart.js +1 -1
  114. package/dist/components/forecast-digest.js +1 -1
  115. package/dist/components/forecast-timeline.js +1 -1
  116. package/dist/components/gematria.js +1 -1
  117. package/dist/components/gochara-table.js +1 -1
  118. package/dist/components/guna-milan.js +1 -1
  119. package/dist/components/hd-connection.js +1 -1
  120. package/dist/components/hd-penta.js +1 -1
  121. package/dist/components/hd-type-card.js +1 -1
  122. package/dist/components/hd-variables.js +1 -1
  123. package/dist/components/heliacal-table.js +1 -1
  124. package/dist/components/hexagram.js +1 -1
  125. package/dist/components/hora-table.js +1 -1
  126. package/dist/components/horoscope-card.js +1 -1
  127. package/dist/components/kp-chart.js +1 -1
  128. package/dist/components/kp-finance-card.js +1 -1
  129. package/dist/components/kp-planets-table.js +1 -1
  130. package/dist/components/kp-ruling-planets.js +1 -1
  131. package/dist/components/kua-card.js +1 -1
  132. package/dist/components/local-space-compass.js +1 -1
  133. package/dist/components/location-search.js +1 -1
  134. package/dist/components/luck-pillars.js +1 -1
  135. package/dist/components/mayan-day-sign.js +1 -1
  136. package/dist/components/moon-phase.d.ts +3 -1
  137. package/dist/components/moon-phase.js +1 -1
  138. package/dist/components/nakshatra-card.js +1 -1
  139. package/dist/components/natal-chart.js +1 -1
  140. package/dist/components/numerology-card.js +1 -1
  141. package/dist/components/panchang-table.js +1 -1
  142. package/dist/components/positions-table.js +1 -1
  143. package/dist/components/profection-card.js +1 -1
  144. package/dist/components/reference-card.js +1 -1
  145. package/dist/components/relocation-wheel.js +1 -1
  146. package/dist/components/report.js +1 -1
  147. package/dist/components/shadbala-table.js +1 -1
  148. package/dist/components/synastry-chart.js +1 -1
  149. package/dist/components/tarot-card.js +1 -1
  150. package/dist/components/tarot-catalog.js +1 -1
  151. package/dist/components/tarot-spread.js +1 -1
  152. package/dist/components/transit-wheel.js +1 -1
  153. package/dist/components/transits-table.js +1 -1
  154. package/dist/components/upagraha-table.js +1 -1
  155. package/dist/components/vastu-mandala.js +1 -1
  156. package/dist/components/vedic-aspects.js +1 -1
  157. package/dist/components/vedic-daily.js +1 -1
  158. package/dist/components/vedic-kundli.js +1 -1
  159. package/dist/components/vedic-planets-table.js +1 -1
  160. package/dist/components/western-planets-table.js +1 -1
  161. package/dist/components/yoga-list.js +1 -1
  162. package/dist/components/zodiac-card.js +1 -1
  163. package/dist/index.cjs +13 -13
  164. package/dist/index.js +25 -25
  165. package/dist/types/types.gen.d.ts +4 -0
  166. package/dist/version.d.ts +1 -1
  167. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  var RoxyUI_crystal_grid=(()=>{var H=Object.defineProperty;var vt=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Ce=Object.prototype.hasOwnProperty;var Re=(n,t)=>{for(var e in t)H(n,e,{get:t[e],enumerable:true})},Oe=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _e(t))!Ce.call(n,o)&&o!==e&&H(n,o,{get:()=>t[o],enumerable:!(r=vt(t,o))||r.enumerable});return n};var Pe=n=>Oe(H({},"__esModule",{value:true}),n),p=(n,t,e,r)=>{for(var o=r>1?void 0:r?vt(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 gr={};Re(gr,{ROXY_UI_TOKENS_STYLE_ID:()=>W,RoxyCrystalGrid:()=>$,injectRoxyTokens:()=>J});var K=globalThis,B=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ot=Symbol(),St=new WeakMap,F=class{constructor(t,e,r){if(this._$cssResult$=true,r!==ot)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(B&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=St.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&St.set(e,t))}return t}toString(){return this.cssText}},wt=n=>new F(typeof n=="string"?n:n+"",void 0,ot),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 F(e,n,ot)},Et=(n,t)=>{if(B)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)}},st=B?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return wt(e)})(n):n;var{is:Fe,defineProperty:Ue,getOwnPropertyDescriptor:Le,getOwnPropertyNames:Ne,getOwnPropertySymbols:Ie,getPrototypeOf:De}=Object,z=globalThis,$t=z.trustedTypes,Me=$t?$t.emptyScript:"",Ge=z.reactiveElementPolyfillSupport,U=(n,t)=>n,L={toAttribute(n,t){switch(t){case Boolean:n=n?Me: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}},q=(n,t)=>!Fe(n,t),Tt={attribute:true,type:String,converter:L,reflect:false,useDefault:false,hasChanged:q};Symbol.metadata??=Symbol("metadata"),z.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=Tt){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&&Ue(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:s}=Le(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let a=o?.call(this);s?.call(this,i),this.requestUpdate(t,a,r)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Tt}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;let t=De(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(U("properties"))){let e=this.properties,r=[...Ne(e),...Ie(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(st(o))}else t!==void 0&&e.push(st(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 Et(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:L).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:L;this._$Em=o;let a=i.fromAttribute(e,s.type);this[o]=a??this._$Ej?.get(o)??a,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??q)(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,a=this[o];i!==true||this._$AL.has(o)||a===void 0||this.C(o,void 0,s,a)}}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[U("elementProperties")]=new Map,v[U("finalized")]=new Map,Ge?.({ReactiveElement:v}),(z.reactiveElementVersions??=[]).push("2.1.2");var ht=globalThis,kt=n=>n,Y=ht.trustedTypes,At=Y?Y.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ft="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,Ut="?"+w,je=`<${Ut}>`,A=document,I=()=>A.createComment(""),D=n=>n===null||typeof n!="object"&&typeof n!="function",ut=Array.isArray,He=n=>ut(n)||typeof n?.[Symbol.iterator]=="function",it=`[
2
2
  \f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_t=/-->/g,Ct=/>/g,T=RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Rt=/'/g,Ot=/"/g,Lt=/^(?:script|style|textarea|title)$/i,mt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),c=mt(1),Er=mt(2),$r=mt(3),_=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Pt=new WeakMap,k=A.createTreeWalker(A,129);function Nt(n,t){if(!ut(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return At!==void 0?At.createHTML(t):t}var Ke=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=N;for(let a=0;a<e;a++){let d=n[a],y,u,m=-1,b=0;for(;b<d.length&&(i.lastIndex=b,u=i.exec(d),u!==null);)b=i.lastIndex,i===N?u[1]==="!--"?i=_t:u[1]!==void 0?i=Ct:u[2]!==void 0?(Lt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=T):u[3]!==void 0&&(i=T):i===T?u[0]===">"?(i=o??N,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?T:u[3]==='"'?Ot:Rt):i===Ot||i===Rt?i=T:i===_t||i===Ct?i=N:(i=T,o=void 0);let S=i===T&&n[a+1].startsWith("/>")?" ":"";s+=i===N?d+je:m>=0?(r.push(y),d.slice(0,m)+Ft+d.slice(m)+w+S):d+w+(m===-2?a:S)}return[Nt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},M=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,a=t.length-1,d=this.parts,[y,u]=Ke(t,e);if(this.el=n.createElement(y,r),k.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=k.nextNode())!==null&&d.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Ft)){let b=u[i++],S=o.getAttribute(m).split(w),j=/([.?@])?(.*)/.exec(b);d.push({type:1,index:s,name:j[2],strings:S,ctor:j[1]==="."?dt:j[1]==="?"?lt:j[1]==="@"?ct:O}),o.removeAttribute(m)}else m.startsWith(w)&&(d.push({type:6,index:s}),o.removeAttribute(m));if(Lt.test(o.tagName)){let m=o.textContent.split(w),b=m.length-1;if(b>0){o.textContent=Y?Y.emptyScript:"";for(let S=0;S<b;S++)o.append(m[S],I()),k.nextNode(),d.push({type:2,index:++s});o.append(m[b],I())}}}else if(o.nodeType===8)if(o.data===Ut)d.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)d.push({type:7,index:s}),m+=w.length-1}s++}}static createElement(t,e){let r=A.createElement("template");return r.innerHTML=t,r}};function R(n,t,e=n,r){if(t===_)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=D(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=R(n,o._$AS(n,t.values),o,r)),t}var at=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);k.currentNode=o;let s=k.nextNode(),i=0,a=0,d=r[0];for(;d!==void 0;){if(i===d.index){let y;d.type===2?y=new G(s,s.nextSibling,this,t):d.type===1?y=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(y=new pt(s,this,t)),this._$AV.push(y),d=r[++a]}i!==d?.index&&(s=k.nextNode(),i++)}return k.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++}},G=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=R(this,t,e),D(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==_&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):He(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&&D(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=M.createElement(Nt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new at(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 M(t)),e}k(t){ut(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=kt(t).nextSibling;kt(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=R(this,t,e,0),i=!D(t)||t!==this._$AH&&t!==_,i&&(this._$AH=t);else{let a=t,d,y;for(t=s[0],d=0;d<s.length-1;d++)y=R(this,a[r+d],e,d),y===_&&(y=this._$AH[d]),i||=!D(y)||y!==this._$AH[d],y===l?t=l:t!==l&&(t+=(y??"")+s[d+1]),this._$AH[d]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},dt=class extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},lt=class extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ct=class extends O{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??l)===_)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)}},pt=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){R(this,t)}};var Be=ht.litHtmlPolyfillSupport;Be?.(M,G),(ht.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 G(t.insertBefore(I(),s),s,void 0,e??{})}return o._$AI(n),o};var yt=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 _}};E._$litElement$=true,E.finalized=true,yt.litElementHydrateSupport?.({LitElement:E});var ze=yt.litElementPolyfillSupport;ze?.({LitElement:E});(yt.litElementVersions??=[]).push("4.2.2");var qe={attribute:true,type:String,converter:L,reflect:false,hasChanged:q},Ye=(n=qe,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(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,d,n,true,a)},init(a){return a!==void 0&&this.C(i,void 0,n,a),a}}}if(r==="setter"){let{name:i}=e;return function(a){let d=this[i];t.call(this,a),this.requestUpdate(i,d,n,true,a)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?Ye(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 Dt=[{endpoint:"crystals",method:"GET"},{endpoint:"crystals/chakra/{chakra}",method:"GET"},{endpoint:"crystals/element/{element}",method:"GET"},{endpoint:"crystals/zodiac/{sign}",method:"GET"},{endpoint:"crystals/birthstone/{month}",method:"GET"},{endpoint:"crystals/search",method:"GET"}];var C=n=>n??l;var Mt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function gt(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 Ve={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ft(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Gt(n,t=Mt){let e=gt(n);if(!e)return;let r=ft(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(a=>a==="hans"||a==="hant")??Ve[o[1]??""];return i?ft(`zh-${i}`,t):void 0}return ft(s,t)}var Kt="symbols";var Ze={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},xt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',jt='"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:xt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:xt,display:xt},geist:{name:"Geist",sans:jt,display:jt},system:{name:"System",sans:Ht,display:Ht}};function Bt(n){let{sans:t,display:e}=Z[n];return Object.keys(Ze).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var zt="1.4.0";var We=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Je=/^(.*\/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=(We.exec(e.pathname)??Je.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 er={},Xe="color-mix(in oklab, var(--roxy-accent) 70%, black)",Qe="var(--roxy-accent)",tr="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 Zt(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(${Xe},${Qe})`,`--roxy-ring:${tr}`),t.join(";")}function Wt(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,a,d;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),a=u("--roxy-font-display"),d=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||a))return Vt(d)?d: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 Xt=qt(zt,globalThis.document?.currentScript?.src||er.url);function Qt(n,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${n}`;if(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)}function te(n,t=Xt){Bt(n).length>0&&Qt(n,t)}function ee(n=Xt){Qt(Kt,n)}var re='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var W="roxy-ui-tokens";function J(){if(typeof document>"u")return null;let n=document.getElementById(W);if(n)return n;let t=document.createElement("style");return t.id=W,t.textContent=re,document.head.prepend(t),t}function ne(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}var oe="__ROXY_UI_I18N__";function se(){let n=globalThis,t=n[oe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[oe]=e,e}function rr(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ie(n,t,e){return rr(nr(n,t)??t,e)}function nr(n,t){if(!n)return;let{catalogs:e}=se(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ne(t)]}function ae(n){let{listeners:t}=se();return t.add(n),()=>{t.delete(n)}}var X=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=ae(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Q=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new X(this)}connectedCallback(){super.connectedCallback(),J()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ee()}fontDeclarations(e){let r=Wt(this,e);return r?(te(r),Jt(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,r){return ie(this.effectiveLang(),e,r)}effectiveLang(){return gt(this)}};var de=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function le(n){return n?c`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:l}var ce=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 or=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}`,tt=[or,ce,de];var sr="__cols",ir="__rows";function ar(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function et(n){if(Array.isArray(n)){let s=false,i=n.map(a=>{let d=et(a);return d!==a&&(s=true),d});return s?i:n}if(!ar(n))return n;let t=n[sr],e=n[ir];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((a,d)=>{i[a]=et(s[d])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let a=et(i);a!==i&&(r=true),o[s]=a}return r?o:n}function pe(n){return et(n)}function he(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var dr="pk_live_YOUR_KEY",ue={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 me(n){if(n)return n===dr?ue.sample:n.startsWith("pk_")?void 0:ue.secret}function ye(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 fe="https://roxyapi.com/api/v2";async function lr(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 ge={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 xe(n){return n.submitUrl?void 0:me(n.publishableKey)}async function bt(n,t,e){let r=xe(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:cr(t,n.submitContext),signal:e}):await pr(n,t,e);if(!o.ok){let s=await lr(o);throw new P(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function cr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function pr(n,t,e){let r=new URL(`${n.baseUrl??fe}${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 rt=class{constructor(t){this.baseUrl=fe;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=xe(this);if(e){this.host.error=e.message,ye(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 bt(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 be(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),a={},d={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?a[y]=u:d[y]=u);return{path:s,method:t,query:a,body:t==="POST"?d:void 0}}function ve(){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 eo=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 io=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 Se(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">${le(o.glyph)} ${o.label}</span> ${ve()} ${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 hr="roxy-data";function ur(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var nt=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(ur(t)&&t.classList.contains(hr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var h=class extends Q{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 bt(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(be(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new nt(this),this.fetcher=new rt(this)}static{this.styles=[tt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=pe(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:he(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="${C(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=[Zt(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:Se(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:Gt(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="${C(this.specUrl)}" publishable-key="${C(this.publishableKey)}" location-url="${C(this.locationUrl)}" submit-label="${C(this.submitLabel)}" lang="${C(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>`}};p([f({attribute:false})],h.prototype,"data",2),p([f({type:String,attribute:"data-endpoint"})],h.prototype,"endpoint",2),p([f({type:String})],h.prototype,"method",2),p([f({type:String,attribute:"publishable-key"})],h.prototype,"publishableKey",2),p([f({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),p([f({type:String,attribute:"spec-url"})],h.prototype,"specUrl",2),p([f({type:String,attribute:"submit-url"})],h.prototype,"submitUrl",2),p([f({attribute:"submit-context",converter:ge})],h.prototype,"submitContext",2),p([f({type:String,attribute:"location-url"})],h.prototype,"locationUrl",2),p([f({type:Boolean})],h.prototype,"remember",2),p([f({type:Boolean,attribute:"hide-readings",reflect:true})],h.prototype,"hideReadings",2),p([f({type:String,attribute:"hide-sections",reflect:true})],h.prototype,"hideSections",2),p([f({type:String,attribute:"brand-color"})],h.prototype,"brandColor",2),p([f({type:String,attribute:"brand-accent"})],h.prototype,"brandAccent",2),p([f({type:String})],h.prototype,"font",2),p([f({type:String})],h.prototype,"hemisphere",2),p([f({type:String,attribute:"submit-label"})],h.prototype,"submitLabel",2),p([f({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),p([f({type:String})],h.prototype,"attribution",2),p([x()],h.prototype,"loading",2),p([x()],h.prototype,"error",2),p([x()],h.prototype,"issues",2),p([x()],h.prototype,"selfFetched",2),p([x()],h.prototype,"editing",2),p([x()],h.prototype,"sticky",2),p([x()],h.prototype,"openedRow",2),p([x()],h.prototype,"openedRowId",2),p([x()],h.prototype,"moreLoading",2),p([x()],h.prototype,"moreError",2);var mr={apple:"#8db600",azure:"#007fff",blackish:"black",bluish:"blue",bottle:"#006a4e",brass:"#b5a642",brick:"#b22222",brownish:"brown",browns:"brown",burgundy:"#800020",clear:"#eef2f6",colorless:"#eef2f6",colourless:"#eef2f6",cream:"#fffdd0",creamy:"#fffdd0",emerald:"#50c878",golden:"gold",greenish:"green",lilac:"#c8a2c8",mauve:"#e0b0ff",peach:"peachpuff",pinkish:"pink",reddish:"red",rose:"#f4a6b7",royal:"royalblue",silvery:"silver",sky:"skyblue",yellowish:"yellow"},yr=new Set(["beige","black","blue","brown","crimson","cyan","gold","gray","green","grey","indigo","lavender","magenta","maroon","navy","olive","orange","pink","purple","red","salmon","silver","tan","teal","turquoise","violet","white","yellow"]),fr={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function we(n){let t=[],e=[];for(let i of n.toLowerCase().split(/[\s-]+/)){let a=fr[i];if(a){e.push(a);continue}let d=mr[i]??(yr.has(i)?i:"");d&&t.push(d)}let[r,o]=t;if(!r)return"var(--roxy-border, #e4e4e7)";let s=o?`color-mix(in srgb, ${r}, ${o})`:r;for(let[i,a]of e)s=`color-mix(in srgb, ${s} ${a}%, ${i})`;return s}var Ee=n=>t=>{customElements.get(n)||customElements.define(n,t)};var $e=new Map;function Te(n){if(!n)return["en"];let t=$e.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return $e.set(n,e),[e,"en"]}function ke(n,t){return typeof t!="number"||!Number.isInteger(t)||t<1||t>12?"":new Date(Date.UTC(2e3,t-1,1,12)).toLocaleDateString(Te(n),{month:"long",timeZone:"UTC"})}function Ae(n,t){let e=t.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(Te(n),{style:"long",type:"conjunction"}).format(e)}var $=class extends h{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"};this.listKey="crystals"}renderData(e){let r=e.crystals??[];if(r.length===0)return this.renderEmpty();let o=this.heading||this.deriveHeading(e),s="total"in e&&typeof e.total=="number"?e.total:r.length;return c`<section class="wrap" part="card" aria-label="${o}"><header class="head" part="header"><h2>${o}</h2><span class="count">${s===1?this.t("1 crystal"):this.t("{{count}} crystals",{count:s})}</span></header><ul class="grid" part="section crystals">${r.map(i=>c`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===i.id?"true":"false"}" @click="${()=>this.pickRow({id:i.id,name:i.name})}">${i.imageUrl?c`<img class="photo" src="${i.imageUrl}" alt="${i.name??this.t("Crystal")}" loading="lazy">`:c`<div class="photo" aria-hidden="true"></div>`}<p class="name">${i.name}</p>${i.colors&&i.colors.length>0?c`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:Ae(this.effectiveLang(),i.colors)})}">${i.colors.map(a=>c`<span class="swatch" style="${`background:${we(a)}`}" title="${a}"></span>`)}</div>`:l}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?c`<div class="detail" part="detail">${this.openedRow}</div>`:l}</section>`}deriveHeading(e){return"chakra"in e&&e.chakra?this.t("{{chakra}} chakra crystals",{chakra:e.chakra}):"element"in e&&e.element?this.t("{{element}} element crystals",{element:e.element}):"sign"in e&&e.sign?this.t("Crystals for {{sign}}",{sign:e.sign}):"month"in e&&typeof e.month=="number"?this.t("{{month}} birthstones",{month:ke(this.effectiveLang(),e.month)}):this.t("Crystals")}};$.endpoints=Dt,$.styles=[tt,g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.photo{aspect-ratio:1;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.colors{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.swatch{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.4lh;inline-size:.4lh}`],p([f({type:String,reflect:true})],$.prototype,"heading",2),$=p([Ee("roxy-crystal-grid")],$);return Pe(gr)})();/*! Bundled license information:
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Rt=/'/g,Ot=/"/g,Lt=/^(?:script|style|textarea|title)$/i,mt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),c=mt(1),Er=mt(2),$r=mt(3),_=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Pt=new WeakMap,k=A.createTreeWalker(A,129);function Nt(n,t){if(!ut(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return At!==void 0?At.createHTML(t):t}var Ke=(n,t)=>{let e=n.length-1,r=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=N;for(let a=0;a<e;a++){let d=n[a],y,u,m=-1,b=0;for(;b<d.length&&(i.lastIndex=b,u=i.exec(d),u!==null);)b=i.lastIndex,i===N?u[1]==="!--"?i=_t:u[1]!==void 0?i=Ct:u[2]!==void 0?(Lt.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=T):u[3]!==void 0&&(i=T):i===T?u[0]===">"?(i=o??N,m=-1):u[1]===void 0?m=-2:(m=i.lastIndex-u[2].length,y=u[1],i=u[3]===void 0?T:u[3]==='"'?Ot:Rt):i===Ot||i===Rt?i=T:i===_t||i===Ct?i=N:(i=T,o=void 0);let S=i===T&&n[a+1].startsWith("/>")?" ":"";s+=i===N?d+je:m>=0?(r.push(y),d.slice(0,m)+Ft+d.slice(m)+w+S):d+w+(m===-2?a:S)}return[Nt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},M=class n{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let s=0,i=0,a=t.length-1,d=this.parts,[y,u]=Ke(t,e);if(this.el=n.createElement(y,r),k.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=k.nextNode())!==null&&d.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(let m of o.getAttributeNames())if(m.endsWith(Ft)){let b=u[i++],S=o.getAttribute(m).split(w),j=/([.?@])?(.*)/.exec(b);d.push({type:1,index:s,name:j[2],strings:S,ctor:j[1]==="."?dt:j[1]==="?"?lt:j[1]==="@"?ct:O}),o.removeAttribute(m)}else m.startsWith(w)&&(d.push({type:6,index:s}),o.removeAttribute(m));if(Lt.test(o.tagName)){let m=o.textContent.split(w),b=m.length-1;if(b>0){o.textContent=Y?Y.emptyScript:"";for(let S=0;S<b;S++)o.append(m[S],I()),k.nextNode(),d.push({type:2,index:++s});o.append(m[b],I())}}}else if(o.nodeType===8)if(o.data===Ut)d.push({type:2,index:s});else{let m=-1;for(;(m=o.data.indexOf(w,m+1))!==-1;)d.push({type:7,index:s}),m+=w.length-1}s++}}static createElement(t,e){let r=A.createElement("template");return r.innerHTML=t,r}};function R(n,t,e=n,r){if(t===_)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,s=D(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=R(n,o._$AS(n,t.values),o,r)),t}var at=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);k.currentNode=o;let s=k.nextNode(),i=0,a=0,d=r[0];for(;d!==void 0;){if(i===d.index){let y;d.type===2?y=new G(s,s.nextSibling,this,t):d.type===1?y=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(y=new pt(s,this,t)),this._$AV.push(y),d=r[++a]}i!==d?.index&&(s=k.nextNode(),i++)}return k.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++}},G=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=R(this,t,e),D(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==_&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):He(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&&D(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=M.createElement(Nt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new at(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 M(t)),e}k(t){ut(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=kt(t).nextSibling;kt(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=R(this,t,e,0),i=!D(t)||t!==this._$AH&&t!==_,i&&(this._$AH=t);else{let a=t,d,y;for(t=s[0],d=0;d<s.length-1;d++)y=R(this,a[r+d],e,d),y===_&&(y=this._$AH[d]),i||=!D(y)||y!==this._$AH[d],y===l?t=l:t!==l&&(t+=(y??"")+s[d+1]),this._$AH[d]=y}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},dt=class extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},lt=class extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ct=class extends O{constructor(t,e,r,o,s){super(t,e,r,o,s),this.type=5}_$AI(t,e=this){if((t=R(this,t,e,0)??l)===_)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)}},pt=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){R(this,t)}};var Be=ht.litHtmlPolyfillSupport;Be?.(M,G),(ht.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 G(t.insertBefore(I(),s),s,void 0,e??{})}return o._$AI(n),o};var yt=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 _}};E._$litElement$=true,E.finalized=true,yt.litElementHydrateSupport?.({LitElement:E});var ze=yt.litElementPolyfillSupport;ze?.({LitElement:E});(yt.litElementVersions??=[]).push("4.2.2");var qe={attribute:true,type:String,converter:L,reflect:false,hasChanged:q},Ye=(n=qe,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(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,d,n,true,a)},init(a){return a!==void 0&&this.C(i,void 0,n,a),a}}}if(r==="setter"){let{name:i}=e;return function(a){let d=this[i];t.call(this,a),this.requestUpdate(i,d,n,true,a)}}throw Error("Unsupported decorator location: "+r)};function f(n){return(t,e)=>typeof e=="object"?Ye(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 Dt=[{endpoint:"crystals",method:"GET"},{endpoint:"crystals/chakra/{chakra}",method:"GET"},{endpoint:"crystals/element/{element}",method:"GET"},{endpoint:"crystals/zodiac/{sign}",method:"GET"},{endpoint:"crystals/birthstone/{month}",method:"GET"},{endpoint:"crystals/search",method:"GET"}];var C=n=>n??l;var Mt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function gt(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 Ve={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function ft(n,t){let e=n.toLowerCase();return t.find(r=>r.toLowerCase()===e)}function Gt(n,t=Mt){let e=gt(n);if(!e)return;let r=ft(e,t);if(r)return r;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(a=>a==="hans"||a==="hant")??Ve[o[1]??""];return i?ft(`zh-${i}`,t):void 0}return ft(s,t)}var Kt="symbols";var Ze={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},xt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',jt='"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:xt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:xt,display:xt},geist:{name:"Geist",sans:jt,display:jt},system:{name:"System",sans:Ht,display:Ht}};function Bt(n){let{sans:t,display:e}=Z[n];return Object.keys(Ze).filter(r=>`${t} ${e}`.includes(`"${r}"`))}var zt="1.5.0";var We=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Je=/^(.*\/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=(We.exec(e.pathname)??Je.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 er={},Xe="color-mix(in oklab, var(--roxy-accent) 70%, black)",Qe="var(--roxy-accent)",tr="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 Zt(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(${Xe},${Qe})`,`--roxy-ring:${tr}`),t.join(";")}function Wt(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,a,d;try{let y=globalThis.getComputedStyle(n),u=m=>y.getPropertyValue(m).trim();i=u("--roxy-font-sans"),a=u("--roxy-font-display"),d=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||a))return Vt(d)?d: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 Xt=qt(zt,globalThis.document?.currentScript?.src||er.url);function Qt(n,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${n}`;if(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)}function te(n,t=Xt){Bt(n).length>0&&Qt(n,t)}function ee(n=Xt){Qt(Kt,n)}var re='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var W="roxy-ui-tokens";function J(){if(typeof document>"u")return null;let n=document.getElementById(W);if(n)return n;let t=document.createElement("style");return t.id=W,t.textContent=re,document.head.prepend(t),t}function ne(n){return n.toLowerCase().replace(/[\s_-]+/g," ").trim()}var oe="__ROXY_UI_I18N__";function se(){let n=globalThis,t=n[oe];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return n[oe]=e,e}function rr(n,t){return t?n.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):n}function ie(n,t,e){return rr(nr(n,t)??t,e)}function nr(n,t){if(!n)return;let{catalogs:e}=se(),r=n.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ne(t)]}function ae(n){let{listeners:t}=se();return t.add(n),()=>{t.delete(n)}}var X=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=ae(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Q=class extends E{constructor(){super();this.translator=(e,r)=>this.t(e,r);new X(this)}connectedCallback(){super.connectedCallback(),J()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ee()}fontDeclarations(e){let r=Wt(this,e);return r?(te(r),Jt(r)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,r){return ie(this.effectiveLang(),e,r)}effectiveLang(){return gt(this)}};var de=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function le(n){return n?c`<span class="roxy-glyph" aria-hidden="true">${n}</span>`:l}var ce=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 or=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}`,tt=[or,ce,de];var sr="__cols",ir="__rows";function ar(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function et(n){if(Array.isArray(n)){let s=false,i=n.map(a=>{let d=et(a);return d!==a&&(s=true),d});return s?i:n}if(!ar(n))return n;let t=n[sr],e=n[ir];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(n).length===2)return e.map(s=>{let i={};return t.forEach((a,d)=>{i[a]=et(s[d])}),i});let r=false,o={};for(let[s,i]of Object.entries(n)){let a=et(i);a!==i&&(r=true),o[s]=a}return r?o:n}function pe(n){return et(n)}function he(n,t){return n.find(e=>e.attrs&&Object.entries(e.attrs).every(([r,o])=>t[r]===o))??n[0]}var dr="pk_live_YOUR_KEY",ue={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 me(n){if(n)return n===dr?ue.sample:n.startsWith("pk_")?void 0:ue.secret}function ye(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 fe="https://roxyapi.com/api/v2";async function lr(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 ge={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 xe(n){return n.submitUrl?void 0:me(n.publishableKey)}async function bt(n,t,e){let r=xe(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:cr(t,n.submitContext),signal:e}):await pr(n,t,e);if(!o.ok){let s=await lr(o);throw new P(s.message,s.issues,s.worded,o.status,s.code)}return await o.json()}function cr(n,t){return JSON.stringify(t?{...n,context:t}:n)}function pr(n,t,e){let r=new URL(`${n.baseUrl??fe}${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 rt=class{constructor(t){this.baseUrl=fe;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=xe(this);if(e){this.host.error=e.message,ye(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 bt(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 be(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),a={},d={};for(let[y,u]of Object.entries(o))u===void 0||u===""||(t==="GET"||i.has(y)?a[y]=u:d[y]=u);return{path:s,method:t,query:a,body:t==="POST"?d:void 0}}function ve(){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 eo=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 io=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 Se(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">${le(o.glyph)} ${o.label}</span> ${ve()} ${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 hr="roxy-data";function ur(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var nt=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(ur(t)&&t.classList.contains(hr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var h=class extends Q{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 bt(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(be(r.endpoint,r.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new nt(this),this.fetcher=new rt(this)}static{this.styles=[tt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let r=pe(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:he(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="${C(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=[Zt(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:Se(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:Gt(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="${C(this.specUrl)}" publishable-key="${C(this.publishableKey)}" location-url="${C(this.locationUrl)}" submit-label="${C(this.submitLabel)}" lang="${C(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>`}};p([f({attribute:false})],h.prototype,"data",2),p([f({type:String,attribute:"data-endpoint"})],h.prototype,"endpoint",2),p([f({type:String})],h.prototype,"method",2),p([f({type:String,attribute:"publishable-key"})],h.prototype,"publishableKey",2),p([f({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),p([f({type:String,attribute:"spec-url"})],h.prototype,"specUrl",2),p([f({type:String,attribute:"submit-url"})],h.prototype,"submitUrl",2),p([f({attribute:"submit-context",converter:ge})],h.prototype,"submitContext",2),p([f({type:String,attribute:"location-url"})],h.prototype,"locationUrl",2),p([f({type:Boolean})],h.prototype,"remember",2),p([f({type:Boolean,attribute:"hide-readings",reflect:true})],h.prototype,"hideReadings",2),p([f({type:String,attribute:"hide-sections",reflect:true})],h.prototype,"hideSections",2),p([f({type:String,attribute:"brand-color"})],h.prototype,"brandColor",2),p([f({type:String,attribute:"brand-accent"})],h.prototype,"brandAccent",2),p([f({type:String})],h.prototype,"font",2),p([f({type:String})],h.prototype,"hemisphere",2),p([f({type:String,attribute:"submit-label"})],h.prototype,"submitLabel",2),p([f({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),p([f({type:String})],h.prototype,"attribution",2),p([x()],h.prototype,"loading",2),p([x()],h.prototype,"error",2),p([x()],h.prototype,"issues",2),p([x()],h.prototype,"selfFetched",2),p([x()],h.prototype,"editing",2),p([x()],h.prototype,"sticky",2),p([x()],h.prototype,"openedRow",2),p([x()],h.prototype,"openedRowId",2),p([x()],h.prototype,"moreLoading",2),p([x()],h.prototype,"moreError",2);var mr={apple:"#8db600",azure:"#007fff",blackish:"black",bluish:"blue",bottle:"#006a4e",brass:"#b5a642",brick:"#b22222",brownish:"brown",browns:"brown",burgundy:"#800020",clear:"#eef2f6",colorless:"#eef2f6",colourless:"#eef2f6",cream:"#fffdd0",creamy:"#fffdd0",emerald:"#50c878",golden:"gold",greenish:"green",lilac:"#c8a2c8",mauve:"#e0b0ff",peach:"peachpuff",pinkish:"pink",reddish:"red",rose:"#f4a6b7",royal:"royalblue",silvery:"silver",sky:"skyblue",yellowish:"yellow"},yr=new Set(["beige","black","blue","brown","crimson","cyan","gold","gray","green","grey","indigo","lavender","magenta","maroon","navy","olive","orange","pink","purple","red","salmon","silver","tan","teal","turquoise","violet","white","yellow"]),fr={bright:["white",85],dark:["black",60],deep:["black",70],faintly:["white",30],light:["white",55],pale:["white",45],rich:["black",80]};function we(n){let t=[],e=[];for(let i of n.toLowerCase().split(/[\s-]+/)){let a=fr[i];if(a){e.push(a);continue}let d=mr[i]??(yr.has(i)?i:"");d&&t.push(d)}let[r,o]=t;if(!r)return"var(--roxy-border, #e4e4e7)";let s=o?`color-mix(in srgb, ${r}, ${o})`:r;for(let[i,a]of e)s=`color-mix(in srgb, ${s} ${a}%, ${i})`;return s}var Ee=n=>t=>{customElements.get(n)||customElements.define(n,t)};var $e=new Map;function Te(n){if(!n)return["en"];let t=$e.get(n);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(n)[0]??"en"}catch{e="en"}return $e.set(n,e),[e,"en"]}function ke(n,t){return typeof t!="number"||!Number.isInteger(t)||t<1||t>12?"":new Date(Date.UTC(2e3,t-1,1,12)).toLocaleDateString(Te(n),{month:"long",timeZone:"UTC"})}function Ae(n,t){let e=t.filter(Boolean);return e.length<2?e[0]??"":new Intl.ListFormat(Te(n),{style:"long",type:"conjunction"}).format(e)}var $=class extends h{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-crystal-card",path:"crystals/{id}"};this.listKey="crystals"}renderData(e){let r=e.crystals??[];if(r.length===0)return this.renderEmpty();let o=this.heading||this.deriveHeading(e),s="total"in e&&typeof e.total=="number"?e.total:r.length;return c`<section class="wrap" part="card" aria-label="${o}"><header class="head" part="header"><h2>${o}</h2><span class="count">${s===1?this.t("1 crystal"):this.t("{{count}} crystals",{count:s})}</span></header><ul class="grid" part="section crystals">${r.map(i=>c`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===i.id?"true":"false"}" @click="${()=>this.pickRow({id:i.id,name:i.name})}">${i.imageUrl?c`<img class="photo" src="${i.imageUrl}" alt="${i.name??this.t("Crystal")}" loading="lazy">`:c`<div class="photo" aria-hidden="true"></div>`}<p class="name">${i.name}</p>${i.colors&&i.colors.length>0?c`<div class="colors" aria-label="${this.t("Colors: {{list}}",{list:Ae(this.effectiveLang(),i.colors)})}">${i.colors.map(a=>c`<span class="swatch" style="${`background:${we(a)}`}" title="${a}"></span>`)}</div>`:l}</button></li>`)}</ul>${this.renderMore()} ${this.openedRow?c`<div class="detail" part="detail">${this.openedRow}</div>`:l}</section>`}deriveHeading(e){return"chakra"in e&&e.chakra?this.t("{{chakra}} chakra crystals",{chakra:e.chakra}):"element"in e&&e.element?this.t("{{element}} element crystals",{element:e.element}):"sign"in e&&e.sign?this.t("Crystals for {{sign}}",{sign:e.sign}):"month"in e&&typeof e.month=="number"?this.t("{{month}} birthstones",{month:ke(this.effectiveLang(),e.month)}):this.t("Crystals")}};$.endpoints=Dt,$.styles=[tt,g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,16ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.photo{aspect-ratio:1;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.colors{gap:var(--roxy-space-xs);flex-wrap:wrap;display:flex}.swatch{border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.4lh;inline-size:.4lh}`],p([f({type:String,reflect:true})],$.prototype,"heading",2),$=p([Ee("roxy-crystal-grid")],$);return Pe(gr)})();/*! Bundled license information:
4
4
 
5
5
  @lit/reactive-element/css-tag.js:
6
6
  (**
@@ -1,6 +1,6 @@
1
1
  var RoxyUI_dasha_timeline=(()=>{var B=Object.defineProperty;var Rt=Object.getOwnPropertyDescriptor;var Xe=Object.getOwnPropertyNames;var Qe=Object.prototype.hasOwnProperty;var tr=(r,t)=>{for(var e in t)B(r,e,{get:t[e],enumerable:true})},er=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xe(t))!Qe.call(r,o)&&o!==e&&B(r,o,{get:()=>t[o],enumerable:!(n=Rt(t,o))||n.enumerable});return r};var rr=r=>er(B({},"__esModule",{value:true}),r),m=(r,t,e,n)=>{for(var o=n>1?void 0:n?Rt(t,e):t,s=r.length-1,i;s>=0;s--)(i=r[s])&&(o=(n?i(t,e,o):i(o))||o);return n&&o&&B(t,e,o),o};var Kr={};tr(Kr,{ROXY_UI_TOKENS_STYLE_ID:()=>Q,RoxyDashaTimeline:()=>w,injectRoxyTokens:()=>tt});var q=globalThis,Y=q.ShadowRoot&&(q.ShadyCSS===void 0||q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dt=Symbol(),Ct=new WeakMap,D=class{constructor(t,e,n){if(this._$cssResult$=true,n!==dt)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(Y&&t===void 0){let n=e!==void 0&&e.length===1;n&&(t=Ct.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Ct.set(e,t))}return t}toString(){return this.cssText}},Ot=r=>new D(typeof r=="string"?r:r+"",void 0,dt),g=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((n,o,s)=>n+(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)+r[s+1],r[0]);return new D(e,r,dt)},Ft=(r,t)=>{if(Y)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let n=document.createElement("style"),o=q.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=e.cssText,r.appendChild(n)}},lt=Y?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return Ot(e)})(r):r;var{is:nr,defineProperty:or,getOwnPropertyDescriptor:sr,getOwnPropertyNames:ir,getOwnPropertySymbols:ar,getPrototypeOf:dr}=Object,V=globalThis,Lt=V.trustedTypes,lr=Lt?Lt.emptyScript:"",cr=V.reactiveElementPolyfillSupport,U=(r,t)=>r,N={toAttribute(r,t){switch(t){case Boolean:r=r?lr:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},W=(r,t)=>!nr(r,t),Dt={attribute:true,type:String,converter:N,reflect:false,useDefault:false,hasChanged:W};Symbol.metadata??=Symbol("metadata"),V.litPropertyMetadata??=new WeakMap;var S=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=Dt){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 n=Symbol(),o=this.getPropertyDescriptor(t,n,e);o!==void 0&&or(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){let{get:o,set:s}=sr(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,n)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??Dt}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;let t=dr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(U("properties"))){let e=this.properties,n=[...ir(e),...ar(e)];for(let o of n)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[n,o]of e)this.elementProperties.set(n,o)}this._$Eh=new Map;for(let[e,n]of this.elementProperties){let o=this._$Eu(e,n);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let o of n)e.unshift(lt(o))}else t!==void 0&&e.push(lt(t));return e}static _$Eu(t,e){let n=e.attribute;return n===false?void 0:typeof n=="string"?n: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 n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ft(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,n){this._$AK(t,n)}_$ET(t,e){let n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===true){let s=(n.converter?.toAttribute!==void 0?n.converter:N).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){let n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=n.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,n,o=false,s){if(t!==void 0){let i=this.constructor;if(o===false&&(s=this[t]),n??=i.getPropertyOptions(t),!((n.hasChanged??W)(s,e)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,e,n)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:o,wrapped:s},i){n&&!(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||n||(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 n=this.constructor.elementProperties;if(n.size>0)for(let[o,s]of n){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(n=>n.hostUpdate?.()),this.update(e)):this._$EM()}catch(n){throw t=false,this._$EM(),n}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){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[U("elementProperties")]=new Map,S[U("finalized")]=new Map,cr?.({ReactiveElement:S}),(V.reactiveElementVersions??=[]).push("2.1.2");var ft=globalThis,Ut=r=>r,Z=ft.trustedTypes,Nt=Z?Z.createPolicy("lit-html",{createHTML:r=>r}):void 0,Kt="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,zt="?"+$,hr=`<${zt}>`,A=document,M=()=>A.createComment(""),G=r=>r===null||typeof r!="object"&&typeof r!="function",gt=Array.isArray,pr=r=>gt(r)||typeof r?.[Symbol.iterator]=="function",ct=`[
2
2
  \f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,It=/-->/g,Mt=/>/g,k=RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,jt=/"/g,Bt=/^(?:script|style|textarea|title)$/i,xt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),c=xt(1),Wr=xt(2),Zr=xt(3),P=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ht=new WeakMap,T=A.createTreeWalker(A,129);function qt(r,t){if(!gt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Nt!==void 0?Nt.createHTML(t):t}var ur=(r,t)=>{let e=r.length-1,n=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=I;for(let d=0;d<e;d++){let a=r[d],p,h,u=-1,x=0;for(;x<a.length&&(i.lastIndex=x,h=i.exec(a),h!==null);)x=i.lastIndex,i===I?h[1]==="!--"?i=It:h[1]!==void 0?i=Mt:h[2]!==void 0?(Bt.test(h[2])&&(o=RegExp("</"+h[2],"g")),i=k):h[3]!==void 0&&(i=k):i===k?h[0]===">"?(i=o??I,u=-1):h[1]===void 0?u=-2:(u=i.lastIndex-h[2].length,p=h[1],i=h[3]===void 0?k:h[3]==='"'?jt:Gt):i===jt||i===Gt?i=k:i===It||i===Mt?i=I:(i=k,o=void 0);let v=i===k&&r[d+1].startsWith("/>")?" ":"";s+=i===I?a+hr:u>=0?(n.push(p),a.slice(0,u)+Kt+a.slice(u)+$+v):a+$+(u===-2?d:v)}return[qt(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},j=class r{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[p,h]=ur(t,e);if(this.el=r.createElement(p,n),T.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=T.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Kt)){let x=h[i++],v=o.getAttribute(u).split($),z=/([.?@])?(.*)/.exec(x);a.push({type:1,index:s,name:z[2],strings:v,ctor:z[1]==="."?pt:z[1]==="?"?ut:z[1]==="@"?mt:F}),o.removeAttribute(u)}else u.startsWith($)&&(a.push({type:6,index:s}),o.removeAttribute(u));if(Bt.test(o.tagName)){let u=o.textContent.split($),x=u.length-1;if(x>0){o.textContent=Z?Z.emptyScript:"";for(let v=0;v<x;v++)o.append(u[v],M()),T.nextNode(),a.push({type:2,index:++s});o.append(u[x],M())}}}else if(o.nodeType===8)if(o.data===zt)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 n=A.createElement("template");return n.innerHTML=t,n}};function O(r,t,e=r,n){if(t===P)return t;let o=n!==void 0?e._$Co?.[n]:e._$Cl,s=G(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(r),o._$AT(r,e,n)),n!==void 0?(e._$Co??=[])[n]=o:e._$Cl=o),o!==void 0&&(t=O(r,o._$AS(r,t.values),o,n)),t}var ht=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:n}=this._$AD,o=(t?.creationScope??A).importNode(e,true);T.currentNode=o;let s=T.nextNode(),i=0,d=0,a=n[0];for(;a!==void 0;){if(i===a.index){let p;a.type===2?p=new H(s,s.nextSibling,this,t):a.type===1?p=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(p=new yt(s,this,t)),this._$AV.push(p),a=n[++d]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=A,o}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},H=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,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),G(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pr(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&&G(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=j.createElement(qt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new ht(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ht.get(t.strings);return e===void 0&&Ht.set(t.strings,e=new j(t)),e}k(t){gt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,o=0;for(let s of t)o===e.length?e.push(n=new r(this.O(M()),this.O(M()),this,this.options)):n=e[o],n._$AI(s),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let n=Ut(t).nextSibling;Ut(t).remove(),t=n}}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,n,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=l}_$AI(t,e=this,n,o){let s=this.strings,i=false;if(s===void 0)t=O(this,t,e,0),i=!G(t)||t!==this._$AH&&t!==P,i&&(this._$AH=t);else{let d=t,a,p;for(t=s[0],a=0;a<s.length-1;a++)p=O(this,d[n+a],e,a),p===P&&(p=this._$AH[a]),i||=!G(p)||p!==this._$AH[a],p===l?t=l:t!==l&&(t+=(p??"")+s[a+1]),this._$AH[a]=p}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},pt=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},ut=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},mt=class extends F{constructor(t,e,n,o,s){super(t,e,n,o,s),this.type=5}_$AI(t,e=this){if((t=O(this,t,e,0)??l)===P)return;let n=this._$AH,o=t===l&&n!==l||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==l&&(n===l||o);o&&this.element.removeEventListener(this.name,this,n),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)}},yt=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}};var mr=ft.litHtmlPolyfillSupport;mr?.(j,H),(ft.litHtmlVersions??=[]).push("3.3.3");var Yt=(r,t,e)=>{let n=e?.renderBefore??t,o=n._$litPart$;if(o===void 0){let s=e?.renderBefore??null;n._$litPart$=o=new H(t.insertBefore(M(),s),s,void 0,e??{})}return o._$AI(r),o};var bt=globalThis,E=class extends S{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=Yt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return P}};E._$litElement$=true,E.finalized=true,bt.litElementHydrateSupport?.({LitElement:E});var yr=bt.litElementPolyfillSupport;yr?.({LitElement:E});(bt.litElementVersions??=[]).push("4.2.2");var fr={attribute:true,type:String,converter:N,reflect:false,hasChanged:W},gr=(r=fr,t,e)=>{let{kind:n,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),n==="setter"&&((r=Object.create(r)).wrapped=true),s.set(e.name,r),n==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,r,true,d)},init(d){return d!==void 0&&this.C(i,void 0,r,d),d}}}if(n==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,r,true,d)}}throw Error("Unsupported decorator location: "+n)};function f(r){return(t,e)=>typeof e=="object"?gr(r,t,e):((n,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,n),i?Object.getOwnPropertyDescriptor(o,s):void 0})(r,t,e)}function b(r){return f({...r,state:true,attribute:false})}var Vt=[{endpoint:"vedic-astrology/dasha/major",method:"POST",attrs:{period:"major"}},{endpoint:"vedic-astrology/dasha/current",method:"POST",attrs:{period:"current"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}",method:"POST",attrs:{period:"sub"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}",method:"POST",attrs:{period:"antara"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}",method:"POST",attrs:{period:"sookshma"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}/{sookshma}",method:"POST",attrs:{period:"prana"}}];var _=r=>r??l;var Wt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function St(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var xr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function vt(r,t){let e=r.toLowerCase();return t.find(n=>n.toLowerCase()===e)}function Zt(r,t=Wt){let e=St(r);if(!e)return;let n=vt(e,t);if(n)return n;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(d=>d==="hans"||d==="hant")??xr[o[1]??""];return i?vt(`zh-${i}`,t):void 0}return vt(s,t)}var Qt="symbols";var br={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},wt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Jt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Xt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',X={"fraunces-jost":{name:"Fraunces with Jost",sans:wt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:wt,display:wt},geist:{name:"Geist",sans:Jt,display:Jt},system:{name:"System",sans:Xt,display:Xt}};function te(r){let{sans:t,display:e}=X[r];return Object.keys(br).filter(n=>`${t} ${e}`.includes(`"${n}"`))}var ee="1.4.0";var vr=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Sr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function re(r,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let n=(vr.exec(e.pathname)??Sr.exec(e.pathname))?.[1];if(n!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${r}/dist`:`${e.origin}${n}`}var kr={},wr="color-mix(in oklab, var(--roxy-accent) 70%, black)",$r="var(--roxy-accent)",Er="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",ne=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function oe(r){return r!==void 0&&Object.hasOwn(X,r)}function se(r){let t=[];return r.brandColor&&ne.test(r.brandColor)&&t.push(`--roxy-primary:${r.brandColor}`),r.brandAccent&&ne.test(r.brandAccent)&&t.push(`--roxy-accent:${r.brandAccent}`,`--roxy-accent-ink:light-dark(${wr},${$r})`,`--roxy-ring:${Er}`),t.join(";")}function ie(r,t){if(oe(t))return t;let e=r.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=r.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,d,a;try{let p=globalThis.getComputedStyle(r),h=u=>p.getPropertyValue(u).trim();i=h("--roxy-font-sans"),d=h("--roxy-font-display"),a=h("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||d))return oe(a)?a:void 0}function ae(r){let{sans:t,display:e}=X[r];return`--roxy-font:${r};--roxy-font-sans:${t};--roxy-font-display:${e}`}var de=re(ee,globalThis.document?.currentScript?.src||kr.url);function le(r,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${r}`;if(document.getElementById(e))return;let n=document.createElement("link");n.id=e,n.rel="stylesheet",n.href=`${t}/styles/fonts/${r}.css`,document.head.append(n)}function ce(r,t=de){te(r).length>0&&le(r,t)}function he(r=de){le(Qt,r)}var pe='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var Q="roxy-ui-tokens";function tt(){if(typeof document>"u")return null;let r=document.getElementById(Q);if(r)return r;let t=document.createElement("style");return t.id=Q,t.textContent=pe,document.head.prepend(t),t}function ue(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function me(r){return r.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var ye="__ROXY_UI_I18N__";function fe(){let r=globalThis,t=r[ye];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[ye]=e,e}function Tr(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,n)=>n in t?String(t[n]??""):e):r}function ge(r,t,e){return Tr(Ar(r,t)??t,e)}function Ar(r,t){if(!r)return;let{catalogs:e}=fe(),n=r.toLowerCase();return(e[n]??e[n.split("-")[0]])?.[ue(t)]}function xe(r){let{listeners:t}=fe();return t.add(r),()=>{t.delete(r)}}var et=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=xe(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var rt=class extends E{constructor(){super();this.translator=(e,n)=>this.t(e,n);new et(this)}connectedCallback(){super.connectedCallback(),tt()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&he()}fontDeclarations(e){let n=ie(this,e);return n?(ce(n),ae(n)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,n){return ge(this.effectiveLang(),e,n)}effectiveLang(){return St(this)}};var be=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function ve(r){return r?c`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:l}var Se=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}`,nt=[Pr,Se,be];var _r="__cols",Rr="__rows";function Cr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function ot(r){if(Array.isArray(r)){let s=false,i=r.map(d=>{let a=ot(d);return a!==d&&(s=true),a});return s?i:r}if(!Cr(r))return r;let t=r[_r],e=r[Rr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=ot(s[a])}),i});let n=false,o={};for(let[s,i]of Object.entries(r)){let d=ot(i);d!==i&&(n=true),o[s]=d}return n?o:r}function we(r){return ot(r)}function $e(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([n,o])=>t[n]===o))??r[0]}var Or="pk_live_YOUR_KEY",Ee={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 ke(r){if(r)return r===Or?Ee.sample:r.startsWith("pk_")?void 0:Ee.secret}function Te(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var Ae="https://roxyapi.com/api/v2";async function Fr(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(n=>typeof n.path=="string"&&typeof n.message=="string").map(n=>({path:n.path,message:n.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:false}}var Pe={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);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,n=null,o=true,s,i){super(e);this.issues=n;this.worded=o;this.status=s;this.code=i}};function _e(r){return r.submitUrl?void 0:ke(r.publishableKey)}async function $t(r,t,e){let n=_e(r);if(n)throw new L(n.message);let o=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Lr(t,r.submitContext),signal:e}):await Dr(r,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 Lr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function Dr(r,t,e){let n=new URL(`${r.baseUrl??Ae}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&n.searchParams.set(s,String(i));let o={Accept:"application/json"};return r.publishableKey&&(o["X-API-Key"]=r.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(n,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var st=class{constructor(t){this.baseUrl=Ae;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=_e(this);if(e){this.host.error=e.message,Te(this.host,e);return}this.abort?.abort();let n=new AbortController;this.abort=n,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await $t(this,t,n.signal);if(n.signal.aborted)return;this.host.data=o}catch(o){if(n.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===n&&(this.abort=void 0),n.signal.aborted||(this.host.loading=false)}}};function Re(r,t,e,n=[]){let o={...e},s=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,h)=>{let u=o[h];return delete o[h],encodeURIComponent(String(u??""))}),i=new Set(n),d={},a={};for(let[p,h]of Object.entries(o))h===void 0||h===""||(t==="GET"||i.has(p)?d[p]=h:a[p]=h);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function Ce(){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 Oe=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 Fe=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 Le(r,t,e){let n=r.filter(o=>!!o.body);return n.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${n.map((o,s)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${ve(o.glyph)} ${o.label}</span> ${Ce()} ${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 Ur="roxy-data";function Nr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var it=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(Nr(t)&&t.classList.contains(Ur))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var y=class extends rt{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,n=this.listKey,o=this.listRows();if(!(!e||!n||!o)){this.moreLoading=true,this.moreError=null;try{let s=await $t(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[n];this.data={...this.data,...s,[n]:[...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 n=this.selfFetch();if(!n)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(Re(n.endpoint,n.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new it(this),this.fetcher=new st(this)}static{this.styles=[nt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let n=we(this.data);n!==this.data&&(this.data=n)}(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:$e(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(n){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,n),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:n},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)),n=[se(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!n)return l;let o=(n?`:host{${n}}`:"")+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,n,o){return this.hideReadings?l:Le(e,n,this.t(o??"Reading"))}renderResult(e){let n=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`${n}${this.renderAttribution()}`:n}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(),n=this.data?.total;return!this.lastRequest||!e||typeof n!="number"?l:e.length>=n?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 n=this.openedRow??document.createElement(this.rowDetail.tag);n.publishableKey=this.publishableKey,n.baseUrl=this.baseUrl,n.submitUrl=this.submitUrl,n.submitContext=this.submitContext,n.hideReadings=this.hideReadings,n.hideSections=this.hideSections;let o=this.effectiveLang();o&&n.setAttribute("lang",o),this.openedRow=n,this.openedRowId=e,n.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Zt(this)}}).then(()=>n.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 n=!!this.selfFetch();if(n&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return n?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>`}};m([f({attribute:false})],y.prototype,"data",2),m([f({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([f({type:String})],y.prototype,"method",2),m([f({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([f({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([f({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([f({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([f({attribute:"submit-context",converter:Pe})],y.prototype,"submitContext",2),m([f({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([f({type:Boolean})],y.prototype,"remember",2),m([f({type:Boolean,attribute:"hide-readings",reflect:true})],y.prototype,"hideReadings",2),m([f({type:String,attribute:"hide-sections",reflect:true})],y.prototype,"hideSections",2),m([f({type:String,attribute:"brand-color"})],y.prototype,"brandColor",2),m([f({type:String,attribute:"brand-accent"})],y.prototype,"brandAccent",2),m([f({type:String})],y.prototype,"font",2),m([f({type:String})],y.prototype,"hemisphere",2),m([f({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([f({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([f({type:String})],y.prototype,"attribution",2),m([b()],y.prototype,"loading",2),m([b()],y.prototype,"error",2),m([b()],y.prototype,"issues",2),m([b()],y.prototype,"selfFetched",2),m([b()],y.prototype,"editing",2),m([b()],y.prototype,"sticky",2),m([b()],y.prototype,"openedRow",2),m([b()],y.prototype,"openedRowId",2),m([b()],y.prototype,"moreLoading",2),m([b()],y.prototype,"moreError",2);var De=r=>t=>{customElements.get(r)||customElements.define(r,t)};var Ue=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 Et=/^\d{4}-\d{2}-\d{2}$/,Ir=/^\d{4}-\d{2}$/,je=/^\d{2}:\d{2}(:\d{2})?$/,Mr=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Ne=new Map;function K(r){if(!r)return["en"];let t=Ne.get(r);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(r)[0]??"en"}catch{e="en"}return Ne.set(r,e),[e,"en"]}var Ie=new Map;function He(r){let t=r??"",e=Ie.get(t);if(e)return e;let o={hour:new Intl.DateTimeFormat(K(r),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return Ie.set(t,o),o}function kt(r,t){return r&&t?`${r} - ${t}`:r||t}function Tt(r){let t=je.test(r)?`1970-01-01T${r}`:Et.test(r)?`${r}T00:00:00`:Ir.test(r)?`${r}-01T00:00:00`:Mr.test(r)?r.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(r)}}function R(r,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:n}=Tt(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(K(r),{month:"short",day:"numeric",year:"numeric",timeZone:n})}function Ke(r,t,e){return kt(R(r,t),R(r,e))}function Me(r,t,e){if(typeof t!="string"||t.length===0)return"";if(e==="year")return t.match(/^(\d{4})/)?.[1]??t;let{d:n,timeZone:o}=Tt(t);return Number.isNaN(n.getTime())?t:n.toLocaleString(K(r),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?He(r):{},timeZone:o})}function ze(r,t,e,n){return kt(Me(r,t,n),Me(r,e,n))}function C(r,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(K(r),{maximumFractionDigits:e})}var Gr={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Be(r,t,e){let n=typeof t=="string"?Gr[t]??me(t):"",o=typeof e=="number"?`${C(r,e,2)}\xB0`:"";return n&&o?`${n} (${o})`:n||o}function Ge(r,t,e,n=false){let o=typeof t=="string"&&Et.test(t)&&typeof e=="string"&&je.test(e)?`${t}T${e}`:t;if(typeof o!="string"||o.length===0)return"";if(Et.test(o))return R(r,o);let{d:s,timeZone:i}=Tt(o);return Number.isNaN(s.getTime())?o:s.toLocaleString(K(r),{month:"short",day:"numeric",year:"numeric",...He(r),...n?{second:"2-digit"}:{},timeZone:i})}function qe(r,t,e){return kt(Ge(r,t),Ge(r,e))}function Ye(r,t){return!t||!r?.length?"":r.map(e=>t[String(e)]?.[0]).filter(Boolean).join(", ")}var Ve=g`.roxy-tablist{gap:var(--roxy-space-xs);box-shadow:inset 0 calc(var(--roxy-line-thick) * -1) 0 var(--roxy-border);scrollbar-width:thin;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);border:none;border-bottom:var(--roxy-line-thick) solid transparent;cursor:pointer;color:var(--roxy-muted);transition:color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;flex-shrink:0}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink);border-bottom-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg)}.roxy-tab:focus-visible{outline-offset:calc(var(--roxy-line-thick) * -1);border-radius:var(--roxy-radius-sm)}`;function We(r){let{items:t,active:e,onSelect:n,label:o,idPrefix:s,controls:i=false}=r;return c`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${o}" @keydown="${a=>{if(a.key!=="ArrowRight"&&a.key!=="ArrowLeft")return;a.preventDefault();let p=t.findIndex(v=>v.id===e);if(p===-1)return;let h=a.key==="ArrowRight"?1:-1,u=t[(p+h+t.length)%t.length];if(!u)return;n(u.id);let x=a.currentTarget.getRootNode();requestAnimationFrame(()=>{x.querySelector(`#${s}-tab-${u.id}`)?.focus()})}}">${t.map(a=>c`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${a.id}" aria-selected="${e===a.id?"true":"false"}" aria-controls="${i?`${s}-panel-${a.id}`:l}" tabindex="${e===a.id?"0":"-1"}" @click="${()=>n(a.id)}">${a.label}</button>`)}</div>${i?t.filter(a=>a.id!==e).map(a=>c`<div role="tabpanel" id="${s}-panel-${a.id}" aria-labelledby="${s}-tab-${a.id}" hidden></div>`):l}`}function Ze(r){return"pranaDashas"in r?"Prana":"sookshmaDashas"in r?"Sookshma":"pratyantardashas"in r?"Pratyantardasha":"antardashas"in r?"Antardasha":"Mahadasha"}function At(r){if("sookshmaPeriod"in r&&r.sookshmaPeriod)return{source:"Sookshma",period:r.sookshmaPeriod};if("pratyantardashaPeriod"in r&&r.pratyantardashaPeriod)return{source:"Pratyantardasha",period:r.pratyantardashaPeriod};if("antardashaPeriod"in r&&r.antardashaPeriod)return{source:"Antardasha",period:r.antardashaPeriod};if("mahadashaPeriod"in r&&r.mahadashaPeriod)return{source:"Mahadasha",period:r.mahadashaPeriod}}function Pt(r){if(!r)return"";let t=[];return r.years&&t.push(`${r.years}y`),r.months&&t.push(`${r.months}m`),r.days&&t.push(`${r.days}d`),t.length?t.join(" "):"0d"}function Je(r,t){return Ye(r?.strongHouses?.length?r.strongHouses:r?.signifiedHouses,t)}function at(r,t){let e=R(r,t.startDate);return e&&e===R(r,t.endDate)?qe(r,t.startDate,t.endDate):Ke(r,t.startDate,t.endDate)}var w=class extends y{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let n=this.collectPeriods(e),o=n.length?Math.max(...n.map(h=>h.durationYears)):0,s=Hr(n.length?Math.min(...n.map(h=>h.durationYears)):0),i=this.hideReadings?[]:this.readings(e,n),d=this.frameRows(e),a=[{id:"timeline",label:this.t("Timeline")},...i.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:i.length})}]:[],...d.length?[{id:"frame",label:this.t("Chart details")}]:[]],p=a.some(h=>h.id===this.view)?this.view:"timeline";return c`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${a.length>1?We({items:a,active:p,onSelect:h=>{this.view=h},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:true}):l}<div id="roxy-dasha-panel-${p}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${a.length>1?`roxy-dasha-tab-${p}`:l}">${p==="timeline"?c`${this.period==="current"?this.renderCurrent(e):l} ${n.length>0?c`<div class="timeline" part="chart timeline" role="list">${n.map(h=>this.renderBar(h,o,s,e.houseThemes))}</div>`:l}`:l} ${p==="readings"?this.renderReadings(i):l} ${p==="frame"?this.renderFrame(d):l}</div></div>`}renderLordChain(e){let n=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return n.length>1?c`<div class="nakshatra">${n.join(" \u203A ")}</div>`:"nakshatraName"in e&&e.nakshatraName?c`<div class="nakshatra">${"nakshatraLord"in e&&e.nakshatraLord?this.t("Moon nakshatra: {{name}} (lord {{lord}})",{name:e.nakshatraName,lord:e.nakshatraLord}):this.t("Moon nakshatra: {{name}}",{name:e.nakshatraName})}</div>`:l}frameRows(e){let n=[];if("nakshatraName"in e&&e.nakshatraName){let o="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";n.push(["Moon nakshatra",`${e.nakshatraName}${o}`])}if("nakshatraLord"in e&&e.nakshatraLord&&n.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&n.push(["Moon longitude",`${C(this.effectiveLang(),e.moonLongitude,3)}\xB0 sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&n.push(["Ayanamsa",Be(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let o="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";n.push(["Balance at birth",`${Pt(e.birthDashaBalance)} of the opening ${o}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&n.push(["Cycle length",`${e.totalYears} years`]),n}renderFrame(e){return c`<dl class="roxy-facts" part="details frame">${e.map(([n,o])=>c`<div><dt>${n}</dt><dd>${o}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let n=At(e);return n?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Ze(e)),planet:n.period.planet,parent:this.t(n.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let n=At(e);if(!n)return l;let o=n.period,s=at(this.effectiveLang(),o),i=o.nominalStartDate?R(this.effectiveLang(),o.nominalStartDate):"";return c`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:o.planet,level:this.t(n.source),span:s?`, ${s}`:"",duration:typeof o.durationYears=="number"?` (${jr(this.effectiveLang(),o.durationYears)})`:""})} ${i?c`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:i})}`:l}</p>`}readings(e,n){let o=[],s=At(e);if(s?.period.interpretation&&o.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:at(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let d=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[a,p,h]of d){if(!p?.interpretation)continue;let u=Pt(h);o.push({label:this.t("{{planet}} {{level}}",{planet:p.planet,level:this.t(a)}),aside:u?this.t("{{balance}} left",{balance:u}):at(this.effectiveLang(),p),body:p.interpretation})}}let i=n.find(d=>this.isCurrent(d));return i?.interpretation&&o.push({label:`${i.planet} ${Ze(e)}`,aside:at(this.effectiveLang(),i),body:i.interpretation}),o}renderCurrent(e){if(!("mahadasha"in e))return l;let n=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return c`<div class="current" part="details current">${n.map(([o,s,i])=>{if(!s)return l;let d=Pt(i),a=Je(s.significators,e.houseThemes);return c`<div><span class="roxy-label">${this.t(o)}</span> <strong>${s.planet}</strong> ${d?c`<small>${this.t("{{balance}} left",{balance:d})}</small>`:l} ${a?c`<small class="houses">${this.t("Signifies {{houses}}",{houses:a})}</small>`:l}</div>`})}</div>`}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:"pratyantardashas"in e&&e.pratyantardashas?.length?e.pratyantardashas:"sookshmaDashas"in e&&e.sookshmaDashas?.length?e.sookshmaDashas:"pranaDashas"in e&&e.pranaDashas?.length?e.pranaDashas:[]}isCurrent(e){if(!e.startDate||!e.endDate)return false;let n=Date.now(),o=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(o)||Number.isNaN(s)?false:n>=o&&n<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let n=Date.parse(e.startDate),o=Date.parse(e.endDate),s=Date.now();return Number.isNaN(n)||Number.isNaN(o)||s<n||s>=o||o<=n?-1:(s-n)/(o-n)}renderBar(e,n,o,s){let i=e.durationYears,d=n>0?i/n*100:0,a=this.isCurrent(e),p=a?this.progressIn(e):-1,h=a?"bar-track bar-now":"bar-track",u=Je(e.significators,s),x=["bar",a?"now":"",o==="time"?"fine":""].filter(Boolean).join(" ");return c`<div class="${x}" part="label-track" role="listitem" aria-current="${a?"time":"false"}"><span><strong>${e.planet}</strong>${a?c`<span class="now-badge">${this.t("Now")}</span>`:l} </span><span class="${h}"><span class="bar-fill" style="width:${d}%"></span> ${p>=0?c`<span class="bar-progress" style="left:${p*d}%" aria-hidden="true"></span>`:l} </span><span class="dates">${ze(this.effectiveLang(),e.startDate,e.endDate,o)} </span>${u?c`<span class="houses">${this.t("Signifies {{houses}}",{houses:u})}</span>`:l}</div>`}};w.endpoints=Vt,w.styles=[nt,Oe,Ue,Fe,Ve,g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.nakshatra{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.current{gap:var(--roxy-space-md) var(--roxy-space-lg);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;margin-block-end:var(--roxy-space-md);padding-block-end:var(--roxy-space-md);display:flex}.current>div{align-content:start;min-width:0;display:grid}.current small{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.parent{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);font-size:var(--roxy-text-sm);color:var(--roxy-muted);margin:0;padding-inline-start:var(--roxy-space-sm)}.timeline{gap:var(--roxy-space-xs);display:grid}.bar{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) 16ch;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);align-items:center;row-gap:0;display:grid}.bar.now strong,.now-badge{color:var(--roxy-accent-ink)}.now-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.bar-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent);opacity:.45;height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-now .bar-fill{opacity:1}.bar-progress{inline-size:var(--roxy-line-thick);background:var(--roxy-accent-ink);position:absolute;inset-block:0}.dates{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end}.bar.fine{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr)}.bar.fine .dates{text-align:start;grid-column:1/-1;min-width:0}.bar .houses{min-width:0;color:var(--roxy-muted);font-size:var(--roxy-text-xs);grid-column:1/-1}[role=tabpanel]{padding-top:var(--roxy-space-md)}`],m([f({type:String,reflect:true})],w.prototype,"period",2),m([b()],w.prototype,"view",2),w=m([De("roxy-dasha-timeline")],w);var _t=365.25;function jr(r,t){if(t>=1)return`${C(r,t,1)} years`;let e=t*_t;if(e>=1)return`${C(r,e,e>=10?0:1)} days`;let n=e*24;return n>=1?`${C(r,n,1)} hours`:`${C(r,n*60,0)} minutes`}function Hr(r){return r>=2?"year":r>=60/_t?"month":r>=1/_t?"day":"time"}return rr(Kr)})();/*! Bundled license information:
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,jt=/"/g,Bt=/^(?:script|style|textarea|title)$/i,xt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),c=xt(1),Wr=xt(2),Zr=xt(3),P=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Ht=new WeakMap,T=A.createTreeWalker(A,129);function qt(r,t){if(!gt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Nt!==void 0?Nt.createHTML(t):t}var ur=(r,t)=>{let e=r.length-1,n=[],o,s=t===2?"<svg>":t===3?"<math>":"",i=I;for(let d=0;d<e;d++){let a=r[d],p,h,u=-1,x=0;for(;x<a.length&&(i.lastIndex=x,h=i.exec(a),h!==null);)x=i.lastIndex,i===I?h[1]==="!--"?i=It:h[1]!==void 0?i=Mt:h[2]!==void 0?(Bt.test(h[2])&&(o=RegExp("</"+h[2],"g")),i=k):h[3]!==void 0&&(i=k):i===k?h[0]===">"?(i=o??I,u=-1):h[1]===void 0?u=-2:(u=i.lastIndex-h[2].length,p=h[1],i=h[3]===void 0?k:h[3]==='"'?jt:Gt):i===jt||i===Gt?i=k:i===It||i===Mt?i=I:(i=k,o=void 0);let v=i===k&&r[d+1].startsWith("/>")?" ":"";s+=i===I?a+hr:u>=0?(n.push(p),a.slice(0,u)+Kt+a.slice(u)+$+v):a+$+(u===-2?d:v)}return[qt(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},j=class r{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let s=0,i=0,d=t.length-1,a=this.parts,[p,h]=ur(t,e);if(this.el=r.createElement(p,n),T.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=T.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Kt)){let x=h[i++],v=o.getAttribute(u).split($),z=/([.?@])?(.*)/.exec(x);a.push({type:1,index:s,name:z[2],strings:v,ctor:z[1]==="."?pt:z[1]==="?"?ut:z[1]==="@"?mt:F}),o.removeAttribute(u)}else u.startsWith($)&&(a.push({type:6,index:s}),o.removeAttribute(u));if(Bt.test(o.tagName)){let u=o.textContent.split($),x=u.length-1;if(x>0){o.textContent=Z?Z.emptyScript:"";for(let v=0;v<x;v++)o.append(u[v],M()),T.nextNode(),a.push({type:2,index:++s});o.append(u[x],M())}}}else if(o.nodeType===8)if(o.data===zt)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 n=A.createElement("template");return n.innerHTML=t,n}};function O(r,t,e=r,n){if(t===P)return t;let o=n!==void 0?e._$Co?.[n]:e._$Cl,s=G(t)?void 0:t._$litDirective$;return o?.constructor!==s&&(o?._$AO?.(false),s===void 0?o=void 0:(o=new s(r),o._$AT(r,e,n)),n!==void 0?(e._$Co??=[])[n]=o:e._$Cl=o),o!==void 0&&(t=O(r,o._$AS(r,t.values),o,n)),t}var ht=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:n}=this._$AD,o=(t?.creationScope??A).importNode(e,true);T.currentNode=o;let s=T.nextNode(),i=0,d=0,a=n[0];for(;a!==void 0;){if(i===a.index){let p;a.type===2?p=new H(s,s.nextSibling,this,t):a.type===1?p=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(p=new yt(s,this,t)),this._$AV.push(p),a=n[++d]}i!==a?.index&&(s=T.nextNode(),i++)}return T.currentNode=A,o}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},H=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,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),G(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pr(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&&G(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=j.createElement(qt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===o)this._$AH.p(e);else{let s=new ht(o,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Ht.get(t.strings);return e===void 0&&Ht.set(t.strings,e=new j(t)),e}k(t){gt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,o=0;for(let s of t)o===e.length?e.push(n=new r(this.O(M()),this.O(M()),this,this.options)):n=e[o],n._$AI(s),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let n=Ut(t).nextSibling;Ut(t).remove(),t=n}}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,n,o,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=l}_$AI(t,e=this,n,o){let s=this.strings,i=false;if(s===void 0)t=O(this,t,e,0),i=!G(t)||t!==this._$AH&&t!==P,i&&(this._$AH=t);else{let d=t,a,p;for(t=s[0],a=0;a<s.length-1;a++)p=O(this,d[n+a],e,a),p===P&&(p=this._$AH[a]),i||=!G(p)||p!==this._$AH[a],p===l?t=l:t!==l&&(t+=(p??"")+s[a+1]),this._$AH[a]=p}i&&!o&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},pt=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},ut=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},mt=class extends F{constructor(t,e,n,o,s){super(t,e,n,o,s),this.type=5}_$AI(t,e=this){if((t=O(this,t,e,0)??l)===P)return;let n=this._$AH,o=t===l&&n!==l||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==l&&(n===l||o);o&&this.element.removeEventListener(this.name,this,n),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)}},yt=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}};var mr=ft.litHtmlPolyfillSupport;mr?.(j,H),(ft.litHtmlVersions??=[]).push("3.3.3");var Yt=(r,t,e)=>{let n=e?.renderBefore??t,o=n._$litPart$;if(o===void 0){let s=e?.renderBefore??null;n._$litPart$=o=new H(t.insertBefore(M(),s),s,void 0,e??{})}return o._$AI(r),o};var bt=globalThis,E=class extends S{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=Yt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return P}};E._$litElement$=true,E.finalized=true,bt.litElementHydrateSupport?.({LitElement:E});var yr=bt.litElementPolyfillSupport;yr?.({LitElement:E});(bt.litElementVersions??=[]).push("4.2.2");var fr={attribute:true,type:String,converter:N,reflect:false,hasChanged:W},gr=(r=fr,t,e)=>{let{kind:n,metadata:o}=e,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),n==="setter"&&((r=Object.create(r)).wrapped=true),s.set(e.name,r),n==="accessor"){let{name:i}=e;return{set(d){let a=t.get.call(this);t.set.call(this,d),this.requestUpdate(i,a,r,true,d)},init(d){return d!==void 0&&this.C(i,void 0,r,d),d}}}if(n==="setter"){let{name:i}=e;return function(d){let a=this[i];t.call(this,d),this.requestUpdate(i,a,r,true,d)}}throw Error("Unsupported decorator location: "+n)};function f(r){return(t,e)=>typeof e=="object"?gr(r,t,e):((n,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,n),i?Object.getOwnPropertyDescriptor(o,s):void 0})(r,t,e)}function b(r){return f({...r,state:true,attribute:false})}var Vt=[{endpoint:"vedic-astrology/dasha/major",method:"POST",attrs:{period:"major"}},{endpoint:"vedic-astrology/dasha/current",method:"POST",attrs:{period:"current"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}",method:"POST",attrs:{period:"sub"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}",method:"POST",attrs:{period:"antara"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}",method:"POST",attrs:{period:"sookshma"}},{endpoint:"vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}/{sookshma}",method:"POST",attrs:{period:"prana"}}];var _=r=>r??l;var Wt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function St(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var xr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function vt(r,t){let e=r.toLowerCase();return t.find(n=>n.toLowerCase()===e)}function Zt(r,t=Wt){let e=St(r);if(!e)return;let n=vt(e,t);if(n)return n;let o=e.toLowerCase().split("-"),s=o[0];if(s==="zh"){let i=o.find(d=>d==="hans"||d==="hant")??xr[o[1]??""];return i?vt(`zh-${i}`,t):void 0}return vt(s,t)}var Qt="symbols";var br={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},wt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Jt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Xt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',X={"fraunces-jost":{name:"Fraunces with Jost",sans:wt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:wt,display:wt},geist:{name:"Geist",sans:Jt,display:Jt},system:{name:"System",sans:Xt,display:Xt}};function te(r){let{sans:t,display:e}=X[r];return Object.keys(br).filter(n=>`${t} ${e}`.includes(`"${n}"`))}var ee="1.5.0";var vr=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Sr=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function re(r,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let n=(vr.exec(e.pathname)??Sr.exec(e.pathname))?.[1];if(n!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${r}/dist`:`${e.origin}${n}`}var kr={},wr="color-mix(in oklab, var(--roxy-accent) 70%, black)",$r="var(--roxy-accent)",Er="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",ne=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function oe(r){return r!==void 0&&Object.hasOwn(X,r)}function se(r){let t=[];return r.brandColor&&ne.test(r.brandColor)&&t.push(`--roxy-primary:${r.brandColor}`),r.brandAccent&&ne.test(r.brandAccent)&&t.push(`--roxy-accent:${r.brandAccent}`,`--roxy-accent-ink:light-dark(${wr},${$r})`,`--roxy-ring:${Er}`),t.join(";")}function ie(r,t){if(oe(t))return t;let e=r.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let o=r.shadowRoot?.firstElementChild,s=o?.localName==="style"?o:null;s?.sheet&&(s.sheet.disabled=true);let i,d,a;try{let p=globalThis.getComputedStyle(r),h=u=>p.getPropertyValue(u).trim();i=h("--roxy-font-sans"),d=h("--roxy-font-display"),a=h("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||d))return oe(a)?a:void 0}function ae(r){let{sans:t,display:e}=X[r];return`--roxy-font:${r};--roxy-font-sans:${t};--roxy-font-display:${e}`}var de=re(ee,globalThis.document?.currentScript?.src||kr.url);function le(r,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${r}`;if(document.getElementById(e))return;let n=document.createElement("link");n.id=e,n.rel="stylesheet",n.href=`${t}/styles/fonts/${r}.css`,document.head.append(n)}function ce(r,t=de){te(r).length>0&&le(r,t)}function he(r=de){le(Qt,r)}var pe='@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-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--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-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--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);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}: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);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var Q="roxy-ui-tokens";function tt(){if(typeof document>"u")return null;let r=document.getElementById(Q);if(r)return r;let t=document.createElement("style");return t.id=Q,t.textContent=pe,document.head.prepend(t),t}function ue(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function me(r){return r.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var ye="__ROXY_UI_I18N__";function fe(){let r=globalThis,t=r[ye];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[ye]=e,e}function Tr(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,n)=>n in t?String(t[n]??""):e):r}function ge(r,t,e){return Tr(Ar(r,t)??t,e)}function Ar(r,t){if(!r)return;let{catalogs:e}=fe(),n=r.toLowerCase();return(e[n]??e[n.split("-")[0]])?.[ue(t)]}function xe(r){let{listeners:t}=fe();return t.add(r),()=>{t.delete(r)}}var et=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=xe(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var rt=class extends E{constructor(){super();this.translator=(e,n)=>this.t(e,n);new et(this)}connectedCallback(){super.connectedCallback(),tt()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&he()}fontDeclarations(e){let n=ie(this,e);return n?(ce(n),ae(n)):""}renderFontStyle(){let e=this.fontDeclarations();return e?c`<style>:host{${e}}</style>`:l}t(e,n){return ge(this.effectiveLang(),e,n)}effectiveLang(){return St(this)}};var be=g`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function ve(r){return r?c`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:l}var Se=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}`,nt=[Pr,Se,be];var _r="__cols",Rr="__rows";function Cr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function ot(r){if(Array.isArray(r)){let s=false,i=r.map(d=>{let a=ot(d);return a!==d&&(s=true),a});return s?i:r}if(!Cr(r))return r;let t=r[_r],e=r[Rr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(s=>{let i={};return t.forEach((d,a)=>{i[d]=ot(s[a])}),i});let n=false,o={};for(let[s,i]of Object.entries(r)){let d=ot(i);d!==i&&(n=true),o[s]=d}return n?o:r}function we(r){return ot(r)}function $e(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([n,o])=>t[n]===o))??r[0]}var Or="pk_live_YOUR_KEY",Ee={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 ke(r){if(r)return r===Or?Ee.sample:r.startsWith("pk_")?void 0:Ee.secret}function Te(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var Ae="https://roxyapi.com/api/v2";async function Fr(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(n=>typeof n.path=="string"&&typeof n.message=="string").map(n=>({path:n.path,message:n.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:false}}var Pe={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);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,n=null,o=true,s,i){super(e);this.issues=n;this.worded=o;this.status=s;this.code=i}};function _e(r){return r.submitUrl?void 0:ke(r.publishableKey)}async function $t(r,t,e){let n=_e(r);if(n)throw new L(n.message);let o=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Lr(t,r.submitContext),signal:e}):await Dr(r,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 Lr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function Dr(r,t,e){let n=new URL(`${r.baseUrl??Ae}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&n.searchParams.set(s,String(i));let o={Accept:"application/json"};return r.publishableKey&&(o["X-API-Key"]=r.publishableKey),t.body!=null&&(o["Content-Type"]="application/json"),fetch(n,{method:t.method??"GET",headers:o,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var st=class{constructor(t){this.baseUrl=Ae;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=_e(this);if(e){this.host.error=e.message,Te(this.host,e);return}this.abort?.abort();let n=new AbortController;this.abort=n,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let o=await $t(this,t,n.signal);if(n.signal.aborted)return;this.host.data=o}catch(o){if(n.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===n&&(this.abort=void 0),n.signal.aborted||(this.host.loading=false)}}};function Re(r,t,e,n=[]){let o={...e},s=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,h)=>{let u=o[h];return delete o[h],encodeURIComponent(String(u??""))}),i=new Set(n),d={},a={};for(let[p,h]of Object.entries(o))h===void 0||h===""||(t==="GET"||i.has(p)?d[p]=h:a[p]=h);return{path:s,method:t,query:d,body:t==="POST"?a:void 0}}function Ce(){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 Oe=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 Fe=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 Le(r,t,e){let n=r.filter(o=>!!o.body);return n.length===0?l:c`<section class="block" part="section readings"><h3>${e}</h3>${n.map((o,s)=>c`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${ve(o.glyph)} ${o.label}</span> ${Ce()} ${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 Ur="roxy-data";function Nr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var it=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(Nr(t)&&t.classList.contains(Ur))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var y=class extends rt{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,n=this.listKey,o=this.listRows();if(!(!e||!n||!o)){this.moreLoading=true,this.moreError=null;try{let s=await $t(this.fetcher,{...e,query:{...e.query,offset:o.length}});if(this.lastRequest!==e)return;let i=s[n];this.data={...this.data,...s,[n]:[...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 n=this.selfFetch();if(!n)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(Re(n.endpoint,n.method,{...o.values,...this.ownRequest()},o.queryKeys??[]))};new it(this),this.fetcher=new st(this)}static{this.styles=[nt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let n=we(this.data);n!==this.data&&(this.data=n)}(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:$e(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(n){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,n),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:n},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)),n=[se(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!n)return l;let o=(n?`:host{${n}}`:"")+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,n,o){return this.hideReadings?l:Le(e,n,this.t(o??"Reading"))}renderResult(e){let n=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`${n}${this.renderAttribution()}`:n}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(),n=this.data?.total;return!this.lastRequest||!e||typeof n!="number"?l:e.length>=n?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 n=this.openedRow??document.createElement(this.rowDetail.tag);n.publishableKey=this.publishableKey,n.baseUrl=this.baseUrl,n.submitUrl=this.submitUrl,n.submitContext=this.submitContext,n.hideReadings=this.hideReadings,n.hideSections=this.hideSections;let o=this.effectiveLang();o&&n.setAttribute("lang",o),this.openedRow=n,this.openedRowId=e,n.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Zt(this)}}).then(()=>n.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 n=!!this.selfFetch();if(n&&this.issues)return this.renderForm();let o=this.renderErrorBanner(e);return n?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>`}};m([f({attribute:false})],y.prototype,"data",2),m([f({type:String,attribute:"data-endpoint"})],y.prototype,"endpoint",2),m([f({type:String})],y.prototype,"method",2),m([f({type:String,attribute:"publishable-key"})],y.prototype,"publishableKey",2),m([f({type:String,attribute:"base-url"})],y.prototype,"baseUrl",2),m([f({type:String,attribute:"spec-url"})],y.prototype,"specUrl",2),m([f({type:String,attribute:"submit-url"})],y.prototype,"submitUrl",2),m([f({attribute:"submit-context",converter:Pe})],y.prototype,"submitContext",2),m([f({type:String,attribute:"location-url"})],y.prototype,"locationUrl",2),m([f({type:Boolean})],y.prototype,"remember",2),m([f({type:Boolean,attribute:"hide-readings",reflect:true})],y.prototype,"hideReadings",2),m([f({type:String,attribute:"hide-sections",reflect:true})],y.prototype,"hideSections",2),m([f({type:String,attribute:"brand-color"})],y.prototype,"brandColor",2),m([f({type:String,attribute:"brand-accent"})],y.prototype,"brandAccent",2),m([f({type:String})],y.prototype,"font",2),m([f({type:String})],y.prototype,"hemisphere",2),m([f({type:String,attribute:"submit-label"})],y.prototype,"submitLabel",2),m([f({type:String,attribute:"error-message"})],y.prototype,"errorMessage",2),m([f({type:String})],y.prototype,"attribution",2),m([b()],y.prototype,"loading",2),m([b()],y.prototype,"error",2),m([b()],y.prototype,"issues",2),m([b()],y.prototype,"selfFetched",2),m([b()],y.prototype,"editing",2),m([b()],y.prototype,"sticky",2),m([b()],y.prototype,"openedRow",2),m([b()],y.prototype,"openedRowId",2),m([b()],y.prototype,"moreLoading",2),m([b()],y.prototype,"moreError",2);var De=r=>t=>{customElements.get(r)||customElements.define(r,t)};var Ue=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 Et=/^\d{4}-\d{2}-\d{2}$/,Ir=/^\d{4}-\d{2}$/,je=/^\d{2}:\d{2}(:\d{2})?$/,Mr=/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,Ne=new Map;function K(r){if(!r)return["en"];let t=Ne.get(r);if(t)return[t,"en"];let e="en";try{e=Intl.getCanonicalLocales(r)[0]??"en"}catch{e="en"}return Ne.set(r,e),[e,"en"]}var Ie=new Map;function He(r){let t=r??"",e=Ie.get(t);if(e)return e;let o={hour:new Intl.DateTimeFormat(K(r),{timeStyle:"short",timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2e3,0,1,1))).find(s=>s.type==="hour")?.value?.length===2?"2-digit":"numeric",minute:"2-digit"};return Ie.set(t,o),o}function kt(r,t){return r&&t?`${r} - ${t}`:r||t}function Tt(r){let t=je.test(r)?`1970-01-01T${r}`:Et.test(r)?`${r}T00:00:00`:Ir.test(r)?`${r}-01T00:00:00`:Mr.test(r)?r.replace(" ","T"):null;return t?{d:new Date(`${t}Z`),timeZone:"UTC"}:{d:new Date(r)}}function R(r,t){if(typeof t!="string"||t.length===0)return"";let{d:e,timeZone:n}=Tt(t);return Number.isNaN(e.getTime())?t:e.toLocaleDateString(K(r),{month:"short",day:"numeric",year:"numeric",timeZone:n})}function Ke(r,t,e){return kt(R(r,t),R(r,e))}function Me(r,t,e){if(typeof t!="string"||t.length===0)return"";if(e==="year")return t.match(/^(\d{4})/)?.[1]??t;let{d:n,timeZone:o}=Tt(t);return Number.isNaN(n.getTime())?t:n.toLocaleString(K(r),{day:e==="month"?void 0:"numeric",month:"short",year:"numeric",...e==="time"?He(r):{},timeZone:o})}function ze(r,t,e,n){return kt(Me(r,t,n),Me(r,e,n))}function C(r,t,e=1){return typeof t!="number"||!Number.isFinite(t)?"":t.toLocaleString(K(r),{maximumFractionDigits:e})}var Gr={"kp-newcomb":"KP Newcomb","kp-old":"KP Old",lahiri:"Lahiri",raman:"B.V. Raman",custom:"Custom"};function Be(r,t,e){let n=typeof t=="string"?Gr[t]??me(t):"",o=typeof e=="number"?`${C(r,e,2)}\xB0`:"";return n&&o?`${n} (${o})`:n||o}function Ge(r,t,e,n=false){let o=typeof t=="string"&&Et.test(t)&&typeof e=="string"&&je.test(e)?`${t}T${e}`:t;if(typeof o!="string"||o.length===0)return"";if(Et.test(o))return R(r,o);let{d:s,timeZone:i}=Tt(o);return Number.isNaN(s.getTime())?o:s.toLocaleString(K(r),{month:"short",day:"numeric",year:"numeric",...He(r),...n?{second:"2-digit"}:{},timeZone:i})}function qe(r,t,e){return kt(Ge(r,t),Ge(r,e))}function Ye(r,t){return!t||!r?.length?"":r.map(e=>t[String(e)]?.[0]).filter(Boolean).join(", ")}var Ve=g`.roxy-tablist{gap:var(--roxy-space-xs);box-shadow:inset 0 calc(var(--roxy-line-thick) * -1) 0 var(--roxy-border);scrollbar-width:thin;min-width:0;display:flex;overflow-x:auto}.roxy-tab{padding:var(--roxy-space-xs) var(--roxy-space-md);font-size:var(--roxy-text-sm);border:none;border-bottom:var(--roxy-line-thick) solid transparent;cursor:pointer;color:var(--roxy-muted);transition:color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;flex-shrink:0}.roxy-tab[aria-selected=true]{color:var(--roxy-accent-ink);border-bottom-color:var(--roxy-accent);font-weight:var(--roxy-weight-bold)}.roxy-tab:hover:not([aria-selected=true]){color:var(--roxy-fg)}.roxy-tab:focus-visible{outline-offset:calc(var(--roxy-line-thick) * -1);border-radius:var(--roxy-radius-sm)}`;function We(r){let{items:t,active:e,onSelect:n,label:o,idPrefix:s,controls:i=false}=r;return c`<div class="roxy-tablist" part="tablist" role="tablist" aria-label="${o}" @keydown="${a=>{if(a.key!=="ArrowRight"&&a.key!=="ArrowLeft")return;a.preventDefault();let p=t.findIndex(v=>v.id===e);if(p===-1)return;let h=a.key==="ArrowRight"?1:-1,u=t[(p+h+t.length)%t.length];if(!u)return;n(u.id);let x=a.currentTarget.getRootNode();requestAnimationFrame(()=>{x.querySelector(`#${s}-tab-${u.id}`)?.focus()})}}">${t.map(a=>c`<button type="button" class="roxy-tab" part="tab" role="tab" id="${s}-tab-${a.id}" aria-selected="${e===a.id?"true":"false"}" aria-controls="${i?`${s}-panel-${a.id}`:l}" tabindex="${e===a.id?"0":"-1"}" @click="${()=>n(a.id)}">${a.label}</button>`)}</div>${i?t.filter(a=>a.id!==e).map(a=>c`<div role="tabpanel" id="${s}-panel-${a.id}" aria-labelledby="${s}-tab-${a.id}" hidden></div>`):l}`}function Ze(r){return"pranaDashas"in r?"Prana":"sookshmaDashas"in r?"Sookshma":"pratyantardashas"in r?"Pratyantardasha":"antardashas"in r?"Antardasha":"Mahadasha"}function At(r){if("sookshmaPeriod"in r&&r.sookshmaPeriod)return{source:"Sookshma",period:r.sookshmaPeriod};if("pratyantardashaPeriod"in r&&r.pratyantardashaPeriod)return{source:"Pratyantardasha",period:r.pratyantardashaPeriod};if("antardashaPeriod"in r&&r.antardashaPeriod)return{source:"Antardasha",period:r.antardashaPeriod};if("mahadashaPeriod"in r&&r.mahadashaPeriod)return{source:"Mahadasha",period:r.mahadashaPeriod}}function Pt(r){if(!r)return"";let t=[];return r.years&&t.push(`${r.years}y`),r.months&&t.push(`${r.months}m`),r.days&&t.push(`${r.days}d`),t.length?t.join(" "):"0d"}function Je(r,t){return Ye(r?.strongHouses?.length?r.strongHouses:r?.signifiedHouses,t)}function at(r,t){let e=R(r,t.startDate);return e&&e===R(r,t.endDate)?qe(r,t.startDate,t.endDate):Ke(r,t.startDate,t.endDate)}var w=class extends y{constructor(){super(...arguments);this.period="current";this.view="timeline"}renderData(e){let n=this.collectPeriods(e),o=n.length?Math.max(...n.map(h=>h.durationYears)):0,s=Hr(n.length?Math.min(...n.map(h=>h.durationYears)):0),i=this.hideReadings?[]:this.readings(e,n),d=this.frameRows(e),a=[{id:"timeline",label:this.t("Timeline")},...i.length?[{id:"readings",label:this.t("Readings ({{count}})",{count:i.length})}]:[],...d.length?[{id:"frame",label:this.t("Chart details")}]:[]],p=a.some(h=>h.id===this.view)?this.view:"timeline";return c`<div class="wrap" part="card" aria-label="${this.t("Dasha timeline")}"><header class="head" part="header"><h2 class="title">${this.heading(e)}</h2>${this.renderLordChain(e)}</header>${this.renderParentMahadasha(e)} ${a.length>1?We({items:a,active:p,onSelect:h=>{this.view=h},label:this.t("Dasha views"),idPrefix:"roxy-dasha",controls:true}):l}<div id="roxy-dasha-panel-${p}" part="panel" role="tabpanel" tabindex="0" aria-labelledby="${a.length>1?`roxy-dasha-tab-${p}`:l}">${p==="timeline"?c`${this.period==="current"?this.renderCurrent(e):l} ${n.length>0?c`<div class="timeline" part="chart timeline" role="list">${n.map(h=>this.renderBar(h,o,s,e.houseThemes))}</div>`:l}`:l} ${p==="readings"?this.renderReadings(i):l} ${p==="frame"?this.renderFrame(d):l}</div></div>`}renderLordChain(e){let n=["mahadashaLord"in e?e.mahadashaLord:void 0,"antardashaLord"in e?e.antardashaLord:void 0,"pratyantardashaLord"in e?e.pratyantardashaLord:void 0,"sookshmaLord"in e?e.sookshmaLord:void 0].filter(Boolean);return n.length>1?c`<div class="nakshatra">${n.join(" \u203A ")}</div>`:"nakshatraName"in e&&e.nakshatraName?c`<div class="nakshatra">${"nakshatraLord"in e&&e.nakshatraLord?this.t("Moon nakshatra: {{name}} (lord {{lord}})",{name:e.nakshatraName,lord:e.nakshatraLord}):this.t("Moon nakshatra: {{name}}",{name:e.nakshatraName})}</div>`:l}frameRows(e){let n=[];if("nakshatraName"in e&&e.nakshatraName){let o="moonNakshatra"in e&&e.moonNakshatra?` (${e.moonNakshatra} of 27)`:"";n.push(["Moon nakshatra",`${e.nakshatraName}${o}`])}if("nakshatraLord"in e&&e.nakshatraLord&&n.push(["Nakshatra lord",e.nakshatraLord]),"moonLongitude"in e&&typeof e.moonLongitude=="number"&&n.push(["Moon longitude",`${C(this.effectiveLang(),e.moonLongitude,3)}\xB0 sidereal`]),"ayanamsaType"in e&&e.ayanamsaType&&n.push(["Ayanamsa",Be(this.effectiveLang(),e.ayanamsaType,"ayanamsa"in e?e.ayanamsa:void 0)]),"birthDashaBalance"in e&&e.birthDashaBalance){let o="nakshatraLord"in e&&e.nakshatraLord?`${e.nakshatraLord} `:"";n.push(["Balance at birth",`${Pt(e.birthDashaBalance)} of the opening ${o}mahadasha`])}return"totalYears"in e&&typeof e.totalYears=="number"&&n.push(["Cycle length",`${e.totalYears} years`]),n}renderFrame(e){return c`<dl class="roxy-facts" part="details frame">${e.map(([n,o])=>c`<div><dt>${n}</dt><dd>${o}</dd></div>`)}</dl>`}renderReadings(e){return this.renderInterpretation(e,"roxy-dasha",e.length===1?"Reading":"Readings")}heading(e){let n=At(e);return n?this.t("{{level}} periods in {{planet}} {{parent}}",{level:this.t(Ze(e)),planet:n.period.planet,parent:this.t(n.source)}):"mahadashas"in e?this.t("Vimshottari Mahadasha"):"mahadasha"in e?this.t("Active dashas"):this.period==="major"?this.t("Vimshottari Mahadasha"):this.t("Active dashas")}renderParentMahadasha(e){let n=At(e);if(!n)return l;let o=n.period,s=at(this.effectiveLang(),o),i=o.nominalStartDate?R(this.effectiveLang(),o.nominalStartDate):"";return c`<p class="parent">${this.t("Inside the {{planet}} {{level}}{{span}}{{duration}}.",{planet:o.planet,level:this.t(n.source),span:s?`, ${s}`:"",duration:typeof o.durationYears=="number"?` (${jr(this.effectiveLang(),o.durationYears)})`:""})} ${i?c`<br>${this.t("It began {{date}}, before birth, so only the sub-periods running after the birth date are listed.",{date:i})}`:l}</p>`}readings(e,n){let o=[],s=At(e);if(s?.period.interpretation&&o.push({label:this.t("{{planet}} {{level}}",{planet:s.period.planet,level:this.t(s.source)}),aside:at(this.effectiveLang(),s.period),body:s.period.interpretation}),"mahadasha"in e){let d=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];for(let[a,p,h]of d){if(!p?.interpretation)continue;let u=Pt(h);o.push({label:this.t("{{planet}} {{level}}",{planet:p.planet,level:this.t(a)}),aside:u?this.t("{{balance}} left",{balance:u}):at(this.effectiveLang(),p),body:p.interpretation})}}let i=n.find(d=>this.isCurrent(d));return i?.interpretation&&o.push({label:`${i.planet} ${Ze(e)}`,aside:at(this.effectiveLang(),i),body:i.interpretation}),o}renderCurrent(e){if(!("mahadasha"in e))return l;let n=[["Mahadasha",e.mahadasha,e.remainingInMahadasha],["Antardasha",e.antardasha,e.remainingInAntardasha],["Pratyantardasha",e.pratyantardasha,e.remainingInPratyantardasha],["Sookshma",e.sookshmaDasha,e.remainingInSookshma],["Prana",e.pranaDasha,e.remainingInPrana]];return c`<div class="current" part="details current">${n.map(([o,s,i])=>{if(!s)return l;let d=Pt(i),a=Je(s.significators,e.houseThemes);return c`<div><span class="roxy-label">${this.t(o)}</span> <strong>${s.planet}</strong> ${d?c`<small>${this.t("{{balance}} left",{balance:d})}</small>`:l} ${a?c`<small class="houses">${this.t("Signifies {{houses}}",{houses:a})}</small>`:l}</div>`})}</div>`}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:"pratyantardashas"in e&&e.pratyantardashas?.length?e.pratyantardashas:"sookshmaDashas"in e&&e.sookshmaDashas?.length?e.sookshmaDashas:"pranaDashas"in e&&e.pranaDashas?.length?e.pranaDashas:[]}isCurrent(e){if(!e.startDate||!e.endDate)return false;let n=Date.now(),o=Date.parse(e.startDate),s=Date.parse(e.endDate);return Number.isNaN(o)||Number.isNaN(s)?false:n>=o&&n<s}progressIn(e){if(!e.startDate||!e.endDate)return-1;let n=Date.parse(e.startDate),o=Date.parse(e.endDate),s=Date.now();return Number.isNaN(n)||Number.isNaN(o)||s<n||s>=o||o<=n?-1:(s-n)/(o-n)}renderBar(e,n,o,s){let i=e.durationYears,d=n>0?i/n*100:0,a=this.isCurrent(e),p=a?this.progressIn(e):-1,h=a?"bar-track bar-now":"bar-track",u=Je(e.significators,s),x=["bar",a?"now":"",o==="time"?"fine":""].filter(Boolean).join(" ");return c`<div class="${x}" part="label-track" role="listitem" aria-current="${a?"time":"false"}"><span><strong>${e.planet}</strong>${a?c`<span class="now-badge">${this.t("Now")}</span>`:l} </span><span class="${h}"><span class="bar-fill" style="width:${d}%"></span> ${p>=0?c`<span class="bar-progress" style="left:${p*d}%" aria-hidden="true"></span>`:l} </span><span class="dates">${ze(this.effectiveLang(),e.startDate,e.endDate,o)} </span>${u?c`<span class="houses">${this.t("Signifies {{houses}}",{houses:u})}</span>`:l}</div>`}};w.endpoints=Vt,w.styles=[nt,Oe,Ue,Fe,Ve,g`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:center;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.title{margin:0}.nakshatra{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.current{gap:var(--roxy-space-md) var(--roxy-space-lg);border-block-end:1px solid var(--roxy-border);flex-wrap:wrap;margin-block-end:var(--roxy-space-md);padding-block-end:var(--roxy-space-md);display:flex}.current>div{align-content:start;min-width:0;display:grid}.current small{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}.parent{border-inline-start:var(--roxy-line-thick) solid var(--roxy-border);font-size:var(--roxy-text-sm);color:var(--roxy-muted);margin:0;padding-inline-start:var(--roxy-space-sm)}.timeline{gap:var(--roxy-space-xs);display:grid}.bar{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr) 16ch;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);align-items:center;row-gap:0;display:grid}.bar.now strong,.now-badge{color:var(--roxy-accent-ink)}.now-badge{font-size:var(--roxy-text-xs);font-weight:var(--roxy-weight-bold);margin-inline-start:var(--roxy-space-xs)}.bar-track{background:var(--roxy-border);border-radius:var(--roxy-radius-full);block-size:.6lh;position:relative;overflow:hidden}.bar-fill{background:var(--roxy-accent);opacity:.45;height:100%;transition:width var(--roxy-motion-duration) var(--roxy-motion-easing);display:block}.bar-now .bar-fill{opacity:1}.bar-progress{inline-size:var(--roxy-line-thick);background:var(--roxy-accent-ink);position:absolute;inset-block:0}.dates{color:var(--roxy-muted);font-size:var(--roxy-text-xs);font-variant-numeric:tabular-nums;text-align:end}.bar.fine{grid-template-columns:var(--roxy-label-col) minmax(0, 1fr)}.bar.fine .dates{text-align:start;grid-column:1/-1;min-width:0}.bar .houses{min-width:0;color:var(--roxy-muted);font-size:var(--roxy-text-xs);grid-column:1/-1}[role=tabpanel]{padding-top:var(--roxy-space-md)}`],m([f({type:String,reflect:true})],w.prototype,"period",2),m([b()],w.prototype,"view",2),w=m([De("roxy-dasha-timeline")],w);var _t=365.25;function jr(r,t){if(t>=1)return`${C(r,t,1)} years`;let e=t*_t;if(e>=1)return`${C(r,e,e>=10?0:1)} days`;let n=e*24;return n>=1?`${C(r,n,1)} hours`:`${C(r,n*60,0)} minutes`}function Hr(r){return r>=2?"year":r>=60/_t?"month":r>=1/_t?"day":"time"}return rr(Kr)})();/*! Bundled license information:
4
4
 
5
5
  @lit/reactive-element/css-tag.js:
6
6
  (**