@roxyapi/ui 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/AGENTS.md +6 -0
  2. package/README.md +6 -0
  3. package/components-catalog.json +111 -1
  4. package/dist/cdn/components/astrocartography-map.js +58 -0
  5. package/dist/cdn/components/astrocartography-map.js.map +7 -0
  6. package/dist/cdn/components/divisional-chart.js +7 -7
  7. package/dist/cdn/components/divisional-chart.js.map +1 -1
  8. package/dist/cdn/components/dosha-card.js +2 -2
  9. package/dist/cdn/components/dosha-card.js.map +3 -3
  10. package/dist/cdn/components/fixed-stars.js +52 -0
  11. package/dist/cdn/components/fixed-stars.js.map +7 -0
  12. package/dist/cdn/components/hd-variables.js +2 -2
  13. package/dist/cdn/components/hd-variables.js.map +3 -3
  14. package/dist/cdn/components/hexagram.js +3 -3
  15. package/dist/cdn/components/hexagram.js.map +3 -3
  16. package/dist/cdn/components/local-space-compass.js +58 -0
  17. package/dist/cdn/components/local-space-compass.js.map +7 -0
  18. package/dist/cdn/components/moon-phase.js +3 -3
  19. package/dist/cdn/components/moon-phase.js.map +3 -3
  20. package/dist/cdn/components/natal-chart.js +8 -8
  21. package/dist/cdn/components/natal-chart.js.map +2 -2
  22. package/dist/cdn/components/positions-table.js +52 -0
  23. package/dist/cdn/components/positions-table.js.map +7 -0
  24. package/dist/cdn/components/profection-card.js +52 -0
  25. package/dist/cdn/components/profection-card.js.map +7 -0
  26. package/dist/cdn/components/reference-card.js +3 -3
  27. package/dist/cdn/components/reference-card.js.map +3 -3
  28. package/dist/cdn/components/relocation-wheel.js +61 -0
  29. package/dist/cdn/components/relocation-wheel.js.map +7 -0
  30. package/dist/cdn/components/synastry-chart.js +4 -4
  31. package/dist/cdn/components/synastry-chart.js.map +2 -2
  32. package/dist/cdn/components/vedic-kundli.js +5 -5
  33. package/dist/cdn/components/vedic-kundli.js.map +1 -1
  34. package/dist/cdn/components/vedic-planets-table.js +2 -2
  35. package/dist/cdn/components/vedic-planets-table.js.map +1 -1
  36. package/dist/cdn/components/western-planets-table.js +2 -2
  37. package/dist/cdn/components/western-planets-table.js.map +1 -1
  38. package/dist/cdn/components/yoga-list.js +3 -3
  39. package/dist/cdn/components/yoga-list.js.map +3 -3
  40. package/dist/cdn/roxy-ui.js +83 -71
  41. package/dist/cdn/roxy-ui.js.map +4 -4
  42. package/dist/components/astrocartography-map.d.ts +27 -0
  43. package/dist/components/astrocartography-map.d.ts.map +1 -0
  44. package/dist/components/astrocartography-map.js +8 -0
  45. package/dist/components/astrocartography-map.js.map +7 -0
  46. package/dist/components/divisional-chart.js +22 -22
  47. package/dist/components/divisional-chart.js.map +1 -1
  48. package/dist/components/dosha-card.d.ts.map +1 -1
  49. package/dist/components/dosha-card.js +1 -1
  50. package/dist/components/dosha-card.js.map +3 -3
  51. package/dist/components/fixed-stars.d.ts +21 -0
  52. package/dist/components/fixed-stars.d.ts.map +1 -0
  53. package/dist/components/fixed-stars.js +2 -0
  54. package/dist/components/fixed-stars.js.map +7 -0
  55. package/dist/components/hd-variables.d.ts.map +1 -1
  56. package/dist/components/hd-variables.js +1 -1
  57. package/dist/components/hd-variables.js.map +3 -3
  58. package/dist/components/hexagram.d.ts +3 -1
  59. package/dist/components/hexagram.d.ts.map +1 -1
  60. package/dist/components/hexagram.js +1 -1
  61. package/dist/components/hexagram.js.map +3 -3
  62. package/dist/components/local-space-compass.d.ts +23 -0
  63. package/dist/components/local-space-compass.d.ts.map +1 -0
  64. package/dist/components/local-space-compass.js +8 -0
  65. package/dist/components/local-space-compass.js.map +7 -0
  66. package/dist/components/moon-phase.d.ts.map +1 -1
  67. package/dist/components/moon-phase.js +1 -1
  68. package/dist/components/moon-phase.js.map +3 -3
  69. package/dist/components/natal-chart.d.ts +2 -0
  70. package/dist/components/natal-chart.d.ts.map +1 -1
  71. package/dist/components/natal-chart.js +6 -6
  72. package/dist/components/natal-chart.js.map +2 -2
  73. package/dist/components/positions-table.d.ts +34 -0
  74. package/dist/components/positions-table.d.ts.map +1 -0
  75. package/dist/components/positions-table.js +2 -0
  76. package/dist/components/positions-table.js.map +7 -0
  77. package/dist/components/profection-card.d.ts +18 -0
  78. package/dist/components/profection-card.d.ts.map +1 -0
  79. package/dist/components/profection-card.js +2 -0
  80. package/dist/components/profection-card.js.map +7 -0
  81. package/dist/components/reference-card.d.ts.map +1 -1
  82. package/dist/components/reference-card.js +1 -1
  83. package/dist/components/reference-card.js.map +3 -3
  84. package/dist/components/relocation-wheel.d.ts +21 -0
  85. package/dist/components/relocation-wheel.d.ts.map +1 -0
  86. package/dist/components/relocation-wheel.js +11 -0
  87. package/dist/components/relocation-wheel.js.map +7 -0
  88. package/dist/components/synastry-chart.js +3 -3
  89. package/dist/components/synastry-chart.js.map +2 -2
  90. package/dist/components/vedic-kundli.js +14 -14
  91. package/dist/components/vedic-kundli.js.map +1 -1
  92. package/dist/components/vedic-planets-table.js +1 -1
  93. package/dist/components/vedic-planets-table.js.map +1 -1
  94. package/dist/components/western-planets-table.js +1 -1
  95. package/dist/components/western-planets-table.js.map +1 -1
  96. package/dist/components/yoga-list.d.ts +5 -2
  97. package/dist/components/yoga-list.d.ts.map +1 -1
  98. package/dist/components/yoga-list.js +1 -1
  99. package/dist/components/yoga-list.js.map +3 -3
  100. package/dist/generated/endpoint-bindings.d.ts.map +1 -1
  101. package/dist/index.cjs +62 -50
  102. package/dist/index.cjs.map +4 -4
  103. package/dist/index.d.ts +6 -0
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +62 -50
  106. package/dist/index.js.map +4 -4
  107. package/dist/manifest.d.ts.map +1 -1
  108. package/dist/manifest.json +6 -0
  109. package/dist/types/index.d.ts +1 -1
  110. package/dist/types/index.d.ts.map +1 -1
  111. package/dist/types/types.gen.d.ts +7864 -5381
  112. package/dist/types/types.gen.d.ts.map +1 -1
  113. package/dist/utils/degree.d.ts +2 -0
  114. package/dist/utils/degree.d.ts.map +1 -1
  115. package/dist/utils/planet-color.d.ts +3 -0
  116. package/dist/utils/planet-color.d.ts.map +1 -0
  117. package/dist/version.d.ts +1 -1
  118. package/package.json +2 -1
  119. package/src/components/astrocartography-map.ts +436 -0
  120. package/src/components/dosha-card.ts +48 -16
  121. package/src/components/fixed-stars.ts +254 -0
  122. package/src/components/hd-variables.ts +30 -2
  123. package/src/components/hexagram.ts +11 -11
  124. package/src/components/local-space-compass.ts +299 -0
  125. package/src/components/moon-phase.ts +21 -2
  126. package/src/components/natal-chart.ts +36 -24
  127. package/src/components/positions-table.ts +442 -0
  128. package/src/components/profection-card.ts +173 -0
  129. package/src/components/reference-card.ts +40 -8
  130. package/src/components/relocation-wheel.ts +170 -0
  131. package/src/components/yoga-list.ts +95 -2
  132. package/src/generated/endpoint-bindings.ts +62 -0
  133. package/src/index.ts +6 -0
  134. package/src/manifest.ts +79 -0
  135. package/src/types/index.ts +1 -1
  136. package/src/types/types.gen.ts +7814 -5263
  137. package/src/utils/degree.ts +11 -0
  138. package/src/utils/planet-color.ts +45 -0
  139. package/src/version.ts +1 -1
