@roxyapi/ui 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/components-catalog.json +1 -1
  2. package/dist/cdn/THIRD-PARTY-NOTICES.txt +123 -0
  3. package/dist/cdn/components/almanac-day.js +1 -50
  4. package/dist/cdn/components/angel-number-card.js +3 -50
  5. package/dist/cdn/components/angel-number-lookup.js +1 -48
  6. package/dist/cdn/components/arudha-padas.js +1 -48
  7. package/dist/cdn/components/ashtakavarga-grid.js +1 -48
  8. package/dist/cdn/components/aspects-table.js +3 -50
  9. package/dist/cdn/components/astrocartography-map.js +2 -49
  10. package/dist/cdn/components/bazi-chart.js +1 -48
  11. package/dist/cdn/components/bhav-chalit-table.js +1 -48
  12. package/dist/cdn/components/bhava-bala-table.js +2 -49
  13. package/dist/cdn/components/biorhythm-chart.js +1 -48
  14. package/dist/cdn/components/bodygraph.js +2 -51
  15. package/dist/cdn/components/chara-karakas.js +1 -48
  16. package/dist/cdn/components/choghadiya-grid.js +1 -48
  17. package/dist/cdn/components/compatibility-card.js +1 -48
  18. package/dist/cdn/components/compound-number.js +1 -48
  19. package/dist/cdn/components/crystal-card.js +1 -48
  20. package/dist/cdn/components/crystal-grid.js +1 -48
  21. package/dist/cdn/components/dasha-timeline.js +1 -48
  22. package/dist/cdn/components/data.js +1 -48
  23. package/dist/cdn/components/divisional-chart.js +2 -51
  24. package/dist/cdn/components/dosha-card.js +1 -48
  25. package/dist/cdn/components/dosha-constitution.js +1 -48
  26. package/dist/cdn/components/dream-card.js +1 -48
  27. package/dist/cdn/components/dream-search.js +2 -49
  28. package/dist/cdn/components/endpoint-form.js +2 -58
  29. package/dist/cdn/components/ephemeris-table.js +1 -48
  30. package/dist/cdn/components/fixed-stars.js +2 -49
  31. package/dist/cdn/components/flying-star-chart.js +1 -48
  32. package/dist/cdn/components/forecast-digest.js +1 -48
  33. package/dist/cdn/components/forecast-timeline.js +3 -52
  34. package/dist/cdn/components/gematria.js +1 -48
  35. package/dist/cdn/components/gochara-table.js +1 -48
  36. package/dist/cdn/components/guna-milan.js +1 -48
  37. package/dist/cdn/components/hd-connection.js +3 -52
  38. package/dist/cdn/components/hd-penta.js +2 -49
  39. package/dist/cdn/components/hd-type-card.js +2 -49
  40. package/dist/cdn/components/hd-variables.js +1 -48
  41. package/dist/cdn/components/heliacal-table.js +1 -48
  42. package/dist/cdn/components/hexagram.js +1 -48
  43. package/dist/cdn/components/hora-table.js +1 -48
  44. package/dist/cdn/components/horoscope-card.js +1 -48
  45. package/dist/cdn/components/kp-chart.js +1 -48
  46. package/dist/cdn/components/kp-finance-card.js +1 -48
  47. package/dist/cdn/components/kp-planets-table.js +1 -48
  48. package/dist/cdn/components/kp-ruling-planets.js +3 -50
  49. package/dist/cdn/components/kua-card.js +1 -48
  50. package/dist/cdn/components/local-space-compass.js +2 -49
  51. package/dist/cdn/components/location-search.js +1 -41
  52. package/dist/cdn/components/luck-pillars.js +1 -48
  53. package/dist/cdn/components/mayan-day-sign.js +1 -48
  54. package/dist/cdn/components/moon-phase.js +1 -50
  55. package/dist/cdn/components/nakshatra-card.js +2 -49
  56. package/dist/cdn/components/natal-chart.js +2 -51
  57. package/dist/cdn/components/numerology-card.js +1 -48
  58. package/dist/cdn/components/panchang-table.js +1 -50
  59. package/dist/cdn/components/positions-table.js +1 -48
  60. package/dist/cdn/components/profection-card.js +1 -48
  61. package/dist/cdn/components/reference-card.js +1 -48
  62. package/dist/cdn/components/relocation-wheel.js +2 -51
  63. package/dist/cdn/components/report.js +1 -48
  64. package/dist/cdn/components/shadbala-table.js +1 -48
  65. package/dist/cdn/components/synastry-chart.js +4 -53
  66. package/dist/cdn/components/tarot-card.js +2 -49
  67. package/dist/cdn/components/tarot-catalog.js +2 -49
  68. package/dist/cdn/components/tarot-spread.js +2 -49
  69. package/dist/cdn/components/transit-wheel.js +2 -49
  70. package/dist/cdn/components/transits-table.js +1 -48
  71. package/dist/cdn/components/upagraha-table.js +1 -48
  72. package/dist/cdn/components/vastu-mandala.js +3 -50
  73. package/dist/cdn/components/vedic-aspects.js +1 -48
  74. package/dist/cdn/components/vedic-daily.js +1 -48
  75. package/dist/cdn/components/vedic-kundli.js +2 -51
  76. package/dist/cdn/components/vedic-planets-table.js +1 -48
  77. package/dist/cdn/components/western-planets-table.js +1 -48
  78. package/dist/cdn/components/yoga-list.js +1 -48
  79. package/dist/cdn/components/zodiac-card.js +1 -48
  80. package/dist/cdn/roxy-ui.js +78 -135
  81. package/dist/charts.cjs +13 -16
  82. package/dist/charts.js +10 -13
  83. package/dist/components/almanac-day.js +1 -1
  84. package/dist/components/angel-number-card.js +1 -1
  85. package/dist/components/angel-number-lookup.js +1 -1
  86. package/dist/components/arudha-padas.js +1 -1
  87. package/dist/components/ashtakavarga-grid.js +1 -1
  88. package/dist/components/aspects-table.js +1 -1
  89. package/dist/components/astrocartography-map.js +1 -1
  90. package/dist/components/bazi-chart.js +1 -1
  91. package/dist/components/bhav-chalit-table.js +1 -1
  92. package/dist/components/bhava-bala-table.js +1 -1
  93. package/dist/components/biorhythm-chart.js +1 -1
  94. package/dist/components/bodygraph.js +1 -1
  95. package/dist/components/chara-karakas.js +1 -1
  96. package/dist/components/choghadiya-grid.js +1 -1
  97. package/dist/components/compatibility-card.js +1 -1
  98. package/dist/components/compound-number.js +1 -1
  99. package/dist/components/crystal-card.js +1 -1
  100. package/dist/components/crystal-grid.js +1 -1
  101. package/dist/components/dasha-timeline.js +1 -1
  102. package/dist/components/data.js +1 -1
  103. package/dist/components/divisional-chart.js +1 -1
  104. package/dist/components/dosha-card.js +1 -1
  105. package/dist/components/dosha-constitution.js +1 -1
  106. package/dist/components/dream-card.js +1 -1
  107. package/dist/components/dream-search.js +1 -1
  108. package/dist/components/endpoint-form.js +1 -1
  109. package/dist/components/ephemeris-table.js +1 -1
  110. package/dist/components/fixed-stars.js +1 -1
  111. package/dist/components/flying-star-chart.js +1 -1
  112. package/dist/components/forecast-digest.js +1 -1
  113. package/dist/components/forecast-timeline.js +1 -1
  114. package/dist/components/gematria.js +1 -1
  115. package/dist/components/gochara-table.js +1 -1
  116. package/dist/components/guna-milan.js +1 -1
  117. package/dist/components/hd-connection.js +1 -1
  118. package/dist/components/hd-penta.js +1 -1
  119. package/dist/components/hd-type-card.js +1 -1
  120. package/dist/components/hd-variables.js +1 -1
  121. package/dist/components/heliacal-table.js +1 -1
  122. package/dist/components/hexagram.js +1 -1
  123. package/dist/components/hora-table.js +1 -1
  124. package/dist/components/horoscope-card.js +1 -1
  125. package/dist/components/kp-chart.js +1 -1
  126. package/dist/components/kp-finance-card.js +1 -1
  127. package/dist/components/kp-planets-table.js +1 -1
  128. package/dist/components/kp-ruling-planets.js +1 -1
  129. package/dist/components/kua-card.js +1 -1
  130. package/dist/components/local-space-compass.js +2 -2
  131. package/dist/components/location-search.js +1 -1
  132. package/dist/components/luck-pillars.js +1 -1
  133. package/dist/components/mayan-day-sign.js +1 -1
  134. package/dist/components/moon-phase.js +1 -1
  135. package/dist/components/nakshatra-card.js +1 -1
  136. package/dist/components/natal-chart.js +1 -1
  137. package/dist/components/numerology-card.js +1 -1
  138. package/dist/components/panchang-table.js +1 -1
  139. package/dist/components/positions-table.js +1 -1
  140. package/dist/components/profection-card.js +1 -1
  141. package/dist/components/reference-card.js +1 -1
  142. package/dist/components/relocation-wheel.js +1 -1
  143. package/dist/components/report.js +1 -1
  144. package/dist/components/shadbala-table.js +1 -1
  145. package/dist/components/synastry-chart.js +1 -1
  146. package/dist/components/tarot-card.js +1 -1
  147. package/dist/components/tarot-catalog.js +1 -1
  148. package/dist/components/tarot-spread.js +1 -1
  149. package/dist/components/transit-wheel.js +8 -8
  150. package/dist/components/transits-table.js +1 -1
  151. package/dist/components/upagraha-table.js +1 -1
  152. package/dist/components/vastu-mandala.js +1 -1
  153. package/dist/components/vedic-aspects.js +1 -1
  154. package/dist/components/vedic-daily.js +1 -1
  155. package/dist/components/vedic-kundli.js +1 -1
  156. package/dist/components/vedic-planets-table.js +1 -1
  157. package/dist/components/western-planets-table.js +1 -1
  158. package/dist/components/yoga-list.js +1 -1
  159. package/dist/components/zodiac-card.js +1 -1
  160. package/dist/index.cjs +77 -77
  161. package/dist/index.js +78 -78
  162. package/dist/styles/fonts.d.ts +1 -1
  163. package/dist/types/types.gen.d.ts +270 -270
  164. package/dist/utils/tarot.d.ts +2 -0
  165. package/dist/version.d.ts +1 -1
  166. package/package.json +1 -1
