@roxyapi/ui 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/LICENSE +21 -0
- package/README.md +505 -0
- package/THEMING.md +24 -7
- package/dist/cdn/components/biorhythm-chart.js +15 -22
- package/dist/cdn/components/biorhythm-chart.js.map +3 -3
- package/dist/cdn/components/compatibility-card.js +36 -34
- package/dist/cdn/components/compatibility-card.js.map +4 -4
- package/dist/cdn/components/dasha-timeline.js +35 -39
- package/dist/cdn/components/dasha-timeline.js.map +4 -4
- package/dist/cdn/components/data.js +6 -6
- package/dist/cdn/components/data.js.map +3 -3
- package/dist/cdn/components/dosha-card.js +13 -13
- package/dist/cdn/components/dosha-card.js.map +2 -2
- package/dist/cdn/components/endpoint-form.js +47 -28
- package/dist/cdn/components/endpoint-form.js.map +3 -3
- package/dist/cdn/components/guna-milan.js +18 -18
- package/dist/cdn/components/guna-milan.js.map +4 -4
- package/dist/cdn/components/hexagram.js +26 -26
- package/dist/cdn/components/hexagram.js.map +3 -3
- package/dist/cdn/components/horoscope-card.js +38 -38
- package/dist/cdn/components/horoscope-card.js.map +3 -3
- package/dist/cdn/components/kp-planets-table.js +10 -10
- package/dist/cdn/components/kp-planets-table.js.map +4 -4
- package/dist/cdn/components/location-search.js +6 -6
- package/dist/cdn/components/location-search.js.map +3 -3
- package/dist/cdn/components/moon-phase.js +21 -21
- package/dist/cdn/components/moon-phase.js.map +4 -4
- package/dist/cdn/components/natal-chart.js +61 -19
- package/dist/cdn/components/natal-chart.js.map +4 -4
- package/dist/cdn/components/numerology-card.js +40 -31
- package/dist/cdn/components/numerology-card.js.map +3 -3
- package/dist/cdn/components/panchang-table.js +25 -25
- package/dist/cdn/components/panchang-table.js.map +4 -4
- package/dist/cdn/components/synastry-chart.js +129 -39
- package/dist/cdn/components/synastry-chart.js.map +4 -4
- package/dist/cdn/components/tarot-card.js +49 -20
- package/dist/cdn/components/tarot-card.js.map +3 -3
- package/dist/cdn/components/tarot-spread.js +43 -27
- package/dist/cdn/components/tarot-spread.js.map +3 -3
- package/dist/cdn/components/vedic-kundli.js +23 -9
- package/dist/cdn/components/vedic-kundli.js.map +3 -3
- package/dist/cdn/roxy-ui.js +560 -350
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/components/biorhythm-chart.d.ts +2 -46
- package/dist/components/biorhythm-chart.d.ts.map +1 -1
- package/dist/components/biorhythm-chart.js +24 -23
- package/dist/components/biorhythm-chart.js.map +2 -2
- package/dist/components/compatibility-card.d.ts +2 -27
- package/dist/components/compatibility-card.d.ts.map +1 -1
- package/dist/components/compatibility-card.js +50 -29
- package/dist/components/compatibility-card.js.map +3 -3
- package/dist/components/dasha-timeline.d.ts +2 -31
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +32 -30
- package/dist/components/dasha-timeline.js.map +3 -3
- package/dist/components/data.d.ts +6 -0
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +9 -1
- package/dist/components/data.js.map +2 -2
- package/dist/components/dosha-card.d.ts +2 -16
- package/dist/components/dosha-card.d.ts.map +1 -1
- package/dist/components/dosha-card.js +12 -13
- package/dist/components/dosha-card.js.map +2 -2
- package/dist/components/endpoint-form.d.ts +2 -0
- package/dist/components/endpoint-form.d.ts.map +1 -1
- package/dist/components/endpoint-form.js +66 -8
- package/dist/components/endpoint-form.js.map +2 -2
- package/dist/components/guna-milan.d.ts +2 -20
- package/dist/components/guna-milan.d.ts.map +1 -1
- package/dist/components/guna-milan.js +22 -12
- package/dist/components/guna-milan.js.map +3 -3
- package/dist/components/hexagram.d.ts +3 -27
- package/dist/components/hexagram.d.ts.map +1 -1
- package/dist/components/hexagram.js +31 -15
- package/dist/components/hexagram.js.map +2 -2
- package/dist/components/horoscope-card.d.ts +2 -20
- package/dist/components/horoscope-card.d.ts.map +1 -1
- package/dist/components/horoscope-card.js +24 -15
- package/dist/components/horoscope-card.js.map +2 -2
- package/dist/components/kp-planets-table.d.ts +2 -21
- package/dist/components/kp-planets-table.d.ts.map +1 -1
- package/dist/components/kp-planets-table.js +10 -4
- package/dist/components/kp-planets-table.js.map +3 -3
- package/dist/components/location-search.d.ts +3 -11
- package/dist/components/location-search.d.ts.map +1 -1
- package/dist/components/location-search.js +45 -5
- package/dist/components/location-search.js.map +2 -2
- package/dist/components/moon-phase.d.ts +4 -21
- package/dist/components/moon-phase.d.ts.map +1 -1
- package/dist/components/moon-phase.js +17 -4
- package/dist/components/moon-phase.js.map +3 -3
- package/dist/components/natal-chart.d.ts +7 -43
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +130 -70
- package/dist/components/natal-chart.js.map +3 -3
- package/dist/components/numerology-card.d.ts +5 -37
- package/dist/components/numerology-card.d.ts.map +1 -1
- package/dist/components/numerology-card.js +54 -28
- package/dist/components/numerology-card.js.map +2 -2
- package/dist/components/panchang-table.d.ts +3 -62
- package/dist/components/panchang-table.d.ts.map +1 -1
- package/dist/components/panchang-table.js +62 -32
- package/dist/components/panchang-table.js.map +3 -3
- package/dist/components/synastry-chart.d.ts +9 -28
- package/dist/components/synastry-chart.d.ts.map +1 -1
- package/dist/components/synastry-chart.js +178 -38
- package/dist/components/synastry-chart.js.map +3 -3
- package/dist/components/tarot-card.d.ts +5 -29
- package/dist/components/tarot-card.d.ts.map +1 -1
- package/dist/components/tarot-card.js +59 -20
- package/dist/components/tarot-card.js.map +2 -2
- package/dist/components/tarot-spread.d.ts +2 -24
- package/dist/components/tarot-spread.d.ts.map +1 -1
- package/dist/components/tarot-spread.js +39 -13
- package/dist/components/tarot-spread.js.map +2 -2
- package/dist/components/vedic-kundli.d.ts +3 -23
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +25 -13
- package/dist/components/vedic-kundli.js.map +2 -2
- package/dist/index.cjs +1149 -358
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1149 -358
- package/dist/index.js.map +4 -4
- package/dist/manifest.d.ts +49 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/styles/tokens.css +47 -1
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types.gen.d.ts +27811 -0
- package/dist/types/types.gen.d.ts.map +1 -0
- package/dist/utils/debounce.d.ts +9 -1
- package/dist/utils/debounce.d.ts.map +1 -1
- package/dist/utils/format.d.ts +15 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +9 -1
- package/src/components/biorhythm-chart.ts +39 -84
- package/src/components/compatibility-card.ts +85 -52
- package/src/components/dasha-timeline.ts +55 -73
- package/src/components/data.ts +20 -1
- package/src/components/dosha-card.ts +18 -31
- package/src/components/endpoint-form.ts +79 -11
- package/src/components/guna-milan.ts +16 -34
- package/src/components/hexagram.ts +53 -43
- package/src/components/horoscope-card.ts +51 -39
- package/src/components/kp-planets-table.ts +8 -27
- package/src/components/location-search.ts +45 -20
- package/src/components/moon-phase.ts +28 -25
- package/src/components/natal-chart.ts +129 -84
- package/src/components/numerology-card.ts +87 -79
- package/src/components/panchang-table.ts +40 -78
- package/src/components/synastry-chart.ts +220 -78
- package/src/components/tarot-card.ts +76 -62
- package/src/components/tarot-spread.ts +72 -45
- package/src/components/vedic-kundli.ts +42 -51
- package/src/index.ts +14 -24
- package/src/manifest.ts +366 -0
- package/src/styles/tokens.css +47 -1
- package/src/tokens/index.ts +5 -0
- package/src/types/types.gen.ts +1 -1
- package/src/utils/debounce.ts +23 -4
- package/src/utils/format.ts +57 -0
- package/src/version.ts +2 -0
package/dist/cdn/roxy-ui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var RoxyUI=(()=>{var
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
"use strict";var RoxyUI=(()=>{var he=Object.defineProperty;var Ke=Object.getOwnPropertyDescriptor;var St=Object.getOwnPropertyNames;var kt=Object.prototype.hasOwnProperty;var At=(i,r)=>{for(var e in r)he(i,e,{get:r[e],enumerable:!0})},Ct=(i,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of St(r))!kt.call(i,a)&&a!==e&&he(i,a,{get:()=>r[a],enumerable:!(t=Ke(r,a))||t.enumerable});return i};var Et=i=>Ct(he({},"__esModule",{value:!0}),i),p=(i,r,e,t)=>{for(var a=t>1?void 0:t?Ke(r,e):r,o=i.length-1,n;o>=0;o--)(n=i[o])&&(a=(t?n(r,e,a):n(a))||a);return t&&a&&he(r,e,a),a};var yr={};At(yr,{ROXY_COMPONENTS:()=>Se,ROXY_UI_COMPONENTS:()=>gr,ROXY_UI_VERSION:()=>wt,RoxyBiorhythmChart:()=>T,RoxyCompatibilityCard:()=>N,RoxyDashaTimeline:()=>M,RoxyData:()=>z,RoxyDoshaCard:()=>D,RoxyEndpointForm:()=>R,RoxyGunaMilan:()=>V,RoxyHexagram:()=>O,RoxyHoroscopeCard:()=>H,RoxyKpPlanetsTable:()=>F,RoxyLocationSearch:()=>_,RoxyMoonPhase:()=>G,RoxyNatalChart:()=>j,RoxyNumerologyCard:()=>I,RoxyPanchangTable:()=>U,RoxySynastryChart:()=>W,RoxyTarotCard:()=>B,RoxyTarotSpread:()=>q,RoxyVedicKundli:()=>K});var ue=globalThis,ge=ue.ShadowRoot&&(ue.ShadyCSS===void 0||ue.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ke=Symbol(),Ye=new WeakMap,se=class{constructor(r,e,t){if(this._$cssResult$=!0,t!==ke)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=e}get styleSheet(){let r=this.o,e=this.t;if(ge&&r===void 0){let t=e!==void 0&&e.length===1;t&&(r=Ye.get(e)),r===void 0&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),t&&Ye.set(e,r))}return r}toString(){return this.cssText}},Ve=i=>new se(typeof i=="string"?i:i+"",void 0,ke),v=(i,...r)=>{let e=i.length===1?i[0]:r.reduce((t,a,o)=>t+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+i[o+1],i[0]);return new se(e,i,ke)},Fe=(i,r)=>{if(ge)i.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of r){let t=document.createElement("style"),a=ue.litNonce;a!==void 0&&t.setAttribute("nonce",a),t.textContent=e.cssText,i.appendChild(t)}},Ae=ge?i=>i:i=>i instanceof CSSStyleSheet?(r=>{let e="";for(let t of r.cssRules)e+=t.cssText;return Ve(e)})(i):i;var{is:_t,defineProperty:Rt,getOwnPropertyDescriptor:Pt,getOwnPropertyNames:Lt,getOwnPropertySymbols:Tt,getPrototypeOf:Nt}=Object,ye=globalThis,We=ye.trustedTypes,Mt=We?We.emptyScript:"",zt=ye.reactiveElementPolyfillSupport,oe=(i,r)=>i,ie={toAttribute(i,r){switch(r){case Boolean:i=i?Mt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,r){let e=i;switch(r){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},xe=(i,r)=>!_t(i,r),Je={attribute:!0,type:String,converter:ie,reflect:!1,useDefault:!1,hasChanged:xe};Symbol.metadata??=Symbol("metadata"),ye.litPropertyMetadata??=new WeakMap;var L=class extends HTMLElement{static addInitializer(r){this._$Ei(),(this.l??=[]).push(r)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(r,e=Je){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(r)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(r,e),!e.noAccessor){let t=Symbol(),a=this.getPropertyDescriptor(r,t,e);a!==void 0&&Rt(this.prototype,r,a)}}static getPropertyDescriptor(r,e,t){let{get:a,set:o}=Pt(this.prototype,r)??{get(){return this[e]},set(n){this[e]=n}};return{get:a,set(n){let c=a?.call(this);o?.call(this,n),this.requestUpdate(r,c,t)},configurable:!0,enumerable:!0}}static getPropertyOptions(r){return this.elementProperties.get(r)??Je}static _$Ei(){if(this.hasOwnProperty(oe("elementProperties")))return;let r=Nt(this);r.finalize(),r.l!==void 0&&(this.l=[...r.l]),this.elementProperties=new Map(r.elementProperties)}static finalize(){if(this.hasOwnProperty(oe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(oe("properties"))){let e=this.properties,t=[...Lt(e),...Tt(e)];for(let a of t)this.createProperty(a,e[a])}let r=this[Symbol.metadata];if(r!==null){let e=litPropertyMetadata.get(r);if(e!==void 0)for(let[t,a]of e)this.elementProperties.set(t,a)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let a=this._$Eu(e,t);a!==void 0&&this._$Eh.set(a,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(r){let e=[];if(Array.isArray(r)){let t=new Set(r.flat(1/0).reverse());for(let a of t)e.unshift(Ae(a))}else r!==void 0&&e.push(Ae(r));return e}static _$Eu(r,e){let t=e.attribute;return t===!1?void 0:typeof t=="string"?t:typeof r=="string"?r.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(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(r=>r(this))}addController(r){(this._$EO??=new Set).add(r),this.renderRoot!==void 0&&this.isConnected&&r.hostConnected?.()}removeController(r){this._$EO?.delete(r)}_$E_(){let r=new Map,e=this.constructor.elementProperties;for(let t of e.keys())this.hasOwnProperty(t)&&(r.set(t,this[t]),delete this[t]);r.size>0&&(this._$Ep=r)}createRenderRoot(){let r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Fe(r,this.constructor.elementStyles),r}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(r=>r.hostConnected?.())}enableUpdating(r){}disconnectedCallback(){this._$EO?.forEach(r=>r.hostDisconnected?.())}attributeChangedCallback(r,e,t){this._$AK(r,t)}_$ET(r,e){let t=this.constructor.elementProperties.get(r),a=this.constructor._$Eu(r,t);if(a!==void 0&&t.reflect===!0){let o=(t.converter?.toAttribute!==void 0?t.converter:ie).toAttribute(e,t.type);this._$Em=r,o==null?this.removeAttribute(a):this.setAttribute(a,o),this._$Em=null}}_$AK(r,e){let t=this.constructor,a=t._$Eh.get(r);if(a!==void 0&&this._$Em!==a){let o=t.getPropertyOptions(a),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:ie;this._$Em=a;let c=n.fromAttribute(e,o.type);this[a]=c??this._$Ej?.get(a)??c,this._$Em=null}}requestUpdate(r,e,t,a=!1,o){if(r!==void 0){let n=this.constructor;if(a===!1&&(o=this[r]),t??=n.getPropertyOptions(r),!((t.hasChanged??xe)(o,e)||t.useDefault&&t.reflect&&o===this._$Ej?.get(r)&&!this.hasAttribute(n._$Eu(r,t))))return;this.C(r,e,t)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(r,e,{useDefault:t,reflect:a,wrapped:o},n){t&&!(this._$Ej??=new Map).has(r)&&(this._$Ej.set(r,n??e??this[r]),o!==!0||n!==void 0)||(this._$AL.has(r)||(this.hasUpdated||t||(e=void 0),this._$AL.set(r,e)),a===!0&&this._$Em!==r&&(this._$Eq??=new Set).add(r))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let r=this.scheduleUpdate();return r!=null&&await r,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[a,o]of this._$Ep)this[a]=o;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[a,o]of t){let{wrapped:n}=o,c=this[a];n!==!0||this._$AL.has(a)||c===void 0||this.C(a,void 0,o,c)}}let r=!1,e=this._$AL;try{r=this.shouldUpdate(e),r?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(t){throw r=!1,this._$EM(),t}r&&this._$AE(e)}willUpdate(r){}_$AE(r){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(r)),this.updated(r)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(r){return!0}update(r){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(r){}firstUpdated(r){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[oe("elementProperties")]=new Map,L[oe("finalized")]=new Map,zt?.({ReactiveElement:L}),(ye.reactiveElementVersions??=[]).push("2.1.2");var Te=globalThis,Xe=i=>i,fe=Te.trustedTypes,Ze=fe?fe.createPolicy("lit-html",{createHTML:i=>i}):void 0,st="$lit$",Y=`lit$${Math.random().toFixed(9).slice(2)}$`,ot="?"+Y,Dt=`<${ot}>`,Z=document,le=()=>Z.createComment(""),ce=i=>i===null||typeof i!="object"&&typeof i!="function",Ne=Array.isArray,Ot=i=>Ne(i)||typeof i?.[Symbol.iterator]=="function",Ce=`[
|
|
2
|
+
\f\r]`,ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qe=/-->/g,et=/>/g,J=RegExp(`>|${Ce}(?:([^\\s"'>=/]+)(${Ce}*=${Ce}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),tt=/'/g,rt=/"/g,it=/^(?:script|style|textarea|title)$/i,Me=i=>(r,...e)=>({_$litType$:i,strings:r,values:e}),s=Me(1),k=Me(2),wr=Me(3),Q=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),at=new WeakMap,X=Z.createTreeWalker(Z,129);function nt(i,r){if(!Ne(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ze!==void 0?Ze.createHTML(r):r}var Ht=(i,r)=>{let e=i.length-1,t=[],a,o=r===2?"<svg>":r===3?"<math>":"",n=ne;for(let c=0;c<e;c++){let d=i[c],m,g,u=-1,f=0;for(;f<d.length&&(n.lastIndex=f,g=n.exec(d),g!==null);)f=n.lastIndex,n===ne?g[1]==="!--"?n=Qe:g[1]!==void 0?n=et:g[2]!==void 0?(it.test(g[2])&&(a=RegExp("</"+g[2],"g")),n=J):g[3]!==void 0&&(n=J):n===J?g[0]===">"?(n=a??ne,u=-1):g[1]===void 0?u=-2:(u=n.lastIndex-g[2].length,m=g[1],n=g[3]===void 0?J:g[3]==='"'?rt:tt):n===rt||n===tt?n=J:n===Qe||n===et?n=ne:(n=J,a=void 0);let w=n===J&&i[c+1].startsWith("/>")?" ":"";o+=n===ne?d+Dt:u>=0?(t.push(m),d.slice(0,u)+st+d.slice(u)+Y+w):d+Y+(u===-2?c:w)}return[nt(i,o+(i[e]||"<?>")+(r===2?"</svg>":r===3?"</math>":"")),t]},de=class i{constructor({strings:r,_$litType$:e},t){let a;this.parts=[];let o=0,n=0,c=r.length-1,d=this.parts,[m,g]=Ht(r,e);if(this.el=i.createElement(m,t),X.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(a=X.nextNode())!==null&&d.length<c;){if(a.nodeType===1){if(a.hasAttributes())for(let u of a.getAttributeNames())if(u.endsWith(st)){let f=g[n++],w=a.getAttribute(u).split(Y),x=/([.?@])?(.*)/.exec(f);d.push({type:1,index:o,name:x[2],strings:w,ctor:x[1]==="."?_e:x[1]==="?"?Re:x[1]==="@"?Pe:re}),a.removeAttribute(u)}else u.startsWith(Y)&&(d.push({type:6,index:o}),a.removeAttribute(u));if(it.test(a.tagName)){let u=a.textContent.split(Y),f=u.length-1;if(f>0){a.textContent=fe?fe.emptyScript:"";for(let w=0;w<f;w++)a.append(u[w],le()),X.nextNode(),d.push({type:2,index:++o});a.append(u[f],le())}}}else if(a.nodeType===8)if(a.data===ot)d.push({type:2,index:o});else{let u=-1;for(;(u=a.data.indexOf(Y,u+1))!==-1;)d.push({type:7,index:o}),u+=Y.length-1}o++}}static createElement(r,e){let t=Z.createElement("template");return t.innerHTML=r,t}};function te(i,r,e=i,t){if(r===Q)return r;let a=t!==void 0?e._$Co?.[t]:e._$Cl,o=ce(r)?void 0:r._$litDirective$;return a?.constructor!==o&&(a?._$AO?.(!1),o===void 0?a=void 0:(a=new o(i),a._$AT(i,e,t)),t!==void 0?(e._$Co??=[])[t]=a:e._$Cl=a),a!==void 0&&(r=te(i,a._$AS(i,r.values),a,t)),r}var Ee=class{constructor(r,e){this._$AV=[],this._$AN=void 0,this._$AD=r,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(r){let{el:{content:e},parts:t}=this._$AD,a=(r?.creationScope??Z).importNode(e,!0);X.currentNode=a;let o=X.nextNode(),n=0,c=0,d=t[0];for(;d!==void 0;){if(n===d.index){let m;d.type===2?m=new pe(o,o.nextSibling,this,r):d.type===1?m=new d.ctor(o,d.name,d.strings,this,r):d.type===6&&(m=new Le(o,this,r)),this._$AV.push(m),d=t[++c]}n!==d?.index&&(o=X.nextNode(),n++)}return X.currentNode=Z,a}p(r){let e=0;for(let t of this._$AV)t!==void 0&&(t.strings!==void 0?(t._$AI(r,t,e),e+=t.strings.length-2):t._$AI(r[e])),e++}},pe=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(r,e,t,a){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=r,this._$AB=e,this._$AM=t,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let r=this._$AA.parentNode,e=this._$AM;return e!==void 0&&r?.nodeType===11&&(r=e.parentNode),r}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(r,e=this){r=te(this,r,e),ce(r)?r===l||r==null||r===""?(this._$AH!==l&&this._$AR(),this._$AH=l):r!==this._$AH&&r!==Q&&this._(r):r._$litType$!==void 0?this.$(r):r.nodeType!==void 0?this.T(r):Ot(r)?this.k(r):this._(r)}O(r){return this._$AA.parentNode.insertBefore(r,this._$AB)}T(r){this._$AH!==r&&(this._$AR(),this._$AH=this.O(r))}_(r){this._$AH!==l&&ce(this._$AH)?this._$AA.nextSibling.data=r:this.T(Z.createTextNode(r)),this._$AH=r}$(r){let{values:e,_$litType$:t}=r,a=typeof t=="number"?this._$AC(r):(t.el===void 0&&(t.el=de.createElement(nt(t.h,t.h[0]),this.options)),t);if(this._$AH?._$AD===a)this._$AH.p(e);else{let o=new Ee(a,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(r){let e=at.get(r.strings);return e===void 0&&at.set(r.strings,e=new de(r)),e}k(r){Ne(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,t,a=0;for(let o of r)a===e.length?e.push(t=new i(this.O(le()),this.O(le()),this,this.options)):t=e[a],t._$AI(o),a++;a<e.length&&(this._$AR(t&&t._$AB.nextSibling,a),e.length=a)}_$AR(r=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);r!==this._$AB;){let t=Xe(r).nextSibling;Xe(r).remove(),r=t}}setConnected(r){this._$AM===void 0&&(this._$Cv=r,this._$AP?.(r))}},re=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(r,e,t,a,o){this.type=1,this._$AH=l,this._$AN=void 0,this.element=r,this.name=e,this._$AM=a,this.options=o,t.length>2||t[0]!==""||t[1]!==""?(this._$AH=Array(t.length-1).fill(new String),this.strings=t):this._$AH=l}_$AI(r,e=this,t,a){let o=this.strings,n=!1;if(o===void 0)r=te(this,r,e,0),n=!ce(r)||r!==this._$AH&&r!==Q,n&&(this._$AH=r);else{let c=r,d,m;for(r=o[0],d=0;d<o.length-1;d++)m=te(this,c[t+d],e,d),m===Q&&(m=this._$AH[d]),n||=!ce(m)||m!==this._$AH[d],m===l?r=l:r!==l&&(r+=(m??"")+o[d+1]),this._$AH[d]=m}n&&!a&&this.j(r)}j(r){r===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,r??"")}},_e=class extends re{constructor(){super(...arguments),this.type=3}j(r){this.element[this.name]=r===l?void 0:r}},Re=class extends re{constructor(){super(...arguments),this.type=4}j(r){this.element.toggleAttribute(this.name,!!r&&r!==l)}},Pe=class extends re{constructor(r,e,t,a,o){super(r,e,t,a,o),this.type=5}_$AI(r,e=this){if((r=te(this,r,e,0)??l)===Q)return;let t=this._$AH,a=r===l&&t!==l||r.capture!==t.capture||r.once!==t.once||r.passive!==t.passive,o=r!==l&&(t===l||a);a&&this.element.removeEventListener(this.name,this,t),o&&this.element.addEventListener(this.name,this,r),this._$AH=r}handleEvent(r){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,r):this._$AH.handleEvent(r)}},Le=class{constructor(r,e,t){this.element=r,this.type=6,this._$AN=void 0,this._$AM=e,this.options=t}get _$AU(){return this._$AM._$AU}_$AI(r){te(this,r)}};var Gt=Te.litHtmlPolyfillSupport;Gt?.(de,pe),(Te.litHtmlVersions??=[]).push("3.3.2");var lt=(i,r,e)=>{let t=e?.renderBefore??r,a=t._$litPart$;if(a===void 0){let o=e?.renderBefore??null;t._$litPart$=a=new pe(r.insertBefore(le(),o),o,void 0,e??{})}return a._$AI(i),a};var ze=globalThis,y=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let r=super.createRenderRoot();return this.renderOptions.renderBefore??=r.firstChild,r}update(r){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(r),this._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}};y._$litElement$=!0,y.finalized=!0,ze.litElementHydrateSupport?.({LitElement:y});var jt=ze.litElementPolyfillSupport;jt?.({LitElement:y});(ze.litElementVersions??=[]).push("4.2.2");var b=i=>(r,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,r)}):customElements.define(i,r)};var It={attribute:!0,type:String,converter:ie,reflect:!1,hasChanged:xe},Ut=(i=It,r,e)=>{let{kind:t,metadata:a}=e,o=globalThis.litPropertyMetadata.get(a);if(o===void 0&&globalThis.litPropertyMetadata.set(a,o=new Map),t==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(e.name,i),t==="accessor"){let{name:n}=e;return{set(c){let d=r.get.call(this);r.set.call(this,c),this.requestUpdate(n,d,i,!0,c)},init(c){return c!==void 0&&this.C(n,void 0,i,c),c}}}if(t==="setter"){let{name:n}=e;return function(c){let d=this[n];r.call(this,c),this.requestUpdate(n,d,i,!0,c)}}throw Error("Unsupported decorator location: "+t)};function h(i){return(r,e)=>typeof e=="object"?Ut(i,r,e):((t,a,o)=>{let n=a.hasOwnProperty(o);return a.constructor.createProperty(o,t),n?Object.getOwnPropertyDescriptor(a,o):void 0})(i,r,e)}function P(i){return h({...i,state:!0,attribute:!1})}var $=v`
|
|
4
4
|
:host {
|
|
5
5
|
display: block;
|
|
6
6
|
container-type: inline-size;
|
|
@@ -82,65 +82,58 @@
|
|
|
82
82
|
outline: 2px solid var(--roxy-ring, rgba(245, 158, 11, 0.4));
|
|
83
83
|
outline-offset: 2px;
|
|
84
84
|
}
|
|
85
|
-
`;var
|
|
85
|
+
`;var ct={physical:"#dc2626",emotional:"#0284c7",intellectual:"#16a34a",intuitive:"#a855f7",aesthetic:"#f59e0b",awareness:"#ec4899",spiritual:"#14b8a6",passion:"#ef4444",mastery:"#6366f1",wisdom:"#475569"},T=class extends y{constructor(){super(...arguments);this.data=null;this.mode="daily"}render(){let e=this.data;return e?this.mode==="critical-days"&&"criticalDays"in e?this.renderCritical(e):this.mode==="forecast"&&"days"in e?this.renderForecast(e):this.renderDaily(e):s`<div class="roxy-empty" role="status">No biorhythm data</div>`}renderDaily(e){let t=e.quickRead??{},a=Object.entries(t).map(([o,n])=>{let c=typeof n=="number"?n:0,d=Math.abs(c)>1?c/100:c;return[o,d]});return s`<section class="wrap" aria-label="Daily biorhythm">
|
|
86
86
|
<header class="head">
|
|
87
87
|
<h2 class="title">Biorhythm</h2>
|
|
88
88
|
${typeof e.energyRating=="number"?s`<span class="energy">Energy ${e.energyRating}/10</span>`:l}
|
|
89
89
|
</header>
|
|
90
90
|
<div class="bars" role="list">
|
|
91
|
-
${a.map(([
|
|
92
|
-
<span style="text-transform: capitalize">${
|
|
91
|
+
${a.map(([o,n])=>{let c=(n+1)/2*100,d=ct[o]??"var(--roxy-accent, #f59e0b)";return s`<div class="bar" role="listitem">
|
|
92
|
+
<span style="text-transform: capitalize">${o}</span>
|
|
93
93
|
<span class="track">
|
|
94
94
|
<span
|
|
95
95
|
class="fill"
|
|
96
|
-
style="width: ${
|
|
96
|
+
style="width: ${c}%; background: ${d}"
|
|
97
97
|
></span>
|
|
98
98
|
</span>
|
|
99
|
-
<span class="value">${(
|
|
99
|
+
<span class="value">${Math.round(n*100)}%</span>
|
|
100
100
|
</div>`})}
|
|
101
101
|
</div>
|
|
102
|
-
${e.
|
|
102
|
+
${e.dailyMessage?s`<p class="advice">${e.dailyMessage}</p>`:l}
|
|
103
103
|
${e.advice?s`<p class="advice">${e.advice}</p>`:l}
|
|
104
|
-
|
|
105
|
-
${e.criticalAlerts.map(i=>s`<p class="alert">${i}</p>`)}
|
|
106
|
-
</div>`:l}
|
|
107
|
-
</section>`}renderForecast(e){let r=e.days??[];if(r.length===0)return s`<div class="roxy-empty" role="status">No forecast</div>`;let a=600,i=160,n=a/Math.max(r.length-1,1),c=Object.keys(r[0]?.cycles??{});return s`<section class="wrap" aria-label="Biorhythm forecast">
|
|
104
|
+
</section>`}renderForecast(e){let t=e.days??[];if(t.length===0)return s`<div class="roxy-empty" role="status">No forecast</div>`;let a=600,o=160,n=a/Math.max(t.length-1,1),c=["physical","emotional","intellectual","intuitive"];return s`<section class="wrap" aria-label="Biorhythm forecast">
|
|
108
105
|
<header class="head">
|
|
109
106
|
<h2 class="title">Forecast</h2>
|
|
110
|
-
<span class="energy"
|
|
111
|
-
>${e.startDate??""} - ${e.endDate??""}</span
|
|
112
|
-
>
|
|
107
|
+
<span class="energy">${e.startDate} - ${e.endDate}</span>
|
|
113
108
|
</header>
|
|
114
109
|
<svg
|
|
115
|
-
viewBox="0 0 ${a} ${
|
|
110
|
+
viewBox="0 0 ${a} ${o}"
|
|
116
111
|
role="img"
|
|
117
112
|
aria-label="Biorhythm cycle lines across the forecast window"
|
|
118
113
|
>
|
|
119
114
|
<title>Biorhythm forecast</title>
|
|
120
115
|
<line
|
|
121
116
|
x1="0"
|
|
122
|
-
y1=${
|
|
117
|
+
y1=${o/2}
|
|
123
118
|
x2=${a}
|
|
124
|
-
y2=${
|
|
119
|
+
y2=${o/2}
|
|
125
120
|
stroke="var(--roxy-border, #e4e4e7)"
|
|
126
121
|
stroke-width="1"
|
|
127
122
|
/>
|
|
128
|
-
${c.map(
|
|
123
|
+
${c.map(d=>{let m=t.map((u,f)=>{let w=u[d]??0,x=f*n,qe=o/2-w/100*(o/2-8);return`${x.toFixed(2)},${qe.toFixed(2)}`}).join(" "),g=ct[d]??"#475569";return k`<polyline points=${m} fill="none" stroke=${g} stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />`})}
|
|
129
124
|
</svg>
|
|
130
125
|
${e.summary?.periodAdvice?s`<p class="advice">${e.summary.periodAdvice}</p>`:l}
|
|
131
126
|
</section>`}renderCritical(e){return s`<section class="wrap" aria-label="Critical days">
|
|
132
127
|
<header class="head">
|
|
133
128
|
<h2 class="title">Critical days</h2>
|
|
134
|
-
<span class="energy"
|
|
135
|
-
>${e.totalCriticalDays??e.criticalDays?.length??0} total</span
|
|
136
|
-
>
|
|
129
|
+
<span class="energy">${e.totalCriticalDays} total</span>
|
|
137
130
|
</header>
|
|
138
131
|
<div>
|
|
139
|
-
${
|
|
140
|
-
>${
|
|
132
|
+
${e.criticalDays.map(t=>s`<span class="crit"
|
|
133
|
+
>${t.date} · ${t.cycle} ${t.severity}</span
|
|
141
134
|
>`)}
|
|
142
135
|
</div>
|
|
143
|
-
</section>`}};T.styles=[
|
|
136
|
+
</section>`}};T.styles=[$,v`
|
|
144
137
|
.wrap {
|
|
145
138
|
display: grid;
|
|
146
139
|
gap: var(--roxy-space-md, 1rem);
|
|
@@ -216,53 +209,55 @@
|
|
|
216
209
|
display: inline-block;
|
|
217
210
|
margin: 2px;
|
|
218
211
|
}
|
|
219
|
-
`],
|
|
212
|
+
`],p([h({attribute:!1})],T.prototype,"data",2),p([h({type:String,reflect:!0})],T.prototype,"mode",2),T=p([b("roxy-biorhythm-chart")],T);function ee(i){if(typeof i!="string"||i.length===0||/^\d{4}-\d{2}-\d{2}$/.test(i))return"";let e=/^\d{2}:\d{2}(:\d{2})?$/.test(i)?`1970-01-01T${i}`:i,t=new Date(e);return Number.isNaN(t.getTime())?i:t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0})}function dt(i){if(typeof i!="string"||i.length===0)return"";let r=new Date(/^\d{4}-\d{2}-\d{2}$/.test(i)?`${i}T00:00:00`:i);return Number.isNaN(r.getTime())?i:r.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function De(i){if(!i)return"";let r=ee(i.start),e=ee(i.end);return r&&e?`${r} - ${e}`:r||e||""}function A(i,r=1){return typeof i!="number"||!Number.isFinite(i)?"":i.toFixed(r).replace(/\.?0+$/,"")}function pt(i,r=1){let e=A(i,r);return e?`${e}%`:""}var N=class extends y{constructor(){super(...arguments);this.data=null;this.mode="astrology"}getBreakdown(){let e=this.data;if(!e)return{};if("categories"in e&&e.categories){let t={};for(let[a,o]of Object.entries(e.categories))typeof o=="number"&&Number.isFinite(o)&&(t[a]=o);return t}return{}}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No compatibility data</div>`;let t=e.overallScore,a=this.getBreakdown(),o="rating"in e?e.rating:void 0,n="archetype"in e?e.archetype:void 0,c="advice"in e?e.advice:void 0,d="summary"in e?e.summary:void 0,m="interpretation"in e?e.interpretation:void 0,g="strengths"in e?e.strengths:void 0,u="challenges"in e?e.challenges:void 0,f="keyAspects"in e?e.keyAspects:void 0;return s`<article
|
|
220
213
|
class="card"
|
|
221
214
|
aria-label=${`Compatibility (${this.mode})`}
|
|
222
215
|
>
|
|
223
216
|
<div class="head">
|
|
224
217
|
<h2>${this.mode} compatibility</h2>
|
|
225
218
|
<div>
|
|
226
|
-
${typeof
|
|
227
|
-
${
|
|
219
|
+
${typeof t=="number"?s`<div class="score">${A(t,0)}</div>`:l}
|
|
220
|
+
${o?s`<div class="rating">${o}</div>`:l}
|
|
228
221
|
</div>
|
|
229
222
|
</div>
|
|
230
223
|
|
|
231
224
|
${Object.keys(a).length>0?s`<div role="list">
|
|
232
|
-
${Object.entries(a).map(([
|
|
233
|
-
<span style="text-transform: capitalize">${
|
|
225
|
+
${Object.entries(a).map(([w,x])=>s`<div class="bar-row" role="listitem">
|
|
226
|
+
<span style="text-transform: capitalize">${w}</span>
|
|
234
227
|
<span class="bar"
|
|
235
|
-
><span style="width: ${Math.max(0,Math.min(100,
|
|
228
|
+
><span style="width: ${Math.max(0,Math.min(100,x))}%"></span
|
|
236
229
|
></span>
|
|
237
|
-
<span>${
|
|
230
|
+
<span>${A(x,0)}</span>
|
|
238
231
|
</div>`)}
|
|
239
232
|
</div>`:l}
|
|
240
|
-
${
|
|
241
|
-
<span class="archetype">${
|
|
233
|
+
${n?s`<p>
|
|
234
|
+
<span class="archetype">${n.label}</span>
|
|
235
|
+
${n.description?s` · ${n.description}`:l}
|
|
242
236
|
</p>`:l}
|
|
243
|
-
${
|
|
244
|
-
${
|
|
245
|
-
${
|
|
246
|
-
|
|
237
|
+
${d?s`<p>${d}</p>`:l}
|
|
238
|
+
${m&&!d?s`<p>${m}</p>`:l}
|
|
239
|
+
${c?s`<p>${c}</p>`:l}
|
|
240
|
+
${(g?.length??0)>0||(u?.length??0)>0?s`<div class="lists">
|
|
241
|
+
${g?.length?s`<div>
|
|
247
242
|
<h3>Strengths</h3>
|
|
248
243
|
<ul>
|
|
249
|
-
${
|
|
244
|
+
${g.map(w=>s`<li>${w}</li>`)}
|
|
250
245
|
</ul>
|
|
251
246
|
</div>`:l}
|
|
252
|
-
${
|
|
247
|
+
${u?.length?s`<div>
|
|
253
248
|
<h3>Challenges</h3>
|
|
254
249
|
<ul>
|
|
255
|
-
${
|
|
256
|
-
</ul>
|
|
257
|
-
</div>`:l}
|
|
258
|
-
${e.keyAspects?.length?s`<div>
|
|
259
|
-
<h3>Key aspects</h3>
|
|
260
|
-
<ul>
|
|
261
|
-
${e.keyAspects.map(i=>s`<li>${i}</li>`)}
|
|
250
|
+
${u.map(w=>s`<li>${w}</li>`)}
|
|
262
251
|
</ul>
|
|
263
252
|
</div>`:l}
|
|
264
253
|
</div>`:l}
|
|
265
|
-
|
|
254
|
+
${f?.length?s`<div>
|
|
255
|
+
<h3 style="margin: 0 0 0.25rem; font-size: var(--roxy-text-xs); color: var(--roxy-muted); text-transform: uppercase; letter-spacing: 0.06em;">Key aspects</h3>
|
|
256
|
+
<ul style="margin: 0; padding-left: 1rem; font-size: var(--roxy-text-sm);">
|
|
257
|
+
${f.slice(0,6).map(w=>s`<li>${Bt(w)}</li>`)}
|
|
258
|
+
</ul>
|
|
259
|
+
</div>`:l}
|
|
260
|
+
</article>`}};N.styles=[$,v`
|
|
266
261
|
.card {
|
|
267
262
|
background: var(--roxy-bg, #fff);
|
|
268
263
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -326,7 +321,7 @@
|
|
|
326
321
|
}
|
|
327
322
|
|
|
328
323
|
.archetype {
|
|
329
|
-
color: var(--roxy-
|
|
324
|
+
color: var(--roxy-accent-fg, #b45309);
|
|
330
325
|
font-weight: var(--roxy-weight-bold, 600);
|
|
331
326
|
}
|
|
332
327
|
|
|
@@ -346,49 +341,45 @@
|
|
|
346
341
|
margin: 0;
|
|
347
342
|
padding-left: var(--roxy-space-md, 1rem);
|
|
348
343
|
}
|
|
349
|
-
`],
|
|
344
|
+
`],p([h({attribute:!1})],N.prototype,"data",2),p([h({type:String,reflect:!0})],N.prototype,"mode",2),N=p([b("roxy-compatibility-card")],N);function Bt(i){let r=i.type.toLowerCase().replace(/_/g,"-"),e=typeof i.orb=="number"?` (orb ${A(i.orb,1)}\xB0)`:"",t=[i.planet1,r,i.planet2].filter(Boolean).join(" ");return i.description?`${t}${e} \xB7 ${i.description}`:`${t}${e}`}var M=class extends y{constructor(){super(...arguments);this.data=null;this.period="current"}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No dasha data</div>`;let t=this.collectPeriods(e),a=t.length?Math.max(...t.map(o=>o.durationYears)):0;return s`<div class="wrap" aria-label="Dasha timeline">
|
|
350
345
|
<header class="head">
|
|
351
346
|
<h2 class="title">
|
|
352
347
|
${this.period==="major"?"Vimshottari Mahadasha":this.period==="sub"?"Antardasha":"Active dashas"}
|
|
353
348
|
</h2>
|
|
354
|
-
${e.nakshatraName
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
349
|
+
${"nakshatraName"in e&&e.nakshatraName?s`<div class="nakshatra">
|
|
350
|
+
Moon nakshatra: ${e.nakshatraName}
|
|
351
|
+
${"nakshatraLord"in e&&e.nakshatraLord?s`(lord ${e.nakshatraLord})`:l}
|
|
352
|
+
</div>`:l}
|
|
358
353
|
</header>
|
|
359
354
|
|
|
360
355
|
${this.period==="current"?this.renderCurrent(e):l}
|
|
361
|
-
${
|
|
362
|
-
${
|
|
363
|
-
</div>`:l}
|
|
364
|
-
</div>`}renderCurrent(e){return s`<div class="current">
|
|
365
|
-
${e.mahadasha?s`<div>
|
|
366
|
-
<span>Mahadasha</span>
|
|
367
|
-
<strong>${e.mahadasha.lord??e.mahadasha.mahadashaLord}</strong>
|
|
368
|
-
${typeof e.remainingInMahadasha=="number"?s`<small>${e.remainingInMahadasha.toFixed(1)} years left</small>`:l}
|
|
369
|
-
</div>`:l}
|
|
370
|
-
${e.antardasha?s`<div>
|
|
371
|
-
<span>Antardasha</span>
|
|
372
|
-
<strong>${e.antardasha.lord??e.antardasha.antardashaLord}</strong>
|
|
373
|
-
${typeof e.remainingInAntardasha=="number"?s`<small>${e.remainingInAntardasha.toFixed(1)} years left</small>`:l}
|
|
374
|
-
</div>`:l}
|
|
375
|
-
${e.pratyantardasha?s`<div>
|
|
376
|
-
<span>Pratyantardasha</span>
|
|
377
|
-
<strong
|
|
378
|
-
>${e.pratyantardasha.lord??e.pratyantardasha.pratyantardashaLord}</strong
|
|
379
|
-
>
|
|
380
|
-
${typeof e.remainingInPratyantardasha=="number"?s`<small
|
|
381
|
-
>${e.remainingInPratyantardasha.toFixed(2)} years left</small
|
|
382
|
-
>`:l}
|
|
356
|
+
${t.length>0?s`<div class="timeline" role="list">
|
|
357
|
+
${t.map(o=>this.renderBar(o,a))}
|
|
383
358
|
</div>`:l}
|
|
384
|
-
</div>`}
|
|
385
|
-
|
|
386
|
-
|
|
359
|
+
</div>`}renderCurrent(e){return"mahadasha"in e?s`<div class="current">
|
|
360
|
+
${"mahadasha"in e&&e.mahadasha?s`<div>
|
|
361
|
+
<span>Mahadasha</span>
|
|
362
|
+
<strong>${e.mahadasha.planet}</strong>
|
|
363
|
+
${"remainingInMahadasha"in e&&e.remainingInMahadasha?s`<small>${A(e.remainingInMahadasha.years+e.remainingInMahadasha.months/12,1)} years left</small>`:l}
|
|
364
|
+
</div>`:l}
|
|
365
|
+
${"antardasha"in e&&e.antardasha?s`<div>
|
|
366
|
+
<span>Antardasha</span>
|
|
367
|
+
<strong>${e.antardasha.planet}</strong>
|
|
368
|
+
${"remainingInAntardasha"in e&&e.remainingInAntardasha?s`<small>${A(e.remainingInAntardasha.years+e.remainingInAntardasha.months/12,1)} years left</small>`:l}
|
|
369
|
+
</div>`:l}
|
|
370
|
+
${"pratyantardasha"in e&&e.pratyantardasha?s`<div>
|
|
371
|
+
<span>Pratyantardasha</span>
|
|
372
|
+
<strong>${e.pratyantardasha.planet}</strong>
|
|
373
|
+
${"remainingInPratyantardasha"in e&&e.remainingInPratyantardasha?s`<small>${A(e.remainingInPratyantardasha.years+e.remainingInPratyantardasha.months/12,1)} years left</small>`:l}
|
|
374
|
+
</div>`:l}
|
|
375
|
+
</div>`:l}collectPeriods(e){return"mahadashas"in e&&e.mahadashas?.length?e.mahadashas:"antardashas"in e&&e.antardashas?.length?e.antardashas:[]}renderBar(e,t){let a=e.durationYears,o=t>0?a/t*100:0;return s`<div class="bar" role="listitem">
|
|
376
|
+
<span>${e.planet}</span>
|
|
377
|
+
<span class="bar-track"><span style="width: ${o}%"></span></span>
|
|
387
378
|
<span class="dates">
|
|
388
|
-
${e.startDate?
|
|
389
|
-
${e.endDate?s`- ${
|
|
379
|
+
${e.startDate?mt(e.startDate):""}
|
|
380
|
+
${e.endDate?s`- ${mt(e.endDate)}`:""}
|
|
390
381
|
</span>
|
|
391
|
-
</div>`}};
|
|
382
|
+
</div>`}};M.styles=[$,v`
|
|
392
383
|
.wrap {
|
|
393
384
|
display: grid;
|
|
394
385
|
gap: var(--roxy-space-md, 1rem);
|
|
@@ -463,44 +454,44 @@
|
|
|
463
454
|
font-variant-numeric: tabular-nums;
|
|
464
455
|
text-align: right;
|
|
465
456
|
}
|
|
466
|
-
`],
|
|
457
|
+
`],p([h({attribute:!1})],M.prototype,"data",2),p([h({type:String,reflect:!0})],M.prototype,"period",2),M=p([b("roxy-dasha-timeline")],M);function mt(i){let r=i.match(/^(\d{4})/);return r?r[1]:i}var qt=["title","name","label","heading","overview","summary"],Kt=["imageUrl","image","icon","symbol"],Yt=["imageUrl","image"],Vt=6,z=class extends y{constructor(){super(...arguments);this.data=null;this.depth=0}render(){return this.data==null?s`<div class="roxy-empty" role="status">No data</div>`:this.depth>=Vt?s`<div class="roxy-empty" role="status">…</div>`:s`<div
|
|
467
458
|
class="roxy-card"
|
|
468
459
|
aria-label="Generic data display"
|
|
469
460
|
>
|
|
470
461
|
${this.renderValue(this.data)}
|
|
471
|
-
</div>`}renderValue(e){return e==null?l:typeof e=="string"?s`<p>${e}</p>`:typeof e=="number"||typeof e=="boolean"?s`<p>${String(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?s`<div class="roxy-empty" role="status">Empty list</div>`:e.every(
|
|
472
|
-
${e.map(
|
|
473
|
-
</ul>`:e.every(
|
|
474
|
-
${e.map(
|
|
475
|
-
</ol>`}renderTable(e){let
|
|
462
|
+
</div>`}renderValue(e){return e==null?l:typeof e=="string"?s`<p>${e}</p>`:typeof e=="number"||typeof e=="boolean"?s`<p>${String(e)}</p>`:Array.isArray(e)?this.renderArray(e):this.renderObject(e)}renderArray(e){return e.length===0?s`<div class="roxy-empty" role="status">Empty list</div>`:e.every(o=>o===null||["string","number","boolean"].includes(typeof o))?s`<ul class="roxy-chips">
|
|
463
|
+
${e.map(o=>s`<li>${String(o)}</li>`)}
|
|
464
|
+
</ul>`:e.every(o=>o!==null&&typeof o=="object"&&!Array.isArray(o))?this.renderTable(e):s`<ol>
|
|
465
|
+
${e.map(o=>s`<li>${this.renderValue(o)}</li>`)}
|
|
466
|
+
</ol>`}renderTable(e){let t=this.collectKeys(e);return s`<table class="roxy-table" role="table">
|
|
476
467
|
<thead>
|
|
477
468
|
<tr>
|
|
478
|
-
${
|
|
469
|
+
${t.map(a=>s`<th>${this.humanize(a)}</th>`)}
|
|
479
470
|
</tr>
|
|
480
471
|
</thead>
|
|
481
472
|
<tbody>
|
|
482
473
|
${e.map(a=>s`<tr>
|
|
483
|
-
${
|
|
474
|
+
${t.map(o=>s`<td>${this.formatPrimitive(a[o])}</td>`)}
|
|
484
475
|
</tr>`)}
|
|
485
476
|
</tbody>
|
|
486
|
-
</table>`}renderObject(e){let
|
|
477
|
+
</table>`}renderObject(e){let t=qt.find(c=>typeof e[c]=="string"),a=Kt.find(c=>typeof e[c]=="string"&&e[c].startsWith("http")),o=t!=="summary"&&typeof e.summary=="string"?"summary":null,n=Object.entries(e).filter(([c,d])=>c!==t&&c!==o&&!Yt.includes(c)&&d!==null&&d!==void 0);return s`
|
|
487
478
|
${a?s`<img
|
|
488
479
|
class="roxy-image"
|
|
489
480
|
src=${String(e[a])}
|
|
490
|
-
alt=${
|
|
481
|
+
alt=${t?String(e[t]):"illustration"}
|
|
491
482
|
loading="lazy"
|
|
492
483
|
/>`:l}
|
|
493
|
-
${
|
|
494
|
-
${
|
|
484
|
+
${t?s`<h3 class="roxy-title">${e[t]}</h3>`:l}
|
|
485
|
+
${o?s`<p class="roxy-summary">${e[o]}</p>`:l}
|
|
495
486
|
${n.length>0?s`<dl class="roxy-rows">
|
|
496
|
-
${n.map(([c,
|
|
487
|
+
${n.map(([c,d])=>s`
|
|
497
488
|
<dt>${this.humanize(c)}</dt>
|
|
498
|
-
<dd>${this.renderField(
|
|
489
|
+
<dd>${this.renderField(d)}</dd>
|
|
499
490
|
`)}
|
|
500
491
|
</dl>`:l}
|
|
501
492
|
`}renderField(e){return e==null?"":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)&&e.every(a=>["string","number","boolean"].includes(typeof a))?s`<ul class="roxy-chips">
|
|
502
493
|
${e.map(a=>s`<li>${String(a)}</li>`)}
|
|
503
|
-
</ul>`:s`<roxy-data .data=${e}></roxy-data>`}formatPrimitive(e){return e==null?"":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)?e.map(String).join(", "):JSON.stringify(e)}collectKeys(e){let
|
|
494
|
+
</ul>`:s`<roxy-data .data=${e} .depth=${this.depth+1}></roxy-data>`}formatPrimitive(e){return e==null?"":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)?e.map(String).join(", "):JSON.stringify(e)}collectKeys(e){let t=new Set;for(let a of e)for(let o of Object.keys(a))t.add(o);return Array.from(t)}humanize(e){return e.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}};z.styles=[$,v`
|
|
504
495
|
.roxy-card {
|
|
505
496
|
background: var(--roxy-bg, #fff);
|
|
506
497
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -594,18 +585,18 @@
|
|
|
594
585
|
margin: 0 0 var(--roxy-space-xs, 0.25rem) 0;
|
|
595
586
|
text-transform: capitalize;
|
|
596
587
|
}
|
|
597
|
-
`],
|
|
588
|
+
`],p([h({attribute:!1})],z.prototype,"data",2),p([h({attribute:!1})],z.prototype,"depth",2),z=p([b("roxy-data")],z);var Ft={manglik:"Mangal Dosha",kalsarpa:"Kaal Sarp Dosha",sadhesati:"Sade Sati"},D=class extends y{constructor(){super(...arguments);this.data=null;this.type="manglik"}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No dosha data</div>`;let t=!!e.present,a=Ft[this.type]??this.type,o=(e.severity??"").toLowerCase();return s`<article
|
|
598
589
|
class="card"
|
|
599
590
|
aria-label=${a}
|
|
600
591
|
>
|
|
601
592
|
<header class="head">
|
|
602
593
|
<h2 class="title">${a}</h2>
|
|
603
594
|
<div style="display:flex; gap:0.5rem; align-items:center;">
|
|
604
|
-
<span class=${`badge ${
|
|
605
|
-
${
|
|
595
|
+
<span class=${`badge ${t?"present":"absent"}`}>
|
|
596
|
+
${t?"Present":"Absent"}
|
|
606
597
|
</span>
|
|
607
598
|
${e.severity?s`<span
|
|
608
|
-
class=${`severity ${
|
|
599
|
+
class=${`severity ${o}`}
|
|
609
600
|
role="img"
|
|
610
601
|
aria-label=${`Severity ${e.severity}`}
|
|
611
602
|
>
|
|
@@ -614,25 +605,25 @@
|
|
|
614
605
|
</div>
|
|
615
606
|
</header>
|
|
616
607
|
${e.description?s`<p class="description">${e.description}</p>`:l}
|
|
617
|
-
${this.renderEffects(e
|
|
608
|
+
${this.renderEffects(e)}
|
|
618
609
|
${e.remedies&&e.remedies.length>0?s`<div>
|
|
619
610
|
<h3>Remedies</h3>
|
|
620
611
|
<ul>
|
|
621
612
|
${e.remedies.map(n=>s`<li>${n}</li>`)}
|
|
622
613
|
</ul>
|
|
623
614
|
</div>`:l}
|
|
624
|
-
${e.exceptions&&e.exceptions.length>0?s`<div>
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
</article>`}renderEffects(e){if(!e)return l;
|
|
631
|
-
${
|
|
615
|
+
${"exceptions"in e&&e.exceptions&&e.exceptions.length>0?s`<div>
|
|
616
|
+
<h3>Exceptions</h3>
|
|
617
|
+
<ul>
|
|
618
|
+
${e.exceptions.map(n=>s`<li>${n}</li>`)}
|
|
619
|
+
</ul>
|
|
620
|
+
</div>`:l}
|
|
621
|
+
</article>`}renderEffects(e){if(!e.effects)return l;let t=Object.entries(e.effects).filter(([,a])=>typeof a=="string"&&a.length>0);return t.length===0?l:s`<div class="effects">
|
|
622
|
+
${t.map(([a,o])=>s`<div>
|
|
632
623
|
<h3>${a}</h3>
|
|
633
|
-
<p>${
|
|
624
|
+
<p>${o}</p>
|
|
634
625
|
</div>`)}
|
|
635
|
-
</div>`}};
|
|
626
|
+
</div>`}};D.styles=[$,v`
|
|
636
627
|
.card {
|
|
637
628
|
background: var(--roxy-bg, #fff);
|
|
638
629
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -668,11 +659,11 @@
|
|
|
668
659
|
}
|
|
669
660
|
.badge.absent {
|
|
670
661
|
background: color-mix(in srgb, var(--roxy-success, #16a34a) 16%, transparent);
|
|
671
|
-
color: var(--roxy-success, #
|
|
662
|
+
color: var(--roxy-success-fg, #166534);
|
|
672
663
|
}
|
|
673
664
|
.badge.present {
|
|
674
665
|
background: color-mix(in srgb, var(--roxy-danger, #dc2626) 16%, transparent);
|
|
675
|
-
color: var(--roxy-danger, #
|
|
666
|
+
color: var(--roxy-danger-fg, #991b1b);
|
|
676
667
|
}
|
|
677
668
|
.severity {
|
|
678
669
|
display: flex;
|
|
@@ -721,32 +712,35 @@
|
|
|
721
712
|
margin: 0;
|
|
722
713
|
font-size: var(--roxy-text-sm, 0.875rem);
|
|
723
714
|
}
|
|
724
|
-
`],
|
|
715
|
+
`],p([h({attribute:!1})],D.prototype,"data",2),p([h({type:String,reflect:!0})],D.prototype,"type",2),D=p([b("roxy-dosha-card")],D);var Oe=new Map;async function Wt(i){let r=Oe.get(i);return r||(r=fetch(i).then(async e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{throw Oe.delete(i),e}),Oe.set(i,r)),r}var R=class extends y{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="https://roxyapi.com/api/v2/openapi.json";this.submitLabel="Submit";this.fields=[];this.values={};this.hasLocation=!1;this.loaded=!1;this.specError=null;this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onLocation=e=>{let t=e.detail;t&&(this.values={...this.values,latitude:t.latitude,longitude:t.longitude,timezone:t.timezone??t.utcOffset})};this.onSubmit=e=>{e.preventDefault();let t=this.fields.filter(a=>a.required).filter(a=>this.values[a.name]===void 0||this.values[a.name]==="");if(t.length>0){this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:t.map(a=>a.name)},bubbles:!0,composed:!0}));return}this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:this.values},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{let e=await Wt(this.specUrl),t=`/${this.endpoint.replace(/^\//,"")}`,a=e.paths?.[t]?.[this.method.toLowerCase()];if(!a)throw new Error(`Endpoint ${this.method} ${t} not found in OpenAPI spec`);let o=e.components?.schemas??{},n=[],c;if(a.requestBody){let m=a.requestBody.content?.["application/json"]?.schema;c=this.resolve(m,o)}if(c?.properties){let m=new Set(c.required??[]);for(let[g,u]of Object.entries(c.properties)){let f=this.resolve(u,o)??{};n.push({name:g,type:this.fieldType(f),required:m.has(g),description:f.description,enum:f.enum,min:f.minimum,max:f.maximum,default:f.default})}}for(let m of a.parameters??[])if(m.in==="path"||m.in==="query"){let g=this.resolve(m.schema,o)??{};n.push({name:m.name,type:this.fieldType(g),required:!!m.required,description:g.description,enum:g.enum,default:g.default})}this.fields=n,this.hasLocation=n.some(m=>m.name==="latitude")&&n.some(m=>m.name==="longitude")&&n.some(m=>m.name==="timezone");let d={};for(let m of n)m.default!==void 0&&(d[m.name]=m.default);this.values=d,this.loaded=!0}catch(e){let t=e instanceof Error?e.message:String(e);this.specError=t,this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl,message:t},bubbles:!0,composed:!0}))}}resolve(e,t){if(e){if("$ref"in e&&e.$ref){let a=e.$ref.split("/").pop();return a?t[a]:void 0}return e}}fieldType(e){return e.enum?"enum":e.format==="date"?"date":e.format==="time"?"time":e.format==="date-time"?"datetime":e.type==="integer"||e.type==="number"?"number":"text"}setValue(e,t){this.values={...this.values,[e]:t}}render(){if(!this.loaded)return s`<form><div class="roxy-skeleton" style="height: 8rem"></div></form>`;if(this.specError)return s`<div class="spec-error" role="alert">
|
|
716
|
+
Schema load failed: ${this.specError}
|
|
717
|
+
<button type="button" class="submit" @click=${this.retryLoadSchema}>Retry</button>
|
|
718
|
+
</div>`;let e=t=>{if(this.hasLocation&&(t.name==="latitude"||t.name==="longitude"||t.name==="timezone"))return l;let a=`roxy-form-${t.name}`;return s`<div class="field">
|
|
725
719
|
<label for=${a}>
|
|
726
|
-
${
|
|
720
|
+
${ht(t.name)}${t.required?s`<span class="req" aria-hidden="true">*</span>`:l}
|
|
727
721
|
</label>
|
|
728
|
-
${
|
|
722
|
+
${t.enum?s`<select
|
|
729
723
|
id=${a}
|
|
730
|
-
?required=${
|
|
731
|
-
@change=${
|
|
724
|
+
?required=${t.required}
|
|
725
|
+
@change=${o=>this.setValue(t.name,o.target.value)}
|
|
732
726
|
>
|
|
733
727
|
<option value="">Choose</option>
|
|
734
|
-
${
|
|
735
|
-
${
|
|
728
|
+
${t.enum.map(o=>s`<option value=${o} ?selected=${this.values[t.name]===o}>
|
|
729
|
+
${o}
|
|
736
730
|
</option>`)}
|
|
737
731
|
</select>`:s`<input
|
|
738
732
|
id=${a}
|
|
739
|
-
type=${this.htmlType(
|
|
740
|
-
?required=${
|
|
741
|
-
min=${
|
|
742
|
-
max=${
|
|
743
|
-
step=${
|
|
744
|
-
.value=${this.values[
|
|
745
|
-
@input=${
|
|
733
|
+
type=${this.htmlType(t.type)}
|
|
734
|
+
?required=${t.required}
|
|
735
|
+
min=${t.min??""}
|
|
736
|
+
max=${t.max??""}
|
|
737
|
+
step=${t.type==="number"?"any":""}
|
|
738
|
+
.value=${this.values[t.name]??""}
|
|
739
|
+
@input=${o=>this.setValue(t.name,this.coerce(t.type,o.target.value))}
|
|
746
740
|
/>`}
|
|
747
|
-
${
|
|
741
|
+
${t.description?s`<small class="help">${t.description}</small>`:l}
|
|
748
742
|
</div>`};return s`<form @submit=${this.onSubmit}>
|
|
749
|
-
<h2 class="title">${
|
|
743
|
+
<h2 class="title">${ht(this.endpoint.split("/").pop()??"")}</h2>
|
|
750
744
|
${this.hasLocation?s`<div class="location-block">
|
|
751
745
|
<label>Birth location</label>
|
|
752
746
|
<roxy-location-search
|
|
@@ -758,10 +752,10 @@
|
|
|
758
752
|
</small>
|
|
759
753
|
</div>`:l}
|
|
760
754
|
<div class="fields">
|
|
761
|
-
${this.fields.map(
|
|
755
|
+
${this.fields.map(t=>e(t))}
|
|
762
756
|
</div>
|
|
763
757
|
<button class="submit" type="submit">${this.submitLabel}</button>
|
|
764
|
-
</form>`}htmlType(e){switch(e){case"date":return"date";case"time":return"time";case"datetime":return"datetime-local";case"number":return"number";default:return"text"}}coerce(e,
|
|
758
|
+
</form>`}htmlType(e){switch(e){case"date":return"date";case"time":return"time";case"datetime":return"datetime-local";case"number":return"number";default:return"text"}}coerce(e,t){if(t!==""){if(e==="number"){let a=Number(t);return Number.isFinite(a)?a:void 0}return t}}};R.styles=[$,v`
|
|
765
759
|
form {
|
|
766
760
|
display: grid;
|
|
767
761
|
gap: var(--roxy-space-md, 1rem);
|
|
@@ -779,22 +773,27 @@
|
|
|
779
773
|
.fields {
|
|
780
774
|
display: grid;
|
|
781
775
|
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
|
|
776
|
+
align-items: start;
|
|
782
777
|
gap: var(--roxy-space-md, 1rem);
|
|
783
778
|
}
|
|
784
779
|
.field {
|
|
785
|
-
display:
|
|
780
|
+
display: flex;
|
|
781
|
+
flex-direction: column;
|
|
786
782
|
gap: var(--roxy-space-xs, 0.25rem);
|
|
783
|
+
min-width: 0;
|
|
787
784
|
}
|
|
788
785
|
label {
|
|
789
786
|
font-size: var(--roxy-text-sm, 0.875rem);
|
|
790
787
|
color: var(--roxy-secondary, #475569);
|
|
791
788
|
}
|
|
792
789
|
label .req {
|
|
793
|
-
color: var(--roxy-danger, #
|
|
790
|
+
color: var(--roxy-danger-fg, #991b1b);
|
|
794
791
|
margin-left: 4px;
|
|
795
792
|
}
|
|
796
793
|
input,
|
|
797
794
|
select {
|
|
795
|
+
width: 100%;
|
|
796
|
+
box-sizing: border-box;
|
|
798
797
|
padding: var(--roxy-space-sm, 0.5rem) var(--roxy-space-md, 1rem);
|
|
799
798
|
font-size: var(--roxy-text-base, 1rem);
|
|
800
799
|
font-family: inherit;
|
|
@@ -829,7 +828,7 @@
|
|
|
829
828
|
button.submit {
|
|
830
829
|
justify-self: start;
|
|
831
830
|
background: var(--roxy-accent-fg, #b45309);
|
|
832
|
-
color: #fff;
|
|
831
|
+
color: var(--roxy-bg, #fff);
|
|
833
832
|
border: 0;
|
|
834
833
|
border-radius: var(--roxy-radius-md, 8px);
|
|
835
834
|
padding: var(--roxy-space-sm, 0.5rem) var(--roxy-space-lg, 1.5rem);
|
|
@@ -847,19 +846,30 @@
|
|
|
847
846
|
outline: 2px solid var(--roxy-ring, rgba(245, 158, 11, 0.4));
|
|
848
847
|
outline-offset: 2px;
|
|
849
848
|
}
|
|
850
|
-
|
|
849
|
+
.spec-error {
|
|
850
|
+
display: grid;
|
|
851
|
+
gap: var(--roxy-space-md, 1rem);
|
|
852
|
+
justify-items: start;
|
|
853
|
+
background: var(--roxy-bg, #fff);
|
|
854
|
+
border: 1px solid var(--roxy-danger, #dc2626);
|
|
855
|
+
border-radius: var(--roxy-radius-md, 8px);
|
|
856
|
+
padding: var(--roxy-space-lg, 1.5rem);
|
|
857
|
+
color: var(--roxy-danger-fg, #991b1b);
|
|
858
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
859
|
+
}
|
|
860
|
+
`],p([h({type:String,attribute:"data-endpoint"})],R.prototype,"endpoint",2),p([h({type:String})],R.prototype,"method",2),p([h({type:String,attribute:"spec-url"})],R.prototype,"specUrl",2),p([h({type:String,attribute:"submit-label"})],R.prototype,"submitLabel",2),p([P()],R.prototype,"fields",2),p([P()],R.prototype,"values",2),p([P()],R.prototype,"hasLocation",2),p([P()],R.prototype,"loaded",2),p([P()],R.prototype,"specError",2),R=p([b("roxy-endpoint-form")],R);function ht(i){return i.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^\w/,r=>r.toUpperCase())}var V=class extends y{constructor(){super(...arguments);this.data=null}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No Guna Milan data</div>`;let t=(e.breakdown??[]).filter(a=>a?.category!==void 0);return s`<article class="card" aria-label="Guna Milan score">
|
|
851
861
|
<div class="score-bar">
|
|
852
862
|
<div>
|
|
853
|
-
<span class="total">${
|
|
854
|
-
<span class="over"> / ${
|
|
863
|
+
<span class="total">${A(e.total,1)}</span>
|
|
864
|
+
<span class="over"> / ${e.maxScore}</span>
|
|
855
865
|
${typeof e.percentage=="number"?s`<small style="margin-left: 0.5rem; color: var(--roxy-muted)">
|
|
856
|
-
${e.percentage}
|
|
866
|
+
${pt(e.percentage,1)}
|
|
857
867
|
</small>`:l}
|
|
858
868
|
</div>
|
|
859
869
|
${e.recommendation?s`<span class="recommendation">${e.recommendation}</span>`:l}
|
|
860
870
|
</div>
|
|
861
871
|
|
|
862
|
-
${
|
|
872
|
+
${t.length>0?s`<table>
|
|
863
873
|
<thead>
|
|
864
874
|
<tr>
|
|
865
875
|
<th>Category</th>
|
|
@@ -868,22 +878,22 @@
|
|
|
868
878
|
</tr>
|
|
869
879
|
</thead>
|
|
870
880
|
<tbody>
|
|
871
|
-
${
|
|
872
|
-
<td>${
|
|
881
|
+
${t.map(a=>{let o=a.score??0,n=a.maxScore??Jt(a.category),c=n?o/n*100:0;return s`<tr>
|
|
882
|
+
<td>${a.category}</td>
|
|
873
883
|
<td class="bar-cell">
|
|
874
884
|
<div class="mini-bar">
|
|
875
|
-
<span style="width: ${
|
|
885
|
+
<span style="width: ${c}%"></span>
|
|
876
886
|
</div>
|
|
877
887
|
</td>
|
|
878
|
-
<td class="score">${
|
|
888
|
+
<td class="score">${A(o,1)} / ${n}</td>
|
|
879
889
|
</tr>`})}
|
|
880
890
|
</tbody>
|
|
881
891
|
</table>`:l}
|
|
882
892
|
${(e.doshas?.length??0)>0||(e.doshaCancellations?.length??0)>0?s`<div class="tags">
|
|
883
|
-
${e.doshas?.map(
|
|
884
|
-
${e.doshaCancellations?.map(
|
|
893
|
+
${e.doshas?.map(a=>s`<span class="dosha">${a}</span>`)}
|
|
894
|
+
${e.doshaCancellations?.map(a=>s`<span class="cancel" title=${a.reason}>${a.dosha} cancelled</span>`)}
|
|
885
895
|
</div>`:l}
|
|
886
|
-
</article>`}};
|
|
896
|
+
</article>`}};V.styles=[$,v`
|
|
887
897
|
.card {
|
|
888
898
|
background: var(--roxy-bg, #fff);
|
|
889
899
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -970,54 +980,54 @@
|
|
|
970
980
|
}
|
|
971
981
|
.tags .dosha {
|
|
972
982
|
background: color-mix(in srgb, var(--roxy-danger, #dc2626) 16%, transparent);
|
|
973
|
-
color: var(--roxy-danger, #
|
|
983
|
+
color: var(--roxy-danger-fg, #991b1b);
|
|
974
984
|
}
|
|
975
985
|
.tags .cancel {
|
|
976
986
|
background: color-mix(in srgb, var(--roxy-success, #16a34a) 18%, transparent);
|
|
977
|
-
color: var(--roxy-success, #
|
|
987
|
+
color: var(--roxy-success-fg, #166534);
|
|
978
988
|
}
|
|
979
|
-
`],
|
|
989
|
+
`],p([h({attribute:!1})],V.prototype,"data",2),V=p([b("roxy-guna-milan")],V);function Jt(i){if(!i)return 1;switch(i.toLowerCase()){case"varna":return 1;case"vasya":return 2;case"tara":return 3;case"yoni":return 4;case"maitri":return 5;case"gana":return 6;case"bhakoot":return 7;case"nadi":return 8;default:return 1}}var be={Sun:"\u2609",Moon:"\u263D",Mercury:"\u263F",Venus:"\u2640",Earth:"\u2641",Mars:"\u2642",Jupiter:"\u2643",Saturn:"\u2644",Uranus:"\u2645",Neptune:"\u2646",Pluto:"\u2647",Rahu:"\u260A",Ketu:"\u260B",Ascendant:"Asc",Lagna:"La",NorthNode:"\u260A",SouthNode:"\u260B","North node":"\u260A","South node":"\u260B",Chiron:"\u26B7",Lilith:"\u26B8","Black moon lilith":"\u26B8"},ut={Sun:"Su",Moon:"Mo",Mercury:"Me",Venus:"Ve",Mars:"Ma",Jupiter:"Ju",Saturn:"Sa",Uranus:"Ur",Neptune:"Ne",Pluto:"Pl",Rahu:"Ra",Ketu:"Ke",Ascendant:"Asc",Lagna:"La"},ae={Aries:"\u2648",Taurus:"\u2649",Gemini:"\u264A",Cancer:"\u264B",Leo:"\u264C",Virgo:"\u264D",Libra:"\u264E",Scorpio:"\u264F",Sagittarius:"\u2650",Capricorn:"\u2651",Aquarius:"\u2652",Pisces:"\u2653"},gt={Aries:"Ar",Taurus:"Ta",Gemini:"Ge",Cancer:"Cn",Leo:"Le",Virgo:"Vi",Libra:"Li",Scorpio:"Sc",Sagittarius:"Sg",Capricorn:"Cp",Aquarius:"Aq",Pisces:"Pi"};var He={heaven:"\u2630",lake:"\u2631",fire:"\u2632",thunder:"\u2633",wind:"\u2634",water:"\u2635",mountain:"\u2636",earth:"\u2637",Heaven:"\u2630",Lake:"\u2631",Fire:"\u2632",Thunder:"\u2633",Wind:"\u2634",Water:"\u2635",Mountain:"\u2636",Earth:"\u2637"},yt={"new moon":"\u{1F311}","waxing crescent":"\u{1F312}","first quarter":"\u{1F313}","waxing gibbous":"\u{1F314}","full moon":"\u{1F315}","waning gibbous":"\u{1F316}","last quarter":"\u{1F317}","waning crescent":"\u{1F318}"};var O=class extends y{constructor(){super(...arguments);this.data=null;this.mode="lookup"}resolveHexagram(){let e=this.data;if(!e)return null;if("hexagram"in e&&e.hexagram){if("lines"in e){let a=e;return{hex:a.hexagram,lines:a.lines,changingLinePositions:a.changingLinePositions,resultingHexagram:a.resultingHexagram}}let t=e;return{hex:t.hexagram,dailyMessage:t.dailyMessage}}return{hex:e}}render(){let e=this.resolveHexagram();if(!e)return s`<div class="roxy-empty" role="status">No hexagram data</div>`;let{hex:t,lines:a,changingLinePositions:o,dailyMessage:n,resultingHexagram:c}=e,d=a??this.derivedLines(t),m=new Set(o??[]);return s`<article class="card" aria-label="I Ching hexagram">
|
|
980
990
|
<div class="glyphs">
|
|
981
|
-
${
|
|
991
|
+
${t.symbol?s`<div class="symbol">${t.symbol}</div>`:l}
|
|
982
992
|
<div class="lines" aria-hidden="true">
|
|
983
|
-
${
|
|
984
|
-
${
|
|
993
|
+
${d.slice().reverse().map((g,u)=>{let f=d.length-1-u+1,w=m.has(f),x=g===6||g===8;return s`<div class="line ${`${x?"broken":"solid"}${w?" changing":""}`}">
|
|
994
|
+
${x?k`<span class="seg"></span><span class="seg"></span>`:k`<span class="seg"></span>`}
|
|
985
995
|
</div>`})}
|
|
986
996
|
</div>
|
|
987
997
|
</div>
|
|
988
998
|
<div>
|
|
989
999
|
<h2 class="title">
|
|
990
|
-
${
|
|
1000
|
+
${t.number?s`${t.number}. `:l}${t.english??t.chinese??"Hexagram"}
|
|
991
1001
|
</h2>
|
|
992
1002
|
<p class="subtitle">
|
|
993
|
-
${
|
|
994
|
-
${
|
|
1003
|
+
${t.chinese?s`${t.chinese}`:l}
|
|
1004
|
+
${t.pinyin?s` · ${t.pinyin}`:l}
|
|
995
1005
|
</p>
|
|
996
1006
|
<div class="trigrams">
|
|
997
|
-
${
|
|
1007
|
+
${t.upperTrigram?s`<div>
|
|
998
1008
|
Upper
|
|
999
1009
|
<span class="tri-glyph"
|
|
1000
|
-
>${
|
|
1001
|
-
>${
|
|
1010
|
+
>${He[t.upperTrigram]??""}</span
|
|
1011
|
+
>${t.upperTrigram}
|
|
1002
1012
|
</div>`:l}
|
|
1003
|
-
${
|
|
1013
|
+
${t.lowerTrigram?s`<div>
|
|
1004
1014
|
Lower
|
|
1005
1015
|
<span class="tri-glyph"
|
|
1006
|
-
>${
|
|
1007
|
-
>${
|
|
1016
|
+
>${He[t.lowerTrigram]??""}</span
|
|
1017
|
+
>${t.lowerTrigram}
|
|
1008
1018
|
</div>`:l}
|
|
1009
1019
|
</div>
|
|
1010
|
-
${
|
|
1011
|
-
${
|
|
1012
|
-
${
|
|
1013
|
-
${
|
|
1014
|
-
${
|
|
1015
|
-
Changing lines: ${Array.from(
|
|
1016
|
-
${
|
|
1017
|
-
${
|
|
1020
|
+
${t.judgment?s`<p class="judgment">${t.judgment}</p>`:l}
|
|
1021
|
+
${t.image?s`<p class="image">${t.image}</p>`:l}
|
|
1022
|
+
${n?s`<p class="message">${n}</p>`:l}
|
|
1023
|
+
${t.interpretation?.general?s`<p>${t.interpretation.general}</p>`:l}
|
|
1024
|
+
${m.size>0?s`<div class="changing">
|
|
1025
|
+
Changing lines: ${Array.from(m).sort((g,u)=>g-u).join(", ")}.
|
|
1026
|
+
${c?.english?s` Becomes hexagram ${c.number}
|
|
1027
|
+
${c.english}.`:l}
|
|
1018
1028
|
</div>`:l}
|
|
1019
1029
|
</div>
|
|
1020
|
-
</article>`}derivedLines(e){
|
|
1030
|
+
</article>`}derivedLines(e){let t=e.symbol.codePointAt(0)??0;if(t>=19904&&t<=19967){let a=t-19904,o=[];for(let n=0;n<6;n++){let c=a>>n&1;o.push(c?8:7)}return o}return Array.from({length:6},()=>7)}};O.styles=[$,v`
|
|
1021
1031
|
.card {
|
|
1022
1032
|
background: var(--roxy-bg, #fff);
|
|
1023
1033
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -1124,20 +1134,20 @@
|
|
|
1124
1134
|
color: var(--roxy-accent-fg, #b45309);
|
|
1125
1135
|
font-size: var(--roxy-text-sm, 0.875rem);
|
|
1126
1136
|
}
|
|
1127
|
-
`],
|
|
1137
|
+
`],p([h({attribute:!1})],O.prototype,"data",2),p([h({type:String,reflect:!0})],O.prototype,"mode",2),O=p([b("roxy-hexagram")],O);var H=class extends y{constructor(){super(...arguments);this.data=null;this.period="daily"}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No horoscope data</div>`;let t=e.sign??"",a=t?ae[Xt(t)]??"":"",o="energyRating"in e&&typeof e.energyRating=="number"?e.energyRating:null,n="date"in e&&e.date||"week"in e&&e.week||"month"in e&&e.month||"";return s`<article
|
|
1128
1138
|
class="card"
|
|
1129
|
-
aria-label=${`${this.period} horoscope for ${
|
|
1139
|
+
aria-label=${`${this.period} horoscope for ${t}`}
|
|
1130
1140
|
>
|
|
1131
1141
|
<header class="head">
|
|
1132
1142
|
<span class="glyph" aria-hidden="true">${a}</span>
|
|
1133
1143
|
<div>
|
|
1134
|
-
<h2 class="title">${
|
|
1144
|
+
<h2 class="title">${t} ${this.period}</h2>
|
|
1135
1145
|
${n?s`<div class="date">${n}</div>`:l}
|
|
1136
1146
|
</div>
|
|
1137
|
-
${
|
|
1138
|
-
Energy ${
|
|
1147
|
+
${o!==null?s`<span class="energy" aria-label=${`Energy ${o} of 10`}>
|
|
1148
|
+
Energy ${o}/10
|
|
1139
1149
|
<span class="energy-bar"
|
|
1140
|
-
><span style="width: ${
|
|
1150
|
+
><span style="width: ${o/10*100}%"></span
|
|
1141
1151
|
></span>
|
|
1142
1152
|
</span>`:l}
|
|
1143
1153
|
</header>
|
|
@@ -1161,30 +1171,30 @@
|
|
|
1161
1171
|
<h3>Finance</h3>
|
|
1162
1172
|
<p>${e.finance}</p>
|
|
1163
1173
|
</div>`:l}
|
|
1164
|
-
${e.advice?s`<div class="section">
|
|
1174
|
+
${"advice"in e&&e.advice?s`<div class="section">
|
|
1165
1175
|
<h3>Advice</h3>
|
|
1166
1176
|
<p>${e.advice}</p>
|
|
1167
1177
|
</div>`:l}
|
|
1168
1178
|
</div>
|
|
1169
1179
|
|
|
1170
|
-
${e.luckyNumber
|
|
1171
|
-
${
|
|
1172
|
-
${
|
|
1173
|
-
${
|
|
1180
|
+
${(()=>{let c="luckyNumber"in e&&e.luckyNumber!==void 0?e.luckyNumber:void 0,d="luckyColor"in e&&e.luckyColor?e.luckyColor:"",m="luckyNumbers"in e&&e.luckyNumbers?e.luckyNumbers:[],g="luckyDays"in e&&e.luckyDays?e.luckyDays:[],u=e.compatibleSigns??[];return c===void 0&&!d&&m.length===0&&g.length===0&&u.length===0?l:s`<div class="lucky">
|
|
1181
|
+
${c!==void 0?s`<span>Lucky number <strong>${c}</strong></span>`:l}
|
|
1182
|
+
${d?s`<span>Lucky color <strong>${d}</strong></span>`:l}
|
|
1183
|
+
${m.length?s`<span
|
|
1174
1184
|
>Lucky numbers
|
|
1175
|
-
<strong>${
|
|
1185
|
+
<strong>${m.join(", ")}</strong></span
|
|
1176
1186
|
>`:l}
|
|
1177
|
-
${
|
|
1178
|
-
>Lucky days <strong>${
|
|
1187
|
+
${g.length?s`<span
|
|
1188
|
+
>Lucky days <strong>${g.join(", ")}</strong></span
|
|
1179
1189
|
>`:l}
|
|
1180
|
-
${
|
|
1190
|
+
${u.length?s`<span class="compat-wrap">
|
|
1181
1191
|
Best with
|
|
1182
1192
|
<span class="compat"
|
|
1183
|
-
>${
|
|
1193
|
+
>${u.map(f=>s`<span>${f}</span>`)}</span
|
|
1184
1194
|
>
|
|
1185
1195
|
</span>`:l}
|
|
1186
|
-
</div
|
|
1187
|
-
</article>`}};
|
|
1196
|
+
</div>`})()}
|
|
1197
|
+
</article>`}};H.styles=[$,v`
|
|
1188
1198
|
.card {
|
|
1189
1199
|
background: var(--roxy-bg, #fff);
|
|
1190
1200
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -1299,14 +1309,14 @@
|
|
|
1299
1309
|
font-size: var(--roxy-text-xs, 0.75rem);
|
|
1300
1310
|
text-transform: capitalize;
|
|
1301
1311
|
}
|
|
1302
|
-
`],
|
|
1312
|
+
`],p([h({attribute:!1})],H.prototype,"data",2),p([h({type:String,reflect:!0})],H.prototype,"period",2),H=p([b("roxy-horoscope-card")],H);function Xt(i){return i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()}var F=class extends y{constructor(){super(...arguments);this.data=null}render(){if(!this.data)return s`<div class="roxy-empty" role="status">No KP data</div>`;let e=this.data.planets??[];return s`<div
|
|
1303
1313
|
class="wrap"
|
|
1304
1314
|
aria-label="KP planets table"
|
|
1305
1315
|
tabindex="0"
|
|
1306
1316
|
>
|
|
1307
1317
|
<header class="head">
|
|
1308
1318
|
<h2 class="title">KP planets</h2>
|
|
1309
|
-
${this.data.ayanamsa?s`<span class="ayanamsa">Ayanamsa: ${this.data.ayanamsa}
|
|
1319
|
+
${typeof this.data.ayanamsa=="number"?s`<span class="ayanamsa">Ayanamsa: ${A(this.data.ayanamsa,2)}°</span>`:l}
|
|
1310
1320
|
</header>
|
|
1311
1321
|
<table role="table">
|
|
1312
1322
|
<thead>
|
|
@@ -1322,22 +1332,22 @@
|
|
|
1322
1332
|
</tr>
|
|
1323
1333
|
</thead>
|
|
1324
1334
|
<tbody>
|
|
1325
|
-
${e.map(
|
|
1335
|
+
${e.map(t=>s`<tr>
|
|
1326
1336
|
<td class="planet">
|
|
1327
|
-
${
|
|
1328
|
-
${
|
|
1337
|
+
${t.planet}
|
|
1338
|
+
${t.retrograde?s`<span class="retro">R</span>`:l}
|
|
1329
1339
|
</td>
|
|
1330
|
-
<td>${
|
|
1331
|
-
<td>${
|
|
1332
|
-
<td>${
|
|
1333
|
-
<td>${
|
|
1334
|
-
<td>${
|
|
1335
|
-
<td>${
|
|
1336
|
-
<td>${
|
|
1340
|
+
<td>${t.sign??""}</td>
|
|
1341
|
+
<td>${t.signLord??""}</td>
|
|
1342
|
+
<td>${t.nakshatra??""}</td>
|
|
1343
|
+
<td>${t.nakshatraLord??""}</td>
|
|
1344
|
+
<td>${t.subLord??""}</td>
|
|
1345
|
+
<td>${t.subSubLord??""}</td>
|
|
1346
|
+
<td>${t.kpNumber??""}</td>
|
|
1337
1347
|
</tr>`)}
|
|
1338
1348
|
</tbody>
|
|
1339
1349
|
</table>
|
|
1340
|
-
</div>`}};
|
|
1350
|
+
</div>`}};F.styles=[$,v`
|
|
1341
1351
|
.wrap {
|
|
1342
1352
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
1343
1353
|
border-radius: var(--roxy-radius-md, 8px);
|
|
@@ -1392,11 +1402,11 @@
|
|
|
1392
1402
|
color: var(--roxy-fg, #0a0a0a);
|
|
1393
1403
|
}
|
|
1394
1404
|
.retro {
|
|
1395
|
-
color: var(--roxy-warning, #
|
|
1405
|
+
color: var(--roxy-warning-fg, #9a3412);
|
|
1396
1406
|
font-size: var(--roxy-text-xs, 0.75rem);
|
|
1397
1407
|
margin-left: 4px;
|
|
1398
1408
|
}
|
|
1399
|
-
`],
|
|
1409
|
+
`],p([h({attribute:!1})],F.prototype,"data",2),F=p([b("roxy-kp-planets-table")],F);function xt(i,r){let e,t=((...a)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,i(...a)},r)});return t.cancel=()=>{e&&(clearTimeout(e),e=void 0)},t}var _=class extends y{constructor(){super(...arguments);this.endpoint="https://roxyapi.com/api/v2/location/search";this.placeholder="Search city";this.defaultValue="";this.query="";this.results=[];this.isOpen=!1;this.isLoading=!1;this.highlight=-1;this.secretKeyWarned=!1;this.debouncedFetch=xt(e=>{this.fetchResults(e)},300);this.onInput=e=>{let t=e.target.value;if(this.query=t,t.length<2){this.results=[],this.isOpen=!1,this.highlight=-1;return}this.debouncedFetch(t)};this.onKeyDown=e=>{if(!this.isOpen||this.results.length===0){e.key==="ArrowDown"&&this.query.length>=2&&(this.fetchResults(this.query),e.preventDefault());return}if(e.key==="ArrowDown")e.preventDefault(),this.highlight=(this.highlight+1)%this.results.length;else if(e.key==="ArrowUp")e.preventDefault(),this.highlight=(this.highlight-1+this.results.length)%this.results.length;else if(e.key==="Enter"){e.preventDefault();let t=this.results[this.highlight]??this.results[0];t&&this.select(t)}else e.key==="Escape"&&(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),this.query=this.defaultValue,this.clickOutsideHandler=e=>{e.composedPath().includes(this)||(this.isOpen=!1)},document.addEventListener("mousedown",this.clickOutsideHandler)}disconnectedCallback(){super.disconnectedCallback(),this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler),this.debouncedFetch.cancel(),this.abortController&&(this.abortController.abort(),this.abortController=void 0)}warnIfSecretKey(){if(this.secretKeyWarned||!this.apiKey||this.apiKey.startsWith("pk_"))return;this.secretKeyWarned=!0;let e="Possible secret key in client-side <roxy-location-search>; use a `pk_` publishable key with origin allowlist instead.";console.warn(e),this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:e},bubbles:!0,composed:!0}))}async fetchResults(e){this.warnIfSecretKey(),this.abortController&&this.abortController.abort();let t=new AbortController;this.abortController=t,this.isLoading=!0;try{let a=new URL(this.endpoint);a.searchParams.set("q",e),a.searchParams.set("limit","8");let o={Accept:"application/json"};this.apiKey&&(o["X-API-Key"]=this.apiKey),this.publishableKey&&(o["X-API-Key"]=this.publishableKey);let n=await fetch(a,{headers:o,signal:t.signal});if(!n.ok)throw new Error(`HTTP ${n.status}`);let c=await n.json();if(t.signal.aborted)return;this.results=c.cities??[],this.isOpen=this.results.length>0,this.highlight=this.results.length>0?0:-1}catch(a){if(a?.name==="AbortError")return;this.results=[],this.isOpen=!1}finally{this.abortController===t&&(this.abortController=void 0),t.signal.aborted||(this.isLoading=!1)}}select(e){this.query=`${e.city}${e.province?`, ${e.province}`:""}, ${e.country}`,this.isOpen=!1,this.results=[],this.dispatchEvent(new CustomEvent("roxy-location-select",{detail:e,bubbles:!0,composed:!0}))}render(){return s`<div class="field">
|
|
1400
1410
|
<input
|
|
1401
1411
|
type="text"
|
|
1402
1412
|
role="combobox"
|
|
@@ -1416,14 +1426,14 @@
|
|
|
1416
1426
|
class="results"
|
|
1417
1427
|
role="listbox"
|
|
1418
1428
|
>
|
|
1419
|
-
${this.results.length===0?s`<li class="empty" role="status">No cities found</li>`:this.results.map((e,
|
|
1429
|
+
${this.results.length===0?s`<li class="empty" role="status">No cities found</li>`:this.results.map((e,t)=>s`<li role="presentation">
|
|
1420
1430
|
<button
|
|
1421
1431
|
type="button"
|
|
1422
1432
|
class="option"
|
|
1423
1433
|
role="option"
|
|
1424
|
-
aria-selected=${this.highlight===
|
|
1434
|
+
aria-selected=${this.highlight===t?"true":"false"}
|
|
1425
1435
|
@click=${()=>this.select(e)}
|
|
1426
|
-
@mouseenter=${()=>{this.highlight=
|
|
1436
|
+
@mouseenter=${()=>{this.highlight=t}}
|
|
1427
1437
|
>
|
|
1428
1438
|
<span class="city">${e.city}</span>
|
|
1429
1439
|
<span class="where"
|
|
@@ -1435,7 +1445,7 @@
|
|
|
1435
1445
|
</button>
|
|
1436
1446
|
</li>`)}
|
|
1437
1447
|
</ul>`:l}
|
|
1438
|
-
</div>`}};
|
|
1448
|
+
</div>`}};_.styles=[$,v`
|
|
1439
1449
|
:host {
|
|
1440
1450
|
display: block;
|
|
1441
1451
|
position: relative;
|
|
@@ -1536,17 +1546,17 @@
|
|
|
1536
1546
|
color: var(--roxy-muted, #71717a);
|
|
1537
1547
|
font-size: var(--roxy-text-sm, 0.875rem);
|
|
1538
1548
|
}
|
|
1539
|
-
`],
|
|
1549
|
+
`],p([h({type:String,attribute:"api-key"})],_.prototype,"apiKey",2),p([h({type:String,attribute:"publishable-key"})],_.prototype,"publishableKey",2),p([h({type:String})],_.prototype,"endpoint",2),p([h({type:String})],_.prototype,"placeholder",2),p([h({type:String,attribute:"default-value"})],_.prototype,"defaultValue",2),p([P()],_.prototype,"query",2),p([P()],_.prototype,"results",2),p([P()],_.prototype,"isOpen",2),p([P()],_.prototype,"isLoading",2),p([P()],_.prototype,"highlight",2),_=p([b("roxy-location-search")],_);var G=class extends y{constructor(){super(...arguments);this.data=null;this.mode="current"}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No moon phase data</div>`;let t="phases"in e?e.phases:"calendar"in e?e.calendar:[];if(this.mode!=="current"&&t.length>0){let a="month"in e?e.month:void 0,o="year"in e?e.year:void 0;return s`<article
|
|
1540
1550
|
class="card"
|
|
1541
1551
|
aria-label="Moon phase calendar"
|
|
1542
1552
|
>
|
|
1543
|
-
<h2 class="label">${
|
|
1553
|
+
<h2 class="label">${a??"Moon phases"} ${o??""}</h2>
|
|
1544
1554
|
<div class="list" role="list">
|
|
1545
|
-
${
|
|
1555
|
+
${t.map(n=>this.renderListItem(n))}
|
|
1546
1556
|
</div>
|
|
1547
|
-
</article
|
|
1557
|
+
</article>`}return"phase"in e?this.renderSingle(e):l}renderSingle(e){let t=ft(e.phase);return s`<article class="card" aria-label="Current moon phase">
|
|
1548
1558
|
<div class="hero">
|
|
1549
|
-
<span class="emoji" aria-hidden="true">${
|
|
1559
|
+
<span class="emoji" aria-hidden="true">${t}</span>
|
|
1550
1560
|
<div>
|
|
1551
1561
|
<h2 class="label">${e.phase??"Moon"}</h2>
|
|
1552
1562
|
${e.date?s`<div class="date">${e.date}</div>`:l}
|
|
@@ -1555,11 +1565,11 @@
|
|
|
1555
1565
|
<div class="stats">
|
|
1556
1566
|
${typeof e.illumination=="number"?s`<div>
|
|
1557
1567
|
<span>Illumination</span>
|
|
1558
|
-
<strong>${(e.illumination
|
|
1568
|
+
<strong>${Zt(e.illumination)}</strong>
|
|
1559
1569
|
</div>`:l}
|
|
1560
1570
|
${typeof e.age=="number"?s`<div>
|
|
1561
1571
|
<span>Age</span>
|
|
1562
|
-
<strong>${e.age
|
|
1572
|
+
<strong>${A(e.age,1)} days</strong>
|
|
1563
1573
|
</div>`:l}
|
|
1564
1574
|
${e.sign?s`<div>
|
|
1565
1575
|
<span>Sign</span>
|
|
@@ -1574,11 +1584,11 @@
|
|
|
1574
1584
|
${e.meaning?.keywords?.length?s`<div class="keywords">
|
|
1575
1585
|
${e.meaning.keywords.map(a=>s`<span>${a}</span>`)}
|
|
1576
1586
|
</div>`:l}
|
|
1577
|
-
</article>`}renderListItem(e){let
|
|
1578
|
-
<span aria-hidden="true">${
|
|
1587
|
+
</article>`}renderListItem(e){let t=ft(e.phase);return s`<div class="list-item" role="listitem">
|
|
1588
|
+
<span aria-hidden="true">${t}</span>
|
|
1579
1589
|
<span>${e.phase}</span>
|
|
1580
1590
|
<span>${e.date??""}</span>
|
|
1581
|
-
</div>`}};
|
|
1591
|
+
</div>`}};G.styles=[$,v`
|
|
1582
1592
|
.card {
|
|
1583
1593
|
background: var(--roxy-bg, #fff);
|
|
1584
1594
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -1660,15 +1670,15 @@
|
|
|
1660
1670
|
.list-item:last-child {
|
|
1661
1671
|
border-bottom: none;
|
|
1662
1672
|
}
|
|
1663
|
-
`],
|
|
1673
|
+
`],p([h({attribute:!1})],G.prototype,"data",2),p([h({type:String,reflect:!0})],G.prototype,"mode",2),G=p([b("roxy-moon-phase")],G);function ft(i){return i?yt[i.toLowerCase()]??"\u{1F319}":"\u{1F319}"}function Zt(i){let r=i<=1?i*100:i;return`${Math.round(r)}%`}function C(i,r,e,t){let a=t*Math.PI/180;return{x:i+e*Math.cos(a),y:r+e*Math.sin(a)}}var Ie=384,S=Ie/2,Ge=150,Qt=134,je=110,$e=88,er=162,tr=176,j=class extends y{constructor(){super(...arguments);this.data=null;this.houseSystem="placidus"}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let e=this.data?.midheaven?.longitude;return typeof e=="number"?e:null}toAngle(e){return 180+this.getAscendant()-e}render(){if(!this.data)return s`<div class="roxy-empty" role="status">No chart data</div>`;let e=this.getPlanets(),t=this.data.aspects??[];return s`<div class="wrap">
|
|
1664
1674
|
<header>
|
|
1665
1675
|
<h2 class="title">Natal chart</h2>
|
|
1666
1676
|
${this.data.birthDetails?s`<div class="meta">
|
|
1667
|
-
${[this.data.birthDetails.date,this.data.birthDetails.time
|
|
1677
|
+
${[this.data.birthDetails.date,this.data.birthDetails.time].filter(Boolean).join(" \xB7 ")}
|
|
1668
1678
|
</div>`:l}
|
|
1669
1679
|
</header>
|
|
1670
1680
|
<svg
|
|
1671
|
-
viewBox="0 0 ${
|
|
1681
|
+
viewBox="0 0 ${Ie} ${Ie}"
|
|
1672
1682
|
role="img"
|
|
1673
1683
|
aria-label="Natal chart wheel with twelve houses, planets, and aspects"
|
|
1674
1684
|
>
|
|
@@ -1679,34 +1689,41 @@
|
|
|
1679
1689
|
</desc>
|
|
1680
1690
|
<circle
|
|
1681
1691
|
class="wheel-line"
|
|
1682
|
-
cx=${
|
|
1683
|
-
cy=${
|
|
1684
|
-
r=${
|
|
1692
|
+
cx=${S}
|
|
1693
|
+
cy=${S}
|
|
1694
|
+
r=${Ge}
|
|
1685
1695
|
stroke-width="1.5"
|
|
1686
1696
|
/>
|
|
1687
1697
|
<circle
|
|
1688
1698
|
class="wheel-line"
|
|
1689
|
-
cx=${
|
|
1690
|
-
cy=${
|
|
1691
|
-
r=${
|
|
1699
|
+
cx=${S}
|
|
1700
|
+
cy=${S}
|
|
1701
|
+
r=${je}
|
|
1692
1702
|
stroke-width="1"
|
|
1693
1703
|
/>
|
|
1694
1704
|
<circle
|
|
1695
1705
|
class="wheel-line"
|
|
1696
|
-
cx=${
|
|
1697
|
-
cy=${
|
|
1698
|
-
r=${
|
|
1706
|
+
cx=${S}
|
|
1707
|
+
cy=${S}
|
|
1708
|
+
r=${$e-16}
|
|
1699
1709
|
stroke-width="0.5"
|
|
1700
1710
|
/>
|
|
1701
1711
|
${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()}
|
|
1702
|
-
${this.renderAspects(e,
|
|
1712
|
+
${this.renderAspects(e,t)} ${this.renderPlanets(e)}
|
|
1713
|
+
${this.renderAngles()}
|
|
1703
1714
|
</svg>
|
|
1704
1715
|
<div class="legend">
|
|
1705
1716
|
<span>${e.length} planets</span>
|
|
1706
|
-
<span>${
|
|
1707
|
-
<span
|
|
1717
|
+
<span>${t.length} aspects</span>
|
|
1718
|
+
<span><span class="legend-swatch" style="background: var(--roxy-success)"></span>harmonious</span>
|
|
1719
|
+
<span><span class="legend-swatch" style="background: var(--roxy-danger)"></span>challenging</span>
|
|
1708
1720
|
</div>
|
|
1709
|
-
</div>`}
|
|
1721
|
+
</div>`}renderAngles(){let e=this.getAscendant(),t=this.getMidheaven(),a=[this.renderAngleMark(e,"ASC")];return t!==null&&a.push(this.renderAngleMark(t,"MC")),a}renderAngleMark(e,t){let a=this.toAngle(e),o=C(S,S,Ge,a),n=C(S,S,er,a),c=C(S,S,tr,a);return k`
|
|
1722
|
+
<g>
|
|
1723
|
+
<line class="angle-tick" x1=${o.x} y1=${o.y} x2=${n.x} y2=${n.y} />
|
|
1724
|
+
<text class="angle-marker" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${t}</text>
|
|
1725
|
+
</g>
|
|
1726
|
+
`}renderSpokes(){return Array.from({length:12},(e,t)=>{let a=this.toAngle(t*30),o=C(S,S,je,a),n=C(S,S,Ge,a);return k`<line class="wheel-line" x1=${o.x} y1=${o.y} x2=${n.x} y2=${n.y} stroke-width="0.8" />`})}renderSigns(){return["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"].map((t,a)=>{let o=this.toAngle(a*30+15),n=C(S,S,Qt,o);return k`<text class="sign-glyph" x=${n.x} y=${n.y} text-anchor="middle" dominant-baseline="central">${ae[t]}</text>`})}renderHouseNumbers(){let e=Math.floor(this.getAscendant()/30);return Array.from({length:12},(t,a)=>{let o=this.toAngle(a*30+15),n=C(S,S,je-12,o),c=(a-e+12)%12+1;return k`<text class="house-num" x=${n.x} y=${n.y} text-anchor="middle" dominant-baseline="central">${c}</text>`})}renderPlanets(e){return e.map(t=>{if(!Number.isFinite(t.longitude))return l;let a=this.toAngle(t.longitude),o=C(S,S,$e,a),n=be[we(t.name)]??t.name.slice(0,2),c=t.isRetrograde?" R":"",d=c?`${n}\u1D3F`:n;return k`<text class="planet-glyph" x=${o.x} y=${o.y} text-anchor="middle" dominant-baseline="central"><title>${t.name}${c}</title>${d}</text>`})}renderAspects(e,t){let a=new Map;for(let o of e){if(typeof o.longitude!="number")continue;let n=we(o.name);n&&a.set(n,o.longitude)}return t.map(o=>{let n=a.get(we(o.planet1)),c=a.get(we(o.planet2));if(n===void 0||c===void 0)return l;let d=C(S,S,$e-18,this.toAngle(n)),m=C(S,S,$e-18,this.toAngle(c)),g=ar(o),u=rr[g]??"aspect-other",f=A(o.orb,1);return k`<line class=${`aspect ${u}`} x1=${d.x} y1=${d.y} x2=${m.x} y2=${m.y}><title>${o.planet1} ${g||""} ${o.planet2}${f?` (orb ${f}\xB0)`:""}</title></line>`})}};j.styles=[$,v`
|
|
1710
1727
|
.wrap {
|
|
1711
1728
|
width: 100%;
|
|
1712
1729
|
display: grid;
|
|
@@ -1758,9 +1775,36 @@
|
|
|
1758
1775
|
}
|
|
1759
1776
|
|
|
1760
1777
|
.aspect {
|
|
1761
|
-
stroke:
|
|
1762
|
-
stroke-width: 0.6;
|
|
1778
|
+
stroke-width: 0.8;
|
|
1763
1779
|
fill: none;
|
|
1780
|
+
opacity: 0.55;
|
|
1781
|
+
}
|
|
1782
|
+
.aspect-trine,
|
|
1783
|
+
.aspect-sextile {
|
|
1784
|
+
stroke: var(--roxy-success, #16a34a);
|
|
1785
|
+
}
|
|
1786
|
+
.aspect-square,
|
|
1787
|
+
.aspect-opposition {
|
|
1788
|
+
stroke: var(--roxy-danger, #dc2626);
|
|
1789
|
+
}
|
|
1790
|
+
.aspect-conjunction {
|
|
1791
|
+
stroke: var(--roxy-accent-fg, #b45309);
|
|
1792
|
+
}
|
|
1793
|
+
.aspect-other {
|
|
1794
|
+
stroke: var(--roxy-muted, #71717a);
|
|
1795
|
+
opacity: 0.4;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
.angle-marker {
|
|
1799
|
+
fill: var(--roxy-accent-fg, #b45309);
|
|
1800
|
+
font-size: 10px;
|
|
1801
|
+
font-weight: 700;
|
|
1802
|
+
font-family: var(--roxy-font-sans);
|
|
1803
|
+
letter-spacing: 0.04em;
|
|
1804
|
+
}
|
|
1805
|
+
.angle-tick {
|
|
1806
|
+
stroke: var(--roxy-accent-fg, #b45309);
|
|
1807
|
+
stroke-width: 1.5;
|
|
1764
1808
|
}
|
|
1765
1809
|
|
|
1766
1810
|
.legend {
|
|
@@ -1770,37 +1814,53 @@
|
|
|
1770
1814
|
flex-wrap: wrap;
|
|
1771
1815
|
gap: var(--roxy-space-md, 1rem);
|
|
1772
1816
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1817
|
+
.legend-swatch {
|
|
1818
|
+
display: inline-block;
|
|
1819
|
+
width: 8px;
|
|
1820
|
+
height: 8px;
|
|
1821
|
+
border-radius: 50%;
|
|
1822
|
+
margin-right: 4px;
|
|
1823
|
+
vertical-align: middle;
|
|
1824
|
+
}
|
|
1825
|
+
`],p([h({attribute:!1})],j.prototype,"data",2),p([h({type:String,attribute:"house-system",reflect:!0})],j.prototype,"houseSystem",2),j=p([b("roxy-natal-chart")],j);function we(i){return i?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():""}var rr={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function ar(i){return(i.type??"").toLowerCase().replace(/_/g,"-")}var I=class extends y{constructor(){super(...arguments);this.data=null;this.type="life-path"}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No numerology data</div>`;let t=sr[this.type]??this.type;return"coreNumbers"in e?this.renderChart(e,t):"personalYear"in e?this.renderPersonalYear(e,t):this.renderNumberCard(e,t)}renderNumberCard(e,t){let a=e.meaning?.keywords??[];return s`<article class="card" aria-label=${t}>
|
|
1777
1826
|
<div class="hero">
|
|
1778
|
-
${typeof
|
|
1827
|
+
${typeof e.number=="number"?s`<div class="numeral">${e.number}</div>`:l}
|
|
1779
1828
|
<div>
|
|
1780
|
-
<p class="label">${
|
|
1781
|
-
${e.title?s`<h2 class="title">${e.title}</h2>`:
|
|
1782
|
-
${e.type==="master"?"Master number":"Single digit"}
|
|
1783
|
-
</h2>`:l}
|
|
1829
|
+
<p class="label">${t}</p>
|
|
1830
|
+
${e.meaning?.title?s`<h2 class="title">${e.meaning.title}</h2>`:l}
|
|
1784
1831
|
</div>
|
|
1785
1832
|
</div>
|
|
1786
|
-
${e.
|
|
1787
|
-
${e.meaning?s`<p class="meaning">${e.meaning}</p>`:l}
|
|
1788
|
-
${e.advice?s`<p>${e.advice}</p>`:l}
|
|
1833
|
+
${e.meaning?.description?s`<p class="meaning">${e.meaning.description}</p>`:l}
|
|
1789
1834
|
${e.calculation?s`<pre class="calc">${e.calculation}</pre>`:l}
|
|
1790
|
-
${
|
|
1791
|
-
${
|
|
1792
|
-
</div>`:l}
|
|
1793
|
-
${i.length>0?s`<div class="cores">
|
|
1794
|
-
${i.map(([n,c])=>{let m=typeof c=="number"?c:c.number;return s`<div class="item">
|
|
1795
|
-
<span>${Ir(n)}</span>
|
|
1796
|
-
<strong>${m??""}</strong>
|
|
1797
|
-
</div>`})}
|
|
1835
|
+
${a.length>0?s`<div class="chips">
|
|
1836
|
+
${a.map(o=>s`<span>${o}</span>`)}
|
|
1798
1837
|
</div>`:l}
|
|
1799
1838
|
${e.hasKarmicDebt&&e.karmicDebtNumber?s`<div class="karmic">
|
|
1800
1839
|
Karmic debt ${e.karmicDebtNumber}.
|
|
1801
|
-
${e.karmicDebtMeaning
|
|
1840
|
+
${or(e.karmicDebtMeaning)}
|
|
1841
|
+
</div>`:l}
|
|
1842
|
+
</article>`}renderPersonalYear(e,t){return s`<article class="card" aria-label=${t}>
|
|
1843
|
+
<div class="hero">
|
|
1844
|
+
${typeof e.personalYear=="number"?s`<div class="numeral">${e.personalYear}</div>`:l}
|
|
1845
|
+
<div>
|
|
1846
|
+
<p class="label">${t}</p>
|
|
1847
|
+
${e.theme?s`<h2 class="title">${e.theme}</h2>`:l}
|
|
1848
|
+
</div>
|
|
1849
|
+
</div>
|
|
1850
|
+
${e.forecast?s`<p class="meaning">${e.forecast}</p>`:l}
|
|
1851
|
+
${e.advice?s`<p>${e.advice}</p>`:l}
|
|
1852
|
+
</article>`}renderChart(e,t){let a=Object.entries(e.coreNumbers).filter(([,o])=>o!=null);return s`<article class="card" aria-label=${t}>
|
|
1853
|
+
<div>
|
|
1854
|
+
<p class="label">${t}</p>
|
|
1855
|
+
${e.profile?.name?s`<h2 class="title">${e.profile.name}</h2>`:l}
|
|
1856
|
+
</div>
|
|
1857
|
+
${a.length>0?s`<div class="cores">
|
|
1858
|
+
${a.map(([o,n])=>s`<div class="item">
|
|
1859
|
+
<span>${ir(o)}</span>
|
|
1860
|
+
<strong>${n.number??""}</strong>
|
|
1861
|
+
</div>`)}
|
|
1802
1862
|
</div>`:l}
|
|
1803
|
-
</article>`}};
|
|
1863
|
+
</article>`}};I.styles=[$,v`
|
|
1804
1864
|
.card {
|
|
1805
1865
|
background: var(--roxy-bg, #fff);
|
|
1806
1866
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -1848,7 +1908,8 @@
|
|
|
1848
1908
|
background: color-mix(in srgb, var(--roxy-border, #e4e4e7) 30%, transparent);
|
|
1849
1909
|
padding: var(--roxy-space-sm, 0.5rem);
|
|
1850
1910
|
border-radius: var(--roxy-radius-sm, 4px);
|
|
1851
|
-
|
|
1911
|
+
white-space: pre-wrap;
|
|
1912
|
+
overflow-wrap: anywhere;
|
|
1852
1913
|
}
|
|
1853
1914
|
|
|
1854
1915
|
.chips {
|
|
@@ -1895,56 +1956,56 @@
|
|
|
1895
1956
|
font-size: var(--roxy-text-sm, 0.875rem);
|
|
1896
1957
|
color: var(--roxy-fg, #0a0a0a);
|
|
1897
1958
|
}
|
|
1898
|
-
`],
|
|
1959
|
+
`],p([h({attribute:!1})],I.prototype,"data",2),p([h({type:String,reflect:!0})],I.prototype,"type",2),I=p([b("roxy-numerology-card")],I);var sr={"life-path":"Life Path",expression:"Expression","personal-year":"Personal Year",chart:"Numerology chart"};function or(i){return i?[i.description,i.challenge,i.resolution].filter(Boolean).join(" "):""}function ir(i){return i.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^\w/,r=>r.toUpperCase())}var U=class extends y{constructor(){super(...arguments);this.data=null;this.detail="detailed"}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No panchang data</div>`;let t="sunrise"in e?e:null,a=[["Tithi",this.formatPart(e.tithi)],["Nakshatra",this.formatPart(e.nakshatra)],["Yoga",this.formatPart(e.yoga)],["Karana",this.formatPart(e.karana)]];t&&a.push(["Vara",this.formatPart(t.vara)]);let o=t?[["Brahma Muhurta",t.brahmaMuhurta],["Abhijit Muhurta",t.abhijitMuhurta],["Vijaya Muhurta",t.vijayaMuhurta],["Godhuli Muhurta",t.godhuliMuhurta],["Nishita Muhurta",t.nishitaMuhurta],["Pratah Sandhya",t.pratahSandhya],["Sayahna Sandhya",t.sayahnaSandhya]]:[],n=t?[["Rahu Kaal",t.rahuKaal],["Yamaganda",t.yamaganda],["Gulika",t.gulika]]:[];return s`<div class="wrap" aria-label="Panchang">
|
|
1899
1960
|
<header class="head">
|
|
1900
1961
|
<h2 class="title">Panchang</h2>
|
|
1901
|
-
<span class="date">${
|
|
1962
|
+
<span class="date">${t?dt(t.date):""}</span>
|
|
1902
1963
|
</header>
|
|
1903
1964
|
<table>
|
|
1904
1965
|
<tbody>
|
|
1905
|
-
${
|
|
1906
|
-
<th>${
|
|
1907
|
-
<td>${
|
|
1966
|
+
${a.map(([c,d])=>s`<tr>
|
|
1967
|
+
<th>${c}</th>
|
|
1968
|
+
<td>${d}</td>
|
|
1908
1969
|
</tr>`)}
|
|
1909
|
-
${
|
|
1970
|
+
${t?.sunrise?s`<tr>
|
|
1910
1971
|
<th>Sunrise</th>
|
|
1911
|
-
<td>${
|
|
1972
|
+
<td>${ee(t.sunrise)}</td>
|
|
1912
1973
|
</tr>`:l}
|
|
1913
|
-
${
|
|
1974
|
+
${t?.sunset?s`<tr>
|
|
1914
1975
|
<th>Sunset</th>
|
|
1915
|
-
<td>${
|
|
1976
|
+
<td>${ee(t.sunset)}</td>
|
|
1916
1977
|
</tr>`:l}
|
|
1917
|
-
${
|
|
1978
|
+
${t?.moonrise?s`<tr>
|
|
1918
1979
|
<th>Moonrise</th>
|
|
1919
|
-
<td>${
|
|
1980
|
+
<td>${ee(t.moonrise)}</td>
|
|
1920
1981
|
</tr>`:l}
|
|
1921
|
-
${
|
|
1982
|
+
${t?.moonset?s`<tr>
|
|
1922
1983
|
<th>Moonset</th>
|
|
1923
|
-
<td>${
|
|
1984
|
+
<td>${ee(t.moonset)}</td>
|
|
1924
1985
|
</tr>`:l}
|
|
1925
1986
|
</tbody>
|
|
1926
1987
|
</table>
|
|
1927
|
-
${this.detail==="detailed"&&(
|
|
1988
|
+
${this.detail==="detailed"&&(o.some(c=>!!c[1])||n.some(c=>!!c[1]))?s`
|
|
1928
1989
|
<div class="section">Auspicious muhurtas</div>
|
|
1929
1990
|
<table>
|
|
1930
1991
|
<tbody>
|
|
1931
|
-
${
|
|
1932
|
-
<th>${
|
|
1933
|
-
<td>${
|
|
1992
|
+
${o.filter(([,c])=>!!c).map(([c,d])=>s`<tr>
|
|
1993
|
+
<th>${c}</th>
|
|
1994
|
+
<td>${De(d)}</td>
|
|
1934
1995
|
</tr>`)}
|
|
1935
1996
|
</tbody>
|
|
1936
1997
|
</table>
|
|
1937
1998
|
<div class="section">Inauspicious periods</div>
|
|
1938
1999
|
<table>
|
|
1939
2000
|
<tbody>
|
|
1940
|
-
${
|
|
1941
|
-
<th>${
|
|
1942
|
-
<td>${
|
|
2001
|
+
${n.filter(([,c])=>!!c).map(([c,d])=>s`<tr>
|
|
2002
|
+
<th>${c}</th>
|
|
2003
|
+
<td>${De(d)}</td>
|
|
1943
2004
|
</tr>`)}
|
|
1944
2005
|
</tbody>
|
|
1945
2006
|
</table>
|
|
1946
2007
|
`:l}
|
|
1947
|
-
</div>`}formatPart(e){if(!e)return"";if(typeof e=="string")return e;if(typeof e=="object"){let
|
|
2008
|
+
</div>`}formatPart(e){if(!e)return"";if(typeof e=="string")return e;if(typeof e=="object"){let t=e;return[t.name,t.lord?`(${t.lord})`:"",t.phase].filter(Boolean).join(" ")}return String(e)}};U.styles=[$,v`
|
|
1948
2009
|
.wrap {
|
|
1949
2010
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
1950
2011
|
border-radius: var(--roxy-radius-md, 8px);
|
|
@@ -2002,18 +2063,18 @@
|
|
|
2002
2063
|
text-transform: uppercase;
|
|
2003
2064
|
letter-spacing: 0.06em;
|
|
2004
2065
|
}
|
|
2005
|
-
`],
|
|
2066
|
+
`],p([h({attribute:!1})],U.prototype,"data",2),p([h({type:String,reflect:!0})],U.prototype,"detail",2),U=p([b("roxy-panchang-table")],U);var Be=360,E=Be/2,vt=170,nr=154,bt=124,me=96,W=class extends y{constructor(){super(...arguments);this.data=null}render(){if(!this.data)return s`<div class="roxy-empty" role="status">No synastry data</div>`;let{person1:e,person2:t,compatibilityScore:a,analysis:o}=this.data,n=this.data.interAspects??[],c=e?.planets??[],d=t?.planets??[],m=typeof a=="number"?Math.round(a):void 0,g=o?.overall,u=o?.strengths??[],f=o?.challenges??[];return c.length>0&&d.length>0?s`<div
|
|
2006
2067
|
class="wrap"
|
|
2007
2068
|
aria-label="Synastry compatibility chart"
|
|
2008
2069
|
>
|
|
2009
2070
|
<div class="head">
|
|
2010
2071
|
<h2 class="title">Synastry</h2>
|
|
2011
|
-
${typeof
|
|
2012
|
-
>${
|
|
2072
|
+
${typeof m=="number"?s`<span class="score" aria-label=${`Score ${m} of 100`}
|
|
2073
|
+
>${m} / 100</span
|
|
2013
2074
|
>`:l}
|
|
2014
2075
|
</div>
|
|
2015
2076
|
<svg
|
|
2016
|
-
viewBox="0 0 ${
|
|
2077
|
+
viewBox="0 0 ${Be} ${Be}"
|
|
2017
2078
|
role="img"
|
|
2018
2079
|
aria-label="Dual chart wheel comparing two natal charts"
|
|
2019
2080
|
>
|
|
@@ -2022,43 +2083,82 @@
|
|
|
2022
2083
|
class="wheel-line"
|
|
2023
2084
|
cx=${E}
|
|
2024
2085
|
cy=${E}
|
|
2025
|
-
r=${
|
|
2086
|
+
r=${vt}
|
|
2026
2087
|
stroke-width="1.5"
|
|
2027
2088
|
/>
|
|
2028
2089
|
<circle
|
|
2029
2090
|
class="wheel-line"
|
|
2030
2091
|
cx=${E}
|
|
2031
2092
|
cy=${E}
|
|
2032
|
-
r=${
|
|
2093
|
+
r=${me+14}
|
|
2033
2094
|
stroke-width="0.8"
|
|
2034
2095
|
/>
|
|
2035
2096
|
<circle
|
|
2036
2097
|
class="wheel-line"
|
|
2037
2098
|
cx=${E}
|
|
2038
2099
|
cy=${E}
|
|
2039
|
-
r=${
|
|
2100
|
+
r=${me-14}
|
|
2040
2101
|
stroke-width="0.6"
|
|
2041
2102
|
/>
|
|
2042
2103
|
${this.renderSpokes()} ${this.renderSigns()}
|
|
2043
|
-
${this.
|
|
2104
|
+
${this.renderInterAspectLines(c,d,n)}
|
|
2105
|
+
${this.renderRing(c,bt,"p1")} ${this.renderRing(d,me,"p2")}
|
|
2044
2106
|
</svg>
|
|
2045
|
-
|
|
2107
|
+
<div class="legend-row">
|
|
2108
|
+
<span><span class="swatch" style="background: var(--roxy-accent)"></span>Person 1</span>
|
|
2109
|
+
<span><span class="swatch" style="background: var(--roxy-info)"></span>Person 2</span>
|
|
2110
|
+
<span><span class="swatch" style="background: var(--roxy-success)"></span>harmonious</span>
|
|
2111
|
+
<span><span class="swatch" style="background: var(--roxy-danger)"></span>challenging</span>
|
|
2112
|
+
</div>
|
|
2113
|
+
${g?s`<p class="summary">${g}</p>`:l}
|
|
2046
2114
|
${n.length>0?this.renderAspects(n):l}
|
|
2047
|
-
${
|
|
2048
|
-
${
|
|
2115
|
+
${u.length>0||f.length>0?s`<div class="lists">
|
|
2116
|
+
${u.length?s`<div>
|
|
2049
2117
|
<h3>Strengths</h3>
|
|
2050
2118
|
<ul>
|
|
2051
|
-
${
|
|
2119
|
+
${u.map(x=>s`<li>${x}</li>`)}
|
|
2052
2120
|
</ul>
|
|
2053
2121
|
</div>`:l}
|
|
2054
|
-
${
|
|
2122
|
+
${f.length?s`<div>
|
|
2055
2123
|
<h3>Challenges</h3>
|
|
2056
2124
|
<ul>
|
|
2057
|
-
${
|
|
2125
|
+
${f.map(x=>s`<li>${x}</li>`)}
|
|
2058
2126
|
</ul>
|
|
2059
2127
|
</div>`:l}
|
|
2060
2128
|
</div>`:l}
|
|
2061
|
-
</div
|
|
2129
|
+
</div>`:s`<div
|
|
2130
|
+
class="wrap"
|
|
2131
|
+
aria-label="Synastry compatibility chart"
|
|
2132
|
+
>
|
|
2133
|
+
<div class="head">
|
|
2134
|
+
<h2 class="title">Synastry</h2>
|
|
2135
|
+
${typeof m=="number"?s`<span class="score" aria-label=${`Score ${m} of 100`}
|
|
2136
|
+
>${m} / 100</span
|
|
2137
|
+
>`:l}
|
|
2138
|
+
</div>
|
|
2139
|
+
<div class="missing-planets" role="status">
|
|
2140
|
+
Synastry response missing planet positions. Pass
|
|
2141
|
+
<code>data</code> with <code>person1.planets</code> and
|
|
2142
|
+
<code>person2.planets</code> arrays from the natal-chart endpoint, or
|
|
2143
|
+
use the <code><roxy-data></code> fallback.
|
|
2144
|
+
</div>
|
|
2145
|
+
${g?s`<p class="summary">${g}</p>`:l}
|
|
2146
|
+
${n.length>0?this.renderAspects(n):l}
|
|
2147
|
+
${u.length>0||f.length>0?s`<div class="lists">
|
|
2148
|
+
${u.length?s`<div>
|
|
2149
|
+
<h3>Strengths</h3>
|
|
2150
|
+
<ul>
|
|
2151
|
+
${u.map(x=>s`<li>${x}</li>`)}
|
|
2152
|
+
</ul>
|
|
2153
|
+
</div>`:l}
|
|
2154
|
+
${f.length?s`<div>
|
|
2155
|
+
<h3>Challenges</h3>
|
|
2156
|
+
<ul>
|
|
2157
|
+
${f.map(x=>s`<li>${x}</li>`)}
|
|
2158
|
+
</ul>
|
|
2159
|
+
</div>`:l}
|
|
2160
|
+
</div>`:l}
|
|
2161
|
+
</div>`}toAngle(e){return 180-e}renderSpokes(){return Array.from({length:12},(e,t)=>{let a=this.toAngle(t*30),o=C(E,E,me-14,a),n=C(E,E,vt,a);return k`<line class="wheel-line" x1=${o.x} y1=${o.y} x2=${n.x} y2=${n.y} stroke-width="0.6" />`})}renderSigns(){return["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"].map((t,a)=>{let o=this.toAngle(a*30+15),n=C(E,E,nr,o);return k`<text class="sign" x=${n.x} y=${n.y} text-anchor="middle" dominant-baseline="central">${ae[t]}</text>`})}renderRing(e,t,a){return e.map(o=>{if(!Number.isFinite(o.longitude))return l;let n=C(E,E,t,this.toAngle(o.longitude)),c=be[Ue(o.name)]??o.name.slice(0,2);return k`<text class=${a} x=${n.x} y=${n.y} text-anchor="middle" dominant-baseline="central"><title>${o.name}</title>${c}</text>`})}renderInterAspectLines(e,t,a){let o=(n,c)=>{let d=Ue(c);for(let m of n)if(Ue(m.name)===d&&typeof m.longitude=="number")return m.longitude};return a.map(n=>{let c=o(e,n.planet1),d=o(t,n.planet2);if(c===void 0||d===void 0)return l;let m=C(E,E,bt-12,this.toAngle(c)),g=C(E,E,me+8,this.toAngle(d)),u=$t(n),f=lr[u]??"aspect-other",w=A(n.orb,1);return k`<line class=${`aspect ${f}`} x1=${m.x} y1=${m.y} x2=${g.x} y2=${g.y}><title>${n.planet1} ${u} ${n.planet2}${w?` (orb ${w}\xB0)`:""}</title></line>`})}renderAspects(e){return s`<table>
|
|
2062
2162
|
<thead>
|
|
2063
2163
|
<tr>
|
|
2064
2164
|
<th>Planet 1</th>
|
|
@@ -2069,17 +2169,15 @@
|
|
|
2069
2169
|
</tr>
|
|
2070
2170
|
</thead>
|
|
2071
2171
|
<tbody>
|
|
2072
|
-
${e.slice(0,
|
|
2073
|
-
<td>${
|
|
2074
|
-
<td>${
|
|
2075
|
-
<td>${
|
|
2076
|
-
<td class="orb">
|
|
2077
|
-
|
|
2078
|
-
</td>
|
|
2079
|
-
<td>${r.strength??""}</td>
|
|
2172
|
+
${e.slice(0,12).map(t=>s`<tr>
|
|
2173
|
+
<td>${t.planet1}</td>
|
|
2174
|
+
<td>${t.planet2}</td>
|
|
2175
|
+
<td>${$t(t)||""}</td>
|
|
2176
|
+
<td class="orb">${A(t.orb,1)}</td>
|
|
2177
|
+
<td>${cr(t.strength)}</td>
|
|
2080
2178
|
</tr>`)}
|
|
2081
2179
|
</tbody>
|
|
2082
|
-
</table>`}};
|
|
2180
|
+
</table>`}};W.styles=[$,v`
|
|
2083
2181
|
.wrap {
|
|
2084
2182
|
display: grid;
|
|
2085
2183
|
gap: var(--roxy-space-md, 1rem);
|
|
@@ -2131,6 +2229,42 @@
|
|
|
2131
2229
|
font-weight: 600;
|
|
2132
2230
|
font-size: 13px;
|
|
2133
2231
|
}
|
|
2232
|
+
.aspect {
|
|
2233
|
+
stroke-width: 0.8;
|
|
2234
|
+
fill: none;
|
|
2235
|
+
opacity: 0.5;
|
|
2236
|
+
}
|
|
2237
|
+
.aspect-trine,
|
|
2238
|
+
.aspect-sextile {
|
|
2239
|
+
stroke: var(--roxy-success, #16a34a);
|
|
2240
|
+
}
|
|
2241
|
+
.aspect-square,
|
|
2242
|
+
.aspect-opposition {
|
|
2243
|
+
stroke: var(--roxy-danger, #dc2626);
|
|
2244
|
+
}
|
|
2245
|
+
.aspect-conjunction {
|
|
2246
|
+
stroke: var(--roxy-accent-fg, #b45309);
|
|
2247
|
+
}
|
|
2248
|
+
.aspect-other {
|
|
2249
|
+
stroke: var(--roxy-muted, #71717a);
|
|
2250
|
+
opacity: 0.35;
|
|
2251
|
+
}
|
|
2252
|
+
.legend-row {
|
|
2253
|
+
display: flex;
|
|
2254
|
+
flex-wrap: wrap;
|
|
2255
|
+
gap: var(--roxy-space-md, 1rem);
|
|
2256
|
+
font-size: var(--roxy-text-xs, 0.75rem);
|
|
2257
|
+
color: var(--roxy-muted, #71717a);
|
|
2258
|
+
margin-top: calc(var(--roxy-space-xs, 0.25rem) * -1);
|
|
2259
|
+
}
|
|
2260
|
+
.legend-row .swatch {
|
|
2261
|
+
display: inline-block;
|
|
2262
|
+
width: 8px;
|
|
2263
|
+
height: 8px;
|
|
2264
|
+
border-radius: 50%;
|
|
2265
|
+
margin-right: 4px;
|
|
2266
|
+
vertical-align: middle;
|
|
2267
|
+
}
|
|
2134
2268
|
|
|
2135
2269
|
.summary {
|
|
2136
2270
|
margin: 0;
|
|
@@ -2178,17 +2312,70 @@
|
|
|
2178
2312
|
padding-left: var(--roxy-space-md, 1rem);
|
|
2179
2313
|
font-size: var(--roxy-text-sm, 0.875rem);
|
|
2180
2314
|
}
|
|
2181
|
-
|
|
2315
|
+
|
|
2316
|
+
.missing-planets {
|
|
2317
|
+
background: color-mix(in srgb, var(--roxy-accent, #f59e0b) 8%, transparent);
|
|
2318
|
+
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
2319
|
+
border-radius: var(--roxy-radius-md, 8px);
|
|
2320
|
+
padding: var(--roxy-space-md, 1rem);
|
|
2321
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
2322
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
2323
|
+
line-height: 1.5;
|
|
2324
|
+
}
|
|
2325
|
+
.missing-planets code {
|
|
2326
|
+
font-family: var(--roxy-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
2327
|
+
font-size: 0.95em;
|
|
2328
|
+
background: color-mix(in srgb, var(--roxy-fg, #0a0a0a) 6%, transparent);
|
|
2329
|
+
padding: 0 4px;
|
|
2330
|
+
border-radius: 4px;
|
|
2331
|
+
}
|
|
2332
|
+
`],p([h({attribute:!1})],W.prototype,"data",2),W=p([b("roxy-synastry-chart")],W);function Ue(i){return i?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():""}var lr={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function $t(i){return(i.type??"").toLowerCase().replace(/_/g,"-")}function cr(i){return typeof i=="number"?Math.round(i).toString():""}var B=class extends y{constructor(){super(...arguments);this.data=null;this.flipped=!1;this.toggleFlip=()=>{this.flipped=!this.flipped}}render(){let e=this.data;return e?"card"in e?this.renderDailyCard(e):this.renderFullCard(e):s`<div class="roxy-empty" role="status">No tarot data</div>`}renderDailyCard(e){let t=e.card,a=this.flipped!==!!t.reversed,o=t.keywords??[];return s`<article class="card" aria-label=${t.name??"Tarot card"}>
|
|
2333
|
+
<div class="image-wrap">
|
|
2334
|
+
${t.imageUrl?s`<img
|
|
2335
|
+
class=${`image ${a?"reversed":""}`}
|
|
2336
|
+
src=${t.imageUrl}
|
|
2337
|
+
alt=${t.name??"Tarot card"}
|
|
2338
|
+
tabindex="0"
|
|
2339
|
+
@click=${this.toggleFlip}
|
|
2340
|
+
@keydown=${n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this.toggleFlip())}}
|
|
2341
|
+
/>`:s`<div
|
|
2342
|
+
class=${`image ${a?"reversed":""}`}
|
|
2343
|
+
style="aspect-ratio: 0.6; display: flex; align-items: center; justify-content: center; color: var(--roxy-muted)"
|
|
2344
|
+
>
|
|
2345
|
+
${t.name??"?"}
|
|
2346
|
+
</div>`}
|
|
2347
|
+
</div>
|
|
2348
|
+
<div>
|
|
2349
|
+
<div class="meta">
|
|
2350
|
+
${t.arcana?s`${t.arcana} arcana`:l}
|
|
2351
|
+
${a?s` · reversed`:l}
|
|
2352
|
+
</div>
|
|
2353
|
+
<h2 class="title">${t.name??"Tarot card"}</h2>
|
|
2354
|
+
${e.dailyMessage?s`<p class="message">${e.dailyMessage}</p>`:l}
|
|
2355
|
+
${t.meaning?s`<p>${t.meaning}</p>`:l}
|
|
2356
|
+
${o.length>0?s`<div class="chips">
|
|
2357
|
+
${o.map(n=>s`<span>${n}</span>`)}
|
|
2358
|
+
</div>`:l}
|
|
2359
|
+
<button
|
|
2360
|
+
class="flip"
|
|
2361
|
+
type="button"
|
|
2362
|
+
@click=${this.toggleFlip}
|
|
2363
|
+
aria-pressed=${this.flipped?"true":"false"}
|
|
2364
|
+
>
|
|
2365
|
+
Flip card
|
|
2366
|
+
</button>
|
|
2367
|
+
</div>
|
|
2368
|
+
</article>`}renderFullCard(e){let t=this.flipped,a=t?e.reversed:e.upright,o=t?e.keywords?.reversed??[]:e.keywords?.upright??[];return s`<article class="card" aria-label=${e.name??"Tarot card"}>
|
|
2182
2369
|
<div class="image-wrap">
|
|
2183
2370
|
${e.imageUrl?s`<img
|
|
2184
|
-
class=${`image ${
|
|
2371
|
+
class=${`image ${t?"reversed":""}`}
|
|
2185
2372
|
src=${e.imageUrl}
|
|
2186
2373
|
alt=${e.name??"Tarot card"}
|
|
2187
2374
|
tabindex="0"
|
|
2188
2375
|
@click=${this.toggleFlip}
|
|
2189
2376
|
@keydown=${n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this.toggleFlip())}}
|
|
2190
2377
|
/>`:s`<div
|
|
2191
|
-
class=${`image ${
|
|
2378
|
+
class=${`image ${t?"reversed":""}`}
|
|
2192
2379
|
style="aspect-ratio: 0.6; display: flex; align-items: center; justify-content: center; color: var(--roxy-muted)"
|
|
2193
2380
|
>
|
|
2194
2381
|
${e.name??"?"}
|
|
@@ -2198,14 +2385,12 @@
|
|
|
2198
2385
|
<div class="meta">
|
|
2199
2386
|
${e.arcana?s`${e.arcana} arcana`:l}
|
|
2200
2387
|
${e.number!==void 0&&e.number!==null?s` · ${e.number}`:l}
|
|
2201
|
-
${
|
|
2202
|
-
${e.position?s`<span class="position">${e.position}</span>`:l}
|
|
2388
|
+
${t?s` · reversed`:l}
|
|
2203
2389
|
</div>
|
|
2204
2390
|
<h2 class="title">${e.name??"Tarot card"}</h2>
|
|
2205
|
-
${
|
|
2206
|
-
${
|
|
2207
|
-
|
|
2208
|
-
${e.keywords.map(n=>s`<span>${n}</span>`)}
|
|
2391
|
+
${a?.description?s`<p>${a.description}</p>`:l}
|
|
2392
|
+
${o.length>0?s`<div class="chips">
|
|
2393
|
+
${o.map(n=>s`<span>${n}</span>`)}
|
|
2209
2394
|
</div>`:l}
|
|
2210
2395
|
<button
|
|
2211
2396
|
class="flip"
|
|
@@ -2216,7 +2401,7 @@
|
|
|
2216
2401
|
Flip card
|
|
2217
2402
|
</button>
|
|
2218
2403
|
</div>
|
|
2219
|
-
</article>`}};
|
|
2404
|
+
</article>`}};B.styles=[$,v`
|
|
2220
2405
|
.card {
|
|
2221
2406
|
background: var(--roxy-bg, #fff);
|
|
2222
2407
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
@@ -2270,11 +2455,6 @@
|
|
|
2270
2455
|
letter-spacing: 0.06em;
|
|
2271
2456
|
margin-bottom: var(--roxy-space-sm, 0.5rem);
|
|
2272
2457
|
}
|
|
2273
|
-
.position {
|
|
2274
|
-
color: var(--roxy-info, #0284c7);
|
|
2275
|
-
margin-left: var(--roxy-space-xs, 0.25rem);
|
|
2276
|
-
text-transform: capitalize;
|
|
2277
|
-
}
|
|
2278
2458
|
|
|
2279
2459
|
.message {
|
|
2280
2460
|
color: var(--roxy-fg, #0a0a0a);
|
|
@@ -2311,35 +2491,51 @@
|
|
|
2311
2491
|
.flip:hover {
|
|
2312
2492
|
transform: scale(1.02);
|
|
2313
2493
|
}
|
|
2314
|
-
`],
|
|
2494
|
+
`],p([h({attribute:!1})],B.prototype,"data",2),p([P()],B.prototype,"flipped",2),B=p([b("roxy-tarot-card")],B);var q=class extends y{constructor(){super(...arguments);this.data=null;this.spread="three-card"}render(){let e=this.data;if(!e)return s`<div class="roxy-empty" role="status">No tarot spread</div>`;let t="answer"in e,a="cards"in e&&!("spread"in e),o=a?[]:"positions"in e?e.positions??[]:[],n=a&&"cards"in e?e.cards:[],c=t?e.answer:void 0,d=t?e.strength:void 0,m="spread"in e?e.spread:this.spread.replace(/-/g," "),g="question"in e?e.question:void 0,u="summary"in e?e.summary:void 0,f=t?e.interpretation:void 0,w=c?c.toLowerCase().replace(/[^a-z]/g,""):"";return s`<article class="wrap" aria-label="Tarot spread">
|
|
2315
2495
|
<header class="head">
|
|
2316
|
-
<h2 class="title">${
|
|
2317
|
-
${
|
|
2496
|
+
<h2 class="title">${m}</h2>
|
|
2497
|
+
${g?s`<span class="question">"${g}"</span>`:l}
|
|
2318
2498
|
</header>
|
|
2319
|
-
${
|
|
2320
|
-
<span class=${`answer ${
|
|
2321
|
-
${
|
|
2499
|
+
${t?s`<div>
|
|
2500
|
+
<span class=${`answer ${w}`}>${c}</span>
|
|
2501
|
+
${d?s`<small> · ${d}</small>`:l}
|
|
2502
|
+
</div>`:l}
|
|
2503
|
+
${o.length>0?s`<div class="grid">
|
|
2504
|
+
${o.map(x=>s`<div class="card">
|
|
2505
|
+
<p class="label">${x.name??""}</p>
|
|
2506
|
+
<div class="image">
|
|
2507
|
+
${x.card?.imageUrl?s`<img
|
|
2508
|
+
src=${x.card.imageUrl}
|
|
2509
|
+
alt=${x.card.name??"tarot card"}
|
|
2510
|
+
class=${x.card.reversed?"reversed":""}
|
|
2511
|
+
/>`:s`${x.card?.name??"?"}`}
|
|
2512
|
+
</div>
|
|
2513
|
+
<p class="name">
|
|
2514
|
+
${x.card?.name??""}
|
|
2515
|
+
${x.card?.reversed?s`<small>(reversed)</small>`:l}
|
|
2516
|
+
</p>
|
|
2517
|
+
${x.interpretation?s`<p class="interp">${x.interpretation}</p>`:l}
|
|
2518
|
+
</div>`)}
|
|
2322
2519
|
</div>`:l}
|
|
2323
|
-
${
|
|
2324
|
-
${
|
|
2325
|
-
<p class="label">${n.label??n.name??n.position??""}</p>
|
|
2520
|
+
${n.length>0?s`<div class="grid">
|
|
2521
|
+
${n.map(x=>s`<div class="card">
|
|
2326
2522
|
<div class="image">
|
|
2327
|
-
${
|
|
2328
|
-
src=${
|
|
2329
|
-
alt=${
|
|
2330
|
-
class=${
|
|
2331
|
-
/>`:s`${
|
|
2523
|
+
${x.imageUrl?s`<img
|
|
2524
|
+
src=${x.imageUrl}
|
|
2525
|
+
alt=${x.name??"tarot card"}
|
|
2526
|
+
class=${x.reversed?"reversed":""}
|
|
2527
|
+
/>`:s`${x.name??"?"}`}
|
|
2332
2528
|
</div>
|
|
2333
2529
|
<p class="name">
|
|
2334
|
-
${
|
|
2335
|
-
${
|
|
2530
|
+
${x.name??""}
|
|
2531
|
+
${x.reversed?s`<small>(reversed)</small>`:l}
|
|
2336
2532
|
</p>
|
|
2337
|
-
${
|
|
2533
|
+
${x.meaning?s`<p class="interp">${x.meaning}</p>`:l}
|
|
2338
2534
|
</div>`)}
|
|
2339
2535
|
</div>`:l}
|
|
2340
|
-
${
|
|
2341
|
-
${
|
|
2342
|
-
</article>`}};
|
|
2536
|
+
${u?s`<p class="reading">${u}</p>`:l}
|
|
2537
|
+
${f?s`<p class="reading">${f}</p>`:l}
|
|
2538
|
+
</article>`}};q.styles=[$,v`
|
|
2343
2539
|
.wrap {
|
|
2344
2540
|
display: grid;
|
|
2345
2541
|
gap: var(--roxy-space-md, 1rem);
|
|
@@ -2375,15 +2571,15 @@
|
|
|
2375
2571
|
}
|
|
2376
2572
|
.answer.yes {
|
|
2377
2573
|
background: color-mix(in srgb, var(--roxy-success, #16a34a) 16%, transparent);
|
|
2378
|
-
color: var(--roxy-success, #
|
|
2574
|
+
color: var(--roxy-success-fg, #166534);
|
|
2379
2575
|
}
|
|
2380
2576
|
.answer.no {
|
|
2381
2577
|
background: color-mix(in srgb, var(--roxy-danger, #dc2626) 16%, transparent);
|
|
2382
|
-
color: var(--roxy-danger, #
|
|
2578
|
+
color: var(--roxy-danger-fg, #991b1b);
|
|
2383
2579
|
}
|
|
2384
2580
|
.answer.maybe {
|
|
2385
2581
|
background: color-mix(in srgb, var(--roxy-warning, #ea580c) 16%, transparent);
|
|
2386
|
-
color: var(--roxy-warning, #
|
|
2582
|
+
color: var(--roxy-warning-fg, #9a3412);
|
|
2387
2583
|
}
|
|
2388
2584
|
|
|
2389
2585
|
.grid {
|
|
@@ -2445,7 +2641,7 @@
|
|
|
2445
2641
|
margin: 0;
|
|
2446
2642
|
color: var(--roxy-fg, #0a0a0a);
|
|
2447
2643
|
}
|
|
2448
|
-
`],
|
|
2644
|
+
`],p([h({attribute:!1})],q.prototype,"data",2),p([h({type:String,reflect:!0})],q.prototype,"spread",2),q=p([b("roxy-tarot-spread")],q);var dr={1:{x:150,y:58},2:{x:205,y:52},3:{x:253,y:112},4:{x:243,y:150},5:{x:253,y:188},6:{x:205,y:248},7:{x:150,y:242},8:{x:95,y:248},9:{x:47,y:188},10:{x:57,y:150},11:{x:47,y:112},12:{x:95,y:52}},pr={1:{x:150,y:35},2:{x:222,y:40},3:{x:265,y:100},4:{x:265,y:150},5:{x:265,y:200},6:{x:222,y:260},7:{x:150,y:265},8:{x:78,y:260},9:{x:35,y:200},10:{x:35,y:150},11:{x:35,y:100},12:{x:78,y:40}},mr=["aries","taurus","gemini","cancer","leo","virgo","libra","scorpio","sagittarius","capricorn","aquarius","pisces"],hr={aries:"Aries",taurus:"Taurus",gemini:"Gemini",cancer:"Cancer",leo:"Leo",virgo:"Virgo",libra:"Libra",scorpio:"Scorpio",sagittarius:"Sagittarius",capricorn:"Capricorn",aquarius:"Aquarius",pisces:"Pisces"},K=class extends y{constructor(){super(...arguments);this.data=null;this.chartStyle="south"}buildHouses(){if(!this.data)return[];let e=this.data,t=[];for(let a=0;a<12;a++){let o=mr[a],c=(e[o]?.signs??[]).map(d=>d.graha).filter(Boolean);t.push({house:a+1,sign:hr[o]??"",planets:c})}return t}render(){if(!this.data)return s`<div class="roxy-empty" role="status">No kundli data</div>`;let e=this.buildHouses();return s`<div class="wrap">
|
|
2449
2645
|
<h2 class="title">Vedic kundli</h2>
|
|
2450
2646
|
<svg
|
|
2451
2647
|
viewBox="0 0 300 300"
|
|
@@ -2468,14 +2664,16 @@
|
|
|
2468
2664
|
<line class="line" x1="150" y1="290" x2="80" y2="220" stroke-width="1" />
|
|
2469
2665
|
<line class="line" x1="10" y1="150" x2="80" y2="220" stroke-width="1" />
|
|
2470
2666
|
<line class="line" x1="10" y1="150" x2="80" y2="80" stroke-width="1" />
|
|
2471
|
-
${e.map(
|
|
2667
|
+
${e.map(t=>this.renderHouseGroup(t))}
|
|
2472
2668
|
</svg>
|
|
2473
|
-
</div>`}renderHouseGroup(e){let
|
|
2669
|
+
</div>`}isLagna(e){let t=this.data?.meta?.Lagna?.rashi;return t?t.toLowerCase()===e.sign.toLowerCase():!1}renderHouseGroup(e){let t=dr[e.house],a=pr[e.house];if(!t||!a)return l;let o=gt[e.sign]??"",n=e.planets??[],c=this.isLagna(e);return k`
|
|
2474
2670
|
<g>
|
|
2475
|
-
${
|
|
2476
|
-
${
|
|
2671
|
+
${c?k`<rect class="lagna-bg" x=${t.x-30} y=${t.y-28} width="60" height="56" rx="6" />`:l}
|
|
2672
|
+
${o?k`<text class="sign-text" x=${a.x} y=${a.y} text-anchor="middle" dominant-baseline="central">${o}</text>`:l}
|
|
2673
|
+
${c?k`<text class="lagna-marker" x=${t.x} y=${t.y-18} text-anchor="middle" dominant-baseline="central">LAGNA</text>`:l}
|
|
2674
|
+
${n.map((d,m)=>{let g=ut[ur(d)]??d.slice(0,2),u=13,x=(c?t.y+8:t.y)-(n.length-1)*u/2+m*u;return k`<text class="planet-text" x=${t.x} y=${x} text-anchor="middle" dominant-baseline="central">${g}</text>`})}
|
|
2477
2675
|
</g>
|
|
2478
|
-
`}};
|
|
2676
|
+
`}};K.styles=[$,v`
|
|
2479
2677
|
.wrap {
|
|
2480
2678
|
display: grid;
|
|
2481
2679
|
gap: var(--roxy-space-md, 1rem);
|
|
@@ -2507,7 +2705,19 @@
|
|
|
2507
2705
|
font-weight: 600;
|
|
2508
2706
|
font-family: var(--roxy-font-sans);
|
|
2509
2707
|
}
|
|
2510
|
-
|
|
2708
|
+
.lagna-marker {
|
|
2709
|
+
fill: var(--roxy-accent-fg, #b45309);
|
|
2710
|
+
font-size: 8px;
|
|
2711
|
+
font-weight: 700;
|
|
2712
|
+
font-family: var(--roxy-font-sans);
|
|
2713
|
+
letter-spacing: 0.05em;
|
|
2714
|
+
}
|
|
2715
|
+
.lagna-bg {
|
|
2716
|
+
fill: color-mix(in srgb, var(--roxy-accent, #f59e0b) 12%, transparent);
|
|
2717
|
+
stroke: color-mix(in srgb, var(--roxy-accent, #f59e0b) 45%, transparent);
|
|
2718
|
+
stroke-width: 0.8;
|
|
2719
|
+
}
|
|
2720
|
+
`],p([h({attribute:!1})],K.prototype,"data",2),p([h({type:String,reflect:!0,attribute:"chart-style"})],K.prototype,"chartStyle",2),K=p([b("roxy-vedic-kundli")],K);function ur(i){return i?i.charAt(0).toUpperCase()+i.slice(1).toLowerCase():""}var Se=[{pascal:"RoxyNatalChart",tag:"roxy-natal-chart",slug:"natal-chart",domain:"astrology",heading:"Natal chart",endpoints:["astrology.generateNatalChart"],description:"Western natal chart wheel for /astrology/natal-chart responses",docsLabel:"Western",endpointLabel:"POST /astrology/natal-chart",docsSummary:"Natal chart wheel with planet glyphs and aspect lines",topic:"Astrology"},{pascal:"RoxyHoroscopeCard",tag:"roxy-horoscope-card",slug:"horoscope-card",domain:"astrology",heading:"Daily horoscope",endpoints:["astrology.getDailyHoroscope","astrology.getWeeklyHoroscope","astrology.getMonthlyHoroscope"],description:"Daily, weekly, or monthly horoscope card for /astrology/horoscope/...",docsLabel:"Western",endpointLabel:"GET /astrology/horoscope/{sign}/{daily,weekly,monthly}",docsSummary:"Daily, weekly, or monthly horoscope card",topic:"Astrology"},{pascal:"RoxySynastryChart",tag:"roxy-synastry-chart",slug:"synastry-chart",domain:"astrology",heading:"Synastry",endpoints:["astrology.calculateSynastry"],description:"Dual-wheel synastry chart with inter-aspects table",docsLabel:"Western",endpointLabel:"POST /astrology/synastry",docsSummary:"Dual-wheel synastry with inter-aspects table",topic:"Astrology"},{pascal:"RoxyCompatibilityCard",tag:"roxy-compatibility-card",slug:"compatibility-card",domain:"astrology",heading:"Compatibility score",endpoints:["astrology.calculateCompatibility","numerology.calculateNumCompatibility","biorhythm.calculateBioCompatibility"],description:"Cross-domain compatibility score card",docsLabel:"Cross",endpointLabel:"POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility",docsSummary:"Score card with category breakdown",topic:"Astrology"},{pascal:"RoxyMoonPhase",tag:"roxy-moon-phase",slug:"moon-phase",domain:"astrology",heading:"Moon phase",endpoints:["astrology.getCurrentMoonPhase","astrology.getUpcomingMoonPhases","astrology.getMoonCalendar"],description:"Moon phase card and calendar",docsLabel:"Western",endpointLabel:"GET /astrology/moon-phase/{current,upcoming,calendar/...}",docsSummary:"Moon phase card and calendar",topic:"Astrology"},{pascal:"RoxyVedicKundli",tag:"roxy-vedic-kundli",slug:"vedic-kundli",domain:"vedic",heading:"Vedic kundli",endpoints:["vedicAstrology.generateBirthChart"],description:"South or North Indian Vedic kundli for /vedic-astrology/birth-chart",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/birth-chart",docsSummary:"South or North Indian kundli",topic:"Vedic"},{pascal:"RoxyPanchangTable",tag:"roxy-panchang-table",slug:"panchang-table",domain:"vedic",heading:"Panchang",endpoints:["vedicAstrology.getBasicPanchang","vedicAstrology.getDetailedPanchang"],description:"Panchang muhurta table with auspicious and inauspicious periods",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/panchang/{basic,detailed}",docsSummary:"15+ muhurtas in detailed mode",topic:"Vedic"},{pascal:"RoxyDashaTimeline",tag:"roxy-dasha-timeline",slug:"dasha-timeline",domain:"vedic",heading:"Vimshottari dasha",endpoints:["vedicAstrology.getCurrentDasha","vedicAstrology.getMajorDashas","vedicAstrology.getSubDashas"],description:"Vimshottari dasha timeline with active mahadasha highlighted",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dasha/{current,major,sub/...}",docsSummary:"Vimshottari mahadasha + antardasha + pratyantardasha",topic:"Vedic"},{pascal:"RoxyDoshaCard",tag:"roxy-dosha-card",slug:"dosha-card",domain:"vedic",heading:"Manglik dosha",endpoints:["vedicAstrology.checkManglikDosha","vedicAstrology.checkKalsarpaDosha","vedicAstrology.checkSadhesati"],description:"Manglik, Kaal Sarp, or Sade Sati presence card",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}",docsSummary:"Presence, severity, remedies, scoped effects",topic:"Vedic"},{pascal:"RoxyGunaMilan",tag:"roxy-guna-milan",slug:"guna-milan",domain:"vedic",heading:"Guna milan",endpoints:["vedicAstrology.calculateGunMilan"],description:"36-point Ashtakoota matrimonial compatibility breakdown",docsLabel:"Vedic",endpointLabel:"POST /vedic-astrology/compatibility",docsSummary:"36-point Ashtakoota with eight sub-scores",topic:"Vedic"},{pascal:"RoxyKpPlanetsTable",tag:"roxy-kp-planets-table",slug:"kp-planets-table",domain:"vedic",heading:"KP planets",endpoints:["vedicAstrology.getKpPlanets"],description:"KP planets table with sub-lord and sub-sub-lord columns",docsLabel:"Vedic (KP)",endpointLabel:"POST /vedic-astrology/kp/planets",docsSummary:"Sub-lord and sub-sub-lord columns",topic:"Vedic"},{pascal:"RoxyNumerologyCard",tag:"roxy-numerology-card",slug:"numerology-card",domain:"numerology",heading:"Life path number",endpoints:["numerology.calculateLifePath","numerology.calculateExpression","numerology.calculatePersonalYear","numerology.generateNumerologyChart"],description:"Numerology card for life path, expression, personal year, or full chart",docsLabel:"Numerology",endpointLabel:"POST /numerology/{life-path,expression,personal-year,chart}",docsSummary:"Life path, expression, personal year, full chart",topic:"Numerology"},{pascal:"RoxyTarotCard",tag:"roxy-tarot-card",slug:"tarot-card",domain:"tarot",heading:"Daily tarot card",endpoints:["tarot.getCard","tarot.getDailyCard"],description:"Single tarot card with upright/reversed flip animation",docsLabel:"Tarot",endpointLabel:"GET /tarot/cards/{id}, POST /tarot/daily",docsSummary:"Single card with upright and reversed flip",topic:"Tarot"},{pascal:"RoxyTarotSpread",tag:"roxy-tarot-spread",slug:"tarot-spread",domain:"tarot",heading:"Three-card spread",endpoints:["tarot.castThreeCard","tarot.castCelticCross","tarot.castLoveSpread","tarot.castYesNo","tarot.drawCards"],description:"Tarot spread renderer for three-card, Celtic Cross, love, or yes/no",docsLabel:"Tarot",endpointLabel:"POST /tarot/spreads/{three-card,celtic-cross,love}, /tarot/yes-no, /tarot/draw",docsSummary:"Spreads with positions and reading",topic:"Tarot"},{pascal:"RoxyBiorhythmChart",tag:"roxy-biorhythm-chart",slug:"biorhythm-chart",domain:"biorhythm",heading:"Daily biorhythm",endpoints:["biorhythm.getDailyBiorhythm","biorhythm.getForecast","biorhythm.getCriticalDays"],description:"Daily biorhythm bars or multi-day forecast cycle lines",docsLabel:"Biorhythm",endpointLabel:"POST /biorhythm/{daily,forecast,critical-days}",docsSummary:"Daily bars, forecast cycle lines, critical days",topic:"Biorhythm"},{pascal:"RoxyHexagram",tag:"roxy-hexagram",slug:"hexagram",domain:"iching",heading:"I Ching hexagram",endpoints:["iching.getHexagram","iching.castReading","iching.getDailyHexagram","iching.castDailyReading","iching.getRandomHexagram"],description:"I Ching hexagram with trigram glyphs, judgment, image, and changing lines",docsLabel:"I Ching",endpointLabel:"GET /iching/hexagrams/{number}, /iching/cast, POST /iching/daily, /iching/daily/cast",docsSummary:"Hexagram with trigrams, judgment, image, changing lines",topic:"I Ching"},{pascal:"RoxyEndpointForm",tag:"roxy-endpoint-form",slug:"endpoint-form",domain:"utility",heading:"Schema-driven form",endpoints:[],description:"Schema-driven form that emits roxy-submit with a validated payload",docsLabel:"Helper",endpointLabel:"Any endpoint via x-roxy-ui hints",docsSummary:"Schema-driven form, emits roxy-submit",topic:"Helpers",selfFetching:!0},{pascal:"RoxyLocationSearch",tag:"roxy-location-search",slug:"location-search",domain:"utility",heading:"City search",endpoints:["location.searchCities"],description:"City search input with debounced /location/search calls",docsLabel:"Helper",endpointLabel:"GET /location/search",docsSummary:"Debounced city search input, emits roxy-location-select",topic:"Helpers",selfFetching:!0},{pascal:"RoxyData",tag:"roxy-data",slug:"data",domain:"utility",heading:"Generic renderer",endpoints:[],description:"Generic fallback renderer for any OpenAPI response shape",docsLabel:"Helper",endpointLabel:"Any response shape",docsSummary:"Generic fallback renderer for unknown shapes",topic:"Helpers",selfFetching:!0}];var wt="0.1.3";var gr=Se.map(i=>i.slug);return Et(yr);})();
|
|
2511
2721
|
/*! Bundled license information:
|
|
2512
2722
|
|
|
2513
2723
|
@lit/reactive-element/css-tag.js:
|