package/AGENTS.md CHANGED
@@ -60,6 +60,12 @@ Use the table below for the formal endpoint to component mapping.
60
60
  | `<roxy-aspects-table>` | Western | POST /astrology/aspects, /astrology/transit-aspects, /astrology/aspect-patterns | Aspect rows coloured by nature with orb and strength, plus detected chart patterns |
61
61
  | `<roxy-moon-phase>` | Western | GET /astrology/moon-phase/{current,upcoming,calendar/...} | Moon phase card and calendar |
62
62
  | `<roxy-horoscope-card>` | Western | GET /astrology/horoscope/{sign}/{daily,weekly,monthly} | Daily, weekly, or monthly horoscope card |
63
+ | `<roxy-astrocartography-map>` | Western | POST /astrology/astrocartography | World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations |
64
+ | `<roxy-local-space-compass>` | Western | POST /astrology/local-space | Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon |
65
+ | `<roxy-relocation-wheel>` | Western | POST /astrology/relocation-chart | Relocated chart wheel plus the move geometry, angular planets, and planets that change house |
66
+ | `<roxy-positions-table>` | Western | POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots | Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading |
67
+ | `<roxy-fixed-stars>` | Western | POST /astrology/fixed-stars | Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords |
68
+ | `<roxy-profection-card>` | Western | POST /astrology/profections | Profected house and sign for the year, the lord of the year, its natal placement, and the reading |
63
69
  | `<roxy-compatibility-card>` | Cross | POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility | Score card with category breakdown |