@@ -1,50 +1,3 @@
1
- var RoxyUI_tarot_catalog=(()=>{var z=Object.defineProperty;var wt=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ce=Object.prototype.hasOwnProperty;var Re=(r,t)=>{for(var e in t)z(r,e,{get:t[e],enumerable:true})},Oe=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Pe(t))!Ce.call(r,n)&&n!==e&&z(r,n,{get:()=>t[n],enumerable:!(o=wt(t,n))||o.enumerable});return r};var Fe=r=>Oe(z({},"__esModule",{value:true}),r),c=(r,t,e,o)=>{for(var n=o>1?void 0:o?wt(t,e):t,s=r.length-1,i;s>=0;s--)(i=r[s])&&(n=(o?i(t,e,n):i(n))||n);return o&&n&&z(t,e,n),n};var fr={};Re(fr,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyTarotCatalog:()=>$,injectRoxyTokens:()=>X});var G=globalThis,B=G.ShadowRoot&&(G.ShadyCSS===void 0||G.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),$t=new WeakMap,F=class{constructor(t,e,o){if(this._$cssResult$=true,o!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(B&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=$t.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&$t.set(e,t))}return t}toString(){return this.cssText}},Tt=r=>new F(typeof r=="string"?r:r+"",void 0,nt),f=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((o,n,s)=>o+(i=>{if(i._$cssResult$===true)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+r[s+1],r[0]);return new F(e,r,nt)},kt=(r,t)=>{if(B)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=G.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,r.appendChild(o)}},st=B?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return Tt(e)})(r):r;var{is:Ue,defineProperty:Le,getOwnPropertyDescriptor:Ne,getOwnPropertyNames:je,getOwnPropertySymbols:Ke,getPrototypeOf:Ie}=Object,q=globalThis,At=q.trustedTypes,Me=At?At.emptyScript:"",He=q.reactiveElementPolyfillSupport,U=(r,t)=>r,L={toAttribute(r,t){switch(t){case Boolean:r=r?Me:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},D=(r,t)=>!Ue(r,t),_t={attribute:true,type:String,converter:L,reflect:false,useDefault:false,hasChanged:D};Symbol.metadata??=Symbol("metadata"),q.litPropertyMetadata??=new WeakMap;var v=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=_t){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Le(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:s}=Ne(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);s?.call(this,i),this.requestUpdate(t,a,o)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??_t}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;let t=Ie(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(U("properties"))){let e=this.properties,o=[...je(e),...Ke(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(st(n))}else t!==void 0&&e.push(st(t));return e}static _$Eu(t,e){let o=e.attribute;return o===false?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===true){let s=(o.converter?.toAttribute!==void 0?o.converter:L).toAttribute(e,o.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let s=o.getPropertyOptions(n),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:L;this._$Em=n;let a=i.fromAttribute(e,s.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=false,s){if(t!==void 0){let i=this.constructor;if(n===false&&(s=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??D)(s,e)||o.useDefault&&o.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:s},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==true||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,s]of o){let{wrapped:i}=s,a=this[n];i!==true||this._$AL.has(n)||a===void 0||this.C(n,void 0,s,a)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=false,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[U("elementProperties")]=new Map,v[U("finalized")]=new Map,He?.({ReactiveElement:v}),(q.reactiveElementVersions??=[]).push("2.1.2");var ht=globalThis,Pt=r=>r,Y=ht.trustedTypes,Ct=Y?Y.createPolicy("lit-html",{createHTML:r=>r}):void 0,Nt="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,jt="?"+E,ze=`<${jt}>`,A=document,j=()=>A.createComment(""),K=r=>r===null||typeof r!="object"&&typeof r!="function",ut=Array.isArray,Ge=r=>ut(r)||typeof r?.[Symbol.iterator]=="function",it=`[
1
+ var RoxyUI_tarot_catalog=(()=>{var z=Object.defineProperty;var wt=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Re=Object.prototype.hasOwnProperty;var Oe=(r,t)=>{for(var e in t)z(r,e,{get:t[e],enumerable:true})},Fe=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ce(t))!Re.call(r,n)&&n!==e&&z(r,n,{get:()=>t[n],enumerable:!(o=wt(t,n))||o.enumerable});return r};var Ue=r=>Fe(z({},"__esModule",{value:true}),r),c=(r,t,e,o)=>{for(var n=o>1?void 0:o?wt(t,e):t,s=r.length-1,i;s>=0;s--)(i=r[s])&&(n=(o?i(t,e,n):i(n))||n);return o&&n&&z(t,e,n),n};var xr={};Oe(xr,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyTarotCatalog:()=>$,injectRoxyTokens:()=>X});var G=globalThis,B=G.ShadowRoot&&(G.ShadyCSS===void 0||G.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),$t=new WeakMap,F=class{constructor(t,e,o){if(this._$cssResult$=true,o!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(B&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=$t.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&$t.set(e,t))}return t}toString(){return this.cssText}},Tt=r=>new F(typeof r=="string"?r:r+"",void 0,nt),f=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((o,n,s)=>o+(i=>{if(i._$cssResult$===true)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+r[s+1],r[0]);return new F(e,r,nt)},kt=(r,t)=>{if(B)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=G.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,r.appendChild(o)}},st=B?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return Tt(e)})(r):r;var{is:Le,defineProperty:Ne,getOwnPropertyDescriptor:Ke,getOwnPropertyNames:je,getOwnPropertySymbols:Ie,getPrototypeOf:Me}=Object,q=globalThis,At=q.trustedTypes,He=At?At.emptyScript:"",ze=q.reactiveElementPolyfillSupport,U=(r,t)=>r,L={toAttribute(r,t){switch(t){case Boolean:r=r?He:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},D=(r,t)=>!Le(r,t),_t={attribute:true,type:String,converter:L,reflect:false,useDefault:false,hasChanged:D};Symbol.metadata??=Symbol("metadata"),q.litPropertyMetadata??=new WeakMap;var v=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=_t){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Ne(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:s}=Ke(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);s?.call(this,i),this.requestUpdate(t,a,o)},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??_t}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;let t=Me(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(U("properties"))){let e=this.properties,o=[...je(e),...Ie(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(st(n))}else t!==void 0&&e.push(st(t));return e}static _$Eu(t,e){let o=e.attribute;return o===false?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===true){let s=(o.converter?.toAttribute!==void 0?o.converter:L).toAttribute(e,o.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let s=o.getPropertyOptions(n),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:L;this._$Em=n;let a=i.fromAttribute(e,s.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=false,s){if(t!==void 0){let i=this.constructor;if(n===false&&(s=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??D)(s,e)||o.useDefault&&o.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===false&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:s},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),s!==true||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=true;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,s]of o){let{wrapped:i}=s,a=this[n];i!==true||this._$AL.has(n)||a===void 0||this.C(n,void 0,s,a)}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=false,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=false}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[U("elementProperties")]=new Map,v[U("finalized")]=new Map,ze?.({ReactiveElement:v}),(q.reactiveElementVersions??=[]).push("2.1.2");var ht=globalThis,Pt=r=>r,Y=ht.trustedTypes,Ct=Y?Y.createPolicy("lit-html",{createHTML:r=>r}):void 0,Nt="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,Kt="?"+E,Ge=`<${Kt}>`,A=document,K=()=>A.createComment(""),j=r=>r===null||typeof r!="object"&&typeof r!="function",ut=Array.isArray,Be=r=>ut(r)||typeof r?.[Symbol.iterator]=="function",it=`[
2
2
  \f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,Ot=/>/g,T=RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,Ut=/"/g,Kt=/^(?:script|style|textarea|title)$/i,yt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),p=yt(1),wr=yt(2),$r=yt(3),_=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Lt=new WeakMap,k=A.createTreeWalker(A,129);function It(r,t){if(!ut(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ct!==void 0?Ct.createHTML(t):t}var Be=(r,t)=>{let e=r.length-1,o=[],n,s=t===2?"<svg>":t===3?"<math>":"",i=N;for(let a=0;a<e;a++){let d=r[a],m,u,y=-1,b=0;for(;b<d.length&&(i.lastIndex=b,u=i.exec(d),u!==null);)b=i.lastIndex,i===N?u[1]==="!--"?i=Rt:u[1]!==void 0?i=Ot:u[2]!==void 0?(Kt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=T):u[3]!==void 0&&(i=T):i===T?u[0]===">"?(i=n??N,y=-1):u[1]===void 0?y=-2:(y=i.lastIndex-u[2].length,m=u[1],i=u[3]===void 0?T:u[3]==='"'?Ut:Ft):i===Ut||i===Ft?i=T:i===Rt||i===Ot?i=N:(i=T,n=void 0);let S=i===T&&r[a+1].startsWith("/>")?" ":"";s+=i===N?d+ze:y>=0?(o.push(m),d.slice(0,y)+Nt+d.slice(y)+E+S):d+E+(y===-2?a:S)}return[It(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},I=class r{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let s=0,i=0,a=t.length-1,d=this.parts,[m,u]=Be(t,e);if(this.el=r.createElement(m,o),k.currentNode=this.el.content,e===2||e===3){let y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(n=k.nextNode())!==null&&d.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let y of n.getAttributeNames())if(y.endsWith(Nt)){let b=u[i++],S=n.getAttribute(y).split(E),H=/([.?@])?(.*)/.exec(b);d.push({type:1,index:s,name:H[2],strings:S,ctor:H[1]==="."?dt:H[1]==="?"?lt:H[1]==="@"?ct:R}),n.removeAttribute(y)}else y.startsWith(E)&&(d.push({type:6,index:s}),n.removeAttribute(y));if(Kt.test(n.tagName)){let y=n.textContent.split(E),b=y.length-1;if(b>0){n.textContent=Y?Y.emptyScript:"";for(let S=0;S<b;S++)n.append(y[S],j()),k.nextNode(),d.push({type:2,index:++s});n.append(y[b],j())}}}else if(n.nodeType===8)if(n.data===jt)d.push({type:2,index:s});else{let y=-1;for(;(y=n.data.indexOf(E,y+1))!==-1;)d.push({type:7,index:s}),y+=E.length-1}s++}}static createElement(t,e){let o=A.createElement("template");return o.innerHTML=t,o}};function C(r,t,e=r,o){if(t===_)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,s=K(t)?void 0:t._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(false),s===void 0?n=void 0:(n=new s(r),n._$AT(r,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=C(r,n._$AS(r,t.values),n,o)),t}var at=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??A).importNode(e,true);k.currentNode=n;let s=k.nextNode(),i=0,a=0,d=o[0];for(;d!==void 0;){if(i===d.index){let m;d.type===2?m=new M(s,s.nextSibling,this,t):d.type===1?m=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(m=new pt(s,this,t)),this._$AV.push(m),d=o[++a]}i!==d?.index&&(s=k.nextNode(),i++)}return k.currentNode=A,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},M=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),K(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==_&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ge(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==l&&K(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=I.createElement(It(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let s=new at(n,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Lt.get(t.strings);return e===void 0&&Lt.set(t.strings,e=new I(t)),e}k(t){ut(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let s of t)n===e.length?e.push(o=new r(this.O(j()),this.O(j()),this,this.options)):o=e[n],o._$AI(s),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let o=Pt(t).nextSibling;Pt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=l}_$AI(t,e=this,o,n){let s=this.strings,i=false;if(s===void 0)t=C(this,t,e,0),i=!K(t)||t!==this._$AH&&t!==_,i&&(this._$AH=t);else{let a=t,d,m;for(t=s[0],d=0;d<s.length-1;d++)m=C(this,a[o+d],e,d),m===_&&(m=this._$AH[d]),i||=!K(m)||m!==this._$AH[d],m===l?t=l:t!==l&&(t+=(m??"")+s[d+1]),this._$AH[d]=m}i&&!n&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},dt=class extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},lt=class extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ct=class extends R{constructor(t,e,o,n,s){super(t,e,o,n,s),this.type=5}_$AI(t,e=this){if((t=C(this,t,e,0)??l)===_)return;let o=this._$AH,n=t===l&&o!==l||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==l&&(o===l||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},pt=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}};var qe=ht.litHtmlPolyfillSupport;qe?.(I,M),(ht.litHtmlVersions??=[]).push("3.3.3");var Mt=(r,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let s=e?.renderBefore??null;o._$litPart$=n=new M(t.insertBefore(j(),s),s,void 0,e??{})}return n._$AI(r),n};var mt=globalThis,w=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return _}};w._$litElement$=true,w.finalized=true,mt.litElementHydrateSupport?.({LitElement:w});var De=mt.litElementPolyfillSupport;De?.({LitElement:w});(mt.litElementVersions??=[]).push("4.2.2");var Ye={attribute:true,type:String,converter:L,reflect:false,hasChanged:D},Ve=(r=Ye,t,e)=>{let{kind:o,metadata:n}=e,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),o==="setter"&&((r=Object.create(r)).wrapped=true),s.set(e.name,r),o==="accessor"){let{name:i}=e;return{set(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,d,r,true,a)},init(a){return a!==void 0&&this.C(i,void 0,r,a),a}}}if(o==="setter"){let{name:i}=e;return function(a){let d=this[i];t.call(this,a),this.requestUpdate(i,d,r,true,a)}}throw Error("Unsupported decorator location: "+o)};function g(r){return(t,e)=>typeof e=="object"?Ve(r,t,e):((o,n,s)=>{let i=n.hasOwnProperty(s);return n.constructor.createProperty(s,o),i?Object.getOwnPropertyDescriptor(n,s):void 0})(r,t,e)}function x(r){return g({...r,state:true,attribute:false})}var Ht=[{endpoint:"tarot/cards",method:"GET"}];var P=r=>r??l;var zt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function ft(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var We={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function gt(r,t){let e=r.toLowerCase();return t.find(o=>o.toLowerCase()===e)}function Gt(r,t=zt){let e=ft(r);if(!e)return;let o=gt(e,t);if(o)return o;let n=e.toLowerCase().split("-"),s=n[0];if(s==="zh"){let i=n.find(a=>a==="hans"||a==="hant")??We[n[1]??""];return i?gt(`zh-${i}`,t):void 0}return gt(s,t)}var Dt="symbols";var Je={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},xt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Bt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',qt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',W={"fraunces-jost":{name:"Fraunces with Jost",sans:xt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:xt,display:xt},geist:{name:"Geist",sans:Bt,display:Bt},system:{name:"System",sans:qt,display:qt}};function Yt(r){let{sans:t,display:e}=W[r];return Object.keys(Je).filter(o=>`${t} ${e}`.includes(`"${o}"`))}var Vt="1.6.1";var Xe=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Ze=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Wt(r,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let o=(Xe.exec(e.pathname)??Ze.exec(e.pathname))?.[1];if(o!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${r}/dist`:`${e.origin}${o}`}var rr={},Qe="color-mix(in oklab, var(--roxy-accent) 70%, black)",tr="var(--roxy-accent)",er="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Jt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Xt(r){return r!==void 0&&Object.hasOwn(W,r)}function Zt(r){let t=[];return r.brandColor&&Jt.test(r.brandColor)&&t.push(`--roxy-primary:${r.brandColor}`),r.brandAccent&&Jt.test(r.brandAccent)&&t.push(`--roxy-accent:${r.brandAccent}`,`--roxy-accent-ink:light-dark(${Qe},${tr})`,`--roxy-ring:${er}`),t.join(";")}function Qt(r,t){if(Xt(t))return t;let e=r.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let n=r.shadowRoot?.firstElementChild,s=n?.localName==="style"?n:null;s?.sheet&&(s.sheet.disabled=true);let i,a,d;try{let m=globalThis.getComputedStyle(r),u=y=>m.getPropertyValue(y).trim();i=u("--roxy-font-sans"),a=u("--roxy-font-display"),d=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||a))return Xt(d)?d:void 0}function te(r){let{sans:t,display:e}=W[r];return`--roxy-font:${r};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ee=Wt(Vt,globalThis.document?.currentScript?.src||rr.url);function re(r,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${r}`;if(document.getElementById(e))return;let o=document.createElement("link");o.id=e,o.rel="stylesheet",o.href=`${t}/styles/fonts/${r}.css`,document.head.append(o)}function oe(r,t=ee){Yt(r).length>0&&re(r,t)}function ne(r=ee){re(Dt,r)}var se='@layer roxy.tokens,roxy.theme;@layer roxy.tokens{:where(:root,:host){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--roxy-text-base: 1rem;--roxy-text-scale: 1.15;--roxy-weight-normal: 400;--roxy-weight-bold: 600;--roxy-leading-tight: 1.25;--roxy-leading-normal: 1.5;--roxy-tracking-tight: -0.01em;--roxy-tracking-normal: 0em;--roxy-space-unit: 0.25rem;--roxy-radius: 6px;--roxy-motion-duration: 200ms;--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1)}:where(:root,:host,[data-theme],.light,.dark){--roxy-surface: var(--roxy-bg);--roxy-primary: var(--roxy-fg);--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);--roxy-heat: var(--roxy-danger);--roxy-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--roxy-font-display: var(--roxy-font-sans);--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));--roxy-text-xl: calc( var(--roxy-text-lg) * var(--roxy-text-scale) * var(--roxy-text-scale) );--roxy-space-xs: var(--roxy-space-unit);--roxy-space-sm: calc(var(--roxy-space-unit) * 2);--roxy-space-md: calc(var(--roxy-space-unit) * 4);--roxy-space-lg: calc(var(--roxy-space-unit) * 6);--roxy-space-xl: calc(var(--roxy-space-unit) * 10);--roxy-line-thick: calc(var(--roxy-space-unit) / 2);--roxy-touch: calc(var(--roxy-space-unit) * 11);--roxy-radius-sm: calc(var(--roxy-radius) / 2);--roxy-radius-md: var(--roxy-radius);--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);--roxy-radius-full: 9999px;--roxy-shadow-sm: none;--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent)}@media(prefers-color-scheme:dark){:where(:root,:host){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}:where(:root[data-theme=light],[data-theme=light],:root.light,.light,:host([data-theme="light"])){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}:where(:root[data-theme=dark],[data-theme=dark],:root.dark,.dark,:host([data-theme="dark"])){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var J="roxy-ui-tokens";function X(){if(typeof document>"u")return null;let r=document.getElementById(J);if(r)return r;let t=document.createElement("style");return t.id=J,t.textContent=se,document.head.prepend(t),t}function ie(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function bt(r){return r?r.charAt(0).toUpperCase()+r.slice(1).toLowerCase():""}function ae(r){return r.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var de="__ROXY_UI_I18N__";function vt(){let r=globalThis,t=r[de];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[de]=e,e}function or(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,o)=>o in t?String(t[o]??""):e):r}function le(r,t,e){return or(nr(r,t)??t,e)}function nr(r,t){if(!r)return;let{catalogs:e}=vt(),o=r.toLowerCase();return(e[o]??e[o.split("-")[0]])?.[ie(t)]}function sr(r){if(!r)return;let{fieldLabels:t}=vt(),e=r.toLowerCase();return t[e]??t[e.split("-")[0]]}function ce(r,t,e){return sr(r)?.enums[`${t}.${e}`]}function pe(r){let{listeners:t}=vt();return t.add(r),()=>{t.delete(r)}}var Z=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=pe(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Q=class extends w{constructor(){super();this.translator=(e,o)=>this.t(e,o);new Z(this)}connectedCallback(){super.connectedCallback(),X()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ne()}fontDeclarations(e){let o=Qt(this,e);return o?(oe(o),te(o)):""}renderFontStyle(){let e=this.fontDeclarations();return e?p`<style>:host{${e}}</style>`:l}t(e,o){return le(this.effectiveLang(),e,o)}effectiveLang(){return ft(this)}};var he=f`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function ue(r){return r?p`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:l}var ye=f`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var ir=f`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);letter-spacing:var(--roxy-tracking-normal);word-spacing:normal;animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host(:focus){outline:none!important}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,tt=[ir,ye,he];var ar="__cols",dr="__rows";function lr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function et(r){if(Array.isArray(r)){let s=false,i=r.map(a=>{let d=et(a);return d!==a&&(s=true),d});return s?i:r}if(!lr(r))return r;let t=r[ar],e=r[dr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(s=>{let i={};return t.forEach((a,d)=>{i[a]=et(s[d])}),i});let o=false,n={};for(let[s,i]of Object.entries(r)){let a=et(i);a!==i&&(o=true),n[s]=a}return o?n:r}function me(r){return et(r)}function ge(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([o,n])=>t[o]===n))??r[0]}var cr="pk_live_YOUR_KEY",fe={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function xe(r){if(r)return r===cr?fe.sample:r.startsWith("pk_")?void 0:fe.secret}function be(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var ve="https://roxyapi.com/api/v2";async function pr(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(o=>typeof o.path=="string"&&typeof o.message=="string").map(o=>({path:o.path,message:o.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:false}}var Se={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},O=class extends Error{constructor(e,o=null,n=true,s,i){super(e);this.issues=o;this.worded=n;this.status=s;this.code=i}};function Ee(r){return r.submitUrl?void 0:xe(r.publishableKey)}async function St(r,t,e){let o=Ee(r);if(o)throw new O(o.message);let n=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:hr(t,r.submitContext),signal:e}):await ur(r,t,e);if(!n.ok){let s=await pr(n);throw new O(s.message,s.issues,s.worded,n.status,s.code)}return await n.json()}function hr(r,t){return JSON.stringify(t?{...r,context:t}:r)}function ur(r,t,e){let o=new URL(`${r.baseUrl??ve}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&o.searchParams.set(s,String(i));let n={Accept:"application/json"};return r.publishableKey&&(n["X-API-Key"]=r.publishableKey),t.body!=null&&(n["Content-Type"]="application/json"),fetch(o,{method:t.method??"GET",headers:n,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var rt=class{constructor(t){this.baseUrl=ve;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=Ee(this);if(e){this.host.error=e.message,be(this.host,e);return}this.abort?.abort();let o=new AbortController;this.abort=o,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let n=await St(this,t,o.signal);if(o.signal.aborted)return;this.host.data=n}catch(n){if(o.signal.aborted||n?.name==="AbortError")return;n instanceof O&&(this.host.issues=n.issues,this.failure={status:n.status,code:n.code}),this.worded=n instanceof O&&n.worded,this.host.error=n instanceof Error?n.message:String(n)}finally{this.abort===o&&(this.abort=void 0),o.signal.aborted||(this.host.loading=false)}}};function we(r,t,e,o=[]){let n={...e},s=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(m,u)=>{let y=n[u];return delete n[u],encodeURIComponent(String(y??""))}),i=new Set(o),a={},d={};for(let[m,u]of Object.entries(n))u===void 0||u===""||(t==="GET"||i.has(m)?a[m]=u:d[m]=u);return{path:s,method:t,query:a,body:t==="POST"?d:void 0}}function $e(){return p`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var en=f`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var an=f`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function Te(r,t,e){let o=r.filter(n=>!!n.body);return o.length===0?l:p`<section class="block" part="section readings"><h3>${e}</h3>${o.map((n,s)=>p`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${ue(n.glyph)} ${n.label}</span> ${$e()} ${n.aside?p`<span class="interp-aside"><small>${n.aside}</small></span>`:l}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??l}</div></details>`)}</section>`}var yr="roxy-data";function mr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var ot=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(mr(t)&&t.classList.contains(yr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var h=class extends Q{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,o=this.listKey,n=this.listRows();if(!(!e||!o||!n)){this.moreLoading=true,this.moreError=null;try{let s=await St(this.fetcher,{...e,query:{...e.query,offset:n.length}});if(this.lastRequest!==e)return;let i=s[o];this.data={...this.data,...s,[o]:[...n,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let o=this.selfFetch();if(!o)return;let n=e.detail;this.lastValues=n.values,this.sticky=!!n.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(n.values),this.fetchFresh(we(o.endpoint,o.method,{...n.values,...this.ownRequest()},n.queryKeys??[]))};new ot(this),this.fetcher=new rt(this)}static{this.styles=[tt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let o=me(this.data);o!==this.data&&(this.data=o)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:ge(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return p`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(o){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,o),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:o},bubbles:true,composed:true})),customElements.get("roxy-data")?p`<roxy-data .data="${e}" lang="${P(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),o=[Zt(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!o)return l;let n=(o?`:host{${o}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return p`<style>${n}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?p`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,o,n){return this.hideReadings?l:Te(e,o,this.t(n??"Reading"))}renderResult(e){let o=p`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?p`${o}${this.renderAttribution()}`:o}renderWithForm(e){return p`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?p`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),o=this.data?.total;return!this.lastRequest||!e||typeof o!="number"?l:e.length>=o?l:p`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?p`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let o=this.openedRow??document.createElement(this.rowDetail.tag);o.publishableKey=this.publishableKey,o.baseUrl=this.baseUrl,o.submitUrl=this.submitUrl,o.submitContext=this.submitContext,o.hideReadings=this.hideReadings,o.hideSections=this.hideSections;let n=this.effectiveLang();n&&o.setAttribute("lang",n),this.openedRow=o,this.openedRowId=e,o.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Gt(this)}}).then(()=>o.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return p`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return p`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${P(this.specUrl)}" publishable-key="${P(this.publishableKey)}" location-url="${P(this.locationUrl)}" submit-label="${P(this.submitLabel)}" lang="${P(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return p`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return p`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let o=!!this.selfFetch();if(o&&this.issues)return this.renderForm();let n=this.renderErrorBanner(e);return o?p`${n}${this.renderForm()}`:n}renderErrorBanner(e){return p`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};c([g({attribute:false})],h.prototype,"data",2),c([g({type:String,attribute:"data-endpoint"})],h.prototype,"endpoint",2),c([g({type:String})],h.prototype,"method",2),c([g({type:String,attribute:"publishable-key"})],h.prototype,"publishableKey",2),c([g({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),c([g({type:String,attribute:"spec-url"})],h.prototype,"specUrl",2),c([g({type:String,attribute:"submit-url"})],h.prototype,"submitUrl",2),c([g({attribute:"submit-context",converter:Se})],h.prototype,"submitContext",2),c([g({type:String,attribute:"location-url"})],h.prototype,"locationUrl",2),c([g({type:Boolean})],h.prototype,"remember",2),c([g({type:Boolean,attribute:"hide-readings",reflect:true})],h.prototype,"hideReadings",2),c([g({type:String,attribute:"hide-sections",reflect:true})],h.prototype,"hideSections",2),c([g({type:String,attribute:"brand-color"})],h.prototype,"brandColor",2),c([g({type:String,attribute:"brand-accent"})],h.prototype,"brandAccent",2),c([g({type:String})],h.prototype,"font",2),c([g({type:String})],h.prototype,"hemisphere",2),c([g({type:String,attribute:"submit-label"})],h.prototype,"submitLabel",2),c([g({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),c([g({type:String})],h.prototype,"attribution",2),c([x()],h.prototype,"loading",2),c([x()],h.prototype,"error",2),c([x()],h.prototype,"issues",2),c([x()],h.prototype,"selfFetched",2),c([x()],h.prototype,"editing",2),c([x()],h.prototype,"sticky",2),c([x()],h.prototype,"openedRow",2),c([x()],h.prototype,"openedRowId",2),c([x()],h.prototype,"moreLoading",2),c([x()],h.prototype,"moreError",2);var ke=r=>t=>{customElements.get(r)||customElements.define(r,t)};function Et(r,t,e,o){return ce(r,t,e)??o??ae(e)}function Ae(r,t){return Et(r,"arcana",t,`${bt(t)} Arcana`)}function _e(r,t){return Et(r,"suit",t,bt(t))}var $=class extends h{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-tarot-card",path:"tarot/cards/{id}"};this.listKey="cards"}renderData(e){let o=e.cards??[];if(o.length===0)return this.renderEmpty();let n=this.heading||this.t("Tarot deck"),s=typeof e.total=="number"?e.total:o.length,i=this.effectiveLang();return p`<section class="wrap" part="card" aria-label="${n}"><header class="head" part="header"><h2>${n}</h2><span class="count">${s===1?this.t("1 card"):this.t("{{count}} cards",{count:s})}</span></header><ul class="grid" part="section cards">${o.map(a=>p`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===a.id?"true":"false"}" @click="${()=>this.pickRow({id:a.id,name:a.name})}">${a.imageUrl?p`<img class="art" src="${a.imageUrl}" alt="${a.name??this.t("Tarot card")}" loading="lazy">`:p`<div class="art" aria-hidden="true"></div>`}<p class="name">${a.name}</p><p class="meta">${gr(i,a)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?p`<div class="detail" part="detail">${this.openedRow}</div>`:l}</section>`}};$.endpoints=Ht,$.styles=[tt,f`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,14ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.art{aspect-ratio:2/3;border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],c([g({type:String,reflect:true})],$.prototype,"heading",2),$=c([ke("roxy-tarot-catalog")],$);function gr(r,t){let e=Ae(r,t.arcana);return t.suit?`${e} \xB7 ${_e(r,t.suit)}`:e}return Fe(fr)})();/*! Bundled license information:
4
-
5
- @lit/reactive-element/css-tag.js:
6
- (**
7
- * @license
8
- * Copyright 2019 Google LLC
9
- * SPDX-License-Identifier: BSD-3-Clause
10
- *)
11
-
12
- @lit/reactive-element/reactive-element.js:
13
- lit-html/lit-html.js:
14
- lit-element/lit-element.js:
15
- @lit/reactive-element/decorators/custom-element.js:
16
- @lit/reactive-element/decorators/property.js:
17
- @lit/reactive-element/decorators/state.js:
18
- @lit/reactive-element/decorators/event-options.js:
19
- @lit/reactive-element/decorators/base.js:
20
- @lit/reactive-element/decorators/query.js:
21
- @lit/reactive-element/decorators/query-all.js:
22
- @lit/reactive-element/decorators/query-async.js:
23
- @lit/reactive-element/decorators/query-assigned-nodes.js:
24
- (**
25
- * @license
26
- * Copyright 2017 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- *)
29
-
30
- lit-html/is-server.js:
31
- (**
32
- * @license
33
- * Copyright 2022 Google LLC
34
- * SPDX-License-Identifier: BSD-3-Clause
35
- *)
36
-
37
- @lit/reactive-element/decorators/query-assigned-elements.js:
38
- (**
39
- * @license
40
- * Copyright 2021 Google LLC
41
- * SPDX-License-Identifier: BSD-3-Clause
42
- *)
43
-
44
- lit-html/directives/if-defined.js:
45
- (**
46
- * @license
47
- * Copyright 2018 Google LLC
48
- * SPDX-License-Identifier: BSD-3-Clause
49
- *)
50
- */
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,Ut=/"/g,jt=/^(?:script|style|textarea|title)$/i,yt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),p=yt(1),$r=yt(2),Tr=yt(3),_=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Lt=new WeakMap,k=A.createTreeWalker(A,129);function It(r,t){if(!ut(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ct!==void 0?Ct.createHTML(t):t}var qe=(r,t)=>{let e=r.length-1,o=[],n,s=t===2?"<svg>":t===3?"<math>":"",i=N;for(let a=0;a<e;a++){let d=r[a],m,u,y=-1,b=0;for(;b<d.length&&(i.lastIndex=b,u=i.exec(d),u!==null);)b=i.lastIndex,i===N?u[1]==="!--"?i=Rt:u[1]!==void 0?i=Ot:u[2]!==void 0?(jt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=T):u[3]!==void 0&&(i=T):i===T?u[0]===">"?(i=n??N,y=-1):u[1]===void 0?y=-2:(y=i.lastIndex-u[2].length,m=u[1],i=u[3]===void 0?T:u[3]==='"'?Ut:Ft):i===Ut||i===Ft?i=T:i===Rt||i===Ot?i=N:(i=T,n=void 0);let S=i===T&&r[a+1].startsWith("/>")?" ":"";s+=i===N?d+Ge:y>=0?(o.push(m),d.slice(0,y)+Nt+d.slice(y)+E+S):d+E+(y===-2?a:S)}return[It(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},I=class r{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let s=0,i=0,a=t.length-1,d=this.parts,[m,u]=qe(t,e);if(this.el=r.createElement(m,o),k.currentNode=this.el.content,e===2||e===3){let y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(n=k.nextNode())!==null&&d.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let y of n.getAttributeNames())if(y.endsWith(Nt)){let b=u[i++],S=n.getAttribute(y).split(E),H=/([.?@])?(.*)/.exec(b);d.push({type:1,index:s,name:H[2],strings:S,ctor:H[1]==="."?dt:H[1]==="?"?lt:H[1]==="@"?ct:R}),n.removeAttribute(y)}else y.startsWith(E)&&(d.push({type:6,index:s}),n.removeAttribute(y));if(jt.test(n.tagName)){let y=n.textContent.split(E),b=y.length-1;if(b>0){n.textContent=Y?Y.emptyScript:"";for(let S=0;S<b;S++)n.append(y[S],K()),k.nextNode(),d.push({type:2,index:++s});n.append(y[b],K())}}}else if(n.nodeType===8)if(n.data===Kt)d.push({type:2,index:s});else{let y=-1;for(;(y=n.data.indexOf(E,y+1))!==-1;)d.push({type:7,index:s}),y+=E.length-1}s++}}static createElement(t,e){let o=A.createElement("template");return o.innerHTML=t,o}};function C(r,t,e=r,o){if(t===_)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,s=j(t)?void 0:t._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(false),s===void 0?n=void 0:(n=new s(r),n._$AT(r,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=C(r,n._$AS(r,t.values),n,o)),t}var at=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??A).importNode(e,true);k.currentNode=n;let s=k.nextNode(),i=0,a=0,d=o[0];for(;d!==void 0;){if(i===d.index){let m;d.type===2?m=new M(s,s.nextSibling,this,t):d.type===1?m=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(m=new pt(s,this,t)),this._$AV.push(m),d=o[++a]}i!==d?.index&&(s=k.nextNode(),i++)}return k.currentNode=A,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},M=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??true}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),j(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==_&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Be(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==l&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=I.createElement(It(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let s=new at(n,this),i=s.u(this.options);s.p(e),this.T(i),this._$AH=s}}_$AC(t){let e=Lt.get(t.strings);return e===void 0&&Lt.set(t.strings,e=new I(t)),e}k(t){ut(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let s of t)n===e.length?e.push(o=new r(this.O(K()),this.O(K()),this,this.options)):o=e[n],o._$AI(s),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let o=Pt(t).nextSibling;Pt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,s){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=l}_$AI(t,e=this,o,n){let s=this.strings,i=false;if(s===void 0)t=C(this,t,e,0),i=!j(t)||t!==this._$AH&&t!==_,i&&(this._$AH=t);else{let a=t,d,m;for(t=s[0],d=0;d<s.length-1;d++)m=C(this,a[o+d],e,d),m===_&&(m=this._$AH[d]),i||=!j(m)||m!==this._$AH[d],m===l?t=l:t!==l&&(t+=(m??"")+s[d+1]),this._$AH[d]=m}i&&!n&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},dt=class extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},lt=class extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},ct=class extends R{constructor(t,e,o,n,s){super(t,e,o,n,s),this.type=5}_$AI(t,e=this){if((t=C(this,t,e,0)??l)===_)return;let o=this._$AH,n=t===l&&o!==l||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==l&&(o===l||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},pt=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}};var De=ht.litHtmlPolyfillSupport;De?.(I,M),(ht.litHtmlVersions??=[]).push("3.3.3");var Mt=(r,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let s=e?.renderBefore??null;o._$litPart$=n=new M(t.insertBefore(K(),s),s,void 0,e??{})}return n._$AI(r),n};var mt=globalThis,w=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Mt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false)}render(){return _}};w._$litElement$=true,w.finalized=true,mt.litElementHydrateSupport?.({LitElement:w});var Ye=mt.litElementPolyfillSupport;Ye?.({LitElement:w});(mt.litElementVersions??=[]).push("4.2.2");var Ve={attribute:true,type:String,converter:L,reflect:false,hasChanged:D},We=(r=Ve,t,e)=>{let{kind:o,metadata:n}=e,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),o==="setter"&&((r=Object.create(r)).wrapped=true),s.set(e.name,r),o==="accessor"){let{name:i}=e;return{set(a){let d=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,d,r,true,a)},init(a){return a!==void 0&&this.C(i,void 0,r,a),a}}}if(o==="setter"){let{name:i}=e;return function(a){let d=this[i];t.call(this,a),this.requestUpdate(i,d,r,true,a)}}throw Error("Unsupported decorator location: "+o)};function g(r){return(t,e)=>typeof e=="object"?We(r,t,e):((o,n,s)=>{let i=n.hasOwnProperty(s);return n.constructor.createProperty(s,o),i?Object.getOwnPropertyDescriptor(n,s):void 0})(r,t,e)}function x(r){return g({...r,state:true,attribute:false})}var Ht=[{endpoint:"tarot/cards",method:"GET"}];var P=r=>r??l;var zt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function ft(r){if(r.lang)return r.lang;if(typeof document>"u")return;let t=r.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var Je={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function gt(r,t){let e=r.toLowerCase();return t.find(o=>o.toLowerCase()===e)}function Gt(r,t=zt){let e=ft(r);if(!e)return;let o=gt(e,t);if(o)return o;let n=e.toLowerCase().split("-"),s=n[0];if(s==="zh"){let i=n.find(a=>a==="hans"||a==="hant")??Je[n[1]??""];return i?gt(`zh-${i}`,t):void 0}return gt(s,t)}var Dt="symbols";var Xe={Fraunces:["latin","latin-ext"],Jost:["latin","latin-ext","cyrillic"],Geist:["latin","latin-ext","cyrillic"]},xt='"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Bt='"Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',qt='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',W={"fraunces-jost":{name:"Fraunces with Jost",sans:xt,display:'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},jost:{name:"Jost",sans:xt,display:xt},geist:{name:"Geist",sans:Bt,display:Bt},system:{name:"System",sans:qt,display:qt}};function Yt(r){let{sans:t,display:e}=W[r];return Object.keys(Xe).filter(o=>`${t} ${e}`.includes(`"${o}"`))}var Vt="1.6.2";var Ze=/^(.*)\/cdn\/(?:roxy-ui|components\/[\w-]+)\.js$/,Qe=/^(.*\/dist)\/(?:index|components\/[\w-]+)\.js$/;function Wt(r,t){if(!t)return;let e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")return;let o=(Ze.exec(e.pathname)??Qe.exec(e.pathname))?.[1];if(o!==void 0)return e.hostname==="cdn.jsdelivr.net"?`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${r}/dist`:`${e.origin}${o}`}var or={},tr="color-mix(in oklab, var(--roxy-accent) 70%, black)",er="var(--roxy-accent)",rr="color-mix(in srgb, var(--roxy-accent) 40%, transparent)",Jt=/^#(?:[\da-f]{3}|[\da-f]{6})$/i;function Xt(r){return r!==void 0&&Object.hasOwn(W,r)}function Zt(r){let t=[];return r.brandColor&&Jt.test(r.brandColor)&&t.push(`--roxy-primary:${r.brandColor}`),r.brandAccent&&Jt.test(r.brandAccent)&&t.push(`--roxy-accent:${r.brandAccent}`,`--roxy-accent-ink:light-dark(${tr},${er})`,`--roxy-ring:${rr}`),t.join(";")}function Qt(r,t){if(Xt(t))return t;let e=r.getRootNode();if(("host"in e?e.host:null)?.localName.startsWith("roxy-")||!globalThis.getComputedStyle)return;let n=r.shadowRoot?.firstElementChild,s=n?.localName==="style"?n:null;s?.sheet&&(s.sheet.disabled=true);let i,a,d;try{let m=globalThis.getComputedStyle(r),u=y=>m.getPropertyValue(y).trim();i=u("--roxy-font-sans"),a=u("--roxy-font-display"),d=u("--roxy-font")}finally{s?.sheet&&(s.sheet.disabled=false)}if(!(i||a))return Xt(d)?d:void 0}function te(r){let{sans:t,display:e}=W[r];return`--roxy-font:${r};--roxy-font-sans:${t};--roxy-font-display:${e}`}var ee=Wt(Vt,globalThis.document?.currentScript?.src||or.url);function re(r,t){if(typeof document>"u"||t===void 0)return;let e=`roxy-ui-font-${r}`;if(document.getElementById(e))return;let o=document.createElement("link");o.id=e,o.rel="stylesheet",o.href=`${t}/styles/fonts/${r}.css`,document.head.append(o)}function oe(r,t=ee){Yt(r).length>0&&re(r,t)}function ne(r=ee){re(Dt,r)}var se='@layer roxy.tokens,roxy.theme;@layer roxy.tokens{:where(:root,:host){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-font: initial;--roxy-font-sans: initial;--roxy-font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;--roxy-font-symbol: "Roxy Symbols", ui-sans-serif, system-ui, sans-serif;--roxy-text-base: 1rem;--roxy-text-scale: 1.15;--roxy-weight-normal: 400;--roxy-weight-bold: 600;--roxy-leading-tight: 1.25;--roxy-leading-normal: 1.5;--roxy-tracking-tight: -0.01em;--roxy-tracking-normal: 0em;--roxy-space-unit: 0.25rem;--roxy-radius: 6px;--roxy-motion-duration: 200ms;--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1)}:where(:root,:host,[data-theme],.light,.dark){--roxy-surface: var(--roxy-bg);--roxy-primary: var(--roxy-fg);--roxy-secondary: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg));--roxy-muted: color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg));--roxy-border: color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg));--roxy-ring: color-mix(in srgb, var(--roxy-accent) 40%, transparent);--roxy-heat: var(--roxy-danger);--roxy-moon-lit: color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf);--roxy-moon-mare: color-mix( in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade) );--roxy-moon-rim: color-mix( in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg) );--roxy-moon-eclipse: color-mix( in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade) );--roxy-moon-corona: color-mix( in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit) );--roxy-font-display: var(--roxy-font-sans);--roxy-text-sm: calc(var(--roxy-text-base) / var(--roxy-text-scale));--roxy-text-xs: calc(var(--roxy-text-sm) / var(--roxy-text-scale));--roxy-text-lg: calc(var(--roxy-text-base) * var(--roxy-text-scale));--roxy-text-xl: calc( var(--roxy-text-lg) * var(--roxy-text-scale) * var(--roxy-text-scale) );--roxy-space-xs: var(--roxy-space-unit);--roxy-space-sm: calc(var(--roxy-space-unit) * 2);--roxy-space-md: calc(var(--roxy-space-unit) * 4);--roxy-space-lg: calc(var(--roxy-space-unit) * 6);--roxy-space-xl: calc(var(--roxy-space-unit) * 10);--roxy-line-thick: calc(var(--roxy-space-unit) / 2);--roxy-touch: calc(var(--roxy-space-unit) * 11);--roxy-radius-sm: calc(var(--roxy-radius) / 2);--roxy-radius-md: var(--roxy-radius);--roxy-radius-lg: calc(var(--roxy-radius) * 5 / 3);--roxy-radius-full: 9999px;--roxy-shadow-sm: none;--roxy-shadow-md: 0 4px 12px color-mix(in srgb, black 10%, transparent);--roxy-shadow-lg: 0 12px 32px color-mix(in srgb, black 18%, transparent)}@media(prefers-color-scheme:dark){:where(:root,:host){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);--roxy-moon-shade: color-mix( in oklab, var(--roxy-fg) 10%, var(--roxy-bg) )}}:where(:root[data-theme=light],[data-theme=light],:root.light,.light,:host([data-theme="light"])){color-scheme:light;--roxy-bg: #ffffff;--roxy-fg: #0a0a0a;--roxy-accent: #4a6297;--roxy-success: #16a34a;--roxy-warning: #ea580c;--roxy-danger: #dc2626;--roxy-info: #0284c7;--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, black);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, black);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, black);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, black);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))}:where(:root[data-theme=dark],[data-theme=dark],:root.dark,.dark,:host([data-theme="dark"])){color-scheme:dark;--roxy-bg: #0a0a0a;--roxy-fg: #fafafa;--roxy-accent: #92aade;--roxy-success: #22c55e;--roxy-warning: #fb923c;--roxy-danger: #ef4444;--roxy-info: #38bdf8;--roxy-accent-ink: var(--roxy-accent);--roxy-success-fg: color-mix(in oklab, var(--roxy-success) 70%, white);--roxy-warning-fg: color-mix(in oklab, var(--roxy-warning) 70%, white);--roxy-danger-fg: color-mix(in oklab, var(--roxy-danger) 70%, white);--roxy-info-fg: color-mix(in oklab, var(--roxy-info) 70%, white);--roxy-moon-shade: color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))}@media(prefers-reduced-motion:reduce){:where(:root,:host){--roxy-motion-duration: 0ms}}}';var J="roxy-ui-tokens";function X(){if(typeof document>"u")return null;let r=document.getElementById(J);if(r)return r;let t=document.createElement("style");return t.id=J,t.textContent=se,document.head.prepend(t),t}function ie(r){return r.toLowerCase().replace(/[\s_-]+/g," ").trim()}function bt(r){return r?r.charAt(0).toUpperCase()+r.slice(1).toLowerCase():""}function ae(r){return r.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var de="__ROXY_UI_I18N__";function vt(){let r=globalThis,t=r[de];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return r[de]=e,e}function nr(r,t){return t?r.replace(/\{\{(\w+)\}\}/g,(e,o)=>o in t?String(t[o]??""):e):r}function le(r,t,e){return nr(sr(r,t)??t,e)}function sr(r,t){if(!r)return;let{catalogs:e}=vt(),o=r.toLowerCase();return(e[o]??e[o.split("-")[0]])?.[ie(t)]}function ir(r){if(!r)return;let{fieldLabels:t}=vt(),e=r.toLowerCase();return t[e]??t[e.split("-")[0]]}function ce(r,t,e){return ir(r)?.enums[`${t}.${e}`]}function pe(r){let{listeners:t}=vt();return t.add(r),()=>{t.delete(r)}}var Z=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=pe(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var Q=class extends w{constructor(){super();this.translator=(e,o)=>this.t(e,o);new Z(this)}connectedCallback(){super.connectedCallback(),X()}updated(e){super.updated(e),this.renderRoot.querySelector(".roxy-glyph")&&ne()}fontDeclarations(e){let o=Qt(this,e);return o?(oe(o),te(o)):""}renderFontStyle(){let e=this.fontDeclarations();return e?p`<style>:host{${e}}</style>`:l}t(e,o){return le(this.effectiveLang(),e,o)}effectiveLang(){return ft(this)}};var he=f`:where(.roxy-glyph){font-family:var(--roxy-font-symbol)}`;function ue(r){return r?p`<span class="roxy-glyph" aria-hidden="true">${r}</span>`:l}var ye=f`:where([part~=card]){background:var(--roxy-surface);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-lg);box-shadow:var(--roxy-shadow-sm)}:where([part~=card] [part~=card],[part~=card] [part~=reading],[part~=card] .roxy-card){border:0;border-block-start:1px solid var(--roxy-border);box-shadow:none;background:0 0;border-radius:0;padding-inline:0}:host([bare]) [part~=card]{box-shadow:none;background:0 0;border:0;border-radius:0;padding:0}:where(h1,h2){color:var(--roxy-fg);font-size:var(--roxy-text-lg);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-tight);text-wrap:balance}:where(h3,h4,h5,h6){color:var(--roxy-fg);font-size:var(--roxy-text-base);font-weight:var(--roxy-weight-bold);line-height:var(--roxy-leading-tight);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-label,th,dt){color:var(--roxy-muted);font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-normal);letter-spacing:var(--roxy-tracking-normal);text-transform:none}:where(.roxy-chips){gap:var(--roxy-space-xs);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}:where(.roxy-chip,.roxy-chips>li){align-items:center;gap:var(--roxy-space-xs);padding:calc(var(--roxy-space-unit) / 2) var(--roxy-space-sm);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-sm);color:var(--roxy-secondary);font-size:var(--roxy-text-xs);line-height:var(--roxy-leading-tight);overflow-wrap:anywhere;background:0 0;max-inline-size:100%;display:inline-flex}:where(.roxy-chip[data-tone=success],.roxy-chips>li[data-tone=success]){color:var(--roxy-success-fg)}:where(.roxy-chip[data-tone=warning],.roxy-chips>li[data-tone=warning]){color:var(--roxy-warning-fg)}:where(.roxy-chip[data-tone=danger],.roxy-chips>li[data-tone=danger]){color:var(--roxy-danger-fg)}:where(.roxy-chip[data-tone=info],.roxy-chips>li[data-tone=info]){color:var(--roxy-info-fg)}:where(table){border-collapse:collapse;font-size:var(--roxy-text-sm);font-variant-numeric:tabular-nums}:where(th,td){padding:var(--roxy-space-xs) var(--roxy-space-sm);border-block-end:1px solid var(--roxy-border);text-align:start;vertical-align:top}:where(summary){cursor:pointer}:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}:where(summary:focus-visible){border-radius:var(--roxy-radius-sm)}:where(input,select,textarea,button){font:inherit}:where(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){padding:var(--roxy-space-xs) var(--roxy-space-sm);background:var(--roxy-bg);color:var(--roxy-fg);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md)}`;var ar=f`:host{--roxy-label-col:minmax(0, 25%);--_mask:var(--roxy-surface);font-family:var(--roxy-font-sans);color:var(--roxy-fg);font-size:var(--roxy-text-base);line-height:var(--roxy-leading-normal);letter-spacing:var(--roxy-tracking-normal);word-spacing:normal;animation:roxy-fade-in var(--roxy-motion-duration) var(--roxy-motion-easing) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--_mask:var(--roxy-bg)}:host(:focus){outline:none!important}:host([hidden]){display:none}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}h1,h2,h3,h4{font-family:var(--roxy-font-display)}@keyframes roxy-fade-in{0%{transform:translateY(calc(var(--roxy-space-unit) / 2))}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border) 0%, color-mix(in srgb, var(--roxy-border) 60%, transparent) 50%, var(--roxy-border) 100%);border-radius:var(--roxy-radius-md);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;position:absolute;overflow:hidden}.roxy-empty{padding:var(--roxy-space-lg);color:var(--roxy-muted);text-align:center;font-size:var(--roxy-text-sm)}.roxy-error{gap:var(--roxy-space-sm);padding:var(--roxy-space-lg);background:var(--roxy-surface);border:1px solid var(--roxy-danger);border-radius:var(--roxy-radius-md);color:var(--roxy-danger-fg);font-size:var(--roxy-text-sm);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:var(--roxy-line-thick) solid var(--roxy-ring);outline-offset:var(--roxy-line-thick)}.roxy-attribution{margin-top:var(--roxy-space-sm);font-size:var(--roxy-text-xs);color:var(--roxy-muted);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink);text-decoration:underline}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs) var(--roxy-space-md);border:1px solid var(--roxy-border);border-radius:var(--roxy-radius-md);color:var(--roxy-fg);font-family:inherit;font-size:var(--roxy-text-sm);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent);color:var(--roxy-accent-ink)}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm);margin-top:var(--roxy-space-md);display:grid}.roxy-more .roxy-edit{min-height:var(--roxy-touch)}:host{font-variant-emoji:text}`,tt=[ar,ye,he];var dr="__cols",lr="__rows";function cr(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function et(r){if(Array.isArray(r)){let s=false,i=r.map(a=>{let d=et(a);return d!==a&&(s=true),d});return s?i:r}if(!cr(r))return r;let t=r[dr],e=r[lr];if(Array.isArray(t)&&Array.isArray(e)&&Object.keys(r).length===2)return e.map(s=>{let i={};return t.forEach((a,d)=>{i[a]=et(s[d])}),i});let o=false,n={};for(let[s,i]of Object.entries(r)){let a=et(i);a!==i&&(o=true),n[s]=a}return o?n:r}function me(r){return et(r)}function ge(r,t){return r.find(e=>e.attrs&&Object.entries(e.attrs).every(([o,n])=>t[o]===n))??r[0]}var pr="pk_live_YOUR_KEY",fe={secret:{reason:"possible-secret-key",message:"Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side."},sample:{reason:"sample-key",message:"Replace the sample key with your own publishable key from your RoxyAPI account."}};function xe(r){if(r)return r===pr?fe.sample:r.startsWith("pk_")?void 0:fe.secret}function be(r,t,e={}){e.warn&&console.warn(t.message),r.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:true,composed:true}))}var ve="https://roxyapi.com/api/v2";async function hr(r){try{let t=await r.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(o=>typeof o.path=="string"&&typeof o.message=="string").map(o=>({path:o.path,message:o.message})):null;return{message:t.error,issues:e?.length?e:null,worded:true,...t.code?{code:t.code}:{}}}}catch{}return{message:`Request failed (${r.status})`,issues:null,worded:false}}var Se={fromAttribute:r=>{if(r!=null){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&!Array.isArray(t))return t}catch{}console.warn("[roxy-ui] submit-context must be a JSON object; sending the request without it.")}}},O=class extends Error{constructor(e,o=null,n=true,s,i){super(e);this.issues=o;this.worded=n;this.status=s;this.code=i}};function Ee(r){return r.submitUrl?void 0:xe(r.publishableKey)}async function St(r,t,e){let o=Ee(r);if(o)throw new O(o.message);let n=r.submitUrl?await fetch(r.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:ur(t,r.submitContext),signal:e}):await yr(r,t,e);if(!n.ok){let s=await hr(n);throw new O(s.message,s.issues,s.worded,n.status,s.code)}return await n.json()}function ur(r,t){return JSON.stringify(t?{...r,context:t}:r)}function yr(r,t,e){let o=new URL(`${r.baseUrl??ve}${t.path}`,document.baseURI);for(let[s,i]of Object.entries(t.query??{}))i!=null&&o.searchParams.set(s,String(i));let n={Accept:"application/json"};return r.publishableKey&&(n["X-API-Key"]=r.publishableKey),t.body!=null&&(n["Content-Type"]="application/json"),fetch(o,{method:t.method??"GET",headers:n,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var rt=class{constructor(t){this.baseUrl=ve;this.worded=true;this.failure={};this.host=t,t.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(t){this.worded=true,this.failure={};let e=Ee(this);if(e){this.host.error=e.message,be(this.host,e);return}this.abort?.abort();let o=new AbortController;this.abort=o,this.host.loading=true,this.host.error=null,this.host.issues=null;try{let n=await St(this,t,o.signal);if(o.signal.aborted)return;this.host.data=n}catch(n){if(o.signal.aborted||n?.name==="AbortError")return;n instanceof O&&(this.host.issues=n.issues,this.failure={status:n.status,code:n.code}),this.worded=n instanceof O&&n.worded,this.host.error=n instanceof Error?n.message:String(n)}finally{this.abort===o&&(this.abort=void 0),o.signal.aborted||(this.host.loading=false)}}};function we(r,t,e,o=[]){let n={...e},s=`/${r.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(m,u)=>{let y=n[u];return delete n[u],encodeURIComponent(String(y??""))}),i=new Set(o),a={},d={};for(let[m,u]of Object.entries(n))u===void 0||u===""||(t==="GET"||i.has(m)?a[m]=u:d[m]=u);return{path:s,method:t,query:a,body:t==="POST"?d:void 0}}function $e(){return p`<svg class="roxy-chevron" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`}var rn=f`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:.7lh;height:.7lh;color:var(--roxy-muted);transition:transform var(--roxy-motion-duration) var(--roxy-motion-easing);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var dn=f`.block{border-top:1px solid var(--roxy-border);padding-top:var(--roxy-space-md)}.block h3{margin:0 0 var(--roxy-space-sm)}.interp-card{padding-block:var(--roxy-space-sm)}.interp-card summary{font-weight:var(--roxy-weight-bold);color:var(--roxy-fg);align-items:center;gap:var(--roxy-space-sm);font-size:var(--roxy-text-sm);display:flex}.interp-lead{align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;flex:auto;order:1;min-width:0;display:inline-flex}.interp-aside{align-items:center;gap:var(--roxy-space-sm);flex-shrink:0;order:2;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted);font-weight:var(--roxy-weight-normal);white-space:nowrap}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm);gap:var(--roxy-space-sm);color:var(--roxy-fg);font-size:var(--roxy-text-sm);line-height:var(--roxy-leading-normal);overflow-wrap:anywhere;display:grid}.interp-body p{margin:0}`;function Te(r,t,e){let o=r.filter(n=>!!n.body);return o.length===0?l:p`<section class="block" part="section readings"><h3>${e}</h3>${o.map((n,s)=>p`<details class="interp-card" part="reading" name="${t}" ?open="${s===0}"><summary><span class="interp-lead">${ue(n.glyph)} ${n.label}</span> ${$e()} ${n.aside?p`<span class="interp-aside"><small>${n.aside}</small></span>`:l}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??l}</div></details>`)}</section>`}var mr="roxy-data";function gr(r){return r.nodeName==="SCRIPT"&&r.getAttribute("type")==="application/json"}var ot=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(gr(t)&&t.classList.contains(mr))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var h=class extends Q{constructor(){super();this.data=null;this.endpoint="";this.remember=false;this.hideReadings=false;this.hideSections="";this.loading=false;this.error=null;this.issues=null;this.selfFetched=false;this.editing=false;this.sticky=false;this.hostLoaded=false;this.moreLoading=false;this.moreError=null;this.onMore=async()=>{let e=this.lastRequest,o=this.listKey,n=this.listRows();if(!(!e||!o||!n)){this.moreLoading=true,this.moreError=null;try{let s=await St(this.fetcher,{...e,query:{...e.query,offset:n.length}});if(this.lastRequest!==e)return;let i=s[o];this.data={...this.data,...s,[o]:[...n,...Array.isArray(i)?i:[]]}}catch(s){this.lastRequest===e&&(this.moreError=s instanceof Error?s.message:String(s))}finally{this.moreLoading=false}}};this.onEdit=()=>{this.editing=true};this.onFormSubmit=e=>{let o=this.selfFetch();if(!o)return;let n=e.detail;this.lastValues=n.values,this.sticky=!!n.sticky,this.selfFetched=true,this.editing=false,this.remember&&this.writeRemembered(n.values),this.fetchFresh(we(o.endpoint,o.method,{...n.values,...this.ownRequest()},n.queryKeys??[]))};new ot(this),this.fetcher=new rt(this)}static{this.styles=[tt]}static{this.endpoints=[]}willUpdate(e){if(e.has("data")&&this.data!=null){let o=me(this.data);o!==this.data&&(this.data=o)}(e.has("publishableKey")||e.has("baseUrl")||e.has("submitUrl")||e.has("submitContext"))&&this.syncFetcher()}syncFetcher(){this.fetcher.publishableKey=this.publishableKey,this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),this.fetcher.submitUrl=this.submitUrl,this.fetcher.submitContext=this.submitContext}selfFetch(){let e=this.endpoint?{endpoint:this.endpoint,method:"POST"}:this.hostLoaded||!(this.publishableKey||this.submitUrl)?void 0:ge(this.constructor.endpoints,this);return e&&{endpoint:e.endpoint,method:this.method??e.method}}render(){return p`${this.hostStyle()}${this.renderState()}`}drawn(e){try{return this.renderData(e)}catch(o){return console.warn(`[roxy-ui] ${this.localName} could not draw its response`,o),this.dispatchEvent(new CustomEvent("roxy-render-error",{detail:{error:o},bubbles:true,composed:true})),customElements.get("roxy-data")?p`<roxy-data .data="${e}" lang="${P(this.effectiveLang())}"></roxy-data>`:this.renderEmpty()}}hostStyle(){let e=this.hideSections.split(",").map(s=>s.trim().toLowerCase()).filter(s=>/^[a-z][a-z0-9-]*$/.test(s)),o=[Zt(this),this.fontDeclarations(this.font)].filter(Boolean).join(";");if(e.length===0&&!o)return l;let n=(o?`:host{${o}}`:"")+e.map(s=>`[part~="${s}"],roxy-endpoint-form::part(${s}){display:none!important}`).join("");return p`<style>${n}</style>`}ownRequest(){return{}}get failure(){return this.fetcher.failure}renderState(){return this.selfFetch()&&this.sticky&&this.selfFetched&&!this.editing?this.renderWithForm(this.stickyBody()):this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?p`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data):this.renderNoData()}renderInterpretation(e,o,n){return this.hideReadings?l:Te(e,o,this.t(n??"Reading"))}renderResult(e){let o=p`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.drawn(e)}`;return this.showAttribution()?p`${o}${this.renderAttribution()}`:o}renderWithForm(e){return p`${this.renderForm()}${e}`}stickyBody(){return this.loading?this.renderLoading():this.error!=null?this.issues?l:this.renderErrorBanner(this.error):this.data==null?l:this.showAttribution()?p`${this.drawn(this.data)}${this.renderAttribution()}`:this.drawn(this.data)}renderMore(){let e=this.listRows(),o=this.data?.total;return!this.lastRequest||!e||typeof o!="number"?l:e.length>=o?l:p`<div class="roxy-more" part="more"><button type="button" class="roxy-edit" ?disabled="${this.moreLoading}" aria-busy="${this.moreLoading?"true":"false"}" @click="${this.onMore}">${this.t("Show more")}</button> ${this.moreError?p`<p class="roxy-error" role="alert">${this.t(this.moreError)}</p>`:l}</div>`}listRows(){let e=this.listKey?this.data?.[this.listKey]:void 0;return Array.isArray(e)?e:void 0}fetchFresh(e){return this.lastRequest=e,this.openedRow=void 0,this.openedRowId=void 0,this.moreError=null,this.fetcher.run(e)}load(e){return this.hostLoaded=true,this.syncFetcher(),this.fetchFresh(e)}pickRow(e){this.dispatchEvent(new CustomEvent("roxy-symbol-select",{detail:e,bubbles:true,composed:true})),this.openRow(e.id)}openRow(e){if(!this.rowDetail||!(this.publishableKey||this.submitUrl))return;let o=this.openedRow??document.createElement(this.rowDetail.tag);o.publishableKey=this.publishableKey,o.baseUrl=this.baseUrl,o.submitUrl=this.submitUrl,o.submitContext=this.submitContext,o.hideReadings=this.hideReadings,o.hideSections=this.hideSections;let n=this.effectiveLang();n&&o.setAttribute("lang",n),this.openedRow=o,this.openedRowId=e,o.load({path:`/${this.rowDetail.path.replace("{id}",encodeURIComponent(e))}`,method:"GET",query:{lang:Gt(this)}}).then(()=>o.scrollIntoView?.({block:"nearest"}))}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return p`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.selfFetch()?this.renderWithForm(l):this.renderEmpty()}renderForm(){let e=this.selfFetch();return p`<roxy-endpoint-form part="form" exportparts="hint" data-endpoint="${e?.endpoint??""}" method="${e?.method??"POST"}" spec-url="${P(this.specUrl)}" publishable-key="${P(this.publishableKey)}" location-url="${P(this.locationUrl)}" submit-label="${P(this.submitLabel)}" lang="${P(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" .serverIssues="${this.issues}" .apiRoute="${this.fetcher}" .autoload="${!this.selfFetched}" .fullPages="${!!this.listKey}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.selfFetch()?.endpoint??""}`}readRemembered(){try{let e=sessionStorage.getItem(this.rememberKey());return e?JSON.parse(e):void 0}catch{return}}writeRemembered(e){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(e))}catch{}}renderEmpty(){return p`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return p`<div class="roxy-skeleton" style="height:5lh" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(e){let o=!!this.selfFetch();if(o&&this.issues)return this.renderForm();let n=this.renderErrorBanner(e);return o?p`${n}${this.renderForm()}`:n}renderErrorBanner(e){return p`<div class="roxy-error" role="alert" part="error">${!this.fetcher.worded&&this.errorMessage||this.t(e)}</div>`}};c([g({attribute:false})],h.prototype,"data",2),c([g({type:String,attribute:"data-endpoint"})],h.prototype,"endpoint",2),c([g({type:String})],h.prototype,"method",2),c([g({type:String,attribute:"publishable-key"})],h.prototype,"publishableKey",2),c([g({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),c([g({type:String,attribute:"spec-url"})],h.prototype,"specUrl",2),c([g({type:String,attribute:"submit-url"})],h.prototype,"submitUrl",2),c([g({attribute:"submit-context",converter:Se})],h.prototype,"submitContext",2),c([g({type:String,attribute:"location-url"})],h.prototype,"locationUrl",2),c([g({type:Boolean})],h.prototype,"remember",2),c([g({type:Boolean,attribute:"hide-readings",reflect:true})],h.prototype,"hideReadings",2),c([g({type:String,attribute:"hide-sections",reflect:true})],h.prototype,"hideSections",2),c([g({type:String,attribute:"brand-color"})],h.prototype,"brandColor",2),c([g({type:String,attribute:"brand-accent"})],h.prototype,"brandAccent",2),c([g({type:String})],h.prototype,"font",2),c([g({type:String})],h.prototype,"hemisphere",2),c([g({type:String,attribute:"submit-label"})],h.prototype,"submitLabel",2),c([g({type:String,attribute:"error-message"})],h.prototype,"errorMessage",2),c([g({type:String})],h.prototype,"attribution",2),c([x()],h.prototype,"loading",2),c([x()],h.prototype,"error",2),c([x()],h.prototype,"issues",2),c([x()],h.prototype,"selfFetched",2),c([x()],h.prototype,"editing",2),c([x()],h.prototype,"sticky",2),c([x()],h.prototype,"openedRow",2),c([x()],h.prototype,"openedRowId",2),c([x()],h.prototype,"moreLoading",2),c([x()],h.prototype,"moreError",2);var ke=r=>t=>{customElements.get(r)||customElements.define(r,t)};function Et(r,t,e,o){return ce(r,t,e)??o??ae(e)}function Ae(r,t){return Et(r,"arcana",t,`${bt(t)} Arcana`)}function _e(r,t){return Et(r,"suit",t,bt(t))}var Pe=f`.card-art{aspect-ratio:600/1072}`;var $=class extends h{constructor(){super(...arguments);this.heading="";this.rowDetail={tag:"roxy-tarot-card",path:"tarot/cards/{id}"};this.listKey="cards"}renderData(e){let o=e.cards??[];if(o.length===0)return this.renderEmpty();let n=this.heading||this.t("Tarot deck"),s=typeof e.total=="number"?e.total:o.length,i=this.effectiveLang();return p`<section class="wrap" part="card" aria-label="${n}"><header class="head" part="header"><h2>${n}</h2><span class="count">${s===1?this.t("1 card"):this.t("{{count}} cards",{count:s})}</span></header><ul class="grid" part="section cards">${o.map(a=>p`<li><button type="button" class="tile" aria-pressed="${this.openedRowId===a.id?"true":"false"}" @click="${()=>this.pickRow({id:a.id,name:a.name})}">${a.imageUrl?p`<img class="art card-art" src="${a.imageUrl}" alt="${a.name??this.t("Tarot card")}" loading="lazy">`:p`<div class="art card-art" aria-hidden="true"></div>`}<p class="name">${a.name}</p><p class="meta">${fr(i,a)}</p></button></li>`)}</ul>${this.renderMore()} ${this.openedRow?p`<div class="detail" part="detail">${this.openedRow}</div>`:l}</section>`}};$.endpoints=Ht,$.styles=[tt,Pe,f`.wrap{gap:var(--roxy-space-md);padding:var(--roxy-space-lg);grid-template-columns:minmax(0,1fr);display:grid}h2,p{margin:0}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm);flex-wrap:wrap;display:flex}.count{color:var(--roxy-muted);font-size:var(--roxy-text-sm)}.grid{gap:var(--roxy-space-md);grid-template-columns:repeat(auto-fill,minmax(min(100%,14ch),1fr));margin:0;padding:0;list-style:none;display:grid}.tile{gap:var(--roxy-space-xs);width:100%;padding:var(--roxy-space-xs);color:inherit;border-radius:var(--roxy-radius-md);text-align:start;cursor:pointer;transition:border-color var(--roxy-motion-duration) var(--roxy-motion-easing);background:0 0;border:1px solid #0000;display:grid}.tile[aria-pressed=true],.tile:hover{border-color:var(--roxy-accent)}.detail{margin-block-start:var(--roxy-space-md)}.art{border-radius:var(--roxy-radius-sm);object-fit:cover;background:var(--roxy-border);width:100%}.name{font-size:var(--roxy-text-sm);font-weight:var(--roxy-weight-bold)}.meta{color:var(--roxy-muted);font-size:var(--roxy-text-xs)}`],c([g({type:String,reflect:true})],$.prototype,"heading",2),$=c([ke("roxy-tarot-catalog")],$);function fr(r,t){let e=Ae(r,t.arcana);return t.suit?`${e} \xB7 ${_e(r,t.suit)}`:e}return Ue(xr)})();