64
70
  | `<roxy-vedic-kundli>` | Vedic | POST /vedic-astrology/birth-chart | South, North, or East Indian kundli with degree detail and optional Chandra Lagna view |
65
71
  | `<roxy-divisional-chart>` | Vedic | POST /vedic-astrology/divisional-chart | Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa |
package/README.md CHANGED
@@ -577,6 +577,12 @@ Set `ROXY_API_KEY` to your secret key in your server env for the server-side SDK
577
577
  | `<roxy-aspects-table>` | Western | POST /astrology/aspects, /astrology/transit-aspects, /astrology/aspect-patterns | Aspect rows coloured by nature with orb and strength, plus detected chart patterns |
578
578
  | `<roxy-moon-phase>` | Western | GET /astrology/moon-phase/{current,upcoming,calendar/...} | Moon phase card and calendar |
579
579
  | `<roxy-horoscope-card>` | Western | GET /astrology/horoscope/{sign}/{daily,weekly,monthly} | Daily, weekly, or monthly horoscope card |
580
+ | `<roxy-astrocartography-map>` | Western | POST /astrology/astrocartography | World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations |
581
+ | `<roxy-local-space-compass>` | Western | POST /astrology/local-space | Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon |
582
+ | `<roxy-relocation-wheel>` | Western | POST /astrology/relocation-chart | Relocated chart wheel plus the move geometry, angular planets, and planets that change house |
583
+ | `<roxy-positions-table>` | Western | POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots | Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading |
584
+ | `<roxy-fixed-stars>` | Western | POST /astrology/fixed-stars | Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords |
585
+ | `<roxy-profection-card>` | Western | POST /astrology/profections | Profected house and sign for the year, the lord of the year, its natal placement, and the reading |
580
586
  | `<roxy-compatibility-card>` | Cross | POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility | Score card with category breakdown |
581
587
  | `<roxy-vedic-kundli>` | Vedic | POST /vedic-astrology/birth-chart | South, North, or East Indian kundli with degree detail and optional Chandra Lagna view |
582
588
  | `<roxy-divisional-chart>` | Vedic | POST /vedic-astrology/divisional-chart | Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa |
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.11.0",
2
+ "version": "0.12.0",
3
3
  "generated": "scripts/sync-catalog.ts",
4
4
  "components": [
5
5
  {
@@ -155,6 +155,116 @@
155
155
  }
156
156
  ]
157
157
  },
158
+ {
159
+ "tag": "roxy-astrocartography-map",
160
+ "pascal": "RoxyAstrocartographyMap",
161
+ "slug": "astrocartography-map",
162
+ "domain": "Western",
163
+ "renders": "World map of planetary MC, IC, Ascendant, and Descendant lines with per-line interpretations",
164
+ "endpointLabel": "POST /astrology/astrocartography",
165
+ "endpoints": [
166
+ {
167
+ "operationId": "generateAstrocartography",
168
+ "method": "POST",
169
+ "path": "/astrology/astrocartography"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "tag": "roxy-local-space-compass",
175
+ "pascal": "RoxyLocalSpaceCompass",
176
+ "slug": "local-space-compass",
177
+ "domain": "Western",
178
+ "renders": "Compass dial of planetary azimuth lines from the birthplace, dimmed below the horizon",
179
+ "endpointLabel": "POST /astrology/local-space",
180
+ "endpoints": [
181
+ {
182
+ "operationId": "generateLocalSpace",
183
+ "method": "POST",
184
+ "path": "/astrology/local-space"
185
+ }
186
+ ]
187
+ },
188
+ {
189
+ "tag": "roxy-relocation-wheel",
190
+ "pascal": "RoxyRelocationWheel",
191
+ "slug": "relocation-wheel",
192
+ "domain": "Western",
193
+ "renders": "Relocated chart wheel plus the move geometry, angular planets, and planets that change house",
194
+ "endpointLabel": "POST /astrology/relocation-chart",
195
+ "endpoints": [
196
+ {
197
+ "operationId": "generateRelocationChart",
198
+ "method": "POST",
199
+ "path": "/astrology/relocation-chart"
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "tag": "roxy-positions-table",
205
+ "pascal": "RoxyPositionsTable",
206
+ "slug": "positions-table",
207
+ "domain": "Western",
208
+ "renders": "Body, sign, degree, and per-shape columns (house, motion, formula, or natal arc) plus each reading",
209
+ "endpointLabel": "POST /astrology/asteroids, /astrology/lilith, /astrology/progressions, /astrology/solar-arc, /astrology/arabic-lots",
210
+ "endpoints": [
211
+ {
212
+ "operationId": "calculateArabicLots",
213
+ "method": "POST",
214
+ "path": "/astrology/arabic-lots"
215
+ },
216
+ {
217
+ "operationId": "generateAsteroids",
218
+ "method": "POST",
219
+ "path": "/astrology/asteroids"
220
+ },
221
+ {
222
+ "operationId": "generateLilith",
223
+ "method": "POST",
224
+ "path": "/astrology/lilith"
225
+ },
226
+ {
227
+ "operationId": "generateProgressions",
228
+ "method": "POST",
229
+ "path": "/astrology/progressions"
230
+ },
231
+ {
232
+ "operationId": "generateSolarArc",
233
+ "method": "POST",
234
+ "path": "/astrology/solar-arc"
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ "tag": "roxy-fixed-stars",
240
+ "pascal": "RoxyFixedStars",
241
+ "slug": "fixed-stars",
242
+ "domain": "Western",
243
+ "renders": "Star to natal point conjunctions with readings, plus a catalog of position, magnitude, nature, and keywords",
244
+ "endpointLabel": "POST /astrology/fixed-stars",
245
+ "endpoints": [
246
+ {
247
+ "operationId": "generateFixedStars",
248
+ "method": "POST",
249
+ "path": "/astrology/fixed-stars"
250
+ }
251
+ ]
252
+ },
253
+ {
254
+ "tag": "roxy-profection-card",
255
+ "pascal": "RoxyProfectionCard",
256
+ "slug": "profection-card",
257
+ "domain": "Western",
258
+ "renders": "Profected house and sign for the year, the lord of the year, its natal placement, and the reading",
259
+ "endpointLabel": "POST /astrology/profections",
260
+ "endpoints": [
261
+ {
262
+ "operationId": "generateProfections",
263
+ "method": "POST",
264
+ "path": "/astrology/profections"
265
+ }
266
+ ]
267
+ },
158
268
  {
159
269
  "tag": "roxy-compatibility-card",
160
270
  "pascal": "RoxyCompatibilityCard",
@@ -0,0 +1,58 @@
1
+ "use strict";var RoxyUI_astrocartography_map=(()=>{var B=Object.defineProperty;var mt=Object.getOwnPropertyDescriptor;var Kt=Object.getOwnPropertyNames;var Ft=Object.prototype.hasOwnProperty;var Gt=(n,t)=>{for(var e in t)B(n,e,{get:t[e],enumerable:!0})},Vt=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Kt(t))!Ft.call(n,s)&&s!==e&&B(n,s,{get:()=>t[s],enumerable:!(r=mt(t,s))||r.enumerable});return n};var Wt=n=>Vt(B({},"__esModule",{value:!0}),n),y=(n,t,e,r)=>{for(var s=r>1?void 0:r?mt(t,e):t,o=n.length-1,i;o>=0;o--)(i=n[o])&&(s=(r?i(t,e,s):i(s))||s);return r&&s&&B(t,e,s),s};var ye={};Gt(ye,{RoxyAstrocartographyMap:()=>U});var K=globalThis,F=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,et=Symbol(),yt=new WeakMap,O=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==et)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(F&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=yt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&yt.set(e,t))}return t}toString(){return this.cssText}},ft=n=>new O(typeof n=="string"?n:n+"",void 0,et),A=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((r,s,o)=>r+(i=>{if(i._$cssResult$===!0)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.")})(s)+n[o+1],n[0]);return new O(e,n,et)},gt=(n,t)=>{if(F)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),s=K.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=e.cssText,n.appendChild(r)}},rt=F?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return ft(e)})(n):n;var{is:Jt,defineProperty:Yt,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:Zt,getOwnPropertySymbols:Qt,getPrototypeOf:te}=Object,G=globalThis,$t=G.trustedTypes,ee=$t?$t.emptyScript:"",re=G.reactiveElementPolyfillSupport,M=(n,t)=>n,L={toAttribute(n,t){switch(t){case Boolean:n=n?ee: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}},V=(n,t)=>!Jt(n,t),xt={attribute:!0,type:String,converter:L,reflect:!1,useDefault:!1,hasChanged:V};Symbol.metadata??=Symbol("metadata"),G.litPropertyMetadata??=new WeakMap;var x=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=xt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&Yt(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){let{get:s,set:o}=Xt(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:s,set(i){let l=s?.call(this);o?.call(this,i),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??xt}static _$Ei(){if(this.hasOwnProperty(M("elementProperties")))return;let t=te(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(M("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(M("properties"))){let e=this.properties,r=[...Zt(e),...Qt(e)];for(let s of r)this.createProperty(s,e[s])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,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 s of r)e.unshift(rt(s))}else t!==void 0&&e.push(rt(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,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 gt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),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),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:L).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){let r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){let o=r.getPropertyOptions(s),i=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:L;this._$Em=s;let l=i.fromAttribute(e,o.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(t,e,r,s=!1,o){if(t!==void 0){let i=this.constructor;if(s===!1&&(o=this[t]),r??=i.getPropertyOptions(t),!((r.hasChanged??V)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:s,wrapped:o},i){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),o!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;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[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[s,o]of r){let{wrapped:i}=o,l=this[s];i!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,o,l)}}let t=!1,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=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[M("elementProperties")]=new Map,x[M("finalized")]=new Map,re?.({ReactiveElement:x}),(G.reactiveElementVersions??=[]).push("2.1.2");var ct=globalThis,vt=n=>n,W=ct.trustedTypes,bt=W?W.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ct="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,kt="?"+b,se=`<${kt}>`,E=document,H=()=>E.createComment(""),j=n=>n===null||typeof n!="object"&&typeof n!="function",dt=Array.isArray,ne=n=>dt(n)||typeof n?.[Symbol.iterator]=="function",st=`[
2
+ \f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_t=/-->/g,At=/>/g,S=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),St=/'/g,wt=/"/g,Rt=/^(?:script|style|textarea|title)$/i,ht=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),p=ht(1),f=ht(2),be=ht(3),C=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Et=new WeakMap,w=E.createTreeWalker(E,129);function Pt(n,t){if(!dt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return bt!==void 0?bt.createHTML(t):t}var oe=(n,t)=>{let e=n.length-1,r=[],s,o=t===2?"<svg>":t===3?"<math>":"",i=N;for(let l=0;l<e;l++){let a=n[l],d,u,h=-1,$=0;for(;$<a.length&&(i.lastIndex=$,u=i.exec(a),u!==null);)$=i.lastIndex,i===N?u[1]==="!--"?i=_t:u[1]!==void 0?i=At:u[2]!==void 0?(Rt.test(u[2])&&(s=RegExp("</"+u[2],"g")),i=S):u[3]!==void 0&&(i=S):i===S?u[0]===">"?(i=s??N,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,d=u[1],i=u[3]===void 0?S:u[3]==='"'?wt:St):i===wt||i===St?i=S:i===_t||i===At?i=N:(i=S,s=void 0);let v=i===S&&n[l+1].startsWith("/>")?" ":"";o+=i===N?a+se:h>=0?(r.push(d),a.slice(0,h)+Ct+a.slice(h)+b+v):a+b+(h===-2?l:v)}return[Pt(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},z=class n{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let o=0,i=0,l=t.length-1,a=this.parts,[d,u]=oe(t,e);if(this.el=n.createElement(d,r),w.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=w.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let h of s.getAttributeNames())if(h.endsWith(Ct)){let $=u[i++],v=s.getAttribute(h).split(b),q=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:q[2],strings:v,ctor:q[1]==="."?ot:q[1]==="?"?it:q[1]==="@"?at:R}),s.removeAttribute(h)}else h.startsWith(b)&&(a.push({type:6,index:o}),s.removeAttribute(h));if(Rt.test(s.tagName)){let h=s.textContent.split(b),$=h.length-1;if($>0){s.textContent=W?W.emptyScript:"";for(let v=0;v<$;v++)s.append(h[v],H()),w.nextNode(),a.push({type:2,index:++o});s.append(h[$],H())}}}else if(s.nodeType===8)if(s.data===kt)a.push({type:2,index:o});else{let h=-1;for(;(h=s.data.indexOf(b,h+1))!==-1;)a.push({type:7,index:o}),h+=b.length-1}o++}}static createElement(t,e){let r=E.createElement("template");return r.innerHTML=t,r}};function k(n,t,e=n,r){if(t===C)return t;let s=r!==void 0?e._$Co?.[r]:e._$Cl,o=j(t)?void 0:t._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),o===void 0?s=void 0:(s=new o(n),s._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=s:e._$Cl=s),s!==void 0&&(t=k(n,s._$AS(n,t.values),s,r)),t}var nt=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,s=(t?.creationScope??E).importNode(e,!0);w.currentNode=s;let o=w.nextNode(),i=0,l=0,a=r[0];for(;a!==void 0;){if(i===a.index){let d;a.type===2?d=new D(o,o.nextSibling,this,t):a.type===1?d=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(d=new lt(o,this,t)),this._$AV.push(d),a=r[++l]}i!==a?.index&&(o=w.nextNode(),i++)}return w.currentNode=E,s}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++}},D=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}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=k(this,t,e),j(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==C&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ne(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(E.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=z.createElement(Pt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(e);else{let o=new nt(s,this),i=o.u(this.options);o.p(e),this.T(i),this._$AH=o}}_$AC(t){let e=Et.get(t.strings);return e===void 0&&Et.set(t.strings,e=new z(t)),e}k(t){dt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,s=0;for(let o of t)s===e.length?e.push(r=new n(this.O(H()),this.O(H()),this,this.options)):r=e[s],r._$AI(o),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=vt(t).nextSibling;vt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(t,e=this,r,s){let o=this.strings,i=!1;if(o===void 0)t=k(this,t,e,0),i=!j(t)||t!==this._$AH&&t!==C,i&&(this._$AH=t);else{let l=t,a,d;for(t=o[0],a=0;a<o.length-1;a++)d=k(this,l[r+a],e,a),d===C&&(d=this._$AH[a]),i||=!j(d)||d!==this._$AH[a],d===c?t=c:t!==c&&(t+=(d??"")+o[a+1]),this._$AH[a]=d}i&&!s&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},it=class extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},at=class extends R{constructor(t,e,r,s,o){super(t,e,r,s,o),this.type=5}_$AI(t,e=this){if((t=k(this,t,e,0)??c)===C)return;let r=this._$AH,s=t===c&&r!==c||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==c&&(r===c||s);s&&this.element.removeEventListener(this.name,this,r),o&&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)}},lt=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){k(this,t)}};var ie=ct.litHtmlPolyfillSupport;ie?.(z,D),(ct.litHtmlVersions??=[]).push("3.3.2");var Tt=(n,t,e)=>{let r=e?.renderBefore??t,s=r._$litPart$;if(s===void 0){let o=e?.renderBefore??null;r._$litPart$=s=new D(t.insertBefore(H(),o),o,void 0,e??{})}return s._$AI(n),s};var pt=globalThis,_=class extends x{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=Tt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return C}};_._$litElement$=!0,_.finalized=!0,pt.litElementHydrateSupport?.({LitElement:_});var ae=pt.litElementPolyfillSupport;ae?.({LitElement:_});(pt.litElementVersions??=[]).push("4.2.2");var Ut=n=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(n,t)}):customElements.define(n,t)};var le={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:V},ce=(n=le,t,e)=>{let{kind:r,metadata:s}=e,o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),r==="setter"&&((n=Object.create(n)).wrapped=!0),o.set(e.name,n),r==="accessor"){let{name:i}=e;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(i,a,n,!0,l)},init(l){return l!==void 0&&this.C(i,void 0,n,l),l}}}if(r==="setter"){let{name:i}=e;return function(l){let a=this[i];t.call(this,l),this.requestUpdate(i,a,n,!0,l)}}throw Error("Unsupported decorator location: "+r)};function g(n){return(t,e)=>typeof e=="object"?ce(n,t,e):((r,s,o)=>{let i=s.hasOwnProperty(o);return s.constructor.createProperty(o,r),i?Object.getOwnPropertyDescriptor(s,o):void 0})(n,t,e)}function ut(n){return g({...n,state:!0,attribute:!1})}var Ot=n=>n??c;var Y=A`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);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-empty{padding:var(--roxy-space-lg,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var de="https://roxyapi.com/api/v2",X=class{constructor(t){this.baseUrl=de;this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let e=new AbortController;this.abort=e,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t),signal:e.signal}):await this.callApi(t,e.signal);if(!r.ok)throw new Error(await this.readError(r));let s=await r.json();if(e.signal.aborted)return;this.host.data=s}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===e&&(this.abort=void 0),e.signal.aborted||(this.host.loading=!1)}}callApi(t,e){let r=new URL(`${this.baseUrl}${t.path}`);for(let[o,i]of Object.entries(t.query??{}))i!=null&&r.searchParams.set(o,String(i));let s={Accept:"application/json"};return this.publishableKey&&(s["X-API-Key"]=this.publishableKey),t.body!=null&&(s["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:s,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}secretKeyRefused(){let t=this.publishableKey;return!t||t.startsWith("pk_")?!1:(this.host.error="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.",this.host.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key"},bubbles:!0,composed:!0})),!0)}async readError(t){try{let e=await t.json();if(e?.error)return e.error}catch{}return`Request failed (${t.status})`}};function Mt(n,t,e){let r={...e},s=`/${n.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(l,a)=>{let d=r[a];return delete r[a],encodeURIComponent(String(d??""))}),o={},i={};for(let[l,a]of Object.entries(r))a===void 0||a===""||(t==="GET"?o[l]=a:i[l]=a);return{path:s,method:t,query:o,body:t==="POST"?i:void 0}}var he="roxy-data";function pe(n){return n.nodeName==="SCRIPT"&&n.getAttribute("type")==="application/json"}var Z=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(pe(t)&&t.classList.contains(he))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var m=class extends _{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.loading=!1;this.error=null;this.onFormSubmit=e=>{let r=e.detail;this.remember&&this.writeRemembered(r.values),this.fetcher.run(Mt(this.endpoint,this.method,r.values))};new Z(this),this.fetcher=new X(this)}static{this.styles=[Y]}willUpdate(e){e.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),e.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),e.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.renderData(this.data):this.renderNoData()}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return p`<roxy-endpoint-form data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${Ot(this.specUrl)}" .initialValues="${this.remember?this.readRemembered():void 0}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}rememberKey(){return`roxy-ui:form:${this.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 p`<div class="roxy-empty" role="status">No data</div>`}renderLoading(){return p`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="Loading"></div>`}renderError(e){let r=p`<div class="roxy-error" role="alert">${e}</div>`;return this.endpoint?p`${r}${this.renderForm()}`:r}};y([g({attribute:!1})],m.prototype,"data",2),y([g({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),y([g({type:String})],m.prototype,"method",2),y([g({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),y([g({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),y([g({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),y([g({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),y([g({type:Boolean})],m.prototype,"remember",2),y([ut()],m.prototype,"loading",2),y([ut()],m.prototype,"error",2);function Lt(){return p`<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 Nt=A`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;function Ht(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}var ue={Sun:"var(--roxy-accent)",Moon:"var(--roxy-secondary)",Mercury:"var(--roxy-info)",Venus:"var(--roxy-success)",Mars:"var(--roxy-danger)",Jupiter:"var(--roxy-warning)",Saturn:"var(--roxy-muted)",Uranus:"var(--roxy-info-fg)",Neptune:"var(--roxy-success-fg)",Pluto:"var(--roxy-danger-fg)"},jt=["var(--roxy-accent)","var(--roxy-info)","var(--roxy-success)","var(--roxy-danger)","var(--roxy-warning)","var(--roxy-secondary)","var(--roxy-info-fg)","var(--roxy-success-fg)","var(--roxy-danger-fg)","var(--roxy-accent-ink)","var(--roxy-warning-fg)","var(--roxy-primary)"];function Q(n,t=0){return ue[Ht(n)]??jt[t%jt.length]??"var(--roxy-accent)"}var tt=360,P=180,I=n=>n+180,T=n=>90-n,zt=23.44,Dt=66.56,It=n=>n===0?"0":`${Math.abs(n)}\xB0${n>0?"E":"W"}`,qt=n=>n===0?"0":`${Math.abs(n)}\xB0${n>0?"N":"S"}`;function me(n){let t=[],e=[],r=null;for(let s of n)r!==null&&Math.abs(s.longitude-r)>180&&(e.length&&t.push(e),e=[]),e.push(`${I(s.longitude)},${T(s.latitude)}`),r=s.longitude;return e.length&&t.push(e),t.filter(s=>s.length>1).map(s=>s.join(" "))}var Bt={mc:"MC",ic:"IC",ascendant:"AC",descendant:"DC"},U=class extends m{renderEmpty(){return p`<div class="roxy-empty" role="status">No astrocartography data</div>`}renderData(t){let e=t.lines??[],r=t.birthDetails;return p`<div class="wrap"><header><h2 class="title">Astrocartography</h2>${r?p`<div class="meta">${[r.date,r.time].filter(Boolean).join(" \xB7 ")} · ${qt(Math.round(r.latitude))} ${It(Math.round(r.longitude))}</div>`:c}</header>${this.renderMap(e,r)} ${this.renderLegend(e)} ${t.summary?p`<p class="summary">${t.summary}</p>`:c} ${this.renderInterpretations(e)}</div>`}renderMap(t,e){return p`<svg viewBox="0 0 ${tt} ${P}" role="img" aria-label="World map of planetary astrocartography lines"><title>Astrocartography world map</title><desc>Equirectangular world map. Each body has a Midheaven and Imum Coeli meridian and a curved Ascendant and Descendant line, colored per body.</desc><rect class="map-frame" x="0" y="0" width="${tt}" height="${P}"/>${this.renderGraticule()} ${t.map((r,s)=>this.renderBodyLines(r,s))} ${e?f`<text class="birthplace" x=${I(e.longitude)} y=${T(e.latitude)} text-anchor="middle" dominant-baseline="central"><title>Birthplace</title>★</text>`:c}</svg>`}renderGraticule(){let t=[];for(let s=-150;s<=150;s+=30){let o=I(s),i=s===0;t.push(f`<line class=${i?"grat-axis":"grat"} x1=${o} y1="0" x2=${o} y2=${P} />`),t.push(f`<text class="axis-label" x=${o} y=${P-2} text-anchor="middle">${It(s)}</text>`)}let e=[];for(let s=-60;s<=60;s+=30){let o=T(s),i=s===0;e.push(f`<line class=${i?"grat-axis":"grat"} x1="0" y1=${o} x2=${tt} y2=${o} />`),e.push(f`<text class="axis-label" x="2" y=${o-1}>${qt(s)}</text>`)}let r=[zt,-zt,Dt,-Dt].map(s=>f`<line class="grat-ref" x1="0" y1=${T(s)} x2=${tt} y2=${T(s)} />`);return f`${t}${e}${r}`}renderBodyLines(t,e){let r=Q(t.planet,e),s=t.symbol||t.planet.slice(0,2),o=[this.renderMeridian(t.mc.longitude,r,s,t.planet,"mc",!1),this.renderMeridian(t.ic.longitude,r,s,t.planet,"ic",!0),this.renderCurve(t.ascendant.points,r,s,t.planet,"ascendant",!1),this.renderCurve(t.descendant.points,r,s,t.planet,"descendant",!0)];return f`${o}`}renderMeridian(t,e,r,s,o,i){let l=I(t),a=o==="ic"?P-7:9;return f`<g>
4
+ <line class=${`acg-line${i?" dashed":""}`} stroke=${e} x1=${l} y1="0" x2=${l} y2=${P}><title>${s} ${Bt[o]} line</title></line>
5
+ <text class="acg-glyph" fill=${e} x=${l} y=${a} text-anchor="middle" dominant-baseline="central">${r}</text>
6
+ </g>`}renderCurve(t,e,r,s,o,i){let l=me(t??[]);if(l.length===0)return c;let a=(t??[]).reduce((d,u)=>Math.abs(u.latitude)<Math.abs(d.latitude)?u:d,t[0]??{latitude:0,longitude:0});return f`<g>
7
+ ${l.map(d=>f`<polyline class=${`acg-line${i?" dashed":""}`} stroke=${e} points=${d}><title>${s} ${Bt[o]} line</title></polyline>`)}
8
+ <text class="acg-glyph" fill=${e} x=${I(a.longitude)} y=${T(a.latitude)} text-anchor="middle" dominant-baseline="central">${r}</text>
9
+ </g>`}renderLegend(t){return t.length===0?c:p`<div class="legend">${t.map((e,r)=>{let s=Q(e.planet,r);return p`<span class="legend-item"><span class="legend-swatch" style="${`border-top-color: ${s}`}"></span> ${e.symbol?p`${e.symbol}`:c}${e.planet}</span>`})} <span class="legend-note">Solid lines are the Ascendant and Midheaven, dashed are the Descendant and IC.</span></div>`}renderInterpretations(t){return t.length===0?c:p`<section class="interpretations"><h3>Planetary lines</h3>${t.map((e,r)=>{let s=Q(e.planet,r),o=[["MC",e.mc.interpretation],["IC",e.ic.interpretation],["AC",e.ascendant.interpretation],["DC",e.descendant.interpretation]];return p`<details class="interp-card" name="acg-lines" ?open="${r===0}"><summary><span class="interp-head"><span class="interp-dot" style="${`background: ${s}`}"></span> ${e.symbol?p`${e.symbol}`:c}${e.planet} </span>${Lt()}</summary><div class="interp-body">${o.filter(([,i])=>i).map(([i,l])=>p`<p class="interp-line"><span class="code">${i}</span>${l}</p>`)}</div></details>`})}</section>`}};U.styles=[Y,Nt,A`.wrap{background:var(--roxy-surface,#fff);width:100%;color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);gap:var(--roxy-space-md,1rem);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-primary,#0f172a);margin:0}.meta{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}svg{border-radius:var(--roxy-radius-sm,4px);width:100%;height:auto;display:block}.map-frame{fill:color-mix(in srgb, var(--roxy-border,#e4e4e7) 12%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:.8px}.grat{stroke:var(--roxy-border,#e4e4e7);stroke-width:.4px;fill:none}.grat-axis{stroke:var(--roxy-muted,#71717a);stroke-width:.6px;opacity:.6}.grat-ref{stroke:var(--roxy-secondary,#475569);stroke-width:.4px;stroke-dasharray:2 2;opacity:.5;fill:none}.axis-label{fill:var(--roxy-muted,#71717a);font-size:5px;font-family:var(--roxy-font-sans)}.acg-line{fill:none;stroke-width:1px;opacity:.95}.acg-line.dashed{stroke-dasharray:4 2.5}.acg-glyph{font-size:8px;font-family:var(--roxy-font-sans);font-weight:600}.birthplace{fill:var(--roxy-fg,#0a0a0a);font-size:9px}.legend{gap:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend-item{align-items:center;gap:.3rem;display:inline-flex}.legend-swatch{border-top-style:solid;border-top-width:2px;width:14px;height:0}.legend-note{width:100%;color:var(--roxy-muted,#71717a)}.summary{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0}.interpretations h3{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em;margin:0 0 var(--roxy-space-sm,.5rem);font-weight:600}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);justify-content:space-between;align-items:center;gap:var(--roxy-space-md,1rem);font-weight:500;display:flex}.interp-head{align-items:center;gap:.5rem;display:inline-flex}.interp-dot{border-radius:50%;width:10px;height:10px}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-xs,.25rem);display:grid}.interp-line{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a)}.interp-line .code{color:var(--roxy-accent-ink,#b45309);margin-right:.4rem;font-weight:600}`],U=y([Ut("roxy-astrocartography-map")],U);return Wt(ye);})();
10
+ /*! Bundled license information:
11
+
12
+ @lit/reactive-element/css-tag.js:
13
+ (**
14
+ * @license
15
+ * Copyright 2019 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ *)
18
+
19
+ @lit/reactive-element/reactive-element.js:
20
+ lit-html/lit-html.js:
21
+ lit-element/lit-element.js:
22
+ @lit/reactive-element/decorators/custom-element.js:
23
+ @lit/reactive-element/decorators/property.js:
24
+ @lit/reactive-element/decorators/state.js:
25
+ @lit/reactive-element/decorators/event-options.js:
26
+ @lit/reactive-element/decorators/base.js:
27
+ @lit/reactive-element/decorators/query.js:
28
+ @lit/reactive-element/decorators/query-all.js:
29
+ @lit/reactive-element/decorators/query-async.js:
30
+ @lit/reactive-element/decorators/query-assigned-nodes.js:
31
+ (**
32
+ * @license
33
+ * Copyright 2017 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ *)
36
+
37
+ lit-html/is-server.js:
38
+ (**
39
+ * @license
40
+ * Copyright 2022 Google LLC
41
+ * SPDX-License-Identifier: BSD-3-Clause
42
+ *)
43
+
44
+ @lit/reactive-element/decorators/query-assigned-elements.js:
45
+ (**
46
+ * @license
47
+ * Copyright 2021 Google LLC
48
+ * SPDX-License-Identifier: BSD-3-Clause
49
+ *)
50
+
51
+ lit-html/directives/if-defined.js:
52
+ (**
53
+ * @license
54
+ * Copyright 2018 Google LLC
55
+ * SPDX-License-Identifier: BSD-3-Clause
56
+ *)
57
+ */
58
+ //# sourceMappingURL=astrocartography-map.js